mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 04:25:42 +08:00
Do not apply pose transformation on normals if the cloud does not have normals
This commit is contained in:
@@ -504,7 +504,10 @@ Mat transformPCPose(Mat pc, double Pose[16])
|
|||||||
pcDataT[2] = (float)(p2[2]/p2[3]);
|
pcDataT[2] = (float)(p2[2]/p2[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rotate the normals, too
|
// If the point cloud has normals,
|
||||||
|
// then rotate them as well
|
||||||
|
if (pc.cols == 6)
|
||||||
|
{
|
||||||
double n[3] = { (double)n1[0], (double)n1[1], (double)n1[2] }, n2[3];
|
double n[3] = { (double)n1[0], (double)n1[1], (double)n1[2] }, n2[3];
|
||||||
|
|
||||||
matrixProduct331(R, n, n2);
|
matrixProduct331(R, n, n2);
|
||||||
@@ -517,6 +520,7 @@ Mat transformPCPose(Mat pc, double Pose[16])
|
|||||||
nT[2]=(float)(n2[2]/nNorm);
|
nT[2]=(float)(n2[2]/nNorm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return pct;
|
return pct;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user