CVBpy 15.0
Loading...
Searching...
No Matches
ImageRegressionInfoCollection Class Reference

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.ImageRegressionLabelInforead_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.
 

Detailed Description

Collection of regression information inside a regression sample list.

Member Function Documentation

◆ add()

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.

Parameters

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).

◆ clear()

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!

◆ has_value()

None has_value ( self,
List[float] label )

Check if a given value is already present in the values collection.

Parameters

label : List[float] Value to test for.

◆ merge_classes()

None merge_classes ( self,
List[float] from_label,
List[float] to_label )

Merge two classes into one class.

Parameters

from_label : List[float] Class to merge to the other classes.

to_label : List[float] Class to merge the samples to.

◆ merge_classes_by_index()

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.

Parameters

from_index : int Class to merge to the other classes.

to_index : int Class to merge the samples to.

◆ read_info()

cvb.sample_database.ImageRegressionLabelInfo read_info ( self,
int index )

Retrieves the indexed item.

Parameters

index : int Index of the collection to be accessed.

Returns

cvb.sample_database.ImageRegressionLabelInfo Label information.

◆ read_infos()

Retrieves all the items stored in the collection.

Returns

List[cvb.sample_database.ImageRegressionLabelInfo] The collection items.

◆ remove()

None remove ( self,
List[float] label )

Remove a class and all the data objects associated with it based on its name.

Parameters

label : List[float] List of labels to be removed.

◆ remove_at()

None remove_at ( self,
int index )

Remove a class by index.

Parameters

index : int Index of the class to be removed.