#include<opencv2/opencv.hpp>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<iostream>
using namespace cv;
using namespace std;
int main()
{
Mat firstimage=imread("E:/視覺/圖片集/warve縮小8倍.bmp");
if(!firstimage.data){
cout<<"could not loading secondimage..."<<endl;
return -1;
}
imshow("零",firstimage);
Mat secondimage=imread("由imwrite生成的圖片.bmp");
if(!secondimage.data){
cout<<"could not loading thirdimage..."<<endl;
return -1;}
imshow("一",secondimage);
Mat dstimage1,dstimage2;
dstimage1=dstimage2= Mat::zeros(300,300,CV_8UC3);
// Mat dstimage2= Mat::zeros(300,300,CV_8UC3);
resize( firstimage,dstimage1,dstimage1.size());
resize( secondimage,dstimage2,dstimage2.size());
imshow("二", dstimage1);
imshow("三", dstimage2);
// imwrite("warve縮小8倍.bmp", dstimage2);
waitKey(0);
return 0;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/134381.html
標籤:新手樂園
上一篇:資料結構
