Title: Multimedia Data Introduction to Image Data
1Multimedia DataIntroduction to Image Data
This lecture provides a short introduction to
image anatomy that will provide useful background
for image processing and image compression which
we will consider shortly.
- Dr Sandra I. Woolley
- http//www.eee.bham.ac.uk/woolleysi
- S.I.Woolley_at_bham.ac.uk
- Electronic, Electrical and Computer Engineering
2Content
- The contents of an image file.
- Simple test images.
- Image histograms and pixel correlations
- The .raw file
Cheetah test image.
3Digital Image Data
4Producing a Digital Image
5Image Pixels
- Image pixels form a natural matrix that we can
easily label. - The picture on the right shows the pixels
labelled as (x,y). - Starting at the top left at (0,0) x increases in
the horizontal direction and y increases
vertically down. - We could label them differently if we wanted.
The important thing is that we can unambiguously
identify them. - There are TWO easy ways to confuse pixel
locations. - Mixing up numbers that start at (0,0) with ones
start at (1,1). - Mixing (x,y) notation and (row, column). (row,
column) is (y,x).
6mouse
320
- Mouse.raw has 320x200 pixels. It is a simple but
effective test image. - Mouse is an 8-bit greyscale test image. We will
study colour later. 8 bits per pixel (bpp) means
we have 256 values (Black0 white 255). - The x-axis of the image histogram is intensity
(colour) from Black0 to white255.
200
7Paintshop Pro Software (Jasc)
- Paintshop Pro (made by Jasc) is a useful tool for
manipulating images. - Newer shareware version is time limited.
- The image on the right shows mouse in PaintShop
Pro after it has been lightened. Notice the
histogram has moved to the right (remember
black0 and white255) - FastStone (www.faststone.org) is a freeware
alternative. See download sites (such as
www.snapfiles.com) for downloads.) FastStone
does not support .raw not save files as .gif to
open. - Faststone histograms are in the Edit menu.
8Paintshop Pro Software (Jasc)
- Notice the different histogram for the cheetah
image. - The image uses a wider range of intensity values
than the mouse picture. - Mouse is a very simple picture. Real world
images are usually more complex. They tend to
have histograms more like cheetahs , i.e.,
flatter, because they contain a wider range of
colours.
9Differencing Neighbouring Pixels
- The actual difference in value between adjacent
pixels is often very small. - The histograms on the right show the pixel values
for the cheetah image before and after pixel
differencing. - The differenced values can be compressed more
efficiently.
10A Closer Look at Mouse
11Reducing Resolution (a bad way to compress)
Mouse at 80x50 Pixels
12Mouse at 40x25 Pixels
13Mouse With Only 16 Colours (i.e.,4 Bits Per
Pixel)
14Mouse With Just 2 Colours (i.e.,1 Bit Per Pixel)
15Negative Mouse
16Edge Mouse
17Deformation Mouse (punch 72)
18Accessing .raw Image Data
19A Simple ExampleMouse.raw at 10x10 pixels!!
- This is mouse.raw at just 10x10 pixels.
- A .raw file is the simplest type of image file.
It has no header information and it is not
compressed. - The 10x10 image of mouse simply contains only 100
continuous 8-bit bytes. - If we try to open a .raw file in PaintShop we
need to specify the dimensions.
20A Simple ExampleMouse.raw at 10x10 Pixels!!
- If we try to open a .raw file in a simple text
editor we will see something like this. - The viewer will interpret the image pixel values
as ascii alphanumeric or control characters. - If we want to read (or manipulate) the image
pixel values we can write a simple program to
open the file for us.
21A Simple ExampleMouse.raw at 10x10 Pixels!!
- This is an example of output from a simple
program that prints out the 100 pixel values in
10 rows of 10. - Notice that the darkest regions at the bottom of
of the image are represented by very low values
as you would expect. - Similarly the lighter regions of mouse have high
values (200 and above).
22- This concludes our introduction to image
processing. - Next we will look at how to perform simple image
processing and how we can use compression to
represent the image without losing too much
quality. - You can find course information, including slides
and supporting resources, on-line on the course
web page at -
Thank You
http//www.eee.bham.ac.uk/woolleysi/teaching/multi
media.htm