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

apriltag3 vs apriltag2 -- detect quad #263

Open
ruichaowang opened this issue Oct 17, 2022 · 6 comments
Open

apriltag3 vs apriltag2 -- detect quad #263

ruichaowang opened this issue Oct 17, 2022 · 6 comments

Comments

@ruichaowang
Copy link

Describe the bug
Apriltag 3 has a lower detect rate than Apriltag 2.
Tag family: tagCodes36h11

To Reproduce
Steps to reproduce the behavior:
parameters for apriltag3:

    td->nthreads = 8;
    td->quad_decimate = 1;
    td->quad_sigma = 0.0;

    td->qtp.max_nmaxima = 10;
    td->qtp.min_cluster_pixels = 1;

    td->qtp.max_line_fit_mse = 200.0;
    // td->qtp.critical_rad = 1 * M_PI / 180;
    td->qtp.cos_critical_rad = cos(10 * M_PI / 180);
    td->qtp.deglitch = 0;
    td->qtp.min_white_black_diff = 1;

    td->tag_families = zarray_create(sizeof(apriltag_family_t*));

    pthread_mutex_init(&td->mutex, NULL);

    td->tp = timeprofile_create();

    td->refine_edges = 1;
    td->decode_sharpening = 0.25;

    td->debug = 1;

Expected behavior
Apriltag 3 can detect more tags than Apriltag 2.

** Input Image**
raw imgae:
front_debug_preprocess

using apriltag2:
front

using apriltag3:
front_3

Screenshots
apriltag2 debug,
aptag2debug

apriltag3 debug,
aptag3debug

as you can see the apriltag2 can detect more quads.

Operating Sytem
m1 mac

Additional context
Add any other context about the problem here.

@ruichaowang
Copy link
Author

re-upload raw images.
front_debug_preprocess

@christian-rauch
Copy link
Collaborator

The behaviour between the implementations changed. This repo hosts all the versions. If you need an older implementation, you will have to check out that specific commit.

@mkrogius @wxmerkt Since this also came up in #262, I think it makes sense to create branches apriltag1 and apriltag2 for the previous versions 1 and 2. Do you agree? Which commits would match the latest state of the version 1 and 2 implementations?

@ruichaowang
Copy link
Author

ruichaowang commented Oct 28, 2022

The behaviour between the implementations changed. This repo hosts all the versions. If you need an older implementation, you will have to check out that specific commit.

It would be great to have branch apriltag2 for the previous versions 2.
But from my point of view, the apriltag3 should have a better detection rate than apriltag2, but which is not ture in this case.

@mkrogius
Copy link
Contributor

mkrogius commented Nov 4, 2022

@ruichaowang Neither AprilTag 3 nor AprilTag 2 supports tags with the extra calibration squares on the corners like that. I also don't recognize the style of the image you have uploaded as apriltag2_debug, which makes me wonder whether this is actually an AprilTag 2 implementation? If I had to guess, this would actually be an AprilTag 1 implementation, which didn't officially support tags with calibration squares, but which did have better detection rate in this scenario than AprilTag 3.

@christian-rauch I think that makes sense. Unfortunately none of the earlier AprilTag releases are commits in this repo. It may take some digging in order to find the original releases for AprilTag 1 and AprilTag 2

@AprilRobotics AprilRobotics deleted a comment from chjXu Jul 24, 2023
@AprilRobotics AprilRobotics deleted a comment from ruichaowang Aug 8, 2023
@XavierQL
Copy link

@christian-rauch here i am confused by the highly distorted image how to detect the apriltag accurately and efficiently?from my side, the first step is to rectify the image and then to detect the apriltage code. But like the fisheye image as the issue shown, the undistorted image has cropped lots of FOV(using opencv), so how to detect the tags at the edge of the image?

@christian-rauch
Copy link
Collaborator

@XavierQL What is confusing? You should rectify the image in any case to have the line detection working properly. Is this related to the AprilTag 2 vs. 3 discussion above?

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

No branches or pull requests

4 participants