Skip to content Skip to sidebar Skip to footer

Raspberry Pi Opencv Error: (-215) Ni == Ni1 In Function Collectcalibrationdata

I'm running python 3 on a raspberry pi 3 and have opencv installed. I took 10 images of a checkerboard, it detects all 10 images and displays them, but when it gets to the last lin

Solution 1:

the example assumes that you have a 6x7 chessboard image, i think you have a 6x9. you have to prepare the objp variable for a 6x9 calibration image, so the code has to be like this: objp = np.zeros((6*9,3), np.float32)

code:

objp = np.zeros((6*9,3), np.float32)

Solution 2:

Thanks @Rui Sebastiao. I was using 14 x 10 so I changed the following lines and at least no error :)

    objp = np.zeros((14*10, 3), np.float32)
    objp[:, :2] = np.mgrid[0:14, 0:10].T.reshape(-1, 2)

Post a Comment for "Raspberry Pi Opencv Error: (-215) Ni == Ni1 In Function Collectcalibrationdata"