CN115575405B - Fruit appearance quality detection method based on multispectral image feature quantity - Google Patents
Fruit appearance quality detection method based on multispectral image feature quantity Download PDFInfo
- Publication number
- CN115575405B CN115575405B CN202211299966.0A CN202211299966A CN115575405B CN 115575405 B CN115575405 B CN 115575405B CN 202211299966 A CN202211299966 A CN 202211299966A CN 115575405 B CN115575405 B CN 115575405B
- Authority
- CN
- China
- Prior art keywords
- expression
- fruit
- feature quantity
- surface defect
- image feature
- 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.)
- Active
Links
- 235000013399 edible fruits Nutrition 0.000 title claims abstract description 78
- 238000001514 detection method Methods 0.000 title claims abstract description 26
- 230000007547 defect Effects 0.000 claims abstract description 70
- 238000001228 spectrum Methods 0.000 claims abstract description 37
- 230000014509 gene expression Effects 0.000 claims description 52
- 230000003595 spectral effect Effects 0.000 claims description 48
- 238000000034 method Methods 0.000 claims description 19
- 238000012804 iterative process Methods 0.000 claims description 9
- 238000005457 optimization Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000000701 chemical imaging Methods 0.000 abstract description 4
- 230000002950 deficient Effects 0.000 abstract description 3
- 241000220324 Pyrus Species 0.000 description 9
- 235000010672 Monarda didyma Nutrition 0.000 description 8
- 244000179970 Monarda didyma Species 0.000 description 8
- 235000014443 Pyrus communis Nutrition 0.000 description 8
- 208000034656 Contusions Diseases 0.000 description 4
- 208000034526 bruise Diseases 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000036244 malformation Effects 0.000 description 2
- 208000032544 Cicatrix Diseases 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 235000012041 food component Nutrition 0.000 description 1
- 239000005417 food ingredient Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000009659 non-destructive testing Methods 0.000 description 1
- 230000003647 oxidation Effects 0.000 description 1
- 238000007254 oxidation reaction Methods 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 235000021017 pears Nutrition 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 231100000241 scar Toxicity 0.000 description 1
- 230000037387 scars Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
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 Materials By Optical Means (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The invention discloses a fruit appearance quality detection method based on multispectral image feature quantity, which considers that optimal wave bands and feature wavelengths can be optimized in multispectral imaging technology to reduce data processing time and improve the effectiveness of spectrum data, so that the difference degree of the spectrum image feature quantity and normal fruit feature quantity under different wave bands is analyzed through a fruit defective fruit sample set with surface defects to optimize the spectrum wave bands and the multispectral image feature quantity, and whether the fruit has the surface defects in appearance quality detection is judged.
Description
Technical Field
The invention belongs to the technical field of fruit quality detection, and particularly relates to a method for detecting the appearance quality of fruits by analyzing characteristic quantities of multispectral images so as to optimize spectral bands corresponding to different types of surface defects and the characteristic quantities of the multispectral images.
Background
Multispectral imaging is an emerging nondestructive testing technology, which is an important improvement technology for hyperspectral imaging technology, and can collect and analyze data in a discrete spectrum range, so that the data is greatly simplified, redundant information is reduced, the processing speed is improved, meanwhile, different chemometric models and preprocessing methods are adopted for the spectrum data, optimal wave bands and characteristic wavelengths are optimized, the data processing time is greatly reduced, and the effectiveness of the spectrum data is improved. The multispectral imaging technology is widely focused in recent years, has the advantages of non-destructiveness, rapidness, simpleness, environment friendliness, no need of sample pretreatment and the like, is widely applied to qualitative and quantitative detection of food ingredients and contents and identification of different varieties and adulterants, can be suitable for monitoring and quality control of processes such as food production processing, storage and transportation, and lays a technical foundation for developing rapid, nondestructive, accurate and efficient real-time detection tools in the next step.
In fruit quality detection and automatic classification systems, color cameras are generally adopted to collect fruit images, then pattern recognition is carried out on the collected images, and finally corresponding classification processing is carried out according to recognition results. The quality of the collected fruit image will directly affect the accuracy of the final determination of the quality and grade of the fruit, so the information contained in the collected fruit image should reflect various external characteristics of the fruit as detailed as possible. When the quality of fruits is detected and classified by using a computer vision technology, surface defects such as rotting/rotting points/mildewing, bruising/stabbing, dry scars/skin, bruising oxidation, malformation, cracks/fissures and the like are important indexes of the appearance quality of the fruits. In practical application, the fruit image collected by the color camera cannot well reflect the fine features of the fruit surface, so that in order to improve the reliability of detection and classification, more surface features can be extracted by utilizing the images of the fruit under different spectrum conditions. In practical application, according to RGB (Red Green Blue) color model theory, image areas acquired under different wave bands are respectively represented by single colors such as R, G and B, and then are used as components in the RGB color model to be superimposed, so as to respectively obtain multispectral images such as RGB, RGI (Red Green Ratio Index, red Green band ratio), GBI (Green Blue Ratio Index, green Blue band ratio) and the like.
Disclosure of Invention
The invention aims to analyze the difference degree of the spectrum image characteristic quantity and the normal fruit characteristic quantity under different wave bands through a fruit defective fruit sample set with surface defects so as to optimize the spectrum wave band and the multispectral image characteristic quantity, thereby improving the effectiveness of spectrum data and being applied to fruit appearance quality detection.
To achieve the above object, the present invention includes the following steps shown in fig. 1:
Step 1: providing a sample K with surface defects in a certain fruit residual fruit sample set, and acquiring corresponding values x (I, J, L, K) aiming at the surface defects J when spectrum image acquisition is carried out under a spectrum band I and aiming at image feature quantity L, wherein K epsilon [1, K ] is the total number of the residual fruit samples of the fruit, J epsilon [1, J ] is the total number of the surface defect types, I epsilon [1, I ] is the total number of spectrum bands, L epsilon [1, L ] is the total number of the image feature quantity types; let θ j be the weight coefficient of the surface defect j, and Let mu i,j be the weight coefficient of the corresponding surface defect j on the spectrum band i, andLet w i,j,l be the weight coefficient of the image feature quantity l corresponding to the surface defect j in the spectral band i, andConsidering that the best spectral bands corresponding to appearance quality detection for different surface defect types and the reflection conditions of the image characteristic quantities are different, it is proposed to target the difference degree of the image characteristic quantities corresponding to the spectral bands of the residual fruits and the normal fruits, introduce Lagrangian multipliers such as lambda 1、λ2 and lambda 3 to establish an objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3), and select a parameter w i,j,l,μi,j,θj to maximize the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3):
Wherein y (i, j, l) is an average value corresponding to the condition that no surface defect j exists when the image characteristic quantity l is aimed at when the spectrum image acquisition is carried out on the normal fruit sample set of the fruit in a spectrum band i;
Step 2: from F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to θ j, the first and second derivatives are obtained:
First derivative of θ j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to θ j It can be seen that the presence of θ j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
First derivative of θ j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression for λ 3 with respect to θ j can be obtained:
From the following components The expression for θ j with respect to λ 3 is available:
From this, the theoretical value expression of λ 3 can be expressed as:
then the theoretical value expression for θ j can be obtained:
wherein m is an intermediate variable;
Step 3: from the first and second derivatives of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to w i,j,l, we can obtain:
The first derivative of w i,j,l by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to w i,j,l It can be seen that the presence of w i,j,l maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
The first derivative of w i,j,l by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression for λ 1 with respect to w i,j,l can be obtained:
From the following components The expression for w i,j,l with respect to lambda 1 can be obtained:
from this, the theoretical value expression of λ 1 can be expressed as:
Then the theoretical value expression for w i,j,l can be obtained:
Wherein n is an intermediate variable;
step 4: from F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to μ i,j, the first and second derivatives are obtained:
First derivative of μ i,j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to μ i,j It can be seen that the presence of μ i,j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
First derivative of μ i,j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression for λ 2 with respect to μ i,j can be obtained:
From the following components The expression for μ i,j with respect to λ 2 can be obtained:
from this, the theoretical value expression of λ 2 can be expressed as:
then the theoretical value expression for mu i,j can be obtained:
wherein d is an intermediate variable;
Step 5: the theoretical value expressions of theta j、μi,j and w i,j,l when the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) meets the maximization condition can be substituted into the iterative process of the weight coefficients to generate the actual weight coefficients of the surface defects Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantityThe iterative process is specifically represented as follows:
① In the initialization process, collecting spectral image characteristic quantities x (I, J, l, k) of samples with surface defects in the fruit residual fruit sample set and corresponding spectral image characteristic quantities of the fruit normal fruit sample set aiming at different spectral bands of different surface defects, obtaining an image characteristic quantity average value y (I, J, l) corresponding to the normal fruit sample set by calculating a statistical average value, setting θ j (t=0) as 1/J, setting μ i,j (t=0) as 1/I, substituting θ j (t=0) and μ i,j (t=0) and x (I, J, l, k) and y (I, J, l) into theoretical value expressions of w i,j,l to give w i,j,l (t=0);
② Substituting w i,j,l (t-1) and θ j (t-1) into the theoretical value expression of μ i,j gives μ i,j (t) with t plus 1;
③ Substituting w i,j,l (t-1) and μ i,j (t) into the theoretical value expression of θ j gives θ j (t);
④ Substituting θ j (t) and μ i,j (t) into the theoretical value expression of w i,j,l gives w i,j,l (t);
⑤ Comparing the I [ w i,j,l(t)-wi,j,l(t-1)]/wi,j,l(t)|、|[μi,j(t)-μi,j(t-1)]/μi,j (t) | with the I [ theta j(t)-θj(t-1)]/θj (t) |, entering an iteration process ⑥ if both are smaller than or equal to delta, otherwise entering an iteration process ⑤, wherein delta is an iteration process error threshold;
⑥ The set ψ i,j,l={wi,j,l (t) is established by w i,j,l (t) as an element, the set Φ i,j={μi,j (t) is established by mu i,j (t) as an element, and the set Θ j={θj (t) is established by θ j (t) as an element, wherein i is [1, I ], j is [1, J ], l is [1, L ]; if w i,j,l(t)<εw shows that the detection contribution degree of the corresponding spectral image feature quantity to the surface defect j in the spectral band i is smaller, w i,j,l (t) is removed from ψ i,j,l, so that the optimization of the multispectral image feature quantity in the spectral band is realized, and the corresponding i, j and l combination is added into the set Wherein epsilon w is a spectral image feature quantity weight threshold; if mu i,j(t)<εμ indicates that the corresponding spectrum band has smaller detection contribution degree to the surface defect j, mu i,j (t) is removed from phi i,j, so that the spectrum band is optimized, and the corresponding i, j combination is added into the collectionWherein epsilon μ is a spectral band weight threshold; if theta j(t)<εθ shows that the corresponding spectrum band has smaller overall detection contribution degree to the appearance quality of the fruits, then theta j (t) is removed from theta j, and the corresponding j is added into the collectionWherein ε θ is the surface defect weight threshold;
⑦ Given by the set ψ i,j,l={wi,j,l (t) } Given by the set Φ i,j={μi,j (t)Given by the set Θ j={θj (t)Wherein i epsilon [1, I ], j epsilon [1, J ], l epsilon [1, L ];
⑧ Order the AndThen it is possible to obtain:
thereby obtaining the actual weight coefficient of the surface defect Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantityAnd outputting.
Step 6: measuring the defects of different surfaces of fruit r to be detectedOver a spectral band of rangeIn-range image feature quantity, for surface defect j, if the deviation of the image feature quantity of fruit r with respect to surface defect j satisfiesIf the fruit is not found to have the surface defect j in the appearance quality detection, otherwise, the fruit is found to have the surface defect j, wherein,Θ j is the image feature quantity deviation threshold of the fruit with respect to the surface defect j.
Drawings
Fig. 1: fruit appearance quality detection step diagram based on multispectral image feature quantity
Detailed Description
The following will describe the technical scheme provided by the invention in detail by using a specific embodiment for detecting the appearance quality of bergamot pears in a spectrum band interval of 930-2548 nm, and specifically includes the following steps shown in fig. 1:
Step 1: setting a sample K with surface defects in a bergamot pear residue fruit sample set to obtain corresponding numerical values x (I, J, L and K) aiming at the surface defects J and aiming at monochromatic image feature quantity L such as R, G and B when spectrum image acquisition is carried out under a spectrum wave band I, wherein K epsilon [1, K ], the total number K of bergamot pear residue fruit samples is set to 1000, J epsilon [1, J ], the total number J of surface defect types including rot, bruise, spline skin, scratch, deformity or split is 6,i epsilon [1, I ], the total number L of the spectral wave bands such as 1000, 1025, 1076, 1152, 1203, 1279, 1300, 1406, 1431, 1533, 1609, 1634, 1888, 2092, 2142, 2320, 2473 and 2500 is 18, L epsilon [1, L ], and the total number L of the monochromatic images such as R, G and B is 3; let θ j be the weight coefficient of the surface defect j, and Let mu i,j be the weight coefficient of the corresponding surface defect j on the spectrum band i, andLet w i,j,l be the weight coefficient of the image feature quantity l corresponding to the surface defect j in the spectral band i, andConsidering that the best spectral bands corresponding to the appearance quality detection aiming at different surface defect types and the reflection conditions of the image characteristic quantities are different, the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) is established by taking the degree of the difference of the image characteristic quantities corresponding to the spectral bands of the bergamot pear residual fruits with the surface defects and the normal fruits as targets and introducing Lagrangian multipliers lambda 1、λ2 and lambda 3, and the maximization of the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) is realized by selecting a parameter w i,j,l,μi,j,θj:
wherein y (i, j, l) is an average value corresponding to the condition that no surface defect j exists when the image characteristic quantity l is aimed at when the spectrum image acquisition is carried out on the normal fruit sample set of the bergamot pear under the spectrum band i;
Step 2: from F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to θ j, the first and second derivatives are obtained:
First derivative of θ j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to θ j It can be seen that the presence of θ j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3), when the theoretical value expression for θ j can be expressed as:
wherein m is an intermediate variable;
Step 3: from the first and second derivatives of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to w i,j,l, we can obtain:
The first derivative of w i,j,l by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to w i,j,l It can be seen that the presence of w i,j,l maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3), when the theoretical expression for w i,j,l can be expressed as:
Wherein n is an intermediate variable;
Step 4: the theoretical value expression for μ i,j can be obtained by taking the first and second derivatives of μ i,j from F (w i,j,l,μi,j,θj,λ1,λ2,λ3):
First derivative of μ i,j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to μ i,j It can be seen that the presence of μ i,j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3), when the theoretical value expression for μ i,j can be expressed as:
wherein d is an intermediate variable;
Step 5: the theoretical value expressions of theta j、μi,j and w i,j,l when the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) meets the maximization condition can be substituted into the iterative process of the weight coefficients to generate the actual weight coefficients of the surface defects Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantityThe iterative process is specifically represented as follows:
① In the initialization process, collecting spectral image characteristic quantities x (i, j, l, k) of 1000 pear defective fruit samples under different spectral bands aiming at different surface defects and corresponding spectral image characteristic quantities of sample sets established by 50 fruit normal fruits, obtaining image characteristic quantity average values y (i, j, l) corresponding to the normal fruit sample sets by calculating a statistical average value, setting theta j (t=0) to be 0.167, setting mu i,j (t=0) to be 0.056, substituting theta j (t=0) and mu i,j (t=0) and x (i, j, l, k) and y (i, j, l) into theoretical value expressions of w i,j,l to give w i,j,l (t=0);
② Substituting w i,j,l (t-1) and θ j (t-1) into the theoretical value expression of μ i,j gives μ i,j (t) with t plus 1;
③ Substituting w i,j,l (t-1) and μ i,j (t) into the theoretical value expression of θ j gives θ j (t);
④ Substituting θ j (t) and μ i,j (t) into the theoretical value expression of w i,j,l gives w i,j,l (t);
⑤ Comparing [ w i,j,l(t)-wi,j,l(t-1)]/wi,j,l(t)|、|[μi,j(t)-μi,j(t-1)]/μi,j (t) | with [ theta j(t)-θj(t-1)]/θj (t) |, entering an iterative process ⑥ if both are smaller than or equal to an iterative process error threshold delta, otherwise entering an iterative process ⑤, wherein delta is set to 2%;
⑥ The set ψ i,j,l={wi,j,l (t) is established by w i,j,l (t) as an element, the set Φ i,j={μi,j (t) is established by mu i,j (t) as an element, and the set Θ j={θj (t) is established by θ j (t) as an element, wherein i is [1, I ], j is [1, J ], l is [1, L ]; if w i,j,l(t)<εw shows that the detection contribution degree of the corresponding spectral image feature quantity to the surface defect j in the spectral band i is smaller, w i,j,l (t) is removed from ψ i,j,l, so that the optimization of the multispectral image feature quantity in the spectral band is realized, and the corresponding i, j and l combination is added into the set If mu i,j(t)<εμ indicates that the corresponding spectrum band has smaller detection contribution degree to the surface defect j, mu i,j (t) is removed from phi i,j, so that the spectrum band is optimized, and the corresponding i, j combination is added into the collectionIf theta j(t)<εθ shows that the corresponding spectrum band has smaller overall detection contribution degree to the appearance quality of the fruits, then theta j (t) is removed from theta j, and the corresponding j is added into the collectionWherein ε w is set to 0.01, ε μ is set to 0.02, ε θ is set to 0.05;
⑦ Given by the set ψ i,j,l={wi,j,l (t) } Given by the set Φ i,j={μi,j (t)Given by the set Θ j={θj (t)Wherein i epsilon [1, I ], j epsilon [1, J ], l epsilon [1, L ];
⑧ Order the AndThen it is possible to obtain:
thereby obtaining the actual weight coefficient of the surface defect Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantityAnd outputting.
Step 6: measuring that the bergamot pear r to be detected has different surface defectsOver a spectral band of rangeIn-range image feature quantity, for surface defect j, if the image feature quantity deviation condition of bergamot r about surface defect j satisfiesIf so, the pear is regarded as not having the surface defect j in the appearance quality detection, otherwise, the fruit is regarded as having the surface defect j, wherein,The image characteristic quantity of the bergamot pear about the surface defect j is set to be 5% from the threshold theta j.
In this implementation, after the required image areas with the background removed are obtained, the recognition rate of the multispectral images synthesized by the image areas collected under different spectral bands such as 1000, 1025, 1076, 1152, 1203, 1279, 1300, 1406, 1431, 1533, 1609, 1634, 1888, 2092, 2142, 2320, 2473 and 2500 in the mode of image feature values such as R, G and B is obviously better than that of the monochromatic images, the recognition error conditions of the surface defects such as decay, bruise, flower skin, scratch, malformation or split are reduced by 4% on average, which shows that the method has a better practical effect, the contribution degree of the image feature values to the multispectral image recognition rate can be known through the actual weight coefficients of the image feature values, so that the synthesis mode of the multispectral images is recommended, meanwhile, the gray scale of different surface defects on different surface feature values is different, the actual weight coefficients of the spectral bands find out the wave bands with more obvious surface defect reaction, and the spectral bands with more obvious effect on the surface defect reaction are found, so that the spectral band with the actual weight coefficients of the spectral bands is preferable, and the fruit spectral quality is better to realize the proper spectral quality detection of the surface defects.
Claims (4)
1. The fruit appearance quality detection method based on the multispectral image feature quantity is characterized by comprising the following steps of:
Step 1: providing a sample K with surface defects in a certain fruit residual fruit sample set, and acquiring corresponding values x (I, J, L, K) aiming at the surface defects J when spectrum image acquisition is carried out under a spectrum band I and aiming at image feature quantity L, wherein K epsilon [1, K ] is the total number of residual fruit samples of the fruit, J epsilon [1, J ] is the total number of surface defect types, I epsilon [1, I ] is the total number of spectrum bands, L epsilon [1, L ] is the total number of R, G, B monochromies; let θ j be the weight coefficient of the surface defect j, and Let mu i,j be the weight coefficient of the corresponding surface defect j on the spectrum band i, andLet w i,j,l be the weight coefficient of the image feature quantity l corresponding to the surface defect j in the spectral band i, andIt is proposed to build the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with the objective of the degree of difference in the image characteristics corresponding to the spectral bands of the residual and normal fruits and introduce lambda 1、λ2 and lambda 3 lagrangian multipliers, and to maximize the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) by selecting the parameter w i,j,l,μi,j,θj:
Wherein y (i, j, l) is an average value corresponding to the condition that no surface defect j exists when the image characteristic quantity l is aimed at when the spectrum image acquisition is carried out on the normal fruit sample set of the fruit in a spectrum band i;
Step 2: from F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to θ j, the first and second derivatives are obtained:
First derivative of θ j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to θ j It can be seen that the presence of θ j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
First derivative of θ j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression of lambda 3 for theta j is obtained byAn expression of θ j with respect to λ 3, and hence a theoretical expression of λ 3, can be obtained, and then a theoretical expression of θ j can be obtained:
wherein m is an intermediate variable;
Step 3: from the first and second derivatives of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to w i,j,l, we can obtain:
The first derivative of w i,j,l by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to w i,j,l It can be seen that the presence of w i,j,l maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
The first derivative of w i,j,l by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression of lambda 1 for w i,j,l is obtained byThe expression of w i,j,l for lambda 1, and hence the theoretical expression of lambda 1, can be obtained, the theoretical expression of w i,j,l:
Wherein n is an intermediate variable;
step 4: from F (w i,j,l,μi,j,θj,λ1,λ2,λ3) to μ i,j, the first and second derivatives are obtained:
First derivative of μ i,j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) It can be seen that the second derivative of F (w i,j,l,μi,j,θj,λ1,λ2,λ3) with respect to μ i,j It can be seen that the presence of μ i,j maximizes F (w i,j,l,μi,j,θj,λ1,λ2,λ3);
First derivative of μ i,j by F (w i,j,l,μi,j,θj,λ1,λ2,λ3) The expression of lambda 2 for mu i,j can be obtained byThe expression of μ i,j for λ 2, and hence the theoretical expression of λ 2, can be obtained, and then the theoretical expression of μ i,j:
wherein d is an intermediate variable;
Step 5: the theoretical value expressions of theta j、μi,j and w i,j,l when the objective function F (w i,j,l,μi,j,θj,λ1,λ2,λ3) meets the maximization condition can be substituted into the iterative process of the weight coefficients to generate the actual weight coefficients of the surface defects Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantity
Step 6: measuring the defects of different surfaces of fruit r to be detectedOver a spectral band of rangeIn-range image feature quantity, for surface defect j, if the deviation of the image feature quantity of fruit r with respect to surface defect j satisfiesIf the fruit is not found to have the surface defect j in the appearance quality detection, otherwise, the fruit is found to have the surface defect j, wherein, The image characteristic quantity of the fruit with respect to the surface defect j deviates from a threshold;
in step 5, the iterative process of the weight coefficient may be described as:
① In the initialization process, collecting spectral image characteristic quantities x (I, J, l, k) of samples with surface defects in the fruit residual fruit sample set and corresponding spectral image characteristic quantities of the fruit normal fruit sample set aiming at different spectral bands of different surface defects, obtaining an image characteristic quantity average value y (I, J, l) corresponding to the normal fruit sample set by calculating a statistical average value, setting θ j (t=0) as 1/J, setting μ i,j (t=0) as 1/I, substituting θ j (t=0) and μ i,j (t=0) and x (I, J, l, k) and y (I, J, l) into theoretical value expressions of w i,j,l to give w i,j,l (t=0);
② Substituting w i,j,l (t-1) and θ j (t-1) into the theoretical value expression of μ i,j gives μ i,j (t) with t plus 1;
③ Substituting w i,j,l (t-1) and μ i,j (t) into the theoretical value expression of θ j gives θ j (t);
④ Substituting θ j (t) and μ i,j (t) into the theoretical value expression of w i,j,l gives w i,j,l (t);
⑤ Comparing the I [ w i,j,l(t)-wi,j,l(t-1)]/wi,j,l(t)|、|[μi,j(t)-μi,j(t-1)]/μi,j (t) | with the I [ theta j(t)-θj(t-1)]/θj (t) |, entering an iteration process ⑥ if both are smaller than or equal to delta, otherwise entering an iteration process ⑤, wherein delta is an iteration process error threshold;
⑥ The set ψ i,j,l={wi,j,l (t) is established by w i,j,l (t) as an element, the set Φ i,j={μi,j (t) is established by mu i,j (t) as an element, and the set Θ j={θj (t) is established by θ j (t) as an element, wherein i is [1, I ], j is [1, J ], l is [1, L ]; if w i,j,l(t)<εw shows that the detection contribution degree of the corresponding spectral image feature quantity to the surface defect j in the spectral band i is smaller, w i,j,l (t) is removed from ψ i,j,l, so that the optimization of the multispectral image feature quantity in the spectral band is realized, and the corresponding i, j and l combination is added into the set Wherein epsilon w is a spectral image feature quantity weight threshold; if mu i,j(t)<εμ indicates that the corresponding spectrum band has smaller detection contribution degree to the surface defect j, mu i,j (t) is removed from phi i,j, so that the spectrum band is optimized, and the corresponding i, j combination is added into the collectionWherein epsilon μ is a spectral band weight threshold; if theta j(t)<εθ shows that the corresponding spectrum band has smaller overall detection contribution degree to the appearance quality of the fruits, then theta j (t) is removed from theta j, and the corresponding j is added into the collectionWherein ε θ is the surface defect weight threshold;
⑦ Given by the set ψ i,j,l={wi,j,l (t) } Given by the set Φ i,j={μi,j (t)Given by the set Θ j={θj (t)Wherein i epsilon [1, I ], j epsilon [1, J ], l epsilon [1, L ];
⑧ Order the AndThen it is possible to obtain:
thereby obtaining the actual weight coefficient of the surface defect Actual weighting coefficients of spectral bandsAnd the actual weight coefficient of the image feature quantityAnd outputting.
2. The method for detecting the appearance quality of fruits based on the characteristic quantity of multispectral images according to claim 1, wherein the method comprises the following steps of: in step 2, the expression of λ 3 with respect to θ j, the expression of θ j with respect to λ 3, and the theoretical value expression of λ 3 can respectively represent:
。
3. The method for detecting the appearance quality of fruits based on the characteristic quantity of multispectral images according to claim 1, wherein the method comprises the following steps of: in step3, the expression of λ 1 with respect to w i,j,l, the expression of w i,j,l with respect to λ 1, and the theoretical value expression of λ 1, respectively, can be expressed as:
。
4. The method for detecting the appearance quality of fruits based on the characteristic quantity of multispectral images according to claim 1, wherein the method comprises the following steps of: in step 4, the expression of λ 2 with respect to μ i,j, the expression of μ i,j with respect to λ 2, and the theoretical value expression of λ 2 are expressed as:
。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211299966.0A CN115575405B (en) | 2022-10-24 | 2022-10-24 | Fruit appearance quality detection method based on multispectral image feature quantity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211299966.0A CN115575405B (en) | 2022-10-24 | 2022-10-24 | Fruit appearance quality detection method based on multispectral image feature quantity |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115575405A CN115575405A (en) | 2023-01-06 |
CN115575405B true CN115575405B (en) | 2024-07-19 |
Family
ID=84587070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211299966.0A Active CN115575405B (en) | 2022-10-24 | 2022-10-24 | Fruit appearance quality detection method based on multispectral image feature quantity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115575405B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115575404B (en) * | 2022-10-24 | 2024-07-09 | 绿萌科技股份有限公司 | Fruit appearance quality detection method based on ratio multispectral image |
CN116645664B (en) * | 2023-04-11 | 2024-07-12 | 绿萌科技股份有限公司 | Fruit appearance quality evaluation method based on coloring surface condition analysis |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111539936A (en) * | 2020-04-24 | 2020-08-14 | 河北工业大学 | Mixed weight multispectral fusion method for lithium battery image |
CN114199880A (en) * | 2021-11-22 | 2022-03-18 | 西南大学 | Citrus disease and insect pest real-time detection method based on edge calculation |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7714997B2 (en) * | 2006-11-07 | 2010-05-11 | Hitachi High-Technologies Corporation | Apparatus for inspecting defects |
CN106568784A (en) * | 2016-11-09 | 2017-04-19 | 石河子大学 | Multispectral imaging system and implementation method which are used for fruit and vegetable surface defect on-line detection |
CN106940292A (en) * | 2017-04-25 | 2017-07-11 | 合肥工业大学 | Bar denier wood raw material quick nondestructive discrimination method of damaging by worms based on multi-optical spectrum imaging technology |
KR102205445B1 (en) * | 2019-02-28 | 2021-01-20 | 충남대학교산학협력단 | Method and System for Detecting Foreign Material on Processing Vegetable Using Multispectral Fluorescence Imaging |
CN110441312A (en) * | 2019-07-30 | 2019-11-12 | 上海深视信息科技有限公司 | A kind of surface defects of products detection system based on multispectral imaging |
CN111999293A (en) * | 2020-07-03 | 2020-11-27 | 中国农业大学 | Fruit and vegetable freshness detection and evaluation method |
CN115144405B (en) * | 2022-09-02 | 2022-12-13 | 扬州中科半导体照明有限公司 | Mini LED wafer appearance defect detection method based on optical detection |
-
2022
- 2022-10-24 CN CN202211299966.0A patent/CN115575405B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111539936A (en) * | 2020-04-24 | 2020-08-14 | 河北工业大学 | Mixed weight multispectral fusion method for lithium battery image |
CN114199880A (en) * | 2021-11-22 | 2022-03-18 | 西南大学 | Citrus disease and insect pest real-time detection method based on edge calculation |
Also Published As
Publication number | Publication date |
---|---|
CN115575405A (en) | 2023-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115575405B (en) | Fruit appearance quality detection method based on multispectral image feature quantity | |
Huang et al. | Review of seed quality and safety tests using optical sensing technologies | |
Huang et al. | Rapid and nondestructive prediction of amylose and amylopectin contents in sorghum based on hyperspectral imaging | |
CN110441249B (en) | Method for building pit mud total acid prediction model based on hyperspectral image technology | |
CN112287886B (en) | Wheat plant nitrogen content estimation method based on hyperspectral image fusion map features | |
CN110763698A (en) | Hyperspectral citrus leaf disease identification method based on characteristic wavelength | |
CN114092839B (en) | Unmanned aerial vehicle remote sensing-based soybean harvest period maturity judging method | |
CN109409350A (en) | A kind of Wavelength selecting method based on PCA modeling reaction type load weighting | |
CN112213281A (en) | Comprehensive evaluation method for rapidly determining freshness of freshwater fish based on transmission near infrared spectrum | |
CN113484278A (en) | Tomato comprehensive quality nondestructive testing method based on spectrum and principal component analysis | |
Femenias et al. | Hyperspectral Imaging | |
CN115575404B (en) | Fruit appearance quality detection method based on ratio multispectral image | |
Wang et al. | Monitoring model for predicting maize grain moisture at the filling stage using NIRS and a small sample size | |
CN115630332A (en) | Wheat flour quality characteristic prediction method | |
CN114544530A (en) | Tobacco shred component detection method and device and computer equipment | |
CN113310933A (en) | Spectrum identification method for number of days for storing raw buffalo milk | |
CN113777104A (en) | Method for hyperspectral detection of maturity of single corn seed | |
CN112834454A (en) | Winter jujube detection method based on near-infrared hyperspectral technology | |
CN112229817A (en) | Method for establishing soda saline-alkali soil heavy metal quantitative inversion model | |
CN115855836A (en) | Hyperspectral imaging-based fresh tea leaf withering and fermentation degree judgment method and system | |
CN115184298B (en) | Method for on-line monitoring of soy sauce quality based on near infrared spectrum | |
Li et al. | Detection of the storage time of light bruises in yellow peaches based on spectrum and texture features of hyperspectral image | |
CN114062282B (en) | Method and device for rapidly judging dry matters of fruits on tree | |
CN118228112A (en) | Fruit and vegetable maturity identification method based on wave spectrum | |
Gao et al. | Hyperspectral imaging for prediction and distribution visualization of total acidity and hardness of red globe grapes. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information |
Address after: 341600 No. 9, Shuanglong Avenue, High tech Zone, Xinfeng County, Ganzhou, Jiangxi Province Applicant after: Lvmeng Technology Co.,Ltd. Address before: Jiangxi Lumeng Technology Holding Co., Ltd., No. 30, Chengxin Avenue, Xinfeng Industrial Park, Ganzhou City, Jiangxi Province, 341600 Applicant before: JIANGXI REEMOON TECHNOLOGY HOLDINGS Co.,Ltd. |
|
CB02 | Change of applicant information | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |