alicevision / CCTag

Detection of CCTag markers made up of concentric circles.
https://cctag.readthedocs.io
Mozilla Public License 2.0
358 stars 89 forks source link

Are there any requirements for radius? [question] #173

Closed charles-str closed 2 years ago

charles-str commented 3 years ago

Are there any requirements for radius? I make a image, but it can not be recognised.

this is my image made by myself. work

simogasp commented 3 years ago

You can have a look at the script to generate the markers here https://github.com/alicevision/CCTag/blob/develop/markersToPrint/generators/generate.py to be recognized the ratio of the width of the circle has to be met.

About the overall size of the marker, you can have a look at this short documentation https://cctag.readthedocs.io/en/latest/markers/markers.html

charles-str commented 3 years ago

thanks for your answer, I understand how to make the ratio of the width of the circle with your code. But I don't konw why use these ratio, I make other ration of the width of the circle by myself, it can not recognized. Could you tell me the reason? and how to modify the code to recognise other ration of the width of the circle. I look forward to your answer.

simogasp commented 3 years ago

Those ratios are the ones that have been found to work better and in a robust way to avoid ambiguities for marker identification (cf Gallo's paper O. Gallo and R. Manduchi. Reading 1d barcodes with mobile phones using deformable templates. IEEE Trans. Pattern Anal. Mach. Intell., 33(9):1834–1843, 2011.).

The values are hardcoded here https://github.com/alicevision/CCTag/blob/ba0daba0ff1e2c4e2698220ab6ccfc06e5ede589/src/cctag/CCTagMarkersBank.cpp#L120

If you want to try and experiment with your own custom ratios you can try to change the values there. Or, better, create a custom configuration file with a file containing the ratios to be passed as a parameter (see https://github.com/alicevision/CCTag/blob/ba0daba0ff1e2c4e2698220ab6ccfc06e5ede589/src/applications/detection/CmdLine.cpp#L41 ).

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.