CVB.Net 14.0
SampleRegressionImageList Class Reference

Classifier type that operates on images. More...

Inherits SampleImageList.

Classes

class  ImageRegressionInfoCollection
 Collection of regression information inside a regression sample list. More...
 
class  ImageRegressionLabelInfo
 Regression Label Information. More...
 

Public Member Functions

 SampleRegressionImageList (SampleListImageDataType imageDataType, int regressionDimension)
 Create a sample image list suitable for regression tasks. More...
 
SampleRegressionImageList Transform (DataTransformImageToImage dlg)
 Transform this Sample Image List into a new sample image list by transforming each sample inside it. More...
 
SampleRegressionImageList Transform (LabelTransformVectorToVector dlg)
 Transform this Sample Image List into a new sample image list by transforming each label inside it. More...
 
SampleClassificationImageList Transform (LabelTransformVectorToString dlg)
 Transform this Sample Image List into a new sample image list by transforming each label inside it. More...
 
ImageRegressionLabelInfo GetValueForSample (int sampleIndex)
 Retrieve the label information that goes with a given sample. More...
 
- Public Member Functions inherited from SampleImageList
void SetFeatureWindow (Point2D location, Size2D size, 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. More...
 
bool IsCompatible (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. More...
 
Image GetSampleImage (int sampleIndex)
 Retrieve an image by its overall sample index (ranging from 0 to NumSamples-1. More...
 
- Public Member Functions inherited from SampleList
delegate string LabelTransformStringToString (string labelIn)
 Delegate for label transformation. More...
 
delegate float[] LabelTransformStringToVector (string labelIn)
 Delegate for label transformation. More...
 
delegate float[] LabelTransformVectorToVector (float[] labelIn)
 Delegate for label transformation. More...
 
delegate string LabelTransformVectorToString (float[] labelIn)
 Delegate for label transformation. More...
 
delegate Image DataTransformImageToImage (Image imgIn)
 Image data transformation delegate. More...
 
void Dispose ()
 Dispose method that releases the classifier
 
void Save (string fileName)
 Save the Manto2 sample list to a file. More...
 

Static Public Attributes

const int RegressionDimensionMax = 16
 Maximum regression dimension to be used.
 

Properties

int RegressionDimension [get]
 Dimension of the regression labels used in this sample image list.
 
ImageRegressionInfoCollection Values [get]
 Class collection. More...
 
override Type LabelType [get]
 Type of the labels used by this SampleList.
 
- Properties inherited from SampleImageList
Fringes Fringes [get]
 Fringes (= size difference between the images and the feature window) of the sample images.
 
Size2D FeatureWindowSize [get]
 Size of the feature window.
 
Point2D FeatureWindowLocation [get]
 Location of the feature window (position of left top corner inside the image).
 
Point2D FeatureWindowOrigin [get]
 Location of the feature window origin in pixel coordinates measured from the left top corner of the feature window.
 
Size2D ImageSize [get]
 Size of the images (in pixels) that can be added to the image list.
 
int ImageDimension [get]
 Size of the images (in pixels) that can be added to the image list.
 
DataType ImageDataType [get]
 Data type of the images that can be added to the image list. (all planes must have same data type)
 
override Type SampleType [get]
 Type of the samples used by this SampleList.
 
- Properties inherited from SampleList
IntPtr Handle [get]
 Native Manto2 classifier handle. More...
 
bool IsDisposed [get]
 Tests if the native handle has already been disposed.
 
string FileName [get]
 Name of the file from which this image list was loaded (string.Empty if this image list was neither loaded nor saved since its construction). More...
 
string Comment [get, set]
 Classifier comment text. More...
 
DateTime CreationDate [get]
 Date on which the SampleList was created.
 
DateTime ModificationDate [get]
 Date on which the SampleList was last modified.
 
int NumClasses [get]
 Number of distinguishable classes in the sample list.
 
int NumSamples [get]
 Total number of samples in the sample list.
 
int MinSampleCount [get]
 Number samples in the smallest class of the sample list.
 
int MaxSampleCount [get]
 Number samples in the largest class of the sample list.
 
double AverageSampleCount [get]
 Average number samples in per class of the sample list.
 
abstract Type LabelType [get]
 Type of the labels used by this SampleList.
 
abstract Type SampleType [get]
 Type of the samples used by this SampleList.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Additional Inherited Members

- Static Public Member Functions inherited from SampleList
static SampleList FromFile (string fileName)
 Load a Manto2 sample list from disc. More...
 
- Protected Member Functions inherited from SampleImageList
void BaseInit ()
 Allows the inheritor to do a reinitialization of the base class parameters.
 
IntPtr CreateNativeImageData (Image srcImage, Point2D extractionLocation)
 Utility function for inheritors that creates a native image data object to be added to the SIL. Make sure to manually release the handle once it is no longer needed! More...
 
- Protected Member Functions inherited from SampleList
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 
abstract int LabelToIndex< TLabel > (TLabel label)
 Convert a class label to a class index. More...
 
bool ContainsLabel< TLabel > (TLabel label)
 Check if the sample list contains a given label... More...
 
void RemoveLabel (int index)
 Remove a label and all the data objects associated with it based on its index. More...
 
- Events inherited from SampleList
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

Classifier type that operates on images.

Constructor & Destructor Documentation

◆ SampleRegressionImageList()

SampleRegressionImageList ( SampleListImageDataType  imageDataType,
int  regressionDimension 
)

Create a sample image list suitable for regression tasks.

Parameters
imageDataTypeData type of the images to be added to the sample image list.
regressionDimensionDimension of the regression vector. Must be greater than 0 and less than or equal REGRESSIONDIMENSIONMAX.
Exceptions
ArgumentOutOfRangeExceptionIf the regressionDimension parameter is outside the range ]0...REGRESSIONDIMENSIONMAX]
OutOfMemoryExceptionIf the creation of the sample image list failed.

Member Function Documentation

◆ GetValueForSample()

ImageRegressionLabelInfo GetValueForSample ( int  sampleIndex)

Retrieve the label information that goes with a given sample.

Parameters
sampleIndexThe sample to retrieve the value for.
Returns
The regression label value for the sample referred to by sampleIndex .
Exceptions
ArgumentOutOfRangeExceptionif sampleIndex is outside the range [0...NumSamples-1].

◆ Transform() [1/3]

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

Parameters
dlgSample transformation delegate.
Returns
New sample list or null on error.

◆ Transform() [2/3]

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

Parameters
dlgLabel transformation delegate.
Returns
New sample list or null on error.

◆ Transform() [3/3]

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

Parameters
dlgLabel transformation delegate.
Returns
New sample list or null on error.

Property Documentation

◆ Values

Class collection.

Exceptions
ObjectDisposedExceptionIf the image list has already been disposed