Azzera filtri
Azzera filtri

How can I save different images using matlabpool parallel tool?

2 visualizzazioni (ultimi 30 giorni)
Dear Adam:
I am working on digital image processing and recently I have the need to make my programs run in parallel way and I need your advice. The first problem that I have is that, as you said, workers in Matlab have some restrictions (cannot handle images due to the -nojvm command).
So, I was thinking follow tour advice and save the images at each loop iteration, the next question is how can I do that? Take into account that with PARFOR we don't have control over which loop iteration get run when and in what order, how I can save the images in order that I can have the control of a iterate variable that can be added to the name of the result file?
I am trying to use a global iteration variable in order to construct the file name in this way:
str = '';
str = strcat(str,'tmp-');
str = strcat(str, int2str(obj.counter));
str = strcat(str, '.tif')
where counter is the iterate variable. But this does not work and at the end of the process I have the saved file with the name 'tmp-1 (it depends a number that I gave at the beginning and normally is greater than 2) . What I am doing wrong?
I will appreciate any help.
-------------------------------------------------------------------------------------------------------------------------------------------------------- your response at Adam Filion on 25 Jun 2012 on http://www.mathworks.com/matlabcentral/answers/41930-parallel-computing-run-two-function-simultaneously
"Workers are started with a number of restrictions on them. One of them is -nojvm, which disables java. Some others are -singlecompthread, which limits it to a single computational thread, and -nodesktop, which turns off the MATLAB desktop. I think there may be a few others I'm forgetting, but the error you are seeing is expected. If you want to view these images, save them to a file at each loop iteration."

Risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by