CVB++ 14.0
ModelInfo Class Reference

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

#include <cvb/minos/training_set.hpp>

Public Member Functions

int Index () const
 Index of this object in the parent's collection. More...
 
std::unique_ptr< class ImageImage () const
 Image representation of this object. More...
 
String Name () const
 Get the name of the model. More...
 
void SetName (const String &name)
 Set the name of the model. More...
 
Point2D< double > AdvanceVector () const
 Get the advance vector associated with this model. More...
 
void SetAdvanceVector (Point2D< double > advanceVector)
 Set the advance vector associated with this model. More...
 
Rect< int > FeatureWindow () const
 Get the feature window for this model. More...
 
void SetFeatureWindow (Rect< int > featureWindow)
 Set the feature window for this model. More...
 
Point2D< double > Origin () const
 Get the origin of the model in terms of coordinates inside the feature window. More...
 
void SetOrigin (Point2D< double > origin)
 Set the origin of the model in terms of coordinates inside the feature window. More...
 
ModelInstanceInfoCollection Instances () const
 The instances belonging to this model. More...
 
std::vector< SearchResultCheckConsistency (const ImageInfo &trainingSetImage, double threshold, double density=1.0)
 Test the image referenced by trainingSetImage for instances of this model that might have been forgotten during the training process. More...
 
std::vector< SearchResultCheckConsistency (double threshold, double density=1.0)
 Test all images in the parent training set for instances of this model that might have been forgotten during the training process. More...
 
Rect< int > GetMaxFeatureWindow () const
 Retrieve the maximum values that may be set as feature window for this model. More...
 
Rect< int > GetExtractableArea (const ImageInfo &image) const
 Determine the maximum area from which an instance of this model may be extracted from a given training set image. More...
 
void * Handle () const noexcept
 Classic API MTSMODEL handle. More...
 

Detailed Description

Model that has been added to a training set.

Member Function Documentation

◆ AdvanceVector()

Point2D< double > AdvanceVector ( ) const
inline

Get the advance vector associated with this model.

Returns
The model advance vector.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CheckConsistency() [1/2]

std::vector< SearchResult > CheckConsistency ( const ImageInfo trainingSetImage,
double  threshold,
double  density = 1.0 
)
inline

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

Parameters
[in]trainingSetImageTraining set image on which to perform the consistency check.
[in]thresholdCorrelation threshold to be used for the consistency check.
[in]densityDensity to be used for the consistency check.
Returns
Potentially forgotten positive samples that may be added to the training set.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CheckConsistency() [2/2]

std::vector< SearchResult > CheckConsistency ( double  threshold,
double  density = 1.0 
)
inline

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

Parameters
[in]thresholdCorrelation threshold to be used for the consistency check.
[in]densityDensity to be used for the consistency check.
Returns
Potentially forgotten positive samples that may be added to the training set.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FeatureWindow()

Rect< int > FeatureWindow ( ) const
inline

Get the feature window for this model.

Returns
The model feature window.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetExtractableArea()

Rect< int > GetExtractableArea ( const ImageInfo image) const
inline

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

Parameters
[in]imageTraining set image for which to query the extractable area.
Returns
Extractable area.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetMaxFeatureWindow()

Rect< int > GetMaxFeatureWindow ( ) const
inline

Retrieve the maximum values that may be set as feature window for this model.

Returns
Maximum feature window extent.
Exceptions
Anyexception derived from std::exception including CvbException.

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.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Classic API MTSMODEL handle.

Returns
Classic API handle.
Exceptions
Doesnot throw any exception.

It is normally not necessary to work with this handle.

◆ Image()

std::unique_ptr< class Image > Image ( ) const
inline

Image representation of this object.

Returns
Image representation.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Index()

int Index ( ) const
inline

Index of this object in the parent's collection.

Returns
Index in the collection.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Instances()

ModelInstanceInfoCollection Instances ( ) const
inline

The instances belonging to this model.

Returns
The instance info collection.
Exceptions
Anyexception derived from std::exception including CvbException.

The collection keeps internal link to the classifier, shares resources with it and stays valid even if the classifier object itself gets destroyed.

◆ Name()

String Name ( ) const
inline

Get the name of the model.

Returns
The model name.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Origin()

Point2D< double > Origin ( ) const
inline

Get the origin of the model in terms of coordinates inside the feature window.

Returns
The model origin.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetAdvanceVector()

void SetAdvanceVector ( Point2D< double >  advanceVector)
inline

Set the advance vector associated with this model.

Parameters
[in]advanceVectorThe model advance vector.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetFeatureWindow()

void SetFeatureWindow ( Rect< int >  featureWindow)
inline

Set the feature window for this model.

Parameters
[in]featureWindowThe model feature window.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetName()

void SetName ( const String name)
inline

Set the name of the model.

Parameters
[in]nameThe model name.
Exceptions
Anyexception derived from std::exception including CvbException.

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.

◆ SetOrigin()

void SetOrigin ( Point2D< double >  origin)
inline

Set the origin of the model in terms of coordinates inside the feature window.

Parameters
[in]originThe model origin.
Exceptions
Anyexception derived from std::exception including CvbException.