A method for detecting internal defects of large-sized fruits and vegetables based on apparent density index
By calculating the apparent density index of fruits and using normal distribution function to determine the optimal classification threshold, the universality problem of defect detection in large fruits and fruits is solved, and fast and low-cost and efficient detection is achieved.
Patent Information
- Application Number
- CN202310150480.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-02-22
AI Technical Summary
The prior art is not universal in detecting internal defects of large fruits and fruits, and it is difficult to effectively distinguish between defective and non-defective fruits and fruits.
By calculating the apparent density index of melons and fruits, and using the inverse cumulative distribution function of the normal distribution to determine the optimal classification threshold, combining the appearance parameters and weight parameters of the melons and fruits, automatic classification of melons and fruits is achieved.
It has achieved fast, low-cost and universal internal defect detection, with a detection accuracy of 92.45%.
Abstract
Description
Technical Field
[0001] The present invention relates to a method for detecting the internal quality of fruits and vegetables, and in particular to a method for detecting internal defects of large-sized fruits and vegetables based on an apparent density index. Background Art
[0002] Large fruits and vegetables are prone to internal defects during growth and post-harvest storage.
[0003] Hollow Watermelons: Watermelons expand primarily through the continuous enlargement and filling of cells in the rind and flesh. The flesh, in particular, is composed entirely of thin-walled cells, except for the seeds and associated vascular bundles. Normally, thin-walled cells expand more than cells in other tissues. However, after these cell walls swell, insufficient fertilization and water, especially water, prevent them from filling up and quickly cause them to rupture. The rupture of many adjacent thin-walled cells creates cavities, and the interconnectedness of these small cavities creates larger cracks or cavities. In typical years, the incidence of hollow watermelons ranges from 10% to 20% to over 80% in severe cases, significantly impacting the commercial quality and production profitability of watermelons.
[0004] Grainization of grapefruit: a common physiological disease of citrus fruits during ripening and post-harvest storage. When it occurs, the peel and the pods separate, the cells lose water severely, the flesh becomes lignified and fibrous, the spongy layer of the peel becomes cottony and rotten, and the edible rate of the grapefruit fruit decreases, seriously affecting the quality of the commercial fruit.
[0005] Scholars have conducted research on methods for detecting internal defects in fruits and vegetables.
[0006] B.Diezma-Iglesias et al. (B.Diezma-Iglesias, M.Ruiz-Altisent, P.Barreiro. Detection of internal quality in seedless watermelon by acoustic impulse response, Biosystems Engineering, 2004, 88(2):221-230) designed and tested a device consisting of a microphone, a structural element, and a mechanical impulse generator based on acoustic impulse response. Good and defective seedless watermelons were tested using the acoustic device. The band amplitude parameter, obtained by summing the amplitude of the spectrum between two frequencies within a specified frequency bandwidth (consistently between 40 and 500 Hz), was the acoustic parameter that showed the best ability to detect internal disturbances. Lee et al. (Kangjin Lee, Wankyu Choi, Giyoung Kim, Sukwon Kang, Sangha Noh. Internal Quality Estimation of Watermelon by Multiple Acoustic Signal Sensing. Key Engineering Materials 321-323. Pt 2 (2006): 1209-1212) developed a nondestructive sorting system capable of detecting internal defects in watermelons. The system includes a constant-force hammer for generating acoustic sound, a multi-point acoustic signal acquisition system, a noise removal circuit, and signal processing and quality assessment procedures. A model for predicting the internal quality of watermelons based on partial least squares regression was established. Using this model, the system achieved an overall accuracy of 90.1%. Wei Yanjun (Wei Yanjun. Acoustic Detection System for Detecting Sugar Content and Hollowness of Watermelons Based on Acoustic Properties [D]. Zhejiang University, 2012) developed an agricultural product acoustic detection test bench consisting of a plastic percussion ball, six piezoelectric accelerometers, a charge amplifier (YE5853B), a photoelectric trigger circuit, a data acquisition card (PCL1800), and a computer. Using the SMLR function in TQ software, they found that the acoustic transmittance of equatorial contralateral percussion and the received signal combined to detect hollowness in watermelons achieved a detection accuracy of 91%. Cui Di et al. (Cui Di, Ding Chengqiao, Wang Chenchen. A Nondestructive Detection System and Method for Hollowness in Watermelons [P], Chinese Patent No. 202210066516.0, January 20, 2022) disclosed a nondestructive detection system and method for hollowness in watermelons.The system includes an aluminum profile frame, a conveyor belt, a tray, a pulsed jet device and a laser Doppler vibrometer. When the watermelon passes through the inspection station, the pulsed jet device excites the watermelon to vibrate, and the laser Doppler vibrometer detects the watermelon's vibration response signal. Wavelet transform is used for denoising, time domain vibration characteristic parameters are extracted, and fast Fourier transform is used to obtain frequency domain vibration characteristic parameters within a specified frequency range to construct a prediction model for hollow watermelons.
[0007] Huang Ling et al. (Huang Ling, Shi Yuqiu, and Hu Bo. Estimation of the edible rate of pomelo based on the GMDH algorithm [J]. Journal of Anhui Agricultural Sciences, 2010, 12:6600, 6610). Using a combined data processing method and neural network concepts, they estimated the edible rate of pomelo. They used the volume and weight of the pomelo as inputs and the estimated edible rate as output to establish a polynomial model. This model was used to estimate the edible rate of 18 pomeloes. The average absolute value of the fitting error was 4.45%, and the estimation error did not exceed 5%. Geng Yiman (Geng Yiman. Research on the Application of X-ray Nondestructive Testing Technology in Pomelo Quality Assurance [D]. Fujian Agriculture and Forestry University, 2012) compared X-ray images of pomelo with dissected fruit and found that when the X-ray image showed cracking of the pomelo segments at the axis, it indicated that the fruit had entered the granulation stage; the presence of filaments at the closed pericarp at the axis of the pomelo segments and in the pomelo peel on the X-ray image indicated that the fruit had begun to lignify; and the presence of white spots on the pomelo segments on the X-ray image indicated that the fruit had granulated. Guo Hui (Guo Hui. Research on a Machine Vision-Based Quality Assurance Method for Honey Pomelo [D]. China Agricultural University, 2015) used the finite element method to calculate the volume of honey pomelo from images. Based on characteristic parameters such as specific gravity, shape factor, and axis deviation, a three-layer back propagation (BP) neural network was established for model prediction. Sixty Guanxi honey pomelo samples were classified into two levels (the dividing line was 60%) with an average accuracy of 83.1%.
[0008] The above-mentioned method for detecting internal defects is based on the difference in acoustic characteristics or image features caused by the defect morphology, and the method is not universal. Summary of the Invention
[0009] In order to solve the problems and needs in the background technology, the present invention provides a method for detecting internal defects of large-sized fruits and vegetables based on apparent density index.
[0010] The technical solutions of the present invention are as follows:
[0011] 1) Take fruits and vegetables as samples and perform basic parameter tests on all fruits and vegetables that are known to be defective;
[0012] 2) Obtain the apparent density index of each fruit based on the basic parameters of each fruit test;
[0013] 3) Fruit classification: Fruits are divided into two categories based on whether they have internal defects: defective and non-defective. The defective and non-defective fruits constitute the defective group C1 and the normal group C2, respectively.
[0014] 4) Statistical parameter processing: According to the classification in step 3), the mean and standard deviation of the density index of the defect group C1 and the normal group C2 are obtained respectively, which are recorded as u 1. u 2 and s 1. s 2;
[0015] 5) Initial threshold setting: pre-set the initial classification accuracy p 1 and p 2. Calculate the first initial classification threshold based on the mean and standard deviation of the defect group C1 and the normal group C2 T 10 and the second initial classification threshold T 20 ;
[0016] 6) According to the first initial classification threshold T 10 and the second initial classification threshold T 20 And the initial classification accuracy p 1 and p 2. Process the apparent density index of all fruits to obtain the optimal classification threshold T ;
[0017] 7) Internal defect detection: For the fruits to be tested, perform basic parameter detection and density index calculation according to steps 1) and 2) respectively, and then use the optimal classification threshold T Check whether the fruits to be tested have internal defects.
[0018] In the step 1), the weight of the fruit is detected M , horizontal diameter H and longitudinal diameter L , and then in step 1) calculate the sample density index according to the following formula:
[0019] I = M / ( H * L 2 )
[0020] Where:
[0021] I —apparent density index;
[0022] M —sample weight;
[0023] H — transverse diameter of the sample;
[0024] L —Longitudinal diameter of the sample.
[0025] In step 3), the fruits are cut open to see if there are any internal defects and divided into two categories, which are marked as defective and non-defective.
[0026] In step 4), the mean value of the defective group C1 is obtained by statistical calculation based on the apparent density index of all fruits in the defective group C1. u 1 and standard deviation s 1. Statistical calculation was performed based on the apparent density index of all fruits in the normal group C2 to obtain the mean value of the normal group C2 u 2 and standard deviation s 2.
[0027] In step 5), according to the mean of defect group C1 u 1. Standard Deviation s 1 and initial classification accuracy p 1 Use the inverse cumulative distribution function of the normal distribution to calculate the first initial classification threshold T 10 , according to the mean of C2 in the normal group u 2. Standard Deviation s 2 and initial classification accuracy p 2. Use the inverse cumulative distribution function of the normal distribution to calculate the second initial classification threshold T 20 .
[0028] The step 6) is specifically as follows:
[0029] 6.1) Get the threshold table:
[0030] In the first initial classification threshold T 10 and the second initial classification threshold T 20 The apparent density indexes of all fruits in the defective group C1 and the normal group C2 are sorted in ascending order, and after removing the duplicate apparent density index values, the average value between each two adjacent apparent density indexes is calculated as the candidate threshold, and a threshold table is formed by all the candidate thresholds;
[0031] 6.2) Threshold determination:
[0032] Traverse each candidate threshold in the threshold table, and use the candidate threshold to reclassify the apparent density index of all fruits in the defective group C1 and the normal group C2: classify fruits with an apparent density index less than or equal to the candidate threshold as defective, and classify fruits with an apparent density index greater than the candidate threshold as normal;
[0033] Calculate the classification accuracy of the defect group C1 and the normal group C2 classified in step 3) after reclassification p 1T 、 p 2T At the same time, the defect group C1 and the normal group C2 are taken as a whole to calculate the total classification accuracy after reclassification p T ;
[0034] Calculate the three classification accuracy rates corresponding to each candidate threshold in the threshold table p 1T 、 p 2T and p T The variance between the three values is equal, and the candidate threshold corresponding to the minimum variance is selected T T As the optimal classification threshold T .
[0035] In step 7), if the apparent density index of the fruit to be tested is less than or equal to the optimal classification threshold T , then there is a defect; if the apparent density index of the fruit to be tested is greater than the optimal classification threshold T , there are no defects.
[0036] The large-sized fruits and vegetables of the present invention refer to fruits and vegetables with a size greater than 200 mm.
[0037] The beneficial effects of the present invention are:
[0038] The method of the present invention utilizes the apparent density of large-sized fruits and vegetables to detect internal defects, and only requires a small amount of fruit and vegetable appearance parameters and weight parameters, thereby reducing the requirements for detection equipment. It has the advantages of fast detection speed, good universality and low cost. DETAILED DESCRIPTION
[0039] The present invention will be further described below with reference to the following examples.
[0040] In the embodiment of the present invention, honey pomelo is used as the fruit object for processing:
[0041] 1) Take fruits and vegetables as samples and test their basic parameters;
[0042] In this example, the weight of fruits is detected M , horizontal diameter H and longitudinal diameter L ,weight M The unit is g, the horizontal diameter H and longitudinal diameter L The unit is cm.
[0043] 2) Based on the basic parameters of each fruit, the following formula is used to process the apparent density index of each fruit;
[0044] I = M / ( H * L 2 )
[0045] Where:
[0046] I —apparent density index;
[0047] M —sample weight;
[0048] H — transverse diameter of the sample;
[0049] L —Longitudinal diameter of the sample.
[0050] 3) Fruit classification:
[0051] According to whether there are internal defects, the fruits are divided into two categories: defective and non-defective. The defective and non-defective fruits constitute the defect group C1 and the normal group C2 respectively.
[0052] Specifically, fruits and vegetables can be cut open to see if there are internal defects and divided into two categories, marked as defective and non-defective.
[0053] In this example, a total of 113 samples were cut open and divided into two groups according to the degree of pomelo seed granulation, labeled C1 and C2, representing the defect group (pomelo with granulation) and the normal group, respectively. The sample sizes of C1 and C2 were 53 and 60, respectively.
[0054] 4) Statistical parameter processing:
[0055] According to the classification in step 3), the mean and standard deviation of the visual density index of the defect group C1 and the normal group C2 are obtained respectively, which are recorded as u 1. u 2 and s 1. s 2;
[0056] Specifically, the mean value of defective group C1 is obtained by statistical calculation based on the apparent density index of all fruits in defective group C1. u 1 and standard deviation s 1. Statistical calculation was performed based on the apparent density index of all fruits in the normal group C1 to obtain the mean value of the normal group C1 u 2 and standard deviation s 2.
[0057] In this example, u 1. u2 and s 1. s 2 are 0.2923, 0.3517 and 0.0175, 0.0320 respectively.
[0058] 5) Initial threshold setting:
[0059] Pre-set initial classification accuracy p 1 and p 2. Calculate the first initial classification threshold based on the mean and standard deviation of the defect group C1 and the normal group C2 T 10 and the second initial classification threshold T 20 ;
[0060] Specifically, based on the mean of defect group C1 u 1. Standard Deviation s 1 and initial classification accuracy p 1 Use the inverse cumulative distribution function of the normal distribution to calculate the first initial classification threshold T 10 , according to the mean of C2 in the normal group u 2. Standard Deviation s 2 and initial classification accuracy p 2. Use the inverse cumulative distribution function of the normal distribution to calculate the second initial classification threshold T 20 .
[0061] In this example, the initial classification accuracy is set p 1 and p 2 are both 80%, and the initial classification thresholds are calculated using the inverse cumulative distribution function of the normal distribution. T 10 and T 20 They are 0.3071 and 0.3248 respectively.
[0062] 6) According to the first initial classification threshold T 10 and the second initial classification threshold T 20 Process the apparent density index of all fruits to obtain the optimal classification threshold T ;
[0063] 6.1) Get the threshold table:
[0064] In the first initial classification threshold T 10 and the second initial classification threshold T 20The apparent density indexes of all fruits in the defective group C1 and the normal group C2 are sorted in ascending order, and after removing the duplicate apparent density index values, the average value between each two adjacent apparent density indexes is calculated as the candidate threshold, and a threshold table is formed by all the candidate thresholds;
[0065] 6.2) Threshold determination:
[0066] As shown in the following table, each candidate threshold in the threshold table is traversed, and the apparent density index of all fruits in the defective group C1 and the normal group C2 are reclassified using the candidate threshold: fruits with an apparent density index less than or equal to the candidate threshold are classified as defective, and fruits with an apparent density index greater than the candidate threshold are classified as normal;
[0067] Table 1
[0068] Selected threshold Defect group classification accuracy / % Normal group classification accuracy / % Overall classification accuracy / % Classification accuracy variance / % 0.3091 84.91 93.33 89.38 4.22 0.3103 86.79 93.33 90.27 3.27 0.3118 88.68 93.33 91.15 2.33 0.3147 90.57 93.33 92.04 1.38 0.3171 92.45 93.33 92.92 0.44 0.3180 94.34 93.33 93.81 0.50 0.3195 94.34 91.67 92.92 1.34 0.3215 96.23 91.67 93.81 2.28 0.3233 98.11 91.67 94.69 3.23 0.3243 98.11 90.00 93.81 4.06
[0069] Calculate the classification accuracy of the defect group C1 and the normal group C2 classified in step 3) after reclassification p 1T 、 p 2T At the same time, the defect group C1 and the normal group C2 are taken as a whole to calculate the total classification accuracy after reclassification p T .
[0070] Calculate the three classification accuracy rates corresponding to each candidate threshold in the threshold table p 1T 、 p 2T and p T The variance between the three values is equal, and the candidate threshold corresponding to the minimum variance is selected T T As the optimal classification threshold T .
[0071] In this case, the optimal classification threshold T It is 0.3171.
[0072] 7) Internal defect detection:
[0073] For the fruits to be tested, the basic parameters are detected and the density index is calculated according to steps 1) and 2), and then the optimal classification threshold is used. T Check whether the fruits to be tested have internal defects.
[0074] Specifically, if the apparent density index of the fruit to be tested is less than or equal to the optimal classification threshold T , then there is a defect; if the apparent density index of the fruit to be tested is greater than the optimal classification threshold T , there are no defects.
[0075] In this example, the corresponding classification accuracy rates of the defect group C1 and the normal group C2 are 92.45% and 93.33%, respectively.
Claims
1. A method for detecting internal defects of large-sized fruits and vegetables based on apparent density index, characterized in that: The method comprises the following steps: 1) Conduct basic parameter testing on all fruits and vegetables; The step 1) detects the weight M, transverse diameter H and longitudinal diameter L of the fruit, the weight M is in g, the transverse diameter H and longitudinal diameter L are in cm; 2) Obtain the apparent density index of each fruit based on the basic parameters of each fruit test; In step 2), the sample apparent density index is calculated according to the following formula: I = M / ( H * L 2 ) Where: I —apparent density index; M —sample weight; H — transverse diameter of the sample; L — longitudinal diameter of the sample; 3) Fruit classification: Fruits are divided into two categories based on whether they have internal defects: defective and non-defective. The defective and non-defective fruits constitute the defective group C1 and the normal group C2, respectively. 4) Statistical parameter processing: According to the classification in step 3), the mean and standard deviation of the visual density index of the defect group C1 and the normal group C2 are obtained respectively; 5) Initial threshold setting: pre-set the initial classification accuracy p 1 and p 2. Calculate the first initial classification threshold based on the mean and standard deviation of the defect group C1 and the normal group C2 T 10 and the second initial classification threshold T 20 ; The preset initial classification accuracy rates p1 and p2 are both 80%; 6) According to the first initial classification threshold T 10 and the second initial classification threshold T 20 And the initial classification accuracy p 1 and p 2. Process the apparent density index of all fruits to obtain the optimal classification threshold T ; 7) Internal defect detection: For the fruits to be tested, perform basic parameter detection and density index calculation according to steps 1) and 2) respectively, and then use the optimal classification threshold T Detect internal defects of fruits to be tested; In step 5), according to the mean of defect group C1 u 1. Standard Deviation s 1 and initial classification accuracy p 1 Use the inverse cumulative distribution function of the normal distribution to calculate the first initial classification threshold T 10 , according to the mean of C2 in the normal group u 2. Standard Deviation s 2 and initial classification accuracy p 2. Use the inverse cumulative distribution function of the normal distribution to calculate the second initial classification threshold T 20 ; The step 6) is specifically as follows: 6.1) Get the threshold table: In the first initial classification threshold T 10 and the second initial classification threshold T 20 The apparent density indexes of all fruits in the defective group C1 and the normal group C2 are sorted in ascending order, and after removing the duplicate apparent density index values, the average value between each two adjacent apparent density indexes is calculated as the candidate threshold, and a threshold table is formed by all the candidate thresholds; 6.2) Threshold determination: Traverse each candidate threshold in the threshold table, and use the candidate threshold to reclassify the apparent density index of all fruits in the defective group C1 and the normal group C2: classify fruits with an apparent density index less than or equal to the candidate threshold as defective, and classify fruits with an apparent density index greater than the candidate threshold as normal; Calculate the classification accuracy p of the defect group C1 and the normal group C2 classified in step 3) after reclassification 1T 、p 2T At the same time, the defect group C1 and the normal group C2 are taken as a whole to calculate the total classification accuracy p after reclassification T ; Calculate the three classification accuracy rates p corresponding to each candidate threshold in the threshold table 1T 、p 2T and p T The variance between the three values is equal, and the threshold corresponding to the minimum variance is selected as the optimal classification threshold T; In step 7), if the apparent density index of the fruit to be tested is less than or equal to the optimal classification threshold T, then the fruit is defective; if the apparent density index of the fruit to be tested is greater than the optimal classification threshold T, then the fruit is not defective.
2. The method for detecting internal defects of large-sized fruits and vegetables based on apparent density index according to claim 1, characterized in that: In step 3), the fruits are cut open to see if there are any internal defects and divided into two categories, which are marked as defective and non-defective.
3. The method for detecting internal defects of large-sized fruits and vegetables based on apparent density index according to claim 1, characterized in that: In step 4), the mean value of the defective group C1 is obtained by statistical calculation based on the apparent density index of all fruits in the defective group C1. u 1 and standard deviation s 1. Statistical calculation was performed based on the apparent density index of all fruits in the normal group C2 to obtain the mean value of the normal group C2 u 2 and standard deviation s 2.
Citation Information
Patent Citations
Apparatus for discriminating presence and degree of cavity of object to be measured in nondestructive manner and volume measuring apparatus
JP1992027863A
Internal quality determination device, fruit selection system, and density measurement device
JP2017219471A