cv::resize() use 20M memory

asked 2019-05-07 06:54:23 -0600

updated 2019-05-07 06:58:15 -0600

opencv version: 3.1.0

Code:

cv::Mat a(1024, 1024, CV_8UC1);

cv::Mat b(512, 512, CV_8UC1);

cv::resize(a, b, cv::Size(512, 512));

The memory cost raised 20M after cv::resize().

The number is different on different environment.

Is Opencv create some memory cache?

How do I release these memory?

edit retag flag offensive close merge delete