Hi guys,
I am trying to obtain the IR images (of type const sensor_msgs::ImageConstPtr& image
) from the kinect, copy this image to a class attribute ImageIn_
, and then convert it to an opencv type image using cv_bridge so I can do some processing: imageOut_ = cv_bridge::toCvCopy(imageIn_, enc::MONO16);
The compilation is successful but when running the node, I keep getting this error message: [ERROR] [1361153962.171443742]: Unable to convert '' image to bgr8: 'Unrecognized image encoding []'
I am not sure why its trying to convert it to bgr8
and not mono16
. I have also tried imageOut_ = cv_bridge::toCvCopy(imageIn_, enc::BGR8);
but I still get the same error.
I am also not sure why it is not recognizing the image encoding, I printed out the input image encoding in the callback function : ROS_INFO("imageIn_Time = %s", imageIn_->encoding.c_str() );
, it prints out mono16
.
I am not sure if this is a bug or if I am doing something wrong. Any help would be much appreciated. I am using ROS Fuerte and Ubuntu 12.04.
Thanks,
Originally posted by K_Yousif on ROS Answers with karma: 735 on 2013-02-17
Post score: 1