How to extract depth data from rosbags(contains depth and RGB data) as picture frames
I have a Bagfile containing Raw depth and RGB data. I converted the RGB data into images using the tutorial http://wiki.ros.org/rosbag/Tutorials/... But when I used the same for converting raw depth to images, I get an error stating " cannot convert 32FC1 to RGB8". This is my launch file:
<launch>
<node pkg="rosbag" type="play" name="rosbag" args="-d 2 $(find image_view)/test.bag"/>
<node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME">
<remap from="image" to="/camera/depth_registered/image_rect"/>
</node>
</launch>
I went through Google for various suggestions given to do the same but I being a beginner find most of the solution vague or misleading and I end up confusing myself.
I need to know whether my approach was right or should I do something else? If so what should I do exactly.Please help me through this