-
Notifications
You must be signed in to change notification settings - Fork 196
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] 2D Detection data accuracy #896
Conversation
@mcm001 Thoughts on inverting 2d target yaw / pitch here to match wpilib? |
I'm not sure. I see arguments on both sides. If we yell very loudly that it changed, it'll be fine? Like it needs to be at the top of our release notes. Or @Bankst should we leave it as is? |
I say we leave it as is and maintain parity with what LL has (large amount of users are coming from there or have experience with LL system anyways). |
Explanation:
The pitch traditionally calculated from pixel offsets do not correctly account for non-zero values of yaw because of perspective distortion (not to be confused with lens distortion)-- for example, the pitch angle is naively calculated as: However, using focal length as a side of the associated right triangle is not correct when the pixel x value is not 0, because the distance from this pixel (projected on the x-axis) to the camera lens increases. Projecting a line back out of the camera with these naive angles will not intersect the 3d point that was originally projected into this 2d pixel. Instead, this length should be: This cannot, however, account for perspective distortion in the calculation of the target center (averaging the contour corners).Undistort detected target corners when calibration data is available?We currently only do this for AprilTag detections when passing to pose estimation. Not sure how correct it would be for all targets or if it's even helpful. Relevant: Undistorting 2d detection results #643Nah