CCTag icon indicating copy to clipboard operation
CCTag copied to clipboard

CCTag (subpixel) accuracy

Open anauta00 opened this issue 3 years ago • 1 comments

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

anauta00 avatar Dec 12 '22 10:12 anauta00

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.

OndrejIvancik avatar Aug 18 '23 13:08 OndrejIvancik

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.

github-actions[bot] avatar Aug 14 '24 00:08 github-actions[bot]