Fulla

From PanoTools.org Wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision(s))
(Status: digiKam)
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''fulla''' is a command-line tool distributed with [[hugin]] 0.6 and later. It is suitable for batch correction of:
+
{{Glossary|a command line tool to batch correct [[Chromatic aberration]], [[Lens correction model|Lens distortion]] and [[Vignetting]]}}'''fulla''' is a command-line tool distributed with [[hugin]] 0.6 and later. It can correct chromatic aberration, lens distortion, and vignetting.
  
* [[Chromatic aberration]]: See a full tutorial, [http://hugin.sourceforge.net/tutorials/tca/en.shtml Correcting TCA with hugin and fulla].
+
== About fulla ==
 +
fulla is suitable for batch correction of:
  
* [[Lens correction model|Lens distortion]] such as [[barrel distortion]] or [[pincushion distortion]]:  '''fulla''' uses the same a, b, c and d parameters as other [[Panorama Tools]] derived programs.
+
;[[Chromatic aberration]]: See tutorial in [[#External links|external links]].
 +
;[[Lens correction model|Lens distortion]]: [[Barrel distortion|Barrel]] or [[pincushion distortion]] can be corrected using the same a, b, c and d parameters as other [[Panorama Tools]] derived programs.
 +
;[[Vignetting]]: Polynomial correction by division, addition or flatfield images. [[hugin]] contains a vignetting calculator that can use a series of overlapping photographs to determine the likely polynomial required to correct common vignetting problems.
  
* [[Vignetting]]: polynomial correction by division, addition or flatfield images.  [[hugin]] contains a vignetting calculator that can use a series of overlapping photographs to determine the likely polynomial required to correct common vignetting problems.
+
fulla can work with the same range of image types as [[nona]], including 8bit and 16bit [[TIFF]] and 32bit floating-point [[HDR]] TIFF data.
 
+
'''fulla''' can work with the same range of image types as [[nona]], including 8bit and 16bit [[TIFF]] and 32bit floating-point [[HDR]] TIFF data.
+
  
 
== Command-line usage ==
 
== Command-line usage ==
  
 
   Usage: fulla [options] inputfile(s)
 
   Usage: fulla [options] inputfile(s)
 
+
  option are:
    options are:
+
      -g a:b:c:d      Radial distortion coefficient for all channels, (a, b, c, d)
    -g a:b:c:d      Radial distortion coefficient for all channels, (a, b, c, d)
+
      -b a:b:c:d      Radial distortion coefficients for blue channel, (a, b, c, d)
    -b a:b:c:d      Radial distortion coefficents for blue channel, (a, b, c, d)
+
                        this is applied on top of the -g distortion coefficients,
                      this is applied on top of the -g distortion coefficients, use for TCA corr
+
                        use for TCA corr
    -r a:b:c:d      Radial distortion coefficents for red channel, (a, b, c, d)
+
      -r a:b:c:d      Radial distortion coefficients for red channel, (a, b, c, d)
                      this is applied on top of the -g distortion coefficients, use for TCA corr
+
                        this is applied on top of the -g distortion coefficients,
    -f filename      Vignetting correction by flatfield division
+
                        use for TCA corr
                      I = I / c,    c = flatfield / mean(flatfield)
+
      -p              Try to read radial distortion coefficients for green
    -c a:b:c:d      radial vignetting correction by division:
+
                        channel from PTLens database
                      I = I / c,    c = a + b*r2 + c*r4 + d*r6
+
      -m Canon        Camera manufacturer, for PTLens database query
    -a              Correct vignetting by addition, rather than by division
+
      -n Camera        Camera name, for PTLens database query
                      I = I + c
+
      -l Lens          Lens name, for PTLens database query
    -p              Try to read radial distortion coefficients (-g) from PTLens database
+
                        if not specified, a list of possible lenses is displayed
    -m Canon         Camera manufacturer, for PTLens database query
+
      -d 50            specify focal length in mm, for PTLens database query
    -n Camera        Camera name, for PTLens database query
+
      -s              do not rescale the image to avoid black borders.
    -l Lens          Lens name, for PTLens database query
+
      -f filename      Vignetting correction by flatfield division
                      if not specified, a list of possible lenses is displayed
+
                        I = I / c,    c = flatfield / mean(flatfield)
    -d 50            specify focal length in mm, for PTLens database query
+
      -c a:b:c:d      radial vignetting correction by division:
    -t n            Number of threads that should be used during processing
+
                        I = I / c,    c = a + b*r^2 + c*r^4 + d*r^6
    -h              Display help (this text)
+
      -a              Correct vignetting by addition, rather than by division
    -o name          set output filename. If more than one image is given,
+
                        I = I + c
                      the name will be uses as suffix (default suffix: _corr)
+
      -i value         gamma of input data. used for gamma correction
    -v              Verbose
+
                        before and after flatfield correction
 +
      -t n            Number of threads that should be used during processing
 +
      -h              Display help (this text)
 +
      -o name          set output filename. If more than one image is given,
 +
                        the name will be uses as suffix (default suffix: _corr)
 +
      -v              Verbose
 +
 
 +
== Status ==
 +
As of Hugin 2010.0.0, vignetting correction seems to be [http://sourceforge.net/tracker/?func=detail&aid=3057742&group_id=77506&atid=550441 broken]. Resizing during correction is [http://sourceforge.net/tracker/?func=detail&aid=3057758&group_id=77506&atid=550444 not available] - this may cause important image parts to get cropped. Few changes have been committed to fulla since the beginning of 2008. If you want to correct individual images, best use a [http://lensfun.berlios.de/ lensfun]-based program (e.g., [http://ufraw.sourceforge.net/ UFRaw] or [http://www.digikam.org/drupal/node/319 digiKam]) these days. Lensfun also comes with a more up to date lens correction parameters database.
 +
 
 +
== Notes ==
 +
Finding the correct lens correction parameters can be done using several approaches (see [[Lens correction model]] and external links for details). Note parameter d for radial distortion (default 1.0) is not available in GUI frontends - the d mentioned in frontends is typically a different parameter related to image shift.
 +
 
 +
== Windows batch usage ==
 +
 
 +
Once you have calculated fulla parameters as described above, you can create a custom ''droplet''
 +
for batch correcting photos like so:
 +
 
 +
* Create a ''Shortcut to fulla.exe'' by dragging the ''fulla'' icon to another directory in Windows explorer
 +
* Edit ''properties''
 +
* Change the ''target'' to include your correction parameters:
 +
  "C:\Program Files\hugin\fulla.exe" -r 0:0:0.00056:1.00015 -b 0:0:-0.00026:1.0011 -c 1:0.20:-0.51:0.2
 +
* Rename the shortcut to something descriptive like ''fulla-peleng''
 +
* Now you can correct photos by dragging and dropping them onto the icon
 +
 
 +
Expanding on the above example is to create a batchfile in the hugin directory called "fulla.bat" containing the line:
 +
FOR %%I IN (%1) DO C:\Program Files\hugin\fulla.exe -p -v -l Standard %%1
 +
Assuming the name of the lens in the PTLens Database (see below) is "Standard" (as most are). Now, upon calling from any directory containing pics you can run "C:\Program Files\hugin\fulla.bat *.jpg" having fulla correcting all pics using the parameters retrieved from the PTLens Database mentioned below (don't forget to SET PTLENS_PROFILE)
  
 
== PTLens database lookup ==
 
== PTLens database lookup ==
  
'''fulla''' will look-up your camera in a [[PTLens]] database and try to automatically determine [[Lens correction model|Lens correction parameters]] for your pictures. An older free version of the database is required which can be [http://sourceforge.net/project/showfiles.php?group_id=77506&package_id=187932 downloaded from sourceforge].
+
fulla will look-up your camera in a [[PTLens]] database and try to automatically determine [[Lens correction model|Lens correction parameters]] for your pictures. An older free version of the database is required which can be downloaded from sourceforge (see [[#External links|external links]]).
  
 
Use the PTLENS_PROFILE environment variable to specify the location of the PTLens database, for example on Linux or OS X:
 
Use the PTLENS_PROFILE environment variable to specify the location of the PTLens database, for example on Linux or OS X:
Line 45: Line 73:
 
   PTLENS_PROFILE=$HOME/.ptlens/profile.txt
 
   PTLENS_PROFILE=$HOME/.ptlens/profile.txt
  
On Windows something like this (untested) should work:
+
On Windows something like this should work for a PTLens standard install:
 +
 
 +
  set PTLENS_PROFILE=%ProgramFiles%\PTLens\profile.txt
 +
 
 +
otherwise enter the full path.
 +
 
 +
== External links ==
  
  set PTLENS_PROFILE=%HOMEPATH%\PTLens\profile.txt
+
* [http://hugin.sourceforge.net/tutorials/tca/en.shtml Correcting TCA with hugin and fulla]
 +
* [http://sourceforge.net/project/showfiles.php?group_id=77506&package_id=187932 PTLens database download] (April 2006)
 +
** [http://lensfun.berlios.de/ Lensfun] [http://svn.berlios.de/wsvn/lensfun/trunk/data/db/ SVN] includes parameters for many more lenses
 +
* [http://lensfun.berlios.de/lens-calibration/lens-calibration.html How to determine lens correction parameters] - from Lensfun documentation
  
 
[[Category:Software:Platform:Linux]]
 
[[Category:Software:Platform:Linux]]
 
[[Category:Software:Platform:Windows]]
 
[[Category:Software:Platform:Windows]]
 
[[Category:Software:Platform:Mac OS X]]
 
[[Category:Software:Platform:Mac OS X]]
 +
[[Category:Software:Hugin]]

Revision as of 22:18, 22 September 2010

fulla is a command-line tool distributed with hugin 0.6 and later. It can correct chromatic aberration, lens distortion, and vignetting.

Contents

About fulla

fulla is suitable for batch correction of:

Chromatic aberration
See tutorial in external links.
Lens distortion
Barrel or pincushion distortion can be corrected using the same a, b, c and d parameters as other Panorama Tools derived programs.
Vignetting
Polynomial correction by division, addition or flatfield images. hugin contains a vignetting calculator that can use a series of overlapping photographs to determine the likely polynomial required to correct common vignetting problems.

fulla can work with the same range of image types as nona, including 8bit and 16bit TIFF and 32bit floating-point HDR TIFF data.

Command-line usage

 Usage: fulla [options] inputfile(s)
  option are:
     -g a:b:c:d       Radial distortion coefficient for all channels, (a, b, c, d)
     -b a:b:c:d       Radial distortion coefficients for blue channel, (a, b, c, d)
                       this is applied on top of the -g distortion coefficients,
                       use for TCA corr
     -r a:b:c:d       Radial distortion coefficients for red channel, (a, b, c, d)
                       this is applied on top of the -g distortion coefficients,
                       use for TCA corr
     -p               Try to read radial distortion coefficients for green
                        channel from PTLens database
     -m Canon         Camera manufacturer, for PTLens database query
     -n Camera        Camera name, for PTLens database query
     -l Lens          Lens name, for PTLens database query
                       if not specified, a list of possible lenses is displayed
     -d 50            specify focal length in mm, for PTLens database query
     -s               do not rescale the image to avoid black borders.
     -f filename      Vignetting correction by flatfield division
                       I = I / c,    c = flatfield / mean(flatfield)
     -c a:b:c:d       radial vignetting correction by division:
                       I = I / c,    c = a + b*r^2 + c*r^4 + d*r^6
     -a               Correct vignetting by addition, rather than by division
                       I = I + c
     -i value         gamma of input data. used for gamma correction
                       before and after flatfield correction
     -t n             Number of threads that should be used during processing
     -h               Display help (this text)
     -o name          set output filename. If more than one image is given,
                       the name will be uses as suffix (default suffix: _corr)
     -v               Verbose

Status

As of Hugin 2010.0.0, vignetting correction seems to be broken. Resizing during correction is not available - this may cause important image parts to get cropped. Few changes have been committed to fulla since the beginning of 2008. If you want to correct individual images, best use a lensfun-based program (e.g., UFRaw or digiKam) these days. Lensfun also comes with a more up to date lens correction parameters database.

Notes

Finding the correct lens correction parameters can be done using several approaches (see Lens correction model and external links for details). Note parameter d for radial distortion (default 1.0) is not available in GUI frontends - the d mentioned in frontends is typically a different parameter related to image shift.

Windows batch usage

Once you have calculated fulla parameters as described above, you can create a custom droplet for batch correcting photos like so:

  • Create a Shortcut to fulla.exe by dragging the fulla icon to another directory in Windows explorer
  • Edit properties
  • Change the target to include your correction parameters:
 "C:\Program Files\hugin\fulla.exe" -r 0:0:0.00056:1.00015 -b 0:0:-0.00026:1.0011 -c 1:0.20:-0.51:0.2
  • Rename the shortcut to something descriptive like fulla-peleng
  • Now you can correct photos by dragging and dropping them onto the icon

Expanding on the above example is to create a batchfile in the hugin directory called "fulla.bat" containing the line:

FOR %%I IN (%1) DO C:\Program Files\hugin\fulla.exe -p -v -l Standard %%1

Assuming the name of the lens in the PTLens Database (see below) is "Standard" (as most are). Now, upon calling from any directory containing pics you can run "C:\Program Files\hugin\fulla.bat *.jpg" having fulla correcting all pics using the parameters retrieved from the PTLens Database mentioned below (don't forget to SET PTLENS_PROFILE)

PTLens database lookup

fulla will look-up your camera in a PTLens database and try to automatically determine Lens correction parameters for your pictures. An older free version of the database is required which can be downloaded from sourceforge (see external links).

Use the PTLENS_PROFILE environment variable to specify the location of the PTLens database, for example on Linux or OS X:

 PTLENS_PROFILE=$HOME/.ptlens/profile.txt

On Windows something like this should work for a PTLens standard install:

 set PTLENS_PROFILE=%ProgramFiles%\PTLens\profile.txt

otherwise enter the full path.

External links

Personal tools
Namespaces

Variants
Actions
Navigation
tools
Tools