I am trying to do fish-eye stereo calibration
using Opencv
and Python
at first I have done stereo calibration of the single camera
print("Calibrating left fisheye camera...")
rms, _, _, _, _ = cv2.fisheye.calibrate(objectPoints,leftImagePoints,imageSize, K_left,D_left,R,T,flags,(cv2.TERM_CRITERIA_EPS+cv2.TERM_CRITERIA_MAX_ITER, 30, 1e-6))
print("calibrating right fisheye camera...")
rms, _, _, _, _ = cv2.fisheye.calibrate(objectPoints,rightImagePoints, imageSize,K_right,D_right,R,T,flags, (cv2.TERM_CRITERIA_EPS+cv2.TERM_CRITERIA_MAX_ITER, 30, 1e-6))
but in next step when I am trying to do stereofisheye calibration
:
print("calibrating both fisheye cameras together...")
(rms,K1, D1, K2, D2, R, T) = cv2.fisheye.stereoCalibrate(
objectPoints,
leftImagePoints,
rightImagePoints,
K_left,
D_left,
K_right,
D_right,
imageSize)
It is throwing an error:
Traceback (most recent call last): File "fisheye_calib1.py", line 177, in imageSize) cv2.error: OpenCV(4.0.0-pre) /home/compute/OpenCV-tmp/opencv- 3/modules/core/src/arithm.cpp:683: error: (-5:Bad argument) When the input arrays in add/subtract/multiply/divide functions have different types, the output array type must be explicitly specified in function 'arithm_op'
As I am new to OpenCV
. I am really confused what step should I take to avoid this error.