Engineers-Excel.com

Image Processing with Excel: How it works

Description| How it works| Advanced version



This app implements point processing algorithms using macros. The cells containing the input and output images are sized 1 pixel by 1 pixel to make them resemble pixels in an image.

The colour of the cell is specified by its Red, Green and Blue (RGB) colour values. This wikipedia page has details of the RGB colour model.

The various functions are implemented as follows:

1. Turning images: This is straightforward, turning is achieved by a transpose of the image.

2. Flipping: This is easy too, the colour of a given cell is copied to the opposite cell as reflected along the middle horizontally or vertically.

3. Black and White: If the colour of a cell is black, it is retained as black. Otherwise, it is coloured white.

4. Colour Inversion: The RGB values of the output cells are calculated from the RGB values as follows:

R (output cell) = 255 - R (input cell)
G (output cell) = 255 - G (input cell)
B (output cell) = 255 - B (input cell)

The function "Extract" is used to extract the individual R, G and B values.

5. Gray Scale: The R, G and B of the output cell is the average of the R, G and B values of the input cell, i.e.:

For the output cells,
R = G = B = (R (input cell) + G (input cell) + B (input cell))/3

6. Image Filtering: For filtering Red, the R value of the output cell is set to 0, the G and B values are retained. Similar for filtering Green and Blue.