CVB.Net 14.0
SampleRegressionImageList.ImageRegressionInfoCollection Class Reference

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

Inherits SampleList.LabelInfoCollection< TLabelInformation, TData >.

Public Member Functions

unsafe void Add (float[] label, Image srcImage, Point2D extractionLocation, SampleExtractionMode mode=SampleExtractionMode.TopLeftCorner)
 Add a sample under a new value. If the value indicated by the label already exists the sample will be added to the existing label. More...
 
bool HasValue (float[] value)
 Check if a given value is already present in the values collection. More...
 
void Remove (float[] label)
 Remove all samples for a specific label. More...
 
void MergeClasses (float[] fromLabel, float[] toLabel)
 Merge two classes into one class. The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromLabel . More...
 
- Public Member Functions inherited from SampleList.LabelInfoCollection< TLabelInformation, TData >
void Clear ()
 Remove all labels (and their associated data) from the Sample List. More...
 
void Remove (int Index)
 Remove a class by Index. More...
 
void MergeClasses (int fromIndex, int toIndex)
 Merge two classes into one class. The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromIndex . More...
 
- Public Member Functions inherited from InfoCollection< SampleList, TLabelInformation >
TInfo[] ToArray ()
 Converts this collection into an array. More...
 

Protected Member Functions

override ImageRegressionLabelInfo GetInfo (int index)
 Parent class calls this method to extract one info object by index. More...
 
- Protected Member Functions inherited from SampleList.LabelInfoCollection< TLabelInformation, TData >
override int GetCount ()
 Parent class calls this method to determine the number of objects in the collection. More...
 
- Protected Member Functions inherited from InfoCollection< SampleList, TLabelInformation >
 InfoCollection (TParent parent)
 Constructor. More...
 
abstract int GetCount ()
 Function with which the collection queries the number of elements More...
 
abstract TInfo GetInfo (int index)
 Function with which the collection retrieves the information object with the given index. More...
 

Properties

ImageRegressionLabelInfo this[float[] label [get]
 Access a sample collection by label. More...
 
- Properties inherited from SampleList.LabelInfoCollection< TLabelInformation, TData >
TLabelInformation this[int index] [get]
 Index-based item access. More...
 
SampleList ParentList [get]
 SampleList object to which this class file object is bound
 
- Properties inherited from InfoCollection< SampleList, TLabelInformation >
int Count [get]
 Number of elements in the collection. More...
 
- Properties inherited from SampleList.ISampleListChild
SampleList ParentList [get]
 Object through which the native handle may be accessed.
 

Additional Inherited Members

- Protected Attributes inherited from InfoCollection< SampleList, TLabelInformation >
readonly TParent Parent
 Parent image reference helps keeping track of the lifetime and provides the information basis for index access
 

Detailed Description

Collection of regression information inside a regression sample list.

Member Function Documentation

◆ Add()

unsafe void Add ( float[]  label,
Image  srcImage,
Point2D  extractionLocation,
SampleExtractionMode  mode = SampleExtractionMode.TopLeftCorner 
)

Add a sample under a new value. If the value indicated by the label already exists the sample will be added to the existing label.

Parameters
labellabel of the new class.
srcImageImage from which to extract the first sample for the new class.
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.
modeInterpretation hint for the extractionLocation parameter.
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed.

◆ GetInfo()

override ImageRegressionLabelInfo GetInfo ( int  index)
protectedvirtual

Parent class calls this method to extract one info object by index.

Parameters
indexindex at which to extract
Returns
extracted object
Exceptions
ObjectDisposedExceptionIf the SampleImageList has already been disposed
ArgumentOutOfRangeExceptionIf the index is invalid

Implements InfoCollection< SampleList, TLabelInformation >.

◆ HasValue()

bool HasValue ( float[]  value)

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

Parameters
valueValue to test for.
Returns
True if an entry with the specified value already exists; false otherwise.

◆ MergeClasses()

void MergeClasses ( float[]  fromLabel,
float[]  toLabel 
)

Merge two classes into one class. The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromLabel .

Parameters
fromLabelClass to merge to the other classes.
toLabelClass to merge the samples to.

◆ Remove()

void Remove ( float[]  label)

Remove all samples for a specific label.

Parameters
labellabel to be removed from the data base

Property Documentation

◆ label

ImageRegressionLabelInfo this[float[] label
get

Access a sample collection by label.

Parameters
labelLabel to access
Returns