Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the cv2.stereoCalibrate: "imageSize" variable format? [Python]

What is the cv2.stereoCalibrate: "imageSize" variable format?

I've tried numpy arrays, defining the variable plainly, pixel count (720 x 1280 x 3), etc. but I'm still getting the below error. I can't seem to find any documentation on it. Please help!

Snippet of code:

# Stereo calibration
imageSize = (720,1280)
retval_stereo,cameraMatrixLeft,distCoeffsLeft,cameraMatrixRight,distCoeffsRight,R,T,E,F=cv2.stereoCalibrate(
    objPoints,
    imgPoints1,
    imgPoints2,
    cameraMatrix1,
    distCoeffs1,
    cameraMatrix2,
    distCoeffs2,
    imageSize
    )

Error message:

Traceback (most recent call last):
  File "CalibrationOpenCV_TEST.py", line 78, in <module>
    imageSize
SystemError: new style getargs format but argument is not a tuple