SlideShare a Scribd company logo
Digital Image Processing
Digital Image Processing
(UST 2007 Fall
(UST 2007 Fall)
)
(UST 2007 Fall
(UST 2007 Fall)
)
Sang Chul Ahn
asc@imrc.kist.re.kr
asc@imrc.kist.re.kr
Dithering
Dithering
Dithering
Dithering
Dithering
Dithering
Æ Dithering is a technique to simulate the display of colors
g q p y
that are not in the current color palette of an image
Æ Full colors are usually represented with reduced number of
colors
Æ It accomplishes this by arranging adjacent pixels of
different colors into a pattern which simulates colors that
are not available
Æ O i l l i t t
Æ One simple example is to represent a gray
scale image with black and white
It is called (digital) halftone
Æ It is called (digital) halftone
image source:
http://www.geocities.com/ResearchTriangle/Thinktank/5996/techpaps/introip/manual04.html
Dithering
Dithering
Dithering
Dithering
Æ Dithering is possible because
Æ Dithering is possible because
Æ Your eyes will average over an area
Æ S i l i
Æ Spatial Integration
Æ Dithering Methods
g
Æ Thresholding
Æ Patterning
Æ Patterning
Æ Random dither(Robert’s algorithm)
Æ Ordered dither
Æ Error diffusion
Thresholding
Thresholding
Thresholding
Thresholding
Æ A simple fixed threshold can be used but
Æ A simple fixed threshold can be used, but
average intensity for a threshold can give a
good(?) result Æ Average thresholding
good(?) result Æ Average thresholding
image source: http://en.wikipedia.org/wiki/Dither
Patterning
Patterning
Patterning
Patterning
Æ Patterning is used when the spatial resolution
Æ Patterning is used when the spatial resolution
of an output is greater than that of a source
image
image
Æ It generates an image that is of higher spatial
resolution than the source image
resolution than the source image
Æ Compute the intensity of each sub-block(or
pixel) and index a pattern
pixel) and index a pattern
Æ Pattern should grow as the intensity gets
brighter
Æ The 1’s pixels in the previous level pattern should
b d i h l l
be preserved in the next level
Patterning
Patterning
Patterning
Patterning
Æ Rylander pattern matrix
Patterning
Patterning
Patterning
Patterning
input image
LUT
address
output image
generation
pattern LUT
Random Dithering
Random Dithering
Random Dithering
Random Dithering
Æ Add a random amount to each pixel before thresholding
p g
Æ Typically add uniformly random amount from [-a,a]
Æ Pure addition of noise to the image
Æ Not good for black and white, but OK for more colors
Æ Add a small random color to each pixel before finding the
l t l i th t bl
closest color in the table
Ordered Dithering
Ordered Dithering
Ordered Dithering
Ordered Dithering
Æ Break the image into small blocks
Æ Define a threshold matrix
Æ Use a different threshold for each pixel of the block
Æ Compare each pixel to its own threshold
Æ The thresholds can be clustered, which looks like a
(di it l) h lft i
newspaper: (digital) halftoning
Æ The thresholds can be “random” which looks better
Ordered Dithering
Ordered Dithering
Ordered Dithering
Ordered Dithering
Æ Bayer Ordered Dither Pattern (popular)
y (p p )
Ordered Dithering
Ordered Dithering
Ordered Dithering
Ordered Dithering
Error Diffusion
Error Diffusion
Error Diffusion
Error Diffusion
Æ Start at one corner and work
through image pixel by pixel
from left to right and from top
from left to right and from top
to bottom
Æ The gray value of every pixel is compared to 50% of
Æ The gray value of every pixel is compared to 50% of
gray and either set to black or white
Æ The error is propagated to neighbor pixels
p p g g p
Floyd
Floyd-
-Steinberg Diffusion
Steinberg Diffusion
Floyd
Floyd Steinberg Diffusion
Steinberg Diffusion
Error Diffusion
Error Diffusion
Error Diffusion
Error Diffusion
Color Image
Color Image
Color Image
Color Image
Warping and Morphing
Warping and Morphing
Warping
Warping
Warping
Warping
Æ
Æ Image warping
Image warping
Æ
Æ Image warping
Image warping
Æ rearranging the pixels of a picture
Æ Also called “image distortion” “geometric image
Æ Also called image distortion , geometric image
transformation”
Æ We need a function that maps points between
Æ We need a function that maps points between
corresponding points in the source and
destination images
destination images
Æ called “mapping” or “transformation”
Æ Resampling (or interpolation) is required in
Æ Resampling (or interpolation) is required in
general
Mapping
Mapping
Mapping
Mapping
Æ Simple mappings
Æ Affine mapping
Æ Projective mapping
Æ Bilinear mapping
Æ These mappings can be applied to either the
whole image or a part of the image
Æ Other mappings
Æ polynomial transformation
Æ arbitrary function
Æ Beier-Neely warping (used mostly in morphing)
Affine Mapping
Affine Mapping
Affine Mapping
Affine Mapping
Æ The form of the affine mapping
pp g
or
c
by
ax
u +
+
=
⎥
⎥
⎤
⎢
⎢
⎡
⎥
⎥
⎤
⎢
⎢
⎡
=
⎥
⎥
⎤
⎢
⎢
⎡
y
x
f
e
d
c
b
a
v
u
f
ey
dx
v +
+
= ⎥
⎥
⎦
⎢
⎢
⎣
⎥
⎥
⎦
⎢
⎢
⎣
=
⎥
⎥
⎦
⎢
⎢
⎣ 1
1
0
0
1
y
f
e
d
v
Æ The combination of 2D scale, rotation, translation
Æ A triangle maps to a triangle, and a rectangle maps to
Æ A triangle maps to a triangle, and a rectangle maps to
parallelogram
Æ The inverse mapping is also an affine mapping
pp g pp g
Æ Three points can define an affine mapping (6 degree
of freedom)
Projective Mapping
Projective Mapping
Projective Mapping
Projective Mapping
Æ It is also called Perspective mapping
Æ Mapping form
)
/(
)
( i
hy
gx
c
by
ax
u +
+
+
+
= ⎥
⎤
⎢
⎡
⎥
⎤
⎢
⎡
⎥
⎤
⎢
⎡ x
f
d
c
b
a
qu
or
)
/(
)
(
)
(
)
(
i
hy
gx
f
ey
dx
v
y
g
y
+
+
+
+
=
⎥
⎥
⎥
⎦
⎢
⎢
⎢
⎣
⎥
⎥
⎥
⎦
⎢
⎢
⎢
⎣
=
⎥
⎥
⎥
⎦
⎢
⎢
⎢
⎣ 1
y
i
h
g
f
e
d
q
qv
Æ The affine mapping is a special case of the projective
mapping when g=h=0
mapping when g h 0
Æ The mapping conserves a line
Æ A line is mapped to a line
Æ The inverse mapping is also a projective mapping
Æ Four points can define a projective mapping
(8 degree of freedom)
Bilinear Mapping
Bilinear Mapping
Bilinear Mapping
Bilinear Mapping
Æ Mapping form
h
gy
fx
exy
v
d
cy
bx
axy
u
+
+
+
=
+
+
+
=
Æ A square can be mapped to any shaped rectangles
h
gy
fx
exy
v +
+
+
=
q pp y p g
Æ A vertical or horizontal line can be mapped to a line, but
other directional line is not mapped to a line
Æ The inverse mapping requires the computation of square
roots, and it may take long time
Æ Four points can define a bilinear mapping
(8 degree of freedom)
Mapping
Mapping
Mapping
Mapping
Æ Forward mapping
Æ Forward mapping
Æ Reverse(backward) mapping
Bilinear Interpolation
Bilinear Interpolation
Bilinear Interpolation
Bilinear Interpolation
Æ A B C D are intensity s )
1
( s
A B
E
Æ A,B,C,D are intensity
values t
s )
1
( s
−
A B
E
sB
A
s
E +
−
= )
1
( )
1
( t
G
sD
C
s
F
sB
A
s
E
+
−
=
+
)
1
(
)
1
( )
1
( t
−
C D
tF
E
t
G +
−
= )
1
(
[ ] [ ]
sD
C
s
t
sB
A
s
t +
−
+
+
−
−
= )
1
(
)
1
(
)
1
(
C D
F
[ ] [ ]
tsD
C
s
t
sB
t
A
s
t
sD
C
s
t
sB
A
s
t
+
−
+
−
+
−
−
=
+
+
+
=
)
1
(
)
1
(
)
1
)(
1
(
)
1
(
)
1
(
)
1
(
Morphing
Morphing
Morphing
Morphing
Æ Morphing is an abbreviation for
Æ Morphing is an abbreviation for
Metamorphosis
Æ It is a process of creating a smooth transition
Æ It is a process of creating a smooth transition
between two images
Morph
Morph = Warp the shape
= Warp the shape
+ Cross
+ Cross dissolve the colors
dissolve the colors
+ Cross
+ Cross-
-dissolve the colors
dissolve the colors
Æ There are two kinds of morphing; Image
Æ There are two kinds of morphing; Image
based one and 3D model based one
Morphing Demo
Morphing Demo
Morphing Demo
Morphing Demo
Vid
Video
W k f CMU t d t (htt // 2 d / h/)
Work of CMU students (http://www-2.cs.cmu.edu/~ph/)
Image Morphing Techniques
Image Morphing Techniques
Image Morphing Techniques
Image Morphing Techniques
Æ Cross-dissolve
Æ Cross dissolve
Æ Feature-based morphing
(Beier & Neely’s method)
Æ Mesh morphing
Æ Mesh morphing
Æ View morphing
Æ Others
Cross
Cross-
-Dissolve
Dissolve
Cross
Cross Dissolve
Dissolve
Æ Pixel-by-pixel color interpolation
Æ Pixel by pixel color interpolation
Æ Very primitive
Æ Not smooth transitions
Feature
Feature-
-based Morphing
based Morphing
Feature
Feature based Morphing
based Morphing
Feature
Feature-
-based Morphing(II)
based Morphing(II)
Feature
Feature based Morphing(II)
based Morphing(II)
Æ Warping with multiple line pairs
Æ Warping with multiple line pairs
Æ The corresponding point is determined
from the weighted average of points which
from the weighted average of points which
are determined from feature lines
Feature
Feature-
-based Morphing(III)
based Morphing(III)
Feature
Feature based Morphing(III)
based Morphing(III)
Æ Warping with multiple line pairs
Æ Warping with multiple line pairs
Feature
Feature-
-based Morphing(IV
based Morphing(IV)
)
Feature
Feature based Morphing(IV
based Morphing(IV)
)
Æ Weights
Æ Weights
Mesh Morphing
Mesh Morphing
Mesh Morphing
Mesh Morphing
Æ Source and target images are meshed
Æ Source and target images are meshed
Æ The meshes for both images are
i t l t d
interpolated
Æ The intermediate images are cross-
Æ The intermediate images are cross
dissolved
Mesh Morphing
Mesh Morphing
Mesh Morphing
Mesh Morphing
View Morphing
View Morphing
View Morphing
View Morphing
Æ 2-D image morphing does not necessarily
Æ 2 D image morphing does not necessarily
preserve shape of rigid bodies in
intermediate images
intermediate images
View Morphing
View Morphing
View Morphing
View Morphing
Æ Makes use of camera location information
to project images onto parallel planes
View Morphing Algorithm
View Morphing Algorithm
View Morphing Algorithm
View Morphing Algorithm
Æ Prewarp
Æ Prewarp
Æ apply projective transforms to the source
images (H -1 and H -1)
images (H0
-1 and H1
-1)
Æ Morph
Æ Use any image morphing technique
Æ Postwarp
Æ Postwarp
Æ Apply Hs to obtain final image
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
View Morphing
Vid
Video

More Related Content

Similar to Digital_Image_Processing_Digital_Image_Processing_Dithering_.pdf

Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
Hemantha Kulathilake
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
Mayuri Narkhede
 
Computer Vision - Single View
Computer Vision - Single ViewComputer Vision - Single View
Computer Vision - Single View
Wael Badawy
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
ShardaSalunkhe1
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Kuppusamy P
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
Mark Kilgard
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
Varun Ojha
 
Introduction to Image Processing
Introduction to Image ProcessingIntroduction to Image Processing
Introduction to Image Processing
Israel Gbati
 
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
Matthias Trapp
 
OpenCV presentation series- part 3
OpenCV presentation series- part 3OpenCV presentation series- part 3
OpenCV presentation series- part 3
Sairam Adithya
 
Mvs adas
Mvs adasMvs adas
Mvs adas
Sanket Borhade
 
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
ravis205084
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
DrNVaijayanthiDeanRD
 
Introduction image features
Introduction image featuresIntroduction image features
Introduction image features
payalshah14
 
testpang
testpangtestpang
testpang
pangpang2
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
Jonghoon Park
 
Image Sampling and Quantization.pptx
Image Sampling and Quantization.pptxImage Sampling and Quantization.pptx
Image Sampling and Quantization.pptx
RUBIN (A) JEBIN
 

Similar to Digital_Image_Processing_Digital_Image_Processing_Dithering_.pdf (20)

Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
 
Computer Vision - Single View
Computer Vision - Single ViewComputer Vision - Single View
Computer Vision - Single View
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
 
Introduction to Image Processing
Introduction to Image ProcessingIntroduction to Image Processing
Introduction to Image Processing
 
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
Interactive Stereoscopic Rendering for Non-Planar Projections (GRAPP 2009)
 
OpenCV presentation series- part 3
OpenCV presentation series- part 3OpenCV presentation series- part 3
OpenCV presentation series- part 3
 
Mvs adas
Mvs adasMvs adas
Mvs adas
 
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
UNIT II GEOMETRIC MODELING (COMPUTER AIDED DESIGN AND MANUFACTURING )
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
 
Introduction image features
Introduction image featuresIntroduction image features
Introduction image features
 
testpang
testpangtestpang
testpang
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
 
Image Sampling and Quantization.pptx
Image Sampling and Quantization.pptxImage Sampling and Quantization.pptx
Image Sampling and Quantization.pptx
 

Recently uploaded

Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
ijseajournal
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
Indrajeet sahu
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
AI-Based Home Security System : Home security
AI-Based Home Security System : Home securityAI-Based Home Security System : Home security
AI-Based Home Security System : Home security
AIRCC Publishing Corporation
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
cannyengineerings
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
vmspraneeth
 

Recently uploaded (20)

Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
AI-Based Home Security System : Home security
AI-Based Home Security System : Home securityAI-Based Home Security System : Home security
AI-Based Home Security System : Home security
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
 

Digital_Image_Processing_Digital_Image_Processing_Dithering_.pdf

  • 1. Digital Image Processing Digital Image Processing (UST 2007 Fall (UST 2007 Fall) ) (UST 2007 Fall (UST 2007 Fall) ) Sang Chul Ahn asc@imrc.kist.re.kr asc@imrc.kist.re.kr Dithering Dithering
  • 2. Dithering Dithering Dithering Dithering Æ Dithering is a technique to simulate the display of colors g q p y that are not in the current color palette of an image Æ Full colors are usually represented with reduced number of colors Æ It accomplishes this by arranging adjacent pixels of different colors into a pattern which simulates colors that are not available Æ O i l l i t t Æ One simple example is to represent a gray scale image with black and white It is called (digital) halftone Æ It is called (digital) halftone image source: http://www.geocities.com/ResearchTriangle/Thinktank/5996/techpaps/introip/manual04.html Dithering Dithering Dithering Dithering Æ Dithering is possible because Æ Dithering is possible because Æ Your eyes will average over an area Æ S i l i Æ Spatial Integration Æ Dithering Methods g Æ Thresholding Æ Patterning Æ Patterning Æ Random dither(Robert’s algorithm) Æ Ordered dither Æ Error diffusion
  • 3. Thresholding Thresholding Thresholding Thresholding Æ A simple fixed threshold can be used but Æ A simple fixed threshold can be used, but average intensity for a threshold can give a good(?) result Æ Average thresholding good(?) result Æ Average thresholding image source: http://en.wikipedia.org/wiki/Dither Patterning Patterning Patterning Patterning Æ Patterning is used when the spatial resolution Æ Patterning is used when the spatial resolution of an output is greater than that of a source image image Æ It generates an image that is of higher spatial resolution than the source image resolution than the source image Æ Compute the intensity of each sub-block(or pixel) and index a pattern pixel) and index a pattern Æ Pattern should grow as the intensity gets brighter Æ The 1’s pixels in the previous level pattern should b d i h l l be preserved in the next level
  • 4. Patterning Patterning Patterning Patterning Æ Rylander pattern matrix Patterning Patterning Patterning Patterning input image LUT address output image generation pattern LUT
  • 5. Random Dithering Random Dithering Random Dithering Random Dithering Æ Add a random amount to each pixel before thresholding p g Æ Typically add uniformly random amount from [-a,a] Æ Pure addition of noise to the image Æ Not good for black and white, but OK for more colors Æ Add a small random color to each pixel before finding the l t l i th t bl closest color in the table Ordered Dithering Ordered Dithering Ordered Dithering Ordered Dithering Æ Break the image into small blocks Æ Define a threshold matrix Æ Use a different threshold for each pixel of the block Æ Compare each pixel to its own threshold Æ The thresholds can be clustered, which looks like a (di it l) h lft i newspaper: (digital) halftoning Æ The thresholds can be “random” which looks better
  • 6. Ordered Dithering Ordered Dithering Ordered Dithering Ordered Dithering Æ Bayer Ordered Dither Pattern (popular) y (p p ) Ordered Dithering Ordered Dithering Ordered Dithering Ordered Dithering
  • 7. Error Diffusion Error Diffusion Error Diffusion Error Diffusion Æ Start at one corner and work through image pixel by pixel from left to right and from top from left to right and from top to bottom Æ The gray value of every pixel is compared to 50% of Æ The gray value of every pixel is compared to 50% of gray and either set to black or white Æ The error is propagated to neighbor pixels p p g g p Floyd Floyd- -Steinberg Diffusion Steinberg Diffusion Floyd Floyd Steinberg Diffusion Steinberg Diffusion
  • 8. Error Diffusion Error Diffusion Error Diffusion Error Diffusion Color Image Color Image Color Image Color Image
  • 9. Warping and Morphing Warping and Morphing Warping Warping Warping Warping Æ Æ Image warping Image warping Æ Æ Image warping Image warping Æ rearranging the pixels of a picture Æ Also called “image distortion” “geometric image Æ Also called image distortion , geometric image transformation” Æ We need a function that maps points between Æ We need a function that maps points between corresponding points in the source and destination images destination images Æ called “mapping” or “transformation” Æ Resampling (or interpolation) is required in Æ Resampling (or interpolation) is required in general
  • 10. Mapping Mapping Mapping Mapping Æ Simple mappings Æ Affine mapping Æ Projective mapping Æ Bilinear mapping Æ These mappings can be applied to either the whole image or a part of the image Æ Other mappings Æ polynomial transformation Æ arbitrary function Æ Beier-Neely warping (used mostly in morphing) Affine Mapping Affine Mapping Affine Mapping Affine Mapping Æ The form of the affine mapping pp g or c by ax u + + = ⎥ ⎥ ⎤ ⎢ ⎢ ⎡ ⎥ ⎥ ⎤ ⎢ ⎢ ⎡ = ⎥ ⎥ ⎤ ⎢ ⎢ ⎡ y x f e d c b a v u f ey dx v + + = ⎥ ⎥ ⎦ ⎢ ⎢ ⎣ ⎥ ⎥ ⎦ ⎢ ⎢ ⎣ = ⎥ ⎥ ⎦ ⎢ ⎢ ⎣ 1 1 0 0 1 y f e d v Æ The combination of 2D scale, rotation, translation Æ A triangle maps to a triangle, and a rectangle maps to Æ A triangle maps to a triangle, and a rectangle maps to parallelogram Æ The inverse mapping is also an affine mapping pp g pp g Æ Three points can define an affine mapping (6 degree of freedom)
  • 11. Projective Mapping Projective Mapping Projective Mapping Projective Mapping Æ It is also called Perspective mapping Æ Mapping form ) /( ) ( i hy gx c by ax u + + + + = ⎥ ⎤ ⎢ ⎡ ⎥ ⎤ ⎢ ⎡ ⎥ ⎤ ⎢ ⎡ x f d c b a qu or ) /( ) ( ) ( ) ( i hy gx f ey dx v y g y + + + + = ⎥ ⎥ ⎥ ⎦ ⎢ ⎢ ⎢ ⎣ ⎥ ⎥ ⎥ ⎦ ⎢ ⎢ ⎢ ⎣ = ⎥ ⎥ ⎥ ⎦ ⎢ ⎢ ⎢ ⎣ 1 y i h g f e d q qv Æ The affine mapping is a special case of the projective mapping when g=h=0 mapping when g h 0 Æ The mapping conserves a line Æ A line is mapped to a line Æ The inverse mapping is also a projective mapping Æ Four points can define a projective mapping (8 degree of freedom) Bilinear Mapping Bilinear Mapping Bilinear Mapping Bilinear Mapping Æ Mapping form h gy fx exy v d cy bx axy u + + + = + + + = Æ A square can be mapped to any shaped rectangles h gy fx exy v + + + = q pp y p g Æ A vertical or horizontal line can be mapped to a line, but other directional line is not mapped to a line Æ The inverse mapping requires the computation of square roots, and it may take long time Æ Four points can define a bilinear mapping (8 degree of freedom)
  • 12. Mapping Mapping Mapping Mapping Æ Forward mapping Æ Forward mapping Æ Reverse(backward) mapping
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Bilinear Interpolation Bilinear Interpolation Bilinear Interpolation Bilinear Interpolation Æ A B C D are intensity s ) 1 ( s A B E Æ A,B,C,D are intensity values t s ) 1 ( s − A B E sB A s E + − = ) 1 ( ) 1 ( t G sD C s F sB A s E + − = + ) 1 ( ) 1 ( ) 1 ( t − C D tF E t G + − = ) 1 ( [ ] [ ] sD C s t sB A s t + − + + − − = ) 1 ( ) 1 ( ) 1 ( C D F [ ] [ ] tsD C s t sB t A s t sD C s t sB A s t + − + − + − − = + + + = ) 1 ( ) 1 ( ) 1 )( 1 ( ) 1 ( ) 1 ( ) 1 (
  • 18.
  • 19.
  • 20. Morphing Morphing Morphing Morphing Æ Morphing is an abbreviation for Æ Morphing is an abbreviation for Metamorphosis Æ It is a process of creating a smooth transition Æ It is a process of creating a smooth transition between two images Morph Morph = Warp the shape = Warp the shape + Cross + Cross dissolve the colors dissolve the colors + Cross + Cross- -dissolve the colors dissolve the colors Æ There are two kinds of morphing; Image Æ There are two kinds of morphing; Image based one and 3D model based one Morphing Demo Morphing Demo Morphing Demo Morphing Demo Vid Video W k f CMU t d t (htt // 2 d / h/) Work of CMU students (http://www-2.cs.cmu.edu/~ph/)
  • 21. Image Morphing Techniques Image Morphing Techniques Image Morphing Techniques Image Morphing Techniques Æ Cross-dissolve Æ Cross dissolve Æ Feature-based morphing (Beier & Neely’s method) Æ Mesh morphing Æ Mesh morphing Æ View morphing Æ Others Cross Cross- -Dissolve Dissolve Cross Cross Dissolve Dissolve Æ Pixel-by-pixel color interpolation Æ Pixel by pixel color interpolation Æ Very primitive Æ Not smooth transitions
  • 22. Feature Feature- -based Morphing based Morphing Feature Feature based Morphing based Morphing Feature Feature- -based Morphing(II) based Morphing(II) Feature Feature based Morphing(II) based Morphing(II) Æ Warping with multiple line pairs Æ Warping with multiple line pairs Æ The corresponding point is determined from the weighted average of points which from the weighted average of points which are determined from feature lines
  • 23. Feature Feature- -based Morphing(III) based Morphing(III) Feature Feature based Morphing(III) based Morphing(III) Æ Warping with multiple line pairs Æ Warping with multiple line pairs Feature Feature- -based Morphing(IV based Morphing(IV) ) Feature Feature based Morphing(IV based Morphing(IV) ) Æ Weights Æ Weights
  • 24.
  • 25. Mesh Morphing Mesh Morphing Mesh Morphing Mesh Morphing Æ Source and target images are meshed Æ Source and target images are meshed Æ The meshes for both images are i t l t d interpolated Æ The intermediate images are cross- Æ The intermediate images are cross dissolved Mesh Morphing Mesh Morphing Mesh Morphing Mesh Morphing
  • 26. View Morphing View Morphing View Morphing View Morphing Æ 2-D image morphing does not necessarily Æ 2 D image morphing does not necessarily preserve shape of rigid bodies in intermediate images intermediate images View Morphing View Morphing View Morphing View Morphing Æ Makes use of camera location information to project images onto parallel planes
  • 27. View Morphing Algorithm View Morphing Algorithm View Morphing Algorithm View Morphing Algorithm Æ Prewarp Æ Prewarp Æ apply projective transforms to the source images (H -1 and H -1) images (H0 -1 and H1 -1) Æ Morph Æ Use any image morphing technique Æ Postwarp Æ Postwarp Æ Apply Hs to obtain final image View Morphing View Morphing View Morphing View Morphing
  • 28. View Morphing View Morphing View Morphing View Morphing View Morphing View Morphing View Morphing View Morphing
  • 29. View Morphing View Morphing View Morphing View Morphing Vid Video