The difficulty of automatic indexing of Kikuchi lines by computer lies in exper-mental errors in the mesurements of Kikuchi line positions and the camera constant. These errors were minimized by adopting a least square method to fit Kikuchi lines and correcting camera constant automatically. In addition, the geometry of lattice planes was used to aid the indexing of Kikuchi lines. Consquently, the reliability of correct indexing has been greatly improved. This method is universally applicable, however, it is, in particular, suitable to the case of Kikuchi lines from UHVEM.