@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,80 @@
1
+ import type {
2
+ InputArray,
3
+ InputOutputArray,
4
+ OutputArray,
5
+ TermCriteria,
6
+ } from "./helpers";
7
+ import type { double, int } from "./missing";
8
+
9
+ /*
10
+ * # Clustering
11
+ *
12
+ */
13
+ /**
14
+ * The function kmeans implements a k-means algorithm that finds the centers of cluster_count clusters
15
+ * and groups the input samples around the clusters. As an output, `$\\texttt{bestLabels}_i$` contains
16
+ * a 0-based cluster index for the sample stored in the `$i^{th}$` row of the samples matrix.
17
+ *
18
+ * (Python) An example on K-means clustering can be found at
19
+ * opencv_source_code/samples/python/kmeans.py
20
+ *
21
+ * The function returns the compactness measure that is computed as `\\[\\sum _i \\| \\texttt{samples}
22
+ * _i - \\texttt{centers} _{ \\texttt{labels} _i} \\| ^2\\]` after every attempt. The best (minimum)
23
+ * value is chosen and the corresponding labels and the compactness value are returned by the function.
24
+ * Basically, you can use only the core of the function, set the number of attempts to 1, initialize
25
+ * labels each time using a custom algorithm, pass them with the ( flags = [KMEANS_USE_INITIAL_LABELS]
26
+ * ) flag, and then choose the best (most-compact) clustering.
27
+ *
28
+ * @param data Data for clustering. An array of N-Dimensional points with float coordinates is needed.
29
+ * Examples of this array can be:
30
+ * Mat points(count, 2, CV_32F);Mat points(count, 1, CV_32FC2);Mat points(1, count,
31
+ * CV_32FC2);std::vector<cv::Point2f> points(sampleCount);
32
+ *
33
+ * @param K Number of clusters to split the set by.
34
+ *
35
+ * @param bestLabels Input/output integer array that stores the cluster indices for every sample.
36
+ *
37
+ * @param criteria The algorithm termination criteria, that is, the maximum number of iterations and/or
38
+ * the desired accuracy. The accuracy is specified as criteria.epsilon. As soon as each of the cluster
39
+ * centers moves by less than criteria.epsilon on some iteration, the algorithm stops.
40
+ *
41
+ * @param attempts Flag to specify the number of times the algorithm is executed using different
42
+ * initial labellings. The algorithm returns the labels that yield the best compactness (see the last
43
+ * function parameter).
44
+ *
45
+ * @param flags Flag that can take values of cv::KmeansFlags
46
+ *
47
+ * @param centers Output matrix of the cluster centers, one row per each cluster center.
48
+ */
49
+ export declare function kmeans(
50
+ data: InputArray,
51
+ K: int,
52
+ bestLabels: InputOutputArray,
53
+ criteria: TermCriteria,
54
+ attempts: int,
55
+ flags: int,
56
+ centers?: OutputArray,
57
+ ): double;
58
+
59
+ /**
60
+ * The generic function partition implements an `$O(N^2)$` algorithm for splitting a set of `$N$`
61
+ * elements into one or more equivalency classes, as described in . The function returns the number of
62
+ * equivalency classes.
63
+ *
64
+ * @param _vec Set of elements stored as a vector.
65
+ *
66
+ * @param labels Output vector of labels. It contains as many elements as vec. Each label labels[i] is
67
+ * a 0-based cluster index of vec[i].
68
+ *
69
+ * @param predicate Equivalence predicate (pointer to a boolean function of two arguments or an
70
+ * instance of the class that has the method bool operator()(const _Tp& a, const _Tp& b) ). The
71
+ * predicate returns true when the elements are certainly in the same class, and returns false if they
72
+ * may or may not be in the same class.
73
+ */
74
+ export declare function partition(
75
+ arg119: any,
76
+ arg120: any,
77
+ _vec: any,
78
+ labels: any,
79
+ predicate?: any,
80
+ ): any;
@@ -0,0 +1,159 @@
1
+ import type { cvhalDFT, int, size_t, uchar } from "./_types";
2
+ /*
3
+ * # Interface
4
+ * Define your functions to override default implementations:
5
+ *
6
+ * ```cpp
7
+ * #undef hal_add8u
8
+ * #define hal_add8u my_add8u
9
+ * ```
10
+ */
11
+ /**
12
+ * @param context pointer to context storing all necessary data
13
+ *
14
+ * @param src_data source image data and step
15
+ *
16
+ * @param dst_data destination image data and step
17
+ */
18
+ export declare function hal_ni_dct2D(
19
+ context: cvhalDFT,
20
+ src_data: uchar,
21
+ src_step: size_t,
22
+ dst_data: uchar,
23
+ dst_step: size_t,
24
+ ): cvhalDFT;
25
+
26
+ /**
27
+ * @param context pointer to context storing all necessary data
28
+ */
29
+ export declare function hal_ni_dctFree2D(context: cvhalDFT): cvhalDFT;
30
+
31
+ /**
32
+ * @param context double pointer to context storing all necessary data
33
+ *
34
+ * @param width image dimensions
35
+ *
36
+ * @param depth image type (CV_32F or CV64F)
37
+ *
38
+ * @param flags algorithm options (combination of CV_HAL_DFT_INVERSE, ...)
39
+ */
40
+ export declare function hal_ni_dctInit2D(
41
+ context: cvhalDFT,
42
+ width: int,
43
+ height: int,
44
+ depth: int,
45
+ flags: int,
46
+ ): cvhalDFT;
47
+
48
+ /**
49
+ * @param context pointer to context storing all necessary data
50
+ *
51
+ * @param src source data
52
+ *
53
+ * @param dst destination data
54
+ */
55
+ export declare function hal_ni_dft1D(
56
+ context: cvhalDFT,
57
+ src: uchar,
58
+ dst: uchar,
59
+ ): cvhalDFT;
60
+
61
+ /**
62
+ * @param context pointer to context storing all necessary data
63
+ *
64
+ * @param src_data source image data and step
65
+ *
66
+ * @param dst_data destination image data and step
67
+ */
68
+ export declare function hal_ni_dft2D(
69
+ context: cvhalDFT,
70
+ src_data: uchar,
71
+ src_step: size_t,
72
+ dst_data: uchar,
73
+ dst_step: size_t,
74
+ ): cvhalDFT;
75
+
76
+ /**
77
+ * @param context pointer to context storing all necessary data
78
+ */
79
+ export declare function hal_ni_dftFree1D(context: cvhalDFT): cvhalDFT;
80
+
81
+ /**
82
+ * @param context pointer to context storing all necessary data
83
+ */
84
+ export declare function hal_ni_dftFree2D(context: cvhalDFT): cvhalDFT;
85
+
86
+ /**
87
+ * @param context double pointer to context storing all necessary data
88
+ *
89
+ * @param len transformed array length
90
+ *
91
+ * @param count estimated transformation count
92
+ *
93
+ * @param depth array type (CV_32F or CV_64F)
94
+ *
95
+ * @param flags algorithm options (combination of CV_HAL_DFT_INVERSE, CV_HAL_DFT_SCALE, ...)
96
+ *
97
+ * @param needBuffer pointer to boolean variable, if valid pointer provided, then variable value should
98
+ * be set to true to signal that additional memory buffer is needed for operations
99
+ */
100
+ export declare function hal_ni_dftInit1D(
101
+ context: cvhalDFT,
102
+ len: int,
103
+ count: int,
104
+ depth: int,
105
+ flags: int,
106
+ needBuffer: any,
107
+ ): cvhalDFT;
108
+
109
+ /**
110
+ * @param context double pointer to context storing all necessary data
111
+ *
112
+ * @param width image dimensions
113
+ *
114
+ * @param depth image type (CV_32F or CV64F)
115
+ *
116
+ * @param src_channels number of channels in input image
117
+ *
118
+ * @param dst_channels number of channels in output image
119
+ *
120
+ * @param flags algorithm options (combination of CV_HAL_DFT_INVERSE, ...)
121
+ *
122
+ * @param nonzero_rows number of nonzero rows in image, can be used for optimization
123
+ */
124
+ export declare function hal_ni_dftInit2D(
125
+ context: cvhalDFT,
126
+ width: int,
127
+ height: int,
128
+ depth: int,
129
+ src_channels: int,
130
+ dst_channels: int,
131
+ flags: int,
132
+ nonzero_rows: int,
133
+ ): cvhalDFT;
134
+
135
+ /**
136
+ * @param src_data Source image
137
+ *
138
+ * @param width Source image dimensions
139
+ *
140
+ * @param depth Depth of source image
141
+ *
142
+ * @param minVal Pointer to the returned global minimum and maximum in an array.
143
+ *
144
+ * @param minIdx Pointer to the returned minimum and maximum location.
145
+ *
146
+ * @param mask Specified array region.
147
+ */
148
+ export declare function hal_ni_minMaxIdx(
149
+ src_data: uchar,
150
+ src_step: size_t,
151
+ width: int,
152
+ height: int,
153
+ depth: int,
154
+ minVal: any,
155
+ maxVal: any,
156
+ minIdx: any,
157
+ maxIdx: any,
158
+ mask: uchar,
159
+ ): uchar;