Collection of class information inside a classification sample list. More...
Public Member Functions | |
| void | Add (string label, Image srcImage, Point2D 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 (string label) |
| Check if a given label is already present in the classes collection. | |
| void | Remove (string label) |
| Remove a class and all the data objects associated with it based on its name. | |
| void | MergeClasses (string fromLabel, string toLabel) |
| Merge two classes into one class. The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromLabel . | |
Protected Member Functions | |
| override ImageClassificationLabelInfo | GetInfo (int index) |
| Parent class calls this method to extract one info object by index. | |
Collection of class information inside a classification sample list.
| void Add | ( | string | label, |
| Image | srcImage, | ||
| Point2D | 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.
| label | Name of the new class. |
| srcImage | Image from which to extract the first sample for the new class. |
| 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. |
| ObjectDisposedException | If the image list has already been disposed. |
| mode | Interpretation hint for the extractionLocation parameter. |
|
protected |
Parent class calls this method to extract one info object by index.
| index | index at which to extract |
| ObjectDisposedException | If the SampleImageList has already been disposed |
| ArgumentOutOfRangeException | If the index is invalid |
| bool HasLabel | ( | string | label | ) |
Check if a given label is already present in the classes collection.
| label | Label to test for. |
| void MergeClasses | ( | string | fromLabel, |
| string | toLabel ) |
Merge two classes into one class. The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromLabel .
| fromLabel | Class to merge to the other classes. |
| toLabel | Class to merge the samples to. |
| void Remove | ( | string | label | ) |
Remove a class and all the data objects associated with it based on its name.
| label | Name of the class to be removed. |
| ObjectDisposedException | If the sample list has already been disposed. |