@techstark/opencv-js 4.8.0-release.7 → 4.8.0-release.9

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 (197) hide show
  1. package/dist/src/index.d.ts +1 -0
  2. package/dist/src/index.js +18 -0
  3. package/dist/src/index.js.map +1 -0
  4. package/dist/src/types/_cv.d.ts +7 -0
  5. package/dist/src/types/_cv.js +3 -0
  6. package/dist/src/types/_cv.js.map +1 -0
  7. package/dist/src/types/emscripten.d.ts +166 -0
  8. package/dist/src/types/emscripten.js +4 -0
  9. package/dist/src/types/emscripten.js.map +1 -0
  10. package/dist/src/types/opencv/Affine3.d.ts +183 -0
  11. package/dist/src/types/opencv/Affine3.js +3 -0
  12. package/dist/src/types/opencv/Affine3.js.map +1 -0
  13. package/dist/src/types/opencv/Algorithm.d.ts +105 -0
  14. package/dist/src/types/opencv/Algorithm.js +4 -0
  15. package/dist/src/types/opencv/Algorithm.js.map +1 -0
  16. package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
  17. package/dist/src/types/opencv/AutoBuffer.js +3 -0
  18. package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
  19. package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
  20. package/dist/src/types/opencv/BFMatcher.js +3 -0
  21. package/dist/src/types/opencv/BFMatcher.js.map +1 -0
  22. package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
  23. package/dist/src/types/opencv/BOWTrainer.js +3 -0
  24. package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
  25. package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
  26. package/dist/src/types/opencv/CascadeClassifier.js +4 -0
  27. package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
  28. package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
  29. package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
  30. package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
  31. package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
  32. package/dist/src/types/opencv/DynamicBitset.js +3 -0
  33. package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
  34. package/dist/src/types/opencv/Exception.d.ts +38 -0
  35. package/dist/src/types/opencv/Exception.js +3 -0
  36. package/dist/src/types/opencv/Exception.js.map +1 -0
  37. package/dist/src/types/opencv/Feature2D.d.ts +14 -0
  38. package/dist/src/types/opencv/Feature2D.js +4 -0
  39. package/dist/src/types/opencv/Feature2D.js.map +1 -0
  40. package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
  41. package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
  42. package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
  43. package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
  44. package/dist/src/types/opencv/HOGDescriptor.js +3 -0
  45. package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
  46. package/dist/src/types/opencv/Logger.d.ts +27 -0
  47. package/dist/src/types/opencv/Logger.js +3 -0
  48. package/dist/src/types/opencv/Logger.js.map +1 -0
  49. package/dist/src/types/opencv/LshTable.d.ts +67 -0
  50. package/dist/src/types/opencv/LshTable.js +3 -0
  51. package/dist/src/types/opencv/LshTable.js.map +1 -0
  52. package/dist/src/types/opencv/Mat.d.ts +1589 -0
  53. package/dist/src/types/opencv/Mat.js +4 -0
  54. package/dist/src/types/opencv/Mat.js.map +1 -0
  55. package/dist/src/types/opencv/MatExpr.d.ts +78 -0
  56. package/dist/src/types/opencv/MatExpr.js +4 -0
  57. package/dist/src/types/opencv/MatExpr.js.map +1 -0
  58. package/dist/src/types/opencv/MatOp.d.ts +29 -0
  59. package/dist/src/types/opencv/MatOp.js +3 -0
  60. package/dist/src/types/opencv/MatOp.js.map +1 -0
  61. package/dist/src/types/opencv/Matx.d.ts +84 -0
  62. package/dist/src/types/opencv/Matx.js +3 -0
  63. package/dist/src/types/opencv/Matx.js.map +1 -0
  64. package/dist/src/types/opencv/Node.d.ts +25 -0
  65. package/dist/src/types/opencv/Node.js +3 -0
  66. package/dist/src/types/opencv/Node.js.map +1 -0
  67. package/dist/src/types/opencv/ORB.d.ts +11 -0
  68. package/dist/src/types/opencv/ORB.js +4 -0
  69. package/dist/src/types/opencv/ORB.js.map +1 -0
  70. package/dist/src/types/opencv/PCA.d.ts +170 -0
  71. package/dist/src/types/opencv/PCA.js +3 -0
  72. package/dist/src/types/opencv/PCA.js.map +1 -0
  73. package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
  74. package/dist/src/types/opencv/RotatedRect.js +3 -0
  75. package/dist/src/types/opencv/RotatedRect.js.map +1 -0
  76. package/dist/src/types/opencv/_hacks.d.ts +265 -0
  77. package/dist/src/types/opencv/_hacks.js +15 -0
  78. package/dist/src/types/opencv/_hacks.js.map +1 -0
  79. package/dist/src/types/opencv/_types.d.ts +44 -0
  80. package/dist/src/types/opencv/_types.js +61 -0
  81. package/dist/src/types/opencv/_types.js.map +1 -0
  82. package/dist/src/types/opencv/calib3d.d.ts +2180 -0
  83. package/dist/src/types/opencv/calib3d.js +3 -0
  84. package/dist/src/types/opencv/calib3d.js.map +1 -0
  85. package/dist/src/types/opencv/core_array.d.ts +2513 -0
  86. package/dist/src/types/opencv/core_array.js +3 -0
  87. package/dist/src/types/opencv/core_array.js.map +1 -0
  88. package/dist/src/types/opencv/core_cluster.d.ts +54 -0
  89. package/dist/src/types/opencv/core_cluster.js +3 -0
  90. package/dist/src/types/opencv/core_cluster.js.map +1 -0
  91. package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
  92. package/dist/src/types/opencv/core_hal_interface.js +3 -0
  93. package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
  94. package/dist/src/types/opencv/core_utils.d.ts +510 -0
  95. package/dist/src/types/opencv/core_utils.js +3 -0
  96. package/dist/src/types/opencv/core_utils.js.map +1 -0
  97. package/dist/src/types/opencv/dnn.d.ts +336 -0
  98. package/dist/src/types/opencv/dnn.js +3 -0
  99. package/dist/src/types/opencv/dnn.js.map +1 -0
  100. package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
  101. package/dist/src/types/opencv/features2d_draw.js +3 -0
  102. package/dist/src/types/opencv/features2d_draw.js.map +1 -0
  103. package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
  104. package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
  105. package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
  106. package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
  107. package/dist/src/types/opencv/imgproc_draw.js +3 -0
  108. package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
  109. package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
  110. package/dist/src/types/opencv/imgproc_feature.js +3 -0
  111. package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
  112. package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
  113. package/dist/src/types/opencv/imgproc_filter.js +3 -0
  114. package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
  115. package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
  116. package/dist/src/types/opencv/imgproc_hist.js +3 -0
  117. package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
  118. package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
  119. package/dist/src/types/opencv/imgproc_misc.js +3 -0
  120. package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
  121. package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
  122. package/dist/src/types/opencv/imgproc_object.js +3 -0
  123. package/dist/src/types/opencv/imgproc_object.js.map +1 -0
  124. package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
  125. package/dist/src/types/opencv/imgproc_shape.js +3 -0
  126. package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
  127. package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
  128. package/dist/src/types/opencv/imgproc_transform.js +3 -0
  129. package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
  130. package/dist/src/types/opencv/index.d.ts +4 -0
  131. package/dist/src/types/opencv/index.js +19 -0
  132. package/dist/src/types/opencv/index.js.map +1 -0
  133. package/dist/src/types/opencv/objdetect.d.ts +43 -0
  134. package/dist/src/types/opencv/objdetect.js +3 -0
  135. package/dist/src/types/opencv/objdetect.js.map +1 -0
  136. package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
  137. package/dist/src/types/opencv/photo_inpaint.js +3 -0
  138. package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
  139. package/dist/src/types/opencv/softdouble.d.ts +38 -0
  140. package/dist/src/types/opencv/softdouble.js +3 -0
  141. package/dist/src/types/opencv/softdouble.js.map +1 -0
  142. package/dist/src/types/opencv/softfloat.d.ts +38 -0
  143. package/dist/src/types/opencv/softfloat.js +3 -0
  144. package/dist/src/types/opencv/softfloat.js.map +1 -0
  145. package/dist/src/types/opencv/video_track.d.ts +276 -0
  146. package/dist/src/types/opencv/video_track.js +3 -0
  147. package/dist/src/types/opencv/video_track.js.map +1 -0
  148. package/package.json +8 -3
  149. package/src/index.ts +1 -0
  150. package/src/types/_cv.ts +6 -0
  151. package/src/types/emscripten.ts +286 -0
  152. package/src/types/opencv/Affine3.ts +206 -0
  153. package/src/types/opencv/Algorithm.ts +126 -0
  154. package/src/types/opencv/AutoBuffer.ts +50 -0
  155. package/src/types/opencv/BFMatcher.ts +37 -0
  156. package/src/types/opencv/BOWTrainer.ts +43 -0
  157. package/src/types/opencv/CascadeClassifier.ts +153 -0
  158. package/src/types/opencv/DescriptorMatcher.ts +244 -0
  159. package/src/types/opencv/DynamicBitset.ts +68 -0
  160. package/src/types/opencv/Exception.ts +54 -0
  161. package/src/types/opencv/Feature2D.ts +20 -0
  162. package/src/types/opencv/FlannBasedMatcher.ts +50 -0
  163. package/src/types/opencv/HOGDescriptor.ts +401 -0
  164. package/src/types/opencv/Logger.ts +34 -0
  165. package/src/types/opencv/LshTable.ts +81 -0
  166. package/src/types/opencv/Mat.ts +1765 -0
  167. package/src/types/opencv/MatExpr.ts +107 -0
  168. package/src/types/opencv/MatOp.ts +70 -0
  169. package/src/types/opencv/Matx.ts +228 -0
  170. package/src/types/opencv/Node.ts +33 -0
  171. package/src/types/opencv/ORB.ts +22 -0
  172. package/src/types/opencv/PCA.ts +204 -0
  173. package/src/types/opencv/RotatedRect.ts +72 -0
  174. package/src/types/opencv/_hacks.ts +323 -0
  175. package/src/types/opencv/_types.ts +44 -0
  176. package/src/types/opencv/calib3d.ts +2937 -0
  177. package/src/types/opencv/core_array.ts +3102 -0
  178. package/src/types/opencv/core_cluster.ts +81 -0
  179. package/src/types/opencv/core_hal_interface.ts +159 -0
  180. package/src/types/opencv/core_utils.ts +748 -0
  181. package/src/types/opencv/dnn.ts +505 -0
  182. package/src/types/opencv/features2d_draw.ts +114 -0
  183. package/src/types/opencv/imgproc_color_conversions.ts +527 -0
  184. package/src/types/opencv/imgproc_draw.ts +733 -0
  185. package/src/types/opencv/imgproc_feature.ts +681 -0
  186. package/src/types/opencv/imgproc_filter.ts +918 -0
  187. package/src/types/opencv/imgproc_hist.ts +399 -0
  188. package/src/types/opencv/imgproc_misc.ts +616 -0
  189. package/src/types/opencv/imgproc_object.ts +58 -0
  190. package/src/types/opencv/imgproc_shape.ts +734 -0
  191. package/src/types/opencv/imgproc_transform.ts +574 -0
  192. package/src/types/opencv/index.ts +4 -0
  193. package/src/types/opencv/objdetect.ts +103 -0
  194. package/src/types/opencv/photo_inpaint.ts +37 -0
  195. package/src/types/opencv/softdouble.ts +64 -0
  196. package/src/types/opencv/softfloat.ts +64 -0
  197. package/src/types/opencv/video_track.ts +372 -0
@@ -0,0 +1,430 @@
1
+ import { bool, double, InputArray, int, Mat, OutputArray, Point2f, Size } from "./_types";
2
+ /**
3
+ * The function converts a pair of maps for remap from one representation to another. The following
4
+ * options ( (map1.type(), map2.type()) `$\\rightarrow$` (dstmap1.type(), dstmap2.type()) ) are
5
+ * supported:
6
+ *
7
+ * `$\\texttt{(CV_32FC1, CV_32FC1)} \\rightarrow \\texttt{(CV_16SC2, CV_16UC1)}$`. This is the most
8
+ * frequently used conversion operation, in which the original floating-point maps (see remap ) are
9
+ * converted to a more compact and much faster fixed-point representation. The first output array
10
+ * contains the rounded coordinates and the second array (created only when nninterpolation=false )
11
+ * contains indices in the interpolation tables.
12
+ * `$\\texttt{(CV_32FC2)} \\rightarrow \\texttt{(CV_16SC2, CV_16UC1)}$`. The same as above but the
13
+ * original maps are stored in one 2-channel matrix.
14
+ * Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same as
15
+ * the originals.
16
+ *
17
+ * [remap], [undistort], [initUndistortRectifyMap]
18
+ *
19
+ * @param map1 The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
20
+ *
21
+ * @param map2 The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), respectively.
22
+ *
23
+ * @param dstmap1 The first output map that has the type dstmap1type and the same size as src .
24
+ *
25
+ * @param dstmap2 The second output map.
26
+ *
27
+ * @param dstmap1type Type of the first output map that should be CV_16SC2, CV_32FC1, or CV_32FC2 .
28
+ *
29
+ * @param nninterpolation Flag indicating whether the fixed-point maps are used for the
30
+ * nearest-neighbor or for a more complex interpolation.
31
+ */
32
+ export declare function convertMaps(map1: InputArray, map2: InputArray, dstmap1: OutputArray, dstmap2: OutputArray, dstmap1type: int, nninterpolation?: bool): void;
33
+ /**
34
+ * The function calculates the `$2 \\times 3$` matrix of an affine transform so that:
35
+ *
36
+ * `\\[\\begin{bmatrix} x'_i \\\\ y'_i \\end{bmatrix} = \\texttt{map_matrix} \\cdot \\begin{bmatrix}
37
+ * x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\]`
38
+ *
39
+ * where
40
+ *
41
+ * `\\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2\\]`
42
+ *
43
+ * [warpAffine], [transform]
44
+ *
45
+ * @param src Coordinates of triangle vertices in the source image.
46
+ *
47
+ * @param dst Coordinates of the corresponding triangle vertices in the destination image.
48
+ */
49
+ export declare function getAffineTransform(src: any, dst: any): Mat;
50
+ export declare function getAffineTransform(src: InputArray, dst: InputArray): Mat;
51
+ /**
52
+ * The function calculates the `$3 \\times 3$` matrix of a perspective transform so that:
53
+ *
54
+ * `\\[\\begin{bmatrix} t_i x'_i \\\\ t_i y'_i \\\\ t_i \\end{bmatrix} = \\texttt{map_matrix} \\cdot
55
+ * \\begin{bmatrix} x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\]`
56
+ *
57
+ * where
58
+ *
59
+ * `\\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3\\]`
60
+ *
61
+ * [findHomography], [warpPerspective], [perspectiveTransform]
62
+ *
63
+ * @param src Coordinates of quadrangle vertices in the source image.
64
+ *
65
+ * @param dst Coordinates of the corresponding quadrangle vertices in the destination image.
66
+ *
67
+ * @param solveMethod method passed to cv::solve (DecompTypes)
68
+ */
69
+ export declare function getPerspectiveTransform(src: InputArray, dst: InputArray, solveMethod?: int): Mat;
70
+ /**
71
+ * This is an overloaded member function, provided for convenience. It differs from the above function
72
+ * only in what argument(s) it accepts.
73
+ */
74
+ export declare function getPerspectiveTransform(src: any, dst: any, solveMethod?: int): Mat;
75
+ /**
76
+ * The function getRectSubPix extracts pixels from src:
77
+ *
78
+ * `\\[patch(x, y) = src(x + \\texttt{center.x} - ( \\texttt{dst.cols} -1)*0.5, y + \\texttt{center.y}
79
+ * - ( \\texttt{dst.rows} -1)*0.5)\\]`
80
+ *
81
+ * where the values of the pixels at non-integer coordinates are retrieved using bilinear
82
+ * interpolation. Every channel of multi-channel images is processed independently. Also the image
83
+ * should be a single channel or three channel image. While the center of the rectangle must be inside
84
+ * the image, parts of the rectangle may be outside.
85
+ *
86
+ * [warpAffine], [warpPerspective]
87
+ *
88
+ * @param image Source image.
89
+ *
90
+ * @param patchSize Size of the extracted patch.
91
+ *
92
+ * @param center Floating point coordinates of the center of the extracted rectangle within the source
93
+ * image. The center must be inside the image.
94
+ *
95
+ * @param patch Extracted patch that has the size patchSize and the same number of channels as src .
96
+ *
97
+ * @param patchType Depth of the extracted pixels. By default, they have the same depth as src .
98
+ */
99
+ export declare function getRectSubPix(image: InputArray, patchSize: Size, center: Point2f, patch: OutputArray, patchType?: int): void;
100
+ /**
101
+ * The function calculates the following matrix:
102
+ *
103
+ * `\\[\\begin{bmatrix} \\alpha & \\beta & (1- \\alpha ) \\cdot \\texttt{center.x} - \\beta \\cdot
104
+ * \\texttt{center.y} \\\\ - \\beta & \\alpha & \\beta \\cdot \\texttt{center.x} + (1- \\alpha ) \\cdot
105
+ * \\texttt{center.y} \\end{bmatrix}\\]`
106
+ *
107
+ * where
108
+ *
109
+ * `\\[\\begin{array}{l} \\alpha = \\texttt{scale} \\cdot \\cos \\texttt{angle} , \\\\ \\beta =
110
+ * \\texttt{scale} \\cdot \\sin \\texttt{angle} \\end{array}\\]`
111
+ *
112
+ * The transformation maps the rotation center to itself. If this is not the target, adjust the shift.
113
+ *
114
+ * [getAffineTransform], [warpAffine], [transform]
115
+ *
116
+ * @param center Center of the rotation in the source image.
117
+ *
118
+ * @param angle Rotation angle in degrees. Positive values mean counter-clockwise rotation (the
119
+ * coordinate origin is assumed to be the top-left corner).
120
+ *
121
+ * @param scale Isotropic scale factor.
122
+ */
123
+ export declare function getRotationMatrix2D(center: Point2f, angle: double, scale: double): Mat;
124
+ /**
125
+ * The function computes an inverse affine transformation represented by `$2 \\times 3$` matrix M:
126
+ *
127
+ * `\\[\\begin{bmatrix} a_{11} & a_{12} & b_1 \\\\ a_{21} & a_{22} & b_2 \\end{bmatrix}\\]`
128
+ *
129
+ * The result is also a `$2 \\times 3$` matrix of the same type as M.
130
+ *
131
+ * @param M Original affine transformation.
132
+ *
133
+ * @param iM Output reverse affine transformation.
134
+ */
135
+ export declare function invertAffineTransform(M: InputArray, iM: OutputArray): void;
136
+ export declare function linearPolar(src: InputArray, dst: OutputArray, center: Point2f, maxRadius: double, flags: int): void;
137
+ export declare function logPolar(src: InputArray, dst: OutputArray, center: Point2f, M: double, flags: int): void;
138
+ /**
139
+ * The function remap transforms the source image using the specified map:
140
+ *
141
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} (map_x(x,y),map_y(x,y))\\]`
142
+ *
143
+ * where values of pixels with non-integer coordinates are computed using one of available
144
+ * interpolation methods. `$map_x$` and `$map_y$` can be encoded as separate floating-point maps in
145
+ * `$map_1$` and `$map_2$` respectively, or interleaved floating-point maps of `$(x,y)$` in `$map_1$`,
146
+ * or fixed-point maps created by using convertMaps. The reason you might want to convert from floating
147
+ * to fixed-point representations of a map is that they can yield much faster (2x) remapping
148
+ * operations. In the converted case, `$map_1$` contains pairs (cvFloor(x), cvFloor(y)) and `$map_2$`
149
+ * contains indices in a table of interpolation coefficients.
150
+ *
151
+ * This function cannot operate in-place.
152
+ *
153
+ * Due to current implementation limitations the size of an input and output images should be less than
154
+ * 32767x32767.
155
+ *
156
+ * @param src Source image.
157
+ *
158
+ * @param dst Destination image. It has the same size as map1 and the same type as src .
159
+ *
160
+ * @param map1 The first map of either (x,y) points or just x values having the type CV_16SC2 ,
161
+ * CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to
162
+ * fixed-point for speed.
163
+ *
164
+ * @param map2 The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if
165
+ * map1 is (x,y) points), respectively.
166
+ *
167
+ * @param interpolation Interpolation method (see InterpolationFlags). The method INTER_AREA is not
168
+ * supported by this function.
169
+ *
170
+ * @param borderMode Pixel extrapolation method (see BorderTypes). When borderMode=BORDER_TRANSPARENT,
171
+ * it means that the pixels in the destination image that corresponds to the "outliers" in the source
172
+ * image are not modified by the function.
173
+ *
174
+ * @param borderValue Value used in case of a constant border. By default, it is 0.
175
+ */
176
+ export declare function remap(src: InputArray, dst: OutputArray, map1: InputArray, map2: InputArray, interpolation: int, borderMode?: int, borderValue?: any): void;
177
+ /**
178
+ * The function resize resizes the image src down to or up to the specified size. Note that the initial
179
+ * dst type or size are not taken into account. Instead, the size and type are derived from the
180
+ * `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst, you may
181
+ * call the function as follows:
182
+ *
183
+ * ```cpp
184
+ * // explicitly specify dsize=dst.size(); fx and fy will be computed from that.
185
+ * resize(src, dst, dst.size(), 0, 0, interpolation);
186
+ * ```
187
+ *
188
+ * If you want to decimate the image by factor of 2 in each direction, you can call the function this
189
+ * way:
190
+ *
191
+ * ```cpp
192
+ * // specify fx and fy and let the function compute the destination image size.
193
+ * resize(src, dst, Size(), 0.5, 0.5, interpolation);
194
+ * ```
195
+ *
196
+ * To shrink an image, it will generally look best with [INTER_AREA] interpolation, whereas to enlarge
197
+ * an image, it will generally look best with c::INTER_CUBIC (slow) or [INTER_LINEAR] (faster but still
198
+ * looks OK).
199
+ *
200
+ * [warpAffine], [warpPerspective], [remap]
201
+ *
202
+ * @param src input image.
203
+ *
204
+ * @param dst output image; it has the size dsize (when it is non-zero) or the size computed from
205
+ * src.size(), fx, and fy; the type of dst is the same as of src.
206
+ *
207
+ * @param dsize output image size; if it equals zero, it is computed as: \[\texttt{dsize =
208
+ * Size(round(fx*src.cols), round(fy*src.rows))}\] Either dsize or both fx and fy must be non-zero.
209
+ *
210
+ * @param fx scale factor along the horizontal axis; when it equals 0, it is computed as
211
+ * \[\texttt{(double)dsize.width/src.cols}\]
212
+ *
213
+ * @param fy scale factor along the vertical axis; when it equals 0, it is computed as
214
+ * \[\texttt{(double)dsize.height/src.rows}\]
215
+ *
216
+ * @param interpolation interpolation method, see InterpolationFlags
217
+ */
218
+ export declare function resize(src: InputArray, dst: OutputArray, dsize: Size, fx?: double, fy?: double, interpolation?: int): void;
219
+ /**
220
+ * The function warpAffine transforms the source image using the specified matrix:
221
+ *
222
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} ( \\texttt{M} _{11} x + \\texttt{M} _{12} y + \\texttt{M}
223
+ * _{13}, \\texttt{M} _{21} x + \\texttt{M} _{22} y + \\texttt{M} _{23})\\]`
224
+ *
225
+ * when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with
226
+ * [invertAffineTransform] and then put in the formula above instead of M. The function cannot operate
227
+ * in-place.
228
+ *
229
+ * [warpPerspective], [resize], [remap], [getRectSubPix], [transform]
230
+ *
231
+ * @param src input image.
232
+ *
233
+ * @param dst output image that has the size dsize and the same type as src .
234
+ *
235
+ * @param M $2\times 3$ transformation matrix.
236
+ *
237
+ * @param dsize size of the output image.
238
+ *
239
+ * @param flags combination of interpolation methods (see InterpolationFlags) and the optional flag
240
+ * WARP_INVERSE_MAP that means that M is the inverse transformation (
241
+ * $\texttt{dst}\rightarrow\texttt{src}$ ).
242
+ *
243
+ * @param borderMode pixel extrapolation method (see BorderTypes); when borderMode=BORDER_TRANSPARENT,
244
+ * it means that the pixels in the destination image corresponding to the "outliers" in the source
245
+ * image are not modified by the function.
246
+ *
247
+ * @param borderValue value used in case of a constant border; by default, it is 0.
248
+ */
249
+ export declare function warpAffine(src: InputArray, dst: OutputArray, M: InputArray, dsize: Size, flags?: int, borderMode?: int, borderValue?: any): void;
250
+ /**
251
+ * The function warpPerspective transforms the source image using the specified matrix:
252
+ *
253
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} \\left ( \\frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x +
254
+ * M_{32} y + M_{33}} , \\frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \\right
255
+ * )\\]`
256
+ *
257
+ * when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert
258
+ * and then put in the formula above instead of M. The function cannot operate in-place.
259
+ *
260
+ * [warpAffine], [resize], [remap], [getRectSubPix], [perspectiveTransform]
261
+ *
262
+ * @param src input image.
263
+ *
264
+ * @param dst output image that has the size dsize and the same type as src .
265
+ *
266
+ * @param M $3\times 3$ transformation matrix.
267
+ *
268
+ * @param dsize size of the output image.
269
+ *
270
+ * @param flags combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional
271
+ * flag WARP_INVERSE_MAP, that sets M as the inverse transformation (
272
+ * $\texttt{dst}\rightarrow\texttt{src}$ ).
273
+ *
274
+ * @param borderMode pixel extrapolation method (BORDER_CONSTANT or BORDER_REPLICATE).
275
+ *
276
+ * @param borderValue value used in case of a constant border; by default, it equals 0.
277
+ */
278
+ export declare function warpPerspective(src: InputArray, dst: OutputArray, M: InputArray, dsize: Size, flags?: int, borderMode?: int, borderValue?: any): void;
279
+ /**
280
+ * <a name="da/d54/group__imgproc__transform_1polar_remaps_reference_image"></a>
281
+ * Transform the source image using the following transformation: `\\[ dst(\\rho , \\phi ) = src(x,y)
282
+ * \\]`
283
+ *
284
+ * where `\\[ \\begin{array}{l} \\vec{I} = (x - center.x, \\;y - center.y) \\\\ \\phi = Kangle \\cdot
285
+ * \\texttt{angle} (\\vec{I}) \\\\ \\rho = \\left\\{\\begin{matrix} Klin \\cdot \\texttt{magnitude}
286
+ * (\\vec{I}) & default \\\\ Klog \\cdot log_e(\\texttt{magnitude} (\\vec{I})) & if \\; semilog \\\\
287
+ * \\end{matrix}\\right. \\end{array} \\]`
288
+ *
289
+ * and `\\[ \\begin{array}{l} Kangle = dsize.height / 2\\Pi \\\\ Klin = dsize.width / maxRadius \\\\
290
+ * Klog = dsize.width / log_e(maxRadius) \\\\ \\end{array} \\]`
291
+ *
292
+ * Polar mapping can be linear or semi-log. Add one of [WarpPolarMode] to `flags` to specify the polar
293
+ * mapping mode.
294
+ *
295
+ * Linear is the default mode.
296
+ *
297
+ * The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of
298
+ * sight (central vision) in contrast to peripheral vision where acuity is minor.
299
+ *
300
+ * if both values in `dsize <=0` (default), the destination image will have (almost) same area of
301
+ * source bounding circle: `\\[\\begin{array}{l} dsize.area \\leftarrow (maxRadius^2 \\cdot \\Pi) \\\\
302
+ * dsize.width = \\texttt{cvRound}(maxRadius) \\\\ dsize.height = \\texttt{cvRound}(maxRadius \\cdot
303
+ * \\Pi) \\\\ \\end{array}\\]`
304
+ * if only `dsize.height <= 0`, the destination image area will be proportional to the bounding circle
305
+ * area but scaled by `Kx * Kx`: `\\[\\begin{array}{l} dsize.height = \\texttt{cvRound}(dsize.width
306
+ * \\cdot \\Pi) \\\\ \\end{array} \\]`
307
+ * if both values in `dsize > 0`, the destination image will have the given size therefore the area of
308
+ * the bounding circle will be scaled to `dsize`.
309
+ *
310
+ * You can get reverse mapping adding [WARP_INVERSE_MAP] to `flags`
311
+ *
312
+ * ```cpp
313
+ * // direct transform
314
+ * warpPolar(src, lin_polar_img, Size(),center, maxRadius, flags); //
315
+ * linear Polar
316
+ * warpPolar(src, log_polar_img, Size(),center, maxRadius, flags + WARP_POLAR_LOG); //
317
+ * semilog Polar
318
+ * // inverse transform
319
+ * warpPolar(lin_polar_img, recovered_lin_polar_img, src.size(), center, maxRadius, flags +
320
+ * WARP_INVERSE_MAP);
321
+ * warpPolar(log_polar_img, recovered_log_polar, src.size(), center, maxRadius, flags +
322
+ * WARP_POLAR_LOG + WARP_INVERSE_MAP);
323
+ * ```
324
+ *
325
+ * In addiction, to calculate the original coordinate from a polar mapped coordinate `$(rho, phi)->(x,
326
+ * y)$`:
327
+ *
328
+ * ```cpp
329
+ * double angleRad, magnitude;
330
+ * double Kangle = dst.rows / CV_2PI;
331
+ * angleRad = phi / Kangle;
332
+ * if (flags & WARP_POLAR_LOG)
333
+ * {
334
+ * double Klog = dst.cols / std::log(maxRadius);
335
+ * magnitude = std::exp(rho / Klog);
336
+ * }
337
+ * else
338
+ * {
339
+ * double Klin = dst.cols / maxRadius;
340
+ * magnitude = rho / Klin;
341
+ * }
342
+ * int x = cvRound(center.x + magnitude * cos(angleRad));
343
+ * int y = cvRound(center.y + magnitude * sin(angleRad));
344
+ * ```
345
+ *
346
+ * The function can not operate in-place.
347
+ * To calculate magnitude and angle in degrees [cartToPolar] is used internally thus angles are
348
+ * measured from 0 to 360 with accuracy about 0.3 degrees.
349
+ * This function uses [remap]. Due to current implementation limitations the size of an input and
350
+ * output images should be less than 32767x32767.
351
+ *
352
+ * [cv::remap]
353
+ *
354
+ * @param src Source image.
355
+ *
356
+ * @param dst Destination image. It will have same type as src.
357
+ *
358
+ * @param dsize The destination image size (see description for valid options).
359
+ *
360
+ * @param center The transformation center.
361
+ *
362
+ * @param maxRadius The radius of the bounding circle to transform. It determines the inverse magnitude
363
+ * scale parameter too.
364
+ *
365
+ * @param flags A combination of interpolation methods, InterpolationFlags + WarpPolarMode.
366
+ * Add WARP_POLAR_LINEAR to select linear polar mapping (default)Add WARP_POLAR_LOG to select semilog
367
+ * polar mappingAdd WARP_INVERSE_MAP for reverse mapping.
368
+ */
369
+ export declare function warpPolar(src: InputArray, dst: OutputArray, dsize: Size, center: Point2f, maxRadius: double, flags: int): void;
370
+ /**
371
+ * nearest neighbor interpolation
372
+ *
373
+ */
374
+ export declare const INTER_NEAREST: InterpolationFlags;
375
+ /**
376
+ * bilinear interpolation
377
+ *
378
+ */
379
+ export declare const INTER_LINEAR: InterpolationFlags;
380
+ /**
381
+ * bicubic interpolation
382
+ *
383
+ */
384
+ export declare const INTER_CUBIC: InterpolationFlags;
385
+ /**
386
+ * resampling using pixel area relation. It may be a preferred method for image decimation, as it gives
387
+ * moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method.
388
+ *
389
+ */
390
+ export declare const INTER_AREA: InterpolationFlags;
391
+ /**
392
+ * Lanczos interpolation over 8x8 neighborhood
393
+ *
394
+ */
395
+ export declare const INTER_LANCZOS4: InterpolationFlags;
396
+ /**
397
+ * Bit exact bilinear interpolation
398
+ *
399
+ */
400
+ export declare const INTER_LINEAR_EXACT: InterpolationFlags;
401
+ /**
402
+ * mask for interpolation codes
403
+ *
404
+ */
405
+ export declare const INTER_MAX: InterpolationFlags;
406
+ /**
407
+ * flag, fills all of the destination image pixels. If some of them correspond to outliers in the
408
+ * source image, they are set to zero
409
+ *
410
+ */
411
+ export declare const WARP_FILL_OUTLIERS: InterpolationFlags;
412
+ /**
413
+ * flag, inverse transformation
414
+ *
415
+ * For example, [linearPolar] or [logPolar] transforms:
416
+ *
417
+ * flag is **not** set: `$dst( \\rho , \\phi ) = src(x,y)$`
418
+ * flag is set: `$dst(x,y) = src( \\rho , \\phi )$`
419
+ *
420
+ */
421
+ export declare const WARP_INVERSE_MAP: InterpolationFlags;
422
+ export declare const INTER_BITS: InterpolationMasks;
423
+ export declare const INTER_BITS2: InterpolationMasks;
424
+ export declare const INTER_TAB_SIZE: InterpolationMasks;
425
+ export declare const INTER_TAB_SIZE2: InterpolationMasks;
426
+ export declare const WARP_POLAR_LINEAR: WarpPolarMode;
427
+ export declare const WARP_POLAR_LOG: WarpPolarMode;
428
+ export type InterpolationFlags = any;
429
+ export type InterpolationMasks = any;
430
+ export type WarpPolarMode = any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=imgproc_transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imgproc_transform.js","sourceRoot":"","sources":["../../../../src/types/opencv/imgproc_transform.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import * as _CV from "./_types";
2
+ export type CV = typeof _CV;
3
+ export * from "./_hacks";
4
+ export * from "./_types";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./_hacks"), exports);
18
+ __exportStar(require("./_types"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/opencv/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,2CAAyB;AACzB,2CAAyB"}
@@ -0,0 +1,43 @@
1
+ import { double, int, Size } from "./_types";
2
+ export declare function createFaceDetectionMaskGenerator(): any;
3
+ /**
4
+ * The function is a wrapper for the generic function partition . It clusters all the input rectangles
5
+ * using the rectangle equivalence criteria that combines rectangles with similar sizes and similar
6
+ * locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If
7
+ * `$\\texttt{eps}\\rightarrow +\\inf$` , all the rectangles are put in one cluster. Then, the small
8
+ * clusters containing less than or equal to groupThreshold rectangles are rejected. In each other
9
+ * cluster, the average rectangle is computed and put into the output rectangle list.
10
+ *
11
+ * @param rectList Input/output vector of rectangles. Output vector includes retained and grouped
12
+ * rectangles. (The Python list is not modified in place.)
13
+ *
14
+ * @param groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a
15
+ * group of rectangles to retain it.
16
+ *
17
+ * @param eps Relative difference between sides of the rectangles to merge them into a group.
18
+ */
19
+ export declare function groupRectangles(rectList: any, groupThreshold: int, eps?: double): void;
20
+ /**
21
+ * This is an overloaded member function, provided for convenience. It differs from the above function
22
+ * only in what argument(s) it accepts.
23
+ */
24
+ export declare function groupRectangles(rectList: any, weights: any, groupThreshold: int, eps?: double): void;
25
+ /**
26
+ * This is an overloaded member function, provided for convenience. It differs from the above function
27
+ * only in what argument(s) it accepts.
28
+ */
29
+ export declare function groupRectangles(rectList: any, groupThreshold: int, eps: double, weights: any, levelWeights: any): void;
30
+ /**
31
+ * This is an overloaded member function, provided for convenience. It differs from the above function
32
+ * only in what argument(s) it accepts.
33
+ */
34
+ export declare function groupRectangles(rectList: any, rejectLevels: any, levelWeights: any, groupThreshold: int, eps?: double): void;
35
+ /**
36
+ * This is an overloaded member function, provided for convenience. It differs from the above function
37
+ * only in what argument(s) it accepts.
38
+ */
39
+ export declare function groupRectangles_meanshift(rectList: any, foundWeights: any, foundScales: any, detectThreshold?: double, winDetSize?: Size): void;
40
+ export declare const CASCADE_DO_CANNY_PRUNING: any;
41
+ export declare const CASCADE_SCALE_IMAGE: any;
42
+ export declare const CASCADE_FIND_BIGGEST_OBJECT: any;
43
+ export declare const CASCADE_DO_ROUGH_SEARCH: any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=objdetect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objdetect.js","sourceRoot":"","sources":["../../../../src/types/opencv/objdetect.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { double, InputArray, int, OutputArray } from "./_types";
2
+ /**
3
+ * The function reconstructs the selected image area from the pixel near the area boundary. The
4
+ * function may be used to remove dust and scratches from a scanned photo, or to remove undesirable
5
+ * objects from still images or video. See for more details.
6
+ *
7
+ * An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
8
+ * (Python) An example using the inpainting technique can be found at
9
+ * opencv_source_code/samples/python/inpaint.py
10
+ *
11
+ * @param src Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.
12
+ *
13
+ * @param inpaintMask Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that
14
+ * needs to be inpainted.
15
+ *
16
+ * @param dst Output image with the same size and type as src .
17
+ *
18
+ * @param inpaintRadius Radius of a circular neighborhood of each point inpainted that is considered by
19
+ * the algorithm.
20
+ *
21
+ * @param flags Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA
22
+ */
23
+ export declare function inpaint(src: InputArray, inpaintMask: InputArray, dst: OutputArray, inpaintRadius: double, flags: int): void;
24
+ export declare const INPAINT_NS: any;
25
+ export declare const INPAINT_TELEA: any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=photo_inpaint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photo_inpaint.js","sourceRoot":"","sources":["../../../../src/types/opencv/photo_inpaint.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
+ export declare class softdouble {
3
+ v: uint64_t;
4
+ constructor();
5
+ constructor(c: softdouble);
6
+ constructor(arg159: uint32_t);
7
+ constructor(arg160: uint64_t);
8
+ constructor(arg161: int32_t);
9
+ constructor(arg162: int64_t);
10
+ constructor(a: any);
11
+ getExp(): int;
12
+ /**
13
+ * Returns a number 1 <= x < 2 with the same significand
14
+ */
15
+ getFrac(): softdouble;
16
+ getSign(): bool;
17
+ isInf(): bool;
18
+ isNaN(): bool;
19
+ isSubnormal(): bool;
20
+ setExp(e: int): softdouble;
21
+ /**
22
+ * Constructs a copy of a number with significand taken from parameter
23
+ */
24
+ setFrac(s: softdouble): softdouble;
25
+ setSign(sign: bool): softdouble;
26
+ static eps(): softdouble;
27
+ /**
28
+ * Builds new value from raw binary representation
29
+ */
30
+ static fromRaw(a: uint64_t): softdouble;
31
+ static inf(): softdouble;
32
+ static max(): softdouble;
33
+ static min(): softdouble;
34
+ static nan(): softdouble;
35
+ static one(): softdouble;
36
+ static pi(): softdouble;
37
+ static zero(): softdouble;
38
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=softdouble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softdouble.js","sourceRoot":"","sources":["../../../../src/types/opencv/softdouble.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
+ export declare class softfloat {
3
+ v: uint32_t;
4
+ constructor();
5
+ constructor(c: softfloat);
6
+ constructor(arg174: uint32_t);
7
+ constructor(arg175: uint64_t);
8
+ constructor(arg176: int32_t);
9
+ constructor(arg177: int64_t);
10
+ constructor(a: any);
11
+ getExp(): int;
12
+ /**
13
+ * Returns a number 1 <= x < 2 with the same significand
14
+ */
15
+ getFrac(): softfloat;
16
+ getSign(): bool;
17
+ isInf(): bool;
18
+ isNaN(): bool;
19
+ isSubnormal(): bool;
20
+ setExp(e: int): softfloat;
21
+ /**
22
+ * Constructs a copy of a number with significand taken from parameter
23
+ */
24
+ setFrac(s: softfloat): softfloat;
25
+ setSign(sign: bool): softfloat;
26
+ static eps(): softfloat;
27
+ /**
28
+ * Builds new value from raw binary representation
29
+ */
30
+ static fromRaw(a: uint32_t): softfloat;
31
+ static inf(): softfloat;
32
+ static max(): softfloat;
33
+ static min(): softfloat;
34
+ static nan(): softfloat;
35
+ static one(): softfloat;
36
+ static pi(): softfloat;
37
+ static zero(): softfloat;
38
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=softfloat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softfloat.js","sourceRoot":"","sources":["../../../../src/types/opencv/softfloat.ts"],"names":[],"mappings":""}