SlideShare a Scribd company logo
1 of 26
Download to read offline
CS436/CS5310/EE513
Computer Vision Fundamentals
Murtaza Taj
murtaza.taj@lums.edu.pk
Lecture 10: Factorizing Transformation
Wed, 04th Oct 2023
Factorizing Transformations
! Opposite of Concatenation of Transformations
! Given a transformation matrix, decompose it into a
sequence of simpler transformations
! Example:
! Question: How to factorize the multiplicative part?
! Is the factorization unique?
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎣
⎡
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎣
⎡
=
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎣
⎡
1
0
0
0
0
1
0
0
1
0
0
1
1
0
0
4
3
2
1
2
1
2
4
3
1
2
1
a
a
a
a
b
b
b
a
a
b
a
a
⎥
⎦
⎤
⎢
⎣
⎡
4
3
2
1
a
a
a
a
Decomposition of 2D Transforms
Decomposition of 2D Transforms
! For any given matrix M we can
decompose it into various matrix
products M=M1M2M3 = M3M4M5
etc.
! An interesting result
! any 2D transformation can be written
as
Rotation Scale Rotation
This is called the Factorization of the
matrix.
Decomposition of 2D Transforms
Decomposition of Transforms
! A vector is defined by:
! Magnitude
! Direction
! Transformation
! Can either change
! magnitude of a vector
! direction of a vector
! Or both
x
y
(x ,y)
θ
x
y
(x ,y)
(x’,y’)
θ
Decomposition of 2D Transforms
Decomposition of Transforms
! A vector is defined by:
! Magnitude
! Direction
! Transformation
! Can either change
! magnitude of a vector
! direction of a vector
! Or both
x
y
(x ,y)
θ
x
y
(x ,y)
(x’,y’)
θ
Decomposition of 2D Transforms
Decomposition of Transforms
! Transformation
! Rotation
! Non-uniform Scaling
! Rotation + Scaling | Non-uniform scaling
x
y
(x ,y)
(x’,y’)
θ
x
y
(x ,y)
(x’,y’)
x
y
(x ,y)
(x’,y’)
θ
Decomposition of 2D Transforms
Decomposition of Transforms
! Transformation
! Rotation
! Non-uniform Scaling
! Rotation + Scaling | Non-uniform scaling
x
y
(x ,y)
(x’,y’)
θ
x
y
(x ,y)
(x’,y’)
x
y
(x ,y)
(x’,y’)
θ
Decomposition of 2D Transforms
Decomposition of Transforms
! Transformation
! Rotation
! Non-uniform Scaling
! Rotation + Scaling | Non-uniform scaling
x
y
(x ,y)
(x’,y’)
θ
x
y
(x ,y)
(x’,y’)
x
y
(x ,y)
(x’,y’)
θ
Decomposition of 2D Transforms
Decomposition of Transforms
! Transformation
! Since we can only change the direction and magnitude of a vector
! Any transformation on a vector can be represented by or
decomposed into rotation and scale matrices
x
y
(x ,y)
(x’,y’)
Eigenvalues and Eigenvectors
! A matrix act on a vector by changing both its
magnitude and direction
! However, same matrix may act on certain
vectors by changing only their magnitudes and
leaving their directions unchanged (or possibly
reversing it).
! These vectors are the eigenvectors of the matrix
! A matrix act on an eigenvector u by multiply its
magnitude by a factor. This factor is the
eigenvalue λ associated with that eigenvector
x
y
(x1 ,y1)
(x’,y’)
x
y
(x2 ,y2)
(x’,y’)
Eigenvalues and Eigenvectors
! A matrix act on a vector by changing both its
magnitude and direction
! However, same matrix may act on certain
vectors by changing only their magnitudes and
leaving their directions unchanged (or possibly
reversing it).
! These vectors are the eigenvectors of the matrix
! A matrix act on an eigenvector u by multiply its
magnitude by a factor. This factor is the
eigenvalue λ associated with that eigenvector
x
y
(x1 ,y1)
(x’,y’)
x
y
(x2 ,y2)
(x’,y’)
Eigenvalues and Eigenvectors
!
!
Eigenvalues and Eigenvectors
! How to find eigenvalues?
! How to find eigenvectors
! For example for a 2x2 matrix
Eigenvalues and Eigenvectors
! How to find eigenvalues?
! How to find eigenvectors
! For example for a 2x2 matrix
Eigenvalues and Eigenvectors
Eigenvalues and Eigenvectors
! Example
! Eigenvalues
! Eigenvectors (A - λI)u=0
Eigenvalues and Eigenvectors
Eigenvalues and Eigenvectors
! Example
! Eigenvalues
! Eigenvectors (A - λI)u=0
Factorizing Transformations
! Given a transformation matrix M
! Decompose it into
! If transformation matrix is symmetric
! (M=MT)
! Eigen Value decomposition
! If transformation matrix is not symmetric
! Singular Value decomposition
1.0000 1.7321 0
M = -2.5981 1.5000 0
0 0 1.0000
[U S V] = svd(M)
2.7500 -0.4330 0
M = -0.4330 2.2500 0
0 0 1.0000
[V D] = eig(M)
Factorizing Transformations
! Given a transformation matrix M
! Decompose it into
! If transformation matrix is symmetric
! (M=MT)
! Eigen Value decomposition
! If transformation matrix is not symmetric
! Singular Value decomposition
1.0000 1.7321 0
M = -2.5981 1.5000 0
0 0 1.0000
[U S V] = svd(M)
2.7500 -0.4330 0
M = -0.4330 2.2500 0
0 0 1.0000
[V D] = eig(M)
Factorizing Transformations
! Given a transformation matrix M
! Decompose it into
! If transformation matrix is symmetric
! (M=MT)
! Eigen Value decomposition
! If transformation matrix is not symmetric
! Singular Value decomposition
1.0000 1.7321 0
M = -2.5981 1.5000 0
0 0 1.0000
[U S V] = svd(M)
2.7500 -0.4330 0
M = -0.4330 2.2500 0
0 0 1.0000
[V D] = eig(M)
Singular Value Decomposition
! Symmetric matrices (A=AT) can be decomposed as A=U Σ UT
! Non-symmetric real matrix A can be decomposed as A = UΣV*
! U and V are orthonormal (UUT=I) and Σ is diagonal
! U and V are matrices of Eigen vectors of AAT and ATA respectively
! Diagonal entries of Σ consist of the sqrt of the Eigen values of AAT or
ATA
Factorizing Transformations
! A non symmetric real matrix M can be decomposed as
M = U S VT (with U and V being orthonormal, S being a
diagonal
! To compute U S and V,
! Let A = MMT [A is symmetric, even though M isn’t]
! A = (USVT)(USVT)T
! A = US2UT
[A=ΦΛΦT , hence U=Φ and S2 = Λ]
! VT = (US)-1M
Singular Value Decomposition
! Let M be a m-by-n matrix whose entries are real numbers.
Then M may be decomposed as
M = U S VT
where:
! U is an m-by-m orthonormal matrix
! S is an m-by-n matrix with non-negative numbers on the main
diagonal and zeros elsewhere
! V is an n-by-n orthonormal matrix
! Example
http://en.wikipedia.org/wiki/Singular_value_decomposition
Singular Value Decomposition
! Implication: We can take the multiplicative part of any
transform and describe it as a sequence of a rotation,
scaling and another rotation
! 2D Example: Decomposing an Affine Transformation
M = 0.95 0.49 0.46
0.23 0.89 0.02
0 0 1
>> [U, S, V] = svd(M(1:2, 1:2))
U =
-0.78156 -0.62384
-0.62384 0.78156
S =
1.2904 0
0 0.56789
V =
-0.68658 -0.72705
-0.72705 0.68658
>> U * S * V'
ans =
0.95 0.49
0.23 0.89
Interpretation
in terms of
angles?
Decomposition of Transformations
! In summary:
! Every matrix can be decomposed via SVD into a rotation times a
scale times another rotation.
! Only symmetric matrices can be decomposed via Eigen value
decomposition into a rotation times a scale times the inverse rotation.
! Such matrices are a simple scale in an arbitrary direction.
! The SVD of a symmetric matrix will lead to same result as Eigen value
decomposition.
Summary: 2D Transformations
! Image Registration
! 2D Transformations
! Scaling
! Shear
! Rotation
! Translation
! Inverse Transformations
! Rotation about an arbitrary point
! Concatenation of
transformations
! Order of transformations
! Factorization of Transformations
! Displacement Models
! Rigid / Euclidean
! Similarity
! Affine
! Projective
! Recovering the best affine
transformation
! Least Squared Error solution
! Pseudo inverse
! Image Warping

More Related Content

Similar to dfa dfaf as

Application of Matrices in real life | Matrices application | The Matrices
Application of Matrices in real life | Matrices application | The MatricesApplication of Matrices in real life | Matrices application | The Matrices
Application of Matrices in real life | Matrices application | The MatricesSahilJhajharia
 
orthogonal matrix and its properties
orthogonal matrix and its propertiesorthogonal matrix and its properties
orthogonal matrix and its propertiesGOVINDKUMAR689610
 
Determinants, crammers law, Inverse by adjoint and the applications
Determinants, crammers law,  Inverse by adjoint and the applicationsDeterminants, crammers law,  Inverse by adjoint and the applications
Determinants, crammers law, Inverse by adjoint and the applicationsNikoBellic28
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfNehaVerma933923
 
Curso de Analisis por elementos finitos
Curso de Analisis por elementos finitosCurso de Analisis por elementos finitos
Curso de Analisis por elementos finitosEnrique C.
 
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...Steven Duplij (Stepan Douplii)
 
Iast.lect19.slides
Iast.lect19.slidesIast.lect19.slides
Iast.lect19.slidesha88ni
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraMUHAMMADUSMAN93058
 
Eigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldEigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldraykoustav145
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationSaumya Tiwari
 
Analysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsAnalysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsSpringer
 
Analysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsAnalysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsSpringer
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)irjes
 
Lecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdfLecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdfentesarkareem1
 

Similar to dfa dfaf as (20)

Application of Matrices in real life | Matrices application | The Matrices
Application of Matrices in real life | Matrices application | The MatricesApplication of Matrices in real life | Matrices application | The Matrices
Application of Matrices in real life | Matrices application | The Matrices
 
orthogonal matrix and its properties
orthogonal matrix and its propertiesorthogonal matrix and its properties
orthogonal matrix and its properties
 
Determinants, crammers law, Inverse by adjoint and the applications
Determinants, crammers law,  Inverse by adjoint and the applicationsDeterminants, crammers law,  Inverse by adjoint and the applications
Determinants, crammers law, Inverse by adjoint and the applications
 
EE8120_Projecte_15
EE8120_Projecte_15EE8120_Projecte_15
EE8120_Projecte_15
 
Variation
VariationVariation
Variation
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
 
Curso de Analisis por elementos finitos
Curso de Analisis por elementos finitosCurso de Analisis por elementos finitos
Curso de Analisis por elementos finitos
 
Matrices 1
Matrices 1Matrices 1
Matrices 1
 
Vector
VectorVector
Vector
 
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...
Conformal symmetry transformations and nonlinear Maxwell equations, G.A.Goldi...
 
Iast.lect19.slides
Iast.lect19.slidesIast.lect19.slides
Iast.lect19.slides
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear Algebra
 
Eigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldEigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt world
 
PART I.5 - Physical Mathematics
PART I.5 - Physical MathematicsPART I.5 - Physical Mathematics
PART I.5 - Physical Mathematics
 
Chern-Simons Theory
Chern-Simons TheoryChern-Simons Theory
Chern-Simons Theory
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and Rotation
 
Analysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsAnalysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifolds
 
Analysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifoldsAnalysis and algebra on differentiable manifolds
Analysis and algebra on differentiable manifolds
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
 
Lecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdfLecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdf
 

Recently uploaded

一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理
一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理
一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理owvuwg
 
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单ahgeo
 
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution Founder
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution FounderSteak Tenderizing Case Study by Adam Wojtow, Steak Revolution Founder
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution FounderAdam Wojtow
 
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单ahgeo
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单azfuce
 
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...GilbertObanil2
 
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理owvuwg
 
Caspian Sea Resataurnt Lunch Buffet Menu
Caspian Sea Resataurnt Lunch Buffet MenuCaspian Sea Resataurnt Lunch Buffet Menu
Caspian Sea Resataurnt Lunch Buffet Menuhajraiftikhar5
 
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...Amil baba
 
Functional properties of egg.123456789123456789123456789
Functional properties of egg.123456789123456789123456789Functional properties of egg.123456789123456789123456789
Functional properties of egg.123456789123456789123456789eshakanwal932
 
5 Ways Sea Moss Can Improve Thyroid Function
5 Ways Sea Moss Can Improve Thyroid Function5 Ways Sea Moss Can Improve Thyroid Function
5 Ways Sea Moss Can Improve Thyroid FunctionJoy Ecc
 
一比一原版(UW毕业证)华盛顿大学毕业证成绩单
一比一原版(UW毕业证)华盛顿大学毕业证成绩单一比一原版(UW毕业证)华盛顿大学毕业证成绩单
一比一原版(UW毕业证)华盛顿大学毕业证成绩单huskn
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单huskn
 
Health Benefits of Turnips - Turning up the Nutritional Value.pdf
Health Benefits of Turnips - Turning up the Nutritional Value.pdfHealth Benefits of Turnips - Turning up the Nutritional Value.pdf
Health Benefits of Turnips - Turning up the Nutritional Value.pdfKitchaissance Blog
 
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单azfuce
 
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单efbuqu
 
Drug Regulatory Authority of Pakistan (DRAP).pptx
Drug Regulatory Authority of Pakistan (DRAP).pptxDrug Regulatory Authority of Pakistan (DRAP).pptx
Drug Regulatory Authority of Pakistan (DRAP).pptxShafaatHussain20
 
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdf
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdfCONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdf
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdfparvin6647
 
Understanding the Food Industry of India
Understanding the Food Industry of IndiaUnderstanding the Food Industry of India
Understanding the Food Industry of Indiashrishtijain1809
 
Roskill Fish and Chips | Auckland | New
Roskill Fish and Chips | Auckland  | NewRoskill Fish and Chips | Auckland  | New
Roskill Fish and Chips | Auckland | NewRoskill Fish Chips
 

Recently uploaded (20)

一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理
一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理
一比一原版OP毕业证奥塔哥理工学院毕业证成绩单如何办理
 
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单
一比一原版(UCLA毕业证)加利福尼亚大学|洛杉矶分校毕业证成绩单
 
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution Founder
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution FounderSteak Tenderizing Case Study by Adam Wojtow, Steak Revolution Founder
Steak Tenderizing Case Study by Adam Wojtow, Steak Revolution Founder
 
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单
一比一原版(UCB毕业证)加利福尼亚大学|伯克利分校毕业证成绩单
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证成绩单
 
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...
Assessing the COOKING SKILLS Development of Grade 11 Cookery Students in Cari...
 
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理
一比一原版UC毕业证坎特伯雷大学毕业证成绩单如何办理
 
Caspian Sea Resataurnt Lunch Buffet Menu
Caspian Sea Resataurnt Lunch Buffet MenuCaspian Sea Resataurnt Lunch Buffet Menu
Caspian Sea Resataurnt Lunch Buffet Menu
 
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...
NO1 Qari Amil Baba Bangali Baba | Aamil baba Taweez Online Kala Jadu kala jad...
 
Functional properties of egg.123456789123456789123456789
Functional properties of egg.123456789123456789123456789Functional properties of egg.123456789123456789123456789
Functional properties of egg.123456789123456789123456789
 
5 Ways Sea Moss Can Improve Thyroid Function
5 Ways Sea Moss Can Improve Thyroid Function5 Ways Sea Moss Can Improve Thyroid Function
5 Ways Sea Moss Can Improve Thyroid Function
 
一比一原版(UW毕业证)华盛顿大学毕业证成绩单
一比一原版(UW毕业证)华盛顿大学毕业证成绩单一比一原版(UW毕业证)华盛顿大学毕业证成绩单
一比一原版(UW毕业证)华盛顿大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Health Benefits of Turnips - Turning up the Nutritional Value.pdf
Health Benefits of Turnips - Turning up the Nutritional Value.pdfHealth Benefits of Turnips - Turning up the Nutritional Value.pdf
Health Benefits of Turnips - Turning up the Nutritional Value.pdf
 
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证成绩单
 
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单
一比一原版(UC Davis毕业证)加州大学|戴维斯分校毕业证成绩单
 
Drug Regulatory Authority of Pakistan (DRAP).pptx
Drug Regulatory Authority of Pakistan (DRAP).pptxDrug Regulatory Authority of Pakistan (DRAP).pptx
Drug Regulatory Authority of Pakistan (DRAP).pptx
 
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdf
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdfCONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdf
CONDENSED MILK - GROWTH AND SURVIVAL OF MICROORGANISM.pdf
 
Understanding the Food Industry of India
Understanding the Food Industry of IndiaUnderstanding the Food Industry of India
Understanding the Food Industry of India
 
Roskill Fish and Chips | Auckland | New
Roskill Fish and Chips | Auckland  | NewRoskill Fish and Chips | Auckland  | New
Roskill Fish and Chips | Auckland | New
 

dfa dfaf as

  • 1. CS436/CS5310/EE513 Computer Vision Fundamentals Murtaza Taj murtaza.taj@lums.edu.pk Lecture 10: Factorizing Transformation Wed, 04th Oct 2023
  • 2. Factorizing Transformations ! Opposite of Concatenation of Transformations ! Given a transformation matrix, decompose it into a sequence of simpler transformations ! Example: ! Question: How to factorize the multiplicative part? ! Is the factorization unique? ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 4 3 2 1 2 1 2 4 3 1 2 1 a a a a b b b a a b a a ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ 4 3 2 1 a a a a
  • 3. Decomposition of 2D Transforms Decomposition of 2D Transforms ! For any given matrix M we can decompose it into various matrix products M=M1M2M3 = M3M4M5 etc. ! An interesting result ! any 2D transformation can be written as Rotation Scale Rotation This is called the Factorization of the matrix.
  • 4. Decomposition of 2D Transforms Decomposition of Transforms ! A vector is defined by: ! Magnitude ! Direction ! Transformation ! Can either change ! magnitude of a vector ! direction of a vector ! Or both x y (x ,y) θ x y (x ,y) (x’,y’) θ
  • 5. Decomposition of 2D Transforms Decomposition of Transforms ! A vector is defined by: ! Magnitude ! Direction ! Transformation ! Can either change ! magnitude of a vector ! direction of a vector ! Or both x y (x ,y) θ x y (x ,y) (x’,y’) θ
  • 6. Decomposition of 2D Transforms Decomposition of Transforms ! Transformation ! Rotation ! Non-uniform Scaling ! Rotation + Scaling | Non-uniform scaling x y (x ,y) (x’,y’) θ x y (x ,y) (x’,y’) x y (x ,y) (x’,y’) θ
  • 7. Decomposition of 2D Transforms Decomposition of Transforms ! Transformation ! Rotation ! Non-uniform Scaling ! Rotation + Scaling | Non-uniform scaling x y (x ,y) (x’,y’) θ x y (x ,y) (x’,y’) x y (x ,y) (x’,y’) θ
  • 8. Decomposition of 2D Transforms Decomposition of Transforms ! Transformation ! Rotation ! Non-uniform Scaling ! Rotation + Scaling | Non-uniform scaling x y (x ,y) (x’,y’) θ x y (x ,y) (x’,y’) x y (x ,y) (x’,y’) θ
  • 9. Decomposition of 2D Transforms Decomposition of Transforms ! Transformation ! Since we can only change the direction and magnitude of a vector ! Any transformation on a vector can be represented by or decomposed into rotation and scale matrices x y (x ,y) (x’,y’)
  • 10. Eigenvalues and Eigenvectors ! A matrix act on a vector by changing both its magnitude and direction ! However, same matrix may act on certain vectors by changing only their magnitudes and leaving their directions unchanged (or possibly reversing it). ! These vectors are the eigenvectors of the matrix ! A matrix act on an eigenvector u by multiply its magnitude by a factor. This factor is the eigenvalue λ associated with that eigenvector x y (x1 ,y1) (x’,y’) x y (x2 ,y2) (x’,y’)
  • 11. Eigenvalues and Eigenvectors ! A matrix act on a vector by changing both its magnitude and direction ! However, same matrix may act on certain vectors by changing only their magnitudes and leaving their directions unchanged (or possibly reversing it). ! These vectors are the eigenvectors of the matrix ! A matrix act on an eigenvector u by multiply its magnitude by a factor. This factor is the eigenvalue λ associated with that eigenvector x y (x1 ,y1) (x’,y’) x y (x2 ,y2) (x’,y’)
  • 13. !
  • 14. Eigenvalues and Eigenvectors ! How to find eigenvalues? ! How to find eigenvectors ! For example for a 2x2 matrix
  • 15. Eigenvalues and Eigenvectors ! How to find eigenvalues? ! How to find eigenvectors ! For example for a 2x2 matrix
  • 16. Eigenvalues and Eigenvectors Eigenvalues and Eigenvectors ! Example ! Eigenvalues ! Eigenvectors (A - λI)u=0
  • 17. Eigenvalues and Eigenvectors Eigenvalues and Eigenvectors ! Example ! Eigenvalues ! Eigenvectors (A - λI)u=0
  • 18. Factorizing Transformations ! Given a transformation matrix M ! Decompose it into ! If transformation matrix is symmetric ! (M=MT) ! Eigen Value decomposition ! If transformation matrix is not symmetric ! Singular Value decomposition 1.0000 1.7321 0 M = -2.5981 1.5000 0 0 0 1.0000 [U S V] = svd(M) 2.7500 -0.4330 0 M = -0.4330 2.2500 0 0 0 1.0000 [V D] = eig(M)
  • 19. Factorizing Transformations ! Given a transformation matrix M ! Decompose it into ! If transformation matrix is symmetric ! (M=MT) ! Eigen Value decomposition ! If transformation matrix is not symmetric ! Singular Value decomposition 1.0000 1.7321 0 M = -2.5981 1.5000 0 0 0 1.0000 [U S V] = svd(M) 2.7500 -0.4330 0 M = -0.4330 2.2500 0 0 0 1.0000 [V D] = eig(M)
  • 20. Factorizing Transformations ! Given a transformation matrix M ! Decompose it into ! If transformation matrix is symmetric ! (M=MT) ! Eigen Value decomposition ! If transformation matrix is not symmetric ! Singular Value decomposition 1.0000 1.7321 0 M = -2.5981 1.5000 0 0 0 1.0000 [U S V] = svd(M) 2.7500 -0.4330 0 M = -0.4330 2.2500 0 0 0 1.0000 [V D] = eig(M)
  • 21. Singular Value Decomposition ! Symmetric matrices (A=AT) can be decomposed as A=U Σ UT ! Non-symmetric real matrix A can be decomposed as A = UΣV* ! U and V are orthonormal (UUT=I) and Σ is diagonal ! U and V are matrices of Eigen vectors of AAT and ATA respectively ! Diagonal entries of Σ consist of the sqrt of the Eigen values of AAT or ATA
  • 22. Factorizing Transformations ! A non symmetric real matrix M can be decomposed as M = U S VT (with U and V being orthonormal, S being a diagonal ! To compute U S and V, ! Let A = MMT [A is symmetric, even though M isn’t] ! A = (USVT)(USVT)T ! A = US2UT [A=ΦΛΦT , hence U=Φ and S2 = Λ] ! VT = (US)-1M
  • 23. Singular Value Decomposition ! Let M be a m-by-n matrix whose entries are real numbers. Then M may be decomposed as M = U S VT where: ! U is an m-by-m orthonormal matrix ! S is an m-by-n matrix with non-negative numbers on the main diagonal and zeros elsewhere ! V is an n-by-n orthonormal matrix ! Example http://en.wikipedia.org/wiki/Singular_value_decomposition
  • 24. Singular Value Decomposition ! Implication: We can take the multiplicative part of any transform and describe it as a sequence of a rotation, scaling and another rotation ! 2D Example: Decomposing an Affine Transformation M = 0.95 0.49 0.46 0.23 0.89 0.02 0 0 1 >> [U, S, V] = svd(M(1:2, 1:2)) U = -0.78156 -0.62384 -0.62384 0.78156 S = 1.2904 0 0 0.56789 V = -0.68658 -0.72705 -0.72705 0.68658 >> U * S * V' ans = 0.95 0.49 0.23 0.89 Interpretation in terms of angles?
  • 25. Decomposition of Transformations ! In summary: ! Every matrix can be decomposed via SVD into a rotation times a scale times another rotation. ! Only symmetric matrices can be decomposed via Eigen value decomposition into a rotation times a scale times the inverse rotation. ! Such matrices are a simple scale in an arbitrary direction. ! The SVD of a symmetric matrix will lead to same result as Eigen value decomposition.
  • 26. Summary: 2D Transformations ! Image Registration ! 2D Transformations ! Scaling ! Shear ! Rotation ! Translation ! Inverse Transformations ! Rotation about an arbitrary point ! Concatenation of transformations ! Order of transformations ! Factorization of Transformations ! Displacement Models ! Rigid / Euclidean ! Similarity ! Affine ! Projective ! Recovering the best affine transformation ! Least Squared Error solution ! Pseudo inverse ! Image Warping