O'Reilly logo

OpenCV By Example by Vinícius Godoy, David Millán Escrivá, Prateek Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Graphical User Interface

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:

  • Show histogram
  • Equalize histogram
  • Lomography effect
  • Cartoonize effect

We can see the four results in the following screenshot:

Creating the Graphical User Interface

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required