I'm trying to write some code to estimate the fundamental matrix:
img1 = cv2.imread('glassL.jpg')
img2 = cv2.imread('glassR.jpg')
K = calibration['cameraMatrix']
F = cv2.findFundamentalMat(img1, img2, cv2.FM_RANSAC, 0.1, 0.99)
Getting the error:
OpenCV Error: Assertion failed (npoints >= 0 && points2.checkVector(2) == npoints && points1.type() == points2.type()) in findFundamentalMat, file /tmp/opencv-XbIS/opencv-2.4.8.2/modules/calib3d/src/fundam.cpp, line 1103
Traceback (most recent call last):
File "sfm.py", line 27, in <module>
F = cv2.findFundamentalMat(img1, img2, cv2.FM_RANSAC, 0.1, 0.99)
cv2.error: /tmp/opencv-XbIS/opencv-2.4.8.2/modules/calib3d/src/fundam.cpp:1103: error: (-215) npoints >= 0 && points2.checkVector(2) == npoints && points1.type() == points2.type() in function findFundamentalMat
Any clue?