Difference between revisions of "Fulla"

From PanoTools.org Wiki
Jump to navigation Jump to search
m (blank lines)
(Undo revision 15917 by MhOOh (talk) because of distorted text)
 
(17 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]]. 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 ==
 +
 
 +
Usage:
 +
 
 +
  fulla [options] inputfile(s)
  
== Command-line usage ==
 
  
Usage: fulla [options] inputfile(s)
+
The following options can be specified:
  option are:
+
 
      -g a:b:c:d       Radial distortion coefficient for all channels, (a, b, c, d)
+
* <tt>--green=db|a:b:c:d</tt> or <tt>-g db|a:b:c:d</tt>
      -b a:b:c:d       Radial distortion coefficents for blue channel, (a, b, c, d)
+
Correct radial distortion for all channels. Specify 'db' for database lookup or the 4 coefficients a:b:c:d.
                        this is applied on top of the -g distortion coefficients,
+
* <tt>--blue=db|a:b:c:d</tt> or <tt>-b db|a:b:c:d</tt>
                        use for TCA corr
+
Correct radial distortion for blue channel, this is applied on top of the <tt>--green</tt> distortion coefficients, use for TCA corr. Specify 'db' for database lookup or the 4 coefficients a:b:c:d.
      -r a:b:c:d       Radial distortion coefficents for red channel, (a, b, c, d)
+
* <tt>--red=db|a:b:c:d</tt> or <tt>-r db|a:b:c:d</tt>
                        this is applied on top of the -g distortion coefficients,
+
Correct radial distortion for red channel, this is applied on top of the <tt>--green</tt> distortion coefficients, use for TCA corr. Specify 'db' for database lookup or the 4 coefficients a:b:c:d
                        use for TCA corr
+
* <tt>--camera-maker=Maker</tt> or <tt>-m Maker</tt>
      -p              Try to read radial distortion coefficients for green
+
Camera manufacturer, for database query
                        channel from PTLens database
+
* <tt>--camera-model=Cam</tt> or <tt>-n Model</tt>
      -m Canon        Camera manufacturer, for PTLens database query
+
Camera name, for database query
      -n Camera        Camera name, for PTLens database query
+
* <tt>--lensname=Lens</tt> or <tt>-l Lens</tt>
      -l Lens         Lens name, for PTLens database query
+
Lens name, for database query. Specify <tt>--camera-maker</tt> and <tt>--camera-model</tt> for fixed lens cameras or <tt>--lensname</tt> for interchangeable lenses.
                        if not specified, a list of possible lenses is displayed
+
* <tt>--focallength=50</tt> or <tt>-d 50</tt>
      -d 50           specify focal length in mm, for PTLens database query
+
Specify focal length in mm, for database query
      -s               do not rescale the image to avoid black borders.
+
* <tt>--aperture=3.5</tt> or <tt>-a 3.5</tt>
      -f filename     Vignetting correction by flatfield division
+
Specify aperture for vignetting data database query
                        I = I / c,   c = flatfield / mean(flatfield)
+
* <tt>--dont-rescale</tt> or <tt>-s</tt>
      -c a:b:c:d       radial vignetting correction by division:
+
Do not rescale the image to avoid black borders.
                        I = I / c,    c = a + b*r^2 + c*r^4 + d*r^6
+
* <tt>--flatfield=filename</tt> or <tt>-f filename</tt>
      -a              Correct vignetting by addition, rather than by division
+
Vignetting correction by flatfield division: I = I / c, c = flatfield / mean(flatfield)
                        I = I + c
+
* <tt>--vignetting=db|a:b:c:d</tt> or <tt>-c db|a:b:c:d</tt>
      -i value         gamma of input data. used for gamma correction
+
Correct vignetting (by division). Specify db for database look up or the the 4 coefficients a:b:c:d: I = I / ( a + b*r^2 + c*r^4 + d*r^6)
                        before and after flatfield correction
+
* <tt>--linear</tt>
      -t n            Number of threads that should be used during processing
+
Do vignetting correction in linear color space
      -h               Display help (this text)
+
* <tt>--gamma=value</tt> or <tt>-i value</tt>
      -o name         set output filename. If more than one image is given,
+
Gamma of input data. used for gamma correction before and after flatfield correction
                        the name will be uses as suffix (default suffix: _corr)
+
* <tt>--help</tt> or <tt>-h</tt>
      -v               Verbose
+
Display help
 +
* <tt>--output=name</tt> or <tt>-o name</tt>
 +
Set output filename. If more than one image is given, the name will be uses as suffix (default suffix: _corr)
 +
* <tt>--compression=value</tt> or <tt>-e value</tt>
 +
Compression of the output files. For jpeg output: 0-100, For tiff output: PACKBITS, DEFLATE, LZW
 +
* <tt>--offset=X:Y</tt> or <tt>-x X:Y</tt>
 +
Horizontal and vertical shift
 +
* <tt>--verbose</tt> or <tt>-v</tt>
 +
Verbose output
 +
 
 +
== 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 ==
 
== Windows batch usage ==
Line 47: Line 64:
 
for batch correcting photos like so:
 
for batch correcting photos like so:
  
* Create a ''Shortcut to fulla.exe'' by dragging the '''fulla''' icon to another directory in Windows explorer
+
* Create a ''Shortcut to fulla.exe'' by dragging the ''fulla'' icon to another directory in Windows explorer
 
* Edit ''properties''
 
* Edit ''properties''
 
* Change the ''target'' to include your correction parameters:
 
* Change the ''target'' to include your correction parameters:
 
+
   "C:\Program Files\hugin\fulla.exe" --red=0:0:0.00056:1.00015 --blue=0:0:-0.00026:1.0011 --vignetting=1:0.20:-0.51:0.2
   "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''
 
* Rename the shortcut to something descriptive like ''fulla-peleng''
 
* Now you can correct photos by dragging and dropping them onto the icon
 
* 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:
+
== External links ==
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 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].
 
 
 
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 (untested) should work:
 
  
  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]]

Latest revision as of 18:23, 3 May 2017

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

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)


The following options can be specified:

  • --green=db|a:b:c:d or -g db|a:b:c:d

Correct radial distortion for all channels. Specify 'db' for database lookup or the 4 coefficients a:b:c:d.

  • --blue=db|a:b:c:d or -b db|a:b:c:d

Correct radial distortion for blue channel, this is applied on top of the --green distortion coefficients, use for TCA corr. Specify 'db' for database lookup or the 4 coefficients a:b:c:d.

  • --red=db|a:b:c:d or -r db|a:b:c:d

Correct radial distortion for red channel, this is applied on top of the --green distortion coefficients, use for TCA corr. Specify 'db' for database lookup or the 4 coefficients a:b:c:d

  • --camera-maker=Maker or -m Maker

Camera manufacturer, for database query

  • --camera-model=Cam or -n Model

Camera name, for database query

  • --lensname=Lens or -l Lens

Lens name, for database query. Specify --camera-maker and --camera-model for fixed lens cameras or --lensname for interchangeable lenses.

  • --focallength=50 or -d 50

Specify focal length in mm, for database query

  • --aperture=3.5 or -a 3.5

Specify aperture for vignetting data database query

  • --dont-rescale or -s

Do not rescale the image to avoid black borders.

  • --flatfield=filename or -f filename

Vignetting correction by flatfield division: I = I / c, c = flatfield / mean(flatfield)

  • --vignetting=db|a:b:c:d or -c db|a:b:c:d

Correct vignetting (by division). Specify db for database look up or the the 4 coefficients a:b:c:d: I = I / ( a + b*r^2 + c*r^4 + d*r^6)

  • --linear

Do vignetting correction in linear color space

  • --gamma=value or -i value

Gamma of input data. used for gamma correction before and after flatfield correction

  • --help or -h

Display help

  • --output=name or -o name

Set output filename. If more than one image is given, the name will be uses as suffix (default suffix: _corr)

  • --compression=value or -e value

Compression of the output files. For jpeg output: 0-100, For tiff output: PACKBITS, DEFLATE, LZW

  • --offset=X:Y or -x X:Y

Horizontal and vertical shift

  • --verbose or -v

Verbose output

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" --red=0:0:0.00056:1.00015 --blue=0:0:-0.00026:1.0011 --vignetting=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

External links