|
OpenCV for Unity 3.0.5
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.
|
LightGlue feature matcher. More...
Public Member Functions | |
| void | clearPairInfo () |
| Clears stored pair context information. | |
| int | getKeypointNormalization () |
| Returns the keypoint normalization, one of LightGlueNormalization. | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, in Vec2d queryImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, in Vec2d queryImageSize, in Vec2d trainImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, in(double width, double height) queryImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, in(double width, double height) queryImageSize, in(double width, double height) trainImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, Size queryImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| override void | setImagePairInfo (MatOfKeyPoint queryKpts, MatOfKeyPoint trainKpts, Size queryImageSize, Size trainImageSize) |
| Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo(). | |
| void | setKeypointNormalization (int normalization) |
| Selects how pixel keypoints passed with an image size are normalized. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, in Vec2d queryImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, in Vec2d queryImageSize, in Vec2d trainImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, in(double width, double height) queryImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, in(double width, double height) queryImageSize, in(double width, double height) trainImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, Size queryImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
| void | setPairInfo (Mat queryKpts, Mat trainKpts, Size queryImageSize, Size trainImageSize) |
| Sets the keypoint and image size context for the next match() call. | |
Public Member Functions inherited from OpenCVForUnity.FeaturesModule.DescriptorMatcher | |
| void | add (List< Mat > descriptors) |
| Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor collection. | |
| override void | clear () |
| Clears the train descriptor collections. | |
| DescriptorMatcher | clone () |
| Clones the matcher. | |
| DescriptorMatcher | clone (bool emptyTrainData) |
| Clones the matcher. | |
| override bool | empty () |
| Returns true if there are no train descriptors in the both collections. | |
| List< Mat > | getTrainDescriptors () |
| Returns a constant link to the train descriptor collection trainDescCollection . | |
| bool | isMaskSupported () |
| Returns true if the descriptor matcher supports masking permissible matches. | |
| void | knnMatch (Mat queryDescriptors, List< MatOfDMatch > matches, int k) |
| void | knnMatch (Mat queryDescriptors, List< MatOfDMatch > matches, int k, List< Mat > masks) |
| void | knnMatch (Mat queryDescriptors, List< MatOfDMatch > matches, int k, List< Mat > masks, bool compactResult) |
| void | knnMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, int k) |
| Finds the k best matches for each descriptor from a query set. | |
| void | knnMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, int k, Mat mask) |
| Finds the k best matches for each descriptor from a query set. | |
| void | knnMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, int k, Mat mask, bool compactResult) |
| Finds the k best matches for each descriptor from a query set. | |
| void | match (Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches) |
| Finds the best match for each descriptor from a query set. | |
| void | match (Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches, Mat mask) |
| Finds the best match for each descriptor from a query set. | |
| void | match (Mat queryDescriptors, MatOfDMatch matches) |
| void | match (Mat queryDescriptors, MatOfDMatch matches, List< Mat > masks) |
| void | radiusMatch (Mat queryDescriptors, List< MatOfDMatch > matches, float maxDistance) |
| void | radiusMatch (Mat queryDescriptors, List< MatOfDMatch > matches, float maxDistance, List< Mat > masks) |
| void | radiusMatch (Mat queryDescriptors, List< MatOfDMatch > matches, float maxDistance, List< Mat > masks, bool compactResult) |
| void | radiusMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, float maxDistance) |
| For each query descriptor, finds the training descriptors not farther than the specified distance. | |
| void | radiusMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, float maxDistance, Mat mask) |
| For each query descriptor, finds the training descriptors not farther than the specified distance. | |
| void | radiusMatch (Mat queryDescriptors, Mat trainDescriptors, List< MatOfDMatch > matches, float maxDistance, Mat mask, bool compactResult) |
| For each query descriptor, finds the training descriptors not farther than the specified distance. | |
| void | read (string fileName) |
| void | train () |
| Trains a descriptor matcher. | |
| void | write (string fileName) |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
| virtual string | getDefaultName () |
| IntPtr | getNativeObjAddr () |
| void | save (string filename) |
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 new LightGlueMatcher | __fromPtr__ (IntPtr addr) |
| static new LightGlueMatcher | create (string modelPath) |
| Creates LightGlueMatcher from a model file path. | |
| static LightGlueMatcher | create (string modelPath, float scoreThreshold) |
| Creates LightGlueMatcher from a model file path. | |
| static LightGlueMatcher | create (string modelPath, float scoreThreshold, int backend) |
| Creates LightGlueMatcher from a model file path. | |
| static LightGlueMatcher | create (string modelPath, float scoreThreshold, int backend, int target) |
| Creates LightGlueMatcher from a model file path. | |
| static LightGlueMatcher | create (string modelPath, float scoreThreshold, int backend, int target, int type) |
| Creates LightGlueMatcher from a model file path. | |
| static LightGlueMatcher | createFromMemory (MatOfByte modelData) |
| Creates LightGlueMatcher from in-memory model data. | |
| static LightGlueMatcher | createFromMemory (MatOfByte modelData, float scoreThreshold) |
| Creates LightGlueMatcher from in-memory model data. | |
| static LightGlueMatcher | createFromMemory (MatOfByte modelData, float scoreThreshold, int backend) |
| Creates LightGlueMatcher from in-memory model data. | |
| static LightGlueMatcher | createFromMemory (MatOfByte modelData, float scoreThreshold, int backend, int target) |
| Creates LightGlueMatcher from in-memory model data. | |
| static LightGlueMatcher | createFromMemory (MatOfByte modelData, float scoreThreshold, int backend, int target, int type) |
| Creates LightGlueMatcher from in-memory model data. | |
Static Public Member Functions inherited from OpenCVForUnity.FeaturesModule.DescriptorMatcher | |
| static new DescriptorMatcher | __fromPtr__ (IntPtr addr) |
| static DescriptorMatcher | create (int matcherType) |
| static DescriptorMatcher | create (string descriptorMatcherType) |
| Creates a descriptor matcher of a given type with the default parameters (using default constructor). | |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
| static Algorithm | __fromPtr__ (IntPtr addr) |
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. | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.FeaturesModule.DescriptorMatcher | |
Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
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. | |
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 | |
Static Public Attributes inherited from OpenCVForUnity.FeaturesModule.DescriptorMatcher | |
| const int | BRUTEFORCE = 2 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
| const int | BRUTEFORCE_HAMMING = 4 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
| const int | BRUTEFORCE_HAMMINGLUT = 5 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
| const int | BRUTEFORCE_L1 = 3 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
| const int | BRUTEFORCE_SL2 = 6 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
| const int | FLANNBASED = 1 |
| C++: enum MatcherType (cv.DescriptorMatcher.MatcherType) | |
Package Functions inherited from OpenCVForUnity.FeaturesModule.DescriptorMatcher | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
| bool | IsDisposed [get, protected set] |
| bool | IsEnabledDispose [get, set] |
LightGlue feature matcher.
LightGlue is an attention-based feature matcher, as described in [Lindenberger23] . It takes keypoint locations and descriptors from two images and directly predicts match pairs. Unlike traditional matchers that compute descriptor distances, LightGlue produces confidence scores for each potential match pair.
The matcher extends DescriptorMatcher and supports match() and knnMatch() with k=1. Context (keypoints and image sizes) must be provided via setPairInfo() or setImagePairInfo() before matching. radiusMatch() is not supported.
|
static |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.clearPairInfo | ( | ) |
Clears stored pair context information.
|
static |
Creates LightGlueMatcher from a model file path.
| modelPath | Path to the ONNX model file. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from a model file path.
| modelPath | Path to the ONNX model file. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from a model file path.
| modelPath | Path to the ONNX model file. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from a model file path.
| modelPath | Path to the ONNX model file. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from a model file path.
| modelPath | Path to the ONNX model file. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from in-memory model data.
| modelData | Buffer containing the model data. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from in-memory model data.
| modelData | Buffer containing the model data. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from in-memory model data.
| modelData | Buffer containing the model data. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from in-memory model data.
| modelData | Buffer containing the model data. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
static |
Creates LightGlueMatcher from in-memory model data.
| modelData | Buffer containing the model data. |
| scoreThreshold | Match confidence threshold. |
| backend | DNN backend |
| target | DNN target |
| type | Model variant: LG_ALIKED (default) or LG_DISK. |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
| int OpenCVForUnity.FeaturesModule.LightGlueMatcher.getKeypointNormalization | ( | ) |
Returns the keypoint normalization, one of LightGlueNormalization.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
|
virtual |
Convenience overload of setPairInfo() taking keypoints directly. Uses the same model-specific normalization and image size convention as setPairInfo().
Reimplemented from OpenCVForUnity.FeaturesModule.DescriptorMatcher.
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setKeypointNormalization | ( | int | normalization | ) |
Selects how pixel keypoints passed with an image size are normalized.
The default, LG_NORM_MODEL, keeps the per-axis mapping implied by the LightGlueType given at creation. LG_NORM_MAX_SIDE applies the mapping of the LightGlue reference implementation, which shifts by half the image size and divides both axes by half the longer side. Use it for models exported from the reference forward without their own normalization, e.g. XFeat's LighterGlue. For square images the two mappings coincide for LG_ALIKED.
The setting does not affect keypoints passed with an empty image size, and it is kept by clone().
| normalization | One of LightGlueNormalization. |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| in Vec2d | queryImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| in Vec2d | queryImageSize, | ||
| in Vec2d | trainImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| in(double width, double height) | queryImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| in(double width, double height) | queryImageSize, | ||
| in(double width, double height) | trainImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| Size | queryImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |
| void OpenCVForUnity.FeaturesModule.LightGlueMatcher.setPairInfo | ( | Mat | queryKpts, |
| Mat | trainKpts, | ||
| Size | queryImageSize, | ||
| Size | trainImageSize ) |
Sets the keypoint and image size context for the next match() call.
This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch(), or use setImagePairInfo(). Pixel coordinates are normalized according to the LightGlueType selected at creation, or as selected by setKeypointNormalization(). For keypoints already normalized for that model, leave the corresponding image size empty.
| queryKpts | Query image keypoints (Nx2 float matrix with x,y coordinates). |
| trainKpts | Train image keypoints (Nx2 float matrix with x,y coordinates). |
| queryImageSize | Size of the query image, or Size() for normalized query keypoints. |
| trainImageSize | Size of the train image, or Size() for normalized train keypoints. |