如何避免MATLAB中的锯齿图像?MATLAB - 如何避免锯齿状图像?
我有一个600 x 600像素的图像在MATLAB中打开,并对图像做了一些处理。但是,当我保存它时,它看起来如此模糊和参差不齐。我该怎么办?
如果它仅仅是一个解决问题,也许使用打印命令(如下所示)有明确的分辨率选项可能会解决(这个问题是涉及到我刚才的问题,MATLAB - How to plot x,y on an image and save?)
fid = fopen(datafile.txt);
A = textscan(fid,'%f%f%f'); %read data from the file
code = A{1};
xfix = A{2};
yfix = A{3};
for k=1:length(code)
imagefile=code(k);
rgb = imread([num2str(imagefile) '.jpg']);
imshow(rgb);
hold on;
x = xfix2(k);
y = yfix2(k);
plot(x,y,'-+ b'); % plot x,y on the
saveas(([num2str(imagefile) '.jpg'])) % Save the image with the same name as it open.
end
hold off
@Jessy你能发表一个代码片段吗? – 2010-07-05 17:52:15
@Vitor,我附上了代码的链接。 – Jessy 2010-07-05 18:02:54
你使用imwrite或imsave来保存图像吗? imwrite有哪些选项? – 2010-07-05 18:13:40