200 200. u)400 -L400'--" - -7 . . . X 4 >-600 >-600 800 8001000 1000200 400 600 800 1000 200 400 600 800 1000 X pixels X pixels Figure 4-2 Sample original image (left) and corresponding output from edge detection algorithm (right). The flow direction is from left to right as indicated. Since the edge detection algorithm detects all edges, several extraneous edges can be identified as shown in Figure 4-2. The fact that sufficient scattering occurs at the airwater interface ensures that the interface is always a nearly continuous edge. This fact is exploited to prune the image of the unwanted edges or features. Interface Detection The key idea is to obtain the interface image as a binary image (i.e., the interface pixel has a value of I and 0 otherwise). The output of the edge detection algorithm can be pruned to provide the interface image shown in Figure 4-3. Since the interface is detected as a clear continuous edge, the occurrence of the first pixel value of I found in a column search of the edge image is assumed to be the interface.