Ginning cotton qualities influence seriously the quality of textiles. Ginning cotton is always mixed with various defects during the picking, transporting, storing, and processing. This paper proposed one novel method to solve the problems of intensity changes of light source. Firstly, the properties of cotton and defects are studied. Secondly, the setup of measuring system is introduced and image processing algorithm is proposed. Finally, experimental results are discussed and the optimal drive circuit of light sources is designed. The results show the measuring system can meet with the requirement of nondestructive measurement of ginning cotton quality. The experimental results show that the accuracy of the cotton defect's measuring system is above 90%, and the measuring time is within 3 second. This system can meet with the requirement of fast measurement of cotton ginning qualities in field.