Skip to content

Commit

Permalink
fix(image_projection_based_fusion): resize sematic segmentation mask …
Browse files Browse the repository at this point in the history
…as input image size (autowarefoundation#7635)

Signed-off-by: badai-nguyen <[email protected]>
  • Loading branch information
badai-nguyen committed Sep 2, 2024
1 parent 7180df9 commit 5aae3a1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ void SegmentPointCloudFusionNode::fuseOnSingleImage(
camera_info.p.at(4), camera_info.p.at(5), camera_info.p.at(6), camera_info.p.at(7),
camera_info.p.at(8), camera_info.p.at(9), camera_info.p.at(10), camera_info.p.at(11), 0.0, 0.0,
0.0, 1.0;
const int orig_width = camera_info.width;
const int orig_height = camera_info.height;
// resize mask to the same size as the camera image
cv::resize(mask, mask, cv::Size(orig_width, orig_height), 0, 0, cv::INTER_NEAREST);
image_geometry::PinholeCameraModel pinhole_camera_model;
pinhole_camera_model.fromCameraInfo(camera_info);

geometry_msgs::msg::TransformStamped transform_stamped;
// transform pointcloud from frame id to camera optical frame id
{
Expand Down

0 comments on commit 5aae3a1

Please sign in to comment.