O'Reilly logo

A Practical Introduction to Computer Vision with OpenCV by Kenneth Dawson-Howe

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

4 Binary Vision

Grey-scale images generally have 8 bits per pixel. While processing these images is easier in some ways than processing colour images, there is a simpler form of image, the binary image, in which processing is even more straightforward. In fact, a significant portion of practical applications of computer vision have been developed using binary vision (Marchand-Maillet and Sharaiha, 1999).

A binary image is one in which there is only a single bit per pixel (i.e. black or white). These images are created by thresholding (see Section 4.1) where the thresholds used are determined in a variety of ways (see Section 4.2 and Section 4.3). The resulting binary images are often post-processed using mathematical morphology (see Section 4.4) and the resulting segmented binary regions are extracted from the image using connected components analysis (see Section 4.5).

It is worth mentioning that binary images can be created from many types of image, such as intensity images, gradient images, difference images, and so on.

4.1 Thresholding

A binary image is created from a grey-scale image by thresholding. The binary thresholding algorithm is simply:

Algorithm 4.1

numbered Display Equation

Often grey-level 255 is used instead of binary 1 (so that the resulting image can be represented using a 8-bit format and displayed/processed in the same manner as the original grey-scale image).

The most efficient ...

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