Public Lab Research note


A Method for distorting Mobius Action Cam imagery in GIMP (FOSS)

by eustatic | November 11, 2014 21:31 11 Nov 21:31 | #11336 | #11336

What I want to do

Make Mapknitter maps with infragram and another mobius (so light!)

So Mat suggested a method of distorting graph paper until it looked right.

Chris Fastie has laid out the limitations of infragram maps --the edges need to be cropped

I think GIMP crops edges.

I want to use this because I'm too poor for photoshop, and freedom rules.

My attempt and results

There are two "Lens Distortion" filters in GIMP

Filters -> Distort -> Lens Distortion

"Main" and "Edge"

Here is the original image

IMAG0021_test_grid_farther_away.JPG

Main -40

IMAG0021_test_grid_farther_away_40.JPG

Main -41 edges +5

IMAG0021_test_grid_farther_away_41_5.JPG

Main -42 edges 0

IMAG0021_test_grid_farther_away_42.JPG

Main -50 edges 0

IMAG0021_test_grid_farther_away_50.JPG

Questions and next steps

What do people think?

Here's a shoreline map with no distortion, -34, and -41 5.

BSJ_shore_norm.JPG

BSJ_shore_norm_34.JPG

BSJ_shore__41_5.JPG


4 Comments

I was wondering if we could add this as a feature to http://Infragram.org (and potentially MapKnitter in the future!) by writing a JavaScript Canvas module that removes lens distortion from an image.

I might've thought to do it in the same way we use Canvas to distort (https://github.com/publiclab/mapknitter/blob/master/public/cartagen/src/warper/image.js#L344)

but these days, we might be able to write a WebGL module to do it even faster.

This person has ported a lens distortion shader (http://devlog-martinsh.blogspot.ca/2011/10/glsl-cubic-lens-distortion.html) to WebGL:

https://medium.com/@mattdesl/filmic-effects-for-webgl-9dab4bc899dc

The shaders are here: https://github.com/mattdesl/filmic-gl/tree/master/demos/shaders

hmmm! I don't know webgl well, but it seems promising?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


https://mapknitter.org/maps/bayou-st-john-shoreline-nov-2014

I also do not know webgl, but

this would be an excellent option to those softwares.

Reply to this comment...


I've been using the Mobius Cam with both standard and Wide Angled Lens for KAP and soon UAV. I solved the lens distortion issue thanks to a workflow suggested to me in the comment section of my KAP research note- (see bottom 3 comments in the thread) http://publiclab.org/notes/code4maine/06-25-2014/kap-test-for-invasives-monitoring-project Basically, there is a Plugin called "BIMP" that allows you to do batch processing in GIMP. You do need to set the distortion values manually however, by taking a screenshot and copying the values into the plugin dialog. There are other FOSS programs for batch processing like DIGIKAM and HUGIN Panorama editor that I havent tried yet. However, considering the popularity of GIMP, it may be worth designing our own plugin with Mapknitter (and/or Infragram) support as more and more people use the Mobius Cam.

Reply to this comment...


just getting back into this again. ajawitz, thanks for your BIMP recommendation.

i think i was going to figure out how to batch process

channel switching R-B, red boost to 130, then contrast boost

Reply to this comment...


Login to comment.