Code Monkey home page Code Monkey logo

Comments (5)

ColonelParrot avatar ColonelParrot commented on July 17, 2024 1

OK, so you are able to get high res images, but are experiencing memory leaks?

from jscanify.

ColonelParrot avatar ColonelParrot commented on July 17, 2024

Interesting. From what I gather, you are having trouble getting high resolution images through WebRTC?
Could you share the code you're using? Might be able to help from there.

from jscanify.

adantart avatar adantart commented on July 17, 2024

It's just to have the getUserMedia with a constraints of 1920 or higher...
OpenCV Mat has a known bug with garbage collector (opencv/opencv#15060) and when you use video or high resolution photo is too heavy for Javascript.
I'm trying to use to capture more than 1 document, and if the "session" lasts more than 3/4 minutes, it finally crashes resulting in a memory fault.
I've tried to "delete" everything possible, but it's something very "deep" in OpenCV.

from jscanify.

ColonelParrot avatar ColonelParrot commented on July 17, 2024

Hmmmm, ok. If it's a problem on OpenCV's side then there's not much I can do, but I'll take a look to see whether there could be some fault on my side exacerbating this problem.
I wonder whether you could simply set a timer on the camera? E.g., after 45 seconds automatically close the stream due to inactivity.

from jscanify.

adantart avatar adantart commented on July 17, 2024

I already tested it.
The problem is that OpenCV does not "clean" well.
The problem is not from the streaming that "overloads" the memory, but from each time you call OpenCV to do the calculations.
That is, it is as if you have a "maximum number of seconds where OpenCV works".
Even if you cut the streaming, it doesn't minimize the overall problem.
I'll keep thinking of something.

Of course, all this happens when you want to make a "long" and continuous use of OpenCV with resolutions beyond 800x600.

from jscanify.

Related Issues (20)

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.