Class cv::LightGlueMatcher#
LightGlue feature matcher. View details
#include <opencv2/features.hpp>Collaboration diagram for cv::LightGlueMatcher:
Public Types#
Public Types inherited from cv::DescriptorMatcher
Return |
Name |
Description |
|---|---|---|
Public Member Functions#
Public Member Functions inherited from cv::DescriptorMatcher
Return |
Name |
Description |
|---|---|---|
|
Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor collection. |
|
|
Clears the train descriptor collections. |
|
|
Clones the matcher. |
|
|
Returns true if there are no train descriptors in the both collections. |
|
|
Returns a constant link to the train descriptor collection trainDescCollection . |
|
|
Returns true if the descriptor matcher supports masking permissible matches. |
|
|
Finds the k best matches for each descriptor from a query set. |
|
|
||
|
Finds the best match for each descriptor from a query set. |
|
|
||
|
For each query descriptor, finds the training descriptors not farther than the specified distance. |
|
|
||
|
Reads algorithm parameters from a file storage. |
|
|
||
|
Trains a descriptor matcher. |
|
|
||
|
||
|
Stores algorithm parameters in a file storage. |
|
|
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::DescriptorMatcher
Return |
Name |
Description |
|---|---|---|
|
||
|
Creates a descriptor matcher of a given type with the default parameters (using default constructor). |
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::DescriptorMatcher
Return |
Name |
Description |
|---|---|---|
|
|
|
|
||
|
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Static Protected Member Functions inherited from cv::DescriptorMatcher
Return |
Name |
Description |
|---|---|---|
|
||
|
||
|
|
Protected Attributes inherited from cv::DescriptorMatcher
Detailed Description#
LightGlue feature matcher.
LightGlue is a CNN-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 uses attention mechanisms to produce confidence scores for each potential match pair.
The matcher extends DescriptorMatcher and supports the standard match(), knnMatch(), and radiusMatch() interfaces. Context (keypoints and image sizes) must be provided via setPairInfo() before matching.
- Examples
- samples/cpp/stitching_detailed.cpp.
Constructor & Destructor Documentation#
LightGlueMatcher()#
~LightGlueMatcher()#
Member Function Documentation#
clearPairInfo()#
void cv::LightGlueMatcher::clearPairInfo()
Python:
cv.LightGlueMatcher.clearPairInfo()
Clears stored pair context information.
setPairInfo()#
void cv::LightGlueMatcher::setPairInfo(
InputArray queryKpts,
InputArray trainKpts,
Size queryImageSize = Size(),
Size trainImageSize = Size() )
Python:
cv.LightGlueMatcher.setPairInfo(queryKpts, trainKpts[, queryImageSize[, 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()/radiusMatch() unless using automatic context from in-process ALIKED instances.
Parameters
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 (width, height).trainImageSize— Size of the train image (width, height).
create()#
static Ptr< LightGlueMatcher > cv::LightGlueMatcher::create(
const String & modelPath,
float scoreThreshold = 0.0f,
int backend = 0,
int target = 0 )
Python:
cv.LightGlueMatcher.create(modelPath[, scoreThreshold[, backend[, target]]]) -> retval
cv.LightGlueMatcher.createFromMemory(modelData[, scoreThreshold[, backend[, target]]]) -> retval
cv.LightGlueMatcher_create(modelPath[, scoreThreshold[, backend[, target]]]) -> retval
cv.LightGlueMatcher_createFromMemory(modelData[, scoreThreshold[, backend[, target]]]) -> retval
Creates LightGlueMatcher from a model file path.
Parameters
modelPath— Path to the ONNX model file.scoreThreshold— Match confidence threshold.backend— DNN backendtarget— DNN target
Source file#
The documentation for this class was generated from the following file:
opencv2/features.hpp