A machine-accessible medium containing software code that, when read by a
computer, causes the computer to perform method for filtering a video in
a video system. The method may include generating a foreground mask and a
background model from a video, where the foreground mask comprises moving
pixels in the video and the background model comprises a statistical
description, including a mean and a variance value, for each pixel in the
video. Then the background model variance is filtered with a
one-dimensional high pass filter in a single orientation. Next, for each
linear grouping of pixels in the single orientation of the filtered
variance, a first edge pixel is detected between a high-variance group of
pixels and a low-variance group of pixels. Then a first waterline
position is detected as an area bounded by the first edge pixels.