mat读取大于255的像素值
Mat dst; input.convertTo(dst, CV_32S); int rows = dst.rows; int cols = dst.cols; for(int i = 0; i < rows; i++) { for(int j = 0; j < cols; j++) { cout << "value : " << dst.at<int>(i, j) << endl ; } }
Mat dst; input.convertTo(dst, CV_32S); int rows = dst.rows; int cols = dst.cols; for(int i = 0; i < rows; i++) { for(int j = 0; j < cols; j++) { cout << "value : " << dst.at<int>(i, j) << endl ; } }