Adding new functions with GIMP plugins

Slashdot it! Delicious Share on Facebook Tweet! Digg!

In Perspective

Perspective corrections, such as for landscapes or architectural photos, are usually done with the corresponding GIMP tools. For specific tasks, Nils Barth developed a slightly different method with EZ Perspective [40]. This tool's main disadvantage is its missing preview, so parameters have to be experimented with (remember that Ctrl+z is the undo function and Ctrl+y is the redo function). Ctrl+Shift+f refreshes the input window for making new parameter changes (Figure 23). The easiest way is using the arrows and Tab. Use the "fast" quality before you can use "good" for the final output.

Figure 23: EZ Perspective is not very intuitive, but it is powerful.

Using EXIF data and the crop factor, you first set the 35 mm Equivalent Focal Length for the current image. The exiftool can provide the corresponding values in a line like:

Focal Length: 42.0 mm (35 mm equivalent: 84.1 mm)

The tilt and yaw angles are determined first, then the rotation. A grid can help, which you can get from the View menu as Show grid .

Before doing any perspective corrections, correct the pillow and barrel shaped distortions with GIMPLensFun… (found under Enhance ) or the Lens Correction filter (found under Distort , both in the Filters menu).

GimpLensfun [41] is a great little plugin that works largely automatically (Figure 24). In an ideal situation (normally with JPEG images), you'll find the information as EXIF data in the image file. GIMP provides access to this data from its File menu under Image Properties | Advanced (Figure 25).

Figure 24: GimpLensfun allows largely automatic correction of pillow and barrel-shaped distortions caused by lenses.
Figure 25: The EXIF data in the file properties reveals essential properties that depend on the lens manufacturer and the GIMP version.
Figure 26: The effect of the GimpLensFun plugin becomes evident when you overlay the original image with the corrected version and show the differences in layer mode. The differences increase with the distance from the center.
Figure 27: The Toy plugin creates the tilt-shift effect with just a few steps.

The Heatmap [47] plugin from elsamuko simulates images created with an infrared camera. A normal image is converted to the YUV color space, and the coordinate system is rotated by 30 degrees. The U channel is then transformed into an 8-bit integer range. The results are amazingly realistic (Figure 28). Typing the following command:

$ gimptool-2.0 --install elsamuko-heatmap.c

will create the Heatmap entry in the Color menu.

Figure 28: The images created with Heatmap look very much like infrared shots.

Conclusion

GIMP can be extended with plugins in many ways. The plugins often just take over the computationally-intensive functions. Scripts are then sometimes used for the GUIs. A second great advantage to plugins is the possibility of implementing a preview that often greatly simplifies using it.

It's worthwhile experimenting with the variety of plugins for GIMP that often provide useful and interesting functions. Additional information about GIMP and its functionality can be found in the GIMP Handbook [48].

Infos

  1. Plugin development: http://developer.gimp.org/plug-ins.html
  2. GIMP Extensions Pack for Windows: http://registry.gimp.org/node/27656
  3. G'MIC: http://gmic.sourceforge.net
  4. UFRaw: http://ufraw.sourceforge.net
  5. OpenRaster format: http://registry.gimp.org/node/18435
  6. WebP format: http://registry.gimp.org/node/25874
  7. Layer Effects: http://registry.gimp.org/node/186
  8. GAP for Linux: http://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/
  9. Extrude for Windows: http://registry.gimp.org/node/1839
  10. Advanced Animation with GIMP: ftp://gd.tuwien.ac.at/graphics/gimp/manual/GUM/Animation.html
  11. ACE2: http://registry.gimp.org/node/20
  12. AUMASK: http://registry.gimp.org/node/25326
  13. Focus Blur: http://registry.gimp.org/node/1444
  14. Depth of field: http://en.wikipedia.org/wiki/Depth_of_field
  15. Beautify: https://github.com/hejiann/beautify
  16. David's Batch Processor: http://members.ozemail.com.au/~hodsond/dbp.html
  17. BIMP: http://registry.gimp.org/node/26259
  18. Fourier plugin: http://registry.gimp.org/node/19596
  19. Wavelets: http://en.wikipedia.org/wiki/Wavelet
  20. Wavelet decompose: http://registry.gimp.org/node/11742
  21. Wavelet denoise: http://registry.gimp.org/node/4235
  22. Wavelet sharpen: http://registry.gimp.org/node/9836
  23. Wiener filter: https://en.wikipedia.org/wiki/Wiener_filter
  24. Refocus plugin: http://refocus.sourceforge.net/doc.html
  25. Scaling and gamma: http://www.4p8.com/eric.brasseur/gamma.html#introduction
  26. Imagescaler: https://blog.hartwork.org/?p=1173
  27. Imagescaler download: http://hartwork.org/public/imagescaler-0.5.tar.gz
  28. Upsize: http://registry.gimp.org/node/19582
  29. Scale2x: http://registry.gimp.org/node/24746
  30. Info on Scale2x: http://scale2x.sourceforge.net/
  31. Liquid Rescale: http://liquidrescale.wikidot.com/
  32. Seam carving: http://en.wikipedia.org/wiki/Seam_carving, http://www.imagemagick.org/Usage/resize/#liquid-rescale
  33. Manu Cornet: http://manucornet.net/
  34. Texturize: http://registry.gimp.org/node/77
  35. Resynthesizer: http://registry.gimp.org/node/25219
  36. Info on Resynthesizer: http://www.logarithmic.net/pfh/resynthesizer
  37. Resynthesizer Github version: https://github.com/bootchk/resynthesizer
  38. Interpolate: http://stamit.gr/gimp/gimp-plugin-interpolate/
  39. Interpolate Tutorial: http://stamit.gr/gimp/gimp-plugin-interpolate/instructions
  40. EZ Perspective: http://registry.gimp.org/node/24537
  41. GimpLensfun: http://registry.gimp.org/node/25805
  42. Adding to GimpLensfun: http://libregraphicsworld.org/blog/entry/creating-lens-distorsion-models-with-hugin-lens-calibrator
  43. GimpLensfun: http://seebk.github.io/GIMP-Lensfun/
  44. Tilt-shift effect: http://en.wikipedia.org/wiki/Tilt-shift_photography
  45. Toy plugin: http://registry.gimp.org/node/25803
  46. Toy plugin download: http://registry.gimp.org/files/gimp-plugin-toy-1.0.4.tar.gz
  47. Heatmap plugin: http://registry.gimp.org/node/27651
  48. GIMP Handbook : http://www.linux-magazine.com/Resources/Special-Editions/16-GIMP-Handbook

Buy this article as PDF

Express-Checkout as PDF
Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content