Skip to content

Commit

Permalink
Convert image to BGR8 as expected by libsvo (uzh-rpg#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazeka committed Jan 21, 2020
1 parent d465dd9 commit 47b35ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion svo_ros/src/svo_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ void SvoInterface::monoCallback(const sensor_msgs::ImageConstPtr& msg)
cv::Mat image;
try
{
image = cv_bridge::toCvCopy(msg)->image;
// convert image to BGR8 as expected by libsvo
image = cv_bridge::toCvShare(msg, sensor_msgs::image_encodings::BGR8)->image;
}
catch (cv_bridge::Exception& e)
{
Expand Down

0 comments on commit 47b35ed

Please sign in to comment.