# Introduction to Image Digitization

We know that images are two dimensional function of the form \( f(x,y) \). The value or amplitude of \(f\) at a spatial coordinates \( (x,y) \) is a positive scalar quantity whose physical meaning is determined by the source of image. When an image is generated from a physical process, its intensity value are proportional to energy radiated by a physical source. As a consequence, \( f(x,y) \) must be nonzero and finite, i.e.

$$ 0 < f(x,y) < \infty $$

The function \( f(x,y) \) characterize by two components:

**Illumination:**The amount of source illumination incident on the scene being viewed, denoted by, \( i(x,y) \).**Reflectance:**The amount of illumination reflected by the object in the scene, denoted by, \( r(x,y) \).

The two functions are combined as a product to form denoted by, \( f(x,y) \):

$$ f(x,y) = i(x,y) * r(x,y) $$

where

$$ 0 < i(x,y) < \infty \qquad and \qquad 0 < r(x,y) < 1 $$

The nature of \( i(x,y) \) is determined by the illumination source, and \( r(x,y) \) is determined by the characteristics of the imaged objects.

Let the intensity (gray level) of a monochrome image at any coordinates \( (x_0, y_0) \) be denoted by \( l = f(x_0,y_0) \). From the above it is evident that

$$ L_{min} \le l \le L_{max} $$

In theory, the only requirement on \( L_{min} \) is that it be positive, and on \( L_{max}\) that it be finite. In practice, \( L_{min} = i_{min} * r_{min} \) and \( L_{max} = i_{max} * r_{max} \). **The interval \( [ L_{min}, L_{max} ] \) is called the gray (or intensity) scale. Common practice is to shift the interval \( [0, L – 1] \), where \( l = 0 \) is considered black and \( l = L – 1 \) is considered white on the gray scale. All intermediate values are shades of gray varying from black to white.**

**Image Digitization**

Digitization is a process to convert the continuous sense data into digital form. This involves two processes: **Sampling** and **Quantization**. An image may be continuous with respect to the \(x\) and \(y\) coordinates, and also in amplitude. To convert it into digital form, we have to sample the function in both coordinates and in amplitude. **Digitizing the coordinate value is called sampling. Digitizing the amplitude value is called quantization.**

The one-dimensional function shown on top right of the above figure is a plot of amplitude (intensity level) values of the continuous image along the line segment AB in top left figure. The random variations are due to image noise. To sample this function we take equally spaced sample along line AB, as shown in bottom left figure. The spatial location of each sample is indicated by a vertical tick mark in the bottom part of the figure. The sample are shown as small white squares superimposed on the function. The set of these discrete locations gives the sampled function. However, the value of the samples still span (vertically) a continuous range of values.

In order to form a digital function , the intensity values also must be converted (quantized) to discrete value. The right side of bottom right figure shows the intensity scale divided into 8 discrete intervals ranging from black to white. The vertical tick marks indicate the specific value assigned to each of the eight intensity intervals.

The continuous intensity levels are quantized by assignment by assigning one of the eight value to each sample. The assignment is made depending on the vertical proximity of a sample to vertical tick mark. The digital samples resulting from both sampling and quantization is shown in bottom right figure.

Staring at the top of the image and carrying out this procedure line by line produces a two dimensional image as shown in the above figure. image in the right side is a image after sampling and quantization of the continuous image shown in the left.

This article is contributed by Ram Kripal. If you like eLgo Academy and would like to contribute, you can mail your article to admin@elgoacademy.org. See your article appearing on the eLgo Academy page and help other Geeks. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.