Procrustes distance formula explanation

조회 수: 16 (최근 30일)
dipak sanap
dipak sanap 2024년 2월 25일
답변: Shlok 2024년 9월 4일
Hi, I am using procrustes function from matlab. I am done with the analysis and getting the expected results. Now, I need to write the mathamatical disciption of the formula.
According the explanation on the matlab page,
The procrustes function finds the Procrustes transformation, which is the best shape-preserving Euclidean transformation (consisting of rotation, reflection, scaling, and translation) between the two shapes X and Y. The Procrustes transformation is an optimal transformation that minimizes the sum of squared differences between the landmark points in X and Z, where Z is the transformed shape of Y that results from superimposing Y onto X.
Is there a way to get the equations that matlab uses for the Procrustes transformation?

답변 (1개)

Shlok
Shlok 2024년 9월 4일
Hi Dipak,
To explore the formulas behind the Procrustes transformation, you can directly view the source code of the “procrustes” function in MATLAB. To do this, type the following command in the command window:
open procrustes;
The formulas used in the “procrustes” function are as follows:
1. Centering:
Subtract the mean of each dataset to center them at the origin:
where and are the means of X and Y.
2. Normalization:
Compute the Frobenius norms (square root of the sum of squared elements) of the centered datasets:
Scale both datasets to unit norm:
3. Optimal rotation and reflection:
Compute the optimal rotation/reflection matrix T that aligns and :
where U and V are the orthogonal matrices from the Singular Value Decomposition (SVD) of A.
4. Reflection handling:
If det(T)<0 and reflection is not desired, adjust T to ensure it's orthogonal with a positive determinant.
5. Scaling:
Compute the optimal scaling factor b if scaling is enabled:
If scaling is not enabled, set b=1.
6. Transformation and distance:
The transformed shape Z is given by:
The sum of squared differences (dissimilarity) is computed as:
Therefore, by using the “open” command, we can view the source code of any function or class in MATLAB. To know more about "open" function, refer to the following documentation link:

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by