Absolute Orientation

버전 1.3.0.0 (2.38 KB) 작성자: Christian Wengert
Computes the transformation to register two corresponding 3D point sets.
다운로드 수: 4.2K
업데이트 날짜: 2010/6/9

라이선스 보기

[s R T error] = absoluteOrientationQuaternion( A, B, doScale)

Computes the orientation and position (and optionally the uniform scale factor) for the transformation between two corresponding 3D point sets Ai and Bi such as they are related by:

Bi = sR*Ai+T

Implementation is based on the paper by Berthold K.P. Horn:
"Closed-from solution of absolute orientation using unit quaternions"
The paper can be downloaded here:
http://people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf

Authors:
Dr. Christian Wengert, Dr. Gerald Bianchi

Copyright:
ETH Zurich, Computer Vision Laboratory, Switzerland

Parameters:
A 3xN matrix representing the N 3D points
B 3xN matrix representing the N 3D points
doScale Flag indicating whether to estimate the uniform scale factor as well [default=0]

Return:
s The scale factor
R The 3x3 rotation matrix
T The 3x1 translation vector
err Residual error (optional)

Notes: Minimum 3D point number is N > 4

The residual error is being computed as the sum of the residuals:

for i=1:Npts
d = (B(:,i) - (s*R*A(:,i) + T));
err = err + norm(d);
end

Example:

s=0.7;
R = [0.36 0.48 -0.8 ; -0.8 0.6 0 ; 0.48 0.64 0.6];
T= [45 -78 98]';
X = [ 0.272132 0.538001 0.755920 0.582317;
0.728957 0.089360 0.507490 0.100513;
0.578818 0.779569 0.136677 0.785203];
Y = s*R*X+repmat(T,1,4);

%Compute
[s2 R2 T2 error] = absoluteOrientationQuaternion( X, Y, 1);

error = 0;

%Add noise
Noise = [
-0.23 -0.01 0.03 -0.06;
0.07 -0.09 -0.037 -0.08;
0.009 0.09 -0.056 0.012];

Y = Y+Noise;
%Compute
[s2 R2 T2 error] = absoluteOrientationQuaternion( X, Y, 1);

error = 0.33

인용 양식

Christian Wengert (2024). Absolute Orientation (https://www.mathworks.com/matlabcentral/fileexchange/22422-absolute-orientation), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Based on Bryan Murawski's comments, I reviewed the computation of the residual error. Indeed, it seemed a bit strange, I thus changed the computation a bit so that it reflects the overall error of the transformation.

1.2.0.0

Missing functions added

1.1.0.0

Update, included the missing function crossprodQuaternion.
Sorry for that

1.0.0.0