Table Of ContentDigital Image Processing
SecondEdition
Instructorzs Manual
Rafael C. Gonzalez
Richard E. Woods
PrenticeHall
UpperSaddleRiver,NJ 07458
www.prenhall.com/gonzalezwoods
or
www.imageprocessingbook.com
ii
Revisionhistory
10 9 8 7 6 5 4 3 2 1
Copyright c1992 2002byRafaelC.GonzalezandRichardE.Woods
°
Preface
ThismanualcontainsdetailedsolutionstoallproblemsinDigitalImageProcessing,2nd
Edition. Wealsoincludeasuggestedsetofguidelinesforusingthebook,and discuss
theuseofcomputerprojectsdesignedtopromoteadeeperunderstandingofthesubject
matter. The notation used throughout this manual corresponds to the notation used in
thetext.
Thedecision of what material to cover in a course rests with theinstructor, and itde
pendsonthepurposeofthecourseandthebackgroundofthestudents. Wehavefound
that thecourseoutlines suggested herecanbecovered comfortably in thetime frames
indicatedwhenthecourseisbeingtaughtinanelectricalengineeringorcomputersci
encecurriculum. Ineach case,nopriorexposuretoimageprocessingisassumed. We
givesuggestedguidelinesforone semestercoursesattheseniorandfirst yeargraduate
levels.Itispossibletocovermostofthebookinatwo semestergraduatesequence.
Thebookwascompletelyrevisedinthisedition,withthepurposenotonlyofupdating
the material, but just as important, making the book a better teaching aid. To this
end, the instructor will find the new organization to be much more ›exible and better
illustrated. Althoughthebookisselfcontained,werecommenduseofthecompanion
web site, wherethe studentwill find detailedsolutions to theproblems markedwitha
starinthetext,reviewmaterial,suggestedprojects,andimagesfromthebook. Oneof
theprincipalreasonsforcreatingthewebsitewastofreetheinstructorfromhavingto
preparematerialsandhandoutsbeyondwhatisrequiredtoteachfromthebook.
Computer projects such as those described in the web site are an important part of
a course on image processing. These projects give the student hands on experience
with algorithm implementation and reinforce the material covered in the classroom.
Theprojects suggested at thewebsite canbeimplemented onalmost any reasonably
equippedmulti userorpersonalcomputerhavingahardcopyoutputdevice.
1
Introduction
Thepurposeofthischapteristopresentsuggestedguidelinesforteachingmaterialfrom
this book at the senior and first year graduate level. We also discuss use of the book
website. Althoughthebookistotallyself contained,thewebsiteoffers,amongother
things, complementary review material and computer projects that can be assigned in
conjunctionwithclassroomwork. Detailed solutions to allproblemsinthebook also
areincludedintheremainingchaptersofthismanual.
Teaching Features of the Book
Undergraduateprogramsthatofferdigitalimageprocessingtypicallylimitcoverageto
onesemester. Graduateprogramsvary,andcanincludeoneortwosemestersofthema
terial. Inthefollowingdiscussionwegivegeneralguidelinesforaone semestersenior
course, a one semester graduate course, and a full year course of study covering two
semesters. Weassume a 15 week program per semester with three lectures per week.
In order to provide›exibility for exams and review sessions, theguidelines discussed
inthefollowingsectionsarebasedonforty,50 minutelecturespersemester.Theback
ground assumed on the part of the student is senior level preparation in mathematical
analysis,matrixtheory,probability,andcomputerprogramming.
Thesuggestedteachingguidelinesarepresentedintermsofgeneralobjectives,andnot
as time schedules. There is so much variety in the way image processing material is
taughtthatitmakeslittlesensetoattemptabreakdownofthematerialbyclassperiod.
Inparticular,theorganizationofthepresenteditionofthebookissuchthatitmakesit
much easier than before to adopt significantly different teaching strategies, depending
oncourseobjectivesandstudentbackground. Forexample,itispossiblewiththenew
organizationtoofferacoursethatemphasizesspatialtechniquesandcoverslittleorno
transformmaterial. Thisisnotsomethingwerecommend,butitisanoptionthatoften
isattractiveinprogramsthatplacelittleemphasisonthesignalprocessingaspectsofthe
fieldandprefertofocusmoreontheimplementationofspatialtechniques.
2 Chapter1 Introduction
Thecompanionwebsite
www:prenhall:com=gonzalezwoods
or
www:imageprocessingbook:com
isavaluableteachingaid,inthesensethatitincludesmaterialthatpreviouslywascov
ered in class. In particular, the review material on probability, matrices, vectors, and
linearsystems,waspreparedusingthesamenotationasinthebook,andisfocusedon
areasthataredirectlyrelevanttodiscussions inthetext. This allows theinstructorto
assignthematerialasindependentreading,andspendnomorethanonetotallecturepe
riodreviewingthosesubjects. Anothermajorfeatureisthesetofsolutionstoproblems
markedwithastarinthebook. Thesesolutions arequitedetailed,andwereprepared
with the idea of using them as teaching support. The on line availability of projects
and digital images frees the instructor from having to prepare experiments, data, and
handouts for students. Thefact that most of theimages in the book are available for
downloadingfurtherenhancesthevalueofthewebsiteasateachingresource.
One Semester Senior Course
Abasicstrategyinteachingaseniorcourseistofocusonaspectsofimageprocessingin
whichboththeinputsandoutputsofthoseprocessesareimages.Inthescopeofasenior
course,thisusuallymeansthematerialcontainedinChapters1through6. Depending
oninstructorpreferences,wavelets(Chapter7)usuallyarebeyondthescopeofcoverage
inatypicalseniorcurriculum).However,werecommendcoveringatleastsomematerial
onimagecompression(Chapter8)asoutlinedbelow.
Wehavefoundinmorethantwodecadesofteachingthismaterialtoseniorsinelectrical
engineering, computer science, and other technicaldisciplines, thatoneof the keys to
successistospendatleastonelectureonmotivationandtheequivalentofonelecture
on review of background material, as the need arises. The motivational material is
provided in the numerous application areas discussed in Chapter 1. This chapter was
totally rewritten with this objective in mind. Some of this material can be covered in
class and therest assigned as independent reading. Background review should cover
probabilitytheory(ofonerandomvariable)beforehistogramprocessing(Section3.3).
Abriefreviewofvectorsandmatricesmayberequiredlater,dependingonthematerial
covered. Thereviewmaterialincludedinthebookwebsitewasdesignedforjustthis
purpose.
OneSemesterSeniorCourse 3
Chapter 2 should be covered in its entirety. Some of the material (such as parts of
Sections2.1and2.3)canbeassignedasindependentreading,butadetailedexplanation
ofSections2.4through2.6istimewellspent.
Chapter3servestwoprincipalpurposes. Itcoversimageenhancement(atopicofsignif
icantappealtothebeginningstudent)anditintroducesahostofbasicspatialprocessing
toolsusedthroughoutthebook. Foraseniorcourse,werecommendcoverageofSec
tions 3.2.1 through 3.2.2u Section3.3.1u Section 3.4u Section3.5u Section 3.6u Section
3.7.1,3.7.2(throughExample3.11),and3.7.3.Section3.8canbeassignedasindepen
dentreading,dependingontime.
Chapter4alsodiscussesenhancement,butfromafrequency domainpointofview. The
instructor has significant ›exibility here. As mentioned earlier, it is possible to skip
the chapter altogether, but this will typically preclude meaningful coverage of other
areas based on the Fourier transform (such as filtering and restoration). The key in
covering the frequency domain is to get to the convolution theorem and thus develop
atiebetweenthefrequencyandspatialdomains. Allthismaterialispresentedinvery
readable form in Section 4.2. |Light} coverage of frequency domain concepts can be
basedondiscussingallthematerialthroughthissectionandthenselectingafewsimple
filteringexamples(say,low andhighpassfilteringusingButterworthfilters,asdiscussed
inSections4.3.2and4.4.2). Atthediscretionoftheinstructor,additionalmaterialcan
include fullcoverageofSections 4.3and4.4. Itisseldompossibleto gobeyondthis
pointinaseniorcourse.
Chapter5canbecoveredasacontinuationofChapter4. Section5.1makesthisaneasy
approach. Then,itispossiblegivethestudenta|›avor}ofwhatrestorationis(andstill
keepthediscussionbrief)bycoveringonlyGaussianandimpulsenoiseinSection5.2.1,
andacoupleofspatialfiltersinSection5.3. Thislattersectionisafrequentsourceof
confusiontothestudentwho,basedondiscussionsearlierinthechapter,isexpectingto
seea moreobjectiveapproach. It is worthwhile to emphasizeat this point thatspatial
enhancement and restoration are the same thing when it comes to noise reduction by
spatial filtering. A good way to keep it brief and conclude coverage of restoration
is to jump at this point to inverse filtering (which follows directly from the model in
Section5.1)andshowtheproblemswiththisapproach. Then,withabriefexplanation
regarding the fact that much of restoration centers around the instabilities inherent in
inversefiltering,itispossibletointroducethe|interactive}formoftheWienerfilterin
Eq.(5.8 3)andconcludethechapterwithExamples5.12and5.13.
Chapter 6 on color image processing is a new feature of the book. Coverage of this
4 Chapter1 Introduction
chapteralsocanbebriefattheseniorlevelbyfocusingonenoughmaterialtogivethe
studentafoundationonthephysicsofcolor(Section6.1),twobasiccolormodels(RGB
andCMY/CMYK),andthenconcludingwithabriefcoverageofpseudocolorprocessing
(Section6.3).
Wetypicallyconcludeasenior courseby coveringsomeofthebasicaspects ofimage
compression(Chapter8). Interestonthistopichasincreasedsignificantlyasaresultof
theheavyuseofimages andgraphicsovertheInternet,andstudentsusuallyareeasily
motivatedbythetopic. MinimumcoverageofthismaterialincludesSections8.1.1and
8.1.2,Section 8.2,andSection8.4.1. Inthis limitedscope, it is worthwhile spending
one halfofalectureperiodfillinginanygapsthatmayarisebyskippingearlierpartsof
thechapter.
One Semester Graduate Course (No Background in DIP)
Themaindifferencebetweenaseniorandafirst yeargraduatecourseinwhichneither
group has formal background in image processing is mostly in the scope of material
covered,inthesensethatwesimplygofasterinagraduatecourse,andfeelmuchfreer
inassigningindependentreading. Inadditiontothematerialdiscussedintheprevious
section,weaddthefollowingmaterialinagraduatecourse.
Coverage of histogram matching (Section 3.3.2) is added. Sections 4.3, 4.4, and 4.5
are covered in full. Section 4.6 is touched upon brie›y regarding the fact that imple
mentationofdiscreteFouriertransformtechniquesrequiresnon intuitiveconceptssuch
as function padding. TheseparabilityoftheFourier transformshouldbecovered, and
mentionoftheadvantagesoftheFFTshouldbemade.InChapter5weaddSections5.5
through5.8. InChapter6weaddtheHSImodel(Section6.3.2),Section6.4,andSec
tion6.6. Aniceintroductiontowavelets(Chapter7)canbeachievedbyacombination
ofclassroomdiscussionsandindependentreading.Theminimumnumberofsectionsin
thatchapter are7.1, 7.2, 7.3,and7.5,withappropriate(butbrief)mention oftheexis
tenceoffastwavelettransforms. Finally,inChapter8weaddcoverageofSections8.3,
8.4.2,8.5.1(throughExample8.16),Section8.5.2(throughExample8.20)andSection
8.5.3.
If additional time is available, a natural topic to cover next is morphological image
processing (Chapter 9). Thematerial in this chapterbegins a transition from methods
whose inputs and outputs are images to methods in which the inputs are images, but
theoutputs are attributes aboutthoseimages, in thesensedefined in Section1.1. We
OneSemesterGraduateCourse(withBackgroundinDIP) 5
recommendcoverageofSections9.1through9.4,andsomeofthealgorithmsinSection
9.5.
One Semester Graduate Course (with Background in DIP)
Someprograms haveanundergraduatecourseinimageprocessingasaprerequisiteto
agraduatecourseonthesubject. Inthiscase,itispossibletocovermaterialfromthe
firstelevenchaptersofthebook. Usingtheundergraduateguidelinesdescribedabove,
we add the following material to form a teaching outline for a one semester graduate
coursethathasthatundergraduatematerialasprerequisite.Giventhatstudentshavethe
appropriatebackgroundonthesubject,independentreadingassignmentscanbeusedto
controltheschedule.
Coverageofhistogrammatching(Section3.3.2)isadded.Sections4,3,4.4,4.5,and4.6
are added. This strengthens the studentzs background in frequency domain concepts.
A more extensive coverage of Chapter 5 is possible by adding sections 5.2.3, 5.3.3,
5.4.3,5.5,5.6,and5.8. InChapter6weaddfull colorimageprocessing(Sections6.4
through6.7). Chapters7and8arecoveredasintheprevioussection. Asnotedinthe
previoussection,Chapter9beginsatransitionfrommethodswhoseinputsandoutputs
are images to methods in which the inputs are images, but the outputs are attributes
about thoseimages. Asa minimum, werecommend coverageofbinary morphology:
Sections 9.1 through 9.4, and some of the algorithms in Section 9.5. Mention should
be made aboutpossible extensions to gray scale images, but coverage of this material
maynotbepossible,dependingontheschedule.InChapter10,werecommendSections
10.1,10.2.1and10.2.2,10.3.1through10.3.4,10.4,and10.5. InChapter11wetypically
coverSections11.1through11.4.
Two Semester Graduate Course (No Background in DIP)
Afull yeargraduatecourseconsistsofthematerialcoveredintheonesemesterunder
graduatecourse,thematerialoutlinedin theprevious section,andSections 12.1,12.2,
12.3.1,and12.3.2.
Projects
Oneofthemostinterestingaspectsofacourseindigitalimageprocessingisthepictorial
Description:Digital Image Processing Second Edition Instructorzs Manual web site, where the student will find detailed solutions to the problems marked with a