CVBpy 14.0
SampleImageList Class Reference

Classifier type that operates on images. More...

Inherits SampleList.

Inherited by SampleClassificationImageList, and SampleRegressionImageList.

Public Member Functions

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

 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.

Member Function Documentation

◆ get_sample_image()

cvb.Image get_sample_image (   self,
int  sample_index 
)

Retrieve an image by its overall sample index (ranging from 0 to num_samples-1).

Parameters

sample_index : int Index of the image to be retrieved.

Returns

cvb.Image Indexed image.

◆ is_compatible()

bool is_compatible (   self,
cvb.Image  img 
)

Check whether a CVB image is compatible with this image list, i.e.

if it is generally possible to add samples from that image to the list.

Parameters

img : cvb.Image Image object to be checked for compatibility.

Returns

bool True if the image referred to by img is compatible with this image list, false otherwise.

◆ set_feature_window()

None set_feature_window (   self,
cvb.Point2D  location,
cvb.Size2D  size,
cvb.Point2D  origin 
)

Redefine the feature window of the sample image list.

Note that the values provided must be consistent with the image size for which this sample image list has been created, otherwise an exception will be raised.

Parameters

location : cvb.Point2D Feature window location (pixel coordinate of the left top corner) inside the sample images.

size : cvb.Size2D Feature window size in pixels.

origin : cvb.Point2D Location of the origin of the feature window (relative to the left top corner of the feature window, in pixels).