Skip to content

ROS node to split concatenated side-by-side stereo image into left/right image pair.

License

Notifications You must be signed in to change notification settings

dirksavage88/side_x_side_stereo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS node to split side-by-side stereo

Subscribes to an image stream of side-by-side stereo where each image message consists of a left and right image concatenated to form a single double-wide image. This node splits the incoming image down the middle and republishes each half as stereo/left and stereo/right images.

The node also provides a CameraInfoManager for the left and right outputs, so that it appears to the stereo imaging pipeline and camera calibration code as two cameras.

This is a modified version of public domain code posted by user PeteBlackerThe3rd in response to my question on ROS Answers: https://answers.ros.org/question/315298/splitting-side-by-side-video-into-stereoleft-stereoright/

Migrated to ROS 2. Converts BGR8 to mono8

Parameters

  • input_image_topic -- ROS topic of concantenated stereo images.

  • left_output_image_topic -- defaults to /left/image_raw

  • right_output_image_topic -- defaults to /right/image_raw

  • left_camera_info_topic -- defaults to /left/camera_info

  • right_camera_info_topic -- defaults to /right/camera_info

  • left_cam_calibration_file -- URL to left camera calibration yaml file

  • right_cam_calibration_file -- URL to right camera calibration yaml file

  • image_encoding -- defaults to mono8, but can acept bgr8

Disparity Map shown using standard ROS 2 image pipline->stereo_image_proc on intel i7 1165g7 ~15-20fps Kazam_screenshot_00018 Disparity Map shown using isaac ros image pipeline->isaac_ros_stereo_image_proc pipeline ~30fps: disparityjetsonnano

Example command for stereo splitter:

  • ros2 run side_x_side_stereo side_x_side_stereo_node --ros-args -p input_image_topic:=/image_mono -p image_encoding:=mono8 -p left_output_image_topic:=/left/image_raw -p right_output_image_topic:=/right/image_raw -p left_camera_info_topic:=/left/camera_info -p right_camera_info_topic:=/right/camera_info

Example command to set up a disparity node:

  • ros2 run stereo_image_proc disparity_node --ros-remap --remap /left/image_rect:=/left/image_raw --remap /right/image_rect:=/right/image_raw

License


MIT

About

ROS node to split concatenated side-by-side stereo image into left/right image pair.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.5%
  • CMake 12.5%