Home > Back-end >  Opencv3.0 want to try the image matching results from the Internet under the example of compile-time
Opencv3.0 want to try the image matching results from the Internet under the example of compile-time

Time:09-20

#include
#include
#include
# include "opencv2/highgui/highgui. HPP"
# include "opencv2/stitching/stitcher. HPP"
# include

using namespace std;
using namespace cv;

Bool try_use_gpu=false;
Vector Imgs;
String result_name="result. JPG";

Int main ()
{
Mat img1=imread (" 1. JPG ");
Mat img2=imread (" 2. JPG ");
Imgs. Push_back (img1);
Imgs. Push_back (img2);
Mat pano;
Stitcher Stitcher=Stitcher: : createDefault (try_use_gpu);
Stitcher: : the Status Status=Stitcher. Stitch (imgs, pano);
If (the status!=Stitcher: : OK)
{
Cout & lt; <"Can 't stitch, images, and the error code=" & lt; return -1;
}
NamedWindow (result_name);
Imshow (result_name, pano);
Imwrite (result_name, pano);
waitKey();
return 0;
}


1> D: \ work \ computer \ opencv, splicing example 1, third, third \ test CPP (5) : fatal error C1083: cannot open include file: "opencv2/stitching/stitcher. HPP" : No to the file or directory

CodePudding user response:

Unable to open include file: "opencv2/stitching/stitcher. HPP" : No to the file or directory

This is not prompt you for this reason?

CodePudding user response:

What am I supposed to solve ~ ~ hurry

CodePudding user response:

Inside the computer search stitcher. HPP presence or absence of this file and its path is correct?

CodePudding user response:

Would you like to use opencv3.0 BCB calls

CodePudding user response:

Excuse me, I don't why joining together successful show Can 't stitch, images, and the error code=1

CodePudding user response:

# include "opencv2/stitching/stitcher. HPP" changed to # include "opencv2/stitcher. HPP"

CodePudding user response:

refer to 6th floor u014265870 response:
excuse me, I don't why joining together successful show Can 't stitch, images, and the error code=1



Because the picture size does not conform to the requirements

CodePudding user response:

What kind of image size and requirements that

CodePudding user response:

The # include
 & lt; Opencv2/stitching/stitcher. Hpp> Instead of # include & lt; Opencv2/stitching. Hpp> 

CodePudding user response:

Write their own algorithm, why are you like to use OPENCV, convenient OPENCV early, late is limit,
  • Related