@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,3102 @@
1
+ import type {
2
+ bool,
3
+ double,
4
+ InputArray,
5
+ InputArrayOfArrays,
6
+ InputOutputArray,
7
+ InputOutputArrayOfArrays,
8
+ int,
9
+ Mat,
10
+ MinMaxLoc,
11
+ OutputArray,
12
+ OutputArrayOfArrays,
13
+ Scalar,
14
+ size_t,
15
+ } from "./_types";
16
+ /*
17
+ * # Operations on arrays
18
+ *
19
+ */
20
+ /**
21
+ * The function [cv::absdiff] calculates: Absolute difference between two arrays when they have the
22
+ * same size and type: `\\[\\texttt{dst}(I) = \\texttt{saturate} (| \\texttt{src1}(I) -
23
+ * \\texttt{src2}(I)|)\\]` Absolute difference between an array and a scalar when the second array is
24
+ * constructed from Scalar or has as many elements as the number of channels in `src1`:
25
+ * `\\[\\texttt{dst}(I) = \\texttt{saturate} (| \\texttt{src1}(I) - \\texttt{src2} |)\\]` Absolute
26
+ * difference between a scalar and an array when the first array is constructed from Scalar or has as
27
+ * many elements as the number of channels in `src2`: `\\[\\texttt{dst}(I) = \\texttt{saturate} (|
28
+ * \\texttt{src1} - \\texttt{src2}(I) |)\\]` where I is a multi-dimensional index of array elements. In
29
+ * case of multi-channel arrays, each channel is processed independently.
30
+ *
31
+ * Saturation is not applied when the arrays have the depth CV_32S. You may even get a negative value
32
+ * in the case of overflow.
33
+ *
34
+ * cv::abs(const Mat&)
35
+ *
36
+ * @param src1 first input array or a scalar.
37
+ *
38
+ * @param src2 second input array or a scalar.
39
+ *
40
+ * @param dst output array that has the same size and type as input arrays.
41
+ */
42
+ export declare function absdiff(
43
+ src1: InputArray,
44
+ src2: InputArray,
45
+ dst: OutputArray,
46
+ ): void;
47
+
48
+ /**
49
+ * The function add calculates:
50
+ *
51
+ * Sum of two arrays when both input arrays have the same size and the same number of channels:
52
+ * `\\[\\texttt{dst}(I) = \\texttt{saturate} ( \\texttt{src1}(I) + \\texttt{src2}(I)) \\quad
53
+ * \\texttt{if mask}(I) \\ne0\\]`
54
+ * Sum of an array and a scalar when src2 is constructed from Scalar or has the same number of elements
55
+ * as `src1.channels()`: `\\[\\texttt{dst}(I) = \\texttt{saturate} ( \\texttt{src1}(I) + \\texttt{src2}
56
+ * ) \\quad \\texttt{if mask}(I) \\ne0\\]`
57
+ * Sum of a scalar and an array when src1 is constructed from Scalar or has the same number of elements
58
+ * as `src2.channels()`: `\\[\\texttt{dst}(I) = \\texttt{saturate} ( \\texttt{src1} + \\texttt{src2}(I)
59
+ * ) \\quad \\texttt{if mask}(I) \\ne0\\]` where `I` is a multi-dimensional index of array elements. In
60
+ * case of multi-channel arrays, each channel is processed independently.
61
+ *
62
+ * The first function in the list above can be replaced with matrix expressions:
63
+ *
64
+ * ```cpp
65
+ * dst = src1 + src2;
66
+ * dst += src1; // equivalent to add(dst, src1, dst);
67
+ * ```
68
+ *
69
+ * The input arrays and the output array can all have the same or different depths. For example, you
70
+ * can add a 16-bit unsigned array to a 8-bit signed array and store the sum as a 32-bit floating-point
71
+ * array. Depth of the output array is determined by the dtype parameter. In the second and third cases
72
+ * above, as well as in the first case, when src1.depth() == src2.depth(), dtype can be set to the
73
+ * default -1. In this case, the output array will have the same depth as the input array, be it src1,
74
+ * src2 or both.
75
+ *
76
+ * Saturation is not applied when the output array has the depth CV_32S. You may even get result of an
77
+ * incorrect sign in the case of overflow.
78
+ *
79
+ * [subtract], [addWeighted], [scaleAdd], [Mat::convertTo]
80
+ *
81
+ * @param src1 first input array or a scalar.
82
+ *
83
+ * @param src2 second input array or a scalar.
84
+ *
85
+ * @param dst output array that has the same size and number of channels as the input array(s); the
86
+ * depth is defined by dtype or src1/src2.
87
+ *
88
+ * @param mask optional operation mask - 8-bit single channel array, that specifies elements of the
89
+ * output array to be changed.
90
+ *
91
+ * @param dtype optional depth of the output array (see the discussion below).
92
+ */
93
+ export declare function add(
94
+ src1: InputArray,
95
+ src2: InputArray,
96
+ dst: OutputArray,
97
+ mask?: InputArray,
98
+ dtype?: int,
99
+ ): void;
100
+
101
+ /**
102
+ * The function addWeighted calculates the weighted sum of two arrays as follows: `\\[\\texttt{dst}
103
+ * (I)= \\texttt{saturate} ( \\texttt{src1} (I)* \\texttt{alpha} + \\texttt{src2} (I)* \\texttt{beta} +
104
+ * \\texttt{gamma} )\\]` where I is a multi-dimensional index of array elements. In case of
105
+ * multi-channel arrays, each channel is processed independently. The function can be replaced with a
106
+ * matrix expression:
107
+ *
108
+ * ```cpp
109
+ * dst = src1*alpha + src2*beta + gamma;
110
+ * ```
111
+ *
112
+ * Saturation is not applied when the output array has the depth CV_32S. You may even get result of an
113
+ * incorrect sign in the case of overflow.
114
+ *
115
+ * [add], [subtract], [scaleAdd], [Mat::convertTo]
116
+ *
117
+ * @param src1 first input array.
118
+ *
119
+ * @param alpha weight of the first array elements.
120
+ *
121
+ * @param src2 second input array of the same size and channel number as src1.
122
+ *
123
+ * @param beta weight of the second array elements.
124
+ *
125
+ * @param gamma scalar added to each sum.
126
+ *
127
+ * @param dst output array that has the same size and number of channels as the input arrays.
128
+ *
129
+ * @param dtype optional depth of the output array; when both input arrays have the same depth, dtype
130
+ * can be set to -1, which will be equivalent to src1.depth().
131
+ */
132
+ export declare function addWeighted(
133
+ src1: InputArray,
134
+ alpha: double,
135
+ src2: InputArray,
136
+ beta: double,
137
+ gamma: double,
138
+ dst: OutputArray,
139
+ dtype?: int,
140
+ ): void;
141
+
142
+ /**
143
+ * see
144
+ */
145
+ export declare function batchDistance(
146
+ src1: InputArray,
147
+ src2: InputArray,
148
+ dist: OutputArray,
149
+ dtype: int,
150
+ nidx: OutputArray,
151
+ normType?: int,
152
+ K?: int,
153
+ mask?: InputArray,
154
+ update?: int,
155
+ crosscheck?: bool,
156
+ ): void;
157
+
158
+ /**
159
+ * The function [cv::bitwise_and] calculates the per-element bit-wise logical conjunction for: Two
160
+ * arrays when src1 and src2 have the same size: `\\[\\texttt{dst} (I) = \\texttt{src1} (I) \\wedge
161
+ * \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\]` An array and a scalar when src2 is
162
+ * constructed from Scalar or has the same number of elements as `src1.channels()`: `\\[\\texttt{dst}
163
+ * (I) = \\texttt{src1} (I) \\wedge \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\]` A scalar and
164
+ * an array when src1 is constructed from Scalar or has the same number of elements as
165
+ * `src2.channels()`: `\\[\\texttt{dst} (I) = \\texttt{src1} \\wedge \\texttt{src2} (I) \\quad
166
+ * \\texttt{if mask} (I) \\ne0\\]` In case of floating-point arrays, their machine-specific bit
167
+ * representations (usually IEEE754-compliant) are used for the operation. In case of multi-channel
168
+ * arrays, each channel is processed independently. In the second and third cases above, the scalar is
169
+ * first converted to the array type.
170
+ *
171
+ * @param src1 first input array or a scalar.
172
+ *
173
+ * @param src2 second input array or a scalar.
174
+ *
175
+ * @param dst output array that has the same size and type as the input arrays.
176
+ *
177
+ * @param mask optional operation mask, 8-bit single channel array, that specifies elements of the
178
+ * output array to be changed.
179
+ */
180
+ export declare function bitwise_and(
181
+ src1: InputArray,
182
+ src2: InputArray,
183
+ dst: OutputArray,
184
+ mask?: InputArray,
185
+ ): void;
186
+
187
+ /**
188
+ * The function [cv::bitwise_not] calculates per-element bit-wise inversion of the input array:
189
+ * `\\[\\texttt{dst} (I) = \\neg \\texttt{src} (I)\\]` In case of a floating-point input array, its
190
+ * machine-specific bit representation (usually IEEE754-compliant) is used for the operation. In case
191
+ * of multi-channel arrays, each channel is processed independently.
192
+ *
193
+ * @param src input array.
194
+ *
195
+ * @param dst output array that has the same size and type as the input array.
196
+ *
197
+ * @param mask optional operation mask, 8-bit single channel array, that specifies elements of the
198
+ * output array to be changed.
199
+ */
200
+ export declare function bitwise_not(
201
+ src: InputArray,
202
+ dst: OutputArray,
203
+ mask?: InputArray,
204
+ ): void;
205
+
206
+ /**
207
+ * The function [cv::bitwise_or] calculates the per-element bit-wise logical disjunction for: Two
208
+ * arrays when src1 and src2 have the same size: `\\[\\texttt{dst} (I) = \\texttt{src1} (I) \\vee
209
+ * \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\]` An array and a scalar when src2 is
210
+ * constructed from Scalar or has the same number of elements as `src1.channels()`: `\\[\\texttt{dst}
211
+ * (I) = \\texttt{src1} (I) \\vee \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\]` A scalar and an
212
+ * array when src1 is constructed from Scalar or has the same number of elements as `src2.channels()`:
213
+ * `\\[\\texttt{dst} (I) = \\texttt{src1} \\vee \\texttt{src2} (I) \\quad \\texttt{if mask} (I)
214
+ * \\ne0\\]` In case of floating-point arrays, their machine-specific bit representations (usually
215
+ * IEEE754-compliant) are used for the operation. In case of multi-channel arrays, each channel is
216
+ * processed independently. In the second and third cases above, the scalar is first converted to the
217
+ * array type.
218
+ *
219
+ * @param src1 first input array or a scalar.
220
+ *
221
+ * @param src2 second input array or a scalar.
222
+ *
223
+ * @param dst output array that has the same size and type as the input arrays.
224
+ *
225
+ * @param mask optional operation mask, 8-bit single channel array, that specifies elements of the
226
+ * output array to be changed.
227
+ */
228
+ export declare function bitwise_or(
229
+ src1: InputArray,
230
+ src2: InputArray,
231
+ dst: OutputArray,
232
+ mask?: InputArray,
233
+ ): void;
234
+
235
+ /**
236
+ * The function [cv::bitwise_xor] calculates the per-element bit-wise logical "exclusive-or" operation
237
+ * for: Two arrays when src1 and src2 have the same size: `\\[\\texttt{dst} (I) = \\texttt{src1} (I)
238
+ * \\oplus \\texttt{src2} (I) \\quad \\texttt{if mask} (I) \\ne0\\]` An array and a scalar when src2 is
239
+ * constructed from Scalar or has the same number of elements as `src1.channels()`: `\\[\\texttt{dst}
240
+ * (I) = \\texttt{src1} (I) \\oplus \\texttt{src2} \\quad \\texttt{if mask} (I) \\ne0\\]` A scalar and
241
+ * an array when src1 is constructed from Scalar or has the same number of elements as
242
+ * `src2.channels()`: `\\[\\texttt{dst} (I) = \\texttt{src1} \\oplus \\texttt{src2} (I) \\quad
243
+ * \\texttt{if mask} (I) \\ne0\\]` In case of floating-point arrays, their machine-specific bit
244
+ * representations (usually IEEE754-compliant) are used for the operation. In case of multi-channel
245
+ * arrays, each channel is processed independently. In the 2nd and 3rd cases above, the scalar is first
246
+ * converted to the array type.
247
+ *
248
+ * @param src1 first input array or a scalar.
249
+ *
250
+ * @param src2 second input array or a scalar.
251
+ *
252
+ * @param dst output array that has the same size and type as the input arrays.
253
+ *
254
+ * @param mask optional operation mask, 8-bit single channel array, that specifies elements of the
255
+ * output array to be changed.
256
+ */
257
+ export declare function bitwise_xor(
258
+ src1: InputArray,
259
+ src2: InputArray,
260
+ dst: OutputArray,
261
+ mask?: InputArray,
262
+ ): void;
263
+
264
+ /**
265
+ * The function computes and returns the coordinate of a donor pixel corresponding to the specified
266
+ * extrapolated pixel when using the specified extrapolation border mode. For example, if you use
267
+ * [cv::BORDER_WRAP] mode in the horizontal direction, [cv::BORDER_REFLECT_101] in the vertical
268
+ * direction and want to compute value of the "virtual" pixel Point(-5, 100) in a floating-point image
269
+ * img , it looks like:
270
+ *
271
+ * ```cpp
272
+ * float val = img.at<float>(borderInterpolate(100, img.rows, cv::BORDER_REFLECT_101),
273
+ * borderInterpolate(-5, img.cols, cv::BORDER_WRAP));
274
+ * ```
275
+ *
276
+ * Normally, the function is not called directly. It is used inside filtering functions and also in
277
+ * copyMakeBorder.
278
+ *
279
+ * [copyMakeBorder]
280
+ *
281
+ * @param p 0-based coordinate of the extrapolated pixel along one of the axes, likely <0 or >= len
282
+ *
283
+ * @param len Length of the array along the corresponding axis.
284
+ *
285
+ * @param borderType Border type, one of the BorderTypes, except for BORDER_TRANSPARENT and
286
+ * BORDER_ISOLATED . When borderType==BORDER_CONSTANT , the function always returns -1, regardless of p
287
+ * and len.
288
+ */
289
+ export declare function borderInterpolate(
290
+ p: int,
291
+ len: int,
292
+ borderType: int,
293
+ ): int;
294
+
295
+ /**
296
+ * The function [cv::calcCovarMatrix] calculates the covariance matrix and, optionally, the mean vector
297
+ * of the set of input vectors.
298
+ *
299
+ * [PCA], [mulTransposed], [Mahalanobis]
300
+ *
301
+ * @param samples samples stored as separate matrices
302
+ *
303
+ * @param nsamples number of samples
304
+ *
305
+ * @param covar output covariance matrix of the type ctype and square size.
306
+ *
307
+ * @param mean input or output (depending on the flags) array as the average value of the input
308
+ * vectors.
309
+ *
310
+ * @param flags operation flags as a combination of CovarFlags
311
+ *
312
+ * @param ctype type of the matrixl; it equals 'CV_64F' by default.
313
+ */
314
+ export declare function calcCovarMatrix(
315
+ samples: any,
316
+ nsamples: int,
317
+ covar: any,
318
+ mean: any,
319
+ flags: int,
320
+ ctype?: int,
321
+ ): void;
322
+
323
+ /**
324
+ * This is an overloaded member function, provided for convenience. It differs from the above function
325
+ * only in what argument(s) it accepts.
326
+ *
327
+ * use [COVAR_ROWS] or [COVAR_COLS] flag
328
+ *
329
+ * @param samples samples stored as rows/columns of a single matrix.
330
+ *
331
+ * @param covar output covariance matrix of the type ctype and square size.
332
+ *
333
+ * @param mean input or output (depending on the flags) array as the average value of the input
334
+ * vectors.
335
+ *
336
+ * @param flags operation flags as a combination of CovarFlags
337
+ *
338
+ * @param ctype type of the matrixl; it equals 'CV_64F' by default.
339
+ */
340
+ export declare function calcCovarMatrix(
341
+ samples: InputArray,
342
+ covar: OutputArray,
343
+ mean: InputOutputArray,
344
+ flags: int,
345
+ ctype?: int,
346
+ ): void;
347
+
348
+ /**
349
+ * The function [cv::cartToPolar] calculates either the magnitude, angle, or both for every 2D vector
350
+ * (x(I),y(I)): `\\[\\begin{array}{l} \\texttt{magnitude} (I)=
351
+ * \\sqrt{\\texttt{x}(I)^2+\\texttt{y}(I)^2} , \\\\ \\texttt{angle} (I)= \\texttt{atan2} ( \\texttt{y}
352
+ * (I), \\texttt{x} (I))[ \\cdot180 / \\pi ] \\end{array}\\]`
353
+ *
354
+ * The angles are calculated with accuracy about 0.3 degrees. For the point (0,0), the angle is set to
355
+ * 0.
356
+ *
357
+ * [Sobel], [Scharr]
358
+ *
359
+ * @param x array of x-coordinates; this must be a single-precision or double-precision floating-point
360
+ * array.
361
+ *
362
+ * @param y array of y-coordinates, that must have the same size and same type as x.
363
+ *
364
+ * @param magnitude output array of magnitudes of the same size and type as x.
365
+ *
366
+ * @param angle output array of angles that has the same size and type as x; the angles are measured in
367
+ * radians (from 0 to 2*Pi) or in degrees (0 to 360 degrees).
368
+ *
369
+ * @param angleInDegrees a flag, indicating whether the angles are measured in radians (which is by
370
+ * default), or in degrees.
371
+ */
372
+ export declare function cartToPolar(
373
+ x: InputArray,
374
+ y: InputArray,
375
+ magnitude: OutputArray,
376
+ angle: OutputArray,
377
+ angleInDegrees?: bool,
378
+ ): void;
379
+
380
+ /**
381
+ * The function [cv::checkRange] checks that every array element is neither NaN nor infinite. When
382
+ * minVal > -DBL_MAX and maxVal < DBL_MAX, the function also checks that each value is between minVal
383
+ * and maxVal. In case of multi-channel arrays, each channel is processed independently. If some values
384
+ * are out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the
385
+ * function either returns false (when quiet=true) or throws an exception.
386
+ *
387
+ * @param a input array.
388
+ *
389
+ * @param quiet a flag, indicating whether the functions quietly return false when the array elements
390
+ * are out of range or they throw an exception.
391
+ *
392
+ * @param pos optional output parameter, when not NULL, must be a pointer to array of src.dims
393
+ * elements.
394
+ *
395
+ * @param minVal inclusive lower boundary of valid values range.
396
+ *
397
+ * @param maxVal exclusive upper boundary of valid values range.
398
+ */
399
+ export declare function checkRange(
400
+ a: InputArray,
401
+ quiet?: bool,
402
+ pos?: any,
403
+ minVal?: double,
404
+ maxVal?: double,
405
+ ): bool;
406
+
407
+ /**
408
+ * The function compares: Elements of two arrays when src1 and src2 have the same size:
409
+ * `\\[\\texttt{dst} (I) = \\texttt{src1} (I) \\,\\texttt{cmpop}\\, \\texttt{src2} (I)\\]` Elements of
410
+ * src1 with a scalar src2 when src2 is constructed from Scalar or has a single element:
411
+ * `\\[\\texttt{dst} (I) = \\texttt{src1}(I) \\,\\texttt{cmpop}\\, \\texttt{src2}\\]` src1 with
412
+ * elements of src2 when src1 is constructed from Scalar or has a single element: `\\[\\texttt{dst} (I)
413
+ * = \\texttt{src1} \\,\\texttt{cmpop}\\, \\texttt{src2} (I)\\]` When the comparison result is true,
414
+ * the corresponding element of output array is set to 255. The comparison operations can be replaced
415
+ * with the equivalent matrix expressions:
416
+ *
417
+ * ```cpp
418
+ * Mat dst1 = src1 >= src2;
419
+ * Mat dst2 = src1 < 8;
420
+ * ...
421
+ * ```
422
+ *
423
+ * [checkRange], [min], [max], [threshold]
424
+ *
425
+ * @param src1 first input array or a scalar; when it is an array, it must have a single channel.
426
+ *
427
+ * @param src2 second input array or a scalar; when it is an array, it must have a single channel.
428
+ *
429
+ * @param dst output array of type ref CV_8U that has the same size and the same number of channels as
430
+ * the input arrays.
431
+ *
432
+ * @param cmpop a flag, that specifies correspondence between the arrays (cv::CmpTypes)
433
+ */
434
+ export declare function compare(
435
+ src1: InputArray,
436
+ src2: InputArray,
437
+ dst: OutputArray,
438
+ cmpop: int,
439
+ ): void;
440
+
441
+ /**
442
+ * The function [cv::completeSymm] copies the lower or the upper half of a square matrix to its another
443
+ * half. The matrix diagonal remains unchanged:
444
+ *
445
+ * `$\\texttt{m}_{ij}=\\texttt{m}_{ji}$` for `$i > j$` if lowerToUpper=false
446
+ * `$\\texttt{m}_{ij}=\\texttt{m}_{ji}$` for `$i < j$` if lowerToUpper=true
447
+ *
448
+ * [flip], [transpose]
449
+ *
450
+ * @param m input-output floating-point square matrix.
451
+ *
452
+ * @param lowerToUpper operation flag; if true, the lower half is copied to the upper half. Otherwise,
453
+ * the upper half is copied to the lower half.
454
+ */
455
+ export declare function completeSymm(
456
+ m: InputOutputArray,
457
+ lowerToUpper?: bool,
458
+ ): void;
459
+
460
+ /**
461
+ * This function converts FP32 (single precision floating point) from/to FP16 (half precision floating
462
+ * point). CV_16S format is used to represent FP16 data. There are two use modes (src -> dst): CV_32F
463
+ * -> CV_16S and CV_16S -> CV_32F. The input array has to have type of CV_32F or CV_16S to represent
464
+ * the bit depth. If the input array is neither of them, the function will raise an error. The format
465
+ * of half precision floating point is defined in IEEE 754-2008.
466
+ *
467
+ * @param src input array.
468
+ *
469
+ * @param dst output array.
470
+ */
471
+ export declare function convertFp16(src: InputArray, dst: OutputArray): void;
472
+
473
+ /**
474
+ * On each element of the input array, the function convertScaleAbs performs three operations
475
+ * sequentially: scaling, taking an absolute value, conversion to an unsigned 8-bit type:
476
+ * `\\[\\texttt{dst} (I)= \\texttt{saturate\\_cast<uchar>} (| \\texttt{src} (I)* \\texttt{alpha} +
477
+ * \\texttt{beta} |)\\]` In case of multi-channel arrays, the function processes each channel
478
+ * independently. When the output is not 8-bit, the operation can be emulated by calling the
479
+ * [Mat::convertTo] method (or by using matrix expressions) and then by calculating an absolute value
480
+ * of the result. For example:
481
+ *
482
+ * ```cpp
483
+ * Mat_<float> A(30,30);
484
+ * randu(A, Scalar(-100), Scalar(100));
485
+ * Mat_<float> B = A*5 + 3;
486
+ * B = abs(B);
487
+ * // Mat_<float> B = abs(A*5+3) will also do the job,
488
+ * // but it will allocate a temporary matrix
489
+ * ```
490
+ *
491
+ * [Mat::convertTo], cv::abs(const Mat&)
492
+ *
493
+ * @param src input array.
494
+ *
495
+ * @param dst output array.
496
+ *
497
+ * @param alpha optional scale factor.
498
+ *
499
+ * @param beta optional delta added to the scaled values.
500
+ */
501
+ export declare function convertScaleAbs(
502
+ src: InputArray,
503
+ dst: OutputArray,
504
+ alpha?: double,
505
+ beta?: double,
506
+ ): void;
507
+
508
+ /**
509
+ * The function copies the source image into the middle of the destination image. The areas to the
510
+ * left, to the right, above and below the copied source image will be filled with extrapolated pixels.
511
+ * This is not what filtering functions based on it do (they extrapolate pixels on-fly), but what other
512
+ * more complex functions, including your own, may do to simplify image boundary handling.
513
+ *
514
+ * The function supports the mode when src is already in the middle of dst . In this case, the function
515
+ * does not copy src itself but simply constructs the border, for example:
516
+ *
517
+ * ```cpp
518
+ * // let border be the same in all directions
519
+ * int border=2;
520
+ * // constructs a larger image to fit both the image and the border
521
+ * Mat gray_buf(rgb.rows + border*2, rgb.cols + border*2, rgb.depth());
522
+ * // select the middle part of it w/o copying data
523
+ * Mat gray(gray_canvas, Rect(border, border, rgb.cols, rgb.rows));
524
+ * // convert image from RGB to grayscale
525
+ * cvtColor(rgb, gray, COLOR_RGB2GRAY);
526
+ * // form a border in-place
527
+ * copyMakeBorder(gray, gray_buf, border, border,
528
+ * border, border, BORDER_REPLICATE);
529
+ * // now do some custom filtering ...
530
+ * ...
531
+ * ```
532
+ *
533
+ * When the source image is a part (ROI) of a bigger image, the function will try to use the pixels
534
+ * outside of the ROI to form a border. To disable this feature and always do extrapolation, as if src
535
+ * was not a ROI, use borderType | [BORDER_ISOLATED].
536
+ *
537
+ * [borderInterpolate]
538
+ *
539
+ * @param src Source image.
540
+ *
541
+ * @param dst Destination image of the same type as src and the size Size(src.cols+left+right,
542
+ * src.rows+top+bottom) .
543
+ *
544
+ * @param top the top pixels
545
+ *
546
+ * @param bottom the bottom pixels
547
+ *
548
+ * @param left the left pixels
549
+ *
550
+ * @param right Parameter specifying how many pixels in each direction from the source image rectangle
551
+ * to extrapolate. For example, top=1, bottom=1, left=1, right=1 mean that 1 pixel-wide border needs to
552
+ * be built.
553
+ *
554
+ * @param borderType Border type. See borderInterpolate for details.
555
+ *
556
+ * @param value Border value if borderType==BORDER_CONSTANT .
557
+ */
558
+ export declare function copyMakeBorder(
559
+ src: InputArray,
560
+ dst: OutputArray,
561
+ top: int,
562
+ bottom: int,
563
+ left: int,
564
+ right: int,
565
+ borderType: int,
566
+ value?: any,
567
+ ): void;
568
+
569
+ /**
570
+ * @param src source matrix.
571
+ *
572
+ * @param dst Destination matrix. If it does not have a proper size or type before the operation, it is
573
+ * reallocated.
574
+ *
575
+ * @param mask Operation mask of the same size as *this. Its non-zero elements indicate which matrix
576
+ * elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels.
577
+ */
578
+ export declare function copyTo(
579
+ src: InputArray,
580
+ dst: OutputArray,
581
+ mask: InputArray,
582
+ ): void;
583
+
584
+ /**
585
+ * The function returns the number of non-zero elements in src : `\\[\\sum _{I: \\; \\texttt{src} (I)
586
+ * \\ne0 } 1\\]`
587
+ *
588
+ * [mean], [meanStdDev], [norm], [minMaxLoc], [calcCovarMatrix]
589
+ *
590
+ * @param src single-channel array.
591
+ */
592
+ export declare function countNonZero(src: InputArray): int;
593
+
594
+ /**
595
+ * The function [cv::dct] performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D
596
+ * floating-point array:
597
+ *
598
+ * Forward Cosine transform of a 1D vector of N elements: `\\[Y = C^{(N)} \\cdot X\\]` where
599
+ * `\\[C^{(N)}_{jk}= \\sqrt{\\alpha_j/N} \\cos \\left ( \\frac{\\pi(2k+1)j}{2N} \\right )\\]` and
600
+ * `$\\alpha_0=1$`, `$\\alpha_j=2$` for *j > 0*.
601
+ * Inverse Cosine transform of a 1D vector of N elements: `\\[X = \\left (C^{(N)} \\right )^{-1} \\cdot
602
+ * Y = \\left (C^{(N)} \\right )^T \\cdot Y\\]` (since `$C^{(N)}$` is an orthogonal matrix, `$C^{(N)}
603
+ * \\cdot \\left(C^{(N)}\\right)^T = I$` )
604
+ * Forward 2D Cosine transform of M x N matrix: `\\[Y = C^{(N)} \\cdot X \\cdot \\left (C^{(N)} \\right
605
+ * )^T\\]`
606
+ * Inverse 2D Cosine transform of M x N matrix: `\\[X = \\left (C^{(N)} \\right )^T \\cdot X \\cdot
607
+ * C^{(N)}\\]`
608
+ *
609
+ * The function chooses the mode of operation by looking at the flags and size of the input array:
610
+ *
611
+ * If (flags & [DCT_INVERSE]) == 0 , the function does a forward 1D or 2D transform. Otherwise, it is
612
+ * an inverse 1D or 2D transform.
613
+ * If (flags & [DCT_ROWS]) != 0 , the function performs a 1D transform of each row.
614
+ * If the array is a single column or a single row, the function performs a 1D transform.
615
+ * If none of the above is true, the function performs a 2D transform.
616
+ *
617
+ * Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you can
618
+ * pad the array when necessary. Also, the function performance depends very much, and not
619
+ * monotonically, on the array size (see getOptimalDFTSize ). In the current implementation DCT of a
620
+ * vector of size N is calculated via DFT of a vector of size N/2 . Thus, the optimal DCT size N1 >= N
621
+ * can be calculated as:
622
+ *
623
+ * ```cpp
624
+ * size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); }
625
+ * N1 = getOptimalDCTSize(N);
626
+ * ```
627
+ *
628
+ * [dft] , [getOptimalDFTSize] , [idct]
629
+ *
630
+ * @param src input floating-point array.
631
+ *
632
+ * @param dst output array of the same size and type as src .
633
+ *
634
+ * @param flags transformation flags as a combination of cv::DftFlags (DCT_*)
635
+ */
636
+ export declare function dct(
637
+ src: InputArray,
638
+ dst: OutputArray,
639
+ flags?: int,
640
+ ): void;
641
+
642
+ /**
643
+ * The function [cv::determinant] calculates and returns the determinant of the specified matrix. For
644
+ * small matrices ( mtx.cols=mtx.rows<=3 ), the direct method is used. For larger matrices, the
645
+ * function uses LU factorization with partial pivoting.
646
+ *
647
+ * For symmetric positively-determined matrices, it is also possible to use eigen decomposition to
648
+ * calculate the determinant.
649
+ *
650
+ * [trace], [invert], [solve], [eigen], [MatrixExpressions]
651
+ *
652
+ * @param mtx input matrix that must have CV_32FC1 or CV_64FC1 type and square size.
653
+ */
654
+ export declare function determinant(mtx: InputArray): double;
655
+
656
+ /**
657
+ * The function [cv::dft] performs one of the following:
658
+ *
659
+ * Forward the Fourier transform of a 1D vector of N elements: `\\[Y = F^{(N)} \\cdot X,\\]` where
660
+ * `$F^{(N)}_{jk}=\\exp(-2\\pi i j k/N)$` and `$i=\\sqrt{-1}$`
661
+ * Inverse the Fourier transform of a 1D vector of N elements: `\\[\\begin{array}{l} X'= \\left
662
+ * (F^{(N)} \\right )^{-1} \\cdot Y = \\left (F^{(N)} \\right )^* \\cdot y \\\\ X = (1/N) \\cdot X,
663
+ * \\end{array}\\]` where `$F^*=\\left(\\textrm{Re}(F^{(N)})-\\textrm{Im}(F^{(N)})\\right)^T$`
664
+ * Forward the 2D Fourier transform of a M x N matrix: `\\[Y = F^{(M)} \\cdot X \\cdot F^{(N)}\\]`
665
+ * Inverse the 2D Fourier transform of a M x N matrix: `\\[\\begin{array}{l} X'= \\left (F^{(M)}
666
+ * \\right )^* \\cdot Y \\cdot \\left (F^{(N)} \\right )^* \\\\ X = \\frac{1}{M \\cdot N} \\cdot X'
667
+ * \\end{array}\\]`
668
+ *
669
+ * In case of real (single-channel) data, the output spectrum of the forward Fourier transform or input
670
+ * spectrum of the inverse Fourier transform can be represented in a packed format called *CCS*
671
+ * (complex-conjugate-symmetrical). It was borrowed from IPL (Intel* Image Processing Library). Here is
672
+ * how 2D *CCS* spectrum looks: `\\[\\begin{bmatrix} Re Y_{0,0} & Re Y_{0,1} & Im Y_{0,1} & Re Y_{0,2}
673
+ * & Im Y_{0,2} & \\cdots & Re Y_{0,N/2-1} & Im Y_{0,N/2-1} & Re Y_{0,N/2} \\\\ Re Y_{1,0} & Re Y_{1,1}
674
+ * & Im Y_{1,1} & Re Y_{1,2} & Im Y_{1,2} & \\cdots & Re Y_{1,N/2-1} & Im Y_{1,N/2-1} & Re Y_{1,N/2}
675
+ * \\\\ Im Y_{1,0} & Re Y_{2,1} & Im Y_{2,1} & Re Y_{2,2} & Im Y_{2,2} & \\cdots & Re Y_{2,N/2-1} & Im
676
+ * Y_{2,N/2-1} & Im Y_{1,N/2} \\\\ \\hdotsfor{9} \\\\ Re Y_{M/2-1,0} & Re Y_{M-3,1} & Im Y_{M-3,1} &
677
+ * \\hdotsfor{3} & Re Y_{M-3,N/2-1} & Im Y_{M-3,N/2-1}& Re Y_{M/2-1,N/2} \\\\ Im Y_{M/2-1,0} & Re
678
+ * Y_{M-2,1} & Im Y_{M-2,1} & \\hdotsfor{3} & Re Y_{M-2,N/2-1} & Im Y_{M-2,N/2-1}& Im Y_{M/2-1,N/2}
679
+ * \\\\ Re Y_{M/2,0} & Re Y_{M-1,1} & Im Y_{M-1,1} & \\hdotsfor{3} & Re Y_{M-1,N/2-1} & Im
680
+ * Y_{M-1,N/2-1}& Re Y_{M/2,N/2} \\end{bmatrix}\\]`
681
+ *
682
+ * In case of 1D transform of a real vector, the output looks like the first row of the matrix above.
683
+ *
684
+ * So, the function chooses an operation mode depending on the flags and size of the input array:
685
+ *
686
+ * If [DFT_ROWS] is set or the input array has a single row or single column, the function performs a
687
+ * 1D forward or inverse transform of each row of a matrix when [DFT_ROWS] is set. Otherwise, it
688
+ * performs a 2D transform.
689
+ * If the input array is real and [DFT_INVERSE] is not set, the function performs a forward 1D or 2D
690
+ * transform:
691
+ *
692
+ * When [DFT_COMPLEX_OUTPUT] is set, the output is a complex matrix of the same size as input.
693
+ * When [DFT_COMPLEX_OUTPUT] is not set, the output is a real matrix of the same size as input. In case
694
+ * of 2D transform, it uses the packed format as shown above. In case of a single 1D transform, it
695
+ * looks like the first row of the matrix above. In case of multiple 1D transforms (when using the
696
+ * [DFT_ROWS] flag), each row of the output matrix looks like the first row of the matrix above.
697
+ *
698
+ * If the input array is complex and either [DFT_INVERSE] or [DFT_REAL_OUTPUT] are not set, the output
699
+ * is a complex array of the same size as input. The function performs a forward or inverse 1D or 2D
700
+ * transform of the whole input array or each row of the input array independently, depending on the
701
+ * flags DFT_INVERSE and DFT_ROWS.
702
+ * When [DFT_INVERSE] is set and the input array is real, or it is complex but [DFT_REAL_OUTPUT] is
703
+ * set, the output is a real array of the same size as input. The function performs a 1D or 2D inverse
704
+ * transformation of the whole input array or each individual row, depending on the flags [DFT_INVERSE]
705
+ * and [DFT_ROWS].
706
+ *
707
+ * If [DFT_SCALE] is set, the scaling is done after the transformation.
708
+ *
709
+ * Unlike dct , the function supports arrays of arbitrary size. But only those arrays are processed
710
+ * efficiently, whose sizes can be factorized in a product of small prime numbers (2, 3, and 5 in the
711
+ * current implementation). Such an efficient DFT size can be calculated using the getOptimalDFTSize
712
+ * method.
713
+ *
714
+ * The sample below illustrates how to calculate a DFT-based convolution of two 2D real arrays:
715
+ *
716
+ * ```cpp
717
+ * void convolveDFT(InputArray A, InputArray B, OutputArray C)
718
+ * {
719
+ * // reallocate the output array if needed
720
+ * C.create(abs(A.rows - B.rows)+1, abs(A.cols - B.cols)+1, A.type());
721
+ * Size dftSize;
722
+ * // calculate the size of DFT transform
723
+ * dftSize.width = getOptimalDFTSize(A.cols + B.cols - 1);
724
+ * dftSize.height = getOptimalDFTSize(A.rows + B.rows - 1);
725
+ *
726
+ * // allocate temporary buffers and initialize them with 0's
727
+ * Mat tempA(dftSize, A.type(), Scalar::all(0));
728
+ * Mat tempB(dftSize, B.type(), Scalar::all(0));
729
+ *
730
+ * // copy A and B to the top-left corners of tempA and tempB, respectively
731
+ * Mat roiA(tempA, Rect(0,0,A.cols,A.rows));
732
+ * A.copyTo(roiA);
733
+ * Mat roiB(tempB, Rect(0,0,B.cols,B.rows));
734
+ * B.copyTo(roiB);
735
+ *
736
+ * // now transform the padded A & B in-place;
737
+ * // use "nonzeroRows" hint for faster processing
738
+ * dft(tempA, tempA, 0, A.rows);
739
+ * dft(tempB, tempB, 0, B.rows);
740
+ *
741
+ * // multiply the spectrums;
742
+ * // the function handles packed spectrum representations well
743
+ * mulSpectrums(tempA, tempB, tempA);
744
+ *
745
+ * // transform the product back from the frequency domain.
746
+ * // Even though all the result rows will be non-zero,
747
+ * // you need only the first C.rows of them, and thus you
748
+ * // pass nonzeroRows == C.rows
749
+ * dft(tempA, tempA, DFT_INVERSE + DFT_SCALE, C.rows);
750
+ *
751
+ * // now copy the result back to C.
752
+ * tempA(Rect(0, 0, C.cols, C.rows)).copyTo(C);
753
+ *
754
+ * // all the temporary buffers will be deallocated automatically
755
+ * }
756
+ * ```
757
+ *
758
+ * To optimize this sample, consider the following approaches:
759
+ *
760
+ * Since nonzeroRows != 0 is passed to the forward transform calls and since A and B are copied to the
761
+ * top-left corners of tempA and tempB, respectively, it is not necessary to clear the whole tempA and
762
+ * tempB. It is only necessary to clear the tempA.cols - A.cols ( tempB.cols - B.cols) rightmost
763
+ * columns of the matrices.
764
+ * This DFT-based convolution does not have to be applied to the whole big arrays, especially if B is
765
+ * significantly smaller than A or vice versa. Instead, you can calculate convolution by parts. To do
766
+ * this, you need to split the output array C into multiple tiles. For each tile, estimate which parts
767
+ * of A and B are required to calculate convolution in this tile. If the tiles in C are too small, the
768
+ * speed will decrease a lot because of repeated work. In the ultimate case, when each tile in C is a
769
+ * single pixel, the algorithm becomes equivalent to the naive convolution algorithm. If the tiles are
770
+ * too big, the temporary arrays tempA and tempB become too big and there is also a slowdown because of
771
+ * bad cache locality. So, there is an optimal tile size somewhere in the middle.
772
+ * If different tiles in C can be calculated in parallel and, thus, the convolution is done by parts,
773
+ * the loop can be threaded.
774
+ *
775
+ * All of the above improvements have been implemented in [matchTemplate] and [filter2D] . Therefore,
776
+ * by using them, you can get the performance even better than with the above theoretically optimal
777
+ * implementation. Though, those two functions actually calculate cross-correlation, not convolution,
778
+ * so you need to "flip" the second convolution operand B vertically and horizontally using flip .
779
+ *
780
+ * An example using the discrete fourier transform can be found at
781
+ * opencv_source_code/samples/cpp/dft.cpp
782
+ * (Python) An example using the dft functionality to perform Wiener deconvolution can be found at
783
+ * opencv_source/samples/python/deconvolution.py
784
+ * (Python) An example rearranging the quadrants of a Fourier image can be found at
785
+ * opencv_source/samples/python/dft.py
786
+ *
787
+ * [dct] , [getOptimalDFTSize] , [mulSpectrums], [filter2D] , [matchTemplate] , [flip] , [cartToPolar]
788
+ * , [magnitude] , [phase]
789
+ *
790
+ * @param src input array that could be real or complex.
791
+ *
792
+ * @param dst output array whose size and type depends on the flags .
793
+ *
794
+ * @param flags transformation flags, representing a combination of the DftFlags
795
+ *
796
+ * @param nonzeroRows when the parameter is not zero, the function assumes that only the first
797
+ * nonzeroRows rows of the input array (DFT_INVERSE is not set) or only the first nonzeroRows of the
798
+ * output array (DFT_INVERSE is set) contain non-zeros, thus, the function can handle the rest of the
799
+ * rows more efficiently and save some time; this technique is very useful for calculating array
800
+ * cross-correlation or convolution using DFT.
801
+ */
802
+ export declare function dft(
803
+ src: InputArray,
804
+ dst: OutputArray,
805
+ flags?: int,
806
+ nonzeroRows?: int,
807
+ ): void;
808
+
809
+ /**
810
+ * The function [cv::divide] divides one array by another: `\\[\\texttt{dst(I) =
811
+ * saturate(src1(I)*scale/src2(I))}\\]` or a scalar by an array when there is no src1 :
812
+ * `\\[\\texttt{dst(I) = saturate(scale/src2(I))}\\]`
813
+ *
814
+ * Different channels of multi-channel arrays are processed independently.
815
+ *
816
+ * For integer types when src2(I) is zero, dst(I) will also be zero.
817
+ *
818
+ * In case of floating point data there is no special defined behavior for zero src2(I) values. Regular
819
+ * floating-point division is used. Expect correct IEEE-754 behaviour for floating-point data (with
820
+ * NaN, Inf result values).
821
+ *
822
+ * Saturation is not applied when the output array has the depth CV_32S. You may even get result of an
823
+ * incorrect sign in the case of overflow.
824
+ *
825
+ * [multiply], [add], [subtract]
826
+ *
827
+ * @param src1 first input array.
828
+ *
829
+ * @param src2 second input array of the same size and type as src1.
830
+ *
831
+ * @param dst output array of the same size and type as src2.
832
+ *
833
+ * @param scale scalar factor.
834
+ *
835
+ * @param dtype optional depth of the output array; if -1, dst will have depth src2.depth(), but in
836
+ * case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth().
837
+ */
838
+ export declare function divide(
839
+ src1: InputArray,
840
+ src2: InputArray,
841
+ dst: OutputArray,
842
+ scale?: double,
843
+ dtype?: int,
844
+ ): void;
845
+
846
+ /**
847
+ * This is an overloaded member function, provided for convenience. It differs from the above function
848
+ * only in what argument(s) it accepts.
849
+ */
850
+ export declare function divide(
851
+ scale: double,
852
+ src2: InputArray,
853
+ dst: OutputArray,
854
+ dtype?: int,
855
+ ): void;
856
+
857
+ /**
858
+ * The function [cv::eigen] calculates just eigenvalues, or eigenvalues and eigenvectors of the
859
+ * symmetric matrix src:
860
+ *
861
+ * ```cpp
862
+ * src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()
863
+ * ```
864
+ *
865
+ * Use [cv::eigenNonSymmetric] for calculation of real eigenvalues and eigenvectors of non-symmetric
866
+ * matrix.
867
+ *
868
+ * [eigenNonSymmetric], [completeSymm] , [PCA]
869
+ *
870
+ * @param src input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical
871
+ * (src ^T^ == src).
872
+ *
873
+ * @param eigenvalues output vector of eigenvalues of the same type as src; the eigenvalues are stored
874
+ * in the descending order.
875
+ *
876
+ * @param eigenvectors output matrix of eigenvectors; it has the same size and type as src; the
877
+ * eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding
878
+ * eigenvalues.
879
+ */
880
+ export declare function eigen(
881
+ src: InputArray,
882
+ eigenvalues: OutputArray,
883
+ eigenvectors?: OutputArray,
884
+ ): bool;
885
+
886
+ /**
887
+ * Assumes real eigenvalues.
888
+ * The function calculates eigenvalues and eigenvectors (optional) of the square matrix src:
889
+ *
890
+ * ```cpp
891
+ * src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()
892
+ * ```
893
+ *
894
+ * [eigen]
895
+ *
896
+ * @param src input matrix (CV_32FC1 or CV_64FC1 type).
897
+ *
898
+ * @param eigenvalues output vector of eigenvalues (type is the same type as src).
899
+ *
900
+ * @param eigenvectors output matrix of eigenvectors (type is the same type as src). The eigenvectors
901
+ * are stored as subsequent matrix rows, in the same order as the corresponding eigenvalues.
902
+ */
903
+ export declare function eigenNonSymmetric(
904
+ src: InputArray,
905
+ eigenvalues: OutputArray,
906
+ eigenvectors: OutputArray,
907
+ ): void;
908
+
909
+ /**
910
+ * The function [cv::exp] calculates the exponent of every element of the input array:
911
+ * `\\[\\texttt{dst} [I] = e^{ src(I) }\\]`
912
+ *
913
+ * The maximum relative error is about 7e-6 for single-precision input and less than 1e-10 for
914
+ * double-precision input. Currently, the function converts denormalized values to zeros on output.
915
+ * Special values (NaN, Inf) are not handled.
916
+ *
917
+ * [log] , [cartToPolar] , [polarToCart] , [phase] , [pow] , [sqrt] , [magnitude]
918
+ *
919
+ * @param src input array.
920
+ *
921
+ * @param dst output array of the same size and type as src.
922
+ */
923
+ export declare function exp(src: InputArray, dst: OutputArray): void;
924
+
925
+ /**
926
+ * [mixChannels], [split]
927
+ *
928
+ * @param src input array
929
+ *
930
+ * @param dst output array
931
+ *
932
+ * @param coi index of channel to extract
933
+ */
934
+ export declare function extractChannel(
935
+ src: InputArray,
936
+ dst: OutputArray,
937
+ coi: int,
938
+ ): void;
939
+
940
+ /**
941
+ * Given a binary matrix (likely returned from an operation such as [threshold()], [compare()], >, ==,
942
+ * etc, return all of the non-zero indices as a [cv::Mat] or std::vector<cv::Point> (x,y) For example:
943
+ *
944
+ * ```cpp
945
+ * cv::Mat binaryImage; // input, binary image
946
+ * cv::Mat locations; // output, locations of non-zero pixels
947
+ * cv::findNonZero(binaryImage, locations);
948
+ *
949
+ * // access pixel coordinates
950
+ * Point pnt = locations.at<Point>(i);
951
+ * ```
952
+ *
953
+ * or
954
+ *
955
+ * ```cpp
956
+ * cv::Mat binaryImage; // input, binary image
957
+ * vector<Point> locations; // output, locations of non-zero pixels
958
+ * cv::findNonZero(binaryImage, locations);
959
+ *
960
+ * // access pixel coordinates
961
+ * Point pnt = locations[i];
962
+ * ```
963
+ *
964
+ * @param src single-channel array
965
+ *
966
+ * @param idx the output array, type of cv::Mat or std::vector<Point>, corresponding to non-zero
967
+ * indices in the input
968
+ */
969
+ export declare function findNonZero(src: InputArray, idx: OutputArray): void;
970
+
971
+ /**
972
+ * The function [cv::flip] flips the array in one of three different ways (row and column indices are
973
+ * 0-based): `\\[\\texttt{dst} _{ij} = \\left\\{ \\begin{array}{l l} \\texttt{src}
974
+ * _{\\texttt{src.rows}-i-1,j} & if\\; \\texttt{flipCode} = 0 \\\\ \\texttt{src} _{i,
975
+ * \\texttt{src.cols} -j-1} & if\\; \\texttt{flipCode} > 0 \\\\ \\texttt{src} _{ \\texttt{src.rows}
976
+ * -i-1, \\texttt{src.cols} -j-1} & if\\; \\texttt{flipCode} < 0 \\\\ \\end{array} \\right.\\]` The
977
+ * example scenarios of using the function are the following: Vertical flipping of the image (flipCode
978
+ * == 0) to switch between top-left and bottom-left image origin. This is a typical operation in video
979
+ * processing on Microsoft Windows* OS. Horizontal flipping of the image with the subsequent horizontal
980
+ * shift and absolute difference calculation to check for a vertical-axis symmetry (flipCode > 0).
981
+ * Simultaneous horizontal and vertical flipping of the image with the subsequent shift and absolute
982
+ * difference calculation to check for a central symmetry (flipCode < 0). Reversing the order of point
983
+ * arrays (flipCode > 0 or flipCode == 0).
984
+ *
985
+ * [transpose] , [repeat] , [completeSymm]
986
+ *
987
+ * @param src input array.
988
+ *
989
+ * @param dst output array of the same size and type as src.
990
+ *
991
+ * @param flipCode a flag to specify how to flip the array; 0 means flipping around the x-axis and
992
+ * positive value (for example, 1) means flipping around y-axis. Negative value (for example, -1) means
993
+ * flipping around both axes.
994
+ */
995
+ export declare function flip(
996
+ src: InputArray,
997
+ dst: OutputArray,
998
+ flipCode: int,
999
+ ): void;
1000
+
1001
+ /**
1002
+ * The function [cv::gemm] performs generalized matrix multiplication similar to the gemm functions in
1003
+ * BLAS level 3. For example, `gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)`
1004
+ * corresponds to `\\[\\texttt{dst} = \\texttt{alpha} \\cdot \\texttt{src1} ^T \\cdot \\texttt{src2} +
1005
+ * \\texttt{beta} \\cdot \\texttt{src3} ^T\\]`
1006
+ *
1007
+ * In case of complex (two-channel) data, performed a complex matrix multiplication.
1008
+ *
1009
+ * The function can be replaced with a matrix expression. For example, the above call can be replaced
1010
+ * with:
1011
+ *
1012
+ * ```cpp
1013
+ * dst = alpha*src1.t()*src2 + beta*src3.t();
1014
+ * ```
1015
+ *
1016
+ * [mulTransposed] , [transform]
1017
+ *
1018
+ * @param src1 first multiplied input matrix that could be real(CV_32FC1, CV_64FC1) or
1019
+ * complex(CV_32FC2, CV_64FC2).
1020
+ *
1021
+ * @param src2 second multiplied input matrix of the same type as src1.
1022
+ *
1023
+ * @param alpha weight of the matrix product.
1024
+ *
1025
+ * @param src3 third optional delta matrix added to the matrix product; it should have the same type as
1026
+ * src1 and src2.
1027
+ *
1028
+ * @param beta weight of src3.
1029
+ *
1030
+ * @param dst output matrix; it has the proper size and the same type as input matrices.
1031
+ *
1032
+ * @param flags operation flags (cv::GemmFlags)
1033
+ */
1034
+ export declare function gemm(
1035
+ src1: InputArray,
1036
+ src2: InputArray,
1037
+ alpha: double,
1038
+ src3: InputArray,
1039
+ beta: double,
1040
+ dst: OutputArray,
1041
+ flags?: int,
1042
+ ): void;
1043
+
1044
+ /**
1045
+ * DFT performance is not a monotonic function of a vector size. Therefore, when you calculate
1046
+ * convolution of two arrays or perform the spectral analysis of an array, it usually makes sense to
1047
+ * pad the input data with zeros to get a bit larger array that can be transformed much faster than the
1048
+ * original one. Arrays whose size is a power-of-two (2, 4, 8, 16, 32, ...) are the fastest to process.
1049
+ * Though, the arrays whose size is a product of 2's, 3's, and 5's (for example, 300 = 5*5*3*2*2) are
1050
+ * also processed quite efficiently.
1051
+ *
1052
+ * The function [cv::getOptimalDFTSize] returns the minimum number N that is greater than or equal to
1053
+ * vecsize so that the DFT of a vector of size N can be processed efficiently. In the current
1054
+ * implementation N = 2 ^p^ * 3 ^q^ * 5 ^r^ for some integer p, q, r.
1055
+ *
1056
+ * The function returns a negative number if vecsize is too large (very close to INT_MAX ).
1057
+ *
1058
+ * While the function cannot be used directly to estimate the optimal vector size for DCT transform
1059
+ * (since the current DCT implementation supports only even-size vectors), it can be easily processed
1060
+ * as getOptimalDFTSize((vecsize+1)/2)*2.
1061
+ *
1062
+ * [dft] , [dct] , [idft] , [idct] , [mulSpectrums]
1063
+ *
1064
+ * @param vecsize vector size.
1065
+ */
1066
+ export declare function getOptimalDFTSize(vecsize: int): int;
1067
+
1068
+ /**
1069
+ * The function horizontally concatenates two or more [cv::Mat] matrices (with the same number of
1070
+ * rows).
1071
+ *
1072
+ * ```cpp
1073
+ * cv::Mat matArray[] = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),
1074
+ * cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),
1075
+ * cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};
1076
+ *
1077
+ * cv::Mat out;
1078
+ * cv::hconcat( matArray, 3, out );
1079
+ * //out:
1080
+ * //[1, 2, 3;
1081
+ * // 1, 2, 3;
1082
+ * // 1, 2, 3;
1083
+ * // 1, 2, 3]
1084
+ * ```
1085
+ *
1086
+ * [cv::vconcat(const Mat*, size_t, OutputArray)],
1087
+ *
1088
+ * [cv::vconcat(InputArrayOfArrays, OutputArray)] and
1089
+ *
1090
+ * [cv::vconcat(InputArray, InputArray, OutputArray)]
1091
+ *
1092
+ * @param src input array or vector of matrices. all of the matrices must have the same number of rows
1093
+ * and the same depth.
1094
+ *
1095
+ * @param nsrc number of matrices in src.
1096
+ *
1097
+ * @param dst output array. It has the same number of rows and depth as the src, and the sum of cols of
1098
+ * the src.
1099
+ */
1100
+ export declare function hconcat(src: any, nsrc: size_t, dst: OutputArray): void;
1101
+
1102
+ /**
1103
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1104
+ * only in what argument(s) it accepts.
1105
+ *
1106
+ * ```cpp
1107
+ * cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 4,
1108
+ * 2, 5,
1109
+ * 3, 6);
1110
+ * cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 7, 10,
1111
+ * 8, 11,
1112
+ * 9, 12);
1113
+ *
1114
+ * cv::Mat C;
1115
+ * cv::hconcat(A, B, C);
1116
+ * //C:
1117
+ * //[1, 4, 7, 10;
1118
+ * // 2, 5, 8, 11;
1119
+ * // 3, 6, 9, 12]
1120
+ * ```
1121
+ *
1122
+ * @param src1 first input array to be considered for horizontal concatenation.
1123
+ *
1124
+ * @param src2 second input array to be considered for horizontal concatenation.
1125
+ *
1126
+ * @param dst output array. It has the same number of rows and depth as the src1 and src2, and the sum
1127
+ * of cols of the src1 and src2.
1128
+ */
1129
+ export declare function hconcat(
1130
+ src1: InputArray,
1131
+ src2: InputArray,
1132
+ dst: OutputArray,
1133
+ ): void;
1134
+
1135
+ /**
1136
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1137
+ * only in what argument(s) it accepts.
1138
+ *
1139
+ * ```cpp
1140
+ * std::vector<cv::Mat> matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),
1141
+ * cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),
1142
+ * cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};
1143
+ *
1144
+ * cv::Mat out;
1145
+ * cv::hconcat( matrices, out );
1146
+ * //out:
1147
+ * //[1, 2, 3;
1148
+ * // 1, 2, 3;
1149
+ * // 1, 2, 3;
1150
+ * // 1, 2, 3]
1151
+ * ```
1152
+ *
1153
+ * @param src input array or vector of matrices. all of the matrices must have the same number of rows
1154
+ * and the same depth.
1155
+ *
1156
+ * @param dst output array. It has the same number of rows and depth as the src, and the sum of cols of
1157
+ * the src. same depth.
1158
+ */
1159
+ export declare function hconcat(
1160
+ src: InputArrayOfArrays,
1161
+ dst: OutputArray,
1162
+ ): void;
1163
+
1164
+ /**
1165
+ * idct(src, dst, flags) is equivalent to dct(src, dst, flags | DCT_INVERSE).
1166
+ *
1167
+ * [dct], [dft], [idft], [getOptimalDFTSize]
1168
+ *
1169
+ * @param src input floating-point single-channel array.
1170
+ *
1171
+ * @param dst output array of the same size and type as src.
1172
+ *
1173
+ * @param flags operation flags.
1174
+ */
1175
+ export declare function idct(
1176
+ src: InputArray,
1177
+ dst: OutputArray,
1178
+ flags?: int,
1179
+ ): void;
1180
+
1181
+ /**
1182
+ * idft(src, dst, flags) is equivalent to dft(src, dst, flags | [DFT_INVERSE]) .
1183
+ *
1184
+ * None of dft and idft scales the result by default. So, you should pass [DFT_SCALE] to one of dft or
1185
+ * idft explicitly to make these transforms mutually inverse.
1186
+ *
1187
+ * [dft], [dct], [idct], [mulSpectrums], [getOptimalDFTSize]
1188
+ *
1189
+ * @param src input floating-point real or complex array.
1190
+ *
1191
+ * @param dst output array whose size and type depend on the flags.
1192
+ *
1193
+ * @param flags operation flags (see dft and DftFlags).
1194
+ *
1195
+ * @param nonzeroRows number of dst rows to process; the rest of the rows have undefined content (see
1196
+ * the convolution sample in dft description.
1197
+ */
1198
+ export declare function idft(
1199
+ src: InputArray,
1200
+ dst: OutputArray,
1201
+ flags?: int,
1202
+ nonzeroRows?: int,
1203
+ ): void;
1204
+
1205
+ /**
1206
+ * The function checks the range as follows:
1207
+ *
1208
+ * For every element of a single-channel input array: `\\[\\texttt{dst} (I)= \\texttt{lowerb} (I)_0
1209
+ * \\leq \\texttt{src} (I)_0 \\leq \\texttt{upperb} (I)_0\\]`
1210
+ * For two-channel arrays: `\\[\\texttt{dst} (I)= \\texttt{lowerb} (I)_0 \\leq \\texttt{src} (I)_0
1211
+ * \\leq \\texttt{upperb} (I)_0 \\land \\texttt{lowerb} (I)_1 \\leq \\texttt{src} (I)_1 \\leq
1212
+ * \\texttt{upperb} (I)_1\\]`
1213
+ * and so forth.
1214
+ *
1215
+ * That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within the specified 1D, 2D, 3D, ... box
1216
+ * and 0 otherwise.
1217
+ *
1218
+ * When the lower and/or upper boundary parameters are scalars, the indexes (I) at lowerb and upperb in
1219
+ * the above formulas should be omitted.
1220
+ *
1221
+ * @param src first input array.
1222
+ *
1223
+ * @param lowerb inclusive lower boundary array or a scalar.
1224
+ *
1225
+ * @param upperb inclusive upper boundary array or a scalar.
1226
+ *
1227
+ * @param dst output array of the same size as src and CV_8U type.
1228
+ */
1229
+ export declare function inRange(
1230
+ src: InputArray,
1231
+ lowerb: InputArray,
1232
+ upperb: InputArray,
1233
+ dst: OutputArray,
1234
+ ): void;
1235
+
1236
+ /**
1237
+ * [mixChannels], [merge]
1238
+ *
1239
+ * @param src input array
1240
+ *
1241
+ * @param dst output array
1242
+ *
1243
+ * @param coi index of channel for insertion
1244
+ */
1245
+ export declare function insertChannel(
1246
+ src: InputArray,
1247
+ dst: InputOutputArray,
1248
+ coi: int,
1249
+ ): void;
1250
+
1251
+ /**
1252
+ * The function [cv::invert] inverts the matrix src and stores the result in dst . When the matrix src
1253
+ * is singular or non-square, the function calculates the pseudo-inverse matrix (the dst matrix) so
1254
+ * that norm(src*dst - I) is minimal, where I is an identity matrix.
1255
+ *
1256
+ * In case of the [DECOMP_LU] method, the function returns non-zero value if the inverse has been
1257
+ * successfully calculated and 0 if src is singular.
1258
+ *
1259
+ * In case of the [DECOMP_SVD] method, the function returns the inverse condition number of src (the
1260
+ * ratio of the smallest singular value to the largest singular value) and 0 if src is singular. The
1261
+ * [SVD] method calculates a pseudo-inverse matrix if src is singular.
1262
+ *
1263
+ * Similarly to [DECOMP_LU], the method [DECOMP_CHOLESKY] works only with non-singular square matrices
1264
+ * that should also be symmetrical and positively defined. In this case, the function stores the
1265
+ * inverted matrix in dst and returns non-zero. Otherwise, it returns 0.
1266
+ *
1267
+ * [solve], [SVD]
1268
+ *
1269
+ * @param src input floating-point M x N matrix.
1270
+ *
1271
+ * @param dst output matrix of N x M size and the same type as src.
1272
+ *
1273
+ * @param flags inversion method (cv::DecompTypes)
1274
+ */
1275
+ export declare function invert(
1276
+ src: InputArray,
1277
+ dst: OutputArray,
1278
+ flags?: int,
1279
+ ): double;
1280
+
1281
+ /**
1282
+ * The function [cv::log] calculates the natural logarithm of every element of the input array:
1283
+ * `\\[\\texttt{dst} (I) = \\log (\\texttt{src}(I)) \\]`
1284
+ *
1285
+ * Output on zero, negative and special (NaN, Inf) values is undefined.
1286
+ *
1287
+ * [exp], [cartToPolar], [polarToCart], [phase], [pow], [sqrt], [magnitude]
1288
+ *
1289
+ * @param src input array.
1290
+ *
1291
+ * @param dst output array of the same size and type as src .
1292
+ */
1293
+ export declare function log(src: InputArray, dst: OutputArray): void;
1294
+
1295
+ /**
1296
+ * The function LUT fills the output array with values from the look-up table. Indices of the entries
1297
+ * are taken from the input array. That is, the function processes each element of src as follows:
1298
+ * `\\[\\texttt{dst} (I) \\leftarrow \\texttt{lut(src(I) + d)}\\]` where `\\[d = \\fork{0}{if
1299
+ * \\(\\texttt{src}\\) has depth \\(\\texttt{CV_8U}\\)}{128}{if \\(\\texttt{src}\\) has depth
1300
+ * \\(\\texttt{CV_8S}\\)}\\]`
1301
+ *
1302
+ * [convertScaleAbs], [Mat::convertTo]
1303
+ *
1304
+ * @param src input array of 8-bit elements.
1305
+ *
1306
+ * @param lut look-up table of 256 elements; in case of multi-channel input array, the table should
1307
+ * either have a single channel (in this case the same table is used for all channels) or the same
1308
+ * number of channels as in the input array.
1309
+ *
1310
+ * @param dst output array of the same size and number of channels as src, and the same depth as lut.
1311
+ */
1312
+ export declare function LUT(
1313
+ src: InputArray,
1314
+ lut: InputArray,
1315
+ dst: OutputArray,
1316
+ ): void;
1317
+
1318
+ /**
1319
+ * The function [cv::magnitude] calculates the magnitude of 2D vectors formed from the corresponding
1320
+ * elements of x and y arrays: `\\[\\texttt{dst} (I) = \\sqrt{\\texttt{x}(I)^2 + \\texttt{y}(I)^2}\\]`
1321
+ *
1322
+ * [cartToPolar], [polarToCart], [phase], [sqrt]
1323
+ *
1324
+ * @param x floating-point array of x-coordinates of the vectors.
1325
+ *
1326
+ * @param y floating-point array of y-coordinates of the vectors; it must have the same size as x.
1327
+ *
1328
+ * @param magnitude output array of the same size and type as x.
1329
+ */
1330
+ export declare function magnitude(
1331
+ x: InputArray,
1332
+ y: InputArray,
1333
+ magnitude: OutputArray,
1334
+ ): void;
1335
+
1336
+ /**
1337
+ * The function [cv::Mahalanobis] calculates and returns the weighted distance between two vectors:
1338
+ * `\\[d( \\texttt{vec1} , \\texttt{vec2} )=
1339
+ * \\sqrt{\\sum_{i,j}{\\texttt{icovar(i,j)}\\cdot(\\texttt{vec1}(I)-\\texttt{vec2}(I))\\cdot(\\texttt{vec1(j)}-\\texttt{vec2(j)})}
1340
+ * }\\]` The covariance matrix may be calculated using the [calcCovarMatrix] function and then inverted
1341
+ * using the invert function (preferably using the [DECOMP_SVD] method, as the most accurate).
1342
+ *
1343
+ * @param v1 first 1D input vector.
1344
+ *
1345
+ * @param v2 second 1D input vector.
1346
+ *
1347
+ * @param icovar inverse covariance matrix.
1348
+ */
1349
+ export declare function Mahalanobis(
1350
+ v1: InputArray,
1351
+ v2: InputArray,
1352
+ icovar: InputArray,
1353
+ ): double;
1354
+
1355
+ /**
1356
+ * The function [cv::max] calculates the per-element maximum of two arrays: `\\[\\texttt{dst} (I)=
1357
+ * \\max ( \\texttt{src1} (I), \\texttt{src2} (I))\\]` or array and a scalar: `\\[\\texttt{dst} (I)=
1358
+ * \\max ( \\texttt{src1} (I), \\texttt{value} )\\]`
1359
+ *
1360
+ * [min], [compare], [inRange], [minMaxLoc], [MatrixExpressions]
1361
+ *
1362
+ * @param src1 first input array.
1363
+ *
1364
+ * @param src2 second input array of the same size and type as src1 .
1365
+ *
1366
+ * @param dst output array of the same size and type as src1.
1367
+ */
1368
+ export declare function max(
1369
+ src1: InputArray,
1370
+ src2: InputArray,
1371
+ dst: OutputArray,
1372
+ ): void;
1373
+
1374
+ /**
1375
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1376
+ * only in what argument(s) it accepts. needed to avoid conflicts with const _Tp& std::min(const _Tp&,
1377
+ * const _Tp&, _Compare)
1378
+ */
1379
+ export declare function max(src1: any, src2: any, dst: any): void;
1380
+
1381
+ /**
1382
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1383
+ * only in what argument(s) it accepts. needed to avoid conflicts with const _Tp& std::min(const _Tp&,
1384
+ * const _Tp&, _Compare)
1385
+ */
1386
+ export declare function max(src1: any, src2: any, dst: any): void;
1387
+
1388
+ /**
1389
+ * The function [cv::mean] calculates the mean value M of array elements, independently for each
1390
+ * channel, and return it: `\\[\\begin{array}{l} N = \\sum _{I: \\; \\texttt{mask} (I) \\ne 0} 1 \\\\
1391
+ * M_c = \\left ( \\sum _{I: \\; \\texttt{mask} (I) \\ne 0}{ \\texttt{mtx} (I)_c} \\right )/N
1392
+ * \\end{array}\\]` When all the mask elements are 0's, the function returns Scalar::all(0)
1393
+ *
1394
+ * [countNonZero], [meanStdDev], [norm], [minMaxLoc]
1395
+ *
1396
+ * @param src input array that should have from 1 to 4 channels so that the result can be stored in
1397
+ * Scalar_ .
1398
+ *
1399
+ * @param mask optional operation mask.
1400
+ */
1401
+ export declare function mean(src: InputArray, mask?: InputArray): Scalar;
1402
+
1403
+ /**
1404
+ * Calculates a mean and standard deviation of array elements.
1405
+ *
1406
+ * The function [cv::meanStdDev] calculates the mean and the standard deviation M of array elements
1407
+ * independently for each channel and returns it via the output parameters: `\\[\\begin{array}{l} N =
1408
+ * \\sum _{I, \\texttt{mask} (I) \\ne 0} 1 \\\\ \\texttt{mean} _c = \\frac{\\sum_{ I: \\;
1409
+ * \\texttt{mask}(I) \\ne 0} \\texttt{src} (I)_c}{N} \\\\ \\texttt{stddev} _c = \\sqrt{\\frac{\\sum_{
1410
+ * I: \\; \\texttt{mask}(I) \\ne 0} \\left ( \\texttt{src} (I)_c - \\texttt{mean} _c \\right )^2}{N}}
1411
+ * \\end{array}\\]` When all the mask elements are 0's, the function returns
1412
+ * mean=stddev=Scalar::all(0).
1413
+ *
1414
+ * The calculated standard deviation is only the diagonal of the complete normalized covariance matrix.
1415
+ * If the full matrix is needed, you can reshape the multi-channel array M x N to the single-channel
1416
+ * array M*N x mtx.channels() (only possible when the matrix is continuous) and then pass the matrix to
1417
+ * calcCovarMatrix .
1418
+ *
1419
+ * [countNonZero], [mean], [norm], [minMaxLoc], [calcCovarMatrix]
1420
+ *
1421
+ * @param src input array that should have from 1 to 4 channels so that the results can be stored in
1422
+ * Scalar_ 's.
1423
+ *
1424
+ * @param mean output parameter: calculated mean value.
1425
+ *
1426
+ * @param stddev output parameter: calculated standard deviation.
1427
+ *
1428
+ * @param mask optional operation mask.
1429
+ */
1430
+ export declare function meanStdDev(
1431
+ src: InputArray,
1432
+ mean: OutputArray,
1433
+ stddev: OutputArray,
1434
+ mask?: InputArray,
1435
+ ): void;
1436
+
1437
+ /**
1438
+ * The function [cv::merge] merges several arrays to make a single multi-channel array. That is, each
1439
+ * element of the output array will be a concatenation of the elements of the input arrays, where
1440
+ * elements of i-th input array are treated as mv[i].channels()-element vectors.
1441
+ *
1442
+ * The function [cv::split] does the reverse operation. If you need to shuffle channels in some other
1443
+ * advanced way, use [cv::mixChannels].
1444
+ *
1445
+ * The following example shows how to merge 3 single channel matrices into a single 3-channel matrix.
1446
+ *
1447
+ * ```cpp
1448
+ * Mat m1 = (Mat_<uchar>(2,2) << 1,4,7,10);
1449
+ * Mat m2 = (Mat_<uchar>(2,2) << 2,5,8,11);
1450
+ * Mat m3 = (Mat_<uchar>(2,2) << 3,6,9,12);
1451
+ *
1452
+ * Mat channels[3] = {m1, m2, m3};
1453
+ * Mat m;
1454
+ * merge(channels, 3, m);
1455
+ * /*
1456
+ * m =
1457
+ * [ 1, 2, 3, 4, 5, 6;
1458
+ * 7, 8, 9, 10, 11, 12]
1459
+ * m.channels() = 3
1460
+ * \/
1461
+ * ```
1462
+ *
1463
+ * [mixChannels], [split], [Mat::reshape]
1464
+ *
1465
+ * @param mv input array of matrices to be merged; all the matrices in mv must have the same size and
1466
+ * the same depth.
1467
+ *
1468
+ * @param count number of input matrices when mv is a plain C array; it must be greater than zero.
1469
+ *
1470
+ * @param dst output array of the same size and the same depth as mv[0]; The number of channels will be
1471
+ * equal to the parameter count.
1472
+ */
1473
+ export declare function merge(mv: any, count: size_t, dst: OutputArray): void;
1474
+
1475
+ /**
1476
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1477
+ * only in what argument(s) it accepts.
1478
+ *
1479
+ * @param mv input vector of matrices to be merged; all the matrices in mv must have the same size and
1480
+ * the same depth.
1481
+ *
1482
+ * @param dst output array of the same size and the same depth as mv[0]; The number of channels will be
1483
+ * the total number of channels in the matrix array.
1484
+ */
1485
+ export declare function merge(mv: InputArrayOfArrays, dst: OutputArray): void;
1486
+
1487
+ /**
1488
+ * The function [cv::min] calculates the per-element minimum of two arrays: `\\[\\texttt{dst} (I)=
1489
+ * \\min ( \\texttt{src1} (I), \\texttt{src2} (I))\\]` or array and a scalar: `\\[\\texttt{dst} (I)=
1490
+ * \\min ( \\texttt{src1} (I), \\texttt{value} )\\]`
1491
+ *
1492
+ * [max], [compare], [inRange], [minMaxLoc]
1493
+ *
1494
+ * @param src1 first input array.
1495
+ *
1496
+ * @param src2 second input array of the same size and type as src1.
1497
+ *
1498
+ * @param dst output array of the same size and type as src1.
1499
+ */
1500
+ export declare function min(
1501
+ src1: InputArray,
1502
+ src2: InputArray,
1503
+ dst: OutputArray,
1504
+ ): void;
1505
+
1506
+ /**
1507
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1508
+ * only in what argument(s) it accepts. needed to avoid conflicts with const _Tp& std::min(const _Tp&,
1509
+ * const _Tp&, _Compare)
1510
+ */
1511
+ export declare function min(src1: any, src2: any, dst: any): void;
1512
+
1513
+ /**
1514
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1515
+ * only in what argument(s) it accepts. needed to avoid conflicts with const _Tp& std::min(const _Tp&,
1516
+ * const _Tp&, _Compare)
1517
+ */
1518
+ export declare function min(src1: any, src2: any, dst: any): void;
1519
+
1520
+ /**
1521
+ * The function [cv::minMaxIdx] finds the minimum and maximum element values and their positions. The
1522
+ * extremums are searched across the whole array or, if mask is not an empty array, in the specified
1523
+ * array region. The function does not work with multi-channel arrays. If you need to find minimum or
1524
+ * maximum elements across all the channels, use [Mat::reshape] first to reinterpret the array as
1525
+ * single-channel. Or you may extract the particular channel using either extractImageCOI , or
1526
+ * mixChannels , or split . In case of a sparse matrix, the minimum is found among non-zero elements
1527
+ * only.
1528
+ *
1529
+ * When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is a
1530
+ * single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2
1531
+ * dimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be
1532
+ * (i1,0)/(i2,0)) and single-row matrix is 1xN matrix (and therefore minIdx/maxIdx will be
1533
+ * (0,j1)/(0,j2)).
1534
+ *
1535
+ * @param src input single-channel array.
1536
+ *
1537
+ * @param minVal pointer to the returned minimum value; NULL is used if not required.
1538
+ *
1539
+ * @param maxVal pointer to the returned maximum value; NULL is used if not required.
1540
+ *
1541
+ * @param minIdx pointer to the returned minimum location (in nD case); NULL is used if not required;
1542
+ * Otherwise, it must point to an array of src.dims elements, the coordinates of the minimum element in
1543
+ * each dimension are stored there sequentially.
1544
+ *
1545
+ * @param maxIdx pointer to the returned maximum location (in nD case). NULL is used if not required.
1546
+ *
1547
+ * @param mask specified array region
1548
+ */
1549
+ export declare function minMaxIdx(
1550
+ src: InputArray,
1551
+ minVal: any,
1552
+ maxVal?: any,
1553
+ minIdx?: any,
1554
+ maxIdx?: any,
1555
+ mask?: InputArray,
1556
+ ): void;
1557
+
1558
+ /**
1559
+ * The function [cv::minMaxLoc] finds the minimum and maximum element values and their positions. The
1560
+ * extremums are searched across the whole array or, if mask is not an empty array, in the specified
1561
+ * array region.
1562
+ *
1563
+ * The function do not work with multi-channel arrays. If you need to find minimum or maximum elements
1564
+ * across all the channels, use [Mat::reshape] first to reinterpret the array as single-channel. Or you
1565
+ * may extract the particular channel using either extractImageCOI , or mixChannels , or split .
1566
+ *
1567
+ * [max], [min], [compare], [inRange], extractImageCOI, [mixChannels], [split], [Mat::reshape]
1568
+ *
1569
+ * @param src input single-channel array.
1570
+ *
1571
+ * @param minVal pointer to the returned minimum value; NULL is used if not required.
1572
+ *
1573
+ * @param maxVal pointer to the returned maximum value; NULL is used if not required.
1574
+ *
1575
+ * @param minLoc pointer to the returned minimum location (in 2D case); NULL is used if not required.
1576
+ *
1577
+ * @param maxLoc pointer to the returned maximum location (in 2D case); NULL is used if not required.
1578
+ *
1579
+ * @param mask optional mask used to select a sub-array.
1580
+ */
1581
+ export declare function minMaxLoc(
1582
+ src: InputArray,
1583
+ minVal: any,
1584
+ maxVal?: any,
1585
+ minLoc?: any,
1586
+ maxLoc?: any,
1587
+ mask?: InputArray,
1588
+ ): MinMaxLoc;
1589
+
1590
+ /**
1591
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1592
+ * only in what argument(s) it accepts.
1593
+ *
1594
+ * @param a input single-channel array.
1595
+ *
1596
+ * @param minVal pointer to the returned minimum value; NULL is used if not required.
1597
+ *
1598
+ * @param maxVal pointer to the returned maximum value; NULL is used if not required.
1599
+ *
1600
+ * @param minIdx pointer to the returned minimum location (in nD case); NULL is used if not required;
1601
+ * Otherwise, it must point to an array of src.dims elements, the coordinates of the minimum element in
1602
+ * each dimension are stored there sequentially.
1603
+ *
1604
+ * @param maxIdx pointer to the returned maximum location (in nD case). NULL is used if not required.
1605
+ */
1606
+ export declare function minMaxLoc(
1607
+ a: any,
1608
+ minVal: any,
1609
+ maxVal: any,
1610
+ minIdx?: any,
1611
+ maxIdx?: any,
1612
+ ): MinMaxLoc;
1613
+
1614
+ /**
1615
+ * The function [cv::mixChannels] provides an advanced mechanism for shuffling image channels.
1616
+ *
1617
+ * [cv::split],[cv::merge],[cv::extractChannel],[cv::insertChannel] and some forms of [cv::cvtColor]
1618
+ * are partial cases of [cv::mixChannels].
1619
+ *
1620
+ * In the example below, the code splits a 4-channel BGRA image into a 3-channel BGR (with B and R
1621
+ * channels swapped) and a separate alpha-channel image:
1622
+ *
1623
+ * ```cpp
1624
+ * Mat bgra( 100, 100, CV_8UC4, Scalar(255,0,0,255) );
1625
+ * Mat bgr( bgra.rows, bgra.cols, CV_8UC3 );
1626
+ * Mat alpha( bgra.rows, bgra.cols, CV_8UC1 );
1627
+ *
1628
+ * // forming an array of matrices is a quite efficient operation,
1629
+ * // because the matrix data is not copied, only the headers
1630
+ * Mat out[] = { bgr, alpha };
1631
+ * // bgra[0] -> bgr[2], bgra[1] -> bgr[1],
1632
+ * // bgra[2] -> bgr[0], bgra[3] -> alpha[0]
1633
+ * int from_to[] = { 0,2, 1,1, 2,0, 3,3 };
1634
+ * mixChannels( &bgra, 1, out, 2, from_to, 4 );
1635
+ * ```
1636
+ *
1637
+ * Unlike many other new-style C++ functions in OpenCV (see the introduction section and [Mat::create]
1638
+ * ), [cv::mixChannels] requires the output arrays to be pre-allocated before calling the function.
1639
+ *
1640
+ * [split], [merge], [extractChannel], [insertChannel], [cvtColor]
1641
+ *
1642
+ * @param src input array or vector of matrices; all of the matrices must have the same size and the
1643
+ * same depth.
1644
+ *
1645
+ * @param nsrcs number of matrices in src.
1646
+ *
1647
+ * @param dst output array or vector of matrices; all the matrices must be allocated; their size and
1648
+ * depth must be the same as in src[0].
1649
+ *
1650
+ * @param ndsts number of matrices in dst.
1651
+ *
1652
+ * @param fromTo array of index pairs specifying which channels are copied and where; fromTo[k*2] is a
1653
+ * 0-based index of the input channel in src, fromTo[k*2+1] is an index of the output channel in dst;
1654
+ * the continuous channel numbering is used: the first input image channels are indexed from 0 to
1655
+ * src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
1656
+ * src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
1657
+ * channels; as a special case, when fromTo[k*2] is negative, the corresponding output channel is
1658
+ * filled with zero .
1659
+ *
1660
+ * @param npairs number of index pairs in fromTo.
1661
+ */
1662
+ export declare function mixChannels(
1663
+ src: any,
1664
+ nsrcs: size_t,
1665
+ dst: any,
1666
+ ndsts: size_t,
1667
+ fromTo: any,
1668
+ npairs: size_t,
1669
+ ): void;
1670
+
1671
+ /**
1672
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1673
+ * only in what argument(s) it accepts.
1674
+ *
1675
+ * @param src input array or vector of matrices; all of the matrices must have the same size and the
1676
+ * same depth.
1677
+ *
1678
+ * @param dst output array or vector of matrices; all the matrices must be allocated; their size and
1679
+ * depth must be the same as in src[0].
1680
+ *
1681
+ * @param fromTo array of index pairs specifying which channels are copied and where; fromTo[k*2] is a
1682
+ * 0-based index of the input channel in src, fromTo[k*2+1] is an index of the output channel in dst;
1683
+ * the continuous channel numbering is used: the first input image channels are indexed from 0 to
1684
+ * src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
1685
+ * src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
1686
+ * channels; as a special case, when fromTo[k*2] is negative, the corresponding output channel is
1687
+ * filled with zero .
1688
+ *
1689
+ * @param npairs number of index pairs in fromTo.
1690
+ */
1691
+ export declare function mixChannels(
1692
+ src: InputArrayOfArrays,
1693
+ dst: InputOutputArrayOfArrays,
1694
+ fromTo: any,
1695
+ npairs: size_t,
1696
+ ): void;
1697
+
1698
+ /**
1699
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1700
+ * only in what argument(s) it accepts.
1701
+ *
1702
+ * @param src input array or vector of matrices; all of the matrices must have the same size and the
1703
+ * same depth.
1704
+ *
1705
+ * @param dst output array or vector of matrices; all the matrices must be allocated; their size and
1706
+ * depth must be the same as in src[0].
1707
+ *
1708
+ * @param fromTo array of index pairs specifying which channels are copied and where; fromTo[k*2] is a
1709
+ * 0-based index of the input channel in src, fromTo[k*2+1] is an index of the output channel in dst;
1710
+ * the continuous channel numbering is used: the first input image channels are indexed from 0 to
1711
+ * src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
1712
+ * src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
1713
+ * channels; as a special case, when fromTo[k*2] is negative, the corresponding output channel is
1714
+ * filled with zero .
1715
+ */
1716
+ export declare function mixChannels(
1717
+ src: InputArrayOfArrays,
1718
+ dst: InputOutputArrayOfArrays,
1719
+ fromTo: any,
1720
+ ): void;
1721
+
1722
+ /**
1723
+ * The function [cv::mulSpectrums] performs the per-element multiplication of the two CCS-packed or
1724
+ * complex matrices that are results of a real or complex Fourier transform.
1725
+ *
1726
+ * The function, together with dft and idft , may be used to calculate convolution (pass conjB=false )
1727
+ * or correlation (pass conjB=true ) of two arrays rapidly. When the arrays are complex, they are
1728
+ * simply multiplied (per element) with an optional conjugation of the second-array elements. When the
1729
+ * arrays are real, they are assumed to be CCS-packed (see dft for details).
1730
+ *
1731
+ * @param a first input array.
1732
+ *
1733
+ * @param b second input array of the same size and type as src1 .
1734
+ *
1735
+ * @param c output array of the same size and type as src1 .
1736
+ *
1737
+ * @param flags operation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates
1738
+ * that each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this
1739
+ * flag, then simply add a 0 as value.
1740
+ *
1741
+ * @param conjB optional flag that conjugates the second input array before the multiplication (true)
1742
+ * or not (false).
1743
+ */
1744
+ export declare function mulSpectrums(
1745
+ a: InputArray,
1746
+ b: InputArray,
1747
+ c: OutputArray,
1748
+ flags: int,
1749
+ conjB?: bool,
1750
+ ): void;
1751
+
1752
+ /**
1753
+ * The function multiply calculates the per-element product of two arrays:
1754
+ *
1755
+ * `\\[\\texttt{dst} (I)= \\texttt{saturate} ( \\texttt{scale} \\cdot \\texttt{src1} (I) \\cdot
1756
+ * \\texttt{src2} (I))\\]`
1757
+ *
1758
+ * There is also a [MatrixExpressions] -friendly variant of the first function. See [Mat::mul] .
1759
+ *
1760
+ * For a not-per-element matrix product, see gemm .
1761
+ *
1762
+ * Saturation is not applied when the output array has the depth CV_32S. You may even get result of an
1763
+ * incorrect sign in the case of overflow.
1764
+ *
1765
+ * [add], [subtract], [divide], [scaleAdd], [addWeighted], [accumulate], [accumulateProduct],
1766
+ * [accumulateSquare], [Mat::convertTo]
1767
+ *
1768
+ * @param src1 first input array.
1769
+ *
1770
+ * @param src2 second input array of the same size and the same type as src1.
1771
+ *
1772
+ * @param dst output array of the same size and type as src1.
1773
+ *
1774
+ * @param scale optional scale factor.
1775
+ *
1776
+ * @param dtype optional depth of the output array
1777
+ */
1778
+ export declare function multiply(
1779
+ src1: InputArray,
1780
+ src2: InputArray,
1781
+ dst: OutputArray,
1782
+ scale?: double,
1783
+ dtype?: int,
1784
+ ): void;
1785
+
1786
+ /**
1787
+ * The function [cv::mulTransposed] calculates the product of src and its transposition:
1788
+ * `\\[\\texttt{dst} = \\texttt{scale} ( \\texttt{src} - \\texttt{delta} )^T ( \\texttt{src} -
1789
+ * \\texttt{delta} )\\]` if aTa=true , and `\\[\\texttt{dst} = \\texttt{scale} ( \\texttt{src} -
1790
+ * \\texttt{delta} ) ( \\texttt{src} - \\texttt{delta} )^T\\]` otherwise. The function is used to
1791
+ * calculate the covariance matrix. With zero delta, it can be used as a faster substitute for general
1792
+ * matrix product A*B when B=A'
1793
+ *
1794
+ * [calcCovarMatrix], [gemm], [repeat], [reduce]
1795
+ *
1796
+ * @param src input single-channel matrix. Note that unlike gemm, the function can multiply not only
1797
+ * floating-point matrices.
1798
+ *
1799
+ * @param dst output square matrix.
1800
+ *
1801
+ * @param aTa Flag specifying the multiplication ordering. See the description below.
1802
+ *
1803
+ * @param delta Optional delta matrix subtracted from src before the multiplication. When the matrix is
1804
+ * empty ( delta=noArray() ), it is assumed to be zero, that is, nothing is subtracted. If it has the
1805
+ * same size as src , it is simply subtracted. Otherwise, it is "repeated" (see repeat ) to cover the
1806
+ * full src and then subtracted. Type of the delta matrix, when it is not empty, must be the same as
1807
+ * the type of created output matrix. See the dtype parameter description below.
1808
+ *
1809
+ * @param scale Optional scale factor for the matrix product.
1810
+ *
1811
+ * @param dtype Optional type of the output matrix. When it is negative, the output matrix will have
1812
+ * the same type as src . Otherwise, it will be type=CV_MAT_DEPTH(dtype) that should be either CV_32F
1813
+ * or CV_64F .
1814
+ */
1815
+ export declare function mulTransposed(
1816
+ src: InputArray,
1817
+ dst: OutputArray,
1818
+ aTa: bool,
1819
+ delta?: InputArray,
1820
+ scale?: double,
1821
+ dtype?: int,
1822
+ ): void;
1823
+
1824
+ /**
1825
+ * This version of [norm] calculates the absolute norm of src1. The type of norm to calculate is
1826
+ * specified using [NormTypes].
1827
+ *
1828
+ * As example for one array consider the function `$r(x)= \\begin{pmatrix} x \\\\ 1-x \\end{pmatrix}, x
1829
+ * \\in [-1;1]$`. The `$ L_{1}, L_{2} $` and `$ L_{\\infty} $` norm for the sample value `$r(-1) =
1830
+ * \\begin{pmatrix} -1 \\\\ 2 \\end{pmatrix}$` is calculated as follows `\\begin{align*} \\| r(-1)
1831
+ * \\|_{L_1} &= |-1| + |2| = 3 \\\\ \\| r(-1) \\|_{L_2} &= \\sqrt{(-1)^{2} + (2)^{2}} = \\sqrt{5} \\\\
1832
+ * \\| r(-1) \\|_{L_\\infty} &= \\max(|-1|,|2|) = 2 \\end{align*}` and for `$r(0.5) = \\begin{pmatrix}
1833
+ * 0.5 \\\\ 0.5 \\end{pmatrix}$` the calculation is `\\begin{align*} \\| r(0.5) \\|_{L_1} &= |0.5| +
1834
+ * |0.5| = 1 \\\\ \\| r(0.5) \\|_{L_2} &= \\sqrt{(0.5)^{2} + (0.5)^{2}} = \\sqrt{0.5} \\\\ \\| r(0.5)
1835
+ * \\|_{L_\\infty} &= \\max(|0.5|,|0.5|) = 0.5. \\end{align*}` The following graphic shows all values
1836
+ * for the three norm functions `$\\| r(x) \\|_{L_1}, \\| r(x) \\|_{L_2}$` and `$\\| r(x)
1837
+ * \\|_{L_\\infty}$`. It is notable that the `$ L_{1} $` norm forms the upper and the `$ L_{\\infty} $`
1838
+ * norm forms the lower border for the example function `$ r(x) $`.
1839
+ * When the mask parameter is specified and it is not empty, the norm is
1840
+ *
1841
+ * If normType is not specified, [NORM_L2] is used. calculated only over the region specified by the
1842
+ * mask.
1843
+ *
1844
+ * Multi-channel input arrays are treated as single-channel arrays, that is, the results for all
1845
+ * channels are combined.
1846
+ *
1847
+ * [Hamming] norms can only be calculated with CV_8U depth arrays.
1848
+ *
1849
+ * @param src1 first input array.
1850
+ *
1851
+ * @param normType type of the norm (see NormTypes).
1852
+ *
1853
+ * @param mask optional operation mask; it must have the same size as src1 and CV_8UC1 type.
1854
+ */
1855
+ export declare function norm(
1856
+ src1: InputArray,
1857
+ normType?: int,
1858
+ mask?: InputArray,
1859
+ ): double;
1860
+
1861
+ /**
1862
+ * This version of [cv::norm] calculates the absolute difference norm or the relative difference norm
1863
+ * of arrays src1 and src2. The type of norm to calculate is specified using [NormTypes].
1864
+ *
1865
+ * @param src1 first input array.
1866
+ *
1867
+ * @param src2 second input array of the same size and the same type as src1.
1868
+ *
1869
+ * @param normType type of the norm (see NormTypes).
1870
+ *
1871
+ * @param mask optional operation mask; it must have the same size as src1 and CV_8UC1 type.
1872
+ */
1873
+ export declare function norm(
1874
+ src1: InputArray,
1875
+ src2: InputArray,
1876
+ normType?: int,
1877
+ mask?: InputArray,
1878
+ ): double;
1879
+
1880
+ /**
1881
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1882
+ * only in what argument(s) it accepts.
1883
+ *
1884
+ * @param src first input array.
1885
+ *
1886
+ * @param normType type of the norm (see NormTypes).
1887
+ */
1888
+ export declare function norm(src: any, normType: int): double;
1889
+
1890
+ /**
1891
+ * The function [cv::normalize] normalizes scale and shift the input array elements so that `\\[\\|
1892
+ * \\texttt{dst} \\| _{L_p}= \\texttt{alpha}\\]` (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1,
1893
+ * or NORM_L2, respectively; or so that `\\[\\min _I \\texttt{dst} (I)= \\texttt{alpha} , \\, \\, \\max
1894
+ * _I \\texttt{dst} (I)= \\texttt{beta}\\]`
1895
+ *
1896
+ * when normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be
1897
+ * normalized. This means that the norm or min-n-max are calculated over the sub-array, and then this
1898
+ * sub-array is modified to be normalized. If you want to only use the mask to calculate the norm or
1899
+ * min-max but modify the whole array, you can use norm and [Mat::convertTo].
1900
+ *
1901
+ * In case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this,
1902
+ * the range transformation for sparse matrices is not allowed since it can shift the zero level.
1903
+ *
1904
+ * Possible usage with some positive example data:
1905
+ *
1906
+ * ```cpp
1907
+ * vector<double> positiveData = { 2.0, 8.0, 10.0 };
1908
+ * vector<double> normalizedData_l1, normalizedData_l2, normalizedData_inf, normalizedData_minmax;
1909
+ *
1910
+ * // Norm to probability (total count)
1911
+ * // sum(numbers) = 20.0
1912
+ * // 2.0 0.1 (2.0/20.0)
1913
+ * // 8.0 0.4 (8.0/20.0)
1914
+ * // 10.0 0.5 (10.0/20.0)
1915
+ * normalize(positiveData, normalizedData_l1, 1.0, 0.0, NORM_L1);
1916
+ *
1917
+ * // Norm to unit vector: ||positiveData|| = 1.0
1918
+ * // 2.0 0.15
1919
+ * // 8.0 0.62
1920
+ * // 10.0 0.77
1921
+ * normalize(positiveData, normalizedData_l2, 1.0, 0.0, NORM_L2);
1922
+ *
1923
+ * // Norm to max element
1924
+ * // 2.0 0.2 (2.0/10.0)
1925
+ * // 8.0 0.8 (8.0/10.0)
1926
+ * // 10.0 1.0 (10.0/10.0)
1927
+ * normalize(positiveData, normalizedData_inf, 1.0, 0.0, NORM_INF);
1928
+ *
1929
+ * // Norm to range [0.0;1.0]
1930
+ * // 2.0 0.0 (shift to left border)
1931
+ * // 8.0 0.75 (6.0/8.0)
1932
+ * // 10.0 1.0 (shift to right border)
1933
+ * normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX);
1934
+ * ```
1935
+ *
1936
+ * [norm], [Mat::convertTo], [SparseMat::convertTo]
1937
+ *
1938
+ * @param src input array.
1939
+ *
1940
+ * @param dst output array of the same size as src .
1941
+ *
1942
+ * @param alpha norm value to normalize to or the lower range boundary in case of the range
1943
+ * normalization.
1944
+ *
1945
+ * @param beta upper range boundary in case of the range normalization; it is not used for the norm
1946
+ * normalization.
1947
+ *
1948
+ * @param norm_type normalization type (see cv::NormTypes).
1949
+ *
1950
+ * @param dtype when negative, the output array has the same type as src; otherwise, it has the same
1951
+ * number of channels as src and the depth =CV_MAT_DEPTH(dtype).
1952
+ *
1953
+ * @param mask optional operation mask.
1954
+ */
1955
+ export declare function normalize(
1956
+ src: InputArray,
1957
+ dst: InputOutputArray,
1958
+ alpha?: double,
1959
+ beta?: double,
1960
+ norm_type?: int,
1961
+ dtype?: int,
1962
+ mask?: InputArray,
1963
+ ): void;
1964
+
1965
+ /**
1966
+ * This is an overloaded member function, provided for convenience. It differs from the above function
1967
+ * only in what argument(s) it accepts.
1968
+ *
1969
+ * @param src input array.
1970
+ *
1971
+ * @param dst output array of the same size as src .
1972
+ *
1973
+ * @param alpha norm value to normalize to or the lower range boundary in case of the range
1974
+ * normalization.
1975
+ *
1976
+ * @param normType normalization type (see cv::NormTypes).
1977
+ */
1978
+ export declare function normalize(
1979
+ src: any,
1980
+ dst: any,
1981
+ alpha: double,
1982
+ normType: int,
1983
+ ): void;
1984
+
1985
+ export declare function patchNaNs(a: InputOutputArray, val?: double): void;
1986
+
1987
+ /**
1988
+ * wrap [PCA::backProject]
1989
+ */
1990
+ export declare function PCABackProject(
1991
+ data: InputArray,
1992
+ mean: InputArray,
1993
+ eigenvectors: InputArray,
1994
+ result: OutputArray,
1995
+ ): void;
1996
+
1997
+ /**
1998
+ * wrap PCA::operator()
1999
+ */
2000
+ export declare function PCACompute(
2001
+ data: InputArray,
2002
+ mean: InputOutputArray,
2003
+ eigenvectors: OutputArray,
2004
+ maxComponents?: int,
2005
+ ): void;
2006
+
2007
+ /**
2008
+ * wrap PCA::operator() and add eigenvalues output parameter
2009
+ */
2010
+ export declare function PCACompute(
2011
+ data: InputArray,
2012
+ mean: InputOutputArray,
2013
+ eigenvectors: OutputArray,
2014
+ eigenvalues: OutputArray,
2015
+ maxComponents?: int,
2016
+ ): void;
2017
+
2018
+ /**
2019
+ * wrap PCA::operator()
2020
+ */
2021
+ export declare function PCACompute(
2022
+ data: InputArray,
2023
+ mean: InputOutputArray,
2024
+ eigenvectors: OutputArray,
2025
+ retainedVariance: double,
2026
+ ): void;
2027
+
2028
+ /**
2029
+ * wrap PCA::operator() and add eigenvalues output parameter
2030
+ */
2031
+ export declare function PCACompute(
2032
+ data: InputArray,
2033
+ mean: InputOutputArray,
2034
+ eigenvectors: OutputArray,
2035
+ eigenvalues: OutputArray,
2036
+ retainedVariance: double,
2037
+ ): void;
2038
+
2039
+ /**
2040
+ * wrap [PCA::project]
2041
+ */
2042
+ export declare function PCAProject(
2043
+ data: InputArray,
2044
+ mean: InputArray,
2045
+ eigenvectors: InputArray,
2046
+ result: OutputArray,
2047
+ ): void;
2048
+
2049
+ /**
2050
+ * The function [cv::perspectiveTransform] transforms every element of src by treating it as a 2D or 3D
2051
+ * vector, in the following way: `\\[(x, y, z) \\rightarrow (x'/w, y'/w, z'/w)\\]` where `\\[(x', y',
2052
+ * z', w') = \\texttt{mat} \\cdot \\begin{bmatrix} x & y & z & 1 \\end{bmatrix}\\]` and `\\[w =
2053
+ * \\fork{w'}{if \\(w' \\ne 0\\)}{\\infty}{otherwise}\\]`
2054
+ *
2055
+ * Here a 3D vector transformation is shown. In case of a 2D vector transformation, the z component is
2056
+ * omitted.
2057
+ *
2058
+ * The function transforms a sparse set of 2D or 3D vectors. If you want to transform an image using
2059
+ * perspective transformation, use warpPerspective . If you have an inverse problem, that is, you want
2060
+ * to compute the most probable perspective transformation out of several pairs of corresponding
2061
+ * points, you can use getPerspectiveTransform or findHomography .
2062
+ *
2063
+ * [transform], [warpPerspective], [getPerspectiveTransform], [findHomography]
2064
+ *
2065
+ * @param src input two-channel or three-channel floating-point array; each element is a 2D/3D vector
2066
+ * to be transformed.
2067
+ *
2068
+ * @param dst output array of the same size and type as src.
2069
+ *
2070
+ * @param m 3x3 or 4x4 floating-point transformation matrix.
2071
+ */
2072
+ export declare function perspectiveTransform(
2073
+ src: InputArray,
2074
+ dst: OutputArray,
2075
+ m: InputArray,
2076
+ ): void;
2077
+
2078
+ /**
2079
+ * The function [cv::phase] calculates the rotation angle of each 2D vector that is formed from the
2080
+ * corresponding elements of x and y : `\\[\\texttt{angle} (I) = \\texttt{atan2} ( \\texttt{y} (I),
2081
+ * \\texttt{x} (I))\\]`
2082
+ *
2083
+ * The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 , the corresponding angle(I) is
2084
+ * set to 0.
2085
+ *
2086
+ * @param x input floating-point array of x-coordinates of 2D vectors.
2087
+ *
2088
+ * @param y input array of y-coordinates of 2D vectors; it must have the same size and the same type as
2089
+ * x.
2090
+ *
2091
+ * @param angle output array of vector angles; it has the same size and same type as x .
2092
+ *
2093
+ * @param angleInDegrees when true, the function calculates the angle in degrees, otherwise, they are
2094
+ * measured in radians.
2095
+ */
2096
+ export declare function phase(
2097
+ x: InputArray,
2098
+ y: InputArray,
2099
+ angle: OutputArray,
2100
+ angleInDegrees?: bool,
2101
+ ): void;
2102
+
2103
+ /**
2104
+ * The function [cv::polarToCart] calculates the Cartesian coordinates of each 2D vector represented by
2105
+ * the corresponding elements of magnitude and angle: `\\[\\begin{array}{l} \\texttt{x} (I) =
2106
+ * \\texttt{magnitude} (I) \\cos ( \\texttt{angle} (I)) \\\\ \\texttt{y} (I) = \\texttt{magnitude} (I)
2107
+ * \\sin ( \\texttt{angle} (I)) \\\\ \\end{array}\\]`
2108
+ *
2109
+ * The relative accuracy of the estimated coordinates is about 1e-6.
2110
+ *
2111
+ * [cartToPolar], [magnitude], [phase], [exp], [log], [pow], [sqrt]
2112
+ *
2113
+ * @param magnitude input floating-point array of magnitudes of 2D vectors; it can be an empty matrix
2114
+ * (=Mat()), in this case, the function assumes that all the magnitudes are =1; if it is not empty, it
2115
+ * must have the same size and type as angle.
2116
+ *
2117
+ * @param angle input floating-point array of angles of 2D vectors.
2118
+ *
2119
+ * @param x output array of x-coordinates of 2D vectors; it has the same size and type as angle.
2120
+ *
2121
+ * @param y output array of y-coordinates of 2D vectors; it has the same size and type as angle.
2122
+ *
2123
+ * @param angleInDegrees when true, the input angles are measured in degrees, otherwise, they are
2124
+ * measured in radians.
2125
+ */
2126
+ export declare function polarToCart(
2127
+ magnitude: InputArray,
2128
+ angle: InputArray,
2129
+ x: OutputArray,
2130
+ y: OutputArray,
2131
+ angleInDegrees?: bool,
2132
+ ): void;
2133
+
2134
+ /**
2135
+ * The function [cv::pow] raises every element of the input array to power : `\\[\\texttt{dst} (I) =
2136
+ * \\fork{\\texttt{src}(I)^{power}}{if \\(\\texttt{power}\\) is
2137
+ * integer}{|\\texttt{src}(I)|^{power}}{otherwise}\\]`
2138
+ *
2139
+ * So, for a non-integer power exponent, the absolute values of input array elements are used. However,
2140
+ * it is possible to get true values for negative values using some extra operations. In the example
2141
+ * below, computing the 5th root of array src shows:
2142
+ *
2143
+ * ```cpp
2144
+ * Mat mask = src < 0;
2145
+ * pow(src, 1./5, dst);
2146
+ * subtract(Scalar::all(0), dst, dst, mask);
2147
+ * ```
2148
+ *
2149
+ * For some values of power, such as integer values, 0.5 and -0.5, specialized faster algorithms are
2150
+ * used.
2151
+ *
2152
+ * Special values (NaN, Inf) are not handled.
2153
+ *
2154
+ * [sqrt], [exp], [log], [cartToPolar], [polarToCart]
2155
+ *
2156
+ * @param src input array.
2157
+ *
2158
+ * @param power exponent of power.
2159
+ *
2160
+ * @param dst output array of the same size and type as src.
2161
+ */
2162
+ export declare function pow(
2163
+ src: InputArray,
2164
+ power: double,
2165
+ dst: OutputArray,
2166
+ ): void;
2167
+
2168
+ /**
2169
+ * This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels
2170
+ * (dB), between two input arrays src1 and src2. The arrays must have the same type.
2171
+ *
2172
+ * The PSNR is calculated as follows:
2173
+ *
2174
+ * `\\[ \\texttt{PSNR} = 10 \\cdot \\log_{10}{\\left( \\frac{R^2}{MSE} \\right) } \\]`
2175
+ *
2176
+ * where R is the maximum integer value of depth (e.g. 255 in the case of CV_8U data) and MSE is the
2177
+ * mean squared error between the two arrays.
2178
+ *
2179
+ * @param src1 first input array.
2180
+ *
2181
+ * @param src2 second input array of the same size as src1.
2182
+ *
2183
+ * @param R the maximum pixel value (255 by default)
2184
+ */
2185
+ export declare function PSNR(
2186
+ src1: InputArray,
2187
+ src2: InputArray,
2188
+ R?: double,
2189
+ ): double;
2190
+
2191
+ /**
2192
+ * The function [cv::randn] fills the matrix dst with normally distributed random numbers with the
2193
+ * specified mean vector and the standard deviation matrix. The generated random numbers are clipped to
2194
+ * fit the value range of the output array data type.
2195
+ *
2196
+ * [RNG], [randu]
2197
+ *
2198
+ * @param dst output array of random numbers; the array must be pre-allocated and have 1 to 4 channels.
2199
+ *
2200
+ * @param mean mean value (expectation) of the generated random numbers.
2201
+ *
2202
+ * @param stddev standard deviation of the generated random numbers; it can be either a vector (in
2203
+ * which case a diagonal standard deviation matrix is assumed) or a square matrix.
2204
+ */
2205
+ export declare function randn(
2206
+ dst: InputOutputArray,
2207
+ mean: InputArray,
2208
+ stddev: InputArray,
2209
+ ): void;
2210
+
2211
+ /**
2212
+ * The function [cv::randShuffle] shuffles the specified 1D array by randomly choosing pairs of
2213
+ * elements and swapping them. The number of such swap operations will be dst.rows*dst.cols*iterFactor
2214
+ * .
2215
+ *
2216
+ * [RNG], [sort]
2217
+ *
2218
+ * @param dst input/output numerical 1D array.
2219
+ *
2220
+ * @param iterFactor scale factor that determines the number of random swap operations (see the details
2221
+ * below).
2222
+ *
2223
+ * @param rng optional random number generator used for shuffling; if it is zero, theRNG () is used
2224
+ * instead.
2225
+ */
2226
+ export declare function randShuffle(
2227
+ dst: InputOutputArray,
2228
+ iterFactor?: double,
2229
+ rng?: any,
2230
+ ): void;
2231
+
2232
+ /**
2233
+ * Non-template variant of the function fills the matrix dst with uniformly-distributed random numbers
2234
+ * from the specified range: `\\[\\texttt{low} _c \\leq \\texttt{dst} (I)_c < \\texttt{high} _c\\]`
2235
+ *
2236
+ * [RNG], [randn], [theRNG]
2237
+ *
2238
+ * @param dst output array of random numbers; the array must be pre-allocated.
2239
+ *
2240
+ * @param low inclusive lower boundary of the generated random numbers.
2241
+ *
2242
+ * @param high exclusive upper boundary of the generated random numbers.
2243
+ */
2244
+ export declare function randu(
2245
+ dst: InputOutputArray,
2246
+ low: InputArray,
2247
+ high: InputArray,
2248
+ ): void;
2249
+
2250
+ /**
2251
+ * The function [reduce] reduces the matrix to a vector by treating the matrix rows/columns as a set of
2252
+ * 1D vectors and performing the specified operation on the vectors until a single row/column is
2253
+ * obtained. For example, the function can be used to compute horizontal and vertical projections of a
2254
+ * raster image. In case of [REDUCE_MAX] and [REDUCE_MIN] , the output image should have the same type
2255
+ * as the source one. In case of [REDUCE_SUM] and [REDUCE_AVG] , the output may have a larger element
2256
+ * bit-depth to preserve accuracy. And multi-channel arrays are also supported in these two reduction
2257
+ * modes.
2258
+ *
2259
+ * The following code demonstrates its usage for a single channel matrix.
2260
+ *
2261
+ * ```cpp
2262
+ * Mat m = (Mat_<uchar>(3,2) << 1,2,3,4,5,6);
2263
+ * Mat col_sum, row_sum;
2264
+ *
2265
+ * reduce(m, col_sum, 0, REDUCE_SUM, CV_32F);
2266
+ * reduce(m, row_sum, 1, REDUCE_SUM, CV_32F);
2267
+ * /*
2268
+ * m =
2269
+ * [ 1, 2;
2270
+ * 3, 4;
2271
+ * 5, 6]
2272
+ * col_sum =
2273
+ * [9, 12]
2274
+ * row_sum =
2275
+ * [3;
2276
+ * 7;
2277
+ * 11]
2278
+ * \/
2279
+ * ```
2280
+ *
2281
+ * And the following code demonstrates its usage for a two-channel matrix.
2282
+ *
2283
+ * ```cpp
2284
+ * // two channels
2285
+ * char d[] = {1,2,3,4,5,6};
2286
+ * Mat m(3, 1, CV_8UC2, d);
2287
+ * Mat col_sum_per_channel;
2288
+ * reduce(m, col_sum_per_channel, 0, REDUCE_SUM, CV_32F);
2289
+ * /*
2290
+ * col_sum_per_channel =
2291
+ * [9, 12]
2292
+ * \/
2293
+ * ```
2294
+ *
2295
+ * [repeat]
2296
+ *
2297
+ * @param src input 2D matrix.
2298
+ *
2299
+ * @param dst output vector. Its size and type is defined by dim and dtype parameters.
2300
+ *
2301
+ * @param dim dimension index along which the matrix is reduced. 0 means that the matrix is reduced to
2302
+ * a single row. 1 means that the matrix is reduced to a single column.
2303
+ *
2304
+ * @param rtype reduction operation that could be one of ReduceTypes
2305
+ *
2306
+ * @param dtype when negative, the output vector will have the same type as the input matrix,
2307
+ * otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()).
2308
+ */
2309
+ export declare function reduce(
2310
+ src: InputArray,
2311
+ dst: OutputArray,
2312
+ dim: int,
2313
+ rtype: int,
2314
+ dtype?: int,
2315
+ ): void;
2316
+
2317
+ /**
2318
+ * The function [cv::repeat] duplicates the input array one or more times along each of the two axes:
2319
+ * `\\[\\texttt{dst} _{ij}= \\texttt{src} _{i\\mod src.rows, \\; j\\mod src.cols }\\]` The second
2320
+ * variant of the function is more convenient to use with [MatrixExpressions].
2321
+ *
2322
+ * [cv::reduce]
2323
+ *
2324
+ * @param src input array to replicate.
2325
+ *
2326
+ * @param ny Flag to specify how many times the src is repeated along the vertical axis.
2327
+ *
2328
+ * @param nx Flag to specify how many times the src is repeated along the horizontal axis.
2329
+ *
2330
+ * @param dst output array of the same type as src.
2331
+ */
2332
+ export declare function repeat(
2333
+ src: InputArray,
2334
+ ny: int,
2335
+ nx: int,
2336
+ dst: OutputArray,
2337
+ ): void;
2338
+
2339
+ /**
2340
+ * This is an overloaded member function, provided for convenience. It differs from the above function
2341
+ * only in what argument(s) it accepts.
2342
+ *
2343
+ * @param src input array to replicate.
2344
+ *
2345
+ * @param ny Flag to specify how many times the src is repeated along the vertical axis.
2346
+ *
2347
+ * @param nx Flag to specify how many times the src is repeated along the horizontal axis.
2348
+ */
2349
+ export declare function repeat(src: any, ny: int, nx: int): Mat;
2350
+
2351
+ /**
2352
+ * [transpose] , [repeat] , [completeSymm], [flip], [RotateFlags]
2353
+ *
2354
+ * @param src input array.
2355
+ *
2356
+ * @param dst output array of the same type as src. The size is the same with ROTATE_180, and the rows
2357
+ * and cols are switched for ROTATE_90_CLOCKWISE and ROTATE_90_COUNTERCLOCKWISE.
2358
+ *
2359
+ * @param rotateCode an enum to specify how to rotate the array; see the enum RotateFlags
2360
+ */
2361
+ export declare function rotate(
2362
+ src: InputArray,
2363
+ dst: OutputArray,
2364
+ rotateCode: int,
2365
+ ): void;
2366
+
2367
+ /**
2368
+ * The function scaleAdd is one of the classical primitive linear algebra operations, known as DAXPY or
2369
+ * SAXPY in . It calculates the sum of a scaled array and another array: `\\[\\texttt{dst} (I)=
2370
+ * \\texttt{scale} \\cdot \\texttt{src1} (I) + \\texttt{src2} (I)\\]` The function can also be emulated
2371
+ * with a matrix expression, for example:
2372
+ *
2373
+ * ```cpp
2374
+ * Mat A(3, 3, CV_64F);
2375
+ * ...
2376
+ * A.row(0) = A.row(1)*2 + A.row(2);
2377
+ * ```
2378
+ *
2379
+ * [add], [addWeighted], [subtract], [Mat::dot], [Mat::convertTo]
2380
+ *
2381
+ * @param src1 first input array.
2382
+ *
2383
+ * @param alpha scale factor for the first array.
2384
+ *
2385
+ * @param src2 second input array of the same size and type as src1.
2386
+ *
2387
+ * @param dst output array of the same size and type as src1.
2388
+ */
2389
+ export declare function scaleAdd(
2390
+ src1: InputArray,
2391
+ alpha: double,
2392
+ src2: InputArray,
2393
+ dst: OutputArray,
2394
+ ): void;
2395
+
2396
+ /**
2397
+ * The function [cv::setIdentity] initializes a scaled identity matrix: `\\[\\texttt{mtx} (i,j)=
2398
+ * \\fork{\\texttt{value}}{ if \\(i=j\\)}{0}{otherwise}\\]`
2399
+ *
2400
+ * The function can also be emulated using the matrix initializers and the matrix expressions:
2401
+ *
2402
+ * ```cpp
2403
+ * Mat A = Mat::eye(4, 3, CV_32F)*5;
2404
+ * // A will be set to [[5, 0, 0], [0, 5, 0], [0, 0, 5], [0, 0, 0]]
2405
+ * ```
2406
+ *
2407
+ * [Mat::zeros], [Mat::ones], [Mat::setTo], [Mat::operator=]
2408
+ *
2409
+ * @param mtx matrix to initialize (not necessarily square).
2410
+ *
2411
+ * @param s value to assign to diagonal elements.
2412
+ */
2413
+ export declare function setIdentity(mtx: InputOutputArray, s?: any): void;
2414
+
2415
+ /**
2416
+ * The function [cv::setRNGSeed] sets state of default random number generator to custom value.
2417
+ *
2418
+ * [RNG], [randu], [randn]
2419
+ *
2420
+ * @param seed new state for default random number generator
2421
+ */
2422
+ export declare function setRNGSeed(seed: int): void;
2423
+
2424
+ /**
2425
+ * The function [cv::solve] solves a linear system or least-squares problem (the latter is possible
2426
+ * with [SVD] or QR methods, or by specifying the flag [DECOMP_NORMAL] ): `\\[\\texttt{dst} = \\arg
2427
+ * \\min _X \\| \\texttt{src1} \\cdot \\texttt{X} - \\texttt{src2} \\|\\]`
2428
+ *
2429
+ * If [DECOMP_LU] or [DECOMP_CHOLESKY] method is used, the function returns 1 if src1 (or
2430
+ * `$\\texttt{src1}^T\\texttt{src1}$` ) is non-singular. Otherwise, it returns 0. In the latter case,
2431
+ * dst is not valid. Other methods find a pseudo-solution in case of a singular left-hand side part.
2432
+ *
2433
+ * If you want to find a unity-norm solution of an under-defined singular system
2434
+ * `$\\texttt{src1}\\cdot\\texttt{dst}=0$` , the function solve will not do the work. Use [SVD::solveZ]
2435
+ * instead.
2436
+ *
2437
+ * [invert], [SVD], [eigen]
2438
+ *
2439
+ * @param src1 input matrix on the left-hand side of the system.
2440
+ *
2441
+ * @param src2 input matrix on the right-hand side of the system.
2442
+ *
2443
+ * @param dst output solution.
2444
+ *
2445
+ * @param flags solution (matrix inversion) method (DecompTypes)
2446
+ */
2447
+ export declare function solve(
2448
+ src1: InputArray,
2449
+ src2: InputArray,
2450
+ dst: OutputArray,
2451
+ flags?: int,
2452
+ ): bool;
2453
+
2454
+ /**
2455
+ * The function solveCubic finds the real roots of a cubic equation:
2456
+ *
2457
+ * if coeffs is a 4-element vector: `\\[\\texttt{coeffs} [0] x^3 + \\texttt{coeffs} [1] x^2 +
2458
+ * \\texttt{coeffs} [2] x + \\texttt{coeffs} [3] = 0\\]`
2459
+ * if coeffs is a 3-element vector: `\\[x^3 + \\texttt{coeffs} [0] x^2 + \\texttt{coeffs} [1] x +
2460
+ * \\texttt{coeffs} [2] = 0\\]`
2461
+ *
2462
+ * The roots are stored in the roots array.
2463
+ *
2464
+ * number of real roots. It can be 0, 1 or 2.
2465
+ *
2466
+ * @param coeffs equation coefficients, an array of 3 or 4 elements.
2467
+ *
2468
+ * @param roots output array of real roots that has 1 or 3 elements.
2469
+ */
2470
+ export declare function solveCubic(coeffs: InputArray, roots: OutputArray): int;
2471
+
2472
+ /**
2473
+ * The function [cv::solvePoly] finds real and complex roots of a polynomial equation:
2474
+ * `\\[\\texttt{coeffs} [n] x^{n} + \\texttt{coeffs} [n-1] x^{n-1} + ... + \\texttt{coeffs} [1] x +
2475
+ * \\texttt{coeffs} [0] = 0\\]`
2476
+ *
2477
+ * @param coeffs array of polynomial coefficients.
2478
+ *
2479
+ * @param roots output (complex) array of roots.
2480
+ *
2481
+ * @param maxIters maximum number of iterations the algorithm does.
2482
+ */
2483
+ export declare function solvePoly(
2484
+ coeffs: InputArray,
2485
+ roots: OutputArray,
2486
+ maxIters?: int,
2487
+ ): double;
2488
+
2489
+ /**
2490
+ * The function [cv::sort] sorts each matrix row or each matrix column in ascending or descending
2491
+ * order. So you should pass two operation flags to get desired behaviour. If you want to sort matrix
2492
+ * rows or columns lexicographically, you can use STL std::sort generic function with the proper
2493
+ * comparison predicate.
2494
+ *
2495
+ * [sortIdx], [randShuffle]
2496
+ *
2497
+ * @param src input single-channel array.
2498
+ *
2499
+ * @param dst output array of the same size and type as src.
2500
+ *
2501
+ * @param flags operation flags, a combination of SortFlags
2502
+ */
2503
+ export declare function sort(
2504
+ src: InputArray,
2505
+ dst: OutputArray,
2506
+ flags: int,
2507
+ ): void;
2508
+
2509
+ /**
2510
+ * The function [cv::sortIdx] sorts each matrix row or each matrix column in the ascending or
2511
+ * descending order. So you should pass two operation flags to get desired behaviour. Instead of
2512
+ * reordering the elements themselves, it stores the indices of sorted elements in the output array.
2513
+ * For example:
2514
+ *
2515
+ * ```cpp
2516
+ * Mat A = Mat::eye(3,3,CV_32F), B;
2517
+ * sortIdx(A, B, SORT_EVERY_ROW + SORT_ASCENDING);
2518
+ * // B will probably contain
2519
+ * // (because of equal elements in A some permutations are possible):
2520
+ * // [[1, 2, 0], [0, 2, 1], [0, 1, 2]]
2521
+ * ```
2522
+ *
2523
+ * [sort], [randShuffle]
2524
+ *
2525
+ * @param src input single-channel array.
2526
+ *
2527
+ * @param dst output integer array of the same size as src.
2528
+ *
2529
+ * @param flags operation flags that could be a combination of cv::SortFlags
2530
+ */
2531
+ export declare function sortIdx(
2532
+ src: InputArray,
2533
+ dst: OutputArray,
2534
+ flags: int,
2535
+ ): void;
2536
+
2537
+ /**
2538
+ * The function [cv::split] splits a multi-channel array into separate single-channel arrays:
2539
+ * `\\[\\texttt{mv} [c](I) = \\texttt{src} (I)_c\\]` If you need to extract a single channel or do some
2540
+ * other sophisticated channel permutation, use mixChannels .
2541
+ *
2542
+ * The following example demonstrates how to split a 3-channel matrix into 3 single channel matrices.
2543
+ *
2544
+ * ```cpp
2545
+ * char d[] = {1,2,3,4,5,6,7,8,9,10,11,12};
2546
+ * Mat m(2, 2, CV_8UC3, d);
2547
+ * Mat channels[3];
2548
+ * split(m, channels);
2549
+ *
2550
+ * /*
2551
+ * channels[0] =
2552
+ * [ 1, 4;
2553
+ * 7, 10]
2554
+ * channels[1] =
2555
+ * [ 2, 5;
2556
+ * 8, 11]
2557
+ * channels[2] =
2558
+ * [ 3, 6;
2559
+ * 9, 12]
2560
+ * \/
2561
+ * ```
2562
+ *
2563
+ * [merge], [mixChannels], [cvtColor]
2564
+ *
2565
+ * @param src input multi-channel array.
2566
+ *
2567
+ * @param mvbegin output array; the number of arrays must match src.channels(); the arrays themselves
2568
+ * are reallocated, if needed.
2569
+ */
2570
+ export declare function split(src: any, mvbegin: any): void;
2571
+
2572
+ /**
2573
+ * This is an overloaded member function, provided for convenience. It differs from the above function
2574
+ * only in what argument(s) it accepts.
2575
+ *
2576
+ * @param m input multi-channel array.
2577
+ *
2578
+ * @param mv output vector of arrays; the arrays themselves are reallocated, if needed.
2579
+ */
2580
+ export declare function split(m: InputArray, mv: OutputArrayOfArrays): void;
2581
+
2582
+ /**
2583
+ * The function [cv::sqrt] calculates a square root of each input array element. In case of
2584
+ * multi-channel arrays, each channel is processed independently. The accuracy is approximately the
2585
+ * same as of the built-in std::sqrt .
2586
+ *
2587
+ * @param src input floating-point array.
2588
+ *
2589
+ * @param dst output array of the same size and type as src.
2590
+ */
2591
+ export declare function sqrt(src: InputArray, dst: OutputArray): void;
2592
+
2593
+ /**
2594
+ * The function subtract calculates:
2595
+ *
2596
+ * Difference between two arrays, when both input arrays have the same size and the same number of
2597
+ * channels: `\\[\\texttt{dst}(I) = \\texttt{saturate} ( \\texttt{src1}(I) - \\texttt{src2}(I)) \\quad
2598
+ * \\texttt{if mask}(I) \\ne0\\]`
2599
+ * Difference between an array and a scalar, when src2 is constructed from Scalar or has the same
2600
+ * number of elements as `src1.channels()`: `\\[\\texttt{dst}(I) = \\texttt{saturate} (
2601
+ * \\texttt{src1}(I) - \\texttt{src2} ) \\quad \\texttt{if mask}(I) \\ne0\\]`
2602
+ * Difference between a scalar and an array, when src1 is constructed from Scalar or has the same
2603
+ * number of elements as `src2.channels()`: `\\[\\texttt{dst}(I) = \\texttt{saturate} ( \\texttt{src1}
2604
+ * - \\texttt{src2}(I) ) \\quad \\texttt{if mask}(I) \\ne0\\]`
2605
+ * The reverse difference between a scalar and an array in the case of `SubRS`: `\\[\\texttt{dst}(I) =
2606
+ * \\texttt{saturate} ( \\texttt{src2} - \\texttt{src1}(I) ) \\quad \\texttt{if mask}(I) \\ne0\\]`
2607
+ * where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each
2608
+ * channel is processed independently.
2609
+ *
2610
+ * The first function in the list above can be replaced with matrix expressions:
2611
+ *
2612
+ * ```cpp
2613
+ * dst = src1 - src2;
2614
+ * dst -= src1; // equivalent to subtract(dst, src1, dst);
2615
+ * ```
2616
+ *
2617
+ * The input arrays and the output array can all have the same or different depths. For example, you
2618
+ * can subtract to 8-bit unsigned arrays and store the difference in a 16-bit signed array. Depth of
2619
+ * the output array is determined by dtype parameter. In the second and third cases above, as well as
2620
+ * in the first case, when src1.depth() == src2.depth(), dtype can be set to the default -1. In this
2621
+ * case the output array will have the same depth as the input array, be it src1, src2 or both.
2622
+ *
2623
+ * Saturation is not applied when the output array has the depth CV_32S. You may even get result of an
2624
+ * incorrect sign in the case of overflow.
2625
+ *
2626
+ * [add], [addWeighted], [scaleAdd], [Mat::convertTo]
2627
+ *
2628
+ * @param src1 first input array or a scalar.
2629
+ *
2630
+ * @param src2 second input array or a scalar.
2631
+ *
2632
+ * @param dst output array of the same size and the same number of channels as the input array.
2633
+ *
2634
+ * @param mask optional operation mask; this is an 8-bit single channel array that specifies elements
2635
+ * of the output array to be changed.
2636
+ *
2637
+ * @param dtype optional depth of the output array
2638
+ */
2639
+ export declare function subtract(
2640
+ src1: InputArray,
2641
+ src2: InputArray,
2642
+ dst: OutputArray,
2643
+ mask?: InputArray,
2644
+ dtype?: int,
2645
+ ): void;
2646
+
2647
+ /**
2648
+ * The function [cv::sum] calculates and returns the sum of array elements, independently for each
2649
+ * channel.
2650
+ *
2651
+ * [countNonZero], [mean], [meanStdDev], [norm], [minMaxLoc], [reduce]
2652
+ *
2653
+ * @param src input array that must have from 1 to 4 channels.
2654
+ */
2655
+ export declare function sum(src: InputArray): Scalar;
2656
+
2657
+ /**
2658
+ * wrap [SVD::backSubst]
2659
+ */
2660
+ export declare function SVBackSubst(
2661
+ w: InputArray,
2662
+ u: InputArray,
2663
+ vt: InputArray,
2664
+ rhs: InputArray,
2665
+ dst: OutputArray,
2666
+ ): void;
2667
+
2668
+ /**
2669
+ * wrap [SVD::compute]
2670
+ */
2671
+ export declare function SVDecomp(
2672
+ src: InputArray,
2673
+ w: OutputArray,
2674
+ u: OutputArray,
2675
+ vt: OutputArray,
2676
+ flags?: int,
2677
+ ): void;
2678
+
2679
+ /**
2680
+ * The function [cv::theRNG] returns the default random number generator. For each thread, there is a
2681
+ * separate random number generator, so you can use the function safely in multi-thread environments.
2682
+ * If you just need to get a single random number using this generator or initialize an array, you can
2683
+ * use randu or randn instead. But if you are going to generate many random numbers inside a loop, it
2684
+ * is much faster to use this function to retrieve the generator and then use RNG::operator _Tp() .
2685
+ *
2686
+ * [RNG], [randu], [randn]
2687
+ */
2688
+ export declare function theRNG(): any;
2689
+
2690
+ /**
2691
+ * The function [cv::trace] returns the sum of the diagonal elements of the matrix mtx .
2692
+ * `\\[\\mathrm{tr} ( \\texttt{mtx} ) = \\sum _i \\texttt{mtx} (i,i)\\]`
2693
+ *
2694
+ * @param mtx input matrix.
2695
+ */
2696
+ export declare function trace(mtx: InputArray): Scalar;
2697
+
2698
+ /**
2699
+ * The function [cv::transform] performs the matrix transformation of every element of the array src
2700
+ * and stores the results in dst : `\\[\\texttt{dst} (I) = \\texttt{m} \\cdot \\texttt{src} (I)\\]`
2701
+ * (when m.cols=src.channels() ), or `\\[\\texttt{dst} (I) = \\texttt{m} \\cdot [ \\texttt{src} (I);
2702
+ * 1]\\]` (when m.cols=src.channels()+1 )
2703
+ *
2704
+ * Every element of the N -channel array src is interpreted as N -element vector that is transformed
2705
+ * using the M x N or M x (N+1) matrix m to M-element vector - the corresponding element of the output
2706
+ * array dst .
2707
+ *
2708
+ * The function may be used for geometrical transformation of N -dimensional points, arbitrary linear
2709
+ * color space transformation (such as various kinds of RGB to YUV transforms), shuffling the image
2710
+ * channels, and so forth.
2711
+ *
2712
+ * [perspectiveTransform], [getAffineTransform], [estimateAffine2D], [warpAffine], [warpPerspective]
2713
+ *
2714
+ * @param src input array that must have as many channels (1 to 4) as m.cols or m.cols-1.
2715
+ *
2716
+ * @param dst output array of the same size and depth as src; it has as many channels as m.rows.
2717
+ *
2718
+ * @param m transformation 2x2 or 2x3 floating-point matrix.
2719
+ */
2720
+ export declare function transform(
2721
+ src: InputArray,
2722
+ dst: OutputArray,
2723
+ m: InputArray,
2724
+ ): void;
2725
+
2726
+ /**
2727
+ * The function [cv::transpose] transposes the matrix src : `\\[\\texttt{dst} (i,j) = \\texttt{src}
2728
+ * (j,i)\\]`
2729
+ *
2730
+ * No complex conjugation is done in case of a complex matrix. It should be done separately if needed.
2731
+ *
2732
+ * @param src input array.
2733
+ *
2734
+ * @param dst output array of the same type as src.
2735
+ */
2736
+ export declare function transpose(src: InputArray, dst: OutputArray): void;
2737
+
2738
+ /**
2739
+ * The function vertically concatenates two or more [cv::Mat] matrices (with the same number of cols).
2740
+ *
2741
+ * ```cpp
2742
+ * cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),
2743
+ * cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),
2744
+ * cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};
2745
+ *
2746
+ * cv::Mat out;
2747
+ * cv::vconcat( matArray, 3, out );
2748
+ * //out:
2749
+ * //[1, 1, 1, 1;
2750
+ * // 2, 2, 2, 2;
2751
+ * // 3, 3, 3, 3]
2752
+ * ```
2753
+ *
2754
+ * [cv::hconcat(const Mat*, size_t, OutputArray)],
2755
+ *
2756
+ * [cv::hconcat(InputArrayOfArrays, OutputArray)] and
2757
+ *
2758
+ * [cv::hconcat(InputArray, InputArray, OutputArray)]
2759
+ *
2760
+ * @param src input array or vector of matrices. all of the matrices must have the same number of cols
2761
+ * and the same depth.
2762
+ *
2763
+ * @param nsrc number of matrices in src.
2764
+ *
2765
+ * @param dst output array. It has the same number of cols and depth as the src, and the sum of rows of
2766
+ * the src.
2767
+ */
2768
+ export declare function vconcat(src: any, nsrc: size_t, dst: OutputArray): void;
2769
+
2770
+ /**
2771
+ * This is an overloaded member function, provided for convenience. It differs from the above function
2772
+ * only in what argument(s) it accepts.
2773
+ *
2774
+ * ```cpp
2775
+ * cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 7,
2776
+ * 2, 8,
2777
+ * 3, 9);
2778
+ * cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 4, 10,
2779
+ * 5, 11,
2780
+ * 6, 12);
2781
+ *
2782
+ * cv::Mat C;
2783
+ * cv::vconcat(A, B, C);
2784
+ * //C:
2785
+ * //[1, 7;
2786
+ * // 2, 8;
2787
+ * // 3, 9;
2788
+ * // 4, 10;
2789
+ * // 5, 11;
2790
+ * // 6, 12]
2791
+ * ```
2792
+ *
2793
+ * @param src1 first input array to be considered for vertical concatenation.
2794
+ *
2795
+ * @param src2 second input array to be considered for vertical concatenation.
2796
+ *
2797
+ * @param dst output array. It has the same number of cols and depth as the src1 and src2, and the sum
2798
+ * of rows of the src1 and src2.
2799
+ */
2800
+ export declare function vconcat(
2801
+ src1: InputArray,
2802
+ src2: InputArray,
2803
+ dst: OutputArray,
2804
+ ): void;
2805
+
2806
+ /**
2807
+ * This is an overloaded member function, provided for convenience. It differs from the above function
2808
+ * only in what argument(s) it accepts.
2809
+ *
2810
+ * ```cpp
2811
+ * std::vector<cv::Mat> matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),
2812
+ * cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),
2813
+ * cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};
2814
+ *
2815
+ * cv::Mat out;
2816
+ * cv::vconcat( matrices, out );
2817
+ * //out:
2818
+ * //[1, 1, 1, 1;
2819
+ * // 2, 2, 2, 2;
2820
+ * // 3, 3, 3, 3]
2821
+ * ```
2822
+ *
2823
+ * @param src input array or vector of matrices. all of the matrices must have the same number of cols
2824
+ * and the same depth
2825
+ *
2826
+ * @param dst output array. It has the same number of cols and depth as the src, and the sum of rows of
2827
+ * the src. same depth.
2828
+ */
2829
+ export declare function vconcat(
2830
+ src: InputArrayOfArrays,
2831
+ dst: OutputArray,
2832
+ ): void;
2833
+
2834
+ export declare const BORDER_CONSTANT: BorderTypes; // initializer: = 0
2835
+
2836
+ export declare const BORDER_REPLICATE: BorderTypes; // initializer: = 1
2837
+
2838
+ export declare const BORDER_REFLECT: BorderTypes; // initializer: = 2
2839
+
2840
+ export declare const BORDER_WRAP: BorderTypes; // initializer: = 3
2841
+
2842
+ export declare const BORDER_REFLECT_101: BorderTypes; // initializer: = 4
2843
+
2844
+ export declare const BORDER_TRANSPARENT: BorderTypes; // initializer: = 5
2845
+
2846
+ export declare const BORDER_REFLECT101: BorderTypes; // initializer: = BORDER_REFLECT_101
2847
+
2848
+ export declare const BORDER_DEFAULT: BorderTypes; // initializer: = BORDER_REFLECT_101
2849
+
2850
+ export declare const BORDER_ISOLATED: BorderTypes; // initializer: = 16
2851
+
2852
+ export declare const CMP_EQ: CmpTypes; // initializer: = 0
2853
+
2854
+ export declare const CMP_GT: CmpTypes; // initializer: = 1
2855
+
2856
+ export declare const CMP_GE: CmpTypes; // initializer: = 2
2857
+
2858
+ export declare const CMP_LT: CmpTypes; // initializer: = 3
2859
+
2860
+ export declare const CMP_LE: CmpTypes; // initializer: = 4
2861
+
2862
+ export declare const CMP_NE: CmpTypes; // initializer: = 5
2863
+
2864
+ /**
2865
+ * Gaussian elimination with the optimal pivot element chosen.
2866
+ *
2867
+ */
2868
+ export declare const DECOMP_LU: DecompTypes; // initializer: = 0
2869
+
2870
+ /**
2871
+ * singular value decomposition ([SVD]) method; the system can be over-defined and/or the matrix src1
2872
+ * can be singular
2873
+ *
2874
+ */
2875
+ export declare const DECOMP_SVD: DecompTypes; // initializer: = 1
2876
+
2877
+ /**
2878
+ * eigenvalue decomposition; the matrix src1 must be symmetrical
2879
+ *
2880
+ */
2881
+ export declare const DECOMP_EIG: DecompTypes; // initializer: = 2
2882
+
2883
+ /**
2884
+ * Cholesky `$LL^T$` factorization; the matrix src1 must be symmetrical and positively defined
2885
+ *
2886
+ */
2887
+ export declare const DECOMP_CHOLESKY: DecompTypes; // initializer: = 3
2888
+
2889
+ /**
2890
+ * QR factorization; the system can be over-defined and/or the matrix src1 can be singular
2891
+ *
2892
+ */
2893
+ export declare const DECOMP_QR: DecompTypes; // initializer: = 4
2894
+
2895
+ /**
2896
+ * while all the previous flags are mutually exclusive, this flag can be used together with any of the
2897
+ * previous; it means that the normal equations
2898
+ * `$\\texttt{src1}^T\\cdot\\texttt{src1}\\cdot\\texttt{dst}=\\texttt{src1}^T\\texttt{src2}$` are
2899
+ * solved instead of the original system `$\\texttt{src1}\\cdot\\texttt{dst}=\\texttt{src2}$`
2900
+ *
2901
+ */
2902
+ export declare const DECOMP_NORMAL: DecompTypes; // initializer: = 16
2903
+
2904
+ /**
2905
+ * performs an inverse 1D or 2D transform instead of the default forward transform.
2906
+ *
2907
+ */
2908
+ export declare const DFT_INVERSE: DftFlags; // initializer: = 1
2909
+
2910
+ /**
2911
+ * scales the result: divide it by the number of array elements. Normally, it is combined with
2912
+ * DFT_INVERSE.
2913
+ *
2914
+ */
2915
+ export declare const DFT_SCALE: DftFlags; // initializer: = 2
2916
+
2917
+ /**
2918
+ * performs a forward or inverse transform of every individual row of the input matrix; this flag
2919
+ * enables you to transform multiple vectors simultaneously and can be used to decrease the overhead
2920
+ * (which is sometimes several times larger than the processing itself) to perform 3D and
2921
+ * higher-dimensional transformations and so forth.
2922
+ *
2923
+ */
2924
+ export declare const DFT_ROWS: DftFlags; // initializer: = 4
2925
+
2926
+ /**
2927
+ * performs a forward transformation of 1D or 2D real array; the result, though being a complex array,
2928
+ * has complex-conjugate symmetry (*CCS*, see the function description below for details), and such an
2929
+ * array can be packed into a real array of the same size as input, which is the fastest option and
2930
+ * which is what the function does by default; however, you may wish to get a full complex array (for
2931
+ * simpler spectrum analysis, and so on) - pass the flag to enable the function to produce a full-size
2932
+ * complex output array.
2933
+ *
2934
+ */
2935
+ export declare const DFT_COMPLEX_OUTPUT: DftFlags; // initializer: = 16
2936
+
2937
+ /**
2938
+ * performs an inverse transformation of a 1D or 2D complex array; the result is normally a complex
2939
+ * array of the same size, however, if the input array has conjugate-complex symmetry (for example, it
2940
+ * is a result of forward transformation with DFT_COMPLEX_OUTPUT flag), the output is a real array;
2941
+ * while the function itself does not check whether the input is symmetrical or not, you can pass the
2942
+ * flag and then the function will assume the symmetry and produce the real output array (note that
2943
+ * when the input is packed into a real array and inverse transformation is executed, the function
2944
+ * treats the input as a packed complex-conjugate symmetrical array, and the output will also be a real
2945
+ * array).
2946
+ *
2947
+ */
2948
+ export declare const DFT_REAL_OUTPUT: DftFlags; // initializer: = 32
2949
+
2950
+ /**
2951
+ * specifies that input is complex input. If this flag is set, the input must have 2 channels. On the
2952
+ * other hand, for backwards compatibility reason, if input has 2 channels, input is already considered
2953
+ * complex.
2954
+ *
2955
+ */
2956
+ export declare const DFT_COMPLEX_INPUT: DftFlags; // initializer: = 64
2957
+
2958
+ /**
2959
+ * performs an inverse 1D or 2D transform instead of the default forward transform.
2960
+ *
2961
+ */
2962
+ export declare const DCT_INVERSE: DftFlags; // initializer: = DFT_INVERSE
2963
+
2964
+ /**
2965
+ * performs a forward or inverse transform of every individual row of the input matrix. This flag
2966
+ * enables you to transform multiple vectors simultaneously and can be used to decrease the overhead
2967
+ * (which is sometimes several times larger than the processing itself) to perform 3D and
2968
+ * higher-dimensional transforms and so forth.
2969
+ *
2970
+ */
2971
+ export declare const DCT_ROWS: DftFlags; // initializer: = DFT_ROWS
2972
+
2973
+ export declare const GEMM_1_T: GemmFlags; // initializer: = 1
2974
+
2975
+ export declare const GEMM_2_T: GemmFlags; // initializer: = 2
2976
+
2977
+ export declare const GEMM_3_T: GemmFlags; // initializer: = 4
2978
+
2979
+ /**
2980
+ * `\\[ norm = \\forkthree {\\|\\texttt{src1}\\|_{L_{\\infty}} = \\max _I | \\texttt{src1} (I)|}{if
2981
+ * \\(\\texttt{normType} = \\texttt{NORM_INF}\\) } {\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}} =
2982
+ * \\max _I | \\texttt{src1} (I) - \\texttt{src2} (I)|}{if \\(\\texttt{normType} =
2983
+ * \\texttt{NORM_INF}\\) } {\\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_{\\infty}}
2984
+ * }{\\|\\texttt{src2}\\|_{L_{\\infty}} }}{if \\(\\texttt{normType} = \\texttt{NORM_RELATIVE |
2985
+ * NORM_INF}\\) } \\]`
2986
+ *
2987
+ */
2988
+ export declare const NORM_INF: NormTypes; // initializer: = 1
2989
+
2990
+ /**
2991
+ * `\\[ norm = \\forkthree {\\| \\texttt{src1} \\| _{L_1} = \\sum _I | \\texttt{src1} (I)|}{if
2992
+ * \\(\\texttt{normType} = \\texttt{NORM_L1}\\)} { \\| \\texttt{src1} - \\texttt{src2} \\| _{L_1} =
2993
+ * \\sum _I | \\texttt{src1} (I) - \\texttt{src2} (I)|}{if \\(\\texttt{normType} = \\texttt{NORM_L1}\\)
2994
+ * } { \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_1} }{\\|\\texttt{src2}\\|_{L_1}} }{if
2995
+ * \\(\\texttt{normType} = \\texttt{NORM_RELATIVE | NORM_L1}\\) } \\]`
2996
+ *
2997
+ */
2998
+ export declare const NORM_L1: NormTypes; // initializer: = 2
2999
+
3000
+ /**
3001
+ * `\\[ norm = \\forkthree { \\| \\texttt{src1} \\| _{L_2} = \\sqrt{\\sum_I \\texttt{src1}(I)^2} }{if
3002
+ * \\(\\texttt{normType} = \\texttt{NORM_L2}\\) } { \\| \\texttt{src1} - \\texttt{src2} \\| _{L_2} =
3003
+ * \\sqrt{\\sum_I (\\texttt{src1}(I) - \\texttt{src2}(I))^2} }{if \\(\\texttt{normType} =
3004
+ * \\texttt{NORM_L2}\\) } { \\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_2}
3005
+ * }{\\|\\texttt{src2}\\|_{L_2}} }{if \\(\\texttt{normType} = \\texttt{NORM_RELATIVE | NORM_L2}\\) }
3006
+ * \\]`
3007
+ *
3008
+ */
3009
+ export declare const NORM_L2: NormTypes; // initializer: = 4
3010
+
3011
+ /**
3012
+ * `\\[ norm = \\forkthree { \\| \\texttt{src1} \\| _{L_2} ^{2} = \\sum_I \\texttt{src1}(I)^2} {if
3013
+ * \\(\\texttt{normType} = \\texttt{NORM_L2SQR}\\)} { \\| \\texttt{src1} - \\texttt{src2} \\| _{L_2}
3014
+ * ^{2} = \\sum_I (\\texttt{src1}(I) - \\texttt{src2}(I))^2 }{if \\(\\texttt{normType} =
3015
+ * \\texttt{NORM_L2SQR}\\) } { \\left(\\frac{\\|\\texttt{src1}-\\texttt{src2}\\|_{L_2}
3016
+ * }{\\|\\texttt{src2}\\|_{L_2}}\\right)^2 }{if \\(\\texttt{normType} = \\texttt{NORM_RELATIVE |
3017
+ * NORM_L2SQR}\\) } \\]`
3018
+ *
3019
+ */
3020
+ export declare const NORM_L2SQR: NormTypes; // initializer: = 5
3021
+
3022
+ /**
3023
+ * In the case of one input array, calculates the [Hamming] distance of the array from zero, In the
3024
+ * case of two input arrays, calculates the [Hamming] distance between the arrays.
3025
+ *
3026
+ */
3027
+ export declare const NORM_HAMMING: NormTypes; // initializer: = 6
3028
+
3029
+ /**
3030
+ * Similar to NORM_HAMMING, but in the calculation, each two bits of the input sequence will be added
3031
+ * and treated as a single bit to be used in the same calculation as NORM_HAMMING.
3032
+ *
3033
+ */
3034
+ export declare const NORM_HAMMING2: NormTypes; // initializer: = 7
3035
+
3036
+ export declare const NORM_TYPE_MASK: NormTypes; // initializer: = 7
3037
+
3038
+ export declare const NORM_RELATIVE: NormTypes; // initializer: = 8
3039
+
3040
+ export declare const NORM_MINMAX: NormTypes; // initializer: = 32
3041
+
3042
+ export declare const ROTATE_90_CLOCKWISE: RotateFlags; // initializer: = 0
3043
+
3044
+ export declare const ROTATE_180: RotateFlags; // initializer: = 1
3045
+
3046
+ export declare const ROTATE_90_COUNTERCLOCKWISE: RotateFlags; // initializer: = 2
3047
+
3048
+ /**
3049
+ * Various border types, image boundaries are denoted with `|`
3050
+ *
3051
+ * [borderInterpolate], [copyMakeBorder]
3052
+ *
3053
+ */
3054
+ export type BorderTypes = any;
3055
+
3056
+ /**
3057
+ * Various border types, image boundaries are denoted with `|`
3058
+ *
3059
+ * [borderInterpolate], [copyMakeBorder]
3060
+ *
3061
+ */
3062
+ export type CmpTypes = any;
3063
+
3064
+ /**
3065
+ * Various border types, image boundaries are denoted with `|`
3066
+ *
3067
+ * [borderInterpolate], [copyMakeBorder]
3068
+ *
3069
+ */
3070
+ export type DecompTypes = any;
3071
+
3072
+ /**
3073
+ * Various border types, image boundaries are denoted with `|`
3074
+ *
3075
+ * [borderInterpolate], [copyMakeBorder]
3076
+ *
3077
+ */
3078
+ export type DftFlags = any;
3079
+
3080
+ /**
3081
+ * Various border types, image boundaries are denoted with `|`
3082
+ *
3083
+ * [borderInterpolate], [copyMakeBorder]
3084
+ *
3085
+ */
3086
+ export type GemmFlags = any;
3087
+
3088
+ /**
3089
+ * Various border types, image boundaries are denoted with `|`
3090
+ *
3091
+ * [borderInterpolate], [copyMakeBorder]
3092
+ *
3093
+ */
3094
+ export type NormTypes = any;
3095
+
3096
+ /**
3097
+ * Various border types, image boundaries are denoted with `|`
3098
+ *
3099
+ * [borderInterpolate], [copyMakeBorder]
3100
+ *
3101
+ */
3102
+ export type RotateFlags = any;