A Simple Image Formation Model

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

1.

A Simple Image Formation Model


f ( x , y ) must be nonzero and finite; that is,

The function f ( x , y ) may be characterized by two components:


(1) the amount of source illumination‫ إضاءة‬incident on the scene‫ مشهد‬being
viewed
(2) the amount of illumination reflected by the objects in the scene.
Illumination componentsi( x , y ) and reflectance componentsr ( x , y) the two
functions combine as a product to form f ( x , y ):

Equation (4) start from 0 (total absorption ‫ ) امتصاص‬to1 (total reflectance).

2. Representing Digital Images


The result of sampling and quantization is a matrix of real numbers. We
will use two principal ways to represent digital images.

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.

3. Spatial and Gray-Level Resolution


-Sampling is the principal factor determining the spatial resolution of an
image.
-Spatial resolution is the smallest discernible ‫ يمكن تمييز‬detail in an image
‫ التفاصيل الدقيقه في الصورة‬.
-Gray-level resolution is the smallest discernible change in gray level,

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.

4.1.1 Nearest neighbor interpolation

Is performed by repeating the pixel values, thus creating checkerboard


‫ الشطرنج‬effect. Pixel replicate is used to increase the size of an image an
integer number of times.

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.

5. Some Basic Relationships between Pixels

5.1 Neighbors of a Pixel

1. If an image f (x , y ) particular pixel p and q, pixel p at coordinates (x, y) has


four horizontal and vertical neighbors whose coordinates are given by

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.

5.2 Adjacency, Connectivity, Regions, and Boundaries

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.

We consider three types of adjacency:

(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

N4 (P) ∩N4 (q) are from V.

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:

1. The Euclidean distance between p and q is defined as

2. City-block distance between p and q is defined as

19
3. Chessboard distance is defined as:

20

You might also like