The quality of disparity map from stereo_image_proc is very low
I am running this on ubuntu 20.04 Ros noetic and python 3.8.5. I used 2 USB cameras (2 cables), and I have calibrated them through camera_calibration package (epi is about 0.20) ! After that , I tried to generate disparity map through stereo_image_proc package but I got a really weird map. ! BTW, it seems like that there is significantly vertical translation between the left image and the right image. I am not sure if it is a problem because the cameras are already been calibrated.
I recorded a video from calibrating the cameras to generating the disparity map.
The following is my launch file used to generate disparity map.
<launch>
<group ns="stereo">
<node name="left" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video0" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="left" />
<param name="io_method" value="mmap"/>
<param name="camera_info_url" value="file:///home/finn/.ros/stereo_camera_info/left.yaml"/>
<param name="camera_name" value="narrow_stereo/left"/>
</node>
<node name="right" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video2" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="right" />
<param name="io_method" value="mmap"/>
<param name="camera_name" value="narrow_stereo/right"/>
<param name="camera_info_url" value="file:///home/finn/.ros/stereo_camera_info/right.yaml"/>
</node>
<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen" >
<param name="queue_size" value="2000" />
<param name="approximate_sync" value="True" />
<remap from="/stereo/left/image" to="/stereo/left/image_rect_color"/>
<remap from="/stereo/right/image" to="/stereo/right/image_rect_color"/>
</node>
</group>
<node name="stereo_cam" pkg="image_view" type="stereo_view" output="screen" >
<param name="queue_size" value="2000" />
<param name="approximate_sync" value="True" />
<remap from="/stereo/left/image" to="/stereo/left/image_rect_color"/>
<remap from="/stereo/right/image" to="/stereo/right/image_rect_color"/>
</node>
</launch>
Cheers!!