![]() |
如何将处理的图片保存在磁盘里
我的程序是JPEG算法的图像压缩,思路是DCT变换,量化,再经过反量化,反变换得到处理后的图像,由于程序太多,我只给下主程序:
function [ output_args ] = JpegCompressionDemo( input_args ) %UNTITLED1 Summary of this function goes here % Detailed explanation goes here clear; clc; close all; %DCT函数也可以选其他函数 [email=fun=@DCT_8X8]fun=@DCT_8X8[/email]; [email=infun=@iDCT_8X8]infun=@iDCT_8X8[/email]; im = imread('lena.bmp'); [mf,nf] = size(im); mb = mf/8; nb = nf/8; subplot(2,2,1); imshow(im); title( sprintf('原图像') ); imf = double(im)-128; %%DCT编码 DCTcof = blkproc(imf,[8,8],fun); %%量化 [Fq] = quantization(DCTcof); a = InverseQuantization(Fq); %%反量化后看误差结果 aa = blkproc(a,[8 8],infun); aa = aa+128; subplot(2,2,2); imshow(uint8(aa)); title( sprintf('经过DCT变化有损量化和反变换的图像') ); 程序运行出来没有问题 我想把处理好的图片保存到磁盘里比如说保存到C盘,请问可行吗?怎么改?谢谢了 |
回复: 如何将处理的图片保存在磁盘里
当然可以了,用imwrite就可以实现呀
|
回复: 如何将处理的图片保存在磁盘里
请问用imwrite具体怎么实现法呢?
|
回复: 如何将处理的图片保存在磁盘里
你可以看看help里对imwrite的描述,如:
imwrite(I,'c:\***','rgb') |
所有时间均为北京时间。现在的时间是 05:07。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.