BOUNDARYGRAPH Get boundary of image as a graph. [NODES, EDGES] = boundaryGraph(IMG) (2D) [NODES, EDGES, FACES] = boundaryGraph(IMG) (3D) Create a graph on the boundary of binary image IMG. Each pixel is considered as a unit square (or cube), centered on integer coordinates. Boundary of the shape is selected as a graph. Result is a set of nodes with (x,y) or (x,y,z) coordinates, a set of edges linking two neighbour nodes, and in 3D also a set of square faces, containing reference to each 4-tuple of nodes. The resulting shell is open if the binary structure touches edges of image. See also : imPatch, drawMesh
Package: matgeom