I have to apply a spherical filter on a image in android, I have attached input and expected output image. Output image will be processed from the squared centered region of input image and mapped it to sphere. Any idea how to do this in Android. Will I have to use openGL for doing this or 2D-trasformation alone will do the task.

![Input image](https://i.stack.imgur.com/Phsmr.jpg)  
![Output Image](https://i.stack.imgur.com/EcLzo.png)