ground-truth transformation matrix of stanford dataset

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ground-truth transformation matrix of stanford dataset

M rezaei
Hi
 I need ground-truth transformation matrix of stanford dataset I used conf
matrix and then I used ICP, although two point clouds set visually but I
think the matrix has error so my results with statisical measurments are not
good .
I am very grateful if some one send me the ground-truth transformation
matrix of stanford dataset. thanks a lot



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

Hilarius
Hey,

if by stanford you mean the bunny data set. Adjacent to their ply files
for the range images is a conf file (bunny/data/bun.conf) with
parameters that were used for the transformation.

bmesh bun000.ply 0 0 0 0 0 0 1
bmesh bun045.ply -0.0520211 -0.000383981 -0.0109223 0.00548449 -0.294635
-0.0038555 0.955586
bmesh bun090.ply 2.20761e-05 -3.34606e-05 -7.20881e-05 0.000335889
-0.708202 0.000602459 0.706009
bmesh bun180.ply 0.000116991 2.47732e-05 -4.6283e-05 -0.00215148
0.999996 -0.0015001 0.000892527
bmesh bun270.ply 0.000130273 1.58623e-05 0.000406764 0.000462632
0.707006 -0.00333301 0.7072
bmesh top2.ply -0.0530127 0.138516 0.0990356 0.908911 -0.0569874
0.154429 0.383126
bmesh top3.ply -0.0277373 0.0583887 -0.0796939 0.0598923 0.670467
0.68082 -0.28874
bmesh bun315.ply -0.00646017 -1.36122e-05 -0.0129064 0.00449209 0.38422
-0.00976512 0.923179
bmesh chin.ply 0.00435102 0.0882863 -0.108853 -0.441019 0.213083
0.00705734 0.871807
bmesh ear_back.ply -0.0829384 0.0353082 0.0711536 0.111743 0.925689
-0.215443 -0.290169

Even though I would say that there is no ground truth if you use a icp
based approach, that's probably the best guess out there cause it was
used for the final model. I am not 100% certain how they have to be
interpreted to generate a 4x4 transformation matrix though. If you like
for a different solution just to get an idea and check your solution for
blunders, you can use for example CC and get such a matrix for bun045
aligned to bun000:

0.845476210117 0.008482834324 0.533945679665 -0.053317226470
-0.010765900835 0.999941170216 0.001161088119 -0.000173157634
-0.533904433250 -0.006730074994 0.845518290997 -0.011580462568
0.000000000000 0.000000000000 0.000000000000 1.000000000000

Greetings
Felix

Am 04.10.2017 um 07:59 schrieb M rezaei:

> Hi
>   I need ground-truth transformation matrix of stanford dataset I used conf
> matrix and then I used ICP, although two point clouds set visually but I
> think the matrix has error so my results with statisical measurments are not
> good .
> I am very grateful if some one send me the ground-truth transformation
> matrix of stanford dataset. thanks a lot
>
>
>
> --
> Sent from: http://www.pcl-users.org/
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

M rezaei
Hi, thanks for your response
I use conf and I can calculate transformation matrix, even after that, I use
ICP, but the result has error, the RMSE of distance is 0.04 that is high. i
want to have almost zero as RMSE.
any suggestion?
Thanks a lot



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

Hilarius
I didn't use ICP in PCL so far, so I can't really be of help. As a hint,
for the 0 to 45 I got a RMS in CC of 0.002 based on all 40097 points.
Can you provide a formula how you calculated the transformation matrix
from the conf 7 parameters?
As I read to documentation, the conf values should be final for the pose
estimation so, why do you use ICP after that?
Cheers
Felix

Am 05.10.2017 um 18:55 schrieb M rezaei:

> Hi, thanks for your response
> I use conf and I can calculate transformation matrix, even after that, I use
> ICP, but the result has error, the RMSE of distance is 0.04 that is high. i
> want to have almost zero as RMSE.
> any suggestion?
> Thanks a lot
>
>
>
> --
> Sent from: http://www.pcl-users.org/
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

M rezaei
It's my code, can you say to me, what is wrong with it?  this code has error
0.04
or can you send me your code,
Thanks a lot

Conf.row(0) << 0, 0, 0, 0, 0, 0,1;
Conf.row(1) << -0.0520211 ,-0.000383981 ,-0.0109223 ,0.00548449 ,-0.294635
,-0.0038555, 0.955586;
Conf.row(2) << 0.0000220761 ,-0.0000334606 ,-0.000072088, 0.000335889,
-0.708202, 0.000602459,0.706009;
Conf.row(3) << 0.000116991, 0.0000247732 ,-0.000046283 ,-0.00215148,
0.999996, -0.0015001,0.000892527;
Conf.row(4) << 0.000130273 ,0.0000158623 ,0.000406764 ,0.000462632 ,0.707006
,-0.00333301, 0.7072;
Conf.row(5) << -0.00646017, -0.0000136122, -0.0129064, 0.00449209, 0.38422,
-0.00976512, 0.923179;
Conf.row(6) << -0.0530127, 0.138516, 0.0990356, 0.908911, -0.0569874,
0.154429, 0.383126;
Conf.row(7) << -0.0277373, 0.0583887, -0.0796939, 0.0598923, 0.670467,
0.68082, -0.28874;
Conf.row(8) << 0.00435102, 0.0882863, -0.108853, -0.441019, 0.213083,
0.00705734, 0.871807;
Conf.row(9) << -0.0829384, 0.0353082, 0.0711536, 0.111743, 0.925689
,-0.215443 ,-0.290169;




For example the below code calculates the transformation matrix between
point cloud i and j from the above matrix:



Eigen::Matrix <double, 3, 3> Rx, Ry, Rz, R1, R2, R;
Eigen::Matrix<double, 3, 1> t1, t2, t;
Eigen::Quaterniond rotat1, rotat2;
Eigen::Matrix< double, 3, 1> euler;
double rx, ry, rz, Cx, Sx, Cy, Cz, Sy, Sz;
Eigen::Matrix<double, 4, 4> transform;
// for i
Eigen::Quaterniond rotat1(Conf(i, 6), Conf(i, 3), Conf(i, 4), Conf(i, 5));
euler = rotat1.toRotationMatrix().eulerAngles(0, 1, 2);
rx = euler(0, 0), ry = euler(1, 0), rz = euler(2, 0);
Cx = cos(rx); Sx = sin(rx); Cy = cos(ry); Sy = sin(ry); Cz = cos(rz); Sz =
sin(rz);
t1.col(0) << Conf(i, 0), Conf(i, 1), Conf(i, 2);
Rx.row(0) << 1, 0, 0;     Rx.row(1) << 0, Cx, Sx;   Rx.row(2) << 0, -Sx, Cx;
Ry.row(0) << Cy, 0, -Sy;  Ry.row(1) << 0, 1, 0;     Ry.row(2) << Sy, 0, Cy;
Rz.row(0) << Cz, Sz, 0;  Rz.row(1) << -Sz, Cz, 0;     Rz.row(2) << 0, 0, 1;
R1 = Rz*Ry*Rx;
//////////////////// for j

Eigen::Quaterniond rotat2(Conf(j, 6), Conf(j, 3), Conf(j, 4), Conf(j, 5));
euler = rotat2.toRotationMatrix().eulerAngles(0, 1, 2);
rx = euler(0, 0), ry = euler(1, 0), rz = euler(2, 0);
Cx = cos(rx); Sx = sin(rx); Cy = cos(ry); Sy = sin(ry); Cz = cos(rz); Sz =
sin(rz);
t2.col(0) << Conf(j, 0), Conf(j, 1), Conf(j, 2);
Rx.row(0) << 1, 0, 0;     Rx.row(1) << 0, Cx, Sx;   Rx.row(2) << 0, -Sx, Cx;
Ry.row(0) << Cy, 0, -Sy;  Ry.row(1) << 0, 1, 0;     Ry.row(2) << Sy, 0, Cy;
Rz.row(0) << Cz, Sz, 0;  Rz.row(1) << -Sz, Cz, 0;     Rz.row(2) << 0, 0, 1;
//// the final
R2 = Rz*Ry*Rx;
R = R2.inverse()*R1;
t = R2.inverse()*(t1 - t2);
transform(0, 0) = R(0, 0);
transform(0, 1) = R(0, 1);
transform(0, 2) = R(0, 2);
transform(1, 0) = R(1, 0);
transform(1, 1) = R(1, 1);
transform(1, 2) = R(1, 2);
transform(2, 0) = R(2, 0);
transform(2, 1) = R(2, 1);
transform(2, 2) = R(2, 2);
transform(0, 3) = t(0, 0);
transform(1, 3) = t(1, 0);
transform(2, 3) = t(2, 0);
transform.row(3) << 0, 0, 0, 1;




--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

Hilarius

Hey,

as I said I used CloudCompare to calculate the transformation matrix through ICP and it told me the RMS. So I can't provide any PCL Code.

From your code you should be able to skip some parts cause

euler = rotat1.toRotationMatrix().eulerAngles(0, 1, 2);

already has you rotation matrix doesn't it?

Can you use that value directly, add the translation and last line and provide me the numbers. It seems strange that they should be wrong.

For your last lines: You can check the error when transforming all meshes to conf.row(0) and see that way if you made an error in your pairwise alignment.

Regards
Felix

Am 06.10.2017 um 11:34 schrieb M rezaei:
It's my code, can you say to me, what is wrong with it?  this code has error
0.04
or can you send me your code, 
Thanks a lot 

Conf.row(0) << 0, 0, 0, 0, 0, 0,1;
Conf.row(1) << -0.0520211 ,-0.000383981 ,-0.0109223 ,0.00548449 ,-0.294635
,-0.0038555, 0.955586;
Conf.row(2) << 0.0000220761 ,-0.0000334606 ,-0.000072088, 0.000335889,
-0.708202, 0.000602459,0.706009;
Conf.row(3) << 0.000116991, 0.0000247732 ,-0.000046283 ,-0.00215148,
0.999996, -0.0015001,0.000892527;
Conf.row(4) << 0.000130273 ,0.0000158623 ,0.000406764 ,0.000462632 ,0.707006
,-0.00333301, 0.7072;
Conf.row(5) << -0.00646017, -0.0000136122, -0.0129064, 0.00449209, 0.38422,
-0.00976512, 0.923179;
Conf.row(6) << -0.0530127, 0.138516, 0.0990356, 0.908911, -0.0569874,
0.154429, 0.383126;
Conf.row(7) << -0.0277373, 0.0583887, -0.0796939, 0.0598923, 0.670467,
0.68082, -0.28874;
Conf.row(8) << 0.00435102, 0.0882863, -0.108853, -0.441019, 0.213083,
0.00705734, 0.871807;	
Conf.row(9) << -0.0829384, 0.0353082, 0.0711536, 0.111743, 0.925689
,-0.215443 ,-0.290169;




For example the below code calculates the transformation matrix between
point cloud i and j from the above matrix:



Eigen::Matrix <double, 3, 3> Rx, Ry, Rz, R1, R2, R;
Eigen::Matrix<double, 3, 1> t1, t2, t;
Eigen::Quaterniond rotat1, rotat2;
Eigen::Matrix< double, 3, 1> euler;
double rx, ry, rz, Cx, Sx, Cy, Cz, Sy, Sz;
Eigen::Matrix<double, 4, 4> transform;
// for i
Eigen::Quaterniond rotat1(Conf(i, 6), Conf(i, 3), Conf(i, 4), Conf(i, 5));
euler = rotat1.toRotationMatrix().eulerAngles(0, 1, 2);
rx = euler(0, 0), ry = euler(1, 0), rz = euler(2, 0);
Cx = cos(rx); Sx = sin(rx); Cy = cos(ry); Sy = sin(ry); Cz = cos(rz); Sz =
sin(rz);
t1.col(0) << Conf(i, 0), Conf(i, 1), Conf(i, 2);
Rx.row(0) << 1, 0, 0;     Rx.row(1) << 0, Cx, Sx;   Rx.row(2) << 0, -Sx, Cx;
Ry.row(0) << Cy, 0, -Sy;  Ry.row(1) << 0, 1, 0;     Ry.row(2) << Sy, 0, Cy;
Rz.row(0) << Cz, Sz, 0;  Rz.row(1) << -Sz, Cz, 0;     Rz.row(2) << 0, 0, 1;
R1 = Rz*Ry*Rx;
//////////////////// for j

Eigen::Quaterniond rotat2(Conf(j, 6), Conf(j, 3), Conf(j, 4), Conf(j, 5));
euler = rotat2.toRotationMatrix().eulerAngles(0, 1, 2);
rx = euler(0, 0), ry = euler(1, 0), rz = euler(2, 0);
Cx = cos(rx); Sx = sin(rx); Cy = cos(ry); Sy = sin(ry); Cz = cos(rz); Sz =
sin(rz);
t2.col(0) << Conf(j, 0), Conf(j, 1), Conf(j, 2);
Rx.row(0) << 1, 0, 0;     Rx.row(1) << 0, Cx, Sx;   Rx.row(2) << 0, -Sx, Cx;
Ry.row(0) << Cy, 0, -Sy;  Ry.row(1) << 0, 1, 0;     Ry.row(2) << Sy, 0, Cy;
Rz.row(0) << Cz, Sz, 0;  Rz.row(1) << -Sz, Cz, 0;     Rz.row(2) << 0, 0, 1;
//// the final
R2 = Rz*Ry*Rx;
R = R2.inverse()*R1;
t = R2.inverse()*(t1 - t2);
transform(0, 0) = R(0, 0);
transform(0, 1) = R(0, 1);
transform(0, 2) = R(0, 2);
transform(1, 0) = R(1, 0);
transform(1, 1) = R(1, 1);
transform(1, 2) = R(1, 2);
transform(2, 0) = R(2, 0);
transform(2, 1) = R(2, 1);
transform(2, 2) = R(2, 2);
transform(0, 3) = t(0, 0);
transform(1, 3) = t(1, 0);
transform(2, 3) = t(2, 0);
transform.row(3) << 0, 0, 0, 1;




--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: ground-truth transformation matrix of stanford dataset

M rezaei
I could solve it, thanks for your kind replays



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users