Skip to content

Instantly share code, notes, and snippets.

@tanzby
Created December 2, 2020 14:13
Show Gist options
  • Save tanzby/68eb1230b9a9af4c1a4ec731d8fdff0d to your computer and use it in GitHub Desktop.
Save tanzby/68eb1230b9a9af4c1a4ec731d8fdff0d to your computer and use it in GitHub Desktop.
Convert sensor_msgs::CompressedImagePtr to cv::Mat
cv::Mat img = cv::imdecode(cv::Mat(msg->data), cv::IMREAD_GRAYSCALE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment