OpenCV stitcher.stitch错误

时间:2014-03-21 07:13:58

标签: c++ objective-c opencv ios7.1 xcode5.1

我在Mac OS X 10.8.5上运行OpenCV 2.4.3,IOs设备Iphone5 IO是IOs7.1我正在尝试使用cv :: Mat stitch(矢量和图像)来获取全景图像。

这是我用来检测和绘制边界框的代码。

cv::Mat stitch (vector<Mat>& images){
    imgs = images;
    Mat pano;
    Stitcher stitcher = Stitcher::createDefault(try_use_gpu);
    stitcher.setRegistrationResol(1); /// 0.6
    stitcher.setSeamEstimationResol(1);   /// 0.1
    stitcher.setCompositingResol(1);   //1
    stitcher.setPanoConfidenceThresh(1);   //1
    stitcher.setWaveCorrection(true);
    stitcher.setWaveCorrectKind(detail::WAVE_CORRECT_HORIZ);
    Stitcher::Status status = stitcher.stitch(imgs, pano);
    Stitcher::Status status1= stitcher.estimateTransform(imgs);
    if (status != Stitcher::OK)
    {
         cout << "Can't stitch images, error code = " << int(status)<<"Estimate Transform :"<<int(status1) << endl;
    }
    return pano;
}

但是,当执行到达该行时。

    Stitcher::Status status = stitcher.stitch(imgs, pano); 

我收到错误,整个应用程序崩溃

OpenCV Error: Assertion failed (dsize.area() || (inv_scale_x > 0 && inv_scale_y > 0))in resize, file /Volumes/minijHome/Documents/xcode_mini/hillegass/advancedIOS/postCourse/openCV/clean-downloads/openCVgitClone/opencv/modules/imgproc/src/imgwarp.cpp, line 1726 
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Volumes/minijHome/Documents/xcode_mini/hillegass/advancedIOS/postCourse/openCV/clean-downloads/openCVgitClone/opencv/modules/imgproc/src/imgwarp.cpp:1726: error: (-215) dsize.area() || (inv_scale_x > 0 && inv_scale_y > 0) in function resize

出了什么问题?我似乎无法从gdb或lldb输出中获取任何新信息。我正在使用Xcode5.1和IOs7.1版本编译代码,请向我建议。出了什么问题..

谢谢

0 个答案:

没有答案