Base class for sample lists. Sample lists can serve two different purposes: Classification or Regression. For each case, a separate derived class has been implemented (SampleClassificationImageList and SampleRegressionImageList), while this class contains those elements that are common to both types of classifier.
More...
Inherits INativeHandle.
Inherited by SampleImageList.
|
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.
|
|
Base class for sample lists. Sample lists can serve two different purposes: Classification or Regression. For each case, a separate derived class has been implemented (SampleClassificationImageList and SampleRegressionImageList), while this class contains those elements that are common to both types of classifier.
◆ ContainsLabel< TLabel >()
bool ContainsLabel< TLabel > |
( |
TLabel |
label | ) |
|
|
protected |
Check if the sample list contains a given label...
- Parameters
-
label | Label to be checked. |
- Returns
- True if the label was found in the sample list, false otherwise.
- Template Parameters
-
◆ DataTransformImageToImage()
delegate Image DataTransformImageToImage |
( |
Image |
imgIn | ) |
|
Image data transformation delegate.
- Parameters
-
imgIn | Image to be transformed. |
- Returns
- Transformed image.
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDispose helper function.
- Parameters
-
disposing | true when called via IDisposable.Dispose, false when called by the finalizer. |
◆ FromFile()
Load a Manto2 sample list from disc.
- Parameters
-
fileName | File to load the sample list from. |
- Returns
- The loaded sample list object. Depending on the content of the file referred to by fileName the resulting SampleList can be cast to SampleRegressionImageList or SampleClassificationImageList after loading.
- Exceptions
-
FileNotFoundException | if the file referred to by fileName does not exist. |
FileLoadException | if loading the file referred to by fileName failed - probably due to incompatible file content. |
◆ LabelToIndex< TLabel >()
abstract int LabelToIndex< TLabel > |
( |
TLabel |
label | ) |
|
|
protectedpure virtual |
Convert a class label to a class index.
- Parameters
-
label | Label to be converted. |
- Returns
- Index of the label; -1 if the label is not found in the sample list.
- Template Parameters
-
◆ LabelTransformStringToString()
delegate string LabelTransformStringToString |
( |
string |
labelIn | ) |
|
Delegate for label transformation.
- Parameters
-
labelIn | Label to be transformed. |
- Returns
- Transformed label.
◆ LabelTransformStringToVector()
delegate float[] LabelTransformStringToVector |
( |
string |
labelIn | ) |
|
Delegate for label transformation.
- Parameters
-
labelIn | Label to be transformed. |
- Returns
- Transformed label.
◆ LabelTransformVectorToString()
delegate string LabelTransformVectorToString |
( |
float[] |
labelIn | ) |
|
Delegate for label transformation.
- Parameters
-
labelIn | Label to be transformed. |
- Returns
- Transformed label.
◆ LabelTransformVectorToVector()
delegate float[] LabelTransformVectorToVector |
( |
float[] |
labelIn | ) |
|
Delegate for label transformation.
- Parameters
-
labelIn | Label to be transformed. |
- Returns
- Transformed label.
◆ RemoveLabel()
void RemoveLabel |
( |
int |
index | ) |
|
|
protected |
Remove a label and all the data objects associated with it based on its index.
- Parameters
-
index | index of the label to be removed |
- Exceptions
-
ObjectDisposedException | If the sample list has already been disposed |
◆ Save()
void Save |
( |
string |
fileName | ) |
|
Save the Manto2 sample list to a file.
- Parameters
-
fileName | File name to save to. |
- Exceptions
-
ObjectDisposedException | If the object to be saved has already been disposed. |
◆ Comment
Classifier comment text.
- Exceptions
-
ObjectDisposedException | If the sample list has already been disposed |
◆ FileName
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).
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ Handle
Native Manto2 classifier handle.
It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.
Implements INativeHandle.
◆ ObjectDisposing
Raised when this object is about to be disposed via the IDisposable.Dispose method.
This event is raised right before this object is disposed. The dispose itself cannot be canceled.