I have a C# desktop application.
I am using a wrapper to OpenCV which is EMGU.
I am just performing a basic motion detection operation.
I am using component labelling and 2 frames differencing to determine motion changes. I am also using an averaging background approach to update the background which i use to 'subtract' from the current and previous frames.
All this works well.
Now consider this image:
Because this bush is close to the camera, movement will be detected by my current methods when the wind blows.
Also, consider this image:
Here we see a cobweb to the right of the image. Again when the wind blows I get motion detection.
My possible solutions:
Look for shapes. In the case of elongated shapes like the cobweb where the height is greater than the width (to a certain scale) then ignore that movement. But, I found I am missing motion when someone walks on the pavement at the back of the image from across the road.
Erosion. Again I am missing genuine motion like people and bikes.
Compare Histograms I have found it is not reliable. A histogram will only measure the number of different colours (in its own bin). It is possible for the colours to change due to the saturation and lighting or/and the same numbers of colours are found because another object has passed by.
So, I thought about using atrophy. I did post an earlier question to this here:
but as the person who so kindly explained entropy suggested that I should post as a specific/separate question here...
I want to explore whether the frequency or/and entropy would help me here? Should I look at spatial or frequency distribution? Would frequency be best to look into if I want to avoid colour changes?
Would either approach be faster than the other as I want it real-time as possible.
Any eduction for me here would be great.