You are on page 1of 74

NICE TO MEET YOU

Dr. D.S. Guru

Department of Studies in Computer Science, University of Mysore, Mysore, INDIA

About my place : Mysore

A city of palaces, gardens, shady avenues and sacred temples.


A historical place. Retains some of the charm of the old world with its many institutions that propagate Carnatic Classical music and dance. It is called a beautiful and cultured daughter city of mother India.

Palace

St. Philominas Church

Holy Temples

Brindavan Garden

National Park

Falls

Mysore Zoo

Bird Sanctuary

University of Mysore

MANASAGANGOTHRI CAMPUS

IMAGE PROCESSING

Image?
O x

f(x,y)

IMAGE: A two dimensional light intensity function

Analog Image : f(xR, y R)


Sampling Digital Image : f(xZ, yZ)
PROCESSING:
Analysis + Understanding

vR = i(x,y) * r(x,y)
Quantization vZ

Image Acquisition Process

Two Dimensional Representation of an Image

Memory Requirement?

Image
An image is non-textual information that can be displayed and printed. Images can be from real world or virtual Described as spatial arrays of values The smallest addressable image element is called PIXEL (picture element). The array is called a bitmap

Why Image Processing?


To improve the visual quality of an image for human interpretation To analyze the contents of the image for autonomous machine perception

Image Enhancement

High Contrast Image Low

Stretched Histogram Its Histogram

Low quality images

Images after processing

Equalization

Star treck team

Encrypted Image

Decrypted Image

Water marking application

Enhanced to a color image

Autonomous Machine Perception

A Robot

Region to be inspected (Picture of a tunnel)

Close lookup

Identified Defective Region

Automation of Tile inspection


In a continuous production process, all dried roof tiles are automatically inspected for cracks, deformations, dimensional correctness, and color.

The inspection speed is about 40 tiles per minute. Defective tiles are eliminated from the production process before further refinement takes place. Courtesy: Thuringian research program "Image Processing, Pattern Recognition and Engineering Vision Systems" (Germany)

Quality Assurance

Medical Diagnosis

X-ray Image

Binary Image

Noise eliminated

Skeletonization

Angle Measurement

Thresholding operation
Deciphered Image Oblitered Image

Median

Filtering

Forensic Application
Enhanced Image

Number plate identification

The vehicle approached the secured area, and starts the cycle by stepping over a magnetic loop detector (which is the most popular vehicle sensor). The loop detector senses the car and its presence is signaled to the LPR unit.

The LPR unit activates the illumination (invisible Infrared in most cases) and takes pictures of the front or rear plates from the LPR camera (shown at the left side of the gate). The images of the vehicle include the plate and the pixel information is read by the LPR unit's image processing hardware (the frame grabber).

The LPR unit analyzes the image with different image processing software algorithms, enhances the image, detects the plate position, extracts the plate string, and identifies the fonts using special artificial intelligence methods (such as Neural Networks)

The LPR unit checks if the vehicle appears on a predefined list of authorized cars, and if found - it signals to open the gate by activating its relay. The unit can also switch on a green "go-ahead" light or red "stop" light. The unit can also display a Welcome! message with personalized data.

The authorized vehicle enters into the secured area. After passing the gate its detector closes the gate. Now the system waits for the next vehicle to approach the secured area

A Number Plate Recognition system

The plate number is used to produce a violation fine on speed or red-light systems The manual process of preparing a violation fine is replaced by an automated process which reduces the time. The fines can be viewed and paid on-line.

Image segmentation
Cheque validation

Stages in processing
A An application S Solution Recognition and Interpretation

Image acquisition

Knowledge Base
Preprocessing

Segmentation

Representation and Description

Image Formats

Image capturing formats: the format in which image is created Image storage format: the format in which images are stored (often transmitted)

In bit maps, the values are binary numbers In color images, the values correspond to RGB components While storing images, additional information may be stored along with pixels, like width, height, author, etc.

Image Formats

RIFF: Resource Interchange File Format GIF: Graphics Interchange Format TIFF: Tagged Image File Format JPEG: Joint Photographic Experts Group PostScript: PBM: Portable BitMap BMP: Bitamp

GIF Format
The CompuServe Information Service popularized the Graphic Interchange Format in the 1980s as an efficient means to transmit images across data networks. In the early 1990s the original designers of the World Wide Web adopted GIF for its efficiency and widespread familiarity. The overwhelming majority of images on the Web are now in GIF format, and virtually all Web browsers that support graphics can display GIF files. GIF files incorporate a compression scheme (LZW (Lempel Zev Welch) ) to keep file sizes at a minimum, and they are limited to 8-bit (256 or fewer colors) color palettes. Several slight variants of the basic GIF format add support for transparent color and for the interlaced GIF graphics popularized by Netscape Navigator

TIFF Format

TIFF was developed by Aldus and Microsoft. TIFF uses 4-byte integer file offsets to store image data, with the consequence that a TIFF file cannot have more than 4 Gigabytes of raster data. Strengths: TIFF is primarily designed for raster data interchange. It's main strengths are a highly flexible and platform-independent format which is supported by numerous image processing applications.

PostScript

PostScript is a programming language optimized for printing graphics and text (whether on paper, film, or CRT is immaterial). It is a page description language. It was introduced by Adobe in 1985. The main purpose of PostScript was to provide a convenient language to describe images in a device independent manner. This device independence means that the image is described without reference to any specific device features (e.g. printer resolution) so that the same description could be used on any PostScript printer without modification.

BMP Format

Windows bitmap files are stored in a device-independent bitmap (DIB) format that allows Windows to display the bitmap on any type of display device. The default filename extension of a Windows DIB file is .BMP. Bitmap-File Structures: Each bitmap file contains a bitmap-file header, a bitmap-information header, a color table, and an array of bytes that defines the bitmap bits. The bitmap-file header contains information about the type, size, and layout of a device-independent bitmap file. The header is defined as a BITMAPFILEHEADER structure.

Standard Color spaces:


Grayscale Pseudo color (any size)

RGB
CMYK

The RGB Color Model


The Primary colors: R (red) G (green) B (blue)

0 --- off lowest intensity 1 --- on highest intensity A linear combination of all three colors with different intensity levels

G
(0,1,0) green (1,1,0) yellow

(0,1,1) cyan (0,0,0) black

(1,1,1) white

(1,0,0) red

(0,0,1) blue

(1,0,1) magenta

gray axis

CMYK Color Model


Short for Cyan-Magenta-Yellow-Black. A color model in which all colors are described as a mixture of these four Process colors. CMYK is the standard color model used in offset printing for full-color documents Because such printing uses inks of these four basic colors, it is often called four-color printing.

Pixels Relationships
x-1, y-1 x-1, y x-1, y+1 x, y-1 pi (x, y) x, y+1 x+1, y-1 x+1, y x+1, y+1

Neighbors of pixel pi
1. Four Neighbors : N4(pi) = {(x, y-1), (x+1, y), (x, y+1), (x-1, y)} 2. Diagonal Neighbors : ND(pi) = {(x+1, y-1), (x+1, y+1), (x-1, y+1),

(x-1, y-1)}
3. Eight Neighbors : N8(pi) = N4(pi) ND(pi)

Pixel Connectivity
4-Connectivity : Pixels p and q are four connected if 1. p and q bear values in V 2. p N4(q) D-Connectivity : Pixels p and q are diagonally connected if 1. p and q bear values in V 2. p ND(q) 8-Connectivity : Pixels p and q are eight connected if 1. p and q bear values in V 2. p N8(q)

m-connectivity: Pixels p and q are mixed connected if 1. p and q bear values in V 2. p N4(q) or p ND(q) and N4(p) N4(q) =
0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0

Labeling of Connected Components


G G G G E E G G G G E E G G C C C C G B D C F C G B D D F F G B D D F F R B D D F J A B B B

4-connected
G = Region 1; A = Region 2 R = B = Region 3; C = Region 4; D=F=Region 5; E= Region 6; J= Region 7; H=Region 8; I= Region 9;
I

8-connected
G = Region 1; A = Region 2 R = B = C= H= Region 3; D=F=Region 4; E= Region 5; J= Region 6; I= Region 7;
II III

F
F

E
E

E
E

E
H

C
I

F
I

F
I

J
J

F
J

II I III

IV

IV

VI VIII IX

VII

V VII

VI

4-Connected Component

8-Connected Component

In Summary
Introduction Major Goals Applications Stages

EDUCATION
Enhancing ones quality through Dedication, Understanding and Commitment with an Aspiration to become a member of a team Involved in Offline / Online development of Nation -D.S. Guru

No(w) Questions!?

T H A N K Y O U

Dr. D.S.G

Review Questions
1. What is an image? How do you convert an analog image into a digital image? 2. Explain the process of image acquisition. 3. How does computer represent a digital image? 4. What is the smallest addressable element of an image? 5. What are the objectives of image processing? 6. Mention at least four applications of image processing. 7. Write the different stages in image processing. 8. What is the role of knowledge base in image processing? 9. What are different image formats available? 10.Explain RGB color space. 11.Discuss on the importance of pixel connectivity. 12.Solve the problems of chapter 2.

Review Assignments
1.

Write a program to read and display an image created in MS Paint software (BMP format). Reduce the size of an image by the factor 2X2 by merging four neighboring pixels and see the effect. Write a program to read images in different formats. Write program to label the connected components using 4, 8 and m connectivity.

2.

3. 4.

You might also like