Many different, often elementary and heuristic methods are used to improve images in some sense. The problem is, of course, not well defined, as there is no objective measure for image quality. Here, we discuss a few recipes that have shown to be useful both for the human observer and/or for machine recognition. These methods are very problem-oriented: a method that works fine in one case may be completely inadequate for another problem.

Apart from geometrical transformations some preliminary greylevel adjustments may be indicated, to take into account imperfections in the acquisition system. This can be done pixel by pixel, calibrating with the output of an image with constant brightness. Frequently space-invariant greyvalue transformations are also done for contrast stretching, range compression, etc. The critical distribution is the relative frequency of each greyvalue, the *greyvalue histogram* . Examples of simple greylevel transformations in this domain are:

Greyvalues can also be modified such that their histogram has any desired shape, e.g flat (every greyvalue has the same probability). All examples assume *point processing*, viz. each output pixel is the function of one input pixel; usually, the transformation is implemented with a look-up table:

These operations could be performed using linear operations in either the frequency or the spatial domain. We could, e.g. design, in the frequency domain, one-dimensional low or high pass filters ( Filtering), and transform them according to McClellan's algorithm ([McClellan73] to the two-dimensional case.

Unfortunately, linear filter operations do not really satisfy the above two design goals; in this book, we limit ourselves to discussing separately only (and superficially) Smoothing and Sharpening.

Here is a trick that can speed up operations substantially, and serves as an example for both point and neighbourhood processing in a binary image: we number the pixels in a neighbourhood like:

and denote the binary values (0,1) by *b*_{i} (*i* = 0,8); we then concatenate the bits into a 9-bit word, like *b*_{8}*b*_{7}*b*_{6}*b*_{5}*b*_{4}*b*_{3}*b*_{2}*b*_{1}*b*_{0}. This leaves us with a 9-bit greyvalue for each pixel, hence a new image (an 8-bit image with *b*_{8}
taken from the original binary image will also do). The new image corresponds to the result of a convolution of the binary image, with a matrix containing as coefficients the powers of two.
This *neighbour image* can then be passed through a look-up table to perform erosions, dilations, noise cleaning, skeletonization, etc.

Apart from point and neighbourhood processing, there are also *global processing techniques*, i.e. methods where every pixel depends on all pixels of the whole image.
Histogram methods are usually global, but they can also be used in a neighbourhood.

For global methods, Global Image Operations Global Image Operations, see also Hough Transform.