Skip to content

Commit

Permalink
fix: rotate the stitched front image
Browse files Browse the repository at this point in the history
  • Loading branch information
mschweig committed Jan 4, 2025
1 parent 9e792ea commit 323f55c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spot_driver/src/image_stitcher/image_stitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ Image::SharedPtr MiddleCamera::stitch(const std::shared_ptr<const Image>& left,

// Convert the image back to the BGR color space
result_.convertTo(result_, CV_8U);
// Return the image in a format that can be published
// Rotate the result image 90 degrees clockwise and return it in a format that can be published
cv::rotate(result_, result_, cv::ROTATE_90_CLOCKWISE);
return cv_bridge::CvImage(std_msgs::msg::Header{}, "bgr8", result_.getMat(cv::ACCESS_READ)).toImageMsg();
}

Expand Down

0 comments on commit 323f55c

Please sign in to comment.