of 78
7/17/2019 DIP Chapter (3)
1/78
Mohammed Dwikat CIS 133381 Multimedia II
3.1 Background
Specific applicationpro!lem oriented"rial and error i# nece##ar$
Spatial domain will !e denoted !$ the e%pre##ion
g&%'$()"*f&%'$(+' refer# to the aggregate of pi%el# compo#ingan image
"he #imple#t form of ", #)"&r(
Contra#t #tretching, &-ig. 3. &a((
"hre#holding function, !inar$ image &-ig. 3.(Ma#k# &filter#' kernel#' template#' window#(
/nhancement , ma#k proce##ing or filtering
Image Enhancement in the Spatial Domain
http://www.najah.edu/7/17/2019 DIP Chapter (3)
2/78
Mohammed Dwikat CIS 133381 Multimedia II
Contrast stretching,darkening the le0el#
!elow m and !rightening the le0el# a!o0e m in
the original image
"hre#holding, mapping pre0io#l$
http://www.najah.edu/7/17/2019 DIP Chapter (3)
3/78
Mohammed Dwikat CIS 133381 Multimedia II
3. Some gra$ le0el tran#formation#
"hree !a#ic t$pe# of function# u#ed for image
enhancementinear
logarithmic
2owerlaw
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
4/78
Mohammed Dwikat CIS 133381 Multimedia II
3..1 Image negati0e#
I# o!tained !$ u#ing the negati0e tran#formation s=L-1-r
2roduce# the e4ui0alent of a photographic negati0e Suited for enhancing white or gray detail embedded in dark regionsof an image
)5 denote# the link
S)1rS &6( )516)7
S &3( )513)1
S &( )51)
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
5/78
Mohammed Dwikat CIS 133381 Multimedia II
3.. og tran#formation#
"he general form of the log tran#formation , #)clog&1r(
/%pand the 0alue# of dark pi%el# while compre##ing the high
le0el 0alue#
Compre## the d$namic range of image# with large 0ariation#
3..3 2owerlaw tran#formation
"he !a#ic form,
9amma9amma correctionC:" de0ice ha0e an inten#it$to0oltage re#pon#e that i# a
power function
2roduce image# that are darker than intended
Is important if displaying an image accurately on acomputer screen
crs=
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
6/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial DomainImage Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
7/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
8/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
9/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
10/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
11/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
12/78Mohammed Dwikat CIS 133381 Multimedia II
ow r, wa#hout in the !ackground &-ig. 3.8 r )7.3(
;igh r, enhance a wa#hout appearance &-ig. 3.< r )5.7 area# are toodark(
3.2.4 Piecewise-linear transformation functions =d0antage, the form of piecewi#e function# can !e ar!itrar$
comple% o0er the pre0iou# function#
Di#ad0antage, re4uire con#idera!l$ more u#er input Contrast stretching
>ne of the #imple#t piecewi#e function Increa#e the d$namic range of the gra$ le0el# in the image
= t$pical tran#formation, control the #hape of the tran#formation
r1)r #1)7 and #)1
Gray level slicing
;ighlight a #pecific range of gra$ le0el# Di#pla$ a high 0alue for all gra$ le0el# in the range of intere#t and a
low 0alue for all other gra$ le0el# , produce a !inar$ image
Brighten the de#ired range of gra$ le0el#' !ut pre#er0e# the!ackground and gra$ le0el tonalitie# &-ig. 3.11(
"he higher order !it# &e#peciall$ the top four( contain the ma?orit$ of
the 0i#uall$ #ignificant data
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
13/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
14/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
15/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
16/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
17/78Mohammed Dwikat CIS 133381 Multimedia II
Bitplane #licing
;ighlight the contri!ution# made to total image
appearance !$ #pecific !it#
higher order !it# contain the ma?orit$ of the 0i#uall$
#ignificant !it#
Separating a digital image into it# !it plane i# #uita!le
for anal$@ing the relati0e importance pla$ed !$ each !it
of the image
A#eful for image decompo#ition
"he !inar$ image for !itplane like a thre#holding
function
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
18/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
19/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
20/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
21/78Mohammed Dwikat CIS 133381 Multimedia II
3.3 ;i#togram proce##ing ;i#togram of a digital imagethe gra$ le0el# in the range*7'
1+ "he #um of all component# of a normali@ed hi#togram i# e4ual to 1
ow contra#t, a narrow hi#togram' a dull' wa#hout gra$ look
;igh contra#t , co0er a !roader range of the gra$ #cale and the di#tri!utionof pi%el# i# not too far uniform' with 0er$ few 0ertical line# !eing muchhigher than the other#
= great deal of detail# and high d$namic range3.3.1 ;i#togram e4uali@ation &;i#togram lineari@ation(
;i#togram of S)" &r( 7r1 2roduce a le0el # for e0er$ pi%el 0alue in the original image' the
tran#formation #ati#fie# the following condition#,
&1( "&r( i# #ingle0alued and monotonicall$ increa#ing in theinter0al
7r1 and
&( 7" & r ( 1 for 7r1
r )"1( 7#1
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
22/78Mohammed Dwikat CIS 133381 Multimedia II
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
23/78Mohammed Dwikat CIS 133381 Multimedia II
"he goal of thi# operationproduce an outputimage that ha# a uniform hi#togram
"he re#ult# are predica!le and the method i# #impleto implement
2ro!a!ilit$ den#it$ function continuou#
-or di#crete 0alue#, pro!a!ilit$ and #ummationin#tead of den#it$ function#, 2r&rk(& the di#crete0er#ion of the tran#formation function Spread the hi#togram of the input image #o that the
le0el# of the hi#togram
/4uali@ed image will #pan a fuller range
"he re#ult# are predica!le' and the method i# ea#$to implement automaticall$
7 7
& ( & ( 7 1 7'1 ...' 1k k
j
k k r j k
j j
ns T r p r r k L
n= == = = =
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
24/78Mohammed Dwikat CIS 133381 Multimedia II
"o enhance the contra#t of a monochrome image
Con#truct a hi#togram of the gre$ le0el# pre#ent 5 !in# repre#enting 7 through 55
/ach !in i# the num!er of pi%el# with that gre$ le0el
:emap the gre$ le0el# #o that the hi#togram i# &roughl$( flat "o en#ure that e0er$ collection of E ad?acent !in# ha# the #ame pi%el
count,
=ll pi%el# within one !in in the input image will !e within one&po##i!l$ different( !in in the output image. "hat i#' two pi%el# withe4ual gre$ le0el in the input image will ha0e e4ual gre$ le0elin theoutput image.
-or #ome ade4uatel$ #mall 0alue of E &i.e.,at #ome ade4uatel$ fine#cale(' collection# of E ad?acent !in# will not ha0e the #ame pi%elcount.
"he pi%el# mu#t !e dithered to e4uall$ fill all !in#' including tho#ethat would not ha0e had an$ pi%el# at all. Eote that dithering add# a&p#eudo( random 0alue to the pi%elF# gre$ le0el.
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
25/78Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
26/78Mohammed Dwikat CIS 133381 Multimedia II
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
27/78Mohammed Dwikat CIS 133381 Multimedia II
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
28/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
29/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
30/78
Mohammed Dwikat CIS 133381 Multimedia II
3.3. ;i#togram matching pecification(
/nhancement !a#ed on a uniform hi#togram i# not the !e#t
approach It i# u#eful #ometime# to #pecif$ the #hape of the hi#togram that we wi#h to
ha0e
9enerate a proce##ed image that ha# a #pecified hi#togram Suita!le for interacti0e image enhancement
Difficult$!uild a meaningful hi#togram
"he #malle#t integer in the inter0al *7'1+ #uch that
"he procedure for hi#togram matching &2age
7/17/2019 DIP Chapter (3)
31/78
Mohammed Dwikat CIS 133381 Multimedia II
"wo pi%el# with e4ual gre$ le0el in the input image will not
nece##aril$ ha0e e4ual gre$ le0el in the output image. :emappingwithout dithering #eem# the mo#t appropriate
for #cientific data
Impro0e the 0i#ual information a# mu#t a# po##i!le
without intentionall$ adding randomne##.3.3.3 Local Enhancement
/nhance detail# o0er #mall area# in the neigh!orhood of
e0er$ pi%el in the image
ocal hi#togram e4uali@ation
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
32/78
Mohammed Dwikat CIS 133381 Multimedia II
inear or nonlinear tran#formation
Ba#ed on gra$ le0el di#tri!ution around the neigh!orhood of a pi%el&con0olution ma#k(
Define a #4uare or rectangular neigh!orhood and mo0e the centerof the area
=t each location' the hi#togram of the point# in the neigh!orhoodi# computed
= hi#togram e4uali@ation or #pecification function i# o!tained
"hi# function i# u#e to map the gra$ le0el of the pi%el centered inthe neigh!orhood
"he center of the neigh!orhood i# then mo0ed to an ad?acent pi%el
A#e 0er$ little a priori knowledge a!out the image content#
"he choice of the tran#formation' #i@e' and #hape of the neigh!orhooddepend# on the #i@e of o!?ect#
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
33/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
34/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
35/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
36/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
37/78
Mohammed Dwikat CIS 133381 Multimedia II
3.3.4 Use of histogram statistics for image enhancement
Use statistical parameters obtaine from the histogram
/#timate of occurrence of gra$ le0el ri "he nth moment of r a!out the mean i# defined a#
9lo!al mean and 0ariance ' local mean and 0ariance
"he mean 0alue of the pi%el in S%$ i#
"he gra$ le0el 0ariance of the pi%el# in the region i# gi0en !$
"he local mean i# a mea#ure of a0erage gra$ le0el
"he 0ariance i# a mea#ure of contra#t
A#ing ocal mean and 0ariance i# fle%i!le and depend# on image
appearance
(&(&(&1
7
=
=L
i
i
n
in rpmrr
=
xy
xy
Sls
tstsS rprm('&
'' (&
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
38/78
Mohammed Dwikat CIS 133381 Multimedia II
Continue
! "nhance low contrast of an area
Con#ider the pi%el at a point (x,y)a# a candidate for proce##ing
if
determine whether the contra#t if an area make# it a candidate forenhancementif
= #ummar$ of the enhancement
= otherwi#e('&
kandMkif('&
('&
.197
yxf
DkDmyxfE
yx
GSGS xyxy
GmS !km xy
GS Dkxy .
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
39/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
40/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
41/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
42/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
43/78
Mohammed Dwikat CIS 133381 Multimedia II
3.4 "nhancement using arithmetic#logic
operations
$mage subtraction%g&'(y)*f&'(y)-h&'(y) +as,ing
i# referred to a# :>I ®ion of intere#tregion of intere#t( proce##ing I#olate an area for proce##ing
rithmetic operations =ddition,
Su!traction,
Multiplication, u#ed to implement gra$le0el rather than !inar$
Di0i#ion,
ogic operations =nd, u#ed for ma#king &-ig. 3.(
>r,u#ed for ma#king
Eot operation, negati0e tran#formation
=l#o are u#ed in con?unction with morphological operation#
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
44/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
45/78
Mohammed Dwikat CIS 133381 Multimedia II
3.4./ $mage subtraction 0he ifference between two images f&'(y) an h&'(y) is
e%pre##ed a# g&%'$()f&%'$(h&%'$(
"nhance the ifference of two images Contra#t #tretching tran#formationu#eful for e0aluating the effect of
#etting to @ero the lowerorder plane# &-ig. 3.8&d((
Ma#k mode radiograph$ &-ig 3.
7/17/2019 DIP Chapter (3)
46/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
47/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
48/78
Mohammed Dwikat CIS 133381 Multimedia II
5euce the noise content by aing a set of noise images6gi&'(y)7
n image is forme by averaging 8 ifferent noisy images =# k increa#e#' the 0aria!ilit$ of the pi%el 0alue# at each location &%'$(
decrea#e#
"he image gi&%'$( mu#t !e regi#tered in order to a0oid the introduction of
!lurring
A#e integrating capa!ilitie# of CCD or #imilar #en#or# for noi#e reduction
!$ o!#er0ing the #ame #cene o0er long period# of time3. 9asics of spatial filtering
Su!image, &filter' ma#k' kernel' template or window(
-re4uenc$ domain,
Spatial domain
inear #patial filtering, i# gi0e !$ a #um of product# of the filtercoefficient# :)
In general' linear filtering of an image with a filter ma#k of #i@e M%E i#gi0en !$ g&%'$(
Con0ol0ing a ma#k with an image !$ pi%el!$pi%el !a#i#
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
49/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
50/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
51/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
52/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
53/78
Mohammed Dwikat CIS 133381 Multimedia II
3. Smoothing #patialfilter#
A#ed for !lurring and for noi#e reduction
Blurring i# u#ed for remo0al of detail and !ridging of#mall gap# in line# or cur0e#
3.6.1 Smoothing linear flters =0eraging filter &low pa## filter(
:eplace the 0alue of e0er$ pi%el !$ the a0erage of thegra$ le0el# in the neigh!orhood !$ the filter ma#k
:educe #harp tran#ition uch a# random noi#e(
Blur edge#
"he a0erage of the gra$ le0el# in the 3%3 neigh!orhood#
=0eraging with limited data 0alidit$ onl$ to pi%el# in the original image in a predefined inter0al of
in0alid data
>nl$ if the computed !rightne## change of a pi%el i# in #omepredefined inter0al
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
54/78
Mohammed Dwikat CIS 133381 Multimedia II
eighted a0erage &-ig. 3.36(
Blur an image for the purpo#e getting a gro## repre#entation ofo!?ect# of intere#t
"he inten#it$ of #maller o!?ect#!lend#with the !ackground andlarger o!?ect# !ecome J!lo!likeKand ea#$ to detect &-ig. 3.3(
3.:./ ;rer 1tatistics filters &ran, filters)
7/17/2019 DIP Chapter (3)
55/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
56/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
57/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
58/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
59/78
Mohammed Dwikat CIS 133381 Multimedia II
3.= 1harpening spatial filter
;ighlight fine detail or enhance detail
/nhance detail that ha# !een !lurred =pplication ranging from electronic printing and medical
imaging to indu#trial in#pection
Can !e accompli#hed !$ digital differentiation
3.=./ >ounation
Sharpening filter !a#ed on fir#t and #econdorderderi0ati0e#
Definition of fir#t deri0ati0e# Mu#t !e @ero in flat #egment
Mu#e !e non@ero at the on#et of a gra$ le0el #tep or ramp Mu#t !e non@ero along the entire ramp &thick edge(
Eature of fir#t Deri0ate
2roduce JthickK edge#
;a# a #trong re#pon#e to gra$le0el #tep
& 1( & (f
f x f xx
= +
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
60/78
Mohammed Dwikat CIS 133381 Multimedia II
?efinition of secon erivatives is better suite thanthe first-erivative for image enhancement
Mu#t !e @ero in flat area# Mu#e !e non@ero at the on#et and endof a gra$ le0el
#tep or ramp
Mu#t !e @ero along ramp# of con#tant #lope
Eature of a #econd order deri0ate 2roduce# finer edge#
/nhance fine detail&including noi#e(much more than a fir#torder deri0ate
for e%ample, a thin line
"he re#pon#e at an i#olated pointi# #tronger than fir#t Der.
;a# a tran#ition form po#iti0e !ack to negati0e 2roduce a dou!le re#pon#e to a gra$le0el #tep
@ighlight the funamental similarities an ifferencesbetween first- an secon- orer erivatives &>ig.3.3A)
& 1( & 1( & (
f
f x f x f xx
= + +
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
61/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
3 = 2 Use of secon erivatives for enhancement 0he
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
62/78
Mohammed Dwikat CIS 133381 Multimedia II
3.=.2 Use of secon erivatives for enhancement !0he
aplacian
Con#i#t# of defining a di#crete formulation of the #econd
deri0ati0e and then con#truct a filter ma#k I#otropic filter &rotation in0ariant(,independent of the direction
of the di#continuitie# in the image
?evelopment of the metho &aplacian)
I# the #imple#t i#otropic deri0ati0e operator &linear operator( = function of f&%'$( of two 0aria!le# i# defined a#
-ilter ma#k u#ed to implement the aplacian &-ig. 3.3
7/17/2019 DIP Chapter (3)
63/78
Mohammed Dwikat CIS 133381 Multimedia II
Continue
0o overcome the shortcoming of the operation
! "nhance small etail an preserve bac,groun tonality
Brecover bac,groun features while preserving the
sharpening effect
B$ adding the original and aplacian image# &-ig. 3.67(
= negati0e center coefficient#u!tract #harpen re#ult
= po#iti0e center coefficientadd #harpen re#ult
Simplification
Compo#ite aplacian ma#k no diagonal neigh!or#
Diagonal neigh!or##harper than no diagonal neigh!or#
+
= ('&('&
('&('&
('& .
.
yxfyxf
yxfyxf
yx
I E h t i th S ti l D i
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
64/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
I E h t i th S ti l D i
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
65/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
66/78
Mohammed Dwikat CIS 133381 Multimedia II
An#harp ma#king and high!oo#t filtering
Un-sharp mas,ing e'pression-subtract a blurre
version of an image from the image itself "he dark room photograph$
= further generali@ation of un#harp ma#king , high!oo#t filtering /%pre##ion for computing a high!oo#t filtered image
"he center coefficient of the aplacian ma#k,negati0e orpo#iti0e
Can !e implemented with either one of the#e ma#k' with =1
3.=.3 Use of first erivatives for enhancement-0heGraient
"he gradient off at coordinate# &%'$( i#
('&('&('& yxfyxfyxfs =
('&('&('& yxfyx"fyxfh# =
=
=
y
fx
f
G
Gf
y
x
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
67/78
Mohammed Dwikat CIS 133381 Multimedia II
"he component# of the 0ector are linear operator
"he magnitude of thi# 0ector i# or
2re#er0e relati0e change# in gra$ le0el#' !ut the i#otropic
propert$ i# lo#t
I# not a linear operator
"he partial deri0ati0e# of the gradient 0ector are not
rotation in0ariant
9i0e the #ame re#ult onl$for 0ertical and 0ertical edge#
"he magnitude of the gradient 0ector i# rotation in0ariant
x yf G G +
.H1
.
..H1
.
.
(&
(&
(&
=
==
y
fx
f
G
Gfmaf
y
x
I E h t i th S ti l D i
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
68/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
69/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
70/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
71/78
Mohammed Dwikat CIS 133381 Multimedia II
=ppro%imate the magnitude of the gradient !$ u#ing
a!#olute 0alue#
o#t i#otropic feature propert$
Lertical and hori@ontal edge# pre#er0e the i#otropic
propertie# onl$ for multiple# of
7/17/2019 DIP Chapter (3)
72/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
73/78
Mohammed Dwikat CIS 133381 Multimedia II
Image Enhancement in the Spatial Domain
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
74/78
Mohammed Dwikat CIS 133381 Multimedia II
3.A Combining spatial enhancement methos
=pplication of #e0eral complementar$ enhancementtechni4ue# aplacian
=d0. , highlight fine detail
Di#ad0,produce noi#ier re#ult# than the gradient! Graient
/nhance prominent edge# ;a# a #tronger re#pon#e in area of #ignificant gra$le0el tran#ition#
>urther lower the response of fine etail an noise forthe graient Ma#k the aplacian image with a #moothed 0er#ion of the gradient
image Smooth the gradient and multipl$ it !$ the aplacian image
2re#er0e detail# in the #trong area while reducing noi#e in therelati0el$ flat area#
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
75/78
Mohammed Dwikat CIS 133381 Multimedia II
/nhance the image !$ #harpening it and !ringing out
more detail &-ig. 3.6(
Eature of the image, the narrow d$namic range of the gra$le0el# and high noi#e content
Q) What effect would setting to zero the lower-order bitQ) What effect would setting to zero the lower-order bit
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
76/78
Mohammed Dwikat CIS 133381 Multimedia II
Q) What effect would setting to zero the lower order bitQ) What effect would setting to zero the lower order bit
planes have on the histogram of an image in general?planes have on the histogram of an image in general?
=( "he num!er of pi%el# ha0ing different gra$
le0el 0alue# would decrea#e' thu# cau#ing the
num!er of component# in the hi#togram to
decrea#e. Since the num!er of pi%el# would notchange' thi# would cau#e the height #ome of the
remaining hi#togram peak# to increa#e in general.
"$picall$' le## 0aria!ilit$ in gra$ le0el 0alue# willreduce contra#t.
Q) What would be the effect on the histogram if we setQ) What would be the effect on the histogram if we set
http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
77/78
Mohammed Dwikat CIS 133381 Multimedia II
Q) What would be the effect on the histogram if we setQ) What would be the effect on the histogram if we set
to zero the higherorder bit planes instead?to zero the higherorder bit planes instead?
=( "he mo#t 0i#i!le effect would !e #ignificant
darkening of the image. -or e%ample' dropping
the highe#t !it would limit to 1 the !righte#t
le0el in an 8!it image. Since the num!er of pi%el#would remain con#tant' the height of #ome of the
hi#togram peak# would increa#e. "he general
#hape of the hi#togram would now !e taller andnarrower' with no hi#togram component# !eing
located pa#t 1.
Q) !plain why the discrete histogram e"ualizationQ) !plain why the discrete histogram e"ualization
http://www.najah.edu/http://www.najah.edu/http://www.najah.edu/7/17/2019 DIP Chapter (3)
78/78
Q) !plain why the discrete histogram e"ualizationQ) p y g "
techni"ue does not# in general# yield a flat histogram$techni"ue does not# in general# yield a flat histogram$
=( =ll that hi#togram e4uali@ation doe# i# remaphi#togram component# on the inten#it$ #cale. "o
o!tain a uniform &flat( hi#togram would re4uire in
general that pi%el inten#itie# !e actuall$
redi#tri!uted #o that there are group# of nHpi%el# with the #ame inten#it$' where i# the
num!er of allowed di#crete inten#it$ le0el# and n
i# the total num!er of pi%el# in the input image."he hi#togram e4uali@ation method ha# no
pro0i#ion# for thi# t$pe of &artificial( redi#tri!ution
http://www.najah.edu/