Is it possible to ‘interpolate’ in FFT data?
We kmow OTF and PSF are continuous, can be interpolate inside it (<cutoff freq ) even when we express them wIth matrix use integer row&col coordinate .
now I have a image, and get its FFT2, and find some feature like max or min only with row and col,
but I know true max or min not at that integer row and col exactly, It is really at a fraction position near that integer row and col in matrix.
How to get it if I know fraction or decimal position ?
In frequency domain, can exten matrix size with 0, but can not interpolate although we can interpolate at time domain.
How to do ?
Maybe I can do so like such method : in time domain , matrix .* with exp( – j ke), {ke is a decimal number part }, to realize freq shift effect, after that, FFT, now at that row&col coordinate really is a value corresponding to [ row&col + decimal ke ] position, so I get it .
Such idea is right ? I am not expert at FFT, who can tell me , Is it Right ?
or how to find the feature not exactly at discrete integer row&col coordinate ?
I need some value at real flot number row&col coordinate ?
—————————————————————————————————————–
I mean :
For simple example:
there are 512 data point with coordinate 1~512, transfer to freq domain with FFT, it is 512 mag and phase with coordinate -256~255 * 1/256 .
now if I specially add a cosine wave with freq 180.324 *1/512 to 512 data point (I used it as a special inner reference), then transfer to freq domain with FFT.
here , how to find mag and phase information of this added cosine wave in freq domain ?
freq 180.324 , is not a integer -256~255 coordinate, so how to find it ?
sample code:
% Time domain
t = linspace(1,512,512);
g = 2*sin(2*pi*t*16/512) + 0.5*sin(2*pi*t*64/512)+ 0.4*sin(2*pi*t*128/512);
gadd = g+0.2*cos(2*pi*t*180.327/512);
%gadd = g+5*sin(2*pi*t*180.327/512);
% now add 180.324 or any another not N/512
subplot(2,2,1);
plot(g);
title("Time domain 3 sin")
subplot(2,2,2);
plot(g);
title("Time domain, 3 sin + cos")
fco = linspace(-256,255,512);
F=fftshift(fft(g));
F1=fftshift(fft(gadd));
subplot(2,2,3);
stem (fco,real(F));
title("Freq domain, 3 sin")
subplot(2,2,4);
stem (fco,real(F1));
title("Freq domain, 3 sin + cos")
% how to find that 180.327 accuratly ?We kmow OTF and PSF are continuous, can be interpolate inside it (<cutoff freq ) even when we express them wIth matrix use integer row&col coordinate .
now I have a image, and get its FFT2, and find some feature like max or min only with row and col,
but I know true max or min not at that integer row and col exactly, It is really at a fraction position near that integer row and col in matrix.
How to get it if I know fraction or decimal position ?
In frequency domain, can exten matrix size with 0, but can not interpolate although we can interpolate at time domain.
How to do ?
Maybe I can do so like such method : in time domain , matrix .* with exp( – j ke), {ke is a decimal number part }, to realize freq shift effect, after that, FFT, now at that row&col coordinate really is a value corresponding to [ row&col + decimal ke ] position, so I get it .
Such idea is right ? I am not expert at FFT, who can tell me , Is it Right ?
or how to find the feature not exactly at discrete integer row&col coordinate ?
I need some value at real flot number row&col coordinate ?
—————————————————————————————————————–
I mean :
For simple example:
there are 512 data point with coordinate 1~512, transfer to freq domain with FFT, it is 512 mag and phase with coordinate -256~255 * 1/256 .
now if I specially add a cosine wave with freq 180.324 *1/512 to 512 data point (I used it as a special inner reference), then transfer to freq domain with FFT.
here , how to find mag and phase information of this added cosine wave in freq domain ?
freq 180.324 , is not a integer -256~255 coordinate, so how to find it ?
sample code:
% Time domain
t = linspace(1,512,512);
g = 2*sin(2*pi*t*16/512) + 0.5*sin(2*pi*t*64/512)+ 0.4*sin(2*pi*t*128/512);
gadd = g+0.2*cos(2*pi*t*180.327/512);
%gadd = g+5*sin(2*pi*t*180.327/512);
% now add 180.324 or any another not N/512
subplot(2,2,1);
plot(g);
title("Time domain 3 sin")
subplot(2,2,2);
plot(g);
title("Time domain, 3 sin + cos")
fco = linspace(-256,255,512);
F=fftshift(fft(g));
F1=fftshift(fft(gadd));
subplot(2,2,3);
stem (fco,real(F));
title("Freq domain, 3 sin")
subplot(2,2,4);
stem (fco,real(F1));
title("Freq domain, 3 sin + cos")
% how to find that 180.327 accuratly ? We kmow OTF and PSF are continuous, can be interpolate inside it (<cutoff freq ) even when we express them wIth matrix use integer row&col coordinate .
now I have a image, and get its FFT2, and find some feature like max or min only with row and col,
but I know true max or min not at that integer row and col exactly, It is really at a fraction position near that integer row and col in matrix.
How to get it if I know fraction or decimal position ?
In frequency domain, can exten matrix size with 0, but can not interpolate although we can interpolate at time domain.
How to do ?
Maybe I can do so like such method : in time domain , matrix .* with exp( – j ke), {ke is a decimal number part }, to realize freq shift effect, after that, FFT, now at that row&col coordinate really is a value corresponding to [ row&col + decimal ke ] position, so I get it .
Such idea is right ? I am not expert at FFT, who can tell me , Is it Right ?
or how to find the feature not exactly at discrete integer row&col coordinate ?
I need some value at real flot number row&col coordinate ?
—————————————————————————————————————–
I mean :
For simple example:
there are 512 data point with coordinate 1~512, transfer to freq domain with FFT, it is 512 mag and phase with coordinate -256~255 * 1/256 .
now if I specially add a cosine wave with freq 180.324 *1/512 to 512 data point (I used it as a special inner reference), then transfer to freq domain with FFT.
here , how to find mag and phase information of this added cosine wave in freq domain ?
freq 180.324 , is not a integer -256~255 coordinate, so how to find it ?
sample code:
% Time domain
t = linspace(1,512,512);
g = 2*sin(2*pi*t*16/512) + 0.5*sin(2*pi*t*64/512)+ 0.4*sin(2*pi*t*128/512);
gadd = g+0.2*cos(2*pi*t*180.327/512);
%gadd = g+5*sin(2*pi*t*180.327/512);
% now add 180.324 or any another not N/512
subplot(2,2,1);
plot(g);
title("Time domain 3 sin")
subplot(2,2,2);
plot(g);
title("Time domain, 3 sin + cos")
fco = linspace(-256,255,512);
F=fftshift(fft(g));
F1=fftshift(fft(gadd));
subplot(2,2,3);
stem (fco,real(F));
title("Freq domain, 3 sin")
subplot(2,2,4);
stem (fco,real(F1));
title("Freq domain, 3 sin + cos")
% how to find that 180.327 accuratly ? fft, interpolate, discrete, continuous MATLAB Answers — New Questions