Mathematical Operations on Image

Averaging/Mean

Averaging is the methods of replacing pixel values which has effects of neighbours. Mean value is used to replace because mean value has minimum MSE. For the heat flow function, diffusion equation is satisfied with flow of pixel value. Blurring of a image is due to diffusion of gray values satisfying heat flow function.

Non local averaging is done to minimize the noise as the noise is proportional to square of number of neighbour similar windows or blocks of images. In general averaging introduces blurring.

Where as median filter, completely reduces noise with replacing noise added pixel with one of the values equal to pixel around it.

Derivatives are used to edge detection where as laplacian function is used to sharpen the image details. Laplacian function is the sum of second derivatives in both x and y directions. 

Image Enhancement and Tools

Because of the visual perceptions dependent of background light or gray value, image enhancement is most useful technique to get more information within the images.

Some Basics of Image Enhancement:

a. Histogram Modifications:

In this operation, pixel values are transformed to new values independent of another pixel values. Some of the operations are Identity transformation(S=C*r), Logarithmic operation (S=C*log(r+1), Inverse operations(S=L-r), Exponential operation(S=Cr^k).

b. Histrogram Equalizations:

In this operation, whatever be the probability distribution of the pixels, new distribution will be of equal probability distribution. In this operations new transfer function will be defined according to the new equalized distribution function. 

Local histogram equalization operation is preferred for higher informative images than Global histogram equalization paying more cost for the equalization operations.

c. Histrogram Matching:

In this operation, new histogram will be given which could not be uniform or can be said random distribution. According to given probability distribution, transfer function should be determined. For this operation; simply given histogram distribution will be mapped to equalized distribution and given new distribution will also be mapped to equalized distribution. From the mapping, we can get inverse mapping function to given required distribution function.

Image Compression

Image compression will be done in two stages.

First compression is done by mapping spatial image to a domain suitable for the compression where mapping concentrates most of information to first coefficient in transformed domain. For the less information loss second, third .. and so on coefficients are to be taken during the reconstruction of image.

second the image compression is done using the symbol coder to represent the transformed coefficient with according to histogram. Higher the probability of occurrence lower the code length and lower the probability higher the code length.

The transform where the most information concentrates on transformed first coefficient that generates minimum Mean-Square-Error is Karhunen-Loeve Transform. But the problem is image dependent transformation matrix coefficients. In a particular case, KLT is exactly equals to (Discrete Cosine Transform) DCT which is Markovian condition where a pixel is dependent of pixel next to it. Another reason to take the DCT as transformation technique is its reverse periodicity.

Once the transformed coefficients are obtained, symbolic representation for the coefficients is done with Huffman Coding where the code length is probability dependent.