+ All Categories
Home > Documents > Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic...

Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic...

Date post: 16-Oct-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
23
Basic Concepts in Digital Image Processing
Transcript
Page 1: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Basic Concepts in Digital Image Processing

Page 2: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Announcement

Homework #1 was posted in dropbox and on class website.

Due time: Wednesday, Jan 31 , before class starts.

Page 3: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Today’s Agenda

• Basic Relationships between Pixels

Page 4: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Basic Set and Logical Operations

Page 5: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Set Operations Based on Coordinates

A region in an image is represented by a set of coordinates within the region

Page 6: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Some Basic Relationships between Pixels

Neighbors of a pixel (x-1,y)

(x,y-1) (x,y) (x,y+1)

(x+1,y)

(x-1,y-1) (x-1,y+1)

(x,y)

(x-1,y+1) (x+1,y+1)

(x-1,y-1) (x-1,y)

(x-1,y+1)

(x,y-1)

(x,y) (x,y+1)

(x-1,y+1) (x+1,y) (x+1,y+1)

Page 7: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Adjacency

Adjacency is the relationship between two pixels p and q

V is a set of intensity values used to define adjacency

• Binary image: V={1} or V={0}

• Gray level image:

Three types of adjacency: 4-adjacency 8-adjacency m-adjacency

and

p

Intensity constraints

X

Page 8: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Connectivity

• Path from p to q: a sequence of distinct and adjacent pixels with coordinates

Starting point p ending point q

• Closed path: if the starting point is the same as the ending point • p and q are connected: if there is a path from p to q in S • Connected component: all the pixels in S connected to p • Connected set: S has only one connected component

adjacent

Are they connected sets?

Page 9: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Regions

• R is a region if R is a connected set

• Ri and Rj are adjacent if is a connected set

Page 10: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Boundaries

• Inner boundary (boundary) -- the set of pixels each of which has at least one background neighbor

• Outer boundary – the boundary pixels in the background

Page 11: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Distance Measures

For pixels p, q, and z, with coordinates (x,y), (s,t) and (v,w), D is a distance function or metric if

),(),(),()(),,(),()(

0),(0),()(

zqDqpDzpDcandpqDqpDb

qpiffqpDqpDa

+≤=

==≥

Page 12: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Distance Measures

Euclidean distance

City-block (D4) distance

Chessboard (D8) distance (Chebyshev distance)

22 )()(),( tysxqpDe −+−=||||),(4 tysxqpD −+−=

|)||,max(|),(8 tysxqpD −−=

Page 13: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Distance: Sample Problem

D4 distance

D8 distance

Euclidean distance

p

q

Distance vs length of a path?

6

5

𝟏 + 𝟓𝟐

Page 14: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Mathematic Tools

Array versus Matrix operations

Array Multiplications

Matrix Multiplications

𝒂𝟏𝟏 𝒂𝟏𝟐𝒂𝟐𝟏 𝒂𝟐𝟐 ∙ 𝒃𝟏𝟏 𝒃𝟏𝟐

𝒃𝟐𝟏 𝒃𝟐𝟐= 𝒂𝟏𝟏𝒃𝟏𝟏 𝒂𝟏𝟐𝒃𝟏𝟐

𝒂𝟐𝟏𝒃𝟐𝟏 𝒂𝟐𝟐𝒃𝟐𝟐

𝒂𝟏𝟏 𝒂𝟏𝟐𝒂𝟐𝟏 𝒂𝟐𝟐 × 𝒃𝟏𝟏 𝒃𝟏𝟐

𝒃𝟐𝟏 𝒃𝟐𝟐= 𝒂𝟏𝟏𝒃𝟏𝟏 + 𝒂𝟏𝟐𝒃𝟐𝟏 𝒂𝟏𝟏𝒃𝟏𝟐 + 𝒂𝟏𝟐𝒃𝟐𝟐

𝒂𝟐𝟏𝒃𝟏𝟏 + 𝒂𝟐𝟐𝒃𝟐𝟏 𝒂𝟐𝟏𝒃𝟏𝟐 + 𝒂𝟐𝟐𝒃𝟐𝟐

Page 15: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Mathematic Tools

Linear/nonlinear operations

Arithmetic Operations – single pixel operations • Image averaging, image subtraction, image multiplication

Set and logic operations

Spatial operations • Single pixel operations and neighborhood operations

Image transformation

Probabilistic methods

Linearity:

Page 16: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Image Averaging – Noise Reduction

Assumption: the noise is uncorrelated in image and has zero mean

Page 17: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox
Page 18: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Image Subtraction – Enhance Difference

Page 19: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Image Subtraction

The images used in averaging & subtraction must be registered!

Page 20: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Image Multiplication (Division)

g(x,y)=f(x,y)/h(x,y)

g(x,y)=f(x,y)h(x,y)

Page 21: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Notes on Arithmetic Operations

)]max(/[)min(

mms

m

ffKffff

=−=

Output images should be normalized to the range of [0,255]

The images used in averaging & subtraction must be registered!

Page 22: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Set Operations Based on Intensities

Complement – negative image

Thresholding 𝑨 ∪ 𝑩 = 𝒙,𝒚, max 𝒛𝒂, 𝒛𝒃 𝒙,𝒚, 𝒛𝒂 ∈ 𝑨, 𝒙,𝒚, 𝒛𝒃 ∈ 𝑩

𝑨𝒄 = 𝒙,𝒚,𝑲− 𝒛 𝒙,𝒚, 𝒛 ∈ 𝑨

Page 23: Basic Concepts in Digital Image Processingcse.sc.edu/~tongy/csce763/lectures/lect3.pdf · Basic Concepts in Digital Image Processing . Announcement Homework #1 was posted in dropbox

Logic Operations for Binary Image

Foreground/background • Binary image: 0/1 • Fuzzy set: [0,1]


Recommended