pylabrobot.brooks.precise_flex.PreciseFlexVision.capture_image#
- async PreciseFlexVision.capture_image(camera: Literal['front', 'bottom'] | int = 'front') ndarray#
Fetch one frame for
cameradirectly off the vision server as an array, no motion.Triggers a frame with
system.cameraacquireand reads results off the vision server’s image stream until the matchingPrimary Image [n]arrives, discarding non-image and other-camera results, then decodes its JPEG to an RGB array. Requires a configured vision server (raises if none was set up). For a saved file on the vision server host instead, usesave_image.This grabs the camera’s current hardware state; it does NOT apply pending acquire-tool settings. Change one first with
_set_camera_setting(which applies it) for it to show in the frame.- Parameters:
camera (Literal['front', 'bottom'] | int) – which gripper camera -
"front"/1(front-facing) or"bottom"/2(downward).- Returns:
The full-resolution frame as an RGB
numpyarray (height x width x 3,uint8).- Raises:
TimeoutError – if no frame arrives off the vision server image stream before the read times out.
RuntimeError – if the image stream ends before the requested frame is seen.
- Return type:
ndarray