360 度球体全景到立方体全景变换算法(伪代码或至少需要完整的逻辑)
所以我们可以从维基百科获取这样的图像 并尝试将其映射到未来的立方体或类似立方体的东西
并且比顶部和底部扭曲
有些人可能认为只干扰一半而不是试图填充它会有效
它不会=(并且内容感知填充无助于填充该正方形=(
但如果你愿意的话它看起来很糟糕尝试渲染这样的立方体全景图。
我可以想象的另一种方法是将 3D 全景图渲染到球体上,然后以某种方式将其快照/投影到立方体上......但我不知道如何用简单的数学运算将其写下来(想法)这里不是使用渲染引擎,而是尽可能以数学方式进行)
So we can take such image from wikipedia
And try to map it for future cube or something like cube
And than distort for top and bottom like
Some one may think that doing disturtion only for half and than triing to fill it would work
it would not=( and content aware filling would not help filling that square=(
but it looks bad if you will try to render such cubic panorama.
Another way that I can imagine is to render 3d panorama onto sphere and than somehow take snapshots/projections of it onto cube... but I do not know how to write it down wit simple math operations (idea here is not to use rendering engines but to do it as mathematically as possible)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Jim,
我是 Ken Chan,四边形球形立方体 (QLSC) 的主要架构师。你可以在 Google 上查找许多关于 1975 年报告“四边形地球数据库可行性研究”的参考资料,该报告是我与同事 Mike O'Neill 共同撰写的。我负责所有的公式化和数学分析,迈克负责所有的软件设计和编码。我还在某处保存着这份报告。我相信代码在后面的附录中,但我无法证明这一点。
1973 年,我与计算机科学公司 (CSC) 的另外两位同事(Paul Beaudet 和 Leon Goldshlak)共同撰写了一份早期报告“恒定分辨率地球数据库的组织结构”。莱昂是项目经理。保罗提出了一种结构,我提出了四种。 QLSC 是我的四个概念之一,随后被海军选择采用。没有为这些模型开发任何代码。
我已经离开该领域工作超过 35 年了,但我知道位于马里兰州格林贝尔特的 NASA 戈达德太空中心最终使用 QLSC 来执行其 COBE 任务。我还意识到,由于 QLSC(或其某些衍生物)的等面积特性以及分级索引方案,美国和欧洲的天文学家和天体物理学家使用 QLSC(或其某些衍生产品)进行星图绘制。
最近,我也意识到基本的组织结构已用于高光谱数据管理和压缩。
几天前我刚刚满 70 岁,没有什么比我留下一些可供其他人使用的东西更让我感到满足的了。当我开发这种方法时,我从未想过要为其申请专利。另外,将其命名为“Chan Spherical Cube”(缩写为CSC)的想法被计算机科学公司和我拒绝了。
我希望这能让您对 QLSC 的历史有所了解。
肯
Jim,
I am Ken Chan the primary architect of the Quadrilateralized Spherical Cube (QLSC). You can look up Google for many references to the 1975 report "Feasilibilty Study of a Quadrilateralized Earth Data Base" which I co-authored with my colleague Mike O'Neill. I did all the formulation and mathematical analysis and Mike did all the software design and coding. I still have the report somewhere. I believe the code is in an appendix in the back, but I cannot testify to that.
There was an earlier report "Organizational Structures for Constant Resolution Earth Data Bases" in 1973 which I co-authored with two other colleagues (Paul Beaudet and Leon Goldshlak) at Computer Sciences Corporation (CSC). Leon was the project manager. Paul proposed one structure and I proposed four. The QLSC was one of my four conceptualizations and was subsequently chosen by the Navy for adoption. No code was developed for any of these models.
I have been away from that area of work for more than 35 years but I was aware that NASA Goddard in Greenbelt, Maryland eventually used QLSC for its COBE mission. I also became aware that the QLSC (or some derivative of it) was used by astronomers and astrophysicists in the US and Europe for star-mapping because of its equal area properties as well as its heirarchical indexing scheme.
Lately, I have also become aware that the basic organizational structure has been used in Hyperspectral Data Management and Compression.
I just turned 70 years old a few days ago and nothing makes me feel more satisfied that I am leaving behind something that other people can use. The thought of patenting it never crossed my mind when I developed the approach. Also, the thought of naming it the "Chan Spherical Cube" (to be abbreviated CSC) was rejected by Computer Sciences Corporation and by me.
I hope this gives you some idea of the history of the QLSC.
Ken
有一种地图投影称为四边形球形立方体,在天体物理学中用于表示全天空地图。它有一个很好的特性,即像素在整个天空中具有相同面积的误差在百分之几以内,从而减少了几何失真。
基本上,天球仪被投影到一个立方体上,每个立方体面被划分为像素;但行和列的边界不是直线网格,而是稍微弯曲,以便每个像素映射到球体上大致相等大小的区域。
像素寻址有点有趣。假设你有一个带有坐标的像素
X,Y 在立方体的一个面上。如果X有二进制表示abcd,Y是ABCD,
那么该面上的像素地址具有 X 和 Y 交错:aAbBcCdD。所以要重新装箱
对于较大的像素,您所需要做的就是右移 2 位以获得较低分辨率下的像素地址。
使用 32 位像素地址,您可以使用 3 位来表示立方体面,使用 28 位来表示该面内交错的 X 和 Y 坐标。在此分辨率下,每个像素覆盖约 20x20 角秒或约三分之一平方英里的区域,因此人们可以充分利用它作为一种地理或天体坐标散列技术。
要使用它,您必须实现对像素数的正向变换(长,纬度)或(RA,dec),以及从像素数到(长,纬度)或(RA,dec)的逆变换。当然,还有大量从图像坐标到(经度,纬度)和反向的众所周知的地图投影。
我在谷歌上搜索了几分钟后没有找到任何相关代码——也许我可以找到一些大约 20 年前我在执行 EUVE 天体物理任务时编写的代码,该任务在他们的全天空测量地图中使用了这个投影。
There's a map projection called the Quadrilateralized Spherical Cube that's used in astrophysics to represent all-sky maps. It has a nice property that the pixels are within a few percent of having equal areas all over the sky, so that geometric distortions are reduced.
Basically, the celestial globe is projected onto a cube, and each cube face is divided into pixels; but rather than being a rectilinear grid, the row and column boundaries are slightly curved so that each pixel maps to a roughly equally sized area on the sphere.
The pixel addressing is kind of interesting. Suppose you have a pixel with coordinates
X,Y on one of the cube faces. If X has binary representation abcd, and Y is ABCD,
then the pixel address on that face has X and Y interleaved: aAbBcCdD. So to rebin the
image to larger pixels, all you need to do is shift right 2 bits to get the pixel address at the lower resolution.
With 32-bit pixel addresses, you can use 3 bits to represent the cube face, and 28 bits to represent the interleaved X and Y coordinates within that face. At this resolution, each pixel covers an area of about 20x20 arcsec, or about a third of a mile square(ish) -- so one could make good use of this as a sort of geographic or celestial coordinate hashing technique.
To use this, you'd have to implement forward transformations (long, lat) or (RA, dec) to pixel numbers, and inverse transformations going from pixel numbers to (long, lat) or (RA, dec). And of course there are tons of well-known map projections from image coordinates to (long,lat) and back.
I didn't find any code for this in a few minutes of Googling -- maybe I can dig up some code I wrote about 20 years ago when I worked on the EUVE astrophysics mission, which used this projection for their all-sky survey maps.