  Visual recognition of material boundaries in transparent vessels is valuable
for numerous applications. Such recognition is essential for estimation of
fill-level, volume and phase-boundaries as well as for tracking of such
chemical processes as precipitation, crystallization, condensation, evaporation
and phase-separation. The problem of material boundary recognition in images is
particularly complex for materials with non-flat surfaces, i.e., solids,
powders and viscous fluids, in which the material interfaces have unpredictable
shapes. This work demonstrates a general method for finding the boundaries of
materials inside transparent containers in images. The method uses an image of
the transparent vessel containing the material and the boundary of the vessel
in this image. The recognition is based on the assumption that the material
boundary appears in the image in the form of a curve (with various constraints)
whose endpoints are both positioned on the vessel contour. The probability that
a curve matches the material boundary in the image is evaluated using a cost
function based on some image properties along this curve. Several image
properties were examined as indicators for the material boundary. The optimal
boundary curve was found using Dijkstra's algorithm. The method was
successfully examined for recognition of various types of phase-boundaries,
including liquid-air, solid-air and solid-liquid interfaces, as well as for
various types of glassware containers from everyday life and the chemistry
laboratory (i.e., bottles, beakers, flasks, jars, columns, vials and
separation-funnels). In addition, the method can be easily extended to
materials carried on top of carrier vessels (i.e., plates, spoons, spatulas).
