@Namespace(value="cv::cuda") @Properties(inherit=opencv_cudafeatures2d.class) public class DescriptorMatcher extends Algorithm
It has two groups of match methods: for matching descriptors of an image with another image or with an image set.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DescriptorMatcher(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(GpuMatVector descriptors)
\brief Adds descriptors to train a descriptor collection.
|
void |
clear()
\brief Clears the train descriptor collection.
|
static DescriptorMatcher |
createBFMatcher() |
static DescriptorMatcher |
createBFMatcher(int normType)
\brief Brute-force descriptor matcher.
|
boolean |
empty()
\brief Returns true if there are no train descriptors in the collection.
|
GpuMatVector |
getTrainDescriptors()
\brief Returns a constant link to the train descriptor collection.
|
boolean |
isMaskSupported()
\brief Returns true if the descriptor matcher supports masking permissible matches.
|
void |
knnMatch(GpuMat queryDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(GpuMat queryDescriptors,
DMatchVectorVector matches,
int k,
GpuMatVector masks,
boolean compactResult) |
void |
knnMatch(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVectorVector matches,
int k,
GpuMat mask,
boolean compactResult) |
void |
knnMatch(Mat queryDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(Mat queryDescriptors,
DMatchVectorVector matches,
int k,
GpuMatVector masks,
boolean compactResult)
\overload
|
void |
knnMatch(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVectorVector matches,
int k,
Mat mask,
boolean compactResult)
\brief Finds the k best matches for each descriptor from a query set (blocking version).
|
void |
knnMatch(UMat queryDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(UMat queryDescriptors,
DMatchVectorVector matches,
int k,
GpuMatVector masks,
boolean compactResult) |
void |
knnMatch(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVectorVector matches,
int k) |
void |
knnMatch(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVectorVector matches,
int k,
UMat mask,
boolean compactResult) |
void |
knnMatchAsync(GpuMat queryDescriptors,
GpuMat trainDescriptors,
GpuMat matches,
int k) |
void |
knnMatchAsync(GpuMat queryDescriptors,
GpuMat trainDescriptors,
GpuMat matches,
int k,
GpuMat mask,
Stream stream) |
void |
knnMatchAsync(GpuMat queryDescriptors,
GpuMat matches,
int k) |
void |
knnMatchAsync(GpuMat queryDescriptors,
GpuMat matches,
int k,
GpuMatVector masks,
Stream stream) |
void |
knnMatchAsync(Mat queryDescriptors,
Mat matches,
int k) |
void |
knnMatchAsync(Mat queryDescriptors,
Mat matches,
int k,
GpuMatVector masks,
Stream stream)
\overload
|
void |
knnMatchAsync(Mat queryDescriptors,
Mat trainDescriptors,
Mat matches,
int k) |
void |
knnMatchAsync(Mat queryDescriptors,
Mat trainDescriptors,
Mat matches,
int k,
Mat mask,
Stream stream)
\brief Finds the k best matches for each descriptor from a query set (asynchronous version).
|
void |
knnMatchAsync(UMat queryDescriptors,
UMat matches,
int k) |
void |
knnMatchAsync(UMat queryDescriptors,
UMat matches,
int k,
GpuMatVector masks,
Stream stream) |
void |
knnMatchAsync(UMat queryDescriptors,
UMat trainDescriptors,
UMat matches,
int k) |
void |
knnMatchAsync(UMat queryDescriptors,
UMat trainDescriptors,
UMat matches,
int k,
UMat mask,
Stream stream) |
void |
knnMatchConvert(GpuMat gpu_matches,
DMatchVectorVector matches) |
void |
knnMatchConvert(GpuMat gpu_matches,
DMatchVectorVector matches,
boolean compactResult) |
void |
knnMatchConvert(Mat gpu_matches,
DMatchVectorVector matches) |
void |
knnMatchConvert(Mat gpu_matches,
DMatchVectorVector matches,
boolean compactResult)
\brief Converts matches array from internal representation to standard matches vector.
|
void |
knnMatchConvert(UMat gpu_matches,
DMatchVectorVector matches) |
void |
knnMatchConvert(UMat gpu_matches,
DMatchVectorVector matches,
boolean compactResult) |
void |
match(GpuMat queryDescriptors,
DMatchVector matches) |
void |
match(GpuMat queryDescriptors,
DMatchVector matches,
GpuMatVector masks) |
void |
match(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVector matches) |
void |
match(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVector matches,
GpuMat mask) |
void |
match(Mat queryDescriptors,
DMatchVector matches) |
void |
match(Mat queryDescriptors,
DMatchVector matches,
GpuMatVector masks)
\overload
|
void |
match(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVector matches) |
void |
match(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVector matches,
Mat mask)
\brief Finds the best match for each descriptor from a query set (blocking version).
|
void |
match(UMat queryDescriptors,
DMatchVector matches) |
void |
match(UMat queryDescriptors,
DMatchVector matches,
GpuMatVector masks) |
void |
match(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVector matches) |
void |
match(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVector matches,
UMat mask) |
void |
matchAsync(GpuMat queryDescriptors,
GpuMat trainDescriptors,
GpuMat matches,
GpuMat mask,
Stream stream) |
void |
matchAsync(GpuMat queryDescriptors,
GpuMat matches,
GpuMatVector masks,
Stream stream) |
void |
matchAsync(Mat queryDescriptors,
Mat matches,
GpuMatVector masks,
Stream stream)
\overload
|
void |
matchAsync(Mat queryDescriptors,
Mat trainDescriptors,
Mat matches,
Mat mask,
Stream stream)
\brief Finds the best match for each descriptor from a query set (asynchronous version).
|
void |
matchAsync(UMat queryDescriptors,
UMat matches,
GpuMatVector masks,
Stream stream) |
void |
matchAsync(UMat queryDescriptors,
UMat trainDescriptors,
UMat matches,
UMat mask,
Stream stream) |
void |
matchConvert(GpuMat gpu_matches,
DMatchVector matches) |
void |
matchConvert(Mat gpu_matches,
DMatchVector matches)
\brief Converts matches array from internal representation to standard matches vector.
|
void |
matchConvert(UMat gpu_matches,
DMatchVector matches) |
void |
radiusMatch(GpuMat queryDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(GpuMat queryDescriptors,
DMatchVectorVector matches,
float maxDistance,
GpuMatVector masks,
boolean compactResult) |
void |
radiusMatch(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(GpuMat queryDescriptors,
GpuMat trainDescriptors,
DMatchVectorVector matches,
float maxDistance,
GpuMat mask,
boolean compactResult) |
void |
radiusMatch(Mat queryDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(Mat queryDescriptors,
DMatchVectorVector matches,
float maxDistance,
GpuMatVector masks,
boolean compactResult)
\overload
|
void |
radiusMatch(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(Mat queryDescriptors,
Mat trainDescriptors,
DMatchVectorVector matches,
float maxDistance,
Mat mask,
boolean compactResult)
\brief For each query descriptor, finds the training descriptors not farther than the specified distance (blocking version).
|
void |
radiusMatch(UMat queryDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(UMat queryDescriptors,
DMatchVectorVector matches,
float maxDistance,
GpuMatVector masks,
boolean compactResult) |
void |
radiusMatch(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVectorVector matches,
float maxDistance) |
void |
radiusMatch(UMat queryDescriptors,
UMat trainDescriptors,
DMatchVectorVector matches,
float maxDistance,
UMat mask,
boolean compactResult) |
void |
radiusMatchAsync(GpuMat queryDescriptors,
GpuMat matches,
float maxDistance) |
void |
radiusMatchAsync(GpuMat queryDescriptors,
GpuMat matches,
float maxDistance,
GpuMatVector masks,
Stream stream) |
void |
radiusMatchAsync(GpuMat queryDescriptors,
GpuMat trainDescriptors,
GpuMat matches,
float maxDistance) |
void |
radiusMatchAsync(GpuMat queryDescriptors,
GpuMat trainDescriptors,
GpuMat matches,
float maxDistance,
GpuMat mask,
Stream stream) |
void |
radiusMatchAsync(Mat queryDescriptors,
Mat matches,
float maxDistance) |
void |
radiusMatchAsync(Mat queryDescriptors,
Mat matches,
float maxDistance,
GpuMatVector masks,
Stream stream)
\overload
|
void |
radiusMatchAsync(Mat queryDescriptors,
Mat trainDescriptors,
Mat matches,
float maxDistance) |
void |
radiusMatchAsync(Mat queryDescriptors,
Mat trainDescriptors,
Mat matches,
float maxDistance,
Mat mask,
Stream stream)
\brief For each query descriptor, finds the training descriptors not farther than the specified distance (asynchronous version).
|
void |
radiusMatchAsync(UMat queryDescriptors,
UMat matches,
float maxDistance) |
void |
radiusMatchAsync(UMat queryDescriptors,
UMat matches,
float maxDistance,
GpuMatVector masks,
Stream stream) |
void |
radiusMatchAsync(UMat queryDescriptors,
UMat trainDescriptors,
UMat matches,
float maxDistance) |
void |
radiusMatchAsync(UMat queryDescriptors,
UMat trainDescriptors,
UMat matches,
float maxDistance,
UMat mask,
Stream stream) |
void |
radiusMatchConvert(GpuMat gpu_matches,
DMatchVectorVector matches) |
void |
radiusMatchConvert(GpuMat gpu_matches,
DMatchVectorVector matches,
boolean compactResult) |
void |
radiusMatchConvert(Mat gpu_matches,
DMatchVectorVector matches) |
void |
radiusMatchConvert(Mat gpu_matches,
DMatchVectorVector matches,
boolean compactResult)
\brief Converts matches array from internal representation to standard matches vector.
|
void |
radiusMatchConvert(UMat gpu_matches,
DMatchVectorVector matches) |
void |
radiusMatchConvert(UMat gpu_matches,
DMatchVectorVector matches,
boolean compactResult) |
void |
train()
\brief Trains a descriptor matcher.
|
getDefaultName, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public DescriptorMatcher(Pointer p)
Pointer.Pointer(Pointer)
.@opencv_core.Ptr public static DescriptorMatcher createBFMatcher(int normType)
For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.
normType
- One of NORM_L1, NORM_L2, NORM_HAMMING. L1 and L2 norms are
preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
BRIEF).@opencv_core.Ptr public static DescriptorMatcher createBFMatcher()
@Cast(value="bool") public boolean isMaskSupported()
public void add(@Const @ByRef GpuMatVector descriptors)
If the collection is not empty, the new descriptors are added to existing train descriptors.
descriptors
- Descriptors to add. Each descriptors[i] is a set of descriptors from the same
train image.@Const @ByRef public GpuMatVector getTrainDescriptors()
public void clear()
@Cast(value="bool") public boolean empty()
public void train()
Trains a descriptor matcher (for example, the flann index). In all methods to match, the method train() is run every time before matching.
public void match(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVector matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Matches. If a query descriptor is masked out in mask , no match is added for this
descriptor. So, matches size may be smaller than the query descriptors count.mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.
In the first variant of this method, the train descriptors are passed as an input argument. In the
second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is
used. Optional mask (or masks) can be passed to specify which query and training descriptors can be
matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if
mask.at\
public void match(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVector matches)
public void match(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVector matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask)
public void match(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVector matches)
public void match(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVector matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask)
public void match(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVector matches)
public void match(@ByVal Mat queryDescriptors, @ByRef DMatchVector matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks)
public void match(@ByVal Mat queryDescriptors, @ByRef DMatchVector matches)
public void match(@ByVal UMat queryDescriptors, @ByRef DMatchVector matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks)
public void match(@ByVal UMat queryDescriptors, @ByRef DMatchVector matches)
public void match(@ByVal GpuMat queryDescriptors, @ByRef DMatchVector matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks)
public void match(@ByVal GpuMat queryDescriptors, @ByRef DMatchVector matches)
public void matchAsync(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByVal Mat matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Matches array stored in GPU memory. Internal representation is not defined.
Use DescriptorMatcher::matchConvert method to retrieve results in standard representation.mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.stream
- CUDA stream.
In the first variant of this method, the train descriptors are passed as an input argument. In the
second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is
used. Optional mask (or masks) can be passed to specify which query and training descriptors can be
matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if
mask.at\
public void matchAsync(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByVal UMat matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void matchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByVal GpuMat matches, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void matchAsync(@ByVal Mat queryDescriptors, @ByVal Mat matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void matchAsync(@ByVal UMat queryDescriptors, @ByVal UMat matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void matchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat matches, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void matchConvert(@ByVal Mat gpu_matches, @ByRef DMatchVector matches)
The method is supposed to be used with DescriptorMatcher::matchAsync to get final result. Call this method only after DescriptorMatcher::matchAsync is completed (ie. after synchronization).
gpu_matches
- Matches, returned from DescriptorMatcher::matchAsync.matches
- Vector of DMatch objects.public void matchConvert(@ByVal UMat gpu_matches, @ByRef DMatchVector matches)
public void matchConvert(@ByVal GpuMat gpu_matches, @ByRef DMatchVector matches)
public void knnMatch(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVectorVector matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask, @Cast(value="bool") boolean compactResult)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Matches. Each matches[i] is k or less matches for the same query descriptor.k
- Count of best matches found per each query descriptor or less if a query descriptor has
less than k possible matches in total.mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.compactResult
- Parameter used when the mask (or masks) is not empty. If compactResult is
false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
the matches vector does not contain matches for fully masked-out query descriptors.
These extended variants of DescriptorMatcher::match methods find several best matches for each query descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match for the details about query and train descriptors.
public void knnMatch(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatch(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVectorVector matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask, @Cast(value="bool") boolean compactResult)
public void knnMatch(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatch(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVectorVector matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask, @Cast(value="bool") boolean compactResult)
public void knnMatch(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatch(@ByVal Mat queryDescriptors, @ByRef DMatchVectorVector matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void knnMatch(@ByVal Mat queryDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatch(@ByVal UMat queryDescriptors, @ByRef DMatchVectorVector matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void knnMatch(@ByVal UMat queryDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatch(@ByVal GpuMat queryDescriptors, @ByRef DMatchVectorVector matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void knnMatch(@ByVal GpuMat queryDescriptors, @ByRef DMatchVectorVector matches, int k)
public void knnMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByVal Mat matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Matches array stored in GPU memory. Internal representation is not defined.
Use DescriptorMatcher::knnMatchConvert method to retrieve results in standard representation.k
- Count of best matches found per each query descriptor or less if a query descriptor has
less than k possible matches in total.mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.stream
- CUDA stream.
These extended variants of DescriptorMatcher::matchAsync methods find several best matches for each query descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::matchAsync for the details about query and train descriptors.
public void knnMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByVal Mat matches, int k)
public void knnMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByVal UMat matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void knnMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByVal UMat matches, int k)
public void knnMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByVal GpuMat matches, int k, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void knnMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByVal GpuMat matches, int k)
public void knnMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void knnMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void knnMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat matches, int k, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void knnMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat matches, int k)
public void knnMatchConvert(@ByVal Mat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
The method is supposed to be used with DescriptorMatcher::knnMatchAsync to get final result. Call this method only after DescriptorMatcher::knnMatchAsync is completed (ie. after synchronization).
gpu_matches
- Matches, returned from DescriptorMatcher::knnMatchAsync.matches
- Vector of DMatch objects.compactResult
- Parameter used when the mask (or masks) is not empty. If compactResult is
false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
the matches vector does not contain matches for fully masked-out query descriptors.public void knnMatchConvert(@ByVal Mat gpu_matches, @ByRef DMatchVectorVector matches)
public void knnMatchConvert(@ByVal UMat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
public void knnMatchConvert(@ByVal UMat gpu_matches, @ByRef DMatchVectorVector matches)
public void knnMatchConvert(@ByVal GpuMat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
public void knnMatchConvert(@ByVal GpuMat gpu_matches, @ByRef DMatchVectorVector matches)
public void radiusMatch(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask, @Cast(value="bool") boolean compactResult)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Found matches.maxDistance
- Threshold for the distance between matched descriptors. Distance means here
metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured
in Pixels)!mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.compactResult
- Parameter used when the mask (or masks) is not empty. If compactResult is
false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
the matches vector does not contain matches for fully masked-out query descriptors.
For each query descriptor, the methods find such training descriptors that the distance between the query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are returned in the distance increasing order.
public void radiusMatch(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatch(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask, @Cast(value="bool") boolean compactResult)
public void radiusMatch(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatch(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask, @Cast(value="bool") boolean compactResult)
public void radiusMatch(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatch(@ByVal Mat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void radiusMatch(@ByVal Mat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatch(@ByVal UMat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void radiusMatch(@ByVal UMat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatch(@ByVal GpuMat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @Cast(value="bool") boolean compactResult)
public void radiusMatch(@ByVal GpuMat queryDescriptors, @ByRef DMatchVectorVector matches, float maxDistance)
public void radiusMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByVal Mat matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") Mat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
queryDescriptors
- Query set of descriptors.trainDescriptors
- Train set of descriptors. This set is not added to the train descriptors
collection stored in the class object.matches
- Matches array stored in GPU memory. Internal representation is not defined.
Use DescriptorMatcher::radiusMatchConvert method to retrieve results in standard representation.maxDistance
- Threshold for the distance between matched descriptors. Distance means here
metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured
in Pixels)!mask
- Mask specifying permissible matches between an input query and train matrices of
descriptors.stream
- CUDA stream.
For each query descriptor, the methods find such training descriptors that the distance between the query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are returned in the distance increasing order.
public void radiusMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat trainDescriptors, @ByVal Mat matches, float maxDistance)
public void radiusMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByVal UMat matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") UMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void radiusMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat trainDescriptors, @ByVal UMat matches, float maxDistance)
public void radiusMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByVal GpuMat matches, float maxDistance, @ByVal(nullValue="cv::InputArray(cv::noArray())") GpuMat mask, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void radiusMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat trainDescriptors, @ByVal GpuMat matches, float maxDistance)
public void radiusMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void radiusMatchAsync(@ByVal Mat queryDescriptors, @ByVal Mat matches, float maxDistance)
public void radiusMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void radiusMatchAsync(@ByVal UMat queryDescriptors, @ByVal UMat matches, float maxDistance)
public void radiusMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat matches, float maxDistance, @Const @ByRef(nullValue="std::vector<cv::cuda::GpuMat>()") GpuMatVector masks, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream stream)
public void radiusMatchAsync(@ByVal GpuMat queryDescriptors, @ByVal GpuMat matches, float maxDistance)
public void radiusMatchConvert(@ByVal Mat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
The method is supposed to be used with DescriptorMatcher::radiusMatchAsync to get final result. Call this method only after DescriptorMatcher::radiusMatchAsync is completed (ie. after synchronization).
gpu_matches
- Matches, returned from DescriptorMatcher::radiusMatchAsync.matches
- Vector of DMatch objects.compactResult
- Parameter used when the mask (or masks) is not empty. If compactResult is
false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
the matches vector does not contain matches for fully masked-out query descriptors.public void radiusMatchConvert(@ByVal Mat gpu_matches, @ByRef DMatchVectorVector matches)
public void radiusMatchConvert(@ByVal UMat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
public void radiusMatchConvert(@ByVal UMat gpu_matches, @ByRef DMatchVectorVector matches)
public void radiusMatchConvert(@ByVal GpuMat gpu_matches, @ByRef DMatchVectorVector matches, @Cast(value="bool") boolean compactResult)
public void radiusMatchConvert(@ByVal GpuMat gpu_matches, @ByRef DMatchVectorVector matches)
Copyright © 2020. All rights reserved.