Projects Showroom PhD Publications Unsorted About Resume Places


Color Image to Grayscale Conversion

NOTE: A new version is available and the website will change soon

In Color2Gray: Salience-Preserving Color Removal Gooch et al. describe an algorithm to convert a color into a gray image. They state: Visually important image features often disappear when color images are converted to grayscale. The algorithm introduced here reduces such losses by attempting to preserve the salient features of the color image. The results of their approach are very impressive and overcome limits of current implementations used in Photoshop or Paint Shop Pro.

Although the quality is good the algorithm itself is slow: O(N4). Please read their paper for additional information regarding the runtime.

Here is my quick and sometimes dirty solution to this problem: fast and most of the time high quality greyscale images.

Changelog
Tuesday, 9. August 2005 C# Sourcecode updated download
Monday, 8. August 2005 An enhanced Photoshop plugin is available with some bugs removed and more options. It is tested using Photoshop CS and works on 8 and 16 Bit RGB images. Below you will find the updated Impressions.

Download

The algorithm is implemented using C# and the .Net framework but should also run under Mono.
The source is released under the GNU Lesser GPL (LGPL) and can be downloaded here (5.28 KB, 09.08.2005). The Photoshop Plugin uses an enhanced version of this algorithm. It will be incorporated back into the C# version soon.

Algorithm

Please stay tuned. I know I need to write about it and will do it later. In the meantime please have a look at the sourcecode.

Impressions

The following images are showing the power of the algorithm by converting a dark color image to grayscale. The image is taken from a QuakeIIIArena Level called wvwq3dm7 Decidia from WVW Design.

Original ImagePaint Shop Po GrayscaleMy c2g Result (Automatic brightness correction)My c2g Result with manual brightness adaption

The following images are taken from the Color2Gray Website. Here you can see that my algorithm does not preserve salience features of the original image but produces a better result than the standard Photoshop algorithm.

Original Color ImagePhotoshop GrayscaleColor2Gray ResultMy c2g Result

Compared it to the results of the Detail Preserving Color Transformation website there are some advantages but one disadvantage. Here is the comparison:

OriginalPaint Shop ProTheir (Rasche et al.) ResultsMy Results

Automatic brightness correction

Automatic brightness correction

No automatic brightness correction


©2002-2007 Martin Faust (martin.faust@e56.de), Version February 07 2008 16:16:36
Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved.
No-www.org Class A Compliant