Nondestructive detection method and application of strawberry hardness and sugar content based on hyperspectral polarization technology
Hyperspectral polarization technology is used to separate strawberry spectral data into specular reflection and diffuse reflection components, and build a prediction model, which solves the problem of low accuracy and efficiency of strawberry detection in the existing technology, and achieves accurate and rapid detection of strawberry sugar content and hardness.
Patent Information
- Application Number
- CN202410628629.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-21
AI Technical Summary
The existing technology has problems of low accuracy and efficiency in detecting the sugar content and hardness of strawberries, and is affected by stray light, making it difficult to obtain diverse result data in one detection.
Using hyperspectral polarization technology, the spectral data of strawberry samples are separated into specular reflection components and diffuse reflection components, and a linear hardness value prediction model and a linear sugar content prediction model are constructed. Spectral data at different polarization angles are analyzed to improve detection accuracy. .
It achieves accurate and rapid on-site detection of strawberry sugar content and hardness, reduces environmental interference, and improves the accuracy of detection results.
Smart Images

Figure CN118209501B
Abstract
Description
Technical Field
[0001] The present application relates to the field of hyperspectral polarization detection, and in particular to a non-destructive detection method and application of strawberry hardness and sugar content based on hyperspectral polarization technology. Background Art
[0002] Nondestructive testing technology is of great value in agricultural product quality monitoring and food processing. It can avoid product losses caused by destructive traditional sampling methods and provide the possibility for real-time monitoring. In the production and processing of strawberries, sugar content and hardness are key quality indicators, which are directly related to the taste, quality and transportation packaging of strawberries and other circulation environments.
[0003] In traditional methods, destructive sampling and laboratory testing methods are mainly used to detect the sugar content and hardness of strawberries. Such methods are time-consuming and labor-intensive. Although the prior art uses equipment such as hardness meters and refractometers to conduct on-site testing of the sugar content and hardness of strawberries, their accuracy and efficiency are too low and cannot achieve good results. Although the prior art uses spectral data to analyze data such as the sugar content and hardness of fruits, it often has high requirements for the testing environment during testing. This is because the prior art is affected by stray light during spectral analysis, resulting in deviations in the analysis results. In addition, in order to avoid interference from different spectra, the prior art is also difficult to obtain diverse result data in one test, and can often only obtain the sugar content or hardness of fruits in one test.
[0004] In summary, the realization of a method that can accurately and quickly detect the sugar content and hardness of strawberries on-site is of great significance to the output of high-grade strawberries and meeting market demand. Summary of the invention
[0005] The embodiment of the present application provides a non-destructive detection method and application of the hardness and sugar content of strawberries based on hyperspectral polarization technology. By separating the spectral data of a strawberry sample into a specular reflection component and a diffuse reflection component, a linear hardness value prediction model and a linear sugar content value prediction model are constructed, so that the sugar content and hardness of the strawberries can be accurately and quickly detected directly on site.
[0006] In a first aspect, an embodiment of the present application provides a non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology, the method comprising:
[0007] Obtain strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample, collect spectral data of each strawberry sample under different polarizations, and separate the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component;
[0008] Constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry;
[0009] A linear sugar content value prediction model is constructed according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
[0010] In a second aspect, the present application provides a non-destructive detection device for strawberry hardness and sugar content based on hyperspectral polarization technology, including:
[0011] An acquisition module is used to acquire strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample, collect spectral data of each strawberry sample under different polarizations, and separate the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component;
[0012] A first construction module is used to construct a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry;
[0013] The second building module is used to build a linear sugar content value prediction model according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes a non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology.
[0016] The main contributions and innovations of the present invention are as follows:
[0017] In order to avoid the influence of specular reflection on diffuse reflection, this scheme obtains the spectral data of strawberries at different polarization angles, so that the spectral data can be separated into specular reflection component and diffuse reflection component, and then the specular reflection component and diffuse reflection component are measured. Therefore, this scheme is less affected by the influence of the environment during measurement, and the detection result is more accurate; this scheme constructs a linear hardness value prediction model by performing a correlation analysis on the specular reflection component and the hardness value of the strawberry, so that the hardness value of the strawberry can be accurately predicted by obtaining the specular reflection component of the strawberry; this scheme constructs a linear sugar content value prediction model by performing a correlation analysis on the diffuse reflection component and the sugar content value of the strawberry, so that the sugar content value of the strawberry can be accurately predicted by obtaining the diffuse reflection component of the strawberry; in order to improve the accuracy of the prediction, this scheme uses a test set to confirm the band interval with the highest correlation to construct a linear sugar content value prediction model and a linear hardness value prediction model.
[0018] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a flow chart of a non-destructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to an embodiment of the present application;
[0021] Figure 2 This is a schematic diagram of the separation of spectral data of strawberry samples in this scheme;
[0022] Figure 3 It is the correlation curve of the average value of the specular reflection component and the hardness value of the strawberry sample in all bands of this scheme;
[0023] Figure 4 is a graph showing the relationship between the predicted hardness and the true hardness obtained by this scheme using the linear hardness value prediction model;
[0024] Figure 5 It is an isopotential diagram showing the correlation between the diffuse reflection component in the 900-1400nm band and the sugar content value of this scheme;
[0025] Figure 6 It is an isopotential diagram showing the correlation between the diffuse reflection component in the 900-1700nm band and the sugar content value of this scheme;
[0026] Figure 7This is a graph showing the relationship between the predicted sugar content and the actual sugar content obtained by using the linear sugar content prediction model in this scheme;
[0027] Figure 8 It is a structural block diagram of a non-destructive detection device for strawberry hardness and sugar content based on hyperspectral polarization technology according to an embodiment of the present application;
[0028] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0030] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0031] Embodiment 1
[0032] The present application embodiment provides a non-destructive detection method for the hardness and sugar content of strawberries based on hyperspectral polarization technology, which can accurately and quickly detect the sugar content and hardness of strawberries directly on site. Specifically, refer to Figure 1 , the method comprising:
[0033] Obtain strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample, collect spectral data of each strawberry sample under different polarizations, and separate the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component;
[0034] Constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry;
[0035] A linear sugar content value prediction model is constructed according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
[0036] In some embodiments, when testing and analyzing strawberry samples, in order to ensure the freshness of the strawberry fruits, the entire testing and analysis process is controlled within 5 hours. The advantage of this is that accurate experimental results can be guaranteed.
[0037] In the step of "obtaining strawberry samples of different degrees of maturity and the sugar content and hardness value of each strawberry sample", a desktop hardness meter is used to measure the hardness value of each strawberry sample, and a sugar content meter is used to measure the sugar content of each strawberry.
[0038] In this solution, the desktop hardness tester and saccharimeter can quickly and accurately test the hardness and saccharimeter values of strawberry samples, saving testing time.
[0039] In the step of "collecting spectral data of each strawberry sample under different polarizations", a spectrometer is used to collect spectral data of each strawberry sample under different polarizations under uniform lighting conditions, and the spectrometer is calibrated with a white board and the spectral reflectance is calculated each time the polarization angle is adjusted.
[0040] Specifically, an ASD Field Spec4 Pro FR spectrometer equipped with a rotatable observation stand was used to obtain spectral data of each strawberry sample, and a 50W halogen lamp provided with the ASD Field Spec4 Pro FR spectrometer was used to simulate sunlight as a uniform lighting condition.
[0041] Specifically, the strawberry detection area is fixed, and the original spectral data of the strawberry is first collected without adding a polarizer, and then a polarizer is added and the spectral data under different polarizations are collected in the order of 0°, 45°, and 90°. In this scheme, spectral data are collected three times without adding a polarizer and at each polarizer angle, so a total of 4 sets of spectral data are collected.
[0042] Specifically, since diffuse reflection is a direct characteristic of material response, the diffuse reflection component can be used for sugar content detection. However, in the process of using the diffuse reflection component for sugar content detection, the mirror reflection component will directly affect the measurement value of the diffuse reflection component, resulting in inaccurate detection results. Since the mirror reflection component is polarized and the diffuse reflection component is non-polarized, this scheme collects spectral data of strawberries at different polarizer angles to separate the two in subsequent steps.
[0043] Specifically, the benefit of this solution of performing whiteboard calibration on the spectrometer and calculating the spectral reflectance each time the polarization angle is adjusted is that the accuracy of each spectral data collection can be increased.
[0044] In the step of "separating the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component", the specular reflection separation formula is used to separate the spectral data of each strawberry sample in the near-infrared range of 700-1700 wavelength band.
[0045] Specifically, the scheme separates the spectral data of each strawberry sample as shown in the following figure: Figure 2 As shown in FIG. 1 , since the spectral data of the strawberry sample has noise before the 500nm band, the present scheme separates the spectral data of the 700-1700nm band, so the obtained specular reflection component R S,i700-1700 and diffuse reflection component R diff,i700-1700 The wavelength band is also 700-1700nm. This scheme selects the wavelength band of 700-1700nm to avoid the influence of noise to the greatest extent without losing valid data.
[0046] Specifically, since different strawberry fruits have different surface roughness, and the roughness differences show that the spectral characteristics are mainly different in specular reflection and scattering components, hyperspectral polarization technology is used to separate the specular reflection and scattering components of strawberry fruits. Accurate separation of the hyperspectral reflection specular components on the surface of strawberry fruits provides an opportunity for hardness detection.
[0047] Specifically, the separation of the specular reflection component and the diffuse reflection component of the spectral data of the strawberry sample is expressed by the following formula:
[0048]
[0049] Among them, i represents the i-band, represents the normal reflectivity of band i, is the micro-angle at which the incident light radiates on the strawberry fruit. is the refraction angle of the incident light radiation on the strawberry fruit, which is equivalent to ; n is the refractive index of the fruit skin and is a constant (1.5); where Rp(i) is the polarized reflectivity. The premise for calculating Rs is to calculate R p and C. C is the reciprocal of the polarization degree of the mirror reflectivity of an ideal smooth plane, and C is given by , n is calculated. They are respectively the light source zenith angle, the observation zenith angle, the light source azimuth angle and the observation azimuth angle. 45°, is 15°, DOP is the degree of polarization, which represents the ratio between the polarization component Rp and the total reflectance R. DOP can be deduced from the four Stokes parameters I, Q, U and V, while parameter V can be ignored in this case. Therefore, the Pickering method is used to calculate the values of I, Q and U, where I′x represents the polarization spectrum of the strawberry when the relative angle of the polarizer is x°.
[0050] In the step of "constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample", a linear hardness value prediction model is constructed according to the linear correlation between the average value of the specular reflection component of each strawberry sample in all bands and the hardness value of the corresponding strawberry sample.
[0051] Specifically, by Figure 2 It can be seen that the specular reflection component of each strawberry sample in this scheme tends to a straight line, that is, the linear correlation between the specular reflection component of each strawberry sample and the hardness value in any band is not large, so the linear hardness value prediction model is constructed using the average value of the specular reflection component of each strawberry sample in all bands and the linear correlation between the hardness value.
[0052] Specifically, the correlation curve between the average value of the specular reflection component and the hardness value of each strawberry sample in all bands obtained by this scheme in actual application is as follows: Figure 3 As shown, according to the degree of linear correlation, a linear hardness value prediction model y=2.8256x+ 0.4291 can be obtained, and its determination coefficient is about 0.76.
[0053] Furthermore, a linear hardness value prediction model was constructed based on the linear correlation between the average value of the specular reflection component of each strawberry sample in the 1050nm and 1100nm bands and the hardness value of the corresponding strawberry sample.
[0054] Specifically, in practical applications, since the spectral data contains a large number of bands, calculating the average value of the specular reflection components in all bands will result in a huge amount of calculation. Therefore, this scheme only chooses to calculate the average value of the specular reflection components in the 1050nm and 1100nm bands, and the resulting linear hardness value prediction model is y = 2.723x + 0.389.
[0055] Taking two strawberries as an example, the method of constructing a linear hardness value prediction model is illustrated. The specular reflection components of the first strawberry sample at 1050nm and 1100nm bands are 0.051 and 0.053 respectively, and the hardness of the first strawberry sample is 0.7N / S. The specular reflection components of the second strawberry sample at 1050nm and 1100nm bands are 0.057 and 0.051 respectively, and the hardness of the second strawberry sample is 0.6N / S. The average value of the specular reflection component of the first strawberry sample is 0.052, and the average value of the specular reflection component of the second strawberry sample is 0.056. The average values of the two specular reflection components, 0.052 and 0.056, and the hardnesses of the two strawberry samples, 0.7N / S and 0.6N / S, are used to construct a linearly related equation as a linear hardness value prediction model.
[0056] In some embodiments, the present solution uses a test data set to test the constructed linear hardness value prediction model, wherein the test data set includes the specular reflection components and hardness values of multiple strawberries. The specular reflection component of each strawberry is input into the linear hardness value prediction model to obtain the predicted hardness of the corresponding strawberry. The predicted hardness of each strawberry is compared with the actual hardness to obtain the accuracy of the linear hardness value prediction model. The relationship between the predicted hardness and the actual hardness is shown in the figure below. Figure 4 As shown by Figure 4 It can be seen that the linear hardness value prediction model obtained by this scheme has achieved a very high accuracy. Table 1 below is the model prediction accuracy verification index of the linear hardness value prediction model.
[0057]
[0058] Table 1 Prediction accuracy verification index of linear hardness value prediction model
[0059] Among them, the RMSE (root mean square error) of the linear hardness value prediction model is 0.074, the MSE (mean square error) is 0.005, and the determination coefficient R 2 It is 0.72.
[0060] In this scheme, in the step of "constructing a linear sugar content value prediction model according to the linear correlation between the diffuse reflectance component and the sugar content value of each strawberry sample", the near-infrared difference vegetation index is used to calculate the sugar content-related band interval with the highest correlation between the diffuse reflectance component and the sugar content value, and a linear sugar content value prediction model is constructed according to the linear correlation between the diffuse reflectance component of each strawberry sample in the sugar content-related band interval and the sugar content value of the corresponding strawberry sample.
[0061] Specifically, the near infrared difference vegetation index is first used to calculate the correlation between the diffuse reflection component in the 900-1400nm band and the sugar content value. Figure 5The equipotential map shown in the figure is then used to calculate the correlation between the diffuse reflectance component in the 900-1700nm band and the sugar content value. Figure 6 The equipotential diagram shown in Figure 5 as well as Figure 6 Analysis shows that the correlation between diffuse reflection component and sugar content is highest at 1000nm-1100nm.
[0062] Furthermore, the sugar content-related wavelength range is 1000nm-1100nm.
[0063] Furthermore, the normalized vegetation index of the diffuse reflectance components in the 1050nm and 1100nm bands was calculated, and the normalized vegetation index was linearly fitted with the corresponding sugar content value to obtain a linear sugar content value prediction model.
[0064] Specifically, in practical applications, since spectral data contains a large number of bands, calculating the normalized vegetation index of all diffuse reflection components will result in a huge amount of calculation. Therefore, this scheme only chooses to calculate the normalized vegetation index of the diffuse reflection component in the 1050nm and 1100nm bands, and the resulting linear sugar content prediction model is y = 132.895x +8.223.
[0065] In this scheme, a test data set is used to test the linear sugar content prediction model. The test data set contains diffuse reflection components and sugar content values of multiple strawberries. The diffuse reflection component of each strawberry is input into the linear sugar content prediction model to obtain the predicted sugar content of the corresponding strawberry. The predicted sugar content of each strawberry is compared with the actual sugar content to obtain the accuracy of the linear sugar content prediction model. The relationship between the predicted sugar content and the actual sugar content is shown in the figure below. Figure 7 As shown by Figure 7 It can be seen that the linear hardness value prediction model obtained by this scheme has achieved a very high accuracy. Table 2 below is the model prediction accuracy verification index of the linear hardness value prediction model.
[0066] Table 2 Prediction accuracy verification index of linear sugar content prediction model
[0067]
[0068] Among them, the linear sugar content prediction model is y = 132.895x + 8.223, the RMSE (root mean square error) of the linear sugar content prediction model is 0.228, the MSE (mean square error) is 0.052, and the determination coefficient R 2 It is 0.86.
[0069] In some embodiments, the present solution directly detects the hardness and sugar content of strawberries by collecting spectral data of strawberries under different polarizations on-site, separating the spectral data and inputting them into a linear hardness value prediction model and a linear sugar content prediction model respectively.
[0070] Embodiment 2
[0071] Based on the same idea, refer to Figure 8 , the present application also proposes a non-destructive detection device for strawberry hardness and sugar content based on hyperspectral polarization technology, comprising:
[0072] An acquisition module is used to acquire strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample, collect spectral data of each strawberry sample under different polarizations, and separate the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component;
[0073] A first construction module is used to construct a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry;
[0074] The second building module is used to build a linear sugar content value prediction model according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
[0075] Embodiment 3
[0076] This embodiment also provides an electronic device, referring to Fig. 9 , comprises a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0077] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0078] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. For example, but not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0079] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0080] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the non-destructive detection methods for strawberry hardness and sugar content based on the hyperspectral polarization technology in the above embodiments.
[0081] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0082] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0083] The input / output device 408 is used to input or output information. In this embodiment, the input information may be strawberry hardness, sugar content, etc., and the output information may be a linear hardness value prediction model, a linear sugar content value prediction model, etc.
[0084] Optionally, in this embodiment, the processor 402 may be configured to perform the following steps through a computer program:
[0085] S101, obtaining strawberry samples of different degrees of maturity and the sugar content and hardness value of each strawberry sample, collecting spectral data of each strawberry sample under different polarizations, and separating the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component;
[0086] S102, constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry;
[0087] S103, constructing a linear Brix value prediction model according to the linear correlation between the diffuse reflection component and the Brix value of each strawberry sample, wherein the linear Brix value prediction model is used to predict the Brix value of the strawberry.
[0088] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0089] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0090] Embodiments of the present invention may be implemented by computer software that is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, at this point, it should be noted that, for example, Fig. 9 Any block of the logic flow in the program may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.
[0091] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0092] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology, characterized in that: The following steps are involved: Obtain strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample. First, collect the original spectral data of the strawberry without adding a polarizer, then collect the spectral data of each strawberry sample under different polarizations, and separate the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component. The separation of the specular reflection component and the diffuse reflection component of the spectral data of the strawberry sample is expressed by the following formula: Among them, i represents the i band, represents the normal reflectivity of band i, is the micro-angle at which the incident light radiates on the strawberry fruit. is the refraction angle of the incident light radiation on the strawberry fruit, which is equivalent to ; n is the refractive index of the fruit skin and is a constant of 1.5; Rp(i) is the polarized reflectivity. The premise for calculating Rs is to calculate R p and C, C is the reciprocal of the polarization degree of the mirror reflectivity of an ideal smooth plane, C is given by , n is calculated, where They are the light source zenith angle, observation zenith angle, light source azimuth angle and observation azimuth angle, respectively. 45°, is 15°, DOP is the degree of polarization, which represents the ratio between the polarization component Rp and the total reflectance R. DOP is deduced from the four Stokes parameters I, Q, U and V, while parameter V is ignored in this case. Therefore, the Pickering method is used to calculate the values of I, Q and U. In the formula, I′x represents the polarization spectrum of strawberries when the relative angle of the polarizer is x°; Constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry; A linear sugar content value prediction model is constructed according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
2. The nondestructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In the step of "collecting spectral data of each strawberry sample under different polarizations", a spectrometer is used to collect spectral data of each strawberry sample under different polarizations under uniform lighting conditions, and the spectrometer is calibrated with a white board and the spectral reflectance is calculated each time the polarization angle is adjusted.
3. The nondestructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In the step of "separating the spectral data of each strawberry sample into a specular reflection component and a diffuse reflection component", the specular reflection separation formula is used to separate the spectral data of each strawberry sample in the near-infrared range of 700-1700.
4. The nondestructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In the step of "constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample", a linear hardness value prediction model is constructed according to the linear correlation between the average value of the specular reflection component of each strawberry sample in all bands and the hardness value of the corresponding strawberry sample.
5. The non-destructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In the step of "constructing a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample", a linear hardness value prediction model is constructed according to the linear correlation between the average value of the specular reflection component of each strawberry sample in the 1050nm and 1100nm bands and the hardness value of the corresponding strawberry sample.
6. The non-destructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In this scheme, in the step of "constructing a linear sugar content value prediction model according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample", the near-infrared difference vegetation index is used to calculate the sugar content-related band interval in which the diffuse reflection component has the highest correlation with the sugar content value, and a linear sugar content value prediction model is constructed according to the linear correlation between the diffuse reflection component of each strawberry sample in the sugar content-related band interval and the sugar content value of the corresponding strawberry sample.
7. The non-destructive detection method of strawberry hardness and sugar content based on hyperspectral polarization technology according to claim 1, characterized in that: In the step of "constructing a linear sugar content value prediction model according to the linear correlation between the diffuse reflectance component and the sugar content value of each strawberry sample", the normalized vegetation index of the diffuse reflectance component in the 1050nm and 1100nm bands was calculated, and the normalized vegetation index was linearly fitted with the corresponding sugar content value to obtain a linear sugar content value prediction model.
8. A non-destructive detection device for strawberry hardness and sugar content based on hyperspectral polarization technology, characterized in that: include: The acquisition module is used to obtain strawberry samples of different maturity and the sugar content and hardness value of each strawberry sample. First, the original spectral data of the strawberry is collected without adding a polarizer, and then the spectral data of each strawberry sample under different polarizations is collected, and the spectral data of each strawberry sample is separated into a specular reflection component and a diffuse reflection component. The separation of the specular reflection component and the diffuse reflection component of the spectral data of the strawberry sample is expressed by the following formula: Among them, i represents the i band, represents the normal reflectivity of band i, is the micro-angle at which the incident light radiates on the strawberry fruit. is the refraction angle of the incident light radiation on the strawberry fruit, which is equivalent to ; n is the refractive index of the fruit skin and is a constant of 1.5; Rp(i) is the polarized reflectivity. The premise for calculating Rs is to calculate R p and C, C is the reciprocal of the polarization degree of the mirror reflectivity of an ideal smooth plane, C is given by , n is calculated, where They are the light source zenith angle, observation zenith angle, light source azimuth angle and observation azimuth angle, respectively. 45°, is 15°, DOP is the degree of polarization, which represents the ratio between the polarization component Rp and the total reflectance R. DOP is deduced from the four Stokes parameters I, Q, U and V, while parameter V is ignored in this case. Therefore, the Pickering method is used to calculate the values of I, Q and U. In the formula, I′x represents the polarization spectrum of strawberries when the relative angle of the polarizer is x°; A first construction module is used to construct a linear hardness value prediction model according to the linear correlation between the specular reflection component and the hardness value of each strawberry sample, wherein the linear hardness value prediction model is used to predict the hardness value of the strawberry; The second building module is used to build a linear sugar content value prediction model according to the linear correlation between the diffuse reflection component and the sugar content value of each strawberry sample, and the linear sugar content value prediction model is used to predict the sugar content value of the strawberry.
9. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which includes a program code for controlling a process to execute a process, wherein the process includes a non-destructive detection method for strawberry hardness and sugar content based on hyperspectral polarization technology according to any one of claims 1 to 7.
