Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Calculate the fundamental matrix for stereo rectification
# ------------------------------------------------------------
# Calculate the fundamental matrix for the cameras
pts1 = np.int32(pts1)
pts2 = np.int32(pts2)
fundamental_matrix, inliers = cv.findFundamentalMat(pts1, pts2, cv.FM_RANSAC)
# We select only inlier points
pts1 = pts1[inliers.ravel() == 1]
pts2 = pts2[inliers.ravel() == 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment