ClassesClassesClassesClasses | | | | Operators

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld (Operator)


gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld — Convert a skeleton into XLD contours.


gen_contours_skeleton_xld(Skeleton : Contours : Length, Mode : )

Herror gen_contours_skeleton_xld(const Hobject Skeleton, Hobject* Contours, const Hlong Length, const char* Mode)

Herror T_gen_contours_skeleton_xld(const Hobject Skeleton, Hobject* Contours, const Htuple Length, const Htuple Mode)

Herror gen_contours_skeleton_xld(Hobject Skeleton, Hobject* Contours, const HTuple& Length, const HTuple& Mode)

HXLDContArray HRegion::GenContoursSkeletonXld(const HTuple& Length, const HTuple& Mode) const

void GenContoursSkeletonXld(const HObject& Skeleton, HObject* Contours, const HTuple& Length, const HTuple& Mode)

HXLDCont HRegion::GenContoursSkeletonXld(Hlong Length, const HString& Mode) const

HXLDCont HRegion::GenContoursSkeletonXld(Hlong Length, const char* Mode) const

void HOperatorSetX.GenContoursSkeletonXld(
[in] IHUntypedObjectX* Skeleton, [out] IHUntypedObjectX*Contours, [in] VARIANT Length, [in] VARIANT Mode)

IHXLDContX* HRegionX.GenContoursSkeletonXld(
[in] Hlong Length, [in] BSTR Mode)

static void HOperatorSet.GenContoursSkeletonXld(HObject skeleton, out HObject contours, HTuple length, HTuple mode)

HXLDCont HRegion.GenContoursSkeletonXld(int length, string mode)


gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld converts the input skeleton (e.g., edges) SkeletonSkeletonSkeletonSkeletonSkeletonskeleton, which is assumed to contain mostly one pixel wide regions (see skeletonskeletonSkeletonskeletonSkeletonSkeleton), into XLD contours.

The algorithm first attempts to transform the regions to contain only line segments in 8-neighborhood. In a second step, the junction points are labelled. After this, gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld tries to generate contours which end in junction or end points, in particular for junction points of the following configurations (in all four possible rotations):

  1  0  1     1  0  1     1  0  0     1  0  0     0  1  0     0  1  0
  0  2  0     0  2  0     0  2  1     0  2  1     0  2  1     1  2  1
  0  0  1     1  0  1     0  1  0     1  0  0     0  1  0     0  1  0

where 0 = background, 1 = foreground, and 2 = junction point.

After this, all contours having at least LengthLengthLengthLengthLengthlength points are returned. Since contours are split at junction points, possibly long contours may be split into several short segments because of short adjacent lines, even if they are longer than LengthLengthLengthLengthLengthlength points, if ModeModeModeModeModemode = 'filter' was selected. This can be avoided by setting ModeModeModeModeModemode = 'generalize1'. In this case, the contours are generated as if the segments shorter than LengthLengthLengthLengthLengthlength were not contained in the input region. In order to preserve line segments, which are split into very short segments by the crossing of short lines, ModeModeModeModeModemode = 'generalize2' can be selected. In this case, line segments are preserved if they end in two junction points, even if they are shorter than LengthLengthLengthLengthLengthlength.



SkeletonSkeletonSkeletonSkeletonSkeletonskeleton (input_object)  region objectHRegionHRegionHRegionHRegionXHobject

Skeleton of which the contours are to be determined.

ContoursContoursContoursContoursContourscontours (output_object)  xld_cont-array objectHXLDContHXLDContHXLDContArrayHXLDContXHobject *

Resulting contours.

LengthLengthLengthLengthLengthlength (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Minimum number of points a contour has to have.

Default value: 1

Suggested values: 1, 2, 3, 5, 10, 20

ModeModeModeModeModemode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Contour filter mode.

Default value: 'filter' "filter" "filter" "filter" "filter" "filter"

List of values: 'filter'"filter""filter""filter""filter""filter", 'generalize1'"generalize1""generalize1""generalize1""generalize1""generalize1", 'generalize2'"generalize2""generalize2""generalize2""generalize2""generalize2"

Possible Predecessors


Possible Successors

smooth_contours_xldsmooth_contours_xldSmoothContoursXldsmooth_contours_xldSmoothContoursXldSmoothContoursXld, get_contour_xldget_contour_xldGetContourXldget_contour_xldGetContourXldGetContourXld, gen_polygons_xldgen_polygons_xldGenPolygonsXldgen_polygons_xldGenPolygonsXldGenPolygonsXld

See also

edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, thresholdthresholdThresholdthresholdThresholdThreshold, get_region_contourget_region_contourGetRegionContourget_region_contourGetRegionContourGetRegionContour



ClassesClassesClassesClasses | | | | Operators