PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
264 stars 180 forks source link

Undistort pitch/yaw for colored shape targets #1242

Open PascalSkylake opened 6 months ago

PascalSkylake commented 6 months ago

I've been trying to use photonvision for detecting game pieces, but there is significant error when getting pitch and yaw because of lens distortion, making the absolute position of the game pieces change as the camera rotates.

I left a comment about this a little while ago on an issue from 2022, but that issue was only somewhat related.

mcm001 commented 6 months ago

Is this for colored shape or also for ML results? Either way yeah agreed. What lens FOV do you have?

PascalSkylake commented 6 months ago

I'm asking specifically for colored shape, but I imagine the process wouldn't be too different? Off the top of my head the camera is 65 degrees hfov, I can send actual calibration results tomorrow if that'd help, but the issue is present on every camera I've tried.

edit, didnt mean to close the issue my bad

mcm001 commented 6 months ago

https://github.com/PhotonVision/photonvision/pull/1250 has the start of this. I'm scared to touch critical code like this so late in the season, though.