PANDORE Version 6 GREYC-IMAGE

pboundary



Locates region boundary.



Synopsis

pboundary connexity [-m mask] [im_in|-] [im_out|-]

Description

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.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

See also

Region

C++ prototype

Errc PBoundary( const Reg2d &im_in, Img2duc &im_out, int connexity );

Version française

Localisation des points de frontière des régions.


Author: Régis Clouard