1. An apparatus, comprising: a proximity head that includes a channel that delivers a flow of cleaning foam onto a substrate; a transparent cell that is connected to the channel by an input passage and an output passage, wherein the input passage diverts a sample of the flow from the channel into the transparent cell and the output passage diverts the sample from the transparent cell back into the channel; one or more light emitting diodes that illuminate the sample in the transparent cell; and an optical device that captures an image of the illuminated sample.