Extract rectified images from bag file with image_raw

asked 2016-08-29 02:01:50 -0500

perfectspeed gravatar image

I have a bag file with the topics image_raw and camera_info from different cameras. By the time I recorded I had not calibrated the cameras. I have now calibrated the cameras and want to save a rectified image. The topics in the bag file are /prosilica_2450/image_raw and /prosilica_2450/camera_info.

Question: What changes do I need in the launch file to be able to save a rectified image?

I have the following launch file:

       <arg name="directory"  />
        <node pkg="rosbag" type="play" name="rosbag" args="--rate=1 -d 2 $(arg directory)/logall_0.bag"/>

    <node name="p2450_image_proc" pkg="image_proc" type="image_proc" >
    <remap from="image_raw" to="/prosilica_2450/image_raw"/>  
    <remap from="camera_info" to="/prosilica_2450/camera_info"/>  
    <param name="camera_info_file" value="/home/Sandbox/CameraInfoFiles/prosilica5555.yaml"/> 

    <node name="p2450_save" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="node">
    <remap from="image" to="/image_rect"/>  
    <param name="filename_format" value="$(arg directory)/Pros2450/Pros2450_%05i.png"/> 
edit retag flag offensive close merge delete


What is the camera_info_file parameter? I don't see it int the image_proc documentation.

Dimitri Schachmann gravatar image Dimitri Schachmann  ( 2016-08-29 05:10:54 -0500 )edit

please have a look at this question and answers: http://answers.ros.org/question/12687...

Dimitri Schachmann gravatar image Dimitri Schachmann  ( 2016-08-29 05:29:20 -0500 )edit

Hmm... I used the parameter name in image_sequence_publisher.py in bag_tools. Now aware of that it may not be the same parameter in image_proc.

perfectspeed gravatar image perfectspeed  ( 2016-08-29 22:45:30 -0500 )edit