A Minos Training Set from which a classifier can be generated. More...
Inherits INativeHandle.
Classes | |
class | ImageInfo |
Image that has been added to a training set. More... | |
class | ImageInfoCollection |
Class that maintains the collection of Training Images inside a Minos Training Set. More... | |
class | ImageInstanceInfoCollection |
Instance information collection that is attached to a training set image. More... | |
class | InstanceInfo |
InstanceInformation that has been added to a training set. More... | |
class | InstanceInfoCollection |
Class that maintains the collection of Training Images inside a Minos Training Set. More... | |
class | ModelInfo |
InstanceInformation that has been added to a training set. More... | |
class | ModelInfoCollection |
ModelInformationCollection class that aggregates the collection of Models inside a Minos Training Set. More... | |
class | ModelInstanceInfoCollection |
Instance information collection that is attached to a training set model. More... | |
class | TrainingSetObject |
Base class for all objects that can be inside a training set. More... | |
class | TrainingSetObjectInfoCollection |
Additional inheritance level of the InformationCollection object from the Image Manager wrapper that specifies stronger constraints on the TInfo generic parameter More... | |
Public Member Functions | |
TrainingSet () | |
Create an empty training set. More... | |
TrainingSet (string fileName) | |
Load a saved training set from a file. More... | |
TrainingSet (byte[] buffer) | |
TrainingSet (byte[] buffer, int offset, int size) | |
Recreate a serialized Minos training set from a byte array. More... | |
TrainingSet | Transform (Matrix2D transformation) |
Generate a new training set by transforming this training set with a 2x2 transformation matrix. More... | |
void | Save (string fileName) |
Write the training set to a file. 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 | Dispose () |
Dispose function to get rid of resources allocated by this object. | |
override int | GetHashCode () |
Retrieve a hash code for this object. More... | |
override bool | Equals (object obj) |
Check two TrainingSet objects for equality. More... | |
Protected Member Functions | |
virtual void | OnImageAdded (ImageInfo img) |
Event router for the ImageAdded event. More... | |
virtual void | OnImageRemoved (ImageRemovedEventArgs args) |
Event router for the ImageRemoved event. More... | |
virtual void | OnModelAdded (ModelInfo mdl) |
Event router for the ModelAdded event. More... | |
virtual void | OnModelRemoved (ModelRemovedEventArgs args) |
Event router for the ModelRemoved event. More... | |
virtual void | OnInstanceAdded (InstanceInfo mdl) |
Event router for the InstanceAdded event. More... | |
virtual void | OnInstanceRemoved (InstanceRemovedEventArgs args) |
Event router for the InstanceRemoved event. More... | |
virtual void | Dispose (bool disposing) |
IDispose helper function. More... | |
Properties | |
int | ClassCount [get] |
The number of identifiable classes inside this training set. More... | |
InstanceInfoCollection | Instances [get] |
The instances contained in this training set. More... | |
int | InstancesTotal [get] |
Total number of instances currently trained in this training set. | |
ImageInfoCollection | Images [get] |
The images contained in this training set. More... | |
ModelInfoCollection | Models [get] |
The models contained in this training set. More... | |
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... | |
bool | IsModified [get, set] |
Get or sets a flag that informs about unsaved modifications to the training set. Saving the training set will set this flag to false. More... | |
Rect | Extent [get] |
Extent of the classes in the training set relative to the anchor point. More... | |
Rect | LastFeatureWindow [get] |
Feature window of the last model that has been created for the training set. More... | |
unsafe string | Comment [get, set] |
Comment assigned to the training set. More... | |
double | ExpectationRadius [get, set] |
Expectation radius is the radius that is searched for the best occurrence of a sample when adding a new sample to the training set. More... | |
double | CorrelationThreshold [get, set] |
Correlation threshold is the correlation value below which Minos will suggest the generation of a new model rather over the generation of a new instance of an existing model with which the new instance correlates poorly. More... | |
IntPtr | Handle [get] |
Native Minos training set handle. More... | |
bool | IsDisposed [get] |
Tests if the native handle has already been disposed. | |
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. | |
Events | |
EventHandler< ConsistencyCheckEventArgs > | ConsistencyCheckProgress |
This event will be used for indicating progress of consistency checks triggered by a call to CheckConsistency. | |
EventHandler< ImageAddedEventArgs > | ImageAdded |
Event that will be raised when a new image has been added to the training set. | |
EventHandler< ImageRemovedEventArgs > | ImageRemoved |
Event that will be raised when an image has been removed from the training set. Note that removing an image usually also means that a number of instances (the instances that were marked on the removed image) have been removed as well, but the if the reason for the removal of these instances was the removal of an image, there will be no notification event for the implicitly removed instances. Likewise, the removal of an image may also trigger the removal of a model. Again, there will be no separate notification about this if the reason was the removal of an image. This means that to be on the safe side, it usually makes sense to update the model and instance views as well, if an image has been removed. | |
EventHandler< ModelAddedEventArgs > | ModelAdded |
Event that will be raised when a new model has been added to the training set. | |
EventHandler< ModelRemovedEventArgs > | ModelRemoved |
Event that will be raised when an image has been removed from the training set. Note that removing an image usually also means that a number of instances (the instances that were marked on the removed image) have been removed as well, but the if the reason for the removal of these instances was the removal of an image, there will be no notification event for the implicitly removed instances. Likewise, the removal of an image may also trigger the removal of a model. Again, there will be no separate notification about this if the reason was the removal of an image. This means that to be on the safe side, it usually makes sense to update the model and instance views as well, if an image has been removed. | |
EventHandler< InstanceAddedEventArgs > | InstanceAdded |
Event that will be raised when a new model has been added to the training set. | |
EventHandler< InstanceRemovedEventArgs > | InstanceRemoved |
Event that will be raised when an image has been removed from the training set. Note that removing an image usually also means that a number of instances (the instances that were marked on the removed image) have been removed as well, but the if the reason for the removal of these instances was the removal of an image, there will be no notification event for the implicitly removed instances. Likewise, the removal of an image may also trigger the removal of a model. Again, there will be no separate notification about this if the reason was the removal of an image. This means that to be on the safe side, it usually makes sense to update the model and instance views as well, if an image has been removed. | |
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... | |
A Minos Training Set from which a classifier can be generated.
TrainingSet | ( | ) |
Create an empty training set.
OutOfMemoryException | If a new training set could not be allocated |
TrainingSet | ( | string | fileName | ) |
Load a saved training set from a file.
fileName | name of the file to be loaded |
FileNotFoundException | If the training set file does not exist |
FileLoadException | If loading an existing training set file failed |
ArgumentNullException | If fileName is null |
TrainingSet | ( | byte[] | buffer | ) |
Recreate a serialized Minos Training Set from a byte array.
buffer | byte array from which to create the training set. |
TrainingSet | ( | byte[] | buffer, |
int | offset, | ||
int | size | ||
) |
Recreate a serialized Minos training set from a byte array.
buffer | Byte array from which to create the training set |
offset | offset at which to start |
size | number of bytes to use |
ArgumentNullException | If buffer is null |
ArgumentException | If offset is less than zero or size is less than zero |
ArgumentOutOfRangeException | If offset and size have values that together exceed the length of buffer |
InvalidDataException | If buffer does not contain a deserializable Minos training set at the given offset. |
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.
threshold | correlation threshold to be used for the consistency check |
density | density to be used for the consistency check |
ObjectDisposedException | If the training set has already been disposed |
ArgumentOutOfRangeException | If invalid values for threshold or density have been passed (both parameters must be within the range [0...1.0] |
CvbException | If the execution of the consistency check failed |
|
protectedvirtual |
IDispose helper function.
disposing | true when called via IDisposable.Dispose, false when called by the finalizer. |
override bool Equals | ( | object | obj | ) |
Check two TrainingSet objects for equality.
obj | other object to check |
ObjectDisposedException | If this training set has already been disposed |
override int GetHashCode | ( | ) |
Retrieve a hash code for this object.
|
protectedvirtual |
Event router for the ImageAdded event.
img |
|
protectedvirtual |
Event router for the ImageRemoved event.
args |
|
protectedvirtual |
Event router for the InstanceAdded event.
mdl |
|
protectedvirtual |
Event router for the InstanceRemoved event.
args |
|
protectedvirtual |
Event router for the ModelAdded event.
mdl |
|
protectedvirtual |
Event router for the ModelRemoved event.
args |
void Save | ( | string | fileName | ) |
Write the training set to a file.
As a side effect this function sets the IsModified flag to false if the training set was saved successfully.
fileName |
ObjectDisposedException | If the training set has already been disposed |
ArgumentNullException | when fileName is null |
TrainingSet Transform | ( | Matrix2D | transformation | ) |
Generate a new training set by transforming this training set with a 2x2 transformation matrix.
transformation | matrix with which to transform the geometry of this training set |
ObjectDisposedException | If the training set has already been disposed |
DivideByZeroException | when providing a transformation matrix that is singular. |
|
get |
The number of identifiable classes inside this training set.
The number of classes cannot be higher than the number of trained models (see property this.Models.Count). If two models have the same name, the classifier can no longer discriminate these two models, reducing the ClassCount property.
ObjectDisposedException | If the training set has already been disposed |
|
getset |
Comment assigned to the training set.
ObjectDisposedException | If the training set has already been disposed |
|
getset |
Correlation threshold is the correlation value below which Minos will suggest the generation of a new model rather over the generation of a new instance of an existing model with which the new instance correlates poorly.
ObjectDisposedException | If the training set has already been disposed |
ArgumentOutOfRangeException | when trying to set a correlation threshold less than 0 or greater than 1 |
|
getset |
Expectation radius is the radius that is searched for the best occurrence of a sample when adding a new sample to the training set.
ObjectDisposedException | If the training set has already been disposed |
ArgumentOutOfRangeException | when trying to set an expectation radius less than 0 |
|
get |
Extent of the classes in the training set relative to the anchor point.
ObjectDisposedException | If the training set has already been disposed |
|
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).
ObjectDisposedException | If the training set has already been disposed |
|
get |
Native Minos training set 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.
|
get |
The images contained in this training set.
ObjectDisposedException | If the training set has already been disposed |
|
get |
The instances contained in this training set.
ObjectDisposedException | If the training set has already been disposed |
|
getset |
Get or sets a flag that informs about unsaved modifications to the training set. Saving the training set will set this flag to false.
ObjectDisposedException | If the training set has already been disposed |
|
get |
Feature window of the last model that has been created for the training set.
ObjectDisposedException | If the training set has already been disposed |
|
get |
The models contained in this training set.
ObjectDisposedException | If the training set has already been disposed |
NativeHandleEventDelegate 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.