(sample_box, gt_box)
| 293 | return new_PC |
| 294 | |
| 295 | def Centerbox(sample_box, gt_box): |
| 296 | rot_mat = np.transpose(gt_box.rotation_matrix) |
| 297 | trans = -gt_box.center |
| 298 | |
| 299 | new_box = copy.deepcopy(sample_box) |
| 300 | new_box.translate(trans) |
| 301 | new_box.rotate(Quaternion(matrix=(rot_mat))) |
| 302 | |
| 303 | return new_box |
| 304 | |
| 305 | |
| 306 | def cropAndCenterPC_label(PC, sample_box, gt_box, sample_offsets, |