Basic Image Processing Operations-, Slides of Digital Image Processing

Basic Image Processing Operations, Distance Measures, Connectivity, M Connectivity, Arithmetic, Logic, Operations, Neighborhood Oriented, Filtered Image, Matlab, Instructions, Digital Image Processing, Lecture Slides, Dr D J Jackson, Department of Electrical and Computer Engineering, University of Alabama, United States of America.

Typology: Slides

2011/2012

Uploaded on 03/02/2012

cristelle
cristelle 🇺🇸

4.5

(53)

374 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Dr. D. J. Jackson Lecture 3-1Electrical & Computer Engineering
Computer Vision &
Digital Image Processing
Basic Image Processing Operations
Dr. D. J. Jackson Lecture 3-2Electrical & Computer Engineering
Distance measures
Given pixels p, q, and zat (x,y), (s,t) and (u,v) respectively,
Dis a distance function (or metric) if:
D(p,q) ≥0 (D(p,q)=0 iff p=q),
D(p,q) = D(q,p), and
D(p,z) D(p,q) + D(q,z).
The Euclidean distance between pand qis given by:
The pixels having distance less than or equal to some value
rfrom (x,y) are the points contained in a disk of radius r
centered at (x,y)
22 )()(),( tysxqpDe+=
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Basic Image Processing Operations- and more Slides Digital Image Processing in PDF only on Docsity!

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

Computer Vision &

Digital Image Processing

Basic Image Processing Operations

Distance measures

  • Given pixels p , q , and z at ( x,y ), ( s,t ) and ( u,v ) respectively,
  • D is a distance function (or metric ) if:
    • D(p,q) ≥ 0 (D(p,q)=0 iff p=q),
    • D(p,q) = D(q,p), and
    • D(p,z) ≤ D(p,q) + D(q,z).
  • The Euclidean distance between p and q is given by:
  • The pixels having distance less than or equal to some value r from (x,y) are the points contained in a disk of radius r centered at (x,y)

D ( p , q ) ( x s )^2 ( y t )^2

e = − + −

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

Distance measures (continued)

  • The D 4 distance (also called the city block distance ) between p and q is given by:
  • The pixels having a D 4 distance less than some r from (x,y) form a diamond centered at (x,y)
  • Example: pixels where D 4 ≤ 2

D 4 ( p , q )= x − s + y − t

Note: Pixels with D 4 = are the 4-neighbors of (x,y)

Distance measures (continued)

  • The D 8 distance (also called the chessboard distance ) between p and q is given by:
  • The pixels having a D 8 distance less than some r from (x,y) form a square centered at (x,y)
  • Example: pixels where D 8 ≤ 2

D 8 ( p , q )=max( x − s , y − t )

Note: Pixels with D 8 = are the 8-neighbors of (x,y)

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

M-connectivity example

m-distance (p,p 4 )=2 m-distance (p,p 4 )=3 m-distance (p,p 4 )=

Arithmetic & logic operations

  • Arithmetic & logic operations on images used extensively in most image processing applications - May cover the entire image or a subset
  • Arithmetic operation between pixels p and q are defined as:
    • Addition: ( p+q )
      • Used often for image averaging to reduce noise
    • Subtraction: ( p-q )
      • Used often for static background removal
    • Multiplication: ( p*q ) (or pq , p × q )
      • Used to correct gray-level shading
    • Division: ( p ÷ q ) (or p/q )
      • As in multiplication

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

Logic operations

  • Arithmetic operation between pixels p and q are defined as:
    • AND: p AND q (also p⋅q)
    • OR: p OR q (also p+q)
    • COMPLEMENT: NOT q (also q’ )
  • Form a functionally complete set
  • Applicable to binary images
  • Basic tools in binary image processing, used for:
    • Masking
    • Feature detection
    • Shape analysis

Examples of logic operations

A NOT(A)

A B (A) AND (B)

A B (A) OR (B)

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

Neighborhood-oriented operations

(continued)

  • Consider the following subset of pixels in an image
  • Suppose we want to filter the image by replacing the value at Z 5 with the average value of the pixels in a 3x3 region centered around Z (^5)
  • Perform an operation of the form:
  • and assign to z 5 the value of z

Z 1 Z 2 Z 3

Z 4 Z 5 Z 6

Z 7 Z 8 Z 9

=

= + + + =

9 1 (^1 ) ( ... )^1 9

1 i

z z z z zi

Neighborhood-oriented operations

(continued)

  • In the more general form, the operation may look like:
  • This equation is widely used in image processing
  • Proper selection of coefficients (weights) allows for operations such as - noise reduction - region thinning - edge detection

=

= + + + =

9 1

( 1 1 22 ... 99 ) i

z wz wz wz wi zi

Z 1 Z 2 Z 3

Z 4 Z 5 Z 6

Z 7 Z 8 Z 9

W 1 W 2 W 3

W 4 W 5 W 6

W 7 W 8 W 9

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-

Sample filtered image

  • The sample image was filtered using a 3x3 basic high pass filter as follows:
  • Result showing highlighted edges in the image

Sample filtered image

  • The sample image was filtered using a 3x3 basic low pass filter as follows:
  • Result showing filtered image

Basic matlab instructions (continued)

• colormap(CMAP_NAME); Use a particular

colormap to display an image

• image(A_NAME); create and display an image

from a given array of data