I have a circular image with vertical periodic noise,
when I tried to use FFT and a vertical hard mask to eliminate these vertical lines,the circular shape border affects the result greatly. Is there a way to deal with the border or restrict the fft shape? I post a sample code and image below.
#vertical intensity noise
vnoise=np.linspace(1,100,100).reshape(-1,1)
vnoise=np.tile(a,(30,3000))
#background image
astro=data.astronaut()
astro=color.rgb2gray(astro)
astro=transform.resize(astro,(3000,3000))
#circular mask
cen=(1500,1500)
radii=1500
circle=np.zeros_like(a)
rr,cc=draw.disk(cen,radii,shape=a.shape)
circle[rr,cc]=1
the original image is like below
#the noised image
coeff=0.01
output=astro+coeff*vnoise
output*=circle
the noise degraded image sample here
#FFT
image=output.copy().astype(np.complex128)
fimg=fftshift(fft2(image))
#vertical frequential hard mask
vf=np.ones_like(a)
center=1500
vf[:center-10,center-10:center+10]=0
vf[center+10:,center-10:center+10]=0
#IFFT
fimg=fimg*vf
ifimg=ifft2(ifftshift(fimg))
ifimg=np.real(ifimg)
the output of vertical hard mask freq filter,I marked the wave diffusing phenomenon with red polygon.
one can see from the final restored image is that,The image pixel changes like a water wave diffusing near the circle border, espicially at the top edge center and the bottom edge center of the image. Pls forgive my stupid, I can't workout this stuff with any better frequency filter. Can anyone tell me how to solve this?Thx!