| With the development of machine vision, Some theories are increasingly mature and improve, The Study of the color selection algorithm also take a very big progress, It has been extended to many fields, And achieved a great deal of research results. This article uses Image Processing Technology Enables rice grains fast, effective identification. and it has a high degree of automation and testing ways, It has no damage to the appearance of the rice grains, Improve the quality of the detection of a grain of rice, It is better to improve the people’s quality of life and protect the safety of edible rice, At the same time, the proposed algorithm can also be applied to the detection of the other particulate material.First, this paper introduces the structures of the system hardware experimental platform, And do a brief description of the overall hardware system. The system uses a LED lamp, Linear CCD (Charge-coupled Device) image sensor, analog-to-digital converter chip, The USB bus interface and PC as the image acquisition device. With FPGA as a hardware chip-driven devices.In this paper, Using the Morphological algorithm and Texture analysis method for testing the quality of rice image. Introduces the Morphological algorithm dilation and erosion operation, Gray-scale morphology, gray level co-occurrence matrix algorithm theory in Watershed algorithm and Texture analysis method.Through the hardware experimental platform obtained the image, and dealed with the rice image in PC machine. This rice preprocessing of image data information includes analysis of gray-level histogram of the image to remove the image grayscale values of the background, the image histogram equalization as well as through morphological edge of the watershed algorithm for extracting images. Based on this preprocessing, using GLCM (gray level co-occurrence matrix) method to analyze the image data, Got every grain of rice was0degrees,45degrees,90 degrees,135degrees angle on the energy, entropy, moment of inertia, the relationship between texture data. At last, intact grain texture feature to detect data as standard and the other characteristics of the rice compare the data to it, through the analysis of differential treatment of rice quality is good or bad. Through Matlab simulation, it proves the validity of the colour selection method, and satisfactory results are obtained. |