mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.3k stars 729 forks source link

Microsoft ICE Question #176

Closed mtndewdewd closed 8 years ago

mtndewdewd commented 8 years ago

Wondering why the results when displayed through pannellum look so fishy-eye-ish? When viewing in the ICE or HD View viewer is looks more equalized.

https://cdn.pannellum.org/2.2/pannellum.htm?panorama=https://dl.dropboxusercontent.com/s/vz542ztrx0c4jm8/DSC00505_stitch3.jpg?dl=0

Do I need a special export from ICE to display correctly in pannellum.

Love the service btw - great usability!

Thanks in advance John

mpetroff commented 8 years ago

I've never used Microsoft ICE, so I have no idea what the default export parameters are. To use the image in Pannellum though, you need to export an equirectangular image. Since I don't think ICE includes Photo Sphere XMP metadata, you also need to note the vertical angle of view and vertical offset and configure Pannellum with those parameters.

If I estimate the vertical angle of view based on the dimensions of the image you provided and adjust the vertical offset such that the horizon is at zero pitch, the result is this:

https://cdn.pannellum.org/2.2/pannellum.htm?vaov=64.5&vOffset=-10&panorama=https://dl.dropboxusercontent.com/s/vz542ztrx0c4jm8/DSC00505_stitch3.jpg?dl=0

Since it still doesn't look right, I don't think the image uses an equirectangular projection.

mtndewdewd commented 8 years ago

ice

Here is a screenshot. I did some research and what I found was that "equirectangular" is the same as "spherical"? You can see all the projection options available. Can you suggest one that would match equirectangular?

Thanks again for the help.

mpetroff commented 8 years ago

Yes, it seems Microsoft calls equirectangular projection "spherical" (and rectilinear projection "perspective"), so "spherical" should be used. If it reports the vertical angle of view and vertical offset angle somewhere, use the provided values; otherwise, they're not difficult to figure out. The vertical angle of view can be calculated using [image height] / [image width] * 180; you can guess and check the vertical offset angle until the horizon is approximately vertically centered when the panorama is loaded.

Neon22 commented 8 years ago

mercator and peter's projections (cylindrical also) look similar to equirectangular at first glance but stretch/compress vertically in 'weird' ways. Its possible the map is slightly off in the program that creates your image if its using an incorrect projection. These things all have actual proper names so its always annoying when someone like MSoft decides to rename them :(