A non-contact online measuring system is developed to measure the contour error of the middle-convex and varying ellipse piston. A high accuracy laser displacement sensor is used to measure the elliptical profiles of the piston, and a measuring collector is designed based on digital signal processor (DSP) TMS320F28335 to ensure strict correspondence between the angles and the radii data of the sampling points. The measured data is analyzed with least square method to calculate the contour error of the pistons cross section. The reliability of the measuring system is proved by experiment.