Skip to content

Commit

Permalink
fix(pointcloud): PointCloud mapping to 2d
Browse files Browse the repository at this point in the history
It needs to be normailized at the end
  • Loading branch information
Kerwin-L committed Aug 30, 2022
1 parent f4c0422 commit bad9e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/lb-annotation/src/core/pointCloud/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class PointCloud {
const vector = new THREE.Vector4(point.x, point.y, point.z);

// Baidu Automotive Data Processing
const newV = vector.applyMatrix4(TM);
const newV = vector.applyMatrix4(TM).applyMatrix4(RM).applyMatrix4(PM);

// Just keep the front object.
if (newV.z < 0) {
Expand All @@ -250,7 +250,7 @@ export class PointCloud {
const z = 1 / newV.z;
const fixMatrix4 = new THREE.Matrix4().set(z, 0, 0, 0, 0, z, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);

return newV.applyMatrix4(fixMatrix4).applyMatrix4(RM).applyMatrix4(PM);
return newV.applyMatrix4(fixMatrix4);
})
.filter((v) => v !== undefined),
}));
Expand Down

0 comments on commit bad9e27

Please sign in to comment.