点云变换翻译错误

问题描述 投票:0回答:1

我正在使用matlab来转换点云。我通过 opencv 获得了 5 个 kinect 外置摄像头

好像旋转是对的,但是翻译不对

我觉得是因为opencv转opengl的错误

这是我用来转换点云的公式


我的代码

ptCloud0 = pcread('0.ply')
Rot_0 = [4.5950125948693071e-01, -2.6317558749551218e-01, 8.4829075361948647e-01; 
-5.2333177861622460e-01, -8.5191316356267166e-01, 1.9178405539030483e-02;
7.1762277139197816e-01, -4.5275001037551921e-01, -5.2918331992293943e-01;];

T_0 = [-2.6076193132576444e+00; -5.7886017025379033e-01; 1.0270015822967997e+00 ];

matrix_0 = [
    Rot_0,T_0;
    0,0,0,1]

matrix_0 = affinetform3d(matrix_0);

ptCloudOut0 = pctransform(ptCloud0,matrix_0);



外部参数如下

R_0: !!opencv-matrix
   rows: 3
   cols: 1
   dt: d
   data: [ -2.4346689299320339e+00, -6.7411341580208939e-01,
       1.3421404053909416e+00 ]
Rot_0: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 4.5950125948693071e-01, 2.6317558749551218e-01,
       -8.4829075361948647e-01, 5.2333177861622460e-01,
       -8.5191316356267166e-01, 1.9178405539030483e-02,
       -7.1762277139197816e-01, -4.5275001037551921e-01,
       -5.2918331992293943e-01 ]
T_0: !!opencv-matrix
   rows: 3
   cols: 1
   dt: d
   data: [ -2.6076193132576444e+00, 5.7886017025379033e-01,
       -1.0270015822967997e+00 ]
opencv opengl transformation point-clouds
1个回答
0
投票

我发现翻译要时间1000

© www.soinside.com 2019 - 2024. All rights reserved.