@techstark/opencv-js 4.8.0-release.7 → 4.8.0-release.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +18 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types/_cv.d.ts +7 -0
- package/dist/src/types/_cv.js +3 -0
- package/dist/src/types/_cv.js.map +1 -0
- package/dist/src/types/emscripten.d.ts +166 -0
- package/dist/src/types/emscripten.js +4 -0
- package/dist/src/types/emscripten.js.map +1 -0
- package/dist/src/types/opencv/Affine3.d.ts +183 -0
- package/dist/src/types/opencv/Affine3.js +3 -0
- package/dist/src/types/opencv/Affine3.js.map +1 -0
- package/dist/src/types/opencv/Algorithm.d.ts +105 -0
- package/dist/src/types/opencv/Algorithm.js +4 -0
- package/dist/src/types/opencv/Algorithm.js.map +1 -0
- package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
- package/dist/src/types/opencv/AutoBuffer.js +3 -0
- package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
- package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
- package/dist/src/types/opencv/BFMatcher.js +3 -0
- package/dist/src/types/opencv/BFMatcher.js.map +1 -0
- package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
- package/dist/src/types/opencv/BOWTrainer.js +3 -0
- package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
- package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
- package/dist/src/types/opencv/CascadeClassifier.js +4 -0
- package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
- package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
- package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
- package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
- package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
- package/dist/src/types/opencv/DynamicBitset.js +3 -0
- package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
- package/dist/src/types/opencv/Exception.d.ts +38 -0
- package/dist/src/types/opencv/Exception.js +3 -0
- package/dist/src/types/opencv/Exception.js.map +1 -0
- package/dist/src/types/opencv/Feature2D.d.ts +14 -0
- package/dist/src/types/opencv/Feature2D.js +4 -0
- package/dist/src/types/opencv/Feature2D.js.map +1 -0
- package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
- package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
- package/dist/src/types/opencv/HOGDescriptor.js +3 -0
- package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
- package/dist/src/types/opencv/Logger.d.ts +27 -0
- package/dist/src/types/opencv/Logger.js +3 -0
- package/dist/src/types/opencv/Logger.js.map +1 -0
- package/dist/src/types/opencv/LshTable.d.ts +67 -0
- package/dist/src/types/opencv/LshTable.js +3 -0
- package/dist/src/types/opencv/LshTable.js.map +1 -0
- package/dist/src/types/opencv/Mat.d.ts +1589 -0
- package/dist/src/types/opencv/Mat.js +4 -0
- package/dist/src/types/opencv/Mat.js.map +1 -0
- package/dist/src/types/opencv/MatExpr.d.ts +78 -0
- package/dist/src/types/opencv/MatExpr.js +4 -0
- package/dist/src/types/opencv/MatExpr.js.map +1 -0
- package/dist/src/types/opencv/MatOp.d.ts +29 -0
- package/dist/src/types/opencv/MatOp.js +3 -0
- package/dist/src/types/opencv/MatOp.js.map +1 -0
- package/dist/src/types/opencv/Matx.d.ts +84 -0
- package/dist/src/types/opencv/Matx.js +3 -0
- package/dist/src/types/opencv/Matx.js.map +1 -0
- package/dist/src/types/opencv/Node.d.ts +25 -0
- package/dist/src/types/opencv/Node.js +3 -0
- package/dist/src/types/opencv/Node.js.map +1 -0
- package/dist/src/types/opencv/ORB.d.ts +11 -0
- package/dist/src/types/opencv/ORB.js +4 -0
- package/dist/src/types/opencv/ORB.js.map +1 -0
- package/dist/src/types/opencv/PCA.d.ts +170 -0
- package/dist/src/types/opencv/PCA.js +3 -0
- package/dist/src/types/opencv/PCA.js.map +1 -0
- package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
- package/dist/src/types/opencv/RotatedRect.js +3 -0
- package/dist/src/types/opencv/RotatedRect.js.map +1 -0
- package/dist/src/types/opencv/_hacks.d.ts +265 -0
- package/dist/src/types/opencv/_hacks.js +15 -0
- package/dist/src/types/opencv/_hacks.js.map +1 -0
- package/dist/src/types/opencv/_types.d.ts +44 -0
- package/dist/src/types/opencv/_types.js +61 -0
- package/dist/src/types/opencv/_types.js.map +1 -0
- package/dist/src/types/opencv/calib3d.d.ts +2180 -0
- package/dist/src/types/opencv/calib3d.js +3 -0
- package/dist/src/types/opencv/calib3d.js.map +1 -0
- package/dist/src/types/opencv/core_array.d.ts +2513 -0
- package/dist/src/types/opencv/core_array.js +3 -0
- package/dist/src/types/opencv/core_array.js.map +1 -0
- package/dist/src/types/opencv/core_cluster.d.ts +54 -0
- package/dist/src/types/opencv/core_cluster.js +3 -0
- package/dist/src/types/opencv/core_cluster.js.map +1 -0
- package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
- package/dist/src/types/opencv/core_hal_interface.js +3 -0
- package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
- package/dist/src/types/opencv/core_utils.d.ts +510 -0
- package/dist/src/types/opencv/core_utils.js +3 -0
- package/dist/src/types/opencv/core_utils.js.map +1 -0
- package/dist/src/types/opencv/dnn.d.ts +336 -0
- package/dist/src/types/opencv/dnn.js +3 -0
- package/dist/src/types/opencv/dnn.js.map +1 -0
- package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
- package/dist/src/types/opencv/features2d_draw.js +3 -0
- package/dist/src/types/opencv/features2d_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
- package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
- package/dist/src/types/opencv/imgproc_draw.js +3 -0
- package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
- package/dist/src/types/opencv/imgproc_feature.js +3 -0
- package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
- package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
- package/dist/src/types/opencv/imgproc_filter.js +3 -0
- package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
- package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
- package/dist/src/types/opencv/imgproc_hist.js +3 -0
- package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
- package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
- package/dist/src/types/opencv/imgproc_misc.js +3 -0
- package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
- package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
- package/dist/src/types/opencv/imgproc_object.js +3 -0
- package/dist/src/types/opencv/imgproc_object.js.map +1 -0
- package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
- package/dist/src/types/opencv/imgproc_shape.js +3 -0
- package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
- package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
- package/dist/src/types/opencv/imgproc_transform.js +3 -0
- package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
- package/dist/src/types/opencv/index.d.ts +4 -0
- package/dist/src/types/opencv/index.js +19 -0
- package/dist/src/types/opencv/index.js.map +1 -0
- package/dist/src/types/opencv/objdetect.d.ts +43 -0
- package/dist/src/types/opencv/objdetect.js +3 -0
- package/dist/src/types/opencv/objdetect.js.map +1 -0
- package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
- package/dist/src/types/opencv/photo_inpaint.js +3 -0
- package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
- package/dist/src/types/opencv/softdouble.d.ts +38 -0
- package/dist/src/types/opencv/softdouble.js +3 -0
- package/dist/src/types/opencv/softdouble.js.map +1 -0
- package/dist/src/types/opencv/softfloat.d.ts +38 -0
- package/dist/src/types/opencv/softfloat.js +3 -0
- package/dist/src/types/opencv/softfloat.js.map +1 -0
- package/dist/src/types/opencv/video_track.d.ts +276 -0
- package/dist/src/types/opencv/video_track.js +3 -0
- package/dist/src/types/opencv/video_track.js.map +1 -0
- package/package.json +8 -3
- package/src/index.ts +1 -0
- package/src/types/_cv.ts +6 -0
- package/src/types/emscripten.ts +286 -0
- package/src/types/opencv/Affine3.ts +206 -0
- package/src/types/opencv/Algorithm.ts +126 -0
- package/src/types/opencv/AutoBuffer.ts +50 -0
- package/src/types/opencv/BFMatcher.ts +37 -0
- package/src/types/opencv/BOWTrainer.ts +43 -0
- package/src/types/opencv/CascadeClassifier.ts +153 -0
- package/src/types/opencv/DescriptorMatcher.ts +244 -0
- package/src/types/opencv/DynamicBitset.ts +68 -0
- package/src/types/opencv/Exception.ts +54 -0
- package/src/types/opencv/Feature2D.ts +20 -0
- package/src/types/opencv/FlannBasedMatcher.ts +50 -0
- package/src/types/opencv/HOGDescriptor.ts +401 -0
- package/src/types/opencv/Logger.ts +34 -0
- package/src/types/opencv/LshTable.ts +81 -0
- package/src/types/opencv/Mat.ts +1765 -0
- package/src/types/opencv/MatExpr.ts +107 -0
- package/src/types/opencv/MatOp.ts +70 -0
- package/src/types/opencv/Matx.ts +228 -0
- package/src/types/opencv/Node.ts +33 -0
- package/src/types/opencv/ORB.ts +22 -0
- package/src/types/opencv/PCA.ts +204 -0
- package/src/types/opencv/RotatedRect.ts +72 -0
- package/src/types/opencv/_hacks.ts +323 -0
- package/src/types/opencv/_types.ts +44 -0
- package/src/types/opencv/calib3d.ts +2937 -0
- package/src/types/opencv/core_array.ts +3102 -0
- package/src/types/opencv/core_cluster.ts +81 -0
- package/src/types/opencv/core_hal_interface.ts +159 -0
- package/src/types/opencv/core_utils.ts +748 -0
- package/src/types/opencv/dnn.ts +505 -0
- package/src/types/opencv/features2d_draw.ts +114 -0
- package/src/types/opencv/imgproc_color_conversions.ts +527 -0
- package/src/types/opencv/imgproc_draw.ts +733 -0
- package/src/types/opencv/imgproc_feature.ts +681 -0
- package/src/types/opencv/imgproc_filter.ts +918 -0
- package/src/types/opencv/imgproc_hist.ts +399 -0
- package/src/types/opencv/imgproc_misc.ts +616 -0
- package/src/types/opencv/imgproc_object.ts +58 -0
- package/src/types/opencv/imgproc_shape.ts +734 -0
- package/src/types/opencv/imgproc_transform.ts +574 -0
- package/src/types/opencv/index.ts +4 -0
- package/src/types/opencv/objdetect.ts +103 -0
- package/src/types/opencv/photo_inpaint.ts +37 -0
- package/src/types/opencv/softdouble.ts +64 -0
- package/src/types/opencv/softfloat.ts +64 -0
- package/src/types/opencv/video_track.ts +372 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bool,
|
|
3
|
+
FileNode,
|
|
4
|
+
FileStorage,
|
|
5
|
+
float,
|
|
6
|
+
InputArray,
|
|
7
|
+
InputArrayOfArrays,
|
|
8
|
+
int,
|
|
9
|
+
Mat,
|
|
10
|
+
Ptr,
|
|
11
|
+
} from "./_types";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* It has two groups of match methods: for matching descriptors of an image with another image or with
|
|
15
|
+
* an image set.
|
|
16
|
+
*
|
|
17
|
+
* Source:
|
|
18
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L860).
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class DescriptorMatcher {
|
|
22
|
+
/**
|
|
23
|
+
* If the collection is not empty, the new descriptors are added to existing train descriptors.
|
|
24
|
+
*
|
|
25
|
+
* @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same
|
|
26
|
+
* train image.
|
|
27
|
+
*/
|
|
28
|
+
public add(descriptors: InputArrayOfArrays): InputArrayOfArrays;
|
|
29
|
+
|
|
30
|
+
public clear(): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
|
|
34
|
+
* that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
|
|
35
|
+
* object copy with the current parameters but with empty train data.
|
|
36
|
+
*/
|
|
37
|
+
public clone(emptyTrainData?: bool): Ptr;
|
|
38
|
+
|
|
39
|
+
public empty(): bool;
|
|
40
|
+
|
|
41
|
+
public getTrainDescriptors(): Mat;
|
|
42
|
+
|
|
43
|
+
public isMaskSupported(): bool;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* These extended variants of [DescriptorMatcher::match] methods find several best matches for each
|
|
47
|
+
* query descriptor. The matches are returned in the distance increasing order. See
|
|
48
|
+
* [DescriptorMatcher::match] for the details about query and train descriptors.
|
|
49
|
+
*
|
|
50
|
+
* @param queryDescriptors Query set of descriptors.
|
|
51
|
+
*
|
|
52
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
53
|
+
* collection stored in the class object.
|
|
54
|
+
*
|
|
55
|
+
* @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
|
|
56
|
+
*
|
|
57
|
+
* @param k Count of best matches found per each query descriptor or less if a query descriptor has
|
|
58
|
+
* less than k possible matches in total.
|
|
59
|
+
*
|
|
60
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
61
|
+
* descriptors.
|
|
62
|
+
*
|
|
63
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
64
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
65
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
66
|
+
*/
|
|
67
|
+
public knnMatch(
|
|
68
|
+
queryDescriptors: InputArray,
|
|
69
|
+
trainDescriptors: InputArray,
|
|
70
|
+
matches: any,
|
|
71
|
+
k: int,
|
|
72
|
+
mask?: InputArray,
|
|
73
|
+
compactResult?: bool,
|
|
74
|
+
): InputArray;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
78
|
+
* function only in what argument(s) it accepts.
|
|
79
|
+
*
|
|
80
|
+
* @param queryDescriptors Query set of descriptors.
|
|
81
|
+
*
|
|
82
|
+
* @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
|
|
83
|
+
*
|
|
84
|
+
* @param k Count of best matches found per each query descriptor or less if a query descriptor has
|
|
85
|
+
* less than k possible matches in total.
|
|
86
|
+
*
|
|
87
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
88
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
89
|
+
*
|
|
90
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
91
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
92
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
93
|
+
*/
|
|
94
|
+
public knnMatch(
|
|
95
|
+
queryDescriptors: InputArray,
|
|
96
|
+
matches: any,
|
|
97
|
+
k: int,
|
|
98
|
+
masks?: InputArrayOfArrays,
|
|
99
|
+
compactResult?: bool,
|
|
100
|
+
): InputArray;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* In the first variant of this method, the train descriptors are passed as an input argument. In the
|
|
104
|
+
* second variant of the method, train descriptors collection that was set by [DescriptorMatcher::add]
|
|
105
|
+
* is used. Optional mask (or masks) can be passed to specify which query and training descriptors can
|
|
106
|
+
* be matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if
|
|
107
|
+
* mask.at<uchar>(i,j) is non-zero.
|
|
108
|
+
*
|
|
109
|
+
* @param queryDescriptors Query set of descriptors.
|
|
110
|
+
*
|
|
111
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
112
|
+
* collection stored in the class object.
|
|
113
|
+
*
|
|
114
|
+
* @param matches Matches. If a query descriptor is masked out in mask , no match is added for this
|
|
115
|
+
* descriptor. So, matches size may be smaller than the query descriptors count.
|
|
116
|
+
*
|
|
117
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
118
|
+
* descriptors.
|
|
119
|
+
*/
|
|
120
|
+
public match(
|
|
121
|
+
queryDescriptors: InputArray,
|
|
122
|
+
trainDescriptors: InputArray,
|
|
123
|
+
matches: any,
|
|
124
|
+
mask?: InputArray,
|
|
125
|
+
): InputArray;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
129
|
+
* function only in what argument(s) it accepts.
|
|
130
|
+
*
|
|
131
|
+
* @param queryDescriptors Query set of descriptors.
|
|
132
|
+
*
|
|
133
|
+
* @param matches Matches. If a query descriptor is masked out in mask , no match is added for this
|
|
134
|
+
* descriptor. So, matches size may be smaller than the query descriptors count.
|
|
135
|
+
*
|
|
136
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
137
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
138
|
+
*/
|
|
139
|
+
public match(
|
|
140
|
+
queryDescriptors: InputArray,
|
|
141
|
+
matches: any,
|
|
142
|
+
masks?: InputArrayOfArrays,
|
|
143
|
+
): InputArray;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* For each query descriptor, the methods find such training descriptors that the distance between
|
|
147
|
+
* the query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches
|
|
148
|
+
* are returned in the distance increasing order.
|
|
149
|
+
*
|
|
150
|
+
* @param queryDescriptors Query set of descriptors.
|
|
151
|
+
*
|
|
152
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
153
|
+
* collection stored in the class object.
|
|
154
|
+
*
|
|
155
|
+
* @param matches Found matches.
|
|
156
|
+
*
|
|
157
|
+
* @param maxDistance Threshold for the distance between matched descriptors. Distance means here
|
|
158
|
+
* metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in
|
|
159
|
+
* Pixels)!
|
|
160
|
+
*
|
|
161
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
162
|
+
* descriptors.
|
|
163
|
+
*
|
|
164
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
165
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
166
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
167
|
+
*/
|
|
168
|
+
public radiusMatch(
|
|
169
|
+
queryDescriptors: InputArray,
|
|
170
|
+
trainDescriptors: InputArray,
|
|
171
|
+
matches: any,
|
|
172
|
+
maxDistance: float,
|
|
173
|
+
mask?: InputArray,
|
|
174
|
+
compactResult?: bool,
|
|
175
|
+
): InputArray;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
179
|
+
* function only in what argument(s) it accepts.
|
|
180
|
+
*
|
|
181
|
+
* @param queryDescriptors Query set of descriptors.
|
|
182
|
+
*
|
|
183
|
+
* @param matches Found matches.
|
|
184
|
+
*
|
|
185
|
+
* @param maxDistance Threshold for the distance between matched descriptors. Distance means here
|
|
186
|
+
* metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in
|
|
187
|
+
* Pixels)!
|
|
188
|
+
*
|
|
189
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
190
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
191
|
+
*
|
|
192
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
193
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
194
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
195
|
+
*/
|
|
196
|
+
public radiusMatch(
|
|
197
|
+
queryDescriptors: InputArray,
|
|
198
|
+
matches: any,
|
|
199
|
+
maxDistance: float,
|
|
200
|
+
masks?: InputArrayOfArrays,
|
|
201
|
+
compactResult?: bool,
|
|
202
|
+
): InputArray;
|
|
203
|
+
|
|
204
|
+
public read(fileName: String): String;
|
|
205
|
+
|
|
206
|
+
public read(fn: FileNode): FileNode;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
|
|
210
|
+
* [train()] is run every time before matching. Some descriptor matchers (for example,
|
|
211
|
+
* BruteForceMatcher) have an empty implementation of this method. Other matchers really train their
|
|
212
|
+
* inner structures (for example, [FlannBasedMatcher] trains [flann::Index] ).
|
|
213
|
+
*/
|
|
214
|
+
public train(): void;
|
|
215
|
+
|
|
216
|
+
public write(fileName: String): String;
|
|
217
|
+
|
|
218
|
+
public write(fs: FileStorage): FileStorage;
|
|
219
|
+
|
|
220
|
+
public write(fs: Ptr, name?: String): Ptr;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @param descriptorMatcherType Descriptor matcher type. Now the following matcher types are
|
|
224
|
+
* supported:
|
|
225
|
+
* BruteForce (it uses L2 )BruteForce-L1BruteForce-HammingBruteForce-Hamming(2)FlannBased
|
|
226
|
+
*/
|
|
227
|
+
public static create(descriptorMatcherType: String): Ptr;
|
|
228
|
+
|
|
229
|
+
public static create(matcherType: any): Ptr;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare const FLANNBASED: MatcherType; // initializer: = 1
|
|
233
|
+
|
|
234
|
+
export declare const BRUTEFORCE: MatcherType; // initializer: = 2
|
|
235
|
+
|
|
236
|
+
export declare const BRUTEFORCE_L1: MatcherType; // initializer: = 3
|
|
237
|
+
|
|
238
|
+
export declare const BRUTEFORCE_HAMMING: MatcherType; // initializer: = 4
|
|
239
|
+
|
|
240
|
+
export declare const BRUTEFORCE_HAMMINGLUT: MatcherType; // initializer: = 5
|
|
241
|
+
|
|
242
|
+
export declare const BRUTEFORCE_SL2: MatcherType; // initializer: = 6
|
|
243
|
+
|
|
244
|
+
export type MatcherType = any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { bool, size_t } from "./_types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Class re-implementing the boost version of it This helps not depending on boost, it also does not do
|
|
5
|
+
* the bound checks and has a way to reset a block for speed
|
|
6
|
+
*
|
|
7
|
+
* Source:
|
|
8
|
+
* [opencv2/flann/dynamic_bitset.h](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/flann/dynamic_bitset.h#L150).
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare class DynamicBitset {
|
|
12
|
+
/**
|
|
13
|
+
* default constructor
|
|
14
|
+
*/
|
|
15
|
+
public constructor();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* only constructor we use in our code
|
|
19
|
+
*
|
|
20
|
+
* @param sz the size of the bitset (in bits)
|
|
21
|
+
*/
|
|
22
|
+
public constructor(sz: size_t);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sets all the bits to 0
|
|
26
|
+
*/
|
|
27
|
+
public clear(): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* true if the bitset is empty
|
|
31
|
+
*/
|
|
32
|
+
public empty(): bool;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* set all the bits to 0
|
|
36
|
+
*/
|
|
37
|
+
public reset(): void;
|
|
38
|
+
|
|
39
|
+
public reset(index: size_t): void;
|
|
40
|
+
|
|
41
|
+
public reset_block(index: size_t): void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* resize the bitset so that it contains at least sz bits
|
|
45
|
+
*/
|
|
46
|
+
public resize(sz: size_t): void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* set a bit to true
|
|
50
|
+
*
|
|
51
|
+
* @param index the index of the bit to set to 1
|
|
52
|
+
*/
|
|
53
|
+
public set(index: size_t): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* gives the number of contained bits
|
|
57
|
+
*/
|
|
58
|
+
public size(): size_t;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* check if a bit is set
|
|
62
|
+
*
|
|
63
|
+
* true if the bit is set
|
|
64
|
+
*
|
|
65
|
+
* @param index the index of the bit to check
|
|
66
|
+
*/
|
|
67
|
+
public test(index: size_t): bool;
|
|
68
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { int } from "./_types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This class encapsulates all or almost all necessary information about the error happened in the
|
|
5
|
+
* program. The exception is usually constructed and thrown implicitly via CV_Error and CV_Error_
|
|
6
|
+
* macros.
|
|
7
|
+
*
|
|
8
|
+
* [error](#db/de0/group__core__utils_1gacbd081fdb20423a63cf731569ba70b2b})
|
|
9
|
+
*
|
|
10
|
+
* Source:
|
|
11
|
+
* [opencv2/core.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/core.hpp#L135).
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class Exception {
|
|
15
|
+
/**
|
|
16
|
+
* CVStatus
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
public code: int;
|
|
20
|
+
|
|
21
|
+
public err: String;
|
|
22
|
+
|
|
23
|
+
public file: String;
|
|
24
|
+
|
|
25
|
+
public func: String;
|
|
26
|
+
|
|
27
|
+
public line: int;
|
|
28
|
+
|
|
29
|
+
public msg: String;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Default constructor
|
|
33
|
+
*/
|
|
34
|
+
public constructor();
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Full constructor. Normally the constructor is not called explicitly. Instead, the macros
|
|
38
|
+
* [CV_Error()], [CV_Error_()] and [CV_Assert()] are used.
|
|
39
|
+
*/
|
|
40
|
+
public constructor(
|
|
41
|
+
_code: int,
|
|
42
|
+
_err: String,
|
|
43
|
+
_func: String,
|
|
44
|
+
_file: String,
|
|
45
|
+
_line: int,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
public formatMessage(): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* the error description and the context as a text string.
|
|
52
|
+
*/
|
|
53
|
+
public what(): any;
|
|
54
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* https://docs.opencv.org/4.8.0/d0/d13/classcv_1_1Feature2D.html
|
|
5
|
+
*/
|
|
6
|
+
export declare class Feature2D extends Algorithm {
|
|
7
|
+
/**
|
|
8
|
+
* Detects keypoints and computes the descriptors
|
|
9
|
+
* @param img
|
|
10
|
+
* @param mask
|
|
11
|
+
* @param keypoints
|
|
12
|
+
* @param descriptors
|
|
13
|
+
*/
|
|
14
|
+
public detectAndCompute(
|
|
15
|
+
img: Mat,
|
|
16
|
+
mask: Mat,
|
|
17
|
+
keypoints: KeyPointVector,
|
|
18
|
+
descriptors: OutputArray,
|
|
19
|
+
): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { bool, FileNode, FileStorage, InputArrayOfArrays, Ptr } from "./_types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This matcher trains [cv::flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) on a train descriptor
|
|
5
|
+
* collection and calls its nearest search methods to find the best matches. So, this matcher may be
|
|
6
|
+
* faster when matching a large train collection than the brute force matcher.
|
|
7
|
+
* [FlannBasedMatcher](#dc/de2/classcv_1_1FlannBasedMatcher}) does not support masking permissible
|
|
8
|
+
* matches of descriptor sets because [flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) does not
|
|
9
|
+
* support this. :
|
|
10
|
+
*
|
|
11
|
+
* Source:
|
|
12
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L1187).
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class FlannBasedMatcher {
|
|
16
|
+
public constructor(indexParams?: Ptr, searchParams?: Ptr);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* If the collection is not empty, the new descriptors are added to existing train descriptors.
|
|
20
|
+
*
|
|
21
|
+
* @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same
|
|
22
|
+
* train image.
|
|
23
|
+
*/
|
|
24
|
+
public add(descriptors: InputArrayOfArrays): InputArrayOfArrays;
|
|
25
|
+
|
|
26
|
+
public clear(): void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
|
|
30
|
+
* that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
|
|
31
|
+
* object copy with the current parameters but with empty train data.
|
|
32
|
+
*/
|
|
33
|
+
public clone(emptyTrainData?: bool): Ptr;
|
|
34
|
+
|
|
35
|
+
public isMaskSupported(): bool;
|
|
36
|
+
|
|
37
|
+
public read(fn: FileNode): FileNode;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
|
|
41
|
+
* [train()] is run every time before matching. Some descriptor matchers (for example,
|
|
42
|
+
* BruteForceMatcher) have an empty implementation of this method. Other matchers really train their
|
|
43
|
+
* inner structures (for example, [FlannBasedMatcher] trains [flann::Index] ).
|
|
44
|
+
*/
|
|
45
|
+
public train(): void;
|
|
46
|
+
|
|
47
|
+
public write(fs: FileStorage): FileStorage;
|
|
48
|
+
|
|
49
|
+
public static create(): Ptr;
|
|
50
|
+
}
|