DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at on

OpenCV – 10 lines to remove the background in an image 🖼️

Hi !

Super quick post today, with a very simple scenario:

Load and image and remove the background.

To do this, I’ll use OpenCV and cvzone. Here we can see a screenshot of my office, and the removed background sample. As usual, the threshold is the important one to manage the quality.

Removed Background

And the sample code:

In next samples, I’ll show to work with this and the camera, and even replace the bacground 😀.

Happy coding!


El Bruno

More posts in my blog

Top comments (0)