API referenceVetraGlove ProPython

Capture plans and results

Data models

Current version · 2.0.0

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

FieldTypeNullableDescription
stage_idstrNoAction stage identifier
promptstrNoThe action prompt displayed to the wearer
required_sample_countintNoThe number of samples needed to complete the stage
optionalboolNoWhether 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

FieldTypeNullableDescription
package_idstuple[str, ...]NoThe algorithm package IDs covered by this plan
stagestuple[CapturePlanStage, ...]NoThe 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

FieldTypeNullableDescription
stage_idstrNoStage identifier
required_sample_countintNoRequired sample count
stateCaptureStageReadinessStateNoREUSABLE 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

FieldTypeNullableDescription
stateCaptureReadinessStateNoNOT_REQUIRED, READY or NEEDS_CAPTURE
planCapturePlanNoThe resolved capture plan
stagestuple[CaptureStageReadiness, ...]NoReadiness 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

FieldTypeNullableDescription
stage_idstrNoCurrent stage identifier
promptstrNoCurrent action prompt
optionalboolNoWhether the current stage allows skipping
stateCaptureStageStateNoCurrent stage state
originCaptureStageOriginNoNew capture or reuse of an existing capture
collected_sample_countintNoNumber of samples collected
required_sample_countintNoRequired sample count
request_idstr | NoneYesThe 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

FieldTypeNullableDescription
codestrNoStable failure code
messagestrNoFailure 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

FieldTypeNullableDescription
session_idstrNoCapture Session identifier
session_stateCaptureSessionStateNoSession state
failureCaptureFailure | NoneYesSession failure information
source_idstrNoThe source ID used for capture
sideSideNoThe captured left/right hand
operator_idstrNoWearer identifier
stageCaptureStageProgressNoCurrent 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

FieldTypeNullableDescription
sideSideNoThe captured left/right hand
planCapturePlanNoThe capture plan for this session
stateCaptureSessionStateNoSession state
current_stagestr | NoneYesCurrent stage identifier
request_idstr | NoneYesCurrent control request identifier
collected_sample_countintNoNumber of samples collected in the current stage
required_sample_countintNoRequired sample count for the current stage
remaining_stagestuple[str, ...]NoStages not yet completed
stage_progresstuple[CaptureStageProgress, ...]NoProgress of all stages
allowed_operationstuple[CaptureControlAction, ...]NoCurrently allowed control operations
next_actionstrNoNext action prompt
failureCaptureFailure | NoneYesSession 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

FieldTypeNullableDescription
stage_idstrNoStage identifier
frame_countintNoThe 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

FieldTypeNullableDescription
operator_idstrNoWearer identifier
sideSideNoThe captured left/right hand
created_atfloatNoCapture result creation time in milliseconds; new results use the current Glove time reference
stage_samplestuple[CaptureStageSamples, ...]NoFrame count summary saved for each stage

Values of the capture session enums:

EnumValues
CaptureSessionStateRUNNING, COMPLETED, FAILED, CANCELLED
CaptureStageStatePENDING, AWAITING_CONFIRMATION, COLLECTING, COMPLETED, SKIPPED
CaptureStageOriginNEW_CAPTURE, REUSED
CaptureControlActionCONFIRM, 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().

MemberString valueDescription
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.

MemberString valueMeaning
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

FieldTypeNullableDescription
acceptedboolNoWhether the current 30-frame window passed
actionCaptureQualityActionNoRecommended action for the application
reset_dependent_stagesboolNoWhether windows depending on the previous close reference are invalidated
reasonstrNoShort Chinese rejection reason; empty when accepted
reason_enstrNoShort English rejection reason; empty when accepted