Bayer capture now optional
This commit is contained in:
parent
f8194ec685
commit
b0d5426f5b
2 changed files with 9 additions and 4 deletions
|
|
@ -70,6 +70,7 @@ class ListAPI(MicroscopeView):
|
|||
"filename": "myfirstcapture",
|
||||
"keep_on_disk": true,
|
||||
"use_video_port": true,
|
||||
"bayer": true,
|
||||
"size": {
|
||||
"x": 640,
|
||||
"y": 480
|
||||
|
|
@ -81,6 +82,7 @@ class ListAPI(MicroscopeView):
|
|||
:<json string filename: filename of stored capture
|
||||
:<json boolean keep_on_disk: keep the capture file on microscope after closing
|
||||
:<json boolean use_video_port: capture still image from the video port
|
||||
:<json boolean bayer: keep raw capture data in the image file
|
||||
:<json json size: - **x** *(int)*: x-axis resize
|
||||
- **y** *(int)*: y-axis resize
|
||||
|
||||
|
|
@ -102,6 +104,7 @@ class ListAPI(MicroscopeView):
|
|||
filename = payload.param('filename')
|
||||
keep_on_disk = payload.param('keep_on_disk', default=True, convert=bool)
|
||||
use_video_port = payload.param('use_video_port', default=False, convert=bool)
|
||||
bayer = payload.param('bayer', default=True, convert=bool)
|
||||
|
||||
resize = payload.param('size', default=None)
|
||||
if resize:
|
||||
|
|
@ -118,7 +121,8 @@ class ListAPI(MicroscopeView):
|
|||
self.microscope.camera.capture(
|
||||
output,
|
||||
use_video_port=use_video_port,
|
||||
resize=resize)
|
||||
resize=resize,
|
||||
bayer=bayer)
|
||||
|
||||
return jsonify(output.metadata)
|
||||
|
||||
|
|
|
|||
|
|
@ -397,7 +397,8 @@ class StreamingCamera(BaseCamera):
|
|||
output,
|
||||
fmt: str='jpeg',
|
||||
use_video_port: bool=False,
|
||||
resize: Tuple[int, int]=None):
|
||||
resize: Tuple[int, int]=None,
|
||||
bayer: bool=True):
|
||||
"""
|
||||
Capture a still image to a StreamObject.
|
||||
|
||||
|
|
@ -432,7 +433,7 @@ class StreamingCamera(BaseCamera):
|
|||
format=fmt,
|
||||
quality=100,
|
||||
resize=resize,
|
||||
bayer=True)
|
||||
bayer=bayer)
|
||||
|
||||
# Resume video splitter port 1
|
||||
self.resume_stream()
|
||||
|
|
@ -444,7 +445,7 @@ class StreamingCamera(BaseCamera):
|
|||
quality=100,
|
||||
resize=resize,
|
||||
bayer=False,
|
||||
use_video_port=True)
|
||||
use_video_port=bayer)
|
||||
|
||||
return output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue