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)