I am developing a application for detecting vehicles using opencv.
I am using background subtraction method, BackgroundSubtractorMOG, and findContours method for detecting vehicles. I facing a couple of problems in this one.
1) When a vehicle stops,like in a signal, it becomes a part of the background. But I don't want this to happen.
2) When there are more vehicles stopping in signal closely, the foreground of all the vehicles are joined when using findcontors function.
Is there any way I could solve this problem.