Publish depth image CV_32F using cv_bridge
Hi!
Working environment: Kubuntu 14.04 LTS ROS Indigo (up-to-date, full desktop install) OpenCV 2.4.8 (default from the repos)
I have a PMD nano here and managed to get it up and running using the great library rgbd-grabber by Yutaka Kondo. It displays 3 things - amplitude (as cv::Mat), depth (as cv::Mat) and point cloud (as PCL cloud). Now I'm trying to integrate only the PMD part of his library in my ROS infrastructure. For this purpose I have created a wrapper node around the PMDNano class, which basically has to take the output of that class (the three data structures I have mentioned above) and publish those on my ROS network. I haven't started on the point cloud part yet since I have noticed that cv_bridge has actually very limited support for the various encodings OpenCV offers. As I reference I am using the cv_bridge.cpp file since the ROS documentation doesn't say a lot about the encodings. I am also using this tutorial.
In the tutorial the cv::Mat image is converted to a ROS image and encoded with the string "bgr8". I however have a CV_32F at my disposal. Now as far as I know what I have here is a 32bit float at hand while the encodings provided by cv_bridge go as far as 16bit (example: MONO16).
My question is basically if it will be a problem to go to "mono8" in this case especially considering that the published imagery is meant just for viewing and no further processing will be done with it? If it is a problem, then how do I covert CV_32F using cv_bridge's available encodings?
Thanks!