M-File Help: edgelist | View code for edgelist

# edgelist

Return list of edge pixels for region

E = edgelist(im, seed) is a list of edge pixels of a region in the image im starting at edge coordinate seed (i,j). The result E is a matrix, each row is one edge point coordinate (x,y).

E = edgelist(im, seed, direction) is a list of edge pixels as above, but the direction of edge following is specified. direction == 0 (default) means clockwise, non zero is counter-clockwise. Note that direction is with respect to y-axis upward, in matrix coordinate frame, not image frame.

[E,d] = edgelist(im, seed, direction) as above but also returns a vector of edge segment directions which have values 1 to 8 representing W SW S SE E NW N NW respectively.

## Notes

- IM is a binary image where 0 is assumed to be background, non-zero is an object.
- SEED must be a point on the edge of the region.
- The seed point is always the first element of the returned edgelist.

## Reference

- METHODS TO ESTIMATE AREAS AND PERIMETERS OF BLOB-LIKE OBJECTS: A COMPARISON Luren Yang, Fritz Albregtsen, Tor Lgnnestad and Per Grgttum IAPR Workshop on Machine Vision Applications Dec. 13-15, 1994, Kawasaki

## See also

ilabel

© 1990-2014 Peter Corke.