My doubt is whether these waves means cosine (or sine) functions from the Fourier series formula?
Here the part of source code from the description of the video on youtube. (I have cut a small part of it and have written some comments for sake of clarity):
% Read initial image.
I = imread('cameraman.tif');
...
% Calculate amplitudes of frequency components.
FT_I = fftn(I);
ABS_FT_I = abs(FT_I);
% Initialize some global variables.
FT_new = zeros(size(FT_I));
FT_cur = zeros(size(FT_new));
newIm = zeros(size(FT_new));
...
% Demo loop.
n = 1;
nWaves = 1;
while n < % termination condition here.
% Choosing values of demo's parameters.
if n > 20; nWaves = 10; end
if n > 200; nWaves = 100; end
if n > 2000; nWaves = 1000; end
% Nullify global temporary variable.
FT_cur = 0*FT_cur
% Accumulate 'extracted waves' in frequency domain.
for p = 1:nWaves*2
% Find indices of frequency components with max amplitude.
[a,b] = find(ABS_FT_I == max(ABS_FT_I(:)), 1, 'first');
ABS_FT_I(a,b) = 0;
% Append them to the temporary buffer.
FT_cur(a,b) = FT_I(a,b);
end
% Create 'extracted waves' in spatial domain.
I_cur = ifftn(FT_cur);
% Concatenate all parts of an video frame.
canvas = cat(2, real(I - newIm - I_cur), zeros(size(I)), newIm);
canvasShow = canvas;
canvasShow(:,1:N(2)) = canvasShow(:,1:N(2)) + I_cur;
subplot(2,1,2);
% Plot the real part of the video frame.
% And as result the real part of 'extracted waves'.
imagesc(real(canvasShow), viewRange);
...
end
According to source code, the plot of extracted waves
is the real part of the Inverse Fourier Transform of the sum of nWaves
spectral components $F(s,t)$ with maximum amplitude:
\begin{equation}
f(x,y) = \frac{1}{NM}\sum\limits_{s,t\in U}Re\big(F(s,t)e^{2\pi i(sx/N + ty/M)}\big)
\end{equation}
where $f(x,y)$ is the value of the $(x,y)$ pixel of the extracted waves
image in the spatial domain, $F(s,t)$ is the value of the $(s,t)$ component in the frequency domain, $U$ is first nWaves
frequency components with $\max|F(s,t)|$.
So these waves aren't cosine nor sine. They are non trivial linear combination of sine and cosine waves.
What are basis functions (images) and Whether the plot of Extracted waves are called as basis functions in mathematics?
It's hard to tell without knowing the procedure, that have been used to create those images. But if the procedure is the same as in the video presentation, then it isn't technically correct to call those images Basis Functions.