0

I want to reverse the effect of a spherical image such as this one:

spherical image

Provided the image, I would like to be able to access any part of it so that the areas that are stretched are no longer stretched, i.e. to know how to map the pixels. For example, at the top of the picture the clouds are stretched.

To be exact, I would like to crop out only a random part of the image and view it, very similar to what the web 360 video players are doing.

Mark
  • 253
  • 1
  • 5
  • 22
  • 1
    what is the problem? Just linearly map the x coordinate to an angle in the range [0,2pi) – 463035818_is_not_an_ai Apr 06 '16 at 13:12
  • 1
    Some more explanation would be great, the problem is lack of knowledge on this matter. – Mark Apr 06 '16 at 13:16
  • `double getAngleFromX(int x,int xmax) { return 2.0*pi*x/xmax; }` where xmax is the width of the image. – 463035818_is_not_an_ai Apr 06 '16 at 13:19
  • @tobi303 the lack of knowledge regarding the main problem, why really [0, 2pi)? understanding the theory. – Mark Apr 06 '16 at 13:22
  • I dont know any web 360 video players, and I dont understand how the cylindrical coordinates will help you to crop out a part of the image – 463035818_is_not_an_ai Apr 06 '16 at 13:24
  • 1
    please edit the question to make more clear what is your actual problem. At least I dont understand what you want to do with the image. Maybe "coordinates on the sphere, or on the cylinder" is not at all what you need. – 463035818_is_not_an_ai Apr 06 '16 at 13:29
  • I think you want to do something like [this](http://stackoverflow.com/questions/7981815/projection-of-a-plane-onto-a-cylinder). You will need to create a point cloud out of it, and then you can display it using the opencv viz. With a little bit of math, you can also do the same for a sphere. – api55 Apr 06 '16 at 13:36
  • @tobi303 I edited it, I think it's clearer now – Mark Apr 06 '16 at 13:42
  • @Mark The images are taken with a rotating camera? or is just a camera with a wide lens... for the second one you could try finding the radial distortion parameter and undistort it, not sure if it works for the first one since it stiches images together and may use different homographies (warps) to each part of the image – api55 Apr 06 '16 at 14:29
  • @mark You should add also the input image so we know what you want to achieve. (Vote +Close for now) – Spektre Apr 06 '16 at 21:13
  • @api55 input is whichever 360 video on the internet – Mark Apr 07 '16 at 09:54

0 Answers0