-3

There is a software called Movavi Photo Editor which has a feature of background removal (subtraction) which works the following way: user marks areas of image which belong to an object and areas which belong to background

This actions provide clues to software how object and background look like and help to remove background of an image.

Example: https://img.movavi.com/movavi.com.12/images/how-to/en/how-to-remove-background-from-image/2.jpg

I'm interested in using similar technique in my OpenCV project for object detection. So I was wondering how this technique can be implemented in OpenCV?

Mitkp
  • 7,800
  • 3
  • 14
  • 8

1 Answers1

1


I guess it works with (adaptive)regiongrowing and possibly constraints for the region growing. You should make yourself familiar with this algorithms - but the basics are selecting the background (red) to select pixel values (maybe they take the average or median of the marked pixels). Now they look in the neighborhood of the initial pixels and decide if the pixels next to the initial pixels have the same value +- a certain threshold. If they do have the same value(+-threshold), they are marked as background. Pixels inside the constraints(green border) are skipped.
You would do this in opencv using floodfill or something like this.

00zetti
  • 114
  • 8
  • Because the example picture is poor of features, they possibly just use an algorithm without a threshold, but look for every pixel outside the constraining border. But basically it should be a region growing algorithm. – 00zetti Feb 01 '17 at 14:18