python - OpenCV Zoom Camera Calibration - Stack Overflow

I am working with a zoom camera (10x zoom levels) with a frame size of 1920 × 1080. My goal is to calib

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!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744718909a4589789.html

相关推荐

  • python - OpenCV Zoom Camera Calibration - Stack Overflow

    I am working with a zoom camera (10x zoom levels) with a frame size of 1920 × 1080. My goal is to calib

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信