An automatic collimation method based on CCD sensor was presented in this article. Using the vernier calipers scale line
the practical collimation line was simulated. The dislocation enlarge principle and multiple datum points were participated in collimation at the same time. Median filtering and morphological operator were combined to obtain the binary edge map.By fitting straight-line equation by least square method and calculating average distance
the collimation position was identified.The experiment result showed that this method can accurately identify the aligned lines
. Luo P F.Application of computer vision and laser interferometer to the inspection of line scale [J]. Opt. and Lasers in Engineering, 2004,(42):563-584.