cvIsInf与cvIsNan函数
参考网址:访问像素并检查是否为inf像素-腾讯云开发者社区-腾讯云 (tencent.com)
using namespace cv; cv::Mat replaceInvalidDisparities(const cv::Mat &original_disp) { cv::Mat output = orignal_disp.clone(); //access pixel for(int i = 0; i< output.rows; i++) { for(int j=0; j<output.cols; j++) { //now here i want to check if the actual pixel is inf cvIsInf(output.at<double>(i,j)); } } }