将图像映射到球体上并取回展开的等角矩形投影 [英] Mapping an image on sphere and getting back the unwrapped equirectangular projection

查看:135
本文介绍了将图像映射到球体上并取回展开的等角矩形投影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试完成以下任务:

想象一下,长宽比为2:1的绘图画布.我想在此画布上放置矩形图像(..x,y直角坐标),并且随着图像移动远离画布中心(0,0),我想使图像失真,就像它在滑动一样在虚球的法线上方.

我相信逻辑是将图像的(x,y)二维笛卡尔坐标转换为相应的纬度,经度球坐标,然后将等角投影应用于球体,并返回具有相应失真的图像(就好像它是的uvs在3D建模程序包中展开).

确实有一个应用程序执行名为"HDR Light Studio"的应用程序,该应用程序生成用于3D场景照明的等角(纬/长)HDR图像.
如果您查看他们的视频,您将确切了解我要实现的图像失真.

如果可以的话,请给我一些帮助.
我在网上搜索了所有信息,但没有运气.

在此先感谢


-编辑-----------------
我在CodeProject的这里找到了一篇有趣的文章:
http://www.codeproject.com/KB/graphics/PolarView.aspx [ ^ ]

逻辑与我要达到的目标非常接近,但不完全相同.
再说一次,如果有人可以从他们的网站上观看"HDR Light Studio"视频,那么他们将确切地了解我正在尝试实现哪种实时图像失真.

Hi,
I''m trying to achieve the following task:

Imagine having a 2:1 aspect ratio drawing canvas. I want to place rectangular images on this canvas (..x,y Cartesian coordinates) and as I move the image around further away from the canvas center (0,0) I want to get the distortion to the image as if it was sliding over the imaginary sphere''s normals.

The logic I believe is to convert the (x,y) 2D Cartesian coordinates of the image to the corresponding latitude, longitude spherical coordinates, and then apply the equirectangular projection to the sphere and return the image with the corresponding distortion (as if it''s uvs where unwrapped in a 3D modeling package).

There is an application doing exactly that called "HDR Light Studio" which generates equirectangular (lat/long) HDR images for 3D scene lighting purposes.
If you check out their videos you will understand exactly what kind of image distortion I''m trying to achieve.

Please give me some help over the subject if you can.
I have searched all around the net for info but no luck.

Thanks in advance


--Edit-----------------
I have found an interesting article here at CodeProject:
http://www.codeproject.com/KB/graphics/PolarView.aspx[^]

The logic is very close to what I''m trying to achieve but not exactly.
Again, if someone can take a look at "HDR Light Studio" videos from their site will understand exactly what kind of real-time image distortion I''m trying to achieve.

推荐答案

好吧..因为我正在编译...:laugh:

有几种方法可以做到...我能想到的..最好由您决定...

首先,您将要确定天气状况,以寻找鱼眼效果或实际投影,因为它尚不十分清楚...

但是..我会像盲人一样前进..

如果您想要鱼眼镜头...,您将需要找到曲面到正方形的映射..(在极坐标中可能最容易做到这一点)在图形和物理学网站上有很多此类参考文献...基本上,您需要捏造"的是要进行插值的点的粒度...

对于多维数据集内的球体,请重复前面的方法6次...

您引用的示例是在平面上的外接圆,而不是从平面上投影的内接球...或在平面上投影的球,与
相反 球形展开(UV样式)并放置在表面上...

希望对您有所帮助..?:confused:

如果您的屏幕上显示的是确切网址,则最好张贴该网址,然后说."看一看他们网站上的"HDR Light Studio"视频" ...这不是很有帮助...:doh:
Well.. since I''m compiling... :laugh:

there are a couple of ways to do this... that i can think of.. the best is up to you to decide...

First you will want to make a decision about weather your looking for a fisheye effect or an actual projection, because it isn''t exactly clear...

However.. I will proceede like a blind man..

If you want Fish eye... You will need to find the mapping of a curved surface to a square.. (probably easiest to do this in polar coords) there are a lot of these references available on graphics and physics websites... basically what you need to "fudge" is the granularity of the points to which you want to do interpolation...

For a sphere inside a cube, you repeat the previous approach 6 times...

the example you referenced is for a circumscribed circle over a flat surface, as opposed to an inscribed sphere being projected upon from a flat surface... or a sphere projecting onto a surface, as opposed to a
sphere unwrapped (UV style) and placed on a surface...

I hope that helps..?:confused:

If you have the Exact URL of a screen that shows what your looking for it is better to post that then say .."take a look at ''HDR Light Studio'' videos from their site"...this isn''t very helpfull... :doh:


这篇关于将图像映射到球体上并取回展开的等角矩形投影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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