MATLAB Error using getImageFromFile
Show older comments
I have a MATLAB script that pulls random images from a file and displays them on screen along with a slider uicontrol, and the user is asked to rate the similarity of the two images. I have a very large set of pictures, and it necessitates about 500 trials or so per user.
However, MATLAB causes an error, but only after a couple hundred trials, and I can't figure out what is causing it. This is the error it gives me:
??? Error using ==> getImageFromFile at 38
Could not read this file: "pictures/plier.png"
Error in ==> imageDisplayParseInputs at 147
Error in ==> imshow at 199
Error in ==> semjudge>NextTrial at 243
??? Error while evaluating uicontrol Callback
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
The desktop configuration was not saved successfully
Error occurred while loading file contents from disk:
/Users/slevclab/Documents/MATLAB/Semjudge/subject_1_data(1).txt (Too many open files)
Error occurred while loading file contents from disk:
/Users/slevclab/Documents/MATLAB/Semjudge/subject_1_data(1).txt (Too many open files)
I don't know what the problem is. There is nothing wrong with the image file itself. In fact, that image had already appeared earlier in the experiment before the error message ran. This only happens after a large number of trials have been run. If I run a smaller number of trials there is no error.
The code for my script is here (it is too long to just post):
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!