| With the rapid development of machine vision technology,it has the function of perceiving the environment,which can replace manual work.In the process of detecting the color of freshwater pearls,traditional manual methods are highly subjective,with high labor intensity,low work efficiency,and low detection accuracy.In response to this problem,this paper proposes a freshwater pearl color detection system based on machine vision,which detects the color of pearls through machine vision technology,thereby replacing labor and improving work efficiency.The main work of this paper is divided into 4 aspects.(1)The experimental platform of the pearl color detection system was designed,and the hardware equipment of the experimental platform was selected,and the pearl color detection algorithm was deeply studied.By combining the pearl image acquisition device and the pearl color detection algorithm,a pearl color detection system is built.(2)By analyzing the physical characteristics of the pearl surface and referring to the principle of studio photography,a soft light box was designed.Through the simulation analysis of the light source of the soft light box,the light uniformity of the pearl target area is optimized,which can greatly reduce the high light area on the pearl surface,and avoid the unstable color difference caused by natural light and complex environment on the pearl surface color.(3)The pearl color detection method based on SVM is studied.Map all the pixels on the surface of the pearl target to the RGB color model,analyze the composition and distribution of the color clusters on the surface of the pearl,extract the RGB value of the cluster center point of the pearl body color area of the largest cluster and the average value of each component of HSV as the eigenvalue trains GA-SVM,PSO-SVM and Grid Search-SVM models.Among them,the GA-SVM model test accuracy rate reaches 99.5%,which is 7.5% higher than the manual detection accuracy rate.(4)Acquire a large number of pearl images through the pearl image acquisition device,and construct a new,large-scale,uniformly annotated pearl color data set Pearls.There are a total of 4210 images in the Pearls dataset,with 8713 pearls marked,corresponding to the three colors categories of white,yellow and purple.Use Mobile Net V2 and Res50-fpn and VGGNet16 networks as the backbone to train the Faster-RCNN pearl color detection model.The experimental results show that when IOU is equal to 0.5,the APs of the above three models are 0.909,0.914,and 0.941,respectively. |