rm-gxf-computing-rusts 0.0.25 → 0.0.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-gxf-computing-rusts",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "",
5
5
  "author": "初秋",
6
6
  "type": "commonjs",
Binary file
Binary file
package/src/index.d.ts CHANGED
@@ -22,10 +22,9 @@ export interface CheckResult {
22
22
  offsets?: Array<number>
23
23
  }
24
24
 
25
- export interface CheckResult {
26
- originalVertices: Array<Square>
27
- allCenterPoints: Array<Point>
28
- offsets?: Array<number>
25
+ export interface DepthFilter {
26
+ searchRadius: number
27
+ depthThreshold: number
29
28
  }
30
29
 
31
30
  export interface DepthFilter {
@@ -38,27 +37,27 @@ export interface DepthFilter {
38
37
  depthThreshold: number
39
38
  }
40
39
 
41
- export interface Index {
42
- index: number
40
+ export interface DepthFilter {
41
+ searchRadius: number
42
+ depthThreshold: number
43
43
  }
44
44
 
45
- export interface Index {
46
- index: number
45
+ export interface HasQquareBehindOptions {
46
+ view?: boolean
47
+ lines: Array<ParseLineResult>
47
48
  }
48
49
 
49
- export interface Line {
50
- start: Vector3F64
51
- end: Vector3F64
50
+ export interface HasQquareBehindOptions {
51
+ view?: boolean
52
+ lines: Array<ParseLineResult>
52
53
  }
53
54
 
54
- export interface Line {
55
- start: Vector3F64
56
- end: Vector3F64
55
+ export interface Index {
56
+ index: number
57
57
  }
58
58
 
59
- export interface Line {
60
- start: Vector3F64
61
- end: Vector3F64
59
+ export interface Index {
60
+ index: number
62
61
  }
63
62
 
64
63
  export interface Line {
@@ -66,10 +65,9 @@ export interface Line {
66
65
  end: Vector3F64
67
66
  }
68
67
 
69
- export interface LineData {
68
+ export interface Line {
70
69
  start: Vector3F64
71
70
  end: Vector3F64
72
- checkResults: Array<CheckResult>
73
71
  }
74
72
 
75
73
  export interface LineData {
@@ -102,32 +100,6 @@ export interface PcBackfaceTestOptions {
102
100
  distProjection: boolean
103
101
  }
104
102
 
105
- export interface PcBackfaceTestOptions {
106
- view?: boolean
107
- pcdDir: string
108
- lines: LineDataList
109
- trajectorys: Record<string, Trajectory>
110
- distProjection: boolean
111
- }
112
-
113
- export interface PcObjectEcognizerOption {
114
- view?: boolean
115
- pcdUrl: string
116
- imageUrls: Array<string>
117
- groundZ: number
118
- version?: string
119
- }
120
-
121
- export interface PcObjectEcognizerOption {
122
- view?: boolean
123
- pcdUrl: string
124
- imageUrls: Array<string>
125
- groundZ: number
126
- version?: string
127
- }
128
-
129
- export declare function pointCloudObjectEcognizer(option: PcObjectEcognizerOption): Array<Array<Array<number>>>
130
-
131
103
  export interface Quads {
132
104
  originalVertices: Array<Array<Vector3F64>>
133
105
  allCenterPoints: Array<Vector3F64>
@@ -150,6 +122,18 @@ export interface Results {
150
122
  objIds: Array<Array<string>>
151
123
  }
152
124
 
125
+ export interface Results {
126
+ results: Array<Array<Array<number>>>
127
+ positions: Array<Vector3F64>
128
+ objIds: Array<Array<string>>
129
+ }
130
+
131
+ export interface Results {
132
+ results: Array<Array<Array<number>>>
133
+ positions: Array<Vector3F64>
134
+ objIds: Array<Array<string>>
135
+ }
136
+
153
137
  export declare function samplePointsByImage(option: SamplePointsByImageOption): Results
154
138
 
155
139
  export interface SamplePointsByImageOption {
@@ -194,31 +178,63 @@ export interface SamplePointsByImageOption {
194
178
  depthFilter?: DepthFilter
195
179
  /** 过滤类型列表 */
196
180
  excludeCategoryList?: Array<string>
181
+ /** 形状使用轮廓 */
182
+ contourMode?: boolean
183
+ /** 边缘腐蚀大小 */
184
+ edgeCorrosionSize?: number
197
185
  }
198
186
 
199
- export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
200
-
201
- export declare function squareBackfaceSquareTest(option: SquareBackfaceTestOptions): Array<number>
202
-
203
- export interface SquareBackfaceTestOptions {
187
+ export interface SamplePointsByImageOption {
204
188
  view?: boolean
205
- lines: Array<ParseLineResult>
189
+ /** pcd url,pcd_chunk为true时,该值为目录 */
190
+ pcdPath: string
191
+ /** 是否使用pcd片段 */
192
+ pcdChunk?: boolean
193
+ /** 图片url列表 */
194
+ imageUrls: Array<string>
195
+ /** 点云z轴小于该值的过滤掉 */
196
+ minZ?: number
197
+ /** 当前使用版本 */
198
+ version?: string
199
+ /** 点云蔟过滤 */
200
+ clusterFilter?: boolean
201
+ /** 点云蔟分类距离 */
202
+ distanceThreshold?: number
203
+ /** 深度过滤 */
204
+ depthFilter?: DepthFilter
205
+ /** 过滤类型列表 */
206
+ excludeCategoryList?: Array<string>
206
207
  }
207
208
 
208
- export interface SquareBackfaceTestOptions {
209
+ export interface SamplePointsByImageOption {
209
210
  view?: boolean
210
- lines: Array<ParseLineResult>
211
+ /** pcd url,pcd_chunk为true时,该值为目录 */
212
+ pcdPath: string
213
+ /** 是否使用pcd片段 */
214
+ pcdChunk?: boolean
215
+ /** 图片url列表 */
216
+ imageUrls: Array<string>
217
+ /** 点云z轴小于该值的过滤掉 */
218
+ minZ?: number
219
+ /** 当前使用版本 */
220
+ version?: string
221
+ /** 点云蔟过滤 */
222
+ clusterFilter?: boolean
223
+ /** 点云蔟分类距离 */
224
+ distanceThreshold?: number
225
+ /** 深度过滤 */
226
+ depthFilter?: DepthFilter
227
+ /** 过滤类型列表 */
228
+ excludeCategoryList?: Array<string>
229
+ /** 形状使用轮廓 */
230
+ contourMode?: boolean
231
+ /** 边缘腐蚀大小 */
232
+ edgeCorrosionSize?: number
211
233
  }
212
234
 
213
- export interface Trajectory {
214
- x: number
215
- y: number
216
- z: number
217
- qx: number
218
- qy: number
219
- qz: number
220
- qw: number
221
- }
235
+ export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
236
+
237
+ export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
222
238
 
223
239
  export interface Trajectory {
224
240
  x: number
@@ -236,10 +252,3 @@ export interface Vector3F64 {
236
252
  y: number
237
253
  z: number
238
254
  }
239
-
240
- /** 三维向量,包含 x、y、z 分量 */
241
- export interface Vector3F64 {
242
- x: number
243
- y: number
244
- z: number
245
- }
package/src/index.js CHANGED
@@ -588,7 +588,6 @@ if (!nativeBinding) {
588
588
 
589
589
  module.exports = nativeBinding
590
590
  module.exports.checkLineSideVisibility = nativeBinding.checkLineSideVisibility
591
- module.exports.pointCloudObjectEcognizer = nativeBinding.pointCloudObjectEcognizer
592
591
  module.exports.samplePointsByImage = nativeBinding.samplePointsByImage
593
592
  module.exports.squareBackfacePointCloudTest = nativeBinding.squareBackfacePointCloudTest
594
- module.exports.squareBackfaceSquareTest = nativeBinding.squareBackfaceSquareTest
593
+ 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 squareBackfaceSquareTest(params) {
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,16 +157,7 @@ function squareBackfaceSquareTest(params) {
157
157
  }
158
158
  }
159
159
 
160
- return gxf.squareBackfaceSquareTest(params)
161
- }
162
-
163
- /**
164
- *
165
- * @param {import("./index").PcObjectEcognizerOption} params
166
- * @returns
167
- */
168
- function pointCloudObjectEcognizer(params) {
169
- return gxf.pointCloudObjectEcognizer(params)
160
+ return gxf.squareHasSquareBehind(params)
170
161
  }
171
162
 
172
163
  /**
@@ -180,6 +171,5 @@ function samplePointsByImage(params) {
180
171
 
181
172
  module.exports.checkLineSideVisibility = checkLineSideVisibility
182
173
  module.exports.squareBackfacePointCloudTest = squareBackfacePointCloudTest
183
- module.exports.pointCloudObjectEcognizer = pointCloudObjectEcognizer
184
- module.exports.squareBackfaceSquareTest = squareBackfaceSquareTest
174
+ module.exports.squareHasSquareBehind = squareHasSquareBehind
185
175
  module.exports.samplePointsByImage = samplePointsByImage