Evolution of the domain structure (DS) in ultrathin cobalt films, deposited on sapphire substrate with the following structure: X\Au\Co(dCo nm thick layer or wedge)\X (dX nm thick layer or wedge perpendicular to Co wedge axis)\Au (where X is V or Mo) with perpendicular magnetization was investigated as a function of thickness dX. The study was performed using an optical polarizing microscope with CCD camera. Images of DS were recorded during various stages of magnetization reversal. A special software based on LabViewŽ was employed for acquisition and processing of domain images. To analyze the observed domain structures, topology properties of magnetic images were determined. Preferential orientation of domain walls was found in ultrathin Co covered by Mo but not by V.