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)); } } }

浙公網安備 33010602011771號