Open sradmard opened 5 years ago
Same problem here with web_video_server
! Any idea how to fix this?
I am also having this issue, hope to hear some kind of fix
me too! any comment?
Can confirm this is still a problem.
I think I know the source of this problem.
What's going on in your case:
data: <array type: uint8, length: 399360>
We faced this problem in our stereoscopic OpenCV scripts, and use a couple of approaches here:
UPD> More details in a PiCamera documentation here: https://picamera.readthedocs.io/en/release-1.13/recipes2.html#capturing-to-a-numpy-array
Cite: It is also important to note that when outputting to unencoded formats, the camera rounds the requested resolution. The horizontal resolution is rounded up to the nearest multiple of 32 pixels, while the vertical resolution is rounded up to the nearest multiple of 16 pixels. For example, if the requested resolution is 100x100, the capture will actually contain 128x112 pixels worth of data, but pixels beyond 100x100 will be uninitialized.
Hi there, When I enable the
enable_raw
flag to get the raw image, unfortunately the image cannot be loaded to Rviz. The reason is that the data being published into the/raspicam_node/image
topic is somehow corrupted. Here is an instance of the published raw image:header: seq: 1109 stamp: secs: 1555185561 nsecs: 712540212 frame_id: raspicam height: 308 width: 410 encoding: bgr8 is_bigendian: 0 step: 1230 data: <array type: uint8, length: 399360>
By looking at the published raw image above, we see that the stream size (length of the data:399360) does not match the calculated image size (3084103=378840). And that is why Rviz cannot visualise it. If I use the image_transport package to uncompress the compressed image published into the
/raspicam_node/image/compressed
, then I get the following data type, and I can visualise it in Rviz.header: seq: 1246 stamp: secs: 1555185575 nsecs: 412069710 frame_id: raspicam height: 308 width: 410 encoding: bgr8 is_bigendian: 0 step: 1230 data: <array type: uint8, length: 378840>
I would appreciate any hint on how to fix this bug. Thank you