remove background and increase the contrast
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kasmayanti Sakaria
le 18 Mai 2018
Commenté : Kasmayanti Sakaria
le 21 Mai 2018
Hi everyone,
I am having a problem with my images. I have no idea on how to remove the background (grey color) and increase the contrast of gap (black one). Attached the image.

Could anyone please help me to solve my problem.
Thank you in advance :)
0 commentaires
Réponse acceptée
Guillaume
le 18 Mai 2018
Modifié(e) : Guillaume
le 18 Mai 2018
For the background, typically, you record a background image that you then subtract from your test images (for dark background). In your case, however, you could simply threshold the image. Assuming that your image is uint8, does
yourimage(yourimage > 127) = 255;
work for you?
However, if you're going to binarise your image, then you don't need to adjust the contrast or play around with the background,
imbinarize(yourimage)
should isolate the black from the background.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!