资源简介
下载直接可用的非局部均值去噪MATLAB源代码 ,非局部均值是利用空间域相似块进行去噪的一种经典算法
代码片段和文件信息
function im_ext = bound_extension(imByBxtype)
% im_ext = bound_extension(imBtype);
%
% Extend an image for avoiding boundary artifacts
%
% By Bx: widths of the added stripes.
% type: ‘mirror‘ Mirror extension
% ‘mirror_nr‘: Mirror without repeating the last pixel
% ‘circular‘: fft2-like
% ‘zeros‘
% Javier Portilla Universidad de Granada Jan 2004
[NyNxNc] = size(im);
im_ext = zeros(Ny+2*ByNx+2*BxNc);
im_ext(By+1:Ny+ByBx+1:Nx+Bx:) = im;
if strcmp(type‘mirror‘)
im_ext(1:By::) = im_ext(2*By:-1:By+1::);
im_ext(:1:Bx:) = im_ext(:2*Bx:-1:Bx+1:);
im_ext(Ny+1+By:Ny+2*By::) = im_ext(Ny+By:-1:Ny+1::);
im_ext(:Nx+1+Bx:Nx+2*Bx:) = im_ext(:Nx+Bx:-1:Nx+1:);
im_ext(1:By1:Bx:) = im_ext(2*By:-1:By+12*Bx:-1:Bx+1:);
im_ext(Ny+1+By:Ny+2*ByNx+1+Bx:Nx+2*Bx:) = im_ext(Ny+By:-1:Ny+1Nx+Bx:-1:Nx+1:);
im_ext(1:ByNx+1+Bx:Nx+2*Bx:) = im_ext(2*By:-1:By+1Nx+Bx:-1:Nx+1:);
im_ext(Ny+1+By:Ny+2*By1:Bx:) = im_ext(Ny+By:-1:Ny+12*Bx:-1:Bx+1:);
elseif strcmp(type‘mirror_nr‘)
im_ext(1:By::) = im_ext(2*By+1:-1:By+2::);
im_ext(:1:Bx:) = im_ext(:2*Bx+1:-1:Bx+2:);
im_ext(Ny+1+By:Ny+2*By::) = im_ext(Ny+By-1:-1:Ny::);
im_ext(:Nx+1+Bx:Nx+2*Bx:) = im_ext(:Nx+Bx-1:-1:Nx:);
im_ext(1:By1:Bx:) = im_ext(2*By+1:-1:By+22*Bx+1:-1:Bx+2:);
im_ext(Ny+1+By:Ny+2*ByNx+1+Bx:Nx+2*Bx:) = im_ext(Ny+By-1:-1:NyNx+Bx-1:-1:Nx:);
im_ext(1:ByNx+1+Bx:Nx+2*Bx:) = im_ext(2*By+1:-1:By+2Nx+Bx-1:-1:Nx:);
im_ext(Ny+1+By:Ny+2*By1:Bx:) = im_ext(Ny+By-1:-1:Ny2*Bx+1:-1:Bx+2:);
elseif strcmp(type‘circular‘)
im_ext(1:By::) = im_ext(Ny+1:Ny+By::);
im_ext(:1:Bx:) = im_ext(:Nx+1:Nx+Bx:);
im_ext(Ny+1+By:Ny+2*By::) = im_ext(By+1:2*By::);
im_ext(:Nx+1+Bx:Nx+2*Bx:) = im_ext(:Bx+1:2*Bx:);
im_ext(1:By1:Bx:) = im_ext(Ny+1:Ny+ByNx+1:Nx+Bx:);
im_ext(Ny+1+By:Ny+2*ByNx+1+Bx:Nx+2*Bx:) = im_ext(By+1:2*ByBx+1:2*Bx:);
im_ext(1:ByNx+1+Bx:Nx+2*Bx:) = im_ext(Ny+1:Ny+ByBx+1:2*Bx:);
im_ext(Ny+1+By:Ny+2*By1:Bx:) = im_ext(By+1:2*ByNx+1:Nx+Bx:);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2254 2008-11-18 14:31 bound_extension.m
文件 16812 2010-06-14 14:53 nlmeans_lnla2008_goossens.m
文件 3364 2010-06-14 13:53 psdnoise.m
文件 269256 2005-07-23 12:18 barbara_big.tif
文件 335 2006-04-07 20:43 GetPSNR.m
- 上一篇:三维射线追踪
- 下一篇:遗传算法解决VRP源程序
相关资源
- 三维射线追踪
- 复杂电磁环境下的抗干扰建模
- OFDMA matlab仿真程序
- 基于matlab的数字滤波器的有限字长效
- 基于BP神经网络的手写体数字识别
- Matlab信源编码huffman
- ExOR算法 的 matlab 实现
- SUSAN 角点检测 matlab代码
- rs编译码程序MATLAB
- 动态矩阵控制matlab仿真程序
- 无线通信MIMO中STBC的matlab仿真
- 油藏数值模拟matlab代码
- matlab 量子隧穿效应的可视化编程
- 第一范数最小化matlab源代码
- 自适应预测神经网络matlab程序
- 基于小波变换和SVD分解及各种攻击的
- 遗传算法优化BP神经网络matlab程序
- lasso程序,从matlab提取
- Matlab 数字下变频DDC CIC NCO
- AHD算法的matlab实现Bayer转RGB算法
- 深度信息提取
- 基于卡尔曼滤波算法的雷达追踪算法
- 遗传算法优化神经网络的matlab程序
- MATLAB实现BPSK
- MATLAB摄像机标定程序
- matlab基于小波融合的人脸融合
- fsvm的matlab实现
- 采样频率绘制matlab代码
- 基于轮廓提取的多边形近似匹配算法
- 基于matlab代码实现的SVPWM程序
评论
共有 条评论