3

I'm asking this question because most of the search results in Google and StackOverflow seem to be mostly about creating cylinder panoramas instead of creating code in OpenGLES 2.0 to view them.

In short, I have a picture that I shot with my smartphone camera on Panorama mode. In this case, let's say the image was 19168x3040 pixels.

I've modified the MD360Player library to add a Cylindrical projection (basically the Spherical projection shape but with a different Y component formula). The thing is, I don't seem to have gotten the projection correctly. It looks like this now:

Current state of the cylindrical projection

That is after I halved the cylinder's height - if I don't, the cylinder will fit the square's height, but the image will be stretched vertically.

I heard that I have to map the points in the cylinder into a plane to get the projection right. Seems like I have to do what Facebook did and have separate modes for when I touch the view to scroll and when I release my finger to view the mapped picture?

In that case, how do I map the currently viewed part of the cylinder into a plane, especially the area in the zenith and nadir of the cylindrical projection?

The code for the cylinder projection will be posted if needed.

Gensoukyou1337
  • 1,507
  • 1
  • 13
  • 31

0 Answers0