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

Module 1 Introduction

The document provides an overview of Digital Image Processing (DIP), including its definition, fundamental steps, and applications across various fields such as medical imaging and remote sensing. It covers the components of an image processing system, the human visual perception system, and the technical aspects of image acquisition, enhancement, and restoration. Additionally, it discusses the importance of different electromagnetic spectrum bands in imaging technologies and the role of specialized hardware and software in processing digital images.

Uploaded by

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

Module 1 Introduction

The document provides an overview of Digital Image Processing (DIP), including its definition, fundamental steps, and applications across various fields such as medical imaging and remote sensing. It covers the components of an image processing system, the human visual perception system, and the technical aspects of image acquisition, enhancement, and restoration. Additionally, it discusses the importance of different electromagnetic spectrum bands in imaging technologies and the role of specialized hardware and software in processing digital images.

Uploaded by

pallavimlgowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Module 1:

Digital Image Fundamentals

Syllabus
 What is Digital Image Processing?
 Origins of Digital Image Processing,
 Examples of fields that use DIP,
 Fundamental Steps in Digital Image Processing,
 Components of an Image Processing System,
 Elements of Visual Perception,
 Image Sensing and Acquisition,
 Image Sampling and Quantization,
 Some Basic Relationships Between Pixels,
 Linear and Nonlinear Operations.
WHAT IS DIGITAL IMAGE PROCESSING?

Digital Image:
 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 or gray level
of the image at that point.
 When x, y, and the amplitude values of f are all finite, discrete quantities, we
call the image as a digital image.
 These each discrete, finite element has particular location and value. These
basic elements are referred as picture elements, image elements, pels, and
pixels.

Digital Image Processing:


 It refers to processing of digital images on the digital computer by using Image
processing algorithms.
 3 levels of Image Processing:
Low Level Processing Mid Level Processing High Level Processing
Input:Image Input: Attributes
Input: Image Output: Attributes Output: Understanding
Output: Image
Examples: Object Examples: Scene
Examples: Noise
recognition, Segmentation, understanding,
removal, image
Description of the Images. autonomous navigation.
sharpening, Contrast
[ Image Analysis] [computer Vision]
Enhancement

Low-level processing involves preliminary operations such as Noise removal, image


sharpening, Contrast Enhancement. Here both inputs and outputs are images.
Mid-level processing involves tasks such as segmentation (partitioning an image into
regions or objects), description of those objects to reduce them to a form suitable for
computer processing, and classification (recognition) of individual objects.
In mid-level process inputs are images, but outputs are attributes extracted from those
images (e.g., edges, contours, and the identity of individual objects).
Higher-level processing involves: making sense from recognized objects.
Example: Automated analysis of text. The processes of acquiring an image of the area
containing the text, pre-processing that image, extracting (segmenting) the individual
characters, describing the characters in a form suitable for computer processing, and
recognizing those individual characters
EXAMPLES OF FIELDS THAT USE DIGITAL IMAGE PROCESSING [ APPLICATIONS]

Applications based on light source used (electromagnetic spectrum e.g., visual, x-ray etc).
[ Back Ground: Electromagnetic waves can be represented as stream of mass less particles
called photons. 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.]

1. Gamma Ray Imaging- Nuclear medicine and astronomical observations.


2. X-Ray imaging – X-rays of body.
3. Ultraviolet Band –Lithography, industrial inspection, microscopy, lasers.
4. Visual & Infrared Band – Remote sensing.
5. Microwave Band – Radar imaging

1. 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.

2. X-ray Imaging (oldest source of EM radiation)


I. Medical Diagnosis
a. Bone X-Ray
b. Angiography
c. CAT
II. Industrial Scanning & Testing
III. Astronomy

 X-rays for medical and industrial imaging are generated using an x-ray tube [vacuum
tube with a cathode and anode]. When cathode is heated, free electrons are released.
These electrons flow at high speed to the positively charged 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 vessles and enables
the radiologist to see any irregularities or blockages.

3. Visible and infrared bands Imaging


 Infrared band often is used in conjunction with visual imaging.
 The applications ranges from light microscopy, astronomy, remote sensing industry
and law enforcement.
 Eg: Microscopy- the applications ranges from enhancement to measurement Remote
sensing-weather observation from multispectral images from satellites Industry-check
up the bottledrink with less quantity Law enforcement – biometrics

4. Microwave band Imaging


 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 like a flash camera in that it provides it own
illumination (microwaves pulses) to illuminate an area on the ground and take a
snapshot image.

5. Radio band Imaging


 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 these signals originate and their strength are determined by
a computer which produces a two-dimensional picture of a section of the patient.

6. 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 obstetrics, where unborn babies are
imaged to determine the health of their development.

FUNDAMENTAL STEPS IN DIGITAL IMAGE PROCESSING


Image Acquisition:
 It is the creation of digital images, typically from a physical scene.
 Generally, the image acquisition stage involves pre-processing, such as scaling
[Digitization & Quantization]

Image enhancement:
 Image Enhancement is the process of manipulating an image so that the result is more
suitable than the original for a specific application
 Enhancement techniques highlight certain features of interest in an image & improve
the quality of unclear image.
 Image enhancement is a very subjective. Example: To increase the contrast of an
image

Image Restoration:
 It also deals with improving the appearance & quality of an image.
 The Enhancement is subjective, whereas image restoration is objective, means
restoration techniques are based on mathematical or probabilistic models of image
degradation.
 In image restoration the noise content is also removed to improve the quality of the
image, whereas image enhancement only deals with contrast enhancement.

Colour image processing:


 It is an area that is been gaining importance because of the use of digital images over
the internet. Colour image processing deals with basically colour models and their
implementation in image processing applications

Wavelets and Multiresolution Processing:


 Wavelets provide the both time & frequency information
 Wavelets lead to multiresolution processing, hence images can be represented with
various degrees of resolution.

Compression:
 It deals with techniques to reduce the storage space required to save an image, or the
bandwidth required to transmit it over the network. It has to major approaches
a) Lossless Compression
b) Lossy Compression

Morphological processing:
 It deals with extracting image components which are useful in the representation and
description of shape and boundary of objects.
 It is majorly used in automated inspection applications.

Knowledge base:
 Knowledge about a problem domain is coded into an image processing system in the
form of a knowledge base.
 As information or details of an image is located in knowledge base, thus it avoids search
that has to be conducted in seeking the information.

Segmentation:
 Image Segmentation is the process by which a digital image is partitioned into
various subgroups called Image Objects, which can reduce the complexity of the
image, and thus analysing the image becomes simpler.
 Image segmentation is mainly used to locate objects and boundaries (lines, curves,
etc.) in images.

Representation and description:


Representation:
 Output of segmentation is raw pixel data; this raw pixel data is converted &
represented in the form which is suitable for computer processing
 Representation can be based on:
 External (boundary) characteristics
 Internal (texture or colour) characteristics. This data is useful to computer.
Description:
Next task is to Describe the feature (or region) based on representation.
 A region may be represented by its boundary & its boundary is described by features
such as its length, diameter & curvature etc.
 Description is also called as feature selection, deals with extracting the quantitative
information such as length, height, so that these features can be used to classify the objects
Recognition: It is the process the assigns a label (e.g., “vehicle”) to an object based on its
descriptors

COMPONENTS OF AN IMAGE PROCESSING SYSTEM


Sensors:
 With reference to sensing, two elements are required to acquire digital image. The
first is a physical device that is sensitive to the energy radiated by the object we wish
to image and second is specialized image processing hardware.

Specialized image processing hardware:


 It consists of the digitizer, specialised hardware which performs, arithmetic & logic
operations on images. Also perform averaging (filtering) operations as quickly as
they are digitized, for the purpose of noise reduction. This type of hardware is called
a front- end subsystem. This unit performs functions that require fast data
throughputs (e.g., digitizing and averaging video images at 30 frames/s) that the
typical main computer cannot handle.

Computer
 It is a general-purpose computer and can range from a PC to a supercomputer
depending on the application. In dedicated applications, especially designed computer
are used to achieve a required level of Performance

iv) Software:
 It consists of specialized modules that perform specific tasks.
 More sophisticated software packages allow the integration of different specialised
libraires & modules
 Well-designed IDE with GUI, packages & different tools ease process of writing
code, thus user can focus on development of algorithms.

v) 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
i) Short term storage for use during processing
ii) On line storage for relatively fast retrieval
iii) Archival storage such as magnetic tapes and disks
ELEMENTS OF VISUAL PERCEPTION

Structure of the Human Eye


The Human eye is best vision model
Knowledge of how images form in the eye can help us processing digital images.

Eye characteristics
 Nearly spherical
 Approximately 20 mm in diameter
Three membranes (layers)
 Outer membrane:
o It’s made up 2 things; Cornea (transparent) & Sclera (opaque).
o The Sclera is white outer layer of the eyeball. It provides attachments for the
muscles that control the eye’s movement.
o The cornea is the transparent part of the eye that covers the front portion of the
eye. It covers the pupil & iris. It serves as the eye’s “window”, which allows the
light in and bends its rays, thereby providing most of the eye’s focusing power.

 Middle membrane: Choroid


o The choroid contains connective tissues, and lying between the retina and
the sclera. Its supplies oxygen and nutrition to the eye.
 Inner Membrane: Ratina
o Retina is responsible for the perception of images – vision. The retina is a light-
sensitive layer composed of sensory cells, called light- or photoreceptor cells

o
o Two types of photoreceptor cells: rods and cones. Rods provide the perception of
black-and-white vision, mostly in dim light, whereas cones help to see colours in
daylight.
o Cones and rods convert light energy into signal to human brain via optic nerve
Function of eye:
 Our eyes capture and focus light like a camera. Below are the steps of how an eye works:
 Light rays enter the eye through the cornea. The amount of light which is passed
through the pupil is controlled and maintained by iris.
 From Iris, the light hits the lens. From lens, light rays focus onto the retina.
 When the light rays reach the retina (sensory system), the light-sensitive nerve layer is
activated in which the image appears inverted.

Image Formation in the Eye


 The main difference between the lens of the eye and an optical lens is that; the lens of
the eye is flexible.
 The radius of curvature of the front surface of the lens is greater than the radius of its
back surface.
 The shape of the lens is controlled by controlling muscles of the ciliary body.
o To focus on distant objects; shape of lens changes => lens become thinner
o To focus on nearer objects, lens become thicker
 The distance between the centre of the lens and the retina is called the focal length; it
varies from 17mm to 14mm, as the refractive power of the lens increases from its
minimum to its maximum.
 When the eye focuses on
o Far away objects (more than 3m), then lens is less refractive.
o Nearby object (less than 3m), then lens is strongly refractive.
 This information is used to calculate the size of the retinal image of any objects

Problem:
 From the Observer is looking at 15m height tree at distance of 100m. Calculate the
calculate the size of the retinal image?

Solution:
Brightness Adaptation and Discrimination & Weber ratio
• The human visual system can perceive approximately 1010 different light intensities levels.
• But, at a given point of time, eye cannot operate over the entire range simultaneously, the
eye can only observe a small range of illuminations.
• Human eye takes finite time to adjust its sensitivity level to accomplish large variation in
the intensities of the light. This phenomenon is known as brightness adaptation.
• Example: When the power supply of our homes is cut-off in the night. Everything seems
to be pitch dark and nothing can be seen for some time. This is because the eye takes a
finite time to adapt itself to this new range. Gradually eyes adjust to this low level of
illumination and then things start getting visible in dark.
• For any given set of conditions, the current sensitivity level of human eye is called the
brightness adaptation level.
• Brightness discrimination is the ability of the eye to discriminate between changes
in light intensity at any specific adaptation level.

Weber ratio:
• Ratio of increment of illumination (Ic) discriminable 50% of the time to background
illumination I, is called the Weber ratio

Where: ∆𝐼𝑐 : The increment of illumination discriminable 50% of the


time I : Background illumination

• A small value of Weber ratio, means good brightness discrimination.

Light and the Electromagnetic Spectrum


• Light is a particular type of EM radiation that can be seen by human eye.
• EM waves are massless particles each traveling in a wavelike pattern and moving at
a speed of light.
• We can specify waves through frequency and wavelength.
• The colors that human perceive in an object are determined by the nature of the
light reflected from the object.
Achromatic Light (Grey)
Light that is void of color is called achromatic or monochromatic light.
The only attribute of such light is its intensity.
The term gray level generally is used to describe monochromatic intensity because it
ranges from black to grays and finally to white
Chromatic light
Spans EM spectrum from 0.43 um (violet) to 0.79 um (red).
Three basic quantities are used to describe the quality of a chromatic light source
 Radiance
 Luminance
 Brightness
• Radiance: Total amount of energy that flows from the light source, and measured
in watts (W)
• Luminance: Measured in lumens (lm), gives a measure of the amount of energy
an observer perceives from a light source
• Brightness: Subjective descriptor of light perception that is practically impossible
to measure.
Radiance: Total amount of energy that flows from the light source, and measured in
watts (W)  Luminance: Measured in lumens (lm), gives a measure of the amount of
energy an observer perceives from a light source  Brightness: Subjective descriptor of
light perception that is practically impossible to measure

Image Sensing and Acquisition


Image Sensors:
Whenever light energy falls on Sensing material; it produces an electrical output proportional
to light intensity. Then digital quantity is obtained from each sensor by digitizing its response.

There are 3 principal sensor arrangements


These produce an electrical output proportional to light intensity.
1. Single imaging Sensor
2. Line sensor
3. Array sensor

Image Acquisition
1. Image Acquisition using a single sensor
2. Image Acquisition using a Sensor strips
3. Image Acquisition using a Sensor Arrays
1. Image Acquisition using a single sensor

 The most commonly used this type of sensor is photodiode, it is constructed using silicon
materials and its output voltage waveform is proportional to light.
 The filter is used in front of a sensor to improve the selectivity. For example, a green
(pass) filter in front of a light sensor allows only the green band light of the colour
spectrum. So, the sensor output will be stronger for green light than for other components
in the visible spectrum.
 In order to generate a 2-D image using a single sensor, there has to be relative
displacements in both the x- and y-directions between the sensor and the area to be
imaged.
 Figure shows an arrangement used for 2D Image scanning;
o A film negative is mounted on a drum. Mechanical rotation of drum provides
displacement in one dimension.
o The single sensor is mounted on a lead screw that provides motion in the
perpendicular direction.
 Since mechanical motion can be controlled with high precision, this method is an
inexpensive (but slow) way to obtain high-resolution images.
 Other similar mechanical arrangements use a flat bed, with the sensor moving in two
linear directions.

2. Image Acquisition using a Sensor strips


 Arrangement for 2D image [Linear or In-line sensor strip] [Fig a)
o The sensor strip provides imaging elements in one dimension.
o Motion perpendicular to the strip provides imaging in the other dimension.
 Most of flatbed scanners use such kind of arrangements. 4000 or more in-line sensors can used
in such Sensing devices.
 In airborne imaging applications use In-line sensors.
o Here the imaging system is mounted on an aircraft, which flies over the geographical area to
be imaged.
o The sensor strips which respond to various bands of the electromagnetic spectrum are
mounted perpendicular to the direction of flight.
o The sensor strip gives imaging in one direction and the motion of the aircraft completes
the other dimension of an image.

Arrangement for 3D image [Circular sensor strip] (Fig b)


 Sensor strips are mounted in a ring configuration & at one part of ring, X ray source is placed.
 The object is passed through the centre of ring. A rotating X-ray source provides illumination
and pass through the object. The sensors opposite to X- ray source around the ring, collect the
X-ray energy from object.
 This kind of setup used in medical and industrial imaging to obtain cross-sectional (“slice”) images of
3-D objects
 This is the basis for medical and industrial computerized axial tomography (CAT) imaging.

3.Image Acquisition using a Sensor Arrays

 The Individual are sensors arranged in the form of a 2-D array.


 This type of Image acquisition is used in digital cameras.
 A typical sensor used in digital cameras is a CCD array. These CCD sensors can also be used in
light sensing instruments.
 The response of each sensor is proportional to the integral of the light energy projected onto
the surface of the sensor.
 The first function performed by the imaging system is to collect the incoming energy and focus
it onto an image plane.
 If the illumination is light, the front end of the imaging system is a lens, which projects the
viewed scene onto the focal plane. The sensor array, which is coincident with the focal plane,
produces outputs proportional to the integral of the light received at each sensor.
 Advantage: Since sensor array is 2D, Complete image can be obtained by focusing the energy
pattern onto the surface of the array. No motion required.
A SIMPLE IMAGE FORMATION MODEL [MONOCHROMATIC OR GREY LEVEL]
 An image can be represented 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 or gray level of the image at that point.
 The amplitude or intensity is positive scalar quantity.
 When an image is generated from a physical process, its values are proportional to energy
radiated by physical source.
 Because of this fact, f(x,y) must be nonzero and finite; that is

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


o Illumination i(x,y) : The amount of source illumination incident on the scene being viewed
&
o Reflectance r(x,y) : The amount of illumination reflected by the objects in the scene.

 The two function combine as product to form f(x,y):


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

where 0 < i(x,y)< ∞ &


0 <r(x,y)< 1
r(x,y)=0 means total absorption
r(x,y)=1 means total reflectance.

 The intensity of a monochrome image at any coordinates (x,y) is called as the gray level (l) of
the image at that point.
=f(x,y).
 The interval of l ranges from [0, L-1].
 Where l=0 indicates black and l=1 indicates white.
 All intermediate values are shades of gray varying from black to white.
 The value of L depends on the number of bits used to represent each pixel.
 If 8 bits are used, then L = 28 = 256
Then interval of l ranges from [0, 255].

Image Sampling and Quantization


 Sampling and quantization are the two processes used to convert continuous image into digital
image.
 To obtain a digital image, f(x,y) must be digitized both in space and amplitude.
 Image Sampling: Digitization of spatial coordinates (along x axis)
 Image Quantization: Digitization of amplitude or intensity or grey-levels (along y axis)
 Consider a Continuous Image which is shown in fig a
 Consider line AB in continuous image fig (a). The line AB can be treated as the one-
dimensional function of continuous Image.
 The plot of amplitude (intensity or gray level) values only
 along the line segment AB is shown in fig b. The random variation is due to the image
noise.
 To sample this function or discretize the image;
 First we take equally spaced samples along line AB (along x axis) as shown in fig c.
Here discretization of spatial coordinates is performed ie sampling process is
completed.
 Then , we take samples along y-axis as shown in fig d; that is the gray level
values along y axis are converted(quantized) into discrete quantities. The grey
level scale is divided into eight discrete levels, ranging from black to white. This
completes the quantization process.
 The digital samples resulting from both sampling and quantization are shown as white
squares in fig d.
 Here only single line AB (one dimension) of continuous image is considered & digitized.
 To digitize the whole continuous Image, we have to start from top of the continuous
image and carry out this procedure downward, line by line, then produces a two-
dimensional digital image.
 Also, number of discrete levels used, the accuracy achieved in quantization is highly
dependent on the noise content of the sampled signal
 The result of both sampling and quantization are shown in fig

Representing Digital Image


 The quantized or digitized image f(x,y) can be represented in terms of conventional coordinate
system. Each dot represents the smallest element of the image which is called as pixel (picture
element).
 Each pixel has finite value. Here amplitude f represents the pixel value at (x,y) coordinates.
 Thus, digital image is composed of finite number of pixels. These pixel values of image can be
represented in terms matrix with M rows & N columns.
 To store the image in digital memory, each pixel is
represented using K bits ie k bits per pixel.
 Then image will be having L= 2K grey levels. Dynamic
range = [0, L-1]
 When an image can have 2K gray levels, then image is
referred as a “k-bit image”.
 Therefore, the number of bits required to store a
digitalized image of size M*N is
b  M *N*k
 Example:
o If 8 bits are used to represent each pixel, then L= 28 =256 grey levels
o Thus 8 bit image will have 256 grey levels with range 0 to 255; that is L=[0, 255]

Spatial and Gray-Level Resolution


Spatial resolution:
Spatial resolution simply refers to the smallest discernible detail in an image
o Vision specialists will often talk about pixel size
o Graphic designers will talk about dots per inch (DPI)
Gray level (Intensity Level) resolution:
o Intensity level resolution refers to the number of intensity levels used to represent the image □
o The more intensity levels used, the finer the level of detail discernible in an image
o Intensity level resolution is usually given in terms of the number of bits used to store each
intensity level

Aliasing and Moire Patterns


 Shannon sampling theorem tells us that, if the function is sampled at a rate equal to or greater
than twice its highest frequency (fs≥fm ) , then it is possible to recover completely the original
function from the samples.
 If the function is under sampled, then a phenomenon called aliasing(distortion) (If two pattern
or spectrum overlap, the overlapped portion is called aliased) corrupts the sampled image.
 The corruption is in the form of additional frequency components being introduced into the
sampled function. These are called aliased frequencies.
 The principal approach for reducing the aliasing effects on an image is to reduce its high
frequency components by blurring the image prior to sampling. However, aliasing is always
present in a sampled image. The effect of aliased frequencies can be seen under the right
conditions in the form of so-called Moiré patterns.

 A moiré pattern is a secondary and visually evident superimposed pattern created, for example,
when two identical (usually transparent) patterns on a flat or curved surface (such as closely
spaced straight lines drawn radiating from a point or taking the form of a grid) are overlaid
while displaced or rotated a small amount from one another

Zooming and Shrinking:


Zooming
 Digital Image Zooming may be viewed as oversampling and shrinking many be viewed as under-
sampling. Zooming is a method of increasing the size of a given image.
 Zooming requires two steps:
o creation of new pixel locations, and
o the assigning new grey level values to those new locations.
 Nearest neighbour interpolation: Nearest neighbour interpolation is the simplest method and
basically makes the pixels bigger. The intensity of a pixel in the new image is the intensity of
the nearest pixel of the original image.
 If you enlarge 200%, one pixel will be enlarged to a 2 x 2 area of 4 pixels with the same color as
the original pixel.
 Bilinear interpolation: Bilinear interpolation considers the closest 2x2 neighborhood of known
pixel values surrounding the unknown pixel. It then takes a weighted average of these 4 pixels
to arrive at its final interpolated value. This results in much smoother looking images than
nearest neighbour.

Shrinking:
Image shrinking is done in a similar manner as just described for zooming. The equivalent process of
pixel replication is row-column deletion. For example, to shrink an image by one-half, we delete every
other row and column.

Basic Relationship between pixels.


Relationship between pixels can be used for region analysis
 Neighbourhood
 Adjacency
 Connectivity
 Paths
 Regions and boundaries
 Distance Measures

Neighbours of a Pixel
1. N4 (p) : 4-neighbors of p.
2. ND(p) : Diagonal neighbours of p.
3. N8 (p): 8-neighbors of p.

1. N4 (p) : 4-neighbors of p.
 Any pixel p(x, y) has two vertical and two horizontal neighbours, given by
(x+1, y), (x-1, y), (x, y+1),
(x, y-1)
 This set of pixels are called the 4-neighbors of P, and is denoted by N4 (P)
 Each of them is at a unit distance from P.

2. ND(p) : Diagonal neighbours of p.


The 4- diagonal neighbours are: ND(p) are given by:
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)

2. N8 (p): 8-neighbors of p.
N4 (P)and ND(p) together are called 8-neighbors of p, denoted by N8 (p).
N8 = N4 U ND
Some of the points in the N4 , ND and N8 may fall outside image when P lies on the
border of image

Adjacency
Two pixels are connected if
 they are neighbours [N4(P), ND(P), N8(P) ] and
 their grey levels satisfy similarity criteria (should be part of set V)

Let V be the set of intensity used to define adjacency;


Example : For binary image V={1} or V= {0,1} or V={0}
For grey-scale image set may be V={ any values from 0 to 255}

Three types of adjacency :


 4-adjacency:
 8-adjacency:
 m-adjacency (mixed adjacency):

4-adjacency:
Two pixels p & q are 4-adjacencant if

2. p & q are N4 Neighbours ie (p & q ∈ N4 (P)


1. p & q should belong to set V

Example: Check with all pixels, P is 4-adjacent


V = {1}
1 ( q1)
1 (q2) 0 (q3)
1 ( q1)
1 (q2) 0 (q3)

1 (q4)
1 p 0 (q5)
1 (q4)
1 p 0 (q5)

1 (q6)
0 (q7) 1 (q8)
1 (q6)
0 (q7) 1 (q8)

1. (p, q2) ∈ V & (p, q2) are N4(P); hence p & q2 are adjacent
Now :

2. (p, q4) ∈ V & (p, q4) are N4(P); hence p & q4 are adjacent

8-adjacency :
Two pixels p & q are 8-adjacencant if

2. p & q are N8 Neighbours i.e. (p & q ∈ N8 (P)


1. p & q should belong to set V

Example: Check with all pixels, P is 8-adjacent


V = {1, 2},

0 ( q1)
1 (q2) 1 (q3)
0 ( q1)
1 (q2) 1 (q3)

0 (q4)
1 p 0 (q5)
0 (q4)
1 p 0 (q5)

0 (q6)
0 (q7)
1 (q8)
0 (q6)
0 (q7)
1 (q8)

1. (p, q2) ∈ V & (p, q2) are N8(P); hence p & q2 are adjacent
Now :

2. (p, q3) ∈ V & (p, q3) are N8(P); hence p & q3 are adjacent
1. (p, q8) ∈ V & (p, q8) are N8(P); hence p & q8 are adjacent

m-a djacency :
Two pixels p & q are m-adjacent if
1. p & q should belong to set V
2. q is in N4(p) OR
q is in ND(p) & the set N4(p) n N4(q) have no pixels whose values are from ‘V’.

Example :
1. Check whether q2 & q3 are m-adjacent
V= {1}

0 ( q1)
1 (q2) 1 (q3)

0 (q4)
1 p 0 (q5)

0 (q6)
0 (q7) 2 (q8)

1. (q2, q3) ∈ V
Soln :

2. (q2, q3) ∈ N4
Hence (q2, q3) are m adjacent

2. Check whether p & q3 are m-adjacent

0 ( q1)
1 (q2) 1 (q3)

0 (q4)
1 p 0 (q5)

0 (q6)
0 (q7) 2 (q8)

Soln :
Here p & q3 are NOT m adjacent

3. Check whether p & q8 are m-adjacent


0 ( q1)
1 (q2) 1 (q3)

0 (q4)
1 p 0 (q5)

0 (q6)
0 (q7)
2 (q8)

Soln :
m adjacent
Connectivity
 Two pixels are said to be connected if they are adjacent in some sense.
 They are neighbours (N4, ND, N8) and o Their intensity values (gray levels) are similar.

Problem :
Consider the two image subsets, S1 and S2, shown in the following figure.
For V={1}, determine whether these two subsets are (a) 4-adjacent, (b) 8-adjacent, or (c) m-adjacent.

Solution:
Let p and q be as shown in Fig. Then:
(a) S1 and S2 are not 4-connected because q is not in the set N4(p);
(b) S1 and S2 are 8-connected because q is in the set N8(p);
(c) S1 and S2 are m-connected because (i) q is in ND(p), and (ii) the set N4(p) ∩ N4(q) is empty

Path
A path (curve) from pixel p(x,y) to pixel q (s,t) is a sequence of distinct pixels:
(x0, y0), (x1,y1), ……., (xn, yn)

 where (x0, y0) = (x, y), (xn, yn) = (s, t) => ie path is from p (x0, y0) to q (xn, yn)
 and pixels (xi, yi) and (xi-1, yi-1) are adjacent for 1≤ i ≤ n.
 In this case, n is the length of the path.
 If (x0, y0) = (xn, yn) the path is a closed path.
 The path can be defined 4-,8-, m-paths depending on adjacency type.
 Let S be a subset of pixels in an image.
 Two pixels p and q are said to be connected in S if there exists a path between them
consisting entirely of pixels in S
 For any pixel p in S, the set of pixels that are connected to it in S is called a connected
component of S. If it only has one connected component, then set S is called a connected
set.
Problems:
1. Consider the image segment shown. Let V={0, 1} and compute the lengths of the shortest
4-path, 8-path, and m-path between p and q. If a particular path does not exist between these
two points, explain why.

Soln :
4-path
Given : V={0, 1}

4-path does not exist between p and q because it is impossible to get from p to q by traveling along
points that are both 4-adjacent and also have values from V .

8-path
Given : V={0, 1}

The shortest 8-path is shown in Fig. its length is 4.

m-path
Given : V={0, 1}

The length of the shortest m- path is 5.


Note : Here first look for N4(P), if it does not exist then only go for ND(P)
Regions and boundaries
 Let R be a subset of pixels in an image. We call R a region of the image if R is a connected set.
 The boundary (also called border or contour) of a region R is the set of pixels in the region that
have one or more neighbours that are not in R.

Distance Measures
Given pixels p, q and z with coordinates (x, y), (s, t), (u, v) respectively, the distance function D has
following properties:
 D(p, q) ≥ 0 [D(p, q) = 0, iff p = q]
 D(p, q) = D(q, p)
 D(p, z) ≤ D(p, q) + D(q, z)

The following are the different Distance measures:


Euclidean Distance:
De(p, q) = [(x-s)2 + (y-t)2 ] 1/2

The pixels having a distance less than or equal to some value r from (x, y) are the points contained in a
disk of radius r centered at (x, y).

City Block Distance:

D4(p, q) = |x-s| + |y-t|


The pixels having a D4 distance from (x, y) less than or equal to some value r form a diamond centred
at (x, y). For example, the pixels with D4 distance ≤ 2 from (x, y) (the centre point) form the following
contours of constant distance:
The pixels with D4=1 are the 4-neighbors of (x, y).

Chess Board Distance:


D8(p, q) = max(|x-s|, |y-t|)
The pixels with D8 distance from (x, y) less than or equal to some value r form a square centered at (x,
y). For example, the pixels with D8 distance ≤ 2 from (x, y) (the center point) form the following
contours of constant distance:
The pixels with D8=1 are the 8-neighbors of (x, y).

Linear Operations & Non Linear Operations


Let H be an operator
H is said to be a linear operator if, for any two images f and g and any two scalars a and
b, H(a f + b g) = a H( f ) + b H( g ).
An operator that fails the test of Eq. is by definition nonlinear
Miscellaneous

Problem
A common measure of transmission for digital data is the baud rate defined as the bits transmitted per
second. Generally, transmission is accomplished in packets consisting of a start bit, A byte (8 bits) of
information and a stop bit using these facts. Find how many minutes would it take to transmit a
2048x2048 image with 256 intensity levels using a 33.6 K baud modem?

Solution :

Given : 8 bits + 2 bits = 10 bits /pixel


Total no of bits = 2048 x 2048 x 10 = 41943040 bits

Here 33.6 x 103 bits 1 sec


41943040 bits

Time = 41943040 x 1
33.6 x 103

Time = 1248.3047619 sec


Time = 20.80 Minutes

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy