在vs中使用opencv stitcher类时获取断言(-215)错误

在vs中使用opencv stitcher类时获取断言(-215)错误,opencv,Opencv,像这样的问题太多了,我已经解决了大部分问题,但仍然无法找到问题的解决方案,这是错误代码:错误(-215:断言失败)函数“cv::imshow”中的size.width>0&&size.height>0 bool try_use_gpu = false; vector<Mat>imgs; Mat image, pano; image = imread("moscow1.jpg"); if (image.empty())

像这样的问题太多了,我已经解决了大部分问题,但仍然无法找到问题的解决方案,这是错误代码:错误(-215:断言失败)函数“cv::imshow”中的size.width>0&&size.height>0

 bool try_use_gpu = false;
        vector<Mat>imgs; 
        Mat image, pano;
        image = imread("moscow1.jpg");
        if (image.empty())
        {

            cout << "check your input image" << endl;
            return EXIT_FAILURE;
        }
        imgs.push_back(imread("moscow1.jpg"));
        image = imread("moscow2.jpg");
        if (image.empty())
        {
            cout << "check your input image" << endl;
            return EXIT_FAILURE;
        }
        imgs.push_back(imread("moscow2.jpg"));

        Stitcher::Mode mode = Stitcher::PANORAMA;
        Ptr<Stitcher> stitcher = Stitcher::create(mode, try_use_gpu);
        //Stitcher stitcher = Stitcher::createDefault(try_use_gpu);
        Stitcher::Status status = stitcher->stitch(imgs, pano);

        if (status != Stitcher::OK)
        {
            cout << "Panorama unsuccessful" << endl;
        }

            imshow("panorama", pano);
            waitKey(0);
            imwrite("panoramaimg.jpg", pano);
}
bool try\u use\u gpu=false;
向量机;
Mat图像,pano;
image=imread(“moscow1.jpg”);
if(image.empty())
{

cout要缝合的图像必须有公共点,对于要使用的程序,如果图像没有公共点,则使用两个不同的图像将不起作用