Ask Your Question
0

cv_bridge give me darker images [closed]

asked 2012-07-26 08:39:25 -0500

Graziano Fracasso gravatar image

updated 2012-07-26 08:44:56 -0500

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.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-12-29 14:31:00

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?

piyushk gravatar imagepiyushk ( 2012-07-27 12:23:45 -0500 )edit

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 gravatar imageGraziano Fracasso ( 2012-07-27 13:04:04 -0500 )edit

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

piyushk gravatar imagepiyushk ( 2012-08-01 19:24:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-07-31 12:50:27 -0500

Graziano Fracasso gravatar image

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-07-26 08:39:25 -0500

Seen: 245 times

Last updated: Jul 31 '12