Extract rectified images from bag file with image_raw
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:
<launch>
<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>
<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"/>
</node>
</launch>
What is the
camera_info_file
parameter? I don't see it int the image_proc documentation.please have a look at this question and answers: http://answers.ros.org/question/12687...
Hmm... I used the parameter name in
image_sequence_publisher.py
inbag_tools
. Now aware of that it may not be the same parameter inimage_proc
.