C++ 使用不带估计变换的合成全景图
我尝试使用合成全景图而不使用估计变换。。。 它与estimateTransform配合得很好C++ 使用不带估计变换的合成全景图,c++,opencv,C++,Opencv,我尝试使用合成全景图而不使用估计变换。。。 它与estimateTransform配合得很好 stitcher.estimateTransform(imgs); stitcher.composePanorama(pano); 但我找到了另一种方法来计算图像旋转等,这就是为什么我想使用composepanorama,如下所示: vector<Mat> imgs; imgs.push_back(image1); imgs.push_back(image2); imgs.push
stitcher.estimateTransform(imgs);
stitcher.composePanorama(pano);
但我找到了另一种方法来计算图像旋转等,这就是为什么我想使用composepanorama,如下所示:
vector<Mat> imgs;
imgs.push_back(image1);
imgs.push_back(image2);
imgs.push_back(image3);
imgs.push_back(image4);
imgs.push_back(image5);
imgs.push_back(image6);
stitcher.composePanorama(Inputimages,pano);
如果进入
sticker.cpp
:
Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArray pano)
{
LOGLN("Warping images (auxiliary)... ");
std::vector<UMat> imgs;
images.getUMatVector(imgs);
if (!imgs.empty())
{
CV_Assert(imgs.size() == imgs_.size());
这就是为什么如果在composePanorama
之前不调用estimateTransform
,代码就会崩溃
Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArray pano)
{
LOGLN("Warping images (auxiliary)... ");
std::vector<UMat> imgs;
images.getUMatVector(imgs);
if (!imgs.empty())
{
CV_Assert(imgs.size() == imgs_.size());
Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images, const std::vector<std::vector<Rect> > &rois)
{
images.getUMatVector(imgs_);