A mathematical model is constructed of the formation of Hartmann spots, and a technique is described for finding the coordinates of the spots on a photographic plate with enhanced accuracy. Numerical results of measurements of Hartmann photographs obtained during certification of the main mirror of the AZT-22 telescope at LOMO are presented.