@opencvjs/types 4.10.0-release.1

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.
Files changed (54) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +23 -0
  3. package/lib/index.d.ts +2 -0
  4. package/lib/opencv/Affine3.d.ts +206 -0
  5. package/lib/opencv/Algorithm.d.ts +126 -0
  6. package/lib/opencv/AutoBuffer.d.ts +50 -0
  7. package/lib/opencv/BFMatcher.d.ts +37 -0
  8. package/lib/opencv/BOWTrainer.d.ts +43 -0
  9. package/lib/opencv/CascadeClassifier.d.ts +153 -0
  10. package/lib/opencv/DescriptorMatcher.d.ts +236 -0
  11. package/lib/opencv/DynamicBitset.d.ts +68 -0
  12. package/lib/opencv/Exception.d.ts +54 -0
  13. package/lib/opencv/Feature2D.d.ts +20 -0
  14. package/lib/opencv/FlannBasedMatcher.d.ts +57 -0
  15. package/lib/opencv/HOGDescriptor.d.ts +401 -0
  16. package/lib/opencv/Logger.d.ts +34 -0
  17. package/lib/opencv/LshTable.d.ts +81 -0
  18. package/lib/opencv/Mat.d.ts +1793 -0
  19. package/lib/opencv/MatExpr.d.ts +107 -0
  20. package/lib/opencv/MatOp.d.ts +72 -0
  21. package/lib/opencv/Matx.d.ts +228 -0
  22. package/lib/opencv/Node.d.ts +33 -0
  23. package/lib/opencv/ORB.d.ts +23 -0
  24. package/lib/opencv/PCA.d.ts +198 -0
  25. package/lib/opencv/RotatedRect.d.ts +73 -0
  26. package/lib/opencv/Tracker.d.ts +1 -0
  27. package/lib/opencv/TrackerMIL.d.ts +3 -0
  28. package/lib/opencv/_types.d.ts +48 -0
  29. package/lib/opencv/calib3d.d.ts +2937 -0
  30. package/lib/opencv/core_array.d.ts +3102 -0
  31. package/lib/opencv/core_cluster.d.ts +80 -0
  32. package/lib/opencv/core_hal_interface.d.ts +159 -0
  33. package/lib/opencv/core_utils.d.ts +748 -0
  34. package/lib/opencv/dnn.d.ts +505 -0
  35. package/lib/opencv/features2d_draw.d.ts +114 -0
  36. package/lib/opencv/fisheye.d.ts +26 -0
  37. package/lib/opencv/helpers.d.ts +274 -0
  38. package/lib/opencv/imgproc_color_conversions.d.ts +527 -0
  39. package/lib/opencv/imgproc_draw.d.ts +732 -0
  40. package/lib/opencv/imgproc_feature.d.ts +681 -0
  41. package/lib/opencv/imgproc_filter.d.ts +918 -0
  42. package/lib/opencv/imgproc_hist.d.ts +399 -0
  43. package/lib/opencv/imgproc_misc.d.ts +616 -0
  44. package/lib/opencv/imgproc_object.d.ts +58 -0
  45. package/lib/opencv/imgproc_shape.d.ts +724 -0
  46. package/lib/opencv/imgproc_transform.d.ts +574 -0
  47. package/lib/opencv/missing.d.ts +58 -0
  48. package/lib/opencv/objdetect.d.ts +103 -0
  49. package/lib/opencv/photo_inpaint.d.ts +39 -0
  50. package/lib/opencv/softdouble.d.ts +71 -0
  51. package/lib/opencv/softfloat.d.ts +71 -0
  52. package/lib/opencv/video_track.d.ts +370 -0
  53. package/package.json +18 -0
  54. package/tsconfig.json +15 -0
@@ -0,0 +1,401 @@
1
+ import type {
2
+ bool,
3
+ double,
4
+ FileNode,
5
+ FileStorage,
6
+ float,
7
+ InputArray,
8
+ InputOutputArray,
9
+ int,
10
+ Point,
11
+ Size,
12
+ size_t,
13
+ UMat,
14
+ } from "./_types";
15
+
16
+ /**
17
+ * the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs Dalal2005 .
18
+ *
19
+ * useful links:
20
+ *
21
+ * Source:
22
+ * [opencv2/objdetect.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/objdetect.hpp#L377).
23
+ *
24
+ */
25
+ export declare class HOGDescriptor {
26
+ public blockSize: Size;
27
+
28
+ public blockStride: Size;
29
+
30
+ public cellSize: Size;
31
+
32
+ public derivAperture: int;
33
+
34
+ public free_coef: float;
35
+
36
+ public gammaCorrection: bool;
37
+
38
+ public histogramNormType: any;
39
+
40
+ public L2HysThreshold: double;
41
+
42
+ public nbins: int;
43
+
44
+ public nlevels: int;
45
+
46
+ public oclSvmDetector: UMat;
47
+
48
+ public signedGradient: bool;
49
+
50
+ public svmDetector: any;
51
+
52
+ public winSigma: double;
53
+
54
+ public winSize: Size;
55
+
56
+ /**
57
+ * aqual to [HOGDescriptor](Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
58
+ */
59
+ public constructor();
60
+
61
+ /**
62
+ * This is an overloaded member function, provided for convenience. It differs from the above
63
+ * function only in what argument(s) it accepts.
64
+ *
65
+ * @param _winSize sets winSize with given value.
66
+ *
67
+ * @param _blockSize sets blockSize with given value.
68
+ *
69
+ * @param _blockStride sets blockStride with given value.
70
+ *
71
+ * @param _cellSize sets cellSize with given value.
72
+ *
73
+ * @param _nbins sets nbins with given value.
74
+ *
75
+ * @param _derivAperture sets derivAperture with given value.
76
+ *
77
+ * @param _winSigma sets winSigma with given value.
78
+ *
79
+ * @param _histogramNormType sets histogramNormType with given value.
80
+ *
81
+ * @param _L2HysThreshold sets L2HysThreshold with given value.
82
+ *
83
+ * @param _gammaCorrection sets gammaCorrection with given value.
84
+ *
85
+ * @param _nlevels sets nlevels with given value.
86
+ *
87
+ * @param _signedGradient sets signedGradient with given value.
88
+ */
89
+ public constructor(
90
+ _winSize: Size,
91
+ _blockSize: Size,
92
+ _blockStride: Size,
93
+ _cellSize: Size,
94
+ _nbins: int,
95
+ _derivAperture?: int,
96
+ _winSigma?: double,
97
+ _histogramNormType?: any,
98
+ _L2HysThreshold?: double,
99
+ _gammaCorrection?: bool,
100
+ _nlevels?: int,
101
+ _signedGradient?: bool,
102
+ );
103
+
104
+ /**
105
+ * This is an overloaded member function, provided for convenience. It differs from the above
106
+ * function only in what argument(s) it accepts.
107
+ *
108
+ * @param filename The file name containing HOGDescriptor properties and coefficients for the linear
109
+ * SVM classifier.
110
+ */
111
+ public constructor(filename: String);
112
+
113
+ /**
114
+ * This is an overloaded member function, provided for convenience. It differs from the above
115
+ * function only in what argument(s) it accepts.
116
+ *
117
+ * @param d the HOGDescriptor which cloned to create a new one.
118
+ */
119
+ public constructor(d: HOGDescriptor);
120
+
121
+ public checkDetectorSize(): bool;
122
+
123
+ /**
124
+ * @param img Matrix of the type CV_8U containing an image where HOG features will be calculated.
125
+ *
126
+ * @param descriptors Matrix of the type CV_32F
127
+ *
128
+ * @param winStride Window stride. It must be a multiple of block stride.
129
+ *
130
+ * @param padding Padding
131
+ *
132
+ * @param locations Vector of Point
133
+ */
134
+ public compute(
135
+ img: InputArray,
136
+ descriptors: any,
137
+ winStride?: Size,
138
+ padding?: Size,
139
+ locations?: Point,
140
+ ): InputArray;
141
+
142
+ /**
143
+ * @param img Matrix contains the image to be computed
144
+ *
145
+ * @param grad Matrix of type CV_32FC2 contains computed gradients
146
+ *
147
+ * @param angleOfs Matrix of type CV_8UC2 contains quantized gradient orientations
148
+ *
149
+ * @param paddingTL Padding from top-left
150
+ *
151
+ * @param paddingBR Padding from bottom-right
152
+ */
153
+ public computeGradient(
154
+ img: InputArray,
155
+ grad: InputOutputArray,
156
+ angleOfs: InputOutputArray,
157
+ paddingTL?: Size,
158
+ paddingBR?: Size,
159
+ ): InputArray;
160
+
161
+ /**
162
+ * @param c cloned HOGDescriptor
163
+ */
164
+ public copyTo(c: HOGDescriptor): HOGDescriptor;
165
+
166
+ /**
167
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
168
+ *
169
+ * @param foundLocations Vector of point where each point contains left-top corner point of detected
170
+ * object boundaries.
171
+ *
172
+ * @param weights Vector that will contain confidence values for each detected object.
173
+ *
174
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
175
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
176
+ * the free coefficient is omitted (which is allowed), you can specify it manually here.
177
+ *
178
+ * @param winStride Window stride. It must be a multiple of block stride.
179
+ *
180
+ * @param padding Padding
181
+ *
182
+ * @param searchLocations Vector of Point includes set of requested locations to be evaluated.
183
+ */
184
+ public detect(
185
+ img: InputArray,
186
+ foundLocations: any,
187
+ weights: any,
188
+ hitThreshold?: double,
189
+ winStride?: Size,
190
+ padding?: Size,
191
+ searchLocations?: Point,
192
+ ): InputArray;
193
+
194
+ /**
195
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
196
+ *
197
+ * @param foundLocations Vector of point where each point contains left-top corner point of detected
198
+ * object boundaries.
199
+ *
200
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
201
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
202
+ * the free coefficient is omitted (which is allowed), you can specify it manually here.
203
+ *
204
+ * @param winStride Window stride. It must be a multiple of block stride.
205
+ *
206
+ * @param padding Padding
207
+ *
208
+ * @param searchLocations Vector of Point includes locations to search.
209
+ */
210
+ public detect(
211
+ img: InputArray,
212
+ foundLocations: any,
213
+ hitThreshold?: double,
214
+ winStride?: Size,
215
+ padding?: Size,
216
+ searchLocations?: Point,
217
+ ): InputArray;
218
+
219
+ /**
220
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
221
+ *
222
+ * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
223
+ *
224
+ * @param foundWeights Vector that will contain confidence values for each detected object.
225
+ *
226
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
227
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
228
+ * the free coefficient is omitted (which is allowed), you can specify it manually here.
229
+ *
230
+ * @param winStride Window stride. It must be a multiple of block stride.
231
+ *
232
+ * @param padding Padding
233
+ *
234
+ * @param scale Coefficient of the detection window increase.
235
+ *
236
+ * @param finalThreshold Final threshold
237
+ *
238
+ * @param useMeanshiftGrouping indicates grouping algorithm
239
+ */
240
+ public detectMultiScale(
241
+ img: InputArray,
242
+ foundLocations: any,
243
+ foundWeights: any,
244
+ hitThreshold?: double,
245
+ winStride?: Size,
246
+ padding?: Size,
247
+ scale?: double,
248
+ finalThreshold?: double,
249
+ useMeanshiftGrouping?: bool,
250
+ ): InputArray;
251
+
252
+ /**
253
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
254
+ *
255
+ * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
256
+ *
257
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
258
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
259
+ * the free coefficient is omitted (which is allowed), you can specify it manually here.
260
+ *
261
+ * @param winStride Window stride. It must be a multiple of block stride.
262
+ *
263
+ * @param padding Padding
264
+ *
265
+ * @param scale Coefficient of the detection window increase.
266
+ *
267
+ * @param finalThreshold Final threshold
268
+ *
269
+ * @param useMeanshiftGrouping indicates grouping algorithm
270
+ */
271
+ public detectMultiScale(
272
+ img: InputArray,
273
+ foundLocations: any,
274
+ hitThreshold?: double,
275
+ winStride?: Size,
276
+ padding?: Size,
277
+ scale?: double,
278
+ finalThreshold?: double,
279
+ useMeanshiftGrouping?: bool,
280
+ ): InputArray;
281
+
282
+ /**
283
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
284
+ *
285
+ * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
286
+ *
287
+ * @param locations Vector of DetectionROI
288
+ *
289
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
290
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
291
+ * the free coefficient is omitted (which is allowed), you can specify it manually here.
292
+ *
293
+ * @param groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a
294
+ * group of rectangles to retain it.
295
+ */
296
+ public detectMultiScaleROI(
297
+ img: InputArray,
298
+ foundLocations: any,
299
+ locations: any,
300
+ hitThreshold?: double,
301
+ groupThreshold?: int,
302
+ ): InputArray;
303
+
304
+ /**
305
+ * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
306
+ *
307
+ * @param locations Vector of Point
308
+ *
309
+ * @param foundLocations Vector of Point where each Point is detected object's top-left point.
310
+ *
311
+ * @param confidences confidences
312
+ *
313
+ * @param hitThreshold Threshold for the distance between features and SVM classifying plane. Usually
314
+ * it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
315
+ * the free coefficient is omitted (which is allowed), you can specify it manually here
316
+ *
317
+ * @param winStride winStride
318
+ *
319
+ * @param padding padding
320
+ */
321
+ public detectROI(
322
+ img: InputArray,
323
+ locations: any,
324
+ foundLocations: any,
325
+ confidences: any,
326
+ hitThreshold?: double,
327
+ winStride?: any,
328
+ padding?: any,
329
+ ): InputArray;
330
+
331
+ public getDescriptorSize(): size_t;
332
+
333
+ public getWinSigma(): double;
334
+
335
+ /**
336
+ * @param rectList Input/output vector of rectangles. Output vector includes retained and grouped
337
+ * rectangles. (The Python list is not modified in place.)
338
+ *
339
+ * @param weights Input/output vector of weights of rectangles. Output vector includes weights of
340
+ * retained and grouped rectangles. (The Python list is not modified in place.)
341
+ *
342
+ * @param groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a
343
+ * group of rectangles to retain it.
344
+ *
345
+ * @param eps Relative difference between sides of the rectangles to merge them into a group.
346
+ */
347
+ public groupRectangles(
348
+ rectList: any,
349
+ weights: any,
350
+ groupThreshold: int,
351
+ eps: double,
352
+ ): any;
353
+
354
+ /**
355
+ * @param filename Path of the file to read.
356
+ *
357
+ * @param objname The optional name of the node to read (if empty, the first top-level node will be
358
+ * used).
359
+ */
360
+ public load(filename: String, objname?: String): String;
361
+
362
+ /**
363
+ * @param fn File node
364
+ */
365
+ public read(fn: FileNode): FileNode;
366
+
367
+ /**
368
+ * @param filename File name
369
+ *
370
+ * @param objname Object name
371
+ */
372
+ public save(filename: String, objname?: String): String;
373
+
374
+ /**
375
+ * @param svmdetector coefficients for the linear SVM classifier.
376
+ */
377
+ public setSVMDetector(svmdetector: InputArray): InputArray;
378
+
379
+ /**
380
+ * @param fs File storage
381
+ *
382
+ * @param objname Object name
383
+ */
384
+ public write(fs: FileStorage, objname: String): FileStorage;
385
+
386
+ public static getDaimlerPeopleDetector(): any;
387
+
388
+ public static getDefaultPeopleDetector(): any;
389
+ }
390
+
391
+ export declare const DEFAULT_NLEVELS: any; // initializer: = 64
392
+
393
+ export declare const DESCR_FORMAT_COL_BY_COL: DescriptorStorageFormat; // initializer:
394
+
395
+ export declare const DESCR_FORMAT_ROW_BY_ROW: DescriptorStorageFormat; // initializer:
396
+
397
+ export declare const L2Hys: HistogramNormType; // initializer: = 0
398
+
399
+ export type DescriptorStorageFormat = any;
400
+
401
+ export type HistogramNormType = any;
@@ -0,0 +1,34 @@
1
+ import type { int } from "./_types";
2
+
3
+ export declare class Logger {
4
+ public static error(fmt: any, arg121: any): int;
5
+
6
+ public static fatal(fmt: any, arg122: any): int;
7
+
8
+ public static info(fmt: any, arg123: any): int;
9
+
10
+ /**
11
+ * Print log message
12
+ *
13
+ * @param level Log level
14
+ *
15
+ * @param fmt Message format
16
+ */
17
+ public static log(level: int, fmt: any, arg124: any): int;
18
+
19
+ /**
20
+ * Sets the logging destination
21
+ *
22
+ * @param name Filename or NULL for console
23
+ */
24
+ public static setDestination(name: any): void;
25
+
26
+ /**
27
+ * Sets the logging level. All messages with lower priority will be ignored.
28
+ *
29
+ * @param level Logging level
30
+ */
31
+ public static setLevel(level: int): void;
32
+
33
+ public static warn(fmt: any, arg125: any): int;
34
+ }
@@ -0,0 +1,81 @@
1
+ import type { Bucket, BucketKey, LshStats, Matrix, size_t } from "./_types";
2
+
3
+ /**
4
+ * Lsh hash table. As its key is a sub-feature, and as usually the size of it is pretty small, we keep
5
+ * it as a continuous memory array. The value is an index in the corpus of features (we keep it as an
6
+ * unsigned int for pure memory reasons, it could be a size_t)
7
+ *
8
+ * Source:
9
+ * [opencv2/flann/lsh_table.h](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/flann/lsh_table.h#L261).
10
+ *
11
+ */
12
+ export declare class LshTable {
13
+ /**
14
+ * Default constructor
15
+ */
16
+ public constructor();
17
+
18
+ /**
19
+ * Default constructor Create the mask and allocate the memory
20
+ *
21
+ * @param feature_size is the size of the feature (considered as a ElementType[])
22
+ *
23
+ * @param key_size is the number of bits that are turned on in the feature
24
+ */
25
+ public constructor(feature_size: any, key_size: any);
26
+
27
+ public constructor(feature_size: any, subsignature_size: any);
28
+
29
+ /**
30
+ * Add a feature to the table
31
+ *
32
+ * @param value the value to store for that feature
33
+ *
34
+ * @param feature the feature itself
35
+ */
36
+ public add(value: any, feature: any): void;
37
+
38
+ /**
39
+ * Add a set of features to the table
40
+ *
41
+ * @param dataset the values to store
42
+ */
43
+ public add(dataset: Matrix): Matrix;
44
+
45
+ /**
46
+ * Get a bucket given the key
47
+ */
48
+ public getBucketFromKey(key: BucketKey): Bucket;
49
+
50
+ /**
51
+ * Compute the sub-signature of a feature
52
+ */
53
+ public getKey(arg50: any): size_t;
54
+
55
+ /**
56
+ * Return the Subsignature of a feature
57
+ *
58
+ * @param feature the feature to analyze
59
+ */
60
+ public getKey(feature: any): size_t;
61
+
62
+ /**
63
+ * Get statistics about the table
64
+ */
65
+ public getStats(): LshStats;
66
+
67
+ public getStats(): LshStats;
68
+ }
69
+
70
+ export declare const kArray: SpeedLevel; // initializer:
71
+
72
+ export declare const kBitsetHash: SpeedLevel; // initializer:
73
+
74
+ export declare const kHash: SpeedLevel; // initializer:
75
+
76
+ /**
77
+ * defines the speed fo the implementation kArray uses a vector for storing data kBitsetHash uses a
78
+ * hash map but checks for the validity of a key with a bitset kHash uses a hash map only
79
+ *
80
+ */
81
+ export type SpeedLevel = any;