Embedded type automatic pearl sorting device and method based on image recognition

The invention provides an embedded type automatic pearl sorting device and method based on image recognition. A pearl image is collected through a camera and processed through a kernel processing module, and the size of pearls is obtained through calculation of the proportions of actual geometric area corresponding to pixel points; the colors of the pearls are obtained through the RGB values of effective pixels of the pearls in the image; circle center calculation is replaced with pearl boundary gravity center calculation, the maximum radiuses and the minimum radiuses of target are found through a traversing method so as to judge the roundness of the pearls, then a sorting control command is output so that a pearl sorting mechanism can automatically sort the pearls according to set sorting standards, and sorting result data are saved. The embedded type automatic pearl sorting device and method based on image recognition can sort jumble pearl samples according to the set standards, the sorted pearls are automatically conveyed into different grooves, and meanwhile sorting results are transmitted to upper computer monitoring software to be displayed.