use of parallel computing function lowers quality of saved image
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, I'm generating and saving some figures as png images, using commands along the lines of:
fig=figure('Color',[1,1,1],'Position',[0 0 1242 1679]);
set(fig,'PaperUnits','centimeters','PaperType','A4','PaperOrientation', 'portrait', 'PaperPosition', [0.63452 0.63452 21 28.41]);
(code to plot data here)
printtext = sprintf('print -dpng -r150 %s',imageName);
eval(printtext);
The figures get saved as 1242- by 1679-pixel png images, as desired, when I run the code without using the Parallel Computing Toolbox.
However, once I set the parallel computing version going, using 'parfor' loops, my images are saved with dimensions of only 596 by 806 pixels (half the desired width and height).
I've tried increasing the resolution from 150 to 300 and 600 dpi, and/or specifying a different figure size with the command fig=figure('Color',[1,1,1],'Position',[0 0 1242*2 1679*2]); to no avail.
I'm not sure how the change in environment (from non-parallel to parallel) causes this decrease in image quality, and can't find any documentation about this particular issue.
If anyone can shed light on it or offer suggestions, that'd be much appreciated.
Thanks,
Xing
1 件のコメント
Jan
2013 年 2 月 21 日
Just a note: Avoid using EVAL without any reasons. This is much nicer:
print('-dpng', '-r150',imageName)
採用された回答
その他の回答 (1 件)
Sean de Wolski
2013 年 2 月 21 日
I can reproduce this. It is apparently somehow related to how the figures are created in headless mode.
Please contact technical support.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Parallel for-Loops (parfor) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!