@zappar/zappar-cv 3.5.0 → 3.6.0

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 CHANGED
@@ -18,8 +18,8 @@ npm i @zappar/zappar-cv
18
18
 
19
19
  You can use our CDN from within your HTML:
20
20
  ```
21
- <script src="https://libs.zappar.com/zappar-cv/3.5.0/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/3.6.0/zappar-cv.js"></script>
22
22
  ```
23
23
 
24
24
  Or you can download and host our standalone JavaScript bundle:
25
- [https://libs.zappar.com/zappar-cv/3.5.0/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.5.0/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/3.6.0/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.6.0/zappar-cv.zip)
@@ -68,6 +68,9 @@ export interface zappar {
68
68
  pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
69
69
  pipeline_camera_data_width(o: zappar_pipeline_t): number;
70
70
  pipeline_camera_data_height(o: zappar_pipeline_t): number;
71
+ pipeline_camera_frame_sharpness_enabled(o: zappar_pipeline_t): boolean;
72
+ pipeline_camera_frame_sharpness_enabled_set(o: zappar_pipeline_t, val: boolean): void;
73
+ pipeline_camera_frame_sharpness(o: zappar_pipeline_t): number;
71
74
  pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
72
75
  pipeline_camera_frame_submit(o: zappar_pipeline_t, data: ArrayBuffer, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, camera_model: Float32Array, user_facing: boolean, timestampMicroseconds: number): void;
73
76
  pipeline_camera_frame_camera_attitude(o: zappar_pipeline_t): Float32Array;
@@ -47,6 +47,8 @@ export class zappar_client {
47
47
  camera_model: new Float32Array([300, 300, 160, 120, 0, 0]),
48
48
  camera_data_width: 320,
49
49
  camera_data_height: 240,
50
+ camera_frame_sharpness_enabled: false,
51
+ camera_frame_sharpness: -1,
50
52
  camera_pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
51
53
  camera_frame_camera_attitude: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
52
54
  camera_frame_device_attitude: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
@@ -99,6 +101,28 @@ export class zappar_client {
99
101
  throw new Error("This object has been destroyed");
100
102
  return s.camera_data_height;
101
103
  },
104
+ pipeline_camera_frame_sharpness_enabled: (o) => {
105
+ let s = this._pipeline_state_by_instance.get(o);
106
+ if (!s)
107
+ throw new Error("This object has been destroyed");
108
+ return s.camera_frame_sharpness_enabled;
109
+ },
110
+ pipeline_camera_frame_sharpness_enabled_set: (o, val) => {
111
+ let s = this._pipeline_state_by_instance.get(o);
112
+ if (!s)
113
+ throw new Error("This object has been destroyed");
114
+ this.serializer.sendMessage(63, m => {
115
+ m.type(o);
116
+ m.bool(val);
117
+ });
118
+ s.camera_frame_sharpness_enabled = val;
119
+ },
120
+ pipeline_camera_frame_sharpness: (o) => {
121
+ let s = this._pipeline_state_by_instance.get(o);
122
+ if (!s)
123
+ throw new Error("This object has been destroyed");
124
+ return s.camera_frame_sharpness;
125
+ },
102
126
  pipeline_camera_frame_user_data: (o) => {
103
127
  let s = this._pipeline_state_by_instance.get(o);
104
128
  if (!s)
@@ -1121,7 +1145,7 @@ export class zappar_client {
1121
1145
  this.deserializer.setData(a);
1122
1146
  this.deserializer.forMessages((messageId, msg) => {
1123
1147
  switch (messageId) {
1124
- case 9: {
1148
+ case 10: {
1125
1149
  let handle = msg.type();
1126
1150
  let inst = this._pipeline_state_by_instance.get(handle);
1127
1151
  if (!inst)
@@ -1153,6 +1177,14 @@ export class zappar_client {
1153
1177
  inst.camera_data_height = msg.int();
1154
1178
  break;
1155
1179
  }
1180
+ case 9: {
1181
+ let handle = msg.type();
1182
+ let inst = this._pipeline_state_by_instance.get(handle);
1183
+ if (!inst)
1184
+ return;
1185
+ inst.camera_frame_sharpness = msg.float();
1186
+ break;
1187
+ }
1156
1188
  case 5: {
1157
1189
  let handle = msg.type();
1158
1190
  let inst = this._pipeline_state_by_instance.get(handle);
@@ -1161,7 +1193,7 @@ export class zappar_client {
1161
1193
  inst.current_frame_user_data = msg.int();
1162
1194
  break;
1163
1195
  }
1164
- case 13: {
1196
+ case 14: {
1165
1197
  let handle = msg.type();
1166
1198
  let inst = this._pipeline_state_by_instance.get(handle);
1167
1199
  if (!inst)
@@ -1169,7 +1201,7 @@ export class zappar_client {
1169
1201
  inst.camera_frame_camera_attitude = msg.matrix4x4();
1170
1202
  break;
1171
1203
  }
1172
- case 14: {
1204
+ case 15: {
1173
1205
  let handle = msg.type();
1174
1206
  let inst = this._pipeline_state_by_instance.get(handle);
1175
1207
  if (!inst)
@@ -1177,7 +1209,7 @@ export class zappar_client {
1177
1209
  inst.camera_frame_device_attitude = msg.matrix4x4();
1178
1210
  break;
1179
1211
  }
1180
- case 21: {
1212
+ case 22: {
1181
1213
  let handle = msg.type();
1182
1214
  let inst = this._image_tracker_state_by_instance.get(handle);
1183
1215
  if (!inst)
@@ -1211,7 +1243,7 @@ export class zappar_client {
1211
1243
  inst.anchor_pose[indx] = msg.matrix4x4();
1212
1244
  break;
1213
1245
  }
1214
- case 20: {
1246
+ case 21: {
1215
1247
  let handle = msg.type();
1216
1248
  let inst = this._face_tracker_state_by_instance.get(handle);
1217
1249
  if (!inst)
@@ -1219,7 +1251,7 @@ export class zappar_client {
1219
1251
  inst.model_loaded = msg.int();
1220
1252
  break;
1221
1253
  }
1222
- case 15: {
1254
+ case 16: {
1223
1255
  let handle = msg.type();
1224
1256
  let inst = this._face_tracker_state_by_instance.get(handle);
1225
1257
  if (!inst)
@@ -1227,7 +1259,7 @@ export class zappar_client {
1227
1259
  inst.anchor_count = msg.int();
1228
1260
  break;
1229
1261
  }
1230
- case 16: {
1262
+ case 17: {
1231
1263
  let handle = msg.type();
1232
1264
  let inst = this._face_tracker_state_by_instance.get(handle);
1233
1265
  if (!inst)
@@ -1236,7 +1268,7 @@ export class zappar_client {
1236
1268
  inst.anchor_id[indx] = msg.string();
1237
1269
  break;
1238
1270
  }
1239
- case 17: {
1271
+ case 18: {
1240
1272
  let handle = msg.type();
1241
1273
  let inst = this._face_tracker_state_by_instance.get(handle);
1242
1274
  if (!inst)
@@ -1245,7 +1277,7 @@ export class zappar_client {
1245
1277
  inst.anchor_pose[indx] = msg.matrix4x4();
1246
1278
  break;
1247
1279
  }
1248
- case 18: {
1280
+ case 19: {
1249
1281
  let handle = msg.type();
1250
1282
  let inst = this._face_tracker_state_by_instance.get(handle);
1251
1283
  if (!inst)
@@ -1254,7 +1286,7 @@ export class zappar_client {
1254
1286
  inst.anchor_identity_coefficients[indx] = msg.identityCoefficients();
1255
1287
  break;
1256
1288
  }
1257
- case 19: {
1289
+ case 20: {
1258
1290
  let handle = msg.type();
1259
1291
  let inst = this._face_tracker_state_by_instance.get(handle);
1260
1292
  if (!inst)
@@ -1263,7 +1295,7 @@ export class zappar_client {
1263
1295
  inst.anchor_expression_coefficients[indx] = msg.expressionCoefficients();
1264
1296
  break;
1265
1297
  }
1266
- case 10: {
1298
+ case 11: {
1267
1299
  let handle = msg.type();
1268
1300
  let inst = this._barcode_finder_state_by_instance.get(handle);
1269
1301
  if (!inst)
@@ -1271,7 +1303,7 @@ export class zappar_client {
1271
1303
  inst.number_found = msg.int();
1272
1304
  break;
1273
1305
  }
1274
- case 11: {
1306
+ case 12: {
1275
1307
  let handle = msg.type();
1276
1308
  let inst = this._barcode_finder_state_by_instance.get(handle);
1277
1309
  if (!inst)
@@ -1280,7 +1312,7 @@ export class zappar_client {
1280
1312
  inst.found_text[indx] = msg.string();
1281
1313
  break;
1282
1314
  }
1283
- case 12: {
1315
+ case 13: {
1284
1316
  let handle = msg.type();
1285
1317
  let inst = this._barcode_finder_state_by_instance.get(handle);
1286
1318
  if (!inst)
@@ -1297,7 +1329,7 @@ export class zappar_client {
1297
1329
  inst.pose = msg.matrix4x4();
1298
1330
  break;
1299
1331
  }
1300
- case 26: {
1332
+ case 27: {
1301
1333
  let handle = msg.type();
1302
1334
  let inst = this._zapcode_tracker_state_by_instance.get(handle);
1303
1335
  if (!inst)
@@ -1305,7 +1337,7 @@ export class zappar_client {
1305
1337
  inst.target_loaded_version = msg.int();
1306
1338
  break;
1307
1339
  }
1308
- case 23: {
1340
+ case 24: {
1309
1341
  let handle = msg.type();
1310
1342
  let inst = this._zapcode_tracker_state_by_instance.get(handle);
1311
1343
  if (!inst)
@@ -1313,7 +1345,7 @@ export class zappar_client {
1313
1345
  inst.anchor_count = msg.int();
1314
1346
  break;
1315
1347
  }
1316
- case 24: {
1348
+ case 25: {
1317
1349
  let handle = msg.type();
1318
1350
  let inst = this._zapcode_tracker_state_by_instance.get(handle);
1319
1351
  if (!inst)
@@ -1322,7 +1354,7 @@ export class zappar_client {
1322
1354
  inst.anchor_id[indx] = msg.string();
1323
1355
  break;
1324
1356
  }
1325
- case 25: {
1357
+ case 26: {
1326
1358
  let handle = msg.type();
1327
1359
  let inst = this._zapcode_tracker_state_by_instance.get(handle);
1328
1360
  if (!inst)
@@ -1331,7 +1363,7 @@ export class zappar_client {
1331
1363
  inst.anchor_pose[indx] = msg.matrix4x4();
1332
1364
  break;
1333
1365
  }
1334
- case 27: {
1366
+ case 28: {
1335
1367
  let handle = msg.type();
1336
1368
  let inst = this._world_tracker_state_by_instance.get(handle);
1337
1369
  if (!inst)
@@ -1339,7 +1371,7 @@ export class zappar_client {
1339
1371
  inst.session_number = msg.int();
1340
1372
  break;
1341
1373
  }
1342
- case 43: {
1374
+ case 44: {
1343
1375
  let handle = msg.type();
1344
1376
  let inst = this._world_tracker_state_by_instance.get(handle);
1345
1377
  if (!inst)
@@ -1347,7 +1379,7 @@ export class zappar_client {
1347
1379
  inst.quality = msg.int();
1348
1380
  break;
1349
1381
  }
1350
- case 28: {
1382
+ case 29: {
1351
1383
  let handle = msg.type();
1352
1384
  let inst = this._world_tracker_state_by_instance.get(handle);
1353
1385
  if (!inst)
@@ -1355,7 +1387,7 @@ export class zappar_client {
1355
1387
  inst.plane_anchor_count = msg.int();
1356
1388
  break;
1357
1389
  }
1358
- case 36: {
1390
+ case 37: {
1359
1391
  let handle = msg.type();
1360
1392
  let inst = this._world_tracker_state_by_instance.get(handle);
1361
1393
  if (!inst)
@@ -1364,7 +1396,7 @@ export class zappar_client {
1364
1396
  inst.plane_anchor_id[indx] = msg.string();
1365
1397
  break;
1366
1398
  }
1367
- case 29: {
1399
+ case 30: {
1368
1400
  let handle = msg.type();
1369
1401
  let inst = this._world_tracker_state_by_instance.get(handle);
1370
1402
  if (!inst)
@@ -1373,7 +1405,7 @@ export class zappar_client {
1373
1405
  inst.plane_anchor_pose[indx] = msg.matrix4x4();
1374
1406
  break;
1375
1407
  }
1376
- case 31: {
1408
+ case 32: {
1377
1409
  let handle = msg.type();
1378
1410
  let inst = this._world_tracker_state_by_instance.get(handle);
1379
1411
  if (!inst)
@@ -1382,7 +1414,7 @@ export class zappar_client {
1382
1414
  inst.plane_anchor_status[indx] = msg.anchorStatus();
1383
1415
  break;
1384
1416
  }
1385
- case 32: {
1417
+ case 33: {
1386
1418
  let handle = msg.type();
1387
1419
  let inst = this._world_tracker_state_by_instance.get(handle);
1388
1420
  if (!inst)
@@ -1391,7 +1423,7 @@ export class zappar_client {
1391
1423
  inst.plane_anchor_polygon_data_size[indx] = msg.int();
1392
1424
  break;
1393
1425
  }
1394
- case 33: {
1426
+ case 34: {
1395
1427
  let handle = msg.type();
1396
1428
  let inst = this._world_tracker_state_by_instance.get(handle);
1397
1429
  if (!inst)
@@ -1400,7 +1432,7 @@ export class zappar_client {
1400
1432
  inst.plane_anchor_polygon_data[indx] = msg.floatArray();
1401
1433
  break;
1402
1434
  }
1403
- case 34: {
1435
+ case 35: {
1404
1436
  let handle = msg.type();
1405
1437
  let inst = this._world_tracker_state_by_instance.get(handle);
1406
1438
  if (!inst)
@@ -1409,7 +1441,7 @@ export class zappar_client {
1409
1441
  inst.plane_anchor_polygon_version[indx] = msg.int();
1410
1442
  break;
1411
1443
  }
1412
- case 35: {
1444
+ case 36: {
1413
1445
  let handle = msg.type();
1414
1446
  let inst = this._world_tracker_state_by_instance.get(handle);
1415
1447
  if (!inst)
@@ -1418,7 +1450,7 @@ export class zappar_client {
1418
1450
  inst.plane_anchor_orientation[indx] = msg.planeOrientation();
1419
1451
  break;
1420
1452
  }
1421
- case 39: {
1453
+ case 40: {
1422
1454
  let handle = msg.type();
1423
1455
  let inst = this._world_tracker_state_by_instance.get(handle);
1424
1456
  if (!inst)
@@ -1426,7 +1458,7 @@ export class zappar_client {
1426
1458
  inst.world_anchor_status = msg.anchorStatus();
1427
1459
  break;
1428
1460
  }
1429
- case 38: {
1461
+ case 39: {
1430
1462
  let handle = msg.type();
1431
1463
  let inst = this._world_tracker_state_by_instance.get(handle);
1432
1464
  if (!inst)
@@ -1434,7 +1466,7 @@ export class zappar_client {
1434
1466
  inst.world_anchor_id = msg.string();
1435
1467
  break;
1436
1468
  }
1437
- case 37: {
1469
+ case 38: {
1438
1470
  let handle = msg.type();
1439
1471
  let inst = this._world_tracker_state_by_instance.get(handle);
1440
1472
  if (!inst)
@@ -1442,7 +1474,7 @@ export class zappar_client {
1442
1474
  inst.world_anchor_pose = msg.matrix4x4();
1443
1475
  break;
1444
1476
  }
1445
- case 41: {
1477
+ case 42: {
1446
1478
  let handle = msg.type();
1447
1479
  let inst = this._world_tracker_state_by_instance.get(handle);
1448
1480
  if (!inst)
@@ -1450,7 +1482,7 @@ export class zappar_client {
1450
1482
  inst.ground_anchor_id = msg.string();
1451
1483
  break;
1452
1484
  }
1453
- case 42: {
1485
+ case 43: {
1454
1486
  let handle = msg.type();
1455
1487
  let inst = this._world_tracker_state_by_instance.get(handle);
1456
1488
  if (!inst)
@@ -1458,7 +1490,7 @@ export class zappar_client {
1458
1490
  inst.ground_anchor_status = msg.anchorStatus();
1459
1491
  break;
1460
1492
  }
1461
- case 40: {
1493
+ case 41: {
1462
1494
  let handle = msg.type();
1463
1495
  let inst = this._world_tracker_state_by_instance.get(handle);
1464
1496
  if (!inst)
@@ -1466,7 +1498,7 @@ export class zappar_client {
1466
1498
  inst.ground_anchor_pose = msg.matrix4x4();
1467
1499
  break;
1468
1500
  }
1469
- case 46: {
1501
+ case 47: {
1470
1502
  let handle = msg.type();
1471
1503
  let inst = this._world_tracker_state_by_instance.get(handle);
1472
1504
  if (!inst)
@@ -1474,7 +1506,7 @@ export class zappar_client {
1474
1506
  inst.tracks_data_size = msg.int();
1475
1507
  break;
1476
1508
  }
1477
- case 45: {
1509
+ case 46: {
1478
1510
  let handle = msg.type();
1479
1511
  let inst = this._world_tracker_state_by_instance.get(handle);
1480
1512
  if (!inst)
@@ -1482,7 +1514,7 @@ export class zappar_client {
1482
1514
  inst.tracks_data = msg.floatArray();
1483
1515
  break;
1484
1516
  }
1485
- case 48: {
1517
+ case 49: {
1486
1518
  let handle = msg.type();
1487
1519
  let inst = this._world_tracker_state_by_instance.get(handle);
1488
1520
  if (!inst)
@@ -1490,7 +1522,7 @@ export class zappar_client {
1490
1522
  inst.tracks_type_data_size = msg.int();
1491
1523
  break;
1492
1524
  }
1493
- case 47: {
1525
+ case 48: {
1494
1526
  let handle = msg.type();
1495
1527
  let inst = this._world_tracker_state_by_instance.get(handle);
1496
1528
  if (!inst)
@@ -1498,7 +1530,7 @@ export class zappar_client {
1498
1530
  inst.tracks_type_data = msg.ucharArray();
1499
1531
  break;
1500
1532
  }
1501
- case 51: {
1533
+ case 52: {
1502
1534
  let handle = msg.type();
1503
1535
  let inst = this._world_tracker_state_by_instance.get(handle);
1504
1536
  if (!inst)
@@ -1506,7 +1538,7 @@ export class zappar_client {
1506
1538
  inst.projections_data_size = msg.int();
1507
1539
  break;
1508
1540
  }
1509
- case 50: {
1541
+ case 51: {
1510
1542
  let handle = msg.type();
1511
1543
  let inst = this._world_tracker_state_by_instance.get(handle);
1512
1544
  if (!inst)
@@ -1514,7 +1546,7 @@ export class zappar_client {
1514
1546
  inst.projections_data = msg.floatArray();
1515
1547
  break;
1516
1548
  }
1517
- case 53: {
1549
+ case 54: {
1518
1550
  let handle = msg.type();
1519
1551
  let inst = this._custom_anchor_state_by_instance.get(handle);
1520
1552
  if (!inst)
@@ -1522,7 +1554,7 @@ export class zappar_client {
1522
1554
  inst.status = msg.anchorStatus();
1523
1555
  break;
1524
1556
  }
1525
- case 54: {
1557
+ case 55: {
1526
1558
  let handle = msg.type();
1527
1559
  let inst = this._custom_anchor_state_by_instance.get(handle);
1528
1560
  if (!inst)
@@ -1530,7 +1562,7 @@ export class zappar_client {
1530
1562
  inst.pose_version = msg.int();
1531
1563
  break;
1532
1564
  }
1533
- case 52: {
1565
+ case 53: {
1534
1566
  let handle = msg.type();
1535
1567
  let inst = this._custom_anchor_state_by_instance.get(handle);
1536
1568
  if (!inst)
@@ -29,6 +29,16 @@ export function getRuntimeObject(mod) {
29
29
  let pipeline_camera_data_height_wrapped = mod.cwrap("zappar_pipeline_camera_data_height", "number", [
30
30
  "number"
31
31
  ]);
32
+ let pipeline_camera_frame_sharpness_enabled_wrapped = mod.cwrap("zappar_pipeline_camera_frame_sharpness_enabled", "number", [
33
+ "number"
34
+ ]);
35
+ let pipeline_camera_frame_sharpness_enabled_set_wrapped = mod.cwrap("zappar_pipeline_camera_frame_sharpness_enabled_set", null, [
36
+ "number",
37
+ "number"
38
+ ]);
39
+ let pipeline_camera_frame_sharpness_wrapped = mod.cwrap("zappar_pipeline_camera_frame_sharpness", "number", [
40
+ "number"
41
+ ]);
32
42
  let pipeline_camera_frame_user_data_wrapped = mod.cwrap("zappar_pipeline_camera_frame_user_data", "number", [
33
43
  "number"
34
44
  ]);
@@ -446,6 +456,20 @@ export function getRuntimeObject(mod) {
446
456
  let ret = pipeline_camera_data_height_wrapped(o);
447
457
  return ret;
448
458
  },
459
+ pipeline_camera_frame_sharpness_enabled: (o) => {
460
+ let ret = pipeline_camera_frame_sharpness_enabled_wrapped(o);
461
+ ret = ret === 1;
462
+ return ret;
463
+ },
464
+ pipeline_camera_frame_sharpness_enabled_set: (o, val) => {
465
+ let arg_val = val ? 1 : 0;
466
+ let ret = pipeline_camera_frame_sharpness_enabled_set_wrapped(o, arg_val);
467
+ return ret;
468
+ },
469
+ pipeline_camera_frame_sharpness: (o) => {
470
+ let ret = pipeline_camera_frame_sharpness_wrapped(o);
471
+ return ret;
472
+ },
449
473
  pipeline_camera_frame_user_data: (o) => {
450
474
  let ret = pipeline_camera_frame_user_data_wrapped(o);
451
475
  return ret;
@@ -144,6 +144,9 @@ export interface zappar_cwrap {
144
144
  pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
145
145
  pipeline_camera_data_width(o: zappar_pipeline_t): number;
146
146
  pipeline_camera_data_height(o: zappar_pipeline_t): number;
147
+ pipeline_camera_frame_sharpness_enabled(o: zappar_pipeline_t): boolean;
148
+ pipeline_camera_frame_sharpness_enabled_set(o: zappar_pipeline_t, val: boolean): void;
149
+ pipeline_camera_frame_sharpness(o: zappar_pipeline_t): number;
147
150
  pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
148
151
  pipeline_camera_frame_submit(o: zappar_pipeline_t, data: ArrayBuffer, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, camera_model: Float32Array, user_facing: boolean, timestampMicroseconds: number): void;
149
152
  pipeline_camera_frame_submit_raw_pointer(o: zappar_pipeline_t, data: number, dataLength: number, format: frame_pixel_format_t, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, rotation: number, camera_model: Float32Array, user_facing: boolean, timestampMicroseconds: number, halfSample: boolean): void;