views:

654

answers:

6

I am hoping to obtain some some help with 2D object detection. I'll give a brief overview of the context in which this will be implemented.

There will be an image taken of the ceiling. The ceiling will have markers placed on it so the orientation of the camera can be determined. The pictures will always be taken facing straight up. My goal is to detect one of these markers in the image and determine its rotation. So rotation and scaling(to a lesser extent) will be the two primary factors used in the image detection. I will be writing the software in either C# or matlab(not quite sure yet).

For example, the marker might be an arrow like this:

Reference Arrow

An image taken of the ceiling would contain markers. The software needs to detect a single marker and determine that it has been rotated by 170 degrees.

Ceiling Arrows

I have no prior experience with image analysis. I know image processing is a fairly broad topic and was hoping to get some advice on which direction I should take and which techniques would be best for my application. Thanks!

+4  A: 

I'm not directly in this field but I would tell you to start by looking into edge detection specifically. If you have a background in math/engineering the materials are pretty easy to understand:

This seemed to spark some ideas: http://www.cfar.umd.edu/~fer/cmsc426/lectures/edge1.ppt

Dlongnecker
+2  A: 

You will need to explore edge detection, so look into Hough filters. After that you will need to look into pattern classifiers and feature extraction.

This paper has an algorithm that appears to work without edge detection. This book excerpt is more oriented toward the kind of symbol detection you intend, once you have done the edge detection.

Heath Hunnicutt
+3  A: 

I'd recommend MATLAB or if you're intent on using C#, Emgu CV is pretty good.

Hough transforms are a great idea. Once you detect the edges in your image, using, say a Canny edge detector, you get an edge image (which is binary image with only 1 or 0 for values).

Then, the Hough straight line transform (essentially) spins a line about each white pixel in the edge image (the resolution of the line depends on you) using a parametrized function for the line and calculates the total number of white (valued at 1) pixels along each spun line and stores this information in a big accumulator which stores the data indexed by the parameters of the line.

alt text

In the example above, the parametric form for a line is:

rho = x*cos(theta) + y*sin(theta)

where rho is the distance and theta is the angle

So as you can see the, if you look at the bin at a particular orientation you can find out how many lines are oriented at that angle. Of course, you'll have to do some extra work to figure out which lines are oriented at that angle since you have 5 other lines per arrow but that shouldn't be too hard.

Jacob
your second paragraph is badly worded: it looks like the hough transform is a edge detector, whereas it is a line detector. to be complete, a sobel edge detector would fit nicely here too.
Adrien Plisson
Hmm, I don't think so. It seems pretty clear that the second paragraph uses the edge image to obtain the Hough transform. Secondly, completeness is not an issue, since there are **several** edge-detectors available, so mentioning one should be enough to steer the OP in the right direction. In any case, thanks for the input, I'll modify the paragraph.
Jacob
+3  A: 

as always in computer vision, your first problem is image illumination and acquisition. before going further, establish how your markers will be printed on the ceiling, what their form will be, what light you will be using to see them, and what camera setup you will chose to look at the markers.

given a good material, a good light and a good camera, you may have no problem at all to process the image. for example, you can print a full arrow in a retro-reflective material, with a longer tail than your example, use a colored light and a corresponding filter on the camera. now all you have on your image is arrows... there are plenty other ways of acquiring the image that will help you there.

once you have plain arrows, a simple blob analysis (which consist of computing statistical moments of objects in the image) will give you a lot of informations: each arrow should have values almost equal for the 7 hu moments, which allows you to filter objects efficiently, also the orientation computed from the central moments will give you the angle of the arrow. blob analysis being only statistical, it is extremely fast.

Adrien Plisson
+2  A: 

Several systems have been developed to detect markers and their orientation robustly:

  • reacTIVision (open source) uses these types of tags to find position and orientation: alt text

  • ARToolKit (open source) uses a different type of tags to extract all 6 degrees of freedom: alt text

If your primary goal is not to learn, but to make the application work, I would suggest you use one of these. It is not a trivial task for a beginner to robustly detect the position and orientation of a random marker in an image.

On the other hand, if you are manly interested in learning, I would also direct you to ARToolKit and its publications (and their references) that explain how to robustly implement marker detection.

Ivan
A: 

A rigorous way to determine the orientation of an imaged acquired under projective geometry (most of cameras) is using the vanishing points and vanishing lines. Good news to you: your marker can be used to find this information! More good news, your image can be rectified, so the image columns (the y-axis) will correspond to the up-down direction. You will find more about this stuff in chapter 8 of Hartley and Zisserman's book, Multiple View Geometry in Computer Vision.

Also remember that probably you will need to work on the radial distortion issue, the distortion caused by the camera lens. The other guys are right about the arrow detection problem: you have to use edge detection and, after that, Hough transform or template matching. Refer to Gonzalez and Woods' book Digital Image Processing for details.

TH