阅读背景:

关于在console中查看opencv Mat 矩阵元素的问题

来源:互联网 

程序如下:

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main() {

    Mat temp2(5, 5, CV_8UC1, Scalar(255));

    for (int i=0; i<temp2.rows; i++) {
        for (int j=0; j<temp2.cols; j++) {
                cout << temp2.at<uchar>(i,j) << endl;
        }                                                                                                                                                                                                                                                                                
    }

    return 0;
}#include <opencv2/opencv.hpp>
#inclu



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: