Reports

Contents

Title: Picam FWB Rescaling - EE
Date:2022-02-18
Data File: EE_PicamResc_AWB.csv
EE_PicamResc_R14B13.csv
EE_PicamResc_R18B18.csv
EE_PicamResc_AWBsun.csv
Refers to:EE,RPI0W-005

Acronyms

R = red

B = blue

G = green

GCC = green chromatic coordinate, [green/(red+blue+green)]

AWB = automatic white balance where red, blue, and green gains are set by the camera

FWB = fixed white balance where at least one of the red, blue, or green gains is set to a fixed value by the user

 

East End

2020-07-21 (DOY 23): Installed picam onto EE tower

2022-02-18 (DOY 49): Added FWB photos using R=1.4, B=1.3 (scaling factors Joe found online)

2022-06-09 (DOY 160): Changed FWB to use R=1.8,B=1.8 (scaling factors determined by Joe's analysis comparing R1.4B1.3 photos with AWB photos).

2022-09-15 (DOY 258): Changed from FWB to "AWB Sun" in hopes that it will provide a more stable version of AWB photos. Alas. See bottom of this report for the resulting data.

2022-11-18 (DOY 322): Changed from "AWB Sun" back to FWB using R=1.8,B=1.8 scaling factors

 

Based on our analysis at Mayberry, FWB photos are nicer because there is less noise in the GCC values day to day. However, with our current RGB gains for FWB photos, there is a step change in the timeseries graph of GCC values when the data changes from AWB to FWB. To make a nice-looking graph, we decided to scale the FWB photos so the GCC from FWB photos is about the same magnitude as the GCC from the AWB photos.

To calculate rescaling factors, I used linear regression comparing R, G, and B between AWB and FWB photos for all daytime data. Restricting the regression to midday data did not provide enough range for a good regression. I forced the regression through 0 and used the slope of the regression line as my rescaling factor.

Joe did some initial analysis with the FWB photos when R=1.4, B=1.3 and determined that if we scaled R and B so that R=1.8, B=1.8, the resulting GCC would be the same magnitude as the AWB GCC.

I also calculated rescaling factors for R, G, B using linear regression comparing R, G, B between AWB and FWB photos for all daytime data. Restricting the regression to midday data did not provide enough range for a good regression. I forced the regression through 0 and used the slope of the regression line as my rescaling factor.

 

DOY 49-160 when R=1.4, B=1.3

There is a step-change in the red, blue, and green channels on Jul 14 (DOY 195) See Note * at bottom.

  AWB vs. FWB R1.4B1.3
  slope R2
red 1.48 90%
blue

1.13

84%
green 1.03 54%

 

DOY 160-258 (present) when R=1.8, B=1.8

  AWB vs. FWB R1.8B1.8
  slope R2
red 1.12 85%
blue 0.57 94%
green 1.07 66%

 

Timeseries plot

The timeseries plots show the result of rescaling the FWB photos to get the final GCC to approximately match the GCC from the AWB photos. The right-hand figure shows the GCC as a 5-day moving average--easier to see trends with less noise.

Scaling factors used FWB R1.4B1.3 FWB R1.8B1.8
  RB RGB RB RGB
red 1.29 1.48 1.12 1.12
green  n/a 1.03 n/a 1.07
blue 1.38

1.13

0.57 0.57
Method to calculating rescaling factors Joe taking photos outside his window and testing which scaling factors made the photo closest to what his eye could see

Linear regression

Linear regression Linear regression
Conclusion The result from Joe's rescaling and the linear regression are pretty much the same. One is not better than the others. However, for consistency with the R1.8B1.8 photos, could rescale these photos by RGB scaling factors. Could rescale these photos by RGB scaling factors

 

After all of the rescaling work, Joe and I decided just to stick with AWB photos for now. The FWB photos aren't a substantial improvement over the AWB photos, so it's not worth the work.

We will keep saving the FWB photos with R=1.8, B=18 gains. In the future, if someone needs to use the FWB photos for analysis, they'll be available.

 

East End data in database:

2020-07-21 (DOY 23) to present: Picam AWB photos

 

East End photos available in database:

2020-07-21 (DOY 23) to 2022-02-18 (DOY 49): AWB photos

2022-02-19 (DOY 50) to 2022-06-09 11:15 (DOY 160): FWB photos (R=1.4, B=1.3) rescaled using R(1.48), G(1.13), B(1.03).

2022-06-09 11:45 (DOY 160) to present: FWB photos (R=1.8, B=1.8) rescaled using R(1.42), G(0.57), B(1.07).

 

Note

* There is a step change in the red, blue, and green channels on Jul 14 (DOY 195). This is visible in the both the AWB and FWB data. We did visit the site that day but we didn't change the camera program on that day. There was some bird poop in the photo that we wiped off that day, but it was merely blocking the sky, not our ROI. Maybe cleaning the camera cleared the slightest smudge from our ROI and that was enough to change the data, especially in the blue channel. I re-ran the AWB photos during those few days to check that the data is correct.

 

Trying AWB Sun

Picam also has an "AWB Sun" setting that we tried. Generally looks about the same or worse as AWB. The "worse" part was a weird excursion for about 2 weeks in Oct.