Tuesday, July 6, 2010

FOSSY Things: Histogram Equalization

Image contrast is changed by manipulating the PDF of the image. One can easily use popular image processing software like Photoshop and GIMP to achieve similar results. Inkscape, a vector-graphics software can also do the same thing. The software is a parallel of Illustrator. It is specialized for creating vectors but can also import raster graphics and do a variety of enhancements.

Here is a sample of some Inkscape tricks. The image used here was created with TuxPaint, a FOSS kiddie version of Photoshop and Paint.


Image created from TuxPaint with the Stamps extension


Here is a grayscale version of the image
Conversion was done with GIMP 2.6

You can't really manipulate the CDF curves like what we did in the previous post but it can do the same trick. With Levels, you simply change white and black points, like having a threshold for both black and white. I assume that Equalize performs a histogram equalization. For the curious, Inkscape effects are written in Python and codes can be viewed after installation.



The gray and white points can be edited with the Raster>Level feature in Inkscape 0.46


Equalize does the same trick but it doesn't have customizable settings

Using GIMP, one can manipulate the CDF by hand and see the PDF change live.


Colors>Curves trick from GIMP 2.6


Here are the final images.


Enhanced with Inkscape's Equalize


Enhanced with Inkscape's Level


Enhanced with GIMP's Curves

Inkscape, GIMP and TuxPaint are Free and Open Source and can be easily downloaded over the internet. Thanks to Leon of CPU and Last Year's Software Freedom Day for the OpenEduDisc. I stumbled upon TuxPaint on that disc in search for graphics software goodies.

Many thanks to Shugo Tokumaru and Lost in Found for making beautiful music to keep me company.

No comments:

Post a Comment