Base class for ShapeFinder classifiers.
More...
Inherits INativeHandle.
Inherited by Classifier, and Classifier.
|
| ClassifierObject (string fileName, string typeName) |
| Load a saved classifier from a file. More...
|
|
void | Dispose () |
| IDisposable implementation. More...
|
|
void | Transform (Matrix2D m) |
| Transform this ShapeFinder classifier using a 2x2 matrix. More...
|
|
void | Translate (Point2D offset) |
| Translate this classifier by a selectable offset . More...
|
|
void | Save (string fileName) |
| Write the classifier to a file. More...
|
|
Image | GetVisualization (int layer) |
| Create and return a color coded image representation of this ShapeFinder classifier. The colors in the output image correspond to the gradient directions, the positions to the displacement vectors. This visual representation might be useful during interactive supervision and debugging. More...
|
|
Image | GetVisualization () |
| Create and return a color coded image representation of this ShapeFinder classifier. The colors in the output image correspond to the gradient directions, the positions to the displacement vectors. This visual representation might be useful during interactive supervision and debugging. More...
|
|
|
virtual void | Dispose (bool disposing) |
| IDispose helper function. More...
|
|
|
IntPtr | Handle [get] |
| Native ShapeFinder2 classifier handle. More...
|
|
string | FileName [get] |
| Name of the file from which this classifier was loaded (string.Empty if this image list was neither loaded nor saved since its construction). More...
|
|
bool | IsDisposed [get] |
| Tests if the native handle has already been disposed.
|
|
unsafe string | Comment [get, set] |
| Comment assigned to the classifier. More...
|
|
GradientType | GradientType [get] |
| Gradient type this classifier uses for feature extraction. More...
|
|
Rect | FeatureWindow [get] |
| Feature window of this classifier (i.e. the bounding rectangle into which all the classifier's features fit) relative to the classifier's origin. More...
|
|
int | NumLayers [get] |
| Number of layers in the classifier (and in the accumulator generated by the search function). In ShapeFinder classifiers layers may be associated with specific classes or rotation information. In ShapeFinder2 the layer count is a purely informational value. More...
|
|
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.
|
|
Base class for ShapeFinder classifiers.
◆ ClassifierObject()
Load a saved classifier from a file.
- Parameters
-
fileName | name of the file to be loaded |
typeName | type name to be used for generating error messages |
- Exceptions
-
FileNotFoundException | If the classifier file does not exist |
FileLoadException | If loading an existing classifier file failed either because the file is unreadable or because it does not contain a ShapeFinder classifier of the correct type |
ArgumentNullException | If fileName is null |
◆ Dispose() [1/2]
IDisposable implementation.
Call this method to release the resources allocated by this object immediately. Remember that after calling Dispose, any subsequent access to references to this object will result in an ObjectDisposedException.
◆ Dispose() [2/2]
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDispose helper function.
- Parameters
-
disposing | true when called via IDisposable.Dispose, false when called by the finalizer. |
◆ GetVisualization() [1/2]
Image GetVisualization |
( |
| ) |
|
Create and return a color coded image representation of this ShapeFinder classifier. The colors in the output image correspond to the gradient directions, the positions to the displacement vectors. This visual representation might be useful during interactive supervision and debugging.
- Returns
- image representation of the selected classifier layer(s)
- Exceptions
-
ObjectDisposedException | If this classifier has already been disposed |
◆ GetVisualization() [2/2]
Image GetVisualization |
( |
int |
layer | ) |
|
Create and return a color coded image representation of this ShapeFinder classifier. The colors in the output image correspond to the gradient directions, the positions to the displacement vectors. This visual representation might be useful during interactive supervision and debugging.
- Parameters
-
layer | layer of the classifier to be visualized; a value of -1 superimposes all layers |
- Returns
- image representation of the selected classifier layer(s)
- Exceptions
-
ObjectDisposedException | If this classifier has already been disposed |
ArgumentOutOfRangeException | If the layer parameter exceeds the range [-1...NumLayers] |
◆ Save()
void Save |
( |
string |
fileName | ) |
|
Write the classifier to a file.
- Parameters
-
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
ArgumentNullException | when fileName is null |
◆ Transform()
Transform this ShapeFinder classifier using a 2x2 matrix.
- Parameters
-
m | matrix to transform the this classifier with |
- Exceptions
-
ObjectDisposedException | If this classifier has already been disposed |
◆ Translate()
Translate this classifier by a selectable offset .
- Parameters
-
offset | offset vector by which to translate the classifier |
- Exceptions
-
ObjectDisposedException | If this classifier has already been disposed |
◆ Comment
Comment assigned to the classifier.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ FeatureWindow
Feature window of this classifier (i.e. the bounding rectangle into which all the classifier's features fit) relative to the classifier's origin.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ FileName
Name of the file from which this classifier 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 |
◆ GradientType
Gradient type this classifier uses for feature extraction.
- Exceptions
-
ObjectDisposedException | If the classifier has already been disposed |
◆ Handle
Native ShapeFinder2 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.
◆ NumLayers
Number of layers in the classifier (and in the accumulator generated by the search function). In ShapeFinder classifiers layers may be associated with specific classes or rotation information. In ShapeFinder2 the layer count is a purely informational value.
- 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.