Capture plans and results
Data models
In unified eight-gesture capture, capture_status() and start_capture() accept an empty package_ids list and use the configured built-in Skeleton plan. The plan contains 8 gestures with 30 frames each; every stage has optional=false. Package IDs do not change the gesture set; each algorithm fits only its declared subset.
The Capture types together describe the capture plan, the readiness state before starting, the running progress, the Session snapshot and the final result.
CapturePlanStage
CapturePlanStage is one action stage in CapturePlan.stages, used to tell the program what action to display, how many samples need to be captured and whether skipping is allowed.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
stage_id | str | No | Action stage identifier |
prompt | str | No | The action prompt displayed to the wearer |
required_sample_count | int | No | The number of samples needed to complete the stage |
optional | bool | No | Whether skipping is allowed |
CapturePlan
Hand plans contain eight required gestures with 30 frames each. See Capture for their order and reuse rules.
CapturePlan appears as CaptureReadiness.plan and CaptureSessionSnapshot.plan and describes which algorithm packages this Capture involves and the stage execution order.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
package_ids | tuple[str, ...] | No | The algorithm package IDs covered by this plan |
stages | tuple[CapturePlanStage, ...] | No | The capture stages executed in order |
CaptureStageReadiness
CaptureStageReadiness is the readiness state of one stage in CaptureReadiness.stages, used to determine whether the stage can reuse existing data or needs to be re-captured.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
stage_id | str | No | Stage identifier |
required_sample_count | int | No | Required sample count |
state | CaptureStageReadinessState | No | REUSABLE or NEEDS_CAPTURE |
CaptureReadiness
CaptureReadiness is returned by device.capture_status() and is used to view the overall readiness state, the capture plan and whether each stage needs capture before creating a Capture Session.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
state | CaptureReadinessState | No | NOT_REQUIRED, READY or NEEDS_CAPTURE |
plan | CapturePlan | No | The resolved capture plan |
stages | tuple[CaptureStageReadiness, ...] | No | Readiness state of each stage |
CaptureStageProgress
CaptureStageProgress appears as an element of CaptureProgress.stage and CaptureSessionSnapshot.stage_progress, used to drive the action prompt, sample progress and the currently allowed interaction.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
stage_id | str | No | Current stage identifier |
prompt | str | No | Current action prompt |
optional | bool | No | Whether the current stage allows skipping |
state | CaptureStageState | No | Current stage state |
origin | CaptureStageOrigin | No | New capture or reuse of an existing capture |
collected_sample_count | int | No | Number of samples collected |
required_sample_count | int | No | Required sample count |
request_id | str | None | Yes | The current confirm or control request identifier |
CaptureFailure
CaptureFailure appears as CaptureProgress.failure and CaptureSessionSnapshot.failure, using a stable code and a readable message to describe the failure reason of the Capture Session.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
code | str | No | Stable failure code |
message | str | No | Failure description for display or logging |
CaptureProgress
CaptureProgress is published by device.capture_progress() and is used by the external interaction interface to continuously display the current source, wearer, Session state and action stage.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
session_id | str | No | Capture Session identifier |
session_state | CaptureSessionState | No | Session state |
failure | CaptureFailure | None | Yes | Session failure information |
source_id | str | No | The source ID used for capture |
side | Side | No | The captured left/right hand |
operator_id | str | No | Wearer identifier |
stage | CaptureStageProgress | No | Current stage progress |
CaptureSessionSnapshot
CaptureSessionSnapshot is returned by CaptureSession.snapshot() and is the current complete snapshot of a manual Capture Session, used to display progress and decide the next allowed operation.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
side | Side | No | The captured left/right hand |
plan | CapturePlan | No | The capture plan for this session |
state | CaptureSessionState | No | Session state |
current_stage | str | None | Yes | Current stage identifier |
request_id | str | None | Yes | Current control request identifier |
collected_sample_count | int | No | Number of samples collected in the current stage |
required_sample_count | int | No | Required sample count for the current stage |
remaining_stages | tuple[str, ...] | No | Stages not yet completed |
stage_progress | tuple[CaptureStageProgress, ...] | No | Progress of all stages |
allowed_operations | tuple[CaptureControlAction, ...] | No | Currently allowed control operations |
next_action | str | No | Next action prompt |
failure | CaptureFailure | None | Yes | Session failure information |
CaptureStageSamples
CaptureStageSamples is the capture summary of one stage in CaptureResult.stage_samples, used to view how many frames were finally saved for that stage.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
stage_id | str | No | Stage identifier |
frame_count | int | No | The number of frames saved for this stage |
CaptureResult
CaptureSession.result() returns CaptureResult | None: after the Session completes you get the capture result for this session, and while it is not yet complete you get None. CaptureResult records the wearer, left/right hand, completion time and per-stage frame count summary of this capture.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
operator_id | str | No | Wearer identifier |
side | Side | No | The captured left/right hand |
created_at | float | No | Capture result creation time in milliseconds; new results use the current Glove time reference |
stage_samples | tuple[CaptureStageSamples, ...] | No | Frame count summary saved for each stage |
Values of the capture session enums:
| Enum | Values |
|---|---|
CaptureSessionState | RUNNING, COMPLETED, FAILED, CANCELLED |
CaptureStageState | PENDING, AWAITING_CONFIRMATION, COLLECTING, COMPLETED, SKIPPED |
CaptureStageOrigin | NEW_CAPTURE, REUSED |
CaptureControlAction | CONFIRM, RETRY, SKIP, CANCEL |
CaptureQualityDeviceModel
Selects the detector policy in create_capture_quality_session(); online devices resolve the model automatically through GloveDevice.create_capture_quality_session().
| Member | String value | Description |
|---|---|---|
STANDARD | "standard" | Standard glove detector policy (default) |
HMP_MX | "hmp_mx" | VetraGlove HMP-MX detector policy |
HELIX | "helix" | Helix detector policy |
CaptureQualityAction
Advice returned in CaptureQualityFeedback.action.
| Member | String value | Meaning |
|---|---|---|
NEXT | "next" | Current window passed; proceed to the next gesture |
RETRY_STAGE | "retry_stage" | Retry collecting the current gesture window |
RECAPTURE_REFERENCE | "recapture_reference" | Recapture the close reference |
CaptureQualityFeedback
Returned by CaptureQualitySession.assess_stage(), independent of CaptureStageProgress.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
accepted | bool | No | Whether the current 30-frame window passed |
action | CaptureQualityAction | No | Recommended action for the application |
reset_dependent_stages | bool | No | Whether windows depending on the previous close reference are invalidated |
reason | str | No | Short Chinese rejection reason; empty when accepted |
reason_en | str | No | Short English rejection reason; empty when accepted |