CVB.Net 14.0
TrainingSet.ModelInfo Class Reference

InstanceInformation that has been added to a training set. More...

Inherits TrainingSet.TrainingSetObject.

Public Member Functions

override bool Equals (object obj)
 Compare a ModelInformation object versus anything else. More...
 
unsafe override int GetHashCode ()
 Build a sensible hash value from the native handle. More...
 
unsafe SearchResult[] CheckConsistency (ImageInfo trainingSetImage, double threshold, double density)
 Test the image referenced by trainingSetImage for instances of this model that might have been forgotten during the training process. More...
 
unsafe SearchResult[] CheckConsistency (double threshold, double density)
 Test all images in the parent training set for instances of this model that might have been forgotten during the training process. More...
 
void GetMaxFeatureWindow (out int left, out int top, out int right, out int bottom)
 Retrieve the maximum values that may be set as feature window for this model. The maximum range is calculated based on the actual locations of the model's instances inside the training set images (i.e. on their distance to the image borders...). The minimum value in each direction is of course 0. More...
 
Rect GetMaxFeatureWindow ()
 Retrieve the maximum values that may be set as feature window for this model. The maximum range is calculated based on the actual locations of the model's instances inside the training set images (i.e. on their distance to the image borders...). The minimum value in each direction is of course 0. More...
 
Rect GetExtractableArea (ImageInfo img)
 Determine the maximum area from which an instance of this model may be extracted from a given training set image. More...
 

Static Public Member Functions

static bool operator== (ModelInfo lhs, ModelInfo rhs)
 Comparison operator for instance information objects. More...
 
static bool operator!= (ModelInfo lhs, ModelInfo rhs)
 Comparison operator for instance information objects. More...
 

Protected Member Functions

override int GetIndex ()
 Index of this MTS instance inside the training set More...
 
override Image CreateImageRepresentation ()
 Creates the image used for representing this object. More...
 
abstract int GetIndex ()
 Method through which the inherited classes retrieve the index this object has in its "master" collection underneath the TrainingSet. More...
 
abstract Image CreateImageRepresentation ()
 Creates the image used for representing this object. More...
 

Properties

unsafe string Name [get, set]
 Gets or sets the name of the model. More...
 
Point2Dd AdvanceVector [get, set]
 Advance vector associated with this model. More...
 
Rect FeatureWindow [get, set]
 Gets or sets the feature window for a Minos Training Set model. More...
 
Point2Dd Origin [get, set]
 Gets or sets the origin of the model in terms of coordinates inside the feature window More...
 
ModelInstanceInfoCollection Instances [get]
 The instances belonging to this model. More...
 
- Properties inherited from TrainingSet.TrainingSetObject
int Index [get]
 Index of this object in the parent's collection. More...
 
Image Image [get]
 Image representation of this object. More...
 

Additional Inherited Members

- Protected Attributes inherited from TrainingSet.TrainingSetObject
readonly IntPtr collectionParent_
 Native handle to the parent of the collection (which is not necessarily the training set!)
 

Detailed Description

InstanceInformation that has been added to a training set.

Member Function Documentation

◆ CheckConsistency() [1/2]

unsafe SearchResult[] CheckConsistency ( double  threshold,
double  density 
)

Test all images in the parent training set for instances of this model that might have been forgotten during the training process.

Parameters
thresholdcorrelation threshold to be used for the consistency check
densitydensity to be used for the consistency check
Returns
potentially forgotten positive samples that may be added to the training set
Exceptions
ObjectDisposedExceptionIf the training set has already been disposed
ArgumentOutOfRangeExceptionIf invalid values for threshold or density have been passed (both parameters must be within the range [0...1.0]
CvbExceptionIf the execution of the consistency check failed

◆ CheckConsistency() [2/2]

unsafe SearchResult[] CheckConsistency ( ImageInfo  trainingSetImage,
double  threshold,
double  density 
)

Test the image referenced by trainingSetImage for instances of this model that might have been forgotten during the training process.

Parameters
thresholdcorrelation threshold to be used for the consistency check
densitydensity to be used for the consistency check
trainingSetImagetraining set image on which to perform the consistency check
Returns
potentially forgotten positive samples that may be added to the training set
Exceptions
ObjectDisposedExceptionIf the training set has already been disposed
ArgumentOutOfRangeExceptionIf invalid values for threshold or density have been passed (both parameters must be within the range [0...1.0]
ArgumentNullExceptionIf the trainingSetImage argument was null
CvbExceptionIf the execution of the consistency check failed

◆ CreateImageRepresentation()

override Image CreateImageRepresentation ( )
protectedvirtual

Creates the image used for representing this object.

Returns
Image representing this object.

Implements TrainingSet.TrainingSetObject.

◆ Equals()

override bool Equals ( object  obj)

Compare a ModelInformation object versus anything else.

Parameters
objObject to compare to.
Returns
Comparison result.

◆ GetExtractableArea()

Rect GetExtractableArea ( ImageInfo  img)

Determine the maximum area from which an instance of this model may be extracted from a given training set image.

Parameters
imgTraining set image for which to query the extractable area.
Returns
Extractable area.
Exceptions
NullReferenceExceptionIf the input image is null
ObjectDisposedExceptionIf the input image or the parent Training Set has already been disposed.

◆ GetHashCode()

unsafe override int GetHashCode ( )

Build a sensible hash value from the native handle.

Returns
The hash code for this object.

◆ GetIndex()

override int GetIndex ( )
protectedvirtual

Index of this MTS instance inside the training set

Returns
index

Implements TrainingSet.TrainingSetObject.

◆ GetMaxFeatureWindow() [1/2]

Rect GetMaxFeatureWindow ( )

Retrieve the maximum values that may be set as feature window for this model. The maximum range is calculated based on the actual locations of the model's instances inside the training set images (i.e. on their distance to the image borders...). The minimum value in each direction is of course 0.

Returns
Maximum feature window extent.

◆ GetMaxFeatureWindow() [2/2]

void GetMaxFeatureWindow ( out int  left,
out int  top,
out int  right,
out int  bottom 
)

Retrieve the maximum values that may be set as feature window for this model. The maximum range is calculated based on the actual locations of the model's instances inside the training set images (i.e. on their distance to the image borders...). The minimum value in each direction is of course 0.

Parameters
leftmaximum possible value for the left edge of the feature window
topmaximum possible value for the top edge of the feature window
rightmaximum possible value for the right edge of the feature window
bottommaximum possilbe value for the bottom edge of the feature window

◆ operator!=()

static bool operator!= ( ModelInfo  lhs,
ModelInfo  rhs 
)
static

Comparison operator for instance information objects.

Parameters
lhsobject to compare
rhsobject to compare
Returns
false if the two objects refer to the same instance

◆ operator==()

static bool operator== ( ModelInfo  lhs,
ModelInfo  rhs 
)
static

Comparison operator for instance information objects.

Parameters
lhsobject to compare
rhsobject to compare
Returns
true if the two objects refer to the same instance

Property Documentation

◆ AdvanceVector

Point2Dd AdvanceVector
getset

Advance vector associated with this model.

Exceptions
ObjectDisposedExceptionIf the training set has already been disposed

◆ FeatureWindow

Rect FeatureWindow
getset

Gets or sets the feature window for a Minos Training Set model.

Exceptions
ObjectDisposedExceptionIf the training set has already been disposed
ArgumentExceptionwhen trying to set a feature window that is not compatible with the geometry of the already trained models and the training set images

◆ Instances

The instances belonging to this model.

Exceptions
ObjectDisposedExceptionIf the training set has already been disposed

◆ Name

unsafe string Name
getset

Gets or sets the name of the model.

Note that model names are not required to be unique for Minos! However, if you give two models the same name, there will be no way to determine to which specific model of a class with more than one model a result reported by a Minos classifier belongs.

Exceptions
ObjectDisposedExceptionIf the training set has already been disposed
ArgumentNullExceptionwhen trying to set a null string
ArgumentExceptionwhen trying to set an empty string or if the string contains an unmappable unicode character

◆ Origin

Point2Dd Origin
getset

Gets or sets the origin of the model in terms of coordinates inside the feature window

Exceptions
ObjectDisposedExceptionIf the training set has already been disposed