The mask returned by findHomography
is an 8-bit, single-channel cv::Mat
(or std::vector<uchar>
, if you prefer) containing either 0
or 1
indicating the outlier status.
EDIT: You access each element of the mask by calling .at<double>
, which is leading to the confusing output. You should be using .at<uchar>
, which will interpret the matrix value correctly.