Classification label information. More...
#include <cvb/sample_database/sample_classification_image_list.hpp>
Public Types | |
using | LabelType = String |
Type of the labels. | |
Public Member Functions | |
ImageCollectionPtr | Samples () |
Get samples under this label. More... | |
int | Index () const |
Get the index of this label. More... | |
String | Label () const |
Get label under which this class is stored. More... | |
bool | IsExcluded () const |
Get the exclusion state of this class. More... | |
void | SetIsExcluded (bool isExcluded) |
Set the exclusion state of this class. More... | |
void | Add (const Image &srcImage, Point2D< int > extractionLocation, SampleExtractionMode mode=SampleExtractionMode::TopLeftCorner) |
Add a new sample to an existing class. More... | |
void | Relabel (const String &label) |
Modify the label of a sample set, but not to one that already exists in the sample list. More... | |
Classification label information.
|
inline |
Add a new sample to an existing class.
[in] | srcImage | Image from which to extract the sample for the class. |
[in] | extractionLocation | Location at which to extract the sample for the 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 |
Get the index of this label.
Any | exception derived from std::exception including CvbException. |
Note that this index may change when samples are removed from the image list - therefore you should check this index often. Generally it is more recommendable to work label based, not index based.
|
inline |
Get the exclusion state of this class.
Any | exception derived from std::exception including CvbException. |
|
inline |
Get label under which this class is stored.
Any | exception derived from std::exception including CvbException. |
You may change this label, but not to one that already exists in the SampleList. To Merge labels in the SampleList use the merge method(s) of the sample list.
|
inline |
Modify the label of a sample set, but not to one that already exists in the sample list.
[in] | label | The new label. |
Any | exception derived from std::exception including CvbException. |
To merge labels in the list use the merge method of the ImageClassificationInfoCollection.
|
inline |
Get samples under this label.
Any | exception derived from std::exception including CvbException. |
|
inline |
Set the exclusion state of this class.
[in] | isExcluded | The is-excluded flag. |
Any | exception derived from std::exception including CvbException. |