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

Backprojecting a histogram to detect specific image content

A histogram is an important characteristic of an image's content. If you look at an image area showing a particular texture or a particular object, then the histogram of this area can be seen as a function giving the probability that a given pixel belongs to this specific texture or object. In this recipe, you will learn how the image histogram can be advantageously used to detect specific image content.

How to do it...

Suppose you have an image and you wish to detect specific content inside it (for example, in the following screenshot, the clouds in the sky). The first thing to do is to select a region of interest which contains a sample of what you are looking for. This region is the ...

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