12
\$\begingroup\$

I have a gopro hero 3 and I use it to make timelapses on linux. The problem is that I don't like the fisheye effect that its lens produces. Is there any Linux tool that removes that? I am especially looking for a command line tool that I can call within my scripts that create the timelapses.

I am not expecting a tool that will analyze each photograph and find the best configuration to remove the fish eye effect. I would prefer a tool that gives me parameters such as I can find the best configuration for gopro's pictures and then apply the same parameters to all the photographs.

\$\endgroup\$

2 Answers 2

13
\$\begingroup\$

I have not used Fulla myself but pulled this information together from various internet resources.

First you need to install Fulla, which is included in the Hugin package.

sudo apt-get install hugin-tools

Fulla is able to read in correction data from the last open-source PTLens database, available here. You have to point Fulla to the PTLens database manually as follows:

PTLENS_PROFILE=$HOME/.ptlens/profile.txt

And then of course place the database in the $HOME/.ptlens/ directory. As this database is quite dated not all modern cameras are included. I have looked through the database but could not find anything related to the Go Pro camera.

Therefore you will need to calibrate Fulla with actual pictures from your camera. Here are several resources that explain how this (elaborate) process is done or do this process for you:

Using Fulla's documentation you can then use the coefficients obtained from the calibration and correct your image and include this correction in your script.

\$\endgroup\$
8
\$\begingroup\$

I found this simple command with just rewrite all your gopro pics:

mogrify -distort barrel "0 0 -0.3" *.JPG

More information about imagemagick command can be found on http://www.imagemagick.org/script/command-line-options.php#distort

The method Barrel has the following arguments:

A B C [ D [ X , Y ] ] 

An explanation how to set this four coefficients can be found on http://wiki.panotools.org/Lens_correction_model

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Welcome to photo.SE. Could you please provide some additional information on what this command does, list all the possible parameters and what they do and the documentation of that command? That would be great for future reference. Simply click the "edit" text below your answer to modify what you have written so far. Thank you. \$\endgroup\$
    – null
    Jun 17, 2015 at 21:20
  • 1
    \$\begingroup\$ Thx @null I added a short explanation... \$\endgroup\$
    – wittich
    Jun 18, 2015 at 6:38
  • 1
    \$\begingroup\$ WTF. This actually works pretty well. I was looking for a solution to fix my SJ5000 action cam photos and this does the job pretty well. I will play with this a bit to get the best results, but this looks really really good. \$\endgroup\$
    – Kishor
    Jun 22, 2015 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.