1. A method of detecting a foaming contaminant in a moving container, comprising: producing an image of at least a portion of the interior of the moving container and any contents thereof, determining a level of low frequency spatial variations in intensity in the image, determining a level of high frequency spatial variations in intensity in the image, and determining the presence of a foaming contaminant by comparing the level of low frequency spatial variations in intensity to the level of high frequency spatial variations in intensity.