Search code examples
c++opencvobject-detection

Does it matter what types of negative images you use for Haar-like feature trainning?


I'm trying to do some object tracking using OpenCV and I read a bit about the Haar-like features. It says I need about 5000 - 10000 negative images to do this and the more images I use the more accurate the results will be. But I was wondering does it matter what type of images I use for it?

For example, I will be tracking objects inside a room so would it be better to only get negative images of indoor environments? Or does it not really matter because it's only negatives?

I do apologies if this sounds like a silly question, but I want to be 100% sure about this to make sure my results can be as accurate as possible.

Thanks


Solution

  • From what I read it doesn't matter if these negative images are outdoor or indoor, but I think you should have both of these types.

    BTW in this link Naotoshi Seo says that he used about 3000 negative samples, so if you are planning on having 5000 to 10000 of them, you probably can use both indoor and outdoor negatives. Just make sure that there are no objects of your interest in these negative samples.

    Hope this helps.