Prof.Hansa Shingrakhia

Nov 20, 2015

Prof.Hansa Shingrakhia

*

IntroductionOne picture is worth more than ten thousand words

*

ReferencesDigital Image Processing, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2002Much of the material that follows is taken from this bookMachine Vision: Automated Visual Inspection and Robot Vision, David Vernon, Prentice Hall, 1991Available online at:homepages.inf.ed.ac.uk/rbf/BOOKS/VERNON/

*

ContentsThis lecture will cover:What is a digital image?What is digital image processing?History of digital image processingState of the art examples of digital image processingKey stages in digital image processing

*

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

*Real world is continuous an image is simply a digital approximation of this.

What is a Digital Image? (cont)Pixel values typically represent gray levels, colours, heights, opacities etcRemember digitization implies that a digital image is an approximation of a real scene

*

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

5.psd

*

What is Digital Image Processing?Digital image processing focuses on two major tasksImprovement of pictorial information for human interpretationProcessing of image data for storage, transmission and representation for autonomous machine perceptionSome argument about where image processing ends and fields such as image analysis and computer vision start

*

What is DIP? (cont)The continuum from image processing to computer vision can be broken up into low-, mid- and high-level processes

In this course we will stop here

*Give the analogy of the character recognition system.Low Level: Cleaning up the image of some textMid level: Segmenting the text from the background and recognising individual charactersHigh level: Understanding what the text says

History of Digital Image ProcessingEarly 1920s: One of the first applications of digital imaging was in the news-paper industryThe Bartlane cable picture transmission serviceImages were transferred by submarine cable between London and New YorkPictures were coded for cable transfer and reconstructed at the receiving end on a telegraph printer

*

History of DIP (cont)Mid to late 1920s: Improvements to the Bartlane system resulted in higher quality imagesNew reproduction processes based on photographic techniquesIncreased number of tones in reproduced images

*

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 processing1964: Computers used to improve the quality of images of the moon taken by the Ranger 7 probeSuch techniques were usedin other space missions including the Apollo landings

*

History of DIP (cont)1970s: Digital image processing begins to be used in medical applications1979: 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

*

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 areasImage enhancement/restorationArtistic effectsMedical visualisationIndustrial inspectionLaw enforcementHuman computer interfaces

*

Examples: Image EnhancementOne of the most common uses of DIP techniques: improve quality, remove noise etc

*

Examples: The Hubble TelescopeLaunched in 1990 the Hubble telescope can take images of very distant objectsHowever, an incorrect mirror made many of Hubbles images uselessImage processing techniques were used to fix this

*

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

*

Examples: MedicineTake slice from MRI scan of canine heart, and find boundaries between types of tissueImage with gray levels representing tissue densityUse a suitable filter to highlight edges

Original MRI Image of a Dog HeartEdge Detection Image

*

Examples: GISGeographic Information SystemsDigital image processing techniques are used extensively to manipulate satellite imageryTerrain classificationMeteorology

*

Examples: GIS (cont)Night-Time Lights of the World data setGlobal inventory of human settlementNot hard to imagine the kind of analysis that might be done using this data

*

Examples: Industrial InspectionHuman operators are expensive, slow andunreliableMake machines do thejob insteadIndustrial vision systems are used in all kinds of industries

*

Examples: PCB InspectionPrinted Circuit Board (PCB) inspectionMachine inspection is used to determine that all components are present and that all solder joints are acceptableBoth conventional imaging and x-ray imaging are used

*

Examples: Law EnforcementImage processing techniques are used extensively by law enforcersNumber plate recognition for speed cameras/automated toll systemsFingerprint recognitionEnhancement of CCTV images

*

Examples: HCITry to make human computer interfaces more naturalFace recognitionGesture recognitionDoes anyone remember the user interface from Minority Report?These tasks can be extremely difficult

*

Key Stages in Digital Image Processing

Image AcquisitionImage RestorationMorphological ProcessingSegmentationRepresentation & DescriptionImage EnhancementObject RecognitionProblem DomainColour Image ProcessingImage Compression

*

Key Stages in Digital Image Processing:Image Aquisition

Image AcquisitionImage RestorationMorphological ProcessingSegmentationRepresentation & DescriptionImage EnhancementObject RecognitionProblem DomainColour Image ProcessingImage Compression

*

Key Stages in Digital Image Processing:Image Enhancement

Image AcquisitionImage RestorationMorphological ProcessingSegmentationRepresentation & DescriptionImage EnhancementObject RecognitionProblem DomainColour Image ProcessingImage Compression

*

Key Stages in Digital Image Processing:Image Restoration

*

Key Stages in Digital Image Processing:Morphological Processing

*

Key Stages in Digital Image Processing:Segmentation

*

Key Stages in Digital Image Processing:Object Recognition

*

Key Stages in Digital Image Processing:Representation & Description

*

Key Stages in Digital Image Processing:Image Compression

*

Key Stages in Digital Image Processing:Colour Image Processing

*

SummaryWe have looked at:What is a digital image?What is digital image processing?History of digital image processingState of the art examples of digital image processingKey stages in digital image processingNext time we will start to see how it all works

*

Image digitization Why do we need digitization?What is digitization?How to digitize the image?

Why Digitization?Theory of real numbers: Between any two given points there are infinite number of points.An image should be represented by infinite numbers of points. Each such image point may contain one of the infinitely many possible intensity values needing infinite number of bits.So such representation is not possible in any digital computer

What is desired?An image to be represented in the form of a finite 2-D matrix.

Image as a matrix of numbers

What is digitization?Image representation in 2D finite matrix-

Sampling Each matrix element represented by one of the finite set of discrete values

QuantizationMatrix element called pixels.Some relationships exist among pixels.

Aliasing and Moir PatternAll signals (functions) can be shown to be made up of a linear combination sinusoidal signals (sines and cosines) of different frequencies. (Chapter 4)For physical reasons, there is a highest frequency component in all real world signals.Theoretically,if a signal is sampled at more than twice its highest frequency component, then it can be reconstructed exactly from its samples.But, if it is sampled at less than that frequency (called undersampling), then aliasing will result.This causes frequencies to appear in the sampled signal that were not in the original signal. The Moir pattern shown in Figure 2.24 is an example. The vertical low frequency pattern is a new frequency not in the original patterns.

Aliasing and Moir PatternThe effect of aliased frequencies

Note that subsampling of a digital image will cause undersampling if the subsampling rate is less than twice the maximum frequency in the digital image.

Aliasing can be prevented if a signal is filtered to eliminate high frequencies so that its highest frequency component will be less than twice the sampling rate.

A signal which is periodic, x(t) = x(t+T) for all t and where T is the period, has a finite maximum frequency component. So it is a bandlimited signal.

Sampling at a higher sampling rate (usually twice or more) than necessary to prevent aliasing is called oversampling.

Zooming and Shrinking Digital ImagesZooming: increasing the number of pixels in an image so that the image appears largerNearest neighbor interpolation

For example: pixel replication--to repeat rows and columns of an imageBilinear interpolation

Smoother Higher order interpolation

Image shrinking: subsampling

Zooming and Shrinking Digital ImagesNearest neighborInterpolation(Pixel replication)Bilinear interpolation

Relationships between pixels On completion the students will be able to

1. what is pixels neighborhood & different types of neighborhood.2. Explain what is meant by connectivity.3. Learn connecting component labeling algorithm.4. Explain what is adjacency & different type of adjacency.5. Learn different distance measures.

Neighborhood of a pixelP=N4(p)

Diagonal & 8-neighborsND(p)N8(p)=P=N4(p) ND(p)

Neighbors of a pixelThere are three kinds of neighbors of a pixel:

N4(p) 4-neighbors: the set of horizontal and vertical neighborsND(p) diagonal neighbors: the set of 4 diagonal neighborsN8(p) 8-neighbors: union of 4-neighbors and diagonal neighbors

OOOOXOOOO

OOXOO

OOXOO

Adjacency and ConnectivityLet V: a set of intensity values used to define adjacency and connectivity.In a binary image, V = {1}, if we are referring to adjacency of pixels with value 1.In a gray-scale image, the idea is the same, but V typically contains more elements, for example, V = {180, 181, 182, , 200}If the possible intensity values 0 255, V set can be any subset of these 256 values.

Adjacency:Two pixels that are neighbors and have the same grey-level (or some other specified similarity criterion) are adjacentPixels can be 4-adjacent, diagonally adjacent, 8-adjacent, or m-adjacent.m-adjacency (mixed adjacency):Two pixels p and q of the same value (or specified similarity) are m-adjacent if either

(i) q and p are 4-adjacent, or(ii) p and q are diagonally adjacent and do not have any common 4-adjacent neighbors. They cannot be both (i) and (ii).

An example of adjacency:

Path:The length of the pathClosed pathConnectivity in a subset S of an imageTwo pixels are connected if there is a path between them that lies completely within S.Connected component of S: The set of all pixels in S that are connected to a given pixel in S.Region of an imageBoundary, border or contour of a regionEdge: a path of one or more pixels that separate two regions of significantly different gray levels.

Distance measuresDistance function: a function of two points, p and q, in space that satisfies three criteria

The Euclidean distance De(p, q)

The city-block (Manhattan) distance D4(p, q)

The chessboard distance D8(p, q)

Distance MeasuresDm distance:

is defined as the shortest m-path between the points.In this case, the distance between two pixels will depend on the values of the pixels along the path, as well as the values of their neighbors.

Distance MeasuresExample:

Consider the following arrangement of pixels and assume that p, p2, and p4 have value 1 and that p1 and p3 can have can have a value of 0 or 1Suppose that we consider the adjacency of pixels values 1 (i.e. V = {1})

Distance MeasuresCont. Example:

Now, to compute the Dm between points p and p4Here we have 4 cases:Case1: If p1 =0 and p3 = 0The length of the shortest m-path (the Dm distance) is 2 (p, p2, p4)

Distance MeasuresCont. Example:

Case2: If p1 =1 and p3 = 0now, p1 and p will no longer be adjacent (see m-adjacency definition)then, the length of the shortestpath will be 3 (p, p1, p2, p4)

Distance MeasuresCont. Example:

Case3: If p1 =0 and p3 = 1The same applies here, and the shortest m-path will be 3 (p, p2, p3, p4)

Distance MeasuresCont. Example:

Case4: If p1 =1 and p3 = 1The length of the shortest m-path will be 4 (p, p1 , p2, p3, p4)

*

*

*

*

*Real world is continuous an image is simply a digital approximation of this.*

*

*

*Give the analogy of the character recognition system.Low Level: Cleaning up the image of some textMid level: Segmenting the text from the background and recognising individual charactersHigh level: Understanding what the text says*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

Welcome message from author

This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Related Documents