First time here? Check out the FAQ!
answered 2012-09-11 08:28:36 -0600
Please try the following expression:
cv::Mat mask = cv::Mat(matrix != matrix);
where matrix is cv::Mat that contains NaN values.