HALCON Reference Manual 10.0.2
Table of Contents / XLD / Creation ClassesClassesClasses | | | Operators

gen_contour_region_xldgen_contour_region_xldgen_contour_region_xldGenContourRegionXldGenContourRegionXld (Operator)

Name

gen_contour_region_xldgen_contour_region_xldgen_contour_region_xldGenContourRegionXldGenContourRegionXld — Generate XLD contours from regions.

Signature

gen_contour_region_xld(Regions : Contours : Mode : )

Herror gen_contour_region_xld(const Hobject Regions, Hobject* Contours, const char* Mode)

Herror T_gen_contour_region_xld(const Hobject Regions, Hobject* Contours, const Htuple Mode)

Herror gen_contour_region_xld(Hobject Regions, Hobject* Contours, const HTuple& Mode)

HXLDCont HRegion::GenContourRegionXld(const HTuple& Mode) const

HXLDContArray HRegionArray::GenContourRegionXld(const HTuple& Mode) const

void HOperatorSetX.GenContourRegionXld(
[in] IHUntypedObjectX* Regions, [out] IHUntypedObjectX*Contours, [in] VARIANT Mode)

IHXLDContX* HRegionX.GenContourRegionXld([in] BSTR Mode)

static void HOperatorSet.GenContourRegionXld(HObject regions, out HObject contours, HTuple mode)

HXLDCont HRegion.GenContourRegionXld(string mode)

public HXLDCont(HRegion regions, string mode)

Description

gen_contour_region_xldgen_contour_region_xldgen_contour_region_xldGenContourRegionXldGenContourRegionXld generates XLD contours ContoursContoursContoursContourscontours from the regions given in RegionsRegionsRegionsRegionsregions. This operator is useful if regions have been obtained from segmentation operations, but higher level operators, e.g., polygon approximation and extraction of parallels, are to be performed on their boundaries. For each connected component of the input regions a closed contour of the boundary is generated. The parameter ModeModeModeModemode can take on the following values:

The difference between the two modes 'border'"border""border""border""border" and 'center'"center""center""center""center" can be seen by considering the following region:

    +-+-+
    | | |
  +-+-+-+-+
  | | | | |           +-+
  +-+-+-+-+     where | | symbolizes a single pixel.
  | | | | |           +-+
  +-+-+-+-+
    | | |
    +-+-+

Then, computing the contour with 'border'"border""border""border""border" and 'center'"center""center""center""center" results in the following two contours, respectively:

    +-+-+
    |   |         *-*
  +-+   +-+      /   \
  |       |     *     *
  +       +     |     |
  |       |     *     *
  +-+   +-+      \   /
    |   |         *-*
    +-+-+

   'border'     'center'

This means, for example, that contours generated with 'border'"border""border""border""border" will in general have a much larger Euclidean length (see length_xldlength_xldlength_xldLengthXldLengthXld) than contours generated with 'center'"center""center""center""center". This results from the fact that for diagonal border elements 'border'"border""border""border""border" uses two contour segments of length 1 each, whereas 'center'"center""center""center""center" uses a single segment of length sqrt(2). Other features, e.g., the area (see area_center_xldarea_center_xldarea_center_xldAreaCenterXldAreaCenterXld), will obviously also have different values.

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Input regions.

ContoursContoursContoursContourscontours (output_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContXHobject *

Resulting contours.

ModeModeModeModemode (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Mode of contour generation.

Default value: 'border' "border" "border" "border" "border"

List of values: 'border'"border""border""border""border", 'border_holes'"border_holes""border_holes""border_holes""border_holes", 'center'"center""center""center""center"

Possible Successors

smooth_contours_xldsmooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXld, gen_polygons_xldgen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXld

Alternatives

gen_contour_polygon_xldgen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld, get_region_contourget_region_contourget_region_contourGetRegionContourGetRegionContour

See also

gen_contours_skeleton_xldgen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld

Module

Foundation


Table of Contents / XLD / Creation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH