Set colour correction to interpolate value
Update hardware test readme Add pause between calibrating camera and setting background
This commit is contained in:
parent
e51fbb4fa6
commit
18ad404a57
4 changed files with 37 additions and 31 deletions
|
|
@ -772,10 +772,11 @@ class StreamingPiCamera2(BaseCamera):
|
|||
This is broken out into its own property for convenience and compatibility with
|
||||
the micromanager API
|
||||
|
||||
Ir is a 9 value tuple used to specify the 3x3 matrix that the GPU pipeline uses
|
||||
It is a 9 value tuple used to specify the 3x3 matrix that the GPU pipeline uses
|
||||
to convert from the camera R,G,B vector to the standard R,G,B.
|
||||
|
||||
See page Raspberry Pi Camera Algorithm and Tuning Guide, page 45.
|
||||
The value here is interpolated from the IMX219 defaults for the colour temperatures
|
||||
above and below our LED temperature of 5000K.
|
||||
"""
|
||||
return tuple(tf_utils.get_static_ccm(self.tuning)[0]["ccm"])
|
||||
|
||||
|
|
@ -799,15 +800,15 @@ class StreamingPiCamera2(BaseCamera):
|
|||
"""
|
||||
# This is flattened 3x3 matrix. See `colour_correction_matrix`
|
||||
col_corr_matrix = [
|
||||
1.80439,
|
||||
-0.73699,
|
||||
-0.06739,
|
||||
-0.36073,
|
||||
1.83327,
|
||||
-0.47255,
|
||||
-0.08378,
|
||||
-0.56403,
|
||||
1.64781,
|
||||
2.222935,
|
||||
-0.759672,
|
||||
-0.463262,
|
||||
-0.683489,
|
||||
2.711882,
|
||||
-1.028399,
|
||||
-0.261375,
|
||||
-0.668016,
|
||||
1.929391,
|
||||
]
|
||||
self.colour_correction_matrix = col_corr_matrix
|
||||
|
||||
|
|
@ -858,6 +859,7 @@ class StreamingPiCamera2(BaseCamera):
|
|||
self.calibrate_lens_shading()
|
||||
self.reset_ccm()
|
||||
self.calibrate_white_balance()
|
||||
time.sleep(0.5)
|
||||
self.set_background(portal)
|
||||
|
||||
@lt.thing_action
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def set_static_ccm(
|
|||
adaptive tweaking by the algorithm.
|
||||
"""
|
||||
ccm = Picamera2.find_tuning_algo(tuning, "rpi.ccm")
|
||||
ccm["ccms"] = [{"ct": 2860, "ccm": col_corr_matrix}]
|
||||
ccm["ccms"] = [{"ct": 5000, "ccm": col_corr_matrix}]
|
||||
|
||||
|
||||
def get_static_ccm(tuning: dict) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue