?? gaussian_pyramid.m
字號:
function G=gaussian_pyramid(I)%create Gaussian pyramid of images from image I%works for images with dimensions 2^N+1%Homework2 - Computer Vision - Benjamin Berger - Part 1.1.1%CISC 689 - University of Delaware - 03/16/03% I: raw image - G: cell array of Gaussian pyramid images%Iorig = imread('../zebragray.png');%B=rgb2gray(I);%[r c d]=size(Iorig);%cut ugly stripes... (would give stripes through whole pyramid)%Iorig=Iorig(2:r,1:c-1);[r c d]=size(I);ghat=[0.05,0.25,0.4,0.25,0.05];%look if rows are greater than coloumns?%Pyramid has N+1 levels, if smallest dimension 2^N+1N=floor(log2(r-1));G{1} = im2double(I); %cell indices must be > 0%create array of Pyramids:for level = 1:N-1 G{level+1} = reduce(G{level}); % imshow(G{level+1}); % save pics with dynamic filename (add level number) % print( '-dgif', ['gaussian',char(sym(level+1))] )end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -