Skip to content

Commit a0e63e0

Browse files
committed
fix(image_projection_based_fusion): resize sematic segmentation mask as input image size (autowarefoundation#7635)
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
1 parent 7180df9 commit a0e63e0

File tree

1 file changed

+4
-0
lines changed
  • perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion

1 file changed

+4
-0
lines changed

perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion/node.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ void SegmentPointCloudFusionNode::fuseOnSingleImage(
6565
if (mask.cols == 0 || mask.rows == 0) {
6666
return;
6767
}
68+
const int orig_width = camera_info.width;
69+
const int orig_height = camera_info.height;
70+
// resize mask to the same size as the camera image
71+
cv::resize(mask, mask, cv::Size(orig_width, orig_height), 0, 0, cv::INTER_NEAREST);
6872
Eigen::Matrix4d projection;
6973
projection << camera_info.p.at(0), camera_info.p.at(1), camera_info.p.at(2), camera_info.p.at(3),
7074
camera_info.p.at(4), camera_info.p.at(5), camera_info.p.at(6), camera_info.p.at(7),

0 commit comments

Comments
 (0)