本来昨天运行的好好的今天突然就错误了==
试了好多种方法没有解决,最后把图片换掉了反而解决了,怀疑是因为没有找出图片共同点?
代码如下所示,如果有小伙伴知道原因求告知==
#include<iostream>
#include<fstream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/stitching.hpp>
#include<opencv2/opencv.hpp>
#include<io.h>
#include<string>
#include<vector>
#include<windows.h>
using namespace std;
using namespace cv;
bool try_use_qpu = false;
vector<Mat> imgs;
string result_name = "result10.jpg";
int main()
{
vector<cv::String> fileName;
string dir_path = ".\\picture\\*.JPG";
Mat pano;
glob(dir_path, fileName);
if (fileName.size() == 0)
{
cout << "No image file" << endl;
return 0;
}
int flag = 0;
for (string fileName : fileName)
{
Mat img = imread(fileName, 1)