API referenceVetraGlove ProPython

Capture quality

Capture & calibration

Current version · 2.0.0

Standalone capture quality session that evaluates 30-frame hand-pose windows collected by your application and returns quality feedback; capture control, sample storage, and calibration remain handled by CaptureSession and CalibrationSession. See Standalone capture quality check.

Import the standalone factory and models from qnbot_sdk.glove; online devices can also create a session via GloveDevice.create_capture_quality_session(). Use one session sequentially for one operator and physical hand; CaptureQualitySession supports the with context manager.

create_capture_quality_session()

Creates a standalone quality detector for a hand side and optional device model, suitable for playback, external input, or explicit model overrides without creating an Sdk, starting a device, or starting CaptureSession. Online devices should prefer GloveDevice.create_capture_quality_session().

Type

create_capture_quality_session(
    side: Side | str,
    device_model: CaptureQualityDeviceModel | str = CaptureQualityDeviceModel.STANDARD,
) -> CaptureQualitySession

Parameters

  • side: Required; Side.LEFT / Side.RIGHT, or "left" / "right".
  • device_model: Optional; CaptureQualityDeviceModel or its string value ("standard", "hmp_mx", "helix"), defaulting to CaptureQualityDeviceModel.STANDARD.

Returns

CaptureQualitySession.

Errors

  • InvalidArgumentError, UnavailableFeatureError.

CaptureQualitySession.required_sample_count()

Returns the complete window size required by the bundled detector (currently 30 frames).

Type

CaptureQualitySession.required_sample_count() -> int

Errors

  • ClosedHandleError.

CaptureQualitySession.assess_stage()

Evaluates one fresh, valid hand-pose window for a gesture stage. Normal gesture rejection is returned as feedback rather than raised as an exception.

Type

CaptureQualitySession.assess_stage(
    stage_id: str,
    window: Sequence[GloveHandPose],
) -> CaptureQualityFeedback

Parameters

  • stage_id: Required; one of the eight known gesture IDs (close, open, mcp90, mcp90_pip90, pinch_first, pinch_middle, pinch_ring, pinch_little). Assess close first to establish the session reference, then check other stages as needed.
  • window: Required; sequence of GloveHandPose frames whose length equals required_sample_count(), collected from the same hand (local fingertip positions in meters and XYZW quaternions, preserving hand side, validity, and timing). Wrist-only data is not accepted.

Errors

  • InvalidArgumentError (unknown stage_id, wrong window size or item type, mixed hand or session identity), ClosedHandleError, detector errors.

CaptureQualitySession.skip_stage()

Manually retains the latest rejected valid window. The returned feedback stays accepted=False, and the application records the manual decision separately. After retaining close, collect fresh windows for every dependent stage.

Type

CaptureQualitySession.skip_stage(stage_id: str) -> None

Parameters

  • stage_id: Must match the stage ID of the latest rejected valid window.

Errors

  • InvalidArgumentError (does not match the latest rejected window), ClosedHandleError.

CaptureQualitySession.reset()

Clears the detector reference and input identity. Call before switching operator or glove, after reconnection, or when starting a new check round.

Type

CaptureQualitySession.reset() -> None

Errors

  • ClosedHandleError.

CaptureQualitySession.close()

Releases the detector session; repeated close() succeeds. Further calls raise ClosedHandleError.

Type

CaptureQualitySession.close() -> None