summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/alsc_status.h
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-07-27 21:51:41 +0530
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-03 11:48:46 +0100
commitc4b75cb66c5671e6494ce9ec0aa661ce1b90572d (patch)
tree41bdd83fc3b56ccf92319d17ac79185bd40f1438 /src/ipa/raspberrypi/controller/alsc_status.h
parent2dd19efffc5a68f857e3d1748767eeb6f8fe1161 (diff)
libcamera: formats: PixelFormatInfo: Add name lookup function
Add a function which returns PixelFormatInfo, given format name as a string. Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/alsc_status.h')
0 files changed, 0 insertions, 0 deletions
aul Elder <paul.elder@ideasonboard.com> # # rkisp1.py - LSC module for tuning rkisp1 from .lsc import LSC import libtuning as lt import libtuning.utils as utils from numbers import Number import numpy as np class LSCRkISP1(LSC): hr_name = 'LSC (RkISP1)' out_name = 'LensShadingCorrection' # \todo Not sure if this is useful. Probably will remove later. compatible = ['rkisp1'] def __init__(self, *args, **kwargs): super().__init__(**kwargs) # We don't actually need anything from the config file def validate_config(self, config: dict) -> bool: return True # @return Image color temperature, flattened array of red calibration table # (containing {sector size} elements), flattened array of blue # calibration table, flattened array of (red's) green calibration # table, flattened array of (blue's) green calibration table def _do_single_lsc(self, image: lt.Image): cgr, gr = self._lsc_single_channel(image.channels[lt.Color.GR], image) cgb, gb = self._lsc_single_channel(image.channels[lt.Color.GB], image) # \todo Should these ratio against the average of both greens or just # each green like we've done here? cr, _ = self._lsc_single_channel(image.channels[lt.Color.R], image, gr) cb, _ = self._lsc_single_channel(image.channels[lt.Color.B], image, gb) return image.color, cr.flatten(), cb.flatten(), cgr.flatten(), cgb.flatten() # @return List of dictionaries of color temperature, red table, red's green # table, blue's green table, and blue table def _do_all_lsc(self, images: list) -> list: output_list = [] output_map_func = lt.gradient.Linear().map # List of colour temperatures list_col = [] # Associated calibration tables list_cr = [] list_cb = [] list_cgr = [] list_cgb = [] for image in self._enumerate_lsc_images(images): col, cr, cb, cgr, cgb = self._do_single_lsc(image) list_col.append(col) list_cr.append(cr) list_cb.append(cb) list_cgr.append(cgr) list_cgb.append(cgb) # Convert to numpy array for data manipulation list_col = np.array(list_col) list_cr = np.array(list_cr) list_cb = np.array(list_cb) list_cgr = np.array(list_cgr) list_cgb = np.array(list_cgb)