fast-openISP icon indicating copy to clipboard operation
fast-openISP copied to clipboard

Saturation values calculate issue

Open XianchaoZhang opened this issue 2 years ago • 1 comments

There is one minor logic problem when calculating saturation value. It would always be true whatever the blc enable or disable in module_enable_status dict, this can be fixed by following change:

         # Saturation values should be carefully calculated if BLC module is activated
-        if 'blc' in self.cfg.module_enable_status:
+        if self.cfg.module_enable_status['blc']:

XianchaoZhang avatar Jun 02 '22 05:06 XianchaoZhang

@XianchaoZhang That is an intentional design, not a bug. Saturation value should be a physics-based value, no matter whether blc module is enabled.

if 'blc' in self.cfg.module_enable_status

This statement is to check if the sensor adds a black level to the digital output. For those sensors do, this value should be subtracted before calculating saturation value, even blc module is not enabled. If key 'blc' not in 'module_enable_status', it means this sensor doesnt add a black level.

QiuJueqin avatar Jun 12 '22 08:06 QiuJueqin