Based on near-infrared diffuse transmission spectrum analysis technology, a portable flour quality safety detector is designed, which mainly includes a spectrum acquisition module, light source control module, processing and display module and power supply module. Among them, diffuse transmission detection accessories can be lifted freely to facilitate the placement of samples and effectively avoid the interference of external stray light. The circuit for controlling the switch of the light source is designed, and experiments determine the optimal thickness of samples. Raspberry Pi 4B is selected as the core processor, and a rechargeable lithium battery is selected for the power supply. The instrument can continuously supply power for 2 hours, and its size is 250 mm X 170 mmX 300 mm. A total of 180 samples were taken from the flour ground from wheat after bran removal. Each sample was divided into three parts : yellow, red and blue. For all red samples, use the near-infrared diffuse transmission spectrum with the wavelength of 900 similar to 1870 nm to collect and record the spectral information, measure and record the humidity value of all yellow samples, and measure and record the Don content of all blue samples. The three samples need to be measured at the same time. The noise at both ends of the spectrum and an abnormal sample are eliminated by box diagram, and finally, the spectrum in 1048 similar to 747 nm band is selected for modeling. The multivariate scattering correction (MSC), S-G convolution smoothing and standard normal transformation (SNV) were used to preprocess the original spectral data, and the partial least squares regression prediction model of flour humidity and PCA-logistic regression classification model of DON content exceeding the standard were established respectively. The correlation coefficients of the calibration set and prediction set of the optimal PLSR prediction model for humidity are 0. 883 and 0. 853, the root mean square error is 0. 382% and 0. 286% , and the residual prediction deviation RPD is 2. 5. The AUC value under the ROC curve of the prediction set of the PCA-logistic regression classification model is 0. 927. The confusion matrix shows that the prediction accuracy of samples not exceeding the standard is 96%, and that of samples exceeding the standard is 89%. The GUI interface is designed based on PyQt5, and the flour quality real-time detection system is written by Python language. The detection software can realize the training, saving and loading of PLSR and PCA-logistic regression models. The accuracy and stability of portable flour multi-quality tester were verified by external verification set test. The results showed that the correlation coefficient and root mean square error of the external verification set of flour humidity were 0. 876 and 0. 21% , and the maximum relative error was 2. 89%. The recognition accuracy of flour DON content exceeding the standard is 90%, indicating that the instrument can be used for nondestructive detection and analysis of flour humidity and DON content.
随着电动公交车在城市交通的广泛应用,充电工作量随之加大.由于充电功率较大,充电电缆比较粗重,且插拔充电枪需要较大的操作力,人工作业劳动强度较大.采用通用机械臂代替人工实现自动插接充电枪具有广泛的需求,识别充电插座是实现自动插接的前提.以充电插座为识别目标,提出一种基于Canny算子的亚像素精度轮廓几何匹配检测方法,通过Halcon软件应用图像处理和机器视觉技术对目标区域进行特征提取与模板匹配,实现充电插座的自动识别.实验证明,该方法对于有外部光照环境影响具有良好的鲁棒性.