summaryrefslogtreecommitdiff
path: root/utils/rkisp1/lsc_parse_android_config.py
AgeCommit message (Collapse)Author
2023-03-10utils: rkisp1: Add script to extract LSC tables from AndroidJacopo Mondi
Android ship a per-sensor configuration file in .xml format. The .xml file contains a main <matfile> node and a <sensor> sub-node which contains an <LSC> entry. The LSC tables there contained can be re-used for libcamera, by parsing them opportunely. Add a script to utils/rkisp1/ to extract the LSC tables from Android configuration file for the RkISP1 platform, modeled after the requirements of the Rockchip closed source IQ tuning module. Compared to the Rockchip IQ LSC module the one implemented in libcamera is slightly simpler, and the parsing of the LSC table takes that into account by: - Only outputting tables for the larger found sensor resolution - Only outputting tables for "vignetting" value == 70 (ignoring the ones for vignetting values of 100) The script outputs to stdout a "LensShadingCorrection" section that can be directly pasted in a libcamera sensor configuration file. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>