From 1fe8ea18d879321ab08ae02391c96c5b01fd3d3d Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 20 May 2019 10:06:42 +0100 Subject: [PATCH] Default capture resolution to MAX_RESOLUTION --- openflexure_microscope/camera/pi.py | 9 +++++++-- openflexure_microscope/microscoperc.default.yaml | 5 ----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openflexure_microscope/camera/pi.py b/openflexure_microscope/camera/pi.py index eed43cce..68e8a837 100644 --- a/openflexure_microscope/camera/pi.py +++ b/openflexure_microscope/camera/pi.py @@ -41,8 +41,8 @@ from .set_picamera_gain import set_analog_gain, set_digital_gain # Handle config and picamera settings CONFIG_KEYS = { - 'video_resolution': (832, 624), - 'image_resolution': (2592, 1944), + 'video_resolution': (1640, 1232), + 'image_resolution': (2592, 1944), # Default for PiCamera v1. Overridden in __init__ 'numpy_resolution': (1312, 976), 'jpeg_quality': 75, 'picamera_settings': { @@ -86,6 +86,11 @@ class StreamingCamera(BaseCamera): # Populate config and settings with all available keys self.config.update(CONFIG_KEYS) + # Update config based on PiCamera parameters + self.config.update({ + 'image_resolution': tuple(self.camera.MAX_RESOLUTION) + }) + # Load config dictionary if passed if config: self.apply_config(config) diff --git a/openflexure_microscope/microscoperc.default.yaml b/openflexure_microscope/microscoperc.default.yaml index f1769970..0692a884 100644 --- a/openflexure_microscope/microscoperc.default.yaml +++ b/openflexure_microscope/microscoperc.default.yaml @@ -1,8 +1,3 @@ -# Resolutions for streaming and capture -video_resolution: [832, 624] -image_resolution: [2592, 1944] -numpy_resolution: [1312, 976] - # Field of view, in stage steps fov: [4100, 3146]