Hi all, thank you for getting back to me. I will try to clarify some of the confusion.
The camera is a webcam (Logitech C920). The 0.03 is the reprojection error from cv.projectPoints()
right after I calibrated the camera. I followed the tutorial OpenCV: Camera Calibration. I used 18 pictures of a grid taken inside. The grid pattern is this one. The pics of the grid look like
Perhaps I need more variation?
Correct. I am working with a test video, but in the beginning of this video the camera is still. I am comparing the frame with the one right before. The frames are basically identical a part from some sensor noise.
I retain the good matches using this procedure that I found in the OpenCV doc (unfortunately new forum users cannot post more than 1 link)
matches = matcher.knnMatch(descriptors0, descriptors1, k=2)
good_matches = []
for m, n in matches:
if m.distance < 0.6 * n.distance:
good_matches.append(m)
I will try what you suggested. I will also clean up the code so I can post it. Thank you both!