#include <iostream>
#include <fstream>
#include <string>
#include<vector>
#include<sstream>
#include<time.h>
using namespace std;
#include<Windows.h>
#include <opencv.hpp>
#include<stitching.hpp>
using namespace cv;
using namespace cv::detail;
bool try_use_gpu = false;
vector<Mat> imgs;
string result_name = "E:\\Practise\\result.jpg";
int main()
{
Mat img = imread("E:\\Practise\\5-1.jpg");
imgs.push_back(img);
//imshow("dd",img);
img = imread("E:\\Practise\\5-2.jpg");
imgs.push_back(img);
//imshow("dd1", img);
Mat pano;
Stitcher stitcher = Stitcher::createDefault(try_use_gpu);
Stitcher::Status status = stitcher.stitch(imgs, pano);
if (status != Stitcher::OK)
{
cout << "Can't stitch images, error code = " << int(status) << endl;
return -1;
}
imshow("dd3",
图像拼接 Stitcher::Status status = stitcher.stitch(imgs, pano); 内存异常 图像大小是个坑......
最新推荐文章于 2024-12-21 07:30:00 发布