Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Loading multiple images from file to the same Mat?

Hello,

Currently if I want to load two images from two different files I have to do this:

cv::Mat image1 = cv::imread("C:\\image1.png"); 
cv::Mat image2 = cv::imread("C:\\image2.png");

Is it possible to reuse the same image1 object and load second image to it when I've finished with first? Function like this would be handy:

cv::Mat image1 = cv::imread("C:\\image1.png"); 
cv::imread(image1, "C:\\image2.png");