Bayer Filter

One issue I thought might be a problem is that the pixels on a camera don’t really each measure all 3 colours. Instead, they each measure one colour & the colours are then interpolated. This isn’t a problem if the object being photographed spans many pixels, but what if the object is a tiny bright dot, as in our situation.

An example Bayer filter (from wikipedia)

An example photo of “What the ladybird heard”:

Example photo of What the Ladybird Heard cover: The raw data from the camera. The yellow cover of the book doesn’t have much blue, so the blue pixels are darker.

Sadly the problem of the filter seems to be impacting our bee-orientation/id experiment. Here I rotate a tag 360:

The in-focus result (notice the dot colours don’t smoothly transition)

The result is less accurate predictions of orientation:

Points plotted on colour triangle (number = angle in degrees)

If we adjust the focus of the lens so the tag isn’t in focus, the colours are more reliable:

Progression of tag colour as it rotates (in 14-16 a non-tag was found by mistake)

This leads to a more reliable prediction:

Points plotted on colour triangle (number = angle in degrees)

I think the plan now is to:

  1. Collect more data but download raw (without interpolation) – this also saves bandwidth from the camera.
  2. Look at fitting the PSF using this raw data.
  3. Maybe leave the camera just a little out of focus, to ensure all the colours are detected.