0

I am using background subtraction method to detect moving objects. Because their type in my experiment is reflective material object, so it causes difficulty for detecting. How could I resolve it?

Thank you!

EDIT: I'm using Background subtraction MOG2 (in OpenCV). OpenCV version is 3.10

EDIT 1: Updated the result when apply to HSV colour space

Step 1: Convert to HSV colour space

enter image description here

Step 2: Apply MoG2

enter image description here

1 Answers1

1

I'm assuming your camera is non-moving, you know the background model and you are using something like MOG detector. The simplest approach is to use color space that separates luminance from hue and saturation - one such example is HSV color space. OpenCV provides cvtColor function to convert i.e. form BGR (default) to HSV color space. Later you can use just hue and saturation channel to avoid influence of value variations (light). This however won't work for extremely shiny objects, like plastic or shiny metal lit by sunlight that appears to be white to the camera.

Another way you can deal with this problem is to use motion tracking - i.e. optical flow. If you are really interested and want to get more into details, I can refer you to some specific papers.

Max Walczak
  • 433
  • 2
  • 12
  • Hey. I am using MoG2 method with static camera. As I said above, I'm having problems when detect reflective material object. How can I improve it? – Hoang Anh Tuan Jan 17 '17 at 09:31
  • I just answered - try to feed the MoG2 with images converted to HSV color space and you can remove the V component (i.e. set it to 0). If you have super bright reflections (appearing as white), this won't help anyway and you will need something much more clever than MoG - i.e. motion tracking with optical flow. – Max Walczak Jan 17 '17 at 09:48
  • I tried as you said. But not success. it detects even non-moving objects. – Hoang Anh Tuan Jan 18 '17 at 03:13
  • Ahh now I see - you have a can that reflects background from all directions... This is much harder than I thought, I thought you simply have some shiny material like car paint. I'm afraid I can't help you here. No simple model based on colors or histograms will help in this case and MOG2 is not capable of dealing with this kind of materials. – Max Walczak Jan 20 '17 at 14:20