@opencvjs/types 4.10.0-release.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +23 -0
  3. package/lib/index.d.ts +2 -0
  4. package/lib/opencv/Affine3.d.ts +206 -0
  5. package/lib/opencv/Algorithm.d.ts +126 -0
  6. package/lib/opencv/AutoBuffer.d.ts +50 -0
  7. package/lib/opencv/BFMatcher.d.ts +37 -0
  8. package/lib/opencv/BOWTrainer.d.ts +43 -0
  9. package/lib/opencv/CascadeClassifier.d.ts +153 -0
  10. package/lib/opencv/DescriptorMatcher.d.ts +236 -0
  11. package/lib/opencv/DynamicBitset.d.ts +68 -0
  12. package/lib/opencv/Exception.d.ts +54 -0
  13. package/lib/opencv/Feature2D.d.ts +20 -0
  14. package/lib/opencv/FlannBasedMatcher.d.ts +57 -0
  15. package/lib/opencv/HOGDescriptor.d.ts +401 -0
  16. package/lib/opencv/Logger.d.ts +34 -0
  17. package/lib/opencv/LshTable.d.ts +81 -0
  18. package/lib/opencv/Mat.d.ts +1793 -0
  19. package/lib/opencv/MatExpr.d.ts +107 -0
  20. package/lib/opencv/MatOp.d.ts +72 -0
  21. package/lib/opencv/Matx.d.ts +228 -0
  22. package/lib/opencv/Node.d.ts +33 -0
  23. package/lib/opencv/ORB.d.ts +23 -0
  24. package/lib/opencv/PCA.d.ts +198 -0
  25. package/lib/opencv/RotatedRect.d.ts +73 -0
  26. package/lib/opencv/Tracker.d.ts +1 -0
  27. package/lib/opencv/TrackerMIL.d.ts +3 -0
  28. package/lib/opencv/_types.d.ts +48 -0
  29. package/lib/opencv/calib3d.d.ts +2937 -0
  30. package/lib/opencv/core_array.d.ts +3102 -0
  31. package/lib/opencv/core_cluster.d.ts +80 -0
  32. package/lib/opencv/core_hal_interface.d.ts +159 -0
  33. package/lib/opencv/core_utils.d.ts +748 -0
  34. package/lib/opencv/dnn.d.ts +505 -0
  35. package/lib/opencv/features2d_draw.d.ts +114 -0
  36. package/lib/opencv/fisheye.d.ts +26 -0
  37. package/lib/opencv/helpers.d.ts +274 -0
  38. package/lib/opencv/imgproc_color_conversions.d.ts +527 -0
  39. package/lib/opencv/imgproc_draw.d.ts +732 -0
  40. package/lib/opencv/imgproc_feature.d.ts +681 -0
  41. package/lib/opencv/imgproc_filter.d.ts +918 -0
  42. package/lib/opencv/imgproc_hist.d.ts +399 -0
  43. package/lib/opencv/imgproc_misc.d.ts +616 -0
  44. package/lib/opencv/imgproc_object.d.ts +58 -0
  45. package/lib/opencv/imgproc_shape.d.ts +724 -0
  46. package/lib/opencv/imgproc_transform.d.ts +574 -0
  47. package/lib/opencv/missing.d.ts +58 -0
  48. package/lib/opencv/objdetect.d.ts +103 -0
  49. package/lib/opencv/photo_inpaint.d.ts +39 -0
  50. package/lib/opencv/softdouble.d.ts +71 -0
  51. package/lib/opencv/softfloat.d.ts +71 -0
  52. package/lib/opencv/video_track.d.ts +370 -0
  53. package/package.json +18 -0
  54. package/tsconfig.json +15 -0
@@ -0,0 +1,574 @@
1
+ import type {
2
+ bool,
3
+ double,
4
+ InputArray,
5
+ int,
6
+ Mat,
7
+ OutputArray,
8
+ Point2f,
9
+ Size,
10
+ } from "./_types";
11
+ /*
12
+ * # Geometric Image Transformations
13
+ * The functions in this section perform various geometrical transformations of 2D images. They do not change the image content but deform the pixel grid and map this deformed grid to the destination image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from destination to the source. That is, for each pixel `$(x, y)$` of the destination image, the functions compute coordinates of the corresponding "donor" pixel in the source image and copy the pixel value:
14
+ *
15
+ * `\[\texttt{dst} (x,y)= \texttt{src} (f_x(x,y), f_y(x,y))\]`
16
+ *
17
+ * In case when you specify the forward mapping `$\left<g_x, g_y\right>: \texttt{src} \rightarrow \texttt{dst}$`, the OpenCV functions first compute the corresponding inverse mapping `$\left<f_x, f_y\right>: \texttt{dst} \rightarrow \texttt{src}$` and then use the above formula.
18
+ *
19
+ * The actual implementations of the geometrical transformations, from the most generic remap and to the simplest and the fastest resize, need to solve two main problems with the above formula:
20
+ *
21
+ *
22
+ *
23
+ *
24
+ *
25
+ * * Extrapolation of non-existing pixels. Similarly to the filtering functions described in the previous section, for some `$(x,y)$`, either one of `$f_x(x,y)$`, or `$f_y(x,y)$`, or both of them may fall outside of the image. In this case, an extrapolation method needs to be used. OpenCV provides the same selection of extrapolation methods as in the filtering functions. In addition, it provides the method [BORDER_TRANSPARENT]. This means that the corresponding pixels in the destination image will not be modified at all.
26
+ * * Interpolation of pixel values. Usually `$f_x(x,y)$` and `$f_y(x,y)$` are floating-point numbers. This means that `$\left<f_x, f_y\right>$` can be either an affine or perspective transformation, or radial lens distortion correction, and so on. So, a pixel value at fractional coordinates needs to be retrieved. In the simplest case, the coordinates can be just rounded to the nearest integer coordinates and the corresponding pixel can be used. This is called a nearest-neighbor interpolation. However, a better result can be achieved by using more sophisticated , where a polynomial function is fit into some neighborhood of the computed pixel `$(f_x(x,y), f_y(x,y))$`, and then the value of the polynomial at `$(f_x(x,y), f_y(x,y))$` is taken as the interpolated pixel value. In OpenCV, you can choose between several interpolation methods. See resize for details.
27
+ *
28
+ *
29
+ *
30
+ *
31
+ * The geometrical transformations do not work with `CV_8S` or `CV_32S` images.
32
+ */
33
+ /**
34
+ * The function converts a pair of maps for remap from one representation to another. The following
35
+ * options ( (map1.type(), map2.type()) `$\\rightarrow$` (dstmap1.type(), dstmap2.type()) ) are
36
+ * supported:
37
+ *
38
+ * `$\\texttt{(CV_32FC1, CV_32FC1)} \\rightarrow \\texttt{(CV_16SC2, CV_16UC1)}$`. This is the most
39
+ * frequently used conversion operation, in which the original floating-point maps (see remap ) are
40
+ * converted to a more compact and much faster fixed-point representation. The first output array
41
+ * contains the rounded coordinates and the second array (created only when nninterpolation=false )
42
+ * contains indices in the interpolation tables.
43
+ * `$\\texttt{(CV_32FC2)} \\rightarrow \\texttt{(CV_16SC2, CV_16UC1)}$`. The same as above but the
44
+ * original maps are stored in one 2-channel matrix.
45
+ * Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same as
46
+ * the originals.
47
+ *
48
+ * [remap], [undistort], [initUndistortRectifyMap]
49
+ *
50
+ * @param map1 The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
51
+ *
52
+ * @param map2 The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), respectively.
53
+ *
54
+ * @param dstmap1 The first output map that has the type dstmap1type and the same size as src .
55
+ *
56
+ * @param dstmap2 The second output map.
57
+ *
58
+ * @param dstmap1type Type of the first output map that should be CV_16SC2, CV_32FC1, or CV_32FC2 .
59
+ *
60
+ * @param nninterpolation Flag indicating whether the fixed-point maps are used for the
61
+ * nearest-neighbor or for a more complex interpolation.
62
+ */
63
+ export declare function convertMaps(
64
+ map1: InputArray,
65
+ map2: InputArray,
66
+ dstmap1: OutputArray,
67
+ dstmap2: OutputArray,
68
+ dstmap1type: int,
69
+ nninterpolation?: bool,
70
+ ): void;
71
+
72
+ /**
73
+ * The function calculates the `$2 \\times 3$` matrix of an affine transform so that:
74
+ *
75
+ * `\\[\\begin{bmatrix} x'_i \\\\ y'_i \\end{bmatrix} = \\texttt{map_matrix} \\cdot \\begin{bmatrix}
76
+ * x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\]`
77
+ *
78
+ * where
79
+ *
80
+ * `\\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2\\]`
81
+ *
82
+ * [warpAffine], [transform]
83
+ *
84
+ * @param src Coordinates of triangle vertices in the source image.
85
+ *
86
+ * @param dst Coordinates of the corresponding triangle vertices in the destination image.
87
+ */
88
+ export declare function getAffineTransform(src: any, dst: any): Mat;
89
+
90
+ export declare function getAffineTransform(
91
+ src: InputArray,
92
+ dst: InputArray,
93
+ ): Mat;
94
+
95
+ /**
96
+ * The function calculates the `$3 \\times 3$` matrix of a perspective transform so that:
97
+ *
98
+ * `\\[\\begin{bmatrix} t_i x'_i \\\\ t_i y'_i \\\\ t_i \\end{bmatrix} = \\texttt{map_matrix} \\cdot
99
+ * \\begin{bmatrix} x_i \\\\ y_i \\\\ 1 \\end{bmatrix}\\]`
100
+ *
101
+ * where
102
+ *
103
+ * `\\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3\\]`
104
+ *
105
+ * [findHomography], [warpPerspective], [perspectiveTransform]
106
+ *
107
+ * @param src Coordinates of quadrangle vertices in the source image.
108
+ *
109
+ * @param dst Coordinates of the corresponding quadrangle vertices in the destination image.
110
+ *
111
+ * @param solveMethod method passed to cv::solve (DecompTypes)
112
+ */
113
+ export declare function getPerspectiveTransform(
114
+ src: InputArray,
115
+ dst: InputArray,
116
+ solveMethod?: int,
117
+ ): Mat;
118
+
119
+ /**
120
+ * This is an overloaded member function, provided for convenience. It differs from the above function
121
+ * only in what argument(s) it accepts.
122
+ */
123
+ export declare function getPerspectiveTransform(
124
+ src: any,
125
+ dst: any,
126
+ solveMethod?: int,
127
+ ): Mat;
128
+
129
+ /**
130
+ * The function getRectSubPix extracts pixels from src:
131
+ *
132
+ * `\\[patch(x, y) = src(x + \\texttt{center.x} - ( \\texttt{dst.cols} -1)*0.5, y + \\texttt{center.y}
133
+ * - ( \\texttt{dst.rows} -1)*0.5)\\]`
134
+ *
135
+ * where the values of the pixels at non-integer coordinates are retrieved using bilinear
136
+ * interpolation. Every channel of multi-channel images is processed independently. Also the image
137
+ * should be a single channel or three channel image. While the center of the rectangle must be inside
138
+ * the image, parts of the rectangle may be outside.
139
+ *
140
+ * [warpAffine], [warpPerspective]
141
+ *
142
+ * @param image Source image.
143
+ *
144
+ * @param patchSize Size of the extracted patch.
145
+ *
146
+ * @param center Floating point coordinates of the center of the extracted rectangle within the source
147
+ * image. The center must be inside the image.
148
+ *
149
+ * @param patch Extracted patch that has the size patchSize and the same number of channels as src .
150
+ *
151
+ * @param patchType Depth of the extracted pixels. By default, they have the same depth as src .
152
+ */
153
+ export declare function getRectSubPix(
154
+ image: InputArray,
155
+ patchSize: Size,
156
+ center: Point2f,
157
+ patch: OutputArray,
158
+ patchType?: int,
159
+ ): void;
160
+
161
+ /**
162
+ * The function calculates the following matrix:
163
+ *
164
+ * `\\[\\begin{bmatrix} \\alpha & \\beta & (1- \\alpha ) \\cdot \\texttt{center.x} - \\beta \\cdot
165
+ * \\texttt{center.y} \\\\ - \\beta & \\alpha & \\beta \\cdot \\texttt{center.x} + (1- \\alpha ) \\cdot
166
+ * \\texttt{center.y} \\end{bmatrix}\\]`
167
+ *
168
+ * where
169
+ *
170
+ * `\\[\\begin{array}{l} \\alpha = \\texttt{scale} \\cdot \\cos \\texttt{angle} , \\\\ \\beta =
171
+ * \\texttt{scale} \\cdot \\sin \\texttt{angle} \\end{array}\\]`
172
+ *
173
+ * The transformation maps the rotation center to itself. If this is not the target, adjust the shift.
174
+ *
175
+ * [getAffineTransform], [warpAffine], [transform]
176
+ *
177
+ * @param center Center of the rotation in the source image.
178
+ *
179
+ * @param angle Rotation angle in degrees. Positive values mean counter-clockwise rotation (the
180
+ * coordinate origin is assumed to be the top-left corner).
181
+ *
182
+ * @param scale Isotropic scale factor.
183
+ */
184
+ export declare function getRotationMatrix2D(
185
+ center: Point2f,
186
+ angle: double,
187
+ scale: double,
188
+ ): Mat;
189
+
190
+ /**
191
+ * The function computes an inverse affine transformation represented by `$2 \\times 3$` matrix M:
192
+ *
193
+ * `\\[\\begin{bmatrix} a_{11} & a_{12} & b_1 \\\\ a_{21} & a_{22} & b_2 \\end{bmatrix}\\]`
194
+ *
195
+ * The result is also a `$2 \\times 3$` matrix of the same type as M.
196
+ *
197
+ * @param M Original affine transformation.
198
+ *
199
+ * @param iM Output reverse affine transformation.
200
+ */
201
+ export declare function invertAffineTransform(
202
+ M: InputArray,
203
+ iM: OutputArray,
204
+ ): void;
205
+
206
+ export declare function linearPolar(
207
+ src: InputArray,
208
+ dst: OutputArray,
209
+ center: Point2f,
210
+ maxRadius: double,
211
+ flags: int,
212
+ ): void;
213
+
214
+ export declare function logPolar(
215
+ src: InputArray,
216
+ dst: OutputArray,
217
+ center: Point2f,
218
+ M: double,
219
+ flags: int,
220
+ ): void;
221
+
222
+ /**
223
+ * The function remap transforms the source image using the specified map:
224
+ *
225
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} (map_x(x,y),map_y(x,y))\\]`
226
+ *
227
+ * where values of pixels with non-integer coordinates are computed using one of available
228
+ * interpolation methods. `$map_x$` and `$map_y$` can be encoded as separate floating-point maps in
229
+ * `$map_1$` and `$map_2$` respectively, or interleaved floating-point maps of `$(x,y)$` in `$map_1$`,
230
+ * or fixed-point maps created by using convertMaps. The reason you might want to convert from floating
231
+ * to fixed-point representations of a map is that they can yield much faster (2x) remapping
232
+ * operations. In the converted case, `$map_1$` contains pairs (cvFloor(x), cvFloor(y)) and `$map_2$`
233
+ * contains indices in a table of interpolation coefficients.
234
+ *
235
+ * This function cannot operate in-place.
236
+ *
237
+ * Due to current implementation limitations the size of an input and output images should be less than
238
+ * 32767x32767.
239
+ *
240
+ * @param src Source image.
241
+ *
242
+ * @param dst Destination image. It has the same size as map1 and the same type as src .
243
+ *
244
+ * @param map1 The first map of either (x,y) points or just x values having the type CV_16SC2 ,
245
+ * CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to
246
+ * fixed-point for speed.
247
+ *
248
+ * @param map2 The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if
249
+ * map1 is (x,y) points), respectively.
250
+ *
251
+ * @param interpolation Interpolation method (see InterpolationFlags). The method INTER_AREA is not
252
+ * supported by this function.
253
+ *
254
+ * @param borderMode Pixel extrapolation method (see BorderTypes). When borderMode=BORDER_TRANSPARENT,
255
+ * it means that the pixels in the destination image that corresponds to the "outliers" in the source
256
+ * image are not modified by the function.
257
+ *
258
+ * @param borderValue Value used in case of a constant border. By default, it is 0.
259
+ */
260
+ export declare function remap(
261
+ src: InputArray,
262
+ dst: OutputArray,
263
+ map1: InputArray,
264
+ map2: InputArray,
265
+ interpolation: int,
266
+ borderMode?: int,
267
+ borderValue?: any,
268
+ ): void;
269
+
270
+ /**
271
+ * The function resize resizes the image src down to or up to the specified size. Note that the initial
272
+ * dst type or size are not taken into account. Instead, the size and type are derived from the
273
+ * `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst, you may
274
+ * call the function as follows:
275
+ *
276
+ * ```cpp
277
+ * // explicitly specify dsize=dst.size(); fx and fy will be computed from that.
278
+ * resize(src, dst, dst.size(), 0, 0, interpolation);
279
+ * ```
280
+ *
281
+ * If you want to decimate the image by factor of 2 in each direction, you can call the function this
282
+ * way:
283
+ *
284
+ * ```cpp
285
+ * // specify fx and fy and let the function compute the destination image size.
286
+ * resize(src, dst, Size(), 0.5, 0.5, interpolation);
287
+ * ```
288
+ *
289
+ * To shrink an image, it will generally look best with [INTER_AREA] interpolation, whereas to enlarge
290
+ * an image, it will generally look best with c::INTER_CUBIC (slow) or [INTER_LINEAR] (faster but still
291
+ * looks OK).
292
+ *
293
+ * [warpAffine], [warpPerspective], [remap]
294
+ *
295
+ * @param src input image.
296
+ *
297
+ * @param dst output image; it has the size dsize (when it is non-zero) or the size computed from
298
+ * src.size(), fx, and fy; the type of dst is the same as of src.
299
+ *
300
+ * @param dsize output image size; if it equals zero, it is computed as: \[\texttt{dsize =
301
+ * Size(round(fx*src.cols), round(fy*src.rows))}\] Either dsize or both fx and fy must be non-zero.
302
+ *
303
+ * @param fx scale factor along the horizontal axis; when it equals 0, it is computed as
304
+ * \[\texttt{(double)dsize.width/src.cols}\]
305
+ *
306
+ * @param fy scale factor along the vertical axis; when it equals 0, it is computed as
307
+ * \[\texttt{(double)dsize.height/src.rows}\]
308
+ *
309
+ * @param interpolation interpolation method, see InterpolationFlags
310
+ */
311
+ export declare function resize(
312
+ src: InputArray,
313
+ dst: OutputArray,
314
+ dsize: Size,
315
+ fx?: double,
316
+ fy?: double,
317
+ interpolation?: int,
318
+ ): void;
319
+
320
+ /**
321
+ * The function warpAffine transforms the source image using the specified matrix:
322
+ *
323
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} ( \\texttt{M} _{11} x + \\texttt{M} _{12} y + \\texttt{M}
324
+ * _{13}, \\texttt{M} _{21} x + \\texttt{M} _{22} y + \\texttt{M} _{23})\\]`
325
+ *
326
+ * when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with
327
+ * [invertAffineTransform] and then put in the formula above instead of M. The function cannot operate
328
+ * in-place.
329
+ *
330
+ * [warpPerspective], [resize], [remap], [getRectSubPix], [transform]
331
+ *
332
+ * @param src input image.
333
+ *
334
+ * @param dst output image that has the size dsize and the same type as src .
335
+ *
336
+ * @param M $2\times 3$ transformation matrix.
337
+ *
338
+ * @param dsize size of the output image.
339
+ *
340
+ * @param flags combination of interpolation methods (see InterpolationFlags) and the optional flag
341
+ * WARP_INVERSE_MAP that means that M is the inverse transformation (
342
+ * $\texttt{dst}\rightarrow\texttt{src}$ ).
343
+ *
344
+ * @param borderMode pixel extrapolation method (see BorderTypes); when borderMode=BORDER_TRANSPARENT,
345
+ * it means that the pixels in the destination image corresponding to the "outliers" in the source
346
+ * image are not modified by the function.
347
+ *
348
+ * @param borderValue value used in case of a constant border; by default, it is 0.
349
+ */
350
+ export declare function warpAffine(
351
+ src: InputArray,
352
+ dst: OutputArray,
353
+ M: InputArray,
354
+ dsize: Size,
355
+ flags?: int,
356
+ borderMode?: int,
357
+ borderValue?: any,
358
+ ): void;
359
+
360
+ /**
361
+ * The function warpPerspective transforms the source image using the specified matrix:
362
+ *
363
+ * `\\[\\texttt{dst} (x,y) = \\texttt{src} \\left ( \\frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x +
364
+ * M_{32} y + M_{33}} , \\frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \\right
365
+ * )\\]`
366
+ *
367
+ * when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert
368
+ * and then put in the formula above instead of M. The function cannot operate in-place.
369
+ *
370
+ * [warpAffine], [resize], [remap], [getRectSubPix], [perspectiveTransform]
371
+ *
372
+ * @param src input image.
373
+ *
374
+ * @param dst output image that has the size dsize and the same type as src .
375
+ *
376
+ * @param M $3\times 3$ transformation matrix.
377
+ *
378
+ * @param dsize size of the output image.
379
+ *
380
+ * @param flags combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional
381
+ * flag WARP_INVERSE_MAP, that sets M as the inverse transformation (
382
+ * $\texttt{dst}\rightarrow\texttt{src}$ ).
383
+ *
384
+ * @param borderMode pixel extrapolation method (BORDER_CONSTANT or BORDER_REPLICATE).
385
+ *
386
+ * @param borderValue value used in case of a constant border; by default, it equals 0.
387
+ */
388
+ export declare function warpPerspective(
389
+ src: InputArray,
390
+ dst: OutputArray,
391
+ M: InputArray,
392
+ dsize: Size,
393
+ flags?: int,
394
+ borderMode?: int,
395
+ borderValue?: any,
396
+ ): void;
397
+
398
+ /**
399
+ * <a name="da/d54/group__imgproc__transform_1polar_remaps_reference_image"></a>
400
+ * Transform the source image using the following transformation: `\\[ dst(\\rho , \\phi ) = src(x,y)
401
+ * \\]`
402
+ *
403
+ * where `\\[ \\begin{array}{l} \\vec{I} = (x - center.x, \\;y - center.y) \\\\ \\phi = Kangle \\cdot
404
+ * \\texttt{angle} (\\vec{I}) \\\\ \\rho = \\left\\{\\begin{matrix} Klin \\cdot \\texttt{magnitude}
405
+ * (\\vec{I}) & default \\\\ Klog \\cdot log_e(\\texttt{magnitude} (\\vec{I})) & if \\; semilog \\\\
406
+ * \\end{matrix}\\right. \\end{array} \\]`
407
+ *
408
+ * and `\\[ \\begin{array}{l} Kangle = dsize.height / 2\\Pi \\\\ Klin = dsize.width / maxRadius \\\\
409
+ * Klog = dsize.width / log_e(maxRadius) \\\\ \\end{array} \\]`
410
+ *
411
+ * Polar mapping can be linear or semi-log. Add one of [WarpPolarMode] to `flags` to specify the polar
412
+ * mapping mode.
413
+ *
414
+ * Linear is the default mode.
415
+ *
416
+ * The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of
417
+ * sight (central vision) in contrast to peripheral vision where acuity is minor.
418
+ *
419
+ * if both values in `dsize <=0` (default), the destination image will have (almost) same area of
420
+ * source bounding circle: `\\[\\begin{array}{l} dsize.area \\leftarrow (maxRadius^2 \\cdot \\Pi) \\\\
421
+ * dsize.width = \\texttt{cvRound}(maxRadius) \\\\ dsize.height = \\texttt{cvRound}(maxRadius \\cdot
422
+ * \\Pi) \\\\ \\end{array}\\]`
423
+ * if only `dsize.height <= 0`, the destination image area will be proportional to the bounding circle
424
+ * area but scaled by `Kx * Kx`: `\\[\\begin{array}{l} dsize.height = \\texttt{cvRound}(dsize.width
425
+ * \\cdot \\Pi) \\\\ \\end{array} \\]`
426
+ * if both values in `dsize > 0`, the destination image will have the given size therefore the area of
427
+ * the bounding circle will be scaled to `dsize`.
428
+ *
429
+ * You can get reverse mapping adding [WARP_INVERSE_MAP] to `flags`
430
+ *
431
+ * ```cpp
432
+ * // direct transform
433
+ * warpPolar(src, lin_polar_img, Size(),center, maxRadius, flags); //
434
+ * linear Polar
435
+ * warpPolar(src, log_polar_img, Size(),center, maxRadius, flags + WARP_POLAR_LOG); //
436
+ * semilog Polar
437
+ * // inverse transform
438
+ * warpPolar(lin_polar_img, recovered_lin_polar_img, src.size(), center, maxRadius, flags +
439
+ * WARP_INVERSE_MAP);
440
+ * warpPolar(log_polar_img, recovered_log_polar, src.size(), center, maxRadius, flags +
441
+ * WARP_POLAR_LOG + WARP_INVERSE_MAP);
442
+ * ```
443
+ *
444
+ * In addiction, to calculate the original coordinate from a polar mapped coordinate `$(rho, phi)->(x,
445
+ * y)$`:
446
+ *
447
+ * ```cpp
448
+ * double angleRad, magnitude;
449
+ * double Kangle = dst.rows / CV_2PI;
450
+ * angleRad = phi / Kangle;
451
+ * if (flags & WARP_POLAR_LOG)
452
+ * {
453
+ * double Klog = dst.cols / std::log(maxRadius);
454
+ * magnitude = std::exp(rho / Klog);
455
+ * }
456
+ * else
457
+ * {
458
+ * double Klin = dst.cols / maxRadius;
459
+ * magnitude = rho / Klin;
460
+ * }
461
+ * int x = cvRound(center.x + magnitude * cos(angleRad));
462
+ * int y = cvRound(center.y + magnitude * sin(angleRad));
463
+ * ```
464
+ *
465
+ * The function can not operate in-place.
466
+ * To calculate magnitude and angle in degrees [cartToPolar] is used internally thus angles are
467
+ * measured from 0 to 360 with accuracy about 0.3 degrees.
468
+ * This function uses [remap]. Due to current implementation limitations the size of an input and
469
+ * output images should be less than 32767x32767.
470
+ *
471
+ * [cv::remap]
472
+ *
473
+ * @param src Source image.
474
+ *
475
+ * @param dst Destination image. It will have same type as src.
476
+ *
477
+ * @param dsize The destination image size (see description for valid options).
478
+ *
479
+ * @param center The transformation center.
480
+ *
481
+ * @param maxRadius The radius of the bounding circle to transform. It determines the inverse magnitude
482
+ * scale parameter too.
483
+ *
484
+ * @param flags A combination of interpolation methods, InterpolationFlags + WarpPolarMode.
485
+ * Add WARP_POLAR_LINEAR to select linear polar mapping (default)Add WARP_POLAR_LOG to select semilog
486
+ * polar mappingAdd WARP_INVERSE_MAP for reverse mapping.
487
+ */
488
+ export declare function warpPolar(
489
+ src: InputArray,
490
+ dst: OutputArray,
491
+ dsize: Size,
492
+ center: Point2f,
493
+ maxRadius: double,
494
+ flags: int,
495
+ ): void;
496
+
497
+ /**
498
+ * nearest neighbor interpolation
499
+ *
500
+ */
501
+ export declare const INTER_NEAREST: InterpolationFlags; // initializer: = 0
502
+
503
+ /**
504
+ * bilinear interpolation
505
+ *
506
+ */
507
+ export declare const INTER_LINEAR: InterpolationFlags; // initializer: = 1
508
+
509
+ /**
510
+ * bicubic interpolation
511
+ *
512
+ */
513
+ export declare const INTER_CUBIC: InterpolationFlags; // initializer: = 2
514
+
515
+ /**
516
+ * resampling using pixel area relation. It may be a preferred method for image decimation, as it gives
517
+ * moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method.
518
+ *
519
+ */
520
+ export declare const INTER_AREA: InterpolationFlags; // initializer: = 3
521
+
522
+ /**
523
+ * Lanczos interpolation over 8x8 neighborhood
524
+ *
525
+ */
526
+ export declare const INTER_LANCZOS4: InterpolationFlags; // initializer: = 4
527
+
528
+ /**
529
+ * Bit exact bilinear interpolation
530
+ *
531
+ */
532
+ export declare const INTER_LINEAR_EXACT: InterpolationFlags; // initializer: = 5
533
+
534
+ /**
535
+ * mask for interpolation codes
536
+ *
537
+ */
538
+ export declare const INTER_MAX: InterpolationFlags; // initializer: = 7
539
+
540
+ /**
541
+ * flag, fills all of the destination image pixels. If some of them correspond to outliers in the
542
+ * source image, they are set to zero
543
+ *
544
+ */
545
+ export declare const WARP_FILL_OUTLIERS: InterpolationFlags; // initializer: = 8
546
+
547
+ /**
548
+ * flag, inverse transformation
549
+ *
550
+ * For example, [linearPolar] or [logPolar] transforms:
551
+ *
552
+ * flag is **not** set: `$dst( \\rho , \\phi ) = src(x,y)$`
553
+ * flag is set: `$dst(x,y) = src( \\rho , \\phi )$`
554
+ *
555
+ */
556
+ export declare const WARP_INVERSE_MAP: InterpolationFlags; // initializer: = 16
557
+
558
+ export declare const INTER_BITS: InterpolationMasks; // initializer: = 5
559
+
560
+ export declare const INTER_BITS2: InterpolationMasks; // initializer: = INTER_BITS * 2
561
+
562
+ export declare const INTER_TAB_SIZE: InterpolationMasks; // initializer: = 1 << INTER_BITS
563
+
564
+ export declare const INTER_TAB_SIZE2: InterpolationMasks; // initializer: = INTER_TAB_SIZE * INTER_TAB_SIZE
565
+
566
+ export declare const WARP_POLAR_LINEAR: WarpPolarMode; // initializer: = 0
567
+
568
+ export declare const WARP_POLAR_LOG: WarpPolarMode; // initializer: = 256
569
+
570
+ export type InterpolationFlags = any;
571
+
572
+ export type InterpolationMasks = any;
573
+
574
+ export type WarpPolarMode = any;
@@ -0,0 +1,58 @@
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;