IOS OpenCV Mat 像素运算

#pragma mark - - 检测矩阵运算

cv::Mat eyeMat =cv::Mat::eye(4,4,CV_8UC1);

for(inti =0; i < eyeMat.rows; i++) {

for(intj=0; j< eyeMat.cols; j++) {

//XPFLog(@"%d ", eyeMat.at(i,j)[0]);

NSLog(@"%d ", eyeMat.at(i,j));

}

NSLog(@" == ");

}

NSLog(@" ============= ");

eyeMat.at(2,3) =3;

for(inti =0; i < eyeMat.rows; i++) {

for(intj=0; j< eyeMat.cols; j++) {

//NSLog(@"%d", eyeMat.at(i,j)[0]);

NSLog(@"%d ", eyeMat.at(i,j));

}

XPFLog(@" =***= ");

}

你可能感兴趣的:(IOS OpenCV Mat 像素运算)