Since the application you will be profiling is an OpenCV based application, this video talks about what OpenCV is. Some background on what OpenCV is and what it can do is given here as well as pointers to some resources for further details on the library that originated from Intel. In short, OpenCV is used for image analysis, image processing and image manipulation. Since the application you will see has memory leaks performs image blending, knowing a little bit about OpenCV will greatly help when inspecting the source code.
- [Narrator] OpenCV stands for Open Source Computer Vision. It's used for image processing, analysis, and image manipulation. Since the application we will profile performs image blending, knowing a little bit about OpenCV will greatly help when we inspect the source code. Intel launched OpenCV back in 1999 in an effort to advance CPU-intensive applications. The second version launched a decade later in 2009. It added a lot of changes to the C++ interface and is now known as OpenCV 2.
You'll see the OpenCV 2 header file included when we look at the source code. The library has more than 2500 optimized algorithms which are used for computer vision and machine learning. This library is often used for facial recognition, identifying objects within an image, such as a table or a chair. It can even classify human actions in videos, track camera movements, the list goes on. In short, OpenCV is used in our application to easily load bitmap files that contain landscaping pictures and perform a blend operation between two pictures so that one picture can be seen in the background of another picture.
This image manipulation is easily performed in a few lines of code using OpenCV versus other methods. Opencv.org is a must if you want to explore and dive deeper into image processing and machine learning in general. The website contains the prebuilt libraries, sources for the different versions, and contains lots of documentation and tutorials for getting it set up to write your first application. This bitmap-blending application uses version 2.4.13, if you want to know more about the functions seen in source code.
- Setting up the application
- Looking at the source code
- Gathering memory leak evidence
- Optimizing the application