#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <cv.h>
using namespace cv;
using namespace std;
int mattest()
{
//CV_8UC3
//CV_<bit_depth>(S|U|F)C<number_of_channels>
//bit_depth代表比特数(8 bit/16 bit/32 bit/64 bit)//
//bit_depth代表在创建的储存图片Mat对象中,每个像素点所占的空间大小
//S: signed int//
//U: unsigned int//
//F: float//
//C<number_of_channels>:存储的图片通道数//
//1---GRAY灰度图---单通道图像//
//2---RGB彩色图像---3通道图像//
//3---带Alpha通道的RGB彩色图像---4通道图像//
//Scalar是把数据构成数组,最多存储4个数据//
//创建一个4通道,且每个通道的值都为(0,0,255),深度为8bit,2行2列的图像矩阵//
Mat m(2, 2, CV_8UC3, Scalar(0, 0, 255));
cout << "M=" << endl << m << endl << endl;
getchar();
return 0;
}
CV_8UC3的解析
猜你喜欢
转载自blog.csdn.net/wei242425445/article/details/80660363
今日推荐
周排行