Recognizing the location of simple fiducial images

I don't need a working solution, but I'm looking for someone who can push me in the right direction with helpful hints / links:

I have an image with a fiducial in it (maybe, for example, a cross or a point or any simple geometry). The image source itself is lit in such a way that a person will not like the resulting image, but the contrast for fiducial is very good. Then I have a clear geometric description of this fiducial (vector data format) and its nominal position.

Now I want OpenCV to detect fiducial in the image and return to me its real current position (and rotation for the fiducials where possible).

How can this be done with OpenCV? The tutorials that I found always use complex templates, such as faces and images, that are not optimized for the fiducial definition itself, so they all use very sophisticated teaching / description methods.

+6
source share
1 answer

Depending on your fiducial you can use different methods. A very common method already implemented in OpenCV is SIFT, which finds scalable invariant points in an image. Way to continue:

  • Run SIFT offline fiducial. This generates key points for tracking.

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

  • Use matches ( FLANN BOARD , for example) to find which key points found in the image match the arguments.

  • Run findhomography() for matching points. From the found Hx 3x3 homographic matrix, you can get a camera view .

There are more uploads, this is what I like, and it is pretty fast and fast.

+10
source

Source: https://habr.com/ru/post/923851/


All Articles