【发布时间】:2019-06-26 20:28:38
【问题描述】:
我正在尝试设置平面图像拼接应用程序,但如果我在 PlaneWarper 下方提供拼接器,应用程序会因访问异常错误而崩溃。我还了解到 ORB 特征查找最适合平面拼接,但使用 OrbFeatureFinder 也会导致应用程序在拼接函数中崩溃。我知道我并不完全了解拼接管道的工作原理,所以如果有人能帮助我理解这里的问题,我将不胜感激。
vector<Mat> imgs;
cv::Mat stitch (vector<Mat>& images)
{
imgs = images;
Mat pano;
Ptr<Stitcher> stitcher = Stitcher::create(Stitcher::SCANS, true);
stitcher->setPanoConfidenceThresh(0.8f);
stitcher->setFeaturesMatcher(makePtr<cv::detail::AffineBestOf2NearestMatcher>(true, true, 0.8f));
Stitcher::Status status = stitcher->stitch(imgs, pano);
if (status != Stitcher::OK)
{
cout << "Can't stitch images, error code = " << int(status) << endl;
//return 0;
}
return pano;
}
我已经在我的 Mac 上测试了带有 Orb 特征查找和平面变形的stitching_detailed 程序,它给了我很好的结果,所以我尝试在 iOS 应用程序界面中运行stitching_detailed.cpp,但这会导致所有类型的崩溃,所以我现在正在尝试这种方式。
拼接效果很好,但这里和那里有些失真,并且使用 ORB 功能查找和平面翘曲在我的 Mac 上消除了它。
【问题讨论】:
标签: c++ ios opencv3.0 objective-c++