ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

shuttlebug's profile - activity

2022-01-13 06:08:07 -0500 received badge  Famous Question (source)
2021-01-19 21:20:54 -0500 received badge  Notable Question (source)
2020-09-17 10:32:26 -0500 received badge  Famous Question (source)
2019-12-09 06:40:55 -0500 received badge  Popular Question (source)
2019-12-08 15:52:35 -0500 received badge  Notable Question (source)
2019-12-05 20:20:03 -0500 edited question Dynamically set ROS_MASTER_URI

Dynamically set ROS_MASTER_URI Is there a way to dynamically set the ROS master when using multiple computers (on ROS me

2019-12-05 20:19:43 -0500 asked a question Dynamically set ROS_MASTER_URI

Dynamically set ROS_MASTER_URI Is there a way to dynamically set the ROS master when using multiple computers? By this,

2019-11-17 18:10:08 -0500 marked best answer ROS image messages to OpenCV images- question about data encodings

Hi all,

I am converting depth images from ROS to OpenCV using this tutorial, and it is working well. However, I am using this with two different imagers, a KinectV2 and a Stereolab Zed. When I look at the cv_ptr->image from each of these, the scale is off by a factor of 1000 (i.e. the Kinect matrix contains values ~1000-5000, while the Zed's are ~1-5). I'd like to write imager independent code, but I'm new to working with opencv and ros in general; might this scale factor have something to do with how the ros image messages are encoded, or is this simply inherent to the camera?

From their respective ROS wrappers, the Kinect sensor_msgs/Image has an encoding of 16UC1 and step of 1920, while the Zed has encoding 32FC1, step 5120. The data is of course of type uint8[]. My thought is that one of the sensor_msgs/Image parameters might be responsible for the scaling difference when using CvBridge, and I could republish or convert my ROS messages so that the c++ code can be independent of the imager.

I apologize for the general question, but I'm quite stuck with what may be possible future directions and I've exhausted all other google searches and posts about using ROS and OpenCV. Any thoughts are greatly appreciated!

I am using Ubuntu 18.04 ROS melodic.

2019-11-17 18:10:08 -0500 received badge  Scholar (source)
2019-11-15 18:22:42 -0500 commented answer ROS image messages to OpenCV images- question about data encodings

Thank you so much for the response! I'll give your referenced nodelet a shot in a couple days and report back with how i

2019-11-15 18:20:26 -0500 received badge  Supporter (source)
2019-11-15 18:20:18 -0500 received badge  Popular Question (source)
2019-11-14 22:08:25 -0500 asked a question ROS image messages to OpenCV images- question about data encodings

ROS image messages to OpenCV images- question about data encodings Hi all, I am converting depth images from ROS to Ope