0

I'm working on training OpenCV to detect an object using opencv_traincascade.

I see from the OpenCV documentation that there is an option to specify -bgcolorand -bgthresh for the positive images. From what I understand, this would set those pixels to clear and OpenCV would ignore them.

My questions:

  1. Is this correct?
  2. Would it be useful to shoot my objects against a green screen and specify the green as the background color?
  3. Would anything be lost by doing that instead of shooting against a variety of backgrounds?
JeffThompson
  • 1,538
  • 3
  • 24
  • 47

1 Answers1

2
  1. Yes
  2. Yes -> This makes selecting the background color much, much easier.
  3. The data of the backgrounds will be lost, but in most cases this is what you want. Otherwise, the trained data might recnogise the background more than the object.
Nallath
  • 2,100
  • 20
  • 37