Manto classifier object.
More...
Inherits INativeHandle.
|
| Classifier (string fileName) |
| Constructor that loads a classifier from a file More...
|
|
void | Dispose () |
| Dispose method that releases the classifier
|
|
void | Save (string fileName) |
| Save the classifier to a file. More...
|
|
SearchResult[] | SearchAll (Image image, Rect aoi, bool useVote, double minConfidence, int locality, int granularity) |
| Search for all occurrences of a known class in an image. More...
|
|
SearchResult[] | SearchAll (Image image, Rect aoi, bool useVote, double minConfidence, int locality) |
| Search for all occurrences of a known class in an image. More...
|
|
SearchResult | Search (Image image, Rect aoi, bool useVote, double minConfidence, out Image accumulator) |
| Search for the result with the highest confidence. More...
|
|
SearchResult | Search (Image image, Rect aoi, bool useVote, double minConfidence) |
| Search for the result with the highest confidence. More...
|
|
|
virtual void | Dispose (bool disposing) |
| IDispose helper function. More...
|
|
◆ Classifier()
Constructor that loads a classifier from a file
- Parameters
-
fileName | file from which to load the classifier |
- Exceptions
-
FileNotFoundException | when the file specified by the fileName parameter does not exist |
FileLoadException | If the file specified by the fileName parameter exists, but cannot be loaded |
ArgumentNullException | If fileName is null |
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDispose helper function.
- Parameters
-
disposing | true when called via IDisposable.Dispose, false when called by the finalizer. |
◆ Save()
void Save |
( |
string |
fileName | ) |
|
Save the classifier to a file.
- Parameters
-
fileName | file to which to save |
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
ArgumentNullException | If the fileName parameter is null |
IOException | If saving the classifier failed |
◆ Search() [1/2]
Search for the result with the highest confidence.
- Parameters
-
image | image in which to search |
aoi | region of the image in which to search |
useVote | switch voting on or off (voting is a parameter that can allow for more precise class assignment when set to true, but setting voting to true will significantly increase the processing time) |
minConfidence | minimum confidence for the results to be reported; must not exceed the range [0...1] |
- Returns
- search result (SearchResult.Empty if nothing was found)
- Exceptions
-
ObjectDisposedException | If this classifier or the image has already been disposed |
ArgumentOutOfRangeException | If the minConfidence parameter exceeds the range [0..1] |
◆ Search() [2/2]
Search for the result with the highest confidence.
- Parameters
-
image | image in which to search |
aoi | region of the image in which to search |
useVote | switch voting on or off (voting is a parameter that can allow for more precise class assignment when set to true, but setting voting to true will significantly increase the processing time) |
minConfidence | minimum confidence for the results to be reported; must not exceed the range [0...1] |
accumulator | returns the accumulator built during the search operation; the accumulator may be useful for further result investigation |
- Returns
- search result (SearchResult.Empty if nothing was found)
- Exceptions
-
ObjectDisposedException | If this classifier or the image has already been disposed |
ArgumentOutOfRangeException | If the minConfidence parameter exceeds the range [0..1] |
ArgumentException | If the image is incompatible with the classifier or the aoi cannot hold one of the classifier's classes. |
◆ SearchAll() [1/2]
Search for all occurrences of a known class in an image.
- Parameters
-
image | image in which to search |
aoi | region of the image in which to search |
useVote | switch voting on or off (voting is a parameter that can allow for more precise class assignment when set to true, but setting voting to true will significantly increase the processing time) |
minConfidence | minimum confidence for the results to be reported; must not exceed the range [0...1] |
locality | separation of the search results in pixels (no two results should be closer to each other than the distance specified here) |
- Returns
- list of found results; might be empty if nothing was found, null if the search call failed
- Exceptions
-
ObjectDisposedException | If this classifier or the image has already been disposed |
ArgumentOutOfRangeException | If the minConfidence parameter exceeds the range [0..1] |
◆ SearchAll() [2/2]
SearchResult[] SearchAll |
( |
Image |
image, |
|
|
Rect |
aoi, |
|
|
bool |
useVote, |
|
|
double |
minConfidence, |
|
|
int |
locality, |
|
|
int |
granularity |
|
) |
| |
Search for all occurrences of a known class in an image.
- Parameters
-
image | image in which to search |
aoi | region of the image in which to search |
useVote | switch voting on or off (voting is a parameter that can allow for more precise class assignment when set to true, but setting voting to true will significantly increase the processing time) |
minConfidence | minimum confidence for the results to be reported; must not exceed the range [0...1] |
locality | separation of the search results in pixels (no two results should be closer to each other than the distance specified here) |
granularity | the granularity parameter may be used to simulate a shorter or longer preprocessing code, making the grid of points to be calculated for classification denser or thinner; -1 indicates that the default value should be used; note that the granularity parameter can have a huge impact on processing time - it is generally not recommended to use parameters other than -1 |
- Returns
- list of found results; might be empty if nothing was found, null if the search call failed
- Exceptions
-
ObjectDisposedException | If this classifier or the image has already been disposed |
ArgumentOutOfRangeException | If the minConfidence parameter exceeds the range [0..1] |
ArgumentException | If the image is incompatible with the classifier or the aoi cannot hold one of the classifier's classes. |
◆ Classes
Collection of classes in this classifier.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ Comment
Textual comment for the classifier.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ DecisionBoundary
Decision boundary setting that has been used for classifier generation.
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ ExcludedClassIndex
index of the currently excluded class.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
ArgumentOutOfRangeException | If the class index is out of range. |
◆ FeatureWindowDimension
int FeatureWindowDimension |
|
get |
Dimension of the classifier's feature window.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ FeatureWindowOrigin
Dimension of the classifier's feature window.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ FeatureWindowSize
Size of the classifier's feature window.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ FileName
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).
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ Handle
Native Manto classifier 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.
◆ PreprocessingCode
Retrieves the preprocessing code that has been used for generating this Manto classifier.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ 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.