1 简介
通过对含高斯噪声的图像进行分析和研究,采用中值、均值、维纳、小波来进行图像去噪。
2 部分代码
function vector = huffdecode(zipped, info, image)% 函数对输入矩阵vector进行Huffman解码,返回解压后的图像数据if ~isa(zipped, 'uint8')error('input argument must be be a uint8 vector');end%产生0,1序列,每位占一个字节len = length(zipped);string = repmat(uint8(0), 1, len.*8);bitindex = 1:8;for index = 1:lenstring(bitindex + 8.*(index-1)) = uint8(bitget(zipped(index), bitindex));endstring = logical(string(:)');len = length(string);string ((len-info.pad+1):end)=[];len = length(string);%开始解码weights = 2.^(0:51);vector = repmat(uint8(0), 1, info.length);vectorindex = 1;codeindex = 1;code = 0;for index = 1:lencode = bitset(code, codeindex, string(index));codeindex = codeindex+1;byte = decode(bitset(code, codeindex), info);if byte > 0vector(vectorindex) = byte-1;codeindex = 1;code = 0;vectorindex = vectorindex + 1;endendvector = reshape(vector, info.rows, info.cols);%函数decode返回码字对应的符号function byte = decode(code, info)byte = info.huffcodes(code);
3 仿真结果

4 参考文献
[1]彭姝姝. 基于均值滤波和小波变换的图像去噪[J]. 现代计算机, 2019(12):6.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。










