find_generic_shape_model — Find the best matches of one or multiple shape models in an image.
find_generic_shape_model finds the best instances of
one or multiple shape models passed in
ModelID in the input image
SearchImage. The found matches are returned in
MatchResultID and can be queried using
get_generic_shape_model_result_object. The number of found matches
is returned in
NumMatchResult. The model can be parameterized using
set_generic_shape_model_object, through which one can control
The domain of the input image
SearchImage sets the ROI for the
search. It limits the search space as it is considered as boundary for the
center of gravity of
ModelID in order to accelerate the matching
process. For information on passing a tuple of images to
SearchImage see below.
Furthermore, the search space is limited by the size of
ModelID is only searched within those points of the
domain, in which
ModelID fits completely. Hence,
will not be found if it exceeds the border of the image. This holds
for all levels of the used image pyramid.
In rare cases which typically occur for artificial images, instances of
ModelID cannot be found in an image, if they touch the border of the
domain on any level of the image pyramid.
As a rule of thumb,
ModelID might not be found if its distance to
an image border is smaller than
pixels (where is the number of pyramid levels).
This behavior can be changed with 'border_shape_models', see
When searching multiple models, the search space can be restricted for all
models simultaneously by passing a single image with reduced domain in
Alternatively, the search space can be restricted for each model
individually by passing an object containing multiple image objects, one for
each model in
ModelID. In this case, the images have to be identical
except for their domains.
When applying multiple models, different identifiers
('model_identifier') have to be set for each model,
so that each instance can be assigned to the shape model it has
been found with. Otherwise an exception is raised.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
Image in which the model is searched.
ModelID(input_control, state is modified) shape_model(-array)
Handle of the shape model.
Handle with the found matches.
Number of found matches.
If the parameters are valid, the operator
find_generic_shape_model returns the value TRUE.
If necessary an exception is raised.