Go to the source code of this file.
◆ box3d_to_corners()
| torch::Tensor box3d_to_corners |
( |
const torch::Tensor & |
box3d | ) |
|
Converts 3D bounding box parameters to corner points in 3D space.
- Parameters
-
| box3d | Torch tensor containing 3D bounding box parameters |
- Returns
- Torch tensor containing corner points for each bounding box
◆ generate_bbox2d_from_rect3d()
| torch::Tensor generate_bbox2d_from_rect3d |
( |
const torch::Tensor & |
rect3d, |
|
|
int |
image_width, |
|
|
int |
image_height |
|
) |
| |
Generate 2D bounding boxes from projected 3D rectangle corners.
This function creates 2D bounding boxes from projected 3D corners using a simple and efficient min/max approach. It includes visibility checking to filter out objects that are not sufficiently visible in the frame.
- Parameters
-
| [in] | rect3d | Torch tensor containing projected 3D rectangle corners Shape: [num_cams, N, 8, 2] where:
- num_cams: number of camera views
- N: number of objects
- 8: eight corners of the 3D bounding box
- 2: x, y coordinates in image space
|
| [in] | image_width | Width of the image frame (default: 1920) |
| [in] | image_height | Height of the image frame (default: 1080) |
- Returns
- Torch tensor of 2D bounding boxes Shape: [num_cams, N, 4] where 4 represents [x, y, w, h]
- x, y: top-left corner coordinates
- w, h: width and height of the bounding box
- Invalid boxes have negative width/height for filtering
◆ generate_bbox3d_on_camera_frames()
| torch::Tensor generate_bbox3d_on_camera_frames |
( |
const torch::Tensor & |
bboxes3d, |
|
|
const torch::Tensor & |
projection_matrices |
|
) |
| |
Converts 3D bounding boxes from world coordinates to camera coordinates.
Projects 3D bounding boxes onto 2D camera frames.
- Parameters
-
| bboxes3d | Torch tensor containing 3D bounding boxes in world coordinates |
| projection_matrices | Projection matrices for transforming from world to camera coordinates |
- Returns
- Torch tensor of projected 2D coordinates for each corner of each box
◆ test_generate_bbox3d_on_camera_frames()
| void test_generate_bbox3d_on_camera_frames |
( |
PrettyLogger * |
logger | ) |
|
Test function to generate bbox3d on camera frames.
- Parameters
-
| logger | Logger for debug and warning messages |