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

[photon-core] [2024] Cleanup and document coordinate system conversion #894

Merged
merged 8 commits into from
Oct 15, 2023

Conversation

amquake
Copy link
Member

@amquake amquake commented Aug 12, 2023

Awaiting wpilibsuite/allwpilib#5532 to be merged and PV updated to wpilib 2024.

Cleans up and documents confusing coordinate system conversions from AprilTag -> OpenCV -> WPILib.

@amquake amquake requested a review from a team as a code owner August 12, 2023 07:48
@mcm001
Copy link
Contributor

mcm001 commented Aug 19, 2023

Go ahead and bump wpilib in build.gradle here if you want

@amquake
Copy link
Member Author

amquake commented Aug 21, 2023

Is this supposed to use min area rect for the corner detection algo?

private List<Point> findBoundingBoxCorners(TrackedTarget target) {
// extract the corners
var points = new Point[4];
target.m_mainContour.getMinAreaRect().points(points);

@mcm001
Copy link
Contributor

mcm001 commented Aug 21, 2023

I think so? That whole algorithm seems a bit sus to me though. I feel like we should have a better way of handling that in our landscape vs portrait target code

@mcm001
Copy link
Contributor

mcm001 commented Aug 24, 2023

findBoundingBoxCorners

Yeah, it is. Just checked what it does again. It finds the 4 approx-poly-dp vertices closest to the min-area-rect corners. See detectExtremeCornersByApproxPolyDp

@amquake amquake changed the title [photon-core] Cleanup and document coordinate system conversion [photon-core] [2024] Cleanup and document coordinate system conversion Sep 24, 2023
@mdurrani808 mdurrani808 added this to the 2024 Beta milestone Sep 26, 2023
@mdurrani808
Copy link
Contributor

anything this is still waiting on besides a review

@amquake
Copy link
Member Author

amquake commented Oct 2, 2023

wpilib version 2024

@mcm001 mcm001 merged commit ad4f462 into PhotonVision:master Oct 15, 2023
20 checks passed
@mcm001 mcm001 deleted the coordinate-conversion-cleanup branch October 15, 2023 17:46
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

Successfully merging this pull request may close these issues.

3 participants