Light intensity correction method and system for real-time construction of surface model for quality safety detection of agricultural products in any form, and medium
By using adaptive multi-array sensor segmentation scanning and matrix operation to correct light intensity, the problem of uneven spectral signals on irregular agricultural product surfaces was solved, achieving high-precision light intensity correction and improved accuracy in quantitative analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-04-03
AI Technical Summary
Irregular surface morphology of agricultural products leads to non-uniform spectral signals, which are difficult to accurately correct, affecting the stability and complexity of detection data. Existing technologies are unable to effectively describe and correct this irregularity.
Adaptive multi-array sensors are used for segmented scanning to identify key change points, calculate curvature, construct a piecewise fitting model, correct light intensity through matrix operations, and quantify uncertainty using Monte Carlo integration and Bayesian inference.
It achieves high-precision light intensity correction on the surface of irregular agricultural products, significantly improves the optical signal-to-noise ratio, and enhances the accuracy and robustness of quantitative analysis.
Smart Images

Figure CN121783841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product testing, and mainly to a light intensity correction method, system, and medium for real-time modeling of irregular agricultural product surface morphology. Background Technology
[0002] In the agricultural sector, spectral analysis technology is widely used for the quality testing and evaluation of agricultural products. Especially when detecting the components, contaminant residues, and nutritional content of agricultural products, spectral analysis has gradually become an important analytical method due to its advantages of high efficiency, non-destructive nature, and precision.
[0003] However, agricultural products such as meat, fruits, and vegetables often have irregular surface morphologies. For example, pork surface morphology varies significantly, exhibiting marked differences and complexity. Its texture, unevenness, and thickness differ considerably depending on the cut and processing method. The acquisition of spectral signals is closely related to the surface morphology of agricultural products. Irregular surfaces can lead to uneven illumination, resulting in errors and deviations in the spectral signals. Moreover, this diversity in surface morphology makes it difficult to find a uniform morphological function for fitting in spectral analysis, and traditional mathematical models struggle to accurately describe and correct for this irregularity. These differences not only affect the stability of the spectral signals but also increase the complexity of the detection data, posing a significant challenge to the accurate analysis of pork quality. Summary of the Invention
[0004] In view of this, the first aspect of the present invention provides a method for real-time construction of surface models for quality and safety testing of agricultural products of arbitrary shapes, characterized by comprising the following steps: An adaptive multi-array sensor is used to segment and scan irregular agricultural products along the horizontal direction to obtain the vertical height and horizontal position of different points on each curve. Based on the vertical height and horizontal position of different points on the different curves, identify the key change points of the different curves; Calculate the curvature of the key change points of the different curves; Curve function fitting is performed on each waveband based on the curvature; The fitting functions of each band are organized to form a piecewise fitting model composed of multiple sub-functions, which is used to describe the overall shape of the original irregular curve. By utilizing the light intensity in each dot array of the adaptive multi-array sensor, the actual reflected light intensity is calculated through matrix operations, and the light intensity of irregular agricultural products is corrected.
[0005] Specifically, the adaptive multi-array sensor is composed of It consists of several independent squares, each containing a light intensity receiver and four distance sensors, with a size of [missing information]. ; Each light intensity receiving sensor unit is labeled as , in ; The light intensity receiving sensor probe is connected to the conduit via a universal joint to enable free rotation; the distance measuring sensor is distributed around the probe, can rotate freely, and emits laser pulses at its front end to measure distance and achieve automatic adjustment; The light intensity receiving sensor transmits the received signal to the computer through a conduit.
[0006] Specifically, when performing a comprehensive scan of the surface of agricultural products, the sensor simultaneously acquires three-dimensional data of the agricultural product surface and an initial light intensity matrix.
[0007] Specifically, the key change points of the different curves identified include: Divide the curve into different intervals to identify regions where the curve shape changes significantly, including local extrema or locations where the curvature changes significantly.
[0008] Specifically, dividing the curve into different intervals and identifying regions where the curve shape changes significantly, including local extrema or locations of significant curvature changes, includes the following steps: Dynamically segment the surface of agricultural products into Different regions; Use a function to divide each region It means that, among them For regional indexes,
[0009] Each segmented region It is considered as a surface composed of multiple interpolated and fitted curves stacked together; For each curve, key change points are identified, and the curve is divided into n bands based on these key points; Within each band, an appropriate function type is selected, and the shape of the curve within that band is fitted to obtain a piecewise function. ,in It indicates the planar position of the surface of agricultural products.
[0010] Specifically, the curvature of the key change points of the different curves is the local curvature, and the calculation method is as follows: ; in, Indicates the analytical scale.
[0011] Specifically, the step of calculating the actual reflected light intensity using matrix operations on the light intensity in each dot matrix of the adaptive multi-array sensor includes the following steps: Assume the diffuse reflection intensity at any point on the surface is Simulate the anisotropic reflection characteristics of irregular agricultural product surfaces: ; in, :sensor At surface points The intensity of reflected light received at the location; Surface point The ideal diffuse reflection intensity; The angle between the incident ray and the surface normal vector; : The distance from the light source to a point on the surface; and These are the diffuse reflection and specular reflection coefficients, respectively. It is a Fresnel term. It is a geometric occlusion term. It is the micro-surface distribution function; and These are the angle of incidence and the angle of exit; Visibility function, i.e., surface point For sensors Visibility; Subsurface scattering term; Surface normal vector and half-length vector Specifically, it includes: Determine the origin of the ray and direction V; Among them, the starting point For surface points ; Direction V is from Pointing sensor , unit vector; Constructing Rays Define the ray equation: ; Perform a ray-surface intersection test: determine the ray intersection. Does it intersect with other parts of the surface of the agricultural product? Determine visibility: If the ray Intersecting with other parts of the surface, , indicates invisible; otherwise, , indicates that it is visible; The total light intensity was calculated using Monte Carlo integration: ; in: This refers to the number of samples. These are the coordinates of the sampling point; Light intensity calculated for the Cook-Torrance reflection model; The importance sampling probability density function is proportional to the distribution of reflected light intensity. Construct the comprehensive optical transmission matrix equation: ; in, It is the optical transmission coefficient. It is a bias term for ambient light and system error.
[0012] Specifically, the light intensity correction for irregular agricultural products includes the following steps: Multi-objective optimization: Transforming the correction problem into a multi-objective optimization problem: ; in: Minimize reconstruction error; Smoothness constraints of the solution (L is the Laplace operator, (as weight); Sparsity constraints of solutions As weight; Uncertainty Quantification: A Bayesian inference-based uncertainty quantification method is employed to provide a confidence interval for the light intensity estimate at each point. .
[0013] Secondly, a light intensity correction system for real-time surface model construction in arbitrary-form agricultural product quality and safety testing is provided, comprising the following modules: The scanning module is configured to use an adaptive multi-array sensor to segment and scan irregular agricultural products along the horizontal direction, and to obtain the vertical height and horizontal position of different points on each curve. The adaptive multi-array sensor is composed of It consists of several independent squares, each containing a light intensity receiver and four distance sensors, with a size of [missing information]. ; Each light intensity receiving sensor unit is labeled as , in ; The probe of the light intensity receiving sensor is connected to the conduit via a universal joint to enable free rotation; the distance measuring sensor is distributed around the probe, can rotate freely, and emits laser pulses at its front end to measure distance and achieve automatic adjustment. The fitting module is configured to identify key change points of each curve based on the vertical height and horizontal position of different points on each curve. Calculate the curvature at each key point of change; Based on the curvature, a curve function is fitted to each band; The fitting functions of each band are integrated to form a piecewise fitting model composed of multiple sub-functions to describe the overall shape of the original irregular curve. The correction module is configured to use the light intensity of each point array in the adaptive multi-array sensor to calculate the actual reflected light intensity through matrix operations, and to correct the light intensity of irregular agricultural products.
[0014] Specifically, the system identifies key change points in different curves, including: Divide the curve into different intervals to identify regions where the curve shape changes significantly, including local extrema or locations where the curvature changes significantly.
[0015] Specifically, the system divides the curve into different intervals and identifies regions where the curve shape changes significantly, including local extrema or locations with significant changes in curvature. This includes the following steps: Dynamically segment the surface of agricultural products into Different regions; Use a function to divide each region It means that, among them For regional indexes, ; Each segmented region It is considered as a surface composed of multiple interpolated and fitted curves stacked together; For each curve, key change points are identified, and the curve is divided into sections based on these key points. n One band; Within each band, an appropriate function type is selected, and the shape of the curve within that band is fitted to obtain a piecewise function. ,in It indicates the planar position of the surface of agricultural products.
[0016] Specifically, the system calculates the curvature of key change points of the different curves as local curvature, and the calculation method is as follows: ;
[0017] in, Indicates the analytical scale.
[0018] Specifically, the system calculates the actual reflected light intensity using matrix operations on the light intensity in each dot matrix of the adaptive multi-array sensor, including the following steps: Assume the diffuse reflection intensity at any point on the surface is Simulate the anisotropic reflection characteristics of irregular agricultural product surfaces: ; in, :sensor At surface points The intensity of reflected light received at the location; Surface point The ideal diffuse reflection intensity; The angle between the incident ray and the surface normal vector; The distance from the light source to a point on the surface; and These are the diffuse reflection and specular reflection coefficients, respectively. It is a Fresnel term. It is a geometric occlusion term. It is the micro-surface distribution function; and These are the angle of incidence and the angle of exit; Visibility function, i.e., surface point For sensors Visibility; Subsurface scattering term; Surface normal vector and half-length vector Specifically, it includes: Determine the origin of the ray and direction V; Among them, the starting point For surface points ; Direction V is from Pointing sensor , unit vector; Constructing Rays Define the ray equation: ; Perform a ray-surface intersection test: determine the ray intersection. Does it intersect with other parts of the surface of the agricultural product? Determine visibility: If the ray Intersecting with other parts of the surface, , indicates invisible; otherwise, , indicates that it is visible; The total light intensity was calculated using Monte Carlo integration: ; in: This refers to the number of samples. These are the coordinates of the sampling point; Light intensity calculated for the Cook-Torrance reflection model; The importance sampling probability density function is proportional to the distribution of reflected light intensity. Construct the comprehensive optical transmission matrix equation: ; in, It is the optical transmission coefficient. It is a bias term for ambient light and system error.
[0019] Specifically, the system corrects the light intensity of irregular agricultural products by including the following steps: Multi-objective optimization: Transforming the correction problem into a multi-objective optimization problem: ; in: Minimize reconstruction error; Smoothness constraints of the solution (L is the Laplace operator, (as weight); Sparsity constraints of solutions As weight; Uncertainty Quantification: A Bayesian inference-based uncertainty quantification method is employed to provide a confidence interval for the light intensity estimate at each point. .
[0020] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods.
[0021] The beneficial effects of this invention are: This invention uses real-time acquired parameter points of pork morphology to obtain the curvature and height of the target correction point for subsequent spectral correction. This method has good versatility and can be extended to different types of irregularly shaped agricultural products, such as fruits and root vegetables, achieving high-precision correction of the surface spectra of agricultural products with diverse shapes. Based on the proposed light intensity correction method for modeling the surface morphology of irregular agricultural products, the surface model of the target agricultural product can be reconstructed in real time, thereby accurately restoring the optical path difference and reflection characteristics of incident light at different positions on the curved surface. By performing morphological feature-based light intensity compensation and scattering correction on the acquired original spectral signals, spectral distortion caused by changes in surface curvature is effectively suppressed, significantly improving the signal-to-noise ratio of the optical signal, and thus enhancing the prediction accuracy and robustness of the quantitative analysis model. Attached Figure Description
[0022] The present invention includes the following figures: Figure 1 This is a schematic diagram of a light intensity receiving sensor and a ranging sensor. Figure 2 This is a schematic diagram of a sensor array; Figure 3 This is a schematic diagram of sensor connections; where 1 is a light intensity receiving sensor; 2 is a distance measuring sensor; 4 is a conduit; and 5 is a computer.
[0023] Figure 4 The image shows a comparison of light intensity before and after correction. (a) is a lean meat sample and (b) is a fat sample. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0025] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0026] The purpose of this invention is to provide a light intensity correction method for real-time modeling of the surface morphology of irregular agricultural products. Taking pork as an example, the curvature and height of the target correction point are obtained using parameter points of the pork morphology acquired in real time, which are then used for subsequent spectral correction. The proposed method is also applicable to other types of irregular agricultural products.
[0027] The specific implementation method is as follows: First, the irregular agricultural products to be tested or corrected are segmented and scanned along the horizontal direction, cutting them from a planar shape into multiple curves, and obtaining the vertical height and horizontal coordinates at different positions on each curve.
[0028] This invention employs an adaptive multi-array sensor structure, which consists of... It consists of 10 independent square units, each unit having a size of 1. Each grid cell contains one light intensity receiver and four distance sensors. The light intensity receiver's probe is connected to the conduit via a universal joint, allowing for free rotation. The distance sensors, distributed around the probe, also have free rotation capabilities. Their front ends measure distance by emitting laser pulses and automatically adjust. The specific structure is as follows... Figure 1 As shown.
[0029] Each light intensity receiving sensor unit is labeled as ,in The overall layout of the adaptive multi-array sensor is as follows: Figure 2 As shown in the diagram. The light intensity receiving sensor 1 transmits the received signal to the computer 5 via the conduit 4 for processing. A schematic diagram of the signal transmission is shown below. Figure 3 As shown.
[0030] Because differences in vertical height at different locations cause variations in curvature, it is necessary to calculate the curvature of the point to be corrected, thereby freely dividing the curve into multiple intervals. When dealing with irregular curves, key points where the curve shape changes significantly are identified, such as local extrema or locations where curvature changes markedly. Based on these key points, the curve is divided into several bands, with relatively consistent curve variation patterns within each band.
[0031] For each band, an appropriate function type (such as linear, quadratic, or exponential functions) is selected for fitting, and the function parameters are precisely adjusted using the least squares method or other optimization algorithms to achieve the optimal fitting effect. Error analysis is required during this process. If the fitting effect for a certain band is not ideal, the segmentation points can be readjusted or a more suitable function form can be selected. Finally, the fitting functions for each band are integrated to construct a piecewise fitting model composed of multiple sub-functions to accurately describe the overall shape of the original irregular curve. The specific steps include the following: The surface of agricultural products is dynamically divided into M different regions; Use a function to divide each region It means that, among them For regional indexes, ; Each segmented region It is considered as a surface composed of multiple interpolated and fitted curves stacked together; For each curve, key change points are identified, and the curve is divided into sections based on these key points. n One band; Within each band, an appropriate function type is selected, and the shape of the curve within that band is fitted to obtain a piecewise function. in It indicates the planar position of the surface of agricultural products.
[0032] The local curvature at key points of change for different curves is calculated using the following method: ; in, Indicates the analytical scale.
[0033] Subsequently, using the light intensity data from each dot matrix, the actual intensity of the reflected light is calculated through matrix operations, thereby correcting the light intensity on the irregular agricultural product surface. The light intensity loss occurs due to non-specular reflection of incident light on the uneven surface. This is because the irregular surface causes scattering of the incident light at different locations, dispersing the light energy in multiple directions rather than concentrating it back to the incident point. This scattering effect reduces the actual intensity of the reflected light received at the incident point.
[0034] The specific implementation method is as follows: Assume the diffuse reflection intensity at any point on the surface is Simulate the anisotropic reflection characteristics of irregular agricultural product surfaces: ; in, :sensor At surface points The intensity of reflected light received at the location; Surface point The ideal diffuse reflection intensity; The angle between the incident ray and the surface normal vector; : The distance from the light source to a point on the surface; and These are the diffuse reflection and specular reflection coefficients, respectively. It is a Fresnel term. It is a geometric occlusion term. It is the micro-surface distribution function; and These are the angle of incidence and the angle of exit; Visibility function, i.e., surface point For sensors Visibility; Subsurface scattering term; Surface normal vector and half-length vector Specifically, it includes: Determine the origin of the ray and direction V; Among them, the starting point For surface points ; Direction V is from Pointing sensor , unit vector; Constructing Rays Define the ray equation: ; Ray-to-surface intersection test: Determining the intersection of rays Does it intersect with other parts of the surface of the agricultural product? Determine visibility: If the ray Intersecting with other parts of the surface, , indicates invisible; otherwise, , indicates that it is visible; The total light intensity was calculated using Monte Carlo integration: ; in: This refers to the number of samples. These are the coordinates of the sampling point; Light intensity calculated for the Cook-Torrance reflection model; The importance sampling probability density function is proportional to the distribution of reflected light intensity. Construct the comprehensive optical transmission matrix equation: ; in, It is the optical transmission coefficient. It is a bias term for ambient light and system error.
[0035] Through the above embodiments, such as Figure 4 As shown in the figure, to verify the effectiveness of the correction method proposed in this invention, five representative sample points from both lean meat and fat samples were selected for testing and analysis. It is clearly visible from the figure that the light intensity values of each sample point were significantly improved after correction. This result fully demonstrates that the correction method adopted in this invention has good adaptability and reliability in practical applications, further proving the outstanding technical advantages and practical value of this invention in the field of agricultural testing.
[0036] Based on the same design concept, this invention also proposes an embodiment of a light intensity correction system for real-time construction of surface models for quality and safety testing of agricultural products of arbitrary shapes, which consists of the following modules: The scanning module is configured to use an adaptive multi-array sensor to segment and scan irregular agricultural products along the horizontal direction, and to obtain the vertical height and horizontal position of different points on each curve. The adaptive multi-array sensor is composed of It consists of several independent squares, each containing a light intensity receiver and four distance sensors, with a size of [missing information]. ; Each light intensity receiving sensor unit is labeled as , in ; The probe of the light intensity receiving sensor is connected to the conduit via a universal joint to enable free rotation; the distance measuring sensor is distributed around the probe, can rotate freely, and emits laser pulses at its front end to measure distance and achieve automatic adjustment. The fitting module is configured to identify key change points of each curve based on the vertical height and horizontal position of different points on each curve. Calculate the curvature at each key point of change; Based on the curvature, a curve function is fitted to each band; The fitting functions of each band are integrated to form a piecewise fitting model composed of multiple sub-functions to describe the overall shape of the original irregular curve. The correction module is configured to use the light intensity of each point array in the adaptive multi-array sensor to calculate the actual reflected light intensity through matrix operations, and to correct the light intensity of irregular agricultural products.
[0037] It should be noted that any process or method description in the embodiments can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which the embodiments of the invention pertain.
[0038] It should be noted that the logic and / or steps in the embodiments, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0039] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0040] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0041] Furthermore, in the embodiments of the present invention, the functional modules can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0042] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0043] The above embodiments have provided a detailed description of the technical solution of the present invention. Obviously, the present invention is not limited to the described embodiments. Based on the embodiments of the present invention, those skilled in the art can make various modifications, but any modifications that are equivalent to or similar to the present invention fall within the scope of protection of the present invention.
[0044] The contents not described in detail in this specification are existing technologies known to those skilled in the art.
Claims
1. A method for real-time construction of surface models for quality and safety testing of agricultural products of arbitrary shapes, characterized in that, Includes the following steps: An adaptive multi-array sensor is used to segment and scan irregular agricultural products along the horizontal direction to obtain the vertical height and horizontal position of different points on each curve. Based on the vertical height and horizontal position of different points on the different curves, identify the key change points of the different curves; Calculate the curvature of the key change points of the different curves; Curve function fitting is performed on each waveband based on the curvature; The fitting functions of each band are organized to form a piecewise fitting model composed of multiple sub-functions, which is used to describe the overall shape of the original irregular curve. By utilizing the light intensity in each dot array of the adaptive multi-array sensor, the actual reflected light intensity is calculated through matrix operations, and the light intensity of irregular agricultural products is corrected.
2. The method according to claim 1, characterized in that, The adaptive multi-array sensor is composed of It consists of several independent squares, each containing a light intensity receiver and four distance sensors, with a size of [missing information]. ; Each light intensity receiving sensor unit is labeled as , in ; The light intensity receiving sensor probe is connected to the conduit via a universal joint to enable free rotation; the distance measuring sensor is distributed around the probe, can rotate freely, and emits laser pulses at its front end to measure distance and achieve automatic adjustment; The light intensity receiving sensor transmits the received signal to the computer through a conduit.
3. The method according to claim 2, characterized in that, When performing a full scan of the surface of agricultural products, the sensor simultaneously acquires three-dimensional data of the agricultural product surface and an initial light intensity matrix.
4. The method according to claim 1, characterized in that, The key change points for identifying different curves include: Divide the curve into different intervals to identify regions where the curve shape changes significantly, including local extrema or locations where the curvature changes significantly.
5. The method according to claim 4, characterized in that, The process of dividing the curve into different intervals and identifying regions where the curve shape changes significantly, including local extrema or locations of significant curvature changes, specifically includes the following steps: Dynamically segment the surface of agricultural products into Different regions; Use a function to divide each region. It means that, among them For regional indexes, ; Each segmented region It is considered as a surface composed of multiple interpolated and fitted curves stacked together; For each curve, key change points are identified, and the curve is divided into sections based on these key points. n One band; Within each band, an appropriate function type is selected, and the shape of the curve within that band is fitted to obtain a piecewise function. ,in It indicates the planar position of the surface of agricultural products.
6. The method according to claim 5, characterized in that, The curvature of the key change points of the different curves is the local curvature, and the calculation method is as follows: ; in, Indicates the analytical scale.
7. The method according to claim 6, characterized in that, The step of calculating the actual reflected light intensity using matrix operations on the light intensity of each dot matrix in the adaptive multi-array sensor specifically includes the following steps: Assume the diffuse reflection intensity at any point on the surface is Simulate the anisotropic reflection characteristics of irregular agricultural product surfaces: ; in, :sensor At surface points The intensity of the reflected light received at that location; Surface point The ideal diffuse reflection intensity; The angle between the incident ray and the surface normal vector; : The distance from the light source to a point on the surface; and These are the diffuse reflection and specular reflection coefficients, respectively. It is a Fresnel term. It is a geometric occlusion term. It is the micro-surface distribution function; and These are the angle of incidence and the angle of exit; Visibility function, i.e., surface point For sensors Visibility; Subsurface scattering term; Surface normal vector and half-length vector Specifically, it includes: Determine the origin of the ray and direction V; Among them, the starting point For surface points ; Direction V is from Pointing sensor , unit vector; Constructing rays Define the ray equation: ; Perform a ray-surface intersection test: determine the ray intersection. Does it intersect with other parts of the surface of the agricultural product? Determine visibility: If the ray Intersecting with other parts of the surface, , indicates invisible; otherwise, , indicates that it is visible; The total light intensity was calculated using Monte Carlo integration: ; in: This refers to the number of samples. These are the coordinates of the sampling point; Light intensity calculated for the Cook-Torrance reflection model; The importance sampling probability density function is proportional to the distribution of reflected light intensity. Construct the comprehensive optical transmission matrix equation: ; in, It is the optical transmission coefficient. It is a bias term for ambient light and system error.
8. The method according to claim 7, characterized in that, The process of correcting the light intensity of irregular agricultural products specifically includes the following steps: Multi-objective optimization: Transforming the correction problem into a multi-objective optimization problem: ; in: Minimize reconstruction error; Smoothness constraints of the solution (L is the Laplace operator, (as weight); Sparsity constraints of solutions As weight; Uncertainty Quantification: A Bayesian inference-based uncertainty quantification method is employed to provide a confidence interval for the light intensity estimate at each point. 。 9. A light intensity correction system for real-time construction of surface models for quality and safety testing of agricultural products of arbitrary shapes, characterized in that, Includes the following modules: The scanning module is configured to use an adaptive multi-array sensor to segment and scan irregular agricultural products along the horizontal direction, and to obtain the vertical height and horizontal position of different points on each curve. The adaptive multi-array sensor is composed of It consists of several independent squares, each containing a light intensity receiver and four distance sensors, with a size of [missing information]. ; Each light intensity receiving sensor unit is labeled as , in ; The probe of the light intensity receiving sensor is connected to the conduit via a universal joint to enable free rotation; the distance measuring sensor is distributed around the probe, can rotate freely, and emits laser pulses at its front end to measure distance and achieve automatic adjustment. The fitting module is configured to identify key change points of each curve based on the vertical height and horizontal position of different points on each curve. Calculate the curvature at each key point of change; Based on the curvature, a curve function is fitted to each band; The fitting functions of each band are integrated to form a piecewise fitting model composed of multiple sub-functions to describe the overall shape of the original irregular curve. The correction module is configured to use the light intensity of each point array in the adaptive multi-array sensor to calculate the actual reflected light intensity through matrix operations, and to correct the light intensity of irregular agricultural products.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any of claims 1-8.