SlideShare a Scribd company logo
1 of 69
Digital Image
Processing
Dr. Rajib Kumar Jha
Associate Professor
Depart of Electrical Engineering
Indian Institute of Technology Patna
jharajib@iitp.ac.in
Lecture
Notes-2021
1
Lecture-7-8
Interpolation & Re-sampling
2
Contents
• Interpolation Operations
• When interpolation operations are needed
• B-Spline interpolations
3
Image Interpolation & Re-sampling
4
𝑆𝑥=3 & 𝑆𝑦=3
𝑥
𝑦 =
𝑆𝑥 0
0 𝑆𝑦
𝑥
𝑦
9 pixels are filled and
rest pixels are Unfilled,
showed by blue cross
Scaled Image
5
Image Interpolation & Re-sampling
(a) (b)
Transformed coordinates are not integers so
many transformed co-ordinates will be mapped
to one nearest integer co-ordinates.
𝑥 = 450
& y=450
0,0 → (0,0)
0,1 → (0.707,0.707)
0,2 → (1.414,1.414)
(1,0) → (0.707, −0.707)
1,1 → (1.414,0)
1,2 → (2.121,0.707)
(2,0) → (1.414, −1.414)
(2,1) → (2.121, −0.707)
2,2 → (2.828,0)
Rotated Image
7
Image Interpolation & Re-sampling
8
𝑆𝑥=3 & 𝑆𝑦=3
𝑥
𝑦 =
𝑆𝑥 0
0 𝑆𝑦
𝑥
𝑦
x=1/3 & y=1/3
Image Interpolation & Re-sampling
(a) (b)
Transformed coordinates are not integers so
many transformed co-ordinates will be mapped
to one nearest integer co-ordinates.
𝑥 = 450
& y=450
0,0 → (0,0)
0,1 → (0.707,0.707)
0,2 → (1.414,1.414)
(1,0) → (0.707, −0.707)
1,1 → (1.414,0)
1,2 → (2.121,0.707)
(2,0) → (1.414, −1.414)
(2,1) → (2.121, −0.707)
2,2 → (2.828,0)
Sampled Signal
Sampled Signal
1. We may need to find out the approximate value of these
functions at say t = 2.3 or say t = 3.7 and so on.
2. The purpose of image interpolation is by making use of the
sample values at distinct locations.
3. So, reconstruct the value of the function f(t) at any arbitrary
point in the time axis.
Properties of Interpolation
Properties
• I want to approximate the function value at locations
say t = 2.3, then the samples that should be
considered are the samples which are nearer to t =
2.3. We should not consider sample value at t = 50.
• we should not introduce any discontinuity in the
signal.
• Interpolation must be shift invariant. That is if we
shift the signal by say t = 5, even then the same
interpolation operation should give us the same
result in the same interval.
B-Spline Function
• B-Spline function is a piece wise polynomial
function that can be used to provide local
approximation of curves using very small number
of parameters.
• Because it is useful for local approximation of
curves so it can be very useful for smoothening
operation of some discrete curves,
• It is also very-very useful for interpolation of a
function from discrete number of samples.
B-Spline Function
15
So, this control points actually decide that how the B-spline
functions should be guided to give us a smooth curve.
Normalized B spline is Bi,k
of order k can be
recursively defined.
Pi is called control point
t
t
t
t
t
t
t
t
t
t t
t
t
t
B-Spline Function
𝐵0,1 t =
1 0 ≤ 𝑡 < 1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝐵0,2 t =
𝑡 0 ≤ 𝑡 < 1
2 − 𝑡 1 ≤ 𝑡 < 2
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝐵0,3 t =
𝑡2
2
0 ≤ 𝑡 < 1
−𝑡2
+ 3𝑡 − 1.5 1 ≤ 𝑡 < 2
(3−𝑡)2
2
2 ≤ 𝑡 < 3
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
B-Spline Function
𝐵0,4 t =
𝑡3
6
0 ≤ 𝑡 < 1
−3𝑡3 + 12𝑡2 − 12𝑡 + 4
6
1 ≤ 𝑡 < 2
3𝑡3
− 24𝑡2
+ 60𝑡 − 44
6
2 ≤ 𝑡 < 3
(4 − 𝑡)3
6
3 ≤ 𝑡 < 4
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Graphical Representation of B-Spline
Constant Interpolation
Constant Interpolation
Linear Interpolation
21
Linear Interpolation
22
Linear Interpolation
Modified interpolation Formula
Modified interpolation Formula
25
Modified interpolation Formula
26
Now with p0 we will consider B-spline from -0.5 to 0.5; for p1
B-spline function lie between 0.5 to 1.5 and so on.
B-spline Cubic interpolation function
27
Constant Interpolation
Constant Interpolation
Constant Interpolation
B-spline interpolation functions
Linear Interpolation
Cubic Interpolation
Example
• f(1)=1.5 Calculate f(4.3) ????
• f(2)=2.5 Given these sample values
• f(3)=3 Use Cubic interpolation
• f(4)=2.5
• f(5)=3
• f(6)=2.4
• f(7)=1
• F (8)=2.5
Example
𝑓 4.3 = 𝑓(3)𝐵1,4(4.3) + 𝑓(4)𝐵2,4(4.3) +
𝑓(5)𝐵3,4(4.3)+ 𝑓(6)𝐵4,4(4.3)
𝐵𝑖,𝑘 𝑡 = 𝐵0,𝑘(𝑡 − 𝑖)
= 𝑓(3)𝐵0,4(3.3) + 𝑓(4)𝐵0,4(2.3) +
𝑓 5 𝐵0,4 1.3 + 𝑓(6)𝐵0,4(0.3)
=2.7068 Constant interpolation=2.5
Linear Interpolation=2.65
Interpolation in Image
Scaling
Result
Rotation
Thanks
40
Contents
• Explain Image Transformation operations.
• Explain Unitary Transformations.
• Explain Orthogonal and Orthonormal basis vector.
• Explain how an arbitrary 1-D signal and
subsequently 2-D signal can be represented by
series summation of orthogonal basis vectors and
basis images.
• Computational Complexity of Image Transform
operation.
• Explain Separable Unitary Transformations.
By transformation getting an another image and by using
inverse transformation, get back the original image; then
why do we go for this transformation at all?
Image Transformations
The purpose of this image transformation operation is to
represent any arbitrary image as a series summation of such
unitary matrices or series summation of such basis images.
What is Unitary Transformation
• Discrete Fourier transform
coefficients or discrete cosine
transform coefficients, are different
types of unitary transformations.
Image Transformations
Let x (t) is an arbitrary signal which is a function of t.
Now signal x(t) can be represented as a series
summation of a set of unitary matrices or orthogonal
basis function.
Let {an (t)} is a set of real values
continuous fn.
𝑎𝑛 𝑡 = {𝑎0 𝑡 , 𝑎1 𝑡 , 𝑎𝑛 𝑡 ………}
Orthogonality condition is
0
𝑇
𝑎𝑚 𝑡 . 𝑎𝑛 𝑡 𝑑𝑡 =
𝑘 𝑖𝑓 𝑚 = 𝑛
0 𝑖𝑓 𝑚 ≠ 𝑛
X(t)
Image Transformation: An example
1. if I multiply sin(wt) with sin(3wt) and integrate, Similarly,
if I multiply sin(2wt) with sin(3wt) and integrate it will
be zero.
2. This particular set, sin(wt), sin(2wt), sin(3wt), is the set
of orthogonal basis functions.
Let x(t) is an arbitrary real values function.
This function x (t) can be represented by a series summation. So,
an (t) is the set of orthogonal basis functions.
by using that formula of orthogonality,
Properties of Basis function an(t)
an(t) is complete or closed if one of the two conditions hold.
1. There should be a signal x(t) having finite energy.
2. For any piecewise signal x(t), error energy should be
minimum.
• Let u(n) is a series of discrete samples represented in
the form of 1-D sequences. It has N samples
• For transformed vector v multiply u with
Transformation vector A. A is called unitary matrix of
size NxN
Discrete Sample Representation
u(n) : 0≤n≤ 𝑁 − 1
v = Au where
v is transformed vector and
A is Transformation vector
Unitary Matrix
53
u(n) is represented as the series summation of set
of basis vector. If it has the property of orthogonal
then above condition holds.
Now, the same concept of representing a vector as a
series summation of a set of basis vectors can also
be extended in case of an image.
Here {ak,l (m,n) } is called an image transform; is a
set of complete orthogonal discrete basis functions
satisfying two properties ORTHOGONALITY AND
COMPLETENESS
Properties of image transform an(t)
Previous Discussion
u(n) is one dimensional discrete signal. In
matrix representation
This transformation is unitary transformation if
Previous Discussion
The original image can be obtained as u=A-1v. This
expression says that the input sequence u (n) is now
represented in the form of series summation of a set of
vectors or orthonormal basis vectors.
Previous Discussion-2D
Set of Complete orthonormal basis function
Reduce the computational complexity (N4)
is separable if and only if
Separable Unitary Transform property
=
{
{
This is complete orthogonal basis vectors
How this Separable Unitary Transform
helps in reducing the complexity
A =B
A has NxN size; U has NxN size ; So, Order of AU is
O(N3 ); Order of A is O(N3 ); Order of V is 2*O(N3 )
DFT Basis Images
DCT Basis Images
Example: A is orthogonal matrix & U is
input image; V=AUAT
Transformed Image
What is Basis Images
Thanks
69

More Related Content

Similar to DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx

Lossless image compression via by lifting scheme
Lossless image compression via by lifting schemeLossless image compression via by lifting scheme
Lossless image compression via by lifting schemeSubhashini Subramanian
 
Design of sampled data control systems part 2. 6th lecture
Design of sampled data control systems part 2.  6th lectureDesign of sampled data control systems part 2.  6th lecture
Design of sampled data control systems part 2. 6th lectureKhalaf Gaeid Alshammery
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsAmr E. Mohamed
 
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya Malek
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya MalekDIP ch 11 part 2 Feature Extraction By Mohammad Pooya Malek
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya MalekMohammadPooya Malek
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration methodshashikant pabari
 
04 programming 2
04 programming 204 programming 2
04 programming 2Tareq Qazi
 
Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Charlton Inao
 
Stability and pole location
Stability and pole locationStability and pole location
Stability and pole locationssuser5d64bb
 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesYong Heui Cho
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformAmr E. Mohamed
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisAmr E. Mohamed
 
Biomedical Control systems-Block Diagram Reduction Techniques.pptx
Biomedical Control systems-Block Diagram Reduction Techniques.pptxBiomedical Control systems-Block Diagram Reduction Techniques.pptx
Biomedical Control systems-Block Diagram Reduction Techniques.pptxAmnaMuneer9
 

Similar to DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx (20)

Lossless image compression via by lifting scheme
Lossless image compression via by lifting schemeLossless image compression via by lifting scheme
Lossless image compression via by lifting scheme
 
Design of sampled data control systems part 2. 6th lecture
Design of sampled data control systems part 2.  6th lectureDesign of sampled data control systems part 2.  6th lecture
Design of sampled data control systems part 2. 6th lecture
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
 
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya Malek
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya MalekDIP ch 11 part 2 Feature Extraction By Mohammad Pooya Malek
DIP ch 11 part 2 Feature Extraction By Mohammad Pooya Malek
 
Digtial Image Processing Q@A
Digtial Image Processing Q@ADigtial Image Processing Q@A
Digtial Image Processing Q@A
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration method
 
04 programming 2
04 programming 204 programming 2
04 programming 2
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
 
3 D Graphics
3 D Graphics3 D Graphics
3 D Graphics
 
Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05Wk 6 part 2 non linearites and non linearization april 05
Wk 6 part 2 non linearites and non linearization april 05
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
Stability and pole location
Stability and pole locationStability and pole location
Stability and pole location
 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivatives
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
 
B spline
B splineB spline
B spline
 
Digital Signal Processing Assignment Help
Digital Signal Processing Assignment HelpDigital Signal Processing Assignment Help
Digital Signal Processing Assignment Help
 
Lec20
Lec20Lec20
Lec20
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
 
Biomedical Control systems-Block Diagram Reduction Techniques.pptx
Biomedical Control systems-Block Diagram Reduction Techniques.pptxBiomedical Control systems-Block Diagram Reduction Techniques.pptx
Biomedical Control systems-Block Diagram Reduction Techniques.pptx
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

DIP_Lecture-35_36_RKJ_Interpolation_Resampling_Unitary_Transformations1.pptx

  • 1. Digital Image Processing Dr. Rajib Kumar Jha Associate Professor Depart of Electrical Engineering Indian Institute of Technology Patna jharajib@iitp.ac.in Lecture Notes-2021 1
  • 3. Contents • Interpolation Operations • When interpolation operations are needed • B-Spline interpolations 3
  • 4. Image Interpolation & Re-sampling 4 𝑆𝑥=3 & 𝑆𝑦=3 𝑥 𝑦 = 𝑆𝑥 0 0 𝑆𝑦 𝑥 𝑦 9 pixels are filled and rest pixels are Unfilled, showed by blue cross
  • 6. Image Interpolation & Re-sampling (a) (b) Transformed coordinates are not integers so many transformed co-ordinates will be mapped to one nearest integer co-ordinates. 𝑥 = 450 & y=450 0,0 → (0,0) 0,1 → (0.707,0.707) 0,2 → (1.414,1.414) (1,0) → (0.707, −0.707) 1,1 → (1.414,0) 1,2 → (2.121,0.707) (2,0) → (1.414, −1.414) (2,1) → (2.121, −0.707) 2,2 → (2.828,0)
  • 8. Image Interpolation & Re-sampling 8 𝑆𝑥=3 & 𝑆𝑦=3 𝑥 𝑦 = 𝑆𝑥 0 0 𝑆𝑦 𝑥 𝑦 x=1/3 & y=1/3
  • 9. Image Interpolation & Re-sampling (a) (b) Transformed coordinates are not integers so many transformed co-ordinates will be mapped to one nearest integer co-ordinates. 𝑥 = 450 & y=450 0,0 → (0,0) 0,1 → (0.707,0.707) 0,2 → (1.414,1.414) (1,0) → (0.707, −0.707) 1,1 → (1.414,0) 1,2 → (2.121,0.707) (2,0) → (1.414, −1.414) (2,1) → (2.121, −0.707) 2,2 → (2.828,0)
  • 11. Sampled Signal 1. We may need to find out the approximate value of these functions at say t = 2.3 or say t = 3.7 and so on. 2. The purpose of image interpolation is by making use of the sample values at distinct locations. 3. So, reconstruct the value of the function f(t) at any arbitrary point in the time axis.
  • 13. Properties • I want to approximate the function value at locations say t = 2.3, then the samples that should be considered are the samples which are nearer to t = 2.3. We should not consider sample value at t = 50. • we should not introduce any discontinuity in the signal. • Interpolation must be shift invariant. That is if we shift the signal by say t = 5, even then the same interpolation operation should give us the same result in the same interval.
  • 14. B-Spline Function • B-Spline function is a piece wise polynomial function that can be used to provide local approximation of curves using very small number of parameters. • Because it is useful for local approximation of curves so it can be very useful for smoothening operation of some discrete curves, • It is also very-very useful for interpolation of a function from discrete number of samples.
  • 15. B-Spline Function 15 So, this control points actually decide that how the B-spline functions should be guided to give us a smooth curve. Normalized B spline is Bi,k of order k can be recursively defined. Pi is called control point t t t t t t t t t t t t t t
  • 16. B-Spline Function 𝐵0,1 t = 1 0 ≤ 𝑡 < 1 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 𝐵0,2 t = 𝑡 0 ≤ 𝑡 < 1 2 − 𝑡 1 ≤ 𝑡 < 2 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 𝐵0,3 t = 𝑡2 2 0 ≤ 𝑡 < 1 −𝑡2 + 3𝑡 − 1.5 1 ≤ 𝑡 < 2 (3−𝑡)2 2 2 ≤ 𝑡 < 3 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
  • 17. B-Spline Function 𝐵0,4 t = 𝑡3 6 0 ≤ 𝑡 < 1 −3𝑡3 + 12𝑡2 − 12𝑡 + 4 6 1 ≤ 𝑡 < 2 3𝑡3 − 24𝑡2 + 60𝑡 − 44 6 2 ≤ 𝑡 < 3 (4 − 𝑡)3 6 3 ≤ 𝑡 < 4 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
  • 26. Modified interpolation Formula 26 Now with p0 we will consider B-spline from -0.5 to 0.5; for p1 B-spline function lie between 0.5 to 1.5 and so on.
  • 34. Example • f(1)=1.5 Calculate f(4.3) ???? • f(2)=2.5 Given these sample values • f(3)=3 Use Cubic interpolation • f(4)=2.5 • f(5)=3 • f(6)=2.4 • f(7)=1 • F (8)=2.5
  • 35. Example 𝑓 4.3 = 𝑓(3)𝐵1,4(4.3) + 𝑓(4)𝐵2,4(4.3) + 𝑓(5)𝐵3,4(4.3)+ 𝑓(6)𝐵4,4(4.3) 𝐵𝑖,𝑘 𝑡 = 𝐵0,𝑘(𝑡 − 𝑖) = 𝑓(3)𝐵0,4(3.3) + 𝑓(4)𝐵0,4(2.3) + 𝑓 5 𝐵0,4 1.3 + 𝑓(6)𝐵0,4(0.3) =2.7068 Constant interpolation=2.5 Linear Interpolation=2.65
  • 41. Contents • Explain Image Transformation operations. • Explain Unitary Transformations. • Explain Orthogonal and Orthonormal basis vector. • Explain how an arbitrary 1-D signal and subsequently 2-D signal can be represented by series summation of orthogonal basis vectors and basis images. • Computational Complexity of Image Transform operation. • Explain Separable Unitary Transformations.
  • 42. By transformation getting an another image and by using inverse transformation, get back the original image; then why do we go for this transformation at all?
  • 44. The purpose of this image transformation operation is to represent any arbitrary image as a series summation of such unitary matrices or series summation of such basis images.
  • 45. What is Unitary Transformation • Discrete Fourier transform coefficients or discrete cosine transform coefficients, are different types of unitary transformations.
  • 46. Image Transformations Let x (t) is an arbitrary signal which is a function of t. Now signal x(t) can be represented as a series summation of a set of unitary matrices or orthogonal basis function. Let {an (t)} is a set of real values continuous fn. 𝑎𝑛 𝑡 = {𝑎0 𝑡 , 𝑎1 𝑡 , 𝑎𝑛 𝑡 ………} Orthogonality condition is 0 𝑇 𝑎𝑚 𝑡 . 𝑎𝑛 𝑡 𝑑𝑡 = 𝑘 𝑖𝑓 𝑚 = 𝑛 0 𝑖𝑓 𝑚 ≠ 𝑛 X(t)
  • 47. Image Transformation: An example 1. if I multiply sin(wt) with sin(3wt) and integrate, Similarly, if I multiply sin(2wt) with sin(3wt) and integrate it will be zero. 2. This particular set, sin(wt), sin(2wt), sin(3wt), is the set of orthogonal basis functions.
  • 48. Let x(t) is an arbitrary real values function. This function x (t) can be represented by a series summation. So, an (t) is the set of orthogonal basis functions.
  • 49. by using that formula of orthogonality,
  • 50. Properties of Basis function an(t) an(t) is complete or closed if one of the two conditions hold. 1. There should be a signal x(t) having finite energy. 2. For any piecewise signal x(t), error energy should be minimum.
  • 51. • Let u(n) is a series of discrete samples represented in the form of 1-D sequences. It has N samples • For transformed vector v multiply u with Transformation vector A. A is called unitary matrix of size NxN Discrete Sample Representation u(n) : 0≤n≤ 𝑁 − 1 v = Au where v is transformed vector and A is Transformation vector
  • 53. 53
  • 54.
  • 55. u(n) is represented as the series summation of set of basis vector. If it has the property of orthogonal then above condition holds.
  • 56. Now, the same concept of representing a vector as a series summation of a set of basis vectors can also be extended in case of an image.
  • 57. Here {ak,l (m,n) } is called an image transform; is a set of complete orthogonal discrete basis functions satisfying two properties ORTHOGONALITY AND COMPLETENESS Properties of image transform an(t)
  • 58.
  • 59. Previous Discussion u(n) is one dimensional discrete signal. In matrix representation This transformation is unitary transformation if
  • 60. Previous Discussion The original image can be obtained as u=A-1v. This expression says that the input sequence u (n) is now represented in the form of series summation of a set of vectors or orthonormal basis vectors.
  • 61. Previous Discussion-2D Set of Complete orthonormal basis function
  • 62. Reduce the computational complexity (N4) is separable if and only if Separable Unitary Transform property = { { This is complete orthogonal basis vectors
  • 63. How this Separable Unitary Transform helps in reducing the complexity A =B
  • 64. A has NxN size; U has NxN size ; So, Order of AU is O(N3 ); Order of A is O(N3 ); Order of V is 2*O(N3 )
  • 67. Example: A is orthogonal matrix & U is input image; V=AUAT Transformed Image
  • 68. What is Basis Images