Skip to content

get_found_component_modelGetFoundComponentModelGetFoundComponentModelget_found_component_modelT_get_found_component_model🔗

Short description🔗

get_found_component_modelGetFoundComponentModelGetFoundComponentModelget_found_component_modelT_get_found_component_model — Return the components of a found instance of a component model.

Warning🔗

get_found_component_modelGetFoundComponentModel is obsolete and is only provided for reasons of backward compatibility. The operator will be removed with HALCON 26.11.

Signature🔗

get_found_component_model( out region FoundComponents, component_model ComponentModelID, integer ModelStart, integer ModelEnd, point.y RowComp, point.x ColumnComp, angle.rad AngleComp, real ScoreComp, integer ModelComp, integer ModelMatch, string MarkOrientation, out point.y RowCompInst, out point.x ColumnCompInst, out angle.rad AngleCompInst, out real ScoreCompInst )void GetFoundComponentModel( HObject* FoundComponents, const HTuple& ComponentModelID, const HTuple& ModelStart, const HTuple& ModelEnd, const HTuple& RowComp, const HTuple& ColumnComp, const HTuple& AngleComp, const HTuple& ScoreComp, const HTuple& ModelComp, const HTuple& ModelMatch, const HTuple& MarkOrientation, HTuple* RowCompInst, HTuple* ColumnCompInst, HTuple* AngleCompInst, HTuple* ScoreCompInst )static void HOperatorSet.GetFoundComponentModel( out HObject foundComponents, HTuple componentModelID, HTuple modelStart, HTuple modelEnd, HTuple rowComp, HTuple columnComp, HTuple angleComp, HTuple scoreComp, HTuple modelComp, HTuple modelMatch, HTuple markOrientation, out HTuple rowCompInst, out HTuple columnCompInst, out HTuple angleCompInst, out HTuple scoreCompInst )def get_found_component_model( component_model_id: HHandle, model_start: MaybeSequence[int], model_end: MaybeSequence[int], row_comp: MaybeSequence[float], column_comp: MaybeSequence[float], angle_comp: MaybeSequence[float], score_comp: MaybeSequence[float], model_comp: MaybeSequence[int], model_match: int, mark_orientation: str ) -> Tuple[HObject, Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def get_found_component_model_s( component_model_id: HHandle, model_start: MaybeSequence[int], model_end: MaybeSequence[int], row_comp: MaybeSequence[float], column_comp: MaybeSequence[float], angle_comp: MaybeSequence[float], score_comp: MaybeSequence[float], model_comp: MaybeSequence[int], model_match: int, mark_orientation: str ) -> Tuple[HObject, float, float, float, float]Herror T_get_found_component_model( Hobject* FoundComponents, const Htuple ComponentModelID, const Htuple ModelStart, const Htuple ModelEnd, const Htuple RowComp, const Htuple ColumnComp, const Htuple AngleComp, const Htuple ScoreComp, const Htuple ModelComp, const Htuple ModelMatch, const Htuple MarkOrientation, Htuple* RowCompInst, Htuple* ColumnCompInst, Htuple* AngleCompInst, Htuple* ScoreCompInst )

HRegion HComponentModel::GetFoundComponentModel( const HTuple& ModelStart, const HTuple& ModelEnd, const HTuple& RowComp, const HTuple& ColumnComp, const HTuple& AngleComp, const HTuple& ScoreComp, const HTuple& ModelComp, Hlong ModelMatch, const HString& MarkOrientation, HTuple* RowCompInst, HTuple* ColumnCompInst, HTuple* AngleCompInst, HTuple* ScoreCompInst ) const

HRegion HComponentModel::GetFoundComponentModel( Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const HString& MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst ) const

HRegion HComponentModel::GetFoundComponentModel( Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const char* MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst ) const

HRegion HComponentModel::GetFoundComponentModel( Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const wchar_t* MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst ) const (Windows only)

static HRegion HImage::GetFoundComponentModel( const HComponentModel& ComponentModelID, const HTuple& ModelStart, const HTuple& ModelEnd, const HTuple& RowComp, const HTuple& ColumnComp, const HTuple& AngleComp, const HTuple& ScoreComp, const HTuple& ModelComp, Hlong ModelMatch, const HString& MarkOrientation, HTuple* RowCompInst, HTuple* ColumnCompInst, HTuple* AngleCompInst, HTuple* ScoreCompInst )

static HRegion HImage::GetFoundComponentModel( const HComponentModel& ComponentModelID, Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const HString& MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst )

static HRegion HImage::GetFoundComponentModel( const HComponentModel& ComponentModelID, Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const char* MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst )

static HRegion HImage::GetFoundComponentModel( const HComponentModel& ComponentModelID, Hlong ModelStart, Hlong ModelEnd, double RowComp, double ColumnComp, double AngleComp, double ScoreComp, Hlong ModelComp, Hlong ModelMatch, const wchar_t* MarkOrientation, double* RowCompInst, double* ColumnCompInst, double* AngleCompInst, double* ScoreCompInst ) (Windows only)

HRegion HComponentModel.GetFoundComponentModel( HTuple modelStart, HTuple modelEnd, HTuple rowComp, HTuple columnComp, HTuple angleComp, HTuple scoreComp, HTuple modelComp, int modelMatch, string markOrientation, out HTuple rowCompInst, out HTuple columnCompInst, out HTuple angleCompInst, out HTuple scoreCompInst )

HRegion HComponentModel.GetFoundComponentModel( int modelStart, int modelEnd, double rowComp, double columnComp, double angleComp, double scoreComp, int modelComp, int modelMatch, string markOrientation, out double rowCompInst, out double columnCompInst, out double angleCompInst, out double scoreCompInst )

static HRegion HImage.GetFoundComponentModel( HComponentModel componentModelID, HTuple modelStart, HTuple modelEnd, HTuple rowComp, HTuple columnComp, HTuple angleComp, HTuple scoreComp, HTuple modelComp, int modelMatch, string markOrientation, out HTuple rowCompInst, out HTuple columnCompInst, out HTuple angleCompInst, out HTuple scoreCompInst )

static HRegion HImage.GetFoundComponentModel( HComponentModel componentModelID, int modelStart, int modelEnd, double rowComp, double columnComp, double angleComp, double scoreComp, int modelComp, int modelMatch, string markOrientation, out double rowCompInst, out double columnCompInst, out double angleCompInst, out double scoreCompInst )

Description🔗

get_found_component_modelGetFoundComponentModel returns the components of a found instance of the component model ComponentModelIDcomponentModelIDcomponent_model_id in form of contour regions in FoundComponentsfoundComponentsfound_components as well as in numerical form.

The operator get_found_component_modelGetFoundComponentModel is particularly useful in order to visualize the matches that have been obtained by find_component_modelFindComponentModel.

The pose of the returned components corresponds to their pose in the search image as returned by find_component_modelFindComponentModel. Hence, the parameters ModelStartmodelStartmodel_start, ModelEndmodelEndmodel_end, RowComprowComprow_comp, ColumnCompcolumnCompcolumn_comp, AngleCompangleCompangle_comp, ScoreCompscoreCompscore_comp, and ModelCompmodelCompmodel_comp must be passed to get_found_component_modelGetFoundComponentModel as they have been returned by find_component_modelFindComponentModel. In ModelMatchmodelMatchmodel_match the index of the found instance of the component model must be passed. Consequently, ModelMatchmodelMatchmodel_match must lie within the range between 0 and m-1, where m is the number of elements in ModelStartmodelStartmodel_start and ModelEndmodelEndmodel_end, and hence corresponds to the number of found model instances. For example, if the best match should be returned, ModelMatchmodelMatchmodel_match should be set to 00.

When dealing with rotationally symmetric components, one may wish to mark the current orientation of the found component. This can be achieved by setting MarkOrientationmarkOrientationmark_orientation to 'true'"true". In this case, the contour region of each component is complemented by an arrow at its reference point that points in the reference direction. The reference direction of a component is based on the orientation of the component in the model image (see train_model_componentsTrainModelComponents or create_component_modelCreateComponentModel) and is represented by an arrow that starts at the reference point and points to the right in the horizontal direction.

For convenience, the pose parameters as well as the score of each component of the found model instance are additionally returned in numerical form in RowCompInstrowCompInstrow_comp_inst, ColumnCompInstcolumnCompInstcolumn_comp_inst, AngleCompInstangleCompInstangle_comp_inst, and ScoreCompInstscoreCompInstscore_comp_inst. The four tuples are always of length n, where n is the number of components in the component model ComponentModelIDcomponentModelIDcomponent_model_id. If a component could not be found during the search, an empty region is passed in the corresponding element of FoundComponentsfoundComponentsfound_components and the value of the corresponding element in RowCompInstrowCompInstrow_comp_inst, ColumnCompInstcolumnCompInstcolumn_comp_inst, AngleCompInstangleCompInstangle_comp_inst, and ScoreCompInstscoreCompInstscore_comp_inst is set to 00.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

FoundComponentsfoundComponentsfound_components (output_object) region-array → objectHObjectHRegionHObjectHobject *

Found components of the selected component model instance.

ComponentModelIDcomponentModelIDcomponent_model_id (input_control) component_model → (handle)HTuple (HHandle)HComponentModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the component model.

ModelStartmodelStartmodel_start (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Start index of each found instance of the component model in the tuples describing the component matches.

ModelEndmodelEndmodel_end (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

End index of each found instance of the component model to the tuples describing the component matches.

RowComprowComprow_comp (input_control) point.y(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)

Row coordinate of the found component matches.

ColumnCompcolumnCompcolumn_comp (input_control) point.x(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)

Column coordinate of the found component matches.

AngleCompangleCompangle_comp (input_control) angle.rad(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)

Rotation angle of the found component matches.

ScoreCompscoreCompscore_comp (input_control) real(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)

Score of the found component matches.

ModelCompmodelCompmodel_comp (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Index of the found components.

ModelMatchmodelMatchmodel_match (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Index of the found instance of the component model to be returned.

MarkOrientationmarkOrientationmark_orientation (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Mark the orientation of the components.

Default: 'false'"false"
List of values: 'false', 'true'"false", "true"

RowCompInstrowCompInstrow_comp_inst (output_control) point.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of all components of the selected model instance.

ColumnCompInstcolumnCompInstcolumn_comp_inst (output_control) point.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinate of all components of the selected model instance.

AngleCompInstangleCompInstangle_comp_inst (output_control) angle.rad(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Rotation angle of all components of the selected model instance.

ScoreCompInstscoreCompInstscore_comp_inst (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Score of all components of the selected model instance.

Result🔗

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

Module🔗

Matching