#!/bin/bash # Check if a light source is provided if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi LIGHT_SOURCE="$1" # Define a lookup function get_params() { case "$1" in F) echo "2701 1382" ;; TL83) echo "3025 2385" ;; CWF) echo "4125 2314" ;; TL84) echo "4021 2365" ;; D65) echo "6521 2156" ;; *) echo "Error: Unknown light source '$1'" exit 1 ;; esac } # Get temperature and lux values read TEMP LUX <<< "$(get_params "$LIGHT_SOURCE")" # Run the camera command rpicam-still -t 5000 \ --shutter 20000 \ -r -o imx335_alsc_${TEMP}k.jpg # --tuning-file /usr/local/share/libcamera/ipa/rpi/pisp/uncalibrated.json \