admin管理员组文章数量:1391960
I am working with a zoom camera (10x zoom levels) with a frame size of 1920 × 1080. My goal is to calibrate the camera at each zoom level and apply undistortion to remove lens distortion.
For calibration, I captured images of a 9×6 checkerboard at each zoom level and used OpenCV to compute the camera matrix, distortion coefficients, rotation matrix, and translation matrix. I then stored these values in an .npz file for later use.
However, I noticed that the focal length values in the camera matrix vary significantly across zoom levels. Additionally, when I use cv2.undistort() to undistort frames, the output frame size is inconsistent, and in some cases, the resolution becomes much smaller than the original 1920 × 1080.
Tried:
Capturing checkerboard images at different zoom levels for calibration.
Using OpenCV's cv2.calibrateCamera() to compute the camera matrix and distortion coefficients.
Applying cv2.undistort() using the stored calibration parameters.
Using cv2.getOptimalNewCameraMatrix() to refine the undistortion process.
Expected Outcome:
A properly undistorted frame that maintains the original 1920 × 1080 resolution across all zoom levels.
A consistent frame size after undistortion.
Minimal distortion with straight lines appearing straight in the output frame.
However, the output resolution varies, and at some zoom levels (especially 3x zoom), the undistorted frame size is much smaller than expected.
I am looking for insights on why this happens and how to ensure a properly undistorted frame at each zoom level. Any guidance would be greatly appreciated!
本文标签: pythonOpenCV Zoom Camera CalibrationStack Overflow
版权声明:本文标题:python - OpenCV Zoom Camera Calibration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744718908a2621574.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论