Description: 高频强调滤波和灰度变换进行图像增强:
1. main.m 主程序
2. paddedsize.m 对图像进行补充,以便形成的方形大小等于最小接近的2的整数次幂。
3. dftfilt.m 输入图像f和一个滤波器函数,返回经过滤波和剪切后的图像g。
4. dftuv.m 提供频域坐标网格。
5. lpfilter.m 几种常用的低通滤波器。
6. hpfilter.m 实现高通滤波。
7. BodyImage.JPG 测试用图片
注:
1. 运行程序前,请在main.m中更改读入图片的路径。
2. main.m中的灰度变换部分的代码只适用于上述测试图片。应用于其他图片时,应分析灰度直方图后,对这部分程序进行修改。-High frequency emphasis filter and the gradation conversion for image enhancement: 1. Main.m main 2. Paddedsize.m add the image to the size of the smallest square formed close to an integer power of 2. 3. Dftfilt.m input image f and a filter function that returns the filtered and trimmed image g. 4. Dftuv.m provide frequency domain coordinate grid. 5. Lpfilter.m several commonly used low-pass filter. 6. Hpfilter.m high-pass filter. 7. BodyImage.JPG test image Note: 1. Before running the program, please read the main.m change the image path. 2. Main.m the gradation conversion section of the code is only applicable to the above test images. Analysis should be applied to other image histogram after this part of the program to be modified. Platform: |
Size: 11264 |
Author:穆歌 |
Hits:
Description: 函数paddedsize可计算P和Q的最小偶数值,PQ则是避免折叠误差的串扰所采用的补零方法。
函数dftfilt是用于频率域滤波的M函数
在house中进行空域滤波与频域滤波的比较
函数dftuv创建用于实现频率域滤波器的网格数组
在number中进行低通滤波
还可基于lpfilter生成高通滤波器。
函数D=hypot(U,V)<=>D=sqrt(U.^2+V.^2)替代
函数f=tofloat(f)<=>f=im2double(f)替代-Paddedsize calculate P and Q function minimum even value, PQ is zero-padded to avoid aliasing errors Crosstalk being used.
Dftfilt function is used for frequency domain filtering function M
Comparing spatial filtering and frequency domain filtering in the house in
Function dftuv create a grid array is used to implement frequency domain filter
Low-pass filtering in number of
It can also generate a high-pass filter based on lpfilter.
Function D = hypot (U, V) <=> D = sqrt (U. ^ 2+ V. ^ 2) substitute
Function f = tofloat (f) <=> f = im2double (f) Alternate Platform: |
Size: 190464 |
Author:侯嘉畅 |
Hits: