Ask Your Question

Steve Hess's profile - activity

2015-12-15 17:00:58 -0500 commented question Memory leak in Mat::convertTo

I opened a bug report here. I tried 2 different computers with integrated Intel GPUs and one Mac with AMD GPU. It happened with all of them.

2015-12-15 10:20:05 -0500 commented question Memory leak in Mat::convertTo

On Windows I downloaded the latest dev version 3 from github. On the Mac I used the gold version. I have not put in a bug report yet.

2015-12-15 08:53:37 -0500 received badge  Enthusiast
2015-12-14 11:30:36 -0500 commented question Memory leak in Mat::convertTo

I also duplicated this on a Mac using XCode. Both computers have Intel GPU's and drivers. Running in a VM without a GPU works as expected, useOpenCL = 0.

2015-12-14 11:25:52 -0500 commented question Memory leak in Mat::convertTo

Using your code it just bounces between 107MB and 203MB. If I change it to a 5x5 it keeps going up until all memory is gone. Can you run it again with a 5x5?

If both are UMat then it keeps going up regardless of the size.

2015-12-11 19:33:31 -0500 commented question Memory leak using copyTo UMat

I ran into this also and posted a similar question here with some additional memory information from VS 2015. http://answers.opencv.org/question/78...

2015-12-11 19:26:55 -0500 received badge  Supporter (source)
2015-12-11 19:19:27 -0500 commented question Memory Leak in Mat::copyTo()

This results in a memory leak if one is a UMat and the other is a Mat. I ran into this problem and posted a question with some additional memory diagnostics from VS 2015 here. http://answers.opencv.org/question/78...

2015-12-11 09:16:16 -0500 received badge  Editor (source)
2015-12-11 08:50:50 -0500 commented question Memory leak in Mat::convertTo

I was using the warpPerspective function and the program would run until all memory was used. If you wrap these three lines in a while(true) loop you can watch memory use go up in task manager. Changing UMat to Mat does not have the same problem. This happened using the Ceemple Visual Studio 2013 plugin binaries. I then downloaded source from github and recompiled in VS 2015. I then found the VS 2015 memory leak tools and was able to trace the problem back to this convert statement. Since then I've found that it isn't just convertTo. It also breaks with copyTo. I think the root problem is the code that allocates the UMat, but I'm reaching the limits of my technical ability. I'll keep working on it, but I felt it was serious enough to post about.

2015-12-10 23:35:39 -0500 asked a question Memory leak in Mat::convertTo

While using warpPerspective with openCL I was having a memory leak. Disabling opencl by using Mat or calling cv::ocl::setUseOpenCL(false) solved the problem. I think I've tracked it down to a line in ocl_warpTransform that uses convertTo from Mat to UMat. Here is code to replicate this.

int main(int, char)
{
    while (true)
    {
        Mat matM(Size(5, 5), CV_32F);
        UMat M0;
        matM.convertTo(M0, CV_32F);
    }
}

I used VS 2015 diagnostics tool (alt-F2). Ran this program and did a memory snapshot at about 2 sec and another one 10 seconds later. Attached is a picture of the changed memory report. image description