Skip to content

Commit

Permalink
Patch for RobotWebTools#99.
Browse files Browse the repository at this point in the history
  • Loading branch information
tlwong3 authored Apr 28, 2021
1 parent dfc4bf0 commit 76efe30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/image_streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ void ImageTransportImageStreamer::imageCallback(const sensor_msgs::ImageConstPtr
}
img = float_image;
}
else if (msg->encoding.find("C1") != std::string::npos)
{
// scale monochrome images for visualization
cv::normalize(cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::TYPE_8UC1)->image,
img, 0, 255, cv::NORM_MINMAX, CV_8U, cv::noArray());
}
else
{
// Convert to OpenCV native BGR color
Expand Down

0 comments on commit 76efe30

Please sign in to comment.