OpenCV非旋转图像拼接 [英] OpenCV non-rotational image stitching

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

问题描述

我正在OpenCV中进行图像拼接,我正在拍摄来自不同位置的平面场景并尝试构图全景。我修改了拼接示例以满足我的需要。 openCV拼接管道的问题在于它假定了相机的纯旋转,这对我来说并非如此。当拍摄的照片与场景完全正交(没有相机旋转,只是平移)时,结果非常好,但是当存在相机旋转和平移时,结果都不令人满意。

I am doing image stitching in OpenCV, where I am taking pictures of a planar scene from different locations and try to compose a panorama. I have modified the stitching example to fit my needs. The problem with the openCV stitching pipeline is, that it assumes a pure rotation of the camera, which is not the case for me. When the pictures are taken perfectly orthogonal to the scene (no camera rotation, just translation), the result is quite good, but when there are both, camera rotation and translation the results are not satisfying.

我能够计算摄像机位置之间的单应性,这可以完成,因为场景是平面的,但我真的不知道下一步是什么。我的想法是使用单应法以这样的方式使图像失真,摄像机正面面向平面并接下来应用拼接。这个问题是,我不知道特征点的真实位置。我该怎么做呢?还有什么我可以尝试为任意相机移动的平面场景获得更好的拼接结果吗?

I am able to compute the homographies between the camera positions, which can be done because the scene is planar, but I don't really know what the next step is. My idea is to undistort the image using the homography in such a way, what the the camera is facing the plane orthogonally and to apply the stitching next. The problem with this is, that I do not know the true locations of the feature points. How can I go about doing this? Is there anything else I could try to get better stitching results for a planar scene with an arbitrary camera movement?

推荐答案

opencv拼接代码通过假设转换为零来工作。因此,如果翻译在一个范围内,它将正常工作。否则它将拒绝遥远的图像。如果要使用已翻译的图像集,则需要使用decomposehomgraphymat,它将提供非零平移和旋转。但是对于变形和混合,opencv仅使用相机参数的旋转。所以你需要为非旋转拼接设计一个全新的方法,也许你可以看看微软的光影工作。我不确定,但它只适用于翻译的图像。

The opencv stitching code works by assuming translation to be zero. So if the translation is within a range, it will work fine. Else it will reject faraway images. If you want to use translated image set, you need to use decomposehomgraphymat which will give nonzero translation adn rotation. But for warping and blending opencv uses rotation of camera parameter only. So you need to devise a complete new method for non-rotational stitching, maybe you look into microsoft photosynth work. I am not sure, but it does work for only translated images.

这篇关于OpenCV非旋转图像拼接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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