Assign border pixels according to two regions it separates
Ältere Kommentare anzeigen
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!

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Neighborhood and Block Processing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
