DIP Unit 1
DIP Unit 1
Image sensing and Acquisition- Image Sampling and Quantization- Relationships between
pixels- color image fundamentals- RGB, HIS models.
The field of digital image processing refers to processing digital images by means of digital
computer. Digital image is composed of a finite number of elements, each of which has a
particular location and value. These elements are called picture elements, image elements,
pels and pixels.
Pixel is the term used most widely to denote the elements of digital image.
An image is a two-dimensional function that represents a measure of some characteristic
such as brightness or color of a viewed scene. An image is a projection of a 3-D scene into a 2D
projection plane.
An image may be defined as a two-dimensional function f(x,y), where x and y are spatial
(plane) coordinates, and the amplitude of f at any pair of coordinates (x,y) is called the
intensity of the image at that point.
The term gray level is used often to refer to the intensity of monochrome images. Color
images are formed by a combination of individual 2-D images.
For example: The RGB color system, a color image consists of three (red, green and blue)
individual component images. For this reason many of the techniques developed for
Monochrome images can be extended to color images by processing the three component
images individually.
An image may be continuous with respect to the x- and y- coordinates and also in
amplitude. Converting such an image to digital form requires that the coordinates, as well as
the amplitude, be digitized.
Since digital image processing has very wide applications and almost all of the technical fields
are impacted by DIP, we will just discuss some of the major applications of DIP.
Digital image processing has a broad spectrum of applications, such as
• Remote sensing via satellites and other spacecrafts
• Image transmission and storage for business applications
• Medical processing,
• RADAR (Radio Detection and Ranging)
• SONAR(Sound Navigation and Ranging)
• Acoustic image processing (The study of underwater sound is known as underwater
Medical applications:
• Processing of chest X-rays
• Cine angiograms
• Projection images of transaxial tomography and
• Medical images that occur in radiology nuclear magnetic resonance (NMR)
• Ultrasonic scanning
Specialize image processing hardware: It consists of the digitizer just mentioned, plus
hardware that performs other primitive operations such as an arithmetic logic unit, which
performs arithmetic such addition and subtraction and logical operations in parallel on images.
Software: It consists of specialized modules that perform specific tasks a well designed
package also includes capability for the user to write code, as a minimum, utilizes the
specialized module. More sophisticated software packages allow the integration of these
modules.
Mass storage: This capability is a must in image processing applications. An image of size 1024
x1024 pixels, in which the intensity of each pixel is an 8- bit quantity requires one Megabytes
of storage space if the image is not compressed .Image processing applications falls into three
principal categories of storage
• Short term storage for use during processing
• On line storage for relatively fast retrieval
• Archival storage such as magnetic tapes and disks.
Hardcopy devices: The devices for recording image includes laser printers, film cameras, heat
sensitive devices inkjet units and digital units such as optical and CD ROM disk. Films provide
the highest possible resolution, but paper is the obvious medium of choice for written
applications.
Networking: It is almost a default function in any computer system in use today because of the
large amount of data inherent in image processing applications. The key consideration in
image is transmission bandwidth.
Image acquisition:
The image is captured by a camera and digitized (if the camera output is not digitized
automatically) using an analogue-to-digital converter for further processing in a computer.
Image Enhancement:
In this step, the acquired image is manipulated to meet the requirements of the specific task
for which the image will be used. Such techniques are primarily aimed at highlighting the
hidden or important details in an image, like contrast and brightness adjustment, etc. Image
Image Restoration:
It deals with improving the appearance of an image. This step deals with improving the
appearance of an image and is an objective operation since the degradation of an image can
be attributed to a mathematical or probabilistic model. For example, removing noise or blur
from images.
Compression:
For transferring images to other devices or due to computational storage constraints, images
need to be compressed and cannot be kept at their original size. This is also important in
displaying images over the internet;
for example, on Google, a small thumbnail of an image is a highly compressed version of the
original. Only when you click on the image is it shown in the original resolution. This process
saves bandwidth on the servers.
It has to major approaches a) Lossless Compression b) Lossy Compression
Morphological processing:
Image components that are useful in the representation and description of shape need to be
extracted for further processing or downstream tasks. Morphological Processing provides the
tools (which are essentially mathematical operations) to accomplish this. For example, erosion
and dilation operations are used to sharpen and blur the edges of objects in an image,
respectively.
Image Segmentation:
This step involves partitioning an image into different key parts to simplify and/or change the
representation of an image into something that is more meaningful and easier to analyze.
Knowledge base:
Knowledge about a problem domain is coded into an image processing system in the form of a
knowledge base. This knowledge may be as simple as detailing regions of an image where the
information of the interest in known to be located. Thus limiting search that has to be
conducted is in seeking the information. The knowledge base also can be quite complex such
interrelated list of all major possible defects in a materials inspection problems or an image
database containing high resolution satellite images of a region in connection with change
detection application.
An image is denoted by a two dimensional function of the form f{x, y}. The value or amplitude
of f at spatial coordinates {x,y} is a positive scalar quantity whose physical meaning is
determined by the source of the image.
When an image is generated by a physical process, its values are proportional to energy
radiated by a physical source. As a consequence, f(x,y) must be nonzero and finite; that is
o<f(x,y) <co The function f(x,y) may be characterized by two components-
• The amount of the source illumination incident on the scene being viewed.
• The amount of the source illumination reflected back by the objects in the scene.
These are called illumination and reflectance components and are denoted by i(x,y) an r (x,y)
respectively.
The images are generated by the combination of an “illumination” source and the reflection or
absorption of energy from that source by the elements of the “scene” being imaged.
Depending on the nature of the source, illumination energy is reflected from, or transmitted
through, objects.
Incoming energy is transformed into a voltage by the combination of input electrical power
and sensor material that is responsive to the particular type of energy being detected. The
output voltage waveform is the response of the sensor(s), and a digital quantity is obtained
from each sensor by digitizing its response.
In order to capture the 2D image we need this single sensor to have displacement
in both the x and y direction of the image to sense for that we have a mechanical
motion-based setup shown in the second figure.
Sensor arrays
In Digital Image Processing, signals captured from the physical world need to be
translated into digital form by “Digitization” Process. In order to become suitable
for digital processing, an image function f(x,y) must be digitized both spatially
and in amplitude. This digitization process involves two main processes called
1.Sampling
When looking at this image, we can see there are some random variations in
the signal caused by noise. In sampling we reduce this noise by taking
samples. It is obvious that more samples we take, the quality of the image
Sampling has a relationship with image pixels. The total number of pixels in
an image can be calculated as Pixels = total no of rows * total no of columns.
For example, let’s say we have total of 36 pixels, that means we have a
square image of 6X 6. As we know in sampling, that more samples
eventually result in more pixels. So it means that of our continuous signal,
we have taken 36 samples on x axis. That refers to 36 pixels of this image.
Also the number sample is directly equal to the number of sensors on CCD
array.
Here is an example for image sampling and how it can be represented using
a graph.
Quantization
Quantization is opposite to sampling because it is done on “y axis”
while sampling is done on “x axis”. Quantization is a process of transforming
a real valued sampled image to one taking only a finite number of distinct
Now let’s see how quantization is done. Here we assign levels to the values
generated by sampling process. In the image showed in sampling explanation,
although the samples has been taken, but they were still spanning vertically to a
continuous range of gray level values. In the image shown below, these vertically
ranging values have been quantized into 5 different levels or partitions. Ranging
from 0 black to 4 white. This level could vary according to the type of image you
want.
When we want to improve the quality of image, we can increase the levels
assign to the sampled image. If we increase this level to 256, it means we have a
gray scale image. Whatever the level which we assign is called as the gray level.
Most digital IP devices uses quantization into k equal intervals. If b-bits per pixel
are used,
This set of pixels, called the 4-neighbors of p, is denoted by N4(p). Each pixel is one unit
distance from (x,y) and some of the neighbors of p lie outside the digital image if (x,y) is on the
border of the image. The four diagonal neighbors of p have coordinates and are denoted by
ND (p).
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
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.
For example, in the adjacency of pixels with a range of possible intensity values 0
to 255, set V could be any subset of these 256 values.
1. q is in N4(p), or
2. q is in ND(p) and the set N4(p)∩N4(q) has no pixels whose values are
from V.
For example:
In this example, we can note that to connect between two pixels (finding
a path between two pixels):
– In 8-adjacency way, you can find multiple paths between two pixels
– While, in m-adjacency, you can find only one path between two pixels
• So, m-adjacency has eliminated the multiple path connection that has
been generated by the 8-adjacency.
There are three types of connectivity on the basis of adjacency. They are:
COLOR MODELS:
1.RGB MODEL:
Images represented in the RGB color model consist of three component images. – one
for each primary color. When fed into a monitor these images are combined to create a
composite color image. The number of bits used to represent each pixel is referred to as
the color depth. A 24-bit image is often referred to as a fullcolor image as it allows
16,777,216 colors.
2.HSI MODEL:
The HSI (hue, saturation, intensity) color model, decouples the intensity component
from the color-carrying information (hue and saturation) in a color image.
The HIS model is an ideal tool for developing image processing algorithms based on
color descriptions that are natural and intuitive to humans.
a. Hue: A color attribute that describes a pure color (pure yellow, orange or red).
b. Saturation: Gives a measure of how much a pure color is diluted with white light.
c. Intensity: Brightness is nearly impossible to measure because it is so subjective.
Instead we use intensity. Intensity is the same achromatic notion that we have
seen in grey level images.