Ec2029 - Digital Image Processing

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 143

Ec 2029DIGITAL IMAGE PROCESSING

COURSE MATERIAL
--------------------------------------------------------------------
-----
SCRIPTED AND COMPILED BY

Mrs.S.Chandravadhana
ASSISTANT PROFESSOR
DEPARTMENT OF ECE

AGNI COLLEGE OF TECHNOLOGY


THALAMBUR, CHENNAI

ACADEMIC YEAR: 2012-2013


CONTENTS

S.NO NATURE OF CONTENT PAGE.NO

1 SUBJECT SYLLABUS 3
2 LECTURE NOTES 4
3 QUESTIONS BANK 123
4 ASSIGNMENT QUESTIONS 143
DIGITAL IMAGE PROCESSING E C 2029 L T P C3 0 0 3

UNIT I DIGITAL IMAGE FUNDAMENTALS 9


Elements of digital image processing systems, Vidicon and Digital Camera working
principles, Elements of visual perception, brightness, contrast, hue, saturation,
machband effect, Color image fundamentals - RGB, HSI models, Image sampling,
Quantization, dither, Two-dimensional mathematical preliminaries, 2D transforms -
DFT, DCT, KLT, SVD.

UNIT II IMAGE ENHANCEMENT 9


Histogram equalization and specification techniques, Noise distributions, Spatial
averaging, Directional Smoothing, Median, Geometric mean, Harmonic mean,
Contraharmonic mean filters, Homomorphic filtering, Color image enhancement.

UNIT III IMAGE RESTORATION 9


Image Restoration - degradation model, Unconstrained restoration - Lagrange
multiplier and Constrained restoration, Inverse filtering-removal of blur caused by
uniform linear motion, Wiener filtering, Geometric transformations-spatial
transformations.

UNIT IV IMAGE SEGMENTATION 9


Edge detection, Edge linking via Hough transform – Thresholding - Region based
segmentation – Region growing – Region splitting and Merging – Segmentation by
morphological watersheds – basic concepts – Dam construction – Watershed
segmentation algorithm.

UNIT V IMAGE COMPRESSION 9


Need for data compression, Huffman, Run Length Encoding, Shift codes, Arithmetic
coding, Vector Quantization, Transform coding, JPEG standard, MPEG.

TOTAL= 45 PERIODS
TEXTBOOKS:
1. Rafael C. Gonzalez, Richard E. Woods, , Digital Image Processing', Pearson ,
Second Edition, 2004.
2. Anil K. Jain, , Fundamentals of Digital Image Processing', Pearson 2002.
EC2029 DIGITAL IMAGE PROCESSING

UNIT I DIGITAL IMAGE FUNDAMENTALS

Elements of digital image processing systems, Vidicon and Digital Camera working principles, Elements of visual perception,
brightness, contrast, hue, saturation, mach band effect, Color image fundamentals - RGB, HSI models, Image sampling, Quantization,
dither, Two-dimensional mathematical preliminaries, 2D transforms -DFT,DCT, KLT, SVD.

1.1 Elements of digital image processing systems


An image may be defined as a two-dimensional function, where x and y are spatial coordinates, and the amplitude of at any
pair of coordinates is called the intensity or gray level of the image at that point. When x, y, and the amplitude values of are all finite,
discrete quantities, we call the image a digital image.

A digital image is an image f(x,y) that has been discretized both in spatial coordinates and brightness. A digital image is
composed of picture elements, of ones and zeros.

The advantages of digital images are

 The processing of images is faster and more cost-effective.


 the quality of the image stays good unless it is compressed.
 By changing the image format and resolution, the image can be
used in a number of media.

The disadvantages of digital images are

 Misuse of copyright is easier


 A digital file of a certain size cannot be enlargened with a good
quality

Table. 1 Analog versus digital image is tabulated below

Analog Image Digital image

An analogical image, is a paper image, includes A digital image is composed of picture


color surfaces elements, of ones and zeros.

Density expresses details of darkness as well as Converting an image into digital format can be
transmittance values. These values can be done with a digital camera, a scanner, or by
measured and examined with a help of a converting a moving image on a video tape into
densitometer. digital format.

With the help of density values, the color Digital image files can be processed in many
reproduction ability of the surface and press ways on a computer screen.
process can be measured.

1.1.1 Pixels and Bitmaps


Digital images are composed of pixels (short for picture elements). Each pixel represents

the color (or gray level for black and white photos) at a single point in the image, so a pixel is like a tiny dot of a particular color.
By measuring the color of an image at a large number of points, we can create a digital approximation of the image from which a copy
of the original can be reconstructed. Pixels are a little like grain particles in a conventional photographic image, but arranged in a
regular pattern of rows and columns and store information somewhat differently. A digital image is a

rectangular array of pixels sometimes called a bitmap.

1.1.2 Types of Digital Images

Binary Images/ Black and White Images

Each pixel is just black or white. Since there are only two possible values for each pixel, we only need one bit per pixel. Such images
can therefore be very efficient in terms of storage. Images for which a binary representation may be suitable include text (printed or
handwriting), fingerprints, or architectural plans.

Gray scale images

Grayscale is a range of shades of gray without apparent color. The darkest possible shade is black, which is the total absence of
transmitted or reflected light. The lightest possible shade is white, the total transmission or reflection of light at all visible wavelength
s.

Intermediate shades of gray are represented by equal brightness levels of the three primary colors (red, green and blue). the brightness
levels of the red (R), green (G) and blue (B) components are each represented as a number from decimal 0 to 255, or binary 00000000
to 11111111.

Thus, For black, R=G=B=0, For white, R=G=B=255

Color Images

A color image is made up of pixels each of which holds three numbers corresponding to the red, green, and blue levels of the image at
a particular location. Red, green, and blue (sometimes referred to as RGB) are the primary colors for mixing light—these so-called
additive primary colors are different from the subtractive primary colors used for mixing paints (cyan, magenta, and yellow). The
specific color that a pixel describes is some blend of three components of the color spectrum - RGB.

Indexed Color Images

Some color images are created using a limited palette of colors, typically 256 different colors. These images are referred to as indexed
color images because the data for each pixel consists of a palette index indicating which of the colors in the palette applies to that
pixel.

1.1.3 Resolution
The more points at which we sample the image by measuring its color, the more detail we can capture. The density of pixels in an
image is referred to as its resolution. The higher the resolution, the more information the image contains.

For example, a 15-inch VGA (see display modes) monitor has a resolution of 640 pixels along a 12-inch horizontal line or about 53
pixels per inch. A smaller VGA display would have more pixels per inch.
1.1.4 What Is Digital Image Processing?
The field of digital image processing refers to processing digital images by means of a digital computer. Digital image processing
encompasses processes whose inputs and outputs are images

and in addition, encompasses processes that extract attributes from images, up to and including the recognition of individual objects.

1.1.5 Applications of digital image processing


The areas which routinely utilizes the digital image processing techniques is given below. Here the examples are categorized
according to the source.

 Images based on radiation from the EM spectrum


Figure shows the spectrum grouped according to energy per photon.

Fig. 1 EM Spectrum

Gamma rays imaging: used in nuclear medicine and astronomical applications. Examples are bone scan, positron
emission tomography (PET) image etc.

X-ray Imaging: used in medical diagnostics and in industries. Examples are Chest X-ray, head CT, X-ray image of an
electronic circuit board –to examine circuit boards etc.

Images in the Ultraviolet band; includes lithography, industrial inspection, microscopy, lasers, biological imaging.
Examples are florescence microscopic image of normal corn, a corn affected by smut (a disease) etc.

Images in the visible and infrared bands: uses microscope to obtain images. Examples are microscopic images, remote
sensing, whether observation and prediction (satellite images), infrared satellite images, imaging in the visual
spectrum such as identification of missing items and missing pills etc, thumb print etc.

Imaging in the microwave band: Used in radar. An imaging radar works like a fash camera in that it provides its own
illumination (microwave pulses) to illuminates an area on the ground and take a snapshot image. Examples are image
covering rugged mountainous area.

Imaging in the radio band: used in medicine and astronomy. This technique places a patient in a powerful magnet and
passes radiowaves through the body in short pulses. Examples are MRI images of human knee and spine.

 Other imaging modalities


Acoustic imaging- finds application in geological exploration, industry and medicine. The strength and speed
of the returning sound waves are determined by the composition of the earth below the surface is an example.
Ultrasound image is used in manufacturing. In medicine, it finds application in obstetrics where unborn babies are
imaged to determine health of their development.

Electron microscopy- uses focused beam of electron instead of light. A transmission electron microscope
(TEM) passes psses electrons through a specimen. A scanning electron microscope (SEM) scans the electron beam
and records.

Synthetic (computer generated) imaging – Fractals are striking examples of computer generated images.

1.1.6 Most common image formats


Bmp Bit map format

Tiff Tagged Image File Format

Eps Encapsulated PostScript


Jpeg Joint Photographic Expert Group

Gif Graphics Interchange Format

Psd PhotoShop’s working file

Png Portable Network Graphics

Pdf Portable Document File

1.2 Vidicon and Digital Camera working Principles


Vidicon camera is a term which commonly used for all types of television cameras. (Strictly, a vidicon is a TV camera tube in which
the target material is made of Sb2S3.) The principle of operation of the vidicon camera is typical of that for other types of TV camera
tubes, i.e. vidicon, plumbicon, saticon, pasecon and newicon tubes. The vidicon camera tube is also sometimes called a hivicon tube.
Principle of operation
The image of the scene is focused on a transparent conductor coated with a photo resistive material, creating a matrix of spots
of varying electrical charge. An electron beam then scans the material, creating a video signal that represents the varying amounts of
light in the image. Vidicons are used in industrial television systems

Operational details

There is an electron gun, placed in a cylindrical pipe, which creates a small electron beam. To focus and deviate an electron beam in a
vidicon, electrostatic or magnet fields are used. One of the most significant parts of vidicon is a photoconductor target, containing a
transparent metallic film with a photoconductive layer from the side of an electron-optical system. Under the effect of light a vidicon
target accumulates electric charges, changing resistance of separate parts of the target and irregularly dispatching current potential in
the same manner as of dispatching brightness of separate parts of the picture. An electron beam, formed and deviated with magnet and
electrostatic fields, picks up these charges.

Fig. 2 Vidicon tube

There are a lot of various constructions of vidicon targets: some targets have two or three layers, some have a mosaic
structure or smooth and spongeous layers. photoconductive and photodiode are also the popular targets. photoconductive targets,
discharging depends on characteristics of a photoconductive layer and photoeffect. Depending on a target, vidicons are divided into
silicon vidicons, plumbicons, chalnicons, saticons and so on.

1.3 Digital Camera

Light is the predominant energy source for images; simply because it is the energy source which human beings can observe directly.
We are all familiar with photographs, which are a pictorial record of a visual scene. Many digital images are captured using visible
light as the energy source; this has the advantage of being safe, cheap, easily detected and readily processed with suitable hardware.
Two very popular methods of producing a digital image are with a digital camera or a flat-bed scanner.
Working principle of a digital camera

Digital camera uses an array of optical sensors that converts light intensity into electrical signals. Examples of sensors are CCD or
CMOS sensors. Digital camera has built in digital image processing chip to covert the raw data from the image sensor into a color‐
corrected image in a standard image file format.

Common types of CMOS camera are CCD camera, EMCCD (Electron multiplying CCD) camera and ICCD (Image intensified CCD)
camera.

CCD (Charge coupled devices)

CCD are fundamentally silicon based arrays of MOS diodes which has ability to store and transfer information through several charge
packets.

Fig. 3 (a) CCD Constructional details

A silicon diode photo‐sensor (A) that receives photons of various intensity. If the incident photons have sufficient energy to agitate
an electron motion away from the silicon layer, which generates a charge.

(A) A silicon diode photo‐sensor (a Pixel) that receives photons of various intensity. (B) The charge moves to a down‐stream
charge storage region, generating an analogous signal.

(C)The quantity of the accumulated charge, the sum of 0 or 1 (depending on the incident light intensity), is then amplified and
transmitted through a clock signal.

• An image is projected by a lense on the diode photo-sensor, causing each pixel to accumulate an electric charge proportional to the
light intensity at that location.

• Once the array has been exposed to the image, a control circuit causes each pixel to transfer its charges to its neighbor. The last
capacitor in the storage section sends its charge into a charge amplifier, which converts the charge into a voltage.

• By repeating this process y p g p (scanning across the photo-sensor), the control signal converts the charge information of the entire
pixel array (in (A)) to a sequence of voltages (output from (C)), which it samples, digitizes and stores in some memory format.

• The algorithms for voltage conversion results in digital images/videos of different formats. These stored images can then be
transferred to a printer, digital storage device or video display.
1.4 Elements of visual perception

When the eye is properly focused, light from an object outside the eye is imaged on the retina. Patten vision is afforded by the
distribution of discrete light receptors over the surface of the retina. When light enters the eye, it first passes through the cornea, then
the aqueous humor, lens and vitreous humor. Ultimately it reaches the retina, which is the light-sensing structure of the eye.

Fig. 4 cross sectional view of eye

Distribution of rods and cones (receptors) in the retina

The retina contains two types of cells, called rods and cones. Rods handle vision in low light, and cones handle color vision and detail.
When light contacts these two types of cells, a series of complex chemical reactions occurs. The chemical that is formed (activated
rhodopsin) creates electrical impulses in the optic nerve. Generally, the outer segment of rods are long and thin, whereas the outer
segment of cones are more, well, cone shaped. Below is an example of a rod and a cone:

The cones in each eye number between 6 and 7 million. They are located primarily in the center portion of the retina called the fovea
and or highly sensitive color. Humans resolve fine detail with these cones largely because each one is connected to its own nerve end.
Muscles controlling the eye rotate the eye ball until the image of an object of interest falls on the fovea. Cone vision is called photopic
or bright light vision.
Fig. 5 Distribution of rods and coness

The number of rods is mush larger: some 75 to 150 million are distributed over the retinal surface. They are not involved in color
vision and sensitive to low level of illumination. For ex, objects tht apperat brightly in day light when seen bye moon light appears as
color less forms because only the rods are simulated. This phenomenon is known as scotopic or dim light vision.

The area where there is a absence of the receptors is called blind spot. Center portion of the retina is called fovea. Receptors density is
measured in degrees from the fovea

Fig. 6 Rods and cones Fig. 7 Brightness adaptation

Brightness adaptation and discrimination

Scotopic vision is the vision of the eye under low light conditions. Photopic vision is the vision of the eye under well-lit conditions.
The transition from scotopic to photpic vision Is approximately ranges from 0.001 to 0.1. milli Lambarat (mL) (-3to -1mL in log
scale). The Subjective brightness is a log function of the light intensity incident on the eye. For a given set of conditions, the current
sensitivity level of the visual system is called The brightness adaptation. The short intersecting curve represents the range of subjective
brightness that eye can perceive when adapted to the level
Vision concept

When light enters the eye, it comes in contact with the photosensitive chemical rhodopsin (also called visual purple). Rhodopsin is a
mixture of a protein called scotopsin and 11-cis-retinal -- the latter is derived from vitamin A (which is why a lack of vitamin A causes
vision problems). Rhodopsin decomposes when it is exposed to light because light causes a physical change in the 11-cis-retinal
portion of the rhodopsin, changing it to all-trans retinal. This first reaction takes only a few trillionths of a second. The 11-cis-retinal
is an angulated molecule, while all-trans retinal is a straight molecule. This makes the chemical unstable. Rhodopsin breaks down
into several intermediate compounds, but eventually (in less than a second) forms metarhodopsin II (activated rhodopsin). This
chemical causes electrical impulses that are transmitted to the brain and interpreted as light. Here is a diagram of the chemical
reaction we just discussed:

Activated rhodopsin causes electrical impulses in the following way:

1. The cell membrane (outer layer) of a rod cell has an electric charge. When light activates rhodopsin, it causes a reduction in
cyclic GMP, which causes this electric charge to increase. This produces an electric current along the cell. When more light is
detected, more rhodopsin is activated and more electric current is produced.
2. This electric impulse eventually reaches a ganglion cell, and then the optic nerve.
3. The nerves reach the optic chasm, where the nerve fibers from the inside half of each retina cross to the other side of the
brain, but the nerve fibers from the outside half of the retina stay on the same side of the brain.
4. These fibers eventually reach the back of the brain (occipital lobe). This is where vision is interpreted and is called the
primary visual cortex. Some of the visual fibers go to other parts of the brain to help to control eye movements, response of
the pupils and iris, and behavior.

Eventually, rhodopsin needs to be re-formed so that the process can recur. The all-trans retinal is converted to 11-cis-
retinal, which then recombines with scotopsin to form rhodopsin to begin the process again when exposed to light.

Color Vision

The color-responsive chemicals in the cones are called cone pigments and are very similar to the chemicals in the rods. The retinal
portion of the chemical is the same, however the scotopsin is replaced with photopsins. Therefore, the color-responsive pigments are
made of retinal and photopsins. There are three kinds of color-sensitive pigments:

 Red-sensitive pigment
 Green-sensitive pigment
 Blue-sensitive pigment

Each cone cell has one of these pigments so that it is sensitive to that color. The human eye can sense almost any gradation of color
when red, green and blue are mixed.

Fig. 8 color vision principle

In the diagram above, the wavelengths of the three types of cones (red, green and blue) are shown. The peak absorbancy of blue-
sensitive pigment is 445 nanometers, for green-sensitive pigment it is 535 nanometers, and for red-sensitive pigment it is 570
nanometers.

Mach band and Simultaneous contrast


Perceived brightness is not simply a function of intensity. Instead it is based on the following two phenomenons: Mach band and
Simultaneous contrast

Mach band

Fig. 9 Mach Band effect

The visual appearance is that each stripe is darker at the right side that at its left. This is called Mach band effect. Although the
intensity of the stripes is constant, we actually perceive a

brightness pattern that is strongly scalloped near the boundaries. Mach band patterns appear in images Presented for interpretation or
analysis such as in chest X rays near the edges of the lungs or aerial surveillance images.

Simultaneous contrast

Fig. 10 Simultaneous contrast

All the center square have exactly the same intensity. But they appear to the eye to become darker as the background gets lighter. This
concept is called simultaneous contrast.

1.5 Colour Image Fundamentals

1.5.1 Color spectrum


Color spectrum divided in to six broad regions. They are Violet, Blue, green, yellow, Orange and red. Visible light is composed of a
relatively narrow band of frequencies in the electromagnetic spectrum. Chromatic light spans the EM spectrum from 400 to 700nm.
No color in the spectrum ends abruptly, but rather each color blends smoothly into the next

1.5.2 Chromatic light


The three basic quantities used to describe a chromatic light source are

1. Radiance
2. Luminance
3. Brightness
Radiance – is the total amount of energy that flows from the light source, measured in watts

Luminance – measured in lumens (lm), gives a measure of the amount of energy an observer perceives from a light source

1.5.3 Brightness, contrast, hue, saturation


Colors are usually distinguished from each other through the three characteristics: brightness, hue, and saturation.

Brightness- Brightness is an attribute of visual perception in which a source appears to be radiating or reflecting light. [1] In other
words, brightness is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being
observed.

Hue represents the dominant color as perceived by an observer (red, yellow, blue . . .).

Saturation is the amount of white added to a hue (purity of the color). The saturation of a color identifies how pure or intense the
color is. A fully saturated color is deep and brilliant—as the saturation decreases, the color gets paler and more washed out until it
eventually fades to neutral.

Contrast is the difference in visual properties that makes an object (or its representation in an image) distinguishable from other
objects and the background. In visual perception of the real world, contrast is determined by the difference in the color and brightness
of the object and other objects within the same field of view.

1.5.4 Characterization or specification of color


Hue and saturation together are called chromaticity. A color may also be characterized by its brightness and chromaticity. The
amounts of red, green, and blue needed to form any particular color are called the tristimulus values and are denoted as X, Y, Z.

X
x=
X +Y + Z ------ (1)

Y
y=
X +Y + Z ----------(2)

Z
z=
X +Y + Z -------- (3)
Let x =red, y = green and z= blue

x + y + z=1 --------- (4)


1.5.5 Chromaticity diagram
A way to specify colors is chromaticity diagram which is a color composition as a function of x (red) and y (green). For
any values of x and y, the corresponding value of z (blue) can be found as
z=1− x− y ------- (5)

It is useful for color mixing. The white point in the middle is called the point of equal energy has equal fractions of the
three primary colors

The point marked as “green” has approximately 62 % green and 25 % red. Therefore, it has about 13 % of blue. The
positions of different colors (from violet at 380 nm to red at 700 nm) are indicated by the wavelengths around the boundary
of the chromaticity diagram. Therefore they (boundary) are the Pure colors. Any point not on the boundary represents some
mixture of spectrum colors.

A straight line joining any two points in the diagram defines all the different color variations that can be obtained by
combining these two colors additively. A line drawn from the point of
equal energy to any point on the boundary defines all the shades of that particular color. Range of colors can be obtained
from any three given colors in the chromaticity diagram by connecting all the three colors by a triangle (color
gamut)shown. The irregular region inside the triangle represents the color gamut of the high-quality color printers. The
region is irregular since color printing involves a combination of additive and subtractive color mixing

1.5.6 Primary and secondary colors


Primary colors of light: red(R), green (G), blue (B). Secondary colors of light or primary color of pigment or colorant :
magenta (red + blue), cyan (green + blue), yellow (green+ red). Mixing the three primary colors of light (or a secondary
with its opposite primary color) in the right intensities produces white light. Mixing together the three secondary colors of
light, black (no light) can be produced.

1.5.7 Color Models


A color model (color space or color system) is a specification of a coordinate system and a subspace within that system
each color is represented by a single point. Color models are used in
- color monitors and printers
- color manipulation (color graphics for animation)
- Digital image processing
Types of Color Models (or color spaces)-- RGB color model CMY or CMYK color model
HSI or HSV color model. Other popular color models or color spaces are YIQ Color Space-The National Television
Systems Committee (NTSC) defines a color space known as YIQ. Y-luminance, I– hue and Q-saturation. YCbCr Color
Space-widely used for digital video Chrominance information is stored as two color-difference components (Cb and
Cr). Cb represents the difference between the blue component and a reference value. Cr represents the difference
between the red component and a reference value.

RGB color model:

In the model, each color appears in its primary spectral components of red green and blue. This model is based on
Cartesian coordinate system. Used generally in color monitors and color video cameras. Different colors in the Model are
defined by vectors extending from the origin. The number of bits used to represent each pixel in RGB space is called pixel
depth. If a pixel’s RGB has 8 bits each, then the pixel is said to have a depth of 24 bits. The term full color image is used
often to denote a 24 bit color image. The total number of colors in a 24 bit RGB image is (28)3 =16777216. Color planes
can be generated by varying two colors while keeping other color fixed.

216 safe RGB colors: These 216 colors, known as web safe colors, are recognized by all web browsers and operating
systems, which mean these colors, will look about the same within any browser. As 40 colors displayed differently between
PCs and MACs, they were eliminated. Each of them is formed from three RGB limited to [0, 51, 102, 153, 204, 255] or [00
33 66 99 CC FF]

CMY and CMYK color model

Cyan, magenta, and yellow are the secondary colors of light (or the primary colors of pigments). Mixing together the three
secondary colors of light, black (no light) can be produced. But this printing will produce, muddy looking black. So,
to produce true black (predominant color in printing), a fourth color black is added (CMYK). used for color printing and to
produce full-color photographs and designs.

Most color printing devices use CMY model. The conversion from RGB is done by

The above equation demonstrates that Light reflected from a surface coated with pure cyan
does not contain red i.e., C=1-R. Similarly, RGB values can be obtained from a set of CMY values by subtracting the
individual CMY values from 1.

Hardware oriented Vs application oriented models

All color models used today are oriented either hardware oriented or application oriented.
Color models used in color monitors and for color printing and to produce full-color photographs and designs are generally
referred as hardware oriented models. RGB and CMY/CMYK color models are the examples of hardware oriented
models.

Color models used in the creation of color graphics for animation or in general for color manipulation are called
application oriented models. HSI /HSV color model is an example of application oriented model.

HSI color model

HSI color model includes components of Hue, saturation and intensity. Hue is a color attribute that describes a pure color.
Saturation gives a measure of the degree to which pure color is diluted by white light. Intensity (gray level) is a most useful
descriptor of monochromatic images. Unlike brightness, intensity is measurable and interpretable. The HSI model
decouples the intensity component from color carrying information (hue and saturation) in a color image. HSI is an ideal
tool for developing image processing algorithm based on color description that are natural and intuitive to humans.

Converting colors from RGB to HSI

RGB can be viewed as a three monochromatic intensity images e.g., black(0,0,0) and white (1,1,1). Thus we will be able to
extract intensity from RGB image. Fig (a) shows the black and white as vertex and intensity is shown as dotted line
(referred as intensity axis) connecting these two (vertical).

The intersection of the plane with the intensity as would give us a point with intensity value in the range (0,1). The
saturation of a color increases as a function of distance from the intensity axis. Saturation on the intensity axis is zero as all
the points along the axis are gray. Fig (b) shows a plane defined by three points (black, white and cyan). As black and
white points are contained in the plane, the intensity axis is also included in the plane.

All the points in the plane are defined by the intensity axis and the boundaries of the cube have the same hue (cyan in this
case). Thus H, S and I values required to form the HSI can be obtained from the RGB color cube. By using the geometrical
formulas (given in next slide) any RGB point can be converted into Corresponding point in HSI color model.

The Hue(H) component of each RGB pixel is obtained by

The S component of each RGB pixel is obtained by

I component of each RGB pixel is obtained by


I = ( R+ G+ B )
3

All the equations can be derived from the geometry shown


When H is in this sector, the RGB components are given by the below equations

If the given value of H is in this sector we first subtract 120° from it.

Then the RGB components are

If H is in this range, we subtract 240° from it

Then the RGB components are


1.6 Components of general purpose image processing system

1.7 Image Sampling and Quantization


1.7.1 Digital image acquisition process
An image may be defined as a 2-d 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. If all x , y and amplitude of f are discrete, the
image is referred as digital image.

f(x, y) is characterized by 2 components

 Illumination component-amount of light incident on the scene


 Reflection component – amount of light reflected by the object
Thus,

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

Where, f(x, y) ,(x, y) and r(x, y) are non zero value and finite, i.e.,

0 < f(x, y) < ∞ , 0 < i(x, y) < ∞ , 0 < r(x, y) < ∞


1.7.2 Process of generating digital image

Converting gray values in to discrete component is called quantization. The quality of the image is determined to a large degree by
the number of samples and gray levels used in sampling and quantization.

1.7.3 Coordinate convention to represent digital images

f(x, y)=¿[f(0.0) f(0,1) ⋯ f(0,N−1)¿][f(1,0) f (1,1) ⋯ f(1,N−1)¿][ ⋮ ⋮ ⋮ ¿] ¿


¿

The result of sampling and quantization is a matrix of real numbers. f(x, y) is sampled so that the resulting digital image has M rows
and N columns.

1.7.4 Spatial and gray level resolution


Spatial resolution is the smallest discernible detail in an image. Often defined by line pairs per mm. for e.g., 1024 X 1024 image
subsampled down to 32 X 32 with constant gray level

Gray level resolution refers to the smallest discernible change in gray level. The measurement of discernible changes in gray level is a
highly subjective process. For. e.g.,

reducing gray-level, constant spatial resolution (452 X 374) from 8-bit (256 levels) to 1-bit (2 levels).

1.8 Connectivity
Used in establishing boundaries of objects and components of regions in an image. To establish connectivity, it must be determined if
they are adjacent in some sense and if their gray levels satisfy a specified criterion of similarity. Let V be the set of gray-level values
used to define connectivity, for example, in a boundary image, V={1} for the connectivity of the pixels with value 1.

Three types of Connectivity

• 4-connectivity: Two pixels p and q with values from V are 4-connected if q is in the set N 4(p)
• 8-Connectivity: Two pixels p and q with values from V are 8-connected if q is in the set N 8(p)
• M-connectivity(mixed connectivity): Two pixels p and q with values from V are m-connected if (i) q is in N 4(p) or
(ii) q is in ND(p) and the set N4(p)Ω N4(q) is empty
1.9 Trnsforms
1.9.1 Discrete Fourier Transform (DFT)
1.9.2 Discrete Cosine Transform (DCT)
1.9.3 Karhunen-Loeve Transform (KLT)
1.9.4 Singular Value Decomposition (SVD)

Appendix

Brightness

Brightness is an attribute of visual perception in which a source appears to be radiating or reflecting light.[1] In other words, brightness
is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being observed.

The brightness of a color identifies how light or dark the color is. Any color whose brightness is zero is black, regardless of its hue or
saturation.

There are different schemes for specifying a color's brightness and depending on which one is used, the results of lightening a color
can vary considerably.

Brightness indicates the lightness and darkness scale.

Contrast

Contrast is the difference in visual properties that makes an object (or its representation in an image) distinguishable from other objects
and the background. In visual perception of the real world, contrast is determined by the difference in the color and brightness of the
object and other objects within the same field of view. Because the human visual system is more sensitive to contrast than absolute
luminance, we can perceive the world similarly regardless of the huge changes in illumination over the day or from place to place.

Contrast

Contrast generally refers to the difference in luminance or grey level values in an image and is an important characteristic.

It can be defined as the ratio of the maximum intensity to the minimum intensity over an image.

Contrast ratio has a strong bearing on the resolving power and delectability of an image.

Larger this ratio, more easy it is to interpret the image. Satellite


images lack adequate contrast and require contrast improvement.

Contrast enhancement techniques expand the range of brightness values in an image so that the image can be efficiently displayed in a
manner desired by the analyst.

EC2029 DIGITAL IMAGE PROCESSING

UNIT II IMAGE ENHANCEMENT

Histogram equalization and specification techniques, Noise distributions, Spatial averaging, Directional Smoothing, Median,
Geometric mean, Harmonic mean, Contraharmonic mean filters, Homomorphic filtering, Color image enhancement

1.10 Introduction
Image enhancement refers to the accentuation of sharpening of image features such as edges, boundaries, or contrast to make a
graphic display more useful for display and analysis.

The principal objectives of enhancement process are

 to increase the dynamic range of the chosen features so that they can be detected easily
 to effectively display the data for subsequent visual interpretation. (e.g., satellite pictures)
 to improve the quality of an image as perceived by a human.
 to give output which is more suitable than the original image for a specific applications.

Image enhancement approaches fall into two broad categories

1. spatial domain methods

2. frequency domain methods

The term spatial domain refers to the image plane itself and techniques used in this category are based on direct manipulation of
pixels in an image. Frequency domain techniques are based on modifying the Fourier transform of an image

1.11 Image Enhancement in the spatial domain

Spatial domain methods operate directly on these pixels. Spatial domain processes will be denoted by the expression.

g( x , y )=T [ f ( x , y ) ]
Where

f(x, y) is the input image, g(x, y) is the processed image and T is an operator on f defined

over some neighborhood of (x, y)


Point operations OR Point processing

As enhancement at any point in an image depends only on the gray level at that point, techniques in this category often are referred to
as point processing. Point processing methods are based only on the intensity of single pixels.

Point Processing (example)

In fig(a) the effect of gray level transformation would be to produce an image of higher contrast than the original by darkening the
levels below m (compressing the value– towards

Black) and brightening the levels above m (expanding towards white) in the original image

Process of fig (a) is called contrast stretching. Process of fig (b) is called thresholding

Function.

1.12 Piecewise linear transformation


Types

1. Contrast stretching

2. Gray-level slicing

3. Bit-plane slicing

Contrast stretching

The basic concept of contrast switching is to increase the dynamic range of the gray Levels in the image being processed. The
factors which causes the low contrast are poor illumination, lack of dynamic range in the imaging sensor, wrong setting of a lens
aperture during image acquisition

The locations of points (r1, s1) and (r2,s2) Control the shape of the transformation function.
Case(i) If r1 = s1 r2 =s2 ---- The transformation is a linear function that produces no change in gray levels.

Case (ii) If r1 = r2 = 0 and s1 = s2 = L-1 --- The transformation becomes a thresholding function that creates a binary image.

Case (iii)Intermediate values of (r1, s1) and (r2,s2) produce various degrees of spread in the gray levels of the output image, thus
affecting its contrast. In general, r1≤r2 and s1≤s2 is assumed so that the function is single valued and monotonically increasing.

Gray level slicing: highlights the specific range of gray levels in an image.

Two basic themes

(1) Display a high value for all gray levels in the range of interest and low value for all other gray values.
(1) Brightens the desired range of gray levels but preserves the back ground and gray level tonalities in the image.

Bit-plane slicing Greyscale images can be transformed into a sequence of binary images by breaking them up into their bit-planes.
Here each pixel of an 8-bit image is represented as an 8-bit binary word. Let each pixel in an image is represented by 8 bits

Imagine the image is composed by eight 1 bit planes (0 to 7)

Most significant bit plane

Least significant bit plane


1.13 Histogram Processing
The histogram of an image presents the relative frequency of occurrence of the various gray levels in the image. This is useful in
stretching the low-contrast levels of images with

narrow histograms.

The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function.
nk
p( r k )=
n

Where p(rk) = estimate of the probability of occurrence of gray level rk

rk = the kth gray level

nk = number of pixels in the image with that gray level.

n = total number of pixels in the image

1.14 Histogram equalization


Their application of linear piecewise transformation often requires considerably more user input. A better approach is provided by
histogram equalization, which is an entirely automatic procedure. The idea is to change the histogram to one which is uniform; that is
each grey level in the image occurs with the same frequency.

Let r=0 representing black and r=1 representing white. For any r in the interval [0, 1] , the transformation is

s=T(r) -------------- (1)

This produces a level s for every pixel value r in original image. The transformation function satisfies the conditions

a) T(r) is a single valued monotonically increasing in the interval

0≤r≤1

b) 0 ≤ T(r) ≤ 1 for 0 ≤ r ≤ 1

Figure illustrated a transformation Function satisfying these conditions. The inverse transformation from s back to r is denoted

r=T⁻1(s) -------------- (2)


Let pr(r) is the pdf of gray level of the given image

ps(s) is the pdf of the gray level of the transformed image

By probability theory,

 dr 
p s ( s )   pr ( r ) 
 ds  r T 1 ( s )
-------- (3)

This technique is based on modifying the appearance of an image by controlling the pdf of its gray level via the transfer function T(r)

r
s=T (r )=∫ pr (w )dw
0
o ≤ r ≤ 1 --------- (4)

Equation (4) also satisfies the condition (a) and (b), Differentiating equation (4) with respect to r, we get

ds
= pr (r ) ps(s)
dr ------------ (5)

1
Substituting (5) in (3) we get

[
1
p s (s)= pr (r )
pr (r ) r =T−1 ( s) ] 0 1 s
=1 0≤s≤1 ---------- (6 )
Hence, any pdf can be converted into uniform distribution.

For gray levels of discrete values

Above discussion was made with the assumption that pixel values are continuous quantities and lie in the interval (0, 1) with r=0
represents black and R=1 represents white.

For gray levels that take on discrete values,


nk
p(r k )= 0≤r k ≤1 and
n
k=0, 1, .. . , L-1 ------ (7 )

Where p(rk) = estimate of the probability of occurrence of gray

level rk

rk = the kth gray level

nk = number of pixels in the image with that gray level.

n = total number of pixels in the image

L = number of level

A plot of p(rk) versus rk is called a histogram and the technique used for obtaining uniform histogram is known as histogram
equalization or histogram linearization. The transformation function of the discrete form is given by

k
nj
sk =T (r k )= ∑
j=0 n
k
= ∑ pr (r) 0≤r k≤1 and k=0,1, ... , L-1 ---(8)
j=0

The inverse transformation is denoted by

rk=T⁻1(sk) ------ (9)

Where both T(rk) and T⁻1(sk) are assumed to satisfy the condition (a) and (b). From equation (8) the transformation T(rk) may be
computed directly from the image.

Example 1: for the figure shown, find ps(s) and show that it is of udf
2 Pr(r)

1 r

Example 2: Consider 64x64 image, 8 gray level. the normalized gray level and pixels available t this gray Level are given in table.
Find the transformations.

rk 0 1/7 2/7 3/7 4/7 5/7 6/7 1

nk 790 1023 830 656 329 245 122 81

1.15 Histogram Matching or Specification


For some applications, direct histogram application is not suitable. In such cases, the histogram shape of the output image may be
specified. The method used to generate a processed image that has a specified histogram is called histogram matching or histogram
specification.

Follow class notes for the Method of continuous gray values and Method of discrete gray values.

After the above two topics, use the following diagram.


1.16 Noise distributions

Noise may be defined as

• This random variation in image brightness is designated noise (OR)


• Any undesired information that contaminates an image (OR)
• Any degradation in the image signal, caused by external disturbance.

This variation is usually random and has no particular pattern.

it reduces image quality and is especially significant when the objects being imaged are small and have relatively low
contrast. Factors which causes noise in digital images are

• Environmental conditions
• Quality of the image sensing elements
• Interference in the transmission channel
The presence of noise gives an image a mottled, grainy, textured, or snowy appearance. Nuclear images are generally the noisiest.
Noise is also significant in MRI, CT, and ultrasound imaging. radiography produces images with the least noise.

Frequency properties of noise – The frequency content of the noise defines the frequency properties. To find these properties, the
noise will be transformed into the Frequency domain using the Fourier transform.

White noise – If all the frequencies of a function are in equal proportions, its Fourier spectrum is said be constant. Thus if the Fourier
spectrum of a noise is constant, it is called white noise

Spatial properties of noise – There is no correlation between pixel values

And the noise component values in an image. this implies that the noise is uncorrelated with the image. Therefore the noise is
independent of the spatial coordinates.
1.16.1 Noise models
Noise models is a random variable with a probability density function (PDF) that describes its shape and distribution. The actual
distribution of noise in a specific image is the histogram of the noise. Noise can be modeled with Gaussian (“normal”), uniform, salt-
and-pepper (“impulse”), or Rayleigh distribution

Noise probability density functions (PDFs): The statistical behavior of the gray level values in the noise component is considered as
random variable. Therefore they are characterized by PDF

Some of the important noise PDF in image processing are defined for

1. Gaussian or Normal noise 2. Rayleigh noise

3. Erlang or Gamma noise 4. Exponential noise

5. Uniform noise 6. Impulse or salt and pepper noise

1.16.2 Gaussian or Normal noise


Gaussian noise may be created in an image due to electronic circuits, sensors, poor illumination and high temperature Gaussian
noise models are mathematically tractable– controllable in both spatial and frequency domains. Because of this property, it is most
commonly used in practice.

The PDF of Gaussian random variable, z is expressed as

1 −( z−u)2/2 σ 2
p( z)= e
√ 2 Πσ

Where z --- gray level


 --- mean of
average value of z
 --- standard
deviation
2 --- variance of z

When z is described by the above equation approximately 70% of its values will be in the range

[(m-2s), (m+2s)]

1.16.3 Rayleigh noise


The PDF of Rayleigh noise is given by

2
{
p(z)=¿ (z−a)e
b
−(z−a)2 /b
for z≥a ¿ ¿¿¿

The mean and variance of this density are given by

μ=a+ √ πb/ 4
b (4−π )
and σ 2=
4

A plot of Rayleigh density is shown. Note the displacement from the origin and the fact that the basic shape of this Intensity is skewed
to the right. The Rayleigh density can be quite useful

For approximating Skewed histograms

1.16.4 Erlang or Gamma noise

The PDF of Erlang noise is given by

p(z)=¿
{
ab zb−1 −az
(b−1)!
e for z≥0¿¿¿¿

Where the parameters are such that a>0. b is a positive

integer and! is a factorial. The mean and variance of this


b
μ=
density are given by
a
b
and σ 2=
a2

It is offten referred to as the gamma density when the denominator is the gamma function G(b). Otherwise it Is called Erlang density.

1.16.5 Exponential noise


This PDF is special case of the Erlang with b=1

1.16.6 Uniform noise

1.16.7 Impulse (Salt and Pepper noise or shot noise or binary noise)
Impulse noise is also known as short noise or spike noise. This kind of noise is found in places where quick transients such as Faulty
switching take place during imaging. This degradation can be caused by sharp, sudden disturbances in the image signal. its appearance
is randomly scattered white or black (or both) pixels over the image.

Based on the PDF, there are three cases,

Case (i) b>a. Here the gray level b will appear as a light dot

in the image and the gray level a appear like a dark dot in

the image.

Case (ii) Either Pa or Pb = 0 now the Impulse noise is called

The unipolar noise

Case (ii) Either Pa or Pb ¹ 0 and PaÈPb -- now the Impulse


noise values look like salt and pepper granules spreaded over

the image

1.17 Spatial averaging


The spatial domain refers to the direct manipulation of pixels in an image. Image processing functions in the spatial domain may be
expressed as
g( x , y )=T [ f (m , n)]

Where f(m, n) is the input image, g(x, y) is the processed image and T is an operator on f defined over some neighborhood of m, n

The principle approach of neighborhood is to use a square or rectangular sub image area centered at (m, n) as shown. The use of
spatial masking for image processing is usually called spatial filtering

If the centre of the mask is at the location

(m, n) in the image, the gray level of the

pixel located at (m, n) is replaced by R.

The mask is then moved to the next

pixel location and the process is repeated.

This continuous until all pixels location

have been covered.

v(m,n)= ∑ a( k ,l) y(m−k ,n−l)


(k ,l)εw
where y(m,n)−input image
v(m ,n)-output image
w - suitable chosen window
a(k,l )- filter weights

A common class of spatial averaging

filters has all equal weights, giving

1
v (m ,n )= ∑ ∑ y (m−k , n−l)
N w ( k , l) εw
1
wherea(k , l)= and Nw is the number os pixels in the window w
Nw
Spatial averaging is suitable for Gaussian and uniform distribution of noise. Not useful for impulse noise. Spatial averaging is used for
noise smoothing, low pass filtering and sub

sampling of images.

1.18 Directional smoothing


To protect the edges from blurring while smoothing, a directional averaging filter cab be useful. Spatial averaging v(m, n, ) are
calculated in several directions as shown and given as

1
v (m, n ,;θ )= ∑ ∑ y (m−k , n−l)
N θ ( k , l)∈ϖ
x x x x x x
θ
x x x x x x
¿
And a direction θ is found such that x x x x x x
¿
|y(m ,n)−v(m ,n;θ )| w
x x x x x x

is minimum l
x x x x x x

Then k

V (m ,n)−v(m ,n;θ ¿ )
gives the

desired result.

1.19 Homomorphic filtering


Homomorphic filtering is a useful technique for image enhancement when an image is subject to multiplicative noise or interference.
Block diagram of homomorphic filtering is shown below.

Exponential
Filtering Inverse
LOG DFT
H(u,v) DFT

Input Enhanced
image image
f(x, y) g(x, y)
UNIT III

1.0 Introduction
Restoration process attempts to reconstruct or recover an imge that has been degraded by using some priori
knowledge of the degradation phenomenon. Restoration techniques are oriented toward modeling the degradation
and applying the inverse process in order to recover the original image. The aim of restoration process is to improve
the appearance of an image.

Definition

Image restoration concerns the removal or reduction of degradations which have occurred during the
acquisition of the image. Such degradations may include a) noise, which are errors in the pixel values b) optical
effects such as out of focus blurring c) blurring due to camera motion / misfocus d) random atmospheric turbulence

Image enhancement Vs image restoration.

Image Enhancement Image Restoration

It is a objecti ve process - based on


mathematical or Probabilistic models of image
It is largely a subjective process –manipulate an degradation
image to take the advantage of the psychophysical
aspects of the human visual system

enhancement criteria are difficult to quantify involves formulating a criterion of goodness


that will yield an optimal estimate of the result.

enhancement techniques are more image restoration techniques depends only on the
dependent class or ensemble properties of a data set

2.0 Degradation Model


In figure an operator (or system) H which together with an additive Noise term h(x, y) operates on an input
image f(x, y)to produce a degraded image g(x, y)
If H is linear, the degraded image is given in the spatial domain by

g ( x, y )  h( x, y )  f ( x, y )   ( x, y ) convolution
Where h(x, y) is the spatial representation of the degradation

As convolution in the spatial domain is equal to multiplication in frequency domain, a model in frequency domain representation is

G(u , v )=H (u , v )F (u , v )+N (u , v )

Terms in capital letters are the Fourier transforms of the corresponding terms in spatial equation

3.0 Linear and position invariant processes/ Degradation model for continuous function
Many types of degradations can be approximated by linear, position invariant processes.

Degradation model for continuous function

f(x, y) can be expressed in the form

+∞
f ( x, y)=∫ ∫ f (α , β)δ (x−α , y−β )dα .dβ ---- (1)
−∞

We know, with h(x, y) =0, g(x, y) = H[f(x, y)] ---- (2)

Substituting (1) in (2) we get,

 

g ( x, y )  H   f ( ,  ) ( x   , y   )d .d
 


   f ( ,  ) H [ ( x   , y   )]d .d

+∞
g( x,y )=∫ ∫ f (α , β)h[( x ,α ; y ,β )]dα .dβ ---- (3)
−∞
where h(x ,α ; y , β)=H [ α ( x−α , y−β ) ---- ( 4)
equation (3) is called the superposition (or fredholm ) integral of the first kind
equation ( 4) is called the impulse response of H
h(x, a, y, b) is the response of H to an impulse of strength 1 at coordinates (a, b). It is also commonly referred to as point
spread Function (PSF).

Equation (3) states that if the response of H to an impulse is known, the response to any input f(a, b) can be calculated. If H is
position is position invariant, equation (3) is written as

+∞
g( x,y )=∫ ∫ f (α , β)h[( x−α , y−β)]dα .dβ ---- (5)
−∞

Equation (5) is the convolution integral.

Additive property

If H is linear and assuming h(x, y) =0, we get

H [ k 1 f 1 ( x , y )+k 2 f 2 ( x , y )]=k 1 H (f 1 ( x , y )+k 2 H (f 2 ( x , y )−−−−(1)


when k 1=k 2=1
H [ f 1 ( x , y )+f 2 ( x , y )]=H (f 1 ( x , y )+H ( f 2 ( x , y )−−−−−(2)

Equation (2) defines the additive property (ie., sum of the two inputs is equal to the sum of the two responses.

Homogeneity property

From (1) if f2(x, y) =0

H [ k 1 f 1 ( x , y )=k 1 H (f 1 ( x , y ))−−−−(3)

Equation (3) represents the property of homogeneity

Position or space invariant

An operator having the I/O relationship g(x, y)=H[f(x, y)] is said to be position (or) space invariant if

H [ f ( x−α , y−β )]=g ( x−α , y −β )


In the presence of additive noise

+∞
g( x,y )=∫ ∫ f (α , β)h[( x−α , y−β)]dα .dβ +η( x,y) ---- (6)
−∞
4.0 Unconstrained Restoration
The objective of image restoration is to estimate an original image f from a degraded image g for which some knowledge or
assumptions about the degradation function H and noise n are needed.
g( x , y )=h (x , y )∗f ( x , y )+η( x , y )
In matrix form this can be written as

g=Hf +η
η=g−H f^
where ^f is estimate or approximate image
^f ^
When the noise function  is unknown, should be found in such a way that the square of the difference between g and H f is
minimum. This implies that the noise is approximated to zero.

Such an approach is called ‘unconstrained least squares restoration’.

This can be expressed as


‖n‖2=‖g−H f‖^ 2
Where ‖n‖2=nT n This equation should result in a minimum value for least squares approach.

‖g−H f‖ = g−H f ( g−H f^ )


^ ^ T
2
( )
^f ‖g−H ^2
f‖ ^
The estimate is obtained by differentiating with respect to f and equated to zero. ,

d
(‖g−H ^f‖2
df^ )
=0

⇒ 2 ( g−H f^ ) (−H )=0


⇒ ^f =H −1 g
Thus the approximated image is obtained in unconstrained restoration.

5.0 Estimating the Degradation function


Suppose that we are given a degraded image without any knowledge about the degraded function H.

Degraded
image
Input image
There are three principle ways to estimate the degradation function in image restoration if true degradation function is not

known. They are a) Observation b) Experimentation c) Mathematical modeling


The process of restoring an image by using a degradation function that has been estimated some way (or by any one of the above) is
called blind deconvolution.

a) Estimation of degraded function by Observation

By observation information can be gathered from the image.For e.g., in a blurred image, a small section of the image
containing simple structure’s like part of an object and background (referred as strong signal area) can be noticed. The degraded
function in frequency domain is known as

G(u , v )=H (u , v )F (u , v )+N (u , v )


Let the observed subimage (observed strong signal area) is gs(x, y) and the constructed subimage be . If the noise is
neglected, the above equation can be expressed as

^f =( x , y )
s
G (u , v )
H s (u , v )= s
F^ (u , v )
s

From the characteristics of the above function, we then deduce the complete function H(u,v).

b) Estimation of degraded function by experimentation

This method uses equipment similar to the one used to acquire the degraded image. The degraded image can be acquired with
various system settings until the acquired and the given image are as close as possible.

The idea is to obtain the impulse response of the degradation by imaging an impulse (small dot of light) using the same system
settings. An impulse is simulated by a bright spot of light as bright as possible to reduce the effect of noise

As we know, If the noise is neglected, G(u , v )


H (u , v )=
F(u , v )

As the Fourier transform of an impulse is a constant , the above equation is expressed as


G(u , v )
H (u , v )=
A

G(u, v) is a Fourier transform of the observed image and A is constant describing the strength of the impulse.

c) Estimation of degraded function by Mathematical modeling

1. Degradation model that take into the environmental condition such as Turbulence.

Degradation model proposed by Hufnagel and stanley based on the physical characteristics

of the turbulence.
−k ( u2 +v2 ) 5/6
H (u , v )=e
Where k is a constant that depends on the nature of the turbulence. Except the exponent 5/6, the

Above equation resembles the Gaussian low pass filter

2. Degradation model for the uniform linear motion which causes blur
Suppose that an image f(x, y) undergoes a planar motion.Let xo(t) and yo(t) are the time varying components of motion in x
and y direction respectively. The total exposure at any point of the recording medium is obtained by the instantaneous exposure
over the time interval during which the imaging system shutter is open

If T is the duration of the exposure, it follows that

T
g( x , y )=∫ f [ x−x o (t ), y− y 0 (t )]dt --- (1 )
0
where g (x,y ) is the blurred image . By FT,
∞ ∞
G(u , v )= ∫ ∫ g ( x , y )e− j2 π (ux+ vy ) dxdy
−∞ −∞
substituting (1) in the above equation,we get

[ ]
∞ ∞ T
=∫ ∫ ∫ f [ x− x o(t ), y− y 0 (t )]dt − j2 π (ux+ vy )
e dxdy ---(2 )
−∞ −∞ 0

Reversing the order of integration, we get,

[ ∫ ∫ f [ x−x (t ), y − y (t )]e ]
T ∞ ∞
G(u , v )=∫ o 0
− j 2 π (ux+vy )
dxdy dt ---(3)
0 −∞ −∞

By FT pairs
¿
f [x−x o , y−y 0 ]⇔F(u,v)ealignl¿ −j 2π(ux 0 /M +vy0 / N ) ¿ ¿
T
− j2 π [ux o (t )+vy o ( t) ]
=∫ F (u , v)e dt
0
T
− j2 π [ux o (t )+vy o ( t) ]
=F (u , v )∫ e dt --- (4 )
0
From (4)

T
G(u , v ) − j2 π [ux o (t )+vy o ( t) ]
H (u , v )= =∫ e dt --- (5 )
F (u , v) 0
and G(u , v )=H (u , v) F (u , v) --- (6 )

If the motion variables xo(t) and yo(t) are known, the transfer function H(u, v) can be obtained directly from (5)

For illustration, suppose the image undergoes a uniform linear motion In x direction only at a rate given by
at
x o (t )=
T

Where t=T, the image has been displaced by a total distance ‘a’

x o (t )=a and y (t )=0

Substituting in (5) we get,

T
− j 2 π ux o (t )
H (u , v )=∫ e
0
T
=∫ e− j2 π uat /T dt
0
T
= sin( π ua)e− jπ ua --- (7 )
πua

For u=n/a, H(u, v) vanishes, where n is an integer.

If y component also varies, with the motion yo(t) =bt/T, the degradation becomes

T
H (u , v )= sin (π (ua+vb ))e− jπ ( uv+vb) --- (8 )
π (ua+vb )
6.0 Inverse filtering
^f (u , v )
By inverse filtering, the estimate is computed by dividing the transform of the degraded image by the degraded
function Thus , v )
.G(u H (u , v )

G(u , v )
F^ (u , v )= --- (1 )
H (u , v )

The Fourier transform of the degraded image is

G(u , v )=H (u , v )F (u , v )+N (u , v ) --- (2 )

Substituting (2) in (1)


N (u , v )
F^ (u , v )=F (u , v )+ ---(3)
H (u , v )

Limitations

1. As the noise is random in nature, the Fourier transform of the noise N(u, v) is unknown. Thus it is difficult to recover the
ungraded image, even thoug degradation function is known.
2. If the degradation function H(u, v) is zero or small, then the ratio N(u,v)/H(u,v) could easily dominate the estimate this is
referred as zero or small value problem.

The zero or small value problem can be overcome by limiting the filter frequencies to only the values around the origin. The average
value of Fourier transform f(x, y)around the origin is given by

M −1 N −1
1
F (0 , 0)=
MN
∑ ∑ f ( x, y)
x=0 y=0
M−1 N−1
1
H (0 ,0 )=
MN
∑ ∑ h( x, y )
x=0 y=0

Thus, analyzing only the frequencies near the origin will reduce the probability of zero value degradation function
occurrence.

A very important application of inverse filtering is the removal of blur caused by uniform linear motion.

7.0 Removal of blur caused by uniform linear motion using inverse filtering
Suppose that an image f(x, y) undergoes a planar motion.Let xo(t) and yo(t) are the time varying components of motion in x and y
direction respectively. the degraded image, g(x,y) is given by
T
g( x , y )=∫ f [ x−x o (t ), y− y 0 (t )]dt --- (1)
0
where g(x,y ) is the blurred image . By FT,
G(u,v )= ∫ ∫ g( x, y )e− j2 π (ux+ vy ) dxdy --- (2)
−∞ −∞

The degraded function is expressed as (derived in estimation of degraded function by mathematical modeling of section 6.0)

T
G(u , v ) − j2 π [ux o (t )+vy o ( t) ]
H (u ,v )= =∫ e dt ---(3)
F (u , v) 0
and G(u , v )=H (u ,v) F (u , v) --- (4 )

If the motion variables xo(t) and yo(t) are known, the transfer function H(u, v) can be obtained directly from (3).

The reconstruction of f(x, y)

The reconstruction of f(x, y) from the blurred image is as follows. Let the linear motion is in x- direction only. Equation (1) is
rewritten as
T
g( x , y )=∫ f ( x−x o (t ))dt ---(5)
0

suppose the image undergoes a uniform linear motion In x direction only at a rate given by
at
x o (t )= --- (6 )
T

Substituting in (5), we get


T
at
g( x , y )=∫ f ( x− )dt --- (5 )
0 T
x
= ∫ f (τ )dτ
x−a
dg '
=g ( x )=f ( x )−f ( x−a)
dx
'
f ( x )=g ( x )+f ( x−a ) 0≤x<L ---(6 )
Let x=z+ma, where z ranges from 0 to a. substituting in (6) we get

'
f ( z+ ma)=g ( z +ma)+ f ( z+( m−1) a ) --- ( 7 )
When m=0,

'
f ( z)=g ( z)+f ( z−a )
'
=g ( z)+φ ( z) --- (8 )
φ ( z)=f ( z−a )
When m=1 and from (8)

' '
f ( z+ a)=g ( z + a)+ g ( z )+φ ( z ) --- ( 9 )

When m=2
' ' '
f ( z+ 2a )=g ( z +2 a )+ g ( z +a )+ g ( z )+φ( z ) --- ( 10)

Proceeding similarly gives,


m
f ( z+ ma)= ∑ g ( z +ka )+φ ( z )
'

k =0
m
x=z +ma⇒ f ( x )= ∑ g ( x−ma )+ φ( x−ma ) ---(11 )
'

k =0
Here, g(x) is known, but φ(x) is unknown

To find φ(x-ma)

'
φ ( x−ma)=f ( x )−f ( x ) --- (11)

Solving these equations for ka≤x <( k +1)a , where k=0,1…K-1 results in

K−1 K−1
1 1
φ ( x )=
k
∑ f ( x +ka )−
k
∑ f^ ( x +ka )
k =0 k =0
K−1
1
Let
k
∑ f ( x +ka )= A --- a constant
k =0

Substituting in (11) we get,

K−1
1
φ ( x−ma)= A−
k
∑ f^ ( x +ka) 0≤x< L
k =0

substituting, ^f ( x )= ∑ g' ( x− ja)
j=0
K−1 ∞
1
φ ( x−ma)= A−
k
∑ ∑ g' ( x−ma+(k− j)a ) ---(12)
k =0 j=0

From (11)
K−1 ∞ ∞
1
f ( x )= A− ∑ ∑ [ g ( x−ma+(k − j )a)]+ ∑ g' ( x− ja)
'
--0≤x≤L --- (13 )
k k=0 j=0 j=0

Including the y variables give,

K −1
∞ m
1
f ( x , y )=A− ∑ ∑ g ( x−ma+(k − j)a , y )]+ ∑ g ( x− ja , y ) -- 0≤x , y≤L --- (14 )
' '
k k =0 j=0 j=0

Equation (14) gives the reconstructed imge when the uniform liner motion is in the x direction only.

The following equation gives the reconstructed image when the uniform linear motion in the y direction only

K −1
∞ m
1
f ( x , y )=A− ∑ ∑ g ' [ x , y −ma+(k − j )a ]+ ∑ g' ( x , y − ja) --0≤x , y≤L ---(14 )
k k =0 j=0 j=0

Thus, the images that are blurred due to uniform linear motion can be reconstructed.

8.0 Wiener (or)Least Mean Square (LMS) Filtering


Developed by N. Wiener in 1942. It is also known as Minimum square error filtering. The main objective of LMS filtering is to
approximate the original image In such a way that a mean square error between the original and approximated images is minimized.

The mean square error is expressed by

e 2 =E {(f − f^ )2 } --- (1)


^f
where, E{ x} is the expected value of x, f is the undegraded or original image and is the estimate of f .

Following assumptions are made to perform men square error filtering

• the image and noise are uncorrelated


• noise has zero mean
• the approximated gray levels are a linear function of the degraded gray levels.

The approximate image or estimate of f in the frequency domain which satisfies the minimum error function based on the above
condition is given by

F^ (u , v )=
[ H∗(u , v )S f (u , v )
S f (u , v )|H (u , v )|2 +S η (u , v ) ] G(u , v )

=
[ H∗(u , v )
|H (u , v )|2 +S η (u , v )/S f (u , v ) ] G(u , v ) --- (2)

=
1
[ |H (u , v )|2
H (u , v ) |H (u , v )|2 +Sη (u , v )/S f (u , v )
G(u , v )
]
Hint- H (u,v )H∗(u,v )=|H (u,v )2|
Where

H(u, v) is the transform of the degraded function

H*(u, v) is the complex conjugate of H(u, v)

and Sh(u, v) = |N(u, v)|2 is the power spectrum of the noise

= real part of (u, v)+ imaginary part of (u,v)

Sf(u, v) = |F(u, v)|2 is the power spectrum of the undergraded image

G(u, v) is the transform the degraded image

The restored image ^f (u , vin) the spatial domain is given by the inverse

ˆ
Fourier transform of the frequency domain estimate F (u , v)

Note: If the noise is zero, then the noise power spectrum vanishes and the wiener filter reduces to the inverse filter. .

If the power spectrum of the undegraded i.e., Sf(u, v) is unknown or can not be estimated and

When we deal with the white noise whose spectrum is constant, wiener filter equation can be approximated as

F^ (u , v)=
[ 1 |H (u , v )|2
H (u , v) |H (u ,v)|2 +K ]
G(u , v)

Where K is a specified constant

Advantages

1. Wiener filter has no ‘small are zero value problem’ until both H(u, v) and Sh(u, v) is zero.
2. The results obtained are more closer to the original image than the inverse filtering.
Disadvantages

1. It requires power spectrum of the undegraded image and noise to be unknown which makes
the implementation more difficult.

2. Wiener filter is based on minimizing a statistical criterion. Therefore, the results are optimal
only in an average sense.

9.0 Geometric transformations

Geometric transformation modify the spatial relationship between pixels in an image


Geometric transformation often are called rubber sheet transformation because they may be viewed as the process of printing an
image on a sheet of rubber and then stretching according to some predefined rules.

Two basic operations of geometric transformation

(1) Spatial transformation – defines the rearrangement of pixels on the image plane
(2) Gray level interpolation – deals with the assignment of gray levels to pixels in the spatially transformed image

(1) Spatial transformation

Let f is an image with pixel coordinates (x, y) which under goes geometric ransformations

Let g is a geometrically distorted image with pixel coordinates (x΄, y΄)

Where x΄= r(x, y) ---- (1)

y΄= s(x, y) ---- (2)

r(x, y) and y΄= s(x, y) are the spatial transformations that produce g((x΄, y΄)

e.g., If r(x, y) =x/2 and s(x, y) = x/2 , the distortion is simply shrinking of the size of

f(x, y) by one half in both spatial direction.

If r(x, y) and s(x, y) = x/2 , known f(x, y) can be recovered. But, practically formulating a single set of analytical functions r(x, y) and
s(x, y) that describes the geometric distortion process over the entire image plane is not possible.

Most frequently used method to formulate the spatial relocation of the pixels is the use of tie points

Tie points are subset of pixels whose location in the input (distorted) and Output (corrected) is known precisely.

(a) Image showing tiepoints


(b) Tie points
after geometric
distortions
Geometric distortion process within the quadrilateral regions is modeled by a pair of bilinear equations.
r(x, y) = x΄= c1x + c2y +c3xy + c4 -------------- (3)

s(x, y) = y΄= c5x + c6y +c7xy + c8 -------------- (4)

Vertices called as
tie points
Distorted
image Corrected
g(x΄, y΄) image f̂(x, y)

Fig. Corresponding tie points in two image segments (quadrilateral)


In fig shown, there are 8 known tie points. So, equation (3) and (4) can Be solved for the eight coefficients Ci, i=1, 2, 3,. . ., 8

The coefficients constitute the geometric distortion model. From theCoefficients, an image cab be restored. In general, enough tie
points are needed to generate a quadrilateral that cover entire image.

Let the pixel (0, 0) in ^f ( x ,isy to


) be determined.
(i) sub x=0, y=0 in equation (3) and (4) to obtain x΄ and y΄
^f (0 , 0)
(ii) Equate and g(x΄, y΄)

This implies that the pixel (x΄, y΄) in the geometrically distorted image is equivalent to the pixel (0, 0) in the corrected image.

The procedure should continue pixel by pixel. A column by column rather than row by row would yield identical results. Tie
points are established in original image by different ways

e.g., reseau marks --- In image generation system, a physical artifacts is embedded on the
image sensor itself. This produces known tie points

If the image is distorted later by some other process, then the image can be geometrically corrected.

(2) Gray level interpolation

The spatial transformation steps through integer values of the coordinates (x, y) to yield the restored image. However, depending on
the coefficients x΄ and y΄ (from the bilinear equations) may be a non-integer.

As the gray values of non-integer values are not defined, assigning gray values in is difficult one. The technique used to
inferring the gray values at the non-integer locations is called gray-level interpolation.

Some methods of gray level interpolation are

a) Nearest neighbor approach (or) zero order interpolation

b) Cubic convolution interpolation

c) Bilinear interpolation

a) Nearest neighbor approach (or) zero order interpolation

This method assigns the gray level of the nearest neighbor to the pixel Located at (x, y).
This result in a spatial offset error by as much as 1/√2 pixel units.

Advantage – Simplest scheme to implement

Drawback – produces undesirable artifacts such as distortion of straight edges in images of high resolution.

b) Cubic convolution interpolation

This method uses a large number of neighbors which smoothens the surface.

The cubic convolution interpolation function can be expressed in the following general form:

b) Cubic convolution interpolation

This method uses a large number of neighbors which smoothens the surface.

The cubic convolution interpolation function can be expressed in the following general form:

Applications – 3 D graphics and medical imaging

Disadvantage- additional computational burden


c) Bilinear interpolation

• This method is used for general purpose image processing


• Uses gray levels of the four nearest neighbor
Bilinear interpolation is performed by linearly interpolating points along separable orthogonal coordinates of the continuous image
field.

Computationally simpler method, called bilinear

interpolation, is described in Figure

A gray value is assigned to the location

of f(x, y) from the relationship

' ' ' ' ' '


v (x , y )=a x + b y + c x y +d

Here a, b, c, d are coefficients. Image Segmentation

Unit IV- Image Segmentation

Unit IV - Image segmentation

Edge detection, Edge linking via Hough transform – Thresholding - Region based
segmentation – Region growing – Region splitting and Merging – Segmentation by
morphological watersheds – basic concepts – Dam construction – Watershed
segmentation algorithm.
Image Segmentation
4.1:Introduction- Segmentation subdivides an image into its
constituent regions or objects that have similar features
according to a set of predefined criteria.
features?
intensity
histogram
mean, variance
energy
texture
….

It depends on applications or the problems to


solve

Image Processing Steps

segmentation
enhancement Image
Preprocessing feature extraction,
restoration, etc Analysis
etc

Image Knowledge Recognition


Acquisition Base & Interpretation
4.2-Detection of Discontinuities

3 basic types of gray-level discontinuities: points, lines,Edges.

We segment the image along the discontinuities.

The most common way to look for discontinuities is to run


a mask through the image.

Spatial filter(mask)
ex) R = w1 z1+ w2 z2+…+ w9 z9

w1 w2 w3

w4 w5 w6

w7 w8 w9

mask

4.2.1-Point Detection

We say that a (isolated) point has been detected at the location on


which the mask is centered if
|R| > T,R: spatial filtering result,T: nonnegative threshold

-1 -1 -1

-1 8 -1

-1 -1 -1

The formulation measures the weighted differences between the


center point and its neighbors .

This filter is a highpass spatial filter(Laplacian).

The filter detects a point whose gray level is significantly different


from its background
The result depends on the threshold T
Point Detection

(a) original image (b) highpass filtered image

Thresholding of (b), T=100 Thresholding of (b), T=200

Point Detection
X-ray image of a jet-engine turbine blade with a porosity
in the upper, right quadrant of the image
The threshold T is set to 90% of the highest absolute
pixel value of the image in Fig. 10.2(c)
4.2.2-Line Detection

These filter masks would respond more strongly to lines .Note that
the coefficients in each mask sum to zero, indicating a zero response
from the masks in areas of constant gray level.

If we are interested in detecting lines in a specified direction, we


could use the mask associated with that direction and threshold its
output Note: these filters respond strongly to lines of one pixel
Thick.

Line Detection
A binary image of a wire-bond
mask for an electronic circuit
We are interested in finding all
the lines that are one pixel thick
and are oriented at -45°
The line in the top, left quadrant
is not detected because it is not
one pixel thick
4.2.3-Edge Detection

Edge detection is the most common approach for detecting


meaningful discontinuities.

Edge
An edge is a set of connected pixels that lie on the boundary between two
regions
An edge is a “local” concept whereas a region boundary is a more global idea

A reasonable definition of “edge” requires the ability to measure gray


level(intensity) transitions in a meaningful way

An ideal edge has the properties of the model shown in Fig. 10.5(a)

An ideal edge according to this model is a set of connected pixels,


each of which is located at an orthogonal step transition in gray
level.

Edge Detection
In practice, optics, sampling, and other image acquisition imperfections yield edges
that are blurred.
As a result, edges are more closely modeled as a “ramp”-like profile. The degree of
blurring is determined by factors such as the quality of the image acquisition system,
the sampling rate, and illumination conditions.
An edge point is any point contained in the ramp, and an edge would be a set of such
points that are connected.
The “thickness” of the edge is determined by the length of the ramp Blurred edges
tend to be thick and sharp edges tend to be thin.
Edge Detection
The magnitude of the first derivative can be used to detect the presence of an edge.
The sign of the second derivative can be used to determine whether an edge pixel lies
on the dark or light side of an edge.

An imaginary straight line joining the extreme positive and negative values of the
second derivative would cross zero near the midpoint of the edge (zero-crossing
property).

Edge Detection

Derivative is very
sensitive to noise
Image smoothing is
needed
Edge Detection
We define a point in an image as being an edge point if its two-
dimensional first-order derivative is greater than a specified threshold.

A set of such points that are connected according to a predefined


criterion of connectedness is defined as an edge.

The term edge segment generally is used if the edge is short in relation
to the dimensions of the image.

A key problem in segmentation is to assemble edge segments into


longer edges.

4.3-Gradient Operators

First-order derivatives of a digital image are based on various


approximations of the 2-D gradient
The gradient is defined as the two-dimensional column vector
The magnitude of the gradient vector often is referred to as the
gradient, too

We usually approximate the magnitude by absolute values instead


of squares and square roots
Gradient Operators
The direction of the gradient vector

The direction of an edge at (x,y) is perpendicular to the


direction of the gradient vector at the point.

The Gradient
Robert cross-gradient operators
G x = ( z 9 − z 5 ) and G y = ( z 8 − z 6 )

[
∇f = ( z 9 − z 5 ) 2 + ( z 8 − z 6 ) 2 ] 1/ 2

∇f ≈ z 9 − z 5 + z8 − z 6

Sobel Operator
Gradient Operator

⎡G x ⎤ ⎡( z 6 − z 5 ) ⎤
z1 z2 z3
∇f = ⎢ ⎥ ≅ ⎢
z4 z5 z6 G y ⎦ ⎣ ( z8 − z 5 ) ⎥⎦⎣
z7 z8 z9
[
∇ f ≅ ( z 6 − z 5 ) 2+ ( z8 − z 5 ) ]
2 1/ 2

≅ | z 6 − z 5 | + | z8 − z 5 |

Gradient Operator
Roberts cross-gradient

⎡G x ⎤ ⎡( z 9 − z 5 ) ⎤
z1 z2 z3 ∇f = ⎢ ⎥ ≅ ⎢
G y ⎦ ⎣ ( z8 − z 6 ) ⎥⎦⎣
z4 z5 z6
[
∇ f ≅ ( z 9 − z 5 ) 2+ ( z8 − z 6 ) ]
2 1/ 2

z7 z8 z9
≅ | z 9 − z 5 | + | z8 − z 6 |
Gradient Operator
Robert cross-gradient filter masks

-1 0 ⎡G x ⎤ ⎡( z 9 − z 5 ) ⎤
∇f = ⎢ ⎥ ≅ ⎢
0 1 G y ⎦ ⎣ ( z8 − z 6 ) ⎥⎦⎣

[
∇ f ≅ ( z 9 − z 5 ) 2+ ( z8 − z 6 ) ]
2 1/ 2

0 -1
≅ | z 9 − z 5 | + | z8 − z 6 |
1 0

4.3.1-Prewitt Operator

z1 z2 z3 -1 0 1 -1 -1 -1
z4 z5 z6 -1 0 1 0 0 0
z7 z8 z9 -1 0 1 1 1 1
Gx Gy

⎡Gx ⎤ ⎡( z3 + z6 + z9 ) − ( z1 + z 4 + z7 )⎤
∇f = ⎢ ⎥ ≅ ⎢
G y ⎦ ⎣( z7 + z8 + z9 ) − ( z1 + z 2 + z3 ) ⎥⎦⎣
∇f ≅ | G x | + | G y |
4.3.2-Sobel Operator

z1 z2 z3 -1 0 1 -1 -2 -1
z4 z 5 z 6 -2 0 2 0 0 0
z7 z 8 z 9 -1 0 1 1 2 1
Gx Gy

⎡Gx ⎤ ⎡( z3 + 2 z6 + z9 ) − ( z1 + 2 z 4 + z7 )⎤
∇f = ⎢ ⎥ ≅ ⎢
G y ⎦ ⎣( z7 + 2 z8 + z9 ) − ( z1 + 2 z 2 + z3 ) ⎥⎦⎣
∇f ≅ | G x | + | G y |

Various filter masks


Examples

edges by wall bricks, too detail !

Examples

Note that averaging caused the response of all edges to be weaker


Diagonal Edge Masks

Diagonal Edge
4.4-Laplacian

The Laplacian is a second-order derivative


∂2 f ∂2 f
∇2 f = 2 + 2
∂x∂y
Digital approximation

∇ 2 f = 4 z 5 − ( z 2 + z 4 + z 6 + z8 )
∇ 2 f = 8 z5 − ( z1 + z 2 + z3 + z 4 + z6 + z7 + z8 + z9 )

0 -1 0 -1 -1 -1
-1 4 -1 -1 8 -1
0 -1 0 -1 -1 -1

Laplacian
The Laplacian generally is not used in its original
form for edge detection for several reasons
It is unacceptably sensitive to noise
The magnitude of the Laplacian produces double
edges
It is unable to detect edge direction

The role of the Laplacian in segmentation


finding the location of edge using its zero crossing
property
judging whether a pixel is on the dark or light side of
an edge
4.4.1-Laplacian of Gaussian

The Laplacian is combined with smoothing


to find edges
Gaussian function

LoG(Laplacian of Gaussian) : Mexican hat

LoG : Laplacian of Gaussian


Laplacian of Gaussian
Meaning
Gaussian function : smoothing, lowpass filter, noise
reduction
Laplacian : highpass filter, abrupt change (edge)
detection

It is of interest to note that neurophysiological experiments


carried out in the early 1980s provide evidence that
certain aspects of human vision can be modeled
mathematically in the basic form of LoG function.

Laplacian of Gaussian
Gaussian function with a
standard deviation of five pixels
27x27 spatial smoothing
Mask.
The mask was obtained by
sampling the Gaussian function
at equal intervals.
After smoothing we apply the
Laplacian mask.
Comparison
The edges in the zero-crossing
image are thinner than the
gradient edges
The edges determined by zero
crossings form numerous closed
loops (spaghetti effect:
drawback)
The computation of zero
crossings presents a challenge
4.5-Edge Linking

Edge detection and edge linking

One of the simplest approaches for linking edge points is


to analyze the characteristics of pixels in a small
neighborhood.

All points that are similar according to a set of predefined


criteria are linked.
Two principal properties.
The strength of the gradient
The direction of the gradient vector
∇f ( x, y ) − ∇f ( x0 , y0 ) ≤E
α ( x, y ) − α ( x0 , y0 ) ≤ A

The direction of the edge at (x,y) is perpendicular to the


direction of the gradient vector at that point

Edge Linking
Given n points in an image, suppose that we want to find subsets of
these points that lie on straight lines.

One possible solution is to first find all lines determined by every pair
of points,

Then find all subsets of points that are close to particular lines.

It involves finding n(n-1)/2 lines and then performing n x


n(n-1)/2 comparisons !
4.5.1-Hough Transform[1962]

Parameter space consideration


Infinitely many lines pass through a point are represented
a line in the parameter space(ab-plane)
yi = axi + b b = − xi a + yi
When the line associated with ( xi , yi ) intersects the line
associated with ( x j , y j ) at (a' , b' ), a' is the slope and
b' the intercept of the line determined by the two points

Hough transform
The Hough transform subdivides the parameter space into so-called accumulator
cells.
These cells are set to zero.
For every point (xk, yk) , we let the parameter a equal each of the allowed subdivision
values on the a-axis and solve for the corresponding b.

The resulting b’s are then rounded off to the nearest allowed value in the b-axis.

If a choice of ap results in solution bq, we let A(p,q)=A(p,q)+1.

At the end, a value of Q in A(i,j) corresponds to Q points in the xy- plane lying on the
line y=aix+bj

b j = − xk ai + yk
4.5.1-Hough Transform[1962]

Parameter space consideration


Infinitely many lines pass through a point are represented
a line in the parameter space(ab-plane)
yi = axi + b b = − xi a + yi
When the line associated with ( xi , yi ) intersects the line
associated with ( x j , y j ) at (a' , b' ), a' is the slope and
b' the intercept of the line determined by the two points

Hough transform
The Hough transform subdivides the parameter space into so-called accumulator
cells.
These cells are set to zero.
For every point (xk, yk) , we let the parameter a equal each of the allowed subdivision
values on the a-axis and solve for the corresponding b.

The resulting b’s are then rounded off to the nearest allowed value in the b-axis.

If a choice of ap results in solution bq, we let A(p,q)=A(p,q)+1.

At the end, a value of Q in A(i,j) corresponds to Q points in the xy- plane lying on the
line y=aix+bj

b j = − xk ai + yk
Hough transform
If there are K increments in the a axis, K computation is
needed for every pointnK computation for n image
points (linear)
There is a problem when the slope approaches infinity
(vertical line)

Hough transform
One solution: to use the following representation
x cosθ + y sin θ = ρ
The loci are sinusoidal curves in the ρθ -plane
Q collinear points lying on a line x cos θ j + y sin θ j = ρ i

yield Q sinusoidal curves that intersect at ( ρ i , θ j )


Hough transform
Aerial infrared image
Thresholded gradient image using Sobel operators
Pixels are linked

they belongs to one of the three accumulator cells with highest count
No gaps were longer than five pixels

4.6-Thresholding

Global Thresholding
Apply the same threshold to the whole image
Local Thresholding
The threshold depends on local property such as local average
Dynamic(adaptive) thresholding
The threshold depends on the spatial coordinates
The problem is how to select the threshold automatically!
4.6.1-Global Thresholding

It is successful in highly controlled environment


One of the areas is in industrial inspection application,
where control of the illumination usually is feasible

Global Thresholding
Automatic threshold selection
1. Select an initial estimate for T
2. Segment the image using T,
which produce two groups, G1, G2
3. Compute the average gray level
values μ1 and μ 2 for the pixels in
regions G1 and G2
4. Compute a new threshold value:

1
T=
( μ1 + μ 2 )
2
5. Repeat step 2 through 4 until the
difference in T in successive
iterations is smaller than a
predefined parameter T0
4.6.2-Basic Adaptive Thresholding

divide the image into subimages, then thresholding

Basic Adaptive Thresholding


4.6.3-Optimal Global and Adaptive Thresholding

Method for estimating thresholds that produce the minimum average


segmentation error Suppose that an image contains only two
principal gray- level regions.

The histogram may be considered an estimate of the probability


density function(PDF) of gray level values. This overall density
function is the sum or mixture of two densities, one for the light and
the other for the dark regions.

The mixture parameters are proportional to the relative areas of the


dark and light regions.

If the form of the densities is known or assumed, it is possible to


determine an optimal threshold.

Optimal Global and Adaptive Thresholding


The mixture probability density function is
p( z ) = P p1 ( z ) + P2 p2 ( z )1
P and P2 are the probabilities of occurrence of the two classes of1
pixels
P is the probability (a number) that a random pixel with value Z is an
1
object pixel
Any given pixel belongs either to an object or to the background
P + P2 = 11
The main objective is to select the value of T that minimizes the
average error in making the decisions that a given pixel belongs to
an object or to the background
Optimal Global and Adaptive Thresholding
The probability of errorneously classifying a background point as an
object point is
E1 (T ) = ∫−∞p2 ( z )dz
T

Similarly,

E2 (T ) = ∫ Tp1 ( z )dz

Then the overall probability of error is


E (T ) = P2 E1 (T ) + P E2 (T )1
To find the threshold value for minimal error requires differentiating
E(T) with respect to T and equating the result to 0
The result is
P p1 (T ) = P2 p2 (T )1
Note that if P = P2 then the optimum threshold is where the curves1
for p1 ( z ) and p2 ( z ) intersect

Optimal Global and Adaptive Thresholding


If the PDFs are Gaussians such as G ( μ1 , σ 1 ), G ( μ 2 , σ 2 )
2and the variances are equal, σ 2 = σ 12 = σ
2
then the threshold is given
μ1 + μ 2 ⎛ P2 ⎞σ2
T= +ln⎜ ⎟
2
μ1 − μ 2 ⎜ P1 ⎟⎝ ⎠
If P = P2,1 the optimal threshold is the average of the means
4.7-Use of Boundary Characteristics

The chance of selecting a “good” threshold are enhanced considerably if the


histogram peaks are tall, narrow, symmetric, and separated by deep valleys.

One approach for improving the shape of histograms is to consider only those pixels
that lie on or near the edges between objects and the background.

Separate an object and the background around a boundary using gradient and
Laplacian.

Labeling
0 1 0

Use of Boundary Characteristics


4.8-Gradient & Laplacian(Revisited)

Gradient & Laplacian(Revisited)


Gradient:
⎡ ∂f ⎤
⎡Gx ⎤ ⎢ ∂x ⎥
∇f = ⎢ ⎥ = ⎢ ∂f ⎥
⎣G y ⎦ ⎢ ⎥
⎢ ∂y ⎥
⎣⎦
∇f = mag (∇f ) ≅| Gx | + | G y |

Laplacian:
∂2 f ∂2 f
∇2 f = 2 + 2
∂x∂y
Segmentation by local thresholding

4.9-Region-Based Segmentation

Segmentation is a process that partitions R into n


subregions, R1, R2,..., Rn, such that
n
(a) Ri = R (complete)
i =1
(b) Ri is a connected region
(c) Ri R j = φ for all i and j , i ≠ j (disjoint)

(d ) P( Ri ) = TRUE for all i


(e) P( Ri R j ) = FALSE for i ≠ j

P( Ri ) is a logical predicate which represents criterion


that segments the regions
4.9.1-Region Growing

Region growing is a procedure that groups pixels or subregions into larger regions
based on predefined criteria.

The basic approach is to start with a set of ‘Seed’ points and from these grow
regions by appending to each seed those neighboring pixels that have properties
similar to the seed Selections of ‘Seed’ point and similarity criteria are the primary
Problem.

Another problem in region growing is the formulation of a stopping ruleex)P: diff<3P:


diff<8

0 0 5 6 7 a a b b b a a a a a
1 1 5 8 7 a a b b b a a a a a
0 1 6 7 7 a a b b b a a a a a
2 0 7 6 6 a a b b b a a a a a
0 1 5 6 5 a a b b b a a a a a

Region Growing
4.9.2-Region Splitting and Merging

An alternative is to subdivide an image initially into a set


of arbitrary, disjointed regions and then merge and/or split
the regions to satisfy the conditions

Algorithm
(1) We start with the entire region R
(2) If P(Ri)=FALSE, split into four disjoint quadrants
(3) Merge any adjacent regions Rj , Rk for which P(Rj U Rk)=TRUE
(4) Stop when no further merging or splitting is possible

Region Splitting and Merging


Region Splitting and Merging
P(Rj)=TRUE
if at least 80% of the pixels in Rj have the property z j − mi ≤ 2σ i
where z j is the gray level of the jth pixel, mi is the mean gray level of
region Rj, and σ i is the standard deviation of the gray levels

The Use of Motion


Motion is a powerful cue used by humans and many animals to
extract objects of interest from a background
One of the simplest approaches for detecting changes between
two image frames is to compare them pixel by pixel
A difference image
⎧1 if f ( x, y, ti ) − f ( x, y, t j ) > T
d ij ( x, y ) = ⎨
otherwise⎩0

It resulted from object motion


This approach is applicable only if the two images are registered
spatially and if the illumination is relatively constant within the
bounds established by T
Practically 1-valued entries often arise as a result of noise
They are usually isolated points

ignore small regions, accumulation, filtering


4.10- Segmentation by Morphological
Watersheds
Introduction
• Instead of working on an image itself, this technique is often applied on its
gradient image.
– In this case, each object is distinguished from the background by its
up-lifted edges

0
100
80 100
60 80
40 60
40
20 20
0 0

Basic Definitions

• I: 2D gray level image

• DI: Domain of I

• Path P of length l between p and q in I

– A (l +1)-tuple of pixels (p0=p,p1,…,pl=q) such that pi,pi+1 are adjacent (4 adjacent,


8 adjacent, or m adjacent, see Section 2.5)

• l(P): The length of a given path P


• Minimum

– A minimum M of I is a connected plateau of pixels from which it is impossible to


reach a point of lower altitude without having to climb

• Instead of working on an image itself, this technique is often applied on its gradient
image.

• Three types of points

– Points belonging to a regional minimum

– Catchment basin / watershed of a regional minimum

• Points at which a drop of water will certainly fall to a single minimum

– Divide lines / Watershed lines

• Points at which a drop of water will be equally likely to fall to more than
one minimum

• Crest lines on the topographic surface

• This technique is to identify all the third type of points for segmentation

Basic Steps

1. Piercing holes in each regional minimum of I

2. The 3D topography is flooded from below gradually

3. When the rising water in distinct catchment basins is about to merge, a dam is built to
prevent the merging
The dam boundaries correspond to the watershed lines to be extracted by a
watershed segmentation algorithm

- Eventually only constructed dams can be seen from above


4.10.1-Dam Construction
• Based on binary morphological dilation

• At each step of the algorithm, the binary image in obtained in the following manner

1. Initially, the set of pixels with minimum gray level are 1, others 0.

2. In each subsequent step, we flood the 3D topography from below and the
pixels covered by the rising water are 1s and others 0s.

Notations

• M1, M2:

– Sets of coordinates of points in the two regional minima

• Cn-1(M1), Cn-1(M2)

– Sets of coordinates of points in the catchment basins associated with M1 M2


at stage n-1 of flooding (catchment basins up to the flooding level)

• C[n-1]

– Union of Cn-1(M1), Cn-1(M2)


Dam Construction
• At flooding step n-1, there are two connected components. At flooding step n, there is
only one connected component

– This indicates that the water between the two catchment basins has merged at
flooding step n

– Use “q” to denote the single connected component

• Steps

– Repeatedly dilate Cn-1(M1), Cn-1(M2) by the 3×3 structuring element shown,


subject to the following condition

• Constrained to q (center of the structuring element cannot go beyond q


during dilation

– The dam is constructed by the points on which the dilation would cause the sets
being dilated to merge.

– Resulting one-pixel thick connected path

– Setting the gray level at each point in the resultant path to a value greater than the
maximum gray value of the image. Usually max+1


Watershed Transform

• Denote M1, M2, …, MR as the sets of the coordinates of the points in the regional minima of an
(gradient) image g(x,y)

• Denote C(Mi) as the coordinates of the points in the catchment basin associated with regional
minimum Mi.

• Denote the minimum and maximum gray levels of g(x,y) as min and max

• Denote T[n] as the set of coordinates (s,t) for which g(s,t) < n

• Flood the topography in integer flood increments from n=min+1 to n=max+1

• At each flooding, the topography is viewed as a binary image

• Denote Cn(Mi) as the set of coordinates of points in the catchment basin associated with
minimum Mi at flooding stage n.

– Cn(Mi)= C(Mi)  T[n]

– Cn(Mi)=T[n]

• Denote C[n] as the union of the flooded catchment basin portions at stage n:

– Initialization

– Let C[min+1]=T[min+1]

• At each step n, assume C[n-1] has been constructed. The goal is to obtain C[n] from C[n-1]
• Denote Q[n] as the set of connected components in T[n].

• For each qQ[n], there are three possibilities

1. q  C[n-1] is empty (q1)

 A new minimum is encountered

 q is incorporated into C[n-1] to form C[n]

2. q  C[n-1] contains one connected component of C[n-1] (q2)

 q is incorporated into C[n-1] to form C[n]

3. q  C[n-1] contains more than one connected components of C[n-1] (q3)

 A ridge separating two or more catchment basins has been encountered

 A dam has to be built within q to prevent overflow between the catchment basins

4. Repeat the procedure until n=max+1.


The Use of Markers

• Internal markers are used to limit the number of regions by specifying the objects of interest

• Like seeds in region growing method


• Can be assigned manually or automatically
• Regions without markers are allowed to be merged (no dam is to be built)
• External markers those pixels we are confident to belong to the background
• Watershed lines are typical external markers and they belong the same (background) region.

4.10.2
Unit – V – Image Compression

UNIT – V – Image compression


Need for data compression

The large channel capacity, BWand memory requirements for digital


image transmission and storage make it desirable to consider data
compression techniques Imge compression plays a major role in Tele-
video conferencing remote sensing document and medical imaging
facsimile transmission (FAX) Control of remotely piloted vehicles in
military and space hazardous waste management applications.
Definition
Image compression addresses the problem of reducing the amount of
data required to represent a digital image.
Redundancy
It is a characteristic related to factors such as predictability, randomness
and smoothness in the data.
If n1 and n2 denote the number of information that represents the same
information, the relative data redundancy (irrelevant information) RD of
The first data set (n1) can be defined as
Three basic redundancies are
1. Coding redundancy
2. Interpixel redundancy
3 psychvisual redundancy
Data compression is achieved when one or more of these redundancies
are reduced or eliminated.

yy
Model Question -1

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. Define Hue & Saturation.

2. What is separable and unitary transform?

3. What is the disadvantage of averaging filter?

4. Define Image sampling and quantization.

5. Define Image Restoration.

6. Draw image degradation model.

7. What is watershed segmentation?

8. What is run-length coding?

9. What is interpixel redundancy?

10. Define Compression ratio.

Part – B (5 X 16 =80)

11 (a) Explain the working of Vidicon and digital camera (16)

(or)
(b) Explain briefly the elements & fundamental steps of image processing system (16)
12 (a) Explain RGB & HSI colour image models (16)
(or)
(b) Explain various noise models with probability density functions (16)
13 (a) Explain Geometric transformation with neat diagrams. (16)
(or)
(b) Explain Blind Image Restoration (16)
14 (a) Write short notes on Hough Transform for edge linking (16)
(or)
(b) Explain Watershed algorithm Dam Construction in Watershed segmentation (16)
15 (a) Explain the following
(i) Run length coding (8)
(ii) Shift codes (8)
(or)
(b) Explain Transform coding with an example (16)
Model Question -2

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. How the subimage size effects transform coding?

2. What is the need for transforms?

3. Define Hue & Saturation.

4. What is parametric Wiener filter?

5. Which transform is called rubber sheet transform? Why?

6. How the derivatives are obtained in edge detection during formulation?

7. Give the properties of the second derivative around an edge?

8. What is Histogram of an image?

9. What are the two types of error criteria for compression algorithms?

10. What is the difference between Huffman coding and arithmetic coding?

Part – B (5 X 16 =80)

11 (a) Explain different colour image models (16)


(or)
(b) Write short notes on DFT & DCT (16)
12 (a) (i) Explain the elements of visual perception (8)
(ii) What is the role of homomorphic filtering in image enhancement and justify (8)
(or)
(b) Explain the following (i) Dither (ii) Mach Band effect (8+8)

13 (a) Explain constrained restoration in detail and also explain inverse filtering (16)
(or)
(b) Derive the expression of unconstrained restoration and explain (16)
14 (a) Explain Edge detection in detail (16)
(or)
(b) Explain different concepts in Thresholding (16)
15 (a) (i) Explain arithmetic coding technique with example (8)
(ii) Briefly discuss the JPEG compression standard (8)
(or)
(b) (i) Give the basics of vector quantization (8)
(ii) With a neat diagram explain the concept of transform coding (8)
Model Question -3

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. Define weber ratio

2.
Differentiate the functions of rods and cons in human visual system.
3. What is blind deconvolution?

4.
Define region growing?
5.
Specify the steps involved in splitting and merging?
6. What is psycho visual redundancy?

7. What is transform coding?

8. Compare lossy and lossless compression?

9. Draw the image degradation model

10. Give the difference between enhancement and restoration

Part – B (5 X 16 =80)
11 (a) Explain the elements of visual perception (16)
(or)
(b) Write elaborate notes on KL Transform (16)
12 (a) Explain Histogram equalization & specification with neat diagrams (16)
(or)
(b) (i) Write short notes on SVD Transform (8)
(ii) Write short notes on colour image enhancement (8)
13 (a) Write short notes on Wiener Filtering (16)
(or)
(b) Explain the model of Image degradation and Restoration process (16)
14 (a) Explain the concept of region growing with neat diagrams (16)
(or)
(b) Explain the following (i) Region growing, splitting and merging (16)
15 (a) Explain the following
(i) (i) Huffman coding (ii) Arithmetic coding (8+8)
(or)

(b) Explain JPEG standard with neat diagrams (16)


Model Question -1

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. Define Hue & Saturation.

2. What is separable and unitary transform?

3. What is the disadvantage of averaging filter?

4. Define Image sampling and quantization.

5. Define Image Restoration.

6. Draw image degradation model.

7. What is watershed segmentation?

8. What is run-length coding?

9. What is interpixel redundancy?

10. Define Compression ratio.

Part – B (5 X 16 =80)

11 (a) Explain the working of Vidicon and digital camera (16)

(or)
(b) Explain briefly the elements & fundamental steps of image processing system (16)
12 (a) Explain RGB & HSI colour image models (16)
(or)
(b) Explain various noise models with probability density functions (16)
13 (a) Explain Geometric transformation with neat diagrams. (16)
(or)
(b) Explain Blind Image Restoration (16)
14 (b) Write short notes on Hough Transform for edge linking (16)
(or)
(b) Explain Watershed algorithm Dam Construction in Watershed segmentation (16)
15 (c) Explain the following
(iii) Run length coding
(8)
(iv) Shift codes
(8)
(or)
(d) Explain Transform coding with an example (16)
Model Question -2

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. How the subimage size effects transform coding?

2. What is the need for transforms?

3. Define Hue & Saturation.

4. What is parametric Wiener filter?

5. Which transform is called rubber sheet transform? Why?

6. How the derivatives are obtained in edge detection during formulation?

7. Give the properties of the second derivative around an edge?

8. What is Histogram of an image?

9. What are the two types of error criteria for compression algorithms?

10. What is the difference between Huffman coding and arithmetic coding?

Part – B (5 X 16 =80)

11 (a) Explain different colour image models (16)


(or)
(b) Write short notes on DFT & DCT (16)
12 (a) (i) Explain the elements of visual perception (8)
(ii) What is the role of homomorphic filtering in image enhancement and justify (8)
(or)
(b) Explain the following (i) Dither (ii) Mach Band effect (8+8)

13 (a) Explain constrained restoration in detail and also explain inverse filtering (16)
(or)
(b) Derive the expression of unconstrained restoration and explain (16)
14 (a) Explain Edge detection in detail (16)
(or)
(b) Explain different concepts in Thresholding (16)
15 (c) (i) Explain arithmetic coding technique with example (8)
(iii) Briefly discuss the JPEG compression standard (8)
(or)
(d) (i) Give the basics of vector quantization (8)
(iii) With a neat diagram explain the concept of transform coding (8)
Model Question -3

Subject: Digital Image Processing Sub Code: EC2029

Branch: ECE Sem: VII

Duration: 3Hrs Max.Marks =100

Answer All Questions

Part – A (10 X 2 =20)

1. Define weber ratio

2.
Differentiate the functions of rods and cons in human visual system.
3. What is blind deconvolution?

4.
Define region growing?
5.
Specify the steps involved in splitting and merging?
6. What is psycho visual redundancy?

7. What is transform coding?

8. Compare lossy and lossless compression?

9. Draw the image degradation model

10. Give the difference between enhancement and restoration

Part – B (5 X 16 =80)
11 (a) Explain the elements of visual perception (16)
(or)
(b) Write elaborate notes on KL Transform (16)
12 (a) Explain Histogram equalization & specification with neat diagrams (16)
(or)
(b) (i) Write short notes on SVD Transform (8)
(ii) Write short notes on colour image enhancement (8)
13 (a) Write short notes on Wiener Filtering (16)
(or)
(b) Explain the model of Image degradation and Restoration process (16)
14 (a) Explain the concept of region growing with neat diagrams (16)
(or)
(b) Explain the following (i) Region growing, splitting and merging (16)
15 (c) Explain the following
(ii) (i) Huffman coding (ii) Arithmetic coding (8+8)
(or)

(d) Explain JPEG standard with neat diagrams (16)

DIGITAL IMAGE PROCESSING

UNIT – I

Part A

1. Define image.
2. What is pixel and other name of pixels?
3. What are fundamental steps in image processing?
4. What are elements of digital image processing?
5. What are types of storage?
6. List the membrane in human eye.
7. What is pupil?
8. What is fovea?
9. What is photopic or bright light vision?
10. What is illumination and reflectance?
11. Define four neighbours, diagonal neighbours and eight neighbours.
12. Define digital image processing.
13. What are two aspects of human visual system?
14. Define scotopic vision.
15. What is meant by brightness adaption?
16. What is meant by gray level?
17. What is meant by sampling and quantization? Where is it used?
18. Resolution of an image.
19. Define checker board effect.
20. What are the steps involved in DIP?
21. Specify the elements of DIP system.
22. Define 4-connectivity, 8-connectivity, m-connectivity.
23. Define adjacency.
24. Define Weber ratio.
25. What is use of masking?
26. What is subjective brightness?
27. What is simultaneous contrast?
28. What is Mach band effect?
29. What is spatial and gray level resolution?
30. Define translation, scaling and rotation.
31. What is concalenated transformation?
32. What is pixel replication?
33. What is bilinear interpolation?
34. Define connected component and connect set.
35. What are conditions for distance function D?
36. What is Euclidean distance?
37. Define city block distance and chess board distance.
38. What is false contouring?
39. Write short notes on band limited functions.
40. Define Moire pattern.
41. What are steps in zooming?
42. What is nearest neighbour interpolation?
43. Write short notes on seperable image transforms.
44. What is 2D circular convolution property of 2-DFT?
45. What is 1D DFF expression?
46. What is circulant operation?
47. Compute haar transformation matrix of size 4 X 4.
48. What are the applications of DIP?
49. Define Haar transform.
50. What are the basic types of functions used frequently for image enhancement?
51. Write down the transformation expression of image enhancement functions.
52. Differentiate photopic and scotopic vision.
53. How cones and rods are distributed in retina?
54. Define sampling and quantization.
55. What do you meant by Zooming of digital images?
56. What do you meant by shrinking of digital images?
57. What is meant by path?
58. What is geometric transformation?
59. Give the formula for calculating D4 and D8 distance.
60. What is the need for transform?
61. What are the applications of transform?
62. What are the Properties of Slant transform?

Part B
1. Explain the function of human eye and also explain brightness adaption and discrimination.
2. What is meant by image sampling and quantization and explain it.
3. Write short notes on
i) Neighbour of pixel

ii) Connectivity

iii) Relations and equivalence classes

4. Write short notes on

i) Transitive closure

ii) Distance measurement

5. Explain the following digital image transformations.


i) Translation and scaling

ii) Rotation

iii) Concatenation and inverse transformations

6. Explain in detain the various properties of the two dimensional fourier transform.
7. Prove that the number of complex multiplications and additions required to implement the FFT
algorithms are proportional to Nlog2N.
8. Explain in detail about Walsh transform.
9. Explain in detail about Hadamard transform
10. Explain in detail about Haar transforms
11. Write short notes on Discrete cosine transforms
12. Write short notes on Slant transforms
13. Write short notes on KL transforms
14. Explain in detail the properties of 2D fourier transform and its application in image processing.
15. Discuss the effects of non uniform sampling and quantization.
16. Write Haar transform. Generate Haar matrix for N = 8.
17. With reference to the two dimensional fourier transform prove the properties pertaining to
rotation, linearity and scaling.
18. Describe the elements of visual perception.
19. Explain the steps involved in digital image processing.
20. Describe image formation in the eye with brightness adaptation and discrimination.
21. Explain the basic relationships between pixels?

UNIT – II

Part A

1. Define enhancement.
2. Write the equation for spatial domain approach in image enhancement.
3. Write the equation for frequency domain approach in image enhancement.
4. Define point operations.
5. What are applications of point operations?
6. What is image negative?
7. What is contrast stretching?
8. What is intensity level slicing/gray level slicing?
9. What is bit plane slicing?
10. What is image subtracting?
11. What is image averaging?
12. Define histogram.
13. What is histogram equalization or histogram linearization?
14. What is the difference b/w linear and non-linear filters?
15. What is use of smoothing spatial filter?
16. What is median filter and its properties?
17. What is min. and max. filter?
18. What is sharpening?
19. What is spatial filter?
20. What is histogram specification?
21. What are the applications of image subtraction?
22. Define high boost filter.
23. Define gradient operators.
24. Write the prewitt and sobel operator mask.
25. Define Laplacian.
26. What is homomorphic filtering?
27. What is advantage of homomorphic filter?
28. Write transfer function of butteworth filter.
29. What is image averaging?
30. Define contrast ratio and inverse contrast ratio.
31. Specify the objective of image enhancement technique.
32. Explain the 2 categories of image enhancement.
33. What is meant by masking?
34. Give the formula for negative and log transformation.
35. Write the steps involved in frequency domain filtering.
36. What do you mean by Point processing?
37. What is a Median filter?
38. Write the application of sharpening filters?
39. Name the different types of derivative filters?
40. Define Derivative filter.
41. Give the mask used for high boost filtering.
42. Give the formula for transform function of a Butterworth low pass filter.
Part B

1. Explain in detail about image enhancement technique in Spatial domain


2. Explain in detail about image enhancement technique in Frequency domain
3. Write short notes on
i) Contranst stretching
ii) Gray level slicing
iii) Bit plane slicing
iv) Clipping
4. Explain in detail about histogram equalization technique for image enhancement.
5. Explain the procedure involved in enhancing the image using histogram specification.
6. Explain in detail about
i) Image subtraction
ii) Image averaging
7. Explain the various spatial domain filter approaches for image enhancement.
8. Explain various frequency domain filter approaches for image enhancement.
9. Give the mathematical analysis and procedure to implement homomorphic filter approach.
10. Limitations of low pass spatial filtering and how it is overcome by use of median filter.
11. Explain different methods of image enhancement by point processing.
12. Explain the types of gray level transformation used for image enhancement.
13. Discuss the image smoothing filter with its model in the spatial domain.
14. What are image sharpening filters? Explain the various types of it.

UNIT – III

Part A
1. Define image restoration.
2. Draw the diagram for model of image degradation.
3. List the properties of degradation model.
4. What is meant by homogeneity property in linear operator?
5. Define position invariant.
6. What is meant by circulant matrix?
7. Write the equation for discrete degradation model.
8. Write the equation for continuous degradation model.
9. What are the types of image noise modes?
10. What is inverse filtering?
11. Define Weiner filter.
12. What is blind image restoration?
13. Mention the types of blind image restoration.
14. What is meant by undetermined or overdetermined?
15. Define pseudo inverse matrix.
16. Define black mode restoration process.
17. Define Perturbation error.
18. What is image restoration?
19. What is geometric model and photometric model?
20. What is neighborhood process?
21. What is point spread function?
22. What are the forms of degradation?
23. Give the relation for degradation model.
24. List the properties involved in degradation model.
25. Give the relation for degradation model for continuous function.
26. Give the relation for 2-D discrete degradation model.
27. List the algebraic approach in image restoration.
28. What is inverse filtering and its limitations.
29. Mention Image restoration techniques.
30. Difference b/w image enhancement and restoration.
31. Give the noise probability density function.
32. Define pseudo inverse filter.
33. What are the assumptions in Wiener filter?
34. Give the transfer function of Wiener filter.
35. Difficulties in Wiener filter.
36. Steps in CLSR.
37. What is SVD transform?
38. What is Speckle noise?
39. What are the two properties in Linear Operator?
40. Explain additivity property in Linear Operator.
41. How a degradation process is modeled?
42. What are the types of noise models?
43. What are the two methods of algebraic approach?
44. Define Gray-level interpolation?
45. Why the restoration is called as unconstrained restoration?
46. What are the three methods of estimating the degradation function?
47. Give the relation for Gaussian noise.
48. Give the relation for rayleigh noise.
49. Give the relation for impulse noise.
50. Give the relation for uniform noise.
51. Give the relation for exponential noise.
52. Give the relation for Gamma noise.
53. What is meant by least mean square filter?
54. Give the equation for singular value decomposition of an image?
55. Write the properties of Singular value Decomposition(SVD)?
56. Give the difference between Enhancement and Restoration?

Part B

1. Explain in detail about discrete degradation model with an example.


2. Explain in detail about noise model.
3. Explain the concept of inverse filtering.
4. With the required diagram and derivation. Explain the implementation of wiener filter.
5. Explain in detail about constrained lease square filtering.
6. Write short notes on Newton Raphson algorithm.
7. Write short notes on Blind image restoration procedure.
8. Explain singular value decomposition and specify its properties.
9. Explain about pseudo inverse spatial image restoration.
10. Write the algorithm for pseudo inverse computation.
11. Explain the concept of singular valued matrix decomposition in image restoration.
12. Give the model of image degradation and also explain it properties.
13. Give the degradation model for continuous function.
14. What are the two approaches for blind image restoration? Explain in detail.
15. Explain image degradation model /restoration process in detail.

UNIT – IV

1. What is bandwidth of compression?


2. What is compression ratio?
3. What are the types of redunancies?
4. What is the role of quantization in image compression?
5. What is function of source encoder?
6. What is asymmetrical compression?
7. What is entropy?
8. What is bit plane coding?
9. What are the disadvantages of bit plane coding?
10. What is the concept of transform coding?
11. What is the concept of wavelet coding?
12. Write short notes on MPEG-1.
13. Write short notes on MPEG-2.
14. Write short notes on MPEG-4.
15. What are the components of a general compression model?
16. What are the components of encoder?
17. Name the applications where error-free compression are used.
18. What are the operations performed in error free compression?
19. What are variable length coding and name the types of variable length coding?
20. What is Huffman coding?
21. What is the limitation of Huffman coding?
22. What is truncated Huffman coding?
23. What are the steps used in shift code?
24. What is arithmetic coding?
25. What is need for compression techniques?
26. What is constant area coding?
27. Define whit block skipping.
28. What is run length coding?
29. Give the formula to find the run-length entropy.
30. What is the principle behind relative address coding?
31. What are the common approach for determining the value of a run?
32. What is direct contour tracing?
33. Write short notes on lossless compression.
34. Give the loseless predictive model.
35. Mention the limitation of bit-plane encoding.
36. Why is the compression of image needed?
37. What is Data Compression?
38. What is image compression?
39. What are two main types of Data compression?
40. What are different Compression Methods?
41. Define coding redundancy.
42. Define interpixel redundancy.
43. What is run length coding?
44. Define psycho visual redundancy.
45. Define encoder.
46. Define source encoder.
47. Define channel encoder.
48. What are the types of decoder?
49. What are the operations performed by error free compression?
50. Define Block code.
51. What are three categories of constant area coding?
52. Draw the block diagram of transform coding system.
53. How effectiveness of quantization can be improved?
54. What are the coding systems in JPEG?
55. What is JPEG?
56. What are the basic steps in JPEG?
57. What is MPEG?
58. Draw the JPEG Decoder.
59. What is zig zag sequence?
60. Define I-frame
61. Define P-frame
62. Define B-frame

Part B

1. Explain Huffmann coding with anyone of the example.


2. Explain arithmetic coding system using any one of the example.
3. Explain about bit plane coding.
4. Explain lossless predictive coding with neat block diagram.
5. Explain the block diagram of encoder and decoder for loseless predictive coding.
6. Explain encoder and decoder block diagram of transform coding technique.
7. Explain JPEG compression standards.
8. Explain MPEG compression standards.
9. Describe on the wavelet coding of images.
10. Explain in detail the method of zonal and threshold coding.
11. What is data redundancy? Explain three basic data redundancy.
12. Explain about Image compression model.
13. Explain about Error free Compression.
14. Explain about Lossy compression?

Unit-V

Part A

1. What is meant by segmentation process?


2. How will you detect the isolated point in an image?
3. Draw the mask used for detecting horizontal, vertical and ± 45°.
4. What is the role of gradient operator and laplacian operator in segmentation?
5. What is the role of first derivative and second derivative in segmentation?
6. Draw the sobel mask for horizontal and vertical direction.
7. Draw the prewitt mask for horizontal and vertical direction.
8. Draw the laplacian mask.
9. What are various techniques used for edge linking and boundary detection?
10. What is directed graph?
11. What is the use of local thresholding?
12. What is process of region growing by pixel aggregation?
13. What is need of representation of object boundary?
14. What is use of chain code technique?
15. What is Euler number?
16. What are the three principal approaches used in image processing to describe the texture of a
region?
17. What is the use of Fourier descriptors?
18. What is texture?
19. What is segmentation?
20. Write the applications of segmentation.
21. What are the three types of discontinuity in digital image?
22. How the derivatives are obtained in edge detection during formulation?
23. Write about linking edge points.
24. What are the two properties used for establishing similarity of edge pixels?
25. What is edge?
26. Give the properties of the second derivative around an edge.
27. Define Gradient Operator.
28. What is meant by object point and background point?
29. What is global, Local and dynamic or adaptive threshold?
30. Define region growing.
31. Specify the steps involved in splitting and merging.
32. Define chain codes.
33. What are the demerits of chain code?
34. What is thinning or skeletonizing algorithm?
35. Specify the various image representation approaches.
36. What is polygonal approximation method?
37. Specify the types of regional descriptors.
38. Name few measures used as simple descriptors in region descriptors.
39. Describe statistical approach.
40. Explain structural and spectral approach.
Part B

1. Explain the topic of detection of discontinuities.


2. Write short notes on
i) Local processing
ii) Optimal thresholding
3. Write short notes on Basic rules for segmentation
4. Write short notes on Region growing by pixel aggregation
5. Write short notes on Boundary representation using chain codes.
6. Write short notes on Polygonal approximation
7. Explain about regional descriptors.
8. Explain about boundary descriptors
9. Explain about ‘texture’
10. Explain the region oriented segmentation techniques.
11. What is image segmentation? Explain in detail
12. Explain Edge Detection in detail.
13. Define Thresholding and explain the various methods of thresholding in detail.
14. Define and explain the various representation approaches.
15. Explain the segmentation techniques that are based on finding the regions

directly.

16. How line is detected? Explain through the operators.


Mini Projects EC 2029 Digital Image Processing

Refer to the web site “imageprocessingplace.com/DIP-2E/dip2e_student_projects.htm.”.

Write matlab programs and give the simulation results in the form of ppt and hard copy.

a) Implementation of image restoration.


b) Implementation of color optimization.
c) Image blur reduction using adaptive tonal correction
d) Image enhancement using histogram techniques
e) Implementation of visual cryptography using DH method.
f) Image segmentation and texture extraction for Number Recognition system.
g) Implementation of reverse watermarking system
h) Image denoising using DWT
i) Image denoising using ROF method.
j) Implementation of IMAGE steganography using LSB
k) JPEG compression using DCT.
l) Multi resolution watermark based on wavelet transforms for digital images.
m) Morphological operations using matlab on images.
n) A Spatial median filtering for noise removal in digital images
o) Brain tumor detection using region growing method
p) Frame separation and restoration of video signal
q) Image compression using DWT
r) Implementation of image slicing using MATLAB.

Reference: http://seminarprojects.com/Thread-digital-image-processing-
projects#ixzz1xKqbT4SS

EC2029 ASSIGNMENT QUESTIONS

1. Give a write up on compression standards used in Magnetic resonance imaging.


2. What is Image segmentation? Give a brief description on watermarking techniques.
3. What are wavelets? Give a write up and application of wavelet transforms.

You might also like