A large class of patterns, consisted of lines being situated in the plane, is classified into equivalence classes, each of which is a conveyor of meaning of a shape. Invariants of this classification are developed and, in particular, for a more regular subclass of these patterns, invariant matrices are defined being unique arithmetic codes of these shapes. Then, an algorithm is established as the way of transformation of so called associated matrices, formed as a result of local inspection of patterns, into invariant ones which express the global properties of these patterns. Using the language of psychology, we could say that this investigation is the study of percepts and the establishment of their meaning.