@techstark/opencv-js 4.8.0-release.7 → 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.
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +18 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types/_cv.d.ts +7 -0
- package/dist/src/types/_cv.js +3 -0
- package/dist/src/types/_cv.js.map +1 -0
- package/dist/src/types/emscripten.d.ts +166 -0
- package/dist/src/types/emscripten.js +4 -0
- package/dist/src/types/emscripten.js.map +1 -0
- package/dist/src/types/opencv/Affine3.d.ts +183 -0
- package/dist/src/types/opencv/Affine3.js +3 -0
- package/dist/src/types/opencv/Affine3.js.map +1 -0
- package/dist/src/types/opencv/Algorithm.d.ts +105 -0
- package/dist/src/types/opencv/Algorithm.js +4 -0
- package/dist/src/types/opencv/Algorithm.js.map +1 -0
- package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
- package/dist/src/types/opencv/AutoBuffer.js +3 -0
- package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
- package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
- package/dist/src/types/opencv/BFMatcher.js +3 -0
- package/dist/src/types/opencv/BFMatcher.js.map +1 -0
- package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
- package/dist/src/types/opencv/BOWTrainer.js +3 -0
- package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
- package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
- package/dist/src/types/opencv/CascadeClassifier.js +4 -0
- package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
- package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
- package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
- package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
- package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
- package/dist/src/types/opencv/DynamicBitset.js +3 -0
- package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
- package/dist/src/types/opencv/Exception.d.ts +38 -0
- package/dist/src/types/opencv/Exception.js +3 -0
- package/dist/src/types/opencv/Exception.js.map +1 -0
- package/dist/src/types/opencv/Feature2D.d.ts +14 -0
- package/dist/src/types/opencv/Feature2D.js +4 -0
- package/dist/src/types/opencv/Feature2D.js.map +1 -0
- package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
- package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
- package/dist/src/types/opencv/HOGDescriptor.js +3 -0
- package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
- package/dist/src/types/opencv/Logger.d.ts +27 -0
- package/dist/src/types/opencv/Logger.js +3 -0
- package/dist/src/types/opencv/Logger.js.map +1 -0
- package/dist/src/types/opencv/LshTable.d.ts +67 -0
- package/dist/src/types/opencv/LshTable.js +3 -0
- package/dist/src/types/opencv/LshTable.js.map +1 -0
- package/dist/src/types/opencv/Mat.d.ts +1589 -0
- package/dist/src/types/opencv/Mat.js +3 -0
- package/dist/src/types/opencv/Mat.js.map +1 -0
- package/dist/src/types/opencv/MatExpr.d.ts +78 -0
- package/dist/src/types/opencv/MatExpr.js +4 -0
- package/dist/src/types/opencv/MatExpr.js.map +1 -0
- package/dist/src/types/opencv/MatOp.d.ts +29 -0
- package/dist/src/types/opencv/MatOp.js +3 -0
- package/dist/src/types/opencv/MatOp.js.map +1 -0
- package/dist/src/types/opencv/Matx.d.ts +84 -0
- package/dist/src/types/opencv/Matx.js +3 -0
- package/dist/src/types/opencv/Matx.js.map +1 -0
- package/dist/src/types/opencv/Node.d.ts +25 -0
- package/dist/src/types/opencv/Node.js +3 -0
- package/dist/src/types/opencv/Node.js.map +1 -0
- package/dist/src/types/opencv/ORB.d.ts +11 -0
- package/dist/src/types/opencv/ORB.js +4 -0
- package/dist/src/types/opencv/ORB.js.map +1 -0
- package/dist/src/types/opencv/PCA.d.ts +170 -0
- package/dist/src/types/opencv/PCA.js +3 -0
- package/dist/src/types/opencv/PCA.js.map +1 -0
- package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
- package/dist/src/types/opencv/RotatedRect.js +3 -0
- package/dist/src/types/opencv/RotatedRect.js.map +1 -0
- package/dist/src/types/opencv/_hacks.d.ts +267 -0
- package/dist/src/types/opencv/_hacks.js +15 -0
- package/dist/src/types/opencv/_hacks.js.map +1 -0
- package/dist/src/types/opencv/_types.d.ts +44 -0
- package/dist/src/types/opencv/_types.js +61 -0
- package/dist/src/types/opencv/_types.js.map +1 -0
- package/dist/src/types/opencv/calib3d.d.ts +2180 -0
- package/dist/src/types/opencv/calib3d.js +3 -0
- package/dist/src/types/opencv/calib3d.js.map +1 -0
- package/dist/src/types/opencv/core_array.d.ts +2513 -0
- package/dist/src/types/opencv/core_array.js +3 -0
- package/dist/src/types/opencv/core_array.js.map +1 -0
- package/dist/src/types/opencv/core_cluster.d.ts +54 -0
- package/dist/src/types/opencv/core_cluster.js +3 -0
- package/dist/src/types/opencv/core_cluster.js.map +1 -0
- package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
- package/dist/src/types/opencv/core_hal_interface.js +3 -0
- package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
- package/dist/src/types/opencv/core_utils.d.ts +510 -0
- package/dist/src/types/opencv/core_utils.js +3 -0
- package/dist/src/types/opencv/core_utils.js.map +1 -0
- package/dist/src/types/opencv/dnn.d.ts +336 -0
- package/dist/src/types/opencv/dnn.js +3 -0
- package/dist/src/types/opencv/dnn.js.map +1 -0
- package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
- package/dist/src/types/opencv/features2d_draw.js +3 -0
- package/dist/src/types/opencv/features2d_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
- package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
- package/dist/src/types/opencv/imgproc_draw.js +3 -0
- package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
- package/dist/src/types/opencv/imgproc_feature.js +3 -0
- package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
- package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
- package/dist/src/types/opencv/imgproc_filter.js +3 -0
- package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
- package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
- package/dist/src/types/opencv/imgproc_hist.js +3 -0
- package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
- package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
- package/dist/src/types/opencv/imgproc_misc.js +3 -0
- package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
- package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
- package/dist/src/types/opencv/imgproc_object.js +3 -0
- package/dist/src/types/opencv/imgproc_object.js.map +1 -0
- package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
- package/dist/src/types/opencv/imgproc_shape.js +3 -0
- package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
- package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
- package/dist/src/types/opencv/imgproc_transform.js +3 -0
- package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
- package/dist/src/types/opencv/index.d.ts +4 -0
- package/dist/src/types/opencv/index.js +19 -0
- package/dist/src/types/opencv/index.js.map +1 -0
- package/dist/src/types/opencv/objdetect.d.ts +43 -0
- package/dist/src/types/opencv/objdetect.js +3 -0
- package/dist/src/types/opencv/objdetect.js.map +1 -0
- package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
- package/dist/src/types/opencv/photo_inpaint.js +3 -0
- package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
- package/dist/src/types/opencv/softdouble.d.ts +38 -0
- package/dist/src/types/opencv/softdouble.js +3 -0
- package/dist/src/types/opencv/softdouble.js.map +1 -0
- package/dist/src/types/opencv/softfloat.d.ts +38 -0
- package/dist/src/types/opencv/softfloat.js +3 -0
- package/dist/src/types/opencv/softfloat.js.map +1 -0
- package/dist/src/types/opencv/video_track.d.ts +276 -0
- package/dist/src/types/opencv/video_track.js +3 -0
- package/dist/src/types/opencv/video_track.js.map +1 -0
- package/package.json +5 -3
- package/src/index.ts +1 -0
- package/src/types/_cv.ts +6 -0
- package/src/types/emscripten.ts +286 -0
- package/src/types/opencv/Affine3.ts +206 -0
- package/src/types/opencv/Algorithm.ts +126 -0
- package/src/types/opencv/AutoBuffer.ts +50 -0
- package/src/types/opencv/BFMatcher.ts +37 -0
- package/src/types/opencv/BOWTrainer.ts +43 -0
- package/src/types/opencv/CascadeClassifier.ts +153 -0
- package/src/types/opencv/DescriptorMatcher.ts +244 -0
- package/src/types/opencv/DynamicBitset.ts +68 -0
- package/src/types/opencv/Exception.ts +54 -0
- package/src/types/opencv/Feature2D.ts +20 -0
- package/src/types/opencv/FlannBasedMatcher.ts +50 -0
- package/src/types/opencv/HOGDescriptor.ts +401 -0
- package/src/types/opencv/Logger.ts +34 -0
- package/src/types/opencv/LshTable.ts +81 -0
- package/src/types/opencv/Mat.ts +1764 -0
- package/src/types/opencv/MatExpr.ts +107 -0
- package/src/types/opencv/MatOp.ts +70 -0
- package/src/types/opencv/Matx.ts +228 -0
- package/src/types/opencv/Node.ts +33 -0
- package/src/types/opencv/ORB.ts +22 -0
- package/src/types/opencv/PCA.ts +204 -0
- package/src/types/opencv/RotatedRect.ts +72 -0
- package/src/types/opencv/_hacks.ts +322 -0
- package/src/types/opencv/_types.ts +44 -0
- package/src/types/opencv/calib3d.ts +2937 -0
- package/src/types/opencv/core_array.ts +3102 -0
- package/src/types/opencv/core_cluster.ts +81 -0
- package/src/types/opencv/core_hal_interface.ts +159 -0
- package/src/types/opencv/core_utils.ts +748 -0
- package/src/types/opencv/dnn.ts +505 -0
- package/src/types/opencv/features2d_draw.ts +114 -0
- package/src/types/opencv/imgproc_color_conversions.ts +527 -0
- package/src/types/opencv/imgproc_draw.ts +733 -0
- package/src/types/opencv/imgproc_feature.ts +681 -0
- package/src/types/opencv/imgproc_filter.ts +918 -0
- package/src/types/opencv/imgproc_hist.ts +399 -0
- package/src/types/opencv/imgproc_misc.ts +616 -0
- package/src/types/opencv/imgproc_object.ts +58 -0
- package/src/types/opencv/imgproc_shape.ts +734 -0
- package/src/types/opencv/imgproc_transform.ts +574 -0
- package/src/types/opencv/index.ts +4 -0
- package/src/types/opencv/objdetect.ts +103 -0
- package/src/types/opencv/photo_inpaint.ts +37 -0
- package/src/types/opencv/softdouble.ts +64 -0
- package/src/types/opencv/softfloat.ts +64 -0
- package/src/types/opencv/video_track.ts +372 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/opencv";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/opencv"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_cv.js","sourceRoot":"","sources":["../../../src/types/_cv.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
interface Lookup {
|
|
2
|
+
path: string;
|
|
3
|
+
node: FSNode;
|
|
4
|
+
}
|
|
5
|
+
interface FSStream {
|
|
6
|
+
}
|
|
7
|
+
interface FSNode {
|
|
8
|
+
}
|
|
9
|
+
export interface FS {
|
|
10
|
+
lookupPath(path: string, opts: any): Lookup;
|
|
11
|
+
getPath(node: FSNode): string;
|
|
12
|
+
isFile(mode: number): boolean;
|
|
13
|
+
isDir(mode: number): boolean;
|
|
14
|
+
isLink(mode: number): boolean;
|
|
15
|
+
isChrdev(mode: number): boolean;
|
|
16
|
+
isBlkdev(mode: number): boolean;
|
|
17
|
+
isFIFO(mode: number): boolean;
|
|
18
|
+
isSocket(mode: number): boolean;
|
|
19
|
+
major(dev: number): number;
|
|
20
|
+
minor(dev: number): number;
|
|
21
|
+
makedev(ma: number, mi: number): number;
|
|
22
|
+
registerDevice(dev: number, ops: any): void;
|
|
23
|
+
syncfs(populate: boolean, callback: (e: any) => any): void;
|
|
24
|
+
syncfs(callback: (e: any) => any, populate?: boolean): void;
|
|
25
|
+
mount(type: any, opts: any, mountpoint: string): any;
|
|
26
|
+
unmount(mountpoint: string): void;
|
|
27
|
+
mkdir(path: string, mode?: number): any;
|
|
28
|
+
mkdev(path: string, mode?: number, dev?: number): any;
|
|
29
|
+
symlink(oldpath: string, newpath: string): any;
|
|
30
|
+
rename(old_path: string, new_path: string): void;
|
|
31
|
+
rmdir(path: string): void;
|
|
32
|
+
readdir(path: string): string[];
|
|
33
|
+
unlink(path: string): void;
|
|
34
|
+
readlink(path: string): string;
|
|
35
|
+
stat(path: string, dontFollow?: boolean): any;
|
|
36
|
+
lstat(path: string): any;
|
|
37
|
+
chmod(path: string, mode: number, dontFollow?: boolean): void;
|
|
38
|
+
lchmod(path: string, mode: number): void;
|
|
39
|
+
fchmod(fd: number, mode: number): void;
|
|
40
|
+
chown(path: string, uid: number, gid: number, dontFollow?: boolean): void;
|
|
41
|
+
lchown(path: string, uid: number, gid: number): void;
|
|
42
|
+
fchown(fd: number, uid: number, gid: number): void;
|
|
43
|
+
truncate(path: string, len: number): void;
|
|
44
|
+
ftruncate(fd: number, len: number): void;
|
|
45
|
+
utime(path: string, atime: number, mtime: number): void;
|
|
46
|
+
open(path: string, flags: string, mode?: number, fd_start?: number, fd_end?: number): FSStream;
|
|
47
|
+
close(stream: FSStream): void;
|
|
48
|
+
llseek(stream: FSStream, offset: number, whence: number): any;
|
|
49
|
+
read(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number): number;
|
|
50
|
+
write(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number, canOwn?: boolean): number;
|
|
51
|
+
allocate(stream: FSStream, offset: number, length: number): void;
|
|
52
|
+
mmap(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position: number, prot: number, flags: number): any;
|
|
53
|
+
ioctl(stream: FSStream, cmd: any, arg: any): any;
|
|
54
|
+
readFile(path: string, opts?: {
|
|
55
|
+
encoding: string;
|
|
56
|
+
flags: string;
|
|
57
|
+
}): ArrayBufferView;
|
|
58
|
+
writeFile(path: string, data: ArrayBufferView, opts?: {
|
|
59
|
+
encoding: string;
|
|
60
|
+
flags: string;
|
|
61
|
+
}): void;
|
|
62
|
+
writeFile(path: string, data: string, opts?: {
|
|
63
|
+
encoding: string;
|
|
64
|
+
flags: string;
|
|
65
|
+
}): void;
|
|
66
|
+
analyzePath(p: string): any;
|
|
67
|
+
cwd(): string;
|
|
68
|
+
chdir(path: string): void;
|
|
69
|
+
init(input: () => number, output: (c: number) => any, error: (c: number) => any): void;
|
|
70
|
+
createLazyFile(parent: string, name: string, url: string, canRead: boolean, canWrite: boolean): FSNode;
|
|
71
|
+
createLazyFile(parent: FSNode, name: string, url: string, canRead: boolean, canWrite: boolean): FSNode;
|
|
72
|
+
createPreloadedFile(parent: string, name: string, url: string, canRead: boolean, canWrite: boolean, onload?: () => void, onerror?: () => void, dontCreateFile?: boolean, canOwn?: boolean): void;
|
|
73
|
+
createPreloadedFile(parent: FSNode, name: string, url: string, canRead: boolean, canWrite: boolean, onload?: () => void, onerror?: () => void, dontCreateFile?: boolean, canOwn?: boolean): void;
|
|
74
|
+
createDataFile(parent: string, name: string, data: ArrayBufferView, canRead: boolean, canWrite: boolean, canOwn: boolean): void;
|
|
75
|
+
}
|
|
76
|
+
export interface EmscriptenModule {
|
|
77
|
+
print(str: string): void;
|
|
78
|
+
printErr(str: string): void;
|
|
79
|
+
arguments: string[];
|
|
80
|
+
environment: EnvironmentType;
|
|
81
|
+
preInit: Array<{
|
|
82
|
+
(): void;
|
|
83
|
+
}>;
|
|
84
|
+
preRun: Array<{
|
|
85
|
+
(): void;
|
|
86
|
+
}>;
|
|
87
|
+
postRun: Array<{
|
|
88
|
+
(): void;
|
|
89
|
+
}>;
|
|
90
|
+
onAbort: {
|
|
91
|
+
(what: any): void;
|
|
92
|
+
};
|
|
93
|
+
onRuntimeInitialized: {
|
|
94
|
+
(): void;
|
|
95
|
+
};
|
|
96
|
+
preinitializedWebGLContext: WebGLRenderingContext;
|
|
97
|
+
noInitialRun: boolean;
|
|
98
|
+
noExitRuntime: boolean;
|
|
99
|
+
logReadFiles: boolean;
|
|
100
|
+
filePackagePrefixURL: string;
|
|
101
|
+
wasmBinary: ArrayBuffer;
|
|
102
|
+
destroy(object: object): void;
|
|
103
|
+
getPreloadedPackage(remotePackageName: string, remotePackageSize: number): ArrayBuffer;
|
|
104
|
+
instantiateWasm(imports: WebAssemblyImports, successCallback: (module: WebAssemblyModule) => void): WebAssemblyExports;
|
|
105
|
+
locateFile(url: string): string;
|
|
106
|
+
onCustomMessage(event: MessageEvent): void;
|
|
107
|
+
Runtime: any;
|
|
108
|
+
ccall(ident: string, returnType: ValueType | null, argTypes: ValueType[], args: TypeCompatibleWithC[], opts?: CCallOpts): any;
|
|
109
|
+
cwrap(ident: string, returnType: ValueType | null, argTypes: ValueType[], opts?: CCallOpts): (...args: any[]) => any;
|
|
110
|
+
setValue(ptr: number, value: any, type: string, noSafe?: boolean): void;
|
|
111
|
+
getValue(ptr: number, type: string, noSafe?: boolean): number;
|
|
112
|
+
ALLOC_NORMAL: number;
|
|
113
|
+
ALLOC_STACK: number;
|
|
114
|
+
ALLOC_STATIC: number;
|
|
115
|
+
ALLOC_DYNAMIC: number;
|
|
116
|
+
ALLOC_NONE: number;
|
|
117
|
+
allocate(slab: any, types: string | string[], allocator: number, ptr: number): number;
|
|
118
|
+
HEAP: Int32Array;
|
|
119
|
+
IHEAP: Int32Array;
|
|
120
|
+
FHEAP: Float64Array;
|
|
121
|
+
HEAP8: Int8Array;
|
|
122
|
+
HEAP16: Int16Array;
|
|
123
|
+
HEAP32: Int32Array;
|
|
124
|
+
HEAPU8: Uint8Array;
|
|
125
|
+
HEAPU16: Uint16Array;
|
|
126
|
+
HEAPU32: Uint32Array;
|
|
127
|
+
HEAPF32: Float32Array;
|
|
128
|
+
HEAPF64: Float64Array;
|
|
129
|
+
TOTAL_STACK: number;
|
|
130
|
+
TOTAL_MEMORY: number;
|
|
131
|
+
FAST_MEMORY: number;
|
|
132
|
+
addOnPreRun(cb: () => any): void;
|
|
133
|
+
addOnInit(cb: () => any): void;
|
|
134
|
+
addOnPreMain(cb: () => any): void;
|
|
135
|
+
addOnExit(cb: () => any): void;
|
|
136
|
+
addOnPostRun(cb: () => any): void;
|
|
137
|
+
intArrayFromString(stringy: string, dontAddNull?: boolean, length?: number): number[];
|
|
138
|
+
intArrayToString(array: number[]): string;
|
|
139
|
+
writeStringToMemory(str: string, buffer: number, dontAddNull: boolean): void;
|
|
140
|
+
writeArrayToMemory(array: number[], buffer: number): void;
|
|
141
|
+
writeAsciiToMemory(str: string, buffer: number, dontAddNull: boolean): void;
|
|
142
|
+
addRunDependency(id: any): void;
|
|
143
|
+
removeRunDependency(id: any): void;
|
|
144
|
+
preloadedImages: any;
|
|
145
|
+
preloadedAudios: any;
|
|
146
|
+
_malloc(size: number): number;
|
|
147
|
+
_free(ptr: number): void;
|
|
148
|
+
}
|
|
149
|
+
type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER";
|
|
150
|
+
type ValueType = "number" | "string" | "array" | "boolean";
|
|
151
|
+
type TypeCompatibleWithC = number | string | any[] | boolean;
|
|
152
|
+
type WebAssemblyImports = Array<{
|
|
153
|
+
name: string;
|
|
154
|
+
kind: string;
|
|
155
|
+
}>;
|
|
156
|
+
type WebAssemblyExports = Array<{
|
|
157
|
+
module: string;
|
|
158
|
+
name: string;
|
|
159
|
+
kind: string;
|
|
160
|
+
}>;
|
|
161
|
+
interface CCallOpts {
|
|
162
|
+
async?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface WebAssemblyModule {
|
|
165
|
+
}
|
|
166
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emscripten.js","sourceRoot":"","sources":["../../../src/types/emscripten.ts"],"names":[],"mappings":";;AA6RA,IAAI"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { float_type, int, Mat, Mat3, Mat4, Vec3 } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* It represents a 4x4 homogeneous transformation matrix `$T$`
|
|
4
|
+
*
|
|
5
|
+
* `\\[T = \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]`
|
|
6
|
+
*
|
|
7
|
+
* where `$R$` is a 3x3 rotation matrix and `$t$` is a 3x1 translation vector.
|
|
8
|
+
*
|
|
9
|
+
* You can specify `$R$` either by a 3x3 rotation matrix or by a 3x1 rotation vector, which is
|
|
10
|
+
* converted to a 3x3 rotation matrix by the Rodrigues formula.
|
|
11
|
+
*
|
|
12
|
+
* To construct a matrix `$T$` representing first rotation around the axis `$r$` with rotation angle
|
|
13
|
+
* `$|r|$` in radian (right hand rule) and then translation by the vector `$t$`, you can use
|
|
14
|
+
*
|
|
15
|
+
* ```cpp
|
|
16
|
+
* cv::Vec3f r, t;
|
|
17
|
+
* cv::Affine3f T(r, t);
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* If you already have the rotation matrix `$R$`, then you can use
|
|
21
|
+
*
|
|
22
|
+
* ```cpp
|
|
23
|
+
* cv::Matx33f R;
|
|
24
|
+
* cv::Affine3f T(R, t);
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* To extract the rotation matrix `$R$` from `$T$`, use
|
|
28
|
+
*
|
|
29
|
+
* ```cpp
|
|
30
|
+
* cv::Matx33f R = T.rotation();
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* To extract the translation vector `$t$` from `$T$`, use
|
|
34
|
+
*
|
|
35
|
+
* ```cpp
|
|
36
|
+
* cv::Vec3f t = T.translation();
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* To extract the rotation vector `$r$` from `$T$`, use
|
|
40
|
+
*
|
|
41
|
+
* ```cpp
|
|
42
|
+
* cv::Vec3f r = T.rvec();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Note that since the mapping from rotation vectors to rotation matrices is many to one. The returned
|
|
46
|
+
* rotation vector is not necessarily the one you used before to set the matrix.
|
|
47
|
+
*
|
|
48
|
+
* If you have two transformations `$T = T_1 * T_2$`, use
|
|
49
|
+
*
|
|
50
|
+
* ```cpp
|
|
51
|
+
* cv::Affine3f T, T1, T2;
|
|
52
|
+
* T = T2.concatenate(T1);
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* To get the inverse transform of `$T$`, use
|
|
56
|
+
*
|
|
57
|
+
* ```cpp
|
|
58
|
+
* cv::Affine3f T, T_inv;
|
|
59
|
+
* T_inv = T.inv();
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* Source:
|
|
63
|
+
* [opencv2/core/affine.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/core/affine.hpp#L129).
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
export declare class Affine3 {
|
|
67
|
+
matrix: Mat4;
|
|
68
|
+
constructor();
|
|
69
|
+
constructor(affine: Mat4);
|
|
70
|
+
/**
|
|
71
|
+
* The resulting 4x4 matrix is
|
|
72
|
+
*
|
|
73
|
+
* `\\[ \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]`
|
|
74
|
+
*
|
|
75
|
+
* @param R 3x3 rotation matrix.
|
|
76
|
+
*
|
|
77
|
+
* @param t 3x1 translation vector.
|
|
78
|
+
*/
|
|
79
|
+
constructor(R: Mat3, t?: Vec3);
|
|
80
|
+
/**
|
|
81
|
+
* Rodrigues vector.
|
|
82
|
+
*
|
|
83
|
+
* The last row of the current matrix is set to [0,0,0,1].
|
|
84
|
+
*
|
|
85
|
+
* @param rvec 3x1 rotation vector. Its direction indicates the rotation axis and its length
|
|
86
|
+
* indicates the rotation angle in radian (using right hand rule).
|
|
87
|
+
*
|
|
88
|
+
* @param t 3x1 translation vector.
|
|
89
|
+
*/
|
|
90
|
+
constructor(rvec: Vec3, t?: Vec3);
|
|
91
|
+
/**
|
|
92
|
+
* Combines all constructors above. Supports 4x4, 3x4, 3x3, 1x3, 3x1 sizes of data matrix.
|
|
93
|
+
*
|
|
94
|
+
* The last row of the current matrix is set to [0,0,0,1] when data is not 4x4.
|
|
95
|
+
*
|
|
96
|
+
* @param data 1-channel matrix. when it is 4x4, it is copied to the current matrix and t is not
|
|
97
|
+
* used. When it is 3x4, it is copied to the upper part 3x4 of the current matrix and t is not used.
|
|
98
|
+
* When it is 3x3, it is copied to the upper left 3x3 part of the current matrix. When it is 3x1 or
|
|
99
|
+
* 1x3, it is treated as a rotation vector and the Rodrigues formula is used to compute a 3x3 rotation
|
|
100
|
+
* matrix.
|
|
101
|
+
*
|
|
102
|
+
* @param t 3x1 translation vector. It is used only when data is neither 4x4 nor 3x4.
|
|
103
|
+
*/
|
|
104
|
+
constructor(data: Mat, t?: Vec3);
|
|
105
|
+
constructor(vals: float_type);
|
|
106
|
+
cast(arg401: any): Affine3;
|
|
107
|
+
concatenate(affine: Affine3): Affine3;
|
|
108
|
+
/**
|
|
109
|
+
* the inverse of the current matrix.
|
|
110
|
+
*/
|
|
111
|
+
inv(method?: int): Affine3;
|
|
112
|
+
/**
|
|
113
|
+
* Copy the 3x3 matrix L to the upper left part of the current matrix
|
|
114
|
+
*
|
|
115
|
+
* It sets the upper left 3x3 part of the matrix. The remaining part is unaffected.
|
|
116
|
+
*
|
|
117
|
+
* @param L 3x3 matrix.
|
|
118
|
+
*/
|
|
119
|
+
linear(L: Mat3): Mat3;
|
|
120
|
+
/**
|
|
121
|
+
* the upper left 3x3 part
|
|
122
|
+
*/
|
|
123
|
+
linear(): Mat3;
|
|
124
|
+
rotate(R: Mat3): Affine3;
|
|
125
|
+
rotate(rvec: Vec3): Affine3;
|
|
126
|
+
/**
|
|
127
|
+
* Rotation matrix.
|
|
128
|
+
*
|
|
129
|
+
* Copy the rotation matrix to the upper left 3x3 part of the current matrix. The remaining elements
|
|
130
|
+
* of the current matrix are not changed.
|
|
131
|
+
*
|
|
132
|
+
* @param R 3x3 rotation matrix.
|
|
133
|
+
*/
|
|
134
|
+
rotation(R: Mat3): Mat3;
|
|
135
|
+
/**
|
|
136
|
+
* Rodrigues vector.
|
|
137
|
+
*
|
|
138
|
+
* It sets the upper left 3x3 part of the matrix. The remaining part is unaffected.
|
|
139
|
+
*
|
|
140
|
+
* @param rvec 3x1 rotation vector. The direction indicates the rotation axis and its length
|
|
141
|
+
* indicates the rotation angle in radian (using the right thumb convention).
|
|
142
|
+
*/
|
|
143
|
+
rotation(rvec: Vec3): Vec3;
|
|
144
|
+
/**
|
|
145
|
+
* Combines rotation methods above. Supports 3x3, 1x3, 3x1 sizes of data matrix.
|
|
146
|
+
*
|
|
147
|
+
* It sets the upper left 3x3 part of the matrix. The remaining part is unaffected.
|
|
148
|
+
*
|
|
149
|
+
* @param data 1-channel matrix. When it is a 3x3 matrix, it sets the upper left 3x3 part of the
|
|
150
|
+
* current matrix. When it is a 1x3 or 3x1 matrix, it is used as a rotation vector. The Rodrigues
|
|
151
|
+
* formula is used to compute the rotation matrix and sets the upper left 3x3 part of the current
|
|
152
|
+
* matrix.
|
|
153
|
+
*/
|
|
154
|
+
rotation(data: Mat): Mat;
|
|
155
|
+
/**
|
|
156
|
+
* the upper left 3x3 part
|
|
157
|
+
*/
|
|
158
|
+
rotation(): Mat3;
|
|
159
|
+
/**
|
|
160
|
+
* Rodrigues vector.
|
|
161
|
+
*
|
|
162
|
+
* a vector representing the upper left 3x3 rotation matrix of the current matrix.
|
|
163
|
+
*
|
|
164
|
+
* Since the mapping between rotation vectors and rotation matrices is many to one, this function
|
|
165
|
+
* returns only one rotation vector that represents the current rotation matrix, which is not
|
|
166
|
+
* necessarily the same one set by `[rotation(const Vec3& rvec)]`.
|
|
167
|
+
*/
|
|
168
|
+
rvec(): Vec3;
|
|
169
|
+
translate(t: Vec3): Affine3;
|
|
170
|
+
/**
|
|
171
|
+
* Copy t to the first three elements of the last column of the current matrix
|
|
172
|
+
*
|
|
173
|
+
* It sets the upper right 3x1 part of the matrix. The remaining part is unaffected.
|
|
174
|
+
*
|
|
175
|
+
* @param t 3x1 translation vector.
|
|
176
|
+
*/
|
|
177
|
+
translation(t: Vec3): Vec3;
|
|
178
|
+
/**
|
|
179
|
+
* the upper right 3x1 part
|
|
180
|
+
*/
|
|
181
|
+
translation(): Vec3;
|
|
182
|
+
static Identity(): Affine3;
|
|
183
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Affine3.js","sourceRoot":"","sources":["../../../../src/types/opencv/Affine3.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { bool, EmscriptenEmbindInstance, FileNode, FileStorage, Ptr } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* especially for classes of algorithms, for which there can be multiple implementations. The examples
|
|
4
|
+
* are stereo correspondence (for which there are algorithms like block matching, semi-global block
|
|
5
|
+
* matching, graph-cut etc.), background subtraction (which can be done using mixture-of-gaussians
|
|
6
|
+
* models, codebook-based algorithm etc.), optical flow (block matching, Lucas-Kanade, Horn-Schunck
|
|
7
|
+
* etc.).
|
|
8
|
+
*
|
|
9
|
+
* Here is example of [SimpleBlobDetector](#d0/d7a/classcv_1_1SimpleBlobDetector}) use in your
|
|
10
|
+
* application via [Algorithm](#d3/d46/classcv_1_1Algorithm}) interface:
|
|
11
|
+
*
|
|
12
|
+
* ```cpp
|
|
13
|
+
* Ptr<Feature2D> sbd = SimpleBlobDetector::create();
|
|
14
|
+
* FileStorage fs_read("SimpleBlobDetector_params.xml", FileStorage::READ);
|
|
15
|
+
*
|
|
16
|
+
* if (fs_read.isOpened()) // if we have file with parameters, read them
|
|
17
|
+
* {
|
|
18
|
+
* sbd->read(fs_read.root());
|
|
19
|
+
* fs_read.release();
|
|
20
|
+
* }
|
|
21
|
+
* else // else modify the parameters and store them; user can later edit the file to use different
|
|
22
|
+
* parameters
|
|
23
|
+
* {
|
|
24
|
+
* fs_read.release();
|
|
25
|
+
* FileStorage fs_write("SimpleBlobDetector_params.xml", FileStorage::WRITE);
|
|
26
|
+
* sbd->write(fs_write);
|
|
27
|
+
* fs_write.release();
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* Mat result, image = imread("../data/detect_blob.png", IMREAD_COLOR);
|
|
31
|
+
* vector<KeyPoint> keypoints;
|
|
32
|
+
* sbd->detect(image, keypoints, Mat());
|
|
33
|
+
*
|
|
34
|
+
* drawKeypoints(image, keypoints, result);
|
|
35
|
+
* for (vector<KeyPoint>::iterator k = keypoints.begin(); k != keypoints.end(); ++k)
|
|
36
|
+
* circle(result, k->pt, (int)k->size, Scalar(0, 0, 255), 2);
|
|
37
|
+
*
|
|
38
|
+
* imshow("result", result);
|
|
39
|
+
* waitKey(0);
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* Source:
|
|
43
|
+
* [opencv2/core.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/core.hpp#L3077).
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare class Algorithm extends EmscriptenEmbindInstance {
|
|
47
|
+
constructor();
|
|
48
|
+
clear(): void;
|
|
49
|
+
empty(): bool;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the algorithm string identifier. This string is used as top level xml/yml node tag when
|
|
52
|
+
* the object is saved to a file or string.
|
|
53
|
+
*/
|
|
54
|
+
getDefaultName(): String;
|
|
55
|
+
read(fn: FileNode): FileNode;
|
|
56
|
+
/**
|
|
57
|
+
* Saves the algorithm to a file. In order to make this method work, the derived class must implement
|
|
58
|
+
* Algorithm::write(FileStorage& fs).
|
|
59
|
+
*/
|
|
60
|
+
save(filename: String): String;
|
|
61
|
+
write(fs: FileStorage): FileStorage;
|
|
62
|
+
write(fs: Ptr, name?: String): Ptr;
|
|
63
|
+
/**
|
|
64
|
+
* This is static template method of [Algorithm]. It's usage is following (in the case of SVM):
|
|
65
|
+
*
|
|
66
|
+
* ```cpp
|
|
67
|
+
* Ptr<SVM> svm = Algorithm::load<SVM>("my_svm_model.xml");
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* In order to make this method work, the derived class must overwrite [Algorithm::read](const
|
|
71
|
+
* [FileNode]& fn).
|
|
72
|
+
*
|
|
73
|
+
* @param filename Name of the file to read.
|
|
74
|
+
*
|
|
75
|
+
* @param objname The optional name of the node to read (if empty, the first top-level node will be
|
|
76
|
+
* used)
|
|
77
|
+
*/
|
|
78
|
+
static load(arg0: any, filename: String, objname?: String): Ptr;
|
|
79
|
+
/**
|
|
80
|
+
* This is static template method of [Algorithm]. It's usage is following (in the case of SVM):
|
|
81
|
+
*
|
|
82
|
+
* ```cpp
|
|
83
|
+
* Ptr<SVM> svm = Algorithm::loadFromString<SVM>(myStringModel);
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @param strModel The string variable containing the model you want to load.
|
|
87
|
+
*
|
|
88
|
+
* @param objname The optional name of the node to read (if empty, the first top-level node will be
|
|
89
|
+
* used)
|
|
90
|
+
*/
|
|
91
|
+
static loadFromString(arg1: any, strModel: String, objname?: String): Ptr;
|
|
92
|
+
/**
|
|
93
|
+
* This is static template method of [Algorithm]. It's usage is following (in the case of SVM):
|
|
94
|
+
*
|
|
95
|
+
* ```cpp
|
|
96
|
+
* cv::FileStorage fsRead("example.xml", FileStorage::READ);
|
|
97
|
+
* Ptr<SVM> svm = Algorithm::read<SVM>(fsRead.root());
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* In order to make this method work, the derived class must overwrite [Algorithm::read](const
|
|
101
|
+
* [FileNode]& fn) and also have static create() method without parameters (or with all the optional
|
|
102
|
+
* parameters)
|
|
103
|
+
*/
|
|
104
|
+
static read(arg2: any, fn: FileNode): Ptr;
|
|
105
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Algorithm.js","sourceRoot":"","sources":["../../../../src/types/opencv/Algorithm.ts"],"names":[],"mappings":";;AAAA,qCAMkB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { size_t } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* The class is used for temporary buffers in functions and methods. If a temporary buffer is usually
|
|
4
|
+
* small (a few K's of memory), but its size depends on the parameters, it makes sense to create a
|
|
5
|
+
* small fixed-size array on stack and use it if it's large enough. If the required buffer size is
|
|
6
|
+
* larger than the fixed size, another buffer of sufficient size is allocated dynamically and released
|
|
7
|
+
* after the processing. Therefore, in typical cases, when the buffer size is small, there is no
|
|
8
|
+
* overhead associated with malloc()/free(). At the same time, there is no limit on the size of
|
|
9
|
+
* processed data.
|
|
10
|
+
*
|
|
11
|
+
* This is what [AutoBuffer](#d8/dd0/classcv_1_1AutoBuffer}) does. The template takes 2 parameters -
|
|
12
|
+
* type of the buffer elements and the number of stack-allocated elements. Here is how the class is
|
|
13
|
+
* used:
|
|
14
|
+
*
|
|
15
|
+
* ```cpp
|
|
16
|
+
* void my_func(const cv::Mat& m)
|
|
17
|
+
* {
|
|
18
|
+
* cv::AutoBuffer<float> buf(1000); // create automatic buffer containing 1000 floats
|
|
19
|
+
*
|
|
20
|
+
* buf.allocate(m.rows); // if m.rows <= 1000, the pre-allocated buffer is used,
|
|
21
|
+
* // otherwise the buffer of "m.rows" floats will be allocated
|
|
22
|
+
* // dynamically and deallocated in cv::AutoBuffer destructor
|
|
23
|
+
* ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Source:
|
|
28
|
+
* [opencv2/core/utility.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/core/utility.hpp#L128).
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export declare class AutoBuffer {
|
|
32
|
+
constructor();
|
|
33
|
+
constructor(_size: size_t);
|
|
34
|
+
constructor(buf: AutoBuffer);
|
|
35
|
+
allocate(_size: size_t): void;
|
|
36
|
+
data(): any;
|
|
37
|
+
data(): any;
|
|
38
|
+
deallocate(): void;
|
|
39
|
+
resize(_size: size_t): void;
|
|
40
|
+
size(): size_t;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBuffer.js","sourceRoot":"","sources":["../../../../src/types/opencv/AutoBuffer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { bool, int, Ptr } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* For each descriptor in the first set, this matcher finds the closest descriptor in the second set by
|
|
4
|
+
* trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.
|
|
5
|
+
*
|
|
6
|
+
* Source:
|
|
7
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L1140).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare class BFMatcher {
|
|
11
|
+
constructor(normType?: int, crossCheck?: bool);
|
|
12
|
+
/**
|
|
13
|
+
* @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
|
|
14
|
+
* that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
|
|
15
|
+
* object copy with the current parameters but with empty train data.
|
|
16
|
+
*/
|
|
17
|
+
clone(emptyTrainData?: bool): Ptr;
|
|
18
|
+
isMaskSupported(): bool;
|
|
19
|
+
/**
|
|
20
|
+
* @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
|
|
21
|
+
* preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
|
|
22
|
+
* BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor
|
|
23
|
+
* description).
|
|
24
|
+
*
|
|
25
|
+
* @param crossCheck If it is false, this is will be default BFMatcher behaviour when it finds the k
|
|
26
|
+
* nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with
|
|
27
|
+
* k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the
|
|
28
|
+
* matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent
|
|
29
|
+
* pairs. Such technique usually produces best results with minimal number of outliers when there are
|
|
30
|
+
* enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
|
|
31
|
+
*/
|
|
32
|
+
static create(normType?: int, crossCheck?: bool): Ptr;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BFMatcher.js","sourceRoot":"","sources":["../../../../src/types/opencv/BFMatcher.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { int, Mat } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka,
|
|
4
|
+
* Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :
|
|
5
|
+
*
|
|
6
|
+
* Source:
|
|
7
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L1339).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare class BOWTrainer {
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* The training set is clustered using clustermethod to construct the vocabulary.
|
|
14
|
+
*
|
|
15
|
+
* @param descriptors Descriptors to add to a training set. Each row of the descriptors matrix is a
|
|
16
|
+
* descriptor.
|
|
17
|
+
*/
|
|
18
|
+
add(descriptors: Mat): Mat;
|
|
19
|
+
clear(): void;
|
|
20
|
+
/**
|
|
21
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
22
|
+
* function only in what argument(s) it accepts.
|
|
23
|
+
*/
|
|
24
|
+
cluster(): Mat;
|
|
25
|
+
/**
|
|
26
|
+
* The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first
|
|
27
|
+
* variant of the method, train descriptors stored in the object are clustered. In the second variant,
|
|
28
|
+
* input descriptors are clustered.
|
|
29
|
+
*
|
|
30
|
+
* @param descriptors Descriptors to cluster. Each row of the descriptors matrix is a descriptor.
|
|
31
|
+
* Descriptors are not added to the inner train descriptor set.
|
|
32
|
+
*/
|
|
33
|
+
cluster(descriptors: Mat): Mat;
|
|
34
|
+
descriptorsCount(): int;
|
|
35
|
+
getDescriptors(): Mat;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BOWTrainer.js","sourceRoot":"","sources":["../../../../src/types/opencv/BOWTrainer.ts"],"names":[],"mappings":""}
|