A Simple Image Formation Model
A Simple Image Formation Model
A Simple Image Formation Model
Assume that an image f(x, y) is sampled so that the resulting digital image
has M rows and N columns. Thus, the values of the
10
coordinates at the origin are( x , y ) =(0,0) ,the first row of the image is
represented as( x , y ) =(0,1) and the second ( x , y ) =(0,2)Figure 2.1 shows the
coordinate convention used throughout this lecture.
The complete M*N digital image in the following compact matrix form:
The right side of this equation is by definition a digital image. Each element
of this matrix array is called an image element, picture element, pixel, or pel.
11
measuring discernible changes in gray level is a highly subjective process.
We have considerable discretion regarding the number of samples used
to generate a digital image, but this is not true for the number of
Gray levels.
The most common number is 8 bits being used in some
Applications where enhancement of specific gray-level ranges is
necessary.
Figure 2.2 shows an image of size 1024*1024pixels whose gray levels
are represented by 8 bits.
Figure 2.3 shows the results of subsampling the 1024*1024 image.
The subsampling was accomplished by subsampling the 1024*1024 image.
12
4. Zooming and Shrinking Digital Images.
4.1 Zooming
Zooming requires two steps:
1. Creation of new pixel locations .جديدة بكسل مواقع إنشاء
13
2. Assignment of gray levels to those new locations Uتعيين مستويات الرمادي
لتلك المواقع الجديدة.
There are many methods of gray level assignment, for example nearest
neighbor interpolation and bilinear interpolation.
14
4.1.2 Bilinear interpolation
It is performed by using bilinear interpolation between adjacent pixels, thus
creating a blurred image. This can be done by finding the average gray
values between two pixels and use that as pixel value between those two,
starting also with rows and use the expanded result to enlarge the column.
15
When the image size is M*N, the bilinear enlarge image result will be
2 M −1× 2 N −1, in our example the image size is3 ×3 will be¿
4.2 Shrinking
Is under sampling performed by detection of row and column.
16
Figure 2.5(a) 1024*1024, 8-bit image. (b) 512*512 image resampled into
1024*1024 pixels by row and column duplication. (c-f) 256*256, 128*128,
64*64, and 32*32 images resampled into1024*1024 pixels.
This set of pixels, called the 4-neighborsof p, is denoted by N4 (P) each pixel
is a unit distance from (x, y)
17
2. The four diagonal neighbors of p have coordinates and are denoted by
ND (P).
3. These points, together with the 4-neighbors, are called the 8-neighbors of
p, denoted by N8(P) As before, some of the points in ND(P) and N8(P) fall
outside the image if (x, y)is on the border of the image.
In a binary image with values 0 and 1,two pixels may be 4-neighbors, but
they are said to be connected only if they have the same value.
(a) 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is
in the set N4 (P)
(b) 8-adjacency: Two pixels p and q with values from V are 8-adjacent if q is
in the set N8 (P)
(c) m-adjacency (mixed adjacency): Two pixels p and q with values from V
are m-adjacent if
(i) q is in N4 (P) , or
(ii) q is in ND(P) and the set has no pixels whose values
18
5.3 Distance Measures
For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), respectively,
D is a distance function or metric if:
19
3. Chessboard distance is defined as:
20