rm-gxf-computing-rusts 0.0.24 → 0.0.26
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 +146 -4
- package/src/index.js +1 -1
- package/src/main.js +3 -3
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/src/index.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ export interface CheckLineSideVisibilityOption {
|
|
|
9
9
|
trajectorys: Record<string, Vector3F64>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface CheckLineSideVisibilityOption {
|
|
13
|
+
view?: boolean
|
|
14
|
+
pcdDir: string
|
|
15
|
+
lines: Array<Line>
|
|
16
|
+
trajectorys: Record<string, Vector3F64>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CheckResult {
|
|
20
|
+
originalVertices: Array<Square>
|
|
21
|
+
allCenterPoints: Array<Point>
|
|
22
|
+
offsets?: Array<number>
|
|
23
|
+
}
|
|
24
|
+
|
|
12
25
|
export interface CheckResult {
|
|
13
26
|
originalVertices: Array<Square>
|
|
14
27
|
allCenterPoints: Array<Point>
|
|
@@ -25,6 +38,30 @@ export interface DepthFilter {
|
|
|
25
38
|
depthThreshold: number
|
|
26
39
|
}
|
|
27
40
|
|
|
41
|
+
export interface DepthFilter {
|
|
42
|
+
searchRadius: number
|
|
43
|
+
depthThreshold: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface DepthFilter {
|
|
47
|
+
searchRadius: number
|
|
48
|
+
depthThreshold: number
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface HasQquareBehindOptions {
|
|
52
|
+
view?: boolean
|
|
53
|
+
lines: Array<ParseLineResult>
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface HasQquareBehindOptions {
|
|
57
|
+
view?: boolean
|
|
58
|
+
lines: Array<ParseLineResult>
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface Index {
|
|
62
|
+
index: number
|
|
63
|
+
}
|
|
64
|
+
|
|
28
65
|
export interface Index {
|
|
29
66
|
index: number
|
|
30
67
|
}
|
|
@@ -39,6 +76,22 @@ export interface Line {
|
|
|
39
76
|
end: Vector3F64
|
|
40
77
|
}
|
|
41
78
|
|
|
79
|
+
export interface Line {
|
|
80
|
+
start: Vector3F64
|
|
81
|
+
end: Vector3F64
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface Line {
|
|
85
|
+
start: Vector3F64
|
|
86
|
+
end: Vector3F64
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface LineData {
|
|
90
|
+
start: Vector3F64
|
|
91
|
+
end: Vector3F64
|
|
92
|
+
checkResults: Array<CheckResult>
|
|
93
|
+
}
|
|
94
|
+
|
|
42
95
|
export interface LineData {
|
|
43
96
|
start: Vector3F64
|
|
44
97
|
end: Vector3F64
|
|
@@ -53,6 +106,22 @@ export interface ParseLineResult {
|
|
|
53
106
|
intersectionSegments: Array<Array<Index>>
|
|
54
107
|
}
|
|
55
108
|
|
|
109
|
+
export interface ParseLineResult {
|
|
110
|
+
start?: Vector3F64
|
|
111
|
+
end?: Vector3F64
|
|
112
|
+
missingCheckResults: Array<Quads>
|
|
113
|
+
existSegments: Array<Quads>
|
|
114
|
+
intersectionSegments: Array<Array<Index>>
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface PcBackfaceTestOptions {
|
|
118
|
+
view?: boolean
|
|
119
|
+
pcdDir: string
|
|
120
|
+
lines: LineDataList
|
|
121
|
+
trajectorys: Record<string, Trajectory>
|
|
122
|
+
distProjection: boolean
|
|
123
|
+
}
|
|
124
|
+
|
|
56
125
|
export interface PcBackfaceTestOptions {
|
|
57
126
|
view?: boolean
|
|
58
127
|
pcdDir: string
|
|
@@ -84,6 +153,23 @@ export interface Quads {
|
|
|
84
153
|
allCenterPoints: Array<Vector3F64>
|
|
85
154
|
}
|
|
86
155
|
|
|
156
|
+
export interface Quads {
|
|
157
|
+
originalVertices: Array<Array<Vector3F64>>
|
|
158
|
+
allCenterPoints: Array<Vector3F64>
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface Results {
|
|
162
|
+
results: Array<Array<Array<number>>>
|
|
163
|
+
positions: Array<Vector3F64>
|
|
164
|
+
objIds: Array<Array<string>>
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface Results {
|
|
168
|
+
results: Array<Array<Array<number>>>
|
|
169
|
+
positions: Array<Vector3F64>
|
|
170
|
+
objIds: Array<Array<string>>
|
|
171
|
+
}
|
|
172
|
+
|
|
87
173
|
export interface Results {
|
|
88
174
|
results: Array<Array<Array<number>>>
|
|
89
175
|
positions: Array<Vector3F64>
|
|
@@ -142,13 +228,62 @@ export interface SamplePointsByImageOption {
|
|
|
142
228
|
excludeCategoryList?: Array<string>
|
|
143
229
|
}
|
|
144
230
|
|
|
231
|
+
export interface SamplePointsByImageOption {
|
|
232
|
+
view?: boolean
|
|
233
|
+
/** pcd url,pcd_chunk为true时,该值为目录 */
|
|
234
|
+
pcdPath: string
|
|
235
|
+
/** 是否使用pcd片段 */
|
|
236
|
+
pcdChunk?: boolean
|
|
237
|
+
/** 图片url列表 */
|
|
238
|
+
imageUrls: Array<string>
|
|
239
|
+
/** 点云z轴小于该值的过滤掉 */
|
|
240
|
+
minZ?: number
|
|
241
|
+
/** 当前使用版本 */
|
|
242
|
+
version?: string
|
|
243
|
+
/** 点云蔟过滤 */
|
|
244
|
+
clusterFilter?: boolean
|
|
245
|
+
/** 点云蔟分类距离 */
|
|
246
|
+
distanceThreshold?: number
|
|
247
|
+
/** 深度过滤 */
|
|
248
|
+
depthFilter?: DepthFilter
|
|
249
|
+
/** 过滤类型列表 */
|
|
250
|
+
excludeCategoryList?: Array<string>
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface SamplePointsByImageOption {
|
|
254
|
+
view?: boolean
|
|
255
|
+
/** pcd url,pcd_chunk为true时,该值为目录 */
|
|
256
|
+
pcdPath: string
|
|
257
|
+
/** 是否使用pcd片段 */
|
|
258
|
+
pcdChunk?: boolean
|
|
259
|
+
/** 图片url列表 */
|
|
260
|
+
imageUrls: Array<string>
|
|
261
|
+
/** 点云z轴小于该值的过滤掉 */
|
|
262
|
+
minZ?: number
|
|
263
|
+
/** 当前使用版本 */
|
|
264
|
+
version?: string
|
|
265
|
+
/** 点云蔟过滤 */
|
|
266
|
+
clusterFilter?: boolean
|
|
267
|
+
/** 点云蔟分类距离 */
|
|
268
|
+
distanceThreshold?: number
|
|
269
|
+
/** 深度过滤 */
|
|
270
|
+
depthFilter?: DepthFilter
|
|
271
|
+
/** 过滤类型列表 */
|
|
272
|
+
excludeCategoryList?: Array<string>
|
|
273
|
+
}
|
|
274
|
+
|
|
145
275
|
export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
|
|
146
276
|
|
|
147
|
-
export declare function
|
|
277
|
+
export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
|
|
148
278
|
|
|
149
|
-
export interface
|
|
150
|
-
|
|
151
|
-
|
|
279
|
+
export interface Trajectory {
|
|
280
|
+
x: number
|
|
281
|
+
y: number
|
|
282
|
+
z: number
|
|
283
|
+
qx: number
|
|
284
|
+
qy: number
|
|
285
|
+
qz: number
|
|
286
|
+
qw: number
|
|
152
287
|
}
|
|
153
288
|
|
|
154
289
|
export interface Trajectory {
|
|
@@ -167,3 +302,10 @@ export interface Vector3F64 {
|
|
|
167
302
|
y: number
|
|
168
303
|
z: number
|
|
169
304
|
}
|
|
305
|
+
|
|
306
|
+
/** 三维向量,包含 x、y、z 分量 */
|
|
307
|
+
export interface Vector3F64 {
|
|
308
|
+
x: number
|
|
309
|
+
y: number
|
|
310
|
+
z: number
|
|
311
|
+
}
|
package/src/index.js
CHANGED
|
@@ -591,4 +591,4 @@ module.exports.checkLineSideVisibility = nativeBinding.checkLineSideVisibility
|
|
|
591
591
|
module.exports.pointCloudObjectEcognizer = nativeBinding.pointCloudObjectEcognizer
|
|
592
592
|
module.exports.samplePointsByImage = nativeBinding.samplePointsByImage
|
|
593
593
|
module.exports.squareBackfacePointCloudTest = nativeBinding.squareBackfacePointCloudTest
|
|
594
|
-
module.exports.
|
|
594
|
+
module.exports.squareHasSquareBehind = nativeBinding.squareHasSquareBehind
|
package/src/main.js
CHANGED
|
@@ -125,7 +125,7 @@ function squareBackfacePointCloudTest(params) {
|
|
|
125
125
|
* @param {import("./index").SquareBackfaceTestOptions} params
|
|
126
126
|
* @returns
|
|
127
127
|
*/
|
|
128
|
-
function
|
|
128
|
+
function squareHasSquareBehind(params) {
|
|
129
129
|
// params.lines 参数验证
|
|
130
130
|
if (!Array.isArray(params.lines)) {
|
|
131
131
|
throw new Error("params.lines must be an array");
|
|
@@ -157,7 +157,7 @@ function squareBackfaceSquareTest(params) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
return gxf.
|
|
160
|
+
return gxf.squareHasSquareBehind(params)
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/**
|
|
@@ -181,5 +181,5 @@ function samplePointsByImage(params) {
|
|
|
181
181
|
module.exports.checkLineSideVisibility = checkLineSideVisibility
|
|
182
182
|
module.exports.squareBackfacePointCloudTest = squareBackfacePointCloudTest
|
|
183
183
|
module.exports.pointCloudObjectEcognizer = pointCloudObjectEcognizer
|
|
184
|
-
module.exports.
|
|
184
|
+
module.exports.squareHasSquareBehind = squareHasSquareBehind
|
|
185
185
|
module.exports.samplePointsByImage = samplePointsByImage
|