Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

IMHO the problems are the following:

  1. car.xml is trained by you? If so, then that is the problem; it recognizes just the poses that you gave to training. And more: it can also detect some other cars.
  2. If you are using SURF features from one car and you are trying to detect other different cars, this will not work. But you are saying that you want to detect one specific car and count it, so the SURF features approach is good.

You have applied the background subtraction, so you have now detections (ore regions of interest). So I am thinking of an approach like this for each detection:

  1. detect features
  2. match them
  3. if the matching is higher than a threshold, you say it is the car you want

For this you shall have some database of some images of that car in different positions and do the matching with all the features in your database. The matching threshold should be set based on some test. You have used a kalman filter for tracking, so you can use it for tracking, if you do not want to count the detection in each frame, but every time it enters in your field of view after it's out. Hope it is helpful.