Font Size: a A A

Design And Implementation Of An Image Processing Algorithm For Rapeseed Seed Testing

Posted on:2024-06-07Degree:MasterType:Thesis
Country:ChinaCandidate:Z H HuangFull Text:PDF
GTID:2543307160978809Subject:Master of Mechanical Engineering (Professional Degree)
Abstract/Summary:PDF Full Text Request
At present,China still relies on a large number of manual operations for seed testing of rape,which has the disadvantages of high cost,low efficiency and low intelligence.In this paper,rapeseed and rapeseed horn fruit are used as the research objects,and computer vision technology is applied to study the number of grains,thousand grain weight and purity of rapeseed and the number of grains per horn fruit to achieve high-throughput and low-cost nondestructive measurement.The main research contents and findings are as follows:1.A series of image recognition algorithms for rapeseed grain count,thousand grain weight and purity were investigated.Color images and electronic balance digital display images were collected for three varieties of rapeseeds(Chinese oil hybrid No.62,Chinese oil hybrid No.19,and Chinese double No.11).For canola grain count detection,YOLOV4 target detection algorithm and SSD target detection algorithm were tested respectively.The results showed that when the number of seeds was not greater than 2700,the detection error rate of YOLOV4 algorithm was kept within 3%,and the R2 reached 0.9998,which was much more accurate than SSD algorithm and could meet the demand of accurate counting of large batch of rapeseed seeds.For thousand grain weight detection,the projection method is used to segment the digital display characters first,and then the characters are recognized by convolutional neural network,and the electronic balance weight value is accurately recognized,and the thousand grain weight is calculated by combining the grain count information obtained by YOLOV4 algorithm,and the experimental results show that the error rate of thousand grain weight measurement of three varieties of rapeseed is less than 5%,which meets the national standard.For rapeseed purity detection,the color,texture and morphological features of rapeseed images are first extracted and feature filtered using Pearson correlation coefficient method,and then eight different machine learning classification models were established using KNN,SVM,Naive Bayes and Random Forest and combined with LDA dimensionality reduction algorithm,and the experimental results showed that LDA_SVM has the best performance,the accuracy reaches 96.12%,the F1 value reaches 96.32%,and the errors of detection purity and true purity are all within 10%.2.A hornbeam per horn seed recognition algorithm was studied.The transmittance effect of horn fruit under different wavelength light sources was tested,and the best LED white light was selected as the backlight.Backlight images of two varieties of rape horn fruit(Qingza 4 and Qingza 7)were collected in tiling,and the tiled horn fruit images were first segmented into individual horn fruit using the minimum outer rectangle method,and then the Retinex algorithm combined with the contrast stretching algorithm was used to enhance the images for subsequent image segmentation.The angular fruit pose was classified into four types: frontal,lateral,semi-lateral left less and semi-lateral right less,and the angular fruit pose discrimination models were established using VGG16 network,Res Net50 network and Mobile Net V2 network respectively.The results showed that the accuracy,average accuracy,average recall and F1 values of Res Net50 network reached 97.11%,96.8%,97.05% and 96.92%,all of which were the highest.A targeted seed recognition algorithm was proposed for individual hornbeams for which hornbeam posture had been determined.The background and hornbeam skin are first removed using Sauvola threshold segmentation;then the skeleton of the horn fruit image is calculated and expanded,the expanded skeleton is subtracted from the thresholded segmented image to eliminate the mid-ridge of the horn fruit,and small connected domains less than half of the average of the area of all connected domains are removed to obtain a binary image containing only rapeseed.For seed counts of orthotropic corner fruit,the number of connected domains in the binary image is the number of rapeseed seeds;for semi-lateralized left less corner fruit,the number of connected domains on the left and right sides of the skeleton is counted,and if the number of connected domains on the right side is greater than 1.4times the number on the left side,the number of seeds is twice the number of connected domains on the right side,otherwise it is the sum of the number of connected domains on the left and right sides;for semi-lateralized right less corner fruit,the number of connected domains on the left and right sides of the skeleton is counted,and if the number of connected domains on the left side is greater than 1.4 times the number on the right side,the number of seeds is twice the number of connected domains on the left side,otherwise it is the sum of the number of connected domains on the left and right sides;for lateral-set angular fruits,the number of small connected domains is removed directly after the Sauvola threshold division without removing the middle ridge,and the number of remaining connected domains is counted and multiplied by 2to be the number of seeds.The experimental results of two varieties of oilseed rape showed that the overall accuracy of angular fruit posture discrimination reached 87.95%and 89.96%,and the average accuracy of counting reached 82.79% and 80.18%,respectively.3.An image recognition algorithm for the seeds inside a single orthotropic horn fruit was investigated.Backlit images of green-ripening Chinese oilseed rape No.62 horn fruits were collected using an image acquisition device,and the contrast between the rape seeds inside the horn fruits and the surrounding background was improved using a segmented Gamma transform algorithm.The U-Net semantic segmentation algorithm was used to segment the horn fruit stalk and beak.m Precision,m Recall,m Iou and m PA of the algorithm were 97.02%,97.90%,95.15% and 97.90%,respectively,with good segmentation results.Then the image mask was used to remove the stalk beak,and finally the orthogonal horn fruit internal seed detection algorithm was used to achieve the counting of canola seeds.The experimental results showed that the average error rate of 100 hornbeam seed counting results was 3.74%,and the average accuracy was 96.26%,which was a good detection result.4.A rapeseed seed testing software was designed.Py Qt5 was used as a development tool to integrate the above-mentioned series of rapeseed seed testing algorithms into a human-machine software.The software mainly has the functions of rapeseed counting and thousand grain weight measurement;rapeseed variety identification and purity detection;rapeseed horn fruit posture discrimination and per horn seed identification and counting;image selection and data storage functions.Users only need to select the corresponding image or data,the software can give the corresponding results,simple operation,convenient and easy to use,the software interface is simple and beautiful.
Keywords/Search Tags:Rapeseed, Seed test, Thousand grain weight, Purity, Number of oilseed rape kernels per corner, Computer vision
PDF Full Text Request
Related items