Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

position recognition of simple fiducial in image

I don't need a working solution but I'm looking for somebody who can push me into the right direction with some useful hints/links:

I have an image with a fiducial in it (can be e.g. a cross or dot or whatever simple geometry). The images source itself is lit in a way so that a human would not like the resulting image but the contrast for the fiducial is very good. Next I have a clear geometric description of that fiducial (vector data format) and a nominal position of it.

Now I want OpenCV to find the fiducial into the image and return me its real, current position (and rotation for fiducials where this is possible).

How can this be done with OpenCV? The tutorials I found always use complex patterns like faces and pictures that are not optimised for the fiducial detection itself, therefore they all use very complicated learning/description methods.

like image 239
Elmi Avatar asked Aug 27 '12 11:08

Elmi


1 Answers

Depending on your fiducial you can use different methods. A very common method, already implemented in OpenCV is SIFT, which finds scale invariant robust points in an image. The way to proceed is:

  • Run SIFT on your fiducial offline. This generates keypoints to be tracked.

  • Run SIFT real-time (or FAST, which can also generate SIFT descriptors) to find keypoints in the scene.

  • Use a matcher (FLANN matcher, for example) to find which keypoints found in the image correspong to the fiducial.

  • Run findhomography() for matched points. From the found homography H matrix 3x3, you can obtain the camera pose.

There are more aproaches, this the one I like and it is quite up-to-day and fast.

like image 57
Jav_Rock Avatar answered Sep 19 '22 14:09

Jav_Rock