PANDORE Version 6 GREYC-IMAGE

psetborder



Sets image border to specified value.



Synopsis

psetborder widthl widthr heightu heightd depthf depthb val [im_in|-] [im_out|-]

Description

psetborder sets the specified value val to the pixel on the border of the input image im_in. The border is defined by the dimensions widthl, widthr, heightu, heightd, depthf, depthb where widthl is the length of the left border, widthr is the length of the right border, heightu is the height of the upper border, heightd is the height of the lower border, depthf is the depth of the forward border and depthf is the depth of the backward border.

For a 2D image, the dimensions are:

    --------------------------------------
    |                 ^                  |
    |                 |                  |
    |               heightu              |
    |                 |                  |
    |                 v                  |
    |           -------------            |
    |           |             |          |
    | <-widthl->|             |<-widthr->|
    |           |             |          |
    |            -------------           |
    |                 ^                  |
    |                 |                  |
    |              heigthd               |
    |                 |                  |
    |                 v                  |
    -------------------------------------

For color and multispectral image, the value is set on each bands.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Selects objects of a tangram.pan subimage (in.pan) that do not touch the border of the image reg.pan.

   pextractsubimage  30 30 0 150 150 0 tangram.pan in.pan
   psetcst 0 ii.pan i1.pan
   psetborder 1 1 1 1 1 1 255 i1.pan i2.pan
   pdilationreconstruction 8 i2.pan ii.pan i3.pan
   pdif in.pan i3.pan out.pan

See also

Utility

C++ prototype

Errc PSetBorder( const Img3duc &im_in, Img3duc &im_out, Long widthl, Long widthr, Long heightu, Long heigthd, Long depthf, Long depthb, Uchar val );

Version française

Affectation d'une valeur sur le bord d'une image.


Author: Régis Clouard