You are not logged in.

#1 2017-04-11 17:32:23

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

[SOLVED] Opencv memory usage

Hi!
In a side-project of mine, i need to capture frames from webcam devices. I was doing this through videodev and decoding jpeg with libjpeg-turbo.
The only real downside was that i only supported webcam that supported jpeg format.
So today i tried opencv, and it works very nicely.
But i noticed that ram usage increased a lot: it was 400Kb with videodev, and now it is 12-13Mb.
I already tried to include and thus link in only the headers i need. It reduced ram usage of about  2Mb (down to 10Mb).
I also noticed that not linking "-lopencv_videoio" reduces ram usage to 2Mb. Unfortunately, i obviously need that module.
How can opencv linking use this much memory? Is there anything i can do to lower that?
Or, at least, is there any lighter alternative to opencv?

Thank you very much!

EDIT: i am using opencv 3.2.0-1, and opencv2 library.

Last edited by nierro (2017-04-12 19:58:39)

Offline

#2 2017-04-12 10:09:51

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Opencv memory usage

Mmmh i found out about devil, or freeImage.
It seems they both can satisfy my needs. I will try to use one of them and report back here.
In case memory usage is lower and it fits 100% my purposes, i will mark this thread as SOLVED.

Offline

#3 2017-04-12 19:58:29

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Opencv memory usage

Devil seems to fullfil my needs. Very handy library.
I'll mark the thread as solved.

Offline

Board footer

Powered by FluxBB