Comments (5)
Same problem here with web_video_server
! Any idea how to fix this?
from raspicam_node.
I am also having this issue, hope to hear some kind of fix
from raspicam_node.
me too! any comment?
from raspicam_node.
Can confirm this is still a problem.
from raspicam_node.
I think I know the source of this problem.
- Actually, while capturing RAW data from the sensor, native Pi utilities (like raspividyuv etc) requires width to be dividable by 32, and height to be dividable by 16.
- If you capture non-RAW (like using raspivid utility), these utilities do scaling to get final requested resolution, so you didn't notice this issue. Scaling is done by GPU, so performance is the same.
What's going on in your case:
- You ask to capture 308x410 resolution
- 308/16 = 19.25 (non dividable by 16). Next nearest to 19.25 is 20, so system captures 20x16= 320 instead of 308
- 410/32 = 12.8125 (not dividable by 32). Next nearest to 12.8125 is 13, so system captures 13x32 = 416
- You actually have 320x416x3 = 399360 bytes of data. Right these numbers are declared here in your first message:
data: <array type: uint8, length: 399360>
We faced this problem in our stereoscopic OpenCV scripts, and use a couple of approaches here:
- Check, if the resolution you set is dividable by 16 (X and Y), and if not - fix it before transmitting these parameters to the capturing part. I.e. in your case try to set 320x416 instead of 308x410.
- Keep the resolution you use, but fix the X and Y you expect in output data.
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.
from raspicam_node.
Related Issues (20)
- raspicam_node image_raw=true don't work on PI2 HOT 3
- Noetic release raspicam_node HOT 28
- Problem in ROS-Noetic - Failed to create camera component - connections are fine. HOT 9
- cv_bridge conversion error: 'Image is wrongly formed HOT 3
- Possible to split combined stereo cameras (Arducam etc)? HOT 1
- no data over network HOT 1
- Video Latency of 3-4 seconds and is it possible to have a raw video/images instead of compressed? HOT 6
- Noetic branch/tag HOT 10
- Update needed? HOT 1
- ROS Noetic Troubleshoot HOT 8
- Enabling RAW HOT 4
- Will this create a point cloud? HOT 1
- 18.04 with ROS melodic - raspicam_node fails HOT 2
- " sudo apt install libraspberrypi-bin" is giving me an error
- Upgrading to noetic branch? HOT 6
- [error] No Disparity images and synchronized triplets received in 'image_view'
- Increasing framerate zooms the video stream HOT 1
- Issue while building raspicam_node package on ros noetic in rpi with 64 bit raspbian OS HOT 7
- Quality checks always false
- Default magni noetic image 6-15.
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 raspicam_node.