Classifier type that operates on images. More...
#include <sample_classification_image_list.hpp>
Inherits SampleImageList.
Public Member Functions | |
| SampleRegressionImageList (const SampleListImageDataType &imageDataType, int regressionDimension) | |
| Create a sample image list suitable for regression tasks. | |
| SampleRegressionImageList (const String &fileName) | |
| Load a sample regression image from a file. | |
| int | RegressionDimension () const noexcept |
| Get the dimension of the regression labels used in this sample image list. | |
| ImageRegressionInfoCollectionPtr | Values () |
| Get the class collection. | |
| std::unique_ptr< SampleRegressionImageList > | Transform (DataTransformImageToImage transformCallback) const |
| Transform this sample image list into a new sample image list by transforming each sample inside it. | |
| std::unique_ptr< SampleRegressionImageList > | Transform (LabelTransformVectorToVector transformCallback) const |
| Transform this sample image list into a new sample image list by transforming each label inside it. | |
| std::unique_ptr< SampleClassificationImageList > | Transform (LabelTransformVectorToString transformCallback) const |
| Transform this sample image list into a new sample image list by transforming each label inside it. | |
| std::unique_ptr< ImageRegressionLabelInfo > | GetValueForSample (int sampleIndex) |
| Retrieve the label information that goes with a given sample. | |
Public Member Functions inherited from SampleImageList | |
| class Fringes | Fringes () const |
| Get fringes (= size difference between the images and the feature window) of the sample images. | |
| Size2D< int > | FeatureWindowSize () const |
| Size of the feature window. | |
| Point2D< int > | FeatureWindowLocation () const |
| Location of the feature window (position of left top corner inside the image). | |
| Point2D< int > | FeatureWindowOrigin () const |
| Location of the feature window origin in pixel coordinates measured from the left top corner of the feature window. | |
| Size2D< int > | ImageSize () const |
| Size of the images (in pixels) that can be added to the image list. | |
| int | ImageDimension () const |
| Dimension (# of planes) of the images that can be added to the image list. | |
| DataType | ImageDataType () const |
| Data type of the images that can be added to the image list (all planes must have same data type). | |
| void | SetFeatureWindow (Point2D< int > location, Size2D< int > size, Point2D< int > origin) |
| Redefine the feature window of the sample image list. | |
| bool | IsCompatible (const Image &img) const |
| 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. | |
| std::shared_ptr< Image > | GetSampleImage (int sampleIndex) const |
| Retrieve an image by its overall sample index (ranging from 0 to NumSamples()-1). | |
Public Member Functions inherited from SampleList | |
| void * | Handle () const noexcept |
| Classic API SIL handle. | |
| String | FileName () const |
| 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). | |
| String | Comment () const |
| Get the comment text. | |
| void | SetComment (String comment) |
| Set the comment text. | |
| std::chrono::system_clock::time_point | CreationDate () const |
| Date on which the sample list was created. | |
| std::chrono::system_clock::time_point | ModificationDate () const |
| Date on which the sample list was modified. | |
| int | NumClasses () const |
| Number of distinguishable classes in the sample list. | |
| int | NumSamples () const |
| Total number of samples in the sample list. | |
| int | MinSampleCount () const |
| Number samples in the smallest class of the sample list. | |
| int | MaxSampleCount () const |
| Number samples in the largest class of the sample list. | |
| double | AverageSampleCount () const |
| Average number samples in per class of the sample list. | |
| void | Save (const String &fileName) const |
| Save the sample list to a file. | |
Static Public Member Functions | |
| static std::unique_ptr< SampleRegressionImageList > | FromHandle (ReleaseObjectGuard &&guard, const String &fileName=String()) |
| Creates regression image list from a classic API handle. | |
Static Public Attributes | |
| static constexpr int | RegressionDimensionMax = 16 |
| Maximum regression dimension to be used. | |
Classifier type that operates on images.
|
inline |
Create a sample image list suitable for regression tasks.
| [in] | imageDataType | Data type of the images to be added to the sample image list. |
| [in] | regressionDimension | Dimension of the regression vector. Must be greater than 0 and less than or equal RegressionDimensionMax. |
| Any | exception derived from std::exception including CvbException. |
|
inlineexplicit |
Load a sample regression image from a file.
| [in] | fileName | Name of the file to be loaded. |
| Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates regression image list from a classic API handle.
| [in] | guard | Life time guard for C-API handle. |
| [in] | fileName | The file name. |
| Any | exception derived from std::exception including CvbException. |
The image list takes ownership of the handle, so you must share it before using this function.
|
inline |
Retrieve the label information that goes with a given sample.
| [in] | sampleIndex | Index of the sample to retrieve the value for. |
| Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Get the dimension of the regression labels used in this sample image list.
| Does | not throw any exception. |
|
inline |
Transform this sample image list into a new sample image list by transforming each sample inside it.
| [in] | transformCallback | Sample transformation callback. |
| Any | exception derived from std::exception including CvbException. |
| std::unique_ptr< SampleClassificationImageList > Transform | ( | LabelTransformVectorToString | transformCallback | ) | const |
Transform this sample image list into a new sample image list by transforming each label inside it.
| [in] | transformCallback | Label transformation callback. |
| Any | exception derived from std::exception including CvbException. |
|
inline |
Transform this sample image list into a new sample image list by transforming each label inside it.
| [in] | transformCallback | Label transformation callback. |
| Any | exception derived from std::exception including CvbException. |
|
inline |
Get the class collection.
| Any | exception derived from std::exception including CvbException. |