Comments (8)
Can you try making writeFileSync async (writeFile) and destroy when it is done writing? I think the underlying opencv binding might not be handling something right here
from camera.
I will test but the problem seems not appear inside the callback of webcam.on ('data', function ...
but when the createStream was called...
from camera.
In the README: "createStream optionally takes a camera number and defaults to 0 for the main camera"
Can you try passing in a different number to createStream? It's possible you have a "camera" attached to your computer (physically or virtually) that is messing this up by identifying as your main camera when it isn't
from camera.
Ok so I have try to pass an another index to createStream (1, 2, etc.) but it seems not resolved the problem :
HIGHGUI ERROR: V4L: index 1 is not correct!
/home/pi/babycamble/node_modules/camera/lib/main.coffee:30
cam = new cv.VideoCapture(idx);
^
Error: Camera could not be opened
at Object.module.exports.createStream (/home/pi/babycamble/node_modules/camera/lib/main.coffee:30:13)
at Object.<anonymous> (/home/pi/babycamble/opencv.js:4:21)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
I have also try to remove the line for writing image to filesystem but the problem always appear...
from camera.
What type/model camera do you have plugged in? The data coming back from it is not playing well with OpenCV
from camera.
Okay so it looks that error is in fact coming from a camera compatibility issue. Try another camera or open an issue against OpenCV
from camera.
Okay, this error isn't it ! But it sound like a bug because your library don't use the last VideoCapture API of OpenCV.
--> Changelog
And your seems correct the problem in your last commit ! I will try your last commit now...
from camera.
Ok, so with your last modification, you've correct the problem ;)
from camera.
Related Issues (7)
- "npm install camera" error HOT 2
- webcam.destroy() just stop the streaming but not stoping the camera HOT 2
- thanx for lib. one problem, when calling webcam.destroy() camera led indicator does not turn off. HOT 1
- error when requiring camera HOT 1
- use new opencv camera stream
- Can you please provide me code snippet for saving a video? HOT 1
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 camera.