Can I median filter an image that is already noised with salt and pepper?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Ayobami Meadows
il 29 Lug 2018
Commentato: Ayobami Meadows
il 2 Ago 2018
I want to imread and median filter an image which I downloaded and has already been added with salt and pepper from its source, not that I'm the one to add the noise myself and later remove it. Is this possible?
I tried the procedure explained in other pages by Imageanalyst by splitting the RGB channels and filter them individually before reconstructing them back using cat3. However, I still got back the noisy image without been filtered. I noticed that he added the noise himself in the code, his image wasn't originally and initially noised with salt and pepper which leads me to raising this question
0 Commenti
Risposta accettata
Image Analyst
il 29 Lug 2018
Then just skip the part where I created a noisy image and just start using your own. Attach your code if you still need help.
5 Commenti
Image Analyst
il 31 Lug 2018
The imnoise() function gives true salt and pepper noise, as I thought.
Here is the problem, from your comments: "the generated noisy image of figure 2 is then saved as a jpg file from the plotted figure".
NEVER save an image in JPG format. It is a lossy compression format. Doing this changed the values from their pure 0 and 255 to something else. Again, do not use JPG format for image analysis. I, and I think much/most of the world, now uses PNG which is a lossless format. Use that and you will get the expected results just like I did in my demo.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!