@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,732 @@
1
+ import type {
2
+ InputArray,
3
+ InputArrayOfArrays,
4
+ InputOutputArray,
5
+ Point,
6
+ Point2d,
7
+ Rect,
8
+ Scalar,
9
+ Size,
10
+ Size2d,
11
+ Size2l,
12
+ } from "./helpers";
13
+ import type { bool, double, int } from "./missing";
14
+
15
+ /*
16
+ * # Drawing Functions
17
+ * Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be rendered with antialiasing (implemented only for 8-bit images for now). All the functions include the parameter color that uses an RGB value (that may be constructed with the Scalar constructor ) for color images and brightness for grayscale images. For color images, the channel ordering is normally *Blue, Green, Red*. This is what imshow, imread, and imwrite expect. So, if you form a color using the Scalar constructor, it should look like:
18
+ *
19
+ * `\[\texttt{Scalar} (blue \_ component, green \_ component, red \_ component[, alpha \_ component])\]`
20
+ *
21
+ * If you are using your own image rendering and I/O functions, you can use any channel ordering. The drawing functions process each channel independently and do not depend on the channel order or even on the used color space. The whole image can be converted from BGR to RGB or to a different color space using cvtColor .
22
+ *
23
+ * If a drawn figure is partially or completely outside the image, the drawing functions clip it. Also, many drawing functions can handle pixel coordinates specified with sub-pixel accuracy. This means that the coordinates can be passed as fixed-point numbers encoded as integers. The number of fractional bits is specified by the shift parameter and the real point coordinates are calculated as `$\texttt{Point}(x,y)\rightarrow\texttt{Point2f}(x*2^{-shift},y*2^{-shift})$` . This feature is especially effective when rendering antialiased shapes.
24
+ *
25
+ *
26
+ *
27
+ * The functions do not support alpha-transparency when the target image is 4-channel. In this case, the color[3] is simply copied to the repainted pixels. Thus, if you want to paint semi-transparent shapes, you can paint them in a separate buffer and then blend it with the main image.
28
+ */
29
+ /**
30
+ * The function [cv::arrowedLine] draws an arrow between pt1 and pt2 points in the image. See also
31
+ * [line].
32
+ *
33
+ * @param img Image.
34
+ *
35
+ * @param pt1 The point the arrow starts from.
36
+ *
37
+ * @param pt2 The point the arrow points to.
38
+ *
39
+ * @param color Line color.
40
+ *
41
+ * @param thickness Line thickness.
42
+ *
43
+ * @param line_type Type of the line. See LineTypes
44
+ *
45
+ * @param shift Number of fractional bits in the point coordinates.
46
+ *
47
+ * @param tipLength The length of the arrow tip in relation to the arrow length
48
+ */
49
+ export declare function arrowedLine(
50
+ img: InputOutputArray,
51
+ pt1: Point,
52
+ pt2: Point,
53
+ color: any,
54
+ thickness?: int,
55
+ line_type?: int,
56
+ shift?: int,
57
+ tipLength?: double,
58
+ ): void;
59
+
60
+ /**
61
+ * The function [cv::circle] draws a simple or filled circle with a given center and radius.
62
+ *
63
+ * @param img Image where the circle is drawn.
64
+ *
65
+ * @param center Center of the circle.
66
+ *
67
+ * @param radius Radius of the circle.
68
+ *
69
+ * @param color Circle color.
70
+ *
71
+ * @param thickness Thickness of the circle outline, if positive. Negative values, like FILLED, mean
72
+ * that a filled circle is to be drawn.
73
+ *
74
+ * @param lineType Type of the circle boundary. See LineTypes
75
+ *
76
+ * @param shift Number of fractional bits in the coordinates of the center and in the radius value.
77
+ */
78
+ export declare function circle(
79
+ img: InputOutputArray,
80
+ center: Point,
81
+ radius: int,
82
+ color: any,
83
+ thickness?: int,
84
+ lineType?: int,
85
+ shift?: int,
86
+ ): void;
87
+
88
+ /**
89
+ * The function [cv::clipLine] calculates a part of the line segment that is entirely within the
90
+ * specified rectangle. it returns false if the line segment is completely outside the rectangle.
91
+ * Otherwise, it returns true .
92
+ *
93
+ * @param imgSize Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
94
+ *
95
+ * @param pt1 First line point.
96
+ *
97
+ * @param pt2 Second line point.
98
+ */
99
+ export declare function clipLine(imgSize: Size, pt1: any, pt2: any): bool;
100
+
101
+ /**
102
+ * This is an overloaded member function, provided for convenience. It differs from the above function
103
+ * only in what argument(s) it accepts.
104
+ *
105
+ * @param imgSize Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
106
+ *
107
+ * @param pt1 First line point.
108
+ *
109
+ * @param pt2 Second line point.
110
+ */
111
+ export declare function clipLine(imgSize: Size2l, pt1: any, pt2: any): bool;
112
+
113
+ /**
114
+ * This is an overloaded member function, provided for convenience. It differs from the above function
115
+ * only in what argument(s) it accepts.
116
+ *
117
+ * @param imgRect Image rectangle.
118
+ *
119
+ * @param pt1 First line point.
120
+ *
121
+ * @param pt2 Second line point.
122
+ */
123
+ export declare function clipLine(imgRect: Rect, pt1: any, pt2: any): bool;
124
+
125
+ /**
126
+ * The function draws contour outlines in the image if `$\\texttt{thickness} \\ge 0$` or fills the area
127
+ * bounded by the contours if `$\\texttt{thickness}<0$` . The example below shows how to retrieve
128
+ * connected components from the binary image and label them: :
129
+ *
130
+ * ```cpp
131
+ * #include "opencv2/imgproc.hpp"
132
+ * #include "opencv2/highgui.hpp"
133
+ *
134
+ * using namespace cv;
135
+ * using namespace std;
136
+ *
137
+ * int main( int argc, char** argv )
138
+ * {
139
+ * Mat src;
140
+ * // the first command-line parameter must be a filename of the binary
141
+ * // (black-n-white) image
142
+ * if( argc != 2 || !(src=imread(argv[1], 0)).data)
143
+ * return -1;
144
+ *
145
+ * Mat dst = Mat::zeros(src.rows, src.cols, CV_8UC3);
146
+ *
147
+ * src = src > 1;
148
+ * namedWindow( "Source", 1 );
149
+ * imshow( "Source", src );
150
+ *
151
+ * vector<vector<Point> > contours;
152
+ * vector<Vec4i> hierarchy;
153
+ *
154
+ * findContours( src, contours, hierarchy,
155
+ * RETR_CCOMP, CHAIN_APPROX_SIMPLE );
156
+ *
157
+ * // iterate through all the top-level contours,
158
+ * // draw each connected component with its own random color
159
+ * int idx = 0;
160
+ * for( ; idx >= 0; idx = hierarchy[idx][0] )
161
+ * {
162
+ * Scalar color( rand()&255, rand()&255, rand()&255 );
163
+ * drawContours( dst, contours, idx, color, FILLED, 8, hierarchy );
164
+ * }
165
+ *
166
+ * namedWindow( "Components", 1 );
167
+ * imshow( "Components", dst );
168
+ * waitKey(0);
169
+ * }
170
+ * ```
171
+ *
172
+ * When thickness=[FILLED], the function is designed to handle connected components with holes
173
+ * correctly even when no hierarchy date is provided. This is done by analyzing all the outlines
174
+ * together using even-odd rule. This may give incorrect results if you have a joint collection of
175
+ * separately retrieved contours. In order to solve this problem, you need to call [drawContours]
176
+ * separately for each sub-group of contours, or iterate over the collection using contourIdx
177
+ * parameter.
178
+ *
179
+ * @param image Destination image.
180
+ *
181
+ * @param contours All the input contours. Each contour is stored as a point vector.
182
+ *
183
+ * @param contourIdx Parameter indicating a contour to draw. If it is negative, all the contours are
184
+ * drawn.
185
+ *
186
+ * @param color Color of the contours.
187
+ *
188
+ * @param thickness Thickness of lines the contours are drawn with. If it is negative (for example,
189
+ * thickness=FILLED ), the contour interiors are drawn.
190
+ *
191
+ * @param lineType Line connectivity. See LineTypes
192
+ *
193
+ * @param hierarchy Optional information about hierarchy. It is only needed if you want to draw only
194
+ * some of the contours (see maxLevel ).
195
+ *
196
+ * @param maxLevel Maximal level for drawn contours. If it is 0, only the specified contour is drawn.
197
+ * If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function
198
+ * draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This
199
+ * parameter is only taken into account when there is hierarchy available.
200
+ *
201
+ * @param offset Optional contour shift parameter. Shift all the drawn contours by the specified
202
+ * $\texttt{offset}=(dx,dy)$ .
203
+ */
204
+ export declare function drawContours(
205
+ image: InputOutputArray,
206
+ contours: InputArrayOfArrays,
207
+ contourIdx: int,
208
+ color: any,
209
+ thickness?: int,
210
+ lineType?: int,
211
+ hierarchy?: InputArray,
212
+ maxLevel?: int,
213
+ offset?: Point,
214
+ ): void;
215
+
216
+ /**
217
+ * The function [cv::drawMarker] draws a marker on a given position in the image. For the moment
218
+ * several marker types are supported, see [MarkerTypes] for more information.
219
+ *
220
+ * @param img Image.
221
+ *
222
+ * @param position The point where the crosshair is positioned.
223
+ *
224
+ * @param color Line color.
225
+ *
226
+ * @param markerType The specific type of marker you want to use, see MarkerTypes
227
+ *
228
+ * @param markerSize The length of the marker axis [default = 20 pixels]
229
+ *
230
+ * @param thickness Line thickness.
231
+ *
232
+ * @param line_type Type of the line, See LineTypes
233
+ */
234
+ export declare function drawMarker(
235
+ img: InputOutputArray,
236
+ position: Point,
237
+ color: any,
238
+ markerType?: int,
239
+ markerSize?: int,
240
+ thickness?: int,
241
+ line_type?: int,
242
+ ): void;
243
+
244
+ /**
245
+ * The function [cv::ellipse] with more parameters draws an ellipse outline, a filled ellipse, an
246
+ * elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A
247
+ * piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of
248
+ * the ellipse rendering, you can retrieve the curve using [ellipse2Poly] and then render it with
249
+ * [polylines] or fill it with [fillPoly]. If you use the first variant of the function and want to
250
+ * draw the whole ellipse, not an arc, pass `startAngle=0` and `endAngle=360`. If `startAngle` is
251
+ * greater than `endAngle`, they are swapped. The figure below explains the meaning of the parameters
252
+ * to draw the blue arc.
253
+ *
254
+ * @param img Image.
255
+ *
256
+ * @param center Center of the ellipse.
257
+ *
258
+ * @param axes Half of the size of the ellipse main axes.
259
+ *
260
+ * @param angle Ellipse rotation angle in degrees.
261
+ *
262
+ * @param startAngle Starting angle of the elliptic arc in degrees.
263
+ *
264
+ * @param endAngle Ending angle of the elliptic arc in degrees.
265
+ *
266
+ * @param color Ellipse color.
267
+ *
268
+ * @param thickness Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that a
269
+ * filled ellipse sector is to be drawn.
270
+ *
271
+ * @param lineType Type of the ellipse boundary. See LineTypes
272
+ *
273
+ * @param shift Number of fractional bits in the coordinates of the center and values of axes.
274
+ */
275
+ export declare function ellipse(
276
+ img: InputOutputArray,
277
+ center: Point,
278
+ axes: Size,
279
+ angle: double,
280
+ startAngle: double,
281
+ endAngle: double,
282
+ color: any,
283
+ thickness?: int,
284
+ lineType?: int,
285
+ shift?: int,
286
+ ): void;
287
+
288
+ /**
289
+ * This is an overloaded member function, provided for convenience. It differs from the above function
290
+ * only in what argument(s) it accepts.
291
+ *
292
+ * @param img Image.
293
+ *
294
+ * @param box Alternative ellipse representation via RotatedRect. This means that the function draws an
295
+ * ellipse inscribed in the rotated rectangle.
296
+ *
297
+ * @param color Ellipse color.
298
+ *
299
+ * @param thickness Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that a
300
+ * filled ellipse sector is to be drawn.
301
+ *
302
+ * @param lineType Type of the ellipse boundary. See LineTypes
303
+ */
304
+ export declare function ellipse(
305
+ img: InputOutputArray,
306
+ box: any,
307
+ color: any,
308
+ thickness?: int,
309
+ lineType?: int,
310
+ ): void;
311
+
312
+ /**
313
+ * The function ellipse2Poly computes the vertices of a polyline that approximates the specified
314
+ * elliptic arc. It is used by [ellipse]. If `arcStart` is greater than `arcEnd`, they are swapped.
315
+ *
316
+ * @param center Center of the arc.
317
+ *
318
+ * @param axes Half of the size of the ellipse main axes. See ellipse for details.
319
+ *
320
+ * @param angle Rotation angle of the ellipse in degrees. See ellipse for details.
321
+ *
322
+ * @param arcStart Starting angle of the elliptic arc in degrees.
323
+ *
324
+ * @param arcEnd Ending angle of the elliptic arc in degrees.
325
+ *
326
+ * @param delta Angle between the subsequent polyline vertices. It defines the approximation accuracy.
327
+ *
328
+ * @param pts Output vector of polyline vertices.
329
+ */
330
+ export declare function ellipse2Poly(
331
+ center: Point,
332
+ axes: Size,
333
+ angle: int,
334
+ arcStart: int,
335
+ arcEnd: int,
336
+ delta: int,
337
+ pts: any,
338
+ ): void;
339
+
340
+ /**
341
+ * This is an overloaded member function, provided for convenience. It differs from the above function
342
+ * only in what argument(s) it accepts.
343
+ *
344
+ * @param center Center of the arc.
345
+ *
346
+ * @param axes Half of the size of the ellipse main axes. See ellipse for details.
347
+ *
348
+ * @param angle Rotation angle of the ellipse in degrees. See ellipse for details.
349
+ *
350
+ * @param arcStart Starting angle of the elliptic arc in degrees.
351
+ *
352
+ * @param arcEnd Ending angle of the elliptic arc in degrees.
353
+ *
354
+ * @param delta Angle between the subsequent polyline vertices. It defines the approximation accuracy.
355
+ *
356
+ * @param pts Output vector of polyline vertices.
357
+ */
358
+ export declare function ellipse2Poly(
359
+ center: Point2d,
360
+ axes: Size2d,
361
+ angle: int,
362
+ arcStart: int,
363
+ arcEnd: int,
364
+ delta: int,
365
+ pts: any,
366
+ ): void;
367
+
368
+ /**
369
+ * This is an overloaded member function, provided for convenience. It differs from the above function
370
+ * only in what argument(s) it accepts.
371
+ */
372
+ export declare function fillConvexPoly(
373
+ img: InputOutputArray,
374
+ pts: any,
375
+ npts: int,
376
+ color: any,
377
+ lineType?: int,
378
+ shift?: int,
379
+ ): void;
380
+
381
+ /**
382
+ * The function [cv::fillConvexPoly] draws a filled convex polygon. This function is much faster than
383
+ * the function [fillPoly] . It can fill not only convex polygons but any monotonic polygon without
384
+ * self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line)
385
+ * twice at the most (though, its top-most and/or the bottom edge could be horizontal).
386
+ *
387
+ * @param img Image.
388
+ *
389
+ * @param points Polygon vertices.
390
+ *
391
+ * @param color Polygon color.
392
+ *
393
+ * @param lineType Type of the polygon boundaries. See LineTypes
394
+ *
395
+ * @param shift Number of fractional bits in the vertex coordinates.
396
+ */
397
+ export declare function fillConvexPoly(
398
+ img: InputOutputArray,
399
+ points: InputArray,
400
+ color: any,
401
+ lineType?: int,
402
+ shift?: int,
403
+ ): void;
404
+
405
+ /**
406
+ * This is an overloaded member function, provided for convenience. It differs from the above function
407
+ * only in what argument(s) it accepts.
408
+ */
409
+ export declare function fillPoly(
410
+ img: InputOutputArray,
411
+ pts: any,
412
+ npts: any,
413
+ ncontours: int,
414
+ color: any,
415
+ lineType?: int,
416
+ shift?: int,
417
+ offset?: Point,
418
+ ): void;
419
+
420
+ /**
421
+ * The function [cv::fillPoly] fills an area bounded by several polygonal contours. The function can
422
+ * fill complex areas, for example, areas with holes, contours with self-intersections (some of their
423
+ * parts), and so forth.
424
+ *
425
+ * @param img Image.
426
+ *
427
+ * @param pts Array of polygons where each polygon is represented as an array of points.
428
+ *
429
+ * @param color Polygon color.
430
+ *
431
+ * @param lineType Type of the polygon boundaries. See LineTypes
432
+ *
433
+ * @param shift Number of fractional bits in the vertex coordinates.
434
+ *
435
+ * @param offset Optional offset of all points of the contours.
436
+ */
437
+ export declare function fillPoly(
438
+ img: InputOutputArray,
439
+ pts: InputArrayOfArrays,
440
+ color: any,
441
+ lineType?: int,
442
+ shift?: int,
443
+ offset?: Point,
444
+ ): void;
445
+
446
+ /**
447
+ * The fontSize to use for [cv::putText]
448
+ *
449
+ * [cv::putText]
450
+ *
451
+ * @param fontFace Font to use, see cv::HersheyFonts.
452
+ *
453
+ * @param pixelHeight Pixel height to compute the fontScale for
454
+ *
455
+ * @param thickness Thickness of lines used to render the text.See putText for details.
456
+ */
457
+ export declare function getFontScaleFromHeight(
458
+ fontFace: any,
459
+ pixelHeight: any,
460
+ thickness?: any,
461
+ ): double;
462
+
463
+ /**
464
+ * The function [cv::getTextSize] calculates and returns the size of a box that contains the specified
465
+ * text. That is, the following code renders some text, the tight box surrounding it, and the baseline:
466
+ * :
467
+ *
468
+ * ```cpp
469
+ * String text = "Funny text inside the box";
470
+ * int fontFace = FONT_HERSHEY_SCRIPT_SIMPLEX;
471
+ * double fontScale = 2;
472
+ * int thickness = 3;
473
+ *
474
+ * Mat img(600, 800, CV_8UC3, Scalar::all(0));
475
+ *
476
+ * int baseline=0;
477
+ * Size textSize = getTextSize(text, fontFace,
478
+ * fontScale, thickness, &baseline);
479
+ * baseline += thickness;
480
+ *
481
+ * // center the text
482
+ * Point textOrg((img.cols - textSize.width)/2,
483
+ * (img.rows + textSize.height)/2);
484
+ *
485
+ * // draw the box
486
+ * rectangle(img, textOrg + Point(0, baseline),
487
+ * textOrg + Point(textSize.width, -textSize.height),
488
+ * Scalar(0,0,255));
489
+ * // ... and the baseline first
490
+ * line(img, textOrg + Point(0, thickness),
491
+ * textOrg + Point(textSize.width, thickness),
492
+ * Scalar(0, 0, 255));
493
+ *
494
+ * // then put the text itself
495
+ * putText(img, text, textOrg, fontFace, fontScale,
496
+ * Scalar::all(255), thickness, 8);
497
+ * ```
498
+ *
499
+ * The size of a box that contains the specified text.
500
+ *
501
+ * [putText]
502
+ *
503
+ * @param text Input text string.
504
+ *
505
+ * @param fontFace Font to use, see HersheyFonts.
506
+ *
507
+ * @param fontScale Font scale factor that is multiplied by the font-specific base size.
508
+ *
509
+ * @param thickness Thickness of lines used to render the text. See putText for details.
510
+ *
511
+ * @param baseLine y-coordinate of the baseline relative to the bottom-most text point.
512
+ */
513
+ export declare function getTextSize(
514
+ text: any,
515
+ fontFace: int,
516
+ fontScale: double,
517
+ thickness: int,
518
+ baseLine: any,
519
+ ): Size;
520
+
521
+ /**
522
+ * The function line draws the line segment between pt1 and pt2 points in the image. The line is
523
+ * clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected
524
+ * or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased
525
+ * lines are drawn using Gaussian filtering.
526
+ *
527
+ * @param img Image.
528
+ *
529
+ * @param pt1 First point of the line segment.
530
+ *
531
+ * @param pt2 Second point of the line segment.
532
+ *
533
+ * @param color Line color.
534
+ *
535
+ * @param thickness Line thickness.
536
+ *
537
+ * @param lineType Type of the line. See LineTypes.
538
+ *
539
+ * @param shift Number of fractional bits in the point coordinates.
540
+ */
541
+ export declare function line(
542
+ img: InputOutputArray,
543
+ pt1: Point,
544
+ pt2: Point,
545
+ color: any,
546
+ thickness?: int,
547
+ lineType?: int,
548
+ shift?: int,
549
+ ): void;
550
+
551
+ /**
552
+ * This is an overloaded member function, provided for convenience. It differs from the above function
553
+ * only in what argument(s) it accepts.
554
+ */
555
+ export declare function polylines(
556
+ img: InputOutputArray,
557
+ pts: any,
558
+ npts: any,
559
+ ncontours: int,
560
+ isClosed: bool,
561
+ color: any,
562
+ thickness?: int,
563
+ lineType?: int,
564
+ shift?: int,
565
+ ): void;
566
+
567
+ /**
568
+ * The function [cv::polylines] draws one or more polygonal curves.
569
+ *
570
+ * @param img Image.
571
+ *
572
+ * @param pts Array of polygonal curves.
573
+ *
574
+ * @param isClosed Flag indicating whether the drawn polylines are closed or not. If they are closed,
575
+ * the function draws a line from the last vertex of each curve to its first vertex.
576
+ *
577
+ * @param color Polyline color.
578
+ *
579
+ * @param thickness Thickness of the polyline edges.
580
+ *
581
+ * @param lineType Type of the line segments. See LineTypes
582
+ *
583
+ * @param shift Number of fractional bits in the vertex coordinates.
584
+ */
585
+ export declare function polylines(
586
+ img: InputOutputArray,
587
+ pts: InputArrayOfArrays,
588
+ isClosed: bool,
589
+ color: any,
590
+ thickness?: int,
591
+ lineType?: int,
592
+ shift?: int,
593
+ ): void;
594
+
595
+ /**
596
+ * The function [cv::putText] renders the specified text string in the image. Symbols that cannot be
597
+ * rendered using the specified font are replaced by question marks. See [getTextSize] for a text
598
+ * rendering code example.
599
+ *
600
+ * @param img Image.
601
+ *
602
+ * @param text Text string to be drawn.
603
+ *
604
+ * @param org Bottom-left corner of the text string in the image.
605
+ *
606
+ * @param fontFace Font type, see HersheyFonts.
607
+ *
608
+ * @param fontScale Font scale factor that is multiplied by the font-specific base size.
609
+ *
610
+ * @param color Text color.
611
+ *
612
+ * @param thickness Thickness of the lines used to draw a text.
613
+ *
614
+ * @param lineType Line type. See LineTypes
615
+ *
616
+ * @param bottomLeftOrigin When true, the image data origin is at the bottom-left corner. Otherwise, it
617
+ * is at the top-left corner.
618
+ */
619
+ export declare function putText(
620
+ img: InputOutputArray,
621
+ text: any,
622
+ org: Point,
623
+ fontFace: int,
624
+ fontScale: double,
625
+ color: Scalar,
626
+ thickness?: int,
627
+ lineType?: int,
628
+ bottomLeftOrigin?: bool,
629
+ ): void;
630
+
631
+ /**
632
+ * The function [cv::rectangle] draws a rectangle outline or a filled rectangle whose two opposite
633
+ * corners are pt1 and pt2.
634
+ *
635
+ * @param img Image.
636
+ *
637
+ * @param pt1 Vertex of the rectangle.
638
+ *
639
+ * @param pt2 Vertex of the rectangle opposite to pt1 .
640
+ *
641
+ * @param color Rectangle color or brightness (grayscale image).
642
+ *
643
+ * @param thickness Thickness of lines that make up the rectangle. Negative values, like FILLED, mean
644
+ * that the function has to draw a filled rectangle.
645
+ *
646
+ * @param lineType Type of the line. See LineTypes
647
+ *
648
+ * @param shift Number of fractional bits in the point coordinates.
649
+ */
650
+ export declare function rectangle(
651
+ img: InputOutputArray,
652
+ pt1: Point,
653
+ pt2: Point,
654
+ color: any,
655
+ thickness?: int,
656
+ lineType?: int,
657
+ shift?: int,
658
+ ): void;
659
+
660
+ /**
661
+ * This is an overloaded member function, provided for convenience. It differs from the above function
662
+ * only in what argument(s) it accepts.
663
+ *
664
+ * use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and
665
+ * r.br()-Point(1,1)` are opposite corners
666
+ */
667
+ export declare function rectangle(
668
+ img: InputOutputArray,
669
+ rec: Rect,
670
+ color: any,
671
+ thickness?: int,
672
+ lineType?: int,
673
+ shift?: int,
674
+ ): void;
675
+
676
+ export declare const FONT_HERSHEY_SIMPLEX: HersheyFonts; // initializer: = 0
677
+
678
+ export declare const FONT_HERSHEY_PLAIN: HersheyFonts; // initializer: = 1
679
+
680
+ export declare const FONT_HERSHEY_DUPLEX: HersheyFonts; // initializer: = 2
681
+
682
+ export declare const FONT_HERSHEY_COMPLEX: HersheyFonts; // initializer: = 3
683
+
684
+ export declare const FONT_HERSHEY_TRIPLEX: HersheyFonts; // initializer: = 4
685
+
686
+ export declare const FONT_HERSHEY_COMPLEX_SMALL: HersheyFonts; // initializer: = 5
687
+
688
+ export declare const FONT_HERSHEY_SCRIPT_SIMPLEX: HersheyFonts; // initializer: = 6
689
+
690
+ export declare const FONT_HERSHEY_SCRIPT_COMPLEX: HersheyFonts; // initializer: = 7
691
+
692
+ export declare const FONT_ITALIC: HersheyFonts; // initializer: = 16
693
+
694
+ export declare const FILLED: LineTypes; // initializer: = -1
695
+
696
+ export declare const LINE_4: LineTypes; // initializer: = 4
697
+
698
+ export declare const LINE_8: LineTypes; // initializer: = 8
699
+
700
+ export declare const LINE_AA: LineTypes; // initializer: = 16
701
+
702
+ export declare const MARKER_CROSS: MarkerTypes; // initializer: = 0
703
+
704
+ export declare const MARKER_TILTED_CROSS: MarkerTypes; // initializer: = 1
705
+
706
+ export declare const MARKER_STAR: MarkerTypes; // initializer: = 2
707
+
708
+ export declare const MARKER_DIAMOND: MarkerTypes; // initializer: = 3
709
+
710
+ export declare const MARKER_SQUARE: MarkerTypes; // initializer: = 4
711
+
712
+ export declare const MARKER_TRIANGLE_UP: MarkerTypes; // initializer: = 5
713
+
714
+ export declare const MARKER_TRIANGLE_DOWN: MarkerTypes; // initializer: = 6
715
+
716
+ /**
717
+ * Only a subset of Hershey fonts are supported
718
+ *
719
+ */
720
+ export type HersheyFonts = any;
721
+
722
+ /**
723
+ * Only a subset of Hershey fonts are supported
724
+ *
725
+ */
726
+ export type LineTypes = any;
727
+
728
+ /**
729
+ * Only a subset of Hershey fonts are supported
730
+ *
731
+ */
732
+ export type MarkerTypes = any;