Borrar filtros
Borrar filtros

Can anyone verify this code for spectral magnitude error?

1 visualización (últimos 30 días)
aliya
aliya el 25 de Mayo de 2015
Comentada: Image Analyst el 25 de Mayo de 2015
%%Input image
origimage = imread('greekchurch','jpg');
// Smoothing via gaussian lowpass
window = fspecial('gaussian', 3, 0.5);
distimage= origimage*window
// Fastfourier transform of image
fftA = fft2(double(origimage));
fftB = fft2(double(distimage));
[r c] = size(origimage);
for i=1:r
for j=i:j
result=abs(fftA)-abs(fftB);
result = result*result/rc;
end
end
  5 comentarios
aliya
aliya el 25 de Mayo de 2015
No, i just have tried this by following concept of SME. By coding perspective i am not sure about it.
Image Analyst
Image Analyst el 25 de Mayo de 2015
It seems like you're only reading comments, not any answers below. Any reason why not? Do I need to move my suggestion up here?

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 25 de Mayo de 2015
What do you want to achieve? Are you sure you want to subtract then square, and not square then subtract?

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by