// testopencv.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <opencv2/opencv.hpp>
#include <opencv/highgui.h>
#include <opencv/cvaux.h>
#include <iostream>
using namespace cv;
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
Mat a(4, 3, CV_8U, Scalar(1));
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++)
{
if (j == 0)
*(a.data + a.step[0] * i + a.step[1] * j) = 0;
if (j == 1)
*(a.data + a.step[0] * i + a.step[1] * j) = 1;
if (j == 2)
*(a.data + a.step[0] * i + a.step[1] * j) = 2;
}
}
cout << "a:" << a << endl;
//左移1列
Mat left = a.colRange(1, 3).clone();
cout << "left:"&l