The paper presents a new automatic detection system of DC traction motor commutator, which captures the image of traction motor commutator through CCD (Charge Couple Device) camera in real time, and recognizes the eigenvalue of commutator image by utilizing image processing technology. Meantime, the system takes it as the localization signal of numerical control machine. Therefore, computer vision controls cutting tool working instead of eyes in this system. The system has high-performance of precision and real time proved by experiment, so which has a certain value of practicality.