/*------read a image and show it's channels-----*/
/*----------------------------------------------*/
/*-------------coding by wyz 2017/8/10----------*/
/*----------------------------------------------*/
#include <opencv/cv.h> // OpenCV 文件头
#include "opencv/highgui.h"
#include "opencv/cvaux.h"
//#include "opencv2/cvcxcore.h"
#include "opencv2/opencv.hpp"
//#include "opencv2/imgproc.hpp"
#include <iostream>
#include <string>
using namespace cv;
using namespace std;
int main()
{
Mat image1;//定义一个图像矩阵类型
image1 = imread("C:\\Users\\wyz\\Desktop\\lianxi\\1.jpg");//读入图片数据
cout << "原图1的通道数:" << image1.channels() << endl;
namedWindow("原图1", WINDOW_NORMAL); // 创建一个窗口,并且可以调整窗口的大小
imshow("原图1", image1); // 在窗口中显示图片
waitKey(0); // 等待一次按键,程序结束
return 0;
}
/*----------------------------------------------*/
/*-------------coding by wyz 2017/8/10----------*/
/*----------------------------------------------*/
#include <opencv/cv.h> // OpenCV 文件头
#include "opencv/highgui.h"
#include "opencv/cvaux.h"
//#include "opencv2/cvcxcore.h"
#include "opencv2/opencv.hpp"
//#include "opencv2/imgproc.hpp"
#include <iostream>
#include <string>
using namespace cv;
using namespace std;
int main()
{
Mat image1;//定义一个图像矩阵类型
image1 = imread("C:\\Users\\wyz\\Desktop\\lianxi\\1.jpg");//读入图片数据
cout << "原图1的通道数:" << image1.channels() << endl;
namedWindow("原图1", WINDOW_NORMAL); // 创建一个窗口,并且可以调整窗口的大小
imshow("原图1", image1); // 在窗口中显示图片
waitKey(0); // 等待一次按键,程序结束
return 0;
}