O'Reilly logo

OpenCV 2 Computer Vision Application Programming Cookbook by Robert Laganière

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

Using a Controller to communicate with processing modules

As you will be building more complex applications, you will need to create multiple algorithms that can be combined together in order to accomplish some advanced tasks. Consequently, properly setting up the application, and having all classes communicating together, will become more and more complex. It then becomes advantageous to centralize the control of the application in a single class. This is the idea behind the Controller. It is a particular object in an application that plays an important role and we will explore it in this recipe.

Getting ready

Create a simple dialog-based application with two buttons, one to select an image and one to start the processing as seen below:

Here, we ...

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