@techstark/opencv-js 4.11.0-release.1 → 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.
Files changed (32) hide show
  1. package/README.md +18 -17
  2. package/dist/opencv.js +12 -11
  3. package/dist/src/types/opencv/Feature2D.d.ts +1 -1
  4. package/dist/src/types/opencv/Mat.d.ts +1 -1
  5. package/dist/src/types/opencv/ORB.d.ts +1 -1
  6. package/dist/src/types/opencv/QRCodeDetector.d.ts +76 -0
  7. package/dist/src/types/opencv/QRCodeDetector.js +3 -0
  8. package/dist/src/types/opencv/QRCodeDetector.js.map +1 -0
  9. package/dist/src/types/opencv/QRCodeDetectorAruco.d.ts +101 -0
  10. package/dist/src/types/opencv/QRCodeDetectorAruco.js +3 -0
  11. package/dist/src/types/opencv/QRCodeDetectorAruco.js.map +1 -0
  12. package/dist/src/types/opencv/_types.d.ts +1 -0
  13. package/dist/src/types/opencv/_types.js +1 -0
  14. package/dist/src/types/opencv/_types.js.map +1 -1
  15. package/dist/src/types/opencv/imgproc_colormap.d.ts +43 -0
  16. package/dist/src/types/opencv/imgproc_colormap.js +3 -0
  17. package/dist/src/types/opencv/imgproc_colormap.js.map +1 -0
  18. package/dist/src/types/opencv/imgproc_shape.d.ts +2 -2
  19. package/dist/src/types/opencv/objdetect.d.ts +2 -0
  20. package/dist/src/types/opencv/objdetect.js +6 -0
  21. package/dist/src/types/opencv/objdetect.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/types/opencv/Feature2D.ts +1 -1
  24. package/src/types/opencv/FlannBasedMatcher.ts +8 -1
  25. package/src/types/opencv/Mat.ts +1 -1
  26. package/src/types/opencv/ORB.ts +1 -1
  27. package/src/types/opencv/QRCodeDetector.ts +111 -0
  28. package/src/types/opencv/QRCodeDetectorAruco.ts +139 -0
  29. package/src/types/opencv/_types.ts +1 -0
  30. package/src/types/opencv/imgproc_colormap.ts +60 -0
  31. package/src/types/opencv/imgproc_shape.ts +3 -5
  32. package/src/types/opencv/objdetect.ts +6 -0
@@ -1,6 +1,6 @@
1
1
  import type { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
2
2
  /**
3
- * https://docs.opencv.org/4.11.0/d0/d13/classcv_1_1Feature2D.html
3
+ * https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html
4
4
  */
5
5
  export declare class Feature2D extends Algorithm {
6
6
  /**
@@ -1438,7 +1438,7 @@ export declare class Mat extends EmscriptenEmbindInstance {
1438
1438
  */
1439
1439
  type(): int;
1440
1440
  updateContinuityFlag(): void;
1441
- ucharPtr(i: any, j: any): any;
1441
+ ucharPtr(i: any, j?: any): any;
1442
1442
  charPtr(i: any, j: any): any;
1443
1443
  shortPtr(i: any, j: any): any;
1444
1444
  ushortPtr(i: any, j: any): any;
@@ -1,6 +1,6 @@
1
1
  import type { Feature2D, float, int } from "./_types";
2
2
  /**
3
- * https://docs.opencv.org/4.11.0/db/d95/classcv_1_1ORB.html
3
+ * https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html
4
4
  */
5
5
  export declare class ORB extends Feature2D {
6
6
  constructor(nfeatures?: int, scaleFactor?: float, nlevels?: int, edgeThreshold?: int, firstLevel?: int, WTA_K?: int, scoreType?: ORBScoreType, patchSize?: int, fastThreshold?: int);
@@ -0,0 +1,76 @@
1
+ import type { bool, InputArray, OutputArray, OutputArrayOfArrays } from "./_types";
2
+ /**
3
+ * QR Code detection and decoding class.
4
+ *
5
+ * This class implements QR code detection and decoding functionality.
6
+ * It can detect QR codes in an image and decode their content.
7
+ *
8
+ * Source:
9
+ * [opencv2/objdetect.hpp](https://github.com/opencv/opencv/tree/master/modules/objdetect/include/opencv2/objdetect.hpp).
10
+ */
11
+ export declare class QRCodeDetector {
12
+ /**
13
+ * QRCodeDetector constructor
14
+ */
15
+ constructor();
16
+ /**
17
+ * Detects QR code in image and returns the quadrangle containing the code.
18
+ *
19
+ * @param img grayscale or color (BGR) image containing (or not) QR code.
20
+ * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
21
+ */
22
+ detect(img: InputArray, points: OutputArray): bool;
23
+ /**
24
+ * Decodes QR code in image once it's found by the detect() method.
25
+ *
26
+ * @param img grayscale or color (BGR) image containing QR code.
27
+ * @param points Quadrangle vertices found by detect() method (or some other algorithm).
28
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
29
+ */
30
+ decode(img: InputArray, points: InputArray, straight_qrcode?: OutputArray): String;
31
+ /**
32
+ * Both detects and decodes QR code
33
+ *
34
+ * @param img grayscale or color (BGR) image containing QR code.
35
+ * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
36
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
37
+ */
38
+ detectAndDecode(img: InputArray, points?: OutputArray, straight_qrcode?: OutputArray): String;
39
+ /**
40
+ * Detects QR codes in image and returns the vector of the quadrangles containing the codes.
41
+ *
42
+ * @param img grayscale or color (BGR) image containing (or not) QR codes.
43
+ * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
44
+ */
45
+ detectMulti(img: InputArray, points: OutputArrayOfArrays): bool;
46
+ /**
47
+ * Decodes QR codes in image once it's found by the detectMulti() method.
48
+ *
49
+ * @param img grayscale or color (BGR) image containing QR codes.
50
+ * @param points vector of Quadrangle vertices found by detectMulti() method (or some other algorithm).
51
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
52
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
53
+ */
54
+ decodeMulti(img: InputArray, points: InputArray, decoded_info: any, straight_qrcode?: OutputArrayOfArrays): bool;
55
+ /**
56
+ * Both detects and decodes QR codes
57
+ *
58
+ * @param img grayscale or color (BGR) image containing QR codes.
59
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
60
+ * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
61
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
62
+ */
63
+ detectAndDecodeMulti(img: InputArray, decoded_info: any, points?: OutputArrayOfArrays, straight_qrcode?: OutputArrayOfArrays): bool;
64
+ /**
65
+ * Aruco-based QR code detector
66
+ */
67
+ setUseAruco(use_aruco: bool): void;
68
+ /**
69
+ * Get if Aruco-based QR code detector is used
70
+ */
71
+ getUseAruco(): bool;
72
+ /**
73
+ * Releases the object
74
+ */
75
+ delete(): void;
76
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=QRCodeDetector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QRCodeDetector.js","sourceRoot":"","sources":["../../../../src/types/opencv/QRCodeDetector.ts"],"names":[],"mappings":""}
@@ -0,0 +1,101 @@
1
+ import type { bool, float, InputArray, OutputArray, OutputArrayOfArrays } from "./_types";
2
+ /**
3
+ * Parameters for QRCodeDetectorAruco
4
+ */
5
+ export declare class QRCodeDetectorAruco_Params {
6
+ minModuleSizeInPyramid: float;
7
+ maxRotation: float;
8
+ maxModuleSizeMismatch: float;
9
+ maxTimingPatternMismatch: float;
10
+ maxPenalties: float;
11
+ maxColorsMismatch: float;
12
+ scaleTimingPatternScore: float;
13
+ constructor();
14
+ /**
15
+ * Releases the object
16
+ */
17
+ delete(): void;
18
+ }
19
+ /**
20
+ * QR Code detection and decoding class using Aruco-based detection.
21
+ *
22
+ * This class implements QR code detection and decoding functionality using
23
+ * Aruco marker detection techniques for improved robustness.
24
+ *
25
+ * Source:
26
+ * [opencv2/objdetect.hpp](https://github.com/opencv/opencv/tree/master/modules/objdetect/include/opencv2/objdetect.hpp).
27
+ */
28
+ export declare class QRCodeDetectorAruco {
29
+ /**
30
+ * QRCodeDetectorAruco constructor
31
+ */
32
+ constructor();
33
+ /**
34
+ * QRCodeDetectorAruco constructor with parameters
35
+ *
36
+ * @param params QRCodeDetectorAruco parameters
37
+ */
38
+ constructor(params: QRCodeDetectorAruco_Params);
39
+ /**
40
+ * Detects QR code in image and returns the quadrangle containing the code.
41
+ *
42
+ * @param img grayscale or color (BGR) image containing (or not) QR code.
43
+ * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
44
+ */
45
+ detect(img: InputArray, points: OutputArray): bool;
46
+ /**
47
+ * Decodes QR code in image once it's found by the detect() method.
48
+ *
49
+ * @param img grayscale or color (BGR) image containing QR code.
50
+ * @param points Quadrangle vertices found by detect() method (or some other algorithm).
51
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
52
+ */
53
+ decode(img: InputArray, points: InputArray, straight_qrcode?: OutputArray): String;
54
+ /**
55
+ * Both detects and decodes QR code
56
+ *
57
+ * @param img grayscale or color (BGR) image containing QR code.
58
+ * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
59
+ * @param straight_qrcode The optional output image containing rectified and binarized QR code
60
+ */
61
+ detectAndDecode(img: InputArray, points?: OutputArray, straight_qrcode?: OutputArray): String;
62
+ /**
63
+ * Detects QR codes in image and returns the vector of the quadrangles containing the codes.
64
+ *
65
+ * @param img grayscale or color (BGR) image containing (or not) QR codes.
66
+ * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
67
+ */
68
+ detectMulti(img: InputArray, points: OutputArrayOfArrays): bool;
69
+ /**
70
+ * Decodes QR codes in image once it's found by the detectMulti() method.
71
+ *
72
+ * @param img grayscale or color (BGR) image containing QR codes.
73
+ * @param points vector of Quadrangle vertices found by detectMulti() method (or some other algorithm).
74
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
75
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
76
+ */
77
+ decodeMulti(img: InputArray, points: InputArray, decoded_info: any, straight_qrcode?: OutputArrayOfArrays): bool;
78
+ /**
79
+ * Both detects and decodes QR codes
80
+ *
81
+ * @param img grayscale or color (BGR) image containing QR codes.
82
+ * @param decoded_info UTF8-encoded output vector of String or empty vector of String if the codes cannot be decoded.
83
+ * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
84
+ * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
85
+ */
86
+ detectAndDecodeMulti(img: InputArray, decoded_info: any, points?: OutputArrayOfArrays, straight_qrcode?: OutputArrayOfArrays): bool;
87
+ /**
88
+ * Get detector parameters
89
+ */
90
+ getDetectorParameters(): QRCodeDetectorAruco_Params;
91
+ /**
92
+ * Set detector parameters
93
+ *
94
+ * @param params QRCodeDetectorAruco parameters
95
+ */
96
+ setDetectorParameters(params: QRCodeDetectorAruco_Params): void;
97
+ /**
98
+ * Releases the object
99
+ */
100
+ delete(): void;
101
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=QRCodeDetectorAruco.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QRCodeDetectorAruco.js","sourceRoot":"","sources":["../../../../src/types/opencv/QRCodeDetectorAruco.ts"],"names":[],"mappings":""}
@@ -19,6 +19,7 @@ export * from "./fisheye";
19
19
  export * from "./FlannBasedMatcher";
20
20
  export * from "./HOGDescriptor";
21
21
  export * from "./imgproc_color_conversions";
22
+ export * from "./imgproc_colormap";
22
23
  export * from "./imgproc_draw";
23
24
  export * from "./imgproc_feature";
24
25
  export * from "./imgproc_filter";
@@ -35,6 +35,7 @@ __exportStar(require("./fisheye"), exports);
35
35
  __exportStar(require("./FlannBasedMatcher"), exports);
36
36
  __exportStar(require("./HOGDescriptor"), exports);
37
37
  __exportStar(require("./imgproc_color_conversions"), exports);
38
+ __exportStar(require("./imgproc_colormap"), exports);
38
39
  __exportStar(require("./imgproc_draw"), exports);
39
40
  __exportStar(require("./imgproc_feature"), exports);
40
41
  __exportStar(require("./imgproc_filter"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/types/opencv/_types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,+CAA6B;AAC7B,sDAAoC;AACpC,wCAAsB;AACtB,kDAAgC;AAChC,8CAA4B;AAC5B,8CAA4B;AAC5B,oDAAkC;AAClC,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,8DAA4C;AAC5C,iDAA+B;AAC/B,oDAAkC;AAClC,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,6CAA2B;AAC3B,wCAAsB;AACtB,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,wCAAsB;AACtB,wCAAsB;AACtB,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B"}
1
+ {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/types/opencv/_types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,+CAA6B;AAC7B,sDAAoC;AACpC,wCAAsB;AACtB,kDAAgC;AAChC,8CAA4B;AAC5B,8CAA4B;AAC5B,oDAAkC;AAClC,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,8DAA4C;AAC5C,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,6CAA2B;AAC3B,wCAAsB;AACtB,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,wCAAsB;AACtB,wCAAsB;AACtB,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B"}
@@ -0,0 +1,43 @@
1
+ import type { InputArray, int, OutputArray } from "./_types";
2
+ /**
3
+ * Applies a colormap on a given image.
4
+ *
5
+ * @param src The source image, which should be grayscale. Should be 8-bit, 16-bit, or floating-point.
6
+ * @param dst The result is the colored image.
7
+ * @param colormap The colormap to apply.
8
+ */
9
+ export declare function applyColorMap(src: InputArray, dst: OutputArray, colormap: int): void;
10
+ /**
11
+ * Applies a user colormap on a given image.
12
+ *
13
+ * @param src The source image, which should be grayscale. Should be 8-bit, 16-bit, or floating-point.
14
+ * @param dst The result is the colored image.
15
+ * @param userColor The colormap to apply of type CV_8UC1 or CV_8UC3 and size 256.
16
+ */
17
+ export declare function applyColorMap(src: InputArray, dst: OutputArray, userColor: InputArray): void;
18
+ /**
19
+ * Colormap types used by the applyColorMap function.
20
+ */
21
+ export type ColormapTypes = any;
22
+ export declare const COLORMAP_AUTUMN: ColormapTypes;
23
+ export declare const COLORMAP_BONE: ColormapTypes;
24
+ export declare const COLORMAP_JET: ColormapTypes;
25
+ export declare const COLORMAP_WINTER: ColormapTypes;
26
+ export declare const COLORMAP_RAINBOW: ColormapTypes;
27
+ export declare const COLORMAP_OCEAN: ColormapTypes;
28
+ export declare const COLORMAP_SUMMER: ColormapTypes;
29
+ export declare const COLORMAP_SPRING: ColormapTypes;
30
+ export declare const COLORMAP_COOL: ColormapTypes;
31
+ export declare const COLORMAP_HSV: ColormapTypes;
32
+ export declare const COLORMAP_PINK: ColormapTypes;
33
+ export declare const COLORMAP_HOT: ColormapTypes;
34
+ export declare const COLORMAP_PARULA: ColormapTypes;
35
+ export declare const COLORMAP_MAGMA: ColormapTypes;
36
+ export declare const COLORMAP_INFERNO: ColormapTypes;
37
+ export declare const COLORMAP_PLASMA: ColormapTypes;
38
+ export declare const COLORMAP_VIRIDIS: ColormapTypes;
39
+ export declare const COLORMAP_CIVIDIS: ColormapTypes;
40
+ export declare const COLORMAP_TWILIGHT: ColormapTypes;
41
+ export declare const COLORMAP_TWILIGHT_SHIFTED: ColormapTypes;
42
+ export declare const COLORMAP_TURBO: ColormapTypes;
43
+ export declare const COLORMAP_DEEPGREEN: ColormapTypes;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=imgproc_colormap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imgproc_colormap.js","sourceRoot":"","sources":["../../../../src/types/opencv/imgproc_colormap.ts"],"names":[],"mappings":""}
@@ -38,9 +38,9 @@ export declare function boundingRect(array: InputArray): Rect;
38
38
  *
39
39
  * @param box The input rotated rectangle. It may be the output of
40
40
  *
41
- * @param points The output array of four vertices of rectangles.
41
+ * @returns An array of four vertices of the rectangle (Point2f[])
42
42
  */
43
- export declare function boxPoints(box: RotatedRect, points: OutputArray): void;
43
+ export declare function boxPoints(box: RotatedRect): Point2f[];
44
44
  /**
45
45
  * image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0
46
46
  * represents the background label. ltype specifies the output label image type, an important
@@ -41,3 +41,5 @@ export declare const CASCADE_DO_CANNY_PRUNING: any;
41
41
  export declare const CASCADE_SCALE_IMAGE: any;
42
42
  export declare const CASCADE_FIND_BIGGEST_OBJECT: any;
43
43
  export declare const CASCADE_DO_ROUGH_SEARCH: any;
44
+ export { QRCodeDetector } from "./QRCodeDetector";
45
+ export { QRCodeDetectorAruco, QRCodeDetectorAruco_Params, } from "./QRCodeDetectorAruco";
@@ -1,3 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QRCodeDetectorAruco_Params = exports.QRCodeDetectorAruco = exports.QRCodeDetector = void 0;
4
+ var QRCodeDetector_1 = require("./QRCodeDetector");
5
+ Object.defineProperty(exports, "QRCodeDetector", { enumerable: true, get: function () { return QRCodeDetector_1.QRCodeDetector; } });
6
+ var QRCodeDetectorAruco_1 = require("./QRCodeDetectorAruco");
7
+ Object.defineProperty(exports, "QRCodeDetectorAruco", { enumerable: true, get: function () { return QRCodeDetectorAruco_1.QRCodeDetectorAruco; } });
8
+ Object.defineProperty(exports, "QRCodeDetectorAruco_Params", { enumerable: true, get: function () { return QRCodeDetectorAruco_1.QRCodeDetectorAruco_Params; } });
3
9
  //# sourceMappingURL=objdetect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"objdetect.js","sourceRoot":"","sources":["../../../../src/types/opencv/objdetect.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"objdetect.js","sourceRoot":"","sources":["../../../../src/types/opencv/objdetect.ts"],"names":[],"mappings":";;;AAwGA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,6DAG+B;AAF7B,0HAAA,mBAAmB,OAAA;AACnB,iIAAA,0BAA0B,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techstark/opencv-js",
3
- "version": "4.11.0-release.1",
3
+ "version": "4.12.0-release.1",
4
4
  "description": "OpenCV JavaScript version for node.js or browser",
5
5
  "main": "dist/opencv.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import type { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
2
2
 
3
3
  /**
4
- * https://docs.opencv.org/4.11.0/d0/d13/classcv_1_1Feature2D.html
4
+ * https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html
5
5
  */
6
6
  export declare class Feature2D extends Algorithm {
7
7
  /**
@@ -1,4 +1,11 @@
1
- import type { bool, DescriptorMatcher, FileNode, FileStorage, InputArrayOfArrays, Ptr } from "./_types";
1
+ import type {
2
+ bool,
3
+ DescriptorMatcher,
4
+ FileNode,
5
+ FileStorage,
6
+ InputArrayOfArrays,
7
+ Ptr,
8
+ } from "./_types";
2
9
 
3
10
  /**
4
11
  * This matcher trains [cv::flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) on a train descriptor
@@ -1595,7 +1595,7 @@ export declare class Mat extends EmscriptenEmbindInstance {
1595
1595
 
1596
1596
  public updateContinuityFlag(): void;
1597
1597
 
1598
- public ucharPtr(i: any, j: any): any;
1598
+ public ucharPtr(i: any, j?: any): any;
1599
1599
  public charPtr(i: any, j: any): any;
1600
1600
  public shortPtr(i: any, j: any): any;
1601
1601
  public ushortPtr(i: any, j: any): any;
@@ -1,7 +1,7 @@
1
1
  import type { Feature2D, float, int } from "./_types";
2
2
 
3
3
  /**
4
- * https://docs.opencv.org/4.11.0/db/d95/classcv_1_1ORB.html
4
+ * https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html
5
5
  */
6
6
  export declare class ORB extends Feature2D {
7
7
  public constructor(
@@ -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
+ }
@@ -19,6 +19,7 @@ export * from "./fisheye";
19
19
  export * from "./FlannBasedMatcher";
20
20
  export * from "./HOGDescriptor";
21
21
  export * from "./imgproc_color_conversions";
22
+ export * from "./imgproc_colormap";
22
23
  export * from "./imgproc_draw";
23
24
  export * from "./imgproc_feature";
24
25
  export * from "./imgproc_filter";