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

asked 2016-08-19 15:26:23 -0600

Jordan.Brenner gravatar image

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
edit retag flag offensive close merge delete

Comments

ahh,wait, in c++ a Size() is (W,H), you gave it (H,W)

berak gravatar imageberak ( 2016-08-20 00:01:37 -0600 )edit