PANDORE Version 6 | GREYC-IMAGE |
pboundary builds a binary image with pixels that separate two regions. A pixel is a boundary point if at least one of its neighbors has a different value than itself.
A boundary is a closed contour with a width of 2 pixels because it cannot be located between two pixels. One pixel is inside the region and one pixel is outside the region. Each boundary point is represented with a value of 255 in the output image. The output image is an unsigned char grayscale image (Img2duc or Img3duc).
For region map, only regions with label greater than 0 are considered.
For graph, nodes with 0 or 1 neighbor are considered as boundary points.
Returns SUCCESS or FAILURE.
Locates the boundary in the region map a.pan (add a boundary on the border):
pboundary 8 a.pan b.pan psetborder 1 1 1 1 0 0 255 b.pan c.pan
Localisation des points de frontière des régions.
Author: Régis Clouard