123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- //
- // This file is auto-generated. Please don't modify it!
- //
- #pragma once
- #ifdef __cplusplus
- //#import "opencv.hpp"
- #import "opencv2/features2d.hpp"
- #else
- #define CV_EXPORTS
- #endif
- #import <Foundation/Foundation.h>
- #import "Algorithm.h"
- @class DMatch;
- @class Mat;
- // C++: enum MatcherType (cv.DescriptorMatcher.MatcherType)
- typedef NS_ENUM(int, MatcherType) {
- FLANNBASED = 1,
- BRUTEFORCE = 2,
- BRUTEFORCE_L1 = 3,
- BRUTEFORCE_HAMMING = 4,
- BRUTEFORCE_HAMMINGLUT = 5,
- BRUTEFORCE_SL2 = 6
- };
- NS_ASSUME_NONNULL_BEGIN
- // C++: class DescriptorMatcher
- /**
- * Abstract base class for matching keypoint descriptors.
- *
- * It has two groups of match methods: for matching descriptors of an image with another image or with
- * an image set.
- *
- * Member of `Features2d`
- */
- CV_EXPORTS @interface DescriptorMatcher : Algorithm
- #ifdef __cplusplus
- @property(readonly)cv::Ptr<cv::DescriptorMatcher> nativePtrDescriptorMatcher;
- #endif
- #ifdef __cplusplus
- - (instancetype)initWithNativePtr:(cv::Ptr<cv::DescriptorMatcher>)nativePtr;
- + (instancetype)fromNative:(cv::Ptr<cv::DescriptorMatcher>)nativePtr;
- #endif
- #pragma mark - Methods
- //
- // void cv::DescriptorMatcher::add(vector_Mat descriptors)
- //
- /**
- * Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor
- * collection.
- *
- * If the collection is not empty, the new descriptors are added to existing train descriptors.
- *
- * @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same
- * train image.
- */
- - (void)add:(NSArray<Mat*>*)descriptors NS_SWIFT_NAME(add(descriptors:));
- //
- // vector_Mat cv::DescriptorMatcher::getTrainDescriptors()
- //
- /**
- * Returns a constant link to the train descriptor collection trainDescCollection .
- */
- - (NSArray<Mat*>*)getTrainDescriptors NS_SWIFT_NAME(getTrainDescriptors());
- //
- // void cv::DescriptorMatcher::clear()
- //
- /**
- * Clears the train descriptor collections.
- */
- - (void)clear NS_SWIFT_NAME(clear());
- //
- // bool cv::DescriptorMatcher::empty()
- //
- /**
- * Returns true if there are no train descriptors in the both collections.
- */
- - (BOOL)empty NS_SWIFT_NAME(empty());
- //
- // bool cv::DescriptorMatcher::isMaskSupported()
- //
- /**
- * Returns true if the descriptor matcher supports masking permissible matches.
- */
- - (BOOL)isMaskSupported NS_SWIFT_NAME(isMaskSupported());
- //
- // void cv::DescriptorMatcher::train()
- //
- /**
- * Trains a descriptor matcher
- *
- * Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
- * train() is run every time before matching. Some descriptor matchers (for example, BruteForceMatcher)
- * have an empty implementation of this method. Other matchers really train their inner structures (for
- * example, FlannBasedMatcher trains flann::Index ).
- */
- - (void)train NS_SWIFT_NAME(train());
- //
- // void cv::DescriptorMatcher::match(Mat queryDescriptors, Mat trainDescriptors, vector_DMatch& matches, Mat mask = Mat())
- //
- /**
- * Finds the best match for each descriptor from a query set.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param 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.
- * @param 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\<uchar\>(i,j) is non-zero.
- */
- - (void)match:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<DMatch*>*)matches mask:(Mat*)mask NS_SWIFT_NAME(match(queryDescriptors:trainDescriptors:matches:mask:));
- /**
- * Finds the best match for each descriptor from a query set.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param 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.
- * 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\<uchar\>(i,j) is non-zero.
- */
- - (void)match:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<DMatch*>*)matches NS_SWIFT_NAME(match(queryDescriptors:trainDescriptors:matches:));
- //
- // void cv::DescriptorMatcher::knnMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, int k, Mat mask = Mat(), bool compactResult = false)
- //
- /**
- * Finds the k best matches for each descriptor from a query set.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param mask Mask specifying permissible matches between an input query and train matrices of
- * descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * @param 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k mask:(Mat*)mask compactResult:(BOOL)compactResult NS_SWIFT_NAME(knnMatch(queryDescriptors:trainDescriptors:matches:k:mask:compactResult:));
- /**
- * Finds the k best matches for each descriptor from a query set.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param mask Mask specifying permissible matches between an input query and train matrices of
- * descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k mask:(Mat*)mask NS_SWIFT_NAME(knnMatch(queryDescriptors:trainDescriptors:matches:k:mask:));
- /**
- * Finds the k best matches for each descriptor from a query set.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k NS_SWIFT_NAME(knnMatch(queryDescriptors:trainDescriptors:matches:k:));
- //
- // void cv::DescriptorMatcher::radiusMatch(Mat queryDescriptors, Mat trainDescriptors, vector_vector_DMatch& matches, float maxDistance, Mat mask = Mat(), bool compactResult = false)
- //
- /**
- * For each query descriptor, finds the training descriptors not farther than the specified distance.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param matches Found matches.
- * @param 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.
- * @param 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)!
- * @param mask Mask specifying permissible matches between an input query and train matrices of
- * 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance mask:(Mat*)mask compactResult:(BOOL)compactResult NS_SWIFT_NAME(radiusMatch(queryDescriptors:trainDescriptors:matches:maxDistance:mask:compactResult:));
- /**
- * For each query descriptor, finds the training descriptors not farther than the specified distance.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param matches Found matches.
- * 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.
- * @param 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)!
- * @param mask Mask specifying permissible matches between an input query and train matrices of
- * 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance mask:(Mat*)mask NS_SWIFT_NAME(radiusMatch(queryDescriptors:trainDescriptors:matches:maxDistance:mask:));
- /**
- * For each query descriptor, finds the training descriptors not farther than the specified distance.
- *
- * @param queryDescriptors Query set of descriptors.
- * @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
- * collection stored in the class object.
- * @param matches Found matches.
- * 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.
- * @param 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)!
- * 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors trainDescriptors:(Mat*)trainDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance NS_SWIFT_NAME(radiusMatch(queryDescriptors:trainDescriptors:matches:maxDistance:));
- //
- // void cv::DescriptorMatcher::match(Mat queryDescriptors, vector_DMatch& matches, vector_Mat masks = vector_Mat())
- //
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param 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.
- * @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- */
- - (void)match:(Mat*)queryDescriptors matches:(NSMutableArray<DMatch*>*)matches masks:(NSArray<Mat*>*)masks NS_SWIFT_NAME(match(queryDescriptors:matches:masks:));
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param 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.
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- */
- - (void)match:(Mat*)queryDescriptors matches:(NSMutableArray<DMatch*>*)matches NS_SWIFT_NAME(match(queryDescriptors:matches:));
- //
- // void cv::DescriptorMatcher::knnMatch(Mat queryDescriptors, vector_vector_DMatch& matches, int k, vector_Mat masks = vector_Mat(), bool compactResult = false)
- //
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * @param 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k masks:(NSArray<Mat*>*)masks compactResult:(BOOL)compactResult NS_SWIFT_NAME(knnMatch(queryDescriptors:matches:k:masks:compactResult:));
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k masks:(NSArray<Mat*>*)masks NS_SWIFT_NAME(knnMatch(queryDescriptors:matches:k:masks:));
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
- * @param k Count of best matches found per each query descriptor or less if a query descriptor has
- * less than k possible matches in total.
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * 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.
- */
- - (void)knnMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches k:(int)k NS_SWIFT_NAME(knnMatch(queryDescriptors:matches:k:));
- //
- // void cv::DescriptorMatcher::radiusMatch(Mat queryDescriptors, vector_vector_DMatch& matches, float maxDistance, vector_Mat masks = vector_Mat(), bool compactResult = false)
- //
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Found matches.
- * @param 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)!
- * @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * @param 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance masks:(NSArray<Mat*>*)masks compactResult:(BOOL)compactResult NS_SWIFT_NAME(radiusMatch(queryDescriptors:matches:maxDistance:masks:compactResult:));
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Found matches.
- * @param 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)!
- * @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance masks:(NSArray<Mat*>*)masks NS_SWIFT_NAME(radiusMatch(queryDescriptors:matches:maxDistance:masks:));
- /**
- *
- * @param queryDescriptors Query set of descriptors.
- * @param matches Found matches.
- * @param 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)!
- * descriptors and stored train descriptors from the i-th image trainDescCollection[i].
- * 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.
- */
- - (void)radiusMatch:(Mat*)queryDescriptors matches:(NSMutableArray<NSMutableArray<DMatch*>*>*)matches maxDistance:(float)maxDistance NS_SWIFT_NAME(radiusMatch(queryDescriptors:matches:maxDistance:));
- //
- // void cv::DescriptorMatcher::write(String fileName)
- //
- - (void)write:(NSString*)fileName NS_SWIFT_NAME(write(fileName:));
- //
- // void cv::DescriptorMatcher::read(String fileName)
- //
- - (void)read:(NSString*)fileName NS_SWIFT_NAME(read(fileName:));
- //
- // void cv::DescriptorMatcher::read(FileNode arg1)
- //
- // Unknown type 'FileNode' (I), skipping the function
- //
- // Ptr_DescriptorMatcher cv::DescriptorMatcher::clone(bool emptyTrainData = false)
- //
- /**
- * Clones the matcher.
- *
- * @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
- * that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
- * object copy with the current parameters but with empty train data.
- */
- - (DescriptorMatcher*)clone:(BOOL)emptyTrainData NS_SWIFT_NAME(clone(emptyTrainData:));
- /**
- * Clones the matcher.
- *
- * that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
- * object copy with the current parameters but with empty train data.
- */
- - (DescriptorMatcher*)clone NS_SWIFT_NAME(clone());
- //
- // static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(String descriptorMatcherType)
- //
- /**
- * Creates a descriptor matcher of a given type with the default parameters (using default
- * constructor).
- *
- * @param descriptorMatcherType Descriptor matcher type. Now the following matcher types are
- * supported:
- * - `BruteForce` (it uses L2 )
- * - `BruteForce-L1`
- * - `BruteForce-Hamming`
- * - `BruteForce-Hamming(2)`
- * - `FlannBased`
- */
- + (DescriptorMatcher*)create2:(NSString*)descriptorMatcherType NS_SWIFT_NAME(create(descriptorMatcherType:));
- //
- // static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(DescriptorMatcher_MatcherType matcherType)
- //
- + (DescriptorMatcher*)create:(MatcherType)matcherType NS_SWIFT_NAME(create(matcherType:));
- //
- // void cv::DescriptorMatcher::write(Ptr_FileStorage fs, String name = String())
- //
- // Unknown type 'Ptr_FileStorage' (I), skipping the function
- @end
- NS_ASSUME_NONNULL_END
|