I think my question has to do more with understanding the implementation of the opencv method findHomolography than getting it to work.
Before explaining you should know that I don't have any experience coding in cpp, maybe that could be the reason.
I already implement the method successfully but I would like to understand where do things come from.
I took this example code in python from http://www.pyimagesearch.com/2016/01/11/opencv-panorama-stitching/
# computing a homography requires at least 4 matches
if len(matches) > 4:
# construct the two sets of points
ptsA = np.float32([kpsA[i] for (_, i) in matches])
ptsB = np.float32([kpsB[i] for (i, _) in matches])
# compute the homography between the two sets of points
(H, status) = cv2.findHomography(ptsA, ptsB, cv2.RANSAC,
reprojThresh)
# return the matches along with the homograpy matrix
# and status of each matched point
return (matches, H, status)
# otherwise, no homograpy could be computed
return None
As you see, you get as return values (H, status), the Homolography Matrix (H) and a status for each matched point.
Now the question, where does status come from?
If you take a look at the cpp code for the findHomography method in https://github.com/opencv/opencv/blob/6991c24a27d521907b4c1a75cf92447579eafe90/modules/calib3d/src/fundam.cpp you can see at line 401 there is only:
return H;
Could someone explain why it is like this?
Thanks in advance!