Wheel set wear online measurement is important for the safety running of train vehicle. Measuring principle based on structure light imaging and machine vision was put forward. The main components included structure light source, CCD and wheel detector. Calibration error of CCD and wheel detector will greatly influence the precision of the wear measurement. A calibration system was designed for the wheel set wear online measurement. Calibration method of space angle, object distance of CCD and position deviation of wheel detector was proposed. Calibration algorithm was designed based on perspective projection principle of pinhole camera and iteration. Experiment results showed that error of the space angle, object distance of CCD and position deviation of wheel detector were within 0.5°, 1 mm and 1 mm respectively. The calibration error met the accuracy requirement of the wheel set wear measurement.