Thank you, the clues were AGC and AWB
Through research here and then a lot of experimentation, I found this to work quite well as a starting point:
Code: Select all
raspiyuv -o image%06d.rgb -n -ss 1000000 -t 60000 -h 2464 -w 3280 -rgb -ex off -tl 0 -awb off -bm -md 1 -ag 12.0 -awbg 1.3,1.3
This executes in 61.47 seconds and produces 59 images which is what I expected. Since I have an HQ camera as well, this gives me a leg up on doing the same with it.
For those reading and wondering what all of that does:
-awb off ........... turns off automatic white balance which reduces the time per image, but leaves the images very green.
-awbg 1.3,1.3 .. sets the blue and red gains to 1.3. This was a guess, but it worked well enough. More adjusting for those numbers later.
-ex off ............. exposure mode is off, but can leave the image under exposed.
-ag 12.0 .......... set the sensor's analog gain to 12.0 (the max) to compensate for -ex off
-md 1 .............. There's several modes which are fast, 1 is one of them, image quality seems unaffected by changing it, but brightness can be low
to cause the camera to use it's default automatic controls including AWB. I then ran
which has information about the red and blue gain settings. These are shown as fractions of integers over integers which I converted to floating point with a calculator. I then used those red and blue values in -awbg and I get satisfactory white balance. So I just used the camera to generate the values once, then turn off AWB and apply them all the time. Tweaking may be necessary, but it looks very good to me.
Here is a bash shell script I wrote to compute the floating point values from the integer fractions and display them. You can easily see the conditions under which white balance was computed.
Code: Select all
echo "starting camera in automatic mode"
raspistill -t 5000
echo "reading settings"
raspistill --settings 2> /tmp/settings
cat /tmp/settings | while read L1
AG=$(echo "$L1" | cut -d',' -f2)
AG=$(echo "$AG" | cut -d' ' -f4)
AG=$(echo "scale=2; $AG" | bc -q)
DG=$(echo "$L1" | cut -d',' -f3)
DG=$(echo "$DG" | cut -d' ' -f4)
DG=$(echo "scale=2; $DG" | bc -q)
RED=$(echo "$L2" | tr '=,' ' ' | cut -d' ' -f4)
RED=$(echo "scale=2; $RED" | bc -q)
BLU=$(echo "$L2" | tr '=,' ' ' | cut -d' ' -f7)
BLU=$(echo "scale=2; $BLU" | bc -q)
echo -e "analog gain: $AG | digital gain: $DG \t| RED,BLUE: $RED,$BLU"