0% found this document useful (0 votes)
27 views190 pages

22bit5c4 Dip

The document outlines the course objectives and content for 'Fundamentals of Digital Image Processing' at Syed Hameedha Arts and Science College. It covers key topics such as digital image fundamentals, image enhancement, restoration, segmentation, and compression techniques, along with expected outcomes for students. Additionally, it includes definitions, concepts, and applications relevant to digital image processing, supported by textbooks and references.

Uploaded by

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

22bit5c4 Dip

The document outlines the course objectives and content for 'Fundamentals of Digital Image Processing' at Syed Hameedha Arts and Science College. It covers key topics such as digital image fundamentals, image enhancement, restoration, segmentation, and compression techniques, along with expected outcomes for students. Additionally, it includes definitions, concepts, and applications relevant to digital image processing, supported by textbooks and references.

Uploaded by

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

SYED HAMEEDHA ARTS AND SCIENCE COLLEGE

22BIT5C4- FUNDAMENTALS OF DIGITAL IMAGE PROCESSING


22BIT5C4-FDIP

22BIT5C4- FUNDAMENTALS OF DIGITAL IMAGE PROCESSING

OBJECTIVES:
1. Tobecomefamiliarwithdigitalimagefundamentals&getexposedtosimpleimage
enhancement techniques in Spatial and Frequency domain.
2. To learn concepts of degradation function and restoration techniques & study the image
segmentation and representation techniques.
3. Tobecomefamiliarwithimagecompressionandrecognitionmethods
UNITI-DIGITALIMAGEFUNDAMENTALS
Steps in Digital Image Processing – Components – Elements of Visual Perception – Image Sensing
and Acquisition – Image Sampling and Quantization – Relationships between pixels - Color image
fundamentals - RGB, HSI models, Two-dimensional mathematical preliminaries, 2D transforms -
DFT, DCT.
UNITIIIMAGEENHANCEMENT
Spatial Domain: Gray level transformations – Histogram processing – Basics of Spatial Filtering–
Smoothing and Sharpening Spatial Filtering, Frequency Domain: Introduction to FourierTransform–
Smoothing and Sharpening frequency domain filters – Ideal, Butterworth and Gaussian filters,
Homomorphic filtering, Color image enhancement.
UNITIIIIMAGERESTORATION
Image Restoration -degradation model, Properties,Noisemodels– Mean Filters– OrderStatistics–
Adaptivefilters–BandrejectFilters–BandpassFilters–NotchFilters–OptimumNotch Filtering – Inverse
Filtering – Wiener filtering.
UNITIVIMAGESEGMENTATION
Edge detection, Edge linking via Hough transform – Thresholding - Region based segmentation –
Region growing – Region splitting and merging – Morphological processing- erosion and dilation,
Segmentation by morphological watersheds – basic concepts – Dam construction – Watershed
segmentation algorithm.
UNITVIMAGECOMPRESSIONANDRECOGNITION
Need for data compression, Huffman, Run Length Encoding, Shift codes, Arithmetic coding, JPEG
standard, MPEG. Boundary representation, Boundary description, Fourier Descriptor, Regional
Descriptors – Topological feature, Texture - Patterns and Pattern classes - Recognition based on
matching.
OUTCOMES:Attheendofthecourse,thestudentsshouldbeable to:
1. Knowandunderstandthebasicsandfundamentalsofdigitalimageprocessing,suchas digitization,
sampling, quantization, and 2D-transforms.
2. Operate on images using the techniques of smoothing, sharpening and enhancement &understand
the restoration concepts and filtering techniques.
4. Learn the basics of segmentation, features extraction, compression and recognition methods
forcolor models.
TEXTBOOKS:
1. RafaelC.Gonzalez,RichardE.Woods,DigitalImageProcessing,Pearson,3Edition,2010.
2. AnilK.Jain,FundamentalsofDigitalImageProcessing,Pearson,2002.
REFERENCES
1. KennethR.Castleman,DigitalImageProcessing,Pearson,2006.
2. RafaelC.Gonzalez,etal,DigitalImageProcessingusingMATLAB,Pearson2011.
3. D,E.Dudgeonetal,MultidimensionalDigitalSignalProcessing,PrenticeHallProfessionalTechnical Reference,
1990.
4. WilliamK.Pratt,DigitalImageProcessing,JohnWiley,NewYork,2002
5. Milan Sonka et al,Image processing, analysis and machine vision, Brookes/Cole, Vikas Publishing House,
2nd edition, 1999

LECTURENOTES
UNITI-DIGITALIMAGEFUNDAMENTALS
Steps in Digital Image Processing – Components – Elements of Visual Perception – Image Sensing
and Acquisition – Image Sampling and Quantization – Relationships between pixels - Color image
fundamentals - RGB, HSI models, Two-dimensional mathematical preliminaries, 2D transforms -
DFT, DCT.

PART-A
1. Define Image
Image may be defined as two dimensional light intensity function f(x, y) where x
and y denote spatial co-ordinate and the amplitude or value of f at any point(x, y) is called
intensity or grayscale or brightness of the image at that point.
2. WhatisDynamicRange?
The range of values spanned by the gray scale is called dynamic range of an image.
Imagewillhavehighcontrast,ifthedynamicrangeishighandimagewillhavedullwashed out gray
look if the dynamic range is low.
3. Define Brightness
Brightness of an object is the perceived luminance of the surround. Two objects
with different surroundings would have identical luminance but different brightness.
4. WhatdoyoumeantbyGraylevel?
Graylevel refers to a scalar measure of intensity that ranges from black to grays and
finally to white.
5. DefineDigitalImage.
An image may be defined as a two dimensional function, f(x,y), where x and y are
spatial co-ordinates and f is the amplitude. When x,y and the amplitude values of f are all
finite, discrete quantities such type of image is called Digital Image.
6. WhatisDigitalImageprocessing?
The term Digital Image Processing generally refers to processing of a two
dimensional picture by a digital computer. i.e., processing of any two dimension data
7. DefineIntensity(or)graylevel.
An image may be defined as a two-dimensional function, f(x,y). the amplitude of fat
any pair off co-ordinates (x,y) is called the intensity (or) gray level off the image at that
point.
8. DefinePixel
A digital image is composed of a finite number of elements each of which has a
particular location value. The elements are referred to as pixels, picture elements, pels, and
image elements. Pixel is the term most widely used to denote the elements of a digitalimage.
9. WhatdoyoumeantbyColor model?
A Color model is a specification of 3D-coordinates system and a subspace within
that system where each color is represented by a single point.
10. Listthehardwareorientedcolormodels
1.RGBmodel,2.CMYmodel,3.YIQ model,4.HSImodel

11. WhatisHueand saturation?


Hue is a color attribute that describes a pure color where saturation gives a measure
of the degree to which a pure color is diluted by white light.
12. Showthe blockdiagramforthestepsinvolvedindigitalImage processing system?
13. Listtheapplicationsofcolormodels
1. RGBmodel---usedforcolormonitors&colorvideocamera
2. CMYmodel---usedforcolorprinting
3. HISmodel---- usedforcolorimage processing
4. YIQmodel --- usedforcolorpicturetransmission
14. DifferentiateLuminanceandChrominance
A. Luminance: received brightness of the light, which is proportional to the total energy in
the visible band.
B. Chrominance: describe the perceived color tone of a light, which depends on the
wavelength composition of light, chrominance is in turn characterized by two attributes –
hue and saturation.

15. Showthe blockdiagramofageneralpurposeDigitalImage Processingsystem.


16. Writethedifferentcombinationsofcoloursinadditivecolor mixing.
Red + Green = Yellow, Red+Blue=Magenta
Blue + Green = Cyan,Red + Blue + Green = White
17. Whatarethetwowaysofmixingofcolours?
Mixingofcolourscanbedonebytwo ways:
(i) Additivemixing,(ii)Subtractive mixing
18. What do you mean by saturation and chrominance?
Saturation:Saturationreferstothespectralpurityofthecolorlight.
Chrominance:Hue andSaturationof acolor puttogetherisknownaschrominance.
19. StateGrassman’s law.
The brightness impression produced by the three primary colours that constitute the
single light. This property of the eye generating a response which depends on the algebraic
sum of the Blue, Red and Green .This forms the basis of color signal generation is called
“Grassman’s law”.
20. Listoutthefactorsthataffecttonalgradationofthe reproducedpicture.
a) Brightness b) Contrast c) Viewing distance d) Luminance e) Hue
andSaturation.
21. WritethebasicprincipleofTelevisioncameratube.
Thecamerapickupandconvertsopticalinformationofthesceneintoelectrical energy
form may be called as eye of the television system.
22. DefineContrast andHue.
Contrast: This is the difference in light intensity between black and white parts of
the picture over and above the average brightness level.
Hue: This is the predominant spectral color of the received light. Thus the color of
any object is distinguished by its hue or tint.
23. DefineImage Quantization.
An image may be continuous with respect to the x- and y- co-ordinates and also
inamplitude digitizing the amplitude value is called Quantization.

24. DefineImage Sampling.


The process of converting continuous spatial co-ordinates into its digitized form
iscalled as sampling.
25. DefineResolutions
Resolution is defined as the smallest number of discernible detail in an image.
Spatial resolution is the smallest discernible detail in an image and gray level resolution
refers to the smallest discernible change is gray level.
26. Whatarethesteps involvedinDIP?
1. ImageAcquisition
2. Preprocessing
3. Segmentation
4. RepresentationandDescription
5. RecognitionandInterpretation
27. WhatisrecognitionandInterpretation?
Recognitionmeans is aprocess that assignsa label toan object based on the
informationprovidedbyitsdescriptors.Interpretationmeansassigningmeaningtoa recognized
object.
28. SpecifytheelementsofDIPsystem
1.ImageAcquisition,2.Storage3.Processing,4. Display
29. Whatarethetypes oflightreceptors?
Thetwotypesoflight receptors are
1.Conesand 2.Rods
30. Differentiatephotopicandscotopic vision?
Photopicvision Scotopicvision
1. The human being can resolve the fine Several rods are connected to one nerve end.
details with these cones because each one is So it gives the overall picture of the image.
connected to its own nerve end.
2. This is also known as bright light ThisisalsoknownasDimlightvision.
vision.
31. Howconesandrodsaredistributedinretina?
Ineacheye,conesareintherange6-7millionandrodsareinthe range75-150million.
32. Definesubjectivebrightnessandbrightnessadaptation
Subjective brightness means intensity as preserved by the human visual system.
Brightness adaptation means the human visual system can operate only from scotopic to
glare limit. It cannot operate over the range simultaneously. It accomplishes this large
variation by changes in its overall intensity.
33. Writeshortnotesonneighborsofapixel.
The pixel p at co-ordinates (x, y) has 4 neighbors (ie) 2 horizontal and 2 vertical
neighbors whose co-ordinates is given by (x+1, y), (x-1,y), (x,y-1), (x, y+1). This is
called as direct neighbors. It is denoted by N4(P)
Fourdiagonalneighborsofphaveco-ordinates(x+1,y+1),(x+1,y-1),(x-1,y-1), (x-1,
y+1). It is denoted by ND(4).
Eight neighbors of p denoted by N8(P) is a combination of 4 direct neighbors and 4
diagonal neighbors.
34. Whatismeantbyconnectivity? Explainthetypesof connectivity.
Connectivity between pixels is a fundamental concept that simplifies the definition
of numerous digital image concepts, two pixels are said to be connected if they are
neighbors and if their gray levels satisfy a condition i.e. the grey levels are equal.
1.4connectivity,2.8connectivity,3.Mconnectivity(mixedconnectivity)
35. Whatarethe typesofadjacency?
Therearethreetypesofadjacency.They are
a.4-adjacency,b.8-adjacency,c.m-adjacency
36. NamesomeapplicationofDigitalImageProcessing.
1. Remote sensing
2. Imagetransmissionand storageforbusiness applications.
3. Medicalprocessing
4. RadarandSonar
5. AcousticImageProcessing
6. Robotics
7. Automatedinspectionofindustrialparts.
37. DefineEuclidean distance.
TheEuclideandistancebetweenpandqisdefinedas D(p,
q) = [(x – s)2+ (y – t)2]1/2.
38. DefineCity–block distance.
TheD4distance,alsocalledCity-blockdistancebetweenpandqisdefinedas D4(p, q)
= |x – s| + |y – t|.
39. GivetheformulaforcalculatingD4andD8distance.
D4distance(cityblockdistance)isdefinedbyD4(p,q)=|x-s|+ |y-t|
D8 distance(chessboard distance)isdefinedbyD8(p,q)=max(|x-s|,|y-t|).
40. Whatisgeometric transformation?
Transformationisusedtoaltertheco-ordinatedescriptionofimage. The
basic geometric transformations are
1. Imagetranslation
2. Scaling
3. Imagerotation
41. Whatisimagetranslationandscaling?
Imagetranslationmeansrepositiontheimagefromoneco-ordinatelocationto another
along straight line path.
Scaling is used to alter the size of the object or image (ie) a co-ordinate system is
scaled by a factor.
42. WhatisImageTransform?Andwhatistheneedfor transform?
An image can be expanded in terms of a discrete set of basis arrays called basis
images. These basis images can be generated by unitary matrices. Alternatively, a given
NxN image can be viewed as an N^2x1 vectors. An image transform provides a set of
coordinates or basis vectors for vector space. The term image transfer usually refers to a
classof unitarymatrices usedfor representing images.Theneed fortransformismostofthe
signals or images are time domain signal(ie) signals can be measured with a function of
time. This representation is not always best. For most image processing applicationsanyone
of the mathematical transformation are applied to the signal or images to obtain further
information from that signal.
43. DefinethetermLuminance
Luminance measured in lumens (lm), gives a measure of the amount of energy an
observer perceiver from a light source.
44. Whataretheapplicationsoftransform?
1) Toreducebandwidth
2) Toreduceredundancy
3) Toextract feature.
45. Whatarethepropertiesofunitary transform?
SaveethaEngineering College 6
1) DeterminantandtheEigenvalues ofaunitarymatrixhaveunitymagnitude
2) Theentropyofarandomvectorispreserved underaunitaryTransformation
3) Since the entropy is a measure of average information, this means information
ispreserved under a unitary transformation.
46. DefineWeberratio
Theratioofincrementofilluminationtobackgroundofilluminationis called as
Weber ratio.(ie) ∆i/i
1. Iftheratio(∆i/i) issmall,thensmallpercentageofchangeinintensityis
needed (ie) good brightness adaptation.
2. Iftheratio(∆i/i) islarge,thenlargepercentageofchangeinintensityis
needed (ie) poor brightness adaptation.

47. Whatismeantbymachband effect?


Mach band effect means the intensity of the stripes is constant. Therefore it
preservesthebrightnesspatternneartheboundaries,thesebandsiscalledasmachband effect.

48. Whatissimultaneous contrast?


The region reserved brightness not depends on its intensity but also on its background.All
centres square have sameintensity. Howevertheyappear to theeyeto become darker as the
background becomes lighter.

49. Whatismeantbyilluminationandreflectance?
Illumination is the amount of source light incident on the scene. It is represented as
i(x, y).Reflectance is the amount of light reflected by the object in the scene. It is
represented by r(x, y).
50. Findthenumberofbitsrequiredtostorea 256X256imagewith32graylevels?
32graylevels =25=5bits, 256 * 256 * 5 =327680 bits.
51. Writetheexpressiontofindthenumberofbitstostoreadigitalimage
Thenumberofbitsrequiredtostoreadigitalimageis b=M
X N X k,
WhenM=N, thisequationbecomes
=N^2k
52. WhatdoyoumeantbyZoomingandshrinkingof digitalimages?
Zooming may be viewed as over sampling. It involves the creation of new pixel
locations and the assignment of gray levels to those new locations.
Shrinking may be viewed as under sampling. To shrink an image by one half, we
delete every row and column. To reduce possible aliasing effect, it is a good idea to blue an
image slightly before shrinking it.
53. Listoutthe propertiesof acosine transforms
a.Itisrealandorthogonal,b.isafasttransform
c.It is not the real part of the unitary DFT,d.ithas excellent energy compaction for
highly correlated data

54. DefineCosine Transform.


The N x N cosine transform matrix C={c(k,n)} also called the discrete cosine
transform (DCT) is defined as
1 
, k0,0nN1 
 
C(k,n)= N 
 (2n1)k 
 2 cos , 1kN1,0 nN1  
 N 2N 
55. Listoutthe significanceofKarhunen-Loeve Transform.
1.Hasnotfastalgorithm2.Usefulfor smallsize vectors
3.Usefulinperformanceevaluationandforfindingperformance bounds
4.Hasthebestenergycompaction.
56. Writeanytwopropertiesof2DFourier transform.
M1N1
F(u,v) 1
Fouriertransform

 
MNx0y0
f(x,y)e-j2(ux/m+vy/N)


PowerSpectrum p(u,v)|F(u,v)|2

PART–B
1. Explainthefundamentalstepsindigitalimage processing
1. Image acquisition is the first process in the digital image processing. Note that
acquisition could be as simple as being given an image that is already in digital form.
Generally, the image acquisition stage involves pre-processing, such as scaling.
2. The next step is image enhancement, which is one among the simplest and most
appealing areas of digital image processing. Basically, the idea behind enhancement
techniques is to bring out detail that is obscured, or simply to highlight certain features of
interest in an image. A familiar example of enhancement is when we increase the contrastof
an image because “it looks better.” It is important to keep in mind that enhancement is a
very subjective area of image processing.
3. Image restoration is an area that also deals with improving the appearance of an image.
However, unlike enhancement, which is subjective, image restoration is objective, in the
sense that restoration techniques tend to be based on mathematical or probabilistic modelsof
image degradation. Enhancement, on the other hand, is based on human subjective
preferences regarding what constitutes a “good” enhancement result.i.e remove noise and
restores the original image
4. Color image processing is an area that has been gaining in importance because of the
significant increase in the use of digital images over the Internet. Color image processing
involves the study of fundamental concepts in color models and basic color processing in a
digital domain. Image color can be used as the basis for extracting features of interest in an
image.
5. Wavelets are the foundation for representing images in various degrees of resolution. In
particular, wavelets can be used for image data compression and for pyramidal
representation, in which images are subdivided successively into smaller regions.
6. Compression, as the name implies, deals with techniques for reducing the storage
required saving an image, or the bandwidth required transmitting it. Although storage
technology has improved significantly over the past decade, the same cannot be said for
transmission capacity. This is true particularly in uses of the Internet, which are
characterizedbysignificantpictorialcontent.Imagecompressionisfamiliar(perhaps
inadvertently) to most users of computers in the form of image file extensions, such as the
jpg file extension used in the JPEG (Joint Photographic Experts Group) image compression
standard.
7. Morphological processing deals with tools for extracting image components that are
useful in the representation and description of shape. The morphological image processingis
the beginning of transition from processes that output images to processes that output image
attributes.
8. Segmentation procedures partition an image into its constituent parts or objects. In
general, autonomous segmentation is one of the most difficult tasks in digital image
processing. A rugged segmentation procedure brings the process a long way toward
successful solution of imaging problems that require objects to be identified individually.On
the other hand, weak or erratic segmentation algorithms almost always guarantee eventual
failure. In general, themore accurate the segmentation, the morelikely recognition is to
succeed.
9. Representation and description almost always follow the output of a segmentation
stage, which usually is raw pixel data, constituting either the boundary of a region (i.e., the
set of pixels separating one image region from another) or all the points in the region itself.
10. Recognition is the process that assigns a label (e.g., “vehicle”) to an object based on its
descriptors. Recognition topic deals with the methods for recognition of individual objectsin
an image.

2. ExplaintheComponentsofanImageProcessingSystem
Figure shows the basic components comprising a typical general-purpose system
used for digital image processing. The function of each component is discussed in the
following paragraphs, starting with image sensing.
1. With reference to sensing, two elements are required to acquire digital images. The first
is a physical device that is sensitive to the energy radiated by the object we wish to image.
The second, called a digitizer, is a device for converting the output of the physical sensing
device into digital form. For instance, in a digital video camera, the sensors produce an
electrical output proportional to light intensity. The digitizer converts these outputs todigital
data.
2. Specialized image processing hardware usually consistsof the digitizer justmentioned,
plus hardware that performs other primitive operations, such as an arithmetic logic unit
(ALU) that performs arithmetic and logical operations in parallel on entire images. ALU is
used is in averaging images as quickly as they are digitized, for the purpose of noise
reduction. This unit performs functions that require fast data throughputs (e.g., digitizingand
averaging video images at 30 frames/s)
3. The computer in an image processing system is a general-purpose computer and can
range from a PC to a supercomputer. For dedicated applications,
4. Software for image processing consists of specialized modules that perform specific
tasks.
5. Mass storage capability is a must in image processing applications. An image of size
pixels, in which the intensity of each pixel is an 8-bit quantity, Digital storage for image
processing applications falls into three principal categories:
(1) Short-term storage for use during processing, (2) on-line storage for relatively fast recall,
and (3) archivalstorage, characterized by infrequentaccess. Storageis measured in
bytes(eightbits),Kbytes(onethousandbytes),Mbytes(onemillionbytes),Gbytes(meaning giga,
or one billion, bytes), and Tbytes (meaning tera, or one trillion, bytes).On-line storage
generallytakestheformofmagneticdisksoroptical-mediastorage.Thekeyfactor characterizing
on-line storage is frequent access to the stored data.
6. Image displays in use today are mainly color (preferably flat screen) TV monitors.
Monitors are driven by the outputs of image and graphics display cards that are an integral
part of the computer system.
7. Hardcopy devices for recording images include laser printers, film cameras, heat-
sensitive devices, inkjet units, and digital units, such as optical and CDROM disks. Film
provides the highest possible resolution,
8. Networking is almost a default function in any computer system in use today. Becauseof
the large amount of data inherent in image processing applications, the key consideration in
image transmission is bandwidth. Communications with remote sites via the Internet are not
always as efficient. Fortunately, this situation is improving quickly as a result of optical
fiber and other broadband technologies.
PurposeofImage processing:
Thepurpose ofimageprocessingisdividedinto5groups.Theyare:
1. Visualization-Observetheobjectsthatare notvisible.
2. Imagesharpeningand restoration- Tocreateabetter image.
3. Imageretrieval -Seekfortheimageof interest.
4. Measurementofpattern –Measuresvariousobjects inan image.
5. ImageRecognition–Distinguish theobjectsinanimage.
ImageProcessingTypes:
1. AnalogImage Processing:
Analog or visual techniques of image processing can be used for the hard
copies like printouts and photographs. Image analysts use various fundamentals of
interpretation while using these visual techniques. The image processing is not just
confined to area that has to be studied but on knowledge of analyst. Association is
another important tool in image processing through visual techniques. So analysts apply
a combination of personal knowledge and collateral data to image processing.
2. DigitalImage Processing:
Digital Processing techniques help in manipulation of the digital images by using
computers. As raw data from imaging sensors from satellite platform contains deficiencies.
To get over such flaws and to get originality of information, it has to undergo variousphases
of processing. The three general phases that all types of data have to undergo while using
digital technique are Pre- processing, enhancement and display, information extraction.

ApplicationsofImage Processing:
1. IntelligentTransportationSystems-
This technique can be used in Automatic number plate recognition and Traffic sign
recognition.
2. RemoteSensing-
For this application, sensors capture the pictures of the earth’s surface in remote
sensingsatellites ormulti– spectral scanner which ismounted onan aircraft. These pictures are
processed by transmitting it tothe Earth station.Techniques used tointerpret the objects and
regions are used in flood control, city planning, resource mobilization, agricultural
production monitoring, etc.
3. Movingobjecttracking-
This application enables to measure motion parameters and acquire visual record of
the moving object. The different types of approach to track an object are:
· Motionbasedtracking
· Recognitionbased tracking
4. Defensesurveillance–
Aerial surveillance methods are used to continuously keep an eye on the land and
oceans. Thisapplication isalsoused tolocatethetypes andformation ofnavalvesselsof the ocean
surface. The important duty is to divide the various objects present in the water body part of
the image. The different parameters such as length, breadth, area, perimeter, compactness are
set up to classify each of divided objects. It is important to recognize the distribution of these
objects in different directions that are east, west, north, south, northeast, northwest, southeast
andsouth west to explain allpossible formationsof the vessels.We can interpret the entire
oceanic scenario from the spatial distribution of these objects.
5. BiomedicalImagingtechniques-
For medical diagnosis, different types of imaging tools such as X- ray, Ultrasound,
computer aided tomography (CT) etc are used. The diagrams of X- ray, MRI, and computer
aided tomography (CT) are given below.

Someoftheapplicationsof Biomedicalimaging applications areasfollows:


· Heart diseaseidentification–Theimportantdiagnosticfeaturessuch assizeoftheheart and
its shape are required to know in order to classify the heart diseases. To improve the
diagnosisof heart diseases,image analysistechniquesare employed toradiographic images.
· Lung disease identification – In X- rays, the regions that appear dark contain air while
region that appears lighter are solid tissues. Bones are more radio opaque than tissues. The
ribs, the heart, thoracic spine, and the diaphragm that separates the chest cavity from the
abdominal cavity are clearly seen on the X-ray film.
· Digital mammograms – This isused to detect the breast tumour. Mammograms can be
analyzed using Image processing techniques such as segmentation, shape analysis, contrast
enhancement, feature extraction, etc.
6. AutomaticVisualInspectionSystem–
This application improves the quality and productivity of the product in the
industries.
· Automatic inspection of incandescent lamp filaments – This involves examination of the
bulb manufacturing process. Due to no uniformity in the pitch of the wiring in the lamp, the
filament of the bulb gets fused within a short duration. In this application, a binary image
slice of the filament is created from which the silhouette of the filament is fabricated.
Silhouettes are analyzed to recognize the non uniformity in the pitch of the wiring in the
lamp. This system is being used by the General Electric Corporation.

· Automatic surface inspection systems – In metal industries it is essential to detect the


flaws on the surfaces. For instance, it is essential to detect any kind of aberration on the
rolled metal surface in the hot or cold rolling mills in a steel plant. Image processing
techniques such as texture identification, edge detection, fractal analysis etc are used for the
detection.

· Faulty component identification – This application identifies the faulty components in


electronic or electromechanical systems. Higher amount of thermal energy is generated by
these faulty components. The Infra-red images are produced from the distribution ofthermal
energies in the assembly. The faulty components can be identified by analyzing the Infra-
red images.
Image Modalities:
MedicalimageModalitiesare
1. X-ray
2. MRI
3. CT
4. Ultrasound.
1. X-Ray:
“X”standsfor“unknown”.X-ray imagingisalsoknownas
- radiograph
- Röntgen imaging.
• CalciuminbonesabsorbsX-rays the most
• Fatandothersofttissuesabsorbless,andlookgray
• Airabsorbs theleast,solungs lookblack onaradiograph
2. CT(ComputerTomography):
Computed tomography (CT) is an integral component of the general radiography
department. Unlike conventional radiography, in CT the patient lies on a couch that moves
through into the imaging gantry housing the x-ray tube and an array of specially designed
"detectors". Depending upon the system the gantry rotates for either one revolution around
the patient or continuously in order for the detector array to record the intensity of the
remnant x-ray beam. These recordings are then computer processed to produce imagesnever
before thought possible.
MRI(MagneticResonance Imaging):
This is an advanced and specialized field of radiography and medical imaging. The
equipmentusedisveryprecise,sensitiveandattheforefrontofclinicaltechnology.MRIis
not only used in the clinical setting, it is increasingly playing a role in many research
investigations. Magnetic Resonance Imaging (MRI) utilizes the principle of Nuclear
Magnetic Resonance (NMR) as a foundation to produce highly detailed images of the
human body. The patient is firstly placed within a magnetic field created by a powerful
magnet.
ImageFile Formats:
Imagefileformatsarestandardizedmeansoforganizingandstoring digitalimages .
Image files arecomposedofdigitaldatainoneoftheseformatsthatcanbe foruseona
computerdisplayorprinter.Animagefileformatmaystoredatainuncompressed,
compressed,or vector formats.
Imagefile sizes:
In raster images, Image file size is positively correlated to the number of pixels inan
image and the color depth, or bits per pixel, of the image. Images can be compressed in
various ways, however.
Majorgraphicfile formats
ThetwomainfamiliesofgraphicsRasterandVector.

Raster formats
1. JPEG/JFIF
JPEG (JointPhotographicExpertsGroup)isacompressionmethod;JPEG-
compressedimagesareusuallystoredinthe JFIF (JPEGFileInterchangeFormat)file
format. JPEG compression is (in most cases) lossycompression .TheJPEG/JFIF filename
extension is JPG or JPEG.
2. JPEG2000
JPEG2000 is a compression standard enabling both lossless and lossy storage. The
compression methods used are different from theones instandard JFIF/JPEG;they improve
quality and compression ratios, but also require more computational power to process.JPEG
2000 also adds features that are missing in JPEG.
3. TIFF
The TIFF (Tagged Image File Format) format is a flexible format that normally
saves 8 bits or 16 bits per color (red, green, blue) for 24-bit and 48-bit totals, respectively,
usually using either the TIFF or TIF filename extension.TIFFs can be lossy and lossless;
4. GIF
GIF (Graphics Interchange Format) is limited to an 8-bit palette, or 256 colors. This
makes theGIF format suitablefor storinggraphics withrelatively few colors such as simple
diagrams, shapes, logos and cartoon style images.
5. BMP
The
BMPfileformat (Windowsbitmap)handlesgraphicsfileswithinthe
Microsoft Windows OS. Typically, BMP files are uncompressed, hence they are large; the
advantage is their simplicity and wide acceptance in Windows programs.
6. PNG
The PNG (Portable Network Graphics) file format was created as the free, open-
source successor to GIF. The PNG file format supports 8 bit paletted images (with optional
transparency for all palette colors) and 24 bit truecolor (16 million colors).
3. Explain the principle and working of Vidicon digital camera with neat diagram
(Image sensing and Acquisition)
A digital camera is used to convert the optical information into a corresponding
electrical signal, the amplitude which varies in accordance with the variations of brightness.
Photoelectric Effects
The two photoelectric effects used for converting variations of light
intensity into electrical variations are (i) photoemission and (ii) photoconductivity.
Photo emission: Certain metals emit electrons when light falls on their surface.
These emitted electrons are called photoelectrons and the emitting surface a photocathode.
Light consists of small bundles of energy called photons. When light is made incident on a
photocathode, the photons give away their energy to the outer valence electrons to allow
them to overcome the potential-energy barrier at the surface. The number of electronswhich
can overcome the potential barrier and get emitted depends on the light intensity. Alkali
metals are used as photocathode because they have very low work-function. Cesium- silver
or bismuth-silver-cesium oxides are preferred as photo emissive surfaces becausethey are
sensitive to incandescent light and have spectral response very close to the human eye.
Photo conductivity:-The second method of producing an electrical image is by
photoconduction, where the conductivity or resistivity of the photosensitive surface variesin
proportion to the intensity of light focused on it. In general the semiconductor metals
including selenium, tellurium and lead with their oxides have this property known as
photoconductivity. The variations in resistance at each point across the surface of the
material are utilized to develop a varying signal by scanning it uniformly with an electron
beam

Fig-Photoemission

Fig-Photoconductivity
Typesofcamera tubes: 1)orthicon 2)vidicon 3)Plumbicon.
Vidicondigitalcamera:-
The principle of operation is photoconductivity. The resistance of the target
decreases when exposed to light. The target consists of a thin photo conductive layer of
either selenium or antimony compounds. This is deposited on a transparent conducting film
coated on the inner surface of the face plate. This coating is called plate. Image side ofphoto
layer is connected with the signal electrode and is connected to DC supply through a load
resistance R. The beam that emerges from the electron gun is focused on the surface of the
photo conductive layer by the combined action of magnetic field of an external coil and
electrostatic field of grid 3.Grid 4 provides decelerating action so that the electrons hit the
photo conductive layer with very less speed to prevent secondary emission. Deflection ofthe
beam is done by the deflection coils placed around the tube.
Threesectionsofimageorthiconare
1.Imagesection2.Scanningsection3.electrongun multiplier.
1. Image section:-Inside of glass face plate at the front is coated with a silver antimony
coating added with cesium, which acts as photocathode. Light from the scene being
televised are focused on to photocathode surface and electrons are released from each point
on photocathode in proportion to incident light intensity coming from the image. The
distributionof electron generation depends on the brightness levels at different points of the
picture .The electron image of the scene gets formed on the target side of the photo coating
and extends towards the target. Target plate is very thin sheet of glass and can store the
received charges. Target plate is 400V more positive wrt photocathode, and this causes
acceleration of emitted electrons towards it.
The electron in motion has a tendency to repel each other, which may cause
distortion in picture. To avoid this magnetic field is applied using a long focus coil. The
magnetic coil focuses the emitted electrons on the target to get well defined electron image.
Theimage sideof thetarget has a small depositofcesium and has high secondary emission.
When electron image with high velocity hits the target secondary emission results. These
secondary electrons are collected by a wire mesh screen, which is in front of the target on
the image side and is maintained at a higher potential wrt target. Secondary emission leaves
behind a positive charge distribution on the target plate.
The target plate is made up of thin glass, this retards the positive charge
degradation and hence positive charge on the target plate build up. Due to high secondary
emission theintensity of positivecharge distribution is four to five times more, compared to
the charge liberated by the photocathode. Increase in charge density at target compared to
charge liberated at photocathode is known as image multiplication and increases the
sensitivity of image orthicon. Target plate should have high resistivity laterally for storage
action and low resistivity along its thickness for positive charge to conduct to other side
which is scanned. This is the reason why the target plate is thin. Whatever charge
distribution builds up on one side of target plate appears on the other side which is scanned.
2. Scanning section: Electron gun produces the beam focused using magnetic fields
applied to grid 2, 3, 4.Alignment coil provides magnetic field that can be varied to adjustthe
position of the scanning beam to correct location. Deflection is by scanning fields of
horizontal & vertical deflection coils mounted at yoke. These coils are connected to
deflection sweep circuits. Grid 4 voltage decelerates the electron beam this prevents
secondary emission from target. The electron beam strikes the target plate and the electrons
from beam gets divided into two sets.1) certain electrons neutralize the positive charged
areas of the target.2) certain electrons turns back and is called as signal current. Resultant
beamthatturnsbackaremaximumforblackareasandminimumforbrightareas.The
electrons hitting the screen may cause stray electron field &may grid tangentially whichmay
cause defocusing and loss resolution. The beam should strike at right angles with screen.
3. Electron gun multiplier. When the surface of a metal is bombarded by incident
electronshavinghigh velocitiessecondary emissionstakes place. Cameratubes makeuseof
secondary emissions toamplify small amount of photoelectric current that is later employed
to develop video signal. The electron multiplier is a collection of anode cathode electrodes
called dynodes. The electrons are accelerated by the positive potential of the dynode. The
number of electrons available is multiplied each time the secondary electron strikes the
emitting surface of the next positive dynode. The current amplification is noise free as it
does not have any active or passive components.

Fig-Dgitalcamera(VIDICON)

Fig-Digitalcamera(VIDICON)
Light from the scene is focused on a photosensitive surface known as the image
plate, and the optical image thus formed with a lens system represents light intensity
variations of the scene. The photoelectric properties of the image plate then convertdifferent
light intensities into corresponding electrical variations. In addition to this photoelectric
conversion whereby the optical information is transduced to electrical charge distribution on
the photosensitive image plate, it is necessary to pick-up this information as fast as possible
4. ExplaininDetailthestructure oftheHuman eyeandalsoexplaintheimage
formation in the eye. (OR) Explain the Elements of Visual Perception.
VisualPerception:Means howan image isperceivedbya humanobserver
TheShapeofthehumaneyeisnearlyaspherewithanAveragediameter=20mm.It has 3
membranes:
1. CorneaandSclera–outercover
2. Choroid
3. Retina-enclose theeye
Cornea:tough, transparenttissuecoverstheanteriorsurfaceoftheeye.
Sclera:Opaquemembrane,encloses theremainderof theoptic globe
Choroid: Lies below the sclera .It contains a lot of blood vessels providing nutrition to the
eye. The Choroid coat is heavily pigmented and hence helps to reduce the amount of
extraneous light entering the eye and the backscatter within the optical globe. At theanterior
part, the choroid is divided into Ciliary body and the Iris diaphragm.

StructureoftheHumanEye:

The Iris contracts or expands according to the amount of light that enters into the
eye. The central opening of the iris is called pupil, which varies from 2 mm to 8 mm in
diameter.
Lens is made of concentric layers of fibrous cells and is suspended by fibers that attach to
the Ciliary body. It contains 60-70% of water, 6 % fat and more protein. Lens is colored by
yellow pigment which increases with eye. Excessive clouding of lens can lead to poor or
loss of vision, which is referred as Cataracts.
Retina: Innermost membrane of the eye which lines inside of the wall’s entire posterior
portion.Whentheeye isproperly focused, light froman objectoutside theeye isimaged on the
retina. It consists of two photo receptors.
Receptors are dividedinto2classes:
1. Cones
2. Rods
1. Cones: These are 6-7 million in number, and are shorter and thicker. These are located
primarily in the central portion of the retina called the fovea. They are highly sensitive to
color.
Eachisconnectedtoitsownnerve endandthusthehumancanresolvefine details.
Conevisioniscalled photopicorbright-light vision.
2. Rods:These are75-150millioninnumberandare relatively longandthin.
These are distributed over the retina surface. Several rods are connected to a single nerve
end reduce the amount of detail discernible. Serve to give a general, overall picture of the
field of view.
These are Sensitivetolowlevels of illumination.Rodvisionis called scotopicor dim-light
vision.
Thefollowingshowsthedistributionofrodsandconesintheretina

Blindspot:theabsenceof receptorsintheretinaiscalledasBlindspot.Fromthe diagram,


1. Receptordensityismeasured indegreesfromthe fovea.
2. Conesare mostdense inthecenter oftheretina(inthe area ofthefovea).
3. Rodsincreaseindensityfromthecenterouttoapprox.20°offaxisandthen
decrease in density out to the extreme periphery of the retina
5. Illustrate the concept of Brightness adaptation.(or)write short notes on 1.Mach
band effect 2. Weber’s Ratio3. Simultaneous Contrast (May 2007)
SubjectiveBrightness:isdefinedastheintensityaspreservedbythehumanvisualsystem (HVS).
BrightnessAdaptationmeanstheHVScanoperateonlyfromscotopictoglarelimit.It cannot
operate over the range simultaneously.
From the diagram it is seen that the brightness is a logarithmic function of light
intensity.Bais a brightness adaptation level. Below Ba, the shades of colors cannot be
discriminated.
Contrast sensitivity: The ability of the eye to discrimination b/w changes in brightness at
any specific adaptation level is of considerable interest
Weber’sRatio:Theratioofincrementofilluminationtobackgroundofilluminationis called as
Weber ratio.(ie) ∆Ic/I

Iftheratio(∆Ic/I)issmall,thensmallpercentageofchange inintensity is needed


(ie) good brightness adaptation.
Iftheratio(∆Ic/I)islarge,thenlargepercentageofchangeinintensityis needed (ie)
poor brightness adaptation.

Atlowlevelsofillumination,whentheWeberratioislarge,brightnessdiscriminationis poor .Here


vision is carried out by the Rods.
At high levels of illumination, when the Weber ratio is small, brightness discrimination
isimproved and better .Here vision is carried out by the Cones.
MachBand:Machbandsareanopticalillusionconsistingofanimageoftwowidebands, one light
and one dark, separated by a narrow strip with a light – to – dark gradient.
Thusmachbandeffectmeanstheintensityofthestripesisconstant.Thereforeit preserves
the brightness pattern near the boundaries and these bands are called as mach band.
Simultaneous Contrast: Two colors side by side interact with one another and change our
perception accordingly. The effect of this interaction is called as Simultaneous Contrast

Herealltheinnersquareshavethesameintensity,buttheyappearprogressively
brighter as the background becomes lighter
5. Writeshortnoteson(i)luminance,(ii)hueortint,and(iii)saturation,iv)Brightness
v)Contrast
Any color has three characteristics to specify its visual information. These are (i)
luminance,(ii) hue or tint, and (iii) saturation. These are defined as follows:
(i) Luminance
This is the amount of light intensity as perceived by the eye regardless of the color.
In black and white pictures, better lighted parts have more luminance than the dark areas.
Different colours also have shades of luminance in the sense that though equallyilluminated
appear more or less bright. Thus on a monochrome TV screen, dark red colour will appear
as black, yellow as white and a light blue colour as grey.
(ii) Hue
This is the predominant spectral colour of the received light. Thus the colour of any
object is distinguished by its hue or tint. The green leaves have green hue and red tomatoes
have red hue. Different hues result from different wavelengths of spectral radiation and are
perceived as such by the sets of cones in the retina.
(iii) Saturation
This is the spectral purity of the colour light. Since single hue colours occur rarely
alone, this indicates the amounts of other colours present. Thus saturation may be taken as
an indication of how little the colour is diluted by white. A fully saturated colour has no
white. vivid green is fully saturated and when diluted by white it becomes light green. The
hue and saturation of a colour put together is known as chrominance. Note that it does not
contain the brightness information. Chrominance is also called chroma.

(iv) Brightness:
Brightness is the overall or average intensity of illumination and it determines
backgroundlight level inthe reproduced picture. The brightnesscontrol can be varied toget
average illumination of the scene.
(ii) Contrast:
Contrast is the difference in light intensity between black and white parts of thepicture
and above the average brightness level. Too much contrast makes the picture hard white
little contrast gives the impression of a washed out picture.

6. ExplaintheColorimagefundamentals(models)withneatdiagram
According to the theory of the human eye, all colors are seen as variable combinations
of the three so-called primary colors red (R), green (G), and blue (B). The followingspecific
wavelength values to the primary colors:
Blue (B) =435.8nm
Green (G)= 546.1 nm
Red(R) =700.0 nm
Theprimarycolorscan beaddedtoproduce thesecondarycolors
Magenta (red +blue), cyan(green+blue), andyellow(red + green),see Figure
B

Blue(0,0,1) Cyan

Magenta
White

Black (0,1,0)
G
Green

(1,0,0)
Red Yellow

R
Figure-RGBcolor cube.
Mixing all the three primary colors results in white. Color television reception is based
on this three color system with the additive nature of light.
Thereareseveralusefulcolormodels:RGB,CMY,YUV, YIQ,and HSI.
1. RGBcolormodel
ThecolorsoftheRGBmodelcanbedescribedasatriple(R,G,B),sothat R, G, B .The RGB
color space can be considered as a three-dimensional unit cube, in which each axis
represents one of the primary colors, see Figure. Colors are points inside the cube defined
by its coordinates. The primary colors thus are red=(1,0,0), green=(0,1,0), and blue=(0,0,1).
The secondary colors of RGB are cyan=(0,1,1), magenta=(1,0,1) and yellow=(1,1,0).
The nature of the RGB color system is additive in the sense how adding colors
makes the image brighter. Black is at the origin, and white is at the corner where
R=G=B=1. The gray scale extends from black to white along the line joining these two
points. Thus a shade of gray can be described by (x,x,x) starting from black=(0,0,0) to
white=(1,1,1).
Thecolors areoften normalizedas giveninequation .Thisnormalizationguarantees that
r+g+b=1.
R
r g
RBG 
G
RBG
B
b
RBG

2. CMYcolormodel
The CMY color model is closely related to the RGB model. Its primary colors are C
(cyan), M (magenta), and Y (yellow). I.e. the secondary colors of RGB are the primary
colors of CMY, and vice versa. The RGB to CMY conversion can be performed by
C1R
M1G
Y1B

The scale of C, M and Y also equals to unit: C, M, Y .The CMY color system is used in
offset printingin a subtractive way, contrary to theadditive nature of RGB. A pixel of color
Cyan,forexample,reflectsalltheRGBothercolorsbutred.Apixelwiththecolorof
magenta, on the other hand, reflects all other RGB colors but green. Now, if we mix cyan
and magenta, we get blue, rather than white like in the additive color system.

ADDITIVECOLOURMIXING:

In order to generate suitable colour signals it is necessary to know definite ratios in which
red, green and blue combine form new colours. Since R,G and B can be mixed to create any colour
including white, these are called primary colours.
R+G+B=Whitecolour R –
G – B = Black colour
TheprimarycoloursR,GandBcombinetoformnewcolours R + G
=Y
R + B = Magenta (purplish)
G+B=Cyan(greenishblue)

GRASSMAN’SLAW:

Our eye is not able to distinguish each of the colours that mix to form a new colour but
instead perceives only the resultant colour. Based on sensitivity of human eye to various colours,
reference white for colour TV has been chosen to be a mixture of colour light in the ratio

100%W=30%R+59%G+11%B

Similarly yellow can be produced by mixing 30% of red and 59% of green, magenta by
mixing 30%of red and 11% ofblue and cyan by mixing 59% of green to 11% of blue. Base on this it
is possible to obtain white light by mixing 89% of yellow with 11% of blue or 70% of cyan with
30% of red.
Thus the Eye perceives new colours based on the algebraic sum of red, green and blue light
fluxes. This forms the basic of colour signal generation and is known as GRASSMAN’S LAW.
3. YUVcolor model
The basic idea in the YUV color model is to separate the color information apart
from the brightness information. The components of YUV are:
Y0.3R0.6G0.1B
UBY
VRY
Yrepresentstheluminanceoftheimage,whileU,Vconsistsofthecolor
information, i.e. chrominance. The luminance component can be considered as a gray-scale
version of the RGB image, The advantages of YUV compared to RGB are:
1. Thebrightnessinformationisseparatedfromthecolor information
2. Thecorrelationsbetweenthecolor componentsare reduced.
3. Most of the information is collected to the Y component, while the information
content in the U and V is less. where the contrast of the Y component is much greater
than that of the U and V components.
The latter two properties are beneficial in image compression. This is because the
correlations between the different color components are reduced, thus each of the
components can be compressed separately. Besides that, more bits can be allocated to the Y
component than to U and V. The YUV color system is adopted in the JPEG image
compression standard.
3. YIQcolormodel
YIQ is a slightly different version of YUV. It is mainly used in North American
television systems. Here Y isthe luminance component, justas in YUV. I and Q correspond
to U and V of YUV color systems. The RGB to YIQ conversion can be calculated by
Y0.299R0.587G0.114B
I0.596R 0.275G  0.321B
Q0.212R0.523G  0.311B
TheYIQcolormodelcan alsobedescribed correspondingtoYUV:
Y0.3R0.6G0.1B
I 0.74V 0.27U
Q0.48V0.41U
4. HSIcolormodel
TheHSImodelconsistsofhue(H),saturation(S),andintensity(I).
Intensity correspondstotheluminancecomponent(Y)oftheYUVandYIQmodels.
Hueisanattributeassociatedwiththedominantwavelengthinamixtureoflight waves, i.e.
the dominant color as perceived by an observer.
Saturation refers to relative purity of the amount of white light mixed with hue. The
advantages of HSI are:
The intensity is separated from the color information (the same holds for the
YUVand YIQ models though).
Thehueandsaturationcomponentsareintimatelyrelatedtothewayinwhich human
beings perceive color.

TheRGBtoHSIconversioncanbe summarizedasfollows:

1  1RGRB 
H cos 
1 2 ,if BG
360∘       
 RG  RB GB 
2

1  1RGRB 
H1 cos 
1 2 ,otherwise
360∘
 RG RBGB
2

3
S=1- minR,G,B
RGB
1
I RGB
3
Table-Summaryofimagetypes.
Imagetype Typicalbpp No.ofcolors Common file formats
Binaryimage 1 2 JBIG,PCX,GIF,TIFF
Gray-scale 8 256 JPEG,GIF,PNG,TIFF
Colorimage 24 16.6 10 6
JPEG,PNG,TIFF
Color palette 8 256 GIF,PNG
image
Video image 24 16.6 106 MPEG
7. Discuss the role of sampling and quantization in the context of image encoding
applications.
ImageSamplingandQuantization:
To generate digital images from sensed data.The output of most sensors is a
continuous voltage waveform whose amplitude and spatial behavior are related to the
physical phenomenon being sensed.To create a digital image, we need to convert the
continuous sensed data into digital form.This involves two processes; sampling and
quantization.

BasicConcepts inSamplingandQuantization:
The basic idea behind sampling and quantization is illustrated in figure, figure (a)
shows continuous image,(x, y), that we want to convert to digital form.An image may be
continuous with respect to the x-and y-coordinates, and also in amplitude.To convert it to
digital form, we have to sample the function in both coordinates and in amplitude,Digitizing
the coordinate values is called sampling.Digitizing the amplitude values is called
quantization.
The one dimensional function shown in figure (b) is a plot of amplitude (gray level)
values of the continuous image along the line segment AB in figure (a).The random
variations are due to image noise.To sample this function, we take equally spaced samples
along line AB, as shown in figure (c).The location of each sample is given by a vertical tick
mark in the bottom part of the figure.The samples are shown as small white squares
superimposed on the function.The set of these discrete locations gives the sampled
function.However, the values of the samples still span (vertically) a continuous range of
gray-level values.In order to form a digital function, the gray-level values also must be
converted (quantized) into discrete quantities.The right side of figure (c) shows the gray-
level scale divided into eight discrete levels, ranging form black to white.The vertical tick
marks indicate the specific value assigned to each of the eight gray levels.The continuous
gray levels are quantized simply by assigning one of the eight discrete gray levels to each
sample.The assignment is made depending on the vertical proximity of a sample to a
vertical tick mark.The digital samples resulting from both sampling and quantization are
shown in figure (d).Starting at the top of the image and carrying out this procedure line by
line produces a two dimensional digital image.
Sampling in the manner just described assumes that we have a continuous image in
both coordinate directions as well as in amplitude.In practice, the method of sampling is
determined by the sensor arrangement used to generate the image.When an image is
generated by a single sensing element combined with mechanical motion, as in figure, the
output of the sensor is quantized in the manner described above.However, sampling is
accomplished by selecting the number of individual mechanical increments at which we
activate the sensor to collect data.Mechanical motion can be made very exact so, in
principle, there is almost no limit as to how fine we can sample and image.However,
practical limits are established by imperfections in the optics used to focus on the sensor an
illumination spot that is inconsistent with the fine resolution achievable with mechanical
displacements.
Figure: Generating a digital image. (a) Continuous image. (b) A scan line from A to B
inthecontinuousimage,usedtoillustratetheconceptsofsamplingandquantization.
(c)Samplingandquantization.(d)Digitalscan line.
When a sensing strip is used for image acquisition, the number of sensors in thestrip
establishes the sampling limitations in on image direction.Mechanical motion in the other
direction can be controlled more accurately, but it makes little sense to try to achieve
sampling density in one direction that exceeds the sampling limits established by thenumber
of sensors in the other.Quantization of the sensor outputs completes the process of
generating a digital image.
Quantization
Thisinvolvesrepresentingthesampleddatabyafinitenumberoflevelsbasedonsome criteria such
as minimization of the quantizer distortion, which must be meaningful.
Quantizer design includes input (decision) levels and output (reconstruction) levels as well
as number of levels. The decision can be enhanced by psychovisual or psychoacoustic
perception.
Quantizers can be classified as memory less (assumes each sample is quantized
independently or with memory (takes into account previous sample)
Alternative classification of quantisers is based on uniform or non- uniform quantization.
They are defined as follows.
Uniformquantizers Non-uniformquantizers

They are completely defined by (1) the TheStepsizesare notconstant.Hence non-


number of levels it has (2) its step size and uniform quantization is specified by input
whether it is midriser or midtreader. We and output levels in the 1 stand
willconsideronlysymmetricquantizers 3rdquandrants.
i.e. the input and output levels in the
3rdquadrant are negative of those in
1stquandrant.

8. Explain2DSampling theory

f(x,y) fs(x,y) u(m,n)


Sampling Quantization Computer

Digitization
u(m,n) D/A
Computer Display
Fig1Image samplingandquantization /Analogimage display

Thecommonsamplinggridisuniformlyspaced,rectangulargrid.
Imagesampling=readfromtheoriginal,spatiallycontinuous,brightnessfunctionf(x,y), only
in the black dots positions (only where the grid allows):

 f (x,y) f(x,y), xmx,y ny ,


s 
0, otherwise
m,nZ.

Samplingconditionsfornoinformationloss–derivedbyexaminingthespectrumofthe image 
by performing the Fourier analysis:

SaveethaEngineering College 29
Thespectrumof alimited bandwidthimageanditsspectralsupport
Since the sinc function has infinite extent => it is impossible to implement in practice the
ideal LPF it is impossible to reconstruct in practice an image from its samples without error
if we sample it at the Nyquist rates
9. ExplainUniformQuantizationandNon-UniformQuantization
1. Non-UniformQuantization:
Max Lloyd Quantizer
GiventherangeofinputuasfromaLtoa u ,andthenumberofoutputlevelsasL,
wedesignthe quantizersuchthatMSQEisminimum.
Lettk=decisionlevel(i/p level)andrk=reconstlevel (o/p level)
Iftk utk1 thenu'Qurk and𝑒엸uu'

uu'  (uu')


tk1u

MSQEE pudu1
2
2
tk

where pu=Probabilitydensityfunctionofrandomvariableu
Theerrorcan alsobewrittenas
Ltk1 2

urk pudu2
k1tk

randtarevariables.Tominimizeweset   
 0
rk tk
k k

Findt k:
u =tk, u’= rk
Ltk1 2 tk 2 tk1 2

urk pudu  tkrk1 ptkdtk tkrk ptkdtk3



  

k1tk1 tk tk1 tk
  tk1    
2 2

     

tk k1 
 tk rk1 p(tk)dtk tk rk ptk dtk 4
tk t tk 
2tk  rk1 pt k   tk  rk ptk 0
2

tkrk1tkrk
Sincetkrk10andtkrk0solutionthatisvalidis
tkrk1tkrkortkrkrk1/25
i.e.inputlevelisaverage oftwoadjacentoutput levels.
Find rk

d  
tk1

rk rk tk



  ur2
k
p  u  du06
k 
  tk1   

 2u rkpudu 0 7
 rk tk
Hence 
 tk1 k1
  
rkupudu 
pudu  8
tk  tk 
t t
rk  k1 k 9
2
Outputlevelisthecentroidofadjacentinputlevels.Thissolutionisnotclosedform.To
findinputlevelt k ,onehastofindrk andviceversa.Howeverbyiterativetechniquesboth
rkandtk canbefoundusingNewton’smethod.
i.e.eachreconstructionlevelliesmid-way betweentwoadjacentdecision levels.
2. UniformQuantizer:
1 1
When pu  ,p(e)1/q,asshown
auaL A
Uniformquantizertransferfunction

r4=224
Reconstructionlevels

r3=160

r2=96

r1=32

t1=0 t2=64 t3=128 t4=192 t5=256


Decisionlevels

Sincequantizationerrorisdistributeduniformlyovereachstepsize(q)withzeromeani.e.
overq/2,q/2,thevarianceis,
e 
q/2

2 e 2 p(e)de1
q/2
q/2
1 e 2 deq2/122
qq/2

e 
2

Letrange ofubeAand 2 u thevariance;


A/2

u  u2p(u)du3
2
A/2

1 
A/2

Then   A 2u
u2duA2/12 4
A/2

Ab-bitquantizercanrepresentLoutputlevelsas2bLquantizationstepsize
A
q .
2b
1
Hence2 e  A2 /22b;5 12
SNRforuniformquantizerindB=10log( 2/2) 22b6bdB ------- 6
u e
PropertiesofoptimumMean squarequantizers:.
1. Thequantizeroutputisan unbiasedestimateof input i.e. Eu'Eu
SNRfor uniformquantizerincreasesby 6dB/bit
2. The quantizer error is orthogonal to the quantizer output i.e.,
Euu'u'0quantizationnoiseis uncorrelatedwithquantized output.
3. The variance of quantizero pis reduced by the factor1fBwhere fBdenotes
themeansquaredistortionoftheB-bitquantizerforunityvarianceinputs.
i.e.2'1f(B)2
u u
4. It is sufficient to design mean square quantizers for zero mean and unity variance
distributions.
10. Explainindetailthewaystorepresentthedigitalimage.
Assume that an image  (x,y) is sampled so that the resulting digital image has M
rows and N columns.The values of the coordinates (x,y) now become discrete quantities.
For notational clarity and convenience, we shall use integer values for these discrete
coordinates.Thus, the values of the coordinates at the origin are (x,y) = (0,0).The next
coordinate values along the first row of the image are represented as (x,y) = (0,1 Figure
shows the coordinate convention used.

Figure:Coordinateconventionusedinthisbooktorepresentdigitalimages.
The notation introduced in the preceding paragraph allows us to write the complete
M X N digital image in the following compact matrix from:
f(0,0)
 f(1,0) f(0,1) … f(0,N1) 
f(1,1) f(1,N1) 
f  
(x,y)   ⁝ ⁝
 f(M1,0) f(M1,1) ⁝  
f(M1,N1) 
 
The right side of this equation is by definition a digital image.Each element of this
matrixarrayiscalledanimageelement,pictureelement,pixel.orpel.Thetermsimage
and pixel will be used throughout the rest of our discussions to denote a digital image
andits elements.
In some discussions, it is advantageous to use a more traditional matrix notation to denote a
digital image and its elements:
a ao,1 a0,N1
a 0,0 
a a
A 1,0 1,1 1,N1

 ⁝ ⁝ ⁝ 
a a a 
M1,0 M1,1 M1,N1

Clearly,aij=(x=i,y=j)=(i,j), soEquationsare identicalmatrices.


This digitization process requires decisions about values for M.N. and for the
number, L, of discrete gray levels allowed for each pixel.There are no requirement s on M
and N, other than that they have to be positive integers.However, due to processing, storage,
and sampling hardware considerations, the number of gray levels typically is an integer
power of 2:
L=2k
We assume that the discretelevels areequally spaced and that they areintegers inthe
interval [0, L – 1].
Thenumber,b,ofbitsrequiredtostoreadigitizedimageis b = M
X N X k.
When M = N, this equation becomesb = N2k.
NumberofstoragebitsforvariousvaluesofNandk.

N/k 1(L=2) 2(L=4) 3(L=8) 4(L=16) 5(L=32) 6(L=64) 7(L=128) 8(L=256)


32 1,024 2,048 3,072 4,096 5,120 6,144 7,168 8,192
64 4,096 8,192 12,288 16,384 20,480 24,576 28,672 32,768
128 16,384 32,768 49,152 65,536 81,920 98,304 114,688 131,072
256 65,536 131,072 196,608 262,144 327,680 393,216 458,752 524,288
512 262,144 524,288 786,432 1,048,576 1,310,720 1,572,864 1,835,008 2,097,152
1024 1,048,576 2,097,152 3,145,728 4,194,304 5,242,880 6,291,456 7,340,032 8,388,608
2048 4,194,304 8,388,608 12,582,912 16,777,216 20,971,520 25,165,824 29,369,128 33,554,432
4096 16,777,216 33,554,432 50,331,648 67,108,864 83,886,080 100,663,296 117,440,512 134,217,728
8192 67,108,864 134,217,728 201,326,592 268,435,456 335,544,320 402,653,184 469,762,048 536,870,912

11. Write short notes on:(a) Neighbors of Pixels (b) Distance Measures c.
Connectivity d. Adjacency
1. Neighborsofapixels:
A pixel p at coordinates (x, y) has four horizontaland vertical neighbors whose coordinates
are given by (x + 1, y), (x -1, y), (x, y +1), (x, y -1)

This set of pixels, called the 4-neighbors of p, is denoted by N4(p). Each pixel is
aunitdistancefrom(x, y), and someoftheneighbors ofplieoutsidethedigital imageif(x,y) is on
the border of the image.

Thefour diagonalneighborsofphavecoordinates

(x + 1, y + 1), (x + 1, y – 1), (x – 1, y + 1), (x – 1, y -1) and are denoted by ND(p). These


points, together with the 4-neighbors, are called the 8-neighbors of p, denoted by N8(p). As
before, some of the points in ND(p) and N8(p) fall outside the image if (x, y) is on the border
of the image.
(x-1,y-1) (x,y-1) (x+1,y-1)
8-neighborsof p:
N8(p): Allthe4-anddiagonalneighbors (x-1,y) (x,y) (x+1,y)

(x-1,y+1) (x,y+1) (x+1,y+1)

2. DistanceMeasures;

For pixels p, q, and z, with coordinates (x, y), (s, t), and (, w), respectively, Dis a distance
function or metric if
(a) D(p,q)0 (D (p, q)= 0 iffp =q),
(b) D(p,q) =D(p,q),and
(c) D(p,z)D(p,q) +D( q, z).,

TheEuclideandistancebetween pand qisdefinedas

D(p,q)=[ (x– s)2+(y – t)2] ½. ………1

Forthisdistancemeasurethepixelshavingadistancelessthanorequaltosome value r from


(x, y) are the points contained in a disk of radius r centered at (x, y).

TheD4distance(alsocalledcity-blockdistance)between pandqisdefinedas

D4(p,q) xsyt. …………2

In this case, the pixels having a D4distance from (x, y) less than or equal to some
value r form a diamond centered at (x, y). For example, the pixels with D4distance 2from
(x, y) (the center point) form the following contours of constant distance:

2
2 1 2
2 1 0 1 2
2 1 2
2

Thepixels withD4= 1 are the4-neighborsof(x,y).

TheD8distance(alsocalledchessboarddistance)betweenpandqisdefinedas

D8(p,q)maxxs,y t. ………3

In this case, the pixels with D8distance from (x, y)less than or equal to some value r forma
square centered at (x, y). For example, the pixels with D, distance 2 from (x, y) (the center
point) form the following contours of constant distance.
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2

Thepixels withD8= 1 are the8-neighborsof(x, y).

3. Connectivity

Connectivity between pixels is a fundamental concept that simplifies the definitionof


numerous digital image concepts, such as regions and boundaries. To establish if two pixels
are connected, it must be determined if they are neighbors and if their gray levels satisfy a
specified criterion of similarity (say, if their gray levels are equal). For instance, in a binary
image with values 0 and 1, two pixels may be 4-neighbors, but they are said to be connected
only if they have the same value.
4. Adjacency:ConsiderVasasetofgray-levelvalues, andpand qastwopixels.
4-adjacency:twopixelspandqfromVare 4-adjacentifqisinN4(p).
8-adjacency:twopixelspandqfromVare 8-adjacentifqisinN8(p).
m-adjacency:twopixelspandqfrom Varem-adjacent ifqisinN4(p),orinND(p)and N4(p) 
N4(q) has no pixels whose values are from V.

PixelArrangement 8-AdjacentPixels m-AdjacentPixels


0 1 1 0 1 1 0 1 1

0 1 0 0 1 0 0 1 0

0 0 1 0 0 1 0 0 1
V{1}:ThesetVconsists ofpixelswithvalue1.
TwoimagesubsetsS1,S2areadjacentifatleastonepixelfrom S1andonepixelfrom S2are adjacent.
12. WriteshortnotesontwodimensionalOrthogonalandUnitarytransforms
Two dimensional unitary transforms play an important role in image processing.The
termimagetransformreferstoaclassofunitarymatricesusedforrepresentationof
images.
In analogy, with I-D signals that can be represented by an orthogonal series of basis
functions, we can similarly represent an image in terms of a discrete set of basis arrays
called “basis images”.These are generated by unitary matrices.
Alternativelyan (NN) imagecanberepresentedas (N21)vector. Animage
transformprovidesasetof coordinatesor basisvectorsforthevectorspace.
I-D-Transforms:
Foraonedimensional sequence  u(n), n0,1 ....... N1 representinga
vectoruofsizeN ,aunitary transformis:v=Au
N1
 v(k)= a(k,n)u(n),for 0KN1 (1)
n0
T*T
where A1= A* (unitary)
T
Thisimplies, u=A* v
N1
or, u(n) =  v(k)a*(k,n) ,for 0nN1 (2) Equation
k0
(2)canbe viewedas aseriesrepresentationofsequenceu(n).The columnsof
→

T
A* i.ethevectors *ak a*(k,n), 0n N1T arecalled the“basisvectors”of
A.
Theseriescoefficientsv(k)givearepresentationoforiginalsequenceu(n)andareusefulin compression ,
filtering , feature extraction and other analysis.
TwodimensionalOrthogonalandUnitary transforms:
Asappliedtoimageprocessing, ageneralorthogonalseries expansionforan
NNimageis apairoftransformationsoftheform:
N1
v(k,l)=  u(m,n)ak,l(m,n) ,0k,lN1 (3)
m,n0
u(m,n)= N1 v(k,l)a* (m,n), 0m,nN1 (4)
 k,l
k,l0
whereak,l(m,n) iscalledan”image transform.”
Itisa setofcompleteorthogonaldiscretebasisfunctionssatisfying the properties:-
N1
1) Orthonormality:   ak,l(m,n)a*// (m,n)
m,n0 k,l
=δ(kk,ll)
N1
2) Completeness: a (m,n)ak (m,n)
 k,l k,l
k,l0
=δ(mm,nn)
Theelementsv (k,l)aretransformcoefficients andVv(k,l) isthetransformed
image.
Theorthonomalitypropertyassures
Q1 thatanytruncated seriesexpansionofthe form
*
U (m,n) P1 v(k,l)a (m,n) ,forPN,
P,Q   k,l
k0 l0
QN
willminimizethesumofsquareserror 2
σ2 N1 u(m,n)U (m,n)
e    P,Q 
m,n0
wherecoefficientsv(k,l)are givenby(3).
Thecompletenesspropertyassuresthat thiserrorwill bezero for PQN
SeparableUnitary Transforms:
Thenumber ofmultiplicationsandadditionsrequiredtocomputetransformcoefficients
v(k,l)inequation(3)isO(N4).Thisistoolargeforpracticalsizeimages. If the
transform is restricted to be separable,
i.e ak,l(m,n)ak(m)bl(n)
a(k,m)b(l,n)
where ak (m),k0(1)n1,
and bl(n),l0(1N1 are1Dcomplete orthogonalsetsof basisvectors.
OnimpositionofcompletenessandorthonormalitypropertieswecanshowthatA
a(k,m),
and B  b(l,n) areunitary matrices.
T T
i.e AA* =I= ATA*and BB* =I= BTB*
OftenonechoosesBsameasA
N1
 v(k,l)=   a(k,m)u(m,n)a(l,n)
m,n0
 V=AUA T
(5)
N1 *
*
And u(m,n)=  a (k,m)v(k,l)a (l,n)
k,l0
T
U= A* VA* (6)
Eqn(5)canbewrittenasV T =A(AU)T
Eqn(5)canbeperformedbyfirsttransformingeachcolumnof Uandthen
transforming each row of the result to obtain rows of V.
→ T
BasisImages:Let a* denote kth columnof A* .
k
→ T
Letusdefinethematrices A*k,
l  akal
**
andmatrix innerproduct oftwoNN matrices
FandGas
N1
F,G=   f(m,n)g*(m,n)
m,n0
Thenequ (6)and(5)giveaseriesrepresentation.
N1 *
U= v(k,l)A
 k,l
k,l0

and v(k,l)= u,A *k,


l

Anyimage Ucanbeexpressedaslinearcombinationof N2matrices. A*k,


l called
“basis images”.
ThereforeanyNN imagecanbe expandedinaseriesusingacompletesetof N2basis
images.
11 1 ; U= 1 2
1 1
Example:LetA=
3 4
2   
Transformed imageV=AUAT 5 1
=
 
 2 0
T
AndBasisimagesarefoundasouterproductofcolumnsof A* i.e
11
A* 0,0=  (11)
2 
1
11
A* 0,1=  (1 1)
2 1
=11 1
2 1 1
= T
A*1,0
 
*
A = 11 1 1 1)
 (1
21 1
1,1  1 
 
Theinverse transformation
*T * 11 15  11
 1
A VA= 2 1 1 2 0 1 1 
   
1 2 
=  =U
 3 4 

13. Explainthe2-DDFTtransformations
ThetwodimensionalDiscreteFourierTransform(2-DDFT)
Iff(x,y)isan MN array,suchasthatobtainedbysamplingacontinuousfunctionof
twodimensionsatdimensions MandN onarectangulargrid,thenitstwodimensional
DiscreteFouriertransform (DFT)isthearray givenby
1 M1 N1
j2(ux/Mvy/N)
F(u,v)  f(x, y)e
MN x0 y0

u0,…,M1, v0,…,N1
andtheinverseDFT
M1N1 (IDFT)is
f(x,y) F(u,v)ej2(ux/Mvy/N)

u0v0
Whenimagesaresampledinasquarearray,
N1N1
MN and
F(u,v) 1 f(x,y)e j2(uxvy)/N

N x0y0
N1N1
f(x,y) 1 j2(uxvy)/N
F(u,v)e
Nu0v0
ItisstraightforwardtoprovethatthetwodimensionalDiscreteFourierTransformis separable,
symmetric and unitary.
14. ExplainindetailthediscreteCosineTransform(DCT)andalsoexplainits properties.
The NX Ncosine transform matrixC = {c (K, n)},also called thediscrete cosine transform
(DCT), is defined as

1 
, k0,0nN1 
 N 
C(k,n)= 
 
 2 cos(2n1)k, 1kN1,0 nN1 
 N 2N 

Theone dimensionalDCTof asequence{u (n),0n N-1}isdefined as
N1
(2n1)k
(k)=(k)u(n)cos , 0kN1
 2N 
n0

Where
1 2
(0) , (k) for1kN1
N N
Theinversetransformationisgiven by
N1
(2n1)k
U(n) =(k)(k)cos , 0nN1
 2N 
k0

The two-dimensional cosine transform pair is obtained by substituting A = A* = Cin


(5.11) and (5.12).The basis images of the 8 x 8 two-dimensional cosine transform are shown
in figures shows examples of the cosine transform of different images.
PropertiesoftheCosine Transform
1. Thecosinetransformisrealand orthogonal,that is,C =C*C-1=CT
2. The cosine transform is not the real part of the unitary DFT.This can be seen by
inspection of C and the DFT matrix F.(Also see Problem) However, the cosine transform of
a sequence is related to the DFT of its symmetric extension (see Problem)
3. The cosine transform is a fast transform.The cosine transform of a vector of N elements
can be calculated in O (N log2N) operations via an N-point FFT [19].To show this we define
a new sequence u (n) by reordering the even and odd elements of u (n) as
u(n)u(2n)
-

 ,  N
  0n 21 
u(Nn1)u(2n1)  

Now,we splitthesummation terminintoevenandodd termsanduseto obtain.

(N/2)1 (4n1)k 
 
 u(2n)cos  2N
    
 (k) =(k)  n0 (4n3)k 
  u(2n1)cos 
(N/2)1

  
 n0  2N 
(N/2)1 (4n1)k 

 u(n)cos   
 2N
 n0    
(k) (N/2)1 (4n3)k 
  u(Nn1)cos 
 
 n0  2N 

Changing theindex of summationin the second term to n’= N–n – 1 and combining terms,
we obtain
(k)(k) N1 (4n1)k
 n0 u(n)cos 2N 


Re   j2kn/N
 jk/2N N1   k/2

(K)e n0
 Re (k)W 

u(n)e   2N DFT{u(n)}N
 
Whichprovesthe previouslystatedresultForinversecosinetransformwewriteforeven data
points as
 N1 
u(2n)u‸ ( 2n) Re  (k)(k)ej/2Nej2nk/N ,
   
k0 
N
0n 1
2
 
Theodddata pointsare obtainedbynothing that
N
U(2n+1) =u‸[2(n– 1–n)], 0n - 1
2
 
Therefore, if we calculate the N-point inverse FFT of the sequence (k) (k) exp
(jk/2N), we can also obtain the inverse DCT in O (N log N) operations.Direct algorithms
that do not require FFT as an intermediate step, so that complex arithmetic is avoided, are
also possible [18].The computational complexity of the direct as well as the FFT based
methods is about the same.
4. The cosine transform has excellent energy compaction for highly correlated data.This is
due to the following properties.
5. The basis vectors of the cosine transform (that is, rows of C) are the eigenvectors of the
symmetric tridiagonal matrix Qc, defined as
1  0
 
Qc  1 1 
0  1 
 
6. The N X N cosine transform is very close to the KL transform of a first-order stationary
Markov sequence of length N whose covariance matrix is given by when the correlation
parameter iscloseto1.The reasonisthatR-1isasymmetric tridiagonal matrix,whichfor
ascalar2 (12)/(12)and  /(12)satisfies the relation
 1  0
 R  
2 1
1 1 
 
0  1
 
Thisgivestheapproximation R QCfor1
2 -1
Hence the eigenvectors of R and the eigenvectors of Q c, that is, the cosine transform,
will be quite close.These aspects are considered in greater depth in Section on sinusoidal
transforms.
This property of the cosine transform together with the fact that it is a fast transform
has made it a useful substitute for the KL transform of highly correlated first order Markov
sequences.
UNITIIIMAGEENHANCEMENT
Spatial Domain: Gray level transformations – Histogram processing – Basics of Spatial Filtering–
Smoothing and Sharpening Spatial Filtering, Frequency Domain: Introduction to FourierTransform–
Smoothing and Sharpening frequency domain filters – Ideal, Butterworth and Gaussian filters,
Homomorphic filtering, Color image enhancement.

PARTA

1. DefineImage Enhancement.
Image enhancement is a process an image so that the result is more suitable than the
original image for specific application. Image enhancement is useful in feature extraction,
image analysis and visual information display.
2. Whatarethe twocategoriesofImageEnhancement?
ImageEnhancement approaches fallsintotwobroad categories:theyare
1. Spatialdomainapproaches
2. Frequencydomainapproaches
i) Spatial domain refers to image plane itself & approaches in this category are
based on direct manipulation of picture image.
ii) Frequencydomainmethodsbasedonmodifyingtheimage byFouriertransform.
3. WritethetransferfunctionforButterworthfilter. (May/June2009)
Thetransferfunctionfora ButterworthLowpass filteris,
1 2n
H(u,v)
D(u,v)
1 
 Do 
ThetransferfunctionforaButterworthHigh passfilter is,
1
H (u ,v) 2n
 Do 
1  
 D (u,v)  
Where,n=filterorder,Do=cutofffrequencyandD(u,v)=
2 2 1/2
(u +v ) = distance from point (u,v) to the origin
4. Specifytheobjectiveofimageenhancementtechnique.(Or)Whytheimage
enhancement is needed in image processing technique. (May / June 2009)
1. The objective of enhancement technique is to process an image so that the
result is more suitable than the original image for a particular application.
2. Image Enhancement process consists of a collection of technique that seek to
improve the visual appearance of an image. Thus the basic aim is to make the image look
better.
3. Image enhancement refers to accentuation or sharpening of image features suchas
edges, boundaries or contrast to make a graphic display more useful for display and
analysis.
4. Image enhancement includes gray level and contrast manipulation, noise
reduction, edge crispening & sharpening, filtering, interpolation & magnification, pseudo
coloring, so on…
5. Mentionthevariousimageenhancementtechniques.
a. Pointoperationsor basicgrayleveltransformations
a) Contrast stretching
b) Noise clipping
c) Windowslicing
d) Histogrammodeling
b. Spatialdomainmethods
a) Noise smoothing
b) Median filtering
c) LP,HP,BPfiltering
d) Zooming
e) Unsharpmasking
c. Frequencydomainmethods
a) Linear filtering
b) Homomorphicfiltering
c) Rootfiltering
d. Pseudo coloring
a) False coloring
b) Pseudocoloring
6. Whatiscontraststretching?(May/June 2009)
1. Contraststretchingreducesanimageofhighercontrastthantheoriginalby darkening
the levels below m and brightening the levels above m in the image.
2. Contrast stretching is used to increase the dynamic range of the gray levels in the
image being processed.
Low contrast images occur often due to poor / non-uniform lighting conditioning or
due to non-linearity or small dynamic range of the image sensor.
7. Whatismeantbyhistogramofadigitalimage?(May/June2006),(May/June 2009),
(May / June 2007)
1. Histogram of an image represents the relative frequency of occurrence of the
various gray levels in the image.
2. Histogram modeling techniques modify an image so that its histogram has a
desired shape. This is useful in stretching the low contrast levels of images with narrow
histograms.
3. Thus histogram is used to either increase or decrease, the intensity level of the
pixels by any kind of transformation.
The histogram of a digital image with gray levels in the image [0,L-1] is a discrete
function given as,

h(rk )nk ,whererk is thekth greylevel, k0,1,…,L1


nk isthenumberofpixels intheimage withgreylevelrk

8. WhatisMedianFiltering?(May/June2009) (May/June2007)
1. The median filter replaces the value of a pixel by the median of the gray levelsin
the neighborhood of that pixel.
fˆ (x,y)mediang(s,t)
(s,t)Sxy
2. Median filters are useful for removing isolated lines or points (pixels) while
preserving spatial resolutions. They perform very well on images containing binary (salt
and pepper) noise but perform poorly when the noise is Gaussian.
9. WhatdoyoumeanbyPoint processing?
When enhancement is done with respect to a single pixel, the process is called point
processing.ie., enhancement at any point in an image depends only on the gray level at that
point.
10. WhatisImage Negatives?
Anegativeimagecanbeobtainedbyreversingtheintensitylevelsofanimage,according to the
transformation,
s=L –1 -r
,whenthegraylevelrangeis[0,L-1]

1. Digitalnegativesareusefulinthedisplayofmedicalimagesandtoproduce
negative prints of image.
2. Itisalsousedforenhancingwhiteorgraydetailsembeddedindarkregionofan image.
11. Writethestepsinvolvedinfrequencydomainfiltering.
1. Multiplytheinputimageby(-1)x+y tocenterthe transform.
2. ComputeF(u,v),theDFToftheimagefrom (1).
3. MultiplyF(u,v)bya filterfunctionH(u,v).
4. ComputetheinverseDFToftheresultin (3).

5. Obtainthereal partoftheresultin(4).
6. Multiplythe resultin(5)by(-1)x+y
12. WhatismeantbyLaplacian filter?
Itisalinearoperatorandisthesimplestisotropicderivativeoperator,whichis defined as,
2f (x,y)  2f (x,y)
f2   - ---------------- (1)
x2 y2
Where,
2f(x,y)
f(x1,y) f(x1,y)2f(x,y) -------------- (2)
x2 
2f(x,y)
f(x,y1) f(x,y1)2f(x,y) --------------- (3)
y2
Sub(2) &(3)in(1),weget,
f2 f(x 1,y) f(x1,y)  f(x,y1)  f(x,y1)4f(x,y)
Theabovedigital laplacianequation isimplementedusingfilter mask,

0 1 0

1 -4 1

0 1 0

13. Differentiatelinearspatialfilterandnon-linearspatialfilter.
s.no. Linearspatial filter Non-linearspatialfilter
1. Responseisasumofproductsof the They do not explicitly use co-
filter co-efficient. efficientsinthesum-of-products.

R=w(-1,-1)f(x-1,y-1)+ R=w1z1+w2z2+…+w9z9 9
2. w(-1,0)f(x-1,y) +…+ =∑wizi i=1
w(0,0)f(x,y)+… +
w(1,0)f(x+1,y)+
w(1,1)f(x+1,y+1).

14. Whatisthepurposeofimage averaging?


An important application of image averaging is in the field of astronomy, where
imaging with very low light levels is routine, causing sensor noise frequently torender
single images virtually useless for analysis.
15. Whatismeantbymasking?
Mask is the small 2-D array in which the value of mask co-efficient determines the
nature of process. The enhancement technique based on this type of approach is referred to
as mask processing. Image sharpening is often referred to as mask processing or filtering.
16. Givetheformulaforlog transformation.
Logtransformationsareusedtocompressthedynamicrangeoftheimagedata, using
the equation,
s=clog10 (1+│r│)

Wherecisconstant &u ≥ 0
17. Writetheapplicationofsharpening filters?
1. Electronicprintingandmedicalimagingtoindustrialapplication
2. Autonomoustargetdetectioninsmartweapons.
18. Defineclipping.
Aspecialcaseofcontrast stretchingwheretheslopevalues=r=0iscalledslipping.
Thisisusefulfornoisereduction.
19. Namethedifferenttypesof derivative filters?
1. Laplacianoperators
2. Prewittoperators
3. Robertscrossgradient operators
20. DefineSpatialDomainProcess.
The term spatial domain refers to the image plane itself and approaches in this category
are based on direct manipulation of pixels in an image.Spatial domain processes is denoted
by the expression.
G(x,y)=T[f(x,y)]
Where f(x,y)  input image G(x,y)processedimage
T operator of f, defined over some neighborhood of (x,y)
21. DefineFrequencydomainprocess
The term frequency domain refers to the techniques that are based on modifying the
Fourier transform of an image.
22. Whatismeantbygray-level transformationfunction?
Thespatialdomainprocessisdenotedbytheexpression.
G(x,y)=T[f(x,y)]
From this expression the simplest form of T is when the neighborhood is of single
pixel and ‘g’ depends only on the value of f at(x,y) and T becomes a gray level
transformation function which is given by
rgreyleveloff(x,y)
Sgrey levelof g(x,y)

S=T(r)
23. Definecontraststretching.
The contrast stretching is a process of to increase the dynamic range of the gray
levels in the image being processed.
24. DefineThresholding.
Thresholding is a special case of clipping where a=b and output becomes binary.For
examples, a seemingly binary image, such as printed page, does not give binary output
when scanned because of sensor noise and background illumination variations.Thresholding
is used to make such an image binary.
25. What are the types of functions of gray level Transformations for Image
Enhancement?
Threebasictypes offunctionsusedfrequentlyforimageenhancementare
1. Linear(negativeandidentitytransformations
2. LogarithmicTransformations
3. Powerlaw Transformations.
26. GivetheexpressionofLog Transformations?
ThegeneralformofthelogTransformationisgiven
S=Clog (1+r).
Where C is a construct and it is assumed that r 0. this transformation enhances the small
magnitude pixels compared to those pixels with large magnitudes.
27. Writetheexpressionforpower-Law Transformations.
Power-lawtransformationshavethebasicform
S=Cr
Wherec and rare positiveconstants.
28. Whatismeant bygammaandgammacorrection?
Powerlawtransformationisgivenby

S=Cr
The exponentin the power-law equation is referred to as gamma. The process used to correct
the power law response phenomena is called gamma corrections.
29. Whatisthe advantage& disadvantagesofpiece-wiseLinear Transformations?
The principal advantage of piecewise Linear functions over the other types of
functions is that piece wise functions can be arbitrarily complex.
The main disadvantage of piece wise functions is that their specification requires
more user input.
30. Whatismeant bygray-levelslicing?
Gray-level slicing is used in areas where highlighting a specific range of gray levelin
a image. There are 2 basic approaches gray level slicing.
1. Highlightsrange{A,B] ofgraylevelsandreduces allothertoaconstantlevel.
2. Secondapproachisthathighlights range [A,B]butpreserves allother levels.
31. Whatismeant byBit-planeslicing?
Instead of high lighting grey-level ranges, highlighting the contributes made to total
image appearance by specific bits is called Bit-plane slicing.
useofbit-planeslicing:This transformation is useful in determining the visually significant
bits.
32. Whatishistogramandwriteits significance?
The histogram of an image represents the relative frequency of occurrence of the
various gray levels in the image. They are the basis for numerous spatial domain processing
techniques. Histogram manipulation can be used effectively for image enhancement.
33. Definehistogram Equalization.
Histogram Equalization refers to the transformation (or) mapping for which the
processed (output) image is obtained by mapping each pixel into the input image with the
corresponding pixel in the output image.
34. DefineHistogrammatching(or)histogram specification.
The method used to generate a processed image that has a specified histogram is
called histogram specification (or) matching.
35. WhatismeantbyImagesubtraction?
Thedifferencebetween twoimagesf(x,y)andh(x,y)expressedas

Y(x,y)=f(x,y)-h(x,y)

isobtainedbycomputingthe differenceallpairsoffcorrespondingpixelsfromfandh. the key


usefulness of subtraction is the enhancement of differences between images.
36. Definemask& whatismeant byspatial mask?
Sameneighborhoodoperationsworkwiththevaluesofehimagepixelsinthe
neighborhoodandthecorrespondingvaluesofasubimagethathasthesamedimensionas
theneighborhood.Thesubimageiscalledfilter(or)mask(or)kernel(or)template(or) window.
Whentheimageisconvolvedwithafiniteimpulsesresponsefilteritiscalledasspatial mask.

37. Definespatialfiltering.
Filtering operations that are performed directly on the pixels of an image is called as
spatial filtering.
38. Whataresmoothingfilters(spatial)?
Smoothing filters are used for blurring and for noise reduction. Blurring is used in
preprocessing steps.
The output of a smoothing linear spatial filter is simply the average of pixels
contained in the neighborhood of the filter mask.
39. WhysmoothingLinearfiltersalsocalledasaveragingfilters?
The output of a smoothing, linear spatial filter is simply the average of the pixels
contained in the neighborhood of the filter mask. For this reason these filters are called as
averaging filters. They are also called as low pass filters.
40. Whataresharpeningfilters? Giveanexample?
The principal objective of sharpening is to highlight fine detail in an image (or) to
enhance detail that has been blurred, either in error or as natural effect of a particularmethod
of image acquisition. Uses of image sharpening applications such as electronic printing,
medical imaging and autonomous guidance in military systems
41. Defineunsharp masking.
The process of subtracting a blurred version of an image from the image itself is
called as unsharp masking which is expressed as
fs(x,y)f(x,y)f(x,y)
42. Whatismeant byarithmetic filer?

Computetheaveragevalueofthecorruptedimageg(x,y)intheareadefined The
value of the restored imageat any point (x,y)
1
fˆ(x,y) g(s,t)
mn(s,t)S x,y

Note:Usingaconvolutionmaskinwhichallcoefficientshavevalue1/mn.Noiseisreduced as a
result of blurring.
43. Whatismeant bygeometricmeanfiler?
Geometricmeanfilterisgiven bythe expression

1

fˆ(x,y) g(s,t)  mn

(s,t )S
xy 
44. Whatismeant byharmonic meanfiler?
Theharmonic mean filteroperationisgivenbythe expression

fˆ(x,y)
mn

 g(s,t)
1
(s,t)S xy
45. Whatismeant bycontraharmonicmeanfiler?
Thecontra harmonicmeanfilteroperationisgivenbythe expression

g(s,t)Q1
fˆ (x,y)
(s,t)Sxy

g(s,t)Q
(s,t)Sxy

Where Q is called the order of the filter. This filter is well suited for reducing or
virtuallyeliminating the effects of salt-and-pepper noise.

PART–B

IMAGEENHANCEMENT– Introduction

Image Enhancement process consists of a collection of technique that seek to improve


the visual appearance of an image. Thus the basic aim is to make the image look better.
The objective of enhancement technique is to process an image so that the result is
more suitable than the original image for a particular application.
Image enhancement refers to accentuation or sharpening of image features such
asedges,boundariesorcontrasttomakeagraphicdisplaymoreusefulfordisplayandanalysis.
Image enhancement includes gray level and contrast manipulation, noise reduction,
edge crispening & sharpening, filtering, interpolation & magnification, pseudo coloring, so
on…
The2categoriesofimageenhancement.
i) Spatialdomainreferstoimageplaneitself&approachesinthiscategoryare based on
direct manipulation of picture image.
ii) Frequencydomainmethodsbasedonmodifyingtheimage byFouriertransform.
a. SpatialDomainFilters
1. Spatial (time) domain techniques are techniques that operate directly on pixels
whereasFrequency domain techniques are based on modifying the Fourier transform of an
image.
2. Theuse ofaspatialmaskfor image processingiscalledspatialfiltering.
3. Mechanicsofspatialfiltering:
The process of spatial filtering consists of moving the filter mask from point to pint
in an image. At each point(x,y), the response of the filter at that point is calculated
using a predefined relationship.
4. Typesofspatialfiltering:
i) Linearfilter
a) Lowpassfilters
b) Highpass filters
c) Bandpass filters
ii) Nonlinear filter
a) Medianfilter
b) Maxfilter
c) Min filter
b. FrequencyDomainFilters
1. Frequency domain techniques are based on modifying the Fourier transform of an image
whereas Spatial (time) domain techniques are techniques that operate directly on pixels.
2. Edgesandsharptransitions(e.g.,noise)inanimagecontributesignificantlytohigh- frequency
content of FT.
3. Low frequency contents in the FT correspond to the general gray level appearance of an
image over smooth areas.
4. HighfrequencycontentsintheFTcorrespondtothefinerdetailsofanimagesuchas edges, sharp
transition and noise.
5. Blurring (smoothing) is achieved by attenuating range of high frequency components of
FT.
6. Filtering in Frequency Domain with H(u,v) is equivalent to filtering in Spatial Domain
with f(x,y).
 Low Pass Filter: attenuates high frequencies and allows low frequencies. Thus a LP
Filtered image will have a smoothed image with less sharp details because HF
components are attenuated
 High Pass Filter: attenuates low frequencies and allows high frequencies. Thus a HP
Filtered image will have a
Therearethreetypesoffrequencydomainfilters,namely,
i) Smoothing filters
ii) Sharpeningfilters
iii) Homomorphicfilters
1.Explain Enhancement using point operations. (Nov / Dec 2005) (May / June 2006)
(May / June 2009)(or)Write short notes on Contrast stretching and Grey level
slicing. (May / June 2009)
Pointoperations:
Point operations are zero memory operations where a given gray level r ε [0,L] is
mapped into a gray level s ε [0,L] according to the transformation,
s=T(r), wheres=transformed gray levelimage
r= inputgraylevelimage,T(r) =transformation

S=T(f(x,y)

Thecenterofthesubimageismovedfrompixeltopixelstarting,say,atthetopleft
corner. The operator T is appliedat each location(x, y) to yield the output, g, at that location.
The process utilizes only the pixels in the area of the image spanned by the neighborhood.
Wheref(x,y)istheinputimage,g(x,y)istheprocessedimage,andTisanoperator onf,
definedoversomeneighborhoodof (x,y). Inaddition,T canoperate onaset of
inputimages,suchasperforming thepixel-by-pixelsumofKimagesfornoise reduction

Sinceenhancement isdonewithrespect toasinglepixel,theprocessiscalled point


processing.ie., enhancement at any point in an image depends only on the gray level at that
point.
Applicationsofpoint processing:
 Tochange thecontrastordynamicrange of animage
 Tocorrectnonlinear response ofa sensorusedfor image enhancement
1. BasicGrayLevelTransformations
Thethreebasictypesoffunctionsusedfrequentlyforimageenhancement
(a)Image Negatives: orDigitalNegatives:
Anegativeimagecanbeobtainedbyreversingtheintensitylevelsofanimage,
according to the transformation,
,whenthegraylevelrangeis[0,L-1]
s=L– 1 -r

Digital negatives are useful in the display of medical images and to producenegative
prints of image.It is also used for enhancing white or gray details embedded indark region of
an image.
(b)LogTransformations:
The dynamic range of gray levels in an image can be very large and it can be
compressed. Hence, log transformations are used to compress the dynamic range of the
image data, using the equation,

s=clog10(1+│r│)

Wherecisconstant& r≥ 0
From the above diagram, it can be seen that this transformation maps narrowrangeof low
gray-level values in the input image into a wider rangeof output levels. The opposite is
true which is used to expandthe values of dark pixels in an image while compressing the
higher-level values. This doneby theinverselog transformation
(c)PowerLawTransformations:
Thepowerlawtransformationequationisgivenas,
Wherecandγaretheconstants The
s=crγ

above equation can also be written as, s= c (r+ε)γ


Thistransformationmapsanarrowrangeofdarkinputvaluesintoawiderrangeof output values,
for fractional values of γ.
Forc =γ=1,identitytransformation is obtained.
Forγ>1,the transformationis oppositeforthatobtainedforγ<1
Theprocesswhichisusedtoconvertthispowerlawresponsephenomenoniscalled
gamma correction.
>0CompressesdarkvaluesandExpandsbrightvalues
<0ExpandsdarkvaluesandCompressesbrightvalues
2. Piecewise-lineartransformations:
(a)ContrastStretching:
Contraststretchingisusedtoincreasethedynamicrangeofthegraylevelsinthe image being
processed.
Low contrast images occur often due to poor / non-uniform lighting conditioning or due
to non-linearity or small dynamic range of the image sensor.
Produceanimageof highercontrast thantheoriginalby darkening thelevels below m
andbrightening t helevels abovem in theoriginalimage. Inthis technique, known
ascontraststretching.
(b)Clipping:
A special case of Contrast stretching, where α = γ = 0 is called clipping.This
transformation is used for noise reduction, when the input signal is said to lie in the range
[a,b].
(c)Thresholding:

The values of r below m are compressed bythe transformationfunction into a


narrowrangeof s,toward black. Theopposite effect takesplacefor values of rabovem.
T(r)produces atwo-level (binary) image. Amapping ofthisformiscalleda
thresholdingfunction.
AspecialcaseofClipping,wherea=b=tiscalledthresholdingandtheoutput becomes
binary. Thus it is used to convert gray level image into binary.

(d)GraylevelslicingorIntensitylevel slicingor window slicing:


Thistransformation isused to segment certain gray level regionsfrom the rest of the
image. This technique is useful when different features of an image are contained in
different gray levels.
Example: Enhancing features such as masses of water in satellite images and enhancing
flaws in X-ray images.
Therearetwoways ofapproachingthistransformation
a) To display a high value for all gray levels which is in the range of interest and a
low value for all other gray levels. It fully illuminates the pixels lying in the
interval [A,B] and removes the background.
i.e.,without background,
s= L,A≤r≤B 0,
else

b) To brighten the desired range of gray levels while preserving the background of
the image.
i.e.,withbackground,

s = L,A≤r≤B r,
else

(e)BitplaneslicingorBitextraction:
This transformation is used to determine the number of visually significant bits in an
image.It extracts the information of a single bit plane.
Consider each pixel in an image to be represented by 8 bits and imagine that the
image is made up of eight 1-bit plane , ranging from bit plane 0 for LSB to bit plane 7 for
MSB, as shown below

Intermsof8bitbytes,plane0containsallthelowestorderbitsinthebytes comprising the pixels in the


image and plane7 contains all the high order bits.
Thus, the high-order bits contain the majority of the visually significant data
whileother bits do not convey an information about the image structure
BitExtraction:
If each pixel of an image is uniformly quantized to B bits, then the nth MSB can be
extracted and displayed as follows,
Let,r= k12B-1+k22B-2+…..+kB-12+kB
Thentheoutputis given
s= L,ifkn=1 0,
else

Where,kn=[in–2in-in=Int[u/2B-n]
Int[x] = Integer part of x , n = 1,2,…..,B, B = no.of bits used to represent r , as an
integer
BitRemoval:
ForMSBremovals=2rmodulo(L+1),0≤r≤L For
LSB removal,s = 2 Int [ r/2]

2.Explainbrieflyabouthistogrammodeling HISTOGRAM
Histogram of an image represents the relative frequency of occurrence of the
various gray levels in the image.
Histogram modeling techniques modify an image so that its histogram has a desired
shape. This is useful in stretching the low contrast levels of images with narrow histograms.
Thus histogram is used to either increase or decrease, the intensity level of the pixels by
any kind of transformation.

The histogram of a digital image with gray levels in the image [0,L-1] is a discrete function
given as,
h(rk)nk,whererk is thekth greylevel, k0,1,…,L1
nkis thenumberofpixelsin theimagewithgreylevelrk
Normalizedhistogramisgiven as,
nk
p(rk)
n
Where,n isthetotalnumberofpixelsin theimageandn≥nk
The Normalizedhistogram isthehistogram divided bythetotal number of pixelsin the
source image.
1. Thesumofallvaluesinthe normalizedhistogramis 1.
2. The value given by the normalized histogram for a certain gray value can be read as
theprobability of randomly picking a pixel having that gray value
3. Thehorizontalaxisofeachhistogramplotcorrespondstogreylevelvaluesrk inthe
nk
imageandtheverticalaxiscorrespondsto h(rk )nk orp(rk ) ,ifthevaluesare
n
normalized.
Histogramoffourbasicgraylevelcharacteristics:
 Darkimage:(underexposedimage):Herecomponentsofthehistogramare concentrated
on the low or dark side of the gray scale.
 Brightimage:(overexposedimage):Herecomponentsofthehistogramare
concentratedonthehighorbrightsideofthegrayscale.

 Low-contrastimage:Herecomponentsofthehistogramatthemiddleofthegray scale and


are narrow.
 High-contrast image: Here components of the histogram cover a broad range of the
gray scale and they are almost uniformly distributed.

3. WriteshortnotesonHistogramequalizationandHistogrammodification.(Nov/ Dec
2005) (May / June 2009) (May / June 2007)

Histogramequalization:Atechniquewhichisusedtoobtainuniformhistogramisknown as
histogram equalization or histogram linearization.
Let r represent the grey levels in the image to be enhanced. Assume r to be
normalizedin the interval [0, 1], with r = 0 representing black and r = 1 representing white.
Foranyvaluerintheinterval[0,1],theimage transformationisgivenas,

S=T(r),0≤r≤1
Thistransformationproducesalevelsfor every pixelvaluerinthe originalimage.
ThetransformationfunctionT(r)satisfiesthefollowing conditions,
(a) T(r) is single –valued and monotonically increases in the interval0 ≤ r ≤ 1 (ie.,
preserves the order from black to white in the output image) and
(b) 0 ≤ T(r)) ≤ 1 for 0 ≤ r ≤ 1 (ie., guarantees that the output gray levels will be
inthe same range as the input levels)
Thefollowingshowsthetransformationfunctionsatisfying theabovetwoconditions.
TheInversetransformationisgivenas,

r=T-1(s),0 ≤s ≤1

If the gray levels in an image can be viewed as random variables in the interval [0,1], then
Pr(r) and Ps(s) denote the pdfs of the random variables r and s.
IfPr(r)and T(r) areknownandT -1(s)satisfiesthecondition(a),then

Ps(s)= Pr(r) dr
---------- (1)
ds
r=T-1(s)
Thus , the pdf of the transformed variables is determined by the gray level pdf of the input
image and by the chosen transformation function.
ForContinuousgraylevel values:
Considerthetransformation,
r
sT(r) pr(w)dw (2)
0
where w is a dummy variable of integration and
r
p r (w)dwcummulativedistributionfunction[CDF]ofrandomvariable'r'con
0
dition(a)and(b)aresatisfiedbythistransformationasCDFincreases monotonically from 0 to 1 as
a function of r.
WhenT(r)isgiven,wecanfindP s(s)usingequation(1), We
know that,
sT(r)
ds dT(r) dr (w) dwp (r)
  p  r
dr dr dr0 r
dr 1
 (3)
ds Pr(r)

Substituting(3) in(1),we get,


 
p(s) p r (r) dr 0s1
s  ds 
,
 
 
 p r (r) 1 
 pr(r) 
=1 , 0≤ s ≤ 1
ThisindicatesthatPs(s)isauniformpdf.
ForDiscretegray levelvalues:
Theprobabilityofoccurrence ofgray levelr kinanimage isgivenas,
n
p(r) k,k0,1, ............... L1
r k
n
Where,n =total no.of pixelsintheimage
nk=No.of pixels thathave graylevelrk
L=totalno.ofpossiblegraylevelsintheimage The
discrete form of the transformation function is ,
k kn
j
skT(rk)pr(rj) ,0rk 1, k0,1,…,L1
j0 n j0
Thustheprocessedoutputimageisobtainedbymappingeachpixelwithlevelrkin the input
image into a corresponding pixel with level skin the output image.
 Theinversetransformationisgiven as,
1
rT
k (s),kk 0,1,2, .......... L1

Histogram Modificatin:Atechnique which is used to modify the histogram is known as


histogram modification.
Heretheinputgraylevelrisfirsttransformednon-linearlybyT(r)andtheoutputis uniformly
quantized.
k

Inhistogramequalization,thefunctionT(r)pr(rj), k0,1,…,L1
j0

Theabovefunctionperformsacompressionoftheinputvariable.
Other choices of T(r) that have similar behavior are,
T(r)=log(1+r) ,r ≥0
T(r)= r1/n, r ≥ 0,n =2,3…..
4. Writeshortnotesonhistogramspecification.(May/June2009)
Histogram Specification:
It is defined as a method which is used to generate a processed image that has a
specifiedhistogram.Thus,itisusedtospecify theshape of thehistogram, fortheprocessed
image & the shape is defined by the user.Also called histogram matching
ForContinuouscase:
Letrbe aninput image,Zbeanoutputimage
pr(r) istheoriginalprobabilitydensityfunction
pz(z) isthedesiredprobabilitydensityfunction
LetSbearandomvariableandifthehistogramequalizationisfirstappliedonthe
originalimager ,then
r
sT(r)pr(w)dw
0
Supposethatthedesiredimagezisavailableandhistogramequalizationisgivenas,
z

sG(z)p z (z)dz
0
WhereGisthetransformationofz=s. From
equation (1) and (2),
G(z)=s=T(r)
Theinverse process zG1(s)G1[T(r)]
Therefore,theprocessofhistogramspecificationcanbesummarisedinthe followingsteps.
i) ObtainthetransformationfunctionT(r)usingequation(1)
ii) ObtainthetransformationfunctionG(z)usingequation(2)
iii) ObtaintheInversetransformationfunctionG -1
iv) Obtaintheoutputimage byapplying usingequation(3)toallpixelsintheinputimage
Thisprocedureyieldsanimagewhosegray levelszhavethespecifiedpdf pz(z)
ForDiscretegray levelvalues:
Theprobabilityofoccurrence ofgray levelr kinanimage isgivenas,
n
p(r) k,k0,1, ............... L1
r k
n
Where,n =total no.of pixelsintheimage
nk=No.of pixels thathave graylevelrk
L=totalno.ofpossiblegraylevelsintheimage The
discrete form of the transformation function is ,
k kn
j
skT(rk)pr(rj) ,0rk 1, k0,1,…,L1
j0 n j0
Also,thediscreteformofthedesiredtransformationfunctionis,
k

skG(z k )p z (z i ),
i0
From (1)and(2), theinversetransformationisgivenas,
G(z k )skT(rk)
1
zG
k (s)Gk 1[T(r)] k
5. WriteshortnotesonthevariousNoisemodels(Noisedistribution)indetail.(Nov/ Dec
2005)
The principal noise sources in the digital image arise during image acquisition or
digitization or transmission. The performance of imaging sensors is affected by a variety of
factors such as environmental conditions during image acquisition and by the quality of the
sensing elements.
Assuming the noise is independent of spatial coordinates and it is uncorrelated with
respect to the image itself.
Thevarious Noiseprobabilitydensityfunctionsareasfollows,
1. GaussianNoise: Itoccursduetoelectroniccircuitnoise,sensornoiseduetopoor illumination
and/or high temperature
ThePDFofGaussianrandomvariable,z,isgivenby
1 /22
e (zz)
2
p(z)
2

where, zrepresentsintensity
zisthe mean (average) valueof z
isthestandarddeviation

ThePDFofGaussianrandomvariable,z, isgivenby
1
e(zz) /2
2 2
p(z)
2

70%ofitsvalues will bein therange


(),()
95%ofitsvalues will bein therange (2),(2)
2. RayleighNoise
Itoccurs duetoRange imagingand isused forapproximatingskewedhistograms.
ThePDFofRayleighnoiseisgivenby
2 (za) /b
 (za)e
2
forza
p(z) 
b
0 forza

Themeanandvarianceofthisdensityare givenby
zab/4
b(4)
2
4
3. Erlang(Gamma)Noise
It occurs duetolaser imaging
ThePDFofErlangnoiseisgivenby
Themeanandvarianceofthisdensityaregivenby ab az
 forz0
zb/a b1p(z) (b1)!
z
e
2 2 0 forza
b/a 

Wherea >0,bis apositiveinteger and“!”indicates factorial.


4. ExponentialNoise
It occurs duetolaser imaging
ThePDFofexponentialnoiseisgivenby

p(z)ae
az
forz0
0 forza
Themeanandvarianceofthisdensityaregivenby
z1/a
21/a2

5. UniformNoise
Itisa Leastdescriptiveandbasisfornumerousrandom number generators
ThePDFofuniformnoiseisgiven by
1
fora zb

p(z) ba
0 otherwise

Themeanandvarianceofthis densityaregivenby
z (ab)/2
2(ba)2/12
6. Impulse(Salt-and-Pepper)Noise
It occurs duetoquicktransients suchasfaultyswitching

ThePDFof(bipolar)impulsenoiseisgivenby
 Pa forza
p(z) P forzb
b
0
 otherwise

Ifb>a,graylevelbwillappearasalightdotandlevelawillappearlikeadarkdot. If either Paor


Pbis zero, then the impulse noise is called Unipolar
When a = minimum gary level value = 0,denotes negative impulse appearing black (pepper)
pointsinanimageandwhenb=maximumgraylevelvalue=255,denotespositiveimpulseappearingwh
ite(salt)noise,henceitisalsocalledassaltandpeppernoiseor shot and spike noise
7. PeriodicNoise
Periodicnoiseinanimagearisestypicallyfromelectricalorelectromechanical interference during
image acquisition.It is a type of spatially dependent noise
Periodicnoisecanbereducedsignificantlyviafrequencydomainfiltering
6. ExplainthedetailofSpatialFilters.
Some neighborhood operations work with the values of the image pixels in the
neighborhood and the corresponding values of a sub image that has the same dimensions as
the neighborhood.The sub image is called a filter, mask, kernel, template, or window
The values in a filter sub image are referred to as coefficients, rather than pixels.
The concept of filtering has its roots in the use of the Fourier transform for signal
processing in the so-called frequency domain.
The process consists simply of moving the filter mask from point to point in an
image.At each point (x,y), the response of the filter at that point is calculated using a
predefined relationship.

LinearSpatial Filter:
Linear filter means that the transfer function and the impulse or point spreadfunction
of a linear system are inverse Fourier transforms of each other.
For a linear spatial filtering, the response is given by a sum of products of the filter
coefficients and the corresponding image pixels in the area spanned by the filter mask.
Consider a 3 x 3 mask, the response R of linear spatial filtering with the filter mask at a
point (x,y) in the image is,
R=w(-1,-1_f(x-1,y+1)+w(-1,0)f(x,y+1)+……+w(1,1)f(x+1,y-1)
Thus the coefficients w(0,0) coincides with image value f(x,y), indicating that the mask is
centered at (x,y), when the computation of the sum of products takes place.
Hence the filter mask size is m x n, where m = 2a+1 and n = 2b+1 and a,b are no-
negative integers.In general, the linear filtering of an image f of size M x N with a filter
mask of size m x n is given as,
a b
(m 1) (n1)
g(x,y)w(s,t)f(xs,yt),where....a ,b
satb 2 2
Where,
x0,1,2,.....,M1
y0,1,2,.......,N1
From the general expression, it is seen that the linear spatial filtering is just
“convolvinga mask with an image”. Also thefilter mask is called as Convolution mask
or Convolution kernel.
Thefollowingshowsthe3x3spatialfiltermask,

Rw1z1w2z2 ....... w9z9


9
wizi
Ingeneral i1

Rw1z1w2z2........ wmnzmn
mn
 wizi
i1

Where, w’s are mask coefficients, z’s are values of the image gray levels corresponding to
the mask coefficients and mn is the total number of coefficients in the mask.
Non-LinearSpatialfilter:
This filter is based directly on the values of the pixels in the neighborhood and they
don’t use the coefficients.These are used to reduce noise.
7. Explainthevarioussmoothingfiltersinthespatialdomain.
Smoothing Spatial Filters or Low pass spatial filtering:
1. Smoothingfiltersare usedforblurringandfornoise reduction
2. Blurring is used in preprocessing steps, such as removal of small details from an image
prior to object extraction and bridging of small gaps in lines or curves.It includes bothlinear
and non-linear filters

1. NeighborhoodAveraging:

1. The response of a smoothing linear spatial filter is simply the average of the pixels in the
neighborhood of the filter mask,i.e., each pixel is an image is replaced by the average of the
gray levels in the neighborhood defined by the filter mask. Hence this filter is called
Neighborhood Averaging or low pass filtering.
2. Thus, spatial averaging is used for noise smoothening, low pass filtering and subsampling
of images.
3. Thisprocessreducessharp transitioningraylevel
4. Thustheaveragingfiltersareusedtoreduceirrelevantdetailinanimage.
Considera 3 x 3 smoothing or averaging filter

1 1 1

1 
 1 1 1
9

1 1 1

TheresponsewillbethesumofgraylevelsofninepixelswhichcouldcauseR to be out
of the valid gray level range.
R w1z1 w2z2  ......  w9z9
Thusthesolutionis toscalethesumbydividing Rby 9.
Rw1z1w2z2  ...... w9z9
9

wizi
i1

1 9
9 i1 i
 z, when ..wi  1
1/9 1/9 1/9

1/9 1/9 1/9

1/9 1/9 1/9

Thisisnothingbuttheaverageofthegray levelsifthepixelsinthe3x3neighborhood defined by the


pixels.
Otherspatiallowpass filtersofvarioussizesare ,

1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
2 1 1 1 1 1 4
1 1 1 1 1

Thusamxnmaskwillhaveanormalizingconstantequalto1/mn.Aspatialaveragefilter in which
all the coefficients are equal is called as a Box Filter.
2. WeightedAverageFilter:ForfilteringaMxNimagewithaweightedaveraging filter
of size m x m is given by,
a b

w(s,t)f(xs,yt)
g(x,y) satb
a b

 w(s,t)
satb

Example:

Herethepixelatthecentre ofthemaskismultipliedbyahighervaluethanany other, thus


giving this pixel more importance.
Thediagonalsareweighedlessthantheimmediateneighborsofthecenterpixel.
Thisreduces the blurring.
3. Uniformfiltering
The most popular masks for low pass filtering are masks with all their coefficients
positiveand equal to each other as for examplethe mask shown below. Moreover, they sum
up to 1 in order to maintain the mean of the image.

1 1 1

1 
 1 1 1
9

1 1 1

4. Gaussian filtering
ThetwodimensionalGaussianmaskhasvaluesthatattemptstoapproximatethe
continuous function
x2 y22
 
1 e
G(x,y)
22
.Thefollowingshowsasuitableinteger-valuedconvolutionkernelthatapproximatesa Gaussian
with a of 1.0.

1 4 7 4 1

4 16 26 16 4

1 
 7 26 41 26 7
273

4 16 26 16 4

1 4 7 4 1

5. Medianfiltering(Nonlinearfilter)
Median filtering is the operation that replaces each pixel by the median of the grey
level in the neighborhood of that pixel.
ProcessisreplacesthevalueofapixelbythemedianofthegraylevelsinregionS xyof that
pixel:
fˆ(x,y)mediang(s,t)
(s,t)S xy
V(m,n)=median{y(m-k,n-l),(k,l)εw}

Wherewissuitablychosenwindow.Thewindow sizeNwischosentobeodd.
IfNwiseven,thenthemedianistakenastheaverageofthetwovaluesinthemiddle. Typical window
size s are 3x3,5x5,7x7 or 5 point window
Properties:
1. Unlikeaveragefiltering,medianfilteringdoesnotblurtoomuchimagedetails.
Example:Considertheexampleoffilteringthesequencebelowusinga 3-pt
median filter:16 14 15 12 2 13 15 52 51 50 49
Theoutput ofthemedianfilteris:15 14 1212 13 1551 51 50
2. Medianfiltersarenonlinear filtersbecausefor two sequencesx(n)andy(n)
medianx(n)y(n)medianx(n)mediany(n)
3. Medianfiltersareusefulforremovingisolatedlinesorpoints(pixels)while preserving
spatial resolutions.
4. It works very well on images containing binary (salt and pepper) noise but performs
poorly when the noise is Gaussian.
5. Theirperformanceisalsopoorwhenthenumberofnoisepixelsinthewindowis greater than
or half the number of pixels in the window

Isolated
point
0 0 0 0 0 0
Median filtering
0 1 0 0 0 0

0 0 0 0 0 0

6. Directionalsmoothing
Toprotecttheedgesfromblurringwhilesmoothing,adirectionalaveragingfilter
canbeuseful.Spatialaverages g(x,y:) arecalculatedinseveralselecteddirections(for
examplecouldbehorizontal,vertical,main diagonals)
1
g(x,y:)  f (x k,y l)
N ( k,l ) W 
andadirection isfoundsuchthat f(x,y)g(x,y:) isminimum.(Notethat
WistheneighbourhoodalongthedirectionandNisthenumberofpixelswithinthis
neighbourhood).Thenbyreplacingg(x,y:)withg(x,y:)wegetthedesiredresult.

\
0 0 0 0 0 
0 0 0 0 0
W0
0 0 0 0 0
l
0 0 0 0 0
0 0 0 0 0
K
7. MaxFilter &MinFilter:
The100thpercentilefilteriscalledMaximumfilter,whichisusedtofindthe brightest
points in an image.
Rmax{zk,k1,2,3,....,9},for..3x3matrix
th
The0 percentilefilteriscalledMinimumfilter,whichisusedtofindthe darkest
points in an image.
Rmin{zk,k1,2,3,....,9}for ..........x3matrix
(i.e)Usingthe 100thpercentileresultsintheso-calledmaxfilter,given by

fˆ(x,y) maxg(s,t)
(s,t)Sxy

This filter is useful for finding the brightest points in an image. Since pepper noise has very
low values, it is reduced by this filter as a result of the max selection processing the sub
image area Sxy.
The0thpercentilefilterisminfilter:

fˆ(x,y) ming(s,t)
(s,t)Sxy

Thisfilterisusefulforfindingthedarkestpointsinanimage.Also,itreducessaltnoiseas a result
of the min operation
8. Mean Filters
Thisis thesimply methodsto reduce noiseinspatial domain.
1. Arithmeticmeanfilter
2.Geometricmean filter
3.Harmonic mean filter
4.Contraharmonicmeanfilter
LetSxyrepresent thesetofcoordinatesinarectangularsubimagewindowofsizemxn, centered at
point (x,y).
1. Arithmeticmean filter
Computetheaveragevalueofthecorruptedimageg(x,y)intheareadefinedby
Sx,y.The value of the restored image at any point (x,y)

g(s,t)
1
fˆ(x,y)fˆ
mn(s,t)S x,y
Note:Usingaconvolutionmaskinwhichallcoefficientshavevalue1/mn.Noiseis reduced as a
result of blurring.
2. Geometricmean filter
Geometricmeanfilterisgiven bythe expression


1

mn
fˆ(x,y) g(s,t)
 (s,t)Sxy 
3. Harmonicmean filter
Theharmonic mean filteroperationisgivenbythe expression

fˆ(x,y)
mn


1
(s,t)S xy
g(s,t)

4. Contraharmonicmean filter
Thecontra harmonicmeanfilteroperationisgivenbythe expression

g(s,t)Q1
fˆ(x,y)
(s,t)Sxy

g(s,t) Q

(s,t)Sxy

WhereQiscalledtheorderofthefilter.Thisfilteriswellsuitedforreducingorvirtually eliminating
the effects of salt-and-pepper noise.
8. Explainthevarioussharpeningfiltersinspatialdomain.(May/June2009)
sharpening filters in spatial domain:
Thisisusedtohighlightfinedetailsinanimage,toenhancedetailthathasbeen blurred and
to sharpen the edges of objects
Smootheningofanimageissimilartointegrationprocess,
Sharpening = 1 / smoothening
Sinceitisinverselyproportional,sharpening isdonebydifferentiationprocess.

DerivativeFilters:
1. Thederivatives ofadigitalfunctionaredefined intermsof differences.
2. It isused tohighlightfinedetailsof animage.
Propertiesof Derivative:
1. Forcontrastgray level,derivativeshouldbeequal to zero
2. It mustbe non-zero,atthe onsetof agraylevelstepor ramp
3. Itmustbe nonzeroalongaramp[constantlychanges]
st
I orderderivative:
Thefirstorder derivativeofone dimensionalfunctionf(x)isgivenas,
f
f(x1) f(x)
x
IIndorder derivative:
Thesecondorder derivativeofonedimensionalfunctionf(x)isgivenas,
2f
f(x 1) f(x 1) 2f(x)
x2
Conclusion:
I. Firstorderderivativesproducethickeredgesinanimage.
II. Second order derivatives have a stronger response to fine details , such as thin lines
and isolated points
III. Firstorderderivatives haveastronger responsetoagraylevelstep
IV. Secondorderderivatives produces adoubleresponseatstep changes ingraylevel
LaplacianOperator:
Itisalinearoperatorandisthesimplestisotropicderivativeoperator,whichis defined as,

(1)
Where,

(2)-

(3)
Sub(2) &(3)in(1),weget,
f2f(x1,y)f(x1,y)f(x,y1)f(x,y1)4f(x,y) - ------------- (4)
Theabovedigital laplacianequation isimplementedusingfilter mask,

0 1 0

1 -4 1

0 1 0

Thedigital laplacian equationincludingthediagonaltermsisgivenas,


f(x1,y)f(x1,y)f(x,y 1)f(x,y 1)f(x1,y1)f(x1,y 1)
f2
 
 f(x1,y1)f(x1,y1)8f(x,y) 
thecorrespondingfiltermaskisgivenas,
1 1 1

1 -8 1

1 1 1

Similarly,twootherimplementationsofthelaplacianare,

0 -1 0 -1 -1 -1

-1 4 -1 -1 -8 -1

0 -1 0 -1 -1 -1

Thesharpened imageusingthelaplacian operatorisgiven as,


f(x,y)2f(x,y),
g(x, y)
f(x,y)2f(x,y),
Substituteequation(4) in(6),
g(x,y)f(x,y)  f(x1,y)f(x1,y)f(x,y1)f(x,y1)4f(x,y)
g(x,y)5f(x,y)  f(x1,y)f(x1,y)f(x,y1)f(x,y1)
Theabovedigital laplacianequation isimplementedusingfilter mask,

0 -1 0

-1 5 -1

0 -1 0

Thisiscalledascompositelaplacianmask.
Substitute equation (5) in (6),
g(x,y) f(x,y)f(x1,y)f(x1,y)f(x,y1)f(x,y1)f(x1,y1)f(x1,y1)
f(x1,y1)f(x1,y1)8f(x,y) 
 
f(x1,y)f(x1,y)f(x,y1)f(x,y1)f(x1,y1)f(x1,y1)
g(x,y)9f(x,y) f(x1,y1)f(x1,y1) 
 

Theabovedigital laplacianequation isimplementedusingfilter mask,

-1 -1 -1
-1 -1 -1

-1 -8 -1
-1 A+8 -1

-1 -1 -1
-1 -1 -1

Thisiscalledthesecondcomposite mask.

Gradientoperator:
Forafunctionf(x,y),thegradientfatco-ordinate(x, y)isdefinedasthe2-dimesional column vector

∆f = Gx
Gy

= ∂f/∂x
∂f/∂y

∆f=mag(∆f)=[Gx2+Gy2]½={[(∂f/∂x)2+(∂f/∂y)2]}1/2
GxGy

1. Roberts operator
consider a33maskis thefollowing.
y

z1 z2 z3

z4 z5 z6

z7 z8 z9

x
Itcanbeapproximatedatpoint z5 inanumberofways.Thesimplestistousethe
difference(z 8 z5)inthexdirection and(z 6 z5 )intheydirection. Thisapproximation is known as
the Roberts operator, and is expressed mathematically as follows.

f(x,y)
Gx f(x1) f(x) z6z5
x

f(x,y)
Gy f(y1) f(y) z8z5
y
fGxGy

z6  z5 z8  z5

1 -1 1 0

0 0 -1 0

Roberts operator

AnotherapproachistouseRobertscrossdifferences Take

Z5 Z6

Z8 Z9

ThisapproximationisknownastheRobertscrossgradientoperator,andisexpressed mathematically as
follows
fz9z5 z8z6
TheaboveEquationcanbe
implementedusingthefollowingmask
-1 0 0 -1
.
0 1 1 0

Roberts operator
Theoriginalimageisconvolvedwithbothmasksseparatelyandtheabsolutevaluesofthe
twooutputsofthe convolutionsareadded.
2. Prewittoperator
consider a33maskis thefollowing.
y

z1 z2z z3
5
z4 z6
z8
z7 z9

f(x,y) rd x
Gx 3 row1strow(zzz) (z z2z3)
x
7 8 9 1

f(x,y)
Gy 3rdcol1stcol(z z6 z9 )(z1 z4 z7)
y
3

fGxGy(z 7 z8z9)(z1z2z3)(z3z6z9)(z1z4z7)

y
-1 0 1 -1 -1 -1

-1 0 1 0 0 0

-1 0 1 1 1 1

Prewittoperator
ThisapproximationisknownasthePrewitt xator.
oper

9. Explainthebasicstepsforfiltering(imageenhancement)inFrequency domain.

1. Multiplytheinputimageby(-1)x+ytocenter thetransform,image dimensionsM xN


2. ComputeF(u,v)DFTof thegivenimage,DCatM/2,N/2.
3. MultiplyF(u,v)by afilter functionH(u,v)to gettheFToftheoutput image,
G(u,v)=H(u,v) F(u,v)
Here each component of H is multiplied with both the real and imaginary parts of the
corresponding component in F, such filters are called zero-phase shift filters.DC for H(u,
v) at M/2, N/2.
4. ComputetheinverseDFTofresultin(c),sothatthe
filtered image = F-1[G(u,v)]
5. Takerealpartoftheresultin(d)
6. ThefinalenhancedimageisobtainedbyMultiplyingresultin(e)by (-1)x+y

10. DiscussindetailthesignificanceofHomomorphicfilteringinimageenhancement.
(May / June 2009) (May / June 2007)

Definition:Thefilter whichcontrolsbothhighfrequencyandlow frequency


componentsarecalled Homomorphicfiltering.

Homomorphic filtering is a generalized technique for signal and image processing,


involving a nonlinear mapping to a different domain in which linear filter techniques are
applied, followed by mapping back to the original domain.

Features& Application:

1. Homomorphicfilterisusedforimageenhancement.

2. Itsimultaneouslynormalizesthebrightnessacrossanimage andincreases contrast.

3. Itisalso usedtoremovemultiplicativenoise.

Images normally consist of light reflected from objects. The basic nature of the image f(x,y)
may be characterized by two components:

(1) Theamountofsource lightincidentonthescenebeingviewed,&

(2) Theamountoflightreflectedbytheobjectsinthe scene.

These portions of light are called the illumination and reflectance components, and are
denotedi(x,y) and r(x,y) respectively. Thefunctionsiand rcombinemultiplicatively togive the
image function F:

f(x,y)=i(x,y)r(x,y),
where 0 < i(x,y) < 1-----indicates perfect blackbody -----indicates perfect absorption ,
and 0 <r(x,y) < 1 -----indicates perfect white body ---- indicates perfect reflection.

Since i and r combine multiplicatively, they can be added by taking log of the image
intensity, so that they can be separated in the frequency domain.
Illumination variations can be thought as a multiplicative noise and can be reduced
by filtering in the log domain.To make the illuminations of an image more even, the HF
components are increased and the LF components are filtered, because the HF components
are assumed to represent the reflectance in the scene whereas the LF components are
assumed to represent the illumination in the scene.i.e., High pass filter is used to suppress
LF’s and amplify HF’s in the log intensity domain.

illumination component tends to vary slowly across the image and the reflectance
tends to vary rapidly. Therefore, by applying a frequency domain filter the intensity
variation across the image can be reduced while highlighting detail. This approach isshown
below.

BLOCKDIAGRAM:

ln DFT H(u,v) IDFT Exponential


Inputimage f(x,y)

EnhancedImage
g(x,y)
Analysis:

WKT, f(x,y)=i(x,y)r(x,y) ---------------------- (1)

Takingnaturallogonbothsidesoftheaboveequation,weget, ln[f(x,y)] =

ln[i(x,y)] + ln[r(x,y)]

Letz=ln[f(x,y)]=ln[i(x,y)]+ ln[r(x,y)]

TakingDFTonbothsidesoftheaboveequation,weget, z(x,y)

= ln[f(x,y)] = ln[i(x,y)] + ln[r(x,y)]

DFT[z(x,y)]=DFT{ln[f(x,y)]}=DFT{ln[i(x,y)]+ln[r(x,y)]}

=DFT{ln[i(x,y)]}+ DFT{ln[r(x,y)]} ------- (2)

SinceDFT[f(x,y)]=F(u,v),equation(2)becomes,

Z(u,v)= Fi(u,v) + Fr(u,v) (3)


ThefunctionZrepresentstheFouriertransformofthesumoftwoimages:alow frequency
illumination image and a high frequency reflectance image.

Figure:Transferfunctionforhomomorphicfiltering.
Ifwenowapplyafilterwithatransferfunctionthatsuppresseslowfrequency components
and enhances high frequency components, then we can suppress the illumination
component and enhance the reflectance component.

Thus,theFouriertransformoftheoutputimageisobtainedbymultiplyingtheDFTof the input


image with the filter function H(u,v).

i.e.,S(u,v)=H(u,v)Z(u,v) (4)

whereS(u,v)isthefouriertransformoftheoutputimage.

Substitute equation (3) in (4), we get,

S(u,v)=H(u,v)[Fi(u,v)+Fr(u,v)]=H(u,v)Fi(u,v)+H(u,v)Fr(u,v)--(5) Applying

IDFT to equation (6), we get,

T-1[S(u,v)]= T-1[H(u,v)Fi(u,v) +H(u,v) Fr(u,v)]

=T-1[H(u,v) Fi(u,v)] +T-1[H(u,v) Fr(u,v)]

 s(x,y)=i’(x,y)+r’(x,y) (6)

TheEnhancedimageisobtainedbytakingexponentialoftheIDFTs(x,y), i.e.,

g(x,y) = e s(x,y) = ei’(x,y)er’(x,y)= io(x,y) ro(x,y)

where,io(x,y)=ei’(x,y),ro(x,y)=er’(x,y)aretheilluminationandreflectioncomponents of the
enhanced output image.
11. WriteshortnotesonColorimage enhancement
Colorimageenhancement:
Animageenhancementtechniquethatconsistsofchangingthecolorsofanimage or
assigning colors to various parts of an image.

Monochromeimage
enhancementalgorithm
Input
image Inverse
R
color
Color Output
Monochromeimage space
G space
enhancementalgorithm transform image
transform rendering
B

Monochromeimage
enhancementalgorithm

1. Colorcode regions ofanimagebasedonfrequencycontent


2. TheFouriertransformofanimageismodifiedindependentlybythreefilterstoproduce three
images used as Fourier transform of the R, G, B components of a color image
3.Additional processing can be any image enhancement algorithm like histogram
equalization
4.TakeinversecolortransformationtoobtainR’,G’,B’components
UNITIII-IMAGERESTORATION
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.

PART–A
1. DefineImage Restoration.
Imagerestorationreferstoremovalorminimizationofknowndegradationsinan image i.e.
Restoration attempts to reconstruct or recover an image that has been degraded.
2. CompareImageEnhancementwithimage restoration?

Image Enhancement Image Restoration


Improvevisualappearance orincrease contrast Image restoration refers to removal or
i.e.highlightcertainfeaturesinanimageorbring out minimization of known
details parts degradationsinanimagei.e.Restorationa
ttemptsto reconstruct or recover an
image that has been degraded.

3. Showthe blockdiagramofamodelof theimagedegradation/restorationprocess.


Original g(x,y) Restored
image Degradation Restoration Image
f(x,y) function + filter f(x,y)
H R

Noiseη(x,y)
Degradation Restoration

[BlurringFilter] [Deblurring/Deconvolutionfilter]

4. ClassifyImagerestoration techniques.
Imagerestorationsareclassifiedas following:
Image Restoration

Restoration Linear Other


models Filtering Method
 Image  InverseFilter  Blind
formation  Weiner Filter deconvolution
models  FIRfilter
 Detector/  Leastsquare,SVD
Recorder  Recursive(Kalman)
 Noisemodels filter
5. Defineblinddeconvolution.
The process of restoring an image by using a degradation function that has been
estimated in some way sometimes is called blind deconvolution.
6. Defineinverse filtering.
Inverse filtering is the process of recovering the input of a system from its output.
Inverse filters are useful for precorrecting an input signal in anticipation of the degradations
caused by the system, such as correcting the nonlinearity of a display.
7. DefinePseudoinverse filter.
The Pseudo-inverse filter is a stabilized version of the inverse filter. For a linear shift
invariant system with frequency response H( ,  ), the pseudo inverse filter.
 1 12
 ,H0
H(,) H(,)
1 2  1 2

 0 H0

8. Givethelimitationsforinversefilteringandpseudofiltering.
The main limitation of inverse and pseudo-inverse filtering is that these filter remain
very sensitive to noise.
9. Whatismeant byWeinerfilter?
Weinerfilterisa methodofrestoringimagesinthepresence ofbluraswellasnoise.
10. Whatisthe expressionforthe error measure forWeiner filter?
Theerrormeasureis given by


e2E (ff)2 
WhereE{.}istheexpectedvalue off theargument.

11. Whatisthe mainobjectiveofWeiner filtering?


The mainobjectiveof Weinerfilteringistofindanestimatef

oftheuncorrupted
imagefsuchthatthemeansquareerrorbetweenthemisminimized.
12. GivetheexpressionforWeinerfiltering andgiveitsothernames forWeiner filter.
Theexpressionfor Weinerfilteringisgivenby

 
‸ *H*(u,v)
F(u,v) G(u,v)
H(u,v)

2
S(u,v)/Sf(u,v)
n 
The filter which consists of terms inside the brackets also is commonly referred
toas minimum mean square error filter (or) least square error filter.
13. Whatismeant geometric transformation?
Geometrictransformationsmodifythespatialrelationshipsbetweenpixelsinan image.
Geometric transformation often are called rubber-sheet transformations
14. Whatarethetwobasicoperationsofgeometric transformation?
Thetwobasicoperationsofgeometrictransformationare,
i) Aspecial transformationwhich defines therearrangementofpixelsontheimageplane.
ii) Gray level interpolation, which deals with the assignment of gray levels to pixels in the
spatially transformed image.
15. Whatismeant spatial transformation?
Animage“f”withpixelco=ordinates(x,y)undergoesgeometricdistortiontoproduce an
image “g” with co-ordinates (x’, y’). this transformation may be expressed as
x’=r(x,y)
and
y’=s(x,y)

wherer(x,y)&s(x,y)arethespatialtransformations.
16. WriteanequationforFredholmIntegraloffirstkindandalsodefinePSF



g(x,y) f(,)H[(x,y)]dd

ButtheimpulseresponseofHisgivenas,h(x,α,y,β)=H[δ(x-α,y-β)] Where
h(x,α,y,β) is called Ponit spread function (PSF).
Thereforeequation becomes,


g(x,y)f(, )h(x,,y, )dd



ThisequationiscalledasSuperpositionor FredholmIntegraloffirst kind.
17. Writethedrawbacksofinverse filtering
1. Doesn’tperformwellwhenusedonnoisyimages
2. Inthepresence ofnoise,whenH(u,v)issmall,thenthenoise η(u,v) dominates.
18. Whatismeant byconstrainedleast squaresrestoration?.(May/June09).
InWienerfilter,thepowerspectraoftheundegradedimageandnoisemustbe known.
Constrained least squares filtering just require the mean and variance of the noise.
19. DefineLagrange Multipliers
Lagrange multiplier is a method to find maximum or minimum value of a
functionsubject to some constrains (side conditions) on the domain of the function.
Examples:
Maximizeorminimize f(x,y)subjecttoconditiong(x,y)=c.
Maximizeorminimize f(x,y,z)subject toconditiong(x,y,z) =c.
Maximizeorminimize f(x,y,z)subjecttoconditionsg(x,y,z)=c1,andh(x,y,z)=c2.
20. ShowtheblockdiagramofaWienerModelwithNoise

Wiener Model with Noise:

Original g(x,y) Restored


image Degradation Wiener Image
f(x,y) function + filter f(x,y)
H W=H-1

[Blurring Filter] [Deblurring/Deconvolutionfilter]

Noise η(x,y)
PARTB
1. Explaintheimagedegradationmodelanditsproperties.(May/June2009)(or)
Explain the mathematical model of Image degradation process

Asimplifiedversion forthe imagerestoration/degradationprocessmodelis

Original Degradation g(x,y) Restoration Restored


image function + filter Imagef(x,y)
f(x,y) H R

Noiseη(x,y)
Degradation Restoration

[Blurring Filter] [Deblurring /


Deconvolutionfilter]

The image f(x,y) is degraded with a function H and also a noise signal η(x,y) is added. The
restoration filter removes the degradation from the degraded image g(x,y) and restores the
original image f(x,y).
TheDegradationmodelisgivenas,

g(x, y) f(x,y)*h(x,y)(x,y)


TakingFourier transform,
G(u,v)=F(u,v).H(u,v)+η(u,v) The
Restoration model is given as,
^
f(x,y)r(x,y)*g(x,y)
TakingFouriertransform,
^
1 G(u,v)
F(u,v) R(u,v).G(u,v) H (u,v).G(u,v)
H(u,v)

where g(x,y) is the degradedimage,f(x,y) istheoriginalimage


H isanoperatorthatrepresentsthe degradationprocess

(x,y)istheexternalnoisewhichisassumedtobeimage-independent
^
f(x,y) istherestoredimage. R isanoperatorthatrepresentstherestoration
process
PropertiesoftheDegradation model:

Asimplifiedversionfortheimagedegradationmodelis
Degradation
Original g(x,y)
function +
image Degradedimage
f(x,y) H

Noiseη(x,y)
Considerthegeneraldegradationmodel
g(x,y) H[f(x,y)](x,y) -------------------------- (1)
a) Propertyof Linearity:
Iftheexternalnoise (x,y)isassumedtobezero,thenequation(1)becomes,

g(x,y)H[f(x,y)]
Hissaidtobe linearif
Haf1(x,y)bf2(x,y) aHf1(x,y) bHf2(x,y) ---------- (2)
Where,aandbarescalars,andf1(x,y)andf2(x,y)areanytwoinputimages.
Thelinear operatorpossesbothadditivityandhomogeneityproperty.
b) PropertyofAdditivity:
Ifa=b= 1,thenequation(2) becomes,
Hf1(x,y)f2 (x,y) Hf1(x,y) Hf2 (x,y)
Iscalledthepropertyofadditivity.Itstatesthat,ifHisalinearoperator,thentheresponse to a sum of
two inputs is equal to the sum of two responses.
c) Property of Homogeneity:
Iff2(x,y)=0,thenequation(2) becomes,

Haf1(x, y)aHf1(x, y)is called the property of homogeneity. It states that the
responsetoaconstantmultipleofanyinputisequaltotheresponseofthatinputmultiplied by the
same constant.
d) Property ofPositionorspace invariant:
Anoperatorhavingtheinput–outputrelationshipasg(x,y)H[f(x,y)]issaidtobe
positionor space invariantif
Hf(x,y)g(x,y)
Foranyf(x,y)andanyαandβ.Itstatesthattheresponseatanypointintheimage depends only on the
value of the input at that point and not on its position.
2. Explainthedegradationmodelforcontinuousfunctionandfordiscretefunction.
(May / June 2009)
a. degradationmodelforcontinuous function
Animage intermsof acontinuousimpulsefunctionisgivenas,


f(x,y)f(,)(x,y)dd ------------------------------------------ (1)



Considerthegeneraldegradationmodel
g(x,y)H[f(x,y)] (x,y)
Iftheexternalnoise (x,y)isassumedtobezero,thenequationbecomes,
g(x,y)H[f (x,y)] (2)
Substituting(1) in(2),we get,



g(x,y)H[f(,)(x,y)dd]

SinceHisalinear operator,extendingtheadditive propertytointegrals,we get,



g(x,y)
H[f(,)(x,y)dd]

Sincef(α,β)isindependentof x&y,usinghomogeneityproperty,we get,



g(x,y)
f(,)H[(x,y)]dd----------------------------------------- (3)

ButtheimpulseresponseofHisgivenas,h(x,α,y,β)=H[δ(x-α,y-β)] Where
h(x,α,y,β) is called Ponit spread function (PSF).
Thereforeequation(3) becomes,


g(x,y)
f(,)h(x,,y,)dd ------------------------------------------- (4)

ThisequationiscalledasSuperpositionor FredholmIntegraloffirst kind.
ItstatesthatiftheresponseofHtoanimpulseisknown,thentheresponsetoanyinput f(α,β) can be
calculated using the above equation.
Thus,alinearsystemHiscompletelycharacterizedbyitsimpulseresponse. If H is
position or space invariant, that is,
H(x,y)h(x,y)
Thenequation (4) becomes,


g(x,y)  f(,)h(x,y)]dd



This is called the Convoluion integral, which states that if the impulse of a linear system is
known, then the response g can be calculated for any input function.
Inthepresenceofadditivenoise,equation(4) becomes,


g(x,y)f(,)h(x,,y,)dd(x,y)

Thisisthelineardegradationmodelexpressionforacontinuousimagefunction. If H is
position Invariant then,


g(x,y)f(,)h(x,y)dd(x,y)

b. degradationmodelfordiscretefunction
Lettwofunctionsf(x)andh(x)besampleduniformlytoformarraysofdimensionA and B.
x=0,1,…….,A-1,forf(x)
=0,1,…….,B-1,for h(x)
AssumingsampledfunctionsareperiodicwithperiodM,where chosen MAB1is
to avoid overlapping in the individual periods.
Let fe(x) and he(x)betheextendedfunctions,thenforatime invariantdegradation
processthediscreteconvolutionformulationisgivenas,
M1

g e (x)  fe(m)he(xm)
m0
Inmatrixform
gHf,
wheregandhare Mdimensionalcolumnvectors
fe(0)  ge(0) 
f (1)   
fe ,ge g (1) ,and His aM xM matrix givenas,
⁝  ⁝ 
   
ef (M1)  eg (M1) 
he(0) he(1) …he(M1)
h(1) h(0) …h(M2)
He e e 
(MM) ⁝ ⁝ ⋱⁝ 
h(M1) h(M2)…h(0) 
e e e 
Assuminghe(x)isperiodic,thenhe(x)=he(Mx)andhence,
he(0) he(M1) …he(1)
h(1) h(0) …h(2)
He e e 
(MM) ⁝
 ⁝ ⋱⁝ 
h(M1) h(M2)…h(0) 
e e e 

Consideringtheextensionfunction fe(x) and he(x) tobeperiodicin2DwithperiodsM


andN,then,fora space invariantdegradationprocesswe obtain
M1N1

g e (x,y) fe(m,n)he(xm,yn)ne(x,y)
m0n0
Inmatrix form,
gHf
wheref,gandare MNdimensionalcolumnvectorsandHisMNxMNdimension.It
2
consistsofM partition,eachpartitionhavingdimensionofsizeMxNandordered accordingly and is given
as ,
H0 HM1 …H1
H H …H
2
H1 0
⁝ ⁝ ⋱⁝  
H H …H 
M1 M2 0
EachpartitionHjis constructed fromthejth rowoftheextended functionhe(x,y) is,
he(j,0) he(j,N1) …he(j,1)
h(j,1) h(j,0) …h(j,2)
Hj e e e 
⁝  ⁝ ⋱⁝  
h(j,N1) h(j,N2)…h(j,0) 
e e e 
3. Write notes on inverse filtering as applied to image restoration.(May / June 2009)
(or) Write short notes on Inverse filter (Nov / Dec 2005)
Inversefilter:
^
Thesimplestapproachtorestorationisdirectinversefiltering;anestimate F(u,v)of
thetransformoftheoriginalimageisobtainedsimplybydividingthetransformofthe
degradedimageG(u,v)bythe degradationfunction.
^
G(u,v)
F(u,v)
H(u,v)
Problemstatement:
Givenaknownimagefunctionf(x,y)andablurringfunctionh(x,y),weneedtorecover f(x,y) from
the convolution g(x,y) = f(x,y)*h(x,y)
Solutionbyinversefiltering:
a.Without Noise:

Original Degradation g(x,y) Restoration Restored


function filter
image Image
f(x,y) H R=H-1 f(x,y)

[Blurring Filter] [Deblurring/Deconvolutionfilter]

From the model,


g(x,y)=f(x,y)h(x,y)

i.e.,G(u,v)F(u,v)H(u,v)
G(u,v)
F(u,v) - ------------------------- (1)
H(u,v)
Also,fromthemodel,
^ 1 G(u,v)

F(u,v)R(u,v)G(u,v)H (u,v)G(u,v) 

- --------- (2)
H(u,v)
From (1)&(2),we get,
^
F(u,v)F(u,v)
Henceexactrecoveryoftheoriginalimageispossible.
b.WithNoise:

Original g(x,y) Restored


Degradation Restoration
image Image
function + filter
f(x,y) f(x,y)
H R=H-1

[Blurring Filter] [Deblurring/Deconvolutionfilter]

Noise η(x,y)

Therestoredimageisgivenas,
^
1
G(u,v)
F(u,v)R(u,v)G(u,v)H (u,v)G(u,v) (3)
H(u,v) --------------------
But, G(u,v)=F(u,v).H(u,v)+ η(u,v)---------------------------------------- (4)
Substititeequation(4) in(3),we get,

^
G(u,v)  F(u,v)H(u,v)(u,v)
F(u,v) 
H(u,v) H(u,v)

F(u,v)H(u,v) (u,v)
 
H(u,v) H(u,v)

^
(u,v)
F(u,v)F(u,v)
H(u,v) (5)

Here, along with the original image , noise is also added. Hence the restored image consists
of noise.
Drawbacks:
1. Doesnotperformwellwhen usedonnoisyimages
1 1=Infinite,
2. In the absence of noise, If H(u,v)=0,then R(u,v)H1(u,v)
H(u,v) 0
from equation (2)
3. Inthepresenceofnoise,whenH(u,v)issmall,thenthenoiseη(u,v)dominates(from
equation(5)
Pseudoinverse filtering.:Thesolutionistocarryouttherestorationprocessina limited
neighborhoodabouttheoriginwhere H(u,v) isnotverysmall.Thisprocedure is called
Pseudoinversefiltering.In thiscase,
 1
H(u,v)

H(u,v) 
2

F̂ (u,v)  
0 H(u,v)


Thethresholdisdefinedbytheuser.Ingeneral,thenoisemaypossesslargecomponents
athigh frequencies (u,v) , while H(u,v) and G(u, v) normallywillbedominatedbylow
frequency components.
4. WriteshortnotesontheWiener filtercharacteristics.(Nov/Dec 2005)(or)
DerivetheWienerfilterequation.Underwhatconditionsdoesitbecomethepseudo inverse
filter?
OBJECTIVE:
Tofindanestimateoftheuncorruptedimagefsuchthatthemeansquareerror between them
is corrupted. This error measure is given as,
  2
e2 Ef   f  
  
ASSUMPTION:
1. NoiseandImageareuncorrelated
2. Theneither noiseorimagehasazeromean
3. Graylevelsintheestimatearealinearfunctionofthelevelsinthedegraded image
Let, H(u,v) =Degradationfunction
H*(u,v)=Complex conjugate of H(u,v)
H(u,v)2H*(u,v).H(u,v)
S(u,v) N(u,v)2 Powerspectrumofthe noise

f S(u,v)F(u,v)2 Powerspectrumofthe undegradedimage


WienerModelwith Noise:
Original g(x,y) Restored
image Degradation Wiener Image
f(x,y) function + filter f(x,y)
H W=H-1

[BlurringFilter] [Deblurring/Deconvolutionfilter]

Noiseη(x,y)

Therestoredimageisgivenas,
^
1 G(u,v) -----------------------
F(u,v)W(u,v)G(u,v)H (u,v)G(u,v) (1)
H(u,v)
But, H*(u,v).Sf(u,v)
W(u,v)  ------ ------------------ (2)
|H(u,v)|2S(u,v)S(u,v)
f 
Where W (u,v) is the Wiener filter
Substituteequation(2)in(1),weget,
  H*(u,v)S(u,v) 
Weget, F(u,v) f
.G(u,v) 
H(u,v)2S f (u,v)S (u,v)------------
 ------ (3)

But,
H(u,v)2 H*(u,v).H(u,v)------------------------------(4)

TofindanoptimalLinearfilterwithMeanSquareerrorasminimum,

Substituteequation(4) in(3),we get,

  H*(u,v)S(u,v) 
F(u,v) .G(u,v)
f

H (u,v).H(u,v)S(u,v)S(u,v) 


*
f

 
 
H*(u,v)S(u,v) .G(u,v)
 f
 S(u,v) 

S f (u,v)[H*(u,v).H(u,v) ]
 S(u,v)
f 

 
 
H*(u,v)
 
.G(u,v)
 * S(u,v) 
H (u,v).H(u,v) 
 Sf (u,v) 

 
 

 
1 .G(u,v)
S(u,v) 

H(u,v) xH*(u,v)
 Sf(u,v) 
Thuswhenthefilterconsistsofthetermsinsidethebracket,itiscalledastheminimum mean square
error filter or the least square error filter.
Case1:Ifthereisnonoise,Sη(u,v)=0,thentheWienerfilterreducestopseudoInverse filter.
Fromequation(2),
 1
H*(u,v).Sf(u,v) H*(u,v)  H(u,v)
W(u,v)  * 
|H(u,v)|2S(u,v)f 0 H (u,v)H(u,v)  0
,when H(u,v)≠0

,whenH(u,v)=0

Case2:If there isnoblur,H(u,v)=1,thenfromequation(2),

H*(u,v).Sf(u,v)
W(u,v)
| H(u,v)|2S(u,v)S(u,v)
f 

 
 
 H*(u,v) 

 * S(u,v)


H (u,v).H(u,v) 
 S f(u,v) 

 
 
  
1
S(u,v)
1 
 S f (u,v) 


1 

1K

Where
S(u,v)

K
Sf(u,v)
Thusthe WienerdenoisingFilterisgivenas,
1   
W(u,v)  Sf(u,v) 
1K  
 
S f (u,v)S (u,v)
and
Sf(u,v) (SNR)
W(u,v) 
Sf(u,v)Sn(u,v) (SNR)1
(i) (SNR ) 1W (u,v)1
(ii) (SNR )1W(u,v)(SNR)
(SNR) ishighinlowspatialfrequenciesandlowinhighspatialfrequenciesso
W(u,v)canbeimplemented with a lowpass(smoothing) filter.
Wiener filter is more robust to noise and preserves high frequency details SNR is
low,Estimate is high

5. Explainindetailthe constrainedleastsquaresrestoration.(May /June09).


In Wiener filter, the power spectra of the undegraded image and noise must be
known. Although a constant estimate is sometimes useful, it is not always suitable.
Constrained least squares filtering just require the mean and variance of the noise.

WithNoise:

Original g(x,y) Restored


Degradation Restoration
image Imagef(x,y)
function + filter
f(x,y)
H R=H-1

[BlurringFilter] [Deblurring/Deconvolutionfilter]

Noiseη(x,y)
Theblurred imageisgivenas,

G(u,v)H(u,v)F(u,v)(u,v)
Inmatrixform,theabove equationisexpressedas,
g=Hf+η

η=g -Hf
-------- ---(1)

Problemstatement:
Tofindtheminimumofa criterionfunctionCdefinedas,

 
M 1 N
1
C  2f(x,y) ,
2

x0y0
Subjecttotheconstraint
 2
gHf 2 -------------- (2)

Where w 2wTw istheEuclidean vector norm,


^
f istheestimateoftheundegradedimage,and

 2f isthelaplacianoperator
Solutiontothe Problem:
Thefrequencydomainsolutiontothisoptimizationproblemisgivenby,
^  
H*(u,v)
F(u,v)  ------------- (3)
2 
H(u,v)2 P(u,v) 
Whereγisaparameterthatmustbeadjustedsothatthe Following
constraint is satisfied,

  gHf,
2
(4)

AndP(u,v)istheFouriertransformofthefunction,

0 1 0

p(x,y) 1 4 1
 
0 1 0
HerethenoiseisreplacedbyP(u,v)…i.e.,NoiseisapproximatedtoLaplacesuchthatmean
=0.Ifmeaniszero,theamountofDCcomponentiszero….i.e,overallbrightnessofimage
^
is zero.The value of γ is selected by iteration such that F(u,v) isagoodapproximationof
F(u,v).
OneApproachtofindthevalueofγ,

Aresidualvectorrisdefinedas, rgH f, ----------------- (5)
^
SinceF(u,v)is afunction ofγ,then γis alsoafunction ofr,

i.e., r2(),
r2
2 ^
fromequation(3) and (5),if ,thenf=f iaagoodestimation
Therefore, r22a,
Steps:
I. Specifyan initialvalueof“γ”
II. Compute r2,which isgivenasafunction ofγ,
i.e., r (),
2

r2 a,or
2
r  a,issatisfied,elseincreaseγif
2 2
III. Checkwhether

decreaseγif r22 a,


^

IV. Usethenew value ofγ, torecomputedtheoptimumestimateF (u,v)

Anotherapproachtofindthevalueof γisNewton–raphson algorithm:


Byknowingthemeanandvarianceof noise,we canestimatetherestoredimage.
Weknowthattheresidualvectorisdefinedas,

rgH f
M1N1

Where r   r2(x, y),


2

x0y0
Thevariance ofthenoiseover theentire image isgivenbythesampleaveragemethod,

 2
1M 1 N1
 (x,y)m
MN x0y0 

,2

1M1N1
Wheresample meanism 
MN 
(x,y),
x0y0

From theaboveexpressions,  MN   m ,


2
 2

Thusthevaluefor theconstraintisdeterminedintermsofnoisemeanand variance.
6. DiscussabouttheLagrangeMultipliers.
Lagrange Multipliers
Lagrangemultiplierisamethodtofindmaximumorminimumvalueofa function
subject to some constrains (side conditions) on the domain of the function.
Examples:
Maximizeorminimize f(x,y)subjecttoconditiong(x,y)=c.
Maximizeorminimize f(x,y,z)subject toconditiong(x,y,z) =c.
Maximizeorminimize f(x,y,z)subjecttoconditionsg(x,y,z)=c1,andh(x,y,z)=c2.
Lagrange Theorem:
Let fandghavecontinuousfirstpartialderivativessuchthat f hasalocal
maximumorlocalminimumat (x0,y0) onthesmoothconstraintcurveg(x,y)=c.If
g(x0,y0) = 0, then there is a real number λ such that
f (x0,y0 ) g(x0,y0 ).λ is
Lagrange multiplier.
Lagrange Method:
Tofindextremaoff(x,y)subjectto constraintg(x,y)=0:
I. Solvetheequations
f(x,y)g(x,y) andg(x,y)=0, by solving

fx(x,y)gx(x,y)
fy (x,y) gy (x,y)
g(x, y)  0.
Findallsolutions(x1,y1,1), (x 2 ,y2,2), (x3,y 3 ,3),...
DiscardtheLagrangemultipliers 1,2,3,...
II. Evaluate f(x,y)ateachsolutionpointobtainedabove.
Thelargestvalueyieldsthemaximumandthesmallestvalueyieldsthe minimum
subject to constraint g( x, y ) = 0.
TheLagrangeMultiplier Method
i. Tofind theonly possiblesolutions oftheproblem
Maximizeorminimizeafunctionf(x,y)subject togx,y c
ii. 1.WritedowntheLagrangianfunction
Lx,yfx,ygx,yc
whereisaconstant.
2.DifferentiateLwithrespecttoxandy,andequate partialsto0.
3. Weshallgettwoequationstogetherwiththeconstraintgx,y  c
Lxx,y  fxx,y  gxx,y  Lyx,
yfyx,ygyx,y
4.Solvethemsimultaneouslyforx,yand
Theconditionsin3are calledfirst-order conditionsfor theproblemof maximizingor
minimizingafunctionf(x,y)subject togx,y  c
Example:Solvethe problem:Maximize fx,y  x2y2subjectto
gx,y  x2xyy23
TheLagrangianis Lx,yx2y2x2xyy23
Lxx,y  2x2xy  0
Lyx,y2yx2y0 x2xy
y23 0
2x 2y
 if2xy0 
and if2yx0
2xy y2y
2x 2y
Combiningthemtogetherwe get  and x2y2 orxyorxy
2xy y2y
SupposeyxFrom3 weget x 1,sox1
2
orx1andit givestwosolutions
x,y1,1and1,1with2
3
SupposeyxFrom3wegetx23, sox 3 orx 3 anditgivestwosolutions
x,y3,3and3,3with2
Two morecases2xy0and2yx0yieldno solutionssincetheyresult
inx0 ory0 whichcontradictstheconstraintx2xyy230.
Twosolutionsx,y1,1and1,1leadtof1,11,12whilethesolutions
x,y  
3, 3   3,3 leadto 
f 3,  
3 f  
3,3 6
Thefirsttwosolutionssolveminimizationproblemwhilethelasttwosolvemaximization
problem.

7. Explainunconstrainedrestorationandconstrainedrestoration
The original image signal f(x,y) is subjected to the linear degrading function h(x, y).
An arbitrarily noise signal (x, y) is then added to create the degraded image signal g(x, y).

LinearAlgebraicRestoration Techniques
These techniques utilize matrix algebra and discrete mathematics for solving the
problem of image restoration. To extract the discrete model for the restoration system, we
make the following assumptions:
1. The digitized original image f(x, y) and the restored image fr(x, y) are stored in the M2
×1column vectors f and fr, respectively.
2. Thedigitizeddegradingfunctionh(x,y)isstoredinasquare matrixH(M2×M2).
3. Thedegradedimageg(x,y)andnoise(x,y)isstoredintheM2×1columnvectorsg
and,respectively.
Wecanexpresstheobserved(degraded)imagevectorinthecompactform:

a. UnconstrainedReconstruction
If we know very little about the noise , then we try to find an estimate image fr,
such that Hfrapproximates g in a least-squares manner. This can be accomplished by
minimizing the norm of the noise . Squaring the norm of both sides of Eq. (6) after
substituting for f by the estimate vector frand moving Hfrto the other side of the equation,
we get

Where ||a||2 is the square of the norm of vector a and is given by ||a||2 = aa’, where a’ is the
transpose of the vector a.
Considertheerror functionE,where
Then our goal is to minimize E with respect to fr. This can be accomplished by taking
thederivative of E with respect to fr, and equating the result to zero, that is

Assumingthat H-1exists,thesolutionforthisequationisgiven as

b. ConstrainedReconstruction
To account for the noise term inEq. (6), we introduce the square matrix Q(M2× M2)
to represent some linear operator on f. By selecting different Q's, we are able to set the goal
of restoration as desired. Equation (8) is now modified to

Where  constantis called theLaGrangemultiplier. Again wetry to minimize the error


function E, by taking its derivative with respect to frand equating the result to zero, that is

Solvingforfr,weget

Where=1/is aconstantthatweadjusttosatisfytheconstraint.
9. Discuss about the concepts and uses of Geometric Transformations in the context of
image restoration.
Geometric Transformations
Geometric transformations modify the spatial relationships between pixels in an
image. Geometric transformation often are called rubber-sheet transformations, because
they may be viewed as the process of “printing” an image on a sheet of rubber and then
stretching this sheet according to some predefined set of rules.
In terms of digital image processing, a geometric transformation consists of two
basic operations: (1) a spatial transformation, which defines the “rearrangement” of pixels
on the image plane; and (2) gray-level interpolation, which deals with the assignment of
gray levels to pixels in the spatially transformed image.
SpatialTransformations:
Suppose that an image f with pixel coordinates (x, y) undergoes geometric distortionto
produce an image g with coordinates (x1, y1). This transformation may be expressed as

x1=r(x,y) ................ 1

and y1=s(x,y)................ 2

where r(x, y) and s(x, y) are the spatial transformations that produced the
geometrically distorted image g(x1, y1). For example, if r(x, y) = x /2 and s (x, y) = y/2, the
“distortion” is simply ashrinking of thesizeoff (x, y) by one half in both spatial directions. If
r(x, y) and s(x, Y) were known analytically, recovering f (x, y) from the distorted image
g(x1, y1) by applying the transformation in reverse might be possible theoretically. In
practice,however,formulatingasinglesetofanalyticalfunctionsr(x,y)ands(x,y)that
describe the geometric distortion process over the entire image plane generally is not
possible. The method used most frequently to overcome this difficulty is to formulate the
spatial relocation of pixels by the use of tiepoints, which are a subset of pixels whose
location in the input (distorted) and output (corrected) images is known precisely.
Figureshowsquadrilateralregionsin adistorted andcorrespondingcorrectedimage.
Theverticesof thequadrilateralsarecorrespondingtiepoints.

Figure:Correspondingtiepointsintwoimage segments.

Suppose that the geometric distortion process within the quadrilateral regions is
modeled by a pair of bilinear equations so that

r (x,y) = c1x + c2 y +c2 y + c3xy + c4…..3

and s(x,y)=c5x +c6y+c7 xy +c8 ..................................... 4

Then,from Equations(1)and(2),

x1= c1x+c2 y+c2 y+ c3xy+ c4......................................5

andy1 =c5x+c6y+c7xy +c8 .......................................................................6

Sincethere are atotal ofeight known tiepoints,these equations can besolved for the
eight coefficients ci, I = 1,2,…….8. The coefficients constitute the geometric distortion
model used to transform all pixels within the quadrilateral region defined by the tiepoints
used to obtain the coefficients. In general, enough tiepoints are needed to generate a set of
quadrilaterals that cover the entire image, with each quadrilateral having its own set of
coefficients.
Once we have the coefficients, the procedure used to generate the corrected (i.e.,
restored) image is not difficult. If we want to find the value of the undistorted image at any
point (x0, y0), we simply need to know where in the distorted image f(x0, y0) was mapped.
This we find out by substituting (x0,y0) into Equations (5) and (60 to obtain the
geometricallydistortedcoordinates(x1,y01 ).Thevalueofthepointintheundistortedimage
0
thatwasmappedto(x1,y 1 )isg(x1,y 1 ).Soweobtaintherestoredimagevaluesimplyby

0 0 0 0
1 1

lettingf (x0,y0)=g(x,y).Forexample,togeneratef(0,0),wesubstitute(x,y)=(0,0)
0 0
intoEquations(5)and(6)toobtainapairofcoordinates(x1,y1)fromthoseequations.Then
welet f‸(0,0)=g(x1,y1),wherex1andy1arethecoordinatevaluesjustobtained.Next,we
substitute (x, y) = (0, 1) into Equations (5) and (6), obtain another pair of values (x 1, y1),and
let f(0, 1) = g(x1, y1) for those coordinate values. The procedure continues pixel bypixel and
row by row until an array whose size does not exceed the size of image g is obtained. A
column (rather than a row) scan would yield identical results. Also, a bookkeeping
procedure is needed to keep track of which quadrilaterals apply at a givenpixel location in
order to use the proper coefficients.
Tie points are established by a number of different techniques, depending on the
application. For instance, some image generation systems having physical artifacts (such as
metallic points) embedded on the imaging sensor itself. These produce a known set ofpoints
(called reseau marks) directly on the image as it is acquired. If the image is distorted later
by some other process (such as an image display or image reconstruction process),then the
image can be geometrically corrected using the technique just described.
Gray-LevelInterpolation
The method discussed in the preceding section steps through integer values of the
coordinates (x, y) to yield the restored image. However, depending on the values of the
coefficients CI, Equations (5) and (6) can yield no integer values

Figure:Gray-level interpolationbasedonthenearestneighborconcept.

for x1and y1. Because the distorted images g is digital, its pixel values are defined only at
integer coordinates. Thus using no integer values for x1and y1 causes a mapping into
locations of g for which no gray levels are defined. inferring what the gray-level values at
those locations should be, based only on the pixel values at integer coordinate locations,then
becomes necessary. The technique used to accomplish this is called gray-level interpolation.

The simplest scheme for gray-level interpolation is based on a nearest neighbor


approach. This method, also called zero-order interpolation, is illustrated in Figure. This
figure shows the mapping of integer (x,y) coordinates intofractional coordinates (x1, y1) by
means of Equations (5) and (6); the selection of the closest integer coordinate neighbor to
(x1, y1); the assignment of the gray level of this nearest neighbor to the pixel rated at (x, y).

Although nearest neighbour interpolation is simple to implement, this method often


has the drawback of producing undesirable artifacts, such as sortion of straight edges in
imagesofhighresolution.Forgeneral-purposeimageprocessingabilinearinterpolation
approach that uses the gray levels of the four nearest neighbors usually is adequate. This
approach is straightforward. Because the gray level of each of the four integral nearest
neighbors of a nonintegral pair of coordinates (x1, y1) is known, the gray-level value atthese
coordinates, denoted (x1,y1) , can be interpolated from the values of its neighbors by using
the relationship

(x1,y1) =ax+1+ by1 +cx1 y1+d .................... 7


where the four coefficients are easily determined from the four equations in four
unknowns that can be written using the four known neighbors of (x1, y1). When these
coefficients have been determined, (x1, y1) is computed and this value is assigned to the
location in f(x, y) that yields thespatial mappinginto location (x1, y1). It iseasy to visualize
this procedure with the aid of Figure. The exception is that, instead of using the gray-level
value of the nearest neighbor to (x1, y1), we actually interpolate a value at location (x1, y1)
and use this value for the gray-level assignment at (x, y).
UNITIVIMAGESEGMENTATION
Edge detection, Edge linking via Hough transform – Thresholding - Region based segmentation –
Region growing – Region splitting and merging – Morphological processing- erosion and dilation,
Segmentation by morphological watersheds – basic concepts – Dam construction – Watershed
segmentation algorithm.

PARTA
1. DefineImage Segmentation(May /June2009)
Segmentation is a process of subdividing an image in to its constituted regions or
objects or parts. The level to which the subdivision is carried depends on the problem being
solved, i.e., segmentation should be stopped when object of interest in an application have
been isolated.
Image segmentation techniques are used to isolate the desired object from the scene
so that measurements can be made on it subsequently.
Applicationsof segmentation.
*Detectionofisolated points.
*Detectionoflinesand edgesinanimage
2. Whatarethedifferentimagesegmentation techniques?
Imagesegmentationisclassifiedas follows:
 Templatematching
 Thresholding
 Boundary detection
 Clustering
 Quad-trees
 Texture matching
3. Whatarethe twopropertiesthatare followedinimage segmentation?
Imagesegmentationalgorithmsgenerallyarebasedononeofthebasicpropertiesof intensity
values
1. discontinuity
2. similarity
4. Explainthepropertyof discontinuity?
Theprincipalapproachofthispropertyistopartitionanimagebasedonabrupt changes in
intensity such as edges in an image.
5. Whatarethethreetypesof discontinuityindigitalimage?
Points,linesand edges.
6. Whatistheideabehindthesimilarityproperty?
The principal approach in the property is based on portioning an image into regions
that are similar according to a set of predefined criteria. Thresholding, region growing and
region splitting and merging are examples of this method.

7. Whatisedge?
An edge isset of connected pixels that lie on the boundarybetween two regions edges
are more closely modeled as having a ramp like profile. The slope of the ramp is inversely
proportional to the degree of blurring in the edge.
8. Whatisedge detection?Explain.(May /June 2009)
Edge direction is fundamental importance in image analysis. Edges characterizeobject
boundaries and are therefore useful for segmentation, registration an identification of
objects in scenes. Edge points can be thought of as pixel locations of abrupt gray- level
change.
Edge detection is used for detecting discontinuities in gray level. First and second
order digital derivatives are implemented to detect the edges in an image.
9. Definezerocrossingpropertyofedge detection.
An imaginary straight line joining the extreme positive and negative values of the
second derivative could cross zero near the midpoint of the edge. Zero crossing property is
useful for locating the centers of thick edges.
10. Whatismeant bygradientoperators?
First order derivatives in an image are computed using the gradient operators. The
gradient of an image f(x,y) at location (x,y) is defined as the vector.
Gx xf

f  
Gy  
   f 
 y
Thef iscalledasthegradient. Magnitudeofthevector is
∆f=magf=[Gx2+Gy2]l/2
α(x,y)=tan-l(Gy/Gx),α(x,y)isthedirectionangleofvector∆f
11. DefineLaplacian.
TheLaplacianofa2Dfunctionf(x,y)isa secondorder derivativedefinedas
2f 2f
2f 
x2 y
2

12. DefineLaplacianof aGaussian function.


Thelaplacianof h(thesecondderivativeof hwithrespecttor)is
r 2 2 r2
 h(r)s
2
e 

4  22


Thisfunctioniscommonlyreferredtoasthe Laplacianofa Gaussian(LOG).
13. Givethepropertiesof thesecondderivativearoundanedge?
* 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.
* Itproducestwovaluesforeveryedgeinanimage.
* An imaginary straight line joining the extreme positive and negative values of
the second derivative would cross zero near the midpoint of the edge.
14. Howthederivativesareobtainedinedgedetectionduringformulation?
The first derivativeat any pointin an imageisobtainedby using the magnitude of the
gradient at that point. Similarly the second derivatives are obtained by using the laplacian.
15. Writeaboutlinkingedge points.
The approach for linking edge points is to analyze the characteristics of pixels in a
small neighborhood (3x3 or 5x5) about every point (x,y)in an image that has undergone
edge detection. All points that are similar are linked, forming a boundary of pixels that
share some common properties.
16. Whatarethetwopropertiesusedforestablishingsimilarityof edge pixels?
(l)Thestrengthoftheresponseofthegradientoperatorusedtoproducethe edge pixel.
(2)Thedirectionofthegradient.
17. Howdoyoudetect isolatedpointsinanimage?(May/June 2009)
To detect the isolated points due to noise or interference, the general mask is shown
below,
-1 -1 -1
-1 8 -1
-1 -1 -1

18. Whatisthe roleofgradientoperatorandlaplacianoperatorin segmentation?


The first and second derivative at any point in an image canbe obtainedby usingthe
magnitude of the gradient operators at that point and laplacian operators
19. Whatisthe roleof firstderivative andsecondderivative insegmentation?
Themagnitudeofthefirstderivativeisusedtoidentifythepresenceofanedgeinthe image.
The second derivative is positive for the part of the transition which is associated with the
dark side of the edge. It is zero for pixel which lies exactly on the edge.
It is negative for the part of transition which is associated with the light side of the edge.
The sign of the second derivative is used to find that whether the edge pixel lies on the light
side or dark side.
20. Whatarethe typesofthresholding?
Therearethreedifferenttypesofthresholds.Theyare
1. global thresholding
2. local thresholding
3. dynamic(or)Adaptive

21. Whatismeantbyobjectpointandbackgroundpoint?
To execute the objects from the background is to select a threshold Tthat separate these
modes. Then any point (x,y) for which f(x,y)>T is called an object point. Otherwise the
point is called background point.
22. Whatisglobal,Localanddynamicoradaptivethreshold?
WhenThresholdTdependsonlyonf(x,y)thenthethresholdiscalledglobal. If T
depends both on f(x,y) and p(x,y) is called local.
IfTdependsonthespatialcoordinatesxandythethresholdiscalleddynamicoradaptive where
f(x,y) is the original image.
23. Whatismeant byregion–Based segmentation?
Theobjectiveofsegmentationistopartitionanimageintoregions.These segmentation techniques
are based on finding the regions directly.
24. Defineregiongrowing?
Region growing is a procedure that groups pixels or sub regions in to layer regions
based on predefined criteria. The basic approach is to start with a set of seed points andfrom
there grow regions by appending to each seed these neighboring pixels that have properties
similar to the seed.
25. Specifythestepsinvolvedinsplittingandmerging?
The region splitting and merging is to subdivide an image initially into a set of arbitrary,
disjointed regions and then merge and / or split the regions in attempts to satisfy the
conditions.
Split into 4 disjoint quadrants any region Ri for which P(Ri)=FALSE. Merge any
adjacent regions Rj and Rk for which P(RjURk)=TRUE. Stop when no further merging or
splitting is positive.
26. Whatisthe mainobjectiveofwatershedalgorithm?
The concept of watersheds is based on visualizing an image in three dimensions:two
spatial coordinates versus gray levels. In such a "topographic" interpretation, we consider
three types of points:
a. Points belonging to a regional minimum
b.Catchmentbasin/watershedofa regionalminimum
Pointsatwhicha dropofwaterwillcertainlyfalltoasingle minimum
c.Dividelines/Watershedlines
Points at which a drop of water will be equally likely to fall to more than one
minimum.
Gray-levelvalue Watershedcontour

Catchmentbasins
Localminima

The principal objective of segmentation algorithms based on these concepts is tofind


the watershed lines
27. WhatistheuseofDam?
A dam is built to prevent the merging. Dam construction is based on binary images;
the simplest way to construct dams separating sets of binary points is to use morphological
dilation.
28. Whatismeantbymarkers?
it used to control over segmentation is based on markers. Marker is a connected component
belongingto an image. We have internal markers, associated with objects of interest and
external markers associated with background.
Part-B
1. Whatissegmentation?(May/June2009)
Segmentation is a process of subdividing an image in to its constitute regions orobjects
orparts. The level to which the subdivision is carried depends on the problembeing solved,
i.e., Segmentation should be stopped when object of interest in an application have been
isolated.
Applicationsof segmentation.
*Detectionofisolated points.
*Detectionoflinesand edgesinanimage
Segmentation algorithms for monochrome images (gray-scale images) generally are
based on one or two basic properties of gray-level values: discontinuity and similarity.
1. Discontinuityistopartitionanimagebased onabruptchangesingray level.Example:
DetectionofisolatedpointsandDetectionoflinesandedgesinan image
2. Similarity is to partition an image into regions that are similar according to a set of
predefined criteria.
Example:thresholding,regiongrowing,orregionsplittingandmerging.
Formally imagesegmentationcanbedefinedasaprocessthatdividestheimageR
intoregions R1, R2,... Rn such that:
n

a. Thesegmentationiscomplete:∪RiR
i1

b. Each regionisuniform.
c. Theregionsdonotoverlapeachother:Ri∩Rj ,ij
d. Thepixelsofa regionhave acommonproperty(same graylevel): PRiTRUE
e. Neighboring regions have different properties:

 
PRiP Rj ,Ri,Rjareneighbors.
2. Explain the various detection of discontinuities in detail.(or)Explain Edge detection
in detail

Detectionof discontinuities

Discontinuities such as isolated points, thin lines and edges in the image can be
detectedby usingsimilarmasks as inthelow- and high-pass filtering.The absolute value of the
weighted sum given by equation (2.7) indicates how strongly that particular pixel
corresponds to the property described by the mask; the greater the absolute value, the
stronger the response.
1. Pointdetection
The mask for detecting isolated points is given in the Figure. A point can be defined
tobeisolatediftheresponsebythemaskingexceedsapredefinedthreshold:
fxT

-1 -1 -1
-1 8 -1
-1 -1 -1

Figure:Mask fordetecting isolatedpoints.


2. Linedetection
 linedetectionisidenticaltopointdetection.I
 Insteadofonemask,fourdifferentmasksmustbe usedtocoverthefourprimary directions
namely, horizontal, vertical and two diagonals.
 Thuslinesare detectedusingthe followingmasks
Horizontal +45 Vertical -45

-1 -1 -1 -1 -1 2 -1 2 -1 2 -1 -1
2 2 2 -1 2 -1 -1 2 -1 -1 2 -1
-1 -1 -1 2 -1 -1 -1 2 -1 -1 -1 2

FigureMasksfor linedetection.
 Horizontalmaskwillresultwithmaxresponsewhenalinepassedthroughthe middle row
of the mask with a constant background.
 Thusasimilarideaisusedwithothermasks.
 Thepreferreddirectionofeachmaskisweightedwithalargercoefficient(i.e.,2) than other
possible directions.
StepsforLinedetection:
 Applyeverymasks ontheimage
 let R1, R2, R3, R4 denotes the response of the horizontal, +45 degree, vertical and -
45 degree masks, respectively.
 if,atacertainpointintheimage|Ri|>|Rj|,
 for all ji, that point is said to be more likely associated with a line in the directionof
mask i.
 Alternatively, to detect all lines in an image in thedirection defined by agiven mask,
just run the mask through the image and threshold the absolute value of the result.
 The points that are left are the strongest responses, which, for lines one pixel thick,
correspond closest to the direction defined by the mask.
3. Edgedetection
 Themostimportantoperationtodetectdiscontinuitiesisedgedetection.
 Edge detection is used for detecting discontinuities in gray level. First and
second order digital derivatives are implemented to detect the edges in an
image.
 Edge is defined as the boundary between two regions with relatively distinct gray-
level properties.
 Anedge isa set ofconnectedpixelsthatlieontheboundarybetweentwo regions.
 Approachesforimplementingedgedetection
first-order derivative (Gradient operator)
Second-orderderivative(Laplacianoperator)
 Considerthefollowingdiagrams:

THICKEDGE:
 Theslopeof theramp isinverselyproportionaltothedegreeof blurringintheedge.
 Wenolonger have athin(onepixelthick)path.
 Instead, anedgepoint now is any point containedin the ramp,and anedgewould then
be a set of such points that are connected.
 Thethicknessisdeterminedbythelengthoftheramp.
 The length is determined by the slope, which is in turn determined by the degree of
blurring.
 Blurrededgestendtobethickandsharpedgestendtobethin
 The first derivative of the gray level profile is positive at the trailing edge, zero inthe
constant gray level area, and negative at the leading edge of the transition
 The magnitude of the first derivative is used to identify the presence of an edge in
the image
 The second derivative is positive for the part of the transition which is associated
with the dark side of the edge. It is zero for pixel which lies exactly on the edge.
 It is negative for the part of transition which is associated with the light side of the
edge
 The sign of the second derivative is used to find that whether the edge pixel lies on
the light side or dark side.
 The second derivative has a zero crossings at the midpoint of the transition in gray
level. The first and second derivative t any point in an image can be obtained by
using the magnitude of the gradient operators at that point and laplacian operators.
1. FIRST DERIVATE. This is done by calculating the gradient of the pixel relative to its
neighborhood. A good approximation of the first derivate is given by the two Sobel
operators as shown in the followingFigure , with the advantage of a smoothing effect.
Because derivatives enhance noise, the smoothing effect is a particularly attractive featureof
the Sobel operators.
 Firstderivativesareimplementedusingthemagnitudeofthe gradient.
i. Gradientoperator:
For a function f (x, y), the gradient f at co-ordinate (x, y) is defined as the 2-
dimesional column vector

∆f= Gx
Gy

= ∂f/∂x
∂f/∂y
∆f=mag(∆f)=[Gx2+Gy2]½={[(∂f/∂x)2+(∂f/∂y)2 ]}1/2
GxGy
 Let(x,y) represent thedirectionangleofthevectorfat(x,y)
(x,y)= tan-1(Gy/Gx)
 Thedirectionofanedgeat(x,y)isperpendiculartothedirectionofthegradient vector at that
point
 
1 Gx 

 Thedirectionof thegradientis:tan
 G 
 y
a) Roberts operator 
consider a33maskis thefollowing.

y

z1 z2 z3

z4 z5 z6

z7 z8 z9

Itcanbeapproximatedatpoint z5 inanumberofways.Thesimplestistousethe
difference(z 8 z5)inthexdirection and(z 6 z5 )intheydirection. Thisapproximation is known as
the Roberts operator, and is expressed mathematically as follows.
f(x,y)
Gx f(x1) f(x) z6z5
x
f(x,y)
Gy f(y1) f(y) z8 z5
y
fGxGy

z6  z5  z8  z5

1 -1 1 0

0 0 -1 0

Roberts operator
AnotherapproachistouseRobertscrossdifferences Take
Z5 Z6

Z8 Z9
ThisapproximationisknownastheRobertscrossgradientoperator,andisexpressed mathematically as
follows
fz9 z5z8z6

-1 0 0 -1

0 1 1 0

Roberts operator
Theabove Equationcanbeimplementedusingthefollowingmask.
The original image is convolved with both masks separately and the absolute values of the
two outputs of the convolutions are added.
b) Prewittoperator
consider a33maskis thefollowing. y

z1 z2 z3

z4 z5 z6

z7 z8 z9

f(x,y) x
Gx 3rdrow  1st row(z7z8z9 )(z1  z2  z3)
x
f(x,y)
Gy 3rd col  1st col (z3z6 z9) (z1z4 z7)
y

fGxGy(z 7 z8z9)(z1z2z3)(z3z6z9)(z1z4z7)

y
-1 0 1 -1 -1 -1

-1 0 1 0 0 0

-1 0 1 1 1 1

Prewittoperator
x
ThisapproximationisknownasthePrewitt operator.
Theabove Equationcanbeimplementedbyusingthefollowing masks.
c) Sobeloperator.
 Thegradients arecalculatedseparatelyforhorizontalandvertical directions:
Gxx72x8x9x12x2x3
Gyx32x 6 x9x12x 4 x7

Horizontaledge Verticaledge
-1 -2 -1 -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1
FigureSobelmasksforedge detection
 The following shows the a 3 x3 region of image and various masks used to compute
the gradient at point z5

ii. SECOND DERIVATE can be approximated by the Laplacian mask given in Figure .The
drawbacks of Laplacian are its sensitivity to noise and incapability to detect the direction of
the edge. On the other hand, because it is the second derivate it producesdouble peak
(positive and negative impulse). By Laplacian, we can detect whether the pixel lies in the
dark or bright side of the edge. This property can be used in image segmentation.

0 -1 0
-1 4 -1
0 -1 0
Figure:MaskforLaplacian(secondderivate).
a) LaplacianOperator:
 Itisalinearoperatorandisthesimplestisotropicderivativeoperator,whichis defined as,

(1)
Where,

(2)-

(3)
Sub(2) &(3)in(1),weget,
f2f(x1,y)f(x1,y) f(x,y1) f(x,y1)4f(x,y) - ------------- (4)
Theabovedigital laplacianequation isimplementedusingfilter mask,

0 1 0

1 -4 1

0 1 0

Thedigital laplacian equationincludingthediagonaltermsisgivenas,


f(x1,y)f(x1,y)f(x,y 1)f(x,y 1)f(x1,y1)f(x1,y 1)
f2
 
 f(x1,y1)f(x1,y1)8f(x,y) 

thecorrespondingfiltermaskisgivenas,

1 1 1

1 -8 1

1 1 1
Similarly,twootherimplementationsofthelaplacianare,

-1 -1 -1
0 -1 0

-1 -8 -1
-1 4 -1

-1 -1 -
0 -1 0

3. ExplainEdgelinkingandboundarydetectionindetail

Edge linking
Edgedetectionalgorithmisfollowedbylinkingprocedurestoassembleedgepixelsinto meaningful edges.
 Basic approaches
1. LocalProcessing
2. GlobalProcessingviatheHoughTransform
3. GlobalProcessingviaGraph-TheoreticTechniques
1. Localprocessing
Analyze the characteristics of pixels in a small neighborhood (say, 3x3, 5x5) about every
edge pixels (x,y) in an image.All points that are similar according to a set of predefined
criteria are linked, forming an edge of pixels that share those criteria
Criteria
1. Thestrengthoftheresponse ofthegradientoperatorusedtoproducethe edge pixel
 an edge pixel with coordinates (x0,y0) in a predefined neighborhood of (x,y)
is similar in magnitude to the pixel at (x,y) if
|f(x,y)-f (x0,y0)|E
2. Thedirection ofthegradientvector
 an edge pixel with coordinates (x0,y0) in a predefined neighborhood of (x,y)
is similar in angle to the pixel at (x,y) if
|(x,y) -(x0,y0) |<A
3. A Pointin the predefined neighborhood of(x,y) is linked to the pixel at (x,y) if both
magnitude and direction criteria are satified.
4. Theprocessisrepeatedatevery locationintheimage
5. Arecord mustbekept
6. Simplybyassigning adifferentgray leveltoeachsetoflinkededge pixels.
7. findrectangleswhose sizesmakes themsuitablecandidatesforlicense plates
8. UsehorizontalandverticalSobeloperators,eliminateisolatedshortsegments
• linkconditions:
gradientvalue>25
gradientdirectiondiffers<15
2. GlobalProcessingviatheHoughTransform
Suppose that we have an image consisting of several samples of a straight line, Hough
[1962] proposed a method (commonly referred as Hough transform) for finding the line (or
lines) among these samples (or edge pixels). Consider a point (xi, yi). There is an infinite
number of lines passing through this point, however, they all can be described by

yiaxib
Thismeansthatallthelinespassing(xi,yi)aredefinedbytwoparameters,aandb.The equationcan
be rewritten as

bxiayi
Now,ifweconsiderbasafunctionofa,wherexiandyiaretwoconstants,
theparameterscan berepresented byasingle lineintheab-plane. The Houghtransform isa
process where each pixel sample in the original xy-plane is transformed to a line in the ab-
plane. Consider two pixels (x1, y1) and (x2, y2). Suppose that we draw a line L across these
points. The transformed lines of (x1, y1) and (x2, y2) in the ab-plane intersect each other in
thepoint(a',b'),whichisthedescriptionofthelineL,seeFigure.Ingeneral,themore
linescrosspoint(a,b)thestrongerindicationthatisthatthereisalineyaxb inthe
image.

To implement the Hough transform a two-dimensional matrix isneeded, see Figure. In each
cell of the matrix there is a counter of how many lines cross that point. Each line in the ab-
plane increases the counter of the cells that are along its way. A problem in this
implementation is that both the slope (a) and intercept (b) approach infinity as the line
approaches the vertical. One way around this difficulty is to use the normal representationof
a line:

xcosysind
Here d represents the shortest distance between origin and the line.represents
the angle of the shortest path in respect to the x-axis. Their corresponding ranges are[0,2D],
and [-90, 90], where D is the distance between corners in the image.Although the focus has
been on straight lines, the Hough transform is applicable to any other shape. For example,
the points lying on the circle

xc12 yc 2 c22 3

can bedetected byusingthe approachjustdiscussed.The basicdifference isthepresence of three


parameters (c1, c2, c3), which results in a 3-dimensional parameter space.

y b

L b=-xa
2
+y 2
x,y
22

x11,y

b'
b=-x1a+y1
x a
a'
Figure:Hough transform:xy-plane(left);ab-plane(right).

b
bmax

...
0 ... ...

bmin
...
a
amin 0 amax
Figure:Quantizationoftheparameter plane foruse inHoughtransform.

y d

dmax

...

0 ... ...

d
 x dmin 
...

min 0 max
Figure:Normalrepresentationofaline(left);quantizationofthed-plane intocells.

HOUGHTRANSFORMSTEPS:
1. Computethe gradientof animage andthresholdittoobtainabinaryimage.
2. Specifysubdivisionsinthe-plane.
3. Examinethecountsof theaccumulatorcellsfor highpixelconcentrations.
4. Examinetherelationship (principallyforcontinuity)between pixelsinachosencell.
5. basedoncomputingthedistancebetweendisconnectedpixelsidentifiedduring traversal
of the set of pixels corresponding to a given accumulator cell.
6. agapatanypointissignificantifthedistancebetweenthatpointanditscloset neighbor
exceeds a certain threshold.
7. linkcriteria:
1). thepixelsbelongedtooneofthesetofpixelslinkedaccordingtothehighest count
2). nogapswerelongerthan5pixels
4. ExplainThresholdingindetail.

Thresholding
 Suppose that the image consists of one or more objects and background, eachhaving
distinct gray-level values. The purpose of thresholding is to separate these areas
from each other by using the information given by the histogram of the image.
 If the object and the background have clearly uniform gray-level values, the object
can easily be detected by splitting the histogram using a suitable threshold value.
 Thethresholdisconsideredasafunctionof:
 
Tg i,j,xi,j,pi,j
where i and j are the coordinates of the pixel, xi,j is the intensity value of the pixel,
and p(i, j) is a function describing the neighborhood of the pixel (e.g. the average
value of the neighboring pixels).
 Athresholdimageisdefinedas:
1 ifxi,jT
fx,y
0 ifx i,jT
Pixels labeled 1 corresponds to objects and Pixels labeled 0 corresponds
tobackground

 Multilevelthresholdingclassifies apointf(x,y)belongingto

 toanobject class ifT1< f(x,y) T2


 toanotherobjectclassiff(x,y)>T2
 tobackgroundiff(x,y)T1
 WhenTdepends on

 onlyf(x,y):onlyongray-levelvalues🢡Globalthreshold
 both f(x,y) and p(x,y) :on gray-levelvaluesand itsneighbors🢡Local
threshold
 the spatialcoordinatesxandy🢡dynamicorAdaptivethreshold
Anexampleofthresholdingandthecorrespondinghistograminshownbelow

T
T1 T2
Figure:Histogrampartitionedwithonethreshold(singlethreshold),andwithtwo thresholds
(multiple thresholds).
Thethresholdingcanbeclassifiedaccordingtotheparametersitdependson:
Thresholding: Effectiveparameters:
Global xi,j
Local xi,j,p(i, j)
Dynamic xi,j, p(i, j), i , j

Figure:Exampleofhistogramwithtwooverlappingpeaks.
1. BasicGlobalThresholding:
Thisisbasedonvisualinspectionofhistogram

 Selectaninitialestimatefor T.
 Segmentthe image usingT.Thiswillproduce twogroupsof pixels:G1consistingof all
pixels with gray level values > T and G2consisting of pixels with gray level values 
T
 Computetheaverage gray levelvalues 1and2forthepixelsinregionsG1andG2
 Computea newthresholdvalue
 T=0.5(1+ 2)
 Repeat steps 2 through 4 until the difference in T in successive iterations is smaller
than a predefined parameter To.
2. BasicAdaptive Thresholding:
 Subdivideoriginalimageintosmallareas.
 Utilizeadifferentthresholdtosegmenteach subimages.
 Since the threshold used for each pixel depends on the location of the pixel in terms
of the sub images, this type of thresholding is adaptive.
3. OptimalGlobalandAdaptiveThresholding
 Considerthefollowingtwoprobabilitydensityfunctions
 Assume the larger PDF to correspond to the back ground level and the smaller PDF
to gray levels of objects in the image. The overall gray-level variation in the image,

p(z)P1p1(z)P2p2(z)
P1P21
Where P1 is the pbb that the pixel is an object pixel, P2 is the pbb that the pixel is a
background pixel.
 Theprobabilityoferrorclassifying abackgroundpointasan objectpointis,as
T


E1(T) p2(z)dz

Thisis theareaunderthecurve ofP2(z)tothe left ofthethreshold
 Theprobabilityoferrorclassifying aobjectpointasan backgroundpointis,as
T
E2(T)p1(z)dz
ThisistheareaunderthecurveofP1(z)totherightofthethreshold
 Thentheoverallprobabilityoferroris E(T)PE(T)PE (T)
21 12

 Tofindtheminimum error, dE(T) d(PE(T)PE (T))


 21 12
0
dT dT
 Theresultis
P1p1(T)P2p2 (T)

 IfthetwoPDFsareGaussian then,
p(z)P1p1(z)P2p2(z)
(z )2 (z2)2
 1 
P1 P2
 e 221
 e 222

21 22
where
1and12arethe meanandvarianceof theGaussiandensityof oneobject
2and 22are the mean and variance of the Gaussian density of the other object
Substitutingequation(2)in(1),thesolutionforthethresholdTisgivenas,
AT2BTC0
where A2 1 2 2
B2(22)
1 2 2 1
C22222222ln(P/P)
1 2 2 1 1 2 21 12

 Sincethequadraticequationhastwopossiblesolutions,twothresholdvaluesare required
to obtain the optimal solution.
 Ifthevariancesareequal, asinglethresholdissufficient given as,
 2 P 
T 1 2
 

ln2
2 1 2 P1
ThresholdselectionBasedonBoundary Characteristics:
 Thethresholdvalue selectiondependsonthepeaksinthe histogram
 The threshold selection is improved by considering the pixels lying on or
neartheboundary between the objects and background
 Athreelevelimagecan be formedusingthegradient, whichisgivenas,
Lightobject ofdarkbackground

0 if fT

s(x,y)  iffT and2f0

 iffT and2f0

 allpixelsthatarenotonan edgeare labeled 0


 allpixelsthatareonthe darksideofan edgeare labeled +
 allpixelsthatareonthe lightsideanedgearelabeled
 Thetransitionfromlightbackgroundtodarkobjectisrepresentedbythe occurrence of ‘-‘
followed by ‘+’

 Thetransitionfromobjecttothebackgroundisrepresentedbytheoccurrenceof ‘+‘
followed by ‘-’

 Thusahorizontalorverticalscanlinecontainingasectionofanobjecthasthe following
structure:(…)(-,+)(0 or +)(+,-)(…)

5. Writeshort notes onRegion growing segmentation. OrExplainRegion splittingand


Merging (May / June 2009)
Region growing is a procedure that groups pixels or sub regions in to layer regions
based on predefined criteria. The basic approach is to start with a set of seed points andfrom
there grow regions by appending to each seed these neighboring pixels that have properties
similar to the seed
Region growing (or pixel aggregation) starts from an initial region, which can be a
group of pixels (or a single pixel) called seed points. The region is then extended by
including new pixels into it. The included pixels must be neighboring pixels to the region
and they must meet a uniform criterion.
criteria: (i) The absolute gray-level difference between any pixel and the seed hasto
be less than 65 and (ii) the pixel has to be 8-connected to at least one pixel in that region (if
more, the regions are merged) .This is selected from the following histogram

The growing continues until a stopping rule takes effect. The region growing has
severalpractical problems:
how to select the seed points
growingrule(oruniformcriterion)
stopping rule.
All of these parameters depend on the application. In the infra-red images inmilitary
applications the interesting parts are the areas which are hotter compared to their
surroundings, thus a natural choice for the seed points would be the brightest pixel(s) in the
image. In interactive applications the seed point(s) can be given by the user who gives (by
pointing with the mouse, for example) any pixels inside the object, and the computer then
finds the desired area by region growing algorithm.
The growing rule can be the differences of pixels. The value of the pixel in
consideration can be compared to the value of its nearest neighbor inside the region.
If the difference does not exceed a predefined threshold the pixel is attended to the
region. Another criterion is to examine the variance of the region, or gradient of the pixel.
Several growing criteria worth consideration are summarized in the following:
Global criteria:
Differencebetweenxi,jandtheaveragevalueoftheregion. The
variance 2 of the region if xi,j is attended to it.
Localcriteria:
Differencebetweenxi,jandthenearestpixelinsidethe region.
The variance of the local neighborhood of pixel xi,j. If thevariance is
low enough (meaning that the pixel belongs to a homogenous area) it will
be attended to the region.
Gradient of the pixel. If it is small enough (meaning that the pixel does not belong to an
edge) it will be attended to the region.
The growing will stop automatically when there are no more pixels that meet the
uniform criterion. The stopping can also take effect whenever the size of the region gets too
large (assuming a priori knowledge of the object's preferable size). The shape of the object
can also be used as a stopping rule, however, this requires some form of pattern recognition
and prior knowledge of the object's shape.

Splittingandmerging

 Thequadtreesegmentationisasimplebutstillpowerfultoolforimage decomposition.
 Inthistechnique,animageisdividedintovarioussubimagesofdisjointregions and
then merge the connected regions together.
 Stepsinvolvedinsplittingandmerging
 Splitinto4disjointquadrantsanyregionRifor whichP(Ri)=FALSE.
 MergeanyadjacentregionsRj and RkforwhichP(RjURk)=TRUE.
 Stopwhennofurthermergingorsplittingispossible.
 Thefollowingshowsthepartitionedimage,

 Correspondingquad tree
 Anexampleof quadtree-basedsplitandmergeisshown below
 Inthefirstphasetheimageisdecomposedintofoursubblocks(a), which are
then further divided, except the top leftmost block (b).
 Atthethirdphasethe splittingphase iscompleted(c).
 At the merging phase the neighboring blocks that are uniform and have
the same color are merged together.
 The segmentation results to only two regions (d), which is ideal in
thisfavorable example.

(a) (b) (c) (d)

Figure:Exampleofquadtreebasedsplittingandmerging.

6. ExplainindetailaboutSegmentationbyMorphologicalWatersheds
The aim of Segmentation is to separate regions wrt brightness, color, reflectivity,
texture,etc.Segmentationbasedonthreeprincipalconcepts:(a)detectionofdiscontinuities,
(b) thresholding,and(c)region processing.
1. BasicConcepts
The concept of watersheds is based on visualizing an image in three dimensions:two
spatial coordinates versus gray levels. In such a "topographic" interpretation, we consider
three types of points:
a. Points belonging to a regional minimum
b.Catchmentbasin/watershedofa regionalminimum
Pointsatwhicha dropofwaterwillcertainlyfalltoasingle minimum
c.Dividelines/Watershedlines
Points at which a drop of water will be equally likely to fall to more than one
minimum. Crest lines on the topographic surface
Thistechnique istoidentifyallthethirdtype ofpointsforsegmentation
1. PiercingholesineachregionalminimumofI
2. The3Dtopographyisfloodedfrombelow gradually
3. When the rising water in distinct catchment basins is about to merge, a dam is built
to prevent the merging
4. Thedamboundariescorrespondtothewatershedlinestobeextractedbya
Watershed segmentation algorithm
Gray-levelvalue Watershedcontour

Catchmentbasins
Localminima

Watershed lines

The principal objective of segmentation algorithms based on these concepts is tofind


the watershed lines. The basic idea is simple: Suppose that a hole is punched in each
regionalminimumandthattheentiretopographyisfloodedfrombelowbylettingwater
rise through the holes at a uniform rate. When the rising water in distinct catchment basinsis
about to merge, a dam is built to prevent the merging. The flooding will eventually reacha
stage when only the tops of the dams arc visible above the water line. These dam boundaries
correspond to the divide lines of the watersheds. Therefore, they are the (continuous)
boundaries extracted by a watershed segmentation algorithm.

These ideas can be explained further with the aid of Fig.. Figure (a) shows a simple
gray-scale image and Fig. (b) is a topographic view, in which the height of
the"'mountains’’is proportional to gray-level values in the input image. For ease of
interpretation, the backsides of structures are shaded. This is not to be confused with gray-
level values; only the general topography of the three-dimensional representation is of
interest. In order to prevent the rising water from spilling out through the edges of the
structure, we imagine the perimeter of the entire topography (image) being enclosed by
dams of height greater thanthe highest possible mountain, whose value is determined by the
highest possible gray-level value in the input image.
Suppose that a hole is punched in each regional minimum [shown as dark areas in
Fig. (b)] and that the entire topography is flooded from below by letting water rise through
the holes at a uniform rate. Figure (c) shows the first stage of flooding, where the “water”
shown in light gray, has covered only areas that correspond to the very dark background in
the image. In Figs. (d) and (e) we see that the water now has risen into the first and second
catchmentbasins,respectively.Asthewatercontinuestorise,itwilleventuallyoverflow
from one catchment basin into another. The first indication of this is shown in (f). Here,
water from the left basin actually overflowed into the basin on the right and a short
"dam”(consisting of single pixels) was built to prevent water from merging at that level
offlooding (the details of dam building are discussed in the following section), The effect is
more pronounced as water continues to rise, as shown in Fig. (g).This figure shows a longer
dam between the two catchment basins and another dam in the top part of the right basin.
The latter dam was built to prevent merging of water from that basin with water from areas
corresponding lo the background. This process is continued until the maximum level of
flooding (corresponding to the highest gray-level value in the image) is reached. The final
dams correspond to the watershed lines, which are the desired segmentation result. The
result for this example is shown in Fig. (h) as a dark, one-pixel-thick path superimposed on
the original image. Note the important property that the watershed lines form a connected
path, thus giving continuous boundaries between regions.
One of the principal applications of watershed segmentation is in the extraction of
nearly uniform (blob like) objects from the background. Regions characterized by small
variations in gray levels have small gradient values. Thus, in practice, we often see
watershed segmentation applied to the gradient of an image, rather than to the image itself.
In this formulation, the regional minima of catchment basins correlate nicely with the small
value of the gradient corresponding to the objects of interest.
2. Dam Construction
Dam construction is based on binary images, which are members of 2-D integer
space Z2. The simplest way to construct dams separating sets of binary points is to use
morphological dilation.
The basics of how to construct dams using dilation are illustrated in Fig. Figure (a)
shows portions of two catchment basins at flooding step n - 1 and Fig. (b) shows the resultat
the next flooding step, n. The water has spilled from one basin to theother and, therefore, a
dam must be built to keep this from happening. In order to be consistent with notation to be
introduced shortly,
let M1and M2denote the sets of coordinates of points in two regional minima. Then
let the set of coordinates of points in the catchment basin associated with these two minima
at stage n - 1 of flooding be denoted by and respectively.
These are the two black regions shown in Fig. (a). Suppose that each of the
connected components in Fig.(a) is dilated by the structuring element shown in Fig. (c),
subject to two conditions:
(1) The dilation has to be constrained to q (this means that the center of the structuring
element can be located only at points in q during dilation), and
(2) The dilation cannot be performed on points that would cause the sets being dilated to
merge (become a single connected component).
Figure (d) shows that a first dilation pass (in light gray) expanded the boundary of each
original connected component. Note that condition (1) was satisfied by every point during
dilation, and condition (2) did not apply to any point during the dilation process; thus the
boundary of each region was expanded uniformly.
Let the union of these two sets be denoted by C[n - 1], There are two connected
components in Fig. (a) and only one connected component in Fig. (b),This connected
component encompasses the earlier two components, shown dashed. The fact that two
connected components have become a single component indicates that water between the
two catchment basins has merged at flooding step n. Let this connected component be
denoted q. Note that the two components from step n - 1 can be extracted from q by
performing the simple AND operation .Wenotealsothatallpointsbelongingtoan
individual catchment basin form a single connected component.
In the second dilation (shown in medium gray), several points failed condition (1)
while meeting condition (2), resulting in the broken perimeter shown in the figure. It also is
evident that the only points in q that satisfy the two conditions under consideration describe
the one-pixel-thick connected path shown crossed-hatched in Fig. (d). This path constitutes
the desired separating dam at stage n of flooding. Construction of the dam at this level of
flooding is completed by setting all the points in the path just determined to a value greater
than the maximum gray-level value of the image. The height of all dams is generally set
at1plus themaximumallowed value inthe image. Thiswillpreventwater from crossing over
the part of the completed dam as the level of flooding is increased. It is important to note
that dams built by this procedure, which are the desired segmentation boundaries, are
connected components. In other words, this method eliminates the problems of broken
segmentation lines,
Although the procedure just described is based on a simple example, the method
used for more complex situations is exactly the same, including the use of the 3 X 3
symmetric structuring elements shown in Fig. (c).

1. Ateachstepofthe algorithm,thebinary image inobtainedinthefollowingmanner


1. Initially, thesetofpixelswithminimumgray levelare1,others0.
2. Ineachsubsequentstep,wefloodthe3Dtopographyfrombelowandthe pixels
covered by the rising water are 1s and others 0s. M1, M2:
– Setsofcoordinatesofpointsinthetworegionalminima 2.Cn-
1(M1), Cn-1(M2)
– SetsofcoordinatesofpointsinthecatchmentbasinsassociatedwithM1M2
atstagen-1offlooding(catchment basinsuptotheflooding level)
3. C[n-1]
– Unionof Cn-1(M1),Cn-1(M2)
4. Atfloodingstepn-1,therearetwoconnectedcomponents.Atfloodingstepn,thereis only one
connected component
– This indicates that the water between the two catchment basins has mergedat
flooding step n
– Use“q”todenotethesingleconnectedcomponent
5. 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 thestructuring element can notgo beyond
q during dilation
6. Thedamisconstructedbythepointsonwhichthedilationwouldcausethesetsbeing dilated to
merge.
– Resultingone-pixelthickconnectedpath
7. Settingthegraylevelateachpointintheresultantpathtoavaluegreaterthanthe maximum gray
value of the image. Usually max+1

7. ExplainWatershedSegmentationAlgorithmindetail
Watershed Transform
1. Denote Cn(Mi) as the set of coordinates of points in the catchment basin associated with
minimum Miat flooding stage n.
– Cn(Mi)=C(Mi) T[n]
– Cn(Mi)=T[n]
2. DenoteC[n]astheunionofthefloodedcatchmentbasinportionsatstagen:
– Initialization
– Let C[min+1]=T[min+1]
3. At each step n,assume C[n-1] has been constructed. The goal is to obtainC[n] from C[n-
1]

DenoteQ[n]asthesetofconnectedcomponentsin T[n].
4. Foreach qQ[n],therearethreepossibilities
1. qC[n-1]isempty (q1)
• Anew minimumis encountered
• qisincorporatedintoC[n-1] toformC[n]
2. qC[n-1]containsone connectedcomponentof C[n-1](q2)
• qisincorporatedintoC[n-1] toformC[n]
3. qC[n-1]containsmore thanoneconnectedcomponentsofC[n-1] (q3)
• Aridgeseparatingtwoormorecatchmentbasinshasbeen encountered
• Adamhastobebuiltwithinqtopreventoverflowbetweenthe catchment
basins
4. Repeattheprocedureuntiln=max+1

WATERSHEDSEGMENTATIONALGORITHM
1. LetM1, M2, M3….Mnbe the sets of coordinatesof points in the regional minima of
theimage g(x,y)
2. C(Mi)bethecoordinatesofpointsofthecatchmentbasinassociatedwithregional minima Mi
T[n]={(s,t)|g(s,t) <n }
T[n] = Set of points in g(x,y) which are lying below theplaneg(x,y)=n n
= Stage of flooding, varies from min+1 to max+1
min = minimum gray level value
max =maximumgraylevelvalue
3. Let Cn(M1)be theset ofpoints in thecatchment basin associated with M1that are flooded at
stage n.

Cn(Mi)= 1atlocation(x,y)if(x,y)ЄC(Mi)AND(x,y)ЄT[n],otherwise itis0.


4. C[n]bethe unionof floodedcatchmentbasin portionsatthestagen
5. Algorithm keeps on increasing the level of flooding, and during the process Cn(Mi) and
T[n] either increase or remain constant.
AlgorithminitializesC[min+1] =T[min+1],andthen proceeds recursivelyassuming that
at step n C[n-1] has been constructed.
6. Let Q be set of connected components in T[n].For each connected component q Є
Q[n],there are three possibilities:

7. Condition (a) occurs when a new minima is encountered, in this case q is added to set
C[n-1] to form C[n].
8. Condition (b) occurs when q lies within a catchment basin of some regional minima, in
that case
9. Condition (c) occurs when ridge between two catchment basins is hit and further
flooding will cause the waters from two basins will merge, soa dam must be built within q.

Consider the image and its gradient, shown in Figs. (a) and (b), respectively. Application of
the watershed algorithm just described yielded the watershed lines (white paths} of the
gradient image shown in Fig. (c).These segmentation boundaries are shown superimposed
on the original image in Fig. (d). As noted at the beginning of this section, (thesegmentation
boundaries have the important property of being connected paths).
Amorphologicalregiongrowingapproach.
Seed points:
– localminimapoints
Growing method:
– Dilation
Predicates
– Similargradientvalues
Sub-regionboundary
– Dambuilding
To avoid over-segmentation
– Use markers
Disadv:Conceptisdifficulttounderstand
8. ExplainMorphologicalImageProcessingindetails
Morphological Image Processing is an important tool in the Digital Image processing, since
that science can rigorously quantify many aspects of the geometrical structure of the way
that agrees with the human intuition and perception.
Morphologic image processing technology is based on geometry. It emphasizeson
studying geometry structure of image. We can find relationship between each part of image.
When processing image with morphological theory. Accordingly we cancomprehend the
structural character of image in the morphological approach an image is analyzed in terms
of some predetermined geometric shape known as structuring element.
Morphological processing is capable of removing noise and clutter as well as the
abilitytoedit animage based onthesizeandshape of theobjects ofinterest. Morphological
Image Processingis used in the place of a Linear Image Processing, because it sometimes
distort the underlying geometric form of an image, but in Morphological image Processing,
the information of the image is not lost.
In the Morphological Image Processing the original image can be reconstructed
by using Dilation, Erosion, Opening and Closing operations for a finite no of times. The
major objective of this paper is to reconstruct the class of such finite length Morphological
Image Processing tool in a suitable mathematical structure using Java language.
BinaryImage:-
TheimagedataofBinaryImageisBlackandWhite.Eachpixeliseither‘0’or‘1’.
AdigitalImage iscalled BinaryImageifthegrey levelsrange from0and1.
Ex:A Binary Imageshown belowis,

1 1 1 1 0

1 1 1 1 0

0 1 1 1 0

0 1 1 1 0

(A4*5Binary Image)

DILATION:-

Dilation - growimageregions

Dilationcauses objectsto dilateor grow insize.The amountand theway thatthey


grow depends upon the choice of the structuring element [3]. Dilation makes an objectlarger
by adding pixels around its edges.
TheDilationofanImage‘A’byastructuringelement‘B’iswrittenasAB.
TocomputetheDilation,we
position‘B’suchthatitsoriginisatpixelco-ordinates(x,y)andapplythe rule.
1if‘B’hits‘A’ 0
g(x,y)=
Otherwise

Repeat for all pixel co-ordinates. Dilation creates new image showing all the
location of a structuring
element origin at which that structuring element HITS the Input Image. In this it adds alayer
of pixel to an object, there by enlarging it.Pixels are added to both the inner andouter
boundaries of regions, so Dilation will shrink the holes enclosed by a single regionand make
the gaps between different regions smaller. Dilation will also tend to fill in any small
intrusions into a region’s boundaries.
The results of Dilation are influenced not just by the size of the structuring
element but by its shape also.
Dilation is a Morphological operation; it can be performed on both Binary and Grey Tone
Images. It helps in extracting the outer boundaries of the given images.
ForBinaryImage:-
Dilationoperationisdefinedasfollows,
D(A, B)=AB
Where,
Ais theimage
Bisthestructuringelement oftheorder3* 3.
Manystructuringelementsarerequested forDilatingtheentireimage.
EROSION:-

Erosion -shrinkimageregions
Erosion causes objects to shrink. The amount of the way that they shrink depend
uponthechoiceofthestructuringelement.Erosionmakesanobjectsmallerbyremovingor Eroding
away the pixels on its edges [3].
The Erosion of an image ‘A’ by a structuring element ‘B’ is denoted asA Θ B.
Tocomputethe Erosion,weposition ‘B’suchthatits originisatimagepixelco-ordinate (x , y) and
apply the rule.
1if‘B’Fits ‘A’,
g(x,y)=
0 otherwise

Repeat for all x and y or pixel co-ordinates. Erosion creates new image that marks all the
locations of a Structuring elements origin at which that Structuring Element Fits the input
image. The Erosion operation seems to strip away a layer of pixels from an object,shrinking
it in the process. Pixels are eroded from both the inner and outer boundaries of regions. So,
Erosion will
enlarge the holes enclosed by a single region as well as making the gap between different
regionslarger.Erosionwillalsotendtoeliminatesmallextrusionsonaregionsboundaries.
Theresultoferosion depends onStructuringelement sizewithlarger Structuring
elements having a more pronounced effect & the result of Erosion with a large Structuring
element is similar to the result obtained by iterated Erosion using a smaller structuring
element of the same shape.
Erosion is the Morphological operation, it can be performed on Binary andGrey
images.It helps in extracting the inner boundaries of a given image.
ForBinaryImages:-
Erosionoperationisdefined asfollows,
E(A, B)=AΘ B
Where,Aistheimage
Bisthestructuringelement oftheorder3* 3.
Manystructuringelements arerequired forerodingtheentireimage.
OPENING:-

Opening -structuredremovalofimage regionboundarypixels


It is a powerful operator, obtained by combining Erosion and Dilation. “Opening
separates the Objects”. As we know, Dilation expands an image and Erosion shrinks it [3].
Opening generally smoothes the contour of an image, breaks narrow Isthmuses and
eliminates thin Protrusions [1].
The Opening of an image ‘A’ by a structuring element ‘B’ is denoted as A ○ B and is
defined as an Erosion followed by a Dilation, andis
writtenas[3],
A○B = (AΘ B)B
Opening operation is obtained by doing Dilation on Eroded Image. It is tosmoothen
the curves of the image. Opening spaces objects that are too close together, detaches objects
that are touching and should not be, and enlarges holes inside objects.
Openinginvolvesoneor moreErosionsfollowed byoneDilation.
CLOSING:-

Closing -structuredfillinginofimageregionboundary pixels


It isapowerfuloperator,obtainedbycombiningErosionand Dilation.“Closing,
jointheObjects”[3]. Closingalso tends to smooth sections ofcontours but,as opposed to
Opening,itgenerallyfusesnarrowbreaksandlongthinGulf’s,eliminatessmallholesand fills
gaps in the contour [1].
TheClosingofanimage‘A’byastructuringelement‘B’isdenotedasA●B
anddefinedasa DilationfollowedbyanErosion;andiswrittenas[3],
A●B=(AB)ΘB.ClosingisobtainedbydoingErosiononDilatedimage.
Closingjoinsbrokenobjectsandfillsinunwantedholesinobjects.
ClosinginvolvesoneormoreDilationsfollowedbyoneErosion.

FUTURESCOPE:-
TheMorphologicalImageProcessingcanbefurtherappliedtoawidespectrum of
problems including:
 Medicalimageanalysis:Tumordetection,measurementofsizeandshapeof internal
organs, Regurgitation, etc.
 Robotics: Recognition and interpretation of objects in a scene, motion control
andexecution through visual feedback
 Radarimaging:Targetdetection and identification.

UNITVIMAGECOMPRESSIONANDRECOGNITION
Need for data compression, Huffman, Run Length Encoding, Shift codes, Arithmetic coding, JPEG
standard, MPEG. Boundary representation, Boundary description, Fourier Descriptor, Regional
Descriptors – Topological feature, Texture - Patterns and Pattern classes - Recognition based on
matching.
PART–A
1. Whatisimage compression?
Image compression refers to the process of redundancy amount of data required to
represent the given quantityof information for digital image. The basis of reduction process
is removal of redundant data.
2. DefineDataCompression.
The term data compression refers to the process of reducing the amount of data
required to represent a given quantity of information.
3. WhataretwomaintypesofDatacompression?
1. Lossless compression can recover the exact original data after compression. It is used
mainly for compressing database records, spreadsheets or word processing files.
2. Lossy compression will result in a certain loss of accuracy in exchange for asubstantial
increase in compression. Lossy compressionis more effective when used to compress
graphic images and digitized voicewhere losses outside visual perception canbe tolerated.
4. Whatistheneed forCompression?
1. In termsofstorage, thecapacityofastoragedevicecanbeeffectivelyincreased with
methods that compress a body of data on its way to a storage device and decompress it
when it is retrieved.
2. In terms of communications, the bandwidth of a digital communication link can be
effectively increased by compressing data at the sending end and decompressing data at
the receiving end.
3. At any given time, the ability of the Internet to transfer data is fixed. Thus, if data can
effectively be compressed wherever possible, significant improvements of datathroughput
can be achieved. Many files can be combined into one compressed document making
sending easier.
5. Showthe blockdiagramofageneral compressionsystem model.

Source Channel Channel Channel Source


Encoder Encoder Decoder Decoder

Encoder Decoder
6. DefineRelativedataredundancy.
TherelativedataredundancyRDofthefirstdatasetcanbedefinedas
1
RD1
CR
n1
WhereCR,commonlycalledthe compressionratio, is CR 
n2
7. Whatarethe threebasicdataredundanciescanbeidentifiedandexploited?
Thethreebasicdataredundanciesthatcanbeidentifiedandexploitedare,
i) Codingredundancy
ii) Interpixelredundancy
iii) Phychovisualredundancy
8. Defineiscodingredundancy?
If the gray level of an image is coded in a way that uses more code words than
necessaryto represent each graylevel, then theresulting image is said to contain coding
redundancy.
9. Defineinterpixelredundancy?
The value of any given pixel can be predicted from the values of its neighbors. The
information carried by is small. Therefore the visual contribution of a single pixel to an
image is redundant. Otherwise called as spatial redundant geometric redundant or interpixel
redundant.
Eg:Runlengthcoding
10. Definepsychovisualredundancy?
In normal visual processing certain information has less importance than other
information. So this information is said to be psycho visual redundant.
11. Define encoder
Sourceencoderisresponsibleforremovingthecodingandinterpixelredundancy and
psycho visual redundancy.
Encoderhas2componentstheyare1.sourceencoder2.channelencoder
12. Definesource encoder
Sourceencoderperformsthreeoperations
1) Mapper -this transforms the input data into non-visual format. It reduces the
interpixel redundancy.
2) Quantizer - It reduces the psycho visual redundancyof the input images .This
step is omitted if the system is error free.
3) Symbol encoder- This reduces the coding redundancy.This is the final stage of
encoding process.
13. Definechannelencoder
The channel encoder reduces the impact of the channel noise by inserting redundant
bits into the source encoded data.
Eg:Hammingcode
14. Whatarethetypes ofdecoder?
1. Source decoder-hastwocomponents
a) Symboldecoder-Thisperformsinverseoperationofsymbol encoder.
b) Inversemapping-Thisperformsinverseoperationofmapper.
2. Channeldecoder-thisisomittedifthesystemiserror free.
15. Whatarethe basicimage datacompressiontechniques?

Imagedatacompressiontechniques

Pixel PredictureCoding TransformCoding Other


Coding Methods

PCM  Deltamodulation  ZonalCoding  HybridCoding


Run-lengthcoding  Line-by-lineDPLM  ThresholdCoding  Two-tonecoding
Bit-plane coding  2-DDPLM  Waveletcoding
 Adaptive  Vector
quantization
16. Whatismeant byError-free compression?
Error-free compression (or) lossless compression is the only acceptable means of
data reduction. Error free compression techniques generally are composed of two relatively
independent operations:
(1) Devising an alternative representation of the image in which its interpixel
redundancies
(2) Thecodingtherepresentationtoeliminatecodingredundancies.
17. Whatarethe techniquesthat arefollowedinlosslesscompression?
Thecodingtechniques thatarefollowedlosslesscompression.
(1) Variable–lengthcoding
(2) LZWcoding
(3) Bit-planecoding
(4) Losslesspredictivecoding.
18. Whatisuseofvariable-length coding?
The simplest approach to error-free image compression is to reduce only coding
redundancy to reduce this redundancy it is required to construct a variable-length code that
assigns the shortest possible code words to the most probable gray level. This is called as
variable length coding.
19. Whatarecodingtechniquesthatarefollowedinvariablelengthcoding?
Someof thecodingtechniquesthatare usedinvariable lengthcodingare
(1)Huffman coding(2)Arithmetic coding
20. Whatisrunlength coding?
Run-length Encoding or RLE is a technique used to reduce the size of a repeating
string of characters. This repeating string is called a run; typically RLE encodes a run of
symbols into two bytes, a count and a symbol.
RLE can compress any type of data regardless of its information content, but the
content of data to be compressed affects the compression ratio. Compression is normally
measured with the compression ratio.
An effective alternative to constant area coding is to represent each row of an image
(or) bit place by a sequence of lengths that describe successive runs of black and white
pixels. This technique referred to as run-length coding.

21. Definecompressionratio&bitrate
sizeofthecompressedfile C
Bitrate=  (bitsperpixel)
pixelsintheimage N

WhereCisthenumberofbitsinthecompressedfile,and N(=XY)isthenumberofpixels in the


image. If the bit rate is very low, compression ratio might be a more practical measure:

sizeoftheoriginalfile Nk
Compressionratio = 
sizeofthecompressedfile C

Wherekis thenumberof bitsperpixelin theoriginal image.


22. Whataretheoperationsperformedbyerrorfree compression?
1) Devisinganalternativerepresentationoftheimageinwhichitsinterpixelredundantare
reduced.
2) Codingtherepresentation toeliminatecodingredundancy

23. WhatisVariableLengthCoding?
Variable Length Coding is the simplest approach to error free compression. It
reduces only the coding redundancy. It assigns the shortest possible codeword to the most
probable gray levels.
24. DefineHuffman coding
1. Huffmancodingisapopulartechnique forremovingcodingredundancy.
2. WhencodingthesymbolsofaninformationsourcetheHuffmancode yieldsthe
smallest possible number of code words, code symbols per source symbol.
25. DefineBlockcodeandinstantaneouscode
Eachsourcesymbolismappedintofixedsequenceofcodesymbolsorcodewords.
Soitiscalledasblockcode.
A code word that is not a prefix of any other code word is called instantaneous or
prefix codeword.
26. Defineuniquelydecodablecode andB2code
A code word that is not a combination of any other codeword is said to be uniquely
decodable code.
Each code word is made up of continuation bit c and information bit which are
binary numbers. This is called B2 code or B code. This is called B2 code because two
information bits are used for continuation bits
27. Definearithmeticcoding
In arithmetic codingone to one corresponds between source symbols and code word
doesn’t exist where as the single arithmetic code word assigned for a sequence of source
symbols. A code word defines an interval of number between 0 and 1.
28. WhatisbitplaneDecomposition?
An effective technique for reducing an image’s interpixel redundancies is to process
the image’s bit plane individually. This technique is based on the concept of decomposing
multilevelimagesinto aseriesof binaryimages and compressingeachbinaryimage viaone of
several well-known binary compression methods.
29. DefineBit-plane Coding.
Oneof theeffective techniques for reducing an image’s interpixel redundancies is to
process the image’s bit plane individually. This techniques is called bit-plane coding is
based on the concept of decomposing a multilevel image into a series of binary image and
compressing each binary image.
30. DefineTransformcoding.
Compression techniques that are based on modifying the transform an image. In
transform coding, a reversible, linear transform is used to map the image into a set of
transform coefficients which are then quantized and coded.
31. Showthe blockdiagramofencoder& decoderoftransform coding.

Input Construct
Forward Symbol Compressed
MXn sub Quantizer
transform encoder Image
Image image

Compressed Symbol Inverse Merge Decompressed


Image decoder transform NXNimage Image

32. Definewavelet coding.


Wavelet coding is based on the idea that the coefficients of a transform that
decorrelates the pixels of an image can be coded more efficiently than the original pixels
themselves.
33. Whatismeant byJPEG?
The acronym is expanded as "Joint Photographic Expert Group". It is an international
standard in 1992. It perfectly Works with color and grayscale images, Many applications
e.g., satellite, medical, One of the most popular and comprehensive continuous tone, still
frame compression standard is the JPEG standard.
34. WhatarethecodingsystemsinJPEG?
1.A lossy baseline coding system, which is based onthe DCT and is adequate for mostcompression
application.
2. Anextendedcodingsystemforgreatercompression,higher precision
or progressive reconstruction applications.
3. Alosslessindependentcodingsystemfor reversible compression.
35. Whatare thebasicstepsinJPEG?
TheMajorSteps in JPEGCodinginvolve:
1. DCT(DiscreteCosineTransformation)
2.Quantization
3. ZigzagScan
4. DPCMonDC component
5. RLEonACComponents
6. EntropyCoding
36. WhatisMPEG?
The acronym is expanded as "Moving Picture Expert Group". It is an international
standard in 1992. It perfectly Works with video and also used in teleconferencing
37. DefineI-frame&P-frame&B-frame
I-frame is Intraframe or Independent frame. An I-frame is compressed
independentlyof all frames. It resembles a JPEG encoded image. It is the reference point
for the motion estimation needed to generate subsequent P and P-frame.
P-frameiscalledpredictive frame.A P-frameisthecompressed difference
betweenthecurrentframeandapredictionofitbasedonthepreviousIorP-frame B-frame
is the bidirectional frame. A B-frame is the compressed difference
betweenthecurrentframeandapredictionofitbasedonthepreviousIorP-frameor
nextP-frame.Accordinglythedecodermusthaveaccesstobothpastandfuturereference frames.
38. Whatiszigzag sequence?
Thepurposeofthe Zig-zag Scan: Togrouplow frequencycoefficientsintopof vector.
Maps8 x8 toalx64 vector
PARTB
1. Explaincompressiontypes
Now consider an encoder and a decoder as shown in Fig.. When the encoder receives the
original image file, the image file will be converted into a series of binary data, which is called
the bit-stream. The decoder then receives the encoded bit-stream and decodes it to form the
decoded image. If the total data quantity of the bit-stream is less than the total data quantity ofthe
original image, then this is called image compression.

Fig.Thebasicflowof image compressioncoding

1.Losslesscompressioncanrecovertheexactoriginaldataaftercompression.Itisused mainly for


compressing database records, spreadsheets or word processing files.
Thereisnoinformationloss,andtheimagecanbereconstructedexactlythesameasthe original
Applications:Medicalimagery

A. Theblockdiagramofencoder& decoderofLosslesscompression

Input
Source Symbol
Image encoder encoder Compressed
Image

Compressed
Symbol Source Decompressed
decoder decoder
Image Image

1. Sourceencoderisresponsibleforremovingthecodingandinterpixelredundancyand
psycho visual redundancy.
2. Symbolencoder-Thisreducesthecodingredundancy.Thisisthefinalstageof
encoding process.
Sourcedecoder-hastwocomponents
a) Symboldecoder-Thisperformsinverseoperationofsymbol encoder.
b) Inversemapping-Thisperformsinverseoperationofmapper.
LosslessCompression technique
Varaiblelengthcoding(Huffmann,arithmetic), LZW coding,Bit Planecoding,Lossless Predictive
coding

142
B. Theblockdiagramof encoder& decoderofLossycompression

Input
Mapper Quantizer Symbol Compressed
Image encoder Image

Compressed
Symbol Inverse Decompressed
decoder Dequantizer transform Image
Image

Lossycompressionwillresultinacertainlossofaccuracyinexchangefora
Substantialincreaseincompression.Lossycompressionismoreeffectivewhenusedto compressgraphic
images
1. Informationlossistolerable
2. Many-to-1mappingincompression eg.quantization
3. Applications:commercialdistribution(DVD)andrateconstrainedenvironmentwherelossless
methods can not provide enough compression ratio
1) Mapper-thistransformstheinputdataintonon-visualformat.Itreducesthe
interpixel redundancy.
2) Quantizer-Itreducesthepsychovisualredundancyoftheinputimages.Thisstepis omitted
if the system is error free.
3) Symbolencoder-Thisreducesthecodingredundancy.Thisisthefinalstageof
encoding process.
Sourcedecoder-hastwocomponents
a) Symboldecoder-Thisperformsinverseoperationofsymbolencoder.b)
Inverse mapping- This performs inverse operation of mapper.
Channeldecoder-thisisomittedifthesystemiserror free.
LossyCompression technique
Lossypredictvecoding(DPCM,Deltamodulation),Transformcoding,Wavelet coding.

2. ExplainindetailtheHuffmancodingprocedurewithanexample.(May/June2009), (May /
June 2006) (Variable length coding)

Huffman coding is based on the frequency of occurrence of a data item (pixel in images). The
principle is to use a lower number of bits to encode the data that occurs more frequently. Codes
are stored in a Code Book which may be constructed for each image or a set of images. In all
cases the code book plus encoded data must be transmitted to enable decoding.

143
Abottom-up approach

1. Initialization:PutallnodesinanOPENlist,keepitsortedatalltimes(e.g.,ABCDE).

2. RepeatuntiltheOPENlisthasonlyone nodeleft:

(a) FromOPENpicktwonodeshavingthelowestfrequencies/probabilities,createaparentnode of
them.

(b) Assignthesumofthechildren'sfrequencies/probabilitiestotheparentnodeandinsertitinto OPEN.

(c) Assigncode0,1tothetwobranchesof thetree, anddelete thechildrenfromOPEN.

SymbolCountlog(1/p) Code Subtotal(#of bits)

A 15 1.38 0 15
B 7 2.48 100 21
C 6 2.70 101 18
D 6 2.70 110 18
E 5 2.96 111 15

TOTAL(# ofbits):87
a) Huffmanncoding:
i) Orderthegivensymbols inthedecreasingprobability
ii) Combinethebottomtwoortheleastprobabilitysymbolsintoasinglesymbolthat
replaces in the next source reduction
iii) Repeattheabovetwostepsuntilthesourcereductionisleftwithtwosymbolsper
probability
iv) Assign‘0’tothefirstsymboland‘1’ tothe secondsymbol

144
v) Codeeachreducedsourcestartingwiththesmallestsourceandworkingbackto the
original source.
1. AverageInformationperSymbolor Entropy:
n n
H(S)piI(si)pilog2pi Bits/symbol
i1 i1
N

2. Averagelengthof thecodeis Lavg piLi


i1

H(s)
3. Efficiencyisgivenas  L
avg
th
Pi=probabilityofoccurrenceofthei symbol, Li =
length of the ithcode word,
N=numberofsymbols tobeencoded
Problem:ADMSxhasfiveequallylikelysymbolsP(x1)=p(x2)=P(X3)=p(x4)=P(x5)=0.2 construct the
Huffman code cu calculate the efficiency.

145
Xi p(xi) 0.4(m4+m5) 0.4(m2+m3)

X1 0.2m1 0.2m1 0.4(m4+m5)

X2 0.2m2 0.2m2 0.4

X3 0.2m3 0.2m3 m1
0
X4 0.2m4
1
X5 0.2m5

0.60(m1+m4+m5)

0.41(m2+m3)

Xi code Length

x1 00 2

x2 10 2

x3 11 2

x4 000 3

x5 001 3

H(x)=-Σ(5,i=1)p(xi)log(2)p(xi)
=-[(0.2log2(0.2)X5] H(x)
= 2.32

L=Σ(5,i=1) p(xi)ni
=(0.2)(2+2+2+3+3)
L=2.4
Therefore%q=H(x)/Llog2(M) =2.32/2.4log2(2) = 96.7%
PropertiesofHuffman coding:

146
1. Optimumcode fora givendata setrequirestwopasses.
2. CodeconstructioncomplexityO(N logN).
3. Fast lookuptablebasedimplementation.
4. Requiresatleastonebitper symbol.
5. Averagecodewordlengthiswithinonebitofzero-orderentropy(Tighterboundsare
known): H  R  H+1 bit
6. Susceptibletobit errors.

b) TheShannon-FanoAlgorithm

Algorithm:
1. Listthesource symbols inorder ofdecreasingprobability.

2. partition the set in to two sets that are close to equiprobables as possible and assign O to
theupper set, 1 to the loser set.

3. continue this process, each time partitioning the sets with as nearly equal probabilities as
possible until further portioning is not possible.
ExampleA DMS x has four symbols x1,x2,x3 cu x4 with P(x1) = 1/2 , P(x2) = ¼ and P(x3) =
P(x4) = 1/8 construct the Shannon-fano code for x./show that his code has the optimumproperty
that ni=I(xi) cu the code efficiency is 100 percent.

Xi p(xi) code

X1 0.5 0 1

X2 0.25 1 0 2

X3 0.125 11 0 3

X4 0.125 11 1 3

H(x)=Σ(4,i=1) p(xi)log(2)1/p(xi)

=p(x1)log(2)p(x1)+p(x2)log(2) p(x2)+p(x3)log(2) p(x3)+p(x4)log(2)p(x4)

=-[0.5log(2)0.5+ 0.25log(2)0.25+0.125log(2)0.125+0.125log(2)0.125]

=-[-0.5000 – 0.5000 – 0.3750 – 0.3750]

=-[-1.75]=1.75 bits/symbol.

147
L=Σ(4,i=1) p(xi)ni

=0.5(1)+0.25(2)+0.125(3)+0.125(3)

L=1.75

Q=H(x)/Llog(2)m= 1.75/1.75log(2)2=1

Thereforeq=100%

This isabasicinformationtheoreticalgorithm.Asimpleexamplewillbeusedtoillustratethe algorithm:

Symbol A B C D E

Count 15 7 6 6 5

EncodingfortheShannon-Fano Algorithm:

Atop-downapproach

1. Sortsymbolsaccordingtotheirfrequencies/probabilities,e.g., ABCDE.

2. Recursivelydivideintotwoparts,eachwithapprox.samenumberofcounts.

3. Describearithmeticcodingofimageswithanexample.(May/June2006)
Arithmetic Coding:
Basicidea:Mapinputsequenceof symbolsintoonesinglecodeword
Codeword is determined and updated incrementally with each new symbol (symbol-by-
symbolcoding)
Atanytime,thedetermined codeworduniquelyrepresentsallthepastoccurringsymbols.

148
Codeword is represented by a half-open subinterval [Lc,H]=[0,1].The half-open subintervalgives
the set of all codewords that can be used to encode the input symbol sequence, which consists of
all past input symbols. Any real number within the subinterval [Lc,Hc] can be assigned as the
codeword representing the past occurring symbols.
Algorithm:
Let
S={s0,…,s(N-1)}–sourcealphabet
pk= P(sk) – probability of symbol sk, 0 ≤ k ≤ ( N – 1 )
[Lc,Hc]-Intervalassignedtosymbolsk,where pk=Hsk-Lsk
 Thesubinterval limitscan becomputedas:

EncodingProcedure:

1. Codingbeginsbydividinginterval[0,1]intoNnon-overlappingintervalswith
lengths equal to symbol probabilities pk
2. Lc = 0; Hc=1
3. Calculatecodesubintervallength:length=Hc–Lc
4. Getnextinputsymbolsk
5. Updatethecodesubinterval
Lc= Lc+ length·Lsk
Hc=Lc+length·Hsk
6. RepeatfromStep3untilalltheinputsequence hasbeenencoded
Decodingprocedure:
1. Lc = 0; Hc=1
2. Calculatecodesubintervallength:length=Hc–Lc
3. Findsymbolsubinterval,0≤ k≤(N–1 )suchthat
4. Outputsymbol sk
5. Updatethecode subinterval
Lc= Lc+ length·Lsk
Hc=Lc+length·Hsk
6. RepeatfromStep2untillastsymbolisdecoded.
In order todetermine whentostopthe decoding:
"A specialend-of-sequence symbolcan beaddedtothesourcealphabet.
" If fixed-length block of symbols are encoded, the decoder can simply keep a count of
the number of decoded symbols
Example:

149
1.Constructcodewords usingarithmeticcodingforthesequences0,s1,s2,s3withprobabilities
{0.1,0.3,0.4,0.2}

Answer:

4. ExplainthelosslessBitplanecodingorshiftcoding Bit-
Plane Coding:
The concept of decomposing a multilevel image into a series of binary images and
compressing each binary image via one of the several well known binary compression methodsis
called as Bit plane coding.
Bit Plane Decomposition: An m-bit gray scale image can be converted into m binary images by
bit-plane slicing. These individual images are then encoded using run-length coding.Code the bit
planes separately, using RLE (flatten each plane row-wise into a 1D array), Golomb coding, or
any other lossless compression technique.
• LetIbeanimagewhere every pixelvalueisn-bitlong
• Expresseverypixelin binaryusingn bits

150
• Form n binary matrices (called bitplanes), where the i-th matrix consists of the i-th bits of
the pixels of I.
Example:LetIbe thefollowing2x2image wherethepixelsare3bits long
101110
111011

Thecorresponding3bitplanesare:
1 1 0 1 1 0
1 0 1 1 1 1
However, a small difference in the gray level of adjacent pixels can cause a disruption of the run
of zeroes or ones.
Eg: Let us say onepixel has agray level of 127 andthenextpixel has a gray level of128. In
binary: 127 = 01111111 & 128 = 10000000 .Here the MSB’s of the two binary codes for 127 and
128 are different, bit plane 7 will contain a zero-valued pixel next to a pixel of value 1, creating a
0 to 1 or 1 to 0 transitions at that point.
Thereforeasmallchange ingraylevelhasdecreasedtherun-lengthsinallthebit-planes.
GRAYCODE APPROACH
1. Graycodedimagesarefreeofthisproblemwhichaffectsimageswhichareinbinary format.
2. Ingraycodetherepresentationofadjacentgraylevelswilldifferonlyinonebit(unlike binary
format where all the bits can change).
3. Thuswhengraylevels127and128areadjacent,onlythe7thbitplanewillcontaina0to 1
transition, because the gray codes that correspond to 127 and 128 are as follows,
4. Ingraycode:
127 =01000000
128 =11000000
5. Thus,smallchangesingraylevelsare lesslikelytoaffectallmbitplanes.
6. Letgm-1…….g1g0representthegraycoderepresentationofabinarynumber.
7. Then:
giaiai1gm 0im2
1am1

Toconvertabinarynumberb1 b2b3..bn-1bntoitscorrespondingbinaryreflectedGraycode. Start at


the right with the digitbn.If the bn-1is 1, replace bnby 1-bn; otherwise, leave it unchanged.
Then proceed to bn-1.
Continueuptothefirstdigit b1,whichiskeptthesamesinceitisassumedtobeab0=0. The
resulting number is the reflected binary Gray code.

Example:

151
Dec Gray Binary

0 000 000
1 001 001
2 011 010
3 010 011
4 110 100
5 111 101
6 101 110
7 100 111
Decodingagraycodedimage:
TheMSBisretainedas such,i.e.,
aig i ai1am 0im2
gm1
1

5. ExplaintheRun-lengthCoding
Run-length Coding:
1. Run-lengthEncoding,orRLEisatechniqueusedtoreducethesizeofarepeatingstring of
characters.
2. Thisrepeatingstringiscalledarun,typicallyRLEencodesarunofsymbolsintotwo bytes , a
count and a symbol.
3. RLEcancompressany typeofdata
4. RLEcannotachievehigh compressionratioscomparedtoothercompression methods
5. It iseasytoimplementandisquicktoexecute.
6. Run-lengthencodingissupportedbymostbitmapfileformatssuchasTIFF,BMPand PCX
7. The most common approaches for determining the value of a run are (a) to specify the
valueofthefirstrunofeachrow,or(b)toassumethateachrowbeginswithawhiterun, whose run
length may in fact be zero.
8. Similarly,intermsofentropy,theapproximationrun–lengthentropy oftheimageis,
H H
H RL  0 1
L 0 L1
Where,L0andL1denotestheaveragevaluesofblackandwhiterunlengths,H0isthe entropy
of black runs, and H1 is the entropy of white runs.
9. Theaboveexpressionprovidesanestimateoftheaveragenumberofbitsperpixel
required to code the run lengths in a binary image using a variable-length code.
Example:
i.WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWW
WWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
RLEcoding:12W1B12W3B24W1B14W

152
ii) 1111100011111100000–RLEcoding-5W3B6W5B– 5365
iii) 0000011100–RLEcoding–5B3BW2B–532–0532(first‘0’indicatesstarting with
black)
6. ExplainTransformcoding.(May/June2009),(May/June2009)
Transform Coding
Herethecompressiontechniqueisbased onmodifyingthetransformofanimage.
Theblockdiagramofencoder& decoderoftransform coding.

Input Construct
Forward Symbol Compressed
MXn sub Quantizer
transform encoder Image
Image image

Compressed Symbol Inverse Merge Decompressed


Image decoder transform NXNimage Image

Explanation:
1. The NxN output image is subdivided into sub images of size nxn, which are then transformed
to generate (N/n)2sub image transformarrays each of size n x m.
2. Transformationisdonetodecorrelatethepixelsofeachsubimageortopackasmuch information as
possible into the smallest number of transform coefficients.
 Thefollowingtransformsareusedintheencoder blockdiagram
a. KLT
b. DCT
c. WHT
d. DFT
MostlyusedisDCTorDFT
3. Quantizationis done to eliminate the coefficients which carry least information. These omitted
coefficients will have small impacts on the quality of the reconstructed sub images.
4. Finally,thequantizedcoefficientsareencoded.
5. The decoder is used to extract the code words, which are applied to the dequantizer, which is
used to reconstruct the set of quantized transform coefficients.
6. Then the set oftransform coefficientsthat representsthe image isproduced fromthe quantized
coefficients.
7. These coefficients are inverse transformed and give the lossy version of the image. Here
thecompression ratio is low.
STEPS:
i. Subimagesizeselection:
Normally4x4,8,x,8and16x16imagesizesare selected
ii. TransformSelection:
Consideranimagef(x,y)ofsizeNxN,then thetransformedimageisgivenas,

153
Transformedimage=inputimagexTransformation function
N1N1
i.e.,
T(u,v)   f(x,y)g(x,y,u,v)
x0y0
where,g(x,y,u,v)=transform function
Theoriginalsignalatthe decoderisgivenas,
N1N1
f(x,y) T(u,v)h(x,y,u,v)
u0v0
-1
Whereh(x,y,u,v)=g (x,y,u,v)
a. IncaseofDFT:
uxvy
1 j2  
g(x, y,u,v)  e N
N2 uxvy
j2 
N
h(x,y,u,v)e
 

b. IncaseofWHT: 
 m1
1 [bi(x)pi(u)bi(y)pi(v)]
g(x,y,u,v)h(x,y,u,v) N (1)i0
m th
WhereN=2 , bk (z)isthe k bitfromrighttoleftinthebinary representationof z.

c. In caseofKL transform:
T
v *u
Where,u =input image
Φk=KthcolumnofEigenvectors V
= transformed image
d. IncaseofDiscreteCosineTransform(DCT)

2x1u  2y1v 
gx,y,u,vh(x,y,u,v)uvcos  cos 
 2N  2N 
where,  1
 foru0
u   N
 2

 N
foru1,2,...,N1
 1
 forv0
v   N
 2
 N forv1,2,...,N1
iii. BitAlloca tion:
Theoverallprocessoftruncating,quantizing,andcodingthecoefficientsofatransformedsub image
is commonly called bit allocation
a. Zonal coding
The process in which the retained coefficients are selected on the basis of maximum variance is
called zonal coding.

154
LetNtbethenumberoftransmittedsamplesandthezonalmaskisdefinedasanarraywhich takes the unity
value in the zone of largest Nt variances of the transformed samples.
i.e., 1,(k,l)It
m(k,l) 
0,else,
Here the pixel with maximum variance is replaced by 1 and a 0 in all other locations. Thus the
shape of the mask depends on where the maximum variances pixels are located. It can be of any
shape.
Thresholdcoding
Theprocessinwhichtheretainedcoefficientsareselectedonthebasisofmaximummagnitude is called
threshold coding.
1. Hereweencode theNtcoefficientsof largest amplitudes.
2. Theamplitudeofthe pixelsare takenandcomparedwiththethresholdvalue
3. Ifitisgreater thanthethresholdη,replaceitby1else by0.
Thresholdmaskmηisgivenby,
 1,(k,l) It
'
m(k,l)
where,I'  0,elsewhere  

t(k,l);V(k,l)

4. Thenthesamplesretainedarequantizedbyasuitableuniformquantizerfollowedbyan
entropy coder.
Therearethreebasicwaystothresholdatransformedsubimage.
a.Asingleglobalthresholdcanbeappliedtoallsubimages–herethelevelofcompression differs from
image to image depending on the number of coefficients.
b. Adifferentthresholdcanbeusedforeachsubimage–Thesamenumberofcoefficientsis
discarded for each sub image.
Thethresholdcanbevariedasafunctionofthelocationofeachcoefficientswithinthesub image.
Here,  T(u,v)
T(u,v) round 

Z(u,v) 

Z(0,0) Z0,1...
Z0,n1 
 
Z(1,0) ... ...
... 
Z 
 .... ... ... ...  
Z(n1,0) ... ... Z(n1,n1) 
  
Where, T(u,v)isathresholdandquantizedapproximationofT(u,v)andZ(u,v)isan
elementofthetransformnormalizationarray.
Thedenormalized arrayisgiven as,

T'(u,v)T(u,v)z(u,v)
Thedecompressed subimageisgivenas,
1
 '
T (u,v)

155
And  assumesinteger vaue kifandonlyif,
c c
T(u,v) kc T(u,v)kc
2 2

IfZ(u,v)>2T(u,v),then T(u,v) =0andthetransformcoefficient iscompletelytruncatedor
discarded.

7. DescribeontheWaveletcodingofimages.(May/June2009)orExplainthelossy
compression wavelet coding.

ENCODER

Input Construct
Wavelet Symbol Compressed
MXn sub Quantizer
transform encoder Image
Image image

DECODER

Compressed Symbol Merge Decompressed


Image decoder IWT NXNimage Image

Explanation:
1. Input image is applied to wavelet transform, which is used to convert the original input image
into horizontal, vertical and diagonal decomposition coefficients with zero mean and laplacian
like distribution.
2. These wavelets pack most of the information into a small number of coefficientsand the
remaining coefficients can be quantized or truncated to zero so that the coding redundancy is
minimized.
3. Runlength,huffmann, arithmetic,bitplanecodingareusedforsymbolencoding
4. Decoderdoes theinverseoperationof encoding
The difference between wavelet and transform coding is that the sub image processing is
not needed here.Wavelettransforms are computationally efficient and inherently local.
Waveletselection:
ThefourDiscretewavelertransformsare,
1. Haar wavelets – simplest
2.Daubechieswavelets–mostpopular
3. Symletwavelet
4. Bioorthogonal wavelet

156
Wavelets
Wavelets aremathematicalfunctions that cut up data into different
frequencycomponents,andthen study each component with a resolution matched to its scale.
Thesebasisfunctionsorbabywaveletsareobtainedfromasingleprototypewaveletcalledthe mother
wavelet, by dilations or contractions (scaling) and translations (shifts).
wavelet Transform
WaveletTransformisatypeofsignalrepresentationthatcangivethefrequencycontentofthe signal at
a particular instant of time.
1. Wavelettransformdecomposesasignalintoasetofbasisfunctions.
2. Thesebasisfunctionsarecalled wavelets
3. Waveletsareobtainedfromasingleprototypewavelety(t)calledmotherwaveletbydilations and
shifting:
1 tb
(t) ( )
a,b
a a
whereaisthescalingparameterandbistheshiftingparameter The 1-
D wavelet transform is given by :

Theinverse1-Dwavelettransformisgivenby:

WaveletanalysishasadvantagesovertraditionalFouriermethodsinanalyzingphysical
situations where the signal contains discontinuities and sharp spikes
Typesofwavelettransform
1. Thediscretewavelettransform
2. Thecontinuouswavelet transform

Inputsignal isfiltered and separatedintolowand high frequencycomponents

157
LL: Horizontal Lowpass& Vertical Lowpass , LH: Horizontal Lowpass& Vertical Highpass
HL:HorizontalHighpass&VerticalLowpass,HH:HorizontalHighpass&VerticalHighpass
Quantizer Design:
Thelargestfactoreffectingwaveletcodingcompressionandreconstructionerroriscoefficient quantization.
Theeffectivenessofthequantizationcanbeimprovedby,(i)introducinganenlarged
quantizationinterval aroundzero,called adeadzoneand(ii)adaptingthesizeofthe
quantization interval from scale to scale.
8. WritenotesonJPEGstandardwithneatdiagram.(May/June2009),(May /June 2006)
1. JPEG:Itdefinesthreedifferentcodingsystems:
1.Alossybaseline codingsystem, adequatefor mostcompressionapplications
2. Anextendedcodingsystemforgreatercompression,higherprecisionorprogressive
reconstruction applications
3. Alosslessindependent codingsystem forreversible compression
DetailsofJPEGcompressionAlgorithm
1) Level shifttheoriginalimage
2) Dividetheinputimageinto8x8 blocks
3) ComputeDCTforeachblock(matrix) (8x8)
4) Sortelementsofthe 8x8 matrix

5) Processoneblockatatimetogettheoutputvectorwithtrailingzeros
Truncated

158
Thequantizedcoefficient isdefinedas
F(u,v) 
F(u,v)Quantizationround    andthereverse theprocess
Q(u,v)  
can beachievedby

F(u,v)deQF(u,v)QuantizationQ(u,v)
6) DeleteunusedportionoftheoutputvectorandencodeitusingHuffman
Coding.
7) Storethesize,numberofblocksforuse inthedecoder

JPEGEncoderBlockDiagram

DetailsofJPEGDecompression Algorithm
1) Computethereverseorderfortheoutput vector
2) PerformHuffmandecodingnext.
3) Restore theorder ofthematrix
4) DenormalizetheDCTandperformblockprocessingtoreconstructthe
Original image.
5) Levelshiftback thereconstructedimage

JPEGDecoderBlockDiagram

159
2. JPEG2000

JPEG2000Encoder Algorithm:
a. ThefirststepoftheencodingprocessistoDClevelshiftthepixelsoftheimage by
subtracting 2m-1, where 2mis the number of gray levels of the image
b. Iftheinputimageisacolorimage,thenRGBvalueisconvertedintoYUVandthese
components are level shifted individually.
c. Aftertheimage hasbeenlevel shifted,itscomponents are dividedintotiles.
d. Tilesare rectangular arrays ofpixelsthatcontainthe samerelative portionofallthe
components.Tilecomponentisthebasicunitoftheoriginalorreconstructedimage.
e. Awavelettransformisappliedoneachtile.Thetileisdecomposedintodifferent
resolution levels.
f. The decomposition levels are made up of sub bands of coefficients that describe the
frequencycharacteristicsoflocalareasofthetilecomponents,ratherthanacrossthe entire
image component.
g. Thus1D-DWToftherowsandcolumnsof eachtilecomponent isthencomputed.
COMPRESSEDIMA
IMAGE( ENTROPY GE
8X8BLO FDWT ENCODER
QUANTIZER
CK)

TABLESPECIFICATION

Mainstructure ofJPEG2000encoder.
h. Thisinvolvessixsequential liftingandscalingoperations.
Y(2n1)X(2n1)[X(2n)X(2n2)],io32n1i13
Y(2n)X(2n)[Y(2n1)Y(2n1)],io22ni12
Y(2n1)Y(2n1)[Y(2n)Y(2n2)],io12n1i1 1
Y(2n)Y(2n)[Y(2n1)Y(2n1)],io2ni1Y(2n1)
 (k).Y(2n1),io 2n1i1
Y(2n)Y(2n)/K,io2ni1
X=input tilecomponent
Y=resultingtramnsformcoefficients
ioandi1=represent the positionofthetilescomponentwithinacomponent.

LiftingParameter:

α=-1.586134342, β =-0.052980118, γ=0.882911075and δ=0.433506852

160
Scalingparameter:

K=1.230174105
i. After the completion of scaling and lifting operations, the even indexed value Y(2n)
representstheFWTLPfilteredoutputandoddindexedvaluesofY(2n+1)correspondto the
FWT HP filtered output.
j. Thesubbandsofcoefficientsarequantizedandcollectedintorectangulararrays of“code
blocks..Thus after transformation, all coefficients are quantized.
k. Quantizationistheprocessbywhichthecoefficientsarereducedinprecision.Eachof the
transform coefficients ab(u,v) of the sub band b is quantized to the value qb(u,v)
according to the formula,

Where,Δb=quantizationstep size= 
2Rbb[1 b]
211
Rb=nominaldynamicrange ofsubbandb
εb,μb=numberofbitsallocatedtotheexponentandmantissaofthesubband’s coefficients.
l. EncodethequantizedcoefficientsusingHuffmann orarithmetic coding.

JPEG2000DecoderAlgorithm:

a. Decodethebitmodeledorarithmeticallybitstreams
b. Dequantizethecoefficients using,

(q(u,v)2 MN(u,v)
b b
). b, q(u,v)0

b b

qb  b
R(u,v)(q(u,v)2 MN(u,v)
b b
). b, q(u,v)0
b
 0, q(u,v)0
 161 b
Where , Rqb(u,v) =dequantizedtransformcoefficients

Nb(u,v) = number of decoded bit planes for q (u,v).


b

Nb=encoder wouldhaveencodedNbbitplanesfor aparticular subband.


ORIGINAL
IMAGE
DECODER DEQUANTIZER IDWT

TABLESPECIFICATION

MainstructureofJPEG2000decoder.

c. The dequantized coefficients are then inverse transformed by column and by row using
inverse forward wavelet transform filter bank or using the following lifting based
operations

X(2n)k.Y(2n),io32nio122n1i
X(2n1)(1/k).Y(2n1),i 3 12

X(2n)X(2n)[X(2n1)X(2n1)],io32ni13

X(2n1)X(2n1)[X(2n)X(2n2)],io22n1i12

X(2n)X(2n)[X(2n1)X(2n1)],io12ni11

X(2n1)X(2n1)[X(2n)X(2n2)],io2n1i1
d. PerformDClevel shiftingbyadding2 m-1
9. .BrieflydiscusstheMPEGcompressionstandard.(May/June2009)orExplainthe Video
compression standards.
VideoCompressionstandards:
Videocompressionisused forcompression ofmovingpicture frames.
Basedontheapplications, videocompressionstandards aregroupedintotwocategories,
(1) Videoteleconferencingstandards
(2) Multimediastandards
a. Videoteleconferencingstandards:

162
TheInternationalTelecommunicationUnion(ITU)hasanumberofvideoconferencing compression
standards such as, H.261, H.262, H.263 and H.320
1.H.261isusedtosupportfull motionvideotransmissionoverT1lines
2.H.263isdesignedfor very lowbitrate video intherange of10to30 Kbits/sec
3.H.320isusedforISND
b. MultimediaStandards
These are used for video on demand, digital HDTV broadcasting and image/video database
services.TheprincipalmultimediacompressionstandardsareMPEG-1,MPEG-2andMEPG-4
1. MEPG-1 is an entertainment quality coding standard for the storage and retrieval of video on
digital media such as CDROMs.It supports a bit rate of 1.5 Mbit/s.Thus it is used forcompression
of low resolution.
2. MPEG-2 is used for cable TV distribution and narrow channel satellite broadcasting with a bit
rate of 2 to 10 Mbit/s. Thus is used for higher resolution standards, mainly for studio quality
audio and video compression.
3. MPEG-4provides5and 64Kbit/sformobileand PSTNand upto4Mbit/sforTVandfilm
applications.
4. MPEG-4provides(a)improvedvideocompressionefficiency; (b)Contentbasedinteractivity and
(c) universal access including increased robustness.
MPEG Algorithm:
MPEG standard consists of both video and audio compression. The MPEG algorithm relies
ontwo basic techniques

Blockbasedmotioncompensation
DCT based compression
1. The video signal is sequence of still picture frames. From the picture, slices are formed in the
raster scan order as shown below,
2. For each slice the macro blocks are obtained. The macro block consists of four blocks of 8 x 8
pixels. Thus the micro block has a size of 16 x 16 pixels. If the macro block is in RGB format,
then it is converted into YCrCb format, where Cr and Cb represent chrominance signals. Oncethe
sequence of macro blocks is formed, coding can take place.
3. Themotion isestimated by predicting thecurrent frame on the basis ofcertain previous and/or
forwardframe. Theinformationsenttothedecoder consistsof thecompressed DCTcoefficients
oftheresidual blocktogetherwiththemotionvector.Thereare threetypesofpicturesinMPEG:
Intra-frames (I)
Predictedframes(P)
Bidirectionallypredictedframes(B)
Figuredemonstratesthepositionofthedifferenttypesofpictures.EveryNthframeinthevideo
sequenceis an I-picture, and every Mth frame aP-picture. Here N=12 andM=4. The rest of the
frames are B-pictures.

163
Forward Forward
prediction prediction

I B B B P B B B P B B B I

Bidirectional
prediction

Figure:InterframecodinginMPEG.
Compressionofthepicturetypes:
1. Intra frame (I –frame) are coded as still images by DCT algorithm. They provide access
points for random access, but only with moderate compression. It is used as the reference point
for the motion estimation.
2. Predicted frame (P-frame) are coded with reference to a past picture. The current frame is
predicted on the basis of the previous I- or P-picture. The residual (difference between the
prediction and the original picture) is then compressed by DCT.
3. Bidirectional frame (B-frame)is the compressed difference between the current frame and a
prediction of it based on the previous I- or P- frame and next P-frame. Thus the decoder must
have access to both he past and future reference frames. The encode frames are thereforerecorded
before transmission and the decoder reconstructs and displays them in the proper sequence.
Bidirectional pictures are never used as reference.
1. After the pictures are divided into 1616 macro blocks, each consisting of four 88 elementary
blocks, the DCT of the macro block is calculated whose coefficients are quantized.
Thechoice of thepredictionmethodischosenfor eachmacroblockseparately.
2. Theintra-codedblocks are quantizeddifferently fromthepredictedblocks:
Intra-coded blocks containinformation in all frequenciesand are quantizeddifferently fromthe
predicted blocks .The predicted blocks, contain mostly high frequencies and can be quantized
with more coarse quantization tables.
Motionestimationandcompensation:
1. Thepredictionblockinthereferenceframeisnotnecessarilyinthesamecoordinatesthanthe block in
the current frame.
2. Becauseofmotionintheimagesequence,themostsuitablepredictorforthecurrentblockmay exist
anywhere in the reference frame.
3. Themotionestimationspecifies wherethe bestprediction (bestmatch)isfound.
4. Motioncompensationconsistsofcalculatingthedifferencebetweenthereferenceandthe
current block.
5. FinallythequantizedDCTcoefficeintsarethenrun–lengthencodedinazig-zagorderand then
huffmann coded to compress the data.

164
6. Alsotheencoderisdesignedtogenerateabitstreamthatmatchesthecapacityoftheintended video
channel.This is done by using a rate controller which adjusts the quantization parameters as a
function of the occupancy of the output buffer.
7. Asthebufferbecomesfullerthequantizationismadecoarser,sothatfewerbitsstreaminto buffer.

Threebasictypesofencodedoutputframes:

1. Intraframe or independent frame (I-frame). An I frame is compressed independentlyof


all previous and future video frames. Of the three possible encoded output frames, it most
highly resembles a JPEG encoded image, Moreover, it is the reference point for the
motion estimation needed to generate subsequent P- and B-frames.

Rate
controller
Difference
+ Block Variable
DCT Quantizer Buffer
- lengthcoding
Encoded
Block

Inverse
Quantizer

Inverse
DCT

+ Encoded
Variable Motion
length
coding Vector

Motion estimator
and
compensator
W/framedelay

I- frames provide the highest degree of random access, ease of editing, and greatest
resistance to the propagation of transmission error. As a result, all standards require their
periodic insertion into the compressed code stream.

165
2. Predictive frame (P-frame). A P-frame is the compressed difference between thecurrent
frame and a prediction of itsbased on the previous I-or P-frame. The difference is formed
in the leftmost summer of fig. The prediction is motion compensated andtypically
involves sliding the decoded block in the lower part of fig. around its immediate
neighborhood in the current frame and computing a measure of correlation (such as the
sum of the square of the pixel-by-pixel differences). In fact, the process is often carried
out in subpixel increments (such as sliding the subimage ¼ pixels at a time), which
necessitates interpolating pixel values prior to computing the correlation measure. The
computedmotionvector isvariable length coded andtransmitted asan integral part ofthe
encoded data stream. Motion estimation is carried out on the macro block level.

3. Bidirectional frame (B- frame). A B- frame is the compressed difference between the
current frame and a prediction of it based on the previous I- or P- frame and next- P-
frame. Accordingly, the decoder must have access to both past and future reference
frames. The encoded frames are therefore reordered before transmission; the decoder
reconstructs and displays them in the proper sequence.
10. ExplaintheBasicsofVectorQuantizationindetail.
Definition:
Mapping of accurate data’s into inaccurate data’s is known as Quantization. If this procedure
isextended for vector data , then the procedure is called as Vector Quantization.
Vector Quantizationis a process which can map n-dimensional vectors inthe vector space R into a
finite set of vectors Y in the vector space R.
Y{yi,i1,2,3, ........ ,n}
Setof allcode wordsiscalledascode book

VectorQuantizationTransmitter:

1. Here,originalimageisdecomposedintondimensionalimagevectors,vectorscanbeblockof pixel
values or a 3-dimensional vector formed from the RGB color components.

166
2. Eachvectoriscomparedwithacollection ofrepresentativecode vectors,

Xi,i 1,2,3, ..... ,N c takenfromapreviouslygenerated codebook.
3. Bestmatchcode vectorischosenusingaminimumdistortion rule
  
-ChooseXksuchthatd(X,Xk)d(X,Xj),for..all..j1,2,3, ...................... ,Nc

denotesthedistortionincurred inreplacing theoriginalvectorXwiththecode vectorX
4. DistancemeasureisdoneusingsquareoftheEuclidean distance betweentwovectors
 1n 
2
d(X,X )  (x i xi)
n i1

xi=ithcomponentofthecodeword.
x=ith component oftheinput vector.

VQtransformsthevectors ofdataintoindexesthatrepresentsclustersof vectors

Voronoiregion isthenearestneighborregionassociatedwitheachcodewordYi.
Aftertheminimumdistortioncodevectorhasbeenfound,theindexkistransmittedusing log2Nc bits.
VectorQuantizationReceiver:
1. VQ decoder uses a duplicate codebook and a table lookup to reproduce the image
2.Compressionisobtainedbyusingacodebookwithrelativelyfewcodevectorscomparedtothe original
image vectors

167
Linde-Buzo-Gray(LBG)Algorithmisoneofthesuboptimalcodebookdesignprocedure Start
with:
1.asetof training vectors
2. initialcodebook
3. distortionmeasured
4. fractionaldistortionchangethreshold
Initialize:
1. iterationcounter lto1
2. averagedistortionover alltrainingvectors,D(0) toaverylargenumber
Based on the minimum euclidean distance, the input vector is attached to the code word and
averagedistortioniscomputed.Thenrevisethecodewordsbycomputingtheaverageofeach cluster.
Drawbacks:
Thesizeofthecodebookincreasesfor highercompressionratio’sand
thesearchtimerequiredtofind theminimaldistortioncode also increases.
Codebook Design:
Consideran8bitimage-Compressedto1bitperpixel,Ifn=4(2x2blocks),codebookshould contain
only 16 vectors,16 vectors will represent 2564 possible image vectors.
Ifblocksizeisincreasedto4x4,thecodebookis216codevectors,Thetotalnumberofvectorsis 25616
Resultingmean-squarequantizationerrorbecomessmallerastheblock size increases.
ThustheNumber ofcodebookvectorsincrease

11. ExplainSubbandcodingin detail

In sub band coding, the spectrum of the input is decomposed into a set of bandlimitted
components, which is called sub bands. Ideally, the sub bands can be assembled back to
reconstruct the original spectrum without any error. Fig. shows the block diagram of two-band
filter bank and the decomposed spectrum. At first, the input signal will be filtered into low pass
and high pass components through analysis filters. After filtering, the data amount of the lowpass
and high pass components will become twice that of the original signal; therefore, the low pass
and high pass components must be down sampled to reduce the data quantity. At the
receiver,thereceiveddatamustbeupsampledtoapproximatetheoriginalsignal.Finally,theup

168
sampled signal passes the synthesis filters and is added to form the reconstructed approximation
signal.
After sub band coding, the amount of data does not reduce in reality. However, the human
perception system has different sensitivity to different frequency band. For example, the human
eyes are less sensitive to high frequency-band color components, while the human ears is less
sensitive to the low-frequency band less than 0.01 Hz and high-frequency band larger than 20
KHz. We can take advantage of such characteristics to reduce the amount of data. Once the less
sensitive components are reduced, we can achieve the objective of data compression.

FigTwo-bandfilter bankforone-dimensionsubbandcodinganddecoding

NowbacktothediscussionontheDWT.Intwodimensionalwavelettransform,atwo-
dimensionalscalingfunction,(x,y),andthreetwo-dimensionalwaveletfunctionH(x,y),
V(x,y)andD(x,y),arerequired.Eachistheproductofaone-dimensionalscalingfunction
(x)andcorrespondingwaveletfunction(x).
(x,y)(x)(y) H(x,y)(x)(y)
V(x,y)(y)(x)D(x,y)(x)(y)
where Hmeasures variations along columns (like horizontal edges), Vresponds to variations
along rows (like vertical edges), andDcorresponds to variations along diagonals.
Similar to the one-dimensional discrete wavelet transform, the two-dimensional DWT can be
implemented using digital filters and samplers. With separable two-dimensional scaling and
wavelet functions, we simply take the one-dimensional DWT of the rows of f (x, y), followed by
the one-dimensional DWT of the resulting columns. Fig. shows the block diagram of two-
dimensional DWT
.

Fig.Theanalysisfilterbank ofthetwo-dimensionalDWT

169
Asintheone-dimensionalcase,imagef(x,y)isusedasthefirstscaleinput,andoutputfour
quarter-sizesub-imagesW, WH , WV,and WD asshowninthemiddleofFig.The
approximationoutputWH(j,m,n)
 ofthefilterbanksinFig.canbetiedtootherinputanalysis
filterbanktoobtainmoresubimages,producingthetwo-scaledecompositionasshowninthe left of Fig.
Fig. shows the synthesis filter bank that reverses the process described above.

Fig.Two-scaleoftwo-dimensional decomposition

Thesynthesisfilterbankofthetwo-dimensionalDWT

170
12. Explain the following terms 1.Bounary descriptors2. Regional
descriptors3.Texturedescriptors
I. SimpleDescriptors
Thefollowingarefewmeasuresusedassimpledescriptorsinboundary descriptors,
 Lengthof a boundary
 Diameterofaboundary
 Majorandminoraxis
 Eccentricity and
 Curvature
 Length of a boundary is defined as the number of pixels along aboundary.Eg.for
a chain coded curve with unit spacing in both directions the number of vertical
and horizontal components plus √2 times the number of diagonalcomponents
gives its exact length
 ThediameterofaboundaryBisdefined as
Diam(B)=max[D(pi,pj)]
D-distancemeasure
pi,pj-pointsonthe boundary
 The line segment connecting the two extreme points that comprise the diameter is
called the major axis of the boundary
 The minor axis of a boundary is defined as the line perpendicular to the
majoraxis
 Eccentricityoftheboundaryisdefinedastheratioofthemajortotheminor axis
 Curvatureistherateofchange of slope.
II. Shapenumber
 Shapenumberisdefinedasthefirstdifferenceofsmallest magnitude.
 Theorder nofashape numberis thenumberofdigitsinits representation.

171
III. FourierDescriptors
 Consider the following digital boundary and its representation as a complex sequence in
the xy plane

 It is seen that the boundary is depicted by the coordinate pairs such as


(x0,y0),(x1,y1),(x2,y2)….(xk-1,yk-1).
 Thustheboundaryisrepresentedasasequenceofcoordinatepairs, S(k)
= [x(k),y(k)]
 Alsoeachcoordinatepairisexpressedas acomplexnumber,
S(k)x(k)jy(k),k0,1,2 ............. K1

 TheDiscreteFourier transformofS(k)isgivenas,

1K1
a(u)  s(k)ej2uk/K,u0,1,2, .......... K1

Kk0

Thesecomplexcoefficientsa(u)arecalledtheFourierdescriptorsofthe boundary.
 TheInverseFouriertransformofthesecoefficientsrestores s(k)givenas,

172
K1
s(k) a(u)ej2uk/K,k0,1,2, ........ K1
u0

 InsteadofusingalltheFouriercoefficients,onlythefirstPcoefficientsareused. (i.e.,)
a(u) = 0, for u > P-1
Hencetheresultingapproximationisgivenas,
 P1

s(k)a(u)ej2uk/K,k 0,1,2, ......... K1


u0

 Thus,whenPistoolow,thenthereconstructedboundaryshapeisdeviatedfromthe original..
 Advantage:Itreducesa2Dto a1Dproblem.
 The followingshows the reconstructionof the objectusingFourier descriptors.Asthe value
of P increases, the boundary reconstructed is same as the original.

Basicproperties ofFourierdescriptors

IV. Statisticalmoments

173
 It is used to describe the shape of the boundary segments, such as the mean,
and higher order moments
 Considerthefollowingboundary segmentanditsrepresentationasa 1D function

 Let v be a discrete random variable denoting the amplitude of g and let p(vi)be
the corresponding histogram, Where i = 0,1,2,…,A-1 and A = the number of
discrete amplitude increments in which we divide the amplitude scale, then the
nth moment of v about the mean is , 
A1

n(v)(v i m)np(v),i0,1,2,
i ............... A1
i0

Wherem isthemeanvalueofvand,μ2isits variance,


A1

m v p(v )
i i
i0
 Another approach is to normalize g(r) to unit area and consider it as a histogram,
i.e.,g(r) istheprobabilityofoccurrenceof valuer iandthemomentsare given as, 
(v)(rm)ng(r),i0,1,2,.... K1
K1

n i
ii0

Where,
K1
m r g(r )
i0
i i

Kis thenumberofpointson theboundary.


 The advantage of moments over other techniques is that the implementation of
moments is straight forward and they also carry a ‘physical interpretation of
boundary shape’
Regionalandsimpledescriptors
ThevariousRegionalDescriptors areasfollows,
a) SimpleDescriptors
b) TopologicalDescriptors
c) Texture
Whichare explainedasfollows,
a) SimpleDescriptors
Thefollowingare fewmeasuresusedassimpledescriptorsinregiondescriptors
 Area

174
 Perimeter
 Compactness
 Meanandmedianofgraylevels
 Minimumandmaximumofgraylevels
 Numberofpixelswithvaluesaboveandbelowmean
 TheAreaofaregionisdefinedasthenumberofpixelsintheregion.
 ThePerimeterofaregionisdefinedasthelengthofitsboundary
 Compactnessofaregionisdefinedas(perimeter)2/area.Itisadimensionless quantity
and is insensitive to uniform scale changes.
b) TopologicalDescriptors
 Topologicalpropertiesareusedforglobaldescriptionsofregionsintheimage plane.
 Topology is defined as the study of properties of a figure that are unaffected
by any deformation, as long as there is no tearing or joining of the figure.
 Thefollowingarethetopologicalproperties
 Numberf holes
 Numberofconnected components
 Euler number
 EulernumberisdefinedasE=C– H,
Where,Cisconnectedcomponents H
is the number of holes
 TheEulernumbercanbeappliedtostraightlinesegmentssuchaspolygonal networks
 Polygonal networks can be described by the number of vertices V, the number of
edges A and the number of faces F as,
E =V– A+ F
 Considerthefollowingregionwithtwoholes

HereconnectedcomponentC=1
Number of holes H = 2
EulernumberE= C– H= 1– 2= -1
 ConsiderthefollowingletterBwithtwoholes

175
HereconnectedcomponentC=1
Number of holes H = 2
EulernumberE= C– H= 1– 2= -1

 ConsiderthefollowingletterA withonehole

HereconnectedcomponentC=1
Number of holes H = 1
EulernumberE= C– H =1 –1 = 0

c) Texture
 Texturerefersto repetitionofbasictextureelementsknownastexelsor texture
primitives or texture elements
 Textureisoneoftheregionaldescriptors.
 Itprovidesmeasures ofpropertiessuchassmoothness,coarsenessand regularity.
 Thereare3approachesusedtodescribethetextureofaregion. They
are:
• Statistical
• Structural
• Spectral
i. statistical approach
 Statistical approaches describe smooth, coarse, grainy characteristics of
texture. This is the simplest one compared to others. It describes texture
usingstatisticalmomentsofthegray-levelhistogramofanimageorregion.
 The followingare few measuresused as statisticalapproach in Regional
descriptors
 Letzbearandomvariabledenotinggraylevelsandletp(zi)bethe corresponding
histogram,
WhereI=0,1,2,…,L-1andL=thenumberofdistinctgraylevels,then the nth
moment of z about the mean is ,

176
L1

n(z) (z
i0
i
m)np(z),i0,1,2,
i ........ L1
Wheremisthemeanvalueof

zanditdefinestheaveragegraylevelofeachregion,isgivenas,
L1

m z p(z )
i0
i i

 Thesecondmomentisa measure ofsmoothnessgivenas,


1
R1 ,graylevelcontrast
12(z)
R=0for areasofconstantintensity,andR=1for large valuesof σ2(z)
 Thenormalizedrelativesmoothnessisgivenas,
1
R1
2(z)
1
(L1)2
 Thethirdmomentisameasure ofskewnessofthehistogramgivenas,
L1

3(z)(zi m)3p(z) i
i0

 Themeasure ofuniformityisgivenas,
L1
Up(z)2 i
i0
 Anaverageentropymeasureisgivenas,
L1

i)log2p(zi)
ep(z
i0
Entropyisameasure of variabilityandiszeroforconstantimage.
 The above measure of texture are computed only using histogram and have
limitation that they carry no information regarding the relative position of
pixels with respect to each other.
 In another approach, not only the distribution of intensities is considered but
also the position of pixels with equal or nearly equal intensity values are
considered.
 Let P be a position operator and let A be a k x k matrix whose element aijis the
number of times with gray level zioccur relative to points with gray level zi,
with 1≤i,j≤k.
 Let n be the total number of point pairs in the image that satisfy P.If a matrix
C is formed by dividing every element of A by n , then Cijis an estimate ofthe
joint probability that a pair of points satisfying P will have values (zi,zj).The
matrix C is called the gray-levelco-occurrence matrix.
ii. Structuralapproach
 Structuralapproachdealswiththearrangementofimageprimitives
such as description oftexture based on regularly spaced parallel
lines.
177
 This techniqueuses thestructure andinter relationshipamong components in
a pattern.
 Theblockdiagram ofstructuralapproachisshownbelow,

Primitive Grammar String


Input extraction Construction Generation Description
block

 The input is divided into simple subpatterns and given to the primitive
extraction block. Good primitives are used as basic elements to provide
compact description of patterns
 Grammar construction block is used to generate a useful pattern
description language
 Ifarepresentsacircle,thenaaa..meanscirclestotheright,sotheruleaS
allowsthegenerationofpictureasgivenbelow,

……………

 Somenew rulescanbe added,


S dA(dmeans‘circledown’)
A lA(lmeans‘circletotheleft’) A
l
A dA
S a
Thestringaaadlldaacangenerate 3x3matrixof circles.

iii. Spectralapproaches
 Spectral approach is based on theproperties of theFourier spectrum and is
primarily to detect global periodicity in an image by identifying high
energy, narrow peaks in spectrum.
 There are 3 features of Fourier spectrum that are useful for texture
description. They are:
 Prominentpeaksinspectrumgivestheprincipaldirectionof texture
patterns.
 Thelocationofpeaksinfrequencyplanegivesfundamental spatial
period of patterns.
 Eliminatinganyperiodiccomponentsbyourfilteringleaves

178
non-periodicimage elements
 The spectruminpolarcoordinatesaredentoedasS(r,θ),whereSis the spectrum
function and r andare the variables in this coordinate system
 Foreachdirectionθ,S(r,θ)maybeconsideredasa1DfunctionSθ(r,θ)
definedas

 Foreachdirectionr,S(r,θ)maybeconsideredasa1D functionSr(r,θ)defined as

 By varying above co-ordinates we can generate two 1D functions, S(r) and S(θ) , that
gives the spectral – energy description of texture for an entire image or region .

13. ExplainObjectRecognitionin detail

179
180
181
182
QUESTIONBANK

UNITI-DIGITALIMAGEFUNDAMENTALS
PartA
1. Whatismachbandeffect?(Nov/Dec2005),(May/June 2007)
2. Whatisabandlimitedfunction?(Nov/Dec 2005)
3. Whichtypeoflight receptorisresponsiblefor(a)photopic(b) scotopicvision?(May
/June2006)
4. Whatarethestagesofdigitalimageprocessingsystem? (May /June 2009)
5. Whatarethe applicationsof digitalimage processing?
6. WhatisWeber ratio?(May/June2009),(May/June 2007)
7. Defineintensityratiosandlogratios.(Nov/Dec 2005)
8. Whatisdigitalimage?
9. Explainthetermsilluminationandreflectanceforan image model?
10. Whatistheroleofpointspreadfunctioninimageprocessing?(May /June 2006)
11. Writethesignificanceofimagesamplingandquantization.(May/June 2009)
12. Whatarethepracticallimitationsinsamplingandreconstruction?(May/June 2006)
13. Statthecircular convolutiontheorem ofDFT.(May/June 2009)

183
14. Whataretheproperties ofunitary transform? (May/June 2009)
15. State2Dsampling theory.
16. Whatistheneedforquantization?
17. Stateandexplainthe convolutionpropertyofFourier transform?
18. Explainthetermsaliasingandfoldover frequencies?
19. Whatiscirculantmatrix?Giveanexample.
20. ExplainthedecorrelationpropertyofKLtransform.(May/June2006)
21. CompareSVDandKLtransform.(May/June 2009)
22. WriteNxNdiscretecosinetransform.(May/June2009)
23. DefinetheSVDtransform of images.
24. Whatis cosinetransform?
25. Whatisthespecialfeatureof KLtransform?
26. Defineunitary transform
27. Nametheworkingprincipleofdigitalcamera
28. Definedither
29. Namethecolormodels
30. Differentiatebrightnessand contrast
31. Differentiatehue andsaturation
32. GivetheHSImodel

Part-B
1. Explain about the element of digital image processing(May / June 2009) (May/
June 2007)
2. Explainthedifferentelementsofvisualperceptionindetail.(May /June 2009)
3. Illustratetheconcept ofBrightnessadaptation.(May/June2007)
4. Explainluminanceand brightness andcontrastwithrespecttohumanvision?
5. WriteshortnotesonNonuniformsamplingandQuantization.(May/June 2007)
6. DiscussindetailtheprocessofuniformsamplingandQuantization.(May/June 2007)
7. Statethepropertiesofoptimummeansquarequantizer.(Nov /Dec2005)
8. Describethepropertiesof2DFouriertransformanditsapplicationinimage processing.
(May/June 2009)
9. Discusstheeffectsofnonuniformsamplingandquantization.(May/June 2009)
10. Stateandprove 2Dsamplingtheorem.(May/June 2009)
11. DerivetheexpressionforthesignaltonoiseratioofLloydmaxquantizer. (May/June 2009)
12. State the condition for a matrix to be (1) unitary (2) orthogonal. Give an example of
a matrix which is both orthogonal and unitary. (May / June 2006)
13. Explainhowamatrixwhichisrepresentedusingsingularvaluedecomposition. (May /
June 2006)
14. Explaintheprincipleofvectorquantizationofimages.(May /June 2006)
15. ExplainWeber’s Law andLateral inhibitionwith reference to human visual system.
(May / June 2006)
16. DescribeLloydmaxquantizerforimagegiventheprobabilitydensityfunction? (May /
June 2006)
17. Explainanyfourproperties ofDFT.(Nov/Dec2005)

184
18. Explainthepropertiesof DCT.(Nov/Dec 2005)
19. Explainthe salientfeaturesofDCT.(May /June 2007)
20. FindtheDFT forthesetofvalues {1,0,1,2,0,0,1} (May /June2009)
21. Listthepropertiesof2D-DFT.(May /June2009) (May/June 2007)
22. Explain how the basis vector of KL transform of a N x 1 random vector is obtained.
(May / June 2006)
23. Explainaboutthestepsindigitalimageprocessing
24. Explaintheworkingprincipleofdigitalcamera(VIDICON)
25. WriteshortnotesonColorimagefundamentals
26. Explainaboutdither

UNITII-IMAGEENHANCEMENT
PartA
1. Whatismeantbyhistogramofadigitalimage?(May/June2006),(May/June 2009), (May /
June 2007)
2. ListtheuseofLPF,HPF andBPF spatialfilters. (May/June 2009)
3. Explainanyonetechniqueforzooming ofanimage.(May/June2006)
4. Whatisimageaveraging?
5. WritethetransferfunctionforButterworthfilter. (May/June2009)
6. Whatismeanbycontraststretching?(May/June 2009)
7. WhatisMedianFiltering?(May/June2009) (May/June2007)
8. Why the image enhancement is needed in image processing technique. (May / June
2009)
9. Ify(m) =(2,3,8,4,2)andN=(-1,0,1).Findthemedialfilter output.(Nov /Dec 2005)
10. Whatismeantbyhistogramspecification?
11. Whatare thesourcesof degradationinimage?
12. Whatispseudoinversefilter?
13. Explaintheimportance ofwiener filter?
14. Explaintheneedforsmoothingandsharpeningfiltering?
15. Definetheceptrumofa signal
16. Whatispseudoinverseoperator?
17. WhatisGeometricmeanfilter?
18. WhatisHarmonic meanfilter?
19. WhatisaContra harmonicmeanfilter?
20. WhatisColorimage enhancement?

Part-B

2. Explain how image subtraction and image averaging is used to enhance the
image.(May / June 2009)
3. Explainthevarioussharpeningfilters inspatialdomain.(May /June2009)
4. Discuss in detail the significance of Homomorphic filtering in image
enhancement.(May / June 2009) (May / June 2007)
5. Write short notes on Point operations, Transform operations and Pseudo
coloringwith respect to image enhancement. (May / June 2009) (May / June 2006)
6. Explainanytwospatialoperations.(May/June 2006)

185
7. WriteshortnotesonContraststretchingandGrey levelslicing.(May/June2009)
8. ExplainindetailaboutSharpeningfilter,EdgeDetection,Smoothingfilterand Noise
removal. (May / June 2009)
9. Whatishistogramofanimage?Howdoesitmodifyanimageinequalizationand
specification techniques? (May / June 2009)
10. ExplainEnhancementusingpointoperations.(Nov /Dec 2005)(May/June 2006)
11. WriteshortnotesonHistogramequalizationandHistogrammodification.(Nov/ Dec
2005) (May / June 2009) (May / June 2007)
12. Write short notes onDirectional Smoothing and color imageenhancement. (Nov /Dec
2005) (May / June 2006)
13. Explainhowahighpassfilteredimagecanbegeneratedusingalowpassfilter. (May / June
2006)
14. How is the digital negative of an image generated? Where is this used? (May / June
2006)
15. Discusstheroleofnonlinearfiltersinimage enhancement.(May/June 2007)
16. Explainanyonemethodofpseudocolorimageprocessing.(May/June2007)

17. WriteshortsnotesonGeometricmean,Harmonicmean,Contra harmonicmeanfilters

UNITIII-IMAGERESTORATION
PartA

1. Whatispseudoinverse?
2. WhatisBlindImageRestoration?(May/June 2009)
3. WhatisConstrainedRestoration?(May/June 2009)
4. Whatisspecklenoise?
5. Writethetransferfunctionofpseudoinverse filter.(May/June 2006)
6. Explainanytworeasonsforimage degradation.(May/June2006)
7. Whatarethe factorsthatinfluenceimagedegradation?(May /June 2009)
8. Distinguishbetweenimageenhancementandimagerestoration.(May/June2007)
9. Whatisinversefiltering?
10. Whatisthebasic equationusedfor constrainedrestoration?
11. DefineGeometric transformations
12. Whatare thespatialtransformations?
13. Differentiateunconstrained restorationandconstrainedrestoration
14. WhatismeantbyLagrangemultiplier?
15. ClassifyImagerestoration techniques.
16. Whatistheexpressionfor theerror measure forWeinerfilter?
17. Givetheexpressionfor WeinerfilteringandgiveitsothernamesforWeiner filter.
18. WhatisthePDFofGaussianNoise?
Part-B

1. Explainindetailthe constrainedleastsquaresrestoration.(May /June 2009)

186
2. Writenotesoninversefilteringasappliedtoimage restoration.(May/June 2009)
3. Givethedegradationmodel forcontinuousfunction.(May /June 2009)
4. With theaid of block diagram , describe thedigital imagerestoration
systemandexplain the image observation models
5. Explainindetailthe functionofWienerfilter.(May /June2009)
6. WriteshortnotesonInversefilterandPseudoinversefilter.(Nov /Dec 2005)
7. Write short notes on Wiener filter characteristics and Geometric mean filter. (Nov /
Dec 2005)
8. Derive the Weiner filter equation. Under what conditions does it become the pseudo
inverse filter? (May / June 2006)
9. Explain the image degradation model and various approaches of image restoration
technique. (May / June 2009)
10. ExplainConstrainedandUnconstrainedRestorationindetail.(May /June2009)
11. Describetheprincipleofwienerfiltering inimage Restoration.
12. Explainthemethodofremovalofblurcausedbyuniformlinear motion?
13. DiscussthedifferencesbetweenGeometrictransformationsandspatialtransformations
techniques?
UNITIV-IMAGESEGMENTATION
PartA

1. Howdoyoudetect isolatedpointsinanimage?(May/June 2009)


2. Whatismeant byEdgedetection?(May/June 2009)
3. DefineImage Segmentation(May /June2009)
4. Whatarethedifferent imagesegmentation techniques?
5. Whatarethetwoproperties thatare followed inimage segmentation?
6. Whatarethethreetypesof discontinuityindigitalimage?
7. Whatis edge?
8. Definezerocrossingproperty ofedge detection.
9. Whatismeantbygradientoperators?
10. DefineLaplacian.
11. Writeaboutlinkingedge points.
12. Howdoyoudetect isolatedpointsinanimage?(May/June 2009)
13. Whatistheroleofgradientoperator andlaplacianoperatorinsegmentation?
14. Whatare thetypesofthresholding?
15. Whatisglobal,Local anddynamicoradaptive threshold?
16. Defineregion growing?
17. Specify thestepsinvolvedinsplittingandmerging?
18. Whatismeantbyregion–Based segmentation?
19. Giveanapplicationsof segmentation
20. What isthemorphologicaloperation?
21. Whatiswatershedsegmentation?

Part-B

1. ExplainontheRegionbasedsegmentationtechniques.(May /June 2009)

187
2. Explainedge detection.
3. ExplainEdgelinkingandboundarydetection indetail
4. ExplainThresholdingindetail.
5. WriteshortnotesonRegiongrowingsegmentation.OrExplainRegionsplittingand Merging
(May / June 2009)
6. Explainsegmentationbymorphologicaloperationindetail
7. Explainwatersegmentation algorithmindetail
UNITV-IMAGECOMPRESSION
PartA
1. Whatisneedforimage datacompression? (May/June2009)
2. Listthetypesofcodinginimageprocessing.(May/June2009)
3. Listthebasictypesofdataredundancy.(May/June 2009)
4. Givethelosslesspredictivemodel.(May /June2009)
5. Give an example of a variable length encoder. What is its advantage? (May /
June2006)
6. What are the standards used for compressionof still images andimages with motion?
(May / June 2006)
7. Whatarethe advantagesofimagedatacompression?(May/June2009)
8. Mentionsomeimagedatacompressiontechniques.(May/June 2009)
9. What is the average length of code if the probability of symbols is given as {0.4, 0.3,
0.1, 0.1, 0.06, 0.04}? (Nov / Dec 2005)
10. Whatisknownasbitplanecoding? (May/June2007)
11. MentionthesignificantfeaturesofWavelettransform.(May /June 2007)
12. Defineentropy coding
13. Drawthegeneralblockdiagram foranimagecompression model
14. Whatis zonal coding?
15. StateHuffmancodingalgorithm
16. Whatisthebasic principleofimage compressioninspatialdomain?
17. Mentionanytwoimagecompression standards used?
18. Mentionthelimitationsofbitplanecoding.
19. Comparejpegandjpeg2000
20. ComparetheHuffmanandarithmetic coding
21. DefineShiftcodes

Part-B

1. Explainindetail the Huffman codingprocedure withan example.(May /June 2009),


(May / June 2006)
2. Describearithmeticcodingofimageswithanexample.(May/June 2006)
3. ExplainthePixelcodingwithexample.(May /June 2009)
4. Describeonthe Waveletcodingofimages.(May /June2009)
5. ExplainindetailthemethodofZonalandThresholdcoding.(May/June2009), (May / June
2006)
6. BrieflydiscusstheMPEGcompressionstandard.(May /June 2009)
7. Explainimagecompressionandhowitisachievedthroughwavelettransform.(May
/June2009)

188
8. Write notes on JPEG standard (jpeg and jpeg 2000)with neat diagram. (May / June
2009), (May / June 2006)
9. Apply Huffman coding procedure to the following message ensemble and determine
average length of encoded message and coding efficiency. The symbols
(x1,x2,x3,x4,x5,x6,x7,x8) are emitted with probabilities of
(0.22,0.2,0.18,0.15,0.08,0.05,0.02). (May / June 2009)
10. Explaintherunlengthcodingscheme.(May /June 2006)
11. Explaintheimagecompressionstandards
12. Whatare thebuildingblocksofanimageencoder? Statetheir function?
13. ExplainTransform coding.(May /June2009),(May/June 2009)
14. ExplainVectorQuantizationwithneat diagram
15. ComputetheHuffman’scodeandIBcodefollowinggrayleveldistribution.
levels(r)WW2W3W4W5W6

probabilityp(r)0.4 0.30.2 0.50.3 0.2

189

You might also like