HALCON Reference Manual 10.0.2
Table of Contents / Regions / Transformations ClassesClassesClasses | | | Operators

interjacentinterjacentinterjacentInterjacentInterjacent (Operator)

Name

interjacentinterjacentinterjacentInterjacentInterjacent — Partition the image plane using given regions.

Signature

interjacent(Region : RegionInterjacent : Mode : )

Herror interjacent(const Hobject Region, Hobject* RegionInterjacent, const char* Mode)

Herror T_interjacent(const Hobject Region, Hobject* RegionInterjacent, const Htuple Mode)

Herror interjacent(Hobject Region, Hobject* RegionInterjacent, const HTuple& Mode)

HRegion HRegion::Interjacent(const HTuple& Mode) const

HRegion HRegionArray::Interjacent(const HTuple& Mode) const

void HOperatorSetX.Interjacent(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionInterjacent, [in] VARIANT Mode)

IHRegionX* HRegionX.Interjacent([in] BSTR Mode)

static void HOperatorSet.Interjacent(HObject region, out HObject regionInterjacent, HTuple mode)

HRegion HRegion.Interjacent(string mode)

Description

interjacentinterjacentinterjacentInterjacentInterjacent partitions the image plane using the regions given in RegionRegionRegionRegionregion. The result is a region containing the extracted separating lines. The following modes of operation can be used:

'medial_axis'

This mode is used for regions that do not touch or overlap. The operator will find separating lines between the regions which partition the background evenly between the input regions. This corresponds to the following calls:

complement('full',Region,Tmp)

skeleton(Tmp,Result)

'border'

If the input regions do not touch or overlap this mode is equivalent to boundary(Region,Result)boundary(Region,Result)boundary(Region,Result)Boundary(Region,Result)Boundary(Region,Result), i.e., it replaces each region by its boundary. If regions are touching they are aggregated into one region. The corresponding output region then contains the boundary of the aggregated region, as well as the one pixel wide separating line between the original regions. This corresponds to the following calls:

boundary(Region,Tmp1,'inner')

union1(Tmp1,Tmp2)

skeleton(Tmp2,Result)

'mixed'

In this mode the operator behaves like the mode 'medial_axis' for non-overlapping regions. If regions touch or overlap, again separating lines between the input regions are generated on output, but this time including the “touching line” between regions, i.e., touching regions are separated by a line in the output region. This corresponds to the following calls:

erosion1(Region,Mask,Tmp1,1)

union1(Tmp1,Tmp2)

complement(full,Tmp2,Tmp3)

skeleton(Tmp3,Result)

where Mask denotes the following “cross mask”:

                          | . * . |
                   Mask = | * * * |
                          | . * . |
  

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions for which the separating lines are to be determined.

RegionInterjacentRegionInterjacentRegionInterjacentRegionInterjacentregionInterjacent (output_object)  region objectHRegionHRegionHRegionXHobject *

Output region containing the separating lines.

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

Mode of operation.

Default value: 'mixed' "mixed" "mixed" "mixed" "mixed"

List of values: 'medial_axis'"medial_axis""medial_axis""medial_axis""medial_axis", 'border'"border""border""border""border", 'mixed'"mixed""mixed""mixed""mixed"

Example (HDevelop)

read_image(Image,'forest_air1')
mean_image(Image,Mean,31,31)
dyn_threshold(Image,Mean,Seg,20,'light')
interjacent(Seg,Graph,'medial_axis')
disp_region(Graph,WindowHandle)

Example (C)

read_image(&Image,"forest_air1") ;
mean_imae(Image,&Mean,31,31) ;
dyn_threshold(Image,Mean,&Seg,20,"light") ;
interjacent(Seg,&Graph,"medial_axis") ;
disp_region(Graph,WindowHandle) ;

Example (HDevelop)

read_image(Image,'forest_air1')
mean_image(Image,Mean,31,31)
dyn_threshold(Image,Mean,Seg,20,'light')
interjacent(Seg,Graph,'medial_axis')
disp_region(Graph,WindowHandle)

Example (HDevelop)

read_image(Image,'forest_air1')
mean_image(Image,Mean,31,31)
dyn_threshold(Image,Mean,Seg,20,'light')
interjacent(Seg,Graph,'medial_axis')
disp_region(Graph,WindowHandle)

Example (HDevelop)

read_image(Image,'forest_air1')
mean_image(Image,Mean,31,31)
dyn_threshold(Image,Mean,Seg,20,'light')
interjacent(Seg,Graph,'medial_axis')
disp_region(Graph,WindowHandle)

Result

interjacentinterjacentinterjacentInterjacentInterjacent always returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<true/false>)set_system("store_empty_region",<true/false>)set_system("store_empty_region",<true/false>)SetSystem("store_empty_region",<true/false>)SetSystem("store_empty_region",<true/false>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection, regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, pouringpouringpouringPouringPouring

Possible Successors

select_shapeselect_shapeselect_shapeSelectShapeSelectShape, disp_regiondisp_regiondisp_regionDispRegionDispRegion

See also

expand_regionexpand_regionexpand_regionExpandRegionExpandRegion, junctions_skeletonjunctions_skeletonjunctions_skeletonJunctionsSkeletonJunctionsSkeleton, boundaryboundaryboundaryBoundaryBoundary

Module

Foundation


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