HALCON Reference Manual 10.0.2
Table of Contents / Matching / Shape-Based ClassesClassesClasses | | | Operators

inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel (Operator)

Name

inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel — Create the representation of a shape model.

Signature

inspect_shape_model(Image : ModelImages, ModelRegions : NumLevels, Contrast : )

Herror inspect_shape_model(const Hobject Image, Hobject* ModelImages, Hobject* ModelRegions, const Hlong NumLevels, const Hlong Contrast)

Herror T_inspect_shape_model(const Hobject Image, Hobject* ModelImages, Hobject* ModelRegions, const Htuple NumLevels, const Htuple Contrast)

Herror inspect_shape_model(Hobject Image, Hobject* ModelImages, Hobject* ModelRegions, const HTuple& NumLevels, const HTuple& Contrast)

HImageArray HImage::InspectShapeModel(HRegionArray* ModelRegions, const HTuple& NumLevels, const HTuple& Contrast) const

void HOperatorSetX.InspectShapeModel(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ModelImages, [out] IHUntypedObjectX*ModelRegions, [in] VARIANT NumLevels, [in] VARIANT Contrast)

IHImageX* HImageX.InspectShapeModel(
[out] IHRegionX*ModelRegions, [in] Hlong NumLevels, [in] VARIANT Contrast)

static void HOperatorSet.InspectShapeModel(HObject image, out HObject modelImages, out HObject modelRegions, HTuple numLevels, HTuple contrast)

HImage HImage.InspectShapeModel(out HRegion modelRegions, int numLevels, HTuple contrast)

HImage HImage.InspectShapeModel(out HRegion modelRegions, int numLevels, int contrast)

Description

inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel creates a representation of a shape model. The operator is particularly useful in order to determine the parameters NumLevelsNumLevelsNumLevelsNumLevelsnumLevels and ContrastContrastContrastContrastcontrast, which are used in create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel, or create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel, quickly and conveniently. The representation of the model is created on multiple image pyramid levels, where the number of levels is determined by NumLevelsNumLevelsNumLevelsNumLevelsnumLevels. In contrast to create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel, and create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel, the model is only created for the rotation and scale of the object in the input image, i.e., 0° and 1. As output, inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel creates an image object ModelImagesModelImagesModelImagesModelImagesmodelImages containing the images of the individual levels of the image pyramid as well as a region in ModelRegionsModelRegionsModelRegionsModelRegionsmodelRegions for each pyramid level that represents the model at the respective pyramid level. The individual objects can be accessed with select_objselect_objselect_objSelectObjSelectObj. If the input image ImageImageImageImageimage has one channel the representation of the model is created with the method that is used in create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel or create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel for the metrics 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity", 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", and 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity". If the input image has more than one channel the representation is created with the method that is used for the metric 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity". As described for create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel, and create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel, the number of pyramid levels should be chosen as large as possible, while taking into account that the model must be recognizable on the highest pyramid level and must have enough model points. The parameter ContrastContrastContrastContrastcontrast should be chosen such that only the significant features of the template object are used for the model. ContrastContrastContrastContrastcontrast can also contain a tuple with two values. In this case, the model is segmented using a method similar to the hysteresis threshold method used in edges_imageedges_imageedges_imageEdgesImageEdgesImage. Here, the first element of the tuple determines the lower threshold, while the second element determines the upper threshold. For more information about the hysteresis threshold method, see hysteresis_thresholdhysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold. Optionally, ContrastContrastContrastContrastcontrast can contain a third value as the last element of the tuple. This value determines a threshold for the selection of significant model components based on the size of the components, i.e., components that have fewer points than the minimum size thus specified are suppressed. This threshold for the minimum size is divided by two for each successive pyramid level. If small model components should be suppressed, but hysteresis thresholding should not be performed, nevertheless three values must be specified in ContrastContrastContrastContrastcontrast. In this case, the first two values can simply be set to identical values. In its typical use, inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel is called interactively multiple times with different parameters for NumLevelsNumLevelsNumLevelsNumLevelsnumLevels and ContrastContrastContrastContrastcontrast, until a satisfactory model is obtained. After this, create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel, or create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel are called with the parameters thus obtained.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image objectHImageHImageHImageXHobject (byte / uint2)

Input image.

ModelImagesModelImagesModelImagesModelImagesmodelImages (output_object)  (multichannel-)image-array objectHImageHImageArrayHImageXHobject * (byte / uint2)

Image pyramid of the input image

ModelRegionsModelRegionsModelRegionsModelRegionsmodelRegions (output_object)  region-array objectHRegionHRegionArrayHRegionXHobject *

Model region pyramid

NumLevelsNumLevelsNumLevelsNumLevelsnumLevels (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of pyramid levels.

Default value: 4

List of values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

ContrastContrastContrastContrastcontrast (input_control)  number(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Threshold or hysteresis thresholds for the contrast of the object in the image and optionally minimum size of the object parts.

Default value: 30

Suggested values: 10, 20, 30, 40, 60, 80, 100, 120, 140, 160

Result

If the parameters are valid, the operator inspect_shape_modelinspect_shape_modelinspect_shape_modelInspectShapeModelInspectShapeModel returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain

Possible Successors

select_objselect_objselect_objSelectObjSelectObj

See also

create_shape_modelcreate_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModel, create_scaled_shape_modelcreate_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModel, create_aniso_shape_modelcreate_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModel

Module

Foundation


Table of Contents / Matching / Shape-Based ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH