Home > Back-end >  Based on OpenCV to two different images into the same size - code size
Based on OpenCV to two different images into the same size - code size

Time:10-27

#include
#include
#include
#include
#include

Using the namespace CV;
using namespace std;
Int main ()
{
Mat firstimage=imread (" E:/visual/images/warve narrow eight times. BMP ");
if(! Firstimage. Data) {
Cout<& lt;" Could not loading secondimage... "& lt; return -1;
}
Imshow (" zero ", firstimage);
Mat secondimage=imread (" images generated by imwrite. BMP ");
if(! Secondimage. Data) {
Cout<& lt;" Could not loading thirdimage... "& lt; return -1; }
Imshow (" a ", secondimage);
Mat dstimage1 dstimage2;
Dstimage1=dstimage2=Mat: : zeros (300300, CV_8UC3);
//Mat dstimage2=Mat: : zeros (300300, CV_8UC3);
The resize (firstimage dstimage1, dstimage1. The size ());
The resize (secondimage dstimage2, dstimage2. The size ());
Imshow (" 2 ", dstimage1);
Imshow (" three ", dstimage2);
//imwrite (" warve narrow eight times. BMP, "dstimage2);
waitKey(0);
return 0;
}
  • Related