主要思想:
1.先对图像傅里叶二维变换
2.因为傅里叶而维变换后不是中心对称,要中心对称一下,使中心位于坐标原点
3.根据u=rows,h=colums计算D和H,然后用H对中心对称的图像滤波也就是H乘以变换后的图像
4.傅里叶逆变换ifft2
5.中心对称逆变换ifftshift(它与fftshift互逆)
6.记得图像要转变uint8我也不知道为什么(让我拖延一下)
彩蛋(一段可以改变输入半径D0的代码):
%输入D0的对话框
prompt={'please input the D0zhu'};
dlg_title='this is for the GaussianHighPassFilter';
number_lines=1;
def={'1'};
value_D0=inputdlg(prompt,dlg_title,number_lines,def);
%转变value_D0的类型从cell到char再到double
firstchange=cell2mat(value_D0);
D0=str2double(firstchange);