Image encoding problem
Hello
I have a cv::Mat of depth CV_8UC1 (that I know for sure it is this since it what the camera streams). In the camera driver I can do cv::imshow and display this CV_8UC1 image and I see it right:
In order to send it as a ros message, I use the sensor_msgs::image_encodings::MONO8
image encoding (I tryed with sensor_msgs::image_encodings::TYPE_8UC1
and I can not see the image using image_view nor with rviz, but I made a simple subscriber that susbscribes to the image, undecodes using the same image encoding that I used in the publisher and the result is the same as using mono8 and being able to visualize it using image_view package) and I get this image:
Which is clearly not right. I dont know what do I need to do to convert this cv::Mat CV_8UC1 to a proper mono8 image for ros. Any help?
Thanks.