Skip to content

Running out of memmory when using VideoCapture #209

Open
@ThomasWatzl

Description

@ThomasWatzl

I am not entirely sure if this is an issue but I was running in some trubles using your module.
First of all thanks for a great opencv environment.

This code is just an example for what i am trying to do:

var cv = require('opencv');
var camera = new cv.VideoCapture(0);
camera.read(function reading(err, im){
            //do some image processing here.
    camera.read(reading);
});

For a while everything runs just fine but after a while I get the following error:

OpenCV Error: Insufficient memory (Failed to allocate 921604 bytes) in OutOfMemoryError, file /home/pi/opencv-2.4.10/modules/core/src/alloc.cpp, line 52
terminate called after throwing an instance of 'cv::Exception'
what(): /home/pi/opencv-2.4.10/modules/core/src/alloc.cpp:52: error: (-4) Failed to allocate 921604 bytes in function OutOfMemoryError

Is there a way to free memory? I thought the Carbage Collector should take care of that.

Thanks for your help.
Kind regards Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions