clear all;close all;clc;img=imread('lena.jpg');imshow(img);phi=pi/2;theta=2;sigma=0.65*theta;filterSize=6;G=zeros(filterSize);for i=(0:filterSize-1)/filterSize for j=(0:filterSize-1)/filterSize xprime=j*cos(phi); yprime=i*sin(phi); K=exp(2*pi*theta*sqrt(-1)*(xprime+yprime)); G(round((i+1)*filterSize),round((j+1)*filterSize))=exp(-(i^2+j^2)/(sigma^2))*K; endendJ=conv2(double(img),G);figure,imshow(uint8(J));
参考:
1.
2.
3.