OpenCv 3d拼接全景图 [英] OpenCv 3d Stitching Panorama

查看:87
本文介绍了OpenCv 3d拼接全景图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有7张来自gopro的图像(钻机中有5台相机,顶部是一台,底部是一台,它们都是gopro相机).我想将所有这些图像拼接在一起以创建3d全景图.我已经能够使用opencvitching_detailed.cpp在Rig中缝合5张图像.链接到文件:

I have 7 images from gopro (5 cameras in rig and one for top and one for bottom, They all are gopro camera). I want to stitch all these images together to create a 3d panorama. I have been able to stitch 5 images in Rig by using opencv stitching_detailed.cpp. Link to file:

https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/stitching_detailed.cpp

但是我不确定如何缝制顶部和底部(对我而言,现在底部并不重要,但是我必须对顶部做些事情).知道如何做到这一点吗?请让我知道我是否也可以使用相同的itching_detailed.cpp来缝合顶部.

But I'm not sure how to stitch top and bottom (For me right now bottom is not that important but i have to do something about top). Any idea how this can be done? Please let me know if i can use same stitching_detailed.cpp to stitch top also.

以下链接包含我正在使用的图像.它还包含我从装备中缝制图像获得的结果.

Following Link contains images which I'm using. It also contains results i got from stitching images in rig.

https://drive.google.com/folderview?id=0B_Bl8s2ePunQcnBaM3A4WDlDcX usp = sharing

推荐答案

因此,首先您需要了解stitching_detailed.cpp的工作原理. 1.使用SURF/ORB/SIFT左右在每个图像中检测特征关键点.然后,对于每个图像对,找到最佳特征匹配,并计算单应性矩阵,并获得每对图像的线性像素数

So first you need to understand how stitching_detailed.cpp works. 1. features keypoint is detected in each image using SURF/ORB/SIFT or so. Then for each image pair, best feature matches are found and homography matrix is calculated and number of inliers for each pair is obtained

(*finder)(img, features[i]); 


 BestOf2NearestMatcher matcher(try_cuda, match_conf);
 matcher(features, pairwise_matches);

  1. 将所有这些对都粘贴到LeaveBiggestComponent中,以获取最大的图像集,这些图像属于全景图.

  1. All these pairs are pased into leaveBiggestComponent to obtain largest set of images, which belong to a panorama.

相机参数或每张图像都是从上面获得的集合中计算出来的,并且进行了变形和融合.

camera parameters or each image is calculated from above obtained set and warping and blending is done.

第1步将找到每对的单应性并生成数目的内线.第2步将删除所有置信因子(阈值数量)小于阈值的图像对.由于cam7 img的功能很少,几乎没有与其他任何图像重叠的区域,因此它将在leftbiggestcomponent步骤中被拒绝.

step 1 will find homography for each pair and generate number of inliers. Step 2 will remove all those image pair for which confidence factor(number of inliers) is less than threshold. Since cam7 img has so less features and almost no overlapping region with any other image, it will get rejected in leavebiggestcomponent step.

您可以在此链接中看到功能和图像(我已经使用过orbfeatures)

You can see features and mtaching in this link (I have used orbfeatures)

https://drive.google.com/open?id=0B2wDitsftUG9QnhCWFIybENkbDA

我也没有更改图像大小,但是我想稍微减小图像大小(可能减少一半)会产生更多特征点

Also I have not changed the image size, but i guess reducing the image size a bit(by half maybe) will yield more feature points

您可以做的是减少拍摄帧进行拼接的时间间隔.为了获得良好的效果,图像之间必须至少有40%的重叠区域.

What you can do is reduce the time interval in which you take frame for stitching. To obtain good results, there must be atleast 40% overlapping region between images.

这篇关于OpenCv 3d拼接全景图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆