Demonstration of fourier decomposition.Author: Job Bouwman
源代码地址
该程序动态展现了图像的傅里叶分解和重构。从高频信号开始提取,再进行叠加,最终得到原图。
值得注意的现象:
- 高频信号一般存在于图像边缘和细节中,所以原图像逐渐模糊。
- 频率决定灰度信息,相位决定形状信息。
- 一开始灰度变化比较明显(高频率)而后减小。
用户的设定
%% user settings:
% speed in which the demo is carried out:
%图像层移出速率
demoSpeed = 20; % somewhere between 1 and 10
% The selected image:
%
I = imread('cameraman.tif');
% The scale in which it is performed;
scale = 0.5; % either {1 , 0.5 or 0.25}
预处理
-
M = mean(A,dim)
返回维度
dim
上的均值。例如,mean(A,2)
返回A
每一行的均值。 -
B = imresize(A, m)
返回的图像B的长宽是图像A的长宽的m倍,即缩放图像。 m大于1, 则放大图像; m小于1, 缩小图像。
-
viewrange
代表图像色彩展示范围,处理过后比原图更亮了。为什么要进行这样的处理,我也不是很清楚qwq