Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SW-1465] Fix image stitching for greyscale images #499

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spot_driver/src/image_stitcher/image_stitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ Image::SharedPtr MiddleCamera::stitch(const std::shared_ptr<const Image>& left,
// While the image is coming from the camera on the left of the robot, it sees the right side
// of the scene and vice versa. This may need to be extracted if this code is to be generalized
// for something other than the Boston Dynamics Spot Robot, as well as checking the homographies.
const auto scene_right = cv_bridge::toCvShare(left);
const auto scene_left = cv_bridge::toCvShare(right);
const auto scene_right = cv_bridge::toCvShare(left, sensor_msgs::image_encodings::BGR8);
const auto scene_left = cv_bridge::toCvShare(right, sensor_msgs::image_encodings::BGR8);

// Transform the images into the virtual center camera space
cv::warpPerspective(scene_left->image, warped_images_[0], homography_[0], result_size_);
Expand Down
Loading