O'Reilly logo

Learn OpenCV 4 by Building Projects - Second Edition by Prateek Joshi, Vinicius G. Mendonca, David Millan Escriva

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

Removing the background using the light pattern for segmentation

In this section, we are going to develop a basic algorithm that will enable us to remove the background using a light pattern. This preprocessing gives us better segmentation. The input image without noise is as follows:

If we apply a basic threshold, we will obtain an image result like this:

We can see that the top image artifact has a lot of white noise. If we apply a light pattern and background removal technique, we can obtain an awesome result in which we can see that there ...

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