Robotics StackExchange | Archived questions

cv_bridge give me darker images

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.

Asked by Graziano Fracasso on 2012-07-26 08:39:25 UTC

Comments

@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?

Asked by piyushk on 2012-07-27 12:23:45 UTC

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

Asked by Graziano Fracasso on 2012-07-27 13:04:04 UTC

@Graziano Fracasso: Could you place your entire ROS package online? Without it, it is impossible to debug your snippet.

Asked by piyushk on 2012-08-01 19:24:54 UTC

Answers

up

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

Asked by Graziano Fracasso on 2012-07-31 12:50:27 UTC

Comments