SlideShare a Scribd company logo
1 of 33
CHAPTER2
PIXEL RELATION
Dr. Varun Kumar Ojha
and
Prof. (Dr.) Paramartha Dutta
Visva Bharati University
Santiniketan, West Bengal, India
Pixel Relationship
 Pixel
 Pixel Neighbourhood and Type of Neighbourhood
 Pixel Connectivity
 Connected Component
 Different Distance Measure Techniques
 Arithmetic/Logical Operator
 Neighborhood Operation
Back to Course Content Page
Click Here
What is Pixel?
 After sampling we get no. of analog samples
and each sample have intensity value which
can be Quantized as final step of digitization
 Quantized to discrete label
 8bit for black and white image
 24bit for colour image
 A matrix element is called pixel.
 For 8 bit a pixel can have value between 0 to
256
Back to the chapter content
Click Here
Neighbourhood
 A pixel p at location (x,y) has 2 horizontal and
2 vertical neighbour. In total a pixel p has four
neighbour.
(x-1, y)
(x, y-1) P (x, y) (x, y+1)
(x+1, y)
 This set of four pixel is called 4 neighbour of p = N4(p)
 Each of this neighbour is at a unit distance from p
 If p is a boundary pixel then it will have less neighbours.
Neighbourhood Cont..
 Boundary Pixel
p Boundary pixel has
only two neighbour
 A pixel p has four diagonal neighbour ND(p)
(x-1, y-1) (x-1, y+1)
P (x, y)
(x+1, y-1) (x+1, y+1)
 The point of N4(p) and ND(p) together are called 8
neighbourof p
N8(p) = ND(p) U ND(p)
Back to the chapter content
Click Here
Pixel Connectivity
 Pixel connectivity is very useful for
establishing object boundary and defining
image component/ region etc.
If f(x,y) > Th (threshold)
(x,y) є object
else
(x,y) є background
Here pixel connected to 1 belongs to one object
Assign 1
Assign 0
Pixel Connectivity Cont..
 Two pixel are said to be connected if they are
adjacent in same sense
 They are neighbour (N4 ND or N8 ) and
 Their intensity value (gray level) are similar
 Example: For a binary image B two points p and q will
be connected if q є N(p) are p є N(q) and B(p) = B(q)
P
q
p
q p q
Here p and q are
connected iff their
intensity value are
same
Define Connectivity in Gray
Level
 Let v be the set of gray level used to define
connectivity for two points (p,q) є v
 Three type of connectivity are defined
 4 connectivity → p,q є v & p є N4(q)
 8 connectivity → p,q є v & p є N8(q)
 M connectivity (Mixed Connectivity) p,q є v are m
connected if
 q є N4(p) or

q є ND(p) and N4(p) ∩ ND(p) = ᶲ
Mixed Connectivity
 Mixed connectivity is modification of 8
connectivity
 Only inclusion of concept is eliminating the
multiple path often arises with 8 connectivity
 Example V = {1}
0 1 1
0 1 0
0 0 0
0 1 1
0 1 0
0 0 1
0 1 1
0 1 0
0 0 1
4 connected 8 connected M connected
Multiple path
N4(p) ∩ ND(p) = ᶲ
so ND(p) is not
taken
Back to the chapter content
Click Here
Connected Component
 Adjacency : Two pixel p & q are adjacent if they are
connected
 4 adjacency
 8 adjacency
 M adjacency
 Depending on type of connectivity used two image
subset si and sj are adjacent If p є si and q є sj such that
p and q are adjacent
p
q
si
sj
Connected Component
 Path : A path from p(x,y) to q(s,t) is a
sequence of distinct pixel
(x0,y0), (x1,y1), …… , (xn,yn)
Where (x0,y0) = (x,y) and (xn,yn) = (s, t)
(xi,yi) is adacent to (xi-1 ,yi-1) for 1 ≤ I ≤ n
here n is the length of path
Connected Component
 Let S I and p,q є S
 Then p is connected to q in S if there is a path
from p to q consisting entirely of pixels in S
 For any p є S, the set of pixel in S that are
connected to p is call a connected component
of S
p
q
sr Point p is connected to point
q and r but not connected
with point k
k
Connected Component
Labeling
 Ability to assign different label to the various
disjoint connected components of an image
 Connected component labeling is fundamental
step in automated image analysis
Two disjoint connected component connected component labeling
Algorithm (Group identification)
 Scan image from Left to Right and Top to Bottom
 Assume 4 connectivity
 P be a pixel at any step in the scanning process
 Before p point r and t are scanned i.e before p its
neighbours are scanned
 The purpose of this algorithm is to assign identification
no.
r
t p
Algorithm Steps
 I(p) : pixel at position p
 L(p): label assigned to pixel location p
 If I(p) = 0, move to next scanning position
 If I(p) = 1, and I(r) = I(t) = 0
 Then assign a new label to position p
 If I(p) =1 and only one of two neighbour is 1
 Then assign its label to p
 If I(p) =1 and both r and t are 1
 Then
 If L(r) = L(t) then L(p) = L(r)
 If L(r) ≠ L(t) then assign one of the label to p
Algorithm Steps Cont..
 At the end of scan all pixel with value 1 are
labeled
 Some label are equivalent
 Equivalent label make a pais
 During second pass process equivalent pairs
to form equivalent classes
 Assign different label to each class
 In the second pass through the image replace
each label by label assign to its equivalent
class
Algorithm Demo
1 2
1 2 3 3
1 1 1 1 4 4 4 4
1 1 4 4
5 1 4 4 4
5
Assign 1
because its left
neighbour is 1
Assign new
label (say 2) as
I(r) = I(t) = 0
2
1 1
1
5 1
3
4 4
(1,2) , (4,3) and (5,1) are
equivalent pair
First Pass
Algorithm Demo
1 1
1 1 3 3
1 1 1 1 3 3 3 3
1 1 3 3
1 1 3 3 3
1
Second Pass : In the second pass through the image replace each label by
label assign to its equivalent class
Here two separate region/ group are identified YELLOE (1) region and
RED (3) region
Back to the chapter content
Click Here
Distance Measure
 Take three pixel
 p ≈ (x,y) q ≈ (s,t) z ≈ (u,v)
 D is distance function if
 D(p,q) ≥ 0 ; D(p,q) = 0 iff p = q (p & q is same
pixel)
 D(p,q) = D(q,p) (distance from p to q & q to p is
same)
 D(p, z) ≤ D(p,q) + D(q,z)
Distance Measure Technique
 Euclidean Distance
 City BlockDistance (Manhattan Distance)
 Chess Board Distance
 Euclidean distance between two point p(x,y) &
q(s,t) is defined as
D(p,q) = [|x-s|2
+|y-t|2
]1/2
p(x,y)
q(s,t)
Distance Measure Technique
 City BlockDistance
 D4 distance or City Block (Manhattan) distance is defined as
D4 (p,q) = |x-s| + |y-t|
 Point having city block distance from p less than or equal to r
from diamond center
3
3 2 3
3 2 1 2 3
3 2 1 p 1 2 3
3 2 1 2 3
3 2 3
3
Distance Measure Technique
 Chess Board Distance
 D8 distance or Chess Board Distance is defined as
D8 (p,q) = max( |x-s|, |y-t|)
 Point with D8 = 1are 8 neighbour of p
3 3 3 3 3 3 3
3 2 2 2 2 2 3
3 2 1 1 1 2 3
3 2 1 P 1 2 3
3 2 1 1 1 2 3
3 2 2 2 2 2 3
3 3 3 3 3 3 3
Back to the chapter content
Click Here
Arithmetic/Logical Operator
 If pixel p є I1 and q є I2 where I1 and I2 are two different images
then
 Arithmetic Operators are
 p + q
 p – q
 p * q
 p % q
 Logical Operator
 p.q (Logical AND)
 p+q (Logical OR)
 p’ (NOT)
 Logical operators are only applied to binary image
Logical Operator
Image A
Image B
NOT (A ) (A ) AND (B)
(A ) XOR (B)
Back to the chapter content
Click Here
Neighbourhood Operation
 The value assigned to a pixel is a function of
its gray label and the gray label of its
neighbours
Z1 Z2 Z3
Z4 Z5 Z6
Z7 Z8 Z9
 Averaging
Z = 1/9 (Z1+ Z2 + …….. + Z9 )
Neighbourhood Operation
Z1 Z2 Z3
Z4 Z5 Z6
Z7 Z8 Z9
 More general form
W1 W2 W3
W4 W5 W6
W7 W8 W9
Z = W1 Z1+W2 Z2 + …….. +W9 Z9
= ∑ Wi Zi for i = 1 to 9
It is useful for
Noise filtering
Edge Detection
Various important operation can be implemented by
proper selection of coefficient Wi
Back to the chapter content
Click Here

More Related Content

What's hot

Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
Ashish Kumar
 

What's hot (20)

Edge detection
Edge detectionEdge detection
Edge detection
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
03 image transform
03 image transform03 image transform
03 image transform
 
Walsh transform
Walsh transformWalsh transform
Walsh transform
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier Transformation
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 

Similar to Chapter 2 Image Processing: Pixel Relation

Iaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detectionIaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd Iaetsd
 

Similar to Chapter 2 Image Processing: Pixel Relation (20)

DIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptDIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.ppt
 
3.ppt
3.ppt3.ppt
3.ppt
 
Image_Processing-ch2surface r_part_2.ppt
Image_Processing-ch2surface r_part_2.pptImage_Processing-ch2surface r_part_2.ppt
Image_Processing-ch2surface r_part_2.ppt
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
Chap05alg
Chap05algChap05alg
Chap05alg
 
Chap05alg
Chap05algChap05alg
Chap05alg
 
Lecture 5 Relationship between pixel-2
Lecture 5 Relationship between pixel-2Lecture 5 Relationship between pixel-2
Lecture 5 Relationship between pixel-2
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
 
Pixel relationships
Pixel relationshipsPixel relationships
Pixel relationships
 
Lec-3 DIP.pptx
Lec-3 DIP.pptxLec-3 DIP.pptx
Lec-3 DIP.pptx
 
digTop.ppt
digTop.pptdigTop.ppt
digTop.ppt
 
Q-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeQ-Metrics in Theory and Practice
Q-Metrics in Theory and Practice
 
Q-Metrics in Theory And Practice
Q-Metrics in Theory And PracticeQ-Metrics in Theory And Practice
Q-Metrics in Theory And Practice
 
The Digital Image Processing Q@A
The Digital Image Processing Q@AThe Digital Image Processing Q@A
The Digital Image Processing Q@A
 
algorithm Unit 3
algorithm Unit 3algorithm Unit 3
algorithm Unit 3
 
pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
 
Perimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital ImagesPerimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital Images
 
Chap12alg
Chap12algChap12alg
Chap12alg
 
Chap12alg
Chap12algChap12alg
Chap12alg
 
Iaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detectionIaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detection
 

More from Varun Ojha

More from Varun Ojha (11)

Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image Transformation
 
Chapter 3 Image Processing: Basic Transformation
Chapter 3 Image Processing:  Basic TransformationChapter 3 Image Processing:  Basic Transformation
Chapter 3 Image Processing: Basic Transformation
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Neural Tree for Estimating the Uniaxial Compressive Strength of Rock Materials
Neural Tree for Estimating the Uniaxial Compressive Strength of Rock MaterialsNeural Tree for Estimating the Uniaxial Compressive Strength of Rock Materials
Neural Tree for Estimating the Uniaxial Compressive Strength of Rock Materials
 
Metaheuristic Tuning of Type-II Fuzzy Inference System for Data Mining
Metaheuristic Tuning of Type-II Fuzzy Inference System for Data MiningMetaheuristic Tuning of Type-II Fuzzy Inference System for Data Mining
Metaheuristic Tuning of Type-II Fuzzy Inference System for Data Mining
 
A Framework of Secured and Bio-Inspired Image Steganography Using Chaotic Enc...
A Framework of Secured and Bio-Inspired Image Steganography Using Chaotic Enc...A Framework of Secured and Bio-Inspired Image Steganography Using Chaotic Enc...
A Framework of Secured and Bio-Inspired Image Steganography Using Chaotic Enc...
 
Dimensionality Reduction and Prediction of the Protein Macromolecule Dissolut...
Dimensionality Reduction and Prediction of the Protein Macromolecule Dissolut...Dimensionality Reduction and Prediction of the Protein Macromolecule Dissolut...
Dimensionality Reduction and Prediction of the Protein Macromolecule Dissolut...
 
Ensemble of Heterogeneous Flexible Neural Tree for the approximation and feat...
Ensemble of Heterogeneous Flexible Neural Tree for the approximation and feat...Ensemble of Heterogeneous Flexible Neural Tree for the approximation and feat...
Ensemble of Heterogeneous Flexible Neural Tree for the approximation and feat...
 
Simultaneous optimization of neural network weights and active nodes using me...
Simultaneous optimization of neural network weights and active nodes using me...Simultaneous optimization of neural network weights and active nodes using me...
Simultaneous optimization of neural network weights and active nodes using me...
 
Design and analysis of algorithm
Design and analysis of algorithmDesign and analysis of algorithm
Design and analysis of algorithm
 

Recently uploaded

Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
karishmasinghjnh
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
amitlee9823
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 

Recently uploaded (20)

Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 

Chapter 2 Image Processing: Pixel Relation

  • 1. CHAPTER2 PIXEL RELATION Dr. Varun Kumar Ojha and Prof. (Dr.) Paramartha Dutta Visva Bharati University Santiniketan, West Bengal, India
  • 2. Pixel Relationship  Pixel  Pixel Neighbourhood and Type of Neighbourhood  Pixel Connectivity  Connected Component  Different Distance Measure Techniques  Arithmetic/Logical Operator  Neighborhood Operation Back to Course Content Page Click Here
  • 3. What is Pixel?  After sampling we get no. of analog samples and each sample have intensity value which can be Quantized as final step of digitization  Quantized to discrete label  8bit for black and white image  24bit for colour image  A matrix element is called pixel.  For 8 bit a pixel can have value between 0 to 256
  • 4. Back to the chapter content Click Here
  • 5. Neighbourhood  A pixel p at location (x,y) has 2 horizontal and 2 vertical neighbour. In total a pixel p has four neighbour. (x-1, y) (x, y-1) P (x, y) (x, y+1) (x+1, y)  This set of four pixel is called 4 neighbour of p = N4(p)  Each of this neighbour is at a unit distance from p  If p is a boundary pixel then it will have less neighbours.
  • 6. Neighbourhood Cont..  Boundary Pixel p Boundary pixel has only two neighbour  A pixel p has four diagonal neighbour ND(p) (x-1, y-1) (x-1, y+1) P (x, y) (x+1, y-1) (x+1, y+1)  The point of N4(p) and ND(p) together are called 8 neighbourof p N8(p) = ND(p) U ND(p)
  • 7. Back to the chapter content Click Here
  • 8. Pixel Connectivity  Pixel connectivity is very useful for establishing object boundary and defining image component/ region etc. If f(x,y) > Th (threshold) (x,y) є object else (x,y) є background Here pixel connected to 1 belongs to one object Assign 1 Assign 0
  • 9. Pixel Connectivity Cont..  Two pixel are said to be connected if they are adjacent in same sense  They are neighbour (N4 ND or N8 ) and  Their intensity value (gray level) are similar  Example: For a binary image B two points p and q will be connected if q є N(p) are p є N(q) and B(p) = B(q) P q p q p q Here p and q are connected iff their intensity value are same
  • 10. Define Connectivity in Gray Level  Let v be the set of gray level used to define connectivity for two points (p,q) є v  Three type of connectivity are defined  4 connectivity → p,q є v & p є N4(q)  8 connectivity → p,q є v & p є N8(q)  M connectivity (Mixed Connectivity) p,q є v are m connected if  q є N4(p) or  q є ND(p) and N4(p) ∩ ND(p) = ᶲ
  • 11. Mixed Connectivity  Mixed connectivity is modification of 8 connectivity  Only inclusion of concept is eliminating the multiple path often arises with 8 connectivity  Example V = {1} 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 4 connected 8 connected M connected Multiple path N4(p) ∩ ND(p) = ᶲ so ND(p) is not taken
  • 12. Back to the chapter content Click Here
  • 13. Connected Component  Adjacency : Two pixel p & q are adjacent if they are connected  4 adjacency  8 adjacency  M adjacency  Depending on type of connectivity used two image subset si and sj are adjacent If p є si and q є sj such that p and q are adjacent p q si sj
  • 14. Connected Component  Path : A path from p(x,y) to q(s,t) is a sequence of distinct pixel (x0,y0), (x1,y1), …… , (xn,yn) Where (x0,y0) = (x,y) and (xn,yn) = (s, t) (xi,yi) is adacent to (xi-1 ,yi-1) for 1 ≤ I ≤ n here n is the length of path
  • 15. Connected Component  Let S I and p,q є S  Then p is connected to q in S if there is a path from p to q consisting entirely of pixels in S  For any p є S, the set of pixel in S that are connected to p is call a connected component of S p q sr Point p is connected to point q and r but not connected with point k k
  • 16. Connected Component Labeling  Ability to assign different label to the various disjoint connected components of an image  Connected component labeling is fundamental step in automated image analysis Two disjoint connected component connected component labeling
  • 17. Algorithm (Group identification)  Scan image from Left to Right and Top to Bottom  Assume 4 connectivity  P be a pixel at any step in the scanning process  Before p point r and t are scanned i.e before p its neighbours are scanned  The purpose of this algorithm is to assign identification no. r t p
  • 18. Algorithm Steps  I(p) : pixel at position p  L(p): label assigned to pixel location p  If I(p) = 0, move to next scanning position  If I(p) = 1, and I(r) = I(t) = 0  Then assign a new label to position p  If I(p) =1 and only one of two neighbour is 1  Then assign its label to p  If I(p) =1 and both r and t are 1  Then  If L(r) = L(t) then L(p) = L(r)  If L(r) ≠ L(t) then assign one of the label to p
  • 19. Algorithm Steps Cont..  At the end of scan all pixel with value 1 are labeled  Some label are equivalent  Equivalent label make a pais  During second pass process equivalent pairs to form equivalent classes  Assign different label to each class  In the second pass through the image replace each label by label assign to its equivalent class
  • 20. Algorithm Demo 1 2 1 2 3 3 1 1 1 1 4 4 4 4 1 1 4 4 5 1 4 4 4 5 Assign 1 because its left neighbour is 1 Assign new label (say 2) as I(r) = I(t) = 0 2 1 1 1 5 1 3 4 4 (1,2) , (4,3) and (5,1) are equivalent pair First Pass
  • 21. Algorithm Demo 1 1 1 1 3 3 1 1 1 1 3 3 3 3 1 1 3 3 1 1 3 3 3 1 Second Pass : In the second pass through the image replace each label by label assign to its equivalent class Here two separate region/ group are identified YELLOE (1) region and RED (3) region
  • 22. Back to the chapter content Click Here
  • 23. Distance Measure  Take three pixel  p ≈ (x,y) q ≈ (s,t) z ≈ (u,v)  D is distance function if  D(p,q) ≥ 0 ; D(p,q) = 0 iff p = q (p & q is same pixel)  D(p,q) = D(q,p) (distance from p to q & q to p is same)  D(p, z) ≤ D(p,q) + D(q,z)
  • 24. Distance Measure Technique  Euclidean Distance  City BlockDistance (Manhattan Distance)  Chess Board Distance  Euclidean distance between two point p(x,y) & q(s,t) is defined as D(p,q) = [|x-s|2 +|y-t|2 ]1/2 p(x,y) q(s,t)
  • 25. Distance Measure Technique  City BlockDistance  D4 distance or City Block (Manhattan) distance is defined as D4 (p,q) = |x-s| + |y-t|  Point having city block distance from p less than or equal to r from diamond center 3 3 2 3 3 2 1 2 3 3 2 1 p 1 2 3 3 2 1 2 3 3 2 3 3
  • 26. Distance Measure Technique  Chess Board Distance  D8 distance or Chess Board Distance is defined as D8 (p,q) = max( |x-s|, |y-t|)  Point with D8 = 1are 8 neighbour of p 3 3 3 3 3 3 3 3 2 2 2 2 2 3 3 2 1 1 1 2 3 3 2 1 P 1 2 3 3 2 1 1 1 2 3 3 2 2 2 2 2 3 3 3 3 3 3 3 3
  • 27. Back to the chapter content Click Here
  • 28. Arithmetic/Logical Operator  If pixel p є I1 and q є I2 where I1 and I2 are two different images then  Arithmetic Operators are  p + q  p – q  p * q  p % q  Logical Operator  p.q (Logical AND)  p+q (Logical OR)  p’ (NOT)  Logical operators are only applied to binary image
  • 29. Logical Operator Image A Image B NOT (A ) (A ) AND (B) (A ) XOR (B)
  • 30. Back to the chapter content Click Here
  • 31. Neighbourhood Operation  The value assigned to a pixel is a function of its gray label and the gray label of its neighbours Z1 Z2 Z3 Z4 Z5 Z6 Z7 Z8 Z9  Averaging Z = 1/9 (Z1+ Z2 + …….. + Z9 )
  • 32. Neighbourhood Operation Z1 Z2 Z3 Z4 Z5 Z6 Z7 Z8 Z9  More general form W1 W2 W3 W4 W5 W6 W7 W8 W9 Z = W1 Z1+W2 Z2 + …….. +W9 Z9 = ∑ Wi Zi for i = 1 to 9 It is useful for Noise filtering Edge Detection Various important operation can be implemented by proper selection of coefficient Wi
  • 33. Back to the chapter content Click Here