  Two-dimensional patterns are used in many research areas in computer science,
ranging from image processing to specification and verification of complex
software systems (via scenarios). The contribution of this paper is twofold.
First, we present the basis of a new formal representation of two-dimensional
patterns based on contours and their compositions. Then, we present efficient
algorithms to verify correctness of the contour-representation. Finally, we
briefly discuss possible applications, in particular using them as a basic
instrument in developing software tools for handling two dimensional words.
