justadudewhohacks / justadudewhohacks/opencv4nodejs
videocapture timeout error USB camera
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm using your fantastic library but I have this problem when I run this node:
`const cv = require('opencv4nodejs');`
`const { runVideoFaceDetection } = require('./commons');`
`const classifier = new cv.CascadeClassifier(cv.HAAR_FRONTALFACE_ALT2);`
`const webcamPort = 0;`
`function detectFaces(img) {`
`// restrict minSize and scaleFactor for faster processing`
`const options = {`
`minSize: new cv.Size(100, 100),`
`scaleFactor: 1.2,`
`minNeighbors: 10`
`};`
`return classifier.detectMultiScale(img.bgrToGray(), options).objects;`
`}`
`runVideoFaceDetection(webcamPort, detectFaces);`
The node turns on the camera (USB Webcam), runs for 10 seconds and after:
select timeout
VIDIOC_DQBUF: Resource temporarily unavailable
No frame
I'm running the node with NodeJS 10, on a TinkerBoard.
I have installed the package simply with:
`npm install --save opencv4nodejs`
Any idea? Thanks
Contributor guide
Assessment
This issue has not been assessed yet.