Collection of class information inside a classification sample list. More...
#include <sample_classification_image_list.hpp>
Inherits LabelInfoCollection< ImageClassificationLabelInfo >.
Public Member Functions | |
| void | Add (const String &label, const Image &srcImage, Point2D< int > extractionLocation, SampleExtractionMode mode=SampleExtractionMode::TopLeftCorner) |
| Add a sample to a new class. If the class indicated by the label already exists the sample will be added to the existing class. | |
| bool | HasLabel (const String &label) |
| Check if a given label is already present in the classes collection. | |
Public Member Functions inherited from LabelInfoCollection< ImageClassificationLabelInfo > | |
| int | Count () const |
| Retrieves the number of elements in the collection. | |
| std::unique_ptr< ImageClassificationLabelInfo > | ReadInfo (int index) const |
| Retrieves the indexed item. | |
| std::vector< std::shared_ptr< ImageClassificationLabelInfo > > | ReadInfos () const |
| Retrieves all the items stored in the collection. | |
| void | RemoveAt (int index) |
| Remove a class by index. | |
| void | Remove (const LabelType &label) |
| Remove a class and all the data objects associated with it based on its name. | |
| void | Clear () |
| Remove all labels (and their associated data) from the sample list. | |
| void | MergeClasses (int fromIndex, int toIndex) |
| Merge two classes into one class. | |
| void | MergeClasses (const LabelType &fromLabel, const LabelType &toLabel) |
| Merge two classes into one class. | |
Additional Inherited Members | |
Public Types inherited from LabelInfoCollection< ImageClassificationLabelInfo > | |
| using | LabelType |
| Type of the labels. | |
Collection of class information inside a classification sample list.
|
inline |
Add a sample to a new class. If the class indicated by the label already exists the sample will be added to the existing class.
| [in] | label | Name of the new class. |
| [in] | srcImage | Image from which to extract the first sample for the new class. |
| [in] | extractionLocation | Location at which to extract the first sample for the new class. Note that what the extraction location actually refers dependent on the value of the mode parameter. |
| [in] | mode | Interpretation hint for the extractionLocation parameter. |
| Any | exception derived from std::exception including CvbException. |
|
inline |
Check if a given label is already present in the classes collection.
| [in] | label | Label to test for. |
| Any | exception derived from std::exception including CvbException. |