Hi, Does anyone know how can I capture frames of a video in cpp, using opencv without memory leakage problem? [closed]
Hi, I'm using VideoCapture (OpenCV) to capture frames of a video in cpp. As I read forums, there is a memory leakage problem while reading frames in a "while" and this cannot be solved by any command like "release". Also, I read that this is solved in last version of OpenCV. But because of some problems, I'd rather to avoid changing OpenCv version and I'm looking for a command or some changes in OpenCV source code to solve this problem. Also I saw "Memory leak in every thread #9745", but I don't know how to use it to solve this problem. Any help will be appreciated, Sina.
Please show your code.
os ? opencv version ? code ? what did you build, and how ?
we can't help without further information !
Sorry, I didn't know I should say them.
OpenCV version: 3.4.5,(I used CMake to build it)
OS : Windows 10,
I'm using Qt-creator to make a software using c++.
For example when I analyze a video which is about 28 minutes with frame size 640*360, It needs about 1GB RAM. I've checked the code and this happens because of "cap >> frame;" . Thank you