Compare binary images: if a pixel is 1 in both images, set it to 1 in a third image, if not, set it to 0...

1 vue (au cours des 30 derniers jours)
Hello everyone,
hopefully someone can help me. I have performed an erosion-dilation operation on a binary image and now I want to compare the eroded-dilated image with the original image. If a pixel is 1 in both images, I want to write it as 1 into a new image, if it's 0 in both it's supposed to be 0, and if it's 1 in the one and 0 in the other picture it's supposed to be written as 0.
How do I program an algorithm able to do that?
Any help would be great!
Thymes

Réponse acceptée

Matt J
Matt J le 19 Oct 2012
Modifié(e) : Matt J le 19 Oct 2012
result = OriginalImage & OpenedImage
  6 commentaires
Matt J
Matt J le 22 Oct 2012
Déplacé(e) : DGM le 29 Déc 2023
Yes, I think I understand the situation, but first, Accept-click my answer (since it is correct) and make a new post for your new question.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox 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!

Translated by