@kubohiroya/turbowarp-camera-calibration 0.7.0 → 0.8.1
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.ja.md +2 -2
- package/README.md +67 -2
- package/dist/camera-calibration.js +503 -25
- package/dist/extension-manifest.json +80 -0
- package/lib/calibration/contract.d.ts +53 -1
- package/lib/calibration/types.d.ts +36 -0
- package/lib/runtime-capability.d.ts +37 -2
- package/lib/runtime-capability.js +14 -3
- package/lib/runtime.d.ts +1 -1
- package/package.json +1 -1
- package/src/block-definitions.json +92 -0
- package/src/calibration/contract.ts +57 -0
- package/src/calibration/controller.ts +477 -23
- package/src/calibration/opencv-backend.ts +109 -0
- package/src/calibration/types.ts +37 -0
- package/src/calibration/worker-backend.ts +14 -0
- package/src/extension.ts +63 -1
- package/src/runtime-capability.ts +52 -3
- package/src/runtime.ts +1 -0
package/README.ja.md
CHANGED
|
@@ -101,7 +101,7 @@ bundleは約11 MBあります。
|
|
|
101
101
|
検証済みのversionをexact pinします。
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
pnpm add --save-exact @kubohiroya/turbowarp-camera-calibration@0.
|
|
104
|
+
pnpm add --save-exact @kubohiroya/turbowarp-camera-calibration@0.8.1
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
standalone bundle:
|
|
@@ -113,7 +113,7 @@ node_modules/@kubohiroya/turbowarp-camera-calibration/dist/camera-calibration.js
|
|
|
113
113
|
version固定CDN URL:
|
|
114
114
|
|
|
115
115
|
```text
|
|
116
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-calibration@0.
|
|
116
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-calibration@0.8.1/dist/camera-calibration.js
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
## クイックスタート
|
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ therefore about 11 MB.
|
|
|
102
102
|
Install an exact version that you have reviewed:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
pnpm add --save-exact @kubohiroya/turbowarp-camera-calibration@0.
|
|
105
|
+
pnpm add --save-exact @kubohiroya/turbowarp-camera-calibration@0.8.1
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
Load the standalone bundle from:
|
|
@@ -114,7 +114,7 @@ node_modules/@kubohiroya/turbowarp-camera-calibration/dist/camera-calibration.js
|
|
|
114
114
|
A version-pinned CDN URL is:
|
|
115
115
|
|
|
116
116
|
```text
|
|
117
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-calibration@0.
|
|
117
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-camera-calibration@0.8.1/dist/camera-calibration.js
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
## Quick start
|
|
@@ -208,6 +208,46 @@ Detects the complete board in the current shared frame and retains it when its q
|
|
|
208
208
|
| Opcode | `addCameraCalibrationSample` |
|
|
209
209
|
| `CAMERA_ID` | String, default: `default` |
|
|
210
210
|
|
|
211
|
+
### `start automatic calibration capture for camera [CAMERA_ID]`
|
|
212
|
+
|
|
213
|
+
Watches the shared frame and retains views as the board reaches positions worth retaining, re-solving in the background as the set grows and finishing the session once the answer reproduces views it was not fitted to. Use after starting a session; a frame that cannot be used leaves guidance rather than an error.
|
|
214
|
+
|
|
215
|
+
| Property | Value |
|
|
216
|
+
|---|---|
|
|
217
|
+
| Type | Command |
|
|
218
|
+
| Opcode | `startAutomaticCameraCalibration` |
|
|
219
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
220
|
+
|
|
221
|
+
### `stop automatic calibration capture for camera [CAMERA_ID]`
|
|
222
|
+
|
|
223
|
+
Hands the shutter back. The session stays open with everything collected so far, so sampling and solving can continue by hand.
|
|
224
|
+
|
|
225
|
+
| Property | Value |
|
|
226
|
+
|---|---|
|
|
227
|
+
| Type | Command |
|
|
228
|
+
| Opcode | `stopAutomaticCameraCalibration` |
|
|
229
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
230
|
+
|
|
231
|
+
### `automatic capture running for camera [CAMERA_ID]?`
|
|
232
|
+
|
|
233
|
+
Reports whether the shutter is watching that camera on its own. It stops by itself when the session finishes, when the sample limit is reached, and when the camera goes away.
|
|
234
|
+
|
|
235
|
+
| Property | Value |
|
|
236
|
+
|---|---|
|
|
237
|
+
| Type | Boolean |
|
|
238
|
+
| Opcode | `automaticCameraCalibration` |
|
|
239
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
240
|
+
|
|
241
|
+
### `camera calibration guidance [CAMERA_ID]`
|
|
242
|
+
|
|
243
|
+
Returns what the operator should do next while automatic capture runs: show-the-board, hold-steadier, move-or-tilt, tilt-more, keep-going, solving, limit-reached, or complete. Empty when the shutter is not watching. This is not an error: most frames are declined, because most of the time the board is between two useful positions.
|
|
244
|
+
|
|
245
|
+
| Property | Value |
|
|
246
|
+
|---|---|
|
|
247
|
+
| Type | Reporter |
|
|
248
|
+
| Opcode | `cameraCalibrationGuidance` |
|
|
249
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
250
|
+
|
|
211
251
|
### `solve calibration for camera [CAMERA_ID]`
|
|
212
252
|
|
|
213
253
|
Solves the intrinsic matrix and distortion coefficients from at least eight accepted samples, then releases the camera lease. No external pose is produced.
|
|
@@ -248,6 +288,21 @@ Registers the solved profile with Camera Source, which owns the profile contract
|
|
|
248
288
|
| Opcode | `publishCameraCalibration` |
|
|
249
289
|
| `CAMERA_ID` | String, default: `default` |
|
|
250
290
|
|
|
291
|
+
### `measure camera [CAMERA_ID] board pose board [COLUMNS] by [ROWS] square [SQUARE_METERS] m marker [MARKER_METERS] m scale [SCALE_SOURCE]`
|
|
292
|
+
|
|
293
|
+
Measures where the board is, in the camera's own frame, using the calibration already solved for that camera. Take it after the board is where it will stay: a calibration needs the board to move, so while one is being collected there is no single position to report. This is not a world pose. Scale comes entirely from the square size, so say whether that was measured or nominal.
|
|
294
|
+
|
|
295
|
+
| Property | Value |
|
|
296
|
+
|---|---|
|
|
297
|
+
| Type | Command |
|
|
298
|
+
| Opcode | `measureCameraBoardPose` |
|
|
299
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
300
|
+
| `COLUMNS` | Number, default: `9` |
|
|
301
|
+
| `ROWS` | Number, default: `6` |
|
|
302
|
+
| `SQUARE_METERS` | Number, default: `0.025` |
|
|
303
|
+
| `MARKER_METERS` | Number, default: `0.018` |
|
|
304
|
+
| `SCALE_SOURCE` | String, default: `nominal` |
|
|
305
|
+
|
|
251
306
|
### `import calibration profile [JSON] for camera [CAMERA_ID]`
|
|
252
307
|
|
|
253
308
|
Imports a calibration profile after schema, credential, and applicability checks. Pre-migration profiles are accepted and their world pose is dropped rather than reinterpreted.
|
|
@@ -389,6 +444,16 @@ Exports the stored intrinsic profile for that camera, or an empty string when no
|
|
|
389
444
|
| Opcode | `cameraCalibrationJson` |
|
|
390
445
|
| `CAMERA_ID` | String, default: `default` |
|
|
391
446
|
|
|
447
|
+
### `camera [CAMERA_ID] board pose JSON`
|
|
448
|
+
|
|
449
|
+
Returns the last measured board pose as JSON, or an empty string when none was measured. The pose is the board in the camera's frame, never a world pose, and it carries the observed corners and whether its scale was measured or nominal so it can be re-solved elsewhere.
|
|
450
|
+
|
|
451
|
+
| Property | Value |
|
|
452
|
+
|---|---|
|
|
453
|
+
| Type | Reporter |
|
|
454
|
+
| Opcode | `cameraBoardPoseJson` |
|
|
455
|
+
| `CAMERA_ID` | String, default: `default` |
|
|
456
|
+
|
|
392
457
|
<!-- END GENERATED BLOCKS -->
|
|
393
458
|
|
|
394
459
|
## Important behavior
|