How to select the specific frame with object I am detecting the object from the live camera through feature detection with svm , and it read every frame from camera while predicting which affect its speed , i just want that it should select the frame which contain the object and ignore other frames which have no object like empty street or standing car's , it should only detect the moving object

For example , If the object came into camera in 6th frame , it contain into the camera till many frames until it goes out from camera's range , so it should not recount the same object and ignore that frames.

Explanation :

I am detecting the vehicle from video , i want to ignore the empty frames , but how to ignore them ? i only want to check the frames which contain object like vehicle , but if the vehicle is passing from video it take approximately lets assume 5 sec , than it mean same object take 10 frames , so the program count it as 10 vehicles , one from each frame , i want to count it as 1 , because its the one (SAME) vehicle which use 10 frames

My video is already in Background subtraction form , i used SURF/BOW with SVM

I explore two techniques :

1- Entropy ( Frame subtraction )
2- Keyframe extraction
I'm seeing two issues here:


Frames with no activity: You can check the gradient between successive frames and only do object detection when the gradient information passes a certain threshold.
Counting the same object: The vehicle location information can be useful for this task. If the gradient change occurs in the location of a detected object in the previous frame then it is the same vehicle. If necessary, you can also use object color and object size parameters to account for varying speeds.