HALCON Reference Manual 10.0.2
Table of Contents / Morphology / Region ClassesClassesClasses | | | Operators

fittingfittingfittingFittingFitting (Operator)

Name

fittingfittingfittingFittingFitting — Perform a closing after an opening with multiple structuring elements.

Signature

fitting(Region, StructElements : RegionFitted : : )

Herror fitting(const Hobject Region, const Hobject StructElements, Hobject* RegionFitted)

Herror T_fitting(const Hobject Region, const Hobject StructElements, Hobject* RegionFitted)

Herror fitting(Hobject Region, Hobject StructElements, Hobject* RegionFitted)

HRegion HRegion::Fitting(const HRegion& StructElements) const

HRegionArray HRegionArray::Fitting(const HRegionArray& StructElements) const

void HOperatorSetX.Fitting(
[in] IHUntypedObjectX* Region, [in] IHUntypedObjectX* StructElements, [out] IHUntypedObjectX*RegionFitted)

IHRegionX* HRegionX.Fitting([in] IHRegionX* StructElements)

static void HOperatorSet.Fitting(HObject region, HObject structElements, out HObject regionFitted)

HRegion HRegion.Fitting(HRegion structElements)

Description

fittingfittingfittingFittingFitting performs an openingopeningopeningOpeningOpening and a closingclosingclosingClosingClosing successively on the input regions. The eight structuring elements normally used for this operation can be generated with the operator gen_struct_elementsgen_struct_elementsgen_struct_elementsGenStructElementsGenStructElements. However, other user-defined structuring elements can also be used. Let R be the input region(s) and let M(i) denote the structuring elements. Furthermore, let P be the result of the opening and Q be the final result. Then the operator can be formalized as follows:

           n
          |  |
      P = |  | R o M      (opening)
          \__/      i
          i=1

           n_
          /  \
      Q = |  | P * M      (closing)
          |  |      i
          i=1

Regions larger than the structuring elements are preserved, while small gaps are closed.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions to be processed.

StructElementsStructElementsStructElementsStructElementsstructElements (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Structuring elements.

RegionFittedRegionFittedRegionFittedRegionFittedregionFitted (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Fitted regions.

Result

fittingfittingfittingFittingFitting returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty or no input region can be set via:

Otherwise, an exception is raised.

Possible Predecessors

gen_struct_elementsgen_struct_elementsgen_struct_elementsGenStructElementsGenStructElements, gen_region_pointsgen_region_pointsgen_region_pointsGenRegionPointsGenRegionPoints

Possible Successors

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain, select_shapeselect_shapeselect_shapeSelectShapeSelectShape, area_centerarea_centerarea_centerAreaCenterAreaCenter, connectionconnectionconnectionConnectionConnection

Alternatives

openingopeningopeningOpeningOpening, closingclosingclosingClosingClosing, connectionconnectionconnectionConnectionConnection, select_shapeselect_shapeselect_shapeSelectShapeSelectShape

Module

Foundation


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