How to implement sign operator using matlab
2 次查看(过去 30 天)
显示 更早的评论
I was trying to implement a filter for digital image processing which require sign operator ie.

Can some tell me how to calulate it.
where ,X[u,v] is fast fourier transform of image.
1 个评论
Walter Roberson
2020-11-2
编辑:Walter Roberson
2020-11-10
be sure to check that this is what you expect for complex inputs if that is a possibility
回答(1 个)
Mathieu NOE
2020-11-10
hello
your code request the sign of the phase of fft2 output
example below - nothing fancy :
img = imread('Noe_300dpi_3.jpg');
imagesc(img)
img = fftshift(img(:,:,2));
F = fft2(img);
figure;
imagesc(100*log(1+abs(fftshift(F)))); colormap(gray);
title('magnitude spectrum');
figure;
imagesc(angle(F)); colormap(gray);
title('phase spectrum');
figure;
imagesc(sign(angle(F))); colormap(gray);
title('phase spectrum sign');
you 'll notice the sharper output when you use sign(phase) instead of phase only
1 个评论
Walter Roberson
2020-11-10
Is
the phase of the fourier transform? The user indicated that
is the fourier transform but did not define 
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!