Hello, i'm having issue with fisheye calibration
magnitude = 1.0
new_w, new_h = int(w * magnitude), int(h * magnitude)
new_DIM = (new_w, new_h)
balance = 0
new_K = cv2.fisheye.estimateNewCameraMatrixForUndistortRectify(
K, D, DIM, np.eye(3), balance=balance, new_size=new_DIM
)
print("new_K:", new_K)
map1, map2 = cv2.fisheye.initUndistortRectifyMap(
K, D, np.eye(3), new_K, new_DIM, cv2.CV_16SC2
)
The new_K is always output NaN, why is that?
If i'm removing the estimateNewCameraMatrixForUndistortRectify and use it directly like this
map1, map2 = cv2.fisheye.initUndistortRectifyMap(
K, D, np.eye(3), K, DIM, cv2.CV_16SC2)
The output of distort img is normal with the images have been calibrated
I want to use the estimateNewCameraMatrixForUndistortRectify because of the image could be scalable