I am using the function findHomography
of OpenCV with the RANSAC method in order to find the homography that relates two images linked with a set of keypoints.
The mask returned by findHomography
is an 8-bit, single-channel cv::Mat
(or std::vector
, if you prefer) containing either 0
or 1
indicating the outlier status.
EDIT: You access each element of the mask by calling .at
, which is leading to the confusing output. You should be using .at
, which will interpret the matrix value correctly.