An electroencephalogram (EEG) is examined as an image limited by a polygonal contour. A sequence of elementary vectors presented in analytical form, which approximates the contour line, is accepted as an electroencephalogram model. A concept on a fine structure in the electroencephalogram as a set of elementary vectors that defines the segmented parts obtained as a result of electroencephalogram decomposition is introduced. The expressions for a measure of similarity of two segments of the fine structure in a form of magnitude of their normalized scalar product are obtained. An example on detecting and analyzing the “Sleep Spindle” pattern, which is observed in the frequency range of 9–13 Hz, by using the contour model, is presented.