The article proposed a kind of new measuring technique suitable for pellet outer diameter --shading of measurement, using high quality laser as the light, linear CCD image sensor TCD1206 acts testing device, TCD1206 produced drive without delay by single-chip microcomputer, process pellet outer diameter signal coming from TCD1206 by floating threshold method of binary, finally the processed binary signals send back to the single-chip microcomputer, through MAX232 serial communication transfer to PC for displaying. The whole process realizes real-time detection to pellet outer diameter, and makes measurement system had higher precision.