Fish eye effect

I have a question about the fisheye effect. I am trying to stream video from 2 cameras to 2 displays in order to make an enhanced reality headset. I need to correct for the lens distortion by graduating the fisheye effect just like the htc vive.
I need the video to go in and come out with a specified fisheye angle. Can you point me to a code that increases and decrease the fisheye effect at the user will?
Fish eye 2 Fish eye 1