2

I'm trying to perform image registration without much luck.

The image below is my 'reference' image. I use a webcam to acquire images of the same object in different orientations and then need to perform a transformation on these images so that they look as close to the reference image as possible.

object to detect

I've been using both the Aforge.NET and Accord.NET libraries in order to solve this problem.

Feature detection/extraction

So far I've tried the image stitching method used in this article. It works well for certain types of image but unfortunately it doesn't seem to work for my sample images. The object itself is rather bland and doesn't have many features so the algorithm doesn't find many correlation points. I've tried two versions of the above approach, one which uses the Harris corner detector and one which uses SURF, neither of which has provided me with the results I need.

One option might be to 'artificially' add more features to the object (i.e. stickers, markings) but I'd like to avoid this if possible.

Shape detection

I've also tried several variations of the shape detection methods used in this article. Ideally I'd like to detect the four well-defined circles/holes on the object. I could then use the coordinates of these to create a transformation matrix (homography?) that I could use to transform the image.

Unfortunately I can't reliably detect all four of the circles. I've tried myriad different ways of pre-processing the image in order to get better circle detection, but can't quite find the perfect sequence. My normal operations is:

  • turn image grayscale
  • apply a filter (Mean, Median, Conservative Smoothing, Adaptive Smoothing, etc)
  • apply edge detection (Homogenity, Sobel, Difference, Canny, etc)
  • apply color filtering
  • run shape/circle detector

I just can't quite find the right series of filters to apply in order to reliably detect the four circles.

Image / Template matching

Again, I'd like to detect the four circles/holes in the object, so I tried an image / template matching technique with little success. I've created a template (small image of one of the circles) and run the Exhaustive Template Matching algorithm, without much success. Usually it detects just one of the holes, usually the one the template was created from!

In summary

I feel like I'm using the correct techniques to solve this problem, I'm just not sure quite where I'm going wrong, or where I should focus my attention further.

Any help or pointers would be most appreciated.

digital_fate
  • 567
  • 1
  • 5
  • 15
  • Could you provide an example of the moving image as well? What types of transformations are you dealing with? Rigid? Affine? Projective? – eigenchris Dec 14 '15 at 03:43

2 Answers2

1

If you've added examples of transformations you're trying to be invariant to - we could be more specific. But generally, you can try to use HOG for detecting this structure, since it is rather rich in gradients.

HOG is mostly used to detect pedestrians, besides it is good for detecting distinct logos.

I am not sure about HOG's invariance to rotations, but it's pretty robust under different lighting and under moderate perspective distortion. If rotation invariance is important, you can try to train the classifier on rotated version of object, although your detector may become less discriminative.

After you have roughly detected the scale and position of your structure - you can try to refine it, by detecting ellipse of it's boundary. After that you will have a coarse estimate of holes, which you can further refine using something like maximum of normalized cross correlation in this neighbourhood.

alexisrozhkov
  • 1,623
  • 12
  • 18
1

I know it's been awhile but just a short potential solution:

I would just generate a grid of points on the original image (let's say, 16x16) and then use a Lucas-Kanade (or some other) feature detector to find those points on second image. Of course you likely won't find all the points but you can sort and choose the best correlations. Let's say, the best four? Then you can easily compute a transformation matrix.

Also if you don't get good correlations on your first grid, then you can just make other grids (shifted, etc.) until you find good matches.

Hope that helps anyone.

tod doeh
  • 99
  • 7