1

I'd like to remove this sort of tv-like noise from a .jpg image in order to get a .png image with transparent background.

1

This is because I'll later need to overlay this picture over another one. I've tried 1, 2,3, but all of them probably work only on black backgrounds. I'm coding with Python and I thought OpenCV would help. Do you have any idea? Thanks! :)

Bilal
  • 3,191
  • 4
  • 21
  • 49
  • 1
    Maybe you can try [this approach](https://scipy-lectures.org/intro/scipy/auto_examples/solutions/plot_fft_image_denoise.html) for denoising? – Florent Monin Oct 14 '22 at 13:42
  • You could probably use edge detection to get the outline of the fish – Tom McLean Oct 14 '22 at 14:11
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 14 '22 at 15:08
  • @MatteoPaiano such examples are given to the students in the `image-processing` courses to demonstrate the usefulness of the [median-filter](https://docs.opencv.org/4.6.0/d4/d13/tutorial_py_filtering.html) which works well in the case of salt and pepper noise, the one that you have in your image. – Bilal Oct 14 '22 at 17:10
  • Does this answer your question? [Median Filter with Python and OpenCV](https://stackoverflow.com/questions/18427031/median-filter-with-python-and-opencv) – Bilal Oct 14 '22 at 17:13

1 Answers1

2

Given that the noise is nearly exclusively black and white (i.e. desaturated) whereas the fish is colour, I would convert to HSV colourspace and look to the Saturation channel for providing separation - the middle one in the row below:

enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432