Running out of memory using imfuse repeatedly
Show older comments
I want to iterate into a loop and based on the i'th of a vector, i want to concatenate some specific picture to the last picture. The loop has to be iterated 16 time so at the end I expect to see an image which consists of 16 images. But I get the Running out of Memory error.
I thought the problem is with the loop so I manually copied the code. But the error still exists. Below you can see a piece of code. "addGen" is a function which generates the address of the image which needs to be added and "chars" is some vector. Is there any alernative to do so or any solution to solve the memory problem?f
image = imfuse(image,imread(addGen(chars(3))),'montage');
image = imfuse(image,imread(addGen(chars(4))),'montage');
image = imfuse(image,imread(addGen(chars(5))),'montage');
image = imfuse(image,imread(addGen(chars(6))),'montage');
image = imfuse(image,imread(addGen(chars(7))),'montage');
image = imfuse(image,imread(addGen(chars(8))),'montage');
image = imfuse(image,imread(addGen(chars(9))),'montage');
Accepted Answer
More Answers (1)
Jan
on 15 May 2021
1 vote
"Out of memory" means, that your RAM is exhausted. The efficient solution is to install more RAM and to care for freeing as much memory as possible, e.g. by clearing other variables, which are not used anymore or to stop other applications.
How large are the images? How much RAM is available on your computer?
Categories
Find more on Image Sequences and Batch Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!