Robotics StackExchange | Archived questions

Cannot see depth image - Kinect - Unable to convert '32FC1' image for display: 'cv_bridge.cvtColorForDisplay()

Please, help me out in measuring depth. In particular, I am unable to run

`rosrun image_view image_view image:=/camera/depth/image` 

and I am getting errors such as

`[ERROR] [1476607767.675041908]: Unable to convert '32FC1' image for display: 'cv_bridge.cvtColorForDisplay() while trying to convert image from '32FC1' to 'bgr8' an exception was thrown ([32FC1] is not a color format. but [bgr8] is. The conversion does not make sense)'`

Here is what I am doing in detail.

I am trying to use Kinect on ROS-Indigo. I have followed the instructions given here and installed it by running

sudo apt-get install libfreenect-dev
sudo apt-get install ros-indigo-freenect-launch
roslaunch freenect_launch freenect.launch

and then I ran

rosrun image_view image_view image:=/camera/rgb/image_color

which gave me the image in front of camera. Further, I ran

rosrun image_view disparity_view image:=/camera/depth/disparity

which gave me again expected parity image.

However, when I ran

rosrun image_view image_view image:=/camera/depth/image

I got this error,

[ERROR] [1476607767.675041908]: Unable to convert '32FC1' image for display: 'cv_bridge.cvtColorForDisplay() while trying to convert image from '32FC1' to 'bgr8' an exception was thrown ([32FC1] is not a color format. but [bgr8] is. The conversion does not make sense)'

I am also getting warning when I run roslaunch freenect_launch freenect.launch such as

[ WARN] [1476608344.579030784]: Could not find any compatible depth output mode for 1. Falling back to default depth output mode 1.

[ WARN] [1476608344.618443854]: Camera calibration file /home/khan/.ros/camera_info/rgb_A22596V00062304A.yaml not found. 
[ WARN] [1476608344.618552283]: Using default parameters for RGB camera calibration.

[ WARN] [1476608344.618674000]: Camera calibration file /home/khan/.ros/camera_info/depth_A22596V00062304A.yaml not found.
[ WARN] [1476608344.618730354]: Using default parameters for IR camera calibration.

Please, help me out in measuring depth. I shall be very thankful to you. :)

Asked by Abdul Mannan on 2016-10-16 04:13:25 UTC

Comments

have you been resolved the problem ?

Asked by Valen on 2016-10-17 11:51:39 UTC

No, this problem hasn't been solved yet.

Asked by Abdul Mannan on 2016-10-19 00:10:56 UTC

have you been resolved the problem ? 2016.12.23 13:26:12

Asked by Forzen Wind on 2016-12-23 00:26:34 UTC

No. Please let me know if you solve this problem.

Asked by Abdul Mannan on 2016-12-28 02:20:02 UTC

have you been resolved the problem ?

Asked by WilsonTang on 2017-02-15 21:59:53 UTC

Answers

I had the same problem. instead of rosrun image_view image_view image:=/camera/depth/image try to use rosrun image_view image_view image:=/camera/depth/image_raw. This helped me to measure the depth. Also make sure that roslaunch openni_launch openni.launch is running on the master (turtlebot or so). I hope this help you as well.

Asked by Milad on 2016-12-30 11:31:20 UTC

Comments

I am running with tutorial Ros By Example. Had the same problem too, in Chapter 10. The tutorial uses:roslaunch freenect_launch freenect.launch and then rosrun image_view image_view image:=/camera/depth/image_rect Doesn't work.

Asked by WillWanghui on 2017-05-12 04:16:05 UTC

By following your suggestion, I just tried: roslaunch freenect_launch freenect.launch and rosrun image_view image_view image:=/camera/depth/image_raw It works now, at least I saw the same effect as the tutorial describes.

Asked by WillWanghui on 2017-05-12 04:19:51 UTC