@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.
- package/LICENSE +201 -0
- package/README.md +23 -0
- package/lib/index.d.ts +2 -0
- package/lib/opencv/Affine3.d.ts +206 -0
- package/lib/opencv/Algorithm.d.ts +126 -0
- package/lib/opencv/AutoBuffer.d.ts +50 -0
- package/lib/opencv/BFMatcher.d.ts +37 -0
- package/lib/opencv/BOWTrainer.d.ts +43 -0
- package/lib/opencv/CascadeClassifier.d.ts +153 -0
- package/lib/opencv/DescriptorMatcher.d.ts +236 -0
- package/lib/opencv/DynamicBitset.d.ts +68 -0
- package/lib/opencv/Exception.d.ts +54 -0
- package/lib/opencv/Feature2D.d.ts +20 -0
- package/lib/opencv/FlannBasedMatcher.d.ts +57 -0
- package/lib/opencv/HOGDescriptor.d.ts +401 -0
- package/lib/opencv/Logger.d.ts +34 -0
- package/lib/opencv/LshTable.d.ts +81 -0
- package/lib/opencv/Mat.d.ts +1793 -0
- package/lib/opencv/MatExpr.d.ts +107 -0
- package/lib/opencv/MatOp.d.ts +72 -0
- package/lib/opencv/Matx.d.ts +228 -0
- package/lib/opencv/Node.d.ts +33 -0
- package/lib/opencv/ORB.d.ts +23 -0
- package/lib/opencv/PCA.d.ts +198 -0
- package/lib/opencv/RotatedRect.d.ts +73 -0
- package/lib/opencv/Tracker.d.ts +1 -0
- package/lib/opencv/TrackerMIL.d.ts +3 -0
- package/lib/opencv/_types.d.ts +48 -0
- package/lib/opencv/calib3d.d.ts +2937 -0
- package/lib/opencv/core_array.d.ts +3102 -0
- package/lib/opencv/core_cluster.d.ts +80 -0
- package/lib/opencv/core_hal_interface.d.ts +159 -0
- package/lib/opencv/core_utils.d.ts +748 -0
- package/lib/opencv/dnn.d.ts +505 -0
- package/lib/opencv/features2d_draw.d.ts +114 -0
- package/lib/opencv/fisheye.d.ts +26 -0
- package/lib/opencv/helpers.d.ts +274 -0
- package/lib/opencv/imgproc_color_conversions.d.ts +527 -0
- package/lib/opencv/imgproc_draw.d.ts +732 -0
- package/lib/opencv/imgproc_feature.d.ts +681 -0
- package/lib/opencv/imgproc_filter.d.ts +918 -0
- package/lib/opencv/imgproc_hist.d.ts +399 -0
- package/lib/opencv/imgproc_misc.d.ts +616 -0
- package/lib/opencv/imgproc_object.d.ts +58 -0
- package/lib/opencv/imgproc_shape.d.ts +724 -0
- package/lib/opencv/imgproc_transform.d.ts +574 -0
- package/lib/opencv/missing.d.ts +58 -0
- package/lib/opencv/objdetect.d.ts +103 -0
- package/lib/opencv/photo_inpaint.d.ts +39 -0
- package/lib/opencv/softdouble.d.ts +71 -0
- package/lib/opencv/softfloat.d.ts +71 -0
- package/lib/opencv/video_track.d.ts +370 -0
- package/package.json +18 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// Types for APIs defined in helpers.js
|
|
2
|
+
// https://github.com/opencv/opencv/blob/4.10.0/modules/js/src/helpers.js#L29
|
|
3
|
+
|
|
4
|
+
import { RotatedRect } from "./RotatedRect";
|
|
5
|
+
import { Algorithm } from "./Algorithm";
|
|
6
|
+
import type { LineTypes } from "./imgproc_draw";
|
|
7
|
+
import { Mat } from "./Mat";
|
|
8
|
+
import type { NormTypes } from "./core_array";
|
|
9
|
+
import type { bool, double } from "./missing";
|
|
10
|
+
|
|
11
|
+
export declare class Range {
|
|
12
|
+
public start: number;
|
|
13
|
+
public end: number;
|
|
14
|
+
public constructor(start: number, end: number);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare class Scalar extends Array<number> {
|
|
18
|
+
public static all(...v: number[]): Scalar;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Hack: expose Mat super classes like Mat_, InputArray, Vector, OutputArray we make them alias of Mat to simplify and make it work
|
|
22
|
+
export { Mat as InputArray };
|
|
23
|
+
export { Mat as InputOutputArray };
|
|
24
|
+
export { Mat as OutputArray };
|
|
25
|
+
export { MatVector as InputArrayOfArrays };
|
|
26
|
+
export { MatVector as InputOutputArrayOfArrays };
|
|
27
|
+
export { MatVector as OutputArrayOfArrays };
|
|
28
|
+
export { Scalar as GScalar };
|
|
29
|
+
export { Point as Point2f };
|
|
30
|
+
export { Point as KeyPoint };
|
|
31
|
+
export { Point as Point2l };
|
|
32
|
+
export { Size as Point2d };
|
|
33
|
+
export { Size as Size2d };
|
|
34
|
+
export { Size as Size2f };
|
|
35
|
+
export { Size as Size2l };
|
|
36
|
+
export { Rect as Rect_ };
|
|
37
|
+
|
|
38
|
+
export declare class Point {
|
|
39
|
+
public constructor(x: number, y: number);
|
|
40
|
+
public x: number;
|
|
41
|
+
public y: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare class Circle {
|
|
45
|
+
public constructor(center: Point, radius: number);
|
|
46
|
+
public center: Point;
|
|
47
|
+
public radius: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare class Size {
|
|
51
|
+
public constructor(width: number, height: number);
|
|
52
|
+
public width: number;
|
|
53
|
+
public height: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare class Rect {
|
|
57
|
+
public constructor();
|
|
58
|
+
public constructor(point: Point, size: Size);
|
|
59
|
+
public constructor(x: number, y: number, width: number, height: number);
|
|
60
|
+
public x: number;
|
|
61
|
+
public y: number;
|
|
62
|
+
public width: number;
|
|
63
|
+
public height: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export declare class TermCriteria {
|
|
67
|
+
public type: number;
|
|
68
|
+
public maxCount: number;
|
|
69
|
+
public epsilon: number;
|
|
70
|
+
public constructor();
|
|
71
|
+
public constructor(type: number, maxCount: number, epsilon: number);
|
|
72
|
+
}
|
|
73
|
+
export declare const TermCriteria_EPS: any;
|
|
74
|
+
export declare const TermCriteria_COUNT: any;
|
|
75
|
+
export declare const TermCriteria_MAX_ITER: any;
|
|
76
|
+
|
|
77
|
+
export declare class MinMaxLoc {
|
|
78
|
+
public minVal: number;
|
|
79
|
+
public maxVal: number;
|
|
80
|
+
public minLoc: Point;
|
|
81
|
+
public maxLoc: Point;
|
|
82
|
+
public constructor();
|
|
83
|
+
public constructor(
|
|
84
|
+
minVal: number,
|
|
85
|
+
maxVal: number,
|
|
86
|
+
minLoc: Point,
|
|
87
|
+
maxLoc: Point,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// expose emscripten / opencv.js specifics
|
|
92
|
+
|
|
93
|
+
export declare function exceptionFromPtr(err: number): any;
|
|
94
|
+
export declare function onRuntimeInitialized(): any;
|
|
95
|
+
export declare function FS_createDataFile(
|
|
96
|
+
arg0: string,
|
|
97
|
+
path: string,
|
|
98
|
+
data: Uint8Array,
|
|
99
|
+
arg3: boolean,
|
|
100
|
+
arg4: boolean,
|
|
101
|
+
arg5: boolean,
|
|
102
|
+
): any;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Base class for Contrast Limited Adaptive Histogram Equalization.
|
|
106
|
+
*/
|
|
107
|
+
export declare class CLAHE extends Algorithm {
|
|
108
|
+
/**
|
|
109
|
+
* @param clipLimit Threshold for contrast limiting. Default. 40.0,
|
|
110
|
+
* @param totalGridSize Size of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column. Default: Size(8, 8)
|
|
111
|
+
*/
|
|
112
|
+
constructor(clipLimit?: double, totalGridSize?: Size);
|
|
113
|
+
/**
|
|
114
|
+
* Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
|
|
115
|
+
* @param src Source image of type CV_8UC1 or CV_16UC1.
|
|
116
|
+
* @param dst Destination image.
|
|
117
|
+
*/
|
|
118
|
+
apply(src: Mat, dst: Mat): void;
|
|
119
|
+
collectGarbage(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Returns threshold value for contrast limiting.
|
|
122
|
+
*/
|
|
123
|
+
getClipLimit(): double;
|
|
124
|
+
/**
|
|
125
|
+
* Returns Size defines the number of tiles in row and column.
|
|
126
|
+
*/
|
|
127
|
+
getTilesGridSize(): Size;
|
|
128
|
+
/**
|
|
129
|
+
* Sets threshold for contrast limiting.
|
|
130
|
+
*/
|
|
131
|
+
setClipLimit(clipLimit: double): void;
|
|
132
|
+
/**
|
|
133
|
+
* Sets size of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles.
|
|
134
|
+
* @param tileGridSize defines the number of tiles in row and column.
|
|
135
|
+
*/
|
|
136
|
+
setTilesGridSize(tileGridSize: Size): void;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// emscripten embind internals
|
|
140
|
+
export declare function getInheritedInstanceCount(...a: any[]): any;
|
|
141
|
+
export declare function getLiveInheritedInstances(...a: any[]): any;
|
|
142
|
+
export declare function flushPendingDeletes(...a: any[]): any;
|
|
143
|
+
export declare function setDelayFunction(...a: any[]): any;
|
|
144
|
+
|
|
145
|
+
export declare class EmscriptenEmbindInstance {
|
|
146
|
+
isAliasOf(other: any): bool;
|
|
147
|
+
clone(): any;
|
|
148
|
+
delete(): any;
|
|
149
|
+
isDeleted(): boolean;
|
|
150
|
+
deleteLater(): any;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare class InternalError extends Error {}
|
|
154
|
+
export declare class BindingError extends Error {}
|
|
155
|
+
export declare class UnboundTypeError extends Error {}
|
|
156
|
+
export declare class PureVirtualError extends Error {}
|
|
157
|
+
|
|
158
|
+
export declare class Vector<T> extends EmscriptenEmbindInstance {
|
|
159
|
+
get(i: number): T;
|
|
160
|
+
get(i: number, j: number, data: any): T;
|
|
161
|
+
set(i: number, t: T): void;
|
|
162
|
+
put(i: number, j: number, data: any): any;
|
|
163
|
+
size(): number;
|
|
164
|
+
push_back(n: T): any;
|
|
165
|
+
resize(count: number, value?: T): void;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export declare class Vec3d extends Vector<any> {}
|
|
169
|
+
export declare class IntVector extends Vector<number> {}
|
|
170
|
+
export declare class FloatVector extends Vector<number> {}
|
|
171
|
+
export declare class DoubleVector extends Vector<number> {}
|
|
172
|
+
export declare class PointVector extends Vector<Point> {}
|
|
173
|
+
export declare class KeyPointVector extends Vector<any> {}
|
|
174
|
+
export declare class DMatchVector extends Vector<any> {}
|
|
175
|
+
export declare class DMatchVectorVector extends Vector<Vector<any>> {}
|
|
176
|
+
export declare class MatVector extends Vector<Mat> {}
|
|
177
|
+
|
|
178
|
+
export declare class RectVector extends Rect implements Vector<Rect> {
|
|
179
|
+
get(i: number): Rect;
|
|
180
|
+
isAliasOf(...a: any[]): any;
|
|
181
|
+
clone(...a: any[]): any;
|
|
182
|
+
delete(...a: any[]): any;
|
|
183
|
+
isDeleted(...a: any[]): any;
|
|
184
|
+
deleteLater(...a: any[]): any;
|
|
185
|
+
set(i: number, t: Rect): void;
|
|
186
|
+
put(i: number, j: number, data: any): any;
|
|
187
|
+
size(): number;
|
|
188
|
+
push_back(n: Rect): void;
|
|
189
|
+
resize(count: number, value?: Rect | undefined): void;
|
|
190
|
+
delete(): void;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare class VideoCapture {
|
|
194
|
+
public constructor(videoSource: HTMLVideoElement | string);
|
|
195
|
+
public read(m: Mat): any;
|
|
196
|
+
public video: HTMLVideoElement;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type MatSize = () => Size;
|
|
200
|
+
|
|
201
|
+
export declare function matFromImageData(imageData: ImageData): Mat;
|
|
202
|
+
export declare function matFromArray(
|
|
203
|
+
rows: number,
|
|
204
|
+
cols: number,
|
|
205
|
+
type: any,
|
|
206
|
+
array: number[] | ArrayBufferView,
|
|
207
|
+
): Mat;
|
|
208
|
+
|
|
209
|
+
export declare class ImageData {
|
|
210
|
+
data: ArrayBufferView;
|
|
211
|
+
width: number;
|
|
212
|
+
height: number;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// TODO this types should be exposed by the tool - want to make it work:
|
|
216
|
+
export declare const CV_8U: CVDataType;
|
|
217
|
+
export declare const CV_8UC1: CVDataType;
|
|
218
|
+
export declare const CV_8UC2: CVDataType;
|
|
219
|
+
export declare const CV_8UC3: CVDataType;
|
|
220
|
+
export declare const CV_8UC4: CVDataType;
|
|
221
|
+
export declare const CV_8S: CVDataType;
|
|
222
|
+
export declare const CV_8SC1: CVDataType;
|
|
223
|
+
export declare const CV_8SC2: CVDataType;
|
|
224
|
+
export declare const CV_8SC3: CVDataType;
|
|
225
|
+
export declare const CV_8SC4: CVDataType;
|
|
226
|
+
export declare const CV_16U: CVDataType;
|
|
227
|
+
export declare const CV_16UC1: CVDataType;
|
|
228
|
+
export declare const CV_16UC2: CVDataType;
|
|
229
|
+
export declare const CV_16UC3: CVDataType;
|
|
230
|
+
export declare const CV_16UC4: CVDataType;
|
|
231
|
+
export declare const CV_16S: CVDataType;
|
|
232
|
+
export declare const CV_16SC1: CVDataType;
|
|
233
|
+
export declare const CV_16SC2: CVDataType;
|
|
234
|
+
export declare const CV_16SC3: CVDataType;
|
|
235
|
+
export declare const CV_16SC4: CVDataType;
|
|
236
|
+
export declare const CV_32S: CVDataType;
|
|
237
|
+
export declare const CV_32SC1: CVDataType;
|
|
238
|
+
export declare const CV_32SC2: CVDataType;
|
|
239
|
+
export declare const CV_32SC3: CVDataType;
|
|
240
|
+
export declare const CV_32SC4: CVDataType;
|
|
241
|
+
export declare const CV_32F: CVDataType;
|
|
242
|
+
export declare const CV_32FC1: CVDataType;
|
|
243
|
+
export declare const CV_32FC2: CVDataType;
|
|
244
|
+
export declare const CV_32FC3: CVDataType;
|
|
245
|
+
export declare const CV_32FC4: CVDataType;
|
|
246
|
+
export declare const CV_64F: CVDataType;
|
|
247
|
+
export declare const CV_64FC1: CVDataType;
|
|
248
|
+
export declare const CV_64FC2: CVDataType;
|
|
249
|
+
export declare const CV_64FC3: CVDataType;
|
|
250
|
+
export declare const CV_64FC4: CVDataType;
|
|
251
|
+
|
|
252
|
+
export type CVDataType = any;
|
|
253
|
+
|
|
254
|
+
export declare function ellipse1(
|
|
255
|
+
dst: Mat,
|
|
256
|
+
rotatedRect: RotatedRect,
|
|
257
|
+
ellipseColor: Scalar,
|
|
258
|
+
arg0: number,
|
|
259
|
+
line: LineTypes,
|
|
260
|
+
): void;
|
|
261
|
+
export declare function imread(
|
|
262
|
+
canvasOrImageHtmlElement: HTMLElement | string,
|
|
263
|
+
): Mat;
|
|
264
|
+
export declare function norm1(a: Mat, b: Mat, type: NormTypes): number;
|
|
265
|
+
export declare function imshow(
|
|
266
|
+
canvasSource: HTMLElement | string,
|
|
267
|
+
mat: Mat,
|
|
268
|
+
): void;
|
|
269
|
+
export declare function matFromArray(
|
|
270
|
+
rows: number,
|
|
271
|
+
cols: number,
|
|
272
|
+
type: any,
|
|
273
|
+
array: any,
|
|
274
|
+
): Mat;
|