GithubHelp home page GithubHelp logo

Comments (8)

yocontra avatar yocontra commented on May 19, 2024

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.

vincentsaluzzo avatar vincentsaluzzo commented on May 19, 2024

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.

yocontra avatar yocontra commented on May 19, 2024

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.

vincentsaluzzo avatar vincentsaluzzo commented on May 19, 2024

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.

yocontra avatar yocontra commented on May 19, 2024

What type/model camera do you have plugged in? The data coming back from it is not playing well with OpenCV

from camera.

yocontra avatar yocontra commented on May 19, 2024

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.

vincentsaluzzo avatar vincentsaluzzo commented on May 19, 2024

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.

vincentsaluzzo avatar vincentsaluzzo commented on May 19, 2024

Ok, so with your last modification, you've correct the problem ;)

from camera.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.