You are on page 1of 22

10​ ​MARKS

Q.1​ ​What​ ​are​ ​the​ ​elements​ ​of​ ​digital​ ​image​ ​processing​ ​systems.​ ​Explain​ ​with
Diagram.
A.
1. Image Acquisition : ​This is the first step or process of the fundamental steps of digital
image processing. Image acquisition could be as simple as being given an image that is
already in digital form. Generally, the image acquisition stage involves preprocessing,
such​ ​as​ ​scaling​ ​etc.
2. Image Enhancement : Image enhancement is 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.​ ​Such​ ​as,​ ​changing​ ​brightness​ ​&​ ​contrast​ ​etc.
3. Image Restoration : 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​ ​models​ ​of​ ​image​ ​degradation.
4. Color Image Processing : ​Color image processing is an area that has been gaining its
importance because of the significant increase in the use of digital images over the
Internet.​ ​This​ ​may​ ​include​ ​color​ ​modeling​ ​and​ ​processing​ ​in​ ​a​ ​digital​ ​domain​ ​etc.
5. Compression :​Compression deals with techniques for reducing the storage required to
save an image or the bandwidth to transmit it. Particularly in the uses of internet it is very
much​ ​necessary​ ​to​ ​compress​ ​data.
6. Image​ ​segmentation:​ ​to​ ​partitions​ ​an​ ​input​ ​image​ ​into​ ​its​ ​constituent​ ​parts​ ​or​ ​objects.
7. Image​ ​recognition:​​ ​to​ ​assign​ ​a​ ​label​ ​to​ ​an​ ​object​ ​based​ ​on​ ​the​ ​information​ ​provided​ ​by
its​ ​descriptors.
8. Image​ ​representation​ ​and​ ​description​ ​:​Representation​ ​is​ ​to​ ​convert​ ​the​ ​input​ ​data​ ​to​ ​a
form​ ​suitable​ ​for​ ​computer​ ​processing.​ ​Description​ ​is​ ​to​ ​extract​ ​features​ ​that​ ​result​ ​in
some​ ​quantitative​ ​information​ ​of​ ​interest​ ​or​ ​features​ ​that​ ​are​ ​basic​ ​for​ ​differentiating​ ​one
class​ ​of​ ​objects​ ​from​ ​another.

Q.2​ ​Discuss​ ​color​ ​models​ ​for​ ​a​ ​digital​ ​image​ ​.


A​.
The​ ​following​ ​terms​ ​are​ ​used​ ​to​ ​define​ ​color​ ​light:
1.​ ​Brightness​ ​or​ ​Luminance:​ ​This​ ​is​ ​the​ ​amount​ ​of​ ​light​ ​received​ ​by​ ​the​ ​eye​ ​regardless​ ​of​ ​color.
2.​ ​Hue:​​ ​This​ ​is​ ​the​ ​predominant​ ​spectral​ ​color​ ​in​ ​the​ ​light.
3.​ ​Saturation:​​ ​This​ ​indicates​ ​the​ ​spectral​ ​purity​ ​of​ ​the​ ​color​ ​in​ ​the​ ​light.
RGB​ ​colour​ ​Model:
1. The​ ​RGB​ ​color​ ​model​ ​is​ ​an​ ​additive​​ ​color​ ​model​​ ​in​ ​which​ ​red​,​ ​green​​ ​and​ ​blue​​ ​light​ ​are
added​ ​together​ ​in​ ​various​ ​ways​ ​to​ ​reproduce​ ​a​ ​broad​ ​array​ ​of​ ​colors​.
2. The​ ​name​ ​of​ ​the​ ​model​ ​comes​ ​from​ ​the​ ​initials​ ​of​ ​the​ ​three​ ​additive​ ​primary​ ​colors​,​ ​red,
green,​ ​and​ ​blue.
3. The​ ​main​ ​purpose​ ​of​ ​the​ ​RGB​ ​color​ ​model​ ​is​ ​for​ ​the​ ​sensing,​ ​representation​ ​and​ ​display
of​ ​images​ ​in​ ​electronic​ ​systems,​ ​such​ ​as​ ​televisions​ ​and​ ​computers,​ ​though​ ​it​ ​has​ ​also
been​ ​used​ ​in​ ​conventional​ ​photography​.
4. RGB​ ​is​ ​a​ ​device-dependent​ ​color​ ​model.
5. In​ ​the​ ​RGB​ ​model,​ ​an​ ​image​ ​consists​ ​of​ ​three​ ​independent​ ​image​ ​planes,​ ​one​ ​in​ ​each​ ​of
the​ ​primary​ ​colours:​ ​red,​ ​green​ ​and​ ​blue.

CMY​ ​colour​ ​model:


1. CMY​ ​model,​ ​which​ ​uses​ ​Cyan,​ ​Magenta​ ​and​ ​Yellow​ ​primaries,​ ​is​ ​mostly​ ​used​ ​in​ ​printing
devices​ ​where​ ​the​ ​color​ ​pigments​ ​on​ ​the​ ​paper​ ​absorb​ ​certain​ ​colors.
2. The​ ​CMY​ ​(cyan-magenta-yellow)​ ​model​ ​is​ ​a​ ​subtractive​ ​model​ ​appropriate​ ​to​ ​absorption
of​ ​colours,​ ​for​ ​example​ ​due​ ​to​ ​pigments​ ​in​ ​paints.
3. In​ ​this​ ​case,​ ​the​ ​primaries​ ​are​ ​cyan,​ ​magenta​ ​and​ ​yellow.
4. When​ ​a​ ​surface​ ​coated​ ​with​ ​cyan​ ​pigment​ ​is​ ​illuminated​ ​by​ ​white​ ​light,​ ​no​ ​red​ ​light​ ​is
reflected,​ ​and​ ​similarly​ ​for​ ​magenta​ ​and​ ​green,​ ​and​ ​yellow​ ​and​ ​blue
5. The​ ​relationship​ ​between​ ​the​ ​RGB​ ​and​ ​CMY​ ​models​ ​is​ ​given​ ​by:
Sometimes,​ ​an​ ​alternative​ ​CMYK​ ​model​ ​(K​ ​stands​ ​for​ ​black)​ ​is​ ​used​ ​in​ ​color​ ​printing​ ​to​ ​produce
a​ ​darker​ ​black​ ​than​ ​simply​ ​mixing​ ​CMY.

Q.3​ ​Explain​ ​Homomorphic​ ​filtering​ ​in​ ​detail.


A.
1. Homomorphic​ ​filtering​ ​is​ ​a​ ​technique​ ​for​ ​removing​ ​multiplicative​ ​noise​ ​that​ ​has​ ​certain
characteristics.
2. Homomorphic​ ​filtering​ ​is​ ​most​ ​commonly​ ​used​ ​for​ ​correcting​ ​non-uniform​ ​illumination
in​ ​images.​ ​The​ ​illumination-reflectance​ ​model​ ​of​ ​image​ ​formation​ ​says​ ​that​ ​the​ ​intensity
at​ ​any​ ​pixel,​ ​which​ ​is​ ​the​ ​amount​ ​of​ ​light​ ​reflected​ ​by​ ​a​ ​point​ ​on​ ​the​ ​object,​ ​is​ ​the​ ​product
of​ ​the​ ​illumination​ ​of​ ​the​ ​scene​ ​and​ ​the​ ​reflectance​ ​of​ ​the​ ​object(s)​ ​in​ ​the​ ​scene,​ ​i.e.,
I(x,y)=L(x,y)​ ​R(x,y)I(x,y)=L(x,y)​ ​R(x,y)
where​ ​II​ ​is​ ​the​ ​image,​ ​LL​ ​is​ ​scene​ ​illumination,​ ​and​ ​RR​ ​is​ ​the​ ​scene​ ​reflectance.
3. Reflectance​ ​RR​ ​arises​ ​from​ ​the​ ​properties​ ​of​ ​the​ ​scene​ ​objects​ ​themselves,​ ​but
illumination​ ​LL​ ​results​ ​from​ ​the​ ​lighting​ ​conditions​ ​at​ ​the​ ​time​ ​of​ ​image​ ​capture.
4. To​ ​compensate​ ​for​ ​the​ ​non-uniform​ ​illumination,​ ​the​ ​key​ ​is​ ​to​ ​remove​ ​the​ ​illumination
component​ ​LL​ ​and​ ​keep​ ​only​ ​the​ ​reflectance​ ​component​ ​RR.
5. If​ ​we​ ​consider​ ​illumination​ ​as​ ​the​ ​noise​ ​signal​ ​(which​ ​we​ ​want​ ​to​ ​remove),​ ​this​ ​model​ ​is
similar​ ​to​ ​the​ ​multiplicative​ ​noise​ ​model​ ​shown​ ​earlier.
6. Illumination​ ​typically​ ​varies​ ​slowly​ ​across​ ​the​ ​image​ ​as​ ​compared​ ​to​ ​reflectance​ ​which
can​ ​change​ ​quite​ ​abruptly​ ​at​ ​object​ ​edges.
7. This​ ​difference​ ​is​ ​the​ ​key​ ​to​ ​separating​ ​out​ ​the​ ​illumination​ ​component​ ​from​ ​the
reflectance​ ​component.
8. ​ ​In​ ​homomorphic​ ​filtering​ ​we​ ​first​ ​transform​ ​the​ ​multiplicative​ ​components​ ​to​ ​additive
components​ ​by​ ​moving​ ​to​ ​the​ ​log​ ​domain.
ln(I(x,y))=ln(L(x,y)​ ​R(x,y))ln⁡(I(x,y))=ln⁡(L(x,y)​ ​R(x,y))
ln(I(x,y))=ln(L(x,y))+ln(R(x,y))ln⁡(I(x,y))=ln⁡(L(x,y))+ln⁡(R(x,y))
9. Then​ ​we​ ​use​ ​a​ ​high-pass​ ​filter​ ​in​ ​the​ ​log​ ​domain​ ​to​ ​remove​ ​the​ ​low-frequency
illumination​ ​component​ ​while​ ​preserving​ ​the​ ​high-frequency​ ​reflectance​ ​component.
10. The​ ​basic​ ​steps​ ​in​ ​homomorphic​ ​filtering​ ​are​ ​shown​ ​in​ ​the​ ​diagram​ ​below:
Q.4​ ​Explain​ ​filtering​ ​in​ ​spatial​ ​domain.
1. The​ ​use​ ​of​ ​spatial​ ​masks​ ​for​ ​image​ ​processing​ ​is​ ​called​ ​spatial​ ​filtering​ ​and​ ​the​ ​masks​ ​are
called​ ​spatial​ ​filters.
2. Spatial​ ​filtering​ ​involves​ ​passing​ ​a​ ​weighted​ ​mask​ ​or​ ​kernel​ ​over​ ​the​ ​image​ ​and​ ​replacing
the​ ​original​ ​image​ ​pixel​ ​value​ ​corresponding​ ​to​ ​the​ ​centre​ ​of​ ​the​ ​kernel​ ​with​ ​the​ ​sum​ ​of
original​ ​pixel​ ​values​ ​in​ ​the​ ​region​ ​corresponding​ ​to​ ​the​ ​kernel​ ​multiplied​ ​by​ ​the​ ​kernel
weight.
3. For​ ​example​ ​consider​ ​digital​ ​sub-image​ ​F​ ​and​ ​3X3​ ​filter​ ​mask​ ​was​ ​given​ ​below:
Input​ ​image​ ​F=
z1 z2 z3

z4 z5 z6

z7 z8 z9

​ ​and​ ​Filter​ ​mask​ ​w=


w1 w2 w3

w4 w5 w6

w7 w8 w9

The​ ​response​ ​of​ ​a​ ​linear​ ​mask​ ​is​ ​given​ ​as,


R=Z1w1+Z2w2+⋯+Z9w9
4. If​ ​the​ ​centre​ ​of​ ​the​ ​mask​ ​is​ ​at​ ​location​ ​(x,​ ​y)​ ​in​ ​the​ ​image​ ​the​ ​gray​ ​level​ ​of​ ​the​ ​pixel
located​ ​at​ ​(x,​ ​y)​ ​is​ ​replaced​ ​by​ ​R.​ ​The​ ​mask​ ​is​ ​then​ ​moved​ ​to​ ​the​ ​next​ ​pixel​ ​location​ ​in​ ​the
image​ ​and​ ​the​ ​process​ ​is​ ​repeated.​ ​This​ ​continues​ ​until​ ​all​ ​pixel​ ​locations​ ​are​ ​covered.
5. The​ ​different​ ​types​ ​of​ ​filters​ ​can​ ​be​ ​given​ ​as​ ​follows:
● Smoothing​ ​Linear​ ​Filters:​ ​Examples​ ​of​ ​smoothing​ ​linear​ ​filters​ ​are​ ​Low​ ​Pass​ ​Averaging
Filter,​ ​Weighted​ ​Averaging​ ​Filter​ ​and​ ​Trimmed​ ​Averaging​ ​Filter.​ ​The​ ​masks​ ​can​ ​be
given​ ​as,

● Smoothing​ ​Non-Linear​ ​Filters:​​ ​They​ ​are​ ​also​ ​known​ ​as​ ​Ordered​ ​Statistic​ ​Filters.
Examples​ ​of​ ​Non-Linear​ ​filters​ ​are​ ​Median,​ ​Max​ ​and​ ​Min​ ​Filter.
● Sharpening​ ​First​ ​Order​ ​Derivative​ ​Filters:​​ ​Examples​ ​are​ ​Robert,​ ​Prewit,​ ​Sobel​ ​and
Fri-Chen​ ​filter.

● Sharpening​ ​Second​ ​Order​ ​Derivative​ ​Filters:​​ ​Examples​ ​are​ ​Laplacian,​ ​High​ ​Pass​ ​and
High​ ​Boost​ ​Filter.

Q.5​ ​What​ ​is​ ​image​ ​segmentation?​ ​Explain​ ​the​ ​following​ ​methods​ ​of​ ​image
segmentation.​ ​i)​ ​Region​ ​growing​ ​ii)​ ​Region​ ​splitting​ ​iii)​ ​Thresholding.
A.​Image​ ​segmentation​ ​means​ ​assigning​ ​a​ ​label​ ​to​ ​each​ ​pixel​ ​in​ ​the​ ​image​ ​such​ ​that​ ​pixels​ ​with
same​ ​labels​ ​share​ ​common​ ​visual​ ​characteristics.​ ​It​ ​makes​ ​an​ ​image​ ​easier​ ​to​ ​analyze​ ​in​ ​the
image​ ​processing​ ​tasks.​ ​There​ ​are​ ​many​ ​different​ ​techniques​ ​available​ ​to​ ​perform​ ​image
segmentation.
Region​ ​based​ ​segmentation:
Region​ ​based​ ​methods​ ​are​ ​based​ ​continuity.​ ​These​ ​techniques​ ​divide​ ​the​ ​entire​ ​image​ ​into​ ​sub
regions​ ​depending​ ​on​ ​some​ ​rules​ ​like​ ​all​ ​the​ ​pixels​ ​in​ ​one​ ​region​ ​must​ ​have​ ​the​ ​same​ ​gray​ ​level.
Region-based​ ​techniques​ ​rely​ ​on​ ​common​ ​patterns​ ​in​ ​intensity​ ​values​ ​within​ ​a​ ​cluster​ ​of
neighboring​ ​pixels.​ ​The​ ​cluster​ ​is​ ​referred​ ​to​ ​as​ ​the​ ​region,​ ​and​ ​the​ ​goal​ ​of​ ​the​ ​segmentation
algorithm​ ​is​ ​to​ ​group​ ​the​ ​regions​ ​according​ ​to​ ​their​ ​anatomical​ ​or​ ​functional​ ​roles
1. Region​ ​Growing:​Region​ ​growing​ ​is​ ​a​ ​procedure​ ​that​ ​group’s​ ​pixels​ ​in​ ​whole​ ​image​ ​into
sub​ ​regions​ ​or​ ​larger​ ​regions​ ​based​ ​on​ ​predefined​ ​criterion​ ​.​ ​Region​ ​growing​ ​can​ ​be
processed​ ​in​ ​four​ ​steps:-
(i)Select​ ​a​ ​group​ ​of​ ​seed​ ​pixels​ ​in​ ​original​ ​image.
(ii)​ ​Select​ ​a​ ​set​ ​of​ ​similarity​ ​criterion​ ​such​ ​as​ ​grey​ ​level​ ​intensity​ ​or​ ​color​ ​and​ ​set​ ​up​ ​a
stopping​ ​rule.
(iii)Grow​ ​regions​ ​by​ ​appending​ ​to​ ​each​ ​seed​ ​those​ ​neighboring​ ​pixels​ ​that​ ​have
predefined​ ​properties​ ​similar​ ​to​ ​seed​ ​pixels.
(iv)Stop​ ​region​ ​growing​ ​when​ ​no​ ​more​ ​pixels​ ​met​ ​the​ ​criterion​ ​for​ ​inclusion​ ​in​ ​that
region​ ​(i.​ ​e.​ ​Size,​ ​likeness​ ​between​ ​a​ ​candidate​ ​pixel​ ​&​ ​pixel​ ​grown​ ​so​ ​far,​ ​shape​ ​of​ ​the
region​ ​being​ ​grown).
2. Region​ ​Splitting​ ​and​ ​Merging:​​ ​Rather​ ​than​ ​choosing​ ​seed​ ​points,​ ​user​ ​can​ ​divide​ ​an
image​ ​into​ ​a​ ​set​ ​of​ ​arbitrary​ ​unconnected​ ​regions​ ​and​ ​then​ ​merge​ ​the​ ​regions​ ​in​ ​an
attempt​ ​to​ ​satisfy​ ​the​ ​conditions​ ​of​ ​reasonable​ ​image​ ​segmentation.​ ​Region​ ​splitting​ ​and
merging​ ​is​ ​usually​ ​implemented​ ​with​ ​theory​ ​based​ ​on​ ​quadtree​ ​data.
3. Thresholding:​ ​The​ ​simplest​ ​thresholding​ ​methods​ ​replace​ ​each​ ​pixel​ ​in​ ​an​ ​image​ ​with​ ​a
black​ ​pixel​ ​if​ ​the​ ​image​ ​intensity​ ​I{i,j}​​ ​is​​ ​less​ ​than​ ​some​ ​fixed​ ​constant​ ​T​ ​(that​ ​is,
I{i,j}<T}),​ ​or​ ​a​ ​white​ ​pixel​ ​if​ ​the​ ​image​ ​intensity​ ​is​ ​greater​ ​than​ ​that​ ​constant.​ ​In​ ​the
example​ ​image​ ​on​ ​the​ ​right,​ ​this​ ​results​ ​in​ ​the​ ​dark​ ​tree​ ​becoming​ ​completely​ ​black,​ ​and
the​ ​white​ ​snow​ ​becoming​ ​completely​ ​white.
Give​ ​example​ ​of​ ​each​ ​technique​ ​that​ ​mam​ ​has​ ​taught​ ​in​ ​the​ ​lectures.

Q.6​ ​Explain​ ​with​ ​an​ ​example​ ​that​ ​the​ ​first​ ​difference​ ​of​ ​a​ ​chain​ ​code​ ​normalizes​ ​it
to​ ​rotation.
A.​Chain​ ​codes​ ​describe​ ​the​ ​object​ ​by​ ​a​ ​sequence​ ​of​ ​unit​ ​size​ ​line​ ​segments​ ​with​ ​a​ ​given
orientation.​ ​The​ ​process​ ​to​ ​compute​ ​the​ ​chain​ ​code​ ​is​ ​as​ ​follows:
1. Select​ ​starting​ ​point​ ​of​ ​contour.
2. Represent​ ​this​ ​point​ ​by​ ​its​ ​absolute​ ​coordinates​ ​in​ ​the​ ​image
3. Represent​ ​every​ ​consecutive​ ​point​ ​by​ ​a​ ​chain​ ​code​ ​showing​ ​the​ ​transition​ ​needed​ ​ ​to​ ​go
from​ ​current​ ​position​ ​to​ ​next​ ​point​ ​on​ ​the​ ​contour.
4. Stop​ ​if​ ​the​ ​next​ ​point​ ​is​ ​the​ ​initial​ ​point​ ​or​ ​the​ ​end​ ​of​ ​the​ ​contour.
5. Store​ ​the​ ​lengths​ ​of​ ​the​ ​contour​ ​into​ ​the​ ​file
First​ ​Difference​ ​Calculation:
● Normalization​ ​for​ ​starting​ ​point:​ ​Treat​ ​the​ ​code​ ​as​ ​a​ ​circular​ ​sequence​ ​and​ ​redefine​ ​the
starting​ ​points​ ​that​ ​the​ ​resulting​ ​sequence​ ​of​ ​numbers​ ​forms​ ​an​ ​integer​ ​of​ ​minimum
magnitude.
● Normalization​ ​for​ ​rotation:​ ​Use​ ​the​ ​first​ ​difference​ ​of​ ​the​ ​chain​ ​code​ ​instead​ ​of​ ​the
code​ ​itself.​ ​The​ ​difference​ ​is​ ​simply​ ​by​ ​counting​ ​(counter-clockwise)​ ​the​ ​number​ ​of
directions​ ​that​ ​separate​ ​two​ ​adjacent​ ​elements​ ​of​ ​the​ ​code.
Solve​ ​the​ ​example​ ​that​ ​we​ ​have​ ​solved​ ​in​ ​IP​ ​assignment​ ​1​ ​with​ ​proper​ ​explanation​ ​of​ ​each​ ​step.

Q.7​ ​Explain​ ​any​ ​five​ ​zero​ ​memory​ ​point​ ​operations.


● In​ ​zero​ ​memory​ ​operations,​ ​output​ ​image​ ​pixel​ ​value​ ​is​ ​obtained​ ​directly​ ​processing​ ​input
image​ ​image​ ​pixel​ ​values.​ ​Output​ ​pixel​ ​value​ ​at​ ​(x,​ ​y)position​ ​depends​ ​on​ ​single​ ​input
pixel​ ​at​ ​(x,​ ​y).
● For​ ​every​ ​input​ ​image​ ​pixel​ ​value,​ ​Transformation​ ​function​ ​gives​ ​corresponding​ ​output
image​ ​pixel​ ​value,​ ​no​ ​memory​ ​location​ ​is​ ​required​ ​to​ ​store​ ​intermediate​ ​results.
● The​ ​various​ ​Zero​ ​Memory​ ​Point​ ​operations​ ​are:
○ Contrast​ ​Stretching​ ​Transformation
○ Thresholding
○ Digital​ ​Negative​ ​Transformation
○ Intensity​ ​Level​ ​Slicing​ ​Transformation
○ Bit​ ​Plane​ ​Slicing​ ​Transformation.
● Let​ ​r​ ​denotes​ ​input​ ​image​ ​pixel​ ​value​ ​and​ ​S​ ​denotes​ ​output​ ​image​ ​pixel​ ​value
● Then​ ​S=T(r);​ ​where​ ​T​ ​is​ ​any​ ​Zero​ ​memory​ ​point​ ​operation​ ​Transformation​ ​function.
Point​ ​processing​ ​Techniques:
1. Contrast​ ​Stretching​ ​Transform:​​ ​Contrast​ ​Stretching​ ​Tx​ ​function​ ​increases​ ​the​ ​dynamic
range​ ​of​ ​modified​ ​image.​ ​Contrast​ ​stretching​ ​is​ ​to​ ​increase​ ​the​ ​contrast​ ​of​ ​the​ ​image​ ​by
making​ ​the​ ​dark​ ​portions​ ​darker​ ​and​ ​bright​ ​portions​ ​brighter.​ ​We​ ​make​ ​dark​ ​gray​ ​levels
dark​ ​by​ ​assigning​ ​a​ ​slope​ ​of​ ​less​ ​than​ ​‘1’​ ​and​ ​make​ ​bright​ ​gray​ ​levels​ ​brighter​ ​by
assigning​ ​a​ ​slope​ ​greater​ ​than​ ​‘1’.
S​ ​=​ ​l*r 0<=r<a
​ ​ ​ ​ ​ ​ ​m*(r-a)+v a<=r<b
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​m*(r-b)+w b<=r<​ ​(L-1)
Where​ ​l,​ ​m,​ ​n​ ​are​ ​slopes​ ​and​ ​L​ ​is​ ​the​ ​number​ ​of​ ​gray​ ​levels.
2. Thresholding​ ​Transformation​:​ ​extreme​ ​contrast​ ​stretching​ ​is​ ​called​ ​as​ ​thresholding
S​ ​=​ ​0 if​ ​r<=​ ​a
​ ​ ​ ​ ​ ​ ​L-1 if​ ​r>a
For​ ​example,​ ​consider​ ​threshold​ ​value(a)=3
1 2 3 4

5 6 7 2

3 4 6 7

7 6 2 4

Sample​ ​calculation:​ ​for​ ​first​ ​pixel,​ ​r=1,​ ​L=8,​ ​a=3.​ ​‘r=1’​ ​is​ ​less​ ​than​ ​‘a=3’.​ ​The​ ​the​ ​output​ ​should
be​ ​‘0’.​ ​ ​According​ ​to​ ​the​ ​formula​ ​given​ ​above​ ​we​ ​get​ ​the​ ​result​ ​as​ ​follows:
0 0 0 7

7 7 7 0

0 7 7 7

7 7 0 7
3. Digital​ ​Negative​ ​Transformation:​the​ ​digital​ ​negative​ ​is​ ​an​ ​opposite​ ​image​ ​of​ ​input.​ ​In
digital​ ​negative​ ​transformation​ ​the​ ​darker​ ​part​ ​in​ ​input​ ​becomes​ ​brighter​ ​in​ ​output​ ​and
bright​ ​parts​ ​become​ ​darker.​ ​The​ ​technique​ ​is​ ​most​ ​commonly​ ​used​ ​in​ ​X-ray.
S​ ​=​ ​255-​ ​r if​ ​rmax=255
​ ​ ​ ​ ​ ​ ​(L-1)-​ ​r
For​ ​8​ ​gray​ ​levels,​ ​S​ ​=​ ​(8-1)-r=7-r
For​ ​example,
0 1 4 6

2 5 7 3

1 2 3 4

6 7 2 4

Here​ ​no​ ​of​ ​gray​ ​levels(L)=​ ​7


Therefore,​ ​s​ ​=​ ​7-r
Sample​ ​calculation:​ ​for​ ​first​ ​pixel,​ ​r=7.
7-7=0.
7 6 3 1

5 2 0 4

6 5 4 3

1 0 5 3

4. Intensity​ ​level​ ​Slicing:​​ ​it​ ​is​ ​also​ ​called​ ​as​ ​gray​ ​level​ ​slicing.​ ​It​ ​has​ ​two​ ​forms-​ ​with
background​ ​and​ ​without​ ​background.​ ​This​ ​transformation​ ​is​ ​used​ ​in​ ​X-ray​ ​images(with
background)​ ​and​ ​CT​ ​SCAN,​ ​MRI(with​ ​background).​ ​We​ ​need​ ​to​ ​highlight​ ​specific​ ​range
of​ ​gray​ ​levels​ ​like​ ​enhancing​ ​the​ ​flaws​ ​in​ ​an​ ​X-ray​ ​or​ ​CT​ ​image.
With​ ​Background:​ ​ ​S=​ ​L-1 if​ ​a<=r<b
​ ​r otherwise
Without​ ​Background:​ ​ ​S=​ ​L-1 if​ ​a<=​ ​r​ ​<=​ ​b
​ ​ ​ ​ ​ ​ ​0 otherwise

5. Bit​ ​plane​ ​slicing:​​ ​in​ ​this​ ​technique,​ ​we​ ​find​ ​out​ ​the​ ​contribution​ ​made​ ​by​ ​each​ ​bit​ ​to​ ​the
final​ ​image.​ ​Consider​ ​the​ ​LSB​ ​value​ ​of​ ​each​ ​pixel​ ​and​ ​plot​ ​the​ ​image​ ​using​ ​only​ ​LSB.
you​ ​continue​ ​doing​ ​this​ ​for​ ​each​ ​bit​ ​till​ ​we​ ​come​ ​to​ ​the​ ​MSB.​ ​We​ ​will​ ​get​ ​different​ ​binary
images.​ ​In​ ​bit​ ​plane​ ​slicing,​ ​the​ ​high​ ​order​ ​bits​ ​contain​ ​majority​ ​of​ ​visually​ ​significant
data​ ​while​ ​lower​ ​bits​ ​contain​ ​the​ ​subtle​ ​details​ ​in​ ​the​ ​image.​ ​It​ ​can​ ​be​ ​used​ ​in​ ​image
compression.​ ​We​ ​can​ ​transmit​ ​only​ ​higher​ ​order​ ​bits​ ​and​ ​remove​ ​lower​ ​order​ ​bits.​ ​It​ ​is
also​ ​used​ ​in​ ​steganography.

1 2 0 001 010 000 1 0 0 0 1 0 0 0 0

4 3 2 = 100 011 010 0 1 0 0 1 1 1 0 0

7 5 2 111 101 010 1 1 0 1 0 1 1 1 0


Input ​ ​ ​ ​ ​ ​ ​ ​Binary​ ​equivalent MSB ​ ​ ​ ​ ​middle​ ​bit ​ ​ ​ ​ ​ ​ ​LSB

Q.8​ ​Write​ ​a​ ​short​ ​note​ ​on​ ​‘Edge​ ​linking​ ​using​ ​Hough​ ​Transform’.
A.​ ​Hough​ ​transform​ ​can​ ​be​ ​used​ ​for​ ​pixel​ ​linking​ ​and​ ​curve​ ​detection.​ ​The​ ​straight​ ​line
represented​ ​by​ ​y=mx+c​ ​can​ ​be​ ​expressed​ ​in​ ​polar​ ​coordinate​ ​system​ ​as,
ρ​ ​=​ ​xcos(θ)+​ ​ysin(θ)​ ​…………………..(i)
Where​ ​ρ,θ​ ​defines​ ​a​ ​vector​ ​from​ ​the​ ​origin​ ​to​ ​the​ ​nearest​ ​point​ ​on​ ​the​ ​straight​ ​line​ ​y=mx+c.​ ​this
vector​ ​will​ ​be​ ​perpendicular​ ​from​ ​the​ ​origin​ ​to​ ​the​ ​nearest​ ​point​ ​to​ ​the​ ​line​ ​as​ ​shown​ ​in​ ​the​ ​below
figure.

Any​ ​line​ ​in​ ​the​ ​x,​ ​y​ ​plane​ ​corresponds​ ​to​ ​the​ ​point​ ​in​ ​the​ ​2D​ ​space​ ​defined​ ​by​ ​the​ ​parameter​ ​and
θ.​ ​This​ ​the​ ​Hough​ ​transform​ ​of​ ​a​ ​straight​ ​line​ ​in​ ​the​ ​x,y​ ​plane​ ​is​ ​a​ ​single​ ​point​ ​in​ ​the​ ​ρ,​ ​θ​ ​space
and​ ​these​ ​points​ ​should​ ​satisfy​ ​the​ ​given​ ​equation​ ​with​ ​x1,y1​ ​as​ ​constants.​ ​Thus​ ​the​ ​locus​ ​of​ ​all
such​ ​lines​ ​in​ ​the​ ​x,​ ​y​ ​plane​ ​corresponds​ ​to​ ​the​ ​particular​ ​sinusoidal​ ​curve​ ​in​ ​the​ ​ρ,​ ​θ​ ​space.
Suppose​ ​we​ ​have​ ​the​ ​edge​ ​points​ ​xi,yi​ ​that​ ​lie​ ​along​ ​the​ ​straight​ ​line​ ​having​ ​parameters​ ​ρ0,θ0.
Each​ ​edge​ ​point​ ​plots​ ​to​ ​a​ ​sinusoidal​ ​curve​ ​in​ ​the​ ​ρ,θ​ ​space,​ ​but​ ​these​ ​curves​ ​must​ ​intersect​ ​at​ ​a
point​ ​ρ0,θ0.​ ​Since​ ​this​ ​is​ ​a​ ​line​ ​they​ ​all​ ​have​ ​in​ ​common.
For​ ​example​ ​considering​ ​the​ ​equation​ ​of​ ​a​ ​line:​ ​y1=​ ​ax1+b
Using​ ​this​ ​equation​ ​and​ ​varying​ ​the​ ​values​ ​of​ ​a​ ​and​ ​b,​ ​infinite​ ​lines​ ​can​ ​pass​ ​through​ ​this​ ​point
(x1,y1).
However,​ ​if​ ​we​ ​write​ ​the​ ​equation​ ​as
B=​ ​-ax1+y1
And​ ​then​ ​consider​ ​the​ ​ab​ ​plane​ ​instead​ ​of​ ​xy​ ​plane,​ ​we​ ​get​ ​a​ ​straight​ ​line​ ​for​ ​a​ ​point​ ​(xi,yi).​ ​This
entire​ ​line​ ​in​ ​the​ ​ab​ ​plane​ ​is​ ​due​ ​to​ ​a​ ​single​ ​point​ ​in​ ​the​ ​xy​ ​plane​ ​and​ ​different​ ​values​ ​of​ ​and​ ​b.
Now​ ​consider​ ​another​ ​point​ ​(x2,​ ​y2)​ ​in​ ​the​ ​xy​ ​plane.​ ​The​ ​slope​ ​intercept​ ​equation​ ​of​ ​this​ ​line​ ​is,
Y2=​ ​ax2+​ ​b………………….(1)
Writing​ ​the​ ​equation​ ​in​ ​terms​ ​of​ ​the​ ​ab​ ​plane​ ​we​ ​get,
B=​ ​-ax2+y2………………..(2)
This​ ​is​ ​another​ ​line​ ​in​ ​the​ ​ab​ ​plane.​ ​These​ ​two​ ​line​ ​will​ ​intersect​ ​each​ ​other​ ​somewhere​ ​in​ ​the​ ​ab
plane​ ​only​ ​if​ ​they​ ​are​ ​part​ ​of​ ​a​ ​straight​ ​line​ ​in​ ​the​ ​xy​ ​plane.​ ​The​ ​point​ ​of​ ​intersection​ ​in​ ​the​ ​ab
plane​ ​is​ ​noted​ ​as​ ​(a’,b’).​ ​using​ ​this​ ​(a’,b’)​ ​in​ ​the​ ​standard​ ​slope-intercept​ ​form​ ​i.e.​ ​y=a’x+b’,​ ​we
get​ ​a​ ​line​ ​that​ ​passes​ ​through​ ​the​ ​points​ ​(x1​ ​,​ ​y1)​ ​and​ ​(x2,​ ​y2)​ ​in​ ​the​ ​xy​ ​plane.

Q.9​ ​Write​ ​short​ ​note​ ​on​ ​4,8​ ​and​ ​m-connectivity.


A.​​ ​In​ ​image​ ​processing​​ ​and​ ​image​ ​recognition​,​ ​pixel​ ​connectivity​ ​is​ ​the​ ​way​ ​in​ ​which​ ​pixels​​ ​in
2-dimensional​ ​(or​ ​in​ ​3-dimensional)​ ​images​ ​relate​ ​to​ ​their​ ​neighbors.
4-connectivity:
● Any​ ​pixel​ ​p(x,​ ​y)​ ​has​ ​two​ ​vertical​ ​and​ ​two​ ​horizontal​ ​neighbors,​ ​given​ ​by​ ​(x+1,​ ​y),​ ​(x-1,
y),​ ​(x,​ ​y+1),​ ​(x,​ ​y-1)
● This​ ​set​ ​of​ ​pixels​ ​are​ ​called​ ​the​ ​4-neighbors​ ​of​ ​P,​ ​and​ ​is​ ​denoted​ ​by​ ​N​ ​4(P).
● Each​ ​of​ ​them​ ​are​ ​at​ ​a​ ​unit​ ​distance​ ​from​ ​P.

Diagonal​ ​connectivity:
● The​ ​four​ ​diagonal​ ​neighbors​ ​of​ ​p(x,y)​ ​are​ ​given​ ​by,​ ​(x+1,​ ​y+1),​ ​(x+1,​ ​y-1),​ ​(x-1,​ ​y+1),
(x-1​ ​,y-1)
● This​ ​set​ ​is​ ​denoted​ ​by​ ​ND(P).
● Each​ ​of​ ​them​ ​are​ ​at​ ​Euclidean​ ​distance​ ​of​ ​1.414​ ​from​ ​P.

8-connectivity:
● The​ ​points​ ​ND(P)​ ​and​ ​N4(P)​ ​are​ ​together​ ​known​ ​as​ ​8-neighbors​ ​of​ ​the​ ​point​ ​P,​ ​denoted
by​ ​N8(P).
● Some​ ​of​ ​the​ ​points​ ​in​ ​the​ ​N4,​ ​ND​ ​and​ ​N8​ ​may​ ​fall​ ​outside​ ​image​ ​when​ ​P​ ​lies​ ​on​ ​the
border​ ​of​ ​image.

M-connectivity:
● Two​ ​pixels​ ​p​ ​and​ ​q​ ​with​ ​values​ ​from​ ​V​ ​are​ ​m-adjacent​ ​if,
- q​ ​is​ ​in​ ​N​ ​4(P).
- q​ ​is​ ​in​ ​N​ ​D(p)​ ​and​ ​the​ ​set​ ​[N4(p)​ ​intersect​ ​N4(q)​ ​]​ ​is​ ​empty​ ​(has​ ​no​ ​pixels​ ​whose
values​ ​are​ ​from​ ​V).
Give​ ​examples​ ​that​ ​mam​ ​has​ ​taught​ ​in​ ​the​ ​lectures.

Q.10​ ​Write​ ​a​ ​short​ ​note​ ​on​ ​Hit​ ​or​ ​Miss​ ​Transform.
A.​The​ ​Hit​ ​or​ ​Miss​ ​Transform​ ​is​ ​the​ ​morphological​ ​operator​ ​used​ ​for​ ​finding​ ​local​ ​patterns​ ​of
pixels​ ​i.e.​ ​the​ ​size​ ​of​ ​the​ ​structuring​ ​element.
Method:
Method​ ​is​ ​quite​ ​simple​ ​.A​ ​small​ ​odd​ ​sized​ ​mask(structuring​ ​element​ ​),typically​ ​3x3​ ​is​ ​scanned
over​ ​a​ ​binary​ ​image.​ ​If​ ​the​ ​binary-valued​ ​pattern​ ​of​ ​the​ ​structuring​ ​element​ ​matches​ ​the​ ​state​ ​of
the​ ​pixels​ ​under​ ​the​ ​structuring​ ​element(HIT),the​ ​output​ ​pixel​ ​in​ ​spatial​ ​correspondence​ ​to​ ​the
center​ ​pixel​ ​of​ ​the​ ​structuring​ ​element​ ​is​ ​set​ ​to​ ​some​ ​desired​ ​binary​ ​state​ ​(usually​ ​1).If​ ​the​ ​binary
pattern​ ​of​ ​the​ ​structuring​ ​element​ ​does​ ​not​ ​match​ ​the​ ​state​ ​of​ ​the​ ​pixels​ ​under​ ​the​ ​structuring
element(MISS),​ ​the​ ​output​ ​pixel​ ​in​ ​the​ ​spatial​ ​correspondence​ ​to​ ​the​ ​center​ ​pixel​ ​of​ ​the
structuring​ ​element​ ​is​ ​set​ ​to​ ​the​ ​opposite​ ​binary​ ​state(usually​ ​0).
Let​ ​B=(B1,B2)B=(B1,B2)​ ​be​ ​the​ ​structuring​ ​element.Here​ ​B1B1​ ​is​ ​a​ ​set​ ​formed​ ​from​ ​elements
of​ ​B​ ​Associated​ ​with​ ​the​ ​objects​ ​and​ ​B2B2​ ​is​ ​a​ ​set​ ​of​ ​elements​ ​of​ ​B​ ​associated​ ​with​ ​the
corresponding​ ​background.B=(B1,B2)B=(B1,B2)​ ​is​ ​called​ ​a​ ​composite​ ​structuring​ ​element.The
HIT​ ​and​ ​MISS​ ​transformation​ ​of​ ​a​ ​set​ ​A​ ​with​ ​structuring​ ​element​ ​B​ ​is​ ​given​ ​by​ ​the​ ​equation
A⊗B=a|B1ЄAandB2ЄAcA⊗B=a|B1ЄAandB2ЄAc
Where​ ​A​ ​is​ ​the​ ​image​ ​set​ ​,AcAc​ ​is​ ​the​ ​complement​ ​of​ ​the​ ​image​ ​set​ ​and​ ​B​ ​is​ ​the​ ​structuring
elements.
If​ ​the​ ​foreground​ ​and​ ​background​ ​pixels​ ​in​ ​the​ ​structuring​ ​element​ ​exactly​ ​match​ ​the​ ​foreground
and​ ​background​ ​pixels​ ​in​ ​the​ ​image,​ ​then​ ​the​ ​pixels​ ​underneath​ ​the​ ​origin​ ​of​ ​the​ ​structuring
element​ ​is​ ​set​ ​to​ ​foreground​ ​colour.​ ​If​ ​it​ ​doesn’t​ ​match,​ ​that​ ​pixel​ ​is​ ​set​ ​to​ ​background​ ​colour.

Q.11​ ​Write​ ​8x8​ ​Hadamard​ ​transform​ ​matrix​ ​and​ ​its​ ​signal​ ​flow​ ​graph.​ ​Using​ ​the
Butterfly​ ​diagram,​ ​compute​ ​Hadamard​ ​transform​ ​for​ ​x(n)​ ​=​ ​{​ ​1,2,3,4,​ ​1,2,​ ​1,2}
A.

Q.12​ ​Write​ ​an​ ​expression​ ​for​ ​a​ ​2-D​ ​DFT​ ​.​ ​What​ ​is​ ​its​ ​relationship​ ​with​ ​one
dimensional​ ​DFT?​ ​How​ ​one-dimensional​ ​FFT​ ​algorithm​ ​can​ ​be​ ​used​ ​to​ ​compute
two​ ​dimensional​ ​DFT​ ​of​ ​an​ ​digital​ ​image.
A.
By​ ​2D​ ​Fourier​ ​Transform,

Row​ ​Transform∶

Column​ ​Transform∶

2D​ ​Fourier​ ​Transform​ ​of​ ​input​ ​image​ ​can​ ​be​ ​obtained​ ​by​ ​performing​ ​row-wise​ ​1D​ ​transform
followed​ ​by​ ​column-wise​ ​1D​ ​Fourier​ ​Transform.
Fast​ ​Fourier​ ​Algorithm​ ​to​ ​find​ ​DFT​ ​of​ ​an​ ​image:
● Perform​ ​row-wise​ ​transform​ ​using​ ​FFT​ ​Flowgraph.
● Perform​ ​column-wise​ ​transform​ ​using​ ​FFT​ ​Flowgraph.
● Scale​ ​by​ 1​ /N.

Q.13​ ​Classify​ ​image​ ​compression​ ​methods​ ​in​ ​detail​ ​along​ ​with​ ​the​ ​different
redundancies​ ​that​ ​can​ ​be​ ​present​ ​in​ ​digital​ ​images.
1. Data​ ​compression​ ​is​ ​defined​ ​as​ ​the​ ​process​ ​of​ ​encoding​ ​data​ ​using​ ​a​ ​representation​ ​that
reduces​ ​the​ ​overall​ ​size​ ​of​ ​data.​ ​This​ ​reduction​ ​is​ ​possible​ ​when​ ​the​ ​original​ ​dataset
contains​ ​some​ ​type​ ​of​ ​redundancy.
2. Digital​ ​image​ ​compression​ ​is​ ​a​ ​field​ ​that​ ​studies​ ​methods​ ​for​ ​reducing​ ​the​ ​total​ ​number​ ​of
bits​ ​required​ ​to​ ​represent​ ​an​ ​image.​ ​This​ ​can​ ​be​ ​achieved​ ​by​ ​eliminating​ ​various​ ​types​ ​of
redundancy​ ​that​ ​exist​ ​in​ ​the​ ​pixel​ ​values.
3. Psycho-visual​ ​Redundancy:​ ​It​ ​is​ ​a​ ​redundancy​ ​corresponding​ ​to​ ​different​ ​sensitivities​ ​to
all​ ​image​ ​signals​ ​by​ ​human​ ​eyes.​ ​Therefore,​ ​eliminating​ ​some​ ​less​ ​relative​ ​important
information​ ​in​ ​our​ ​visual​ ​processing​ ​may​ ​be​ ​acceptable.
4. Inter-pixel​ ​Redundancy:​ ​It​ ​is​ ​a​ ​redundancy​ ​corresponding​ ​to​ ​statistical​ ​dependencies
among​ ​pixels,​ ​especially​ ​between​ ​neighboring​ ​pixels.
5. Coding​ ​Redundancy:​ ​The​ ​uncompressed​ ​image​ ​usually​ ​is​ ​coded​ ​with​ ​each​ ​pixel​ ​by​ ​a
fixed​ ​length.​ ​For​ ​example,​ ​an​ ​image​ ​with​ ​256​ ​gray​ ​scales​ ​is​ ​represented​ ​by​ ​an​ ​array​ ​of
8-bit​ ​integers.​ ​Using​ ​some​ ​variable​ ​length​ ​code​ ​schemes​ ​such​ ​as​ ​Huffman​ ​coding​ ​and
arithmetic​ ​coding​ ​may​ ​produce​ ​compression

​ ​Generally​ ​most​ ​lossy​ ​compressors​ ​ ​are​ ​three-step​ ​algorithms,​ ​each​ ​of​ ​which​ ​is​ ​in​ ​accordance
with​ ​three​ ​kinds​ ​of​ ​redundancy​ ​mentioned​ ​above.
The​ ​first​ ​stage​ ​is​ ​a​ ​transform​ ​to​ ​eliminate​ ​the​ ​inter-pixel​ ​redundancy​ ​to​ ​pack​ ​information
efficiently.​ ​Then​ ​a​ ​quantizer​ ​is​ ​applied​ ​to​ ​remove​ ​psycho-visual​ ​redundancy​ ​to​ ​represent​ ​the
packed​ ​information​ ​with​ ​as​ ​few​ ​bits​ ​as​ ​possible.​ ​The​ ​quantized​ ​bits​ ​are​ ​then​ ​efficiently​ ​encoded
to​ ​get​ ​more​ ​compression​ ​from​ ​the​ ​coding​ ​redundancy.
Lossless​ ​Compression​ ​Methods:
Lossless​ ​compressors​ ​are​ ​usually​ ​two-step​ ​algorithms.​ ​The​ ​first​ ​step​ ​transforms​ ​the​ ​original
image​ ​to​ ​some​ ​other​ ​format​ ​in​ ​which​ ​the​ ​inter-pixel​ ​redundancy​ ​is​ ​reduced.​ ​The​ ​second​ ​step​ ​uses
an​ ​entropy​ ​encoder​ ​to​ ​remove​ ​the​ ​coding​ ​redundancy.​ ​The​ ​lossless​ ​decompressor​ ​is​ ​a​ ​perfect
inverse​ ​process​ ​of​ ​the​ ​lossless​ ​compressor.

The​ ​various​ ​lossless​ ​compression​ ​techniques​ ​are:


(1) Run​ ​Length​ ​Coding:​Run​ ​length​ ​coding​ ​replaces​ ​data​ ​by​ ​a​ ​(length,​ ​value)​ ​pair,​ ​where
“value”​ ​is​ ​the​ ​repeated​ ​value​ ​and​ ​“length”​ ​is​ ​the​ ​number​ ​of​ ​repetitions.​ ​This​ ​technique​ ​is
especially​ ​successful​ ​in​ ​compressing​ ​bi-level​ ​images​ ​since​ ​the​ ​occurrence​ ​of​ ​a​ ​long​ ​run​ ​of
a​ ​value​ ​is​ ​rare​ ​in​ ​ordinary​ ​gray-scale​ ​images.​ ​A​ ​solution​ ​to​ ​this​ ​is​ ​to​ ​decompose​ ​the
gray-scale​ ​image​ ​into​ ​bit​ ​planes​ ​and​ ​compress​ ​every​ ​bit-plane​ ​separately.
(2) Huffman​ ​coding​:​ ​Huffman​ ​coding​ ​utilizes​ ​a​ ​variable​ ​length​ ​code​ ​in​ ​which​ ​short​ ​code
words​ ​are​ ​assigned​ ​to​ ​more​ ​common​ ​values​ ​or​ ​symbols​ ​in​ ​the​ ​data,​ ​and​ ​longer​ ​code
words​ ​are​ ​assigned​ ​to​ ​less​ ​frequently​ ​occurring​ ​values.
(3) Differential​ ​Pulse​ ​Code​ ​Modulation:​DPCM​ ​(differential​ ​pulse​ ​code​ ​modulation)​ ​is​ ​a
predictive​ ​coding​ ​based​ ​lossless​ ​image​ ​compression​ ​method.​ ​It​ ​is​ ​also​ ​the​ ​base​ ​for
lossless​ ​JPEG​ ​compression.​ ​A​ ​variation​ ​of​ ​the​ ​lossless​ ​predictive​ ​coding​ ​is​ ​the​ ​adaptive
prediction​ ​that​ ​splits​ ​the​ ​image​ ​into​ ​blocks​ ​and​ ​computes​ ​the​ ​prediction​ ​coefficients
independently​ ​for​ ​each​ ​block​ ​to​ ​achieve​ ​high​ ​prediction​ ​performance.
(4) Arithmetic​ ​coding:​ ​Arithmetic​ ​coding​ ​represents​ ​a​ ​message​ ​as​ ​some​ ​finite​ ​intervals
between​ ​0​ ​and​ ​1​ ​on​ ​the​ ​real​ ​number​ ​line.​ ​Basically,​ ​it​ ​divides​ ​the​ ​intervals​ ​between​ ​0​ ​and
1​ ​into​ ​a​ ​number​ ​of​ ​smaller​ ​intervals​ ​corresponding​ ​to​ ​the​ ​probabilities​ ​of​ ​the​ ​message’s
symbols.

Q.14​ ​Explain​ ​following​ ​morphological​ ​operations:​ ​i)​ ​Opening​ ​ii)​ ​Closing


1. Opening
1)​ ​Opening​ ​is​ ​based​ ​on​ ​the​ ​morphological​ ​operations,​ ​erosion​ ​and​ ​dilation.
2)​ ​Opening​ ​smoothest​ ​the​ ​inside​ ​of​ ​the​ ​object​ ​contour,​ ​brakes​ ​narrow​ ​strips​ ​and​ ​eliminates​ ​thin
portion​ ​of​ ​the​ ​image.​ ​It​ ​is​ ​done​ ​by​ ​1st​ ​applying​ ​erosion​ ​and​ ​then​ ​dilation​ ​operations​ ​on​ ​the
image.
3)​ ​The​ ​opening​ ​operation​ ​is​ ​used​ ​to​ ​remove​ ​noise​ ​and​ ​CCD​ ​detected​ ​in​ ​the​ ​image.
4)​ ​The​ ​opening​ ​filters​ ​details​ ​and​ ​simplifies​ ​images​ ​by​ ​rounding​ ​corners​ ​from​ ​inside​ ​objects
where​ ​the​ ​kernel​ ​uses​ ​fits.
5)​ ​The​ ​opening​ ​process​ ​can​ ​be​ ​mathematically​ ​represented​ ​as​ ​X.B​ ​=​ ​(X​ ​EXNOR​ ​B)​ ​EXOR​ ​B
Where​ ​X​ ​is​ ​an​ ​input​ ​image​ ​and​ ​B​ ​is​ ​the​ ​structuring​ ​element.

2.​ ​Closing
1)​ ​The​ ​closing​ ​operation​ ​is​ ​the​ ​opposite​ ​of​ ​the​ ​opening​ ​operation.​ ​It​ ​is​ ​a​ ​dilation​ ​operation
followed​ ​by​ ​an​ ​erosion​ ​operation.
2)​ ​The​ ​closing​ ​operation​ ​fills​ ​the​ ​small​ ​holes​ ​and​ ​gaps​ ​in​ ​a​ ​single-pixel​ ​object.’
3)​ ​It​ ​is​ ​has​ ​the​ ​same​ ​effect​ ​of​ ​an​ ​opening​ ​operation,​ ​in​ ​that​ ​it​ ​smoothes​ ​contours​ ​and​ ​maintains
shapes​ ​and​ ​sizes​ ​of​ ​object.
4)​ ​The​ ​closing​ ​process​ ​can​ ​be​ ​mathematically​ ​represented​ ​as​ ​X.B​ ​=​ ​(X​ ​exor​ ​B)​ ​exnor​ ​B​ ​Where​ ​X
is​ ​an​ ​input​ ​image​ ​and​ ​B​ ​is​ ​the​ ​structuring​ ​element.
5)​ ​Closing​ ​protects​ ​coarse​ ​structure,​ ​closes​ ​small​ ​gaps​ ​and​ ​round​ ​off​ ​concave​ ​corners.

5​ ​MARKS
Q.15​ ​What​ ​is​ ​unitary​ ​transform​ ​matrix?​ ​Explain​ ​with​ ​examples.
A.refer​ ​mam’s​ ​lecture​ ​notes

Q.16​ ​Explain​ ​in​ ​short​ ​sampling​ ​and​ ​quantization​ ​method​ ​for​ ​digital​ ​image.
A.
Sampling:
Sampling​ ​is​ ​the​ ​reduction​ ​of​ ​a​ ​continuous​ ​signal​ ​to​ ​discrete​ ​signal.​ ​A​ ​common​ ​example​ ​is​ ​the
conversion​ ​of​ ​a​ ​sound​ ​wave​ ​to​ ​a​ ​sequence​ ​of​ ​samples,​ ​a​ ​sample​ ​refers​ ​to​ ​a​ ​value​ ​or​ ​set​ ​of​ ​values
at​ ​a​ ​point​ ​in​ ​time​ ​or​ ​space.​ ​It​ ​is​ ​subsystem​ ​or​ ​operation​ ​that​ ​extracts​ ​samples​ ​from​ ​continuous
signals.​ ​Sampling​ ​can​ ​be​ ​done​ ​for​ ​functions​ ​varying​ ​in​ ​space,​ ​time​ ​or​ ​any​ ​other​ ​dimensions​ ​and
similar​ ​results​ ​are​ ​obtained​ ​in​ ​two​ ​or​ ​more​ ​dimensions.
The​ ​equation​ ​suggests​ ​that​ ​a​ ​sampled​ ​2-D​ ​function​ ​defined​ ​over​ ​a​ ​domain​ ​size
M▲x​ ​X​ ​N▲y​ ​can​ ​be​ ​considered​ ​as​ ​an​ ​2D​ ​array​ ​{f​ ​(0,​ ​1),​ ​f​ ​(0,​ ​1),………………….}
This​ ​means​ ​that​ ​the​ ​function​ ​is​ ​represented​ ​as​ ​an​ ​M​ ​X​ ​N​ ​uniformly​ ​spaced​ ​sample.​ ​Apart​ ​from
the​ ​sampling​ ​interval​ ​in​ ​x​ ​and​ ​y​ ​direction,​ ​another​ ​important​ ​choice​ ​relevant​ ​to​ ​the​ ​image
sampling​ ​is​ ​the​ ​spatial​ ​arrangement​ ​of​ ​the​ ​sample​ ​points​ ​called​ ​as​ ​Tessellation.

Quantization:
The​ ​values​ ​obtained​ ​by​ ​sampling​ ​a​ ​continuous​ ​function​ ​usually​ ​comprise​ ​of​ ​an​ ​infinite​ ​set​ ​or​ ​real
numbers​ ​ranging​ ​from​ ​a​ ​minimum​ ​to​ ​maximum​ ​depending​ ​upon​ ​the​ ​sensors​ ​calibration.​ ​These
values​ ​must​ ​be​ ​represented​ ​by​ ​a​ ​finite​ ​number​ ​of​ ​bits​ ​usually​ ​used​ ​in​ ​computer​ ​to​ ​store​ ​or
process​ ​any​ ​data.​ ​In​ ​practice​ ​the​ ​sampled​ ​signal​ ​values​ ​are​ ​represented​ ​by​ ​a​ ​finite​ ​et​ ​of​ ​integer
values.​ ​This​ ​is​ ​known​ ​as​ ​quantization.​ ​Every​ ​image​ ​that​ ​is​ ​seen​ ​on​ ​the​ ​monitor​ ​is​ ​actually​ ​this
matrix.​ ​Each​ ​element​ ​of​ ​the​ ​matrix​ ​is​ ​called​ ​as​ ​pixel.​ ​Whenever​ ​we​ ​see​ ​the​ ​image​ ​on​ ​the​ ​screen
of​ ​computer​ ​it​ ​is​ ​actual​ ​matrix​ ​consisting​ ​of​ ​N​ ​X​ ​M​ ​pixels​ ​is​ ​known​ ​and​ ​each​ ​pixel​ ​is​ ​considered
to​ ​be​ ​a​ ​simple.​ ​Hence​ ​more​ ​the​ ​pixels,​ ​more​ ​the​ ​sample,​ ​higher​ ​the​ ​sampling​ ​rate​ ​hence​ ​better​ ​the
spatial​ ​resolution.​ ​The​ ​value​ ​of​ ​each​ ​pixel​ ​is​ ​known​ ​as​ ​the​ ​grey​ ​level.​ ​Computer​ ​understands​ ​only
ones​ ​and​ ​zeros.​ ​Hence​ ​these​ ​grey​ ​levels​ ​needs​ ​to​ ​be​ ​represented​ ​in​ ​terms​ ​of​ ​zeros​ ​and​ ​ones.​ ​If​ ​we
have​ ​two​ ​bits​ ​to​ ​represent​ ​the​ ​grey​ ​levels,​ ​only​ ​4​ ​different​ ​grey​ ​levels​ ​(2)​ ​can​ ​be​ ​identified​ ​viz.
00,01​ ​10,​ ​11,​ ​where​ ​00​ ​is​ ​back,​ ​11​ ​is​ ​white​ ​and​ ​other​ ​two​ ​are​ ​different​ ​shades​ ​of​ ​grey.​ ​Similarly,
if​ ​we​ ​have​ ​8​ ​bits,​ ​to​ ​represent​ ​the​ ​grey​ ​levels,​ ​we​ ​will​ ​have​ ​256​ ​grey​ ​levels​ ​(2).​ ​Hence​ ​more​ ​the
bits,​ ​more​ ​are​ ​the​ ​grey​ ​levels​ ​and​ ​better​ ​is​ ​the​ ​tonal​ ​clarity​ ​(quantization).​ ​The​ ​total​ ​size​ ​of​ ​the
image​ ​is​ ​N​ ​X​ ​M​ ​X​ ​m,​ ​where​ ​m​ ​is​ ​the​ ​number​ ​of​ ​bits​ ​used.​ ​As​ ​we​ ​know,​ ​more​ ​the​ ​samples​ ​and
the​ ​bits,​ ​better​ ​is​ ​the​ ​image.​ ​This​ ​answer​ ​will​ ​vary​ ​from​ ​image​ ​to​ ​image.​ ​As​ ​the​ ​sampling​ ​and​ ​the
quantization​ ​increase,​ ​the​ ​number​ ​of​ ​bits​ ​required​ ​to​ ​store​ ​the​ ​image​ ​increases​ ​tremendously.​ ​The
clarity​ ​increases,​ ​but​ ​storage​ ​space​ ​required​ ​increases​ ​too.

Q.17​ ​Enhancement​ ​process​ ​does​ ​not​ ​add​ ​any​ ​information​ ​to​ ​the​ ​image.​ ​Justify
Contradict.
A.
1. The​ ​principle​ ​objective​ ​of​ ​enhancement​ ​technique​ ​is​ ​to​ ​process​ ​a​ ​given​ ​image​ ​so​ ​that​ ​the
result​ ​is​ ​more​ ​suitable​ ​than​ ​the​ ​original​ ​image​ ​for​ ​a​ ​specific​ ​application.
2. Image​ ​enhancement​ ​refers​ ​to​ ​sharpening​ ​of​ ​image​ ​features​ ​such​ ​as​ ​edges,​ ​boundaries​ ​or
contrast​ ​to​ ​make​ ​a​ ​graphic​ ​display​ ​more​ ​useful​ ​for​ ​display​ ​and​ ​analysis.
3. Image​ ​enhancement​ ​include​ ​gray​ ​levels​ ​and​ ​contrast​ ​manipulation,​ ​noise​ ​reduction,
edge-sharpening,​ ​filtering,​ ​interpolation,​ ​magnification,​ ​pseudo-coloring​ ​and​ ​so​ ​on.
4. Image​ ​enhancement​ ​techniques​ ​take​ ​the​ ​input​ ​image​ ​pixel​ ​and​ ​modify​ ​it​ ​to​ ​new​ ​value
without​ ​adding​ ​any​ ​information​ ​to​ ​it.
5. The​ ​enhancement​ ​process​ ​does​ ​not​ ​increase​ ​the​ ​inherent​ ​information​ ​content​ ​in​ ​the​ ​data
but​ ​it​ ​does​ ​increase​ ​the​ ​dynamic​ ​range​ ​of​ ​the​ ​chosen​ ​feature​ ​so​ ​that​ ​they​ ​can​ ​be​ ​detected
easily

Q.18​ ​Write​ ​a​ ​short​ ​note​ ​on​ ​chain​ ​codes.


A.​Chain​ ​codes​ ​are​ ​used​ ​to​ ​represent​ ​the​ ​binary​ ​by​ ​a​ ​connected​ ​sequence​ ​of​ ​straight​ ​–line
segments.​ ​This​ ​represented​ ​is​ ​based​ ​on​ ​4-connectivity​ ​and​ ​8-connectivity​ ​of​ ​the​ ​segments.​ ​The
chain​ ​code​ ​works​ ​best​ ​with​ ​binary​ ​images​ ​and​ ​is​ ​a​ ​concise​ ​way​ ​of​ ​representing​ ​a​ ​shape​ ​contour.
The​ ​chain​ ​code​ ​direction​ ​convention​ ​is​ ​given​ ​below:
As​ ​an​ ​edge​ ​is​ ​traced​ ​from​ ​its​ ​beginning​ ​point​ ​to​ ​the​ ​end​ ​point​ ​the​ ​direction​ ​that​ ​must​ ​be​ ​taken​ ​to
move​ ​from​ ​one​ ​pixel​ ​to​ ​the​ ​next​ ​is​ ​given​ ​by​ ​the​ ​number​ ​represented​ ​in​ ​either​ ​the​ ​4-chain​ ​code​ ​or
the​ ​8-​ ​chain​ ​code.​ ​As​ ​an​ ​edge​ ​can​ ​be​ ​completely​ ​described​ ​in​ ​terms​ ​of​ ​its​ ​starting​ ​coordinate​ ​and
its​ ​sequence​ ​of​ ​chain​ ​codes​ ​descriptors.​ ​Of​ ​the​ ​two​ ​chain​ ​codes,​ ​the​ ​4-chain​ ​is​ ​easier​ ​requiring
only​ ​four​ ​different​ ​code​ ​values.​ ​For​ ​e.g.:​ ​Given​ ​an​ ​image,​ ​for​ ​4-chain​ ​code​ ​for​ ​the​ ​same.

Let​ ​us​ ​take​ ​a​ ​starting​ ​point​ ​which​ ​is​ ​arbitrarily​ ​chosen​ ​(p).​ ​From​ ​this​ ​point​ ​on,​ ​the​ ​cursor​ ​follows
the​ ​contour,​ ​usually​ ​in​ ​the​ ​clockwise​ ​direction.​ ​For​ ​every​ ​pixel​ ​the​ ​direction​ ​is​ ​noted.
The​ ​4-chain​ ​code​ ​is​ ​given​ ​edge​ ​is
0​ ​0​ ​3​ ​0​ ​3​ ​3​ ​2​ ​2​ ​2​ ​1​ ​1​ ​1
Hence​ ​instead​ ​of​ ​storing​ ​the​ ​coordinates​ ​of​ ​each​ ​pixel,​ ​we​ ​can​ ​store​ ​the​ ​chain​ ​code​ ​and​ ​starting
coordinates.​ ​Remember​ ​8-connectivity​ ​is​ ​closer​ ​to​ ​the​ ​human​ ​eye​ ​than​ ​4-connectivity.​ ​The​ ​chain
code​ ​allows​ ​an​ ​edge​ ​to​ ​be​ ​described​ ​using​ ​vertical,​ ​horizontal​ ​as​ ​well​ ​as​ ​diagonal​ ​descriptors​ ​at
45​ ​degrees,135​ ​degrees,225​ ​degrees​ ​and​ ​ ​315​ ​degrees.

Q.19​ ​Prove​ ​that​ ​DFT​ ​is​ ​orthogonal​ ​transform.


A.

Q.20​ ​Explain​ ​fidelity​ ​criteria​ ​.


A.​The​ ​criteria​ ​for​ ​an​ ​assessment​ ​of​ ​a​ ​quality​ ​of​ ​an​ ​image​ ​are​ ​(i)​ ​Objective​ ​Fidelity​ ​Criteria​ ​and
(ii)​ ​Subjective​ ​Fidelity​ ​Criteria.
1. Objective​ ​Fidelity​ ​Criteria:
○ Mean​ ​Square​ ​Error​ ​(MSE):​ ​Let​ ​f(x,y)​ ​represent​ ​an​ ​input​ ​image​ ​and​ ​let
f^(x,y)f^(x,y)​ ​denote​ ​an​ ​estimate​ ​or​ ​approximate​ ​of​ ​f(x,y)​ ​for​ ​any​ ​value​ ​of​ ​x​ ​and
y,​ ​The​ ​mean​ ​squared​ ​error​ ​is​ ​defined​ ​as,
○ MSE=1MxN∑x=0M−1/sumN−1y=0[f(x,y)−f^(x,y)]2MSE=1MxN∑x=0M−1/sum
y=0N−1[f(x,y)−f^(x,y)]2
○ Signal​ ​to​ ​Noise​ ​Ratio​ ​(SNR):
○ SNR=∑M−1x=0∑N−1y=0[f(x,y)]2∑M−1x=0∑N−1y=0[f(x,y)−f^(x,y)]2SNR=∑x
=0M−1∑y=0N−1[f(x,y)]2∑x=0M−1∑y=0N−1[f(x,y)−f^(x,y)]2
2. Subjective​ ​Fidelity​ ​Criteria:
● Images​ ​are​ ​viewed​ ​by​ ​human​ ​beings.​ ​Therefore​ ​measuring​ ​image​ ​quality​ ​by​ ​the
subjective​ ​evaluations​ ​of​ ​a​ ​human​ ​observer​ ​is​ ​more​ ​appropriate.​ ​This​ ​can​ ​be
● accomplished​ ​by​ ​showing​ ​a​ ​typical​ ​decompressed​ ​image​ ​to​ ​an​ ​appropriate​ ​cross​ ​section
of​ ​viewers​ ​and​ ​averaging​ ​their​ ​evaluations.
● The​ ​evaluations​ ​may​ ​be​ ​made​ ​by​ ​using​ ​an​ ​absolute​ ​rating​ ​scale​ ​or​ ​by​ ​means​ ​of​ ​side​ ​by
side comparison of f(x,y)and f ̂(x,y).
● Side​ ​by​ ​side​ ​comparisons​ ​can​ ​be​ ​done​ ​with​ ​the​ ​following​ ​scale:​ ​-​ ​{1,​ ​2,​ ​3,​ ​4,​ ​5,​ ​6}to
represent​ ​evaluations​ ​such​ ​as​ ​{Excellent,​ ​Fine,​ ​Passable,​ ​Marginal,​ ​Inferior,​ ​Unusable}
respectively.​ ​-​ ​{-3,​ ​-2,​ ​-1,​ ​0,​ ​1,​ ​2,​ ​3}​ ​to​ ​represent​ ​subjective​ ​evaluations​ ​such​ ​as​ ​{much
worse,​ ​worse,​ ​slightly​ ​worse,​ ​the​ ​same,​ ​slightly​ ​better,​ ​better,​ ​much​ ​better}​ ​respectively.
These​ ​evaluations​ ​are​ ​said​ ​to​ ​be​ ​based​ ​on​ ​subjective​ ​fidelity​ ​criteria:
Value Rating Description

1 Excellent An​ ​image​ ​of​ ​extremely​ ​high​ ​quality​ ​as​ ​good​ ​as​ ​you​ ​could​ ​desire.

2 Fine An​ ​image​ ​of​ ​high​ ​quality​ ​providing​ ​enjoyable​ ​viewing.​ ​Interference​ ​is
somewhat​ ​objectionable.

3 Passable An​ ​image​ ​of​ ​acceptable​ ​quality.​ ​Interference​ ​is​ ​somewhat​ ​objectionable.

4 Marginal An​ ​image​ ​of​ ​poor​ ​quality​ ​that​ ​you​ ​wish​ ​could​ ​be​ ​improved.​ ​Interference​ ​is
somewhat​ ​objectionable.

5 Inferior A​ ​very​ ​poor​ ​image​ ​but​ ​can​ ​be​ ​viewed.​ ​Objectionable​ ​interference​ ​is
definitely​ ​present.

6 Unusable An​ ​image​ ​so​ ​bad​ ​that​ ​it​ ​cannot​ ​be​ ​viewed.

Q.21​ ​Explain​ ​different​ ​discontinuities​ ​in​ ​image.


A.​The​ ​three​ ​basic​ ​types​ ​of​ ​discontinuities​ ​in​ ​a​ ​digital​ ​image​ ​are​ ​point,​ ​line​ ​and​ ​edge.
Point​ ​Detection:
● The​ ​detection​ ​of​ ​isolated​ ​point​ ​different​ ​from​ ​constant​ ​background​ ​image​ ​can​ ​be​ ​done
using​ ​the​ ​following​ ​mask:
-1 -1 -1

-1 8 -1

-1 -1 -1
● A​ ​point​ ​has​ ​been​ ​detected​ ​at​ ​the​ ​location​ ​on​ ​which​ ​the​ ​mask​ ​is​ ​centered​ ​if​ ​|R|>T​ ​where​ ​T
is​ ​non-negative​ ​threshold​ ​and.
● The​ ​idea​ ​is​ ​that​ ​the​ ​gray​ ​level​ ​of​ ​an​ ​isolated​ ​point​ ​will​ ​be​ ​quite​ ​different​ ​from​ ​the​ ​gray
levels​ ​of​ ​its​ ​neighbors.
● The​ ​mask​ ​operation​ ​measures​ ​the​ ​weighted​ ​differences​ ​between​ ​the​ ​centre​ ​point​ ​and​ ​its
neighbors.​ ​The​ ​differences​ ​that​ ​are​ ​large​ ​enough​ ​are​ ​determined​ ​by​ ​T​ ​considered​ ​isolated
points​ ​in​ ​the​ ​image​ ​of​ ​interest.
Line​ ​Detection:
● The​ ​various​ ​masks​ ​present​ ​for​ ​line​ ​detection​ ​are​ ​:
a)​ ​Horizontal​ ​mask
-1 -1 -1

2 2 2

-1 -1 -1

b)​ ​-45​ ​degrees


-1 -1 2

-1 2 -1

2 -1 -1

c)​ ​45​ ​degrees


2 -1 -1

-1 2 -1

-1 -1 2

d)​ ​Vertical​ ​mask


-1 2 -1

-1 2 -1

-1 2 -1

● If​ ​the​ ​horizontal​ ​mask​ ​is​ ​moved​ ​around​ ​an​ ​image​ ​it​ ​would​ ​respond​ ​more​ ​strongly​ ​to​ ​lines
oriented​ ​horizontally.
● With​ ​constant​ ​background​ ​the​ ​maximum​ ​response​ ​would​ ​result​ ​when​ ​the​ ​line​ ​is​ ​passing
through​ ​the​ ​middle​ ​row​ ​of​ ​the​ ​mask.
Edge​ ​Detection:
● Edges​ ​characterize​ ​object​ ​boundaries​ ​are​ ​therefore​ ​useful​ ​for​ ​segmentation​ ​and
identification​ ​of​ ​objects​ ​in​ ​scene.
● Edge​ ​point​ ​can​ ​be​ ​thought​ ​of​ ​as​ ​pixel​ ​location​ ​of​ ​abrupt​ ​gray​ ​levels.​ ​It​ ​is​ ​the​ ​boundary
between​ ​two​ ​regions​ ​with​ ​relatively​ ​distinct​ ​gray​ ​level​ ​properties.
● There​ ​are​ ​two​ ​types​ ​of​ ​edges​ ​step​ ​and​ ​ramp​ ​edge.
● The​ ​step​ ​edges​ ​are​ ​detected​ ​using​ ​first​ ​order​ ​derivative​ ​filters​ ​like​ ​Robert,​ ​Sobel​ ​and
Prewitt.
● The​ ​ramp​ ​edges​ ​can​ ​be​ ​detected​ ​using​ ​second​ ​order​ ​derivative​ ​line​ ​Laplacian​ ​filter.

Q.22​ ​Differentiate​ ​between​ ​lossy​ ​and​ ​lossless​ ​compression.


A.
Lossy​ ​Compression Lossless​ ​Compression

1.​ ​The​ ​technique​ ​involves​ ​some​ ​loss​ ​of 1.​ ​Involves​ ​no​ ​loss​ ​of​ ​information.
information.

2.​ ​Data​ ​that​ ​has​ ​been​ ​compressed​ ​using 2.​ ​If​ ​data​ ​has​ ​been​ ​(lossless)​ ​compressed,​ ​the
this​ ​technique​ ​can’t​ ​be​ ​recovered​ ​and original​ ​data​ ​can​ ​be​ ​recovered​ ​from​ ​the
reconstructed​ ​exactly. compressed​ ​data.

3.​ ​Used​ ​for​ ​application​ ​that​ ​can​ ​tolerate 3.​ ​Used​ ​for​ ​application​ ​that​ ​can’t​ ​tolerate​ ​any
difference​ ​between​ ​the​ ​original​ ​and difference​ ​between​ ​original​ ​and​ ​reconstructed
reconstructed​ ​data. data.

4.​ ​In​ ​return​ ​for​ ​accepting​ ​this​ ​distortion​ ​in 4.​ ​No​ ​loss​ ​in​ ​information​ ​so​ ​compression​ ​rate​ ​is
reconstructed​ ​data​ ​we​ ​obtain​ ​high small.
compression​ ​rate

5.​ ​Sound​ ​and​ ​Image​ ​compression​ ​uses 5.​ ​Text​ ​compression​ ​uses​ ​lossless​ ​compression
lossy​ ​compression.

6.​ ​More​ ​data​ ​can​ ​be​ ​accommodated​ ​in 6.​ ​Less​ ​data​ ​can​ ​be​ ​accommodated​ ​in​ ​channel.
channel.

7.​ ​Distortion 7.​ ​Distortion​ ​less

Q.23​ ​Define​ ​morphological​ ​operations​ ​Erosion​ ​and​ ​Dilation.


A.
Dilation:
With​ ​A​ ​and​ ​B​ ​as​ ​two​ ​sets​ ​in​ ​Z2​ ​(2D​ ​integer​ ​space),​ ​the​ ​dilation​ ​of​ ​A​ ​and​ ​B​ ​is​ ​defined​ ​as
A(+)B={Z|(B ̂)Z∩A ≠ ɸ}
In​ ​the​ ​above​ ​example,​ ​A​ ​is​ ​the​ ​image​ ​while​ ​B​ ​is​ ​called​ ​a​ ​structuring​ ​element.
In the equation,(B ̂)Z simply means taking the reflections of B about its origin and shifting it by
Z.​ ​Hence​ ​dilation​ ​of​ ​A​ ​with
B is a set of all displacements, Z, such that (B ̂)Z and A overlap by at least one element.
Flipping​ ​of​ ​B​ ​about​ ​the​ ​origin​ ​and​ ​then​ ​moving​ ​it​ ​past​ ​image​ ​A​ ​is​ ​analogous​ ​to​ ​the​ ​convolution
process.​ ​In​ ​practice​ ​flipping​ ​of​ ​B​ ​is​ ​not​ ​done​ ​always.
Dilation​ ​adds​ ​pixels​ ​to​ ​the​ ​boundaries​ ​of​ ​object​ ​in​ ​an​ ​image.​ ​The​ ​number​ ​of​ ​pixels​ ​added
depends​ ​on​ ​the​ ​size​ ​and​ ​shape​ ​of​ ​the​ ​structuring​ ​element.​ ​Based​ ​on​ ​this​ ​definition,​ ​dilation​ ​can​ ​be
defined​ ​as
A(+)B={{Z|(B ̂)Z∩A} ϵ A}
Example:
A={(1,0),(1,1),(1,2),(2,2),(0,3),(0,4)}
B={(0,0),(1,0)}
Then,​ ​A​ ​B={(1,0),(1,1),(1,2),(2,2),(0,3),(0,4),(2,0),(2,1),(2,2),(3,2),(1,3),(1,4)}

For​ ​Image​ ​A​ ​and​ ​structuring​ ​element​ ​B​ ​as​ ​in​ ​Z2​ ​(2D​ ​integer​ ​space),
Erosion:
Erosion is defined as: A ϴ B={Z|(B ̂)Z ϵ A}
This​ ​equation​ ​indicates​ ​that​ ​erosion​ ​of​ ​A​ ​by​ ​B​ ​is​ ​the​ ​set​ ​of​ ​all​ ​points​ ​Z​ ​such​ ​that​ ​B,​ ​translated
(Shifted​ ​by​ ​Z),​ ​is​ ​a​ ​subset​ ​of​ ​A​ ​i.e.,​ ​B​ ​is​ ​entirely​ ​contained​ ​within​ ​A​ ​.​ ​Erosion​ ​reduces​ ​the
number​ ​of​ ​pixels​ ​from​ ​the​ ​object​ ​boundary.​ ​The​ ​number​ ​of​ ​pixels​ ​removed​ ​depends​ ​on​ ​the​ ​size
of​ ​the​ ​structuring​ ​element.
Example:​ ​A={(1,0),(1,1),(1,2),(0,3),(1,3),(2,3),(3,3),(1,4)}​ ​and​ ​ ​B={(0,0),(1,0)}
Then,​ ​A​ ​B={(0,3),(1,3),(2,3)}

You might also like