2016-01-23 19:46:37 -0600 | commented question | Memory leak using copyTo UMat I found a similar problem and a simple workaround I don't know why works. Simply use the UMat with some OpenCV call. For example this code works: but this following code not calling color convert will have the same problem you are having which is running out of memory: Try calling some OpenCV function like resize or color convert that will queue up a OpenCL command. See if your memory problem goes away. |
2016-01-23 01:18:01 -0600 | asked a question | Capture Mat copy to UMat fails on 32-bit app, works on 64-bit, timing? Here's a interesting problem with OpenCV 3.1.0, this code fails with an cv:Exception in clEnqueue on a 32 bit build, and yes per MSVC Diagnoctics it grows to 2GB and fails. Same code/32bit-build with imshow/waitkey then no exception. On 64bit the mem usage goes up to 2GB but then drops back down, then goes back up! What is going on? Remove the im.copyTo the UMat then no memory leak... Weird. |