@srsergio/taptapp-ar 1.0.0 → 1.0.3
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/README.md +102 -26
- package/dist/compiler/aframe.js +0 -3
- package/dist/compiler/compiler-base.d.ts +3 -7
- package/dist/compiler/compiler-base.js +28 -14
- package/dist/compiler/compiler.js +1 -1
- package/dist/compiler/compiler.worker.js +1 -1
- package/dist/compiler/controller.js +4 -5
- package/dist/compiler/controller.worker.js +0 -2
- package/dist/compiler/detector/crop-detector.js +0 -2
- package/dist/compiler/detector/detector-lite.d.ts +73 -0
- package/dist/compiler/detector/detector-lite.js +430 -0
- package/dist/compiler/detector/detector.js +236 -243
- package/dist/compiler/detector/kernels/cpu/binomialFilter.js +0 -1
- package/dist/compiler/detector/kernels/cpu/computeLocalization.js +0 -4
- package/dist/compiler/detector/kernels/cpu/computeOrientationHistograms.js +0 -18
- package/dist/compiler/detector/kernels/cpu/fakeShader.js +1 -1
- package/dist/compiler/detector/kernels/cpu/prune.d.ts +7 -1
- package/dist/compiler/detector/kernels/cpu/prune.js +1 -42
- package/dist/compiler/detector/kernels/webgl/upsampleBilinear.js +2 -2
- package/dist/compiler/estimation/refine-estimate.js +0 -1
- package/dist/compiler/estimation/utils.d.ts +1 -1
- package/dist/compiler/estimation/utils.js +1 -14
- package/dist/compiler/image-list.js +4 -4
- package/dist/compiler/input-loader.js +2 -2
- package/dist/compiler/matching/hamming-distance.js +13 -13
- package/dist/compiler/matching/hierarchical-clustering.js +1 -1
- package/dist/compiler/matching/matching.d.ts +20 -4
- package/dist/compiler/matching/matching.js +67 -41
- package/dist/compiler/matching/ransacHomography.js +1 -2
- package/dist/compiler/node-worker.d.ts +1 -0
- package/dist/compiler/node-worker.js +84 -0
- package/dist/compiler/offline-compiler.d.ts +171 -6
- package/dist/compiler/offline-compiler.js +303 -421
- package/dist/compiler/tensorflow-setup.js +27 -1
- package/dist/compiler/three.js +3 -5
- package/dist/compiler/tracker/extract.d.ts +1 -0
- package/dist/compiler/tracker/extract.js +200 -244
- package/dist/compiler/tracker/tracker.d.ts +1 -1
- package/dist/compiler/tracker/tracker.js +13 -18
- package/dist/compiler/utils/cumsum.d.ts +4 -2
- package/dist/compiler/utils/cumsum.js +17 -19
- package/dist/compiler/utils/gpu-compute.d.ts +57 -0
- package/dist/compiler/utils/gpu-compute.js +262 -0
- package/dist/compiler/utils/images.d.ts +4 -4
- package/dist/compiler/utils/images.js +67 -53
- package/dist/compiler/utils/worker-pool.d.ts +14 -0
- package/dist/compiler/utils/worker-pool.js +84 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/package.json +19 -13
- package/src/compiler/aframe.js +2 -4
- package/src/compiler/compiler-base.js +29 -14
- package/src/compiler/compiler.js +1 -1
- package/src/compiler/compiler.worker.js +1 -1
- package/src/compiler/controller.js +4 -5
- package/src/compiler/controller.worker.js +0 -2
- package/src/compiler/detector/crop-detector.js +0 -2
- package/src/compiler/detector/detector-lite.js +494 -0
- package/src/compiler/detector/detector.js +1052 -1063
- package/src/compiler/detector/kernels/cpu/binomialFilter.js +0 -1
- package/src/compiler/detector/kernels/cpu/computeLocalization.js +0 -4
- package/src/compiler/detector/kernels/cpu/computeOrientationHistograms.js +0 -17
- package/src/compiler/detector/kernels/cpu/fakeShader.js +1 -1
- package/src/compiler/detector/kernels/cpu/prune.js +1 -37
- package/src/compiler/detector/kernels/webgl/upsampleBilinear.js +2 -2
- package/src/compiler/estimation/refine-estimate.js +0 -1
- package/src/compiler/estimation/utils.js +9 -24
- package/src/compiler/image-list.js +4 -4
- package/src/compiler/input-loader.js +2 -2
- package/src/compiler/matching/hamming-distance.js +11 -15
- package/src/compiler/matching/hierarchical-clustering.js +1 -1
- package/src/compiler/matching/matching.js +72 -42
- package/src/compiler/matching/ransacHomography.js +0 -2
- package/src/compiler/node-worker.js +93 -0
- package/src/compiler/offline-compiler.js +339 -504
- package/src/compiler/tensorflow-setup.js +29 -1
- package/src/compiler/three.js +3 -5
- package/src/compiler/tracker/extract.js +211 -267
- package/src/compiler/tracker/tracker.js +13 -22
- package/src/compiler/utils/cumsum.js +17 -19
- package/src/compiler/utils/gpu-compute.js +303 -0
- package/src/compiler/utils/images.js +84 -53
- package/src/compiler/utils/worker-pool.js +89 -0
- package/src/index.ts +0 -2
- package/src/compiler/estimation/esimate-experiment.js +0 -316
- package/src/compiler/estimation/refine-estimate-experiment.js +0 -512
- package/src/react/AREditor.tsx +0 -394
- package/src/react/ProgressDialog.tsx +0 -185
|
@@ -1,10 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Compilador offline optimizado sin TensorFlow
|
|
3
|
+
*/
|
|
4
|
+
export class OfflineCompiler {
|
|
5
|
+
data: any;
|
|
6
|
+
workerPool: import("./utils/worker-pool.js").WorkerPool | null;
|
|
7
|
+
_initNodeWorkers(): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Compila una lista de imágenes objetivo
|
|
10
|
+
* @param {Array} images - Lista de imágenes {width, height, data}
|
|
11
|
+
* @param {Function} progressCallback - Callback de progreso (0-100)
|
|
12
|
+
* @returns {Promise<Array>} Datos compilados
|
|
13
|
+
*/
|
|
14
|
+
compileImageTargets(images: any[], progressCallback: Function): Promise<any[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Compila datos de matching usando DetectorLite (JS puro)
|
|
17
|
+
*/
|
|
18
|
+
_compileMatch(targetImages: any, progressCallback: any): Promise<{
|
|
19
|
+
maximaPoints: any[];
|
|
20
|
+
minimaPoints: any[];
|
|
21
|
+
maximaPointsCluster: {
|
|
22
|
+
rootNode: {
|
|
23
|
+
centerPointIndex: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
minimaPointsCluster: {
|
|
27
|
+
rootNode: {
|
|
28
|
+
centerPointIndex: any;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
width: any;
|
|
32
|
+
height: any;
|
|
33
|
+
scale: any;
|
|
34
|
+
}[][]>;
|
|
35
|
+
/**
|
|
36
|
+
* Compila datos de tracking usando extractTrackingFeatures (JS puro)
|
|
37
|
+
*/
|
|
38
|
+
_compileTrack(targetImages: any, progressCallback: any): Promise<Object[][]>;
|
|
39
|
+
/**
|
|
40
|
+
* Método público para compilar tracking (compatibilidad con API anterior)
|
|
41
|
+
* @param {Object} options - Opciones de compilación
|
|
42
|
+
* @param {Function} options.progressCallback - Callback de progreso
|
|
43
|
+
* @param {Array} options.targetImages - Lista de imágenes objetivo
|
|
44
|
+
* @param {number} options.basePercent - Porcentaje base
|
|
45
|
+
* @returns {Promise<Array>} Datos de tracking
|
|
46
|
+
*/
|
|
4
47
|
compileTrack({ progressCallback, targetImages, basePercent }: {
|
|
48
|
+
progressCallback: Function;
|
|
49
|
+
targetImages: any[];
|
|
50
|
+
basePercent: number;
|
|
51
|
+
}): Promise<any[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Método público para compilar matching (compatibilidad con API anterior)
|
|
54
|
+
*/
|
|
55
|
+
compileMatch({ progressCallback, targetImages, basePercent }: {
|
|
5
56
|
progressCallback: any;
|
|
6
57
|
targetImages: any;
|
|
7
|
-
basePercent
|
|
8
|
-
}): Promise<
|
|
58
|
+
basePercent?: number | undefined;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
maximaPoints: any[];
|
|
61
|
+
minimaPoints: any[];
|
|
62
|
+
maximaPointsCluster: {
|
|
63
|
+
rootNode: {
|
|
64
|
+
centerPointIndex: any;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
minimaPointsCluster: {
|
|
68
|
+
rootNode: {
|
|
69
|
+
centerPointIndex: any;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
width: any;
|
|
73
|
+
height: any;
|
|
74
|
+
scale: any;
|
|
75
|
+
}[][]>;
|
|
76
|
+
/**
|
|
77
|
+
* Exporta datos compilados en formato binario columnar optimizado
|
|
78
|
+
*/
|
|
79
|
+
exportData(): Uint8Array<ArrayBuffer>;
|
|
80
|
+
_packKeyframe(kf: any): {
|
|
81
|
+
w: any;
|
|
82
|
+
h: any;
|
|
83
|
+
s: any;
|
|
84
|
+
max: {
|
|
85
|
+
x: Float32Array<any>;
|
|
86
|
+
y: Float32Array<any>;
|
|
87
|
+
a: Float32Array<any>;
|
|
88
|
+
d: Uint8Array<ArrayBuffer>;
|
|
89
|
+
t: any[];
|
|
90
|
+
};
|
|
91
|
+
min: {
|
|
92
|
+
x: Float32Array<any>;
|
|
93
|
+
y: Float32Array<any>;
|
|
94
|
+
a: Float32Array<any>;
|
|
95
|
+
d: Uint8Array<ArrayBuffer>;
|
|
96
|
+
t: any[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
_columnarize(points: any, tree: any): {
|
|
100
|
+
x: Float32Array<any>;
|
|
101
|
+
y: Float32Array<any>;
|
|
102
|
+
a: Float32Array<any>;
|
|
103
|
+
d: Uint8Array<ArrayBuffer>;
|
|
104
|
+
t: any[];
|
|
105
|
+
};
|
|
106
|
+
_compactTree(node: any): any[];
|
|
107
|
+
/**
|
|
108
|
+
* Importa datos - Mantiene el formato columnar para máximo rendimiento (Zero-copy)
|
|
109
|
+
*/
|
|
110
|
+
importData(buffer: any): any;
|
|
111
|
+
_unpackKeyframe(kf: any): {
|
|
112
|
+
width: any;
|
|
113
|
+
height: any;
|
|
114
|
+
scale: any;
|
|
115
|
+
maximaPoints: {
|
|
116
|
+
x: any;
|
|
117
|
+
y: any;
|
|
118
|
+
angle: any;
|
|
119
|
+
descriptors: any;
|
|
120
|
+
}[];
|
|
121
|
+
minimaPoints: {
|
|
122
|
+
x: any;
|
|
123
|
+
y: any;
|
|
124
|
+
angle: any;
|
|
125
|
+
descriptors: any;
|
|
126
|
+
}[];
|
|
127
|
+
maximaPointsCluster: {
|
|
128
|
+
rootNode: {
|
|
129
|
+
leaf: boolean;
|
|
130
|
+
centerPointIndex: any;
|
|
131
|
+
pointIndexes: any;
|
|
132
|
+
children?: undefined;
|
|
133
|
+
} | {
|
|
134
|
+
leaf: boolean;
|
|
135
|
+
centerPointIndex: any;
|
|
136
|
+
children: any;
|
|
137
|
+
pointIndexes?: undefined;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
minimaPointsCluster: {
|
|
141
|
+
rootNode: {
|
|
142
|
+
leaf: boolean;
|
|
143
|
+
centerPointIndex: any;
|
|
144
|
+
pointIndexes: any;
|
|
145
|
+
children?: undefined;
|
|
146
|
+
} | {
|
|
147
|
+
leaf: boolean;
|
|
148
|
+
centerPointIndex: any;
|
|
149
|
+
children: any;
|
|
150
|
+
pointIndexes?: undefined;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
_decolumnarize(col: any): {
|
|
155
|
+
x: any;
|
|
156
|
+
y: any;
|
|
157
|
+
angle: any;
|
|
158
|
+
descriptors: any;
|
|
159
|
+
}[];
|
|
160
|
+
_expandTree(node: any): {
|
|
161
|
+
leaf: boolean;
|
|
162
|
+
centerPointIndex: any;
|
|
163
|
+
pointIndexes: any;
|
|
164
|
+
children?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
leaf: boolean;
|
|
167
|
+
centerPointIndex: any;
|
|
168
|
+
children: any;
|
|
169
|
+
pointIndexes?: undefined;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Destruye el pool de workers
|
|
173
|
+
*/
|
|
174
|
+
destroy(): Promise<void>;
|
|
9
175
|
}
|
|
10
|
-
import { CompilerBase } from "./compiler-base.js";
|