Answer the question
In order to leave comments, you need to log in
How to find a known marker in an image?
The task is something like this: find a simple marker on the image (a black-and-white cross, for example). You need to know its dimensions and center, regardless of the angle of rotation. The faster the better. Where to dig? OpenCV? Or are there some more specialized algorithms? How, for example, do they look for markers when decoding a QR code?
UPD: Marker example
Answer the question
In order to leave comments, you need to log in
To search for such markers (albeit without an external semicircle), I start by building a “circle” for each point with a center at this point, consisting of 20 points (the radius can vary) and checking how symmetrical it is. If the average square of the brightness differences of symmetrical points is noticeably less than the dispersion, then this is a candidate for a marker. Then I check for similarity (I take a circle of half the radius). If both criteria are passed, then the area is checked (again, symmetry, self-similarity and uniformity of white and black are checked). Borders have to be recognized only to determine the center with sub-pixel accuracy (accuracy of 1/10 of a pixel is achieved).
Unfortunately, the process is rather slow. Especially if the size of the marker is unknown in advance, and you have to check different scales.
As for the brightness border, we can propose to run an algorithm based on border detection for several brightness thresholds. Any will work. But how to describe and quickly recognize the situation "the center of the marker was passed during scanning", I have not yet figured out.
Book - www.springer.com/computer/image+processing/journal...
Example - docs.opencv.org/doc/tutorials/imgproc/histograms/t...
Try the Hough transform: https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B5%D...
It can find circles. If you add another dimension, you can search for such a pattern, taking into account the rotation.
UPD: Might be interesting: stackoverflow.com/questions/15878325/what-are-the-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question