function gabor2out = gabor2(img,Ws,thetar) %% S:0,1,2,3,4 %%%5个半径分割 %% R:0,1,2,3,4,5 %%%%6个方向分割 % Ws=[3/4,3/8,3/16,3/32,3/64]; % thetar=[0,pi/6,pi/3,pi/2,2*pi/3,5*pi/6]; [row,col]=size(img); maxW=double(uint16(sqrt(row*row+col*col))); W=0:maxW/(row-1):maxW; theta=2*pi*(0:90/(col-1):90)/360; delr=pi*pi/36/8/log(2); dels=Ws/3/sqrt(2*log(2)); WO=exp(-(W-Ws).^2/2/dels/dels); ThetaO=exp(-(theta-thetar).^2/2/delr/delr); gabor2out=(WO')*ThetaO; clear WO clear ThetaO clear WO clear ThetaO