cv_bridge give me darker images [closed]
I am using ROS Fuerte on my system running Ubuntu 12.04.
I use those code lines to transform depth image to opencv image, but it give me a darker image ( max and min values < 10 ), but in Rviz I see perfect depth images
parameter : sensor_msgs::ImageConstPtr& msg
cv_bridge::CvImageConstPtr cv_ptr;
cv_ptr = cv_bridge::toCvCopy(msg, enc::MONO8);
image_pub_.publish(cv_ptr->toImageMsg());
How can I fix? Thanks.
@Graziano Fracasso: My guess is that there is an encoding problem somewhere, but there isn't enough information to debug the error. Could you provide more details?
Which ones? I've used " kinect_depth" of type sensor_msgs/Image (Raw 16-bit depth data ) found here: http://www.cs.cmu.edu/~coral/projects/localization/source.html , the bag file is: http://data.cobotrobots.com/cgr_localization/cobot2_ghc7_kinect.bag@piyushk
@Graziano Fracasso: Could you place your entire ROS package online? Without it, it is impossible to debug your snippet.