CVBpy 14.0
SampleRegressionImageList Class Reference

Classifier type that operates on images. More...

Inherits SampleImageList.

Public Member Functions

cvb.sample_database.ImageRegressionLabelInfo get_value_for_sample (self, int sample_index)
 Retrieve the label information that goes with a given sample. More...
 
int regression_dimension_max ()
 Maximum regression dimension to be used. More...
 
cvb.sample_database.SampleRegressionImageList transform_images (self, Callable[[cvb.Image], cvb.Image] transform_callback)
 Transform this sample image list into a new sample image list by transforming each sample inside it. More...
 
cvb.sample_database.SampleRegressionImageList transform_labels (self, Callable[[List[float]], List[float]] transform_callback)
 Transform this sample image list into a new sample image list by transforming each label inside it. More...
 
cvb.sample_database.SampleRegressionImageList transform_to_classification_list (self, Callable[[List[float]], str] transform_callback)
 Transform this sample image list into a new sample image list by transforming each label inside it. More...
 
- Public Member Functions inherited from SampleImageList
cvb.Image get_sample_image (self, int sample_index)
 Retrieve an image by its overall sample index (ranging from 0 to num_samples-1). More...
 
bool is_compatible (self, cvb.Image img)
 Check whether a CVB image is compatible with this image list, i.e. More...
 
None set_feature_window (self, cvb.Point2D location, cvb.Size2D size, cvb.Point2D origin)
 Redefine the feature window of the sample image list. More...
 
- Public Member Functions inherited from SampleList
None save (self, str file_name)
 Save the sample list to a file. More...
 

Properties

 regression_dimension = property
 int: Get the dimension of the regression labels used in this sample image list.
 
 values = property
 cvb.sample_database.ImageRegressionInfoCollection: Get the class collection.
 
- Properties inherited from SampleImageList
 feature_window_location = property
 cvb.Point2D: Location of the feature window (position of left top corner inside the image).
 
 feature_window_origin = property
 cvb.Point2D: Location of the feature window origin in pixel coordinates measured from the left top corner of the feature window.
 
 feature_window_size = property
 cvb.Size2D: Size of the feature window.
 
 fringes = property
 cvb.sample_database.Fringes: Get fringes (= size difference between the images and the feature window) of the sample images.
 
 image_data_type = property
 cvb.DataType: Data type of the images that can be added to the image list (all planes must have same data type).
 
 image_dimension = property
 int: Dimension (# of planes) of the images that can be added to the image list.
 
 image_size = property
 cvb.Size2D: Size of the images (in pixels) that can be added to the image list.
 
- Properties inherited from SampleList
 average_sample_count = property
 float: Average number samples in per class of the sample list.
 
 comment = property
 str: The comment text.
 
 file_name = property
 str: Name of the file from which this image list was loaded (empty string if this image list was neither loaded nor saved since its construction).
 
 max_sample_count = property
 int: Number samples in the largest class of the sample list.
 
 min_sample_count = property
 int: Number samples in the smallest class of the sample list.
 
 num_classes = property
 int: Number of distinguishable classes in the sample list.
 
 num_samples = property
 int: Total number of samples in the sample list.
 

Detailed Description

Classifier type that operates on images.

Instantiates a SampleImageList object.

Parameters

image_data_type : cvb.sample_database.SampleListImageDataType Data type of the images to be added to the sample image list. (1)

regression_dimension : int Dimension of the regression vector. Must be greater than 0 and less than or equal regression_dimension_max. (1)

Instantiates a SampleImageList object.

Parameters

file_name : str Name of the file to be loaded. (2)

Member Function Documentation

◆ get_value_for_sample()

cvb.sample_database.ImageRegressionLabelInfo get_value_for_sample (   self,
int  sample_index 
)

Retrieve the label information that goes with a given sample.

Parameters

sample_index : int Index of the sample to retrieve the value for.

Returns

cvb.sample_database.ImageRegressionLabelInfo The regression label value for the sample referred to by sample_index.

◆ regression_dimension_max()

int regression_dimension_max ( )

Maximum regression dimension to be used.

Returns

int Maximal regression dimension.

◆ transform_images()

cvb.sample_database.SampleRegressionImageList transform_images (   self,
Callable[[cvb.Image], cvb.Image transform_callback 
)

Transform this sample image list into a new sample image list by transforming each sample inside it.

Parameters

transform_callback : Callable[[cvb.Image], cvb.Image] Sample transformation callback.

Returns

cvb.sample_database.SampleRegressionImageList New sample list.

◆ transform_labels()

cvb.sample_database.SampleRegressionImageList transform_labels (   self,
Callable[[List[float]], List[float]]  transform_callback 
)

Transform this sample image list into a new sample image list by transforming each label inside it.

Parameters

transform_callback : Callable[[List[float]], List[float]] Label transformation callback.

Returns

cvb.sample_database.SampleRegressionImageList New sample list.

◆ transform_to_classification_list()

cvb.sample_database.SampleRegressionImageList transform_to_classification_list (   self,
Callable[[List[float]], str]  transform_callback 
)

Transform this sample image list into a new sample image list by transforming each label inside it.

Parameters

transform_callback : Callable[[List[float]], str] Label transformation callback.

Returns

cvb.sample_database.SampleRegressionImageList New sample list.