fft - Matlab: Remove noisy peaks -
i have transformed image of method fft2
want locate noisy peaks , erase them shown in following image link:
kindly suggest matlab functionality achieving this
this did far
f = fft2(myimage); f = fftshift(f); % center fft f = abs(f); % magnitude f = log(f+1); % use log, perceptual scaling, , +1 since log(0) undefined f = mat2gray(f); % use mat2gray scale image between 0 , 1 imshow(f,[]); % display result
you can try create mask of shows/represents points exceed threshold , position. let's create arrays of position.
[x y] = meshgrid(1:size(a, 2), 1:size(a, 1)); % x-y coordinate of data ft = 0.5; % try different values case. mask = f > ft && y < 0.4*size(a, 1) && y > 0.6*size(a, 1); f(mask) = 0;
you should able check mask
see if have located right positions. imagesc(mask)
helpful during trial-and-error step. note don't have x
rules in example potentially add them if reduce search space.
Comments
Post a Comment