@opencvjs/types 4.11.0-release.2 → 4.12.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.
@@ -0,0 +1,46 @@
1
+ import type {
2
+ Algorithm,
3
+ bool,
4
+ double,
5
+ InputArray,
6
+ OutputArray,
7
+ } from "./_types";
8
+
9
+ /**
10
+ * Base class for background/foreground segmentation algorithms.
11
+ *
12
+ * The class is only used to define the common interface for the whole family of background/foreground
13
+ * segmentation algorithms.
14
+ *
15
+ * Source:
16
+ * [opencv2/video.hpp](https://github.com/opencv/opencv/tree/master/modules/video/include/opencv2/video/background_segm.hpp).
17
+ */
18
+ export declare class BackgroundSubtractor extends Algorithm {
19
+ public constructor();
20
+
21
+ /**
22
+ * Computes a foreground mask.
23
+ *
24
+ * @param image Next video frame.
25
+ * @param fgmask The output foreground mask as an 8-bit binary image.
26
+ * @param learningRate The value between 0 and 1 that indicates how fast the background model is learnt.
27
+ * Negative parameter value makes the algorithm use some automatically chosen learning rate.
28
+ * 0 means that the background model is not updated at all, 1 means that the background model is
29
+ * completely reinitialized from the last frame.
30
+ */
31
+ public apply(
32
+ image: InputArray,
33
+ fgmask: OutputArray,
34
+ learningRate?: double,
35
+ ): void;
36
+
37
+ /**
38
+ * Computes a background image.
39
+ *
40
+ * @param backgroundImage The output background image.
41
+ *
42
+ * @note Sometimes the background image can be very blurry, as it contain the average background
43
+ * statistics.
44
+ */
45
+ public getBackgroundImage(backgroundImage: OutputArray): void;
46
+ }
@@ -0,0 +1,26 @@
1
+ import type { BackgroundSubtractor, bool, double, int } from "./_types";
2
+
3
+ /**
4
+ * Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
5
+ *
6
+ * The class implements the Gaussian mixture model background subtraction described in [Zivkovic2004]
7
+ * and [Zivkovic2006].
8
+ *
9
+ * Source:
10
+ * [opencv2/video.hpp](https://github.com/opencv/opencv/tree/master/modules/video/include/opencv2/video/background_segm.hpp).
11
+ */
12
+ export declare class BackgroundSubtractorMOG2 extends BackgroundSubtractor {
13
+ /**
14
+ * @param history Length of the history.
15
+ * @param varThreshold Threshold on the squared Mahalanobis distance between the pixel and the model
16
+ * to decide whether a pixel is well described by the background model. This parameter does not
17
+ * affect the background update.
18
+ * @param detectShadows If true, the algorithm will detect shadows and mark them. It decreases the
19
+ * speed a bit, so if you do not need this feature, set the parameter to false.
20
+ */
21
+ public constructor(
22
+ history?: int,
23
+ varThreshold?: double,
24
+ detectShadows?: bool,
25
+ );
26
+ }
@@ -1,7 +1,7 @@
1
1
  import type { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
2
2
 
3
3
  /**
4
- * https://docs.opencv.org/4.10.0/d0/d13/classcv_1_1Feature2D.html
4
+ * https://docs.opencv.org/4.12.0/d0/d13/classcv_1_1Feature2D.html
5
5
  */
6
6
  export declare class Feature2D extends Algorithm {
7
7
  /**
@@ -1,27 +1,25 @@
1
- import type {
2
- EmscriptenEmbindInstance,
3
- InputArray,
4
- MatSize,
5
- OutputArray,
6
- Point,
7
- Rect,
8
- Scalar,
9
- Size,
10
- } from "./helpers";
11
- import type { MatExpr } from "./MatExpr";
12
- import { Matx } from "./Matx";
13
1
  import type {
14
2
  AccessFlag,
15
3
  bool,
16
4
  double,
5
+ EmscriptenEmbindInstance,
6
+ InputArray,
17
7
  int,
18
8
  MatAllocator,
19
9
  MatCommaInitializer_,
20
10
  MatConstIterator_,
11
+ MatExpr,
21
12
  MatIterator_,
13
+ MatSize,
22
14
  MatStep,
15
+ Matx,
16
+ OutputArray,
17
+ Point,
23
18
  Point3_,
24
19
  Point_,
20
+ Rect,
21
+ Scalar,
22
+ Size,
25
23
  size_t,
26
24
  typename,
27
25
  uchar,
@@ -29,7 +27,7 @@ import type {
29
27
  UMatData,
30
28
  UMatUsageFlags,
31
29
  Vec,
32
- } from "./missing";
30
+ } from "./_types";
33
31
 
34
32
  /**
35
33
  * <a name="d3/d63/classcv_1_1Mat_1CVMat_Details"></a> The class [Mat](#d3/d63/classcv_1_1Mat})
@@ -1597,7 +1595,7 @@ export declare class Mat extends EmscriptenEmbindInstance {
1597
1595
 
1598
1596
  public updateContinuityFlag(): void;
1599
1597
 
1600
- public ucharPtr(i: any, j: any): any;
1598
+ public ucharPtr(i: any, j?: any): any;
1601
1599
  public charPtr(i: any, j: any): any;
1602
1600
  public shortPtr(i: any, j: any): any;
1603
1601
  public ushortPtr(i: any, j: any): any;
@@ -1,6 +1,4 @@
1
- import type { Mat, MatExpr } from "./_types";
2
- import type { double, int } from "./missing";
3
- import type { Scalar, Size } from "./helpers";
1
+ import type { double, int, Mat, MatExpr, Scalar, Size } from "./_types";
4
2
 
5
3
  export declare class MatOp {
6
4
  public constructor();
@@ -1,8 +1,7 @@
1
- import type { Feature2D } from "./_types";
2
- import type { float, int } from "./missing";
1
+ import type { Feature2D, float, int } from "./_types";
3
2
 
4
3
  /**
5
- * https://docs.opencv.org/4.10.0/db/d95/classcv_1_1ORB.html
4
+ * https://docs.opencv.org/4.12.0/db/d95/classcv_1_1ORB.html
6
5
  */
7
6
  export declare class ORB extends Feature2D {
8
7
  public constructor(
@@ -1,6 +1,12 @@
1
- import type { InputArray, OutputArray } from "./helpers";
2
- import type { double, FileNode, FileStorage, int } from "./missing";
3
- import type { Mat } from "./Mat";
1
+ import type {
2
+ double,
3
+ FileNode,
4
+ FileStorage,
5
+ InputArray,
6
+ int,
7
+ Mat,
8
+ OutputArray,
9
+ } from "./_types";
4
10
 
5
11
  /**
6
12
  * The class is used to calculate a special basis for a set of vectors. The basis will consist of
@@ -0,0 +1,111 @@
1
+ import type {
2
+ bool,
3
+ InputArray,
4
+ InputOutputArray,
5
+ OutputArray,
6
+ OutputArrayOfArrays,
7
+ Point2f,
8
+ } from "./_types";
9
+
10
+ /**
11
+ * QR Code detection and decoding class.
12
+ *
13
+ * This class implements QR code detection and decoding functionality.
14
+ * It can detect QR codes in an image and decode their content.
15
+ *
16
+ * Source:
17
+ * [opencv2/objdetect.hpp](https://github.com/opencv/opencv/tree/master/modules/objdetect/include/opencv2/objdetect.hpp).
18
+ */
19
+ export declare class QRCodeDetector {
20
+ /**
21
+ * QRCodeDetector constructor
22
+ */
23
+ public constructor();
24
+
25
+ /**
26
+ * Detects QR code in image and returns the quadrangle containing the code.
27
+ *
28
+ * @param img grayscale or color (BGR) image containing (or not) QR code.
29
+ * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
30
+ */
31
+ public detect(img: InputArray, points: OutputArray): bool;
32
+
33
+ /**
34
+ * Decodes QR code in image once it's found by the detect() method.
35
+ *
36
+ * @param img grayscale or color (BGR) image containing QR code.
37
+ * @param points Quadrangle vertices found by detect() method (or some other algorithm).
38
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
39
+ */
40
+ public decode(
41
+ img: InputArray,
42
+ points: InputArray,
43
+ straight_qrcode?: OutputArray,
44
+ ): String;
45
+
46
+ /**
47
+ * Both detects and decodes QR code
48
+ *
49
+ * @param img grayscale or color (BGR) image containing QR code.
50
+ * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
51
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
52
+ */
53
+ public detectAndDecode(
54
+ img: InputArray,
55
+ points?: OutputArray,
56
+ straight_qrcode?: OutputArray,
57
+ ): String;
58
+
59
+ /**
60
+ * Detects QR codes in image and returns the vector of the quadrangles containing the codes.
61
+ *
62
+ * @param img grayscale or color (BGR) image containing (or not) QR codes.
63
+ * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
64
+ */
65
+ public detectMulti(img: InputArray, points: OutputArrayOfArrays): bool;
66
+
67
+ /**
68
+ * Decodes QR codes in image once it's found by the detectMulti() method.
69
+ *
70
+ * @param img grayscale or color (BGR) image containing QR codes.
71
+ * @param points vector of Quadrangle vertices found by detectMulti() method (or some other algorithm).
72
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
73
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
74
+ */
75
+ public decodeMulti(
76
+ img: InputArray,
77
+ points: InputArray,
78
+ decoded_info: any,
79
+ straight_qrcode?: OutputArrayOfArrays,
80
+ ): bool;
81
+
82
+ /**
83
+ * Both detects and decodes QR codes
84
+ *
85
+ * @param img grayscale or color (BGR) image containing QR codes.
86
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
87
+ * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
88
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
89
+ */
90
+ public detectAndDecodeMulti(
91
+ img: InputArray,
92
+ decoded_info: any,
93
+ points?: OutputArrayOfArrays,
94
+ straight_qrcode?: OutputArrayOfArrays,
95
+ ): bool;
96
+
97
+ /**
98
+ * Aruco-based QR code detector
99
+ */
100
+ public setUseAruco(use_aruco: bool): void;
101
+
102
+ /**
103
+ * Get if Aruco-based QR code detector is used
104
+ */
105
+ public getUseAruco(): bool;
106
+
107
+ /**
108
+ * Releases the object
109
+ */
110
+ public delete(): void;
111
+ }
@@ -0,0 +1,139 @@
1
+ import type {
2
+ bool,
3
+ float,
4
+ InputArray,
5
+ OutputArray,
6
+ OutputArrayOfArrays,
7
+ } from "./_types";
8
+
9
+ /**
10
+ * Parameters for QRCodeDetectorAruco
11
+ */
12
+ export declare class QRCodeDetectorAruco_Params {
13
+ public minModuleSizeInPyramid: float;
14
+ public maxRotation: float;
15
+ public maxModuleSizeMismatch: float;
16
+ public maxTimingPatternMismatch: float;
17
+ public maxPenalties: float;
18
+ public maxColorsMismatch: float;
19
+ public scaleTimingPatternScore: float;
20
+
21
+ public constructor();
22
+
23
+ /**
24
+ * Releases the object
25
+ */
26
+ public delete(): void;
27
+ }
28
+
29
+ /**
30
+ * QR Code detection and decoding class using Aruco-based detection.
31
+ *
32
+ * This class implements QR code detection and decoding functionality using
33
+ * Aruco marker detection techniques for improved robustness.
34
+ *
35
+ * Source:
36
+ * [opencv2/objdetect.hpp](https://github.com/opencv/opencv/tree/master/modules/objdetect/include/opencv2/objdetect.hpp).
37
+ */
38
+ export declare class QRCodeDetectorAruco {
39
+ /**
40
+ * QRCodeDetectorAruco constructor
41
+ */
42
+ public constructor();
43
+
44
+ /**
45
+ * QRCodeDetectorAruco constructor with parameters
46
+ *
47
+ * @param params QRCodeDetectorAruco parameters
48
+ */
49
+ public constructor(params: QRCodeDetectorAruco_Params);
50
+
51
+ /**
52
+ * Detects QR code in image and returns the quadrangle containing the code.
53
+ *
54
+ * @param img grayscale or color (BGR) image containing (or not) QR code.
55
+ * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
56
+ */
57
+ public detect(img: InputArray, points: OutputArray): bool;
58
+
59
+ /**
60
+ * Decodes QR code in image once it's found by the detect() method.
61
+ *
62
+ * @param img grayscale or color (BGR) image containing QR code.
63
+ * @param points Quadrangle vertices found by detect() method (or some other algorithm).
64
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
65
+ */
66
+ public decode(
67
+ img: InputArray,
68
+ points: InputArray,
69
+ straight_qrcode?: OutputArray,
70
+ ): String;
71
+
72
+ /**
73
+ * Both detects and decodes QR code
74
+ *
75
+ * @param img grayscale or color (BGR) image containing QR code.
76
+ * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
77
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
78
+ */
79
+ public detectAndDecode(
80
+ img: InputArray,
81
+ points?: OutputArray,
82
+ straight_qrcode?: OutputArray,
83
+ ): String;
84
+
85
+ /**
86
+ * Detects QR codes in image and returns the vector of the quadrangles containing the codes.
87
+ *
88
+ * @param img grayscale or color (BGR) image containing (or not) QR codes.
89
+ * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
90
+ */
91
+ public detectMulti(img: InputArray, points: OutputArrayOfArrays): bool;
92
+
93
+ /**
94
+ * Decodes QR codes in image once it's found by the detectMulti() method.
95
+ *
96
+ * @param img grayscale or color (BGR) image containing QR codes.
97
+ * @param points vector of Quadrangle vertices found by detectMulti() method (or some other algorithm).
98
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
99
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
100
+ */
101
+ public decodeMulti(
102
+ img: InputArray,
103
+ points: InputArray,
104
+ decoded_info: any,
105
+ straight_qrcode?: OutputArrayOfArrays,
106
+ ): bool;
107
+
108
+ /**
109
+ * Both detects and decodes QR codes
110
+ *
111
+ * @param img grayscale or color (BGR) image containing QR codes.
112
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
113
+ * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
114
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
115
+ */
116
+ public detectAndDecodeMulti(
117
+ img: InputArray,
118
+ decoded_info: any,
119
+ points?: OutputArrayOfArrays,
120
+ straight_qrcode?: OutputArrayOfArrays,
121
+ ): bool;
122
+
123
+ /**
124
+ * Get detector parameters
125
+ */
126
+ public getDetectorParameters(): QRCodeDetectorAruco_Params;
127
+
128
+ /**
129
+ * Set detector parameters
130
+ *
131
+ * @param params QRCodeDetectorAruco parameters
132
+ */
133
+ public setDetectorParameters(params: QRCodeDetectorAruco_Params): void;
134
+
135
+ /**
136
+ * Releases the object
137
+ */
138
+ public delete(): void;
139
+ }
@@ -1,5 +1,4 @@
1
- import type { Point2f, Rect, Rect_, Size2f } from "./helpers";
2
- import type { float } from "./missing";
1
+ import type { float, Point2f, Rect, Rect_, Size2f } from "./_types";
3
2
 
4
3
  /**
5
4
  * Each rectangle is specified by the center point (mass center), length of each side (represented by
@@ -1,12 +1,10 @@
1
- // Types for APIs defined in helpers.js
2
- // https://github.com/opencv/opencv/blob/4.10.0/modules/js/src/helpers.js#L29
1
+ // Scalar, Point, Rect, etc are defined by opencv.js (helpers.js) and we need to declare them manually:
3
2
 
4
- import { RotatedRect } from "./RotatedRect";
5
3
  import { Algorithm } from "./Algorithm";
6
- import type { LineTypes } from "./imgproc_draw";
7
- import { Mat } from "./Mat";
4
+ import { RotatedRect } from "./RotatedRect";
8
5
  import type { NormTypes } from "./core_array";
9
- import type { bool, double } from "./missing";
6
+ import { Mat } from "./Mat";
7
+ import type { LineTypes } from "./imgproc_draw";
10
8
 
11
9
  export declare class Range {
12
10
  public start: number;
@@ -17,7 +15,6 @@ export declare class Range {
17
15
  export declare class Scalar extends Array<number> {
18
16
  public static all(...v: number[]): Scalar;
19
17
  }
20
-
21
18
  // Hack: expose Mat super classes like Mat_, InputArray, Vector, OutputArray we make them alias of Mat to simplify and make it work
22
19
  export { Mat as InputArray };
23
20
  export { Mat as InputOutputArray };
@@ -93,12 +90,12 @@ export declare class MinMaxLoc {
93
90
  export declare function exceptionFromPtr(err: number): any;
94
91
  export declare function onRuntimeInitialized(): any;
95
92
  export declare function FS_createDataFile(
96
- arg0: string,
97
- path: string,
93
+ parent: string,
94
+ name: string,
98
95
  data: Uint8Array,
99
- arg3: boolean,
100
- arg4: boolean,
101
- arg5: boolean,
96
+ canRead: boolean,
97
+ canWrite: boolean,
98
+ canOwn: boolean,
102
99
  ): any;
103
100
 
104
101
  /**
@@ -145,7 +142,7 @@ export declare function setDelayFunction(...a: any[]): any;
145
142
  export declare class EmscriptenEmbindInstance {
146
143
  isAliasOf(other: any): bool;
147
144
  clone(): any;
148
- delete(): void;
145
+ delete(): any;
149
146
  isDeleted(): boolean;
150
147
  deleteLater(): any;
151
148
  }
@@ -249,7 +246,7 @@ export declare const CV_64FC2: CVDataType;
249
246
  export declare const CV_64FC3: CVDataType;
250
247
  export declare const CV_64FC4: CVDataType;
251
248
 
252
- export type CVDataType = number;
249
+ export type CVDataType = any;
253
250
 
254
251
  export declare function ellipse1(
255
252
  dst: Mat,
@@ -272,3 +269,62 @@ export declare function matFromArray(
272
269
  type: any,
273
270
  array: any,
274
271
  ): Mat;
272
+
273
+ // Missing imports:
274
+ export type Mat4 = any;
275
+ export type Mat3 = any;
276
+ export type Vec3 = any;
277
+ export type float_type = any;
278
+ export type int = number;
279
+ export type bool = boolean;
280
+ export type FileNode = any;
281
+ export type FileStorage = any;
282
+ export type Ptr = any;
283
+ export type size_t = any;
284
+ export type double = number;
285
+ export type float = number;
286
+ export type UMat = any;
287
+ export type Matrix = any;
288
+ export type BucketKey = any;
289
+ export type Bucket = any;
290
+ export type LshStats = any;
291
+ export type MatAllocator = any;
292
+ export type uchar = any;
293
+ export type MatStep = any;
294
+ export type UMatData = any;
295
+ export type typename = any;
296
+ export type Vec = any;
297
+ export type Point_ = any;
298
+ export type Point3_ = any;
299
+ export type MatCommaInitializer_ = any;
300
+ export type MatIterator_ = any;
301
+ export type MatConstIterator_ = any;
302
+ export type AccessFlag = any;
303
+ export type UMatUsageFlags = any;
304
+ export type _Tp = any;
305
+ export type Matx_AddOp = any;
306
+ export type Matx_SubOp = any;
307
+ export type _T2 = any;
308
+ export type Matx_ScaleOp = any;
309
+ export type Matx_MulOp = any;
310
+ export type Matx_DivOp = any;
311
+ export type Matx_MatMulOp = any;
312
+ export type Matx_TOp = any;
313
+ export type diag_type = any;
314
+ export type _EqPredicate = any;
315
+ export type cvhalDFT = any;
316
+ export type schar = any;
317
+ export type ushort = any;
318
+ export type short = any;
319
+ export type int64 = any;
320
+ export type ErrorCallback = any;
321
+ export type unsigned = any;
322
+ export type uint64 = any;
323
+ export type float16_t = any;
324
+ export type AsyncArray = any;
325
+ export type Net = any;
326
+ export type Moments = any;
327
+ export type uint64_t = any;
328
+ export type uint32_t = any;
329
+ export type int32_t = any;
330
+ export type int64_t = any;
@@ -1,6 +1,8 @@
1
1
  export * from "./Affine3";
2
2
  export * from "./Algorithm";
3
3
  export * from "./AutoBuffer";
4
+ export * from "./BackgroundSubtractor";
5
+ export * from "./BackgroundSubtractorMOG2";
4
6
  export * from "./BFMatcher";
5
7
  export * from "./BOWTrainer";
6
8
  export * from "./calib3d";
@@ -17,9 +19,9 @@ export * from "./Feature2D";
17
19
  export * from "./features2d_draw";
18
20
  export * from "./fisheye";
19
21
  export * from "./FlannBasedMatcher";
20
- export * from "./helpers";
21
22
  export * from "./HOGDescriptor";
22
23
  export * from "./imgproc_color_conversions";
24
+ export * from "./imgproc_colormap";
23
25
  export * from "./imgproc_draw";
24
26
  export * from "./imgproc_feature";
25
27
  export * from "./imgproc_filter";
@@ -34,7 +36,6 @@ export * from "./Mat";
34
36
  export * from "./MatExpr";
35
37
  export * from "./MatOp";
36
38
  export * from "./Matx";
37
- export * from "./missing";
38
39
  export * from "./Node";
39
40
  export * from "./objdetect";
40
41
  export * from "./ORB";
@@ -43,6 +44,7 @@ export * from "./photo_inpaint";
43
44
  export * from "./RotatedRect";
44
45
  export * from "./softdouble";
45
46
  export * from "./softfloat";
47
+ export * from "./video_track";
48
+ export * from "./_hacks";
46
49
  export * from "./Tracker";
47
50
  export * from "./TrackerMIL";
48
- export * from "./video_track";
@@ -1,11 +1,12 @@
1
1
  import type {
2
+ double,
2
3
  InputArray,
3
4
  InputOutputArray,
5
+ int,
4
6
  OutputArray,
5
7
  TermCriteria,
6
- } from "./helpers";
7
- import type { double, int } from "./missing";
8
-
8
+ _EqPredicate,
9
+ } from "./_types";
9
10
  /*
10
11
  * # Clustering
11
12
  *
@@ -76,5 +77,5 @@ export declare function partition(
76
77
  arg120: any,
77
78
  _vec: any,
78
79
  labels: any,
79
- predicate?: any,
80
+ predicate?: _EqPredicate,
80
81
  ): any;
@@ -0,0 +1,60 @@
1
+ import type { InputArray, int, OutputArray } from "./_types";
2
+
3
+ /*
4
+ * # Colormap Transformations
5
+ *
6
+ */
7
+
8
+ /**
9
+ * Applies a colormap on a given image.
10
+ *
11
+ * @param src The source image, which should be grayscale. Should be 8-bit, 16-bit, or floating-point.
12
+ * @param dst The result is the colored image.
13
+ * @param colormap The colormap to apply.
14
+ */
15
+ export declare function applyColorMap(
16
+ src: InputArray,
17
+ dst: OutputArray,
18
+ colormap: int,
19
+ ): void;
20
+
21
+ /**
22
+ * Applies a user colormap on a given image.
23
+ *
24
+ * @param src The source image, which should be grayscale. Should be 8-bit, 16-bit, or floating-point.
25
+ * @param dst The result is the colored image.
26
+ * @param userColor The colormap to apply of type CV_8UC1 or CV_8UC3 and size 256.
27
+ */
28
+ export declare function applyColorMap(
29
+ src: InputArray,
30
+ dst: OutputArray,
31
+ userColor: InputArray,
32
+ ): void;
33
+
34
+ /**
35
+ * Colormap types used by the applyColorMap function.
36
+ */
37
+ export type ColormapTypes = any;
38
+
39
+ export declare const COLORMAP_AUTUMN: ColormapTypes; // initializer: = 0
40
+ export declare const COLORMAP_BONE: ColormapTypes; // initializer: = 1
41
+ export declare const COLORMAP_JET: ColormapTypes; // initializer: = 2
42
+ export declare const COLORMAP_WINTER: ColormapTypes; // initializer: = 3
43
+ export declare const COLORMAP_RAINBOW: ColormapTypes; // initializer: = 4
44
+ export declare const COLORMAP_OCEAN: ColormapTypes; // initializer: = 5
45
+ export declare const COLORMAP_SUMMER: ColormapTypes; // initializer: = 6
46
+ export declare const COLORMAP_SPRING: ColormapTypes; // initializer: = 7
47
+ export declare const COLORMAP_COOL: ColormapTypes; // initializer: = 8
48
+ export declare const COLORMAP_HSV: ColormapTypes; // initializer: = 9
49
+ export declare const COLORMAP_PINK: ColormapTypes; // initializer: = 10
50
+ export declare const COLORMAP_HOT: ColormapTypes; // initializer: = 11
51
+ export declare const COLORMAP_PARULA: ColormapTypes; // initializer: = 12
52
+ export declare const COLORMAP_MAGMA: ColormapTypes; // initializer: = 13
53
+ export declare const COLORMAP_INFERNO: ColormapTypes; // initializer: = 14
54
+ export declare const COLORMAP_PLASMA: ColormapTypes; // initializer: = 15
55
+ export declare const COLORMAP_VIRIDIS: ColormapTypes; // initializer: = 16
56
+ export declare const COLORMAP_CIVIDIS: ColormapTypes; // initializer: = 17
57
+ export declare const COLORMAP_TWILIGHT: ColormapTypes; // initializer: = 18
58
+ export declare const COLORMAP_TWILIGHT_SHIFTED: ColormapTypes; // initializer: = 19
59
+ export declare const COLORMAP_TURBO: ColormapTypes; // initializer: = 20
60
+ export declare const COLORMAP_DEEPGREEN: ColormapTypes; // initializer: = 21
@@ -1,7 +1,10 @@
1
1
  import type {
2
+ bool,
3
+ double,
2
4
  InputArray,
3
5
  InputArrayOfArrays,
4
6
  InputOutputArray,
7
+ int,
5
8
  Point,
6
9
  Point2d,
7
10
  Rect,
@@ -9,9 +12,7 @@ import type {
9
12
  Size,
10
13
  Size2d,
11
14
  Size2l,
12
- } from "./helpers";
13
- import type { bool, double, int } from "./missing";
14
-
15
+ } from "./_types";
15
16
  /*
16
17
  * # Drawing Functions
17
18
  * Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be rendered with antialiasing (implemented only for 8-bit images for now). All the functions include the parameter color that uses an RGB value (that may be constructed with the Scalar constructor ) for color images and brightness for grayscale images. For color images, the channel ordering is normally *Blue, Green, Red*. This is what imshow, imread, and imwrite expect. So, if you form a color using the Scalar constructor, it should look like:
@@ -1,14 +1,18 @@
1
- import type { RotatedRect } from "./_types";
2
1
  import type {
2
+ bool,
3
3
  Circle,
4
+ double,
5
+ float,
4
6
  InputArray,
7
+ int,
8
+ Moments,
5
9
  OutputArray,
6
10
  OutputArrayOfArrays,
7
11
  Point,
8
12
  Point2f,
9
13
  Rect,
10
- } from "./helpers";
11
- import type { bool, double, float, int, Moments } from "./missing";
14
+ RotatedRect,
15
+ } from "./_types";
12
16
 
13
17
  /*
14
18
  * # Structural Analysis and Shape Descriptors
@@ -61,9 +65,9 @@ export declare function boundingRect(array: InputArray): Rect;
61
65
  *
62
66
  * @param box The input rotated rectangle. It may be the output of
63
67
  *
64
- * @param points The output array of four vertices of rectangles.
68
+ * @returns An array of four vertices of the rectangle (Point2f[])
65
69
  */
66
- export declare function boxPoints(box: RotatedRect, points: OutputArray): void;
70
+ export declare function boxPoints(box: RotatedRect): Point2f[];
67
71
 
68
72
  /**
69
73
  * image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0
@@ -101,3 +101,9 @@ export declare const CASCADE_SCALE_IMAGE: any; // initializer: = 2
101
101
  export declare const CASCADE_FIND_BIGGEST_OBJECT: any; // initializer: = 4
102
102
 
103
103
  export declare const CASCADE_DO_ROUGH_SEARCH: any; // initializer: = 8
104
+
105
+ export { QRCodeDetector } from "./QRCodeDetector";
106
+ export {
107
+ QRCodeDetectorAruco,
108
+ QRCodeDetectorAruco_Params,
109
+ } from "./QRCodeDetectorAruco";
@@ -1,6 +1,4 @@
1
- import type { InputArray, OutputArray } from "./helpers";
2
- import type { double, int } from "./missing";
3
-
1
+ import type { double, InputArray, int, OutputArray } from "./_types";
4
2
  /*
5
3
  * # Inpainting
6
4
  * the inpainting algorithm
@@ -1,11 +1,4 @@
1
- import type {
2
- bool,
3
- int,
4
- int32_t,
5
- int64_t,
6
- uint32_t,
7
- uint64_t,
8
- } from "./missing.js";
1
+ import type { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
9
2
 
10
3
  export declare class softdouble {
11
4
  public v: uint64_t;
@@ -1,11 +1,4 @@
1
- import type {
2
- bool,
3
- int,
4
- int32_t,
5
- int64_t,
6
- uint32_t,
7
- uint64_t,
8
- } from "./missing";
1
+ import type { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
9
2
 
10
3
  export declare class softfloat {
11
4
  public v: uint32_t;
@@ -1,14 +1,16 @@
1
- import type { bool, double, int } from "./missing";
2
- import {
1
+ import type {
2
+ bool,
3
+ double,
3
4
  InputArray,
4
5
  InputOutputArray,
6
+ int,
7
+ Mat,
5
8
  OutputArray,
6
9
  OutputArrayOfArrays,
10
+ RotatedRect,
7
11
  Size,
8
12
  TermCriteria,
9
- } from "./helpers";
10
- import { Mat, RotatedRect } from "./_types";
11
-
13
+ } from "./_types";
12
14
  /*
13
15
  * # Object Tracking
14
16
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencvjs/types",
3
- "version": "4.11.0-release.2",
3
+ "version": "4.12.0-release.1",
4
4
  "author": "ocavue <ocavue@gmail.com>",
5
5
  "repository": "https://github.com/ocavue/opencvjs",
6
6
  "types": "./lib/index.d.ts",
@@ -1,58 +0,0 @@
1
- // Missing imports:
2
- export type Mat4 = any;
3
- export type Mat3 = any;
4
- export type Vec3 = any;
5
- export type float_type = any;
6
- export type int = number;
7
- export type bool = boolean;
8
- export type FileNode = any;
9
- export type FileStorage = any;
10
- export type Ptr = any;
11
- export type size_t = any;
12
- export type double = number;
13
- export type float = number;
14
- export type UMat = any;
15
- export type Matrix = any;
16
- export type BucketKey = any;
17
- export type Bucket = any;
18
- export type LshStats = any;
19
- export type MatAllocator = any;
20
- export type uchar = any;
21
- export type MatStep = any;
22
- export type UMatData = any;
23
- export type typename = any;
24
- export type Vec = any;
25
- export type Point_ = any;
26
- export type Point3_ = any;
27
- export type MatCommaInitializer_ = any;
28
- export type MatIterator_ = any;
29
- export type MatConstIterator_ = any;
30
- export type AccessFlag = any;
31
- export type UMatUsageFlags = any;
32
- export type _Tp = any;
33
- export type Matx_AddOp = any;
34
- export type Matx_SubOp = any;
35
- export type _T2 = any;
36
- export type Matx_ScaleOp = any;
37
- export type Matx_MulOp = any;
38
- export type Matx_DivOp = any;
39
- export type Matx_MatMulOp = any;
40
- export type Matx_TOp = any;
41
- export type diag_type = any;
42
- export type _EqPredicate = any;
43
- export type cvhalDFT = any;
44
- export type schar = any;
45
- export type ushort = any;
46
- export type short = any;
47
- export type int64 = any;
48
- export type ErrorCallback = any;
49
- export type unsigned = any;
50
- export type uint64 = any;
51
- export type float16_t = any;
52
- export type AsyncArray = any;
53
- export type Net = any;
54
- export type Moments = any;
55
- export type uint64_t = any;
56
- export type uint32_t = any;
57
- export type int32_t = any;
58
- export type int64_t = any;