CN106950253B - Early detection method and device for grain worm eaten grains - Google Patents

Early detection method and device for grain worm eaten grains Download PDF

Info

Publication number
CN106950253B
CN106950253B CN201710209464.7A CN201710209464A CN106950253B CN 106950253 B CN106950253 B CN 106950253B CN 201710209464 A CN201710209464 A CN 201710209464A CN 106950253 B CN106950253 B CN 106950253B
Authority
CN
China
Prior art keywords
grain
temperature
value
marked
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710209464.7A
Other languages
Chinese (zh)
Other versions
CN106950253A (en
Inventor
樊超
郭亚菲
杨铁军
朱春华
傅洪亮
张德贤
杨红卫
曹培格
魏宏彬
彭聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan University of Technology
Original Assignee
Henan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan University of Technology filed Critical Henan University of Technology
Priority to CN201710209464.7A priority Critical patent/CN106950253B/en
Publication of CN106950253A publication Critical patent/CN106950253A/en
Application granted granted Critical
Publication of CN106950253B publication Critical patent/CN106950253B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N25/00Investigating or analyzing materials by the use of thermal means
    • G01N25/72Investigating presence of flaws

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Biological Materials (AREA)
  • Investigating Or Analyzing Materials Using Thermal Means (AREA)

Abstract

The invention relates to a method and a device for early detection of grain worm eaten grain, which are used for extracting a single grain image of thermal imaging of heated grain grains to be detected, extracting characteristic parameters related to the gray value of an image corresponding to each grain, performing dimensionless processing, using the characteristic parameters as the input of an established classification model, and judging whether each grain is infected with the worm or not according to the output of the classification model. The method can carry out early stage detection on larvae with different types of hidden insect pests by only acquiring thermal images of grain seeds, has accurate detection result, does not damage the integrity of the grains, does not need any chemical reagent, and does not generate any harmful substance in the imaging process, and the detection and counting of the wormhead grains of the detection method provided by the invention are automatically completed by a computer, do not need manual participation, do not influence the health of workers, and are a green and nondestructive detection technology.

Description

Early detection method and device for grain worm eaten grains
Technical Field
The invention belongs to the technical field of grain quality detection, and particularly relates to a method and a device for early detection of grain worm eaten grains.
Background
During grain storage, the damage of grain storage pests is very serious. According to the food and agriculture organization statistics of the united nations, about 5% of the food is lost due to the corrosion of the postpartum pests every year around the world, and if the food is limited by manpower, material resources and technology, the loss can reach 20-30%. As a world with large grain production, storage and consumption, the loss rate of grains after delivery is 8% -12%, and the loss of grains per year exceeds 500 hundred million jin, so that real-time detection of grain insect pests is an urgent problem. The pests such as corn weevil, rice weevil, wheat moth, rice moth and the like which have the most serious harm to the grain storage safety in China all belong to typical concealed pests. Under proper conditions, grains infected by the hidden pests are almost damaged into empty shells or chippings, the metabolism activity of the grains leads to the increase of water content of stored grains and the increase of the temperature of the grains, thus causing the stored grains to generate heat, mildew and caking and reducing the quality and the quantity of the grains. Therefore, how to discover and accurately locate pests in early stage is an important content in the safe grain storage work.
The grain storage pest detection method applied in production mainly comprises two methods: firstly, a sampling method; the second is trapping method (including probe and trap trapping, attractant and pheromone trapping, light trapping, sound trapping, etc.). However, the two methods can only detect the pests outside the grain, namely the imagoes of the hidden pests (such as corn elephant, khaki, wheat moth, etc.). When the main harmful phase (larval phase) of the pest has passed. If the insect period in the grain can be detected in advance, scientific basis can be provided for accurately determining the prevention and control time, and the grain storage loss is reduced. Therefore, the search for an effective method for early detection of concealed pests is a main research direction for preventing the loss of stored grain pests.
At present, the following five standard methods are generally adopted at home and abroad to detect the hidden pests:
(1) method for carbon dioxide production. The method measures the carbon dioxide emission of the grain samples in the culture room for 24 hours so as to determine the degree of insect pest infection. However, this method is not suitable for grains with high humidity (greater than 15%), since in this case the grain itself and other microorganisms also emit carbon dioxide, which affects the detection of pests.
(2) An exemplary method for an amino acid reaction. In this method, a wheat sample is crushed and amino acids from the pest react with test paper coated with a reagent for trione to indicate the pest grade.
(3) Suspension method. The principle of the method is as follows: when wheat grains are attacked by pests, the weight of the grains is reduced due to the attack of the pests, so that the pests are suspended, but the method is not suitable for detecting the pests of the genus Thelephora.
(4) An acoustic method. The method comprises the following steps of putting a grain sample into a sound insulation box through an acoustic detection method, installing a sound amplifier in the sound insulation box for transmitting sound generated when insect pests eat or move, and detecting whether the insect pests happen or not through sound signals generated when larvae move or eat. However, the method cannot detect the insect pests in the non-eating stage (egg stage and pupal stage), and the detection environment is harsh, so that the online detection is difficult to realize.
(5) X-ray method. The method is characterized in that wheat is exposed to soft X-rays, and the insect damage condition of grain grains is revealed through detection of X-ray images, but the method is difficult to detect the occurrence of larvae in the egg stage and the early stage, and causes certain radiation damage to workers.
Disclosure of Invention
The invention aims to provide a method and a device for early detection of grain insect granules, which are used for overcoming the defects of five conventional standard methods for detecting concealed insects, and solving a series of problems that a carbon dioxide generation method is inaccurate in detection result, a trione amino acid reaction method adopts a chemical reagent and destroys the integrity of a grain sample, a suspension method is limited in insect damage detection type, and an X-ray method cannot detect early insect damage of larvae and produces radiation injury to workers.
In order to solve the technical problems, the invention provides an early detection method for grain worm eaten grains, which comprises the following solutions:
the first method scheme comprises the following steps:
1) carrying out thermal imaging on the heated grain kernels to be detected to obtain an image I'1(ii) a To the image I'1Processing to obtain a first image corresponding to each seed;
2) extracting characteristic parameters related to the gray value of the image corresponding to each grain, and judging whether each grain is infected with insects or not according to the established classification model after dimensionless processing is carried out on the characteristic parameters.
In the second method, on the basis of the first method, the establishing process of the classification model comprises the following steps:
A1) taking the insect-stained seeds and normal seeds in different insect stages as samples, heating the samples, and then carrying out thermal imaging to obtain an image I1For the image I1Processing to obtain an image corresponding to each seed;
A2) extracting characteristic parameters related to the gray value of the image corresponding to each grain in the step A1), carrying out dimensionless processing on the characteristic parameters, and obtaining s main component characteristic parameters according to a main component analysis method;
A3) and establishing the classification model by taking the s principal component characteristic parameters as input nodes and the pest staining state of grains as output nodes according to a machine learning related algorithm.
In the third method, on the basis of the second method, the characteristic parameters extracted in the step 2) and the step a2) both include: calculating the highest n in the first image1% of gray value as first characteristic variable, where 0<n1Less than or equal to 100; calculating the highest n in the first image1% mean square error of the gray value, where 0<n1Less than or equal to 100; obtaining the highest n inside the first image1% of gray value, and calculating the highest n inside the first image2% of the mean value of the gray values is subtracted as a third characteristic variable, where n1+n2=100,0<n1<100。
In the fourth embodiment of the method, on the basis of the third embodiment of the method, the step 1) further comprises the following steps: carrying out thermal imaging on the cooled grain kernels to be detected to obtain an image I'2To the image I'2Processing to obtain a second image corresponding to each seed after cooling;
the step A1) further comprises the following steps: carrying out thermal imaging on the cooled sample to obtain an image I2For the image I2And processing to obtain an image corresponding to each seed.
In the fifth method, on the basis of the fourth method, the extracted feature parameters in step 2) and step a2) further include:taking the highest m inside the second image1% of the mean value of the gray values, where 0<m1Less than or equal to 100; taking the highest m inside the second image1% mean square error of the gray value, where 0<m1Less than or equal to 100; the highest m in the second image is obtained1% of gray value, and calculating the highest m inside the second image2% of the mean value of the gray values is subtracted as a sixth characteristic variable, where m1+m2=100,0<m1<100。
And a sixth method scheme, wherein on the basis of the fifth method scheme, the relevant algorithm of the machine learning comprises an extreme learning machine or a BP neural network algorithm.
Method scheme seven, on the basis of method scheme four, the image I'1Image I1And picture I'2And image I2The treatment comprises the following steps:
setting a global threshold value to convert the image I'1Image I1And picture I'2And image I2And converting the image into a binary image only with the background and the grains, performing distance transformation on the grain image after the background is segmented, and segmenting the adhered grains after the distance transformation.
In order to solve the technical problem, the invention provides an early detection device for grain worm eaten grains, which comprises the following solutions:
the device comprises a sample table, a thermal infrared camera and a heating device, wherein the thermal infrared camera is used for shooting images of a sample on the sample table, the heating device is used for heating the sample on the sample table, the thermal infrared camera is connected with an image processing module, and the image processing module comprises an acquisition processing unit and a judgment unit;
the acquisition processing unit is used for carrying out thermal imaging on the heated grain kernels to be detected to obtain an image I'1(ii) a To the image I'1Processing to obtain a first image corresponding to each seed;
the judging unit is used for extracting characteristic parameters related to the gray value of the image corresponding to each grain, and judging whether each grain is infected with insects or not according to the established classification model after dimensionless processing is carried out on the characteristic parameters.
And on the basis of the first device scheme, the heating device comprises a heating plate and a controller, and the controller is used for controlling the temperature of the heating plate for heating the sample.
The third device scheme further includes the following units on the basis of the first device scheme:
grain imaging unit: is used for taking the insect-stained seeds and normal seeds in different insect stages as samples, heating the samples and then carrying out thermal imaging to obtain an image I1For the image I1Processing to obtain an image corresponding to each seed;
a characteristic parameter extraction unit: the characteristic parameters are used for being related to the gray value of the image corresponding to each grain, and after dimensionless processing is carried out on the characteristic parameters, s main component characteristic parameters are obtained according to a main component analysis method;
a model establishing unit: and the classification model is established according to a machine learning related algorithm by taking the s principal component characteristic parameters as input nodes and the pest dyeing state of grains as output nodes.
In a fourth embodiment of the present invention, on the basis of the third embodiment of the present invention, the feature parameter extracting unit includes: for calculating the highest n inside the first image1% of gray value as first characteristic variable, where 0<n1Less than or equal to 100; calculating the highest n in the first image1% mean square error of the gray value, where 0<n1Less than or equal to 100; obtaining the highest n inside the first image1% of gray value, and calculating the highest n inside the first image2% of the mean value of the gray values is subtracted as a third characteristic variable, where n1+n2=100,0<n1<100, in the cell.
The invention has the beneficial effects that: the method extracts a single grain image thermally imaged by the heated grain grains to be detected, extracts characteristic parameters related to the gray value of the image corresponding to each grain, takes the characteristic parameters as the input of an established classification model after dimensionless processing, and judges whether each grain is infected with insects or not according to the output of the classification model. The method can carry out early stage detection on larvae with different types of hidden insect pests by only acquiring thermal images of grain seeds, has accurate detection result, does not damage the integrity of the grains, does not need any chemical reagent, and does not generate any harmful substance in the imaging process, and the working process of the detection method provided by the invention is automatically completed by a computer, does not need manual participation, does not influence the health of workers, and is a green and nondestructive detection technology.
Drawings
FIG. 1 is a schematic diagram of an early detection device for food worm eaten grains;
FIG. 2 is a flow chart of a process for building a classification model according to the present invention;
FIG. 3 is a flow chart of the early detection method of food worm eaten grains according to the present invention.
Detailed Description
The insect pest is accompanied with respiration in all stages of growth, so that heat is generated, and the temperature of the grain seeds is increased. Therefore, when the temperature image of the surface of the grain seed is collected, the hidden pests hidden in the grain seed can be detected. In addition, due to the occurrence and growth of insect pests in the interior of the grain kernels, the internal nutritional components such as protein, moisture, starch, fat content and the like are changed, and the change of the substances also can cause the difference of thermal images of the kernels in the heating and cooling processes. Therefore, the invention provides the method for realizing the early detection of the hidden pests of the grain kernels by adopting a thermal imaging technology.
The following further describes embodiments of the present invention with reference to the drawings.
In order to obtain the thermal image of the grain kernels, the grain worm kernel-erosion early detection device is shown in the attached drawing 1. The device mainly comprises a sample stage, a thermal infrared camera, an image processing module and a heating device. The thermal infrared camera is arranged in parallel with the sample table through the first support and is about 40-50mm away from the sample table. Heating device includes hot plate and temperature controller, and the hot plate rotates and installs on the second support, and the hot plate is parallel with the sample platform, and can rotate to the visual field position that infrared thermal camera shot around the second support level, and its high distance places grain seed grain surface on the objective table about 10 mm. In order to control the temperature of the heating plate, the temperature controller with PID control function is used to control the temperature range of the heating plate to 10-90 ℃.
The image processing module comprises an image acquisition card and a computer, the image acquisition card is used for carrying out thermal imaging on the heated grain seeds to be detected, the computer is used for processing the thermal imaging to obtain an image of each seed, extracting characteristic parameters related to the gray value of the image corresponding to each seed, carrying out dimensionless processing on the characteristic parameters to serve as the input of the established classification model, and judging whether each seed is infected with insects or not according to the output of the classification model.
The classification model comprises the following units:
grain imaging unit: is used for taking the insect-stained seeds and normal seeds in different insect stages as samples, heating the samples and then carrying out thermal imaging to obtain an image I1For image I1Processing to obtain an image corresponding to each seed;
a characteristic parameter extraction unit: the characteristic parameters are used for being related to the gray value of the image corresponding to each grain, and after the characteristic parameters are subjected to dimensionless processing, s main component characteristic parameters are obtained according to a main component analysis method;
a model establishing unit: and the classification model is established by taking the s principal component characteristic parameters as input nodes and the pest staining state of grains as output nodes according to a machine learning related algorithm.
Specifically, the establishing process of the classification model is as follows:
1) taking insect-stained and normal seeds as samples, and taking wormhole K at different stages1Granules, 10 granules each are 1 group, and K is totally divided1Group/10, i.e. K110 wormhole samples; taking normal granules K2Granules, 10 granules each are 1 group, and K is totally divided2Group/10, i.e. K210 normal grain samples. The obtained K1/10+K210 test specimens placed at a temperature T0So that they have the same initial temperature.
2) Acquiring thermal images of each sample after heating and cooling respectively, comprising the sub-steps of:
(1) according to the installation height of the thermal infrared camera and the image surface size of the camera, the field range of the camera on the objective table (the range shown by a broken line frame on the sample table in the attached drawing 1) is calculated, and the grain seeds are laid in the field range of the thermal infrared camera.
(2) Rotating the heating plate to make it be positioned over the grain seeds and 10mm from the upper surface of the seeds, then regulating the temperature controller to control the temperature of the heating plate at T1And at T1Heating the grain seeds at the temperature t1Time. Wherein the temperature T of the heating plate1And a heating time t1The optimal value can be determined according to the experimental effect along with the change of different types of grain seeds.
(3) Rotating the heating plate to a position away from the camera view field, simultaneously carrying out thermal imaging on the grains by using a thermal infrared camera, sending the image into a computer after passing through an image acquisition card, and recording as an image I1
Cooling the heated grain seeds in natural environment2Time, temperature after cooling is denoted as T2Using a camera pair T2Thermal imaging is carried out on the grain seeds at the temperature, the grain seeds are sent into a computer after passing through an image acquisition card and are marked as an image I2. Wherein T is2And t2The optimal value can be determined according to the experimental effect along with the change of different types of grain seeds.
3) Processing the collected images to respectively process the images I1Image I2And (3) segmenting, dividing the image into a background part and a grain seed part, setting the pixel value of the background image as 0, and setting the pixel value belonging to the grain seed as 1. The segmentation process is as follows:
(1) finding the maximum value of the gray level I of a pixel of an imagemaxAnd a minimum value IminThen, the median M:
M=(Imax-Imin)/2
(2) dividing the image into two parts P by taking the value of M as a threshold value1And P2Calculating the average value p of pixel gray levels of the two partial images1And p2Calculating p1And p2Mean value M of1
M1=(p1+p2)/2
(3) If | M1-M|<M, then M1Is the global threshold, otherwise let M be M1And (3) repeating the step (2) until | M is satisfied1-M|<m, where m is the allowable error margin, depending on the image content.
After the steps, the original thermal image is converted into a binary image only with the background and the grain grains. The segmentation of grains and the background is realized, the distance of the segmented image is changed, then the single grain is segmented by using a watershed algorithm, and the segmented image of the single grain is multiplied by the original image, so that the mutually adhered grain grains in the original hot image are mutually separated, and meanwhile, the gray value of a background pixel is set to be 0.
4) Calculating characteristic parameters related to the gray value of the image corresponding to each grain, wherein the parameters are as follows:
(1)T1the average value of the gray values of all pixels in each seed grain at the temperature is marked as X1;
(2)T1the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X2;
(3)T1the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X3;
(4)T1the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X4; at the temperature, taking n as the gray value of each seed grain from high to low1Individual gray value, n1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(5)T1the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X5;
(6)T1the mean value of the pixel gray levels of the highest 5 percent to the mean value of the pixel gray levels of the other 95 percent in each seed grain at the temperature is marked as X6; the remaining 95% of the gray values are n2A (n)1+n2) Individual gray value of T1All gray values of each seed grain are subjected to temperature;
(7)T1the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X7;
(8)T1the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X8;
(9)T1the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X9;
(10)T1the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X10;
(11)T1the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X11;
(12)T1the mean value of the pixel gray levels of the highest 20 percent to the mean value of the pixel gray levels of the other 80 percent in each seed grain at the temperature is marked as X12;
(13)T2the average value of the gray values of all pixels in each seed grain at the temperature is marked as X13;
(14)T2the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X14;
(15)T2the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X15;
(16)T2the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X16; at the temperature, taking m from high to low according to the gray value of each seed grain1Individual gray value, m1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(17)T2the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X17;
(18)T2average value of pixel gray levels of up to 5% in each seed grain at temperature-images of the rest 95%The mean of the pixel grays, denoted as X18; the remaining 95% of the gray values are m2Each (m)1+m2) Individual gray value of T2All gray values of each seed grain at the temperature;
(19)T2the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X19;
(20)T2the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X20;
(21)T2the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X21;
(22)T2the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X22;
(23)T2the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X23;
(24)T2the mean value of the pixel gray levels of the highest 20 percent to the mean value of the pixel gray levels of the other 80 percent in each seed grain at the temperature is marked as X24;
respectively calculating the above 24 characteristic parameters for 10 grains in each sample, then calculating the average value of all 10 grains for each parameter as the 24 characteristic parameters of the sample, and for all K grains1/10+K2And extracting the characteristic parameters from 10 samples to obtain 24 parameters of each sample.
4) Performing dimensionless processing on the characteristic parameters of each sample by using a standardized processing method, then calculating the correlation degree among 24 characteristic parameters, extracting s main component characteristic parameters with the accumulated contribution rate reaching 0.95 by using a main component analysis method, taking the s main component characteristic parameters as input nodes, taking the insect staining state of grains as output nodes, setting the output value of the wormhole grains as 1, setting the output value of the normal grains as 0, and establishing a classification model according to methods of a machine learning extreme learning machine, a BP neural network, a support vector machine and the like.
After the classification model is established, as shown in fig. 3, the early detection method for the grain worm eaten grains comprises the following steps:
1) selecting N grains of grain to be detected in unknown insect erosion states of corresponding grain varieties from the incubator, and flatly paving the grains in the field of view of the thermal camera on the sample table, wherein N is determined according to the grain varieties because the field of view of the camera is fixed, if the grain seeds are larger, the N is smaller, and otherwise, the N is larger;
2) rotating the heating plate to make it be positioned over the seed to be tested, and controlling the temperature by the temperature controller at T1Heating the grains t1Time, then thermal infrared imaging with a camera to give image I'1(ii) a The heating plate is moved away to naturally cool the seeds2Time to ambient temperature T2Then thermally imaged using a camera to obtain image I'2To picture I'1And l'2And respectively carrying out background segmentation and adhered grain segmentation to obtain a first image and a second image of each grain.
3) Respectively extracting 24 characteristic parameters X1-X24 of each grain, extracting s main component characteristic parameters with the cumulative contribution rate of 0.95 by using a main component analysis method after the characteristic parameters are subjected to dimensionless treatment, using the s main component characteristic parameters as the input of the established classification model, judging whether each grain is infected with insects according to the output of the classification model, judging that the grain is infected with insects when the output value is 1, and judging that the grain is not infected with insects when the output value is 0, wherein the grain is normal grain.
4) Repeating the step 3) for N grains in the sample to be detected, and finally obtaining the number N of the pest-staining grains1Thus, obtaining the worm erosion rate r of the sample to be detected:
Figure BDA0001260656820000131
the detection method provided by the invention has no special requirements on detection environment, the heating time and the cooling time of the grain seeds are generally finished within 5 minutes, and compared with the traditional detection method, the detection time is greatly shortened. The working process of the detection method is that the detection and counting of the wormhead grains are automatically completed by a computer, manual participation is not needed, and the detection result is objective.
The invention provides a novel method for early, nondestructive, non-contact, rapid and green detection of grain seed concealment pests based on a thermal imaging technology, aiming at the problem of early accurate detection of the grain seed concealment pests. The method comprises the steps of heating and cooling the worm-eaten sample and the normal sample to obtain two thermal images in the temperature change process, and then separating the grain grains by background segmentation and adhesion grain segmentation. On the basis, 24 characteristic parameters of the two thermal images of each sample are extracted, and a principal component with high correlation degree with the worm erosion state is obtained through a principal component analysis method. And finally, inputting the main components as a model, and establishing a classification model for detecting the wormhole grains by taking the wormhole state as output. Based on the model, the thermal image of the sample to be detected is input randomly, and the accurate detection of the worm eaten grain and the worm staining rate is realized through feature extraction and optimization. The wormhead grain detection method provided by the invention does not damage the integrity of grains, does not need any chemical reagent and does not generate any harmful substance in the operation process, thereby being a novel green, nondestructive and early wormhead grain detection technology.
The image processing module in the early grain wormhole detection device is a computer solution, namely a software framework, based on the early grain wormhole detection method, and can be applied to a processor, and the image processing module in the device is a processing process corresponding to the method flow. Since the above method is described clearly and completely, the image processing module in the device is actually a software structure in the embodiment, and thus, the detailed description is omitted.

Claims (7)

1. An early detection method for grain worm eaten grains is characterized by comprising the following steps:
1) carrying out thermal imaging on the heated grain kernels to be detected to obtain an image I'1(ii) a To the image I'1Processing to obtain a first image corresponding to each seed; carrying out thermal imaging on the cooled grain kernels to be detected to obtain an image I'2To the image I'2Processing to obtain a second image corresponding to each seed after cooling;
heating temperature T1After cooling, the temperature is T2
Calculating characteristic parameters related to the gray value of the image corresponding to each grain, wherein the parameters are as follows:
(1)T1the average value of the gray values of all pixels in each seed grain at the temperature is marked as X1;
(2)T1the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X2;
(3)T1the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X3;
(4)T1the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X4; at the temperature, taking n as the gray value of each seed grain from high to low1Individual gray value, n1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(5)T1the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X5;
(6)T1the mean value of the pixel gray levels of the highest 5 percent to the mean value of the pixel gray levels of the other 95 percent in each seed grain at the temperature is marked as X6; the remaining 95% of the gray values are n2A (n)1+n2) Individual gray value of T1All gray values of each seed grain are subjected to temperature;
(7)T1the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X7;
(8)T1the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X8;
(9)T1the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X9;
(10)T1the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X10;
(11)T1the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X11;
(12)T1within each seed grain at temperatureThe average of the pixel gradations of the highest 20% to the remaining 80%, which is denoted as X12;
(13)T2the average value of the gray values of all pixels in each seed grain at the temperature is marked as X13;
(14)T2the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X14;
(15)T2the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X15;
(16)T2the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X16; at the temperature, taking m from high to low according to the gray value of each seed grain1Individual gray value, m1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(17)T2the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X17;
(18)T2the mean value of the pixel gray levels of the highest 5 percent to the mean value of the pixel gray levels of the other 95 percent in each seed grain at the temperature is marked as X18; the remaining 95% of the gray values are m2Each (m)1+m2) Individual gray value of T2All gray values of each seed grain at the temperature;
(19)T2the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X19;
(20)T2the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X20;
(21)T2the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X21;
(22)T2the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X22;
(23)T2the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X23;
(24)T2the mean value of the pixel gray levels of the highest 20 percent to the mean value of the pixel gray levels of the other 80 percent in each seed grain at the temperature is marked as X24;
calculating the 24 characteristic parameters for each seed grain;
2) extracting characteristic parameters related to the gray value of the image corresponding to each grain, and judging whether each grain is infected with insects or not according to the established classification model after dimensionless processing is carried out on the characteristic parameters.
2. The method for early detecting the grain wormhole grains according to claim 1, wherein the establishing process of the classification model comprises the following steps:
A1) taking the insect-stained seeds and normal seeds in different insect stages as samples, heating the samples, and then carrying out thermal imaging to obtain an image I1For the image I1Processing to obtain an image corresponding to each seed; carrying out thermal imaging on the cooled sample to obtain an image I2For the image I2Processing to obtain an image corresponding to each seed;
A2) extracting 24 characteristic parameters related to the gray value of the image corresponding to each grain in the step A1), and obtaining s main component characteristic parameters according to a main component analysis method after carrying out dimensionless processing on the characteristic parameters;
A3) and establishing the classification model by taking the s principal component characteristic parameters as input nodes and the pest staining state of grains as output nodes according to a machine learning related algorithm.
3. The early detection method of grain wormhole as claimed in claim 2, wherein the relevant algorithm of machine learning comprises extreme learning machine, or BP neural network algorithm.
4. The method of claim 1, wherein the image I 'is detected at an early stage'1Image I1And picture I'2And image I2The treatment comprises the following steps:
setting a global threshold value to convert the image I'1Image I1And picture I'2And image I2And converting the image into a binary image only with the background and the grains, performing distance transformation on the grain image after the background is segmented, and segmenting the adhered grains after the distance transformation.
5. The early detection device for the grain worm eaten grains is characterized by comprising a sample table, a thermal infrared camera and a heating device, wherein the thermal infrared camera is used for shooting images of a sample on the sample table, the heating device is used for heating the sample on the sample table, the thermal infrared camera is connected with an image processing module, and the image processing module comprises an acquisition processing unit and a judgment unit;
the acquisition processing unit is used for carrying out thermal imaging on the heated grain kernels to be detected to obtain an image I'1To the image I'1Processing to obtain a first image corresponding to each seed; carrying out thermal imaging on the cooled grain kernels to be detected to obtain an image I'2To the image I'2Processing to obtain a second image corresponding to each seed after cooling;
heating temperature T1After cooling, the temperature is T2
Calculating characteristic parameters related to the gray value of the image corresponding to each grain, wherein the parameters are as follows:
(1)T1the average value of the gray values of all pixels in each seed grain at the temperature is marked as X1;
(2)T1the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X2;
(3)T1the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X3;
(4)T1the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X4; at the temperature, taking n as the gray value of each seed grain from high to low1Individual gray value, n1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(5)T1the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X5;
(6)T1the mean value of the pixel gray levels of the highest 5 percent to the mean value of the pixel gray levels of the other 95 percent in each seed grain at the temperature is marked as X6; the remaining 95% of the gray values are n2A (n)1+n2) Individual gray value of T1All gray values of each seed grain are subjected to temperature;
(7)T1the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X7;
(8)T1the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X8;
(9)T1the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X9;
(10)T1the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X10;
(11)T1the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X11;
(12)T1the mean value of the pixel gray levels of the highest 20 percent to the mean value of the pixel gray levels of the other 80 percent in each seed grain at the temperature is marked as X12;
(13)T2the average value of the gray values of all pixels in each seed grain at the temperature is marked as X13;
(14)T2the mean square error of all pixel gray values in each seed grain at the temperature is recorded as X14;
(15)T2the maximum value-the minimum value of the gray value of the pixels in each seed grain at the temperature is marked as X15;
(16)T2the mean value of the pixel gray scale of the highest 5% in each seed grain at the temperature is marked as X16; at the temperature, taking m from high to low according to the gray value of each seed grain1Individual gray value, m1The proportion of the gray values to all the gray values of the seeds is 5 percent;
(17)T2the mean square error of the pixel gray level of the maximum 5% in each seed grain at the temperature is marked as X17;
(18)T2average value-the rest 95% of pixel gray scale of the maximum 5% in each seed grain at the temperatureThe average of the pixel grays of (a), is denoted as X18; the remaining 95% of the gray values are m2Each (m)1+m2) Individual gray value of T2All gray values of each seed grain at the temperature;
(19)T2the average value of the pixel gray scale of the maximum 10% in each seed grain at the temperature is marked as X19;
(20)T2the mean square error of the pixel gray level of the maximum 10% in each seed grain at the temperature is marked as X20;
(21)T2the mean value of the pixel gray levels of the highest 10 percent to the mean value of the pixel gray levels of the other 90 percent in each seed grain at the temperature is marked as X21;
(22)T2the average value of the pixel gray scale of the maximum 20% in each seed grain at the temperature is marked as X22;
(23)T2the mean square error of the pixel gray level of the maximum 20% in each seed grain at the temperature is marked as X23;
(24)T2the mean value of the pixel gray levels of the highest 20 percent to the mean value of the pixel gray levels of the other 80 percent in each seed grain at the temperature is marked as X24;
calculating the 24 characteristic parameters for each seed grain;
the judging unit is used for extracting characteristic parameters related to the gray value of the image corresponding to each grain, and judging whether each grain is infected with insects or not according to the established classification model after dimensionless processing is carried out on the characteristic parameters.
6. The early grain wormhole detection apparatus of claim 5 wherein the heating means comprises a heating plate and a controller for controlling the temperature at which the heating plate heats the sample.
7. The early detection device of grain worm eaten grain according to claim 5, characterized by further comprising the following units:
grain imaging unit: is used for taking the insect-stained seeds and normal seeds in different insect stages as samples, heating the samples and then carrying out thermal imaging to obtain an image I1For the image I1To carry outProcessing to obtain an image corresponding to each seed; carrying out thermal imaging on the cooled sample to obtain an image I2For the image I2Processing to obtain an image corresponding to each seed;
a characteristic parameter extraction unit: 24 characteristic parameters related to the gray value of the image corresponding to each grain are subjected to dimensionless processing, and s main component characteristic parameters are obtained according to a main component analysis method;
a model establishing unit: and the classification model is established according to a machine learning related algorithm by taking the s principal component characteristic parameters as input nodes and the pest dyeing state of grains as output nodes.
CN201710209464.7A 2017-03-31 2017-03-31 Early detection method and device for grain worm eaten grains Expired - Fee Related CN106950253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710209464.7A CN106950253B (en) 2017-03-31 2017-03-31 Early detection method and device for grain worm eaten grains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710209464.7A CN106950253B (en) 2017-03-31 2017-03-31 Early detection method and device for grain worm eaten grains

Publications (2)

Publication Number Publication Date
CN106950253A CN106950253A (en) 2017-07-14
CN106950253B true CN106950253B (en) 2020-07-17

Family

ID=59475567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710209464.7A Expired - Fee Related CN106950253B (en) 2017-03-31 2017-03-31 Early detection method and device for grain worm eaten grains

Country Status (1)

Country Link
CN (1) CN106950253B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108613989A (en) * 2018-04-24 2018-10-02 南京财经大学 A kind of detection method of paddy unsound grain
CN110515130B (en) * 2019-09-03 2021-08-06 河南工业大学 Stored grain pest detection method and device based on channel state information
CN112819746B (en) * 2019-10-31 2024-04-23 合肥美亚光电技术股份有限公司 Nut kernel worm erosion defect detection method and device
CN113319005A (en) * 2020-09-25 2021-08-31 怀化正好制药有限公司 Automatic change machine of sieve impurity
CN113109240B (en) * 2021-04-08 2022-09-09 国家粮食和物资储备局标准质量中心 Method and system for determining imperfect grains of grains implemented by computer
CN113447502A (en) * 2021-06-25 2021-09-28 河南工业大学 Grain impurity content detection method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102072758A (en) * 2010-11-05 2011-05-25 河南工业大学 Cereal grain weight determining method
CN102279976A (en) * 2011-09-22 2011-12-14 河南工业大学 Method for constructing and identifying BP (Back Propagation) neural network for identifying different coarse rice seeds
CN105806843A (en) * 2014-12-29 2016-07-27 丰益(上海)生物技术研发中心有限公司 Detection method for injurious insect eggs in cereals
CN104749189A (en) * 2015-02-28 2015-07-01 华北水利水电大学 Grain interior insect pest detection device based on multi-spectral imaging technology
CN104990888A (en) * 2015-06-24 2015-10-21 河南工业大学 Method for detecting insect pests in stored grains by means of terahertz imaging technology

Also Published As

Publication number Publication date
CN106950253A (en) 2017-07-14

Similar Documents

Publication Publication Date Title
CN106950253B (en) Early detection method and device for grain worm eaten grains
Khojastehnazhand et al. Development of a lemon sorting system based on color and size
Hai-ling et al. Research on the discrimination of hatching eggs activity based on thermal imaging: A food nondestructive testing practice
JP5744951B2 (en) Method and apparatus for candling avian eggs via a thermal camera
CN102495066B (en) Bean-pod nondestructive testing method based on high-light-spectrum transmission image collecting system
Hou et al. Thermal inactivation of fungi in chestnuts by hot air assisted radio frequency treatments
CN107610122B (en) Micro-CT-based single-grain cereal internal insect pest detection method
Zhou et al. Qualification of soybean responses to flooding stress using UAV-based imagery and deep learning
CN106645605A (en) Poultry fertilization egg detection method based on machine vision
Mukherjee et al. Damaged paddy leaf detection using image processing
Concepcion et al. Diseased surface assessment of maize cercospora leaf spot using hybrid gaussian quantum-behaved particle swarm and recurrent neural network
Moghaddam et al. Estimation of single leaf chlorophyll content in sugar beet using machine vision
Suo et al. Artificial neural network to predict leaf population chlorophyll content from cotton plant images
CN104749189A (en) Grain interior insect pest detection device based on multi-spectral imaging technology
Kavelenova et al. Assessment of the quality of seeds formed in situ and ex situ as a mandatory element of maintaining seed banks of rare plants
Xu et al. Non-destructive detection on the fertility of injected SPF eggs in vaccine manufacture
CN101911877B (en) Seed vitality authentication device and method based on laser light diffuse reflection image technology
CN106556602A (en) A kind of detection method and its device of fish body freshness
Jamil et al. Husk detection using thermal imaging technology
Vakilian et al. Design, development and performance evaluation of a robot to early detection of nitrogen deficiency in greenhouse cucumber (Cucumis sativus) with machine vision.
CN115777767B (en) Preservation method and system for edible fungi
KR101907563B1 (en) Method for the viability of embryo in white fertilized egg using hyperspectral imaging
CN206832686U (en) A kind of Hot Pepper Seedling epidemic disease early monitoring device based on Internet of Things
Gupta et al. Applications of RGB color imaging in plants
Lee et al. Determination of the conditions for image analysis of rice based on a crop phenomic platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200717

Termination date: 20210331

CF01 Termination of patent right due to non-payment of annual fee