Class that wraps a Manto SIL
More...
Inherits INativeHandle.
|
static Rect | GetTotalExtractionWindow (Size2D featureWindowSize, Point2D featureWindowOrigin, Point2D maxTranslation, Angle maxRotation) |
| Determine the total feature window parameters based on the current SIL parameters. The width and height of the Rect returned by this function are the minimum width and height of an image that can be passed into a sample image list created with the parameters passed into this function. More...
|
|
|
virtual void | Dispose (bool disposing) |
| IDispose helper function. More...
|
|
|
IntPtr | Handle [get] |
| Native Manto image list handle. More...
|
|
bool | IsDisposed [get] |
| Tests if the native handle has already been disposed.
|
|
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...
|
|
static Version | MantoVersion [get] |
| Schema version of the Manto.dll that is currently being used. You can compare this version versus the Version of a Sample Image List to find out whether saving the Sample Image List will potentially break backward compatibility.
|
|
Version | Version [get] |
| Schema version of the sample image. The schema version is usually determined by the most up-to-date version of Manto that has saved the image list. Note that when saving an image list with schema version x with a Manto that has schema version y > x then the schema version of the image list becomes y and older versions of Manto will no longer be able to read the list. More...
|
|
Image | MaskImage [get, set] |
| Mask image to be applied during learning a classifier. The mask image must have the same size as the feature window! More...
|
|
Angle | MaxRotation [get] |
| Maximum rotation possible for automatic sample generation (in degrees). More...
|
|
Point2D | MaxTranslation [get] |
| Maximum translation in X and Y direction for automatic sample generation. More...
|
|
ClassInformationCollection | Classes [get] |
| Class collection. More...
|
|
int | FeatureWindowDimension [get] |
| Dimension of the image list's feature window More...
|
|
Size2D | FeatureWindowSize [get] |
| Size of the image list's feature Window. More...
|
|
Point2D | FeatureWindowOrigin [get] |
| Origin of the feature window More...
|
|
int | ExcludedClassIndex [get, set] |
| Index of the currently excluded class. 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.
|
|
Class that wraps a Manto SIL
◆ SampleImageList() [1/3]
Constructor that loads an image List from a file.
- Parameters
-
fileName | name of the file from which to load the image list |
- Exceptions
-
ArgumentNullException | If fileName is null |
◆ SampleImageList() [2/3]
Copy Constructor for Sample image List
- Parameters
-
sourceList | List from which to copy |
- Exceptions
-
OutOfMemoryException | If the creation of the copy failed due to an out of memory condition |
◆ SampleImageList() [3/3]
Create a new and empty image list from scratch.
- Parameters
-
featureWindowSize | size of the feature window for that image list |
featureWindowDimension | dimension of the feature windows (number of planes) |
featureWindowOrigin | center of the feature window (relative to top left corner) |
maxTranslation | maximum translation parameter |
maxRotation | maximum rotation parameter |
- Exceptions
-
OutOfMemoryException | If the creation of the copy failed due to an out of memory condition |
◆ AddClassSample()
void AddClassSample |
( |
string |
name, |
|
|
Image |
image, |
|
|
Point2D |
position |
|
) |
| |
Add a new sample image to a class.
- Parameters
-
name | class to add the sample to. If the class does not yet exist, it will be generated |
image | image from which to take the sample |
position | position at which to extract the sample |
- Exceptions
-
ObjectDisposedException | If the image list or the image has already been disposed |
ArgumentNullException | If name or image is null |
InvalidOperationException | If name contains an empty string |
OutOfMemoryException | If the addition failed |
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDispose helper function.
- Parameters
-
disposing | true when called via IDisposable.Dispose, false when called by the finalizer. |
◆ GetTotalExtractionWindow() [1/2]
Rect GetTotalExtractionWindow |
( |
| ) |
|
Determine the total feature window parameters based on the current SIL parameters. The width and height of the Rect returned by this function are the minimum width and height of an image that can be passed into a sample image list created with the parameters passed into this function.
- Returns
- the total feature window of this SIL
◆ GetTotalExtractionWindow() [2/2]
Determine the total feature window parameters based on the current SIL parameters. The width and height of the Rect returned by this function are the minimum width and height of an image that can be passed into a sample image list created with the parameters passed into this function.
- Parameters
-
featureWindowSize | size of the feature window |
featureWindowOrigin | origin of the feature window |
maxTranslation | maximum translation |
maxRotation | maximum rotation |
- Returns
- the total feature window of a SIL created with the parameters passed
◆ MaximumExtractableRectangle()
Rect MaximumExtractableRectangle |
( |
Image |
image | ) |
|
Check how much of an image may be used for sample extraction
- Returns
- Rectangle or Rectangle.Empty
- Parameters
-
image | image for which to calculate the maximum extractable rectangle |
- Exceptions
-
ObjectDisposedException | If the image list or the image has already been disposed |
NullReferenceException | If image is null |
◆ Merge()
Merge the contents of mergeList into this sample image list.
If mergeList contains classes that are not present in this list, these classes will be added as necessary
- Parameters
-
mergeList | image list to be merged into this image list |
- Exceptions
-
ArgumentNullException | If mergeList is null |
ObjectDisposedException | If this image list or mergeList have already been disposed |
InvalidOperationException | If this image list and mergeList are not compatible |
◆ MergeClasses()
void MergeClasses |
( |
string |
nameA, |
|
|
string |
nameB, |
|
|
string |
nameMerged |
|
) |
| |
Merge two classes into a new class.
- Parameters
-
nameA | name of the first class |
nameB | name of the second class |
nameMerged | name of the merged class (may be identical to that of class A or class B, but not the name of another class in the image list! |
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
ArgumentNullException | If nameA , nameB or nameMerged is null |
ArgumentException | If nameA , nameB or nameMerged is empty |
InvalidOperationException | If nameMerged already exists in the image list |
◆ Save()
void Save |
( |
string |
fileName | ) |
|
Save the current contents of the image list to a file.
- Parameters
-
fileName | file to which to save |
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
ArgumentNullException | If the fileName parameter is null |
IOException | If saving the image list failed |
◆ Classes
Class collection.
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ ExcludedClassIndex
Index of the currently excluded class.
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
ArgumentOutOfRangeException | If the image list index is out of range. |
◆ FeatureWindowDimension
int FeatureWindowDimension |
|
get |
Dimension of the image list's feature window
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ FeatureWindowOrigin
Origin of the feature window
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ FeatureWindowSize
Size of the image list's feature Window.
- Exceptions
-
ObjectDisposedException | If the image list 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 image list 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.
◆ MaskImage
Mask image to be applied during learning a classifier. The mask image must have the same size as the feature window!
- Exceptions
-
ObjectDisposedException | If the image list or the mask image has already been disposed |
◆ MaxRotation
Maximum rotation possible for automatic sample generation (in degrees).
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ MaxTranslation
Maximum translation in X and Y direction for automatic sample generation.
- Exceptions
-
ObjectDisposedException | If the image list has already been disposed |
◆ Version
Schema version of the sample image. The schema version is usually determined by the most up-to-date version of Manto that has saved the image list. Note that when saving an image list with schema version x with a Manto that has schema version y > x then the schema version of the image list becomes y and older versions of Manto will no longer be able to read the list.
- Exceptions
-
ObjectDisposedException | If the image list or the mask image 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.