-2

I just know a few about opengl es 2.0, like draw 2 triangle into 2 rect or a cube. But I have no idea how to handle this. a few about vertex and fragment, not much.

I shoot a video with 360 degree, How am I supposed to play video on iOS, the functions are: you can move your phone or drag one direction to another direction, so you can watch the video in different view.

The effect should be like Kolor Eyes.

I think the steps are:

  1. get each frame from the video (original, looks like a sphere) enter image description here

  2. handle frame one by one, to make it be view in panorama way to watch.

Hope somebody could help me out, Thanks a lot enter image description here

ronan
  • 1,611
  • 13
  • 20

1 Answers1

1

The problem is not connected to ios or any other specific platform but first of all an algorithmic thing. How to convert the pixels from the pano view to a panaromic view? My best guess is something like a transfer function which takes pixel a at position A in the src image and transfers it into a corresponding pixel b at Position B in the destination image.

Maybe you should check the basics of texture mapping which is a common technique to map an image onto an arbitray surface.

Just as an idea: the source is a radial view ranging from 0° to 360°, so what you need is to transfer this into a view where the angle increases horizontally from 0° to 360°. Each src pixel would need an angle and a distance. Given these two properties you could write a function which puts this into a different view.

codencandy
  • 1,701
  • 1
  • 10
  • 20