要显示我在下面的代码中使用的输出图像
function displayResults(filename, header)
figure('Position',[200 100 700 400], 'MenuBar', 'none', 'Name', header, 'Resize', 'off', 'NumberTitle', 'off');
% Open 'filename' file... for reading...
fid = fopen(filename);
i = 1; % Subplot index on the figure...
while 1
imagename = fgetl(fid);
if ~ischar(imagename), break, end % Meaning: End of File...
[x, map] = imread(imagename);
subplot(2,5,i);
subimage(x, map);
xlabel(imagename);
i = i + 1;
end
fclose(fid);
这导致正确的输出(http://s1273.photobucket.com/user/Chethan_tv/media/figure_zps326033c2.jpg.html)
所有图像都清晰的地方。
但是,我将上面的代码更改为在输出端有 5 个轴的 GUI 中显示,代码如下所示
function displayResults(filename,hObject, eventdata, handles)
% Open 'filename' file... for reading...
fid = fopen(filename);
for N=6:1:10
imagename = fgetl(fid);
if ~ischar(imagename), break, end % Meaning: End of File...
x=imread(imagename);
ax = handles.(sprintf('axes%d', N));
imshow(x, 'Parent', ax);
xlabel(ax, imagename);
end
fclose(fid);
但这导致输出质量差(http://s1273.photobucket.com/user/Chethan_tv/media/fig_zpsa48de802.jpg.html?so rt=3&o=0)
画质怎么了?任何适当的答案都是可观的。