regionConvexHull

[ XITE Reference Manual | XITE home ]

Contents


Name

regionConvexHull - find the convex hull of regions

Syntax

 regionConvexHull [-nc <nc>] [-sort] [-split] [-bg <bg>]
[-opv <opv>] [-orn] [-oon] <inimage> <outimage>

Description

Finds the convex hull of all regions in the input image with pixel value LARGER than 0, and draws these convex regions into the output image. These regions may naturally overlap, and the result may thus (apparently) contain non-convex regions.

Options

Use only one of -opv, -orn and -oon.

-nc nc
Neighbour connectedness: 4 or 8 (default 4). nc applies to objects (pixel value > 0). The opposite applies to the background (=0).

-sort
Sort regions with respect to object number, store in an object-array.

-split
Split objects (except the background, the object with object number 0) so that every region forms an independent object.

-bg bg
Initialize output with background bg (def: 0).

-opv opv
Output Pixel Value. Draw regions with opv (def: 255).

-orn
Output Region Number. Draw regions with regnr.

-oon
Output Object Number. Draw regions with objnr.

Restrictions

inimage must have bands with pixel type unsigned byte. outimage will have bands with pixel type unsigned byte.

Return value

 0 => ok
 1 => Usage (no arguments)
 2 => Bad number of arguments

See also

regionAnalyse(1), regionConvexHull(3), regionArea(3), regionCreate(3), regionDraw(3), regionFree(3), regionHistoUpdate(3), regionHisto(3), regionImoment(3), regionInsertYline(3), regionDeleteYline(3), regionEndInsert(3), regionXmean(3), regionYmean(3), regionMean(3), regionXmin(3), regionXmax(3), regionYmin(3), regionYmax(3), regionMinMax(3), regionCMoment(3), regionPMoment(3), regionMoment(3), regionPerform(3), regionPerimeter(3), regionIsPoint(3), regionPoint(3), regionSearch(3), regionSort(3), regionCopy(3), regionUnion(3), regionOverlap(3), regionNeighbor(3), regionVolume(3), regionYline(3)

Files

region.h

Author

Tor Lønnestad, BLAB, Ifi, UiO

Examples

 regionConvexHull -nc 8 -bg 255 -opv 0 \\
     mask.img maskNegConvex.img

Id

$Id: regionConvexHull.c,v 1.20 1997/01/16 16:07:37 svein Exp $