Collection of regression information inside a regression sample list. More...
Public Member Functions | |
| None | add (self, List[float] label, cvb.Image src_image, cvb.Point2D extraction_location, Optional[int] mode) |
| Add a sample to a new value. | |
| None | clear (self) |
| Remove all labels (and their associated data) from the sample list. | |
| None | has_value (self, List[float] label) |
| Check if a given value is already present in the values collection. | |
| None | merge_classes (self, List[float] from_label, List[float] to_label) |
| Merge two classes into one class. | |
| None | merge_classes_by_index (self, int from_index, int to_index) |
| Merge two classes into one class. | |
| cvb.sample_database.ImageRegressionLabelInfo | read_info (self, int index) |
| Retrieves the indexed item. | |
| List[cvb.sample_database.ImageRegressionLabelInfo] | read_infos (self) |
| Retrieves all the items stored in the collection. | |
| None | remove (self, List[float] label) |
| Remove a class and all the data objects associated with it based on its name. | |
| None | remove_at (self, int index) |
| Remove a class by index. | |
Properties | |
| count = property | |
| int: Retrieves the number of elements in the collection. | |
Collection of regression information inside a regression sample list.
| None add | ( | self, | |
| List[float] | label, | ||
| cvb.Image | src_image, | ||
| cvb.Point2D | extraction_location, | ||
| Optional[int] | mode ) |
Add a sample to a new value.
If the class indicated by the label already exists the sample will be added to the existing label.
label : List[float] Label of the new class.
src_image : cvb.Image Image from which to extract the first sample for the new class.
extraction_location : cvb.Point2D 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.
mode : Optional[int] Interpretation hint for the extraction_location parameter (see cvb.sample_database.SampleExtractionMode).
| None clear | ( | self | ) |
Remove all labels (and their associated data) from the sample list.
Note that this invalidates all info objects that have been taken from this collection!
| None has_value | ( | self, | |
| List[float] | label ) |
Check if a given value is already present in the values collection.
label : List[float] Value to test for.
| None merge_classes | ( | self, | |
| List[float] | from_label, | ||
| List[float] | to_label ) |
Merge two classes into one class.
from_label : List[float] Class to merge to the other classes.
to_label : List[float] Class to merge the samples to.
| None merge_classes_by_index | ( | self, | |
| int | from_index, | ||
| int | to_index ) |
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 from_index.
from_index : int Class to merge to the other classes.
to_index : int Class to merge the samples to.
| cvb.sample_database.ImageRegressionLabelInfo read_info | ( | self, | |
| int | index ) |
Retrieves the indexed item.
index : int Index of the collection to be accessed.
cvb.sample_database.ImageRegressionLabelInfo Label information.
| List[cvb.sample_database.ImageRegressionLabelInfo] read_infos | ( | self | ) |
Retrieves all the items stored in the collection.
List[cvb.sample_database.ImageRegressionLabelInfo] The collection items.
| None remove | ( | self, | |
| List[float] | label ) |
Remove a class and all the data objects associated with it based on its name.
label : List[float] List of labels to be removed.
| None remove_at | ( | self, | |
| int | index ) |
Remove a class by index.
index : int Index of the class to be removed.