Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Lecture 4 Ang lb 2021

Extraction of connected
components
Binary image filters
Gray scale image
processing

Ks
Neighbors of
t.LI
ni
4

Path from n.y to sit is a sequence


pair is
1 of pixels where each succession
M
4 adjacent
P nay no yo Geigy Cnn Yn sit

ni Yi Cair yet are 4 adjacent for


it 011,2 h l

Ney Sct are said to be connected

if such that
7 a path of pixels
all these are marked as f

of the same polarity

I
A connected component is a set of pixels
Such that any pixel in this set is connected

to any other pixel in the same set

Extraction connected components


of
Trashed
Define region index array R as 1
ZD

12 Nij t
0 o ti D
Set K I Region no counter

Scan every pixel from left to right a

top to bottom

If Icing 1 0 do nothing

Ili j I III I Li I
j o
j o
i

Rliij k
7
k KH

Ili j I Ici ly 1
1 I liej 17 0

M7 Nij Rli Ij
Ili 1 1 Ili I j o Ili j 17 1

Rli 51 Rli j
4,7
i
Ili I I Ili l
j I III j il I

Rliij Rli i
j
If Rfi t
j Rli.j i

then Rli RL i j e are


lij
equivalent regions
Record that Rti Ij Rli D labels

areequivalent
BivdryMorpho1og change in shapes

A window is a set of neighbors of


a pixel according to a
geometric
rule
7 D windows Row 3
TI
ROW 5
043 THE

windows are mostly non causal

t7 i
Windownotation
Window B Bi But where

Bi pi Ei s t B contains logo

D Row Ziti o P Lo Pti Loco


claim
l Il t L 1,01 C 1,1
SQUARE 9
1 o.o oil

h l lio i l

W f Gien window 13

Image I

B III j Ilitts ite pig EB

Binaryfilt
Let 4 be a binary operation on

the windowed set

The filtered image is obtained as

Jli
GIB Ici D oeiem I

Ij EN I
Edge of image processing

Repeat as
many boundary
Replication
pixels as required for the window

AE
IiDiLationFilkriJ
DILATE I B is defined as

Jliij OR B Icij
Mt Nzt 1 Ten
OR se kn
max ni inn
go Erosion J ERODE I B

Jli j AND B III j

kn n Nz Uh
AND ai
min ne Rn

Dilation Erosion are dual operators

I Jez
Nitz
Majority filter J MAJORITY I B

Jli MAJ B Icij

Helps semoe noise

Boundary Detection XOR I F RODE IB

Gray Seale
comments on Histograms

Recall Ack n Intensity k occurs

n times

No spatial information only freq of


intensities
still
It contains some information
eg overexposed
underexposed

de avg luminance of MxN image


K I

iiiI
mtn.EE mtnEok

You might also like