from PIL import Image
import math
def fish_eye_dis(img):
"fish eye distortion"
width_in, height_in = img.size;
im_out = Image.new("RGB",(width_in,height_in));
radius = max(width_in, height_in)/2;
#assume the fov is 180
#R = f*theta
lens = radius*2/math.pi;
for i in range(width_in):
for j in range(height_in):