| There are impurity and broken grains in the harvested grain collected by the combine harvester,the amount of which reflects the working performance of the combine harvester.Real-time monitoring the impurity rate and broken rate of grains helps the driver adjust the machine’s operating parameters in time to improve the quality of the combine harvester.At present,some foreign combine harvesters are equipped with monitoring devices for impurity rate and broken rate,which only displays the status of whether they exceed the standard.The process of monitoring cannot be recorded,and there is no specific processing result displayed for impurity rate and broken rate.Few domestic real-time monitoring devices for impurity rate and broken rate of combine harvesters are still at the stage of experimental research,the sampling devices and processing accuracy need to be further improved.In this thesis,monitoring method of impurity rate and broken rate of combine harvester was studied.The machine vision was used to obtain the result of the impurity rate and broken rate and the segmentation algorithm based on the U-Net deep learning network was proposed.The result of the impurity rate and the broken rate of grains showed on the display screen was calculated by the established mathematical relationship between weight and pixel area.At the same time,the result was saved to the SD card and transmitted to the host computer via the CAN bus to provide for the driver or other executive components of machine to achieve automatic control.The saved result provided convenience for offline analysis and subsequent research.The main research contents and conclusions of this thesis are as follows:1.The method of monitoring impurity rate and broken rate of rice harvestered by the combine harvester were studied and the hardware installation were built.The principles based on the manual method and machine vision of monitoring impurity rate and broken rate were analyzed.The real-time monitoring hardware device for impurity rate and broken rate was built.The device was composed of sampling and discarding device,industrial camera,LED light source,embedded processor and display screen.The sampling and discarding device was hung under the grain outlet of the combine harvester.The embedded processor controlled the sampling and discarding device to periodically collect and release the grain,the industrial camera captured the static grain image,the embedded processor processed the image in real time and the processing result was showed on displayed screen,the result saved to the SD card was transmitted to the host computer via CAN bus.2.The segmentation algorithm for impurity rate and broken rate was studied.U-Net deep learning model was used to predict the segmentation of three types of rice,stalk and stem objects in the image,and then use the HSV color model to set the threshold values of hue,saturation,and brightness to extract the broken rice objects to extract the broken rice.Morphological processing was performed in combination with the geometrical characteristics of the rice to obtain the segmentation results of broken rice.Aiming at the problem of little image data set about rice,the segmentation algorithm of rice based on the improvement of U-Net model was proposed.By increasing the depth and add Batch Normalization layer based on original network to obtaining rich semantic information on small data set and solving the problem of training overfitting.1000 images set to 256?256 pixels were cropped randomly from 50 images set to 800?600 pixels,of which 700 images were used as training samples and 300 images were verification samples.Calling the model to predict the 120 images with 8-bit RGB chosen randomly among images collected in real time from the field.The comprehensive evaluation index F1-score was used on the detection results for the quantitative evaluation.The result showed that the F1-score of rice segmentation was 99.42%,the F1-score of stalk impurity segmentation was 88.56%,the F1-score of stem impurity segmentation was 86.84%,the F1-score of broken rice segmentation was 88.58%.The designed algorithm can effectively sort different targets in rice images.3.Software program of the real-time monitoring system for impurity rate and broken rate was designed and deployed.Functions of UI interface display,periodical collection and release of rice,image collection,image processing,CAN bus communication,result saving and other functions were realized.Python was used in program.The system was divided into two parts as UI interface design and logic design,independent process was adopted to collect the images.The image processing function and result saving function were put into an independent process to ensure that the processed result was transmitted to the host computer in real time and saved to SD card.The FIFO queue for communication were used between the independent process and the main process.The software design can meet the real-time system to process,show on the display screen and transmit results via CAN bus,and the saved result can realize the offline analysis function.4.The performance of the real-time monitoring system of the broken rate and impurity rate was verified by experiments.In the laboratory experiments,the relative average deviation between the monitoring results and the reading results of impurity rate and broken rate of rice were 7.76% and 7.93%,respectively.In the field experiment,the designed real-time monitoring device for impurity rate and broken rate was used to collect and process every 5 seconds,save and transmit the result to the host computer via the CAN bus in real time.Statistical calculation result showed that the relative average deviation between the monitoring result and the reading result were 7.76% and 7.93%,respectively.The field experiment showed the result that the measurement accuracy of the algorithm studied in this thesis was better than existing algorithms,the real-time monitoring system for impurity rate and broken rate of rice in this thesis could meet the expected requirements. |