Title: AM 37 Introductory Image Processing
1- AM 37 Introductory Image Processing
- Lectures 1-2
- Contents
- Image representation
- Pixels
- Binary, grey tone, and colour images
- Brightness histograms
- Reduction of colour depth
- Image compression methods
- Loss free methods
- Lossy methods
2- A pixel The atom of a digitised image
- Usual shape Quadratic or almost quadratic
- Properties (other than position) a colour or a
grey tone - 1 bit per pixel usually black (0), white (1)
- 8 bits per pixel grey tone image usually black
(0),..white (255) - 8 bits per pixel colour image a palette
specifies the red, green, blue intensities of the
256 colour indices - 24 bits per pixel First byte, second byte,
third byte specify the red, green and blue
component, respectively. Number of colours over
16 million
3Colour components
256 x 256 x 256 ? 17 mill. colors
6 x 6 x 6 216 colors RGB cubes
RGB triangle
4 Components of coloured pixels Red r Hue
h Green g Saturation s Blue b Intensity i
5 6- A digitized image
- A two dimensional matrix of pixels
- Today
- High resolution image 2000 x 2000 pixels
- Low resolution image 512 x 512 pixels
- Representations
- On a visual medium (a PC-screen, a projector
board, printed paper) - On a file (disk, CD-ROM, flash memory etc.)
- uncompressed (bmp-format)
- compressed (jpg-format)
- In the RAM of a computer
7Grey tone landscape The grey tone is the third
dimension Below the grey tone landscape is shown
at right for the upper right rectangle of the
grey tone image.
8An image in the RAM 2D matrix of pixels In low
level language (such as C) Data structure for
example unsigned long Pix In OO-languages
(C, Java) Out The function Img.GetPixel(x,y)
returns the colour index at (x,y) of the image
Img. In The procedure Img.SetPixel(x,y,c) sets
the colour index c to the pixel at (x,y) in image
Img.
9Brightness histograms Statistics of grey tones or
colours
- In case of colour images
- Histograms of components such as
- Red, green, blue
- Hue, saturation, intensity
10- Reduction of colour depth
- 1) Transformation to a binary image
- a) For segmentation foreground pixels one
colour, background pixels the other colour.
Definitions of foreground - Above a threshold in grey tone images
- Box in rgb-space, hue-window etc.
- b) For printing with a printer with fewer colours
than present in the image. - 2)Transformation from colour images to grey tone
images - a) Split to red, green, an blue component
- b) Split to hue, saturation, intensity
- __________________________________________________
__________________________________________________
_______________ - 1a) will be discussed in Lecture 3-4
- 2a) is trivial, 2b) will not be discussed further
111b) Reduction of colour depth for
printing Example A grey tone image with
brightness levels 0..255 is to be printed on a
printer with only two grey tones Black and
white. Method Average density over an area of
black dots is proportional to the average of
255 - the brightness value in old image Often the
image is enlarged so that a pixel in the grey
tone image contains many binary pixels
12Best result is obtained by a method called error
diffusion (Floyd-Steinberg-method)
Special algorithms should be applied to the edges
13Transformation using error diffusion
14- Image compression
- Loss-free compression
- Two so called entropy coding methods
- Hufman coding
- Arithmetic coding
- Runlength coding, predictor base coding, etc.
- Example Give each word in a language a numerical
- code, the most frequently used words short codes.
Then - a text can be compressed to about half the size
compared - to the representation with 7-8 bits per
character. - Lossy (cheat-the-eye) compression
- 8x8 discrete cosine transform (old JPEG )
- Wavelet transform (new JPEG)
- Extension to motion pictures MPEG
- ) Joint Photographic Expert Group
15The forward discrete cosine transform
The inverse discrete cosine transform
In JPEG N8
16 17 18