开发者

OpenCV: wrap image to cylindrical coordinates

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)

I have read an opencv mailing list thread about cylindrical image warping, but based on the paper, I d开发者_如何转开发on'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?

Thanks in advance.


Unfortunately, you do need the camera calibration if you wish to warp an image from Cartesian to cylindrical coordinates.

Think about it. If the camera is not calibrated, then you do not know what is the field of view of the camera. If you do not the field of view, then you can not map pixels to optical rays. If you do not know the optical ray which corresponds to your pixel, there's no way to express that pixel in cylindrical coordinates.


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.

This article is a good starting point.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜