访问单通道Mat对象中的值
//访问单通道Mat对象中的值
#include <opencv2/core.hpp>
using namespace cv;
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
Mat m = (Mat_<int>(3, 2) << 11, 12, 33, 43, 51, 16);
for (int r = 0; r < m.rows; r++)
{
for (int c = 0; c < m.cols; c++)
{
cout << m.at<int>(r, c) << ",";
}
cout << endl;
}
}