rm-gxf-computing-rusts 0.0.45 → 0.0.48
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/package.json +1 -1
- package/src/gfx.linux-x64-gnu.node +0 -0
- package/src/gfx.win32-x64-msvc.node +0 -0
- package/src/index.d.ts +223 -0
- package/src/index.js +3 -0
- package/src/main.js +3 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/src/index.d.ts
CHANGED
|
@@ -6,6 +6,17 @@ export declare class SquareBackfacePointCloudTest {
|
|
|
6
6
|
compute(): Array<number>
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
export declare class SquareHasObjectInFront {
|
|
10
|
+
constructor(option: HasObjectInFrontOptions)
|
|
11
|
+
push(data: ArgumentLine2): void
|
|
12
|
+
compute(): Array<number>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ArgumentBox3 {
|
|
16
|
+
min: Vector3F64
|
|
17
|
+
max: Vector3F64
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
export interface ArgumentBox3 {
|
|
10
21
|
min: Vector3F64
|
|
11
22
|
max: Vector3F64
|
|
@@ -16,6 +27,20 @@ export interface ArgumentBoxInfo {
|
|
|
16
27
|
positionArr: Array<Vector3F64>
|
|
17
28
|
}
|
|
18
29
|
|
|
30
|
+
export interface ArgumentBoxInfo {
|
|
31
|
+
box3: ArgumentBox3
|
|
32
|
+
positionArr: Array<Vector3F64>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ArgumentLine {
|
|
36
|
+
start?: Vector3F64
|
|
37
|
+
end?: Vector3F64
|
|
38
|
+
missingCheckResults: Array<Quads>
|
|
39
|
+
existSegments: Array<Quads>
|
|
40
|
+
intersectionSegments?: Array<Array<Index>>
|
|
41
|
+
objPositionArr?: Array<Array<number>>
|
|
42
|
+
}
|
|
43
|
+
|
|
19
44
|
export interface ArgumentLine {
|
|
20
45
|
start?: Vector3F64
|
|
21
46
|
end?: Vector3F64
|
|
@@ -32,6 +57,13 @@ export interface ArgumentLine2 {
|
|
|
32
57
|
existSegments: Array<Quads>
|
|
33
58
|
}
|
|
34
59
|
|
|
60
|
+
export interface ArgumentLine2 {
|
|
61
|
+
start?: Vector3F64
|
|
62
|
+
end?: Vector3F64
|
|
63
|
+
checkResults: Array<Quads>
|
|
64
|
+
existSegments: Array<Quads>
|
|
65
|
+
}
|
|
66
|
+
|
|
35
67
|
export declare function checkLineSideVisibility(option: CheckLineSideVisibilityOption): Array<number>
|
|
36
68
|
|
|
37
69
|
export interface CheckLineSideVisibilityOption {
|
|
@@ -41,6 +73,19 @@ export interface CheckLineSideVisibilityOption {
|
|
|
41
73
|
trajectorys: Record<string, Vector3F64>
|
|
42
74
|
}
|
|
43
75
|
|
|
76
|
+
export interface CheckLineSideVisibilityOption {
|
|
77
|
+
view?: boolean
|
|
78
|
+
pcdDir: string
|
|
79
|
+
lines: Array<Line>
|
|
80
|
+
trajectorys: Record<string, Vector3F64>
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface CheckResult {
|
|
84
|
+
originalVertices: Array<Square>
|
|
85
|
+
allCenterPoints: Array<Point>
|
|
86
|
+
offsets?: Array<number>
|
|
87
|
+
}
|
|
88
|
+
|
|
44
89
|
export interface CheckResult {
|
|
45
90
|
originalVertices: Array<Square>
|
|
46
91
|
allCenterPoints: Array<Point>
|
|
@@ -52,6 +97,17 @@ export interface DepthFilter {
|
|
|
52
97
|
depthThreshold: number
|
|
53
98
|
}
|
|
54
99
|
|
|
100
|
+
export interface DepthFilter {
|
|
101
|
+
searchRadius: number
|
|
102
|
+
depthThreshold: number
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface HasObjectInFrontOptions {
|
|
106
|
+
view?: boolean
|
|
107
|
+
lines: Array<ArgumentLine2>
|
|
108
|
+
boxInfos: Array<ArgumentBoxInfo>
|
|
109
|
+
}
|
|
110
|
+
|
|
55
111
|
export interface HasObjectInFrontOptions {
|
|
56
112
|
view?: boolean
|
|
57
113
|
lines: Array<ArgumentLine2>
|
|
@@ -63,6 +119,53 @@ export interface HasQquareBehindOptions {
|
|
|
63
119
|
lines: Array<ArgumentLine>
|
|
64
120
|
}
|
|
65
121
|
|
|
122
|
+
export interface HasQquareBehindOptions {
|
|
123
|
+
view?: boolean
|
|
124
|
+
lines: Array<ArgumentLine>
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface ImageInfo {
|
|
128
|
+
x: number
|
|
129
|
+
y: number
|
|
130
|
+
z: number
|
|
131
|
+
qx: number
|
|
132
|
+
qy: number
|
|
133
|
+
qz: number
|
|
134
|
+
qw: number
|
|
135
|
+
cq: number
|
|
136
|
+
fx: number
|
|
137
|
+
fy: number
|
|
138
|
+
cx: number
|
|
139
|
+
cy: number
|
|
140
|
+
width: number
|
|
141
|
+
height: number
|
|
142
|
+
dist: Array<number>
|
|
143
|
+
url: string
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface ImageInfo {
|
|
147
|
+
x: number
|
|
148
|
+
y: number
|
|
149
|
+
z: number
|
|
150
|
+
qx: number
|
|
151
|
+
qy: number
|
|
152
|
+
qz: number
|
|
153
|
+
qw: number
|
|
154
|
+
cq: number
|
|
155
|
+
fx: number
|
|
156
|
+
fy: number
|
|
157
|
+
cx: number
|
|
158
|
+
cy: number
|
|
159
|
+
width: number
|
|
160
|
+
height: number
|
|
161
|
+
dist: Array<number>
|
|
162
|
+
url: string
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface Index {
|
|
166
|
+
index: number
|
|
167
|
+
}
|
|
168
|
+
|
|
66
169
|
export interface Index {
|
|
67
170
|
index: number
|
|
68
171
|
}
|
|
@@ -77,12 +180,29 @@ export interface Line {
|
|
|
77
180
|
end: Vector3F64
|
|
78
181
|
}
|
|
79
182
|
|
|
183
|
+
export interface Line {
|
|
184
|
+
start: Vector3F64
|
|
185
|
+
end: Vector3F64
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface Line {
|
|
189
|
+
start: Vector3F64
|
|
190
|
+
end: Vector3F64
|
|
191
|
+
}
|
|
192
|
+
|
|
80
193
|
export interface LineData {
|
|
81
194
|
start: Vector3F64
|
|
82
195
|
end: Vector3F64
|
|
83
196
|
checkResults: Array<CheckResult>
|
|
84
197
|
}
|
|
85
198
|
|
|
199
|
+
export interface LineData {
|
|
200
|
+
start: Vector3F64
|
|
201
|
+
end: Vector3F64
|
|
202
|
+
checkResults: Array<CheckResult>
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** 模型 缩略图 */
|
|
86
206
|
export declare function modelPreview(option: Parameter): ModelPreviewResults
|
|
87
207
|
|
|
88
208
|
export interface ModelPreviewResults {
|
|
@@ -91,6 +211,41 @@ export interface ModelPreviewResults {
|
|
|
91
211
|
height: number
|
|
92
212
|
}
|
|
93
213
|
|
|
214
|
+
export interface ModelPreviewResults {
|
|
215
|
+
data: Array<number>
|
|
216
|
+
width: number
|
|
217
|
+
height: number
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** 着色全景 */
|
|
221
|
+
export declare function panorama(option: PanoramaOption): PanoramaResults
|
|
222
|
+
|
|
223
|
+
export interface PanoramaOption {
|
|
224
|
+
view?: boolean
|
|
225
|
+
imageGroups: Array<Array<ImageInfo>>
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface PanoramaOption {
|
|
229
|
+
view?: boolean
|
|
230
|
+
imageGroups: Array<Array<ImageInfo>>
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface PanoramaResults {
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface PanoramaResults {
|
|
238
|
+
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface Parameter {
|
|
242
|
+
view?: boolean
|
|
243
|
+
width: number
|
|
244
|
+
height: number
|
|
245
|
+
url: string
|
|
246
|
+
outUrl?: string
|
|
247
|
+
}
|
|
248
|
+
|
|
94
249
|
export interface Parameter {
|
|
95
250
|
view?: boolean
|
|
96
251
|
width: number
|
|
@@ -107,6 +262,19 @@ export interface PcBackfaceTestOptions {
|
|
|
107
262
|
distProjection: boolean
|
|
108
263
|
}
|
|
109
264
|
|
|
265
|
+
export interface PcBackfaceTestOptions {
|
|
266
|
+
view?: boolean
|
|
267
|
+
pcdDir: string
|
|
268
|
+
lines: LineDataList
|
|
269
|
+
trajectorys: Record<string, Trajectory>
|
|
270
|
+
distProjection: boolean
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface Quads {
|
|
274
|
+
originalVertices: Array<Array<Vector3F64>>
|
|
275
|
+
allCenterPoints: Array<Vector3F64>
|
|
276
|
+
}
|
|
277
|
+
|
|
110
278
|
export interface Quads {
|
|
111
279
|
originalVertices: Array<Array<Vector3F64>>
|
|
112
280
|
allCenterPoints: Array<Vector3F64>
|
|
@@ -118,6 +286,13 @@ export interface Results {
|
|
|
118
286
|
objIds: Array<Array<string>>
|
|
119
287
|
}
|
|
120
288
|
|
|
289
|
+
export interface Results {
|
|
290
|
+
results: Array<Array<Array<number>>>
|
|
291
|
+
positions: Array<Vector3F64>
|
|
292
|
+
objIds: Array<Array<string>>
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** 通过图片对点云投影采样 */
|
|
121
296
|
export declare function samplePointsByImage(option: SamplePointsByImageOption): Results
|
|
122
297
|
|
|
123
298
|
export interface SamplePointsByImageOption {
|
|
@@ -146,8 +321,39 @@ export interface SamplePointsByImageOption {
|
|
|
146
321
|
edgeCorrosionSize?: number
|
|
147
322
|
}
|
|
148
323
|
|
|
324
|
+
export interface SamplePointsByImageOption {
|
|
325
|
+
view?: boolean
|
|
326
|
+
/** pcd url,pcd_chunk为true时,该值为目录 */
|
|
327
|
+
pcdPath: string
|
|
328
|
+
/** 是否使用pcd片段 */
|
|
329
|
+
pcdChunk?: boolean
|
|
330
|
+
/** 图片url列表 */
|
|
331
|
+
imageUrls: Array<string>
|
|
332
|
+
/** 点云z轴小于该值的过滤掉 */
|
|
333
|
+
minZ?: number
|
|
334
|
+
/** 当前使用版本 */
|
|
335
|
+
version?: string
|
|
336
|
+
/** 点云蔟过滤 */
|
|
337
|
+
clusterFilter?: boolean
|
|
338
|
+
/** 点云蔟分类距离 */
|
|
339
|
+
distanceThreshold?: number
|
|
340
|
+
/** 深度过滤 */
|
|
341
|
+
depthFilter?: DepthFilter
|
|
342
|
+
/** 过滤类型列表 */
|
|
343
|
+
excludeCategoryList?: Array<string>
|
|
344
|
+
/** 形状使用轮廓 */
|
|
345
|
+
contourMode?: boolean
|
|
346
|
+
/** 边缘腐蚀大小 */
|
|
347
|
+
edgeCorrosionSize?: number
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** 检测小方块背面是否有点云 */
|
|
351
|
+
export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
|
|
352
|
+
|
|
353
|
+
/** 检测 小方块 前面是否有 box 且没有其他小方块 */
|
|
149
354
|
export declare function squareHasObjectInFront(option: HasObjectInFrontOptions): Array<number>
|
|
150
355
|
|
|
356
|
+
/** 检测 小方块 是否被 其他小方块遮挡 */
|
|
151
357
|
export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
|
|
152
358
|
|
|
153
359
|
export interface Trajectory {
|
|
@@ -160,6 +366,23 @@ export interface Trajectory {
|
|
|
160
366
|
qw: number
|
|
161
367
|
}
|
|
162
368
|
|
|
369
|
+
export interface Trajectory {
|
|
370
|
+
x: number
|
|
371
|
+
y: number
|
|
372
|
+
z: number
|
|
373
|
+
qx: number
|
|
374
|
+
qy: number
|
|
375
|
+
qz: number
|
|
376
|
+
qw: number
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/** 三维向量,包含 x、y、z 分量 */
|
|
380
|
+
export interface Vector3F64 {
|
|
381
|
+
x: number
|
|
382
|
+
y: number
|
|
383
|
+
z: number
|
|
384
|
+
}
|
|
385
|
+
|
|
163
386
|
/** 三维向量,包含 x、y、z 分量 */
|
|
164
387
|
export interface Vector3F64 {
|
|
165
388
|
x: number
|
package/src/index.js
CHANGED
|
@@ -588,8 +588,11 @@ if (!nativeBinding) {
|
|
|
588
588
|
|
|
589
589
|
module.exports = nativeBinding
|
|
590
590
|
module.exports.SquareBackfacePointCloudTest = nativeBinding.SquareBackfacePointCloudTest
|
|
591
|
+
module.exports.SquareHasObjectInFront = nativeBinding.SquareHasObjectInFront
|
|
591
592
|
module.exports.checkLineSideVisibility = nativeBinding.checkLineSideVisibility
|
|
592
593
|
module.exports.modelPreview = nativeBinding.modelPreview
|
|
594
|
+
module.exports.panorama = nativeBinding.panorama
|
|
593
595
|
module.exports.samplePointsByImage = nativeBinding.samplePointsByImage
|
|
596
|
+
module.exports.squareBackfacePointCloudTest = nativeBinding.squareBackfacePointCloudTest
|
|
594
597
|
module.exports.squareHasObjectInFront = nativeBinding.squareHasObjectInFront
|
|
595
598
|
module.exports.squareHasSquareBehind = nativeBinding.squareHasSquareBehind
|
package/src/main.js
CHANGED
|
@@ -184,4 +184,7 @@ module.exports.squareHasSquareBehind = squareHasSquareBehind
|
|
|
184
184
|
module.exports.samplePointsByImage = samplePointsByImage
|
|
185
185
|
module.exports.modelPreview = modelPreview
|
|
186
186
|
module.exports.squareHasObjectInFront = gxf.squareHasObjectInFront
|
|
187
|
+
module.exports.panorama = gxf.panorama
|
|
187
188
|
module.exports.SquareBackfacePointCloudTest = gxf.SquareBackfacePointCloudTest
|
|
189
|
+
module.exports.SquareHasObjectInFront = gxf.SquareHasObjectInFront
|
|
190
|
+
|