FisheyeGL is a new online tool for removing lens distortion ("fisheye" effect or "barrel distortion") from images, especially those taken with a #GoPro or Mobius Action Cam (Public Lab's Infragram Point & Shoot). Note that another way to do this is to install a different lens on your camera if that's possible (see #lens-swapping).
For example, the left image below has a characteristic "bulge" from a wide-angle lens. FisheyeGL can (like other #lens-distortion techniques) remove this, resulting in a "flatter" image, like the one to the right, below.
With a real image, the effect is as shown below, again left/before, right/after. This is especially useful for making maps in MapKnitter, because distorted images make it extremely difficult to stitch images together into a map -- it's like trying to flatten a bunch of orange peels into a flat surface (or something).
Note that the corners of the image are cropped out when you do this, however!
The distortion varies for different lenses. Sliders are provided, and while each has a meaning in the formula used to correct the distortion, the easiest way to find the right settings is to take a picture of a grid (a checkerboard or graph paper, or a tiled wall) and play with the sliders until the lines are straight. Then you can use the URL of the page (it'll change as you tweak the sliders) to open to that exact setting again.
Processing lots of images
If you drag a different image onto the canvas, it'll save the previous one (distorted) below for download. So you can drag a set of these onto the page one by one, and download them later. But be careful; sometimes large images can make the page crash, so save your images periodically so you don't lose them!
The settings for a given camera and lens stay the same, so we've collected some for common cameras used at Public Lab here:
- Mobius Action Cam (default lens): https://jywarren.github.io/fisheyegl/example/#a=1.048&b=1.059&Fx=0.09&Fy=0.22&scale=1.087&x=1&y=1
- GoPro alternatives: (many are almost identical) - https://jywarren.github.io/fisheyegl/example/#a=1&b=1&Fx=0.16&Fy=0.16&scale=1.087&x=1&y=1
Please help submit more presets for different cameras!
Here's the link to the online tool; please leave comments/suggestions below here, and help one another use and refine this technique!
This got cut off at the first few seconds of audio, but is not a bad walkthrough of the process:
Help out with presets!
If you have a camera not on the presets list, please help out by:
- Taking a picture of some kind of grid -- a chessboard, a tile floor or brick wall.
- Uploading the original photo in full (in the comments below).
- Upload the image and try correcting it using FisheyeGL: https://jywarren.github.io/fisheyegl/example/
- Download the corrected version and upload it here alongside the original
- Copy in the URL (which now has the corrections you've made in it) into the comment too for others to use.