digital image processing_ ch1 introduction-2003

Post on 07-May-2015

749 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1of36

Digital Image Processing:Introduction

Dr Ahmad Hassanat

2of36

Introduction

“One picture is worth more than ten thousand words”

Anonymous

3of36

References

“Digital Image Processing”, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2002

– Support reference

“Machine Vision: Automated Visual Inspection and Robot Vision”, David Vernon, Prentice Hall, 1991

– Available online at:homepages.inf.ed.ac.uk/rbf/BOOKS/VERNON/

– Google.com

4of36

Contents

This lecture will cover:– What is a digital image?– What is digital image processing?– History of digital image processing– State of the art examples of digital image

processing– Key stages in digital image processing

5of36

What is a Digital Image?

A digital image is a representation of a two-dimensional image as a finite set of digital values, called picture elements or pixels

6of36

What is a Digital Image? (cont…)

Pixel values typically represent gray levels, colours, heights, etc

Remember digitization implies that a digital image is an approximation of a real scene

1 pixel

7of36

What is a Digital Image? (cont…)

Common image formats include:– 1 sample per point (B&W or Grayscale)– 3 samples per point (Red, Green, and Blue)– 4 samples per point (Red, Green, Blue, and “Alpha”,

a.k.a. Opacity)

For most of this course we will focus on grey-scale images

8of36

What is Digital Image Processing?

Digital image processing focuses on two major tasks

– Improvement of pictorial information for human interpretation

– Processing of image data for storage, transmission and representation for autonomous machine perception

Some argument about where image processing ends and fields such as image analysis and computer vision start

9of36

What is DIP? (cont…)

The continuum from image processing to computer vision can be broken up into low-, mid- and high-level processes

Low Level Process

Input: ImageOutput: Image

Examples: Noise removal, image sharpening

Mid Level Process

Input: Image Output: Attributes

Examples: Object recognition, segmentation

High Level Process

Input: Attributes Output: Understanding

Examples: Scene understanding, autonomous navigation

In this course we will stop here

التواصل

10of36

History of Digital Image Processing

Early 1920s: One of the first applications of digital imaging was in the news-paper industry

– The Bartlane cable picture transmission service

– Images were transferred by submarine cable between London and New York

– Pictures were coded for cable transfer and reconstructed at the receiving end on a telegraph printer

Early digital image

11of36

History of DIP (cont…)

Mid to late 1920s: Improvements to the Bartlane system resulted in higher quality images

– New reproduction processes based on photographic techniques

– Increased number of tones in reproduced images

Improved digital image Early 15 tone digital

image

12of36

History of DIP (cont…)

1960s: Improvements in computing technology and the onset of the space race led to a surge of work in digital image processing

– 1964: Computers used to improve the quality of images of the moon taken by the Ranger 7 probe

– Such techniques were usedin other space missions including the Apollo landings

A picture of the moon taken by the Ranger 7 probe minutes before landing

13of36

History of DIP (cont…)

1970s: Digital image processing begins to be used in medical applications

– 1979: Sir Godfrey N. Hounsfield & Prof. Allan M. Cormack share the Nobel Prize in medicine for the invention of tomography, the technology behind Computerised Axial Tomography (CAT) scans

Typical head slice CAT image

14of36

History of DIP (cont…)

1980s - Today: The use of digital image processing techniques has exploded and they are now used for all kinds of tasks in all kinds of areas

– Image enhancement/restoration– Artistic effects– Medical visualisation– Industrial inspection– Law enforcement– Human computer interfaces

15of36

Examples: Image Enhancement

One of the most common uses of DIP techniques: improve quality, remove noise etc

16of36

Examples: The Hubble Telescope

Launched in 1990 the Hubble telescope can take images of very distant objects

However, an incorrect mirror made many of Hubble’s images useless

Image processing techniques were used to fix this

17of36

Examples: Artistic Effects

Artistic effects are used to make images more visually appealing, to add special effects and to make composite images

18of36

Examples: Medicine

Take slice from MRI scan of canine heart, and find boundaries between types of tissue

– Image with gray levels representing tissue density

– Use a suitable filter to highlight edges

Original MRI Image of a Dog Heart Edge Detection Image

19of36

Examples: GIS

Geographic Information Systems– Digital image processing techniques are used

extensively to manipulate satellite imagery– Terrain classification– Meteorology

20of36

Examples: GIS (cont…)

Night-Time Lights of the World data set

– Global inventory of human settlement

– Not hard to imagine the kind of analysis that might be done using this data

21of36

Examples: Industrial Inspection

Human operators are expensive, slow andunreliable

Make machines do thejob instead

Industrial vision systems

are used in all kinds of industries

Can we trust them?

22of36

Examples: PCB Inspection

Printed Circuit Board (PCB) inspection– Machine inspection is used to determine that

all components are present and that all solder joints are acceptable

– Both conventional imaging and x-ray imaging are used

solder joints: اللحام وصال

23of36

Examples: Law Enforcement

Image processing techniques are used extensively by law enforcers

– Number plate recognition for speed cameras/automated toll systems

– Fingerprint recognition– Enhancement of

CCTV images

24of36

Examples: HCI

Try to make human computer interfaces more natural

– Face recognition– Gesture recognition

These tasks can be extremely difficult

على التعرفاإليماءات

25of36

Key Stages in Digital Image Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

على الحصولالصوره

تحسين الصوره

الصورة ترميم

26of36

Key Stages in Digital Image Processing:Image Aquisition

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

27of36

Key Stages in Digital Image Processing:Image Enhancement

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

28of36

Key Stages in Digital Image Processing:Image Restoration

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

29of36

Image Restoration - Examples

Distorted image Restored image

Geometrically distorted image Restored image

30of36

Image Restoration – De-noising

Restored “Clean” imagesNoisy images

31of36

Key Stages in Digital Image Processing:Morphological Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

32of36

Key Stages in Digital Image Processing:Segmentation

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

33of36

Key Stages in Digital Image Processing:Object Recognition

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

34of36

Key Stages in Digital Image Processing:Representation & Description

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

35of36

Key Stages in Digital Image Processing:Image Compression

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

36of36

Image Compression

Original image

JPEG Compression)

JPEG2000 Compression

37of36

Key Stages in Digital Image Processing:Colour Image Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

38of36

Digitising an image

To convert the continuous function f(x,y) to digital form we need to sample the continuous sensed data in both coordinates and in amplitude using finite and discrete sets of values.

– Digitizing the coordinate values is called sampling.

– Digitizing the amplitude values is called quantisation.

The number of selected values in the sampling process is known as the image spatial resolution. This is simply the number of pixels relative to the given image area

The number of selected values in the quantisation process is called the grey-level (colour level) resolution. This is expressed in terms of the number of bits allocated to the colour levels.

The quality of a digitised image depends the resolution parameters on both processes.

39of36

Digital image Representaion – Revised

A monochrome digital image is a 2-dimensional light intensity function f (x,y) whose independent variables (x,y) are digitised through spatial sampling, and whose intensity values are quantised by a finite uniformly spread grey-levels. i.e. an image f can be represented as a 2-dimentional array:

f(1,1) f(1,2) f(1,3) … f(1,n)

f(2,1) f(2,2) f(2,3) … f(2,n)

f = f(3,1) f(3,2) f(3,3) … f(3,n)

: : : : : : : : : :

f(m,1) f(m,2) f(m,3) … f(m,n)

Usually, m=n and the number of graylevels are g=2k for some k. The spatial resolution is mn and g is the greylevel resolution.

RGB based colour images are represented similarly except that f(i,j) is a 3D vector representing intensity of the three primary colors at the (i,j) pixel posiotion,

40of36

Spatial Resolution

The spatial resolution of a digital image reflects the amount of details that one can see in the image (i.e. the ratio of pixel “area” to the area of the image display).

If an image is spatially sampled at mxn pixels, then the larger mn the finer the observed details.

For a fixed image area, the noticeable image quality is directly proportional to the value of mn results.

Reduced spatial resolution, within the same area, may result in what is known as Checkerboard pattern.

However beyond a certain fine spatial resolution, the human eye may not be able to notice improved quality.

41of36

Spatial Resolution Vs Image QualityDecreasing spatial resolution reduces image quality proportionally - Checkerboard pattern.

† Images extracted from DIP, 2nd Edition, Gonzalez & Woods, PH.

42of36

Spatial Resolution Vs Image Quality - continued

The checkerboard effect is not visible if a lower–resolution image is displayed in a proportionately small window.

43of36

Effect of grey level resolution

123 162 200 147 93137 157 165 232 189

Image f = 151 155 152 141 130205 101 100 193 115250 50 75 88 100

8 bits

61 80 100 73 4668 78 82 116 9475 77 76 70 65

102 50 50 96 57125 25 37 43 50

7 bits

f(i,j) int(f(i,j)/2)

30 40 50 36 2334 39 41 58 4737 38 38 35 3251 25 25 48 2862 12 18 21 25

6 bits

15 20 25 18 1117 19 20 29 2318 19 19 17 1625 12 12 24 1431 6 9 10 12

5 bits

7 10 12 9 58 9 10 14 119 9 9 8 812 6 6 12 715 3 4 5 6

4 bits

3 5 6 4 24 4 5 7 54 4 4 4 46 3 3 6 37 1 2 2 3

3 bits

1 2 3 2 12 2 2 3 22 2 2 2 23 1 1 3 13 0 1 1 1

2 bits

0 1 1 1 01 1 1 1 11 1 1 1 11 0 0 1 01 0 0 0 0

1 bits

Original image f is reasonably bright, but gradually the pixels get darker as the Grey-level resolution decreases.

44of36

Effect of grey level resolution

8 bits 7 bits 6 bits

5 bits 4 bits 3 bits

2 bits 1 bit 0 bits !!!

45of36

Zooming and ResizingIt is the scaling of an image area A of wxh pixels by a factor s while

maintaing spatial resolution (i.e. output has swsh pixels).

First we need a linear scaling function S to map the coordinates of new pixels onto the original pixel grid of A.

For each (x,y) in the resized area, we need to interpolate the gray value sf(x,y) in terms of the pixels values in A that neighbour the point S(x,y). Different models of approximations are used.

S(A)

Example: Scaling A by a factor s=1.5

A

46of36

Zooming and Resizing - Continued

Interpolation schemes include:– Nearest neighbour : sf(x,y) is gray value of its nearest pixel in A.

– Bilinear : sf(x,y) is weighted average gray value of its 4 neighbouring pixels

• Images are zoomed from 128x128, 64x64 and 32x32 sizes to 1024x1024. Top row use the nearest neighbour interpolation, bottom row use Bilinear interpolation.

Checkerboard effect

Blurring effect

47of36

Image files Format

Image files consists of two parts: A header found at the start of the file and consisting of

parameters regarding: Number of rows (height) Number of columns (width) Number of bands (i.e. colors) Number of bits per pixel (bpp) File type

Image data which lists all pixel values (vectors) on the first row, followed by 2nd row, and so on.

Common image file formats include :

BIN, RAW, BMP, JPEG, TIFF, GIF, PPM, PBM, PGM, …

48of36

Digital Image Processing system components

top related