本文介绍了OpenCV:将图像包裹到圆柱坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用opencv库创建一个全景图像。根据,我需要将图像扭曲为圆柱坐标。我有公式从全景图像马赛克纸,这是:

I'm trying to create a panoramic image using opencv library. Based on this, I need to warp the image to cylindrical coordinates. I got the formula to convert 3D cartesian (X,Y,Z) to cylindrical coordinate(θ,v) from Panoramic Image Mosaic paper , which is:

  θ = tan−1 (X/Z)

  v = Y/ √ (X^2 + Z^2)

我已经阅读了一个关于柱面图像扭曲的opencv邮件列表线程,但是基于这篇论文,我不认为我需要使用相机校准矩阵。而且,在网站上,问题还没有解决。问题是,我们如何将opencv IplImage转换为圆柱坐标并正确显示?

I have read an opencv mailing list thread about cylindrical image warping, but based on the paper, I don't think I need to use camera calibration matrix. And, in the website, the problem has not been solved. Th question is, how can we convert an opencv IplImage to cylindrical coordinate and display them correctly?

提前感谢。

推荐答案

如果您有足够多的图像(> 90%-95%),切片从每个图像的中间,并将它们拼接在一起。根据相机工作的稳定性,您可能需要通过匹配重叠部分来校正相机在图像之间的垂直和旋转运动。如果你有一个非常好的镜头,你可以逃避更少的重叠。

If you have enough images with enough overlap (>90%-95%) you can skip the calibration by taking narrow vertical slices from the middle of each image and stitching those together. Depending on the steadiness of your camera work you might need to correct for vertical and rotational movement of the camera between images by matching on the overlapping parts. If you have a very good lens you can get away with less overlap.

是一个很好的起点。

这篇关于OpenCV:将图像包裹到圆柱坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 10:10