CVB++ 14.0
Cvb::Minos Namespace Reference

Namespace for the Minos package. More...

Classes

class  Classifier
 Minos classifier object. More...
 
class  ClassifierFactory
 Learner object that creates a classifier from an image list. More...
 
class  ClassifierModelInfo
 Information about a Minos classifier model. More...
 
class  ClassifierModelInfoCollection
 Collection of model information. More...
 
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
 Class that maintains the collection of Training Images inside a Minos Training Set. More...
 
class  InstanceInfo
 Instance information 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  InstanceInfoCollectionGeneric
 Class that maintains the collection of Training Images inside a Minos object. More...
 
class  LearnParameters
 The set of parameters, which controls, how a classifier is being learned from a training set. More...
 
class  ModelInfo
 Model that has been added to a training set. More...
 
class  ModelInfoCollection
 Class that maintains the collection of Training Images inside a Minos Training Set. More...
 
class  ModelInstanceInfoCollection
 Class that maintains the collection of Training Images inside a Minos Training Set. More...
 
class  SearchResult
 Search result returned by Minos. More...
 
class  TrainingSet
 A Minos Training Set from which a classifier can be generated. More...
 

Typedefs

using ClassifierPtr = std::shared_ptr< Classifier >
 Convenience shared pointer for Classifier.
 
using TrainingSetPtr = std::shared_ptr< TrainingSet >
 Convenience shared pointer for TrainingSet.
 

Enumerations

enum class  QualityFeedback { Unnormalized = CExports::Quality_Unnormalized , Normalized = CExports::Quality_ReturnCorrelation }
 Feedback type for search functions. More...
 
enum class  SearchMode { FindFirst , FindBest , FindBestSubPixel }
 Different modes for the search calls that return a single result. More...
 
enum class  ReadMode { ReturnFirstPosition , ReturnLastPosition }
 Options for the read functions. More...
 
enum class  KernelSize { Kernel2x2 = 2 , Kernel3x3 = 3 , Kernel4x4 = 4 , Kernel5x5 = 5 }
 Available kernel sizes for the filter functions exported by the Minos library. More...
 
enum class  FilterOrder { Order1st = 1 , Order2nd = 2 }
 Order of the ButterworthLowPass or ButterworthHighPass filter to be applied. More...
 

Functions

bool operator!= (const ClassifierModelInfo &lhs, const ClassifierModelInfo &rhs) noexcept
 Comparison operator for ClassifierModelInfo objects. More...
 
bool operator== (const ClassifierModelInfo &lhs, const ClassifierModelInfo &rhs) noexcept
 Comparison operator for ClassifierModelInfo objects. More...
 
std::vector< SearchResultSearchAllCorrelations (const ImagePlane &imagePlane, const ImagePlane &templatePlane, double threshold, int radius, Area2D aoi, double density=1.0)
 Find all correlation matches of the templatePlane in the imagePlane aoi. More...
 
std::vector< SearchResultSearchAllCorrelations (const ImagePlane &imagePlane, const ImagePlane &templatePlane, double threshold, int radius, double density=1.0)
 Find all correlation matches of the templatePlane in the imagePlane. More...
 
SearchResult SearchCorrelation (const ImagePlane &imagePlane, const ImagePlane &templatePlane, Area2D aoi, double density=1.0)
 Find the best correlation match of the templatePlane in the imagePlane aoi with sub-pixel accuracy. More...
 
SearchResult SearchCorrelation (const ImagePlane &imagePlane, const ImagePlane &templatePlane, double density=1.0)
 Find the best correlation match of the templatePlane in the imagePlane with sub-pixel accuracy. More...
 
std::unique_ptr< ImageLaplace (const Image &image)
 Apply a 3x3 Laplace filter to the input image. More...
 
std::unique_ptr< ImageSharpen (const Image &image)
 Apply a 3x3 sharpen filter to the input image. More...
 
std::unique_ptr< ImageDilate (const Image &image)
 Apply a 3x3 dilation filter to the input image. More...
 
std::unique_ptr< ImageErode (const Image &image)
 Apply a 3x3 erosion filter to the input image. More...
 
std::unique_ptr< ImageButterworthHighPass (const Image &image, double gain, int offset, double cutOff, FilterOrder order)
 Apply a Butterworth high pass filter to the image. More...
 
std::unique_ptr< ImageButterworthLowPass (const Image &image, double cutOff, FilterOrder order)
 Apply a Butterworth low pass filter to the image. More...
 
std::unique_ptr< ImageLowPass (const Image &image, KernelSize kernelSize)
 Apply a low pass filter to the input image. More...
 
std::unique_ptr< ImageEdge (const Image &image, KernelSize kernelSize)
 Apply an edge filter to the input image. More...
 
std::unique_ptr< ImagePyramid (const Image &image, KernelSize kernelSize)
 Apply a pyramid filter to the input image. More...
 
template<class RANGE >
TypedRange< std::unique_ptr< Image >, double, RANGE >::type UserFilter (const Image &image, KernelSize kernelSize, const RANGE &kernel)
 Apply a user-defined filter to the input image. More...
 
bool operator!= (const SearchResult &lhs, const SearchResult &rhs) noexcept
 Comparison operator for SearchResult objects. More...
 
bool operator== (const SearchResult &lhs, const SearchResult &rhs) noexcept
 Comparison operator for SearchResult objects. More...
 
bool operator== (const InstanceInfo &lhs, const InstanceInfo &rhs) noexcept
 Comparison operator for InstanceInfo objects. More...
 
bool operator!= (const InstanceInfo &lhs, const InstanceInfo &rhs) noexcept
 Comparison operator for InstanceInfo objects. More...
 
bool operator== (const ImageInfo &lhs, const ImageInfo &rhs) noexcept
 Comparison operator for ImageInfo objects. More...
 
bool operator!= (const ImageInfo &lhs, const ImageInfo &rhs) noexcept
 Comparison operator for ImageInfo objects. More...
 
bool operator== (const ModelInfo &lhs, const ModelInfo &rhs) noexcept
 Comparison operator for ModelInfo objects. More...
 
bool operator!= (const ModelInfo &lhs, const ModelInfo &rhs) noexcept
 Comparison operator for ModelInfo objects. More...
 

Detailed Description

Namespace for the Minos package.

Online Manual
Common Vision Blox-Tool Minos
Example
Minos/QmlMinos
Remarks
CMake users: Link to imported target CVB::CvbMinos

Enumeration Type Documentation

◆ FilterOrder

enum class FilterOrder
strong

Order of the ButterworthLowPass or ButterworthHighPass filter to be applied.

Enumerator
Order1st 

1st order filter.

Order2nd 

2nd order filter.

◆ KernelSize

enum class KernelSize
strong

Available kernel sizes for the filter functions exported by the Minos library.

Note that not all filters will work with all kernel sizes (see filter function description for a list) and some filters only work with a fixed kernel size in the Minos library. Note also that the Minos filters will only work on images with 8 bits per pixel input.

Enumerator
Kernel2x2 

Kernel with 2x2 elements.

Kernel3x3 

Kernel with 3x3 elements.

Kernel4x4 

Kernel with 4x4 elements.

Kernel5x5 

Kernel with 5x5 elements.

◆ QualityFeedback

enum class QualityFeedback
strong

Feedback type for search functions.

Enumerator
Unnormalized 

Unnormalized quality feedback in the range [0...255].

Normalized 

Normalized quality feedback from correlation over a classifier's features in the range [0..1].

◆ ReadMode

enum class ReadMode
strong

Options for the read functions.

Enumerator
ReturnFirstPosition 

Return the position of the first character.

ReturnLastPosition 

Return the position of the last character.

◆ SearchMode

enum class SearchMode
strong

Different modes for the search calls that return a single result.

Enumerator
FindFirst 

Stop after the first result has been found.

FindBest 

Search the whole region of interest and return the best result.

FindBestSubPixel 

Search the whole region of interest and return the best result with sub pixel accuracy.

Function Documentation

◆ ButterworthHighPass()

std::unique_ptr< Image > ButterworthHighPass ( const Image image,
double  gain,
int  offset,
double  cutOff,
FilterOrder  order 
)
inline

Apply a Butterworth high pass filter to the image.

Parameters
[in]imageImage to be filtered.
[in]gainGain to be applied to the frequency response.
[in]offsetOffset to be applied to the frequency response.
[in]cutOffCut off parameter of the Butterworth algorithm.
[in]orderOrder of the Butterworth filter to be used.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

◆ ButterworthLowPass()

std::unique_ptr< Image > ButterworthLowPass ( const Image image,
double  cutOff,
FilterOrder  order 
)
inline

Apply a Butterworth low pass filter to the image.

Parameters
[in]imageImage to be filtered.
[in]cutOffCut off parameter of the Butterworth algorithm.
[in]orderOrder of the Butterworth filter to be used.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

◆ Dilate()

std::unique_ptr< Image > Dilate ( const Image image)
inline

Apply a 3x3 dilation filter to the input image.

Parameters
[in]imageImage to be filtered.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Edge()

std::unique_ptr< Image > Edge ( const Image image,
KernelSize  kernelSize 
)
inline

Apply an edge filter to the input image.

Parameters
[in]imageImage to be filtered.
[in]kernelSizeKernel size to be used.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Edge filters are available with kernel sizes 2x2 and 3x3.

◆ Erode()

std::unique_ptr< Image > Erode ( const Image image)
inline

Apply a 3x3 erosion filter to the input image.

Parameters
[in]imageImage to be filtered.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Laplace()

std::unique_ptr< Image > Laplace ( const Image image)
inline

Apply a 3x3 Laplace filter to the input image.

Parameters
[in]imageImage to be filtered.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

An offset gray value of 128 is added to the result to reduce loss of information. Underflow and overflow gray values are truncated to 0 and 255 respectively.

◆ LowPass()

std::unique_ptr< Image > LowPass ( const Image image,
KernelSize  kernelSize 
)
inline

Apply a low pass filter to the input image.

Parameters
[in]imageImage to be filtered.
[in]kernelSizeKernel size to be used.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Low pass filters are available with kernel sizes 2x2, 3x3 and 5x5.

◆ operator!=() [1/5]

bool operator!= ( const ClassifierModelInfo lhs,
const ClassifierModelInfo rhs 
)
inlinenoexcept

Comparison operator for ClassifierModelInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs != rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator!=() [2/5]

bool operator!= ( const ImageInfo lhs,
const ImageInfo rhs 
)
inlinenoexcept

Comparison operator for ImageInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs == rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator!=() [3/5]

bool operator!= ( const InstanceInfo lhs,
const InstanceInfo rhs 
)
inlinenoexcept

Comparison operator for InstanceInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs == rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator!=() [4/5]

bool operator!= ( const ModelInfo lhs,
const ModelInfo rhs 
)
inlinenoexcept

Comparison operator for ModelInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs == rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator!=() [5/5]

bool operator!= ( const SearchResult lhs,
const SearchResult rhs 
)
inlinenoexcept

Comparison operator for SearchResult objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs != rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator==() [1/5]

bool operator== ( const ClassifierModelInfo lhs,
const ClassifierModelInfo rhs 
)
inlinenoexcept

Comparison operator for ClassifierModelInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs == rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator==() [2/5]

bool operator== ( const ImageInfo lhs,
const ImageInfo rhs 
)
inlinenoexcept

Comparison operator for ImageInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs != rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator==() [3/5]

bool operator== ( const InstanceInfo lhs,
const InstanceInfo rhs 
)
inlinenoexcept

Comparison operator for InstanceInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs != rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator==() [4/5]

bool operator== ( const ModelInfo lhs,
const ModelInfo rhs 
)
inlinenoexcept

Comparison operator for ModelInfo objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs != rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator==() [5/5]

bool operator== ( const SearchResult lhs,
const SearchResult rhs 
)
inlinenoexcept

Comparison operator for SearchResult objects.

Parameters
[in]lhsLeft hand side operand.
[in]rhsRight hand side operand.
Returns
True if lhs == rhs, false otherwise.
Exceptions
Doesnot throw any exception.

◆ Pyramid()

std::unique_ptr< Image > Pyramid ( const Image image,
KernelSize  kernelSize 
)
inline

Apply a pyramid filter to the input image.

Parameters
[in]imageImage to be filtered.
[in]kernelSizeKernel size to be used.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Pyramid filters are available with kernel sizes 3x3, 4x4 and 5x5.

◆ SearchAllCorrelations() [1/2]

std::vector< SearchResult > SearchAllCorrelations ( const ImagePlane imagePlane,
const ImagePlane templatePlane,
double  threshold,
int  radius,
Area2D  aoi,
double  density = 1.0 
)
inline

Find all correlation matches of the templatePlane in the imagePlane aoi.

Parameters
[in]imagePlaneImage plane in which to look for correlation matches.
[in]templatePlaneTemplate with which to look for correlation matches.
[in]densityScan density with which to look for correlation matches where 1.0 means scanning all pixels.
[in]thresholdMinimum correlation for the results to be reported.
[in]radiusMinimum distance between two positive results.
[in]aoiArea in which to look for correlation matches.
Returns
Extracted matches.
Exceptions
Anyexception derived from std::exception including CvbException.

If the number of results exceeds 32767, then the result list will be truncated at that number. The order of the results depends on the scan direction defined by the aoi.

◆ SearchAllCorrelations() [2/2]

std::vector< SearchResult > SearchAllCorrelations ( const ImagePlane imagePlane,
const ImagePlane templatePlane,
double  threshold,
int  radius,
double  density = 1.0 
)
inline

Find all correlation matches of the templatePlane in the imagePlane.

Parameters
[in]imagePlaneImage plane in which to look for correlation matches.
[in]templatePlaneTemplate with which to look for correlation matches.
[in]densityScan density with which to look for correlation matches where 1.0 means scanning all pixels.
[in]thresholdMinimum correlation for the results to be reported.
[in]radiusMinimum distance between two positive results.
Returns
Extracted matches.
Exceptions
Anyexception derived from std::exception including CvbException.

If the number of results exceeds 32767, then the result list will be truncated at that number. The order of the results is left/top to right/bottom.

◆ SearchCorrelation() [1/2]

SearchResult SearchCorrelation ( const ImagePlane imagePlane,
const ImagePlane templatePlane,
Area2D  aoi,
double  density = 1.0 
)
inline

Find the best correlation match of the templatePlane in the imagePlane aoi with sub-pixel accuracy.

Parameters
[in]imagePlaneImage plane in which to look for correlation matches.
[in]templatePlaneTemplate with which to look for correlation matches.
[in]densityScan density with which to look for correlation matches where 1.0 means scanning all pixels.
[in]aoiArea in which to look for correlation matches.
Returns
Best result that was detected (empty SearchResult if no match was found).
Exceptions
Anyexception derived from std::exception including CvbException.

The amount of sub pixel accuracy that may be achieved depends on the size of the template.

◆ SearchCorrelation() [2/2]

SearchResult SearchCorrelation ( const ImagePlane imagePlane,
const ImagePlane templatePlane,
double  density = 1.0 
)
inline

Find the best correlation match of the templatePlane in the imagePlane with sub-pixel accuracy.

Parameters
[in]imagePlaneImage plane in which to look for correlation matches.
[in]templatePlaneTemplate with which to look for correlation matches.
[in]densityScan density with which to look for correlation matches where 1.0 means scanning all pixels.
Returns
Best result that was detected (empty SearchResult if no match was found).
Exceptions
Anyexception derived from std::exception including CvbException.

The amount of sub pixel accuracy that may be achieved depends on the size of the template.

◆ Sharpen()

std::unique_ptr< Image > Sharpen ( const Image image)
inline

Apply a 3x3 sharpen filter to the input image.

Parameters
[in]imageImage to be filtered.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

◆ UserFilter()

TypedRange< std::unique_ptr< Image >, double, RANGE >::type UserFilter ( const Image image,
KernelSize  kernelSize,
const RANGE &  kernel 
)
inline

Apply a user-defined filter to the input image.

Parameters
[in]imageImage to be filtered.
[in]kernelSizeKernel size to be used.
[in]kernelKernel coefficients; the number of coefficients, that are needed depending on the kernelSize.
Returns
The filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

The convolution kernel may have the size 2x2, 3x3 or 5x5. The filter coefficients need to be specified as an array of double values passed as the kernel argument. Please note that although the kernel elements are of type double, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under- flow values will be truncated to 0 and 255 respectively. If too many kernel coefficients are given then any surplus coefficients will be ignored. The kernel coefficients should be passed as a 1D array with width * height elements starting in the top left corner of the filter mask and listing the elements line by line.