
OpenCV By Example
By :

Before we start with the image processing algorithms, we will create the main user interface for our application. We will use a QT-based user interface to allow us to create single buttons.
The application receives one input parameter to load the image to be processed, and we will create the following four buttons:
We can see the four results in the following screenshot:
Let's develop our project. First of all, we will include the required OpenCV headers. We define an img
matrix to store the input image, and create a constant string to use the new command-line parser, which is only available in OpenCV 3.0. In this constant, we allow only two input parameters: common help and the required image input:
// OpenCV includes #include "opencv2/core/utility.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" using namespace cv; // OpenCV command line...