Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCTag (subpixel) accuracy #204

Open
anauta00 opened this issue Dec 12, 2022 · 1 comment
Open

CCTag (subpixel) accuracy #204

anauta00 opened this issue Dec 12, 2022 · 1 comment

Comments

@anauta00
Copy link

Hi,

I have a question about the accuracy of the center position detection in CCTag.

For a specific use, I have coded my own (complicated but functional) center position detection algorithms for concentric circles.
It uses OpenCV's feature detection mostly...
The accuracy I reach on synthetic images (known center positions) is very good, like <0.05 pixels.

Using CCTag, which I would prefer, the accuracy is less (and the results vary for each run).

Can I improve the accuracy of the CCTag library somehow? Are there some settings I need to change?

Thanks and greetings,
Auke Nauta

@OndrejIvancik
Copy link

OndrejIvancik commented Aug 18, 2023

Hi Anauta00,
the subpixel accuracy and precision of detection is a bit disapointing in version 1.0.3 especially on generated ideal images. You can easilly find out that the returned positions have negative offset in x and y direction:

cctag_not_accurate_not_precise
These are the deviations between cctag detected and expected positions for all reliable 4-crown markers. Mean offset vector is [-0.3983, -0.340] pixels.
The marker images contains one marker with radius 100 pixels, like this:
cctag_marker_id0

When you change the parameter _numSamplesOuterEdgePointsRefinement to 100 (cctag::Parameters), the precision will be much better, but now with the offest vector [-0.5151, -0.513]:
cctag_not_accurate_precise

This nicely proofs that all the positions are returned with half-pixel error, what I reported some time ago https://github.com/alicevision/CCTag/issues/122. Hopefully it will be fixed in next release. For now you only have to add 0.5 to x and y coordinate to get accurate and precise results with mean offset vector of [-0.0152, -0.011] pixels:
cctag_accurate_precise

I hope it helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants