Commit graph

25 commits

Author SHA1 Message Date
Richard Bowman
82eba1e99a fixed typing error 2021-04-27 20:17:07 +01:00
Richard Bowman
87f636ecc0 Code format and linting 2021-04-27 19:56:54 +01:00
Richard Bowman
bb303d4766 Simplified auto gain/exposure algorithm
adjust_shutter_and_gain_from_raw now uses a simpler algorithm.
The code is longer overall but hides some details in fuctions.
I've also split the loop into one for shutter speed and one for gain.
This isn't the algorithm that I originally wrote, but it seems to
work and is more readable.
2021-04-27 18:54:21 +01:00
Richard Bowman
88de3089ea Fixed linter errors 2021-04-21 13:38:14 +01:00
Richard Bowman
1f1a75c02a Merge branch 'master' into auto-exposure-gain-awb 2021-04-21 12:10:47 +01:00
Richard Bowman
cd5e32b843 Removed deprecated np.float
numpy 1.20 deprecates np.float, which was only ever an alias for
``float``.  I've replaced all occurrences of np.float with float, as
recommended.  There should be no change in functionality.
2021-03-30 17:40:19 +01:00
Richard Bowman
a373afd955 swap print for logging in old function 2021-03-16 11:01:57 +00:00
Richard Bowman
3b435ab2ee Deleted obsolete functions 2021-02-18 15:56:11 +00:00
Richard Bowman
0f1a400979 Fixed type hint 2021-02-15 17:04:44 +00:00
Richard Bowman
4c27d88b37 Fixed description and linted 2021-02-11 15:54:58 +00:00
Richard Bowman
5527c4eb7b Fix auto-exposure and AWB
The previous "auto calibrate" button for the camera relied on a
combination of the built-in autoexposure/AWB and
some JPEG-based tweaks to get the exposure settings right.
This often led to confusing results, e.g. oscillating between green and
 pink images.

 I have rewritten the auto-exposure code to adjust gain and shutter
 speed based on the raw image.  This seems to be
 very reliable, at the expense of being quite slow.  That's a price I'm
 happy to pay.

 I have replaced both the camera's auto white balance and my
 JPEG-based AWB hack with a single-shot AWB method that
 looks at the raw image.
2021-02-11 14:30:20 +00:00
Joel Collins
7ba3f447e1 Added extra type hints 2020-12-04 15:23:03 +00:00
Joel Collins
63b633ba44 2.9 dev numpy types 2020-12-04 13:35:11 +00:00
Joel Collins
7866ec0f47 Static type analysis 2020-11-30 13:36:45 +00:00
Joel Collins
6fb61e1e3f Reverted logging style 2020-11-12 15:45:58 +00:00
Joel Collins
9f5252194a Updated all log strings to new format 2020-11-12 15:12:17 +00:00
Joel Collins
9310deeeff Fixed pylint line ignores 2020-10-16 09:35:41 +00:00
Joel Collins
994e83dbeb Code cleanup 2020-10-14 14:56:29 +00:00
Joel Collins
2bfb988460 Code formatting 2020-10-13 15:02:19 +01:00
Joel Collins
893e8e9357 Calibrate with greyworld AWB if available 2020-09-09 17:25:31 +01:00
Joel Collins
54c342bbbb Switch to picamerax 2020-09-07 16:31:59 +01:00
Joel Collins
bf3b141ec4 Fixed logging message 2020-05-27 13:19:32 +01:00
Joel Collins
e9c1fe0507 Fixed logging import 2020-05-27 12:56:57 +01:00
Joel Collins
4a553040d3 Fixed logging and split access and root file handlers 2020-05-20 17:46:44 +01:00
Joel Collins
bd7cea0fdf Added draft PiCamera LST extension 2020-01-14 16:36:37 +00:00