Public Member Functions | List of all members
ImageRegressionInfoCollection Class Reference

Collection of regression information inside a regression sample list. More...

#include <cvb/sample_database/sample_regression_image_list.hpp>

Inherits LabelInfoCollection< ImageRegressionLabelInfo >.

Public Member Functions

void Add (const std::vector< float > &label, const Image &srcImage, Point2D< int > extractionLocation, SampleExtractionMode mode=SampleExtractionMode::TopLeftCorner)
 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. More...
 
bool HasValue (const std::vector< float > &label)
 Check if a given value is already present in the values collection. More...
 
- Public Member Functions inherited from LabelInfoCollection< ImageRegressionLabelInfo >
int Count () const
 Retrieves the number of elements in the collection. More...
 
ImageRegressionLabelInfo ReadInfo (int index) const
 Retrieves the indexed item. More...
 
std::vector< ImageRegressionLabelInfoReadInfos () const
 Retrieves all the items stored in the collection. More...
 
void RemoveAt (int index)
 Remove a class by index. More...
 
void Remove (const LabelType &label)
 Remove a class and all the data objects associated with it based on its name. More...
 
void Clear ()
 Remove all labels (and their associated data) from the sample list. More...
 
void MergeClasses (int fromIndex, int toIndex)
 Merge two classes into one class. More...
 
void MergeClasses (const LabelType &fromLabel, const LabelType &toLabel)
 Merge two classes into one class. More...
 

Additional Inherited Members

- Public Types inherited from LabelInfoCollection< ImageRegressionLabelInfo >
using LabelType = typename ImageRegressionLabelInfo ::LabelType
 Type of the labels.
 

Detailed Description

Collection of regression information inside a regression sample list.

Member Function Documentation

◆ Add()

void Add ( const std::vector< float > &  label,
const Image srcImage,
Point2D< int >  extractionLocation,
SampleExtractionMode  mode = SampleExtractionMode::TopLeftCorner 
)
inline

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
[in]labelLabel of the new class.
[in]srcImageImage from which to extract the first sample for the new class.
[in]extractionLocationLocation 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.
Parameters
[in]modeInterpretation hint for the extractionLocation parameter.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ HasValue()

bool HasValue ( const std::vector< float > &  label)
inline

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

Parameters
[in]labelValue to test for.
Returns
True if an entry with the specified value already exists, false otherwise.
Exceptions
Anyexception derived from std::exception including CvbException.