43
#ifndef OPENCV_FEATURES_2D_HPP
 
44
#define OPENCV_FEATURES_2D_HPP
 
46
#include "opencv2/opencv_modules.hpp"
 
47
#include "opencv2/core.hpp"
 
49
#ifdef HAVE_OPENCV_FLANN
 
50
#include "opencv2/flann/miniflann.hpp"
 
100
static
void
runByImageBorder( std::vector<KeyPoint>& keypoints,
Size
imageSize,
int
borderSize );
 
104
static
void
runByKeypointSize( std::vector<KeyPoint>& keypoints,
float
minSize,
 
105
float
maxSize=FLT_MAX );
 
109
static
void
runByPixelsMask( std::vector<KeyPoint>& keypoints,
const
Mat& mask );
 
113
static
void
removeDuplicated( std::vector<KeyPoint>& keypoints );
 
117
static
void
removeDuplicatedSorted( std::vector<KeyPoint>& keypoints );
 
122
static
void
retainBest( std::vector<KeyPoint>& keypoints,
int
npoints );
 
130
#ifdef __EMSCRIPTEN__
 
147
CV_WRAP
virtual
void
detect( InputArray image,
 
148
CV_OUT std::vector<KeyPoint>& keypoints,
 
149
InputArray mask=noArray() );
 
158
CV_WRAP
virtual
void
detect( InputArrayOfArrays images,
 
159
CV_OUT std::vector<std::vector<KeyPoint> >& keypoints,
 
160
InputArrayOfArrays masks=noArray() );
 
173
CV_WRAP
virtual
void
compute( InputArray image,
 
174
CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints,
 
187
CV_WRAP
virtual
void
compute( InputArrayOfArrays images,
 
188
CV_OUT CV_IN_OUT std::vector<std::vector<KeyPoint> >& keypoints,
 
192
CV_WRAP
virtual
void
detectAndCompute( InputArray image, InputArray mask,
 
193
CV_OUT std::vector<KeyPoint>& keypoints,
 
195
bool
useProvidedKeypoints=
false
);
 
197
CV_WRAP
virtual
int
descriptorSize()
const;
 
198
CV_WRAP
virtual
int
descriptorType()
const;
 
199
CV_WRAP
virtual
int
defaultNorm()
const;
 
201
CV_WRAP
void
write(
const
String& fileName )
const;
 
203
CV_WRAP
void
read(
const
String& fileName );
 
208
CV_WRAP
virtual
void
read(
const
FileNode&) CV_OVERRIDE;
 
211
CV_WRAP
virtual
bool
empty() const CV_OVERRIDE;
 
212
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
 
245
int
maxTilt = 5,
int
minTilt = 0,
float
tiltStep = 1.4142135623730951f,
float
rotateStepBase = 72);
 
247
CV_WRAP
virtual
void
setViewParams(
const
std::vector<float>& tilts,
const
std::vector<float>& rolls) = 0;
 
248
CV_WRAP
virtual
void
getViewParams(std::vector<float>& tilts, std::vector<float>& rolls)
const
= 0;
 
249
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
283
CV_WRAP
static
Ptr<SIFT>
create(
int
nfeatures = 0,
int
nOctaveLayers = 3,
 
284
double
contrastThreshold = 0.04,
double
edgeThreshold = 10,
 
310
CV_WRAP
static
Ptr<SIFT>
create(
int
nfeatures,
int
nOctaveLayers,
 
311
double
contrastThreshold,
double
edgeThreshold,
 
312
double
sigma,
int
descriptorType);
 
314
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
333
CV_WRAP
static
Ptr<BRISK>
create(
int
thresh=30,
int
octaves=3,
float
patternScale=1.0f);
 
346
CV_WRAP
static
Ptr<BRISK>
create(
const
std::vector<float> &radiusList,
const
std::vector<int> &numberList,
 
347
float
dMax=5.85f,
float
dMin=8.2f,
const
std::vector<int>& indexChange=std::vector<int>());
 
362
CV_WRAP
static
Ptr<BRISK>
create(
int
thresh,
int
octaves,
const
std::vector<float> &radiusList,
 
363
const
std::vector<int> &numberList,
float
dMax=5.85f,
float
dMin=8.2f,
 
364
const
std::vector<int>& indexChange=std::vector<int>());
 
365
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
371
CV_WRAP
virtual
int
getThreshold()
const
{
return
-1; }
 
376
CV_WRAP
virtual
void
setOctaves(
int
octaves) { CV_UNUSED(octaves);
return; }
 
377
CV_WRAP
virtual
int
getOctaves()
const
{
return
-1; }
 
390
enum
ScoreType { HARRIS_SCORE=0, FAST_SCORE=1 };
 
391
static
const
int
kBytes = 32;
 
424
CV_WRAP
static
Ptr<ORB>
create(
int
nfeatures=500,
float
scaleFactor=1.2f,
int
nlevels=8,
int
edgeThreshold=31,
 
425
int
firstLevel=0,
int
WTA_K=2, ORB::ScoreType scoreType=ORB::HARRIS_SCORE,
int
patchSize=31,
int
fastThreshold=20);
 
427
CV_WRAP
virtual
void
setMaxFeatures(
int
maxFeatures) = 0;
 
428
CV_WRAP
virtual
int
getMaxFeatures()
const
= 0;
 
430
CV_WRAP
virtual
void
setScaleFactor(
double
scaleFactor) = 0;
 
431
CV_WRAP
virtual
double
getScaleFactor()
const
= 0;
 
433
CV_WRAP
virtual
void
setNLevels(
int
nlevels) = 0;
 
434
CV_WRAP
virtual
int
getNLevels()
const
= 0;
 
436
CV_WRAP
virtual
void
setEdgeThreshold(
int
edgeThreshold) = 0;
 
437
CV_WRAP
virtual
int
getEdgeThreshold()
const
= 0;
 
439
CV_WRAP
virtual
void
setFirstLevel(
int
firstLevel) = 0;
 
440
CV_WRAP
virtual
int
getFirstLevel()
const
= 0;
 
442
CV_WRAP
virtual
void
setWTA_K(
int
wta_k) = 0;
 
443
CV_WRAP
virtual
int
getWTA_K()
const
= 0;
 
445
CV_WRAP
virtual
void
setScoreType(ORB::ScoreType scoreType) = 0;
 
446
CV_WRAP
virtual
ORB::ScoreType getScoreType()
const
= 0;
 
448
CV_WRAP
virtual
void
setPatchSize(
int
patchSize) = 0;
 
449
CV_WRAP
virtual
int
getPatchSize()
const
= 0;
 
451
CV_WRAP
virtual
void
setFastThreshold(
int
fastThreshold) = 0;
 
452
CV_WRAP
virtual
int
getFastThreshold()
const
= 0;
 
453
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
486
CV_WRAP
static
Ptr<MSER>
create(
int
delta=5,
int
min_area=60,
int
max_area=14400,
 
487
double
max_variation=0.25,
double
min_diversity=.2,
 
488
int
max_evolution=200,
double
area_threshold=1.01,
 
489
double
min_margin=0.003,
int
edge_blur_size=5 );
 
497
CV_WRAP
virtual
void
detectRegions( InputArray image,
 
498
CV_OUT std::vector<std::vector<Point> >& msers,
 
499
CV_OUT std::vector<Rect>& bboxes ) = 0;
 
501
CV_WRAP
virtual
void
setDelta(
int
delta) = 0;
 
502
CV_WRAP
virtual
int
getDelta()
const
= 0;
 
504
CV_WRAP
virtual
void
setMinArea(
int
minArea) = 0;
 
505
CV_WRAP
virtual
int
getMinArea()
const
= 0;
 
507
CV_WRAP
virtual
void
setMaxArea(
int
maxArea) = 0;
 
508
CV_WRAP
virtual
int
getMaxArea()
const
= 0;
 
510
CV_WRAP
virtual
void
setPass2Only(
bool
f) = 0;
 
511
CV_WRAP
virtual
bool
getPass2Only()
const
= 0;
 
512
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
527
TYPE_5_8 = 0, TYPE_7_12 = 1, TYPE_9_16 = 2
 
531
THRESHOLD = 10000, NONMAX_SUPPRESSION=10001, FAST_N=10002
 
536
bool
nonmaxSuppression=
true,
 
537
FastFeatureDetector::DetectorType type=FastFeatureDetector::TYPE_9_16 );
 
539
CV_WRAP
virtual
void
setThreshold(
int
threshold) = 0;
 
540
CV_WRAP
virtual
int
getThreshold()
const
= 0;
 
542
CV_WRAP
virtual
void
setNonmaxSuppression(
bool
f) = 0;
 
543
CV_WRAP
virtual
bool
getNonmaxSuppression()
const
= 0;
 
545
CV_WRAP
virtual
void
setType(FastFeatureDetector::DetectorType type) = 0;
 
546
CV_WRAP
virtual
FastFeatureDetector::DetectorType getType()
const
= 0;
 
547
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
551
CV_EXPORTS
void
FAST( InputArray image, CV_OUT std::vector<
KeyPoint>& keypoints,
 
552
int
threshold,
bool
nonmaxSuppression=true );
 
572
CV_EXPORTS
void
FAST( InputArray image, CV_OUT std::vector<
KeyPoint>& keypoints,
 
587
AGAST_5_8 = 0, AGAST_7_12d = 1, AGAST_7_12s = 2, OAST_9_16 = 3,
 
592
THRESHOLD = 10000, NONMAX_SUPPRESSION = 10001,
 
596
bool
nonmaxSuppression=
true,
 
597
AgastFeatureDetector::DetectorType type = AgastFeatureDetector::OAST_9_16);
 
599
CV_WRAP
virtual
void
setThreshold(
int
threshold) = 0;
 
600
CV_WRAP
virtual
int
getThreshold()
const
= 0;
 
602
CV_WRAP
virtual
void
setNonmaxSuppression(
bool
f) = 0;
 
603
CV_WRAP
virtual
bool
getNonmaxSuppression()
const
= 0;
 
605
CV_WRAP
virtual
void
setType(AgastFeatureDetector::DetectorType type) = 0;
 
606
CV_WRAP
virtual
AgastFeatureDetector::DetectorType getType()
const
= 0;
 
607
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
611
CV_EXPORTS
void
AGAST( InputArray image, CV_OUT std::vector<
KeyPoint>& keypoints,
 
612
int
threshold,
bool
nonmaxSuppression=true );
 
632
CV_EXPORTS
void
AGAST( InputArray image, CV_OUT std::vector<
KeyPoint>& keypoints,
 
640
CV_WRAP
static
Ptr<GFTTDetector>
create(
int
maxCorners=1000,
double
qualityLevel=0.01,
double
minDistance=1,
 
641
int
blockSize=3,
bool
useHarrisDetector=
false,
double
k=0.04 );
 
642
CV_WRAP
static
Ptr<GFTTDetector>
create(
int
maxCorners,
double
qualityLevel,
double
minDistance,
 
643
int
blockSize,
int
gradiantSize,
bool
useHarrisDetector=
false,
double
k=0.04 );
 
644
CV_WRAP
virtual
void
setMaxFeatures(
int
maxFeatures) = 0;
 
645
CV_WRAP
virtual
int
getMaxFeatures()
const
= 0;
 
647
CV_WRAP
virtual
void
setQualityLevel(
double
qlevel) = 0;
 
648
CV_WRAP
virtual
double
getQualityLevel()
const
= 0;
 
650
CV_WRAP
virtual
void
setMinDistance(
double
minDistance) = 0;
 
651
CV_WRAP
virtual
double
getMinDistance()
const
= 0;
 
653
CV_WRAP
virtual
void
setBlockSize(
int
blockSize) = 0;
 
654
CV_WRAP
virtual
int
getBlockSize()
const
= 0;
 
656
CV_WRAP
virtual
void
setHarrisDetector(
bool
val) = 0;
 
657
CV_WRAP
virtual
bool
getHarrisDetector()
const
= 0;
 
659
CV_WRAP
virtual
void
setK(
double
k) = 0;
 
660
CV_WRAP
virtual
double
getK()
const
= 0;
 
661
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
701
CV_PROP_RW
float
thresholdStep;
 
702
CV_PROP_RW
float
minThreshold;
 
703
CV_PROP_RW
float
maxThreshold;
 
704
CV_PROP_RW
size_t
minRepeatability;
 
705
CV_PROP_RW
float
minDistBetweenBlobs;
 
707
CV_PROP_RW
bool
filterByColor;
 
708
CV_PROP_RW uchar blobColor;
 
710
CV_PROP_RW
bool
filterByArea;
 
711
CV_PROP_RW
float
minArea, maxArea;
 
713
CV_PROP_RW
bool
filterByCircularity;
 
714
CV_PROP_RW
float
minCircularity, maxCircularity;
 
716
CV_PROP_RW
bool
filterByInertia;
 
717
CV_PROP_RW
float
minInertiaRatio, maxInertiaRatio;
 
719
CV_PROP_RW
bool
filterByConvexity;
 
720
CV_PROP_RW
float
minConvexity, maxConvexity;
 
728
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
763
CV_WRAP
static
Ptr<KAZE>
create(
bool
extended=
false,
bool
upright=
false,
 
765
int
nOctaves = 4,
int
nOctaveLayers = 4,
 
766
KAZE::DiffusivityType diffusivity = KAZE::DIFF_PM_G2);
 
768
CV_WRAP
virtual
void
setExtended(
bool
extended) = 0;
 
769
CV_WRAP
virtual
bool
getExtended()
const
= 0;
 
771
CV_WRAP
virtual
void
setUpright(
bool
upright) = 0;
 
772
CV_WRAP
virtual
bool
getUpright()
const
= 0;
 
774
CV_WRAP
virtual
void
setThreshold(
double
threshold) = 0;
 
775
CV_WRAP
virtual
double
getThreshold()
const
= 0;
 
777
CV_WRAP
virtual
void
setNOctaves(
int
octaves) = 0;
 
778
CV_WRAP
virtual
int
getNOctaves()
const
= 0;
 
780
CV_WRAP
virtual
void
setNOctaveLayers(
int
octaveLayers) = 0;
 
781
CV_WRAP
virtual
int
getNOctaveLayers()
const
= 0;
 
783
CV_WRAP
virtual
void
setDiffusivity(KAZE::DiffusivityType diff) = 0;
 
784
CV_WRAP
virtual
KAZE::DiffusivityType getDiffusivity()
const
= 0;
 
785
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
810
DESCRIPTOR_KAZE_UPRIGHT = 2,
 
812
DESCRIPTOR_MLDB_UPRIGHT = 4,
 
829
int
descriptor_size = 0,
int
descriptor_channels = 3,
 
830
float
threshold
= 0.001f,
int
nOctaves = 4,
 
831
int
nOctaveLayers = 4, KAZE::DiffusivityType diffusivity = KAZE::DIFF_PM_G2);
 
836
CV_WRAP
virtual
void
setDescriptorSize(
int
dsize) = 0;
 
837
CV_WRAP
virtual
int
getDescriptorSize()
const
= 0;
 
839
CV_WRAP
virtual
void
setDescriptorChannels(
int
dch) = 0;
 
840
CV_WRAP
virtual
int
getDescriptorChannels()
const
= 0;
 
842
CV_WRAP
virtual
void
setThreshold(
double
threshold) = 0;
 
843
CV_WRAP
virtual
double
getThreshold()
const
= 0;
 
845
CV_WRAP
virtual
void
setNOctaves(
int
octaves) = 0;
 
846
CV_WRAP
virtual
int
getNOctaves()
const
= 0;
 
848
CV_WRAP
virtual
void
setNOctaveLayers(
int
octaveLayers) = 0;
 
849
CV_WRAP
virtual
int
getNOctaveLayers()
const
= 0;
 
851
CV_WRAP
virtual
void
setDiffusivity(KAZE::DiffusivityType diff) = 0;
 
852
CV_WRAP
virtual
KAZE::DiffusivityType getDiffusivity()
const
= 0;
 
853
CV_WRAP
virtual
String getDefaultName() const CV_OVERRIDE;
 
868
template<>
struct
Accumulator<unsigned char>  {
typedef
float
Type; };
 
869
template<>
struct
Accumulator<unsigned short> {
typedef
float
Type; };
 
881
typedef
typename
Accumulator<T>::Type ResultType;
 
883
ResultType operator()(
const
T* a,
const
T* b,
int
size )
const
 
885
return
normL2Sqr<ValueType, ResultType>(a, b, size);
 
897
typedef
typename
Accumulator<T>::Type ResultType;
 
899
ResultType operator()(
const
T* a,
const
T* b,
int
size )
const
 
901
return
(ResultType)
std::sqrt((
double)normL2Sqr<ValueType, ResultType>(a, b, size));
 
913
typedef
typename
Accumulator<T>::Type ResultType;
 
915
ResultType operator()(
const
T* a,
const
T* b,
int
size )
const
 
917
return
normL1<ValueType, ResultType>(a, b, size);
 
941
BRUTEFORCE_HAMMING    = 4,
 
942
BRUTEFORCE_HAMMINGLUT = 5,
 
956
CV_WRAP
virtual
void
add( InputArrayOfArrays descriptors );
 
960
CV_WRAP
const
std::vector<Mat>& getTrainDescriptors()
const;
 
964
CV_WRAP
virtual
void
clear() CV_OVERRIDE;
 
968
CV_WRAP virtual
bool
empty() const CV_OVERRIDE;
 
972
CV_WRAP virtual
bool
isMaskSupported() const = 0;
 
981
CV_WRAP virtual
void
train();
 
999
CV_WRAP
void
match( InputArray queryDescriptors, InputArray trainDescriptors,
 
1000
CV_OUT std::vector<
DMatch>& matches, InputArray mask=noArray() ) const;
 
1020
CV_WRAP
void
knnMatch( InputArray queryDescriptors, InputArray trainDescriptors,
 
1021
CV_OUT std::vector<std::vector<
DMatch> >& matches,
int
k,
 
1022
InputArray mask=noArray(),
bool
compactResult=false ) const;
 
1043
CV_WRAP
void
radiusMatch( InputArray queryDescriptors, InputArray trainDescriptors,
 
1044
CV_OUT std::vector<std::vector<
DMatch> >& matches,
float
maxDistance,
 
1045
InputArray mask=noArray(),
bool
compactResult=false ) const;
 
1054
CV_WRAP
void
match( InputArray queryDescriptors, CV_OUT std::vector<
DMatch>& matches,
 
1055
InputArrayOfArrays masks=noArray() );
 
1067
CV_WRAP
void
knnMatch( InputArray queryDescriptors, CV_OUT std::vector<std::vector<
DMatch> >& matches,
int
k,
 
1068
InputArrayOfArrays masks=noArray(),
bool
compactResult=false );
 
1081
CV_WRAP
void
radiusMatch( InputArray queryDescriptors, CV_OUT std::vector<std::vector<
DMatch> >& matches,
float
maxDistance,
 
1082
InputArrayOfArrays masks=noArray(),
bool
compactResult=false );
 
1085
CV_WRAP
void
write( const String& fileName )
const
 
1091
CV_WRAP
void
read(
const
String& fileName )
 
1098
CV_WRAP
virtual
void
read(
const
FileNode& ) CV_OVERRIDE;
 
1142
void
set(
const
std::vector<Mat>& descriptors );
 
1143
virtual
void
clear();
 
1145
const
Mat& getDescriptors()
const;
 
1146
const
Mat
getDescriptor(
int
imgIdx,
int
localDescIdx )
const;
 
1147
const
Mat
getDescriptor(
int
globalDescIdx )
const;
 
1148
void
getLocalIdx(
int
globalDescIdx,
int& imgIdx,
int& localDescIdx )
const;
 
1153
Mat
mergedDescriptors;
 
1154
std::vector<int> startIdxs;
 
1160
virtual
void
knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches,
int
k,
 
1161
InputArrayOfArrays masks=noArray(),
bool
compactResult=
false
) = 0;
 
1162
virtual
void
radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches,
float
maxDistance,
 
1163
InputArrayOfArrays masks=noArray(),
bool
compactResult=
false
) = 0;
 
1165
static
bool
isPossibleMatch( InputArray mask,
int
queryIdx,
int
trainIdx );
 
1166
static
bool
isMaskedOut( InputArrayOfArrays masks,
int
queryIdx );
 
1168
static
Mat
clone_op(
Mat
m ) {
return
m.
clone(); }
 
1169
void
checkMasks( InputArrayOfArrays masks,
int
queryDescriptorsCount )
const;
 
1173
std::vector<UMat> utrainDescCollection;
 
1211
virtual
void
knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<
DMatch> >& matches,
int
k,
 
1212
InputArrayOfArrays masks=noArray(),
bool
compactResult=false ) CV_OVERRIDE;
 
1213
virtual
void
radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<
DMatch> >& matches,
float
maxDistance,
 
1214
InputArrayOfArrays masks=noArray(),
bool
compactResult=false ) CV_OVERRIDE;
 
1220
#if defined(HAVE_OPENCV_FLANN) || defined(CV_DOXYGEN)
 
1235
virtual
void
add( InputArrayOfArrays descriptors ) CV_OVERRIDE;
 
1236
virtual
void
clear() CV_OVERRIDE;
 
1239
virtual
void
read(
const
FileNode& ) CV_OVERRIDE;
 
1241
virtual
void
write(
FileStorage& )
const
CV_OVERRIDE;
 
1243
virtual
void
train() CV_OVERRIDE;
 
1244
virtual
bool
isMaskSupported()
const
CV_OVERRIDE;
 
1251
const
Mat& indices,
const
Mat& distances,
 
1252
std::vector<std::vector<DMatch> >& matches );
 
1254
virtual
void
knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches,
int
k,
 
1255
InputArrayOfArrays masks=noArray(),
bool
compactResult=
false
) CV_OVERRIDE;
 
1256
virtual
void
radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches,
float
maxDistance,
 
1257
InputArrayOfArrays masks=noArray(),
bool
compactResult=
false
) CV_OVERRIDE;
 
1334
InputArray img2, const std::vector<
KeyPoint>& keypoints2,
 
1341
InputArray img2, const std::vector<
KeyPoint>& keypoints2,
 
1343
const
int
matchesThickness, const
Scalar& matchColor=
Scalar::all(-1),
 
1344
const
Scalar& singlePointColor=
Scalar::all(-1), const std::vector<
char>& matchesMask=std::vector<
char>(),
 
1348
InputArray img2, const std::vector<
KeyPoint>& keypoints2,
 
1359CV_EXPORTS
void
evaluateFeatureDetector( const
Mat& img1, const
Mat& img2, const
Mat& H1to2,
 
1361
float& repeatability,
int& correspCount,
 
1364CV_EXPORTS
void
computeRecallPrecisionCurve( const std::vector<std::vector<
DMatch> >& matches1to2,
 
1365
const std::vector<std::vector<uchar> >& correctMatches1to2Mask,
 
1366
std::vector<
Point2f>& recallPrecisionCurve );
 
1368CV_EXPORTS
float
getRecall( const std::vector<
Point2f>& recallPrecisionCurve,
float
l_precision );
 
1369CV_EXPORTS
int
getNearestPoint( const std::vector<
Point2f>& recallPrecisionCurve,
float
l_precision );
 
1400
CV_WRAP
const
std::vector<Mat>& getDescriptors()
const;
 
1404
CV_WRAP
int
descriptorsCount()
const;
 
1406
CV_WRAP
virtual
void
clear();
 
1409
CV_WRAP
virtual
Mat
cluster()
const
= 0;
 
1420
CV_WRAP
virtual
Mat
cluster(
const
Mat& descriptors )
const
= 0;
 
1423
std::vector<Mat> descriptors;
 
1441
CV_WRAP
virtual
Mat
cluster() const CV_OVERRIDE;
 
1442
CV_WRAP virtual
Mat
cluster( const
Mat& descriptors ) const CV_OVERRIDE;
 
1483
CV_WRAP
void
setVocabulary(
const
Mat& vocabulary );
 
1487
CV_WRAP
const
Mat& getVocabulary()
const;
 
1500
std::vector<std::vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
 
1509
std::vector<std::vector<int> >* pointIdxsOfClusters=0 );
 
1512
CV_WRAP_AS(compute)
void
compute2(
const
Mat& image, std::vector<KeyPoint>& keypoints, CV_OUT
Mat& imgDescriptor )
 
1513
{ compute(image,keypoints,imgDescriptor); }
 
1517
CV_WRAP
int
descriptorSize()
const;
 
1521
CV_WRAP
int
descriptorType()
const;
 
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition:
mat.hpp:295
 
Class implementing the AKAZE keypoint detector and descriptor extractor, described in .
Definition:
features2d.hpp:805
 
DescriptorType
Definition:
features2d.hpp:809
 
Class for implementing the wrapper which makes detectors and extractors to be affine invariant,...
Definition:
features2d.hpp:235
 
Wrapping class for feature detection using the AGAST method. :
Definition:
features2d.hpp:583
 
This is a base class for all more or less complex algorithms in OpenCV
Definition:
core.hpp:3091
 
virtual void write(FileStorage &fs) const
Stores algorithm parameters in a file storage
Definition:
core.hpp:3102
 
Brute-force descriptor matcher.
Definition:
features2d.hpp:1183
 
virtual Ptr< DescriptorMatcher > clone(bool emptyTrainData=false) const CV_OVERRIDE
Clones the matcher.
 
virtual bool isMaskSupported() const CV_OVERRIDE
Returns true if the descriptor matcher supports masking permissible matches.
Definition:
features2d.hpp:1193
 
kmeans -based class to train visual vocabulary using the bag of visual words approach....
Definition:
features2d.hpp:1430
 
Abstract base class for training the bag of visual words vocabulary from a set of descriptors.
Definition:
features2d.hpp:1384
 
Class implementing the BRISK keypoint detector and descriptor extractor, described in  .
Definition:
features2d.hpp:324
 
Class for matching keypoint descriptors
Definition:
core/types.hpp:809
 
Definition:
features2d.hpp:1135
 
Abstract base class for matching keypoint descriptors.
Definition:
features2d.hpp:934
 
virtual void knnMatchImpl(InputArray queryDescriptors, std::vector< std::vector< DMatch > > &matches, int k, InputArrayOfArrays masks=noArray(), bool compactResult=false)=0
 
std::vector< Mat > trainDescCollection
Collection of descriptors from train images.
Definition:
features2d.hpp:1172
 
virtual void write(FileStorage &) const CV_OVERRIDE
Stores algorithm parameters in a file storage
 
Wrapping class for feature detection using the FAST method. :
Definition:
features2d.hpp:523
 
Abstract base class for 2D image feature detectors and descriptor extractors
Definition:
features2d.hpp:135
 
virtual void write(FileStorage &) const CV_OVERRIDE
Stores algorithm parameters in a file storage
 
File Storage Node class.
Definition:
persistence.hpp:482
 
XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or readi...
Definition:
persistence.hpp:304
 
@ WRITE
value, open the file for writing
Definition:
persistence.hpp:310
 
@ READ
value, open the file for reading
Definition:
persistence.hpp:309
 
Wrapping class for feature detection using the goodFeaturesToTrack function. :
Definition:
features2d.hpp:638
 
Class implementing the KAZE keypoint detector and descriptor extractor, described in  .
Definition:
features2d.hpp:743
 
Data structure for salient point detectors.
Definition:
core/types.hpp:712
 
A class filters a vector of keypoints.
Definition:
features2d.hpp:93
 
Maximally stable extremal region extractor
Definition:
features2d.hpp:472
 
n-dimensional dense array class
Definition:
mat.hpp:802
 
Mat clone() const CV_NODISCARD
Creates a full copy of the array and the underlying data.
 
Class implementing the ORB (oriented BRIEF) keypoint detector and descriptor extractor
Definition:
features2d.hpp:388
 
Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform ...
Definition:
features2d.hpp:260
 
Class for extracting blobs from an image. :
Definition:
features2d.hpp:696
 
Template class for specifying the size of an image or rectangle.
Definition:
core/types.hpp:316
 
The class defining termination criteria for iterative algorithms.
Definition:
core/types.hpp:853
 
CV_EXPORTS_AS(calibrateCameraExtended) double calibrateCamera(InputArrayOfArrays objectPoints
Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
CV_EXPORTS_W void sqrt(InputArray src, OutputArray dst)
Calculates a square root of array elements.
 
CV_EXPORTS_W void add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1)
Calculates the per-element sum of two arrays or an array and a scalar.
 
NormTypes
Definition:
base.hpp:159
 
@ NORM_L2
Definition:
base.hpp:185
 
@ NORM_L1
Definition:
base.hpp:176
 
@ NORM_L2SQR
Definition:
base.hpp:194
 
@ KMEANS_PP_CENTERS
Definition:
core.hpp:217
 
CV_EXPORTS_W void drawMatches(InputArray img1, const std::vector< KeyPoint > &keypoints1, InputArray img2, const std::vector< KeyPoint > &keypoints2, const std::vector< DMatch > &matches1to2, InputOutputArray outImg, const Scalar &matchColor=Scalar::all(-1), const Scalar &singlePointColor=Scalar::all(-1), const std::vector< char > &matchesMask=std::vector< char >(), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT)
Draws the found matches of keypoints from two images.
 
DrawMatchesFlags
Definition:
features2d.hpp:1279
 
CV_EXPORTS_W void drawKeypoints(InputArray image, const std::vector< KeyPoint > &keypoints, InputOutputArray outImage, const Scalar &color=Scalar::all(-1), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT)
Draws keypoints.
 
@ NOT_DRAW_SINGLE_POINTS
Single keypoints will not be drawn.
 
Feature2D FeatureDetector
Definition:
features2d.hpp:221
 
CV_EXPORTS void FAST(InputArray image, CV_OUT std::vector< KeyPoint > &keypoints, int threshold, bool nonmaxSuppression=true)
 
CV_EXPORTS void AGAST(InputArray image, CV_OUT std::vector< KeyPoint > &keypoints, int threshold, bool nonmaxSuppression=true)
 
Feature2D DescriptorExtractor
Definition:
features2d.hpp:228
 
CV_EXPORTS CV_WRAP_AS(goodFeaturesToTrackWithQuality) void goodFeaturesToTrack(InputArray image
Same as above, but returns also quality measure of the detected corners.
 
CV_EXPORTS_W double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
Applies a fixed-level threshold to each array element.
 
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75
 
Definition:
features2d.hpp:864
 
Definition:
features2d.hpp:910
 
Definition:
features2d.hpp:894
 
Definition:
cvstd_wrapper.hpp:74
 
Definition:
features2d.hpp:878
 
Definition:
features2d.hpp:699