Before we start with the image processing algorithms, we create the main user interface for our application. We are going to use the Qt-based user interface to allow us to create single buttons. The application receives one input parameter to load the image to process, and we are going to create four buttons, as follows:
- Show histogram
- Equalize histogram
- Lomography effect
- Cartoonize effect
We can see the four results in the following screenshot:

Let's begin developing our project. First of all, we are going to include the OpenCV – required headers, define an image matrix to store the input image, and create a constant string to use the new command-line parser already available from OpenCV 3.0; in this constant, we allow only two input parameters, help and the required image input:
// OpenCV includes #include "opencv2/core...