I want to remove some objects of a gray scale image in frequency domain. I am transforming a gray scale image into frequency domain from spatial domain using fft2() and then i am doing fftshift() to shift zero frequency component to center of spectrum. I don't know i am going into right way or wrong? After doing fftshift() i am having a totally gray image with some unclear dotted center frequency component. I want to remove vertical line of that spectrum.
Sample image have some chop sticks and knives. I want to remove those chop sticks. I attached sample image and experimental image.
Here is my code:
if true img = imread('sample.png'); figure,imshow(img,'InitialMagnification','fit'); imgB = im2bw(img,0.2); figure,imshow(imgB,[],'InitialMagnification','fit'); imgF = fftshift(fft2(imgB)); figure, imshow(imgF,[],'InitialMagnification','fit'); end
I need some guideline to remove those chopsticks using frequency domain.
Best Answer