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

Color-space-based segmentation

Each color space represents an image indicating the numeric value of the specific characteristic measured by each channel on each pixel. Considering these characteristics, it is possible to partition the color space using linear boundaries (for example, planes in three-dimensional spaces and one space per channel), allowing you to classify each pixel according to the partition it lies in, therefore allowing you to select a set of pixels with predefined characteristics. This idea can be used to segment objects of an image we are interested in.

OpenCV provides the void inRange(InputArray src, InputArray lowerb, InputArray upperb, OutputArray dst) function to check whether an array of elements lie between the elements ...

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