How can i change the connectivity in regionprops from 8 to 4?

4 visualizaciones (últimos 30 días)
I want regionprops to divide the regions with connectivity 4 instead 8. With 8 it mix two region i want separated into one.

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Sept. de 2019
regionprops() itself always uses 8 connectivity for 2D arrays.
The way you get around this is to use bwlabel() or bwconncomp() to do the labeling for you, telling them which connectivity you want, and then pass the result to regionprops as a labeled image instead of as a binary image.

Más respuestas (0)

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by