views:

763

answers:

6

i have a basic understanding in image processing and now studying in-depth the "digital image processing" by Gonzales, but have an urgent task and will appreciate help from somebody experienced in this area

when image given and object of interest approximated form is known (e.g. circle, triangle), what is the best algorithm / method to find this object on image ?

the object can be slightly deformed, so brute force approach will not help

Thanks in advance

+4  A: 

I recommend you use the Hough transform, which allows you to find any given pattern described by a equation. What's more the Hough transform works also great for deformed objects.

The algorithm and implementation itself is quite simple. More details can be found here: http://en.wikipedia.org/wiki/Hough_transform , even a source code for this algorithm is included on a referenced page (http://www.rob.cs.tu-bs.de/content/04-teaching/06-interactive/HNF.html).

I hope that helps you.

Seq
Hough transform is kinda brute force, as you will notice. It works for lines, maybe circles. However the Hough space explodes with shapes with more parameters.
Ivan
+2  A: 

I would look at your problem in two steps:

  • first finding your object's outer boundary: I'm supposing you have contrasted enough image, that you can easily threshold to get a binary image of your object. You need to extract the object boundary chain-code.

  • then analyzing the boundary's shape to deduce the form (circle, polygon,...): You can calculate the curvature in each point of the boundary chain and thus determine how many sharp angles (i.e. high curvature value) there are in your shape. Several sharp angles means you have a polygon, none means you have a circle (constant curvature).

You can find a description on how to get your object's boundary from the binary image and ways of analysing it in Gonzalez's Digital Image Processing, chapter 11.

I also found this insightful presentation on binary image analyis (PPT) and a matlab script that implements some of the techniques that Gonzalez talks about in DIP.

Ivan
Realized I was answering a different question from what was asked. However you can still try finding objects this way, and then only retaining the forms you are looking for.
Ivan
+4  A: 

You may try using Histograms of Oriented Gradients (also called Edge Orientation Histograms). We have used them for detecting road signs. http://en.wikipedia.org/wiki/Histogram_of_oriented_gradients and the papers by Bill Triggs should get you started.

geschema
A: 

I strongly recommend you to use OpenCV, it's a great computer vision library that greatly help with anything related to computer vision. Their website isn't really attractive, nor helpful, but the API is really powerful.

A book that helped me a lot since there isn't a load of documentation on the web is Learning OpenCV. The documentation that comes with the API is good, but not great for learning how to use it.

Related to your problem, you could use a Canny Edge detector to find the border of your item and then analyse it, or you could proceed with and Hough transform to search for lines and or circles.

Gab Royer
A: 

I have the same problem to detect object in images or video frames. I have a task that is detect some people or something who enter into the sight of web camera,and then my system will be alarm ,next step is recognize which kind of thing the object is, in this phase I know use hough transform to detect line ,circle,even rectangle,but when a people come into the sight of camera,people's profile is more complex than line,circle and rectangle, how can i recognize the object is people not a car.I need help to know that. thanks in advance

carl
A: 

you can specially try 'face recognition'. Because, you know that is a specific topic. On the other hand 'face detection' etc. EmguCV can be useful for you.. It is .Net wrapper to the Intel OpenCV image processing library.

snndynya