Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities.
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: CC BY-NC-SA 4.0
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (9)- camera_info_manager
- catkin
- cv_bridge
- dynamic_reconfigure
- image_transport
- nodelet
- roscpp
- rospy
- sensor_msgs
Package Summary Released Continuous Integration Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities, also adjusting publishing rate.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (7)- camera_info_manager
- catkin
- cv_bridge
- image_transport
- roscpp
- rospy
- sensor_msgs
Package Summary Continuous Integration Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (9)- camera_info_manager
- catkin
- cv_bridge
- dynamic_reconfigure
- image_transport
- nodelet
- roscpp
- rospy
- sensor_msgs
Package Summary Released Continuous Integration Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities, also adjusting publishing rate.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (9)- camera_info_manager
- catkin
- cv_bridge
- dynamic_reconfigure
- image_transport
- nodelet
- roscpp
- rospy
- sensor_msgs
Package Summary Released Continuous Integration Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities, also adjusting publishing rate.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (9)- camera_info_manager
- catkin
- cv_bridge
- dynamic_reconfigure
- image_transport
- nodelet
- roscpp
- rospy
- sensor_msgs
Jenkins jobs (6)- source ubuntu bionic
- binary ubuntu bionic amd64
- binary ubuntu bionic armhf
- binary ubuntu bionic arm64
- devel ubuntu bionic amd64
- doc
Package Summary Released Continuous Integration: 4 / 4Build history (last 5 of 17 builds): #17 08-Dec-2020 00:25 4 / 4 #16 13-Nov-2020 01:24 4 / 4 #15 26-Oct-2020 09:24 4 / 4 #14 28-Apr-2020 11:24 4 / 4 #13 27-Apr-2020 00:24 4 / 4 Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities, also adjusting publishing rate.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Package Links- Code API
- FAQ
- Changelog
- Change List
- Reviews
Dependencies (9)- camera_info_manager
- catkin
- cv_bridge
- dynamic_reconfigure
- image_transport
- nodelet
- roscpp
- rospy
- sensor_msgs
Jenkins jobs (10)- source debian buster
- source ubuntu focal
- binary debian buster amd64
- binary debian buster arm64
- binary ubuntu focal amd64
- binary ubuntu focal armhf
- binary ubuntu focal arm64
- devel debian buster amd64
- devel ubuntu focal amd64
- doc
Package Summary Released Continuous Integration: 3 / 4Build history (last 2 of 2 builds): #2 08-Dec-2020 01:10 3 / 4 #1 07-Dec-2020 15:08 3 / 4 Documented The video_stream_opencv package contains a node to publish a video stream (the protocols that opencv supports are supported, including rtsp, webcams on /dev/video and video files) in ROS image topics, it supports camera info and basic image flipping (horizontal, vertical or both) capabilities, also adjusting publishing rate.
- Maintainer status: maintained
- Maintainer: Sammy Pfeiffer
- Author: Sammy Pfeiffer
- License: BSD
- Bug / feature tracker: -drivers/video_stream_opencv/issues
- Source: git -drivers/video_stream_opencv.git (branch: master)
Contents
- Description
- Usage
- Supported inputs
- Parameters
- Quick input test
DescriptionA package to view video streams based on the OpenCV VideoCapture module, easy way to publish on a ROS Image topic (including camera info) usb cams, ethernet cameras, video streams or video files. It also supports flipping of images and fps throttling. UsageExample usages in launch folder (only the argument video_stream_provider is mandatory): Supported inputsYou can use any input that OpenCV on your system accepts, e.g.:
ParametersNote these important ones on the behaviour of the node:
- set_camera_fps: Will set the OpenCV parameter CV_CAP_PROP_FPS to that amount of fps, if the camera allows it. Does nothing on video streams or video files.
buffer_queue_size: Will set the size of the buffer of images read from the capturing device. We read as fast as possible (in another thread) from the device and store in the buffer the images. The main thread consumes from the buffer. If you want the shortest delay/lag set it to 1. If you don't want to lose images set it higher. fps: The effective rate at which you want the image topic to publish, if lower than the effective fps of the camera it will throttle the publication dropping frames when needed.
So if you want the very latest image published from a camera, set buffer_queue_size to 1, set_camera_fps to the max the camera allows and fps to that same max. If you want to publish all images (don't drop any and you don't mind some possible delay from real time), set buffer_queue_size big enough for your case (1000?), set_camera_fps and fps to whatever FPS it has. The rest of the parameters explained, even though they are pretty self explanatory:
- video_stream_provider: A number for the /dev/videoX device, e.g.: 0 for /dev/video0. A string for a path for a video file, e.g.: /home/user/Videos/myvideo.avi or a url of a video stream e.g.: rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov and
camera_name: node name and ros graph name. All topics will hang from this e.g.: /camera_name/. frame_id: frame_id to be published in the Header of the messages. camera_info_url: camera info loading, take care as it needs the "file:///" at the start , e.g.: "file:///$(find your_camera_package)/config/your_camera.yaml". flip_horizontal: flip horizontally the image (mirror it). flip_vertical: flip vertically the image (upside down). loop_videofile: flag of loop playback. If loop_videofile is true, loop playback is enabled. width and height: force a width and height to the capturing device (if it allows), 0 means no forcing.
Quick input testIf you want to test quickly if your desired input may work with this node you can use a simple python script called test_video_resource.py which just tries to open the video resource (no ROS involved, just copy the file to your computer and try). Just do any of those: rosrun video_stream_opencv test_video_resource.py 0rosrun video_stream_opencv test_video_resource.py rtsp://
wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.movrosrun video_stream_opencv video_stream /home/youruser/myvideo.mkvAnd you'll see an output like: Trying to open resource: /dev/video0Correctly opened resource, starting to show feed.With an OpenCV image show window showing the stream (which should close when pressing ESC, or Control+C the shell). Wiki: video_stream_opencv (last edited 2021-10-10 16:49:41 by LucasWalter) dd2b598166