OpenCV Programming 1
1. Display data type.
#include "pch.h"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
int i = 2;
while (i != 0)
{
cout << "enter image martix size";
cin >> i;
if (i == -1) {
break;
}
Mat M(i, i, CV_8UC3, Scalar(0, 0, 255));
cout << "M = " << endl << " " << M << endl << endl;
}
}
Comments
Post a Comment