Get images as a PIL image from camera, use resizing and saving as settling time in stack
This commit is contained in:
parent
dbed1c6971
commit
744ec28f93
3 changed files with 46 additions and 31 deletions
|
|
@ -84,6 +84,11 @@ class CameraProtocol(Protocol):
|
|||
for the main stream"""
|
||||
...
|
||||
|
||||
@thing_action
|
||||
def capture_image(self, stream_name, wait):
|
||||
"""Capture a PIL image from stream stream_name with timeout wait"""
|
||||
...
|
||||
|
||||
|
||||
class BaseCamera(Thing):
|
||||
"""A Thing representing a camera
|
||||
|
|
@ -194,6 +199,11 @@ class CameraStub(BaseCamera):
|
|||
for the main stream"""
|
||||
raise NotImplementedError("Cameras must not inherit from CameraStub")
|
||||
|
||||
@thing_action
|
||||
def capture_image(self, stream_name, wait):
|
||||
"""Capture a PIL image from stream stream_name with timeout wait"""
|
||||
raise Exception
|
||||
|
||||
|
||||
CameraDependency = direct_thing_client_dependency(CameraStub, "/camera/")
|
||||
RawCameraDependency = raw_thing_dependency(CameraProtocol)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue