@techstark/opencv-js 4.8.0-release.1 → 4.8.0-release.10

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 (200) hide show
  1. package/README.md +130 -1
  2. package/dist/README.md +20 -1
  3. package/dist/src/index.d.ts +1 -0
  4. package/dist/src/index.js +18 -0
  5. package/dist/src/index.js.map +1 -0
  6. package/dist/src/types/_cv.d.ts +7 -0
  7. package/dist/src/types/_cv.js +3 -0
  8. package/dist/src/types/_cv.js.map +1 -0
  9. package/dist/src/types/emscripten.d.ts +166 -0
  10. package/dist/src/types/emscripten.js +4 -0
  11. package/dist/src/types/emscripten.js.map +1 -0
  12. package/dist/src/types/opencv/Affine3.d.ts +183 -0
  13. package/dist/src/types/opencv/Affine3.js +3 -0
  14. package/dist/src/types/opencv/Affine3.js.map +1 -0
  15. package/dist/src/types/opencv/Algorithm.d.ts +105 -0
  16. package/dist/src/types/opencv/Algorithm.js +4 -0
  17. package/dist/src/types/opencv/Algorithm.js.map +1 -0
  18. package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
  19. package/dist/src/types/opencv/AutoBuffer.js +3 -0
  20. package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
  21. package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
  22. package/dist/src/types/opencv/BFMatcher.js +3 -0
  23. package/dist/src/types/opencv/BFMatcher.js.map +1 -0
  24. package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
  25. package/dist/src/types/opencv/BOWTrainer.js +3 -0
  26. package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
  27. package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
  28. package/dist/src/types/opencv/CascadeClassifier.js +4 -0
  29. package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
  30. package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
  31. package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
  32. package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
  33. package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
  34. package/dist/src/types/opencv/DynamicBitset.js +3 -0
  35. package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
  36. package/dist/src/types/opencv/Exception.d.ts +38 -0
  37. package/dist/src/types/opencv/Exception.js +3 -0
  38. package/dist/src/types/opencv/Exception.js.map +1 -0
  39. package/dist/src/types/opencv/Feature2D.d.ts +14 -0
  40. package/dist/src/types/opencv/Feature2D.js +4 -0
  41. package/dist/src/types/opencv/Feature2D.js.map +1 -0
  42. package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
  43. package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
  44. package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
  45. package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
  46. package/dist/src/types/opencv/HOGDescriptor.js +3 -0
  47. package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
  48. package/dist/src/types/opencv/Logger.d.ts +27 -0
  49. package/dist/src/types/opencv/Logger.js +3 -0
  50. package/dist/src/types/opencv/Logger.js.map +1 -0
  51. package/dist/src/types/opencv/LshTable.d.ts +67 -0
  52. package/dist/src/types/opencv/LshTable.js +3 -0
  53. package/dist/src/types/opencv/LshTable.js.map +1 -0
  54. package/dist/src/types/opencv/Mat.d.ts +1589 -0
  55. package/dist/src/types/opencv/Mat.js +4 -0
  56. package/dist/src/types/opencv/Mat.js.map +1 -0
  57. package/dist/src/types/opencv/MatExpr.d.ts +78 -0
  58. package/dist/src/types/opencv/MatExpr.js +4 -0
  59. package/dist/src/types/opencv/MatExpr.js.map +1 -0
  60. package/dist/src/types/opencv/MatOp.d.ts +29 -0
  61. package/dist/src/types/opencv/MatOp.js +3 -0
  62. package/dist/src/types/opencv/MatOp.js.map +1 -0
  63. package/dist/src/types/opencv/Matx.d.ts +84 -0
  64. package/dist/src/types/opencv/Matx.js +3 -0
  65. package/dist/src/types/opencv/Matx.js.map +1 -0
  66. package/dist/src/types/opencv/Node.d.ts +25 -0
  67. package/dist/src/types/opencv/Node.js +3 -0
  68. package/dist/src/types/opencv/Node.js.map +1 -0
  69. package/dist/src/types/opencv/ORB.d.ts +11 -0
  70. package/dist/src/types/opencv/ORB.js +4 -0
  71. package/dist/src/types/opencv/ORB.js.map +1 -0
  72. package/dist/src/types/opencv/PCA.d.ts +170 -0
  73. package/dist/src/types/opencv/PCA.js +3 -0
  74. package/dist/src/types/opencv/PCA.js.map +1 -0
  75. package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
  76. package/dist/src/types/opencv/RotatedRect.js +3 -0
  77. package/dist/src/types/opencv/RotatedRect.js.map +1 -0
  78. package/dist/src/types/opencv/_hacks.d.ts +270 -0
  79. package/dist/src/types/opencv/_hacks.js +10 -0
  80. package/dist/src/types/opencv/_hacks.js.map +1 -0
  81. package/dist/src/types/opencv/_types.d.ts +44 -0
  82. package/dist/src/types/opencv/_types.js +61 -0
  83. package/dist/src/types/opencv/_types.js.map +1 -0
  84. package/dist/src/types/opencv/calib3d.d.ts +2180 -0
  85. package/dist/src/types/opencv/calib3d.js +3 -0
  86. package/dist/src/types/opencv/calib3d.js.map +1 -0
  87. package/dist/src/types/opencv/core_array.d.ts +2513 -0
  88. package/dist/src/types/opencv/core_array.js +3 -0
  89. package/dist/src/types/opencv/core_array.js.map +1 -0
  90. package/dist/src/types/opencv/core_cluster.d.ts +54 -0
  91. package/dist/src/types/opencv/core_cluster.js +3 -0
  92. package/dist/src/types/opencv/core_cluster.js.map +1 -0
  93. package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
  94. package/dist/src/types/opencv/core_hal_interface.js +3 -0
  95. package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
  96. package/dist/src/types/opencv/core_utils.d.ts +510 -0
  97. package/dist/src/types/opencv/core_utils.js +3 -0
  98. package/dist/src/types/opencv/core_utils.js.map +1 -0
  99. package/dist/src/types/opencv/dnn.d.ts +336 -0
  100. package/dist/src/types/opencv/dnn.js +3 -0
  101. package/dist/src/types/opencv/dnn.js.map +1 -0
  102. package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
  103. package/dist/src/types/opencv/features2d_draw.js +3 -0
  104. package/dist/src/types/opencv/features2d_draw.js.map +1 -0
  105. package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
  106. package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
  107. package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
  108. package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
  109. package/dist/src/types/opencv/imgproc_draw.js +3 -0
  110. package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
  111. package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
  112. package/dist/src/types/opencv/imgproc_feature.js +3 -0
  113. package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
  114. package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
  115. package/dist/src/types/opencv/imgproc_filter.js +3 -0
  116. package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
  117. package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
  118. package/dist/src/types/opencv/imgproc_hist.js +3 -0
  119. package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
  120. package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
  121. package/dist/src/types/opencv/imgproc_misc.js +3 -0
  122. package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
  123. package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
  124. package/dist/src/types/opencv/imgproc_object.js +3 -0
  125. package/dist/src/types/opencv/imgproc_object.js.map +1 -0
  126. package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
  127. package/dist/src/types/opencv/imgproc_shape.js +3 -0
  128. package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
  129. package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
  130. package/dist/src/types/opencv/imgproc_transform.js +3 -0
  131. package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
  132. package/dist/src/types/opencv/index.d.ts +4 -0
  133. package/dist/src/types/opencv/index.js +19 -0
  134. package/dist/src/types/opencv/index.js.map +1 -0
  135. package/dist/src/types/opencv/objdetect.d.ts +43 -0
  136. package/dist/src/types/opencv/objdetect.js +3 -0
  137. package/dist/src/types/opencv/objdetect.js.map +1 -0
  138. package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
  139. package/dist/src/types/opencv/photo_inpaint.js +3 -0
  140. package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
  141. package/dist/src/types/opencv/softdouble.d.ts +38 -0
  142. package/dist/src/types/opencv/softdouble.js +3 -0
  143. package/dist/src/types/opencv/softdouble.js.map +1 -0
  144. package/dist/src/types/opencv/softfloat.d.ts +38 -0
  145. package/dist/src/types/opencv/softfloat.js +3 -0
  146. package/dist/src/types/opencv/softfloat.js.map +1 -0
  147. package/dist/src/types/opencv/video_track.d.ts +276 -0
  148. package/dist/src/types/opencv/video_track.js +3 -0
  149. package/dist/src/types/opencv/video_track.js.map +1 -0
  150. package/package.json +15 -6
  151. package/src/index.ts +1 -0
  152. package/src/types/_cv.ts +6 -0
  153. package/src/types/emscripten.ts +286 -0
  154. package/src/types/opencv/Affine3.ts +206 -0
  155. package/src/types/opencv/Algorithm.ts +126 -0
  156. package/src/types/opencv/AutoBuffer.ts +50 -0
  157. package/src/types/opencv/BFMatcher.ts +37 -0
  158. package/src/types/opencv/BOWTrainer.ts +43 -0
  159. package/src/types/opencv/CascadeClassifier.ts +153 -0
  160. package/src/types/opencv/DescriptorMatcher.ts +244 -0
  161. package/src/types/opencv/DynamicBitset.ts +68 -0
  162. package/src/types/opencv/Exception.ts +54 -0
  163. package/src/types/opencv/Feature2D.ts +20 -0
  164. package/src/types/opencv/FlannBasedMatcher.ts +50 -0
  165. package/src/types/opencv/HOGDescriptor.ts +401 -0
  166. package/src/types/opencv/Logger.ts +34 -0
  167. package/src/types/opencv/LshTable.ts +81 -0
  168. package/src/types/opencv/Mat.ts +1765 -0
  169. package/src/types/opencv/MatExpr.ts +107 -0
  170. package/src/types/opencv/MatOp.ts +70 -0
  171. package/src/types/opencv/Matx.ts +228 -0
  172. package/src/types/opencv/Node.ts +33 -0
  173. package/src/types/opencv/ORB.ts +22 -0
  174. package/src/types/opencv/PCA.ts +204 -0
  175. package/src/types/opencv/RotatedRect.ts +72 -0
  176. package/src/types/opencv/_hacks.ts +321 -0
  177. package/src/types/opencv/_types.ts +44 -0
  178. package/src/types/opencv/calib3d.ts +2937 -0
  179. package/src/types/opencv/core_array.ts +3102 -0
  180. package/src/types/opencv/core_cluster.ts +81 -0
  181. package/src/types/opencv/core_hal_interface.ts +159 -0
  182. package/src/types/opencv/core_utils.ts +748 -0
  183. package/src/types/opencv/dnn.ts +505 -0
  184. package/src/types/opencv/features2d_draw.ts +114 -0
  185. package/src/types/opencv/imgproc_color_conversions.ts +527 -0
  186. package/src/types/opencv/imgproc_draw.ts +733 -0
  187. package/src/types/opencv/imgproc_feature.ts +681 -0
  188. package/src/types/opencv/imgproc_filter.ts +918 -0
  189. package/src/types/opencv/imgproc_hist.ts +399 -0
  190. package/src/types/opencv/imgproc_misc.ts +616 -0
  191. package/src/types/opencv/imgproc_object.ts +58 -0
  192. package/src/types/opencv/imgproc_shape.ts +734 -0
  193. package/src/types/opencv/imgproc_transform.ts +574 -0
  194. package/src/types/opencv/index.ts +4 -0
  195. package/src/types/opencv/objdetect.ts +103 -0
  196. package/src/types/opencv/photo_inpaint.ts +37 -0
  197. package/src/types/opencv/softdouble.ts +64 -0
  198. package/src/types/opencv/softfloat.ts +64 -0
  199. package/src/types/opencv/video_track.ts +372 -0
  200. package/dist/types/index.d.ts +0 -1
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=core_utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core_utils.js","sourceRoot":"","sources":["../../../../src/types/opencv/core_utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,336 @@
1
+ import { bool, double, InputArray, InputArrayOfArrays, int, Mat, Net, OutputArray, OutputArrayOfArrays, Size, size_t, uchar } from "./_types";
2
+ /**
3
+ * if `crop` is true, input image is resized so one side after resize is equal to corresponding
4
+ * dimension in `size` and another one is equal or larger. Then, crop from the center is performed. If
5
+ * `crop` is false, direct resize without cropping and preserving aspect ratio is performed.
6
+ *
7
+ * 4-dimensional [Mat] with NCHW dimensions order.
8
+ *
9
+ * @param image input image (with 1-, 3- or 4-channels).
10
+ *
11
+ * @param scalefactor multiplier for image values.
12
+ *
13
+ * @param size spatial size for output image
14
+ *
15
+ * @param mean scalar with mean values which are subtracted from channels. Values are intended to be in
16
+ * (mean-R, mean-G, mean-B) order if image has BGR ordering and swapRB is true.
17
+ *
18
+ * @param swapRB flag which indicates that swap first and last channels in 3-channel image is
19
+ * necessary.
20
+ *
21
+ * @param crop flag which indicates whether image will be cropped after resize or not
22
+ *
23
+ * @param ddepth Depth of output blob. Choose CV_32F or CV_8U.
24
+ */
25
+ export declare function blobFromImage(image: InputArray, scalefactor?: double, size?: any, mean?: any, swapRB?: bool, crop?: bool, ddepth?: int): Mat;
26
+ /**
27
+ * This is an overloaded member function, provided for convenience. It differs from the above function
28
+ * only in what argument(s) it accepts.
29
+ */
30
+ export declare function blobFromImage(image: InputArray, blob: OutputArray, scalefactor?: double, size?: any, mean?: any, swapRB?: bool, crop?: bool, ddepth?: int): void;
31
+ /**
32
+ * if `crop` is true, input image is resized so one side after resize is equal to corresponding
33
+ * dimension in `size` and another one is equal or larger. Then, crop from the center is performed. If
34
+ * `crop` is false, direct resize without cropping and preserving aspect ratio is performed.
35
+ *
36
+ * 4-dimensional [Mat] with NCHW dimensions order.
37
+ *
38
+ * @param images input images (all with 1-, 3- or 4-channels).
39
+ *
40
+ * @param scalefactor multiplier for images values.
41
+ *
42
+ * @param size spatial size for output image
43
+ *
44
+ * @param mean scalar with mean values which are subtracted from channels. Values are intended to be in
45
+ * (mean-R, mean-G, mean-B) order if image has BGR ordering and swapRB is true.
46
+ *
47
+ * @param swapRB flag which indicates that swap first and last channels in 3-channel image is
48
+ * necessary.
49
+ *
50
+ * @param crop flag which indicates whether image will be cropped after resize or not
51
+ *
52
+ * @param ddepth Depth of output blob. Choose CV_32F or CV_8U.
53
+ */
54
+ export declare function blobFromImages(images: InputArrayOfArrays, scalefactor?: double, size?: Size, mean?: any, swapRB?: bool, crop?: bool, ddepth?: int): Mat;
55
+ /**
56
+ * This is an overloaded member function, provided for convenience. It differs from the above function
57
+ * only in what argument(s) it accepts.
58
+ */
59
+ export declare function blobFromImages(images: InputArrayOfArrays, blob: OutputArray, scalefactor?: double, size?: Size, mean?: any, swapRB?: bool, crop?: bool, ddepth?: int): void;
60
+ export declare function getAvailableBackends(): any;
61
+ export declare function getAvailableTargets(be: Backend): any;
62
+ /**
63
+ * @param blob_ 4 dimensional array (images, channels, height, width) in floating point precision
64
+ * (CV_32F) from which you would like to extract the images.
65
+ *
66
+ * @param images_ array of 2D Mat containing the images extracted from the blob in floating point
67
+ * precision (CV_32F). They are non normalized neither mean added. The number of returned images equals
68
+ * the first dimension of the blob (batch size). Every image has a number of channels equals to the
69
+ * second dimension of the blob (depth).
70
+ */
71
+ export declare function imagesFromBlob(blob_: any, images_: OutputArrayOfArrays): any;
72
+ /**
73
+ * @param bboxes a set of bounding boxes to apply NMS.
74
+ *
75
+ * @param scores a set of corresponding confidences.
76
+ *
77
+ * @param score_threshold a threshold used to filter boxes by score.
78
+ *
79
+ * @param nms_threshold a threshold used in non maximum suppression.
80
+ *
81
+ * @param indices the kept indices of bboxes after NMS.
82
+ *
83
+ * @param eta a coefficient in adaptive threshold formula: $nms\_threshold_{i+1}=eta\cdot
84
+ * nms\_threshold_i$.
85
+ *
86
+ * @param top_k if >0, keep at most top_k picked indices.
87
+ */
88
+ export declare function NMSBoxes(bboxes: any, scores: any, score_threshold: any, nms_threshold: any, indices: any, eta?: any, top_k?: any): void;
89
+ export declare function NMSBoxes(bboxes: any, scores: any, score_threshold: any, nms_threshold: any, indices: any, eta?: any, top_k?: any): void;
90
+ export declare function NMSBoxes(bboxes: any, scores: any, score_threshold: any, nms_threshold: any, indices: any, eta?: any, top_k?: any): void;
91
+ /**
92
+ * [Net] object.
93
+ * This function automatically detects an origin framework of trained model and calls an appropriate
94
+ * function such [readNetFromCaffe], [readNetFromTensorflow], [readNetFromTorch] or
95
+ * [readNetFromDarknet]. An order of `model` and `config` arguments does not matter.
96
+ *
97
+ * @param model Binary file contains trained weights. The following file extensions are expected for
98
+ * models from different frameworks:
99
+ * .caffemodel (Caffe, http://caffe.berkeleyvision.org/)*.pb (TensorFlow,
100
+ * https://www.tensorflow.org/)*.t7 | *.net (Torch, http://torch.ch/)*.weights (Darknet,
101
+ * https://pjreddie.com/darknet/)*.bin (DLDT, https://software.intel.com/openvino-toolkit)*.onnx (ONNX,
102
+ * https://onnx.ai/)
103
+ *
104
+ * @param config Text file contains network configuration. It could be a file with the following
105
+ * extensions:
106
+ * .prototxt (Caffe, http://caffe.berkeleyvision.org/)*.pbtxt (TensorFlow,
107
+ * https://www.tensorflow.org/)*.cfg (Darknet, https://pjreddie.com/darknet/)*.xml (DLDT,
108
+ * https://software.intel.com/openvino-toolkit)
109
+ *
110
+ * @param framework Explicit framework name tag to determine a format.
111
+ */
112
+ export declare function readNet(model: any, config?: any, framework?: any): Net;
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
+ * [Net] object.
118
+ *
119
+ * @param framework Name of origin framework.
120
+ *
121
+ * @param bufferModel A buffer with a content of binary file with weights
122
+ *
123
+ * @param bufferConfig A buffer with a content of text file contains network configuration.
124
+ */
125
+ export declare function readNet(framework: any, bufferModel: uchar, bufferConfig?: uchar): uchar;
126
+ /**
127
+ * [Net] object.
128
+ *
129
+ * @param prototxt path to the .prototxt file with text description of the network architecture.
130
+ *
131
+ * @param caffeModel path to the .caffemodel file with learned network.
132
+ */
133
+ export declare function readNetFromCaffe(prototxt: any, caffeModel?: any): Net;
134
+ /**
135
+ * [Net] object.
136
+ *
137
+ * @param bufferProto buffer containing the content of the .prototxt file
138
+ *
139
+ * @param bufferModel buffer containing the content of the .caffemodel file
140
+ */
141
+ export declare function readNetFromCaffe(bufferProto: uchar, bufferModel?: uchar): uchar;
142
+ /**
143
+ * This is an overloaded member function, provided for convenience. It differs from the above function
144
+ * only in what argument(s) it accepts.
145
+ *
146
+ * [Net] object.
147
+ *
148
+ * @param bufferProto buffer containing the content of the .prototxt file
149
+ *
150
+ * @param lenProto length of bufferProto
151
+ *
152
+ * @param bufferModel buffer containing the content of the .caffemodel file
153
+ *
154
+ * @param lenModel length of bufferModel
155
+ */
156
+ export declare function readNetFromCaffe(bufferProto: any, lenProto: size_t, bufferModel?: any, lenModel?: size_t): Net;
157
+ /**
158
+ * Network object that ready to do forward, throw an exception in failure cases.
159
+ *
160
+ * [Net] object.
161
+ *
162
+ * @param cfgFile path to the .cfg file with text description of the network architecture.
163
+ *
164
+ * @param darknetModel path to the .weights file with learned network.
165
+ */
166
+ export declare function readNetFromDarknet(cfgFile: any, darknetModel?: any): Net;
167
+ /**
168
+ * [Net] object.
169
+ *
170
+ * @param bufferCfg A buffer contains a content of .cfg file with text description of the network
171
+ * architecture.
172
+ *
173
+ * @param bufferModel A buffer contains a content of .weights file with learned network.
174
+ */
175
+ export declare function readNetFromDarknet(bufferCfg: uchar, bufferModel?: uchar): uchar;
176
+ /**
177
+ * [Net] object.
178
+ *
179
+ * @param bufferCfg A buffer contains a content of .cfg file with text description of the network
180
+ * architecture.
181
+ *
182
+ * @param lenCfg Number of bytes to read from bufferCfg
183
+ *
184
+ * @param bufferModel A buffer contains a content of .weights file with learned network.
185
+ *
186
+ * @param lenModel Number of bytes to read from bufferModel
187
+ */
188
+ export declare function readNetFromDarknet(bufferCfg: any, lenCfg: size_t, bufferModel?: any, lenModel?: size_t): Net;
189
+ /**
190
+ * [Net] object. Networks imported from Intel's [Model] Optimizer are launched in Intel's Inference
191
+ * Engine backend.
192
+ *
193
+ * @param xml XML configuration file with network's topology.
194
+ *
195
+ * @param bin Binary file with trained weights.
196
+ */
197
+ export declare function readNetFromModelOptimizer(xml: any, bin: any): Net;
198
+ /**
199
+ * Network object that ready to do forward, throw an exception in failure cases.
200
+ *
201
+ * @param onnxFile path to the .onnx file with text description of the network architecture.
202
+ */
203
+ export declare function readNetFromONNX(onnxFile: any): Net;
204
+ /**
205
+ * Network object that ready to do forward, throw an exception in failure cases.
206
+ *
207
+ * @param buffer memory address of the first byte of the buffer.
208
+ *
209
+ * @param sizeBuffer size of the buffer.
210
+ */
211
+ export declare function readNetFromONNX(buffer: any, sizeBuffer: size_t): Net;
212
+ /**
213
+ * Network object that ready to do forward, throw an exception in failure cases.
214
+ *
215
+ * @param buffer in-memory buffer that stores the ONNX model bytes.
216
+ */
217
+ export declare function readNetFromONNX(buffer: uchar): uchar;
218
+ /**
219
+ * [Net] object.
220
+ *
221
+ * @param model path to the .pb file with binary protobuf description of the network architecture
222
+ *
223
+ * @param config path to the .pbtxt file that contains text graph definition in protobuf format.
224
+ * Resulting Net object is built by text graph using weights from a binary one that let us make it more
225
+ * flexible.
226
+ */
227
+ export declare function readNetFromTensorflow(model: any, config?: any): Net;
228
+ /**
229
+ * [Net] object.
230
+ *
231
+ * @param bufferModel buffer containing the content of the pb file
232
+ *
233
+ * @param bufferConfig buffer containing the content of the pbtxt file
234
+ */
235
+ export declare function readNetFromTensorflow(bufferModel: uchar, bufferConfig?: uchar): uchar;
236
+ /**
237
+ * This is an overloaded member function, provided for convenience. It differs from the above function
238
+ * only in what argument(s) it accepts.
239
+ *
240
+ * @param bufferModel buffer containing the content of the pb file
241
+ *
242
+ * @param lenModel length of bufferModel
243
+ *
244
+ * @param bufferConfig buffer containing the content of the pbtxt file
245
+ *
246
+ * @param lenConfig length of bufferConfig
247
+ */
248
+ export declare function readNetFromTensorflow(bufferModel: any, lenModel: size_t, bufferConfig?: any, lenConfig?: size_t): Net;
249
+ /**
250
+ * [Net] object.
251
+ *
252
+ * Ascii mode of Torch serializer is more preferable, because binary mode extensively use `long` type
253
+ * of C language, which has various bit-length on different systems.
254
+ * The loading file must contain serialized object with importing network. Try to eliminate a custom
255
+ * objects from serialazing data to avoid importing errors.
256
+ *
257
+ * List of supported layers (i.e. object instances derived from Torch nn.Module class):
258
+ *
259
+ * nn.Sequential
260
+ * nn.Parallel
261
+ * nn.Concat
262
+ * nn.Linear
263
+ * nn.SpatialConvolution
264
+ * nn.SpatialMaxPooling, nn.SpatialAveragePooling
265
+ * nn.ReLU, nn.TanH, nn.Sigmoid
266
+ * nn.Reshape
267
+ * nn.SoftMax, nn.LogSoftMax
268
+ *
269
+ * Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported.
270
+ *
271
+ * @param model path to the file, dumped from Torch by using torch.save() function.
272
+ *
273
+ * @param isBinary specifies whether the network was serialized in ascii mode or binary.
274
+ *
275
+ * @param evaluate specifies testing phase of network. If true, it's similar to evaluate() method in
276
+ * Torch.
277
+ */
278
+ export declare function readNetFromTorch(model: any, isBinary?: bool, evaluate?: bool): Net;
279
+ /**
280
+ * [Mat].
281
+ *
282
+ * @param path to the .pb file with input tensor.
283
+ */
284
+ export declare function readTensorFromONNX(path: any): Mat;
285
+ /**
286
+ * This function has the same limitations as [readNetFromTorch()].
287
+ */
288
+ export declare function readTorchBlob(filename: any, isBinary?: bool): Mat;
289
+ /**
290
+ * Shrinked model has no origin float32 weights so it can't be used in origin Caffe framework anymore.
291
+ * However the structure of data is taken from NVidia's Caffe fork: . So the resulting model may be
292
+ * used there.
293
+ *
294
+ * @param src Path to origin model from Caffe framework contains single precision floating point
295
+ * weights (usually has .caffemodel extension).
296
+ *
297
+ * @param dst Path to destination model with updated weights.
298
+ *
299
+ * @param layersTypes Set of layers types which parameters will be converted. By default, converts only
300
+ * Convolutional and Fully-Connected layers' weights.
301
+ */
302
+ export declare function shrinkCaffeModel(src: any, dst: any, layersTypes?: any): void;
303
+ /**
304
+ * To reduce output file size, trained weights are not included.
305
+ *
306
+ * @param model A path to binary network.
307
+ *
308
+ * @param output A path to output text file to be created.
309
+ */
310
+ export declare function writeTextGraph(model: any, output: any): void;
311
+ /**
312
+ * DNN_BACKEND_DEFAULT equals to DNN_BACKEND_INFERENCE_ENGINE if OpenCV is built with Intel's Inference
313
+ * Engine library or DNN_BACKEND_OPENCV otherwise.
314
+ *
315
+ */
316
+ export declare const DNN_BACKEND_DEFAULT: Backend;
317
+ export declare const DNN_BACKEND_HALIDE: Backend;
318
+ export declare const DNN_BACKEND_INFERENCE_ENGINE: Backend;
319
+ export declare const DNN_BACKEND_OPENCV: Backend;
320
+ export declare const DNN_BACKEND_VKCOM: Backend;
321
+ export declare const DNN_TARGET_CPU: Target;
322
+ export declare const DNN_TARGET_OPENCL: Target;
323
+ export declare const DNN_TARGET_OPENCL_FP16: Target;
324
+ export declare const DNN_TARGET_MYRIAD: Target;
325
+ export declare const DNN_TARGET_VULKAN: Target;
326
+ export declare const DNN_TARGET_FPGA: Target;
327
+ /**
328
+ * [Net::setPreferableBackend]
329
+ *
330
+ */
331
+ export type Backend = any;
332
+ /**
333
+ * [Net::setPreferableBackend]
334
+ *
335
+ */
336
+ export type Target = any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=dnn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dnn.js","sourceRoot":"","sources":["../../../../src/types/opencv/dnn.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ import { InputArray, InputOutputArray } from "./_types";
2
+ /**
3
+ * For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT,
4
+ * cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,
5
+ * cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS
6
+ *
7
+ * @param image Source image.
8
+ *
9
+ * @param keypoints Keypoints from the source image.
10
+ *
11
+ * @param outImage Output image. Its content depends on the flags value defining what is drawn in the
12
+ * output image. See possible flags bit values below.
13
+ *
14
+ * @param color Color of keypoints.
15
+ *
16
+ * @param flags Flags setting drawing features. Possible flags bit values are defined by
17
+ * DrawMatchesFlags. See details above in drawMatches .
18
+ */
19
+ export declare function drawKeypoints(image: InputArray, keypoints: any, outImage: InputOutputArray, color?: any, flags?: DrawMatchesFlags): void;
20
+ /**
21
+ * This function draws matches of keypoints from two images in the output image. Match is a line
22
+ * connecting two keypoints (circles). See [cv::DrawMatchesFlags].
23
+ *
24
+ * @param img1 First source image.
25
+ *
26
+ * @param keypoints1 Keypoints from the first source image.
27
+ *
28
+ * @param img2 Second source image.
29
+ *
30
+ * @param keypoints2 Keypoints from the second source image.
31
+ *
32
+ * @param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
33
+ * has a corresponding point in keypoints2[matches[i]] .
34
+ *
35
+ * @param outImg Output image. Its content depends on the flags value defining what is drawn in the
36
+ * output image. See possible flags bit values below.
37
+ *
38
+ * @param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1) ,
39
+ * the color is generated randomly.
40
+ *
41
+ * @param singlePointColor Color of single keypoints (circles), which means that keypoints do not have
42
+ * the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
43
+ *
44
+ * @param matchesMask Mask determining which matches are drawn. If the mask is empty, all matches are
45
+ * drawn.
46
+ *
47
+ * @param flags Flags setting drawing features. Possible flags bit values are defined by
48
+ * DrawMatchesFlags.
49
+ */
50
+ export declare function drawMatches(img1: InputArray, keypoints1: any, img2: InputArray, keypoints2: any, matches1to2: any, outImg: InputOutputArray, matchColor?: any, singlePointColor?: any, matchesMask?: any, flags?: DrawMatchesFlags): void;
51
+ /**
52
+ * This is an overloaded member function, provided for convenience. It differs from the above function
53
+ * only in what argument(s) it accepts.
54
+ */
55
+ export declare function drawMatches(img1: InputArray, keypoints1: any, img2: InputArray, keypoints2: any, matches1to2: any, outImg: InputOutputArray, matchColor?: any, singlePointColor?: any, matchesMask?: any, flags?: DrawMatchesFlags): void;
56
+ /**
57
+ * Output image matrix will be created ([Mat::create]), i.e. existing memory of output image may be
58
+ * reused. Two source image, matches and single keypoints will be drawn. For each keypoint only the
59
+ * center point will be drawn (without the circle around keypoint with keypoint size and orientation).
60
+ *
61
+ */
62
+ export declare const DEFAULT: DrawMatchesFlags;
63
+ /**
64
+ * Output image matrix will not be created ([Mat::create]). Matches will be drawn on existing content
65
+ * of output image.
66
+ *
67
+ */
68
+ export declare const DRAW_OVER_OUTIMG: DrawMatchesFlags;
69
+ export declare const NOT_DRAW_SINGLE_POINTS: DrawMatchesFlags;
70
+ /**
71
+ * For each keypoint the circle around keypoint with keypoint size and orientation will be drawn.
72
+ *
73
+ */
74
+ export declare const DRAW_RICH_KEYPOINTS: DrawMatchesFlags;
75
+ export type DrawMatchesFlags = any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=features2d_draw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features2d_draw.js","sourceRoot":"","sources":["../../../../src/types/opencv/features2d_draw.ts"],"names":[],"mappings":""}