0% found this document useful (0 votes)
6 views37 pages

DIP Unit 1

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)
6 views37 pages

DIP Unit 1

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

23PCSCC31 : DIGITAL IMAGE PROCESSING - [ SEMESTER: III ]

Unit:1 INTRODUCTION 12hours


Introduction: What is Digital image processing – the origin of DIP – Examples of fields that use DIP –
Fundamentals steps in DIP – Components of an image processing system. Digital Image Fundamentals:
Elements of Visual perception – Light and the electromagnetic spectrum – Image sensing and acquisition –
Image sampling and Quantization – Some Basic relationship between Pixels – Linear & Nonlinear
operations.
Unit:2 IMAGEENHANCEMENT 12hours
Image Enhancement in the spatial domain:- Background – some basic Gray level Transformations –
Histogram Processing – Enhancement using Arithmetic / Logic operations – Basics of spatial filtering –
Smoothing spatial filters – Sharpening spatial filters – Combining spatial enhancement methods.

Unit:3 IMAGERESTORATION 12hours


Image Restoration: A model of the Image Degradation / Restoration Process – Noise models – Restoration
is the process of noise only – Spatial Filtering – Periodic Noise reduction by frequency domain filtering –
Linear, Portion – Invariant Degradations – Estimating the degradation function – Inverse filtering –
Minimum mean square Error Filtering – Constrained least squares filtering – Geometric mean filter –
Geometric Transformations.

Unit:4 IMAGECOMPRESSION 11hours


Image Compression: Fundamentals–Image compression models– Elements of Information Theory – Error Free
compression – Lossy compression – Image compression standards.

Unit:5 IMAGESEGMENTATION 11hours


Image Segmentation: Detection and Discontinuities – Edge Linking and Boundary deduction – Thresholding
– Region-Based segmentation – Segmentation by Morphological watersheds – The use of motion in
segmentation.
Introduction Digital image processing
Digital image processing is the use of a digital computer to process digital
images through an algorithm. As a subcategory or field of digital signal processing, digital
image processing has many advantages over analog image processing. It allows a much wider
range of algorithms to be applied to the input data and can avoid problems such as the build-up
of noise and distortion during processing. Since images are defined over two dimensions
(perhaps more) digital image processing may be modeled in the form of multidimensional
systems. The generation and development of digital image processing are mainly affected by
three factors:

• First, the development of computers.


• Second, the development of mathematics (especially the creation and
improvement of discrete mathematics theory).
• Third, the demand for a wide range of applications in environment, agriculture,
military, industry and medical science has increased.

Digital Image Processing means processing digital image by means of a digital


computer. We can also say that it is a use of computer algorithms, in order to get enhanced
image either to extract some useful information.
Digital image processing is the use of algorithms and mathematical models to process
and analyze digital images. The goal of digital image processing is to enhance the quality of
images, extract meaningful information from images, and automate image-based tasks.

The basic steps involved in digital image processing are:

1) Image acquisition: This involves capturing an image using a digital camera or scanner,
or importing an existing image into a computer.
2) Image enhancement: This involves improving the visual quality of an image, such as
increasing contrast, reducing noise, and removing artifacts.
3) Image restoration: This involves removing degradation from an image, such as blurring,
noise, and distortion.
4) Image segmentation: This involves dividing an image into regions or segments, each
of which corresponds to a specific object or feature in the image.
5) Image representation and description: This involves representing an image in a way
that can be analyzed and manipulated by a computer, and describing the features of an
image in a compact and meaningful way.
6) Image analysis: This involves using algorithms and mathematical models to extract
information from an image, such as recognizing objects, detecting patterns, and
quantifying features.
7) Image synthesis and compression: This involves generating new images or
compressing existing images to reduce storage and transmission requirements.
8) Digital image processing is widely used in a variety of applications, including medical
imaging, remote sensing, computer vision, and multimedia.

Image processing mainly include the following steps:

1. Importing the image via image acquisition tools.


2. Analysing and manipulating the image.
3. Output in which result can be altered image or a report which is based on analysing that
image.

What is an image?
An image is defined as a two-dimensional function,F(x,y), where x and y are spatial
coordinates, and the amplitude of F at any pair of coordinates (x,y) is called the intensity of that
image at that point. When x,y, and amplitude values of F are finite, we call it a digital image.
In other words, an image can be defined by a two-dimensional array specifically arranged in
rows and columns.

Digital Image is composed of a finite number of elements, each of which elements have a
particular value at a particular location.These elements are referred to as picture
elements,image elements,and pixels.A Pixel is most widely used to denote the elements of a
Digital Image.

Types of an image
1. BINARY IMAGE– The binary image as its name suggests, contain only two
pixel elements i.e 0 & 1,where 0 refers to black and 1 refers to white. This
image is also known as Monochrome.
2. BLACK AND WHITE IMAGE– The image which consist of only black and
white color is called BLACK AND WHITE IMAGE.
3. 8 bit COLOR FORMAT– It is the most famous image format.It has 256
different shades of colors in it and commonly known as Grayscale Image. In
this format, 0 stands for Black, and 255 stands for white, and 127 stands for
gray.
4. 16 bit COLOR FORMAT– It is a color image format. It has 65,536 different
colors in it.It is also known as High Color Format. In this format the distribution
of color is not as same as Grayscale image.
A 16 bit format is actually divided into three further formats which are Red, Green and
Blue. That famous RGB format.

Image as a Matrix :
As we know, images are represented in rows and columns we have the following syntax
in which images are represented:

The right side of this equation is digital image by definition. Every element of this matrix is
called image element , picture element , or pixel.

PHASES OF IMAGE PROCESSING:


1) ACQUISITION – It could be as simple as being given an image which is in digital form.
The main work involves:
a)Scaling
b) Color conversion(RGB to Gray or vice-versa)
2) IMAGE ENHANCEMENT – It is amongst the simplest and most appealing in areas of
Image Processing it is also used to extract some hidden details from an image and is
subjective.
3) IMAGE RESTORATION – It also deals with appealing of an image but it is
objective(Restoration is based on mathematical or probabilistic model or image
degradation).
4) COLOR IMAGE PROCESSING – It deals with pseudocolor and full color image
processing color models are applicable to digital image processing.
5) WAVELETS AND MULTI-RESOLUTION PROCESSING – It is foundation of
representing images in various degrees.
6) IMAGE COMPRESSION - It involves in developing some functions to perform this
operation. It mainly deals with image size or resolution.
7) MORPHOLOGICAL PROCESSING - It deals with tools for extracting image
components that are useful in the representation & description of shape.
8) SEGMENTATION PROCEDURE - It includes partitioning an image into its constituent
parts or objects. Autonomous segmentation is the most difficult task in Image
Processing.
9) REPRESENTATION & DESCRIPTION - It follows output of segmentation stage,
choosing a representation is only the part of solution for transforming raw data into
processed data.
10) OBJECT DETECTION AND RECOGNITION - It is a process that assigns a label to an
object based on its descriptor.

OVERLAPPING FIELDS WITH IMAGE PROCESSING :

According to block 1,if input is an image and we get out image as a output, then it is termed
as Digital Image Processing.
According to block 2,if input is an image and we get some kind of information or description
as a output, then it is termed as Computer Vision.
According to block 3,if input is some description or code and we get image as an output,
then it is termed as Computer Graphics.
According to block 4,if input is description or some keywords or some code and we get
description or some keywords as a output,then it is termed as Artificial Intelligence .

The origin of DIP :


One of the first application of digital image was in the newspaper industry, when picture
were first sent by submarine cable between London and New York. Introduction of the Bart lane
cable picture transmission system in the early 1920s reduced the time required to transport a
picture across the Atlantic from more than a week to less than three hours. Specialized printing
equipment coded pictures for cable transmission and then reconstructed them at the receiving
end. Some of the initial problems in improving the visual quality of these early digital pictures
were related to the selection of printing producers and the distr ibution of intensity levels. In facts
,digital images requires so much storages and computation power that progress in the field of
digital image processing has been dependent on the development of digital computers and of
supporting technologies that include data storage, display and transmission.

The digital image is composed of a finite number of elements, each of which has a location
and values. These elements are referred as picture element, image element &pixels. Pixels used
to denote the element of a digital image. The process of acquiring an image of the area
containing the text, preprocessing that image, extracting the individual characters , describing
the character in the form suitable for computer processing & recognizing those individual
character are Digital Image Processing. Digital image processing techniques began in the late
1960s and early 1970s to be used in medical imaging, remote Earth resource observations and
astronomy. The invention in the early 1970s of computerized axial tomography (CAT) also called
computerized tomography (CT) is one of the most

Ray passes through the object and is collected at the opposite end by the corresponding
detectors in the ring. As the source rotates, this procedure is repeated. Tomography consist
algorithms that use the sensed data to construct an image that represent the slice through the
object. Computer procedure are used to enhance the contrast or code the intensity levels into
color for easier interpretation of X-Rays and other images

used in industry, medicine and the biological sciences. Image enhancement and
restoration procedure are used to process degraded images of unrecoverable objects or
experimental result too expansive to duplicate. Image processing methods have successfully
restored blurred pictures that were the only available records of rare artifacts lost or damaged
after being photographed.

Examples of fields that use DIP :


One of the simplest ways to develop a basic understanding of the extent of image
processing applications is to categories images according to their source (e.g., visual, x -ray and
son on). The principle energy source for images in use today is the electromagnetic energy
spectrum. Other important sources of energy include acoustic, ultrasonic and electronic (in the
form of electron beams used in electron microscopy).

Synthetic images used for modeling and visualization are generated by computer.
Electromagnetic waves can be conceptualized as propagating sinusoidal waves of varying
wavelengths, or they can be thought of as a stream of mass less particles, each traveling in a
wavelike pattern and moving at the speed of light. Each mass less particle contain a certain
amount (bundle ) of energy. Each bundle of energy is called a photon. If spectral bands are
grouped according to energy per photon, we obtain the spectrum ranging from gamma rays
(highest energy) at the one end to radio waves (lowest energy) at the other.

Gamma-Ray imaging :
Major uses of imaging based on gamma rays include nuclear medicine and astronomical
observations. In nuclear medicine, the approach is to inject a patient with a radioactive isotope
that emits gamma rays as it decays. Images are produced from emissions collected by gamma
ray detectors.

Positron emission tomography (PET) :


The patient is given a radioactive isotope that emits positrons as it decays. When a
positron meets a electron, both are annihilated and two gamma rays are given off. These are
detected and a tomographic image is created using the basic principles of tomography.

X-ray Imaging (Oldest Source Of EM Radiation) :

X-rays for medical and industrial imaging are generated using an x -ray tube, which is a
vacuum tube with a cathode and anode. The cathode is heated, causing free electrons to be
released. These electrons flow at high speed to the positively char ged anode. When the electron
strike a nucleus, energy is released in the form x-ray radiation. The energy (penetrating power)
of the x-rays is controlled by a current applied to the filament in the cathode.

Angiography is another major application in an area called contrast enhancement


radiography. The procedure is used to obtain images of blood vessels. A catheter ( a small
flexible hollow tube) is inserted, for example into an artery of vein in the groin. The catheter is
threaded into the blood vessel and guided to the area to be studied. When the catheter reaches
the site under investigation, an x-ray contrast medium is injected through the catheter. This
enhances contrast of the blood vessels and enables the radiologist to see any irregularities or
blockages.
Imaging in the visible and infrared bands :
Infrared band often is used in conjunction with visual imaging. The applications ranges
from light microscopy, astronomy, remote sensing industry and law enforcement.
Eg:
1) Microscopy- the applications ranges from enhancement to measurement.
2) Remote sensing -weather observation from multispectral images from satellites .
3) Industry-check up the bottledrink with less quantity.
4) Law enforcement – biometrics.

Imaging in the microwave band :


Dominant application in microwave band is radar. The unique feature of imaging radar is
its ability to collect data over virtually any region at any time, regardless of weather or ambient
lighting conditions. Some radar waves can penetrate clouds and under certain conditions can
also see through vegetation, ice and extremely dry sand. In many cases, radar is the only way
to explore inaccessible regions of the earth’s surface. An imaging radar works li ke a flash
camera in that it provides it own illumination (microwaves pulses) to illuminate an area on the
ground and take a snapshot image.

Imaging in the radio band :


Major applications of imaging in the radio band are in medicine and astronomy. In
medicine radio waves are used in magnetic resonance imaging (MRI). This techniques places
a patient in a powerful magnet and passes radio waves through his or her body in short pulses.
Each pulse causes a responding pulse of radio waves to be emitted by patient’s tissues. The
location from which theses signals orginate and their strength are determined by a computer
which produces a two-dimensional picture of a section of the patient.

Other Imaging Modalities Acoustic images, electron microscopy and synthetic (computer –
generated images) Imaging using sound finds application in geological exploration, industry
and medicine. The most important commercial applications of image processing in geology are
in mineral and oil exploration.
Ultrasound imaging is used routinely in manufacturing, the best known applications of this
technique are in medicine, especially in obsterics, where unborn babies are imaged to
determine the health of their development. Fractals are striking examples of computer-
generated images.
Fundamentals steps in DIP :
An Image is defined as a two dimensional function f(x, y). (x, y) is the spatial coordinate
(or location) and f is the intensity at that point. If x, y and f all are finite and discrete, then the
image is said to be a digital image. Digital image consists of finite and discrete image elements
called pixels, each of them having a location and intensity value. In digital image processing,
we process digital images using a digital computer.
Digital Image processing is not a field which is used for only high-end applications. There
are various fundamental steps in digital image processing. We will discuss all the steps and
processes that can be applied for different images.

Classification :
We can categorise the steps in digital image processing as three types of computerised
processing, namely low level, mid level and high level processing.
1. Low Level Processing :
Low level processing involves basic operations such as image preprocessing, image
enhancement, image restoration, image sharpening, etc. The main characteristic of low
level processing is that both its inputs and outputs are images.
2. Mid Level Processing :
Mid level processing involves tasks like image classification, object identification,
image segmentation, etc. The main characteristic of low level processing is that its inputs
are generally images whereas its outputs are attributes associated with image which are
extracted from it.
3. High Level Processing :
High level processing involves making sense of ensemble of recognised object and
cognitive tasks associated with computer vision.
Fundamental Steps in Digital Image Processing
1) Image Acquisition :
Image acquisition is the first step in digital image processing. In this step we get the
image in digital form. This is done using sensing materials like sensor strips and sensor arrays
and electromagnetic wave light source. The light source falls on an object and it gets reflected
or transmitted which gets captured by the sensing material. The sensor gives the output image
in voltage waveform in response to electric power being supplied to it. The example of a
situation where reflected light is captured is a visible light source. Whereas, in X-ray light
sources transmitted light rays are captured.

The image captured is analog image as the output is continuous. To digitise the image, we use
sampling and quantization where discretize the image. Sampling is discretizing the image
spatial coordinates whereas quantization is discretizing the image amplit ude values.

Sampling

2) Image Enhancement :
Image enhancement is the manipulation of an image for its specific purpose and
objectives. This is majorly used in photo beautify applications. These are performed using
filters. The filters are used to minimise noise in an image. Each filter is used for a specific
situation. Correlation operation is done between filters and input image matrix to obtain
enhanced output image in . To simplify the process, we perform multiplication in the frequency
domain which gives the same result. We transform the image from spatial domain to frequency
domain using discrete fourier transform (DFT) multiply with filter and then go back to spatial
domain using inverse discrete fourier transform (IDFT). Some filters used in frequency domain
are butterworth filter and gaussian filter.
Majorly used filters are high pass filter and low pass filter. Low pass filter smoothens the
images by averaging the pixel of neighbouring value thus minimising the random noise. It gives
a blurring effect. It minimises the sharpening edges. High pass filter is used to sharpen the
images using spatial differentiation. Examples of high pass filters are laplace filter and high
boost filter. There are other non linear filters for different purposes. For example, a median
filter is used to eliminate salt and pepper noise.

3) Image Restoration :
Like image enhancement, image restoration is related to improving an image. But image
enhancement is more of a subjective step where image restoration is more of an objective
step. Restoration is applied to a degraded image trying to recover back the original model.
Here firstly we try to estimate the degradation model and then find the restored image.
We can estimate the degradation by observation, experimentation and mathematical
modelling. Observation is used when you do not know anything about the setup of the image
taken or the environment. In experimentation, we find the point spread function of an impulse
with a similar setup. In mathematical modelling, we even consider the environment at which
the image was taken and it is the best out of all the other three methods.

To find the restored image, we generally use one of the three filters – inverse filter, minimum
mean square (weiner) filter, constrained least squares filter. Inverse filtering is the simplest
method but cannot be used in presence of noise. In the Wiener filter, mean square error is
minimised. In constrained least error filtering, we have a constraint and it is the bes t method.

4) Colour Image Processing :


Colour image processing is motivated by the fact that using colour it is easier to classify
and the human eye can easily see thousands of colours than shades of black and white. Colour
image processing is divided into types – pseudo colour or reduced colour processing and full
colour processing. In pseudo colour processing, the grey scale is applied to one colour. It was
used earlier. Now-a-days, full colour processing is used for full colour sensors such as digital
cameras or colour scanners as the price of full colour sensor hardware is reduced significantly.
There are various colour models like RGB (Red Green Blue), CMY (Cyan Magenta
Yellow), HSI (Hue Saturation Intensity). Different colour models are used for different
purposes. RGB is understandable for computer monitors. Whereas CMY is understandable for
a computer printer. So there is an internal hardware which converts RGB to CMY and vice
versa. But humans cannot understand RGB or CMY, they understand HSI.

5) Wavelets :
Wavelets represent an image in various degrees of resolution. It is one of the members
of the class of linear transforms along with fourier, cosine, sine, Hartley, Slant, Haar, Walsh-
Hadamard. Transforms are coefficients of linear expansion which decompose a function into a
weighted sum of orthogonal or biorthogonal basis functions. All these transforms are reversible
and interconvertible. All of them express the same information and energy. Hence all are
equivalent. All the transforms vary in only the manner how the information is represented.
6) Compression :
Compression deals with decreasing the storage required to the image information or the
bandwidth required to transmit it. Compression technology has grown widely in this era. Many
people are knowledgeable about it by common image extension JPEG (Joint Photographic
Experts Group) which is a compression technology. This is done by removing redundancy and
irrelevant data. In the encoding process of compression, the image goes through a series of
stages – mapper, quantizer, symbol encoder. Mapper may be reversible or irreversible.
Example of mapper is run length encoding. Quantizer reduces the accuracy and is an
irreversible process. Symbol encoders assign small values to more frequent data and is a
reversible process.
To get back the original image, we perform decompression going through the stage of symbol
decoder and inverse mapper. Compression may be lossy or lossless. If after compression we
get the exact same image, then it is lossless compression else it is lossy compression.
Examples of lossless compression are huffman coding, bit plane coding, LZW (Lempel Ziv
Welch) coding, (PCM) pulse code modulation. Examples of lossy compression are JPEG,
PNG. Lossy compression is ideally used in the world as the change is not visible to the naked
eye and saves way better storage or bandwidth than lossless compress.

7) Morphological Image Processing :


In morphological image processing, we try to understand the structure of the image. We
find the image components present in digital images. It is useful in representing and describing
the images’ shape and structure. We find the boundary, hole, connected components, convex
hull, thinning, thickening, skeletons, etc. It is the fundamental step for the upcoming stages.
8) Segmentation :
Segmentation is based on extraction information from images on the basis of two
properties – similarity and discontinuity. For example, a sudden change in intensity value
represents an edge. Detection of isolation points, line detection, edge detection are some of
the tasks associated with segmentation. Segmentation can be done by various methods like
thresholding, clustering, superpixels, graph cuts, region growing, region splitting and merging,
morphological watersheds.
9) Feature Extraction :
Feature extraction is the next step after segmentation. We extract features from images,
regions and boundaries. Example of feature extraction is corner detection. These features
should be independent and insensitive to variation of parameters such as scaling, rotation,
translation, illumination. Boundary features can be described by boundary feature descriptors
such as shape numbers and chain codes, fourier descriptors and statistical moments.

10) Image Pattern Classification :


In image pattern classification, we assign labels to images on the basis of features
extracted. For example, classify the image as a cat image. Classical methods for image pattern
classification are minimum-distance, correlation and Bayes classifier. Modern methods for the
same purpose use neural networks and deep learning models such as deep convolutional
neural networks. This method is ideal for image processing techniques.

Components of an image processing system :


Image Processing System is the combination of the different elements involved in the
digital image processing. Digital image processing is the processing of an image by means of
a digital computer. Digital image processing uses different computer algorithms to perform
image processing on the digital images.
It consists of following components :

1) Image Sensors :
• Two elements are reqired to acqired digital image. The first is a physical divice that is
sensitive to the energy radiated by the object we wish to image.
• The second, called a digitizer, is a device for converting the output of the physical sensing
device into digital form.

2) Image Processing Hardware :


• Usually consists of the digitizer, plus hardware that performs other primitive operations,
such as an arithmetic logic unit (ALU), that performs arithmetic and logical operations in
parallel on entire images.
• This type of hardware sometimes is called a Front-end Sub-system, and it’s most
distinguishing characteristic is speed.
• This unit performs functions that require fast data throughputs that the typical main
computer can’t handle.
3) Computer :
• A general-purpose computer can range from a PC to a super-computer.
In dedicated applications, sometimes custom computers are used to achive level of
performance
• In general system, almost any well-eqipped PC-types machine is suitable for off-line
image processesing.

4) Image Processing Software :


• Consists of specialzed modules that performs specific tasks.
• A well-designed package also includes the capability for the user to write code that, as a
minimum, utilizes the specialized modules.
• More sophisticated software packages allow the integration of those modules and general -
purpose software commands from at least one computer language.

5) Mass storage :
• A must in image processing applications, an image of size 1024x1024 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.
• When dealing with thousands, or even millions, of images providing adequate storage in
an image processing system cna be challenge.
• Digital storage for image processing applications falls into 3 principle categories
❖ short-term storage for use during processing
❖ on-line storage for relatively fast recall
❖ archival storage characterized by infrequent access
• storage is measured in
❖ Bytes (8 bits)
❖ Kilobytes (1 thousands bytes)
❖ Mega bytes (1 million bytes)
❖ Giga bytes (1 billion bytes)
❖ Tera bytes (1 trillion bytes)

6) Image display :
• Mainly color TV monitors are driven by the outputs of image and graphics display cards
that are an integral part of the computer system
• Seldom are there requirements for image display applications that can’t be met by display
cards available commercially as part of the computer system
• In some cases, it is necessary to have stereo displays, and these are implemented in the
form of headgear containing two small display embedded in goggles worn by the user

7) Hardcopy :
• Devices for recoding images include laser printers, film cameras heat -sensitive devices,
inkjet units and digital units, such as optical and CD-ROM disks.
• Films provides the highest possible resolution, but paper is the obvious medium if image
project equipment is used.
• The latter approch is gaining acceptance as the standard for image presentations.

8) Networking :
• 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
• Fortunately, this situation is imporving quickly as a result of optical fiber and other
broadband technologies, etc.

Digital Image Fundamentals :


• Elements of Visual perception :
The field of digital image processing is built on the foundation of mathematical and
probabilistic formulation, but human intuition and analysis play the main role to make the
selection between various techniques, and the choice or selection is basically made on
subjective, visual judgements.
In human visual perception, the eyes act as the sensor or camera, neurons act as the
connecting cable and the brain acts as the processor.

The basic elements of visual perceptions are:

1. Structure of Eye.
2. Image Formation in the Eye..
3. Brightness Adaptation and Discrimination.
Structure of Eye:

The human eye is a slightly asymmetrical sphere with an average diameter of the length
of 20mm to 25mm. It has a volume of about 6.5cc. The eye is just like a camera. The external
object is seen as the camera take the picture of any object. Light enters the eye through a
small hole called the pupil, a black looking aperture having the quality of contraction of eye
when exposed to bright light and is focused on the retina which is like a camera film.
The lens, iris, and cornea are nourished by clear fluid, know as anterior chamber. The
fluid flows from ciliary body to the pupil and is absorbed through the channels in the angle of
the anterior chamber. The delicate balance of aqueous production and absorption controls
pressure within the eye.
Cones in eye number between 6 to 7 million which are highly sensitive to colors. Human
visualizes the colored image in daylight due to these cones. The cone vision is also called as
photopic or bright-light vision.
Rods in the eye are much larger between 75 to 150 million and are distributed over the
retinal surface. Rods are not involved in the color vision and are sensitive to low levels of
illumination.

Image Formation in the Eye:

When the lens of the eye focus an image of the outside world onto a light-sensitive
membrane in the back of the eye, called retina the image is formed. The lens of the eye focuses
light on the photoreceptive cells of the retina which detects the photons of light and responds
by producing neural impulses.

The distance between the lens and the retina is about 17mm and the focal length is
approximately 14mm to 17mm.

Brightness Adaptation and Discrimination :

Digital images are displayed as a discrete set of intensities. The eyes ability to
discriminate black and white at different intensity levels is an important consideration in
presenting image processing result.

The range of light intensity levels to which the human visual system can adapt is of the order
of 1010 from the scotopic threshold to the glare limit. In a photopic vision, the range is about
106.
Light and the electromagnetic spectrum :
Light :
In 1666, Sir Isaac Newton discovered that when a beam of sunlight passes through a
glass prism, the emerging beam of light is not white but consists instead of a continuous
spectrum of colors ranging from violet at one end to red at the other.

The range of colors we perceive in visible light is a small portion of the electromagnetic
spectrum. On one end of the spectrum are radio waves with wavelengths billions of times longer
than those of visible light. On the other end of the spectrum are gamma rays with wavelengths
millions of times smaller than those of visible light.

Electromagnetic spectrum :
Consider the electromagnetic spectrum as a wide cosmic highway that facilitates
the movement of various kinds of light. There is a vast spectrum of energy waves present
in this, ranging from extremely short waves like X-rays to long, languid waves like radio
broadcasts. This spectrum extends beyond the light that our eyes can detect.

The tiny portion of light that we can see, known as visible light, which includes every
color in the rainbow, is located exactly in the middle of this enormous spectrum. But there’s so
much more to it than that.
On one extreme are the incredibly small and intense gamma and X-rays, which are
employed in medicine to view the body and can penetrate through solid objects. The radio
waves, on the other hand, are like the long, slow waves that carry your favorite radio station’s
music through the air to your radio.

The electromagnetic spectrum can be described in terms of wavelength, frequency, or


energy. Wavelength (denoted as λ) and frequency (denoted as ν) are related by the equation:

λν=c
where c is the speed of light, approximately 2.998×10^8 meters per second.

The energy of different parts of the electromagnetic spectrum can be calculated


using the equation:

E=hν, where h is Planck’s constant.


Wavelength is typically measured in meters, but smaller units like microns (μm, equal to
10^{-6} meters) and nanometers (nm, equal to 10^{-9} meters) are also commonly used.
Frequency is measured in Hertz (Hz), where one Hz equals one cycle of a wave per second.
Energy is often expressed in electron-volts (eV), a standard unit used in physics to describe the
energy of particles or waves.

Electromagnetic waves can be thought of in two ways: as sinusoidal waves with a


wavelength (λ), or as a stream of massless particles, called photons, moving in a wave-like
pattern at the speed of light. Each photon carries a bundle of energy. From the equation E=hν ,
we know that energy is proportional to frequency, so higher-frequency (shorter-wavelength)
electromagnetic waves carry more energy per photon.

For example:
• Radio waves have low-energy photons.
• Microwaves carry more energy than radio waves.
• Infrared has more energy than microwaves.
• Visible light has even more energy, followed by ultraviolet, X-rays, and gamma rays,
which are the most energetic and can be harmful to living organisms.
Light is a type of electromagnetic radiation that our eyes can detect. The visible spectrum
spans from approximately 0.43 microns (violet) to about 0.79 microns (red). For ease of
discussion, the visible spectrum is divided into six broad color regions: violet, blue, green, yellow,
orange, and red.

Graphical representation of one wavelength:

The colors we see in objects depend on the type of light they reflect. An object that reflects
light evenly across all visible wavelengths appears white. However, if an object reflects light
within a specific range of wavelengths, it shows a certain color. For example, green objects
reflect light primarily in the range of 500 to 570 nm, while absorbing light from other parts of the
spectrum.

Light without any color is called monochromatic (or achromatic) light, which only varies in
intensity. Monochromatic light can range from black, through various shades of gray, to white.
This is why the term gray level is often used to describe the intensity of monochromatic light.
Images that display this intensity range are called grayscale images.

On the other hand, chromatic (color) light covers the electromagnetic spectrum from
about 0.43 to 0.79 mm. Besides frequency,

Three key factors are used to describe color light:

1. Radiance : The total amount of energy emitted by a light source, measured in watts (W).
2. Luminance : The amount of energy perceived by an observer, measured in lumens (lm).
For instance, a light source in the far-infrared region may emit a lot of energy (high
radiance), but because it’s not visible, its luminance is almost zero.
3. Brightness : A subjective perception of light intensity, which is hard to measure but plays
an essential role in how we perceive color.
Image sensing and acquisition :
Image sensing :
Image sensing in digital image processing refers to the process of capturing visual
information from the real world and converting it into a digital format that can be processed by a
computer. This involves detecting energy (usually light) from a scene using sensors, w hich then
transform that energy into electrical signals. These signals are digitized to form an image.

Most images are created by a combination of an illumination source and the reflection
or absorption of energy from that source by the objects (or "scene") being imaged. The terms
"illumination" and "scene" are used broadly, meaning they can refer to more than just visible
light illuminating a familiar 3D scene.

For example:

• Illumination could come from various sources, like radar, infrared, X-rays, or even
computer-generated light patterns.
• Scenes can include familiar objects, but they can also be things like molecules,
underground rock formations, or even parts of the human body (e.g., the brain).

When illumination energy interacts with objects, it can either be reflected or transmitted
through them. An example of reflection is light bouncing off a flat surface, while transmission
occurs when X-rays pass through a patient’s body to create a diagnostic image.

In some cases, the reflected or transmitted energy is directed onto a photo converter
(like a phosphor screen) that changes the energy into visible light. This technique is often used
in electron microscopy and gamma imaging.

There are three main sensor arrangements used to convert incoming energy into digital
images.

The basic idea is simple:


1. Incoming energy is converted into a voltage using a combination of electrical power and
sensor material that responds to the type of energy being detected.
2. This voltage is the sensor's response to the energy.
3. The voltage is then digitized to produce a digital image.

In this process, the key is transforming the energy into a measurable electrical signal and
converting that signal into a digital format for imaging.
(a) Single sensing element.

(b) Line sensor

(c) Array sensor

acquisition :
Image acquisition in digital image processing refers to the process of capturing an image
and converting it into a digital form suitable for further processing by a computer. It is the first
step in the digital image processing workflow and involves obtaining the image dat a from a
physical source, such as a camera or sensor.

Image acquisition can be done in 3 Ways :

1. Image Acquisition Using a Single Sensor


2. Image Acquisition Using Sensor Strips
3. Image Acquisition Using Sensor Arrays
Image Acquisition Using a Single Sensor :

( Combining a single sensing element with mechanical motion to generate a 2-D image.)

The Figure shows the parts of a single sensor, with the photodiode being one of the most
common examples. Made from silicon, the photodiode produces a voltage output that is
proportional to the amount of light it receives. To make the sensor more selective, filters can be
used. For instance, a green filter placed in front of the sensor will allow mostly green light to pass
through, so the sensor’s output will be stronger for green light compared to other colors.

To create a 2D image using a single sensor, both the sensor and the object being imaged
need to move relative to each other in the x- and y-directions. Figure 1.5 illustrates a method
used in high-precision scanning. In this setup, a film negative is placed on a rotating drum,
which moves it in one direction. The sensor is attached to a lead screw that moves it in the
perpendicular direction. This mechanical motion allows the sensor to capture the entire image.

Although this method is slow, it is a low-cost way to create high-resolution images, as the
mechanical motion can be precisely controlled. Similar systems use flat beds where the sensor
moves in two linear directions. These mechanical digitizers are sometimes called
microdensitometers.
Image Acquisition Using Sensor Strips :

(a) Image acquisition using a linear sensor strip (b) Image acquisition using a circular sensor strip.

A more common sensor arrangement than a single sensor is a sensor strip, as shown in
the Above Figure. This strip consists of a line of sensors arranged in one direction. To capture
a 2D image, the sensor strip scans in one direction, while the motion perpendicular to the strip
captures the other dimension of the image, as shown in the above Figure .The strip captures
one line of the image at a time, and the full image is formed by combining these lines as the strip
moves. Lenses or other focusing systems are used to project the area to be scanned onto the
sensor strip.

In medical and industrial imaging, sensor strips are often mounted in a ring
configuration to capture cross-sectional (or "slice") images of 3D objects, as shown in Figure
(b). A rotating X-ray source illuminates the object, and sensors on the opposite side of the ring
collect the X-ray energy that passes through the object. The sensors used ar e sensitive to X-ray
energy. This technique forms the basis of Computerized Axial Tomography (CAT), which is
widely used in both medical and industrial settings.
Image Acquisition Using Sensor Arrays :

Figure shows an arrangement of individual sensors in a 2D array. Many electromagnetic


and ultrasonic sensing devices use this array format, which is also commonly found in digital
cameras. One popular type of sensor used in these cameras is the CCD (Charge-Coupled
Device) array, which can be produced with various sensing capabilities and packaged into
rugged arrays with as many as 4000 × 4000 elements or more.

CCD sensors are widely used in digital cameras and other light-sensing instruments.
Each sensor in the array measures the amount of light that hits its surface. The sensor's
response is proportional to the total light energy it receives, which is especially useful in
applications like astronomy where low-noise images are required. In these cases, the sensor
can collect light for extended periods (minutes or even hours) to reduce noise.

The main advantage of the 2D sensor array is that it can capture a complete image at
once by focusing the light or energy onto the sensor's surface.

An example of digital image acquisition. (a) Illumination (energy) source. (b) A scene. (c)
Imaging system. (d) Projection of the scene onto the image plane. (e) Digitized image.
The above figure illustrates how these array sensors work. The process begins with
energy from an illumination source being reflected (or transmitted) from the objects in a scene.
The first task of the imaging system shown in the Figure is to collect this energy and focus it
onto an image plane. If the energy is light, a lens is used to project the scene onto the focal
plane of the lens, as shown in Figure.

The sensor array, placed at the focal plane, produces outputs that correspond to the total
light received by each sensor. These outputs are then processed by digital and analog
circuitry, which converts the signals into a video signal. This signal is digitized by another part
of the system, producing a digital image, as shown in Figure.

Image Formation Module :


we denote images by two-dimensional functions of the form f(x, y).

The value or amplitude of f at spatial coordinates is a positive scalar quantity whose


physical meaning is determined by the source of the image.

When an image is generated from a physical process, its intensity values are proportional
to energy radiated by a physical source (e.g., electromagnetic waves).

As a consequence, f(x, y) must be nonzero and finite

0  f (x, y)  

The function may be characterized by two components:

(1) the amount of source illumination incident on the scene being viewed, and

(2) the amount of illumination reflected by the objects in the scene.

Appropriately, these are called the illumination and reflectance components and are denoted by
and i(x, y) ,and r(x, y) respectively.

The two functions combine as a product to form :


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

0  i(x, y)  

0  r(x, y) 1

Let the intensity of a monochrome image at any pair of coordinates(x0,y0) be denoted by

l=f(x0,y0)

L lies in the range Lmin<=l<=Lmax

In theory Lmin to be minimimum ,Lmax to be finite

Lmin=imin rmin

Lmax=imax rmax

The interval [ Lmin, Lmax] is called gray(intensity) scale

Common practice is to shift the interval [0 L-1]

where L=0 is black

L-1is white

All intermediate values are shades of gray.

Image sampling and Quantization :


Mostly the output of image sensors is in the form of analog signal. Now the problem is that
we cannot apply digital image processing and its techniques on analog signals.

This is due to the fact that we cannot store the output of image sensors which are in the
form of analog signals because it requires infinite memory to store a signal that can have infinite
values. So we have to convert this analog signal into digital signal.

To create a digital image, we need to convert the continuous data into digital form. This
conversion from analog to digital involves two processes: sampling and quantization.
1. Sampling: Digitizing the co-ordinate value is called sampling.

2. Quantization: Digitizing the amplitude value is called quantization

Typically, a frame grabber or digitizer is used to sample and quantize the analogue video signal.

Sampling :
Since an analogue image is continuous not just in its co-ordinates (x axis), but also in its
amplitude (y axis), so the part that deals with the digitizing of co-ordinates is known as sampling.
In digitizing sampling is done on independent variable. In cas e of equation y = sin(x), it is done
on x variable

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 would be more better, the noise would be more removed and
same happens vice versa. However, if you take sampling on the x axis, the signal is not converted
to digital format, unless you take sampling of the y-axis too which is known as quantization.

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 values. Under quantization process the amplitude values of the
image are digitized. In simple words, when you are quantizing an image, you are actually dividing
a signal into quanta(partitions).

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 gr ay 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.
There is a relationship between Quantization with gray level resolution. The above
quantized image represents 5 different levels of gray and that means the image formed from this
signal, would only have 5 different colors. It would be a black and white image more or less with
some colors of gray.

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 dev ices uses quantization into k equal
intervals. If b-bits per pixel are used,

The number of quantization levels should be high enough for human perception of fine shading
details in the image. The occurrence of false contours is the main problem in image which has
been quantized with insufficient brightness levels. Here is an exampl e for image quantization
process.

Some Basic relationship between Pixels :


An image is denoted by f(x,y) and p,q are used to represent individual pixels of the image.

1) Neighbours of pixel
2) Adjacency between pixel
3) Connectivity between pixel
4) Boundaries
5) Distance Measures
1) Neighbours of pixel :
In image processing, a pixel represents a point in an image and has neighboring pixels
surrounding it. For a pixel at coordinates (x, y), there are adjacent pixels arranged in different
ways:

1. 4-Neighbors (Np4): These are the immediate horizontal and vertical neighboring pixels.
For a pixel at (x, y), the four neighboring pixels are at coordinates (x+1, y), (x -1, y), (x,
y+1), and (x, y-1).
2. 8-Neighbors (Np8): In addition to the 4-neighbors, this includes diagonal neighbors as
well. For a pixel at (x, y), the eight neighboring pixels are at coordinates (x+1, y), (x -1, y),
(x, y+1), (x, y-1), (x+1, y+1), (x-1, y+1), (x+1, y-1), and (x-1, y-1).

The collection of pixels around a particular pixel p is called its neighborhood. If this neighborhood
includes the pixel p itself, it's termed a "closed" neighborhood. Conversely, if the neighborhood
excludes the pixel p, it's considered an "open" neighborhood.

2) Adjacency between pixel :


In image processing, the concept of adjacency relates to how pixels are connected or
considered neighbors based on their intensity values.

In a binary image (where pixels have values of 0 or 1), adjacency considers pixels with a value
of 1 as connected. In a grayscale image (where pixels can have a range of values from 0 to
255), the idea remains the same, but the set of intensity values, denoted as V, includes more
values.

There are three types of adjacency:

1. 4-adjacency: Two pixels, p, and q, with values from V, are 4-adjacent if q is one of the
immediate horizontal or vertical neighbors of p (as defined in the 4-neighbors concept
described earlier).
2. 8-adjacency: Here, two pixels, p and q, with values from V are 8-adjacent if q is one of
the horizontal, vertical, or diagonal neighbors of p (as defined in the 8-neighbors concept
described earlier).

3. m-adjacency (mixed adjacency): This adjacency type is introduced to resolve potential


ambiguities that might occur with 8-adjacency. In m-adjacency, two pixels, p, and q, are
considered adjacent if q is either a 4-neighbor of p or an 8-neighbor of p, but there are
specific conditions:

1. q is in Np4 (one of the 4 neighbors of p), or

2. q is in NpD (one of the 8 neighbors of p, the diagonal neighbors), and the


intersection of the 4 neighbors of p and the 4 neighbors of q (denoted as Np ∩ Nq4)
contains no pixels with values from V.

The purpose of m-adjacency is to resolve ambiguity that might arise in 8-adjacency. For
instance, certain pixel configurations might lead to multiple possible 8-adjacent connections,
creating ambiguity. By using m-adjacency, these ambiguities can be eliminated, ensuring clearer
definitions of pixel adjacency.

3)Connectivity between pixel :


It is used for establishing boundaries of objects and components of regions in an image.

Two pixels are said to be connected:

❖ if they are adjacent in some sense(neighbour pixels,4/8/m-adjacency)


❖ if their gray levels satisfy a specified criterion of similarity(equal intensity level)

There are three types of connectivity on the basis of adjacency. They are:

a) 4-connectivity: Two or more pixels are said to be 4-connected if they are 4-adjacent
with each others.

b) 8-connectivity: Two or more pixels are said to be 8-connected if they are 8-adjacent
with each others.
c) m-connectivity: Two or more pixels are said to be m-connected if they are m-adjacent
with each others.

4)Boundaries :
If R happens to be an entire image, then its boundary (or border) is defined as the set of
pixels in the first and last rows and columns of the image. This extra definition is required
because an image has no neighbors beyond its border. Normally, when we refer to a region, we
are referring to a subset of an image and any pixels in the boundary of the region that happens
to coincide with the border of the image are included implicitly as part of the region boundary.

5)Distance Measures :
1) Euclidean distance: The straight-line distance between two pixels.

2) City-block distance: The distance considering only horizontal and vertical moves.

3) Chessboard distance: The distance considering both horizontal/vertical and diagonal


moves.
Linear & Nonlinear operations :
A

You might also like