# Web-based fisheye-removal prototype for correcting lens distortion

by warren |

Hi, all - I'd been meaning to for some time, but I finally got a quick prototype up for in-browser #fisheye correction:

https://jywarren.github.io/fisheyegl/example/

You can drag your own images onto the example image to correct distortions on anything.

It doesn't currently do full-size correction, but I think that'd be pretty easy to add, similarly to how the webgl-distort library worked.

Source code: https://github.com/jywarren/fisheyegl

I'd love to know if anyone uploads a #mobius image with some straight/gridded lines, and identifies the correct settings to fix Mobius images for the different lenses folks have. This could make it much easier to use MapKnitter on them. Please write back if you manage to get it working with some Mobius images.

If this seems to work, we could try to set it up to run on a batch of images as well.

Thanks!

Update: I added full-resolution, and also made it so that if you drop a succession of images onto it, it adds them below in a kind of 'gallery' -- so it's a little easier to do a batch process. Give it a try!

Cool, thanks. I took a pic of a grid with my Mobius (an old one, i'm not actually sure of the lens) and got this:

I couldn't get a perfect undistort, but this is about as close as I got, using the settings:

a: 0.884, b: 0.912, F: 1.96, scale: 0.842, x: 1, y: 1

I think it's possible the distortion is not working as it should on a non-square image? See how the horizontal lines are bent one way but the verticals the other.

Indeed, i used Scott's posted images and got the same issues.

But then I tried cropping them to square, and re-running them, using these settings:

a: 1, b: 1, F: 2.29, scale: 0.947, x: 1, y: 1

And then it worked really well!

The outputs:

Hi, i dug into the code a bit and found the section I think we need to modify, but it's WebGL, and relatively obscure:

https://github.com/jywarren/fisheyegl/issues/3

I tried for a while, but wasn't able to get non-square images to distort properly!

I found this very interesting: I use NVDI Modded Mobius.. Blue filter Lens for Mobius ActionCam - 6mm for \$6.00 each from public labs I get very little distortion. I have 5 second timelapse photo and from a height of 390 feet

You must be logged in to comment.