@techstark/opencv-js 4.8.0-release.6 → 4.8.0-release.8

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 (198) hide show
  1. package/README.md +127 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/index.js +18 -0
  4. package/dist/src/index.js.map +1 -0
  5. package/dist/src/types/_cv.d.ts +7 -0
  6. package/dist/src/types/_cv.js +3 -0
  7. package/dist/src/types/_cv.js.map +1 -0
  8. package/dist/src/types/emscripten.d.ts +166 -0
  9. package/dist/src/types/emscripten.js +4 -0
  10. package/dist/src/types/emscripten.js.map +1 -0
  11. package/dist/src/types/opencv/Affine3.d.ts +183 -0
  12. package/dist/src/types/opencv/Affine3.js +3 -0
  13. package/dist/src/types/opencv/Affine3.js.map +1 -0
  14. package/dist/src/types/opencv/Algorithm.d.ts +105 -0
  15. package/dist/src/types/opencv/Algorithm.js +4 -0
  16. package/dist/src/types/opencv/Algorithm.js.map +1 -0
  17. package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
  18. package/dist/src/types/opencv/AutoBuffer.js +3 -0
  19. package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
  20. package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
  21. package/dist/src/types/opencv/BFMatcher.js +3 -0
  22. package/dist/src/types/opencv/BFMatcher.js.map +1 -0
  23. package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
  24. package/dist/src/types/opencv/BOWTrainer.js +3 -0
  25. package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
  26. package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
  27. package/dist/src/types/opencv/CascadeClassifier.js +4 -0
  28. package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
  29. package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
  30. package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
  31. package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
  32. package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
  33. package/dist/src/types/opencv/DynamicBitset.js +3 -0
  34. package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
  35. package/dist/src/types/opencv/Exception.d.ts +38 -0
  36. package/dist/src/types/opencv/Exception.js +3 -0
  37. package/dist/src/types/opencv/Exception.js.map +1 -0
  38. package/dist/src/types/opencv/Feature2D.d.ts +14 -0
  39. package/dist/src/types/opencv/Feature2D.js +4 -0
  40. package/dist/src/types/opencv/Feature2D.js.map +1 -0
  41. package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
  42. package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
  43. package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
  44. package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
  45. package/dist/src/types/opencv/HOGDescriptor.js +3 -0
  46. package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
  47. package/dist/src/types/opencv/Logger.d.ts +27 -0
  48. package/dist/src/types/opencv/Logger.js +3 -0
  49. package/dist/src/types/opencv/Logger.js.map +1 -0
  50. package/dist/src/types/opencv/LshTable.d.ts +67 -0
  51. package/dist/src/types/opencv/LshTable.js +3 -0
  52. package/dist/src/types/opencv/LshTable.js.map +1 -0
  53. package/dist/src/types/opencv/Mat.d.ts +1589 -0
  54. package/dist/src/types/opencv/Mat.js +3 -0
  55. package/dist/src/types/opencv/Mat.js.map +1 -0
  56. package/dist/src/types/opencv/MatExpr.d.ts +78 -0
  57. package/dist/src/types/opencv/MatExpr.js +4 -0
  58. package/dist/src/types/opencv/MatExpr.js.map +1 -0
  59. package/dist/src/types/opencv/MatOp.d.ts +29 -0
  60. package/dist/src/types/opencv/MatOp.js +3 -0
  61. package/dist/src/types/opencv/MatOp.js.map +1 -0
  62. package/dist/src/types/opencv/Matx.d.ts +84 -0
  63. package/dist/src/types/opencv/Matx.js +3 -0
  64. package/dist/src/types/opencv/Matx.js.map +1 -0
  65. package/dist/src/types/opencv/Node.d.ts +25 -0
  66. package/dist/src/types/opencv/Node.js +3 -0
  67. package/dist/src/types/opencv/Node.js.map +1 -0
  68. package/dist/src/types/opencv/ORB.d.ts +11 -0
  69. package/dist/src/types/opencv/ORB.js +4 -0
  70. package/dist/src/types/opencv/ORB.js.map +1 -0
  71. package/dist/src/types/opencv/PCA.d.ts +170 -0
  72. package/dist/src/types/opencv/PCA.js +3 -0
  73. package/dist/src/types/opencv/PCA.js.map +1 -0
  74. package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
  75. package/dist/src/types/opencv/RotatedRect.js +3 -0
  76. package/dist/src/types/opencv/RotatedRect.js.map +1 -0
  77. package/dist/src/types/opencv/_hacks.d.ts +267 -0
  78. package/dist/src/types/opencv/_hacks.js +15 -0
  79. package/dist/src/types/opencv/_hacks.js.map +1 -0
  80. package/dist/src/types/opencv/_types.d.ts +44 -0
  81. package/dist/src/types/opencv/_types.js +61 -0
  82. package/dist/src/types/opencv/_types.js.map +1 -0
  83. package/dist/src/types/opencv/calib3d.d.ts +2180 -0
  84. package/dist/src/types/opencv/calib3d.js +3 -0
  85. package/dist/src/types/opencv/calib3d.js.map +1 -0
  86. package/dist/src/types/opencv/core_array.d.ts +2513 -0
  87. package/dist/src/types/opencv/core_array.js +3 -0
  88. package/dist/src/types/opencv/core_array.js.map +1 -0
  89. package/dist/src/types/opencv/core_cluster.d.ts +54 -0
  90. package/dist/src/types/opencv/core_cluster.js +3 -0
  91. package/dist/src/types/opencv/core_cluster.js.map +1 -0
  92. package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
  93. package/dist/src/types/opencv/core_hal_interface.js +3 -0
  94. package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
  95. package/dist/src/types/opencv/core_utils.d.ts +510 -0
  96. package/dist/src/types/opencv/core_utils.js +3 -0
  97. package/dist/src/types/opencv/core_utils.js.map +1 -0
  98. package/dist/src/types/opencv/dnn.d.ts +336 -0
  99. package/dist/src/types/opencv/dnn.js +3 -0
  100. package/dist/src/types/opencv/dnn.js.map +1 -0
  101. package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
  102. package/dist/src/types/opencv/features2d_draw.js +3 -0
  103. package/dist/src/types/opencv/features2d_draw.js.map +1 -0
  104. package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
  105. package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
  106. package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
  107. package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
  108. package/dist/src/types/opencv/imgproc_draw.js +3 -0
  109. package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
  110. package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
  111. package/dist/src/types/opencv/imgproc_feature.js +3 -0
  112. package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
  113. package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
  114. package/dist/src/types/opencv/imgproc_filter.js +3 -0
  115. package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
  116. package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
  117. package/dist/src/types/opencv/imgproc_hist.js +3 -0
  118. package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
  119. package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
  120. package/dist/src/types/opencv/imgproc_misc.js +3 -0
  121. package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
  122. package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
  123. package/dist/src/types/opencv/imgproc_object.js +3 -0
  124. package/dist/src/types/opencv/imgproc_object.js.map +1 -0
  125. package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
  126. package/dist/src/types/opencv/imgproc_shape.js +3 -0
  127. package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
  128. package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
  129. package/dist/src/types/opencv/imgproc_transform.js +3 -0
  130. package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
  131. package/dist/src/types/opencv/index.d.ts +4 -0
  132. package/dist/src/types/opencv/index.js +19 -0
  133. package/dist/src/types/opencv/index.js.map +1 -0
  134. package/dist/src/types/opencv/objdetect.d.ts +43 -0
  135. package/dist/src/types/opencv/objdetect.js +3 -0
  136. package/dist/src/types/opencv/objdetect.js.map +1 -0
  137. package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
  138. package/dist/src/types/opencv/photo_inpaint.js +3 -0
  139. package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
  140. package/dist/src/types/opencv/softdouble.d.ts +38 -0
  141. package/dist/src/types/opencv/softdouble.js +3 -0
  142. package/dist/src/types/opencv/softdouble.js.map +1 -0
  143. package/dist/src/types/opencv/softfloat.d.ts +38 -0
  144. package/dist/src/types/opencv/softfloat.js +3 -0
  145. package/dist/src/types/opencv/softfloat.js.map +1 -0
  146. package/dist/src/types/opencv/video_track.d.ts +276 -0
  147. package/dist/src/types/opencv/video_track.js +3 -0
  148. package/dist/src/types/opencv/video_track.js.map +1 -0
  149. package/package.json +5 -3
  150. package/src/index.ts +1 -0
  151. package/src/types/_cv.ts +6 -0
  152. package/src/types/emscripten.ts +286 -0
  153. package/src/types/opencv/Affine3.ts +206 -0
  154. package/src/types/opencv/Algorithm.ts +126 -0
  155. package/src/types/opencv/AutoBuffer.ts +50 -0
  156. package/src/types/opencv/BFMatcher.ts +37 -0
  157. package/src/types/opencv/BOWTrainer.ts +43 -0
  158. package/src/types/opencv/CascadeClassifier.ts +153 -0
  159. package/src/types/opencv/DescriptorMatcher.ts +244 -0
  160. package/src/types/opencv/DynamicBitset.ts +68 -0
  161. package/src/types/opencv/Exception.ts +54 -0
  162. package/src/types/opencv/Feature2D.ts +20 -0
  163. package/src/types/opencv/FlannBasedMatcher.ts +50 -0
  164. package/src/types/opencv/HOGDescriptor.ts +401 -0
  165. package/src/types/opencv/Logger.ts +34 -0
  166. package/src/types/opencv/LshTable.ts +81 -0
  167. package/src/types/opencv/Mat.ts +1764 -0
  168. package/src/types/opencv/MatExpr.ts +107 -0
  169. package/src/types/opencv/MatOp.ts +70 -0
  170. package/src/types/opencv/Matx.ts +228 -0
  171. package/src/types/opencv/Node.ts +33 -0
  172. package/src/types/opencv/ORB.ts +22 -0
  173. package/src/types/opencv/PCA.ts +204 -0
  174. package/src/types/opencv/RotatedRect.ts +72 -0
  175. package/src/types/opencv/_hacks.ts +322 -0
  176. package/src/types/opencv/_types.ts +44 -0
  177. package/src/types/opencv/calib3d.ts +2937 -0
  178. package/src/types/opencv/core_array.ts +3102 -0
  179. package/src/types/opencv/core_cluster.ts +81 -0
  180. package/src/types/opencv/core_hal_interface.ts +159 -0
  181. package/src/types/opencv/core_utils.ts +748 -0
  182. package/src/types/opencv/dnn.ts +505 -0
  183. package/src/types/opencv/features2d_draw.ts +114 -0
  184. package/src/types/opencv/imgproc_color_conversions.ts +527 -0
  185. package/src/types/opencv/imgproc_draw.ts +733 -0
  186. package/src/types/opencv/imgproc_feature.ts +681 -0
  187. package/src/types/opencv/imgproc_filter.ts +918 -0
  188. package/src/types/opencv/imgproc_hist.ts +399 -0
  189. package/src/types/opencv/imgproc_misc.ts +616 -0
  190. package/src/types/opencv/imgproc_object.ts +58 -0
  191. package/src/types/opencv/imgproc_shape.ts +734 -0
  192. package/src/types/opencv/imgproc_transform.ts +574 -0
  193. package/src/types/opencv/index.ts +4 -0
  194. package/src/types/opencv/objdetect.ts +103 -0
  195. package/src/types/opencv/photo_inpaint.ts +37 -0
  196. package/src/types/opencv/softdouble.ts +64 -0
  197. package/src/types/opencv/softfloat.ts +64 -0
  198. package/src/types/opencv/video_track.ts +372 -0
@@ -0,0 +1,37 @@
1
+ import { double, InputArray, int, OutputArray } from "./_types";
2
+ /*
3
+ * # Inpainting
4
+ * the inpainting algorithm
5
+ */
6
+ /**
7
+ * The function reconstructs the selected image area from the pixel near the area boundary. The
8
+ * function may be used to remove dust and scratches from a scanned photo, or to remove undesirable
9
+ * objects from still images or video. See for more details.
10
+ *
11
+ * An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
12
+ * (Python) An example using the inpainting technique can be found at
13
+ * opencv_source_code/samples/python/inpaint.py
14
+ *
15
+ * @param src Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.
16
+ *
17
+ * @param inpaintMask Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that
18
+ * needs to be inpainted.
19
+ *
20
+ * @param dst Output image with the same size and type as src .
21
+ *
22
+ * @param inpaintRadius Radius of a circular neighborhood of each point inpainted that is considered by
23
+ * the algorithm.
24
+ *
25
+ * @param flags Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA
26
+ */
27
+ export declare function inpaint(
28
+ src: InputArray,
29
+ inpaintMask: InputArray,
30
+ dst: OutputArray,
31
+ inpaintRadius: double,
32
+ flags: int,
33
+ ): void;
34
+
35
+ export declare const INPAINT_NS: any; // initializer: = 0
36
+
37
+ export declare const INPAINT_TELEA: any; // initializer: = 1
@@ -0,0 +1,64 @@
1
+ import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
+
3
+ export declare class softdouble {
4
+ public v: uint64_t;
5
+
6
+ public constructor();
7
+
8
+ public constructor(c: softdouble);
9
+
10
+ public constructor(arg159: uint32_t);
11
+
12
+ public constructor(arg160: uint64_t);
13
+
14
+ public constructor(arg161: int32_t);
15
+
16
+ public constructor(arg162: int64_t);
17
+
18
+ public constructor(a: any);
19
+
20
+ public getExp(): int;
21
+
22
+ /**
23
+ * Returns a number 1 <= x < 2 with the same significand
24
+ */
25
+ public getFrac(): softdouble;
26
+
27
+ public getSign(): bool;
28
+
29
+ public isInf(): bool;
30
+
31
+ public isNaN(): bool;
32
+
33
+ public isSubnormal(): bool;
34
+
35
+ public setExp(e: int): softdouble;
36
+
37
+ /**
38
+ * Constructs a copy of a number with significand taken from parameter
39
+ */
40
+ public setFrac(s: softdouble): softdouble;
41
+
42
+ public setSign(sign: bool): softdouble;
43
+
44
+ public static eps(): softdouble;
45
+
46
+ /**
47
+ * Builds new value from raw binary representation
48
+ */
49
+ public static fromRaw(a: uint64_t): softdouble;
50
+
51
+ public static inf(): softdouble;
52
+
53
+ public static max(): softdouble;
54
+
55
+ public static min(): softdouble;
56
+
57
+ public static nan(): softdouble;
58
+
59
+ public static one(): softdouble;
60
+
61
+ public static pi(): softdouble;
62
+
63
+ public static zero(): softdouble;
64
+ }
@@ -0,0 +1,64 @@
1
+ import { bool, int, int32_t, int64_t, uint32_t, uint64_t } from "./_types";
2
+
3
+ export declare class softfloat {
4
+ public v: uint32_t;
5
+
6
+ public constructor();
7
+
8
+ public constructor(c: softfloat);
9
+
10
+ public constructor(arg174: uint32_t);
11
+
12
+ public constructor(arg175: uint64_t);
13
+
14
+ public constructor(arg176: int32_t);
15
+
16
+ public constructor(arg177: int64_t);
17
+
18
+ public constructor(a: any);
19
+
20
+ public getExp(): int;
21
+
22
+ /**
23
+ * Returns a number 1 <= x < 2 with the same significand
24
+ */
25
+ public getFrac(): softfloat;
26
+
27
+ public getSign(): bool;
28
+
29
+ public isInf(): bool;
30
+
31
+ public isNaN(): bool;
32
+
33
+ public isSubnormal(): bool;
34
+
35
+ public setExp(e: int): softfloat;
36
+
37
+ /**
38
+ * Constructs a copy of a number with significand taken from parameter
39
+ */
40
+ public setFrac(s: softfloat): softfloat;
41
+
42
+ public setSign(sign: bool): softfloat;
43
+
44
+ public static eps(): softfloat;
45
+
46
+ /**
47
+ * Builds new value from raw binary representation
48
+ */
49
+ public static fromRaw(a: uint32_t): softfloat;
50
+
51
+ public static inf(): softfloat;
52
+
53
+ public static max(): softfloat;
54
+
55
+ public static min(): softfloat;
56
+
57
+ public static nan(): softfloat;
58
+
59
+ public static one(): softfloat;
60
+
61
+ public static pi(): softfloat;
62
+
63
+ public static zero(): softfloat;
64
+ }
@@ -0,0 +1,372 @@
1
+ import {
2
+ bool,
3
+ double,
4
+ InputArray,
5
+ InputOutputArray,
6
+ int,
7
+ Mat,
8
+ OutputArray,
9
+ OutputArrayOfArrays,
10
+ RotatedRect,
11
+ Size,
12
+ TermCriteria,
13
+ } from "./_types";
14
+ /*
15
+ * # Object Tracking
16
+ *
17
+ */
18
+ /**
19
+ * number of levels in constructed pyramid. Can be less than maxLevel.
20
+ *
21
+ * @param img 8-bit input image.
22
+ *
23
+ * @param pyramid output pyramid.
24
+ *
25
+ * @param winSize window size of optical flow algorithm. Must be not less than winSize argument of
26
+ * calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.
27
+ *
28
+ * @param maxLevel 0-based maximal pyramid level number.
29
+ *
30
+ * @param withDerivatives set to precompute gradients for the every pyramid level. If pyramid is
31
+ * constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.
32
+ *
33
+ * @param pyrBorder the border mode for pyramid layers.
34
+ *
35
+ * @param derivBorder the border mode for gradients.
36
+ *
37
+ * @param tryReuseInputImage put ROI of input image into the pyramid if possible. You can pass false to
38
+ * force data copying.
39
+ */
40
+ export declare function buildOpticalFlowPyramid(
41
+ img: InputArray,
42
+ pyramid: OutputArrayOfArrays,
43
+ winSize: Size,
44
+ maxLevel: int,
45
+ withDerivatives?: bool,
46
+ pyrBorder?: int,
47
+ derivBorder?: int,
48
+ tryReuseInputImage?: bool,
49
+ ): int;
50
+
51
+ /**
52
+ * The function finds an optical flow for each prev pixel using the Farneback2003 algorithm so that
53
+ *
54
+ * `\\[\\texttt{prev} (y,x) \\sim \\texttt{next} ( y + \\texttt{flow} (y,x)[1], x + \\texttt{flow}
55
+ * (y,x)[0])\\]`
56
+ *
57
+ * An example using the optical flow algorithm described by Gunnar Farneback can be found at
58
+ * opencv_source_code/samples/cpp/fback.cpp
59
+ * (Python) An example using the optical flow algorithm described by Gunnar Farneback can be found at
60
+ * opencv_source_code/samples/python/opt_flow.py
61
+ *
62
+ * @param prev first 8-bit single-channel input image.
63
+ *
64
+ * @param next second input image of the same size and the same type as prev.
65
+ *
66
+ * @param flow computed flow image that has the same size as prev and type CV_32FC2.
67
+ *
68
+ * @param pyr_scale parameter, specifying the image scale (<1) to build pyramids for each image;
69
+ * pyr_scale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous
70
+ * one.
71
+ *
72
+ * @param levels number of pyramid layers including the initial image; levels=1 means that no extra
73
+ * layers are created and only the original images are used.
74
+ *
75
+ * @param winsize averaging window size; larger values increase the algorithm robustness to image noise
76
+ * and give more chances for fast motion detection, but yield more blurred motion field.
77
+ *
78
+ * @param iterations number of iterations the algorithm does at each pyramid level.
79
+ *
80
+ * @param poly_n size of the pixel neighborhood used to find polynomial expansion in each pixel; larger
81
+ * values mean that the image will be approximated with smoother surfaces, yielding more robust
82
+ * algorithm and more blurred motion field, typically poly_n =5 or 7.
83
+ *
84
+ * @param poly_sigma standard deviation of the Gaussian that is used to smooth derivatives used as a
85
+ * basis for the polynomial expansion; for poly_n=5, you can set poly_sigma=1.1, for poly_n=7, a good
86
+ * value would be poly_sigma=1.5.
87
+ *
88
+ * @param flags operation flags that can be a combination of the following:
89
+ * OPTFLOW_USE_INITIAL_FLOW uses the input flow as an initial flow
90
+ * approximation.OPTFLOW_FARNEBACK_GAUSSIAN uses the Gaussian $\texttt{winsize}\times\texttt{winsize}$
91
+ * filter instead of a box filter of the same size for optical flow estimation; usually, this option
92
+ * gives z more accurate flow than with a box filter, at the cost of lower speed; normally, winsize for
93
+ * a Gaussian window should be set to a larger value to achieve the same level of robustness.
94
+ */
95
+ export declare function calcOpticalFlowFarneback(
96
+ prev: InputArray,
97
+ next: InputArray,
98
+ flow: InputOutputArray,
99
+ pyr_scale: double,
100
+ levels: int,
101
+ winsize: int,
102
+ iterations: int,
103
+ poly_n: int,
104
+ poly_sigma: double,
105
+ flags: int,
106
+ ): void;
107
+
108
+ /**
109
+ * The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
110
+ * Bouguet00 . The function is parallelized with the TBB library.
111
+ *
112
+ * An example using the Lucas-Kanade optical flow algorithm can be found at
113
+ * opencv_source_code/samples/cpp/lkdemo.cpp
114
+ * (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
115
+ * opencv_source_code/samples/python/lk_track.py
116
+ * (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
117
+ * opencv_source_code/samples/python/lk_homography.py
118
+ *
119
+ * @param prevImg first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.
120
+ *
121
+ * @param nextImg second input image or pyramid of the same size and the same type as prevImg.
122
+ *
123
+ * @param prevPts vector of 2D points for which the flow needs to be found; point coordinates must be
124
+ * single-precision floating-point numbers.
125
+ *
126
+ * @param nextPts output vector of 2D points (with single-precision floating-point coordinates)
127
+ * containing the calculated new positions of input features in the second image; when
128
+ * OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.
129
+ *
130
+ * @param status output status vector (of unsigned chars); each element of the vector is set to 1 if
131
+ * the flow for the corresponding features has been found, otherwise, it is set to 0.
132
+ *
133
+ * @param err output vector of errors; each element of the vector is set to an error for the
134
+ * corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
135
+ * found then the error is not defined (use the status parameter to find such cases).
136
+ *
137
+ * @param winSize size of the search window at each pyramid level.
138
+ *
139
+ * @param maxLevel 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
140
+ * level), if set to 1, two levels are used, and so on; if pyramids are passed to input then algorithm
141
+ * will use as many levels as pyramids have but no more than maxLevel.
142
+ *
143
+ * @param criteria parameter, specifying the termination criteria of the iterative search algorithm
144
+ * (after the specified maximum number of iterations criteria.maxCount or when the search window moves
145
+ * by less than criteria.epsilon.
146
+ *
147
+ * @param flags operation flags:
148
+ * OPTFLOW_USE_INITIAL_FLOW uses initial estimations, stored in nextPts; if the flag is not set, then
149
+ * prevPts is copied to nextPts and is considered the initial estimate.OPTFLOW_LK_GET_MIN_EIGENVALS use
150
+ * minimum eigen values as an error measure (see minEigThreshold description); if the flag is not set,
151
+ * then L1 distance between patches around the original and a moved point, divided by number of pixels
152
+ * in a window, is used as a error measure.
153
+ *
154
+ * @param minEigThreshold the algorithm calculates the minimum eigen value of a 2x2 normal matrix of
155
+ * optical flow equations (this matrix is called a spatial gradient matrix in Bouguet00), divided by
156
+ * number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
157
+ * feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
158
+ * performance boost.
159
+ */
160
+ export declare function calcOpticalFlowPyrLK(
161
+ prevImg: InputArray,
162
+ nextImg: InputArray,
163
+ prevPts: InputArray,
164
+ nextPts: InputOutputArray,
165
+ status: OutputArray,
166
+ err: OutputArray,
167
+ winSize?: Size,
168
+ maxLevel?: int,
169
+ criteria?: TermCriteria,
170
+ flags?: int,
171
+ minEigThreshold?: double,
172
+ ): void;
173
+
174
+ /**
175
+ * See the OpenCV sample camshiftdemo.c that tracks colored objects.
176
+ *
177
+ * (Python) A sample explaining the camshift tracking algorithm can be found at
178
+ * opencv_source_code/samples/python/camshift.py
179
+ *
180
+ * @param probImage Back projection of the object histogram. See calcBackProject.
181
+ *
182
+ * @param window Initial search window.
183
+ *
184
+ * @param criteria Stop criteria for the underlying meanShift. returns (in old interfaces) Number of
185
+ * iterations CAMSHIFT took to converge The function implements the CAMSHIFT object tracking algorithm
186
+ * Bradski98 . First, it finds an object center using meanShift and then adjusts the window size and
187
+ * finds the optimal rotation. The function returns the rotated rectangle structure that includes the
188
+ * object position, size, and orientation. The next position of the search window can be obtained with
189
+ * RotatedRect::boundingRect()
190
+ */
191
+ export declare function CamShift(
192
+ probImage: InputArray,
193
+ window: any,
194
+ criteria: TermCriteria,
195
+ ): RotatedRect;
196
+
197
+ /**
198
+ * [findTransformECC]
199
+ *
200
+ * @param templateImage single-channel template image; CV_8U or CV_32F array.
201
+ *
202
+ * @param inputImage single-channel input image to be warped to provide an image similar to
203
+ * templateImage, same type as templateImage.
204
+ *
205
+ * @param inputMask An optional mask to indicate valid values of inputImage.
206
+ */
207
+ export declare function computeECC(
208
+ templateImage: InputArray,
209
+ inputImage: InputArray,
210
+ inputMask?: InputArray,
211
+ ): double;
212
+
213
+ /**
214
+ * The function finds an optimal affine transform *[A|b]* (a 2 x 3 floating-point matrix) that
215
+ * approximates best the affine transformation between: In case of point sets, the problem is
216
+ * formulated as follows: you need to find a 2x2 matrix *A* and 2x1 vector *b* so that:
217
+ *
218
+ * `\\[[A^*|b^*] = arg \\min _{[A|b]} \\sum _i \\| \\texttt{dst}[i] - A { \\texttt{src}[i]}^T - b \\|
219
+ * ^2\\]` where src[i] and dst[i] are the i-th points in src and dst, respectively `$[A|b]$` can be
220
+ * either arbitrary (when fullAffine=true ) or have a form of `\\[\\begin{bmatrix} a_{11} & a_{12} &
221
+ * b_1 \\\\ -a_{12} & a_{11} & b_2 \\end{bmatrix}\\]` when fullAffine=false.
222
+ *
223
+ * [estimateAffine2D], [estimateAffinePartial2D], [getAffineTransform], [getPerspectiveTransform],
224
+ * [findHomography]
225
+ *
226
+ * @param src First input 2D point set stored in std::vector or Mat, or an image stored in Mat.
227
+ *
228
+ * @param dst Second input 2D point set of the same size and the same type as A, or another image.
229
+ *
230
+ * @param fullAffine If true, the function finds an optimal affine transformation with no additional
231
+ * restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is
232
+ * limited to combinations of translation, rotation, and uniform scaling (4 degrees of freedom).
233
+ */
234
+ export declare function estimateRigidTransform(
235
+ src: InputArray,
236
+ dst: InputArray,
237
+ fullAffine: bool,
238
+ ): Mat;
239
+
240
+ /**
241
+ * The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion (EP08),
242
+ * that is
243
+ *
244
+ * `\\[\\texttt{warpMatrix} = \\texttt{warpMatrix} = \\arg\\max_{W}
245
+ * \\texttt{ECC}(\\texttt{templateImage}(x,y),\\texttt{inputImage}(x',y'))\\]`
246
+ *
247
+ * where
248
+ *
249
+ * `\\[\\begin{bmatrix} x' \\\\ y' \\end{bmatrix} = W \\cdot \\begin{bmatrix} x \\\\ y \\\\ 1
250
+ * \\end{bmatrix}\\]`
251
+ *
252
+ * (the equation holds with homogeneous coordinates for homography). It returns the final enhanced
253
+ * correlation coefficient, that is the correlation coefficient between the template image and the
254
+ * final warped input image. When a `$3\\times 3$` matrix is given with motionType =0, 1 or 2, the
255
+ * third row is ignored.
256
+ *
257
+ * Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an
258
+ * area-based alignment that builds on intensity similarities. In essence, the function updates the
259
+ * initial transformation that roughly aligns the images. If this information is missing, the identity
260
+ * warp (unity matrix) is used as an initialization. Note that if images undergo strong
261
+ * displacements/rotations, an initial transformation that roughly aligns the images is necessary
262
+ * (e.g., a simple euclidean/similarity transform that allows for the images showing the same image
263
+ * content approximately). Use inverse warping in the second image to take an image close to the first
264
+ * one, i.e. use the flag WARP_INVERSE_MAP with warpAffine or warpPerspective. See also the OpenCV
265
+ * sample image_alignment.cpp that demonstrates the use of the function. Note that the function throws
266
+ * an exception if algorithm does not converges.
267
+ *
268
+ * [computeECC], [estimateAffine2D], [estimateAffinePartial2D], [findHomography]
269
+ *
270
+ * @param templateImage single-channel template image; CV_8U or CV_32F array.
271
+ *
272
+ * @param inputImage single-channel input image which should be warped with the final warpMatrix in
273
+ * order to provide an image similar to templateImage, same type as templateImage.
274
+ *
275
+ * @param warpMatrix floating-point $2\times 3$ or $3\times 3$ mapping matrix (warp).
276
+ *
277
+ * @param motionType parameter, specifying the type of motion:
278
+ * MOTION_TRANSLATION sets a translational motion model; warpMatrix is $2\times 3$ with the first
279
+ * $2\times 2$ part being the unity matrix and the rest two parameters being estimated.MOTION_EUCLIDEAN
280
+ * sets a Euclidean (rigid) transformation as motion model; three parameters are estimated; warpMatrix
281
+ * is $2\times 3$.MOTION_AFFINE sets an affine motion model (DEFAULT); six parameters are estimated;
282
+ * warpMatrix is $2\times 3$.MOTION_HOMOGRAPHY sets a homography as a motion model; eight parameters
283
+ * are estimated;`warpMatrix` is $3\times 3$.
284
+ *
285
+ * @param criteria parameter, specifying the termination criteria of the ECC algorithm;
286
+ * criteria.epsilon defines the threshold of the increment in the correlation coefficient between two
287
+ * iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).
288
+ * Default values are shown in the declaration above.
289
+ *
290
+ * @param inputMask An optional mask to indicate valid values of inputImage.
291
+ *
292
+ * @param gaussFiltSize An optional value indicating size of gaussian blur filter; (DEFAULT: 5)
293
+ */
294
+ export declare function findTransformECC(
295
+ templateImage: InputArray,
296
+ inputImage: InputArray,
297
+ warpMatrix: InputOutputArray,
298
+ motionType: int,
299
+ criteria: TermCriteria,
300
+ inputMask: InputArray,
301
+ gaussFiltSize: int,
302
+ ): double;
303
+
304
+ /**
305
+ * This is an overloaded member function, provided for convenience. It differs from the above function
306
+ * only in what argument(s) it accepts.
307
+ */
308
+ export declare function findTransformECC(
309
+ templateImage: InputArray,
310
+ inputImage: InputArray,
311
+ warpMatrix: InputOutputArray,
312
+ motionType?: int,
313
+ criteria?: TermCriteria,
314
+ inputMask?: InputArray,
315
+ ): double;
316
+
317
+ /**
318
+ * @param probImage Back projection of the object histogram. See calcBackProject for details.
319
+ *
320
+ * @param window Initial search window.
321
+ *
322
+ * @param criteria Stop criteria for the iterative search algorithm. returns : Number of iterations
323
+ * CAMSHIFT took to converge. The function implements the iterative object search algorithm. It takes
324
+ * the input back projection of an object and the initial position. The mass center in window of the
325
+ * back projection image is computed and the search window center shifts to the mass center. The
326
+ * procedure is repeated until the specified number of iterations criteria.maxCount is done or until
327
+ * the window center shifts by less than criteria.epsilon. The algorithm is used inside CamShift and,
328
+ * unlike CamShift , the search window size or orientation do not change during the search. You can
329
+ * simply pass the output of calcBackProject to this function. But better results can be obtained if
330
+ * you pre-filter the back projection and remove the noise. For example, you can do this by retrieving
331
+ * connected components with findContours , throwing away contours with small area ( contourArea ), and
332
+ * rendering the remaining contours with drawContours.
333
+ */
334
+ export declare function meanShift(
335
+ probImage: InputArray,
336
+ window: any,
337
+ criteria: TermCriteria,
338
+ ): int;
339
+
340
+ /**
341
+ * The function readOpticalFlow loads a flow field from a file and returns it as a single matrix.
342
+ * Resulting [Mat] has a type CV_32FC2 - floating-point, 2-channel. First channel corresponds to the
343
+ * flow in the horizontal direction (u), second - vertical (v).
344
+ *
345
+ * @param path Path to the file to be loaded
346
+ */
347
+ export declare function readOpticalFlow(path: any): Mat;
348
+
349
+ /**
350
+ * The function stores a flow field in a file, returns true on success, false otherwise. The flow field
351
+ * must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds to the flow in the
352
+ * horizontal direction (u), second - vertical (v).
353
+ *
354
+ * @param path Path to the file to be written
355
+ *
356
+ * @param flow Flow field to be stored
357
+ */
358
+ export declare function writeOpticalFlow(path: any, flow: InputArray): bool;
359
+
360
+ export declare const OPTFLOW_USE_INITIAL_FLOW: any; // initializer: = 4
361
+
362
+ export declare const OPTFLOW_LK_GET_MIN_EIGENVALS: any; // initializer: = 8
363
+
364
+ export declare const OPTFLOW_FARNEBACK_GAUSSIAN: any; // initializer: = 256
365
+
366
+ export declare const MOTION_TRANSLATION: any; // initializer: = 0
367
+
368
+ export declare const MOTION_EUCLIDEAN: any; // initializer: = 1
369
+
370
+ export declare const MOTION_AFFINE: any; // initializer: = 2
371
+
372
+ export declare const MOTION_HOMOGRAPHY: any; // initializer: = 3