justadudewhohacks / justadudewhohacks/opencv4nodejs
Wrong aspect on steaming UDP
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
I try to analyse a frame per second of an udp stream, but i returned image has wrong ratio.
The steam returns different ratios (4:3 and 16:9) but the result i get from the .read is every time 4:3.
```
const cv = require('opencv4nodejs');
const vCap = new cv.VideoCapture('udp://239.1.1.1:6670');
let frame;
class Streamer {
streamTest () {
frame = vCap.read();
cv.imwrite('./resources/output.png', frame); // Save frame for debugging
....
this.streamTest();
};
}
```
Also setting the fps for the stream doesn't work.
`vCap.set(cv.CAP_PROP_FPS, 1);`
Contributor guide
Research direction
Reproduce the issue with the UDP stream and the shown VideoCapture entry points: vCap.read(), cv.imwrite(), and vCap.set(cv.CAP_PROP_FPS, 1). Compare returned frame dimensions for the stream's 4:3 and 16:9 content and check whether the FPS setting changes capture behavior. Done means the returned aspect ratio and requested FPS behave as expected, or their limitations are clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, opencv
- Domain
- computer-vision, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100