0% found this document useful (0 votes)
3 views15 pages

Chapter Two

This document provides an overview of digital image fundamentals, including definitions of digital images, their representation, and the processes involved in digital image processing. It discusses the components of an image processing system, types of digital images (binary, grayscale, color, and multispectral), and the methods of sampling and quantization necessary for creating digital images. Additionally, it highlights the importance of storage, processing hardware, and software in the context of digital image applications.

Uploaded by

felmiket fikadu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

Chapter Two

This document provides an overview of digital image fundamentals, including definitions of digital images, their representation, and the processes involved in digital image processing. It discusses the components of an image processing system, types of digital images (binary, grayscale, color, and multispectral), and the methods of sampling and quantization necessary for creating digital images. Additionally, it highlights the importance of storage, processing hardware, and software in the context of digital image applications.

Uploaded by

felmiket fikadu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CV and IP

Chapter 2: Digital image fundamentals


Digital image A digital image is a representation of a two dimensional image as a finite set of
digital values, called picture elements or pixels.

Figure 1 how Digital image is created


Pixel values typically represent gray levels, colors, heights, opacities etc..An image can be defined as a
two-dimensional function f(x, y)
• x, y: Spatial coordinate
• F: the amplitude of any pair of coordinate x,y, which is called the intensity or gray level of the
image at that point.
• X, y and f, are all finite and discrete quantities.
Digital image processing
The field of digital image processing refers to processing digital images by means of digital
computer. It is a subfield of signals and systems but focus particularly on images. DIP focuses on
developing a computer system that is able to perform processing on an image. The input of that system
is a digital image and the system process that image using efficient algorithms, and gives an image as
an output. Digital image processing focuses on two major tasks

SET BY GAMMACHU .N (MSc) Page 1


CV and IP

– Improvement of pictorial information for human interpretation


– Processing of image data for storage, transmission and representation for autonomous machine
perception.
Components of an Image Processing System

Figure 2 Components of an image processing system


1. Image Sensors Two elements are required to acquire digital images. The first is the physical device
that is sensitive to the energy radiated by the object we wish to image (Sensor). The second, called a
digitizer, is a device for converting the output of the physical sensing device into digital form.
2. Specialized Image Processing Hardware Usually consists of the digitizer, mentioned before, plus
hardware that performs other primitive operations, such as an arithmetic logic unit (ALU), which
performs arithmetic and logical operations in parallel on entire images. This type of hardware
sometimes is called a front end subsystem, and its most distinguishing characteristic is speed. In other
words, this unit performs functions that require fast data throughputs that the typical main computer
cannot handle.
3. Computer The computer in an image processing system is a general-purpose computer and can range
from a PC to a supercomputer. In dedicated applications, sometimes specially designed computers are
used to achieve a required level of performance.
4. Image Processing Software for image processing consists of specialized modules that perform
specific tasks. A well-designed package also includes the capability for the user to write code that, as a
minimum, utilizes the specialized modules.
5. Mass Storage Capability Mass storage capability is a must in an image processing applications. An

SET BY GAMMACHU .N (MSc) Page 2


CV and IP

image of sized 1024 * 1024 pixels requires one megabyte of storage space if the image is not
compressed. Digital storage for image processing applications falls into three principal categories:
1. Short-term storage for use during processing.
2. on line storage for relatively fast recall
3. Archival storage, characterized by infrequent access. One method of providing short-term storage is
computer memory. Another is by specialized boards, called frame buffers that store one or more
images and can be accessed rapidly. The on-line storage method, allows virtually instantaneous
image zoom, as well as scroll (vertical shifts) and pan (horizontal shifts). On-line storage generally
takes the form of magnetic disks and optical-media storage. The key factor characterizing on-line
storage is frequent access to the stored data.
6. Image Displays The displays in use today are mainly color (preferably flat screen) TV monitors.
Monitors are driven by the outputs of the image and graphics display cards that are an integral part of a
computer system.
7. Hardcopy devices Used for recording images, include laser printers, film cameras, heat-
sensitive devices, inkjet units and digital units, such as optical and CD- Rom disks.
Networking 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 transmission
is bandwidth. In dedicated networks, this typically is not a problem, but communications with remote
sites via the internet are not always as efficient.
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing

The continuum from image processing to computer vision can be


broken up into low-, mid- and high-level processes

Low Level Process Mid Level Process High Level Process


Input: Image Input: Image Input: Attributes
Output: Image Output: Attributes Output: Understanding

Examples: Noise Examples: Object Examples: Scene


removal, image recognition, understanding,
sharpening segmentation autonomous navigation

SET BY GAMMACHU .N (MSc) Page 3


CV and IP

Digital Image Representation


A digital image is represented in the imaging and computer system by numbers in the form of binary
digits, called bits. In digital image representation there are two types of Digital Images representations.
These are Vector and Raster.
Vector
Vector files are most useful when a graphic needs to be able to handle resizing, as they retain crisp
detail when scaled to any size. Vector format is an excellent choice for digital illustrations such as
logos. A vector file can be converted to a raster file, but it will permanently lose the advantages of the
vector format.
Common vector file extensions: SVG, EPS, and EMF
 SVG — web-based vector format
 EPS — Adobe-based vector format
 EMF — Microsoft Office-based vector format
Raster
Raster images are best for complex images like photographs, and are more likely to be a widely
compatible file format (such as JPG). However, raster images lose detail and become increasingly
blurry when enlarged.
Although a vector image can be saved as a raster image, it is not possible to convert a raster image into
a vector image. Raster files saved as vector file formats will still be raster files. Most images on the
web are raster files.
Common raster file extensions: JPG, PNG, and TIFF
 JPG — compressed raster format, often used for photos
 Best for web use
 Small file size
 Universal — compatible with most software
 Most images on stock photography websites will be downloaded as JPG files
 PNG — raster format good for illustrations or icons
 supports transparency, unlike JPG
 Best for web use
 Small file size
 TIFF — raster format that is best for high-resolution printing

SET BY GAMMACHU .N (MSc) Page 4


CV and IP

 Great for professional print use, especially when preserving crisp image detail is important
 Large file size
The result of sampling and quantization is matrix of real numbers. Assume that an image f(x, y) is
sampled so that the resulting digital image has M rows and N Columns. The values of the coordinates
(x, y) now become discrete quantities thus the value of the coordinates at origin become (X, y) = (o, o).
The next Coordinates values along the first signify the image along the first row. It does not mean that
these are the actual values of physical coordinates when the image wassampled.
Thus, the right side of the matrix represents a digital element, pixel or pel. The matrix can be
represented in the following form as well. The sampling process may be viewed as partitioning the xy
plane into a grid with the coordinates of the center of each grid being a pair of elements from the
Cartesian products Z2, which is the set of all ordered pair of elements (Zi, Zj) with Zi and Zj being
integers from Z. Hence f(x, y) is a digital image if gray level (that is, a real number from the set of real
number R) to each distinct pair of coordinates (x,y). This functional assignment is the quantization
process. If the gray levels are also integers, Z replaces R, the and a digital image become a 2D function
whose coordinates and she amplitude value are integers.

Due to processing storage and hardware consideration, the number gray levels typically is an integer
power of 2. L=2k
Then, the number, b, of bites required to store a digital image is b=M *N* k When M=N, the equation
become b=N2 *k When an image can have 2k gray levels, it is referred to as “k- bit”. An image with
256 possible gray levels is called an “8- bit image” (256=28).
Digital image acquisition process
The types of images in which we are interested 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. We enclose illumination and scene in quotes to emphasize the fact that they are considerably
more general than the familiar situation in which a visible light source illuminates a common everyday
3-D (three-dimensional) scene. For example, the illumination may originate from a source of
SET BY GAMMACHU .N (MSc) Page 5
CV and IP

electromagnetic energy such as radar, infrared, or illumination energy is reflected from, or transmitted
through, objects. An example in the first category is light reflected from a planar surface. An example
in the second category is when X- rays pass through a patient’s body for the purpose of generating a
diagnostic X-ray film. In some applications, the reflected or transmitted energy is focused onto a photo
converter (e.g., a phosphor screen), which converts the energy into visible light. Electron microscopy
and some applications of gamma imaging use this approach. The idea is simple: Incoming energy is
transformed into a voltage by the combination of input electrical power and sensor material that is
responsive to the type of energy being detected. The output voltage waveform is the response of the
particular sensor(s), and a digital quantity is obtained from each.

X-ray energy. But, as noted earlier, it could originate from less traditional sources, such as ultrasound
or even a computer-generated illumination pattern. Similarly, the scene elements could be familiar
objects, but they can just as easily be molecules, buried rock formations, or a human brain. We could
even image a source, such as acquiring images of the sun. Depending on the nature of the source,

SET BY GAMMACHU .N (MSc) Page 6


CV and IP

Sampling and Quantization: To create a digital image, we need to convert the continuous sensed data
into digital from. 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 amplitudes.
 Digitalizing the coordinate values is called sampling.
 Digitalizing the amplitude values is called quantization.
There is a continuous the image along the line segment AB. To simple this function, we take equally
spaced samples along line AB. The location of each samples is given by a vertical tick back (mark) in
the bottom part. The samples are shown as block squares superimposed on function for the abilities for
image sensing and generation. The set of these discrete locations gives the sampled function. In order
to form a digital, the gray level values must also be converted (quantized) into discrete quantities.
Therefore, we divide the gray level scale into eight discrete levels ranging from eight level values. The
continuous gray levels are quantized simply by assigning one of the eight discrete gray levels to each
sample. The assignment it made depending on the vertical proximity of a simple to a vertical tick mark.
Starting at the top of the image and covering out this procedure line by line produces a two dimensional
digital image Sensor by digitizing its response.

Representation of Different Image Type’s


Numeric representation of a two dimensional image is known as digital image. It may be vector or
raster type.

SET BY GAMMACHU .N (MSc) Page 7


CV and IP

TYPES OF DIGITAL IMAGE:


Generally we consider four type of images:
 Binary images
 Gray-scale images
 Color images
 Multispectral images
1. Binary Images
Binary images are the simplest type of images and can take on two values, typically black and white,
or ‘0’ and ‘1’. A binary image is referred to as a 1 bit/pixel image because it takes only 1 binary digit
to represent each pixel. These types of images are most frequently in computer vision application
where the only information required for the task is general shapes, or outlines information. For
example, to position a robotics gripper to grasp an object or in optical character recognition (OCR).
Binary images are often created from gray-scale images via a threshold value is turned white (‘1’), and
those below it are turned black (‘0’).

Figure (1) (a) binary image representation (b) binary Lenna image
• Each pixel is stored as a single bit (0 or 1)
• A 640 x 480 monochrome image requires 37.5 KB of storage.
2. Gray Scale Images
Gray _scale images are referred to as monochrome, or one-color image. They contain brightness
information only brightness information only, no color information. The number of different brightness

SET BY GAMMACHU .N (MSc) Page 8


CV and IP

level available. The typical image contains 8 bit/ pixel (data, which allows us to have (0-255) different
brightness (gray) levels. The 8 bit representation is typically due to the fact that the byte, which
corresponds to 8-bit of data, is the standard small unit in the world of digital computer.

• Each pixel is usually stored as a byte (value between 0 to 255)


• A 640 x 480 grayscale image requires over 300 KB of storage.
The below figure shows a grayscale image and a 6 × 6 detailed region, where brighter pixels
correspond to larger values.

SET BY GAMMACHU .N (MSc) Page 9


CV and IP

3. COLOR IMAGES
 Color images are created as three-band monochrome image data, in which each band of image data
corresponds to a different color. In each spectral band there is a gray-level information which is the
actual information stored in the digital image.
 Color images are also known as the RGB image because color images are represented as the red, green,
and blue. Color images would have 24-bits/pixels by using 8-bit monochrome standard as a model and
8-bits for each of the three color band (red, green and blue). Representation of color images is more
complex and varied. The two most common ways of storing color image contents are:-
1) RGB representation—in which each pixel is usually represented by a 24-bit number containing the
amount of its red (R), green (G), and blue (B) components.
2) Indexed representation—where a 2D array contains indices to a color palette (or lookup table -
(LUT)).
24-Bit (RGB) Color Images Color images can be represented using three 2D arrays of same size, one
for each color channel: red (R), green (G), and blue (B) (Figure 2.4).1 Each array element contains an
8-bit value, indicating the amount of red, green, or blue at that point in a [0, 255] scale. The
combination of the three 8-bit values into a 24-bit number allows 224 (16,777,216, usually referred to
as 16 million or 16 M) color combinations. An alternative representation uses 32 bits per pixel and
includes a fourth channel, called the alpha channel that provides a measure of transparency for each
pixel and is widely used in image editing effects. The following figure we see a representation of a
typical RGB color image.
Example of 24-Bit Colors Image
• Each pixel is represented by three bytes (e.g., RGB)
• Supports 256 x 256 x 256 possible combined colors (16,777,216)
• A 640 x 480 24-bit color image would require 921.6 KB of storage
Indexed Color Images: A problem with 24-bit color representations is backward compatibility with
older hardware that may not be able to display the 16 million colors simultaneously. A solution—
devised before 24-bit color displays and video cards were widely available—consisted of an indexed
representation, in which a 2D array of the same size as the image contains indices (pointers) to a color
palette (or color map) of fixed maximum size (usually 256 colors). The color map is simply a list of
colors used in that image.
Example of 8-Bit Color Image

SET BY GAMMACHU .N (MSc) Page 10


CV and IP

• One byte for each pixel


• Supports 256 out of the millions s possible, acceptable color quality
• Requires Color Look-Up Tables (LUTs)
• A 640 x 480 8-bit color image requires 307.2 KB of storage (the same as 8-bit grayscale)
4. MULTISPECTRAL IMAGES:
This type of images contains the information outside the normal human perceptual range. Information
represented is not directly visible by human system so, these are not images in the usual sense.
However by mapping the different spectral band to RGB components the information is represented in
visual form. Multispectral images include the ultraviolet, infrared, X-ray, radar data and acoustic.
Mathematical Tools used in Digital Image Processing
Array versus Matrix Operation:
Images are viewed as the matrix. But in this series of DIP, we are using array operation. There is a
difference is Matrix and Array Operation. In Array, the operation is carried out by Pixel by Pixel in
Image.
Let these two images:

Then the Matrix Operation is:

And Array Operation is:

SET BY GAMMACHU .N (MSc) Page 11


CV and IP

Linear versus Non-Linear Operation


Linear operation is Addition, Subtraction, Multiplication, Division on the Image. Non-Linear operation
is Max, Min, Median, Mode, Mean of the Image for Image Enhancement.
Image Enhancement
An enhancement algorithm is one that yields a better quality image for the purpose of some particular
application which can be done by either suppressing the noise or increasing the image contrast.
Image Enhancement/Transformation Methods
1. Spatial Domain Methods: Techniques are based on direct manipulation of pixels in an image
2. Frequency Domain Methods: Techniques are based on modifying the Fourier transform of the image.
3. Combination Methods: There are some enhancement techniques based on various combinations of
methods from the first two categories.
ARITHMETIC OPERATIONS :
1. Addition Operation:
Let s(x,y) is the new corrupted image as we are adding noise g(x,y) to original image f(x,y) to hide the
noise in the original image s(x,y)=f(x,y)+g(x,y). Adding constant to the image makes the image brighter
i.e s(x,y)=f(x,y)+constant.

2. Subtraction Operation:
The subtraction between two images is s(x,y)=f(x,y)-y(x,y). Where f(x,y) is image 1 and g(x,y) is image
2. The Practical Application of image subtraction is in medical imaging called mask mode radiography.
Subtracting the constant from the original image makes it darker.

SET BY GAMMACHU .N (MSc) Page 12


CV and IP

3. Multiplication Operation:
In this equation h(x,y)=f(x,y)*g(x,y) , h(x,y) is the new image formed f(x,y) is image1 and g(x,y) is
image2. We can also multiple constant to an image like h(x,y)=f(x,y)*constant. Multiplication
Operation is used in shading correction.

[Link] Operation
In division operation h(x,y)=f(x,y)/g(x,y) where f(x,y) and g(x,y) are two images and h(x,y) is the new
image formed. We can also divided it by constant i.e. h(x,y)=f(x,y)/constant.

SET BY GAMMACHU .N (MSc) Page 13


CV and IP

LOGICAL OPERATION:
Logical operations are AND, OR, NOT, XOR.
The truth table of OR is :

Figure 8: Truth Table of OR


The Truth table of AND is:

Here 0 denotes black and 1 denotes white.

SET BY GAMMACHU .N (MSc) Page 14


CV and IP

Figure8: (a) image1 (b) image 2 ( c) image1 AND image2 (d) image1 OR image2
Geometrical Spatial Transformations
Geometrical Spatial Transformation modifies the spatial relationship between pixels in an image.

Figure 9: Affine Transformation

SET BY GAMMACHU .N (MSc) Page 15

You might also like