Name
create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel — Prepare a component model for matching based on explicitly specified
components and relations.
create_component_model(ModelImage, ComponentRegions : : VariationRow, VariationColumn, VariationAngle, AngleStart, AngleExtent, ContrastLowComp, ContrastHighComp, MinSizeComp, MinContrastComp, MinScoreComp, NumLevelsComp, AngleStepComp, OptimizationComp, MetricComp, PregenerationComp : ComponentModelID, RootRanking)
Herror create_component_model(const Hobject ModelImage, const Hobject ComponentRegions, const Hlong VariationRow, const Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, const Hlong ContrastLowComp, const Hlong ContrastHighComp, const Hlong MinSizeComp, const Hlong MinContrastComp, double MinScoreComp, const Hlong NumLevelsComp, double AngleStepComp, const char* OptimizationComp, const char* MetricComp, const char* PregenerationComp, Hlong* ComponentModelID, Hlong* RootRanking)
Herror T_create_component_model(const Hobject ModelImage, const Hobject ComponentRegions, const Htuple VariationRow, const Htuple VariationColumn, const Htuple VariationAngle, const Htuple AngleStart, const Htuple AngleExtent, const Htuple ContrastLowComp, const Htuple ContrastHighComp, const Htuple MinSizeComp, const Htuple MinContrastComp, const Htuple MinScoreComp, const Htuple NumLevelsComp, const Htuple AngleStepComp, const Htuple OptimizationComp, const Htuple MetricComp, const Htuple PregenerationComp, Htuple* ComponentModelID, Htuple* RootRanking)
Herror create_component_model(Hobject ModelImage, Hobject ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HTuple& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, Hlong* ComponentModelID, Hlong* RootRanking)
Herror create_component_model(Hobject ModelImage, Hobject ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HTuple& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, HTuple* ComponentModelID, HTuple* RootRanking)
HComponentModel HImage::CreateComponentModel(const HRegionArray& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HTuple& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, Hlong* RootRanking) const
HTuple HComponentModel::CreateComponentModel(const HImage& ModelImage, const HRegionArray& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HTuple& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp)
void CreateComponentModel(const HObject& ModelImage, const HObject& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HTuple& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, HTuple* ComponentModelID, HTuple* RootRanking)
void HComponentModel::HComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, double AngleStart, double AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HString& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, HTuple* RootRanking)
void HComponentModel::HComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const HString& OptimizationComp, const HString& MetricComp, const HString& PregenerationComp, Hlong* RootRanking)
void HComponentModel::HComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const char* OptimizationComp, const char* MetricComp, const char* PregenerationComp, Hlong* RootRanking)
HTuple HComponentModel::CreateComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, double AngleStart, double AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HString& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp)
Hlong HComponentModel::CreateComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const HString& OptimizationComp, const HString& MetricComp, const HString& PregenerationComp)
Hlong HComponentModel::CreateComponentModel(const HImage& ModelImage, const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const char* OptimizationComp, const char* MetricComp, const char* PregenerationComp)
HComponentModel HImage::CreateComponentModel(const HRegion& ComponentRegions, const HTuple& VariationRow, const HTuple& VariationColumn, const HTuple& VariationAngle, double AngleStart, double AngleExtent, const HTuple& ContrastLowComp, const HTuple& ContrastHighComp, const HTuple& MinSizeComp, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HString& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, HTuple* RootRanking) const
HComponentModel HImage::CreateComponentModel(const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const HString& OptimizationComp, const HString& MetricComp, const HString& PregenerationComp, Hlong* RootRanking) const
HComponentModel HImage::CreateComponentModel(const HRegion& ComponentRegions, Hlong VariationRow, Hlong VariationColumn, double VariationAngle, double AngleStart, double AngleExtent, Hlong ContrastLowComp, Hlong ContrastHighComp, Hlong MinSizeComp, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const char* OptimizationComp, const char* MetricComp, const char* PregenerationComp, Hlong* RootRanking) const
void HOperatorSetX.CreateComponentModel(
[in] IHUntypedObjectX* ModelImage, [in] IHUntypedObjectX* ComponentRegions, [in] VARIANT VariationRow, [in] VARIANT VariationColumn, [in] VARIANT VariationAngle, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT ContrastLowComp, [in] VARIANT ContrastHighComp, [in] VARIANT MinSizeComp, [in] VARIANT MinContrastComp, [in] VARIANT MinScoreComp, [in] VARIANT NumLevelsComp, [in] VARIANT AngleStepComp, [in] VARIANT OptimizationComp, [in] VARIANT MetricComp, [in] VARIANT PregenerationComp, [out] VARIANT* ComponentModelID, [out] VARIANT* RootRanking)
VARIANT HComponentModelX.CreateComponentModel(
[in] IHImageX* ModelImage, [in] IHRegionX* ComponentRegions, [in] VARIANT VariationRow, [in] VARIANT VariationColumn, [in] VARIANT VariationAngle, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT ContrastLowComp, [in] VARIANT ContrastHighComp, [in] VARIANT MinSizeComp, [in] VARIANT MinContrastComp, [in] VARIANT MinScoreComp, [in] VARIANT NumLevelsComp, [in] VARIANT AngleStepComp, [in] BSTR OptimizationComp, [in] VARIANT MetricComp, [in] VARIANT PregenerationComp)
IHComponentModelX* HImageX.CreateComponentModel(
[in] IHRegionX* ComponentRegions, [in] VARIANT VariationRow, [in] VARIANT VariationColumn, [in] VARIANT VariationAngle, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT ContrastLowComp, [in] VARIANT ContrastHighComp, [in] VARIANT MinSizeComp, [in] VARIANT MinContrastComp, [in] VARIANT MinScoreComp, [in] VARIANT NumLevelsComp, [in] VARIANT AngleStepComp, [in] BSTR OptimizationComp, [in] VARIANT MetricComp, [in] VARIANT PregenerationComp, [out] VARIANT* RootRanking)
static void HOperatorSet.CreateComponentModel(HObject modelImage, HObject componentRegions, HTuple variationRow, HTuple variationColumn, HTuple variationAngle, HTuple angleStart, HTuple angleExtent, HTuple contrastLowComp, HTuple contrastHighComp, HTuple minSizeComp, HTuple minContrastComp, HTuple minScoreComp, HTuple numLevelsComp, HTuple angleStepComp, HTuple optimizationComp, HTuple metricComp, HTuple pregenerationComp, out HTuple componentModelID, out HTuple rootRanking)
public HComponentModel(HImage modelImage, HRegion componentRegions, HTuple variationRow, HTuple variationColumn, HTuple variationAngle, double angleStart, double angleExtent, HTuple contrastLowComp, HTuple contrastHighComp, HTuple minSizeComp, HTuple minContrastComp, HTuple minScoreComp, HTuple numLevelsComp, HTuple angleStepComp, string optimizationComp, HTuple metricComp, HTuple pregenerationComp, out HTuple rootRanking)
public HComponentModel(HImage modelImage, HRegion componentRegions, int variationRow, int variationColumn, double variationAngle, double angleStart, double angleExtent, int contrastLowComp, int contrastHighComp, int minSizeComp, int minContrastComp, double minScoreComp, int numLevelsComp, double angleStepComp, string optimizationComp, string metricComp, string pregenerationComp, out int rootRanking)
HTuple HComponentModel.CreateComponentModel(HImage modelImage, HRegion componentRegions, HTuple variationRow, HTuple variationColumn, HTuple variationAngle, double angleStart, double angleExtent, HTuple contrastLowComp, HTuple contrastHighComp, HTuple minSizeComp, HTuple minContrastComp, HTuple minScoreComp, HTuple numLevelsComp, HTuple angleStepComp, string optimizationComp, HTuple metricComp, HTuple pregenerationComp)
int HComponentModel.CreateComponentModel(HImage modelImage, HRegion componentRegions, int variationRow, int variationColumn, double variationAngle, double angleStart, double angleExtent, int contrastLowComp, int contrastHighComp, int minSizeComp, int minContrastComp, double minScoreComp, int numLevelsComp, double angleStepComp, string optimizationComp, string metricComp, string pregenerationComp)
HComponentModel HImage.CreateComponentModel(HRegion componentRegions, HTuple variationRow, HTuple variationColumn, HTuple variationAngle, double angleStart, double angleExtent, HTuple contrastLowComp, HTuple contrastHighComp, HTuple minSizeComp, HTuple minContrastComp, HTuple minScoreComp, HTuple numLevelsComp, HTuple angleStepComp, string optimizationComp, HTuple metricComp, HTuple pregenerationComp, out HTuple rootRanking)
HComponentModel HImage.CreateComponentModel(HRegion componentRegions, int variationRow, int variationColumn, double variationAngle, double angleStart, double angleExtent, int contrastLowComp, int contrastHighComp, int minSizeComp, int minContrastComp, double minScoreComp, int numLevelsComp, double angleStepComp, string optimizationComp, string metricComp, string pregenerationComp, out int rootRanking)
create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel prepares patterns, which are passed
in the form of a model image ModelImageModelImageModelImageModelImageModelImagemodelImage and several regions
ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions, as a component model for matching. The
output parameter ComponentModelIDComponentModelIDComponentModelIDComponentModelIDComponentModelIDcomponentModelID is a handle for this
model, which is used in subsequent calls to
find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel. In contrast to
create_trained_component_modelcreate_trained_component_modelCreateTrainedComponentModelcreate_trained_component_modelCreateTrainedComponentModelCreateTrainedComponentModel, no preceding training with
train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents needs to be performed before calling
create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel.
Each of the regions passed in ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions describes a
separate model component. Later, the index of a component region in
ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions is used to denote the model component.
The reference point of a component is the center of gravity of its
associated region, which is passed in ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions. It
can be calculated by calling area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter.
The relative movements (relations) of the model components can be
set by passing VariationRowVariationRowVariationRowVariationRowVariationRowvariationRow, VariationColumnVariationColumnVariationColumnVariationColumnVariationColumnvariationColumn, and
VariationAngleVariationAngleVariationAngleVariationAngleVariationAnglevariationAngle. Because directly passing the relations is
complicated, instead of the relations the variations of the model
components are passed. The variations describe the movements of the
components independently from each other relative to their poses in
the model image ModelImageModelImageModelImageModelImageModelImagemodelImage. The parameters
VariationRowVariationRowVariationRowVariationRowVariationRowvariationRow and VariationColumnVariationColumnVariationColumnVariationColumnVariationColumnvariationColumn describe the
movement of the components in row and column direction by
±VariationRowVariationRowVariationRowVariationRowVariationRowvariationRow/2 and
±VariationColumnVariationColumnVariationColumnVariationColumnVariationColumnvariationColumn/2, respectively.
The parameter VariationAngleVariationAngleVariationAngleVariationAngleVariationAnglevariationAngle describes the angle variation
of the component by
±VariationAngleVariationAngleVariationAngleVariationAngleVariationAnglevariationAngle/2. Based on
these values, the relations are automatically computed. The three
parameters must either contain one element, in which case the
parameter is used for all model components, or must contain the same
number of elements as ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions, in which case each
parameter element refers to the corresponding model component in
ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions.
The parameters AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent
determine the range of possible rotations of the component model in
an image.
Internally, a separate shape model is built for each model component
(see create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel). Therefore, the parameters
ContrastLowCompContrastLowCompContrastLowCompContrastLowCompContrastLowCompcontrastLowComp, ContrastHighCompContrastHighCompContrastHighCompContrastHighCompContrastHighCompcontrastHighComp,
MinSizeCompMinSizeCompMinSizeCompMinSizeCompMinSizeCompminSizeComp, MinContrastCompMinContrastCompMinContrastCompMinContrastCompMinContrastCompminContrastComp,
MinScoreCompMinScoreCompMinScoreCompMinScoreCompMinScoreCompminScoreComp, NumLevelsCompNumLevelsCompNumLevelsCompNumLevelsCompNumLevelsCompnumLevelsComp,
AngleStepCompAngleStepCompAngleStepCompAngleStepCompAngleStepCompangleStepComp, OptimizationCompOptimizationCompOptimizationCompOptimizationCompOptimizationCompoptimizationComp,
MetricCompMetricCompMetricCompMetricCompMetricCompmetricComp, and PregenerationCompPregenerationCompPregenerationCompPregenerationCompPregenerationComppregenerationComp correspond to
the parameters of create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel, with the following
differences: First, in the parameter ContrastContrastContrastContrastContrastcontrast of
create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel the upper as well as the lower threshold
for the hysteresis threshold method can be passed. Additionally, a
third value, which suppresses small connected contour regions, can
be passed. In contrast, the operator create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel
offers three separate parameters ContrastHighCompContrastHighCompContrastHighCompContrastHighCompContrastHighCompcontrastHighComp,
ContrastLowCompContrastLowCompContrastLowCompContrastLowCompContrastLowCompcontrastLowComp, and MinScoreCompMinScoreCompMinScoreCompMinScoreCompMinScoreCompminScoreComp in order to set
these three values. Consequently, also the automatic computation of
the contrast threshold(s) is different. If both hysteresis threshold
should be automatically determined, both ContrastLowCompContrastLowCompContrastLowCompContrastLowCompContrastLowCompcontrastLowComp
and ContrastHighCompContrastHighCompContrastHighCompContrastHighCompContrastHighCompcontrastHighComp must be set to 'auto'"auto""auto""auto""auto""auto". In
contrast, if only one threshold value should be determined,
ContrastLowCompContrastLowCompContrastLowCompContrastLowCompContrastLowCompcontrastLowComp must be set to 'auto'"auto""auto""auto""auto""auto" while
ContrastHighCompContrastHighCompContrastHighCompContrastHighCompContrastHighCompcontrastHighComp must be set to an arbitrary value
different from 'auto'"auto""auto""auto""auto""auto". Secondly, the parameter
OptimizationOptimizationOptimizationOptimizationOptimizationoptimization of create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel provides the
possibility to reduce the number of model points as well as the
possibility to completely pregenerate the shape model. In contrast,
the operator create_trained_component_modelcreate_trained_component_modelCreateTrainedComponentModelcreate_trained_component_modelCreateTrainedComponentModelCreateTrainedComponentModel uses a separate
parameter PregenerationCompPregenerationCompPregenerationCompPregenerationCompPregenerationComppregenerationComp in order to decide whether the
shape models should be completely pregenerated or not. A third
difference concerning the parameter MinScoreCompMinScoreCompMinScoreCompMinScoreCompMinScoreCompminScoreComp should be
noted. When using the shape-based matching, this parameter needs not
be passed when preparing the shape model using
create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel, but only during the search using
find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel. In contrast, when preparing the component
model it is favorable to analyze rotational symmetries of the model
components and similarities between the model components. However,
this analysis only leads to meaningful results if the value for
MinScoreCompMinScoreCompMinScoreCompMinScoreCompMinScoreCompminScoreComp that is used during the search (see
find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel) is already approximately known.
In addition to the parameters ContrastLowCompContrastLowCompContrastLowCompContrastLowCompContrastLowCompcontrastLowComp,
ContrastHighCompContrastHighCompContrastHighCompContrastHighCompContrastHighCompcontrastHighComp, and MinSizeCompMinSizeCompMinSizeCompMinSizeCompMinSizeCompminSizeComp also the
parameters MinContrastCompMinContrastCompMinContrastCompMinContrastCompMinContrastCompminContrastComp, NumLevelsCompNumLevelsCompNumLevelsCompNumLevelsCompNumLevelsCompnumLevelsComp,
AngleStepCompAngleStepCompAngleStepCompAngleStepCompAngleStepCompangleStepComp, and OptimizationCompOptimizationCompOptimizationCompOptimizationCompOptimizationCompoptimizationComp can be
automatically determined by passing 'auto'"auto""auto""auto""auto""auto" for the
respective parameters.
All component-specific input parameters (parameter names terminate
with the suffix Comp) must either contain one element, in
which case the parameter is used for all model components, or must
contain the same number of elements as the number of regions in
ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions, in which case each parameter element
refers to the corresponding element in ComponentRegionsComponentRegionsComponentRegionsComponentRegionsComponentRegionscomponentRegions.
In addition to the individual shape models, the component model also
contains information about the way the single model components must
be searched relative to each other using
find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel in order to minimize the computation
time of the search. For this, the components are represented in a
tree structure. First, the component that stands at the root of this
search tree (root component) is searched. Then, the remaining
components are searched relative to the pose of their predecessor in
the search tree.
The root component can be passed as an input parameter of
find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel during the search. To what extent a model
component is suited to act as the root component depends on several factors.
In principle, a model component that can be found in the image with a high
probability should be chosen. Therefore, a component that is sometimes
occluded to a high degree or that is missing in some cases is not well suited
to act as the root component. Additionally, the computation time that is
associated with the root component during the search can serve as a
criterion. A ranking of the model components that is based on the latter
criterion is returned in RootRankingRootRankingRootRankingRootRankingRootRankingrootRanking. In this parameter the indices
of the model components are sorted in descending order according to their
associated search time, i.e., RootRankingRootRankingRootRankingRootRankingRootRankingrootRanking[0] contains the index of
the model component that, chosen as root component, allows the fastest
search. Note that the ranking returned in RootRankingRootRankingRootRankingRootRankingRootRankingrootRanking represents
only a coarse estimation. Furthermore, the calculation of the root ranking
assumes that the image size as well as the value of the system parameter
'border_shape_models'"border_shape_models""border_shape_models""border_shape_models""border_shape_models""border_shape_models" are identical when calling
create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel and find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel.
- Multithreading type: exclusive (runs in parallel only with independent operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Input image from which the shape models of the
model components should be created.
Input regions from which the shape models of the
model components should be created.
Variation of the model components in row direction.
Suggested values: 0, 1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 100, 150
Restriction: VariationRow >= 0
Variation of the model components in column direction.
Suggested values: 0, 1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 100, 150
Restriction: VariationColumn >= 0
Angle variation of the model components.
Suggested values: 0.0, 0.017, 0.035, 0.05, 0.07, 0.09, 0.17, 0.35, 0.52, 0.67, 0.87
Restriction: VariationAngle >= 0
Smallest rotation of the component model.
Default value: -0.39
Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0
Extent of the rotation of the component model.
Default value: 0.79
Suggested values: 6.28, 3.14, 1.57, 0.79, 0.39
Restriction: AngleExtent >= 0
Lower hysteresis threshold for the contrast of the
components in the model image.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto""auto", 10, 20, 30, 40, 60, 80, 100, 120, 140, 160
Restriction: ContrastLowComp > 0
Upper hysteresis threshold for the contrast of the
components in the model image.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto""auto", 10, 20, 30, 40, 60, 80, 100, 120, 140, 160
Restriction: ContrastHighComp > 0 && ContrastHighComp >= ContrastLowComp
Minimum size of the contour regions in the model.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto""auto", 0, 5, 10, 20, 30, 40
Restriction: MinSizeComp >= 0
Minimum contrast of the components in the search
images.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto""auto", 10, 20, 20, 40
Restriction: MinContrastComp <= ContrastLowComp && MinContrastComp >= 0
Minimum score of the instances of the components to
be found.
Default value: 0.5
Suggested values: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Minimum increment: 0.01
Recommended increment: 0.05
Restriction: 0 <= MinScoreComp && MinScoreComp <= 1
Maximum number of pyramid levels for the components.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
List of values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'auto'"auto""auto""auto""auto""auto"
Step length of the angles (resolution) for the
components.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto""auto", 0.0175, 0.0349, 0.0524, 0.0698, 0.0873
Restriction: AngleStepComp >= 0
Kind of optimization for the components.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
List of values: 'auto'"auto""auto""auto""auto""auto", 'none'"none""none""none""none""none", 'point_reduction_high'"point_reduction_high""point_reduction_high""point_reduction_high""point_reduction_high""point_reduction_high", 'point_reduction_low'"point_reduction_low""point_reduction_low""point_reduction_low""point_reduction_low""point_reduction_low", 'point_reduction_medium'"point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium"
Match metric used for the components.
Default value:
'use_polarity'
"use_polarity"
"use_polarity"
"use_polarity"
"use_polarity"
"use_polarity"
List of values: 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity", 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity"
Complete pregeneration of the shape models for the
components if equal to 'true'"true""true""true""true""true".
Default value:
'false'
"false"
"false"
"false"
"false"
"false"
List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
Handle of the component model.
Ranking of the model components expressing the
suitability to act as the root component.
* Read the model image.
read_image (ModelImage, 'model_image.tif')
* Describe the model components.
gen_rectangle2 (ComponentRegions, 318, 109, -1.62, 34, 19)
gen_rectangle2 (Rectangle2, 342, 238, -1.63, 32, 17)
gen_rectangle2 (Rectangle3, 355, 505, 1.41, 25, 17)
concat_obj (ComponentRegions, Rectangle2, ComponentRegions)
concat_obj (ComponentRegions, Rectangle3, ComponentRegions)
* Create the component model by explicitly specifying the relations.
create_component_model (ModelImage, ComponentRegions, 20, 20, rad(25), 0, \
rad(360), 15, 40, 15, 10, 0.8, 'auto', 'auto', \
'none', 'use_polarity', 'false', ComponentModelID, \
RootRanking)
* Find the component model in a run-time image.
read_image (SearchImage, 'search_image.tif')
find_component_model (SearchImage, ComponentModelID, RootRanking, 0, \
rad(360), 0.5, 0, 0.5, 'stop_search', \
'search_from_best', 'none', 0.8, 'least_squares', 0, \
0.8, ModelStart, ModelEnd, Score, RowComp, \
ColumnComp, AngleComp, ScoreComp, ModelComp)
If the parameters are valid, the operator
create_component_modelcreate_component_modelCreateComponentModelcreate_component_modelCreateComponentModelCreateComponentModel returns the value 2 (H_MSG_TRUE). If
necessary an exception is raised.
draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion,
concat_objconcat_objConcatObjconcat_objConcatObjConcatObj
find_component_modelfind_component_modelFindComponentModelfind_component_modelFindComponentModelFindComponentModel
create_trained_component_modelcreate_trained_component_modelCreateTrainedComponentModelcreate_trained_component_modelCreateTrainedComponentModelCreateTrainedComponentModel
create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel,
find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel
Matching