0% found this document useful (0 votes)
228 views22 pages

Relationship Between Pixels

This document discusses relationships between pixels in digital images. It covers topics like: 1) Different types of pixel neighborhoods like 4-neighbors and 8-neighbors. 2) Concepts of pixel adjacency, paths between pixels, connected pixel regions and region boundaries. 3) Motivations for image interpolation like increasing image size, repairing damaged areas, and digital image manipulation. 3) Examples are provided to illustrate concepts like 8-adjacency vs m-adjacency and 8-paths vs m-paths between pixels. Applications of these pixel relationships in areas like resolution enhancement, image inpainting, and image warping are briefly mentioned.

Uploaded by

Umme Habiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views22 pages

Relationship Between Pixels

This document discusses relationships between pixels in digital images. It covers topics like: 1) Different types of pixel neighborhoods like 4-neighbors and 8-neighbors. 2) Concepts of pixel adjacency, paths between pixels, connected pixel regions and region boundaries. 3) Motivations for image interpolation like increasing image size, repairing damaged areas, and digital image manipulation. 3) Examples are provided to illustrate concepts like 8-adjacency vs m-adjacency and 8-paths vs m-paths between pixels. Applications of these pixel relationships in areas like resolution enhancement, image inpainting, and image warping are briefly mentioned.

Uploaded by

Umme Habiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Relationships Between Pixels

Dr. Fahima Tahir


Today: back to images

• This photo is too small:

Might need this for forensics:

2
Zooming
• First consider a black and white image
(one intensity value per pixel)

• We want to blow it up to poster size


(say, zoom in by a factor of 16)

• First try: repeat each row 16 times,


then repeat each column 16 times

3
Zooming: First attempt

4
Image Interpolation
Interpolation — Process of using known
data to estimate unknown values
e.g., zooming, shrinking, rotating, and geometric correction

Interpolation (sometimes called


resampling) — an imaging method to increase (or
decrease) the number of pixels in a digital image.
Some digital cameras use interpolation to produce a larger image
than the sensor captured or to create digital zoom
Image interpolation
An image f(x,y) tells us the intensity values at
the integral lattice locations, i.e., when x and y
are both integers
– Image interpolation refers to the “guess” of
intensity values at missing locations, i.e., x and y
can be arbitrary
– Note that it is just a guess (Note that all sensors
have finite sampling distance)
Motivations
Why do we need image interpolation?
– We want BIG images
• When we see a video clip on a PC, we like to see it in
the full screen mode
– We want GOOD images
• If some block of an image gets damaged during the
transmission, we want to repair it
– We want COOL images
• Manipulate images digitally can render fancy artistic
effects as we often see in movies
Basic Relationships Between Pixels

• Neighborhood
• Adjacency
• Connectivity
• Paths
• Regions and boundaries
Basic Relationships Between Pixels

Neighbors of a pixel p at coordinates (x,y)


 4-neighbors of p, denoted by N4(p):
(x-1, y), (x+1, y), (x,y-1), and (x, y+1).
 4 diagonal neighbors of p, denoted by
ND(p):
(x-1, y-1), (x+1, y+1), (x+1,y-1), and (x-1,
y+1).
 8 neighbors of p, denoted N8(p)
N8(p) = N4(p) U ND(p)
Basic Relationships Between Pixels

Adjacency
Let V be the set of intensity values

 4-adjacency: Two pixels p and q with values from V are


4-adjacent if q is in the set N4(p).

 8-adjacency: Two pixels p and q with values from V are


8-adjacent if q is in the set N8(p).
Basic Relationships Between Pixels

Adjacency
Let V be the set of intensity values

 m-adjacency: Two pixels p and q with values from V


are m-adjacent if

(i) q is in the set N4(p), or

(ii) q is in the set ND(p) and the set N4(p) ∩ N4(q) has no pixels
whose values are from V.
Basic Relationships Between Pixels

Path
 A (digital) path (or curve) from pixel p with coordinates (x0, y0) to pixel q
with coordinates (xn, yn) is a sequence of distinct pixels with coordinates

(x0, y0), (x1, y1), …, (xn, yn)

Where (xi, yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n.

 Here n is the length of the path.

 If (x0, y0) = (xn, yn), the path is closed path.

 We can define 4-, 8-, and m-paths based on the type of adjacency used.
Examples: Adjacency and Path
V = {1, 2}

0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
Examples: Adjacency and Path
V = {1, 2}

0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent
Examples: Adjacency and Path
V = {1, 2}

0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent m-adjacent
Examples: Adjacency and Path
V = {1, 2}

0 1 1
1,1 1,2 1,3 0 1 1 0 1 1
0 2 0
2,1 2,2 2,3 0 2 0 0 2 0
0 0 1
3,1 3,2 3,3 0 0 1 0 0 1
8-adjacent m-adjacent

The 8-path from (1,3) to (3,3): The m-path from (1,3) to (3,3):
(i) (1,3), (1,2), (2,2), (3,3) (1,3), (1,2), (2,2), (3,3)
(ii) (1,3), (2,2), (3,3)
Basic Relationships Between Pixels

Connected in S
Let S represent a subset of pixels in an image. Two
pixels p with coordinates (x0, y0) and q with
coordinates (xn, yn) are said to be connected in S if
there exists a path

(x0, y0), (x1, y1), …, (xn, yn)

Where i,0  i  n,( xi , yi )  S


Basic Relationships Between Pixels

Let S represent a subset of pixels in an image

• For every pixel p in S, the set of pixels in S that are connected to p


is called a connected component of S.

• If S has only one connected component, then S is called


Connected Set.

• We call R a region of the image if R is a connected set

• Two regions, Ri and Rj are said to be adjacent if their union forms


a connected set.
• Regions that are not to be adjacent are said to be disjoint.
Basic Relationships Between Pixels

Boundary (or border)

 The boundary of the region R is the set of pixels in the region that
have one or more neighbors that are not in R.
 If R happens to be an entire image, then its boundary is defined
as the set of pixels in the first and last rows and columns of the
image.

Foreground and background

 An image contains K disjoint regions, Rk, k = 1, 2, …, K. Let Ru


denote the union of all the K regions, and let (Ru)c denote its
complement.
All the points in Ru is called foreground;
All the points in (Ru)c is called background.
Scenario I: Resolution Enhancement

Low-Res.

High-Res.
Scenario II: Image
Inpainting

Non-damaged Damaged
Scenario III: Image Warping

You might also like