Fog Creek Software
Discussion Board

Image Processing Books

I seem to have had a lot of difficulty locating good books on image processing algorithms (any programming language), things like color balancing images, image transforms (like photoshop style effects) or raster drawing algorithms.

The trouble is a lot of books I have run across are either too basic (here is how to display a bitmap in Windows) or academic-type books that do seem to not address the issues I want at all, or in a practical way (example: they suggest stuff like a recursive flood fill, or recursive polygon fill algorithm - not the best way in a real program)

I did get some ideas from game programming books (things like fast polygon fill algorithms - much better than the academic type books)

Any suggestions for books on this topic

S. Tanna
Tuesday, May 27, 2003

"they suggest stuff like a recursive flood fill ..."

If you can point me to a flood fill algorithm that is not recursive I would be most grateful.

Mitch & Murray (from downtown)
Tuesday, May 27, 2003

My original post was unclear.  I was meaning to saythat many acadamic books will suggest recursive floodfill or recursive polygon fills as the method to fill a polygon.  While they work - they are poor solutions in a typical real program - and better solutions are possible.

To answer your question: well aside from unrolling the recursion, queues, etc. it depends on what you are trying to fill, although I do believe non-recursive algorithms exist

If you are trying to fill a polygon:

A typical academic book may suggest recursive flood fill or variations such as recursively walking along scan lines to look at the pixels above/below.  These are less than ideal solutions for many real world problems.

S. Tanna
Tuesday, May 27, 2003

- The Pocket Handbook of Image Processing Algorithm in C

- The Graphic Gems I,II,III,IV,V Book Series
Lookup by category and buy the book you need!

Heston Holtmann
Tuesday, May 27, 2003

This is probably not what you want, but...

The book "Digital Filters" by Hamming is an extremely thorough survey of digital filtering techniques.  It threads the needle between academic and practical engineering.  For example:

. It contains no proofs.
. It contains no code.

It does present a comprehensive analysis of FIR and IIR filters.  And, for image processing, FIR filters are a common method used for enhancing a 2D image.

For example, a common flicker filtering transform for TV is [1,2,1] (FIR coefficients for a y-axis filter).

If you're interested in video edge enhancement, then some sort of high-pass filter would be applied.  To blur an image, low-pass.  To stretch an image, an interpolating filter - taking the form of a rotating coefficient FIR filter is the best choice.

Anyhow, I'm not aware of a book with pre-worked solutions "for this use that".

Nat Ersoz
Tuesday, May 27, 2003

A similiar one to the Hamming book above is Numerical Recipes in C.  It focuses mostly on scientific computing including implementations of matrix algorithms, but if you need an efficient algorithm to compute eigenvalues, do a FFT, or normalize a matrix, this is one of the canonical references.  The text focuses on applications almost exclusivley.

Colin Evans
Tuesday, May 27, 2003

Assuming that what you want out of such a book is a help in achieving some programming a goal (as opposed to just learning the stuff without the intention of implementing them) you can alternatively try to look into open-source software that already does things you want. Off the top of my head: GIMP, PIL (Python Imaging Library), ImageMagic/GraphicsMagic. It might be much harder to see the forest but on the upside you might just find the code you need.

Krzysztof Kowalczyk
Tuesday, May 27, 2003

Good idea - go for the Gimp source.

Nat Ersoz
Tuesday, May 27, 2003

My 2 best books.. And I have many, are:

'Practical Image Processing in C' by Craig A. Lindley
'Advanced Graphics Programming in C' by Roger T. Stevens and Christopher D. Watkins

Kent Design4Effect
Wednesday, May 28, 2003

2D image processing is a shockingly undocumented field, especially in comparison with 3D graphics. The knowledge exists, it just isn't in print.

e.g. The **ONLY** book I know of that describes practical algorithms for resampling, convolving, or warping images is Wolberg's "Digital Image Warping." (it's out of print, but you can buy it from the author - just Google for "Digital Image Warping").

A generic signal processing text may help, but most of those don't approach the special aspects of 2D image processing. e.g. how to work with signals that must always be positive, how to deal with the pathetically few quantization levels of 8-bit color, how to use integer or fixed-point math (not as simple as it seems), and how to do 2D convolutions efficiently (the naive algorithm is far too slow for most applications).

I've never seen many of the cleverest 2D techniques in print, anywhere. Like the fact that you can approximate a Gaussian blur with repeated box blurs, or fast algorithms for box filtering. I wish stuff like this was actually written down somewhere. (I've got a lot to learn myself - I've been looking at this for a few years, and there are still plenty of things that Photoshop does that I can't figure out how to do :)

Poke around on sometime. It's a pile of stuff by Michael Herf, who is a real 2D graphics whiz. You may find some really good nuggets of information.

P.S. if you learn one thing about image processing, and nothing else - learn how gamma encoding works. (128 + 128 does NOT equal 256 in 8-bit color). This fortunately is quite well documented - Google for "Charles Poynton" :)

Dan Maas
Wednesday, May 28, 2003

I just thought of one more reference: Jim Blinn's compilation books. Specifically, "Jim Blinn's Corner: Dirty Pixels". Blinn carefully deals with some of the deeper subtleties of image manipulation - like how to get really truly correct results with fixed-point math (getting almost there is easy; getting all the corner cases right is much harder). I suggest reading this after a more basic text.

BTW, I was very serious when I said "Digital Image Warping" is the only book that describes operations like resampling and rotating images. If anyone knows of another book (or anything other than the original IEEE papers) that describes these algorithms in deal, I'd really,  really like to know myself! :)

Dan Maas
Sunday, June 1, 2003

*  Recent Topics

*  Fog Creek Home