摘要:An online quality inspection and sorting system for fresh button mushrooms was developed based on machine vision. Mushrooms were sorted into four grades by the cap size, defects and browning. The existing grading device only considered the quality of the cap and ignored the quality of the stem. In order to get the full surface information of mushrooms, a flipping mechanism was designed to flip over the mushrooms in our system. The watershed algorithm was used to obtain the size of mushroom, and the Speeded-up Robust Features (SURF) algorithm was utilized to determine the defects. By converting the RGB image into Lab image, the L value was acquired to determine the degree of browning. Through comprehensive analysis of the cap size, defects and browning, the quality detection and classification of mushrooms were achieved. A total of 100 mushrooms were inspected and sorted to verify the performance of the prototype system. The results showed that the quality inspection of a mushroom could be finished in 0.4 s and the sorting machine could sort 72 mushrooms per minute with an average accuracy rate of 96.45 %.