Skip to content

get_generic_shape_model_result_objectGetGenericShapeModelResultObjectGetGenericShapeModelResultObjectget_generic_shape_model_result_objectT_get_generic_shape_model_result_object🔗

Short description🔗

get_generic_shape_model_result_objectGetGenericShapeModelResultObjectGetGenericShapeModelResultObjectget_generic_shape_model_result_objectT_get_generic_shape_model_result_object — Get objects from a shape matching result.

Signature🔗

get_generic_shape_model_result_object( out object Objects, generic_shape_model_result MatchResultID, string MatchSelector, attribute.name GenParamName )void GetGenericShapeModelResultObject( HObject* Objects, const HTuple& MatchResultID, const HTuple& MatchSelector, const HTuple& GenParamName )static void HOperatorSet.GetGenericShapeModelResultObject( out HObject objects, HTuple matchResultID, HTuple matchSelector, HTuple genParamName )def get_generic_shape_model_result_object( match_result_id: HHandle, match_selector: Sequence[Union[str, int]], gen_param_name: Union[str, HHandle] ) -> HObject

Herror T_get_generic_shape_model_result_object( Hobject* Objects, const Htuple MatchResultID, const Htuple MatchSelector, const Htuple GenParamName )

HObject HGenericShapeModelResult::GetGenericShapeModelResultObject( const HTuple& MatchSelector, const HTuple& GenParamName ) const

HObject HGenericShapeModelResult::GetGenericShapeModelResultObject( const HTuple& MatchSelector, const HString& GenParamName ) const

HObject HGenericShapeModelResult::GetGenericShapeModelResultObject( const HTuple& MatchSelector, const char* GenParamName ) const

HObject HGenericShapeModelResult::GetGenericShapeModelResultObject( const HTuple& MatchSelector, const wchar_t* GenParamName ) const (Windows only)

HObject HGenericShapeModelResult.GetGenericShapeModelResultObject( HTuple matchSelector, HTuple genParamName )

HObject HGenericShapeModelResult.GetGenericShapeModelResultObject( HTuple matchSelector, string genParamName )

Description🔗

get_generic_shape_model_result_objectGetGenericShapeModelResultObject returns iconic results of shape-based matching in Objectsobjectsobjects. The results are contained in MatchResultIDmatchResultIDmatch_result_id.

The parameter MatchSelectormatchSelectormatch_selector is used to select from which matches the result values shall be returned. For more information and the list of supported values for MatchSelectormatchSelectormatch_selector see get_generic_shape_model_resultGetGenericShapeModelResult.

GenParamNamegenParamNamegen_param_name specifies which object result value will be returned. The following values are possible:

  • 'contours'"contours": Model contours transformed according to the matching result.

    Attention: Model contours are only available if the search was conducted with 'prepare_contours_for_visualization'"prepare_contours_for_visualization" set to 'true'"true".

  • 'clutter_region'"clutter_region": Region where no clutter should occur.

    Attention: The clutter region is only available if a clutter region was added to the model and the search was conducted with 'prepare_clutter_region_for_visualization'"prepare_clutter_region_for_visualization" set to 'true'"true".

  • A dictionary: Parameters which require additional information to get an iconic result are passed as a dictionary with the key 'param_name' with additional key/value pairs depending on the queried 'param_name'. Unknown keys are ignored. The following parameters can be queried:

    • score_visualization_contours: Parts of model contours where the model point score contributions are within the given interval. The contours are transformed according to the corresponding match. The following additional keys are required to get score_visualization_contours:

      • low: Low threshold of the interval. Model contours with score contributions greater or equal low are returned. low is either a real valued number in the range [-1.0-1.0, 1.01.0] or the string 'min'"min" as the lowest possible value.

      • high: High threshold of the interval. Model contours with score contributions smaller than high are returned. high is either a real valued number in the range [-1.0-1.0, 1.01.0] or the string 'max'"max" as the highest possible value. Note that for 1.01.0 and 'max'"max" the threshold is treated inclusively, i.e. contour parts with score contributions smaller than and equal to 1.01.0 and 'max'"max" are returned.

      The score contributions are calculated in find_generic_shape_modelFindGenericShapeModel for each model point. All contour parts, for which the median of their surrounding score contributions is higher or equal 'low' and less than 'high', are returned.

      Details about the selection
      • 16 score contributions are considered for the median.

      • For contours with less than 16 score contributions, the median of all score contributions is evaluated once and compared to the thresholds.

      • For longer closed contours, the window in which score contributions are taken into account continues over the start and end point of closed contours.

      • For longer open contours, the first or last score contribution is repeated at the start or end respectively.

      Note that depending on 'metric'"metric" used in each model during find_generic_shape_modelFindGenericShapeModel the range of score contributions is different.

      Attention: The score contributions are only available if the search was conducted with 'score_visualization'"score_visualization" set to 'true'"true".

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🔗

Objectsobjectsobjects (output_object) (multichannel-)object(-array) → objectHObjectHObjectHObjectHobject *

Objects of the queried result.

MatchResultIDmatchResultIDmatch_result_id (input_control) generic_shape_model_result → (handle)HTuple (HHandle)HGenericShapeModelResult, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the shape model matches.

MatchSelectormatchSelectormatch_selector (input_control) string-array → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)Sequence[Union[str, int]]Htuple (char* / Hlong)

Selector for the matching results to be queried.

Default: 'all'"all"
List of values: 'all', 'best'"all", "best"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name → (string / handle)HTuple (HString / HHandle)HTuple (string / HHandle)Union[str, HHandle]Htuple (char* / handle)

Name of the queried result object.

Default: 'contours'"contours"
List of values: 'clutter_region', 'contours'"clutter_region", "contours"

Example🔗

(HDevelop)

* Get score visualization contours by passing a dictionary for GenParamName.
GenParamName := dict{param_name: 'score_visualization_contours'}
GenParamName.low := 0.25
GenParamName.high := 'max'
get_generic_shape_model_result_object (ScoreVisContour, MatchResultID, \
                                      'all', GenParamName)

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

find_generic_shape_modelFindGenericShapeModel

Module🔗

Matching