O'Reilly logo

Learning Image Processing with OpenCV by Gloria Bueno García, Oscar Deniz Suarez, José Luis Espinosa Aranda, Jesus Salido Tercero, Ismael Serrano Gracia, Noelia Vállez Enano

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

Accelerating your own functions

In this section, there are three examples of using OpenCV with OpenCL. The first example allows you to check whether the installed SDK is available and obtain useful information about the computing devices that support OpenCL. The second example shows you two versions of the same program using CPU and GPU programming, respectively. The last example is a complete program to detect and mark faces. In addition, a computational comparative is performed.

Checking your OpenCL

The following is a simple program that is shown to check your SDK and the available computing devices. This example is called checkOpenCL. It allows you to display the computer devices using the OCL module of OpenCV:

#include <opencv2/opencv.hpp>  ...

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