Apply suggestions from code review of branch exposure-test
Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
This commit is contained in:
parent
ae04f3b133
commit
3b84c266b4
1 changed files with 5 additions and 3 deletions
|
|
@ -260,8 +260,10 @@ def _test_exposure_settings(camera: Picamera2, percentile: float) -> _ExposureTe
|
|||
|
||||
# A single request, to ensure metadata matches frame
|
||||
request = camera.capture_request()
|
||||
try:
|
||||
metadata = request.get_metadata()
|
||||
image = request.make_array("raw")
|
||||
finally:
|
||||
request.release()
|
||||
max_brightness = np.percentile(
|
||||
_channels_from_bayer_array(image),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue