您的位置:首页 > 运维架构

OPENCV学习笔记1-8_选取图像局部区域

2018-01-21 19:44 495 查看
#include <iostream>
#include "opencv2/opencv.hpp"
#include <stdio.h>
using namespace std;
using namespace cv;
int main( int argc, char* argv[] )
{
Mat A = Mat::eye(6, 6, CV_32S);
Mat B = A.row(2);               //get second row
Mat C = 3*A.col(2);
// extrac
4000
ts A columns, 1 (inclusive) to 3 (exclusive).
Mat D= A(Range(1, 3), Range::all());

cout<<"yunfung test:"<<endl<<endl;
cout<<"A"<< A<<endl<<endl;
cout<<"B"<< B<<endl<<endl;
cout<<"C"<< C<<endl<<endl;
cout<<"D"<< D<<endl<<endl;

return(0);
}


 


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: