图像的高斯金字塔分解 matlab源程序

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

图像的高斯金字塔分解 matlab源程序2009-04-16 00:02关键词:Laplacian Pyramid Decomposition; matlab
拉普拉斯金字塔分解;matlab源程序

说明:该函数的作用是对输入图像做金字塔分解。
level为指定分解图像的层次


function dec_gaussian
% % 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
% % size(GDEC_level)=[row,col,level];

level=5; % % definition of decomposition level
img=imread('lena.gif');
G0=double(img); % % 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; % % definition of the core

G_LOWER=G0;

GDEC=zeros(row,col,level); % % 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=reduce2(G_LOWER); % % 2-EXTRACT
DECIM=conv2(G_LOWER,W,'same');
[decrow,deccol]=size(DECIM);
figure;imshow(uint8(DECIM));title(['level ',num2str(flag)]);
GDEC(1:decrow,1:deccol,flag)=DECIM; % % save the decomposed image
end
save GDEC;
end % % end of function

相关文档
最新文档