@techstark/opencv-js 4.9.0-release.2 → 4.10.0-beta.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 (119) hide show
  1. package/README.md +2 -2
  2. package/dist/opencv.js +48 -5
  3. package/dist/opencv.js.patch +10 -8
  4. package/dist/src/types/_cv.d.ts +2 -2
  5. package/dist/src/types/opencv/Affine3.d.ts +1 -1
  6. package/dist/src/types/opencv/Algorithm.d.ts +1 -1
  7. package/dist/src/types/opencv/Algorithm.js +0 -1
  8. package/dist/src/types/opencv/Algorithm.js.map +1 -1
  9. package/dist/src/types/opencv/AutoBuffer.d.ts +1 -1
  10. package/dist/src/types/opencv/BFMatcher.d.ts +1 -1
  11. package/dist/src/types/opencv/BFMatcher.js +0 -1
  12. package/dist/src/types/opencv/BFMatcher.js.map +1 -1
  13. package/dist/src/types/opencv/BOWTrainer.d.ts +1 -1
  14. package/dist/src/types/opencv/CascadeClassifier.d.ts +1 -1
  15. package/dist/src/types/opencv/CascadeClassifier.js +0 -1
  16. package/dist/src/types/opencv/CascadeClassifier.js.map +1 -1
  17. package/dist/src/types/opencv/DescriptorMatcher.d.ts +1 -1
  18. package/dist/src/types/opencv/DescriptorMatcher.js +0 -1
  19. package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -1
  20. package/dist/src/types/opencv/DynamicBitset.d.ts +1 -1
  21. package/dist/src/types/opencv/Exception.d.ts +1 -1
  22. package/dist/src/types/opencv/Feature2D.d.ts +2 -2
  23. package/dist/src/types/opencv/Feature2D.js +0 -1
  24. package/dist/src/types/opencv/Feature2D.js.map +1 -1
  25. package/dist/src/types/opencv/FlannBasedMatcher.d.ts +1 -1
  26. package/dist/src/types/opencv/FlannBasedMatcher.js +0 -1
  27. package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -1
  28. package/dist/src/types/opencv/HOGDescriptor.d.ts +1 -1
  29. package/dist/src/types/opencv/Logger.d.ts +1 -1
  30. package/dist/src/types/opencv/LshTable.d.ts +1 -1
  31. package/dist/src/types/opencv/Mat.d.ts +22 -4
  32. package/dist/src/types/opencv/Mat.js +0 -1
  33. package/dist/src/types/opencv/Mat.js.map +1 -1
  34. package/dist/src/types/opencv/MatExpr.d.ts +1 -1
  35. package/dist/src/types/opencv/MatExpr.js +0 -1
  36. package/dist/src/types/opencv/MatExpr.js.map +1 -1
  37. package/dist/src/types/opencv/MatOp.d.ts +1 -1
  38. package/dist/src/types/opencv/Matx.d.ts +1 -1
  39. package/dist/src/types/opencv/Node.d.ts +1 -1
  40. package/dist/src/types/opencv/ORB.d.ts +2 -2
  41. package/dist/src/types/opencv/ORB.js +0 -1
  42. package/dist/src/types/opencv/ORB.js.map +1 -1
  43. package/dist/src/types/opencv/PCA.d.ts +1 -1
  44. package/dist/src/types/opencv/RotatedRect.d.ts +1 -1
  45. package/dist/src/types/opencv/TrackerMIL.d.ts +1 -1
  46. package/dist/src/types/opencv/TrackerMIL.js +0 -1
  47. package/dist/src/types/opencv/TrackerMIL.js.map +1 -1
  48. package/dist/src/types/opencv/_hacks.d.ts +6 -1
  49. package/dist/src/types/opencv/_hacks.js.map +1 -1
  50. package/dist/src/types/opencv/calib3d.d.ts +1 -1
  51. package/dist/src/types/opencv/core_array.d.ts +1 -1
  52. package/dist/src/types/opencv/core_cluster.d.ts +1 -1
  53. package/dist/src/types/opencv/core_hal_interface.d.ts +1 -1
  54. package/dist/src/types/opencv/core_utils.d.ts +1 -1
  55. package/dist/src/types/opencv/dnn.d.ts +1 -1
  56. package/dist/src/types/opencv/features2d_draw.d.ts +1 -1
  57. package/dist/src/types/opencv/fisheye.d.ts +1 -1
  58. package/dist/src/types/opencv/imgproc_color_conversions.d.ts +1 -1
  59. package/dist/src/types/opencv/imgproc_draw.d.ts +1 -1
  60. package/dist/src/types/opencv/imgproc_feature.d.ts +1 -1
  61. package/dist/src/types/opencv/imgproc_filter.d.ts +2 -2
  62. package/dist/src/types/opencv/imgproc_hist.d.ts +1 -1
  63. package/dist/src/types/opencv/imgproc_misc.d.ts +1 -1
  64. package/dist/src/types/opencv/imgproc_object.d.ts +1 -1
  65. package/dist/src/types/opencv/imgproc_shape.d.ts +2 -6
  66. package/dist/src/types/opencv/imgproc_transform.d.ts +1 -1
  67. package/dist/src/types/opencv/objdetect.d.ts +1 -1
  68. package/dist/src/types/opencv/photo_inpaint.d.ts +1 -1
  69. package/dist/src/types/opencv/softdouble.d.ts +1 -1
  70. package/dist/src/types/opencv/softfloat.d.ts +1 -1
  71. package/dist/src/types/opencv/video_track.d.ts +1 -1
  72. package/package.json +1 -1
  73. package/src/types/_cv.ts +2 -2
  74. package/src/types/opencv/Affine3.ts +1 -1
  75. package/src/types/opencv/Algorithm.ts +1 -1
  76. package/src/types/opencv/AutoBuffer.ts +1 -1
  77. package/src/types/opencv/BFMatcher.ts +1 -1
  78. package/src/types/opencv/BOWTrainer.ts +1 -1
  79. package/src/types/opencv/CascadeClassifier.ts +1 -1
  80. package/src/types/opencv/DescriptorMatcher.ts +1 -1
  81. package/src/types/opencv/DynamicBitset.ts +1 -1
  82. package/src/types/opencv/Exception.ts +1 -1
  83. package/src/types/opencv/Feature2D.ts +2 -2
  84. package/src/types/opencv/FlannBasedMatcher.ts +1 -1
  85. package/src/types/opencv/HOGDescriptor.ts +1 -1
  86. package/src/types/opencv/Logger.ts +1 -1
  87. package/src/types/opencv/LshTable.ts +1 -1
  88. package/src/types/opencv/Mat.ts +30 -4
  89. package/src/types/opencv/MatExpr.ts +1 -1
  90. package/src/types/opencv/MatOp.ts +1 -1
  91. package/src/types/opencv/Matx.ts +1 -1
  92. package/src/types/opencv/Node.ts +1 -1
  93. package/src/types/opencv/ORB.ts +2 -2
  94. package/src/types/opencv/PCA.ts +1 -1
  95. package/src/types/opencv/RotatedRect.ts +1 -1
  96. package/src/types/opencv/TrackerMIL.ts +1 -1
  97. package/src/types/opencv/_hacks.ts +7 -1
  98. package/src/types/opencv/calib3d.ts +1 -1
  99. package/src/types/opencv/core_array.ts +1 -1
  100. package/src/types/opencv/core_cluster.ts +1 -1
  101. package/src/types/opencv/core_hal_interface.ts +1 -1
  102. package/src/types/opencv/core_utils.ts +1 -1
  103. package/src/types/opencv/dnn.ts +1 -1
  104. package/src/types/opencv/features2d_draw.ts +1 -1
  105. package/src/types/opencv/fisheye.ts +1 -1
  106. package/src/types/opencv/imgproc_color_conversions.ts +1 -1
  107. package/src/types/opencv/imgproc_draw.ts +1 -1
  108. package/src/types/opencv/imgproc_feature.ts +1 -1
  109. package/src/types/opencv/imgproc_filter.ts +2 -2
  110. package/src/types/opencv/imgproc_hist.ts +1 -1
  111. package/src/types/opencv/imgproc_misc.ts +1 -1
  112. package/src/types/opencv/imgproc_object.ts +1 -1
  113. package/src/types/opencv/imgproc_shape.ts +4 -8
  114. package/src/types/opencv/imgproc_transform.ts +1 -1
  115. package/src/types/opencv/objdetect.ts +1 -1
  116. package/src/types/opencv/photo_inpaint.ts +1 -1
  117. package/src/types/opencv/softdouble.ts +1 -1
  118. package/src/types/opencv/softfloat.ts +1 -1
  119. package/src/types/opencv/video_track.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { size_t } from "./_types";
1
+ import type { size_t } from "./_types";
2
2
 
3
3
  /**
4
4
  * The class is used for temporary buffers in functions and methods. If a temporary buffer is usually
@@ -1,4 +1,4 @@
1
- import { bool, DescriptorMatcher, int, Ptr } from "./_types";
1
+ import type { bool, DescriptorMatcher, int, Ptr } from "./_types";
2
2
 
3
3
  /**
4
4
  * For each descriptor in the first set, this matcher finds the closest descriptor in the second set by
@@ -1,4 +1,4 @@
1
- import { int, Mat } from "./_types";
1
+ import type { int, Mat } from "./_types";
2
2
 
3
3
  /**
4
4
  * For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  FileNode,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  Algorithm,
3
3
  bool,
4
4
  FileNode,
@@ -1,4 +1,4 @@
1
- import { bool, size_t } from "./_types";
1
+ import type { bool, size_t } from "./_types";
2
2
 
3
3
  /**
4
4
  * Class re-implementing the boost version of it This helps not depending on boost, it also does not do
@@ -1,4 +1,4 @@
1
- import { int } from "./_types";
1
+ import type { int } from "./_types";
2
2
 
3
3
  /**
4
4
  * This class encapsulates all or almost all necessary information about the error happened in the
@@ -1,7 +1,7 @@
1
- import { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
1
+ import type { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
2
2
 
3
3
  /**
4
- * https://docs.opencv.org/4.9.0/d0/d13/classcv_1_1Feature2D.html
4
+ * https://docs.opencv.org/4.10.0/d0/d13/classcv_1_1Feature2D.html
5
5
  */
6
6
  export declare class Feature2D extends Algorithm {
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { bool, DescriptorMatcher, FileNode, FileStorage, InputArrayOfArrays, Ptr } from "./_types";
1
+ import type { bool, DescriptorMatcher, FileNode, FileStorage, InputArrayOfArrays, Ptr } from "./_types";
2
2
 
3
3
  /**
4
4
  * This matcher trains [cv::flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) on a train descriptor
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  FileNode,
@@ -1,4 +1,4 @@
1
- import { int } from "./_types";
1
+ import type { int } from "./_types";
2
2
 
3
3
  export declare class Logger {
4
4
  public static error(fmt: any, arg121: any): int;
@@ -1,4 +1,4 @@
1
- import { Bucket, BucketKey, LshStats, Matrix, size_t } from "./_types";
1
+ import type { Bucket, BucketKey, LshStats, Matrix, size_t } from "./_types";
2
2
 
3
3
  /**
4
4
  * Lsh hash table. As its key is a sub-feature, and as usually the size of it is pretty small, we keep
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  AccessFlag,
3
3
  bool,
4
4
  double,
@@ -1600,12 +1600,38 @@ export declare class Mat extends EmscriptenEmbindInstance {
1600
1600
  public shortPtr(i: any, j: any): any;
1601
1601
  public ushortPtr(i: any, j: any): any;
1602
1602
  public intPtr(i: any, j: any): any;
1603
- public ucharAt(i: any): any;
1604
- public charAt(i: any): any;
1605
1603
  public floatPtr(i: any, j: any): any;
1606
- public doubleAt(i: int, j: int): any;
1607
1604
  public doublePtr(i: any, j: any): any;
1608
1605
  public intPtr(i: any, j: any): any;
1606
+
1607
+ public charAt(i0: number): number;
1608
+ public charAt(i0: number, i1: number): number;
1609
+ public charAt(i0: number, i1: number, i2: number): number;
1610
+
1611
+ public ucharAt(i0: number): number;
1612
+ public ucharAt(i0: number, i1: number): number;
1613
+ public ucharAt(i0: number, i1: number, i2: number): number;
1614
+
1615
+ public shortAt(i0: number): number;
1616
+ public shortAt(i0: number, i1: number): number;
1617
+ public shortAt(i0: number, i1: number, i2: number): number;
1618
+
1619
+ public ushortAt(i0: number): number;
1620
+ public ushortAt(i0: number, i1: number): number;
1621
+ public ushortAt(i0: number, i1: number, i2: number): number;
1622
+
1623
+ public intAt(i0: number): number;
1624
+ public intAt(i0: number, i1: number): number;
1625
+ public intAt(i0: number, i1: number, i2: number): number;
1626
+
1627
+ public floatAt(i0: number): number;
1628
+ public floatAt(i0: number, i1: number): number;
1629
+ public floatAt(i0: number, i1: number, i2: number): number;
1630
+
1631
+ public doubleAt(i0: number): number;
1632
+ public doubleAt(i0: number, i1: number): number;
1633
+ public doubleAt(i0: number, i1: number, i2: number): number;
1634
+
1609
1635
  public setTo(value: Mat | Scalar, mask?: Mat): Mat;
1610
1636
  /**
1611
1637
  * Sometimes, you will have to play with certain region of images.
@@ -1,4 +1,4 @@
1
- import { double, int, Mat, MatOp, Scalar } from "./_types";
1
+ import type { double, int, Mat, MatOp, Scalar } from "./_types";
2
2
 
3
3
  /**
4
4
  * <a name="d1/d10/classcv_1_1MatExpr_1MatrixExpressions"></a>This is a list of implemented matrix
@@ -1,4 +1,4 @@
1
- import { double, int, Mat, MatExpr, Scalar, Size } from "./_types";
1
+ import type { double, int, Mat, MatExpr, Scalar, Size } from "./_types";
2
2
 
3
3
  export declare class MatOp {
4
4
  public constructor();
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  diag_type,
3
3
  int,
4
4
  Matx_AddOp,
@@ -1,4 +1,4 @@
1
- import { double, int } from "./_types";
1
+ import type { double, int } from "./_types";
2
2
 
3
3
  export declare class Node {
4
4
  /**
@@ -1,7 +1,7 @@
1
- import { Feature2D, float, int } from "./_types";
1
+ import type { Feature2D, float, int } from "./_types";
2
2
 
3
3
  /**
4
- * https://docs.opencv.org/4.9.0/db/d95/classcv_1_1ORB.html
4
+ * https://docs.opencv.org/4.10.0/db/d95/classcv_1_1ORB.html
5
5
  */
6
6
  export declare class ORB extends Feature2D {
7
7
  public constructor(
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  double,
3
3
  FileNode,
4
4
  FileStorage,
@@ -1,4 +1,4 @@
1
- import { float, Point2f, Rect, Rect_, Size2f } from "./_types";
1
+ import type { float, Point2f, Rect, Rect_, Size2f } from "./_types";
2
2
 
3
3
  /**
4
4
  * Each rectangle is specified by the center point (mass center), length of each side (represented by
@@ -1,3 +1,3 @@
1
- import { Tracker } from "./_types";
1
+ import type { Tracker } from "./_types";
2
2
 
3
3
  export declare class TrackerMIL extends Tracker {}
@@ -32,6 +32,12 @@ export declare class Point {
32
32
  public y: number;
33
33
  }
34
34
 
35
+ export declare class Circle {
36
+ public constructor(center: Point, radius: number);
37
+ public center: Point;
38
+ public radius: number;
39
+ }
40
+
35
41
  export declare class Size {
36
42
  public constructor(width: number, height: number);
37
43
  public width: number;
@@ -86,7 +92,7 @@ export declare function FS_createDataFile(
86
92
  arg5: boolean,
87
93
  ): any;
88
94
 
89
- import { Algorithm, LineTypes, Mat, NormTypes, RotatedRect } from ".";
95
+ import { Algorithm, type LineTypes, Mat, type NormTypes, RotatedRect } from ".";
90
96
  import "../_cv";
91
97
 
92
98
  /**
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  float,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  double,
3
3
  InputArray,
4
4
  InputOutputArray,
@@ -1,4 +1,4 @@
1
- import { cvhalDFT, int, size_t, uchar } from "./_types";
1
+ import type { cvhalDFT, int, size_t, uchar } from "./_types";
2
2
  /*
3
3
  * # Interface
4
4
  * Define your functions to override default implementations:
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  AsyncArray,
3
3
  bool,
4
4
  double,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -1,4 +1,4 @@
1
- import { InputArray, InputOutputArray } from "./_types";
1
+ import type { InputArray, InputOutputArray } from "./_types";
2
2
  /*
3
3
  * # Drawing Function of Keypoints and Matches
4
4
  *
@@ -1,4 +1,4 @@
1
- import { InputArray, OutputArray, int, Size } from "./_types";
1
+ import type { InputArray, OutputArray, int, Size } from "./_types";
2
2
 
3
3
  /**
4
4
  * Computes the undistortion and rectification maps for the image transform using remap.
@@ -1,4 +1,4 @@
1
- import { InputArray, int, OutputArray } from "./_types";
1
+ import type { InputArray, int, OutputArray } from "./_types";
2
2
  /*
3
3
  * # Color Space Conversions
4
4
  *
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -529,7 +529,7 @@ export declare function morphologyDefaultBorderValue(): Scalar;
529
529
  export declare function morphologyEx(
530
530
  src: InputArray,
531
531
  dst: OutputArray,
532
- op: int,
532
+ op: int | MorphTypes,
533
533
  kernel: InputArray,
534
534
  anchor?: Point,
535
535
  iterations?: int,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  float,
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  double,
3
3
  InputArray,
4
4
  InputOutputArray,
@@ -1,4 +1,4 @@
1
- import { InputArray, int, OutputArray } from "./_types";
1
+ import type { InputArray, int, OutputArray } from "./_types";
2
2
  /*
3
3
  * # Object Detection
4
4
  *
@@ -1,5 +1,6 @@
1
- import {
1
+ import type {
2
2
  bool,
3
+ Circle,
3
4
  double,
4
5
  float,
5
6
  InputArray,
@@ -12,6 +13,7 @@ import {
12
13
  Rect,
13
14
  RotatedRect,
14
15
  } from "./_types";
16
+
15
17
  /*
16
18
  * # Structural Analysis and Shape Descriptors
17
19
  *
@@ -530,16 +532,10 @@ export declare function minAreaRect(points: InputArray): RotatedRect;
530
532
  * The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.
531
533
  *
532
534
  * @param points Input vector of 2D points, stored in std::vector<> or Mat
533
- *
534
- * @param center Output center of the circle.
535
- *
536
- * @param radius Output radius of the circle.
537
535
  */
538
536
  export declare function minEnclosingCircle(
539
537
  points: InputArray,
540
- center: any,
541
- radius: any,
542
- ): void;
538
+ ): Circle;
543
539
 
544
540
  /**
545
541
  * The function finds a triangle of minimum area enclosing the given set of 2D points and returns its
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,
@@ -1,4 +1,4 @@
1
- import { double, int, Size } from "./_types";
1
+ import type { double, int, Size } from "./_types";
2
2
  /*
3
3
  * # Object Detection
4
4
  * ## Haar Feature-based Cascade Classifier for Object Detection
@@ -1,4 +1,4 @@
1
- import { double, InputArray, int, OutputArray } from "./_types";
1
+ import type { double, InputArray, int, OutputArray } from "./_types";
2
2
  /*
3
3
  * # Inpainting
4
4
  * the inpainting algorithm
@@ -1,4 +1,4 @@
1
- import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
1
+ import type { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
2
 
3
3
  export declare class softdouble {
4
4
  public v: uint64_t;
@@ -1,4 +1,4 @@
1
- import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
1
+ import type { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
2
 
3
3
  export declare class softfloat {
4
4
  public v: uint32_t;
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  bool,
3
3
  double,
4
4
  InputArray,