8bit kinect data
I search disparity and depth data 11bit.
But kinect pulish just 8bit.
Why do they have difference?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
I search disparity and depth data 11bit.
But kinect pulish just 8bit.
Why do they have difference?
Looking at the openni_camera documentation on the ROS wiki, you can see that the openni_node
broadcasts several topics.
I think for the data that you are looking for, the topics of interest will be the depth/image_raw
messages, or the depth_registered/image_raw
if you have the OpenNI registration turned on.
The */image_raw messages are in the sensor_msgs/Image message format, which stores the data in a byte array, that can then be reassembled in the subscriber. This is accomplished using cv_bridge.
cv_bridge
allows you to write code like this for your callback:
void imageCb(const sensor_msgs::ImageConstPtr& msg)
{
cv_bridge::CvImagePtr cv_ptr;
try
{
cv_ptr = cv_bridge::toCvCopy(msg, enc::TYPE_32FC1);
}
catch (cv_bridge::Exception& e)
{
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
cv::imshow(WINDOW, cv_ptr->image);
image_pub_.publish(cv_ptr->toImageMsg());
}
cv_ptr->image
will contain an OpenCV cv::Mat
, in this case containing floating point values, which represent the depth in millimeters for that pixel.
They might also be interested in the rectified images, depth_registered/image_rect_raw
Do you mean 16 bit? In any case, kinect depth image is 16 bit, not 8.
How can I 16bit data? depth data is sensor_msgs/Image Message. They have uint8[] data. (http://ros.org/doc/api/sensor_msgs/html/msg/Image.html)
Not sure exactly what you mean, but if you know what the image encoding is, you can easily convert it to an opencv Mat of the same size and type, using cv_bridge
If I use cv_bridge, can I get depth or disparity value?
( I don't read last question. so I ask one more. you understand it )
Asked: 2012-08-25 16:46:52 -0500
Seen: 682 times
Last updated: Aug 29 '12
Problem to export ROS2 topics data from sqlite3 to csv
How to store in a variable some data published by node using rosmatlab?
read raw_image compressed uint8[] data
How do I average 60 values published values from a node
Depthimage_to_laserscan package - depth_msg->data[0] doubt
Data fusion using two (or more) Kinect
Navigation though doors using point cloud data [closed]
How to get pitch and yaw angle from the raw IMU data?
do some mathematical calculation and algorithms on dynamic data