How can I get rid of the horizontal white lines?
39 views (last 30 days)
Image Analyst on 13 Jul 2017
You can try Fourier filtering. The white lines, if they're periodic, will show up as spikes in the spectrum which you can then zero out and inverse transform. Example attached (with demo image, not yours).
Eric on 14 Jul 2017
K-Nearest Neighbor Filtering does a decent job. You can play with the parameters, but here are some quick settings I tried.
For each pixel, find the 49 nearest neighbors. Of those 49, average the 25 pixels nearest in intensity to the selected pixel. Replace the value of the selected pixel with that mean.
This can be done fairly efficiently with colfilt(). The result isn't perfect, but it's not terrible, either. I attached the result for enf.jpg.