answered 2018-11-07 02:26:43 -0600
simply do it like:
cv::Mat image = cv::imread("C:\\image1.png"); // do something with image, then recycle it: image = cv::imread("C:\\image2.png");