

The Pocket Handbook of Image Processing Algorithms in C (1993) [pdf] - StandardFuture
http://adaptiveart.eecs.umich.edu/2011/wp-content/uploads/2011/09/The-pocket-handbook-of-image-processing-algorithms-in-C.pdf

======
thesystemis
note that this book has some significant bugs (I remember specifically a
faulty quadratic equation that I was stuck on), but I don't think you use this
book for the code, which is pretty outdated. This book is useful as a reminder
that things like photoshop are driven by algorithms, many of which are not
rocket science but rather, fit in your pocket.

One thing I particularly like about this book is that the author used
photographs of his child that look super unhappy. After applying filters to
them, she looks even more unhappy. It gives the book a dark and foreboding
feeling.

Anyway, I always show this book to my students (along with processes like
saving a raw image and opening it in audacity as a sound file, the custom tool
in photoshop) as a means of demystifying image processing.

------
tdicola
Nice looking book. Handy to keep in your back pocket in case you're walking
down the street and see someone staring at a laptop and yelling in anguish,
'Please, can't someone help me implement a proper noise algorithm!? This is an
emergency!'

------
sweettea
It is unclear if this is legal to redistribute in this fashion.

------
kken
The code style is making me nervous. Why use ++x over x++ when incrementing
variables?

~~~
letney
20+ year C/C++ programmer here. I always use ++x unless the postfix version
(x++) provides more succinct code.

The postfix operator can incur a temporary variable to be created by the
compiler and thus make code slower.

Reference:
[http://www.idinews.com/peeves/prefixIncr.html](http://www.idinews.com/peeves/prefixIncr.html)

Also, item #6 from "More Effective C++": [http://bin-
login.name/ftp/pub/docs/programming_languages/cpp...](http://bin-
login.name/ftp/pub/docs/programming_languages/cpp/cffective_cpp/MEC/MI6_FR.HTM)

~~~
wtracy
Do note that modern compilers can detect when the return value of the ++
operator is unused, and skip the extra steps when unneeded. (I've verified the
resulting assembler myself from GCC 3.X.) That said, I still use the prefix
notation because I can't come up with a good reason not to.

~~~
NAFV_P
> _Do note that modern compilers can detect when the return value of the ++
> operator is unused, and skip the extra steps when unneeded._

Is there an equivalent instruction in assembly for postfix
increment/decrement?

~~~
wtracy
Neither one really has a direct "equivalent" in assembly.

Prefix is going to look something like:

    
    
      inc eax # increment the value
      mov eax,ecx # copy the return value to its destination
    

Postfix is going to look something like:

    
    
      mov eax,ebx # copy original value
      inc eax # increment value
      mov ebx,ecx # copy original value to final destination
    

The actual code you'd get would vary a _lot_ between compilers, architectures,
and even just different contexts within the same compiler-architecture
combination.

~~~
NAFV_P
Thank you, dammit I really should learn assembly.

------
reinhardt1053
Published in 1993

~~~
acomjean
so patents on these can not longer be valid!

