In this thesis, a method is fulfilled for representing an image gray scan line by a relational tree that provides a two-dimensional description of the structure of the scan line, and the algorithm that builds up the relational tree is given. The relational tree is a versatile data strcture, its applications include image compression and texture classification are explored.