Move CaptureParams into camera from autofocus

This commit is contained in:
Joe Knapper 2026-02-19 12:19:31 +00:00 committed by Julian Stirling
parent 67e43c90df
commit 37e3450670
3 changed files with 10 additions and 10 deletions

View file

@ -20,6 +20,7 @@ from typing import Any, Literal, Mapping, Optional, Self, Tuple
import numpy as np
import piexif
from PIL import Image
from pydantic import BaseModel
import labthings_fastapi as lt
from labthings_fastapi.types.numpy import NDArray
@ -47,6 +48,13 @@ class CaptureError(RuntimeError):
"""An error trying to capture from a CameraThing."""
class CaptureParams(BaseModel):
"""A class for capturing at least a single image."""
images_dir: str
save_resolution: tuple[int, int]
class NoImageInMemoryError(RuntimeError):
"""An error called if no image is in memory when accessed."""