Lecture-3
Lecture-3
Lecture-3
2
of
Some Basic Relationships between
36
Pixels
NEIGHBORS OF A PIXEL: A pixel p at
coordinates (x, y) has two horizontal and two
vertical neighbors with coordinates:
(x+1, y), (x–1, y), (x, y+1), (x+1, y–1)
This set of pixels, called the 4-neighbors of p, is
denoted as N4(p).
(x+1, y+1), (x+1, y–1), (x–1, y+1), (x–1, y–1)
This set of pixels, called the 4-diagonal neighbors of p,
is denoted as ND(p).
These neighbors, together with N4(p) and ND(p), are
called the 8-neighbors of p, denoted by N8(p).
3
of
Some Basic Relationships between
36
Pixels
ADJACENCY: Let V be the set of intensity values used to define
adjacency. In a binary image, V = {1} if we are referring to
adjacency of pixels with value 1. In a grayscale image, the idea is
the same, but set V typically contains more elements. For
example, if we are dealing with the adjacency of pixels whose
values are in the range 0 to 255, set V could be any subset of
these 256 values. We consider three types of adjacency:
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).
m-adjacency (also called mixed adjacency). Two pixels p and q with values
from V are m-adjacent if
q is in N4(p), or
q is in ND(p) and the set N4(p)∩N4(q) has no pixels whose values are form V.
4
of
Some Basic Relationships between
36
Pixels
DISTANCE MEASURES: For pixels p, q and s, with
coordinates (x, y), (u, v) and (w, z), 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, s) ≤ D(p, q) + D(q, s)
The Euclidean distance between p and q is defined as
For example:
7
of
Some Basic Relationships between
36
Pixels
ARITHMETIC OPERATIONS : Arithmetic operations between two
images f (x, y) and g(x, y) are denoted as:
To reduce the noise content, we add a set of noisy input images {gi(x, y)}. This
technique is frequently used for image enhancement.
8
of
36
Single-pixel Operations
The simplest operation we perform on a digital image is to
alter the intensity of its pixels individually using a
transformation function, T, of the form: s = T(z)
where z is the intensity of a
pixel in the original image and
s is the (mapped) intensity of
the corresponding pixel in the
processed image.
Fig. shows the transformation
used to obtain the negative
(sometimes called the complement)
of an 8-bit image.
9
of
36
Neighbourhood Operations
Let Sxy denote the set of coordinates of a
neighborhood centered on an arbitrary point (x, y)
in an image, f.
Neighborhood processing generates a
corresponding pixel at the same coordinates in an
output (processed) image g, such that the value of
that pixel is determined by a specified operation on
the neighborhood of pixels in the input image with
coordinates in the set Sxy.
10
of
36
Neighbourhood Operations
For example, suppose that the specified operation is to
compute the average value of the pixels in a rectangular
neighborhood of size m x n centered on (x, y). The
coordinates of pixels in this region are the elements of
set Sxy.
(i)
(ii)
(a) A 541 x 421 image of the letter T. (b) Image rotated -21°using nearest-neighbor interpolation for intensity assignments. (c) Image rotated -21°using bilinear interpolation. (d) Image rotated -21°using bicubic interpolation. (e)-(h) Zoomed sections (each square
is one pixel, and the numbers shown are intensity values).
20
of
36
Image Registration
One of the principal approaches for solving the problem just discussed is to
use tie points (also called control points). These are corresponding points
whose locations
are known precisely in the input and reference images.
For example, suppose that we have a set of four tie points each in an input
and a reference image. A simple model based on a bilinear approximation is
given by
x = c1 v + c2 w + c3 vw + c4 (iii)
and
y = c5 v + c6 w + c7 vw + c8 (iv)
During the estimation phase, (v , w) and (x , y) are the coordinates of tie points in the
input and reference images, respectively. If we have four pairs of corresponding tie
points in both images, we can write eight equations using Eqs. (iii) and (iv) and use
them to solve for the eight unknown coefficients, c1 to c8.
21
of
36
Image Registration
(a) A digital image. (b) Rotated
image (note the counterclockwise
direction for a positive angle of rotation).
(c) Rotated image cropped to fit the
same area as the original image.
(d) Image enlarged to
accommodate the entire rotated image.
22
of
36
Image Registration
Image registration.
(a) Reference image. (b) Input (geometrically
distorted image). Corresponding tie points are
shown as small white squares near the corners.
(c) Registered (output) image (note the errors in the
border).
(d) Difference between (a) and (c), showing more
registration errors.
23
of
36
Vector & Matrix Operations
Multispectral image processing is a typical area in which
vector and matrix operations are used routinely. For
example each pixel of an RGB image has three
components, which can be organized in the form of a
column vector
(vi)
where nk is the number of times that intensity zk occurs in the image and MN is
the total number of pixels. Clearly