This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Finding scale factor in Umeyama transform

Tags: None
(comma "," separated)
linello
Registered Member
Posts
56
Karma
0
OS
Hi,

I'm wondering if is it possible to find the scale factor in the Umeyama transformation.

For example

Code: Select all
Vector3d a1(1,1,0);
Vector3d a2(-1,1,0);
Vector3d a3(-1,-1,0);
Vector3d a4(1,-1,0);
       
Vector3d b1(3,2,0);
Vector3d b2(1,2,0);
Vector3d b3(1,0,0);

Matrix<double,3,3> start,end;
start.col(0)=a1;
start.col(1)=a2;
start.col(2)=a3;

end.col(0)=b1;
end.col(1)=b2;
end.col(2)=b3;
cout << Eigen::umeyama(start,end) << endl;



This print the transformation matrix:
1 0 0 2
0 1 0 1
0 0 1 0
0 0 0 1


That clearly has no scale factor inside.

How can I get the scaling factor between starting points and ending points?
linello
Registered Member
Posts
56
Karma
0
OS
Ok, I found how to do it, it's pretty simple indeed :P

Vector3d a1(1,1,0);
Vector3d a2(-1,1,0);
Vector3d a3(-1,-1,0);
Vector3d a4(1,-1,0);

Vector3d b1(2,2,0);
Vector3d b2(-2,2,0);
Vector3d b3(-2,-2,0);
Vector3d b4(2,-2,0);

Matrix<double,3,4> start,end;
start.col(0)=a1;
start.col(1)=a2;
start.col(2)=a3;
start.col(3)=a4;


end.col(0)=b1;
end.col(1)=b2;
end.col(2)=b3;
end.col(3)=b4;

cout << Eigen::umeyama(start,end,true) << endl;



For example, this will print out:

Code: Select all
2 0 0 0
0 2 0 0
0 0 2 0
0 0 0 1


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar