Effacer les filtres
Effacer les filtres

Edge direction

3 vues (au cours des 30 derniers jours)
Philip
Philip le 1 Juin 2011
Is there a function to check if an edge changes direction?
I have used bwlabel to work on connected edges, but now I only want to work on the ones that do not follow around corners. More clearly, they can be vertical, horizontal, or diagonal, but they cannot be a mixture of 2 or more...

Réponse acceptée

Wolfgang Schwanghart
Wolfgang Schwanghart le 1 Juin 2011
Hi,
to extract edges of any direction, you just need to choose the right structuring element for a morphological opening. E.g. to extract vertical edges:
BWv = imopen(BW,[1 1 1]');
horizontal:
BWh = imopen(BW,[1 1 1]);
top left to lower right
BWd = imopen(BW,[1 0 0; 0 1 0; 0 0 1]);
and so on.
Hope this helps, W.
  1 commentaire
Philip
Philip le 1 Juin 2011
You helped immensely, as always! Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Report Generator 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