|
OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
|
Public Member Functions | |
| void | addItems (Mat features) |
| Add feature vectors to index. | |
| void | build () |
| Build the index. | |
| void | build (int trees) |
| Build the index. | |
| int | getItemNumber () |
| Return the number of feature vectors in the index. | |
| IntPtr | getNativeObjAddr () |
| int | getTreeNumber () |
| Return the number of trees in the index. | |
| void | knnSearch (Mat query, Mat indices, Mat dists, int knn) |
| Performs a K-nearest neighbor search for given query vector(s) using the index. | |
| void | knnSearch (Mat query, Mat indices, Mat dists, int knn, int search_k) |
| Performs a K-nearest neighbor search for given query vector(s) using the index. | |
| void | load (string filename) |
| Loads (mmaps) an index from disk. | |
| void | load (string filename, bool prefault) |
| Loads (mmaps) an index from disk. | |
| void | save (string filename) |
| Save the index to disk and loads it. After saving, no more vectors can be added. | |
| void | save (string filename, bool prefault) |
| Save the index to disk and loads it. After saving, no more vectors can be added. | |
| bool | setOnDiskBuild (string filename) |
| Prepare to build the index in the specified file instead of RAM (execute before adding items, no need to save after build) | |
| void | setSeed (int seed) |
| Initialize the random number generator with the given seed. Only necessary to pass this before adding the items. Will have no effect after calling build() or load(). | |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
| void | Dispose () |
| Releases resources used by this object. | |
| void | ThrowIfDisposed () |
| Throws ObjectDisposedException if this object has been disposed. | |
Static Public Member Functions | |
| static ANNIndex | __fromPtr__ (IntPtr addr) |
| static ANNIndex | create (int dim) |
| Creates an instance of annoy index class with given parameters. | |
| static ANNIndex | create (int dim, int distType) |
| Creates an instance of annoy index class with given parameters. | |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
| static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
| Returns the native pointer, or throws CoreModule.CvException if it is zero. | |
Static Public Attributes | |
| const int | DIST_ANGULAR = 2 |
| C++: enum Distance (cv.ANNIndex.Distance) | |
| const int | DIST_DOTPRODUCT = 4 |
| C++: enum Distance (cv.ANNIndex.Distance) | |
| const int | DIST_EUCLIDEAN = 0 |
| C++: enum Distance (cv.ANNIndex.Distance) | |
| const int | DIST_HAMMING = 3 |
| C++: enum Distance (cv.ANNIndex.Distance) | |
| const int | DIST_MANHATTAN = 1 |
| C++: enum Distance (cv.ANNIndex.Distance) | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
| DisposableOpenCVObject () | |
| Initializes a new instance with a zero native pointer and dispose enabled. | |
| DisposableOpenCVObject (bool isEnabledDispose) | |
| Initializes a new instance with a zero native pointer. | |
| DisposableOpenCVObject (IntPtr ptr) | |
| Initializes a new instance with the specified native pointer and dispose enabled. | |
| DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
| Initializes a new instance with the specified native pointer. | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
| DisposableObject () | |
| Initializes a new instance with dispose enabled. | |
| DisposableObject (bool isEnabledDispose) | |
| Initializes a new instance. | |
Additional Inherited Members | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
| bool | IsDisposed [get, protected set] |
| bool | IsEnabledDispose [get, set] |
*************************************************************************************\ Approximate Nearest Neighbors * ***************************************************************************************
|
static |
| void OpenCVForUnity.FeaturesModule.ANNIndex.addItems | ( | Mat | features | ) |
Add feature vectors to index.
| features | Matrix containing the feature vectors to index. The size of the matrix is num_features x feature_dimension. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.build | ( | ) |
Build the index.
| trees | Number of trees in the index. If not provided, the number is determined automatically in a way that at most 2x as much memory as the features vectors take is used. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.build | ( | int | trees | ) |
Build the index.
| trees | Number of trees in the index. If not provided, the number is determined automatically in a way that at most 2x as much memory as the features vectors take is used. |
|
static |
Creates an instance of annoy index class with given parameters.
| dim | The dimension of the feature vector. |
| distType | Metric to calculate the distance between two feature vectors, can be DIST_EUCLIDEAN, DIST_MANHATTAN, DIST_ANGULAR, DIST_HAMMING, or DIST_DOTPRODUCT. |
|
static |
Creates an instance of annoy index class with given parameters.
| dim | The dimension of the feature vector. |
| distType | Metric to calculate the distance between two feature vectors, can be DIST_EUCLIDEAN, DIST_MANHATTAN, DIST_ANGULAR, DIST_HAMMING, or DIST_DOTPRODUCT. |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.DisposableObject.
| int OpenCVForUnity.FeaturesModule.ANNIndex.getItemNumber | ( | ) |
Return the number of feature vectors in the index.
| IntPtr OpenCVForUnity.FeaturesModule.ANNIndex.getNativeObjAddr | ( | ) |
| int OpenCVForUnity.FeaturesModule.ANNIndex.getTreeNumber | ( | ) |
Return the number of trees in the index.
| void OpenCVForUnity.FeaturesModule.ANNIndex.knnSearch | ( | Mat | query, |
| Mat | indices, | ||
| Mat | dists, | ||
| int | knn ) |
Performs a K-nearest neighbor search for given query vector(s) using the index.
| query | The query vector(s). |
| indices | Matrix that will contain the indices of the K-nearest neighbors found, optional. |
| dists | Matrix that will contain the distances to the K-nearest neighbors found, optional. |
| knn | Number of nearest neighbors to search for. |
| search_k | The maximum number of nodes to inspect, which defaults to trees x knn if not provided. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.knnSearch | ( | Mat | query, |
| Mat | indices, | ||
| Mat | dists, | ||
| int | knn, | ||
| int | search_k ) |
Performs a K-nearest neighbor search for given query vector(s) using the index.
| query | The query vector(s). |
| indices | Matrix that will contain the indices of the K-nearest neighbors found, optional. |
| dists | Matrix that will contain the distances to the K-nearest neighbors found, optional. |
| knn | Number of nearest neighbors to search for. |
| search_k | The maximum number of nodes to inspect, which defaults to trees x knn if not provided. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.load | ( | string | filename | ) |
Loads (mmaps) an index from disk.
| filename | Filename of the index to be loaded. |
| prefault | If prefault is set to true, it will pre-read the entire file into memory (using mmap with MAP_POPULATE). Default is false. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.load | ( | string | filename, |
| bool | prefault ) |
Loads (mmaps) an index from disk.
| filename | Filename of the index to be loaded. |
| prefault | If prefault is set to true, it will pre-read the entire file into memory (using mmap with MAP_POPULATE). Default is false. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.save | ( | string | filename | ) |
Save the index to disk and loads it. After saving, no more vectors can be added.
| filename | Filename of the index to be saved. |
| prefault | If prefault is set to true, it will pre-read the entire file into memory (using mmap with MAP_POPULATE). Default is false. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.save | ( | string | filename, |
| bool | prefault ) |
Save the index to disk and loads it. After saving, no more vectors can be added.
| filename | Filename of the index to be saved. |
| prefault | If prefault is set to true, it will pre-read the entire file into memory (using mmap with MAP_POPULATE). Default is false. |
| bool OpenCVForUnity.FeaturesModule.ANNIndex.setOnDiskBuild | ( | string | filename | ) |
Prepare to build the index in the specified file instead of RAM (execute before adding items, no need to save after build)
| filename | Filename of the index to be built. |
| void OpenCVForUnity.FeaturesModule.ANNIndex.setSeed | ( | int | seed | ) |
|
static |
C++: enum Distance (cv.ANNIndex.Distance)
|
static |
C++: enum Distance (cv.ANNIndex.Distance)
|
static |
C++: enum Distance (cv.ANNIndex.Distance)
|
static |
C++: enum Distance (cv.ANNIndex.Distance)
|
static |
C++: enum Distance (cv.ANNIndex.Distance)