Comments (3)
The o3d3xx-ros
camera node uses the image_transport
package to publish the OpenCV images. I just read this on the ROS wiki:
image_transport does not yet support Python, though it is on the Roadmap. If you need to interface a Python node with some compressed image transport, try interposing a republish node.
If you must use Python, to get around this, the suggestion is to use republish. I'm not sure if that fits your use case, but that seems to be the official suggestion as of Indigo (and Jade). Do you get this behavior using C++ as well?
from o3d3xx-ros.
You are converting to uint8 here: np.fromstring(msg.data,np.uint8. Did you try np.fromstring(msg.data,np.uint16?
It doesn't seem to matter what kind of integer np.fromstring converts it to; the imdecode converts it back to uint8.
If you must use Python, to get around this, the suggestion is to use republish.
Running a republish node (rosrun image_transport republish compressed in:=/o3d3xx/camera/depth raw out:=/depth
) and then subscribing to /depth
gets me an sensor_msgs.msg.Image message, that looks like this:
msg.width: 176
msg.height: 132
len(msg.data): 23232
msg.encoding: 'mono16'
The data array is exactly half the length it should be if it were really encoding a uint16 image. The CV bridge fails to decode this message, as expected:
pic = cvb.imgmsg_to_cv2(msg)
...
TypeError: buffer is too small for requested array
Casting to uint8 and reshaping to a 176 x 132 image, I see something that looks exactly like the incorrect uint8 image I described in my original comment.
The feeling I'm getting is that the compressed depth image does not contain all the info it should (i.e. all the info in the raw depth image).
Do you get this behavior using C++ as well?
I haven't tried it yet. This will be my next step before biting the bullet and using the raw topic.
from o3d3xx-ros.
is it possible to convert a mono16 depth image back to the raw depth data?
from o3d3xx-ros.
Related Issues (20)
- install issues test errors HOT 5
- SWTrigger Service doesn't return error codes HOT 3
- only half of the information from zyx_image HOT 4
- using mask to lower the amount of information to pc HOT 9
- catkin_make run_tests failure HOT 8
- Getting Libo3d3xx on Yocto HOT 5
- Unable to change SymmetryThreshold of Imager HOT 3
- Amplitude image scaling HOT 2
- Problem with nodes while launching ros HOT 4
- Private node handle for topics and services HOT 1
- Doubt on the dataframe HOT 2
- Time stamp on images incorrect HOT 7
- Incorporate filtering at a ROS node/driver level HOT 5
- Compiling o3d3xx-ros HOT 2
- -
- Can't find libopencv_core3.so.3.2 HOT 5
- Where on the physical camera is o3d3xx/camera_link located? HOT 2
- PointCloud<pcl::PointWithRange> range data HOT 3
- IFM 03X101 HOT 1
- crash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from o3d3xx-ros.