2013-08-07 49 views
0

我已经改变了与方法的帮助下fft2现在我想找到嘈杂的峰值和清除它们作为显示在下面的图片链接的图像:Matlab的:删除嘈杂峰

Image with Noisy Peaks

请提示功能的MATLAB实现这一

这是我做的,到目前为止

F = fft2(myImage); 

    F = fftshift(F); % Center FFT 

    F = abs(F); % Get the magnitude 
    F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined 
    F = mat2gray(F); % Use mat2gray to scale the image between 0 and 1 

    imshow(F,[]); % Display the result 
+0

我已经得到图像的傅里叶变换,现在我想找到除原点以外的嘈杂峰值并将它们去除 –

+0

该图像看起来像一个标志,而不是一堆噪音。这真的是你想要消除噪音吗? – horchler

+0

没有人编辑它请按照链接“图像与嘈杂的山峰”,我想所有嘈杂peeks被删除在运行时 –

回答

0

您可以尝试创建一个显示/表示超过特定阈值和位置的点的遮罩。我们来创建位置数组。

[x y] = meshgrid(1:size(a, 2), 1:size(a, 1)); % x-y coordinate of the data 
ft = 0.5;          % Try different values for your case. 
mask = F > ft && y < 0.4*size(a, 1) && y > 0.6*size(a, 1); 
F(mask) = 0; 

你应该能够检查mask看到,如果你已经找到了合适的岗位。 imagesc(mask)在您的反复试验步骤中会非常有帮助。请注意,在示例中我没有x规则,但如果可以帮助缩小搜索空间,则可以添加它们。