Question Details:
There are a variety of image processing algorithms useful for detecting reference marks (contour tracing, FAST, MSER, Haar Feature-based Cascade Classifier, or even just Harris Edge detector, etc).
There are a variety of simple geometric shapes one might pick for use as reference marks (circle, square, X, etc).
I am wondering if someone has some experience with what combinations work best? Some additional criteria I have:
- using an algorithm implemented in openCV would be great
Background invariance: detection algorithm should be robust against random background features(folds in clothing, random sharp corners, random colors present in background, speckle noise)
Distance invariance: detection algorithm should be stable with respect to scale. (i.e. is should work whether the reference mark takes up a 100x100 pixel square in the image or 30x30 pixel square)
Angle invariance: detection algorithm should not fail if the reference mark is viewed at an angle
I am using a 640x480 webcam as a source of the images, so image processing at better than 5-10 fps would be nice
Additional Info:
My goal is to print out a fixed number black shapes on white paper. Place them in arbitrary positions in the scene that I am imaging with a webcam, and try to detect the center coordinates of each of the black shapes using a c++ program w/ openCV.
I am wondering if there is any consensus about what type of shape is the easiest to detect and how to do it.
Approaches that I have tried:
Detecting concentric circles using contour tracing: 1) Find the contours that are n times nested 2) compute the center point. The problem is that it is hard to resolve the rings at far distances (>5 feet) and angles.
Detecting cross shapes using contour tracing: 1) find contours, 2) find convex hull of each contour, 3) find number of convexity defects 4) compute the center if convexity defects == 4. Alternatively I have tried finding the depth of each convexity defect and comparing it to the width of the bounding rectangle around the contour to determine if it is a "real" convexity defect or just due to noise. This method works but sometimes certain background features, like folds in clothing, can make extra objects detected.