Abstract:Abstract: To achieve the design of an automatic shiitake grading system, the images of four varieties such as Tian pai-hua Shiitake, Pai-hua Shiitake, Tsa-hua Shiitake, and Smooth Cap Shiitake were taken as research objects. Shiitake texture is a vital indicator of shiitake quality. The more white texture of the shiitake pileus, the higher its price. Shiitake grading was mainly processed by a manual operation for a long time. The grading operation was heavy workload, inefficient, and not conducive to automatic production. So the shiitake market was eager for shiitake grading equipment. This study designed an automatic shiitake grading system based on machine vision. The grading system was divided into three subsystems, including a mechanical system, a single chip microcomputer system and a machine vision system. The mechanical system played an important role in the shiitake feeding and grading process. The single chip microcomputer system was responsible for the entire system control and coordination. The machine vision system performed the operation of image acquisition and processing. Texture was a significant image feature. Many experts researched texture across the world, and various texture models had been developed in recent years. This study selected three models to describe pileus texture. The first texture model was derived from a gray histogram and grey level co-occurrence matrix. The second model was called a Gauss Makov Random Field. The third model was defined by fractal dimention. The shiitake grading process was described as follows. First, the texture analysis region was intercepted from shiitake pileus by an appropriate rectangle. Five texture feature parameters were extracted from the texture analysis region according to the gray histogram; another five texture feature parameters were extracted according to grey level co-occurrence matrix; twelve texture feature parameters were extracted according to a Gauss Makov Random Field; the fractal dimension extracted from the fractal model was the last of the texture feature parameters. Three texture models could describe texture information from different perspectives. Each texture feature expressed specific physical meanings. However, it was relevant among texture features in most cases. This study chose a sequential feature selection algorithm to eliminate the defect. An sequential features selection algorithm could remove the correlation among features, and six effective features were selected after the correlation-removal operation. Finally, the K-nearest neighbor's classifier was constructed as the shiitake species classifier, and then the test shiitake samples could be classified with the six effective features mentioned above by the K-nearest neighbor's classifier. Experimental results showed that the final accuracy reached to 93.57%, which could meet the requirements of production.