tags:

views:

470

answers:

2

Hello,

I am trying to create lomo fisheye effect on an image using openGL. I am new to openGL, should I use cube mapping and fisheye projection? Is there any open source that I can refer to? Thanks.

+2  A: 

Fisheye Quake, a modification of GLQuake, should be of interest to you. Comes with source.

daxim
Thanks! I will take a look on that. I did a bit research on openCV after I posted this question, is it possible to simulate fisheye by openCV instead? I saw there's a camera calibration function available, it helps to correct radial distortion like fisheye.
noear
I think OpenCV is just going to be more work than learning and doing it directly.
Daniel Yankowsky
+3  A: 

You can draw a single quad with the image textured onto it, and use a fragment shader to warp the texture coordinate per-pixel as you desire. You'll have to do all the math yourself, but it looks like the previous post here might be a good starting point.

Asher Dunn