A method for dynamically detecting irregularity state of railway track by means of a photoelectric technique is introduced. The unit that consists of CCD sensor, IR light source, detecting unit board for track, data memory transfer unit and ground-based microcomputer processing system is installed on an operating locomotive. The principle for direct measurement, hardware circuit, floating binaryzation and parallel sampling with double CCDs are described. The tested results in field, detection curves and pictures of fault on the spots are given. The unit is stable and reliable. The data obtaine...