Wheel set is the major running components of a train. Online measurement of wheel set wear parameters is important for the safety of train. The acquisition and processing of wheel set profile image is the key problem in an online measuring method based on machine vision. Factors influencing the effect of image acquisition were analyzed. The main factors included environmental illumination, light reflection, CCD exposure time and light source change. An optimal threshold method based on entropy criterion and genetic algorithm for image threshold segmentation was proposed. The optimal threshold was found by iterative analysis. The image segmentation algorithm eliminated effectively the interferences in the image acquisition and extracted wheel set profile curve from varying background. Better segmentation effect ensured the measurement accuracy of wheel set wear parameters.