I've been working on a project for some time, to detect and track vehicles in video captured from UAV's, currently I am using an SVM trained on bag-of-feature representations of local features extracted from vehicle and background images. I am then using a sliding window detection approach to try and localise vehicles in the images, which I would then like to track. The problem is that this approach is far to slow and my detector isn't as reliable as I would like so Im getting quite a few false positives.

So I have been considering attempting to segment the cars from the background to find the approximate position so to reduce the search space before applying my classifier, but I am not sure how to go about this, and was hoping someone could help?

Additionally, I have been reading about motion segmentation with layers, using optical flow to segment the frame by flow model, does anyone have any experience with this method, if so could you offer some input to as whether you think this method would be applicable for my problem.

UPDATE: I posted this question on stack overflow as well, and had an excellent answer, I've implemented this idea already and it is working surprising well and im now investigating using optical flow in addition to this technique.

Below is two frames from a sample video

frame 0: enter image description here

frame 5: enter image description here

up vote 6 down vote accepted

Alas, optical flow is a difficult problem too ;-)

Well, to be more constructive, here are a few algorithms that should be worth trying (or have been tried on this particular sequence) :

  • re-train your bags of features on a databse of vehicles more representative (in size and orientation) to your actual problem in order to obtain better results
  • use the fact that the ground is a flat plane to do some parametric optical flow (search for an affine flow) or to compute some affine registration between the frames of the sequence. The moving vehicles will then be outlier from this dominant motion
  • use some optical flow algorithm to compute the flow, then try to classifiy / cluster the optical flow vectors (this is still a widely open problem!). Depending on the language you use, you can use OpenCV's optical flow, the one from TU Graz, D. Sun's optical flow, or even mine ;-). Note however that segmenting the flow will be a non-trivial task that you should probably do in two steps: global (dominant) motion etsimation, then small motion detection.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.