Ive been building a sort of "Raspberry Pi GoPro" device that hooks onto the end glass of a hockey rink and records the action on the ice so I can go over video from my skates and work on technique. For the most part its worked great, the video quality is much better than I could get from most USB webcams, but the lighting used in the rink is playing havoc with the colour of the output.
You can see a really good example of the issue in this sequence here, as the overall colour of the shot cycles rapidly from normal to bright white, to a orangey-yellow tint, and back to bright white within 15 seconds. I suspect the colour of the players jerseys coming in and out of frame seems to drive these wild swings in how the camera perceives the colour of whats in front of it.
I did some reading on rink lighting and the picamera class that is doing the recording. Ice rinks apparently use a specialized kind of metal-halide light to brightly illuminate the large surface of the rink, but it doesnt appear to be as true to colour as natural light (sunlight) would be. The current setting of the PiCamera class in my project is a default of 'auto', which is clearly not adapting to the current situation correctly. Besides the default, PiCamera.awb_mode can also be set to a few settings that appear to be intended for natural light ('shade', 'sunlight', 'cloudy',... etc.), and a few for more conventional lighting sources ('fluorescent', 'tungsten', 'incandescent',...)
Im unsure of what setting for the auto white balance best matches this situation, as my reading seemed to indicate that HID metal-halide lamps werent classified as fluorescent or incandescent. Can anyone more familiar with the pi camera and/or lighting issues recording in rinks help me out?