Assign border pixels according to two regions it separates
Afficher commentaires plus anciens
Hi,
The title may be confusing. So I'll explain with the image below. I want to be able to color the borders (shown in green) depending on the regions in two sides of it. For example, if the border is between two regions shown in red and blue, I want to make the border black. If the demarcating line is between red and white, I want to make the border purple etc.
I am aware that there are some boundary cases where 3 or more regions connect, but I don't care about those. Is there a built-in or an easy way to do this on Matlab? I can think of straightforward solutions like examining the circular/rectangular neighborhood of each border (green) pixel and assigning a color based on that. This seems a bit slow, so I ask for a better way.
Thanks!

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Neighborhood and Block Processing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
