This chapter contains operators for sample-based identification.
With sample-based identification, trained objects can be identified based on characteristic features like texture or color. This allows you to identify objects that do not carry bar codes or data codes. Compared to the classification approaches described in chapter Classification, the preparation and training for sample-based identification is very convenient as no complex parameter tuning is required. Sample-based identification is capable of differentiating a large number of objects. The identification is robust against rotation, scale, and illumination changes as well as against occlusions, clutter, and moderate perspective distortions. Furthermore, the identification is robust against moderate deformations of the object and, within certain limits, it even allows to identify products stored in bulk. On the other hand, this means that objects cannot be distinguished if they appear identical except for one of the characteristics the identification is robust against. Note that sample-based identification works only with textured objects.
Sample-based identification can identify only one object at the same time. This means that each query image, or more precisely the domain of each query image, must not contain multiple objects.
(1) | (2) |
(3) | (4) |
In the following, the steps that are required to use sample-based identification are described briefly.
First, a sample identifier must be provided by creating and preparing a new sample identifier with
The preparation is essential to adapt the internal data structure of the
sample identifier to the kind of objects to be identified. Alternatively, an
already prepared sample identifier, which has been written to file with
, can be read from file with
write_sample_identifier
.
read_sample_identifier
A prepared sample identifier can be thought of as a warehouse, optimized to handle a specific group of objects.
Then, the prepared sample identifier has to be trained with samples of the individual objects to be identified. For this, the operators
are used. Note that it is possible to retrain the sample identifier at any
time. For this, samples can be removed from the sample identifier with the
operator
and new samples can
be added to the sample identifier with the operator
remove_sample_identifier_training_data
. If the kind of the objects to be
identified does not change too much, it is not necessary to repeat the
preparation of the sample identifier. To use the picture from above, the
training corresponds to filling the warehouse.
add_sample_identifier_training_data
Finally, the trained sample identifier can be applied to identify objects with
In addition to the operators mentioned above, the following operators can be
used to administrate the sample identifier. With
the data that were added to
the sample identifier can be removed in order to exclude them from being used
for the preparation. The operators
remove_sample_identifier_preparation_data
and
set_sample_identifier_object_info
can be used to assign and query
labels, i.e, names, to the individual objects. The latter operator can
further be used to determine some additional information about the number of
objects available for preparation and training. Finally, the operators
get_sample_identifier_object_info
and set_sample_identifier_param
can be used to set and retrieve control parameters of the sample identifier.
get_sample_identifier_param
In the following, the most important terms that are used in the context of sample-based identification are described:
An object to be identified by sample-based identification.
The index of an object. This index can be seen as a
label of the object, which is set while adding preparation data or training
data to the
. The object index is the most
important result of the operator SampleIdentifier
. With the
operator apply_sample_identifier
, a descriptive name can
be set for each object, which eases the interpretation of the identification
results.
set_sample_identifier_object_info
One sample or view of an object. Sometimes, also the term “sample image” is used to refer to object samples.
This term is used as a synonym for “object sample”, if the emphasis lies on the image.
The index of an object sample. Note that for each object, this index is set individually starting with 0. Therefore, the object sample index is unambiguous only together with the respective object index.
The adaptation of the internal data structure of the sample identifier to the features of a typical set of object samples that may appear during the identification process.
An object that has been added to the sample
identifier with
.
add_sample_identifier_preparation_data
An object sample of a preparation object. The preparation is typically done based on multiple preparation samples per object.
The collection of all preparation samples.
The training of the sample identifier. In this step, the sample identifier learns to differentiate all given objects.
An object that has been added to the sample
identifier with
or which is the
result of reusing preparation data as training data. In contrast to
preparation objects, all training objects are labeled with a unique object
index.
add_sample_identifier_training_data
An object sample of a training object. The training is typically done based on multiple training samples per object.
The collection of all training samples.
An image, in which an object is visible that should be identified with sample-based identification.
add_sample_identifier_preparation_data
add_sample_identifier_training_data
apply_sample_identifier
clear_sample_identifier
create_sample_identifier
deserialize_sample_identifier
get_sample_identifier_object_info
get_sample_identifier_param
prepare_sample_identifier
read_sample_identifier
remove_sample_identifier_preparation_data
remove_sample_identifier_training_data
serialize_sample_identifier
set_sample_identifier_object_info
set_sample_identifier_param
train_sample_identifier
write_sample_identifier