Detect an object in an image using its outline

6 views (last 30 days)
I'm trying to track an image in a video feed. I've been using SURF in the computer vision toolbox and it works well when the object doesn't change in appearance from the template. However, the object builds up greese, slim, or paint over time and is no longer recognized using SURF. This is a rigid object and always has the same shape though. So I was wondering if there was a way to track the object based on the outline of its shape. It would be perferable if there was a method available in the computer vision toolbox. Thank you.
  3 Comments
John
John on 25 Jun 2012
In doing my own research online the only thing I could find that sort of resembles what I want to do involves calculating something called the Hausdorff distance between a template and an image after running them through an edge detector. If this is suitable for my problem, then does Matlab already have a method that would implement this algorthim? I suppose I would also need the edge detector to keep only the outside edges of the object and to throw away any internal edges it finds. I'm not sure how to do this. Template matching performs even worse for the same reasons as previously mentioned.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 25 Jun 2012
SURF should work well. I have seen it work with a wide variety of things that look similar but not very close. Perhaps you just need to loosen up the parameters.
MATLAB doesn't have Hausdorf distance ( http://cgm.cs.mcgill.ca/~godfried/teaching/cg-projects/98/normand/main.html) yet, that I'm aware of, though there are some Hausdorff entries in the File Exchange. MATLAB does have an edge() function though. Plus you can design your own edge detector if you want.
Perhaps you need to look at more sophisticated tracking routines where the algorithm can predict the next location based on the current location or a few of the most recent frames. This would allow it to track better than to always compare the object being tracked to the "Clean" object (before it got painted, slimy, and/or greasy). Check out sections 16, 17, and 18 here http://iris.usc.edu/Vision-Notes/bibliography/contents.html to find better algorithms.
For advice on algorithms, maybe you can post the YouTube link to your video in the sci.image.processing newsgroup.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!