OpenCv 3d Stitching Panorama

左心房为你撑大大i 提交于 2019-12-19 09:53:56

问题


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

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_Bl8s2ePunQcnBaM3A4WDlDcXM&usp=sharing


回答1:


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. All these pairs are pased into leaveBiggestComponent to obtain largest set of images, which belong to a panorama.

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

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.

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

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.



来源:https://stackoverflow.com/questions/39269798/opencv-3d-stitching-panorama

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!