图像拉普拉斯金字塔分解 matlab源程序

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

function I=dec_gaussian(img)

% % This function is used to process gaussian decomposion of input image.
% % editor : denghaibo
% % date : 2009-4-8
% % DEFINITION OF VARIABLES:
% % VARIABLE MEANING
% % level decompose level 分解层
% % img input image 输入图像
% % G_LOWER extracted image //提取的图像
% % DECIM convolved image //卷积图像
% % GDEC_level save the decomposed image in each level // 保存分解的图像
% % GDEC_level is a 3-D matrix //3维矩阵
% % size(GDEC_level)=[row,col,level]; 【行,列,层级】

level=3; % % 分解次数
img1=img;
G0=double(img1);
% % modify data class
% % G0 is the 0th decomposition level
[row,col]=size(G0);

plate=[1,4,6,4,1;4,16,24,16,4;6,24,36,24,6;4,16,24,16,4;1,4,6,4,1];
W=plate/256; % % 这个不管

G_LOWER=G0;

GDEC=zeros(level,row,col); % % save the Gaussian decomposition image
GDEC=GDEC-1; % % the reason to subtract 1 is used to judge the edge of the extracted image;

for(flag=1:level)
G_LOWER=G_LOWER(1:2:end,1:2:end); % % 隔行隔列取点,也就是金字塔分解,这个是重点~!!!!

DECIM=conv2(G_LOWER,W,'same');
[decrow,deccol]=size(DECIM);

GDEC(flag,1:decrow,1:deccol)=DECIM; % % save the decomposed image
I=GDEC;
end
save GDEC;
figure
imshow(uint8(DECIM));
end % % end of function


相关文档
最新文档