資源簡介
利用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
??
評論
共有 條評論