Unify camera capute signatures
This commit is contained in:
parent
dcf329f1c5
commit
e0c63ab354
3 changed files with 5 additions and 5 deletions
|
|
@ -362,7 +362,7 @@ class BaseCamera(lt.Thing):
|
||||||
|
|
||||||
def capture_image(
|
def capture_image(
|
||||||
self,
|
self,
|
||||||
stream_name: Literal["main", "lores", "raw"],
|
stream_name: Literal["main", "lores", "full"],
|
||||||
wait: Optional[float] = None,
|
wait: Optional[float] = None,
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
"""Capture a PIL image from stream stream_name with timeout wait."""
|
"""Capture a PIL image from stream stream_name with timeout wait."""
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class OpenCVCamera(BaseCamera):
|
||||||
@lt.action
|
@lt.action
|
||||||
def capture_array(
|
def capture_array(
|
||||||
self,
|
self,
|
||||||
stream_name: Literal["main", "full"] = "full",
|
stream_name: Literal["main", "lores", "raw", "full"] = "full",
|
||||||
wait: Optional[float] = None,
|
wait: Optional[float] = None,
|
||||||
) -> NDArray:
|
) -> NDArray:
|
||||||
"""Acquire one image from the camera and return as an array.
|
"""Acquire one image from the camera and return as an array.
|
||||||
|
|
@ -111,7 +111,7 @@ class OpenCVCamera(BaseCamera):
|
||||||
|
|
||||||
def capture_image(
|
def capture_image(
|
||||||
self,
|
self,
|
||||||
stream_name: Literal["main", "full"] = "main",
|
stream_name: Literal["main", "lores", "full"] = "main",
|
||||||
wait: Optional[float] = None,
|
wait: Optional[float] = None,
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
"""Acquire one image from the camera and return as a PIL image.
|
"""Acquire one image from the camera and return as a PIL image.
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@ class SimulatedCamera(BaseCamera):
|
||||||
@lt.action
|
@lt.action
|
||||||
def capture_array(
|
def capture_array(
|
||||||
self,
|
self,
|
||||||
stream_name: Literal["main", "full"] = "full",
|
stream_name: Literal["main", "lores", "raw", "full"] = "full",
|
||||||
wait: Optional[float] = None,
|
wait: Optional[float] = None,
|
||||||
) -> NDArray:
|
) -> NDArray:
|
||||||
"""Acquire one image from the camera and return as an array.
|
"""Acquire one image from the camera and return as an array.
|
||||||
|
|
@ -335,7 +335,7 @@ class SimulatedCamera(BaseCamera):
|
||||||
|
|
||||||
def capture_image(
|
def capture_image(
|
||||||
self,
|
self,
|
||||||
stream_name: Literal["main", "lores", "raw"],
|
stream_name: Literal["main", "lores", "full"],
|
||||||
wait: Optional[float] = None,
|
wait: Optional[float] = None,
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
"""Capture to a PIL image. This is not exposed as a ThingAction.
|
"""Capture to a PIL image. This is not exposed as a ThingAction.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue