资源简介
利用MCA技术可以对图像进行分解与修复,其核心是对图像分解成纹理图像和平滑图像,然后分别进行修复。
代码片段和文件信息
function ML=perform_mca( xoptions)
%ML=perform_mca(xoptions)执行对输入的图像进行分解
%Inputs:
%x为一个二维图像矩阵
%components为一个单元数组,它的长度为所要分解的元素个数
%options为结构体,它用来传输用户所设定的迭代次数,门限,收缩步长等参数
%Outputs:
%ML用来存储已经分解开的形态元素
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
options.null = 0;
if isfield(options ‘niter‘)
niter = options.niter;
else
niter = 20;
end
if isfield(options ‘Tmax‘)
Tmax = options.Tmax;
else
Tmax = max(abs(x(:)));
end
if isfield(options ‘Tmin‘)
Tmin = options.Tmin;
else
Tmin = 0;
end
if isfield(options ‘lamda‘)
lamda = options.lamda;
else
lamda = 1;
end
if isfield(options ‘threshold‘)
threshold = options.threshold;
else
评论
共有 条评论