Quick-frozen vegetable sorting method and equipment

By aligning and compressing the optical data and dielectric spectrum data of quick-frozen vegetables in time and space, ice crystal interference is eliminated, and comprehensive identification of surface and internal defects of quick-frozen vegetables is achieved, which improves sorting accuracy and solves the problem of inaccurate optical detection caused by ice crystal interference.

CN120644395APending Publication Date: 2025-09-16JIANGXI FUDI FOOD CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511120172.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

During the sorting process of quick-frozen vegetables, ice crystal interference causes inaccurate optical detection, and conventional optical detection methods have difficulty identifying internal defects, resulting in low sorting accuracy.

Method used

By obtaining the initial optical data and initial dielectric spectrum data of quick-frozen vegetables, performing time-space alignment and compression, eliminating ice crystal interference, using dielectric spectrum data to repair optical data, and combining dielectric spectrum and optical data to determine defect probability, comprehensive identification of surface and internal defects can be achieved.

Benefits of technology

It significantly improves the accuracy of quick-frozen vegetable sorting, reduces the misjudgment rate and missed judgment rate, and provides a more reliable basis for defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120644395A_ABST
    Figure CN120644395A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of quick-frozen vegetable sorting, and particularly relates to a quick-frozen vegetable sorting method and device.The method comprises the steps that initial optical data and initial dielectric spectrum data of quick-frozen vegetables are obtained, space-time alignment and compression are conducted on the initial optical data and the initial dielectric spectrum data, and the initial optical data and the initial dielectric spectrum data are obtained; obtaining first optical data and first dielectric spectrum data; based on the first dielectric spectrum data, performing ice crystal repair on the first optical data to obtain second optical data; wherein the ice crystal repairing is used for eliminating the influence of ice crystal interference on optical data; determining the defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data; and sorting the quick-frozen vegetables according to the defect probability. According to the method, the problem of image distortion caused by ice crystal interference is solved, defect detection with higher precision is realized, the sorting precision of the quick-frozen vegetables is remarkably improved, and the misjudgment rate and the missed judgment rate are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of quick-frozen vegetable sorting, and in particular relates to a method and equipment for sorting quick-frozen vegetables. Background Art

[0002] Quick-frozen vegetables are processed foods made by rapidly freezing fresh vegetables to below -18°C in the shortest possible time, preserving their nutrients, taste, and color. The process of sorting quick-frozen vegetables primarily involves physical screening, quality control, and classification of the raw vegetables before freezing, ensuring consistent quality and safety of the final product.

[0003] In existing technology, during the sorting of quick-frozen vegetables, an irregular layer of ice crystals forms on the surface of the vegetables due to the freezing process. During optical inspection, the reflection of these ice crystals reduces image clarity, resulting in bright spots. This reflection interference can lead to misidentification or omission of defects (such as mold and spoilage) in the quick-frozen vegetables, reducing sorting accuracy.

[0004] Conventional optical detection methods (such as visible light, RGB cameras, etc.) can usually only obtain information on the surface of vegetables, and have limited ability to detect changes in internal structure, making it difficult to detect internal defects, which in turn causes serious missed detections in actual sorting.

[0005] In summary, in the process of sorting quick-frozen vegetables, there is a problem of inaccurate sorting due to ice crystal interference and defect detection limitations. Summary of the Invention

[0006] The embodiments of the present application provide a method and apparatus for sorting quick-frozen vegetables, which can solve the problem of inaccurate sorting caused by ice crystal interference and defect detection limitations during the process of sorting quick-frozen vegetables in the related art.

[0007] In a first aspect, an embodiment of the present application provides a method for sorting quick-frozen vegetables, comprising: Acquiring initial optical data and initial dielectric spectrum data of the quick-frozen vegetables, and performing spatiotemporal alignment and compression on the initial optical data and the initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data; wherein the initial optical data includes a visible light and near-infrared dual-band image, and the initial dielectric spectrum data is obtained by collecting complex dielectric constants at multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies; Based on the first dielectric spectrum data, performing ice crystal repair on the first optical data to obtain second optical data; wherein the ice crystal repair is used to eliminate the influence of ice crystal interference on the optical data; determining a defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data; The quick-frozen vegetables are sorted according to the defect probability.

[0008] The above technical solutions in the embodiments of the present application have at least the following technical effects: The quick-frozen vegetable sorting method provided in this application first obtains initial optical data (visible light and near-infrared dual-band images) and initial dielectric spectrum data (obtained by collecting the complex dielectric constant of multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies) of the quick-frozen vegetables, and then performs spatiotemporal alignment and compression on the initial optical data and initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data. Then, based on the first dielectric spectrum data, ice crystal repair is performed on the first optical data to obtain second optical data, which helps eliminate the impact of ice crystal interference on the optical data. Then, based on the first dielectric spectrum data and the second optical data, the defect probability of the quick-frozen vegetables is determined. Finally, the quick-frozen vegetables are sorted based on the defect probability. This method can effectively identify and remove the optical interference caused by ice crystals on the image, improve image clarity and restore texture details, significantly reduce false defect recognition caused by ice crystals, retain the characteristics of true defects, and provide a more reliable basis for defect identification. By combining cross-modal data (first dielectric spectrum data and second optical data), this method can achieve comprehensive identification of surface and internal defects of quick-frozen vegetables, improving detection coverage. This method overcomes the image distortion problem caused by ice crystal interference and achieves higher-precision defect detection. It also significantly improves the sorting accuracy of quick-frozen vegetables and reduces the misjudgment rate and missed judgment rate.

[0009] In a second aspect, an embodiment of the present application provides a quick-frozen vegetable sorting device, comprising: an acquisition unit, configured to acquire initial optical data and initial dielectric spectrum data of the quick-frozen vegetables, and perform spatiotemporal alignment and compression on the initial optical data and the initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data; wherein the initial optical data includes a visible light and near-infrared dual-band image, and the initial dielectric spectrum data is obtained by collecting complex dielectric constants at multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies; a repair unit, configured to perform ice crystal repair on the first optical data based on the first dielectric spectrum data to obtain second optical data; wherein the ice crystal repair is used to eliminate the influence of ice crystal interference on the optical data; a defect detection unit, configured to determine a defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data; The sorting unit is used to sort the quick-frozen vegetables according to the defect probability.

[0010] In a third aspect, an embodiment of the present application provides a quick-frozen vegetable sorting device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the embodiments of the first aspect when executing the computer program.

[0011] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 This is a schematic flow chart of a quick-frozen vegetable sorting method provided in one embodiment of the present application; Figure 2 This is a schematic diagram of the implementation process of synchronously collecting initial optical data and initial dielectric spectrum data in the quick-frozen vegetable sorting method provided in one embodiment of the present application; Figure 3 This is a schematic diagram of the implementation process of image restoration and image enhancement in the quick-frozen vegetable sorting method provided in one embodiment of the present application; Figure 4 This is a schematic structural diagram of a quick-frozen vegetable sorting device provided in an embodiment of the present application; Figure 5 It is a structural schematic diagram of the quick-frozen vegetable sorting equipment provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0015] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0016] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0017] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0018] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0019] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0020] In the related art, during the sorting process of quick-frozen vegetables, an irregular layer of ice crystals is formed on the surface of the vegetables due to the freezing process. These ice crystals have a strong reflective and scattering effect on external light. In optical detection, ice crystal reflection will reduce imaging clarity, reduce image contrast, and make edge recognition difficult. Reflection causes bright spots that may be mistaken for mold, decay, or foreign matter. Machine vision algorithms rely on surface texture, color difference, or spectral features for recognition, and ice crystals mask this information, making it difficult for the algorithm to correctly extract effective features. Therefore, ice crystal interference can cause defect misjudgment or missed detection, thereby reducing sorting accuracy, especially in the cold chain production line and in the detection of quick-frozen vegetables that have not been thawed.

[0021] Conventional optical inspection methods (such as visible light, near-infrared imaging, RGB cameras, or simple multispectral devices) can typically only obtain information about the surface of vegetables and have limited ability to detect changes in internal structure. For certain vegetables with a harder texture and denser structure (such as carrots, potatoes, and yams), these inspection methods have significant limitations. For example, the propagation depth of visible and near-infrared light in such vegetables is limited, making it difficult to identify internal cavities, cracks, or tissue necrosis. Vegetables that appear intact on the surface may already be severely rotten inside, which optical inspection cannot detect. This can lead to misjudgment as qualified products and entry into downstream processes, reducing the quality of the final product. For example, defects such as black heart disease, cavities, and early stages of mold often occur in the core area of ​​the vegetable and have no obvious characteristics in appearance, making them difficult to detect using surface imaging-based inspection methods, which in turn leads to serious missed detections during actual sorting.

[0022] To address the aforementioned issues, embodiments of the present application provide a method and apparatus for sorting quick-frozen vegetables. This method first obtains initial optical data (visible light and near-infrared dual-band images) and initial dielectric spectrum data (obtained by collecting the complex dielectric constants of multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies). These data are then spatially and temporally aligned and compressed to obtain first optical data and first dielectric spectrum data. Based on the first dielectric spectrum data, ice crystal repair is then performed on the first optical data to obtain second optical data, which helps eliminate the effects of ice crystal interference on the optical data. The defect probability of the quick-frozen vegetables is then determined based on the first dielectric spectrum data and the second optical data. Finally, the quick-frozen vegetables are sorted based on the defect probability. This method effectively identifies and removes the optical interference caused by ice crystals on images, improving image clarity and restoring texture detail. It can significantly reduce false defect recognition caused by ice crystals, preserve true defect characteristics, and provide a more reliable basis for defect identification. By combining cross-modal data (first dielectric spectroscopy data and second optical data), this method can comprehensively identify surface and internal defects in quick-frozen vegetables, improving detection coverage. This method overcomes image distortion caused by ice crystal interference and achieves higher-precision defect detection. It also significantly improves the sorting accuracy of quick-frozen vegetables and reduces both false positives and missed detections.

[0023] The quick-frozen vegetable sorting method provided in the embodiment of the present application can be applied to a quick-frozen vegetable sorting device. In this case, the quick-frozen vegetable sorting device is the executor of the quick-frozen vegetable sorting method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the quick-frozen vegetable sorting device.

[0024] Illustratively, the quick-frozen vegetable sorting equipment may include an image acquisition device, a dielectric spectrum measurement device, and a control device. The image acquisition device is a device that can capture visible light and near-infrared dual-band images of quick-frozen vegetables, and may include a multispectral industrial camera, a dual camera (RGB camera and NIR camera), a visible light and NIR combined wave camera, etc.; the dielectric spectrum measurement device is a device that can measure the complex dielectric constant of the surface of quick-frozen vegetables at multiple frequencies, and may include an impedance analyzer, a contact electrode probe (flat electrode or customized probe); the control device is a device that can control the image acquisition device and the dielectric spectrum measurement device and perform data processing, and may be a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a desktop computer, a smart large screen, a computer, a laptop computer, customer premises equipment (CPE) and / or other equipment used for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (PLMN).

[0025] In order to better understand the quick-frozen vegetable sorting method provided in the embodiment of the present application, the specific implementation process of the quick-frozen vegetable sorting method provided in the embodiment of the present application is exemplarily introduced below.

[0026] Figure 1 A schematic flow chart of a quick-frozen vegetable sorting method provided in an embodiment of the present application is shown. The quick-frozen vegetable sorting method includes: S100: Acquire initial optical data and initial dielectric spectrum data of the quick-frozen vegetables, and perform spatiotemporal alignment and compression on the initial optical data and initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data. The initial optical data includes a visible light and near-infrared dual-band image, and the initial dielectric spectrum data is obtained by collecting complex dielectric constants at multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies.

[0027] For example, a multispectral industrial camera can be used and adjusted to synchronously acquire visible light and near-infrared images, and high-resolution imaging of the surface and key areas of quick-frozen vegetables can be performed to obtain a complete dual-band (visible light band (approximately 400~700 nm) and near-infrared band (approximately 700~1000 nm)) image sequence. The optical axis calibration and spatial coordinate calibration of the visible light and near-infrared images can be performed so that the two band images correspond and are consistent in space, that is, the initial optical data has two-dimensional spatial resolution and band dimension.

[0028] Multiple fixed sampling points can be designed on the surface of quick-frozen vegetables (such as uniform grids or key area distribution). The dielectric parameters of each sampling point can be scanned within a set frequency range (1kHz~10MHz) using an electrode probe. The real and imaginary parts of the complex dielectric constant of each sampling point at multiple frequencies and the spatial coordinate information of each sampling point are recorded to facilitate subsequent alignment, which is the initial dielectric spectrum data.

[0029] In order to spatially align the optical data and dielectric spectrum data, the sampling point coordinates of the dielectric spectrum data (three-dimensional coordinates) can be spatially mapped to the pixel coordinates of the optical data (two-dimensional coordinates). The coordinate alignment can be completed using nearest neighbor interpolation, bilinear interpolation, or a calibration template-based method to form a set of image pixels and dielectric spectrum sampling points that correspond to each other in space. That is, the sampling point coordinates of the initial dielectric spectrum data are mapped to the pixel coordinates of the initial optical data.

[0030] In order to align the optical data and dielectric spectrum data in time, the initial optical data acquisition and initial dielectric spectrum data measurement can be completed in the same time window. For example, a conveyor belt with an encoder can be used. The encoder triggers a pulse signal every time it moves 1mm. This pulse signal is sent to a dual-channel synchronous acquisition card (such as the NI PXIe-6368) to achieve synchronous triggering of dielectric scanning and camera exposure. Channel 1 is used to control camera exposure (exposure time is less than or equal to 0.5ms), and channel 2 is used to trigger the probe to start scanning 5 frequency points (such as 1kHz, 100kHz, 1MHz, 5MHz, and 10MHz). Figure 2 As shown in the figure, it is also possible to perform later synchronization through timestamp recording. If there is a time difference, interpolation or time alignment algorithms (such as dynamic time warping (DTW)) can be introduced to correct it.

[0031] To reduce the computational burden of subsequent modeling and processing, the data obtained through the above steps can be compressed. Principal component analysis (PCA) and linear discriminant analysis (LDA) can be used to extract the primary spectral components from the initial optical data after the temporal and spatial alignment. Alternatively, deep learning methods (such as autoencoders) can be used to extract key image feature vectors from the initial optical data after the temporal and spatial alignment, ultimately generating spatially consistent, dimensionality-reduced primary optical data.

[0032] Redundant frequency points can be reduced through spectral dimensionality reduction (such as Fourier transform, time-frequency domain filtering, and frequency band screening), or dielectric features can be extracted from the initial dielectric spectrum data after spatiotemporal alignment using nonlinear dimensionality reduction methods such as canonical variate analysis (CCA) and t-SNE, ultimately obtaining the first dielectric spectrum data that corresponds to the image in space and is simplified in spectrum.

[0033] This step achieves efficient fusion and redundancy elimination of multimodal information, thereby generating first optical data and first dielectric spectrum data with structural correspondence, information complementarity, and dimensionality reduction, significantly enhancing the accuracy and stability of subsequent ice crystal interference identification and defect analysis, and laying a solid data foundation for improving the accuracy of quality inspection and intelligent sorting of quick-frozen vegetables.

[0034] In one possible implementation, S100, performing spatiotemporal alignment and compression on the initial optical data and the initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data, includes: The grid calibration target can be photographed by an image acquisition device and combined with the spatial scanning of the electric probe to establish a mapping relationship from the three-dimensional coordinate system of the electrode probe to the image pixel coordinate system. That is, the grid calibration target (such as a checkerboard pattern, where the grid points are physical points of a known structure) can be photographed by an image acquisition device to obtain a target image. In the target image, the image pixel coordinates of the grid points can be obtained by image processing methods (such as corner detection in OpenCV). The electrode probe scans the same grid calibration target to obtain three-dimensional coordinates. The projection matrix between the three-dimensional coordinates and the pixel coordinates can be solved using methods such as least squares fitting, that is, , where the pixel coordinates are , the three-dimensional coordinates are .

[0035] S110 , extracting the three-dimensional coordinates corresponding to the initial dielectric spectrum data and the pixel coordinates of the initial optical data.

[0036] For example, if the electrode probe is installed at the end of a robotic arm, the current position information of the probe can be obtained through the forward kinematic model of the robotic arm; if the electrode probe is installed on a slide rail or a two-dimensional platform, the current position information can be obtained in real time through a position encoder or a stepper motor control system.

[0037] A 4×4 transformation matrix can be calculated in real time based on the current posture information through geometric transformation. According to the position of the probe sampling point in the probe's own coordinate system and the transformation matrix, the actual three-dimensional coordinates of each sampling point in the world coordinate system are calculated through matrix transformation, that is, ,in, represents the three-dimensional coordinates of the sampling points, represents the transformation matrix, Indicates the position of the probe sampling point in the probe's own coordinate system. It is determined when the probe structure is designed and is known and fixed. For example, the probe sampling point is located at the center of the probe end. In the probe's own local coordinate system, the position of the probe sampling point can be recorded as ,If there are multiple probes (such as multiple array probes), the position of each probe sampling point in the probe local coordinate system can be obtained based on the structural design.

[0038] The initial dielectric spectrum data and initial optical data already contain the corresponding three-dimensional coordinates (the corresponding three-dimensional coordinates are obtained according to the above method while measuring the dielectric spectrum) and pixel coordinates (which are already known when calculating the projection matrix). The three-dimensional coordinates can be directly extracted from the initial dielectric spectrum data, and the pixel coordinates can be directly extracted from the initial optical data.

[0039] S120 , mapping the three-dimensional coordinates of the initial dielectric spectrum data to the pixel coordinates of the initial optical data based on a projection matrix to obtain converted dielectric spectrum data. The projection matrix is ​​used to represent a mapping relationship between the three-dimensional coordinate system corresponding to the dielectric spectrum data and the pixel coordinate system of the optical data.

[0040] It can be understood that in order to align the initial dielectric spectrum data with the initial optical data, the three-dimensional coordinates corresponding to the initial dielectric spectrum data can be projected onto the two-dimensional plane of the initial optical data (initial optical image) using the projection matrix obtained by the above pre-calibration.

[0041] For example, the three-dimensional coordinates of each sampling point in the initial dielectric spectrum data can be Expressed as , the expression is in the form of homogeneous coordinates, which is convenient for projection transformation. Multiply by the projection matrix , get the homogeneous pixel coordinates on the image plane ,Right now The homogeneous coordinates can be normalized to standard two-dimensional pixel coordinates, that is , ,coordinate( , ) is the corresponding pixel position of the sampling point in the optical image. After completing the above projection for each sampling point, each data point in the initial dielectric spectrum data (i.e., a set of data on the complex dielectric constant at multiple frequencies for each sampling point) has a corresponding optical image pixel coordinate. Binding this with the original spectrum data forms pixel-aligned dielectric spectrum data, i.e., the converted dielectric spectrum data. Each sampling point has a set of complex dielectric constants at a range of frequencies (e.g., 1 kHz to 20 MHz) bound to the pixel coordinates.

[0042] This step enables the dielectric spectrum data with physical depth information to be accurately mapped and aligned to the two-dimensional pixel coordinates of the optical image, providing a spatial consistency basis for subsequent data fusion, ice crystal repair and defect assessment. It is a crucial alignment link in the entire sorting process.

[0043] S130 , performing lossless compression on the initial optical data to obtain first optical data.

[0044] For example, to reduce data volume and speed up subsequent processing without losing effective image information, lossless compression can be performed on the initial optical data. Options include PNG, JPEG2000 (lossless mode), WebP, or specialized industrial image compression algorithms. The initial optical data can be compressed in real time or batch processing on the image acquisition backend, outputting compressed first optical data. This first optical data retains all visual information from the original image while being significantly smaller in size, facilitating storage, transmission, and rapid decoding and analysis.

[0045] S140 , extracting key frequency point data from the converted dielectric spectrum data, and compressing the key frequency point data to obtain first dielectric spectrum data.

[0046] For example, based on previous spectral feature analysis or empirical research, key frequency points sensitive to internal structural differences, ice crystal interference, and defect identification in quick-frozen vegetables can be selected. For example, a 1MHz frequency is more sensitive to vegetable tissue density; a 5MHz frequency can reflect changes in vegetable moisture status; and a 10MHz frequency is more sensitive to ice crystal distribution and frostbite. The complex dielectric constants (real and imaginary parts) of the key frequency points are extracted from the converted dielectric spectrum data, thus forming the key frequency point data. This key frequency point data can be numerically quantized and compressed, preserving the number of significant bits and reducing floating-point representation redundancy. Vector encoding can also be used to compress the key frequency point data, such as by compressing features between multiple frequency points into a set of feature vectors based on PCA or sparse coding. Spatial redundancy can also be compressed, using differential encoding or block averaging if adjacent point data vary smoothly. The first dielectric spectrum data obtained through this compression is the dielectric spectrum data bound to each pixel in the image coordinate system, after frequency selection and feature compression. This data has a smaller dimension and more concentrated information, facilitating subsequent joint modeling with optical images.

[0047] Lossless compression of initial optical data and compression of key frequency data can improve the efficiency and stability of subsequent model operation while maximally retaining data validity, laying a solid data foundation for ice crystal repair and defect detection.

[0048] S200: Perform ice crystal repair on the first optical data based on the first dielectric spectrum data to obtain second optical data. The ice crystal repair is used to eliminate the influence of ice crystal interference on the optical data.

[0049] It's understandable that during optical imaging of quick-frozen vegetables, ice crystals on the surface and in shallow tissue layers strongly interfere with visible and near-infrared imaging through scattering, absorption, and refraction. This leads to image blur, reduced contrast, and distortion of structural edges, obscuring true tissue details and potential defects. Therefore, to improve image quality, it's possible to identify and repair areas of ice crystal interference in the first optical data (first optical image).

[0050] For example, frequency response features, such as the variation pattern of the real and imaginary dielectric components within a specific frequency band, can be extracted from the first dielectric spectrum data to construct a dielectric signature. The significant differences in dielectric response between ice crystals and vegetable tissue can be exploited to construct a discriminant model (such as a support vector machine (SVM), random forest, or threshold-based segmentation algorithm) to identify spatial regions containing ice crystals. The identified ice crystal regions can then be mapped to the corresponding first optical data (first optical image) to form an ice crystal mask, which can be used to guide the image restoration process.

[0051] Based on the ice crystal mask, the first optical data (first optical image) can be repaired using neighborhood pixel-based local reconstruction methods, such as interpolation repair (bilateral interpolation, spline interpolation), image inpainting, and convolutional neural network repair (such as U-Net or Image Inpainting models). During the repair process, the dielectric characteristics of the corresponding area can be used as constraints or auxiliary inputs to guide the model to restore optical characteristics that are more consistent with authentic vegetable tissue, avoiding oversmoothing or artificial structures. After repairing the visible light and near-infrared images separately, joint optimization algorithms (such as joint sparse representation and joint autoencoders) can be used to maintain spectral and structural consistency between the two bands. The result is high-quality optical image data after ice crystal repair, which is the second optical data, with clear texture, accurate edge contours, and realistic tissue reflectance characteristics.

[0052] Indicators such as image contrast, structural similarity index (SSIM), and peak signal-to-noise ratio (PSNR) can be used to quantitatively evaluate the restoration effect and verify whether the ice crystal interference is effectively eliminated.

[0053] This step not only significantly eliminates the interference of ice crystals on the optical image, but also greatly improves the clarity and reliability of the image while maintaining the original texture and structure of the vegetable tissue, providing high-quality image input guarantee for subsequent defect identification and intelligent sorting.

[0054] In one possible implementation, S200, performing ice crystal repair on the first optical data based on the first dielectric spectrum data to obtain second optical data, includes: S210 , calculating ice-water conductivity data of a plurality of sampling points according to the first dielectric spectrum data.

[0055] For example, a key frequency point sensitive to the water state (ice phase and liquid phase) can be selected from the first dielectric spectrum data, such as 10 MHz. At this frequency, the polarization response of ice is weak, while the conductivity of water is significantly different, which makes it easy to distinguish between ice and water states. The complex dielectric constant at the 10 MHz frequency point can be expressed as ,in, Indicates the sampling points, Indicates the The real part of the sampling points represents the energy storage capacity, Indicates the The imaginary part of each sampling point is related to the energy loss and reflects the conductive loss.

[0056] For each sampling point, the imaginary part can be extracted from the complex dielectric constant of the key frequency point to calculate the ice water conductivity of each sampling point, that is, ,in, Indicates the The ice water conductivity of the sampling points, Indicates the key frequency points (such as Hz (10MHz)), represents the dielectric constant of vacuum, 8.854× F / m.

[0057] Ice-water conductivity can characterize the ice-water mixing state or conductive properties at the sampling point, and can sensitively reflect the distribution characteristics of water in different states in quick-frozen vegetables, serving as an important physical basis for subsequent ice crystal analysis and defect identification.

[0058] S220, based on ice-water conductivity data of multiple sampling points, a continuous thermal map is generated using inverse distance weighted interpolation.

[0059] For example, the ice water conductivity data may include the pixel coordinates of the sampling points and the ice water conductivity, expressed as ,in, Indicates the The pixel coordinates of the sampling points, Indicates the number of all sampling points. In the pixel coordinate system, a two-dimensional interpolation grid (the same size as the first optical image, such as 512×512) can be constructed according to the ice water conductivity data of each sampling point. , assign an interpolated conductivity value to each grid pixel (interpolation point) for thermal map display, that is, ,in, Indicates interpolation points The conductivity value , Indicates interpolation points With the Sampling points The Euclidean distance between Represents the distance weight exponent (e.g., 2), where closer distances give greater weight. When interpolating, you can set an influence radius, using sampling points closer to the interpolation point than the influence radius to improve local response and computational efficiency.

[0060] The conductivity values ​​at all interpolated points can be mapped to color values. The color mapping can be set based on the value range (e.g., a blue-green-red gradient). This ultimately creates a two-dimensional heat map (continuous heat map) of ice-water conductivity, which visually reflects the spatial distribution of ice crystals, moisture, or frostbite areas on the vegetable surface. The continuous heat map is consistent in size with the first optical image, facilitating subsequent overlay display or registration.

[0061] This step realizes the transformation from discrete electrical measurement to image-level physical field reconstruction. Continuous thermal maps can be used for ice crystal area identification, temperature distribution inference, and subsequent image restoration and defect detection modeling.

[0062] S230: Based on the continuous heat map and the ice crystal threshold, determine the ice crystal covered area and generate a binary mask image, wherein the binary mask image includes ice crystal covered areas marked as 1 and non-ice crystal covered areas marked as 0.

[0063] For example, an ice crystal threshold can be set based on experimental data, material properties, or empirical knowledge to distinguish between ice-covered and non-ice-covered areas. Because ice crystal areas have low conductivity (pure ice has extremely low conductivity) and liquid water or tissue fluid areas have relatively high conductivity, areas below the ice crystal threshold can be considered ice-covered.

[0064] The conductivity value of each grid pixel in the continuous heat map can be compared to the ice crystal threshold pixel by pixel, or the threshold function in the image processing library can be used for batch operations. Regions with conductivity values ​​less than the ice crystal threshold are marked as 1 (ice crystal covered areas), and regions with conductivity values ​​greater than or equal to the ice crystal threshold are marked as 0 (non-ice crystal covered areas). A binary mask of the same size as the continuous heat map is generated, which can be used directly as a mask input in image inpainting or for subsequent defect analysis.

[0065] This step converts the continuous physical field (continuous heat map) into a structured binary region map (binary mask map), enabling precise segmentation of the ice crystal-affected area. The binary mask map serves as a key input for multiple modules, including ice crystal interference repair, optical image fusion, and defect probability modeling, with clear physical meaning and spatial directivity.

[0066] S240: Perform ice crystal repair on the first optical data based on the binary mask image to obtain second optical data.

[0067] For example, the areas requiring inpainting (ice-crystal-covered areas) on the first optical image can be identified based on the marker values ​​in the binary mask. For ice-crystal-covered areas in the first optical image, an image inpainting algorithm can be used to reconstruct the optical characteristics of the area while maintaining image structure and color continuity. For example, inpainting algorithms based on texture and structure propagation (such as Telea or Navier-Stokes) extract image gradient and texture information at the boundary of the inpainted area, diffuse the boundary information inward, restore natural texture transitions, and maintain structural integrity and edge continuity. Inpainting algorithms based on multi-channel interpolation and regional averaging perform weighted averaging or spatial interpolation on each channel, combining statistical features of neighboring pixels in non-ice crystal areas for regional reconstruction. These algorithms are suitable for simple backgrounds or small areas of interference. Deep learning image inpainting algorithms use pre-trained image inpainting models (such as U-Net and DeepFill) with the first optical image and binary mask as input to predict the reasonable content of the missing area. These algorithms are suitable for scenarios requiring high fidelity.

[0068] After the repair is completed using the above-mentioned repair algorithm, the area interfered by ice crystals in the first optical image can be replaced with the reconstructed area, and the remaining unaffected areas remain unchanged, generating a complete and structurally continuous second optical image (second optical data). This image removes the high reflection of ice crystals or light spot artifacts, and restores the surface texture, color and edges of the vegetables, which is closer to the actual physical state and can provide a more reliable image basis for subsequent defect analysis.

[0069] This step significantly improves the quality of optical data, eliminates the interference of ice crystals on image analysis, and provides a more accurate input basis for subsequent image-based defect identification.

[0070] Optionally, S240, performing ice crystal repair on the first optical data based on the binary mask image to obtain second optical data, includes: S241 : Perform ice crystal repair on the ice crystal covered area in the first optical data based on the binary mask image to obtain a repaired image.

[0071] For example, the image of the ice crystal covered area in the first optical image can be extracted according to the mark value in the binary mask image (i.e., the ice crystal covered area marked as 1), and the image of the ice crystal covered area in the first optical image can be repaired using the DeIce-GAN network to obtain a repaired image.

[0072] For example, see Figure 3 S241, based on the binary mask image, performing ice crystal repair on the ice crystal covered area in the first optical data to obtain a repaired image, including: S2411 : Extracting an image corresponding to the area covered by ice crystals from the first optical data based on the binary mask image to obtain a first image.

[0073] Exemplarily, according to the pixel positions with a value of 1 in the binary mask image, the corresponding area is extracted from the first optical image. The extracted area can retain the original image size, and the remaining non-ice crystal area pixels are filled with null values ​​or zeros to form an image sample (first image) consistent with the input format. The first image contains obvious ice crystal interference features, such as high-reflection spots, blurred edges, and local information loss.

[0074] S2412: Perform ice crystal restoration on the first image based on the restoration network to obtain a restored image. The restoration network is a DeIce-GAN network, which includes a U-Net generator, a PatchGAN discriminator, and multiple loss functions, including pixel loss, perceptual loss, and adversarial loss.

[0075] It can be understood that the DeIce-GAN network structure may include: a U-Net generator, which receives the original image and the mask area, uses the encoder-decoder structure to perform context understanding and pixel-level reconstruction, and outputs a repaired image with the same size as the input image; a PatchGAN discriminator, which receives the repaired image and compares it with the original image, judges the authenticity of the image block, introduces a local discrimination mechanism, enhances the realism of texture generation, and outputs adversarial loss as one of the training signals; multiple loss functions (used to train the generator), pixel loss (MSE) can limit the pixel difference between the repaired image and the real image in the ice area, perceptual loss (VGG) can use the high-level features of the VGG network to measure the structural perception consistency, and adversarial loss (Adv) can make the repaired image more realistic through GAN adversarial learning.

[0076] For example, a first image can be input into the DeIce-GAN network (inpainting network). This image is then fed into a U-Net generator, where the encoder performs multi-level feature extraction on the image content, extracting high-dimensional semantic features and understanding the spatial structure and semantic context of the current local region. The encoded high-dimensional semantic features are gradually restored to image details in the decoder, where skip connections are used to fuse low-level texture information and high-level semantics in the first image, generating local details while maintaining contextual consistency. The decoder then outputs a new inpainted image, in which the areas originally obscured by ice crystals are filled in by the U-Net generator with coherent, naturally structured image fragments. The inpainted content is not only consistent with the surrounding texture and color, but also maintains structural continuity of edges and texture orientations.

[0077] At the same time, the PatchGAN discriminator receives the inpainted image and compares it with the non-ice crystal covered areas in the first optical image at a local block level to determine whether the inpainted area is authentic and trustworthy. If the inpainted result is unnatural, the discriminator will provide negative feedback to guide the U-Net generator to improve the quality of the next inpainting.

[0078] The DeIce-GAN network training process involves collecting a large number of high-quality optical images of vegetables (not frozen, without ice crystals) as clean image references for the training set. Because real ice crystal interference is uncontrollable, during the training phase, simulated generation is used to construct input images corrupted by ice crystals. Ice crystal artifacts such as bright spots and white mist can be randomly added. Image processing methods can also be used to synthesize interference effects such as blurring, edge corruption, and color distortion. A corresponding mask is generated for each input image, marking the areas affected by ice crystals. This is used during training to guide the U-Net generator to focus on the restoration target. Training pairs are constructed, each consisting of an input image corrupted by ice crystals, a clean image (the target output), and the corresponding mask.

[0079] To simultaneously optimize image structure restoration, texture consistency, and realism, the training process utilizes a joint optimization using pixel, perceptual, and adversarial losses. For each training batch, the input image and its corresponding mask are fed into the U-Net generator to generate the inpainted image. Both the clean image and the generated inpainted image are fed into the PatchGAN discriminator, which learns to distinguish between real and fake images, improving its ability to discern local structure. The U-Net generator is optimized using backpropagation using a triplet loss to restore the clean image content as closely as possible. The two networks (U-Net and PatchGAN) are jointly optimized to form a generative adversarial mechanism. Iterations are repeated until the model converges on the validation set and achieves the target inpainting quality. The inpainting quality is evaluated on the validation set (using metrics such as PSNR and SSIM), and the optimal model is saved.

[0080] This step achieves high-quality ice crystal image restoration and outputs realistic and natural restored images, providing key support for improving the quality of optical data.

[0081] In one possible implementation, the quick-frozen vegetable sorting method further includes: Understandably, during the inpainting process of frozen vegetable images, the degree of ice crystal interference is not only related to the image itself but also affected by the current ambient temperature and relative humidity. To achieve more accurate and adaptive ice crystal inpainting, a inpainting strength coefficient can be introduced as a control parameter. This coefficient can be dynamically adjusted based on the current temperature and humidity conditions, guiding the inpainting network to generate inpainted content of varying degrees.

[0082] S10, obtaining the current temperature and the current relative humidity, and determining the repair strength coefficient according to the current temperature and the current relative humidity.

[0083] For example, the current temperature (unit: degrees Celsius, indicating the ambient temperature during sampling or repair, which affects the formation and morphology of ice crystals) and the current relative humidity (unit: %, indicating the saturation level of water vapor in the air, which affects the growth rate and size of ice crystals in a frozen environment) in the environment can be collected in real time through temperature and humidity sensors.

[0084] The corresponding relationship between temperature and humidity and repair intensity can be set based on experience or experimental data, and calculation can be performed using rule mapping or table lookup. For example, rule mapping method: 1. When the temperature is low (such as below -25°C) and the humidity is high (such as RH>85%), the ice crystals are large and numerous, and the repair intensity can be set to 0.9; when the temperature is medium (such as -18°C, RH65%~80%), the ice crystals have a moderate impact, and the repair intensity can be set to 0.6; when the temperature is high or the humidity is low (such as -10°C, RH<60%), the ice crystals have a lesser impact, and the repair intensity can be set to 0.3. 2. It can be calculated using a linear combination of temperature and humidity, such as ,in, represents the repair strength coefficient, Indicates standard temperature, Indicates the current temperature. Represents the current relative humidity. Table Lookup Method: Construct a two-dimensional mapping table (temperature and humidity) and look up the table to obtain the corresponding repair intensity coefficient.

[0085] The restoration intensity coefficient is used as an adjustment parameter in the image restoration process to achieve adaptive restoration control under different ice crystal interference levels, which helps to improve the authenticity and rationality of the restoration results and avoid excessive or insufficient restoration.

[0086] S20: Determine a corresponding repair network based on the repair strength coefficient. Different repair strength coefficients correspond to different repair networks, and each repair network has a different convolution structure and number of convolution kernels.

[0087] It can be understood that in order to achieve adaptive repair of different degrees of ice crystal interference, multiple repair network structures can be designed. Each network differs in the depth of the convolution layer, the number of convolution kernels, etc., and is suitable for repair needs of different intensities.

[0088] For example, multiple structurally differentiated restoration networks can be pre-trained, and each restoration network is used to process ice crystal interference at a specific intensity level. The number of convolutional layers (network depth) of each network is different. For example, the base network is a shallower structure that focuses on preserving original details; the enhanced network is a medium-layer structure that takes into account both restoration and structural consistency; and the reinforced network is a deep structure that can reconstruct complex textures and structural missing areas. The number of convolution kernels of each network is different. For example, the enhanced network uses more channels to enhance feature expression capabilities; the base network maintains a smaller amount of computation to avoid overfitting or over-restoration. The receptive field and resolution processing methods of each network are different. For example, the enhanced network can add methods such as dilated convolution and pyramid structure to expand the receptive field, while the base network retains high-resolution details without excessive downsampling. As shown in the following table: Among them, Enc is the number of encoder layers, Res is the number of residual blocks, and Dec is the number of decoder layers; Larger values ​​indicate more severe ice crystals, deeper repair networks, and larger receptive fields.

[0089] The above table can be used to select a repair network that matches the repair strength coefficient, load the selected repair network structure and its corresponding parameters, use the first image as input, and perform the image repair operation. The repair process keeps the network structure matching the current interference level, thereby improving the repair efficiency and quality.

[0090] The networks corresponding to different restoration intensities differ in convolution structure, depth, and number of convolution kernels. They can effectively adapt to different levels of ice crystal interference and achieve both precise and efficient image restoration.

[0091] In another possible implementation, the quick-frozen vegetable sorting method further includes: S101, obtaining the current temperature and the current relative humidity, and determining the repair strength coefficient according to the current temperature and the current relative humidity.

[0092] Exemplarily, this step is consistent with the method of step S10.

[0093] S102, based on the restoration strength coefficient, calculating the number of feature channels and the convolution output scaling factor of the restoration network.

[0094] It's understandable that to achieve dynamic adaptive processing of the repair network under varying ice crystal interference intensities, the structure of a single repair network can be adjusted. The core parameters of a single repair network are the number of feature channels and the convolution output scaling factor, which are dynamically calculated and set based on the current repair intensity coefficient. This mechanism (adjusting the structure of a single repair network) enables the repair network to maintain a lightweight and high speed under mild interference, while increasing its capacity and expressiveness under severe interference, balancing repair effectiveness with computational efficiency.

[0095] For example, the number of feature channels of the convolutional layer in the repair network (i.e., the number of feature maps output by each layer) directly affects the feature expression ability of the network. The maximum and minimum number of feature channels can be pre-set, such as the minimum number of feature channels 32, the maximum number of feature channels is 128. The number of characteristic channels can be calculated based on the repair strength coefficient, that is, , round the number of feature channels and adjust it upward to a multiple of 8 or 16 to adapt to hardware optimization, that is, .

[0096] In order to further adjust the output response strength, a convolution output scaling factor can be introduced to control the amplitude of each layer of convolution output feature map. Similarly, the upper and lower limits of the convolution output scaling factor can be set, such as the minimum convolution output scaling factor 0.8, the maximum convolution output scaling factor The convolution output scaling factor is obtained by interpolation based on the repair strength coefficient, that is, , the output feature can be multiplied by the convolution output scaling factor at the output stage of the convolution layer of the network to enhance or weaken the repair effect, that is, ,in, represents the scaled output features, Represents the output features.

[0097] Before initializing the repair network or image restoration, the number of feature channels for the input / output of each convolution layer can be set according to the restoration strength coefficient, and the convolution output scaling factor can be set as the adjustment coefficient for the output of each layer. If a dynamic graph (such as PyTorch) is used, the parameters can be updated directly; if a static graph framework is used, multiple configuration subgraphs can be switched by presetting them.

[0098] This step enables flexible adjustment of the repair capability under a single network structure. When the repair intensity is high, the number of channels is increased and the output amplitude is enhanced to adapt to severe ice crystal interference. When the interference is mild, the network is kept lightweight and the repair is gentle, thus taking into account both the repair effect and computational efficiency.

[0099] S242 : Based on the binary mask image, perform image enhancement on the area not covered by ice crystals in the first optical data to obtain an enhanced image.

[0100] For example, an image enhancement algorithm can be used based on the marker values ​​in the binary mask image (i.e., non-ice crystal covered areas marked as 0) to improve the local contrast, edge clarity, and color saturation of the non-ice crystal covered areas in the first optical image. For example, local contrast enhancement (such as CLAHE) applies adaptive histogram equalization (CLAHE) to the non-ice crystal covered areas to enhance details in shadow areas, avoid over-enhancement of the entire image, and maintain a natural feel. Sharpening enhancement applies a Laplacian or high-pass filter to enhance edges and texture lines, improve the recognition of tissue structures, and facilitate defect identification. Color saturation and brightness adjustment enhances the saturation of non-ice crystal covered areas, enhancing color distribution and making regional tones more distinguishable.

[0101] During the enhancement process, a binary mask image can be used as a constraint condition, and the enhancement operation is applied only to the positions marked as 0 in the binary mask image. The original image data of the areas marked as 1 remains unchanged to avoid amplifying interfering noise or light spots. The enhanced image content replaces the corresponding area of ​​the first optical image to form an enhanced image.

[0102] This step improves the detail clarity and tissue recognizability of the non-ice crystal covered areas in the optical image, while avoiding false enhancement of the ice crystal interference areas. The enhancement result improves the subsequent utilization efficiency of the effective area while maintaining the naturalness of the image.

[0103] For example, see Figure 3 S242: Based on the binary mask image, performing image enhancement on the non-ice crystal covered area in the first optical data to obtain an enhanced image, including: S2421 : Based on the binary mask image, extract an image corresponding to the area not covered by ice crystals from the first optical data to obtain a second image.

[0104] Exemplarily, all pixels of the first optical image can be traversed, and for pixels with a value of 0 in the binary mask image, the corresponding pixel values ​​in the first optical image are retained. For pixels with a value of 1 in the binary mask image, the corresponding pixel values ​​in the first optical image are set to zero or masked to obtain an image (second image) containing only areas not covered by ice crystals. The second image is used for subsequent enhancement processing.

[0105] S2422: Perform multi-scale enhancement on the second image to obtain a third image.

[0106] For example, the Retinex (Retina and Cortex) enhancement algorithm, based on the brightness and color constancy mechanisms of the human visual system, can effectively enhance local image contrast and compress the dynamic range. To overcome the limitations of single-scale Retinex, a multi-scale Retinex (MSR) method can be used to enhance the second image.

[0107] The second image can be converted and preprocessed by image channel conversion, that is, the second image is converted to logarithmic brightness space, and R, G, B or grayscale images are processed independently to maintain color consistency. Multiple scale parameters (such as small, medium, and large scales) can be set to simulate the influence of illumination in different ranges. Gaussian blur is performed on the second image after image channel conversion and preprocessing to obtain illumination components at different scales. For different scales, the enhancement result of each scale is calculated based on the second image, that is, ,in, The scale is The enhanced results, represents the second image pixel value, The scale is The Gaussian kernel of , * represents the convolution operation. The enhancement results of each scale are fused in a weighted average manner to obtain the final enhanced image (the third image), that is, ,in, Represents the value of each pixel in the third image, The scale is The weight of , can be set uniformly or based on experimental experience.

[0108] This step integrates image information at different scales, effectively improving the local contrast and detail expression capabilities of the image. The generated third image is clearer and more natural in visual quality, which is helpful for subsequent image analysis and defect detection.

[0109] S2423 : Based on the first optical data, calculate the local contrast of each pixel in the first optical data using a local sliding window, and normalize the local contrast of each pixel to obtain an adjustment factor of each pixel.

[0110] Exemplarily, the sliding window size can be set to k×k, such as 7×7. Each time the window is centered on a pixel, the surrounding neighborhood pixel area is extracted, and the window slides pixel by pixel across the entire image to facilitate calculation of a corresponding local contrast for each pixel in the first optical image.

[0111] For each pixel, the standard deviation of the pixel grayscale of the corresponding area (all pixels in the window) is calculated within the sliding window centered on the pixel as a measure of local contrast, that is, ,in, Represents pixels Grayscale standard deviation (local contrast), Indicates the first Pixel grayscale, represents the average gray value in the window, Indicates the total number of pixels in the window.

[0112] The local contrast of each pixel can be traversed to find the maximum and minimum values, and the local contrast of each pixel can be normalized according to the maximum and minimum values ​​of the local contrast, that is, ,in, represents the normalized local contrast (adjustment factor), represents the minimum local contrast, represents the maximum local contrast.

[0113] This step provides a pixel-level control mechanism based on local image features, providing a spatially adaptive adjustment basis for subsequent image enhancement, restoration and fusion processes.

[0114] S2424: Perform pixel-by-pixel enhancement adjustment on the third image based on the adjustment factor of each pixel to obtain an enhanced image.

[0115] For example, the corresponding pixel value in the third image can be adjusted according to the adjustment factor of each pixel to obtain an enhanced image, that is, ,in, Represents pixels The pixel value of .

[0116] In one possible implementation, the quick-frozen vegetable sorting method further includes: S2401 : Based on the adjustment factor of each pixel and the first optical data, perform pixel-by-pixel enhancement adjustment on the third image to obtain an enhanced image.

[0117] For example, in addition to adjusting the third image based solely on the adjustment factor, the first optical data may be introduced as a base image, and pixel-level weighted fusion may be performed between the base image and the enhanced image using the adjustment factor. ,in, The pixel value of each pixel in the first optical data is represented. This step can avoid the overall image being too bright or over-enhanced, effectively preserve the original structure and texture, make the image more natural and balanced visually, and enhance spatial adaptability.

[0118] The enhanced image obtained through this step has significant advantages in visual effects, structural integrity and processing flexibility, providing more reliable basic data for subsequent image reconstruction and defect analysis.

[0119] S243: Fusing the restored image and the enhanced image to obtain second optical data.

[0120] For example, the values ​​on the binary mask can be examined pixel by pixel. If a location on the binary mask is marked as 1 (covered by ice crystals), the pixel at that location can be extracted from the repaired image. If a location on the binary mask is marked as 0 (not covered by ice crystals), the pixel at that location can be extracted from the enhanced image. The pixels corresponding to each location are then stitched together to form a complete second optical image (second optical data). To avoid a distinct boundary between the repaired and enhanced areas (especially in areas with complex textures), edge blurring, gradient transitions, or edge smoothing can be used to eliminate sharp edges and enhance the natural feel of the blend.

[0121] This step allows pixel-level fusion of the repaired image and the enhanced image in image space to form a second optical image (second optical data) with complete structure and uniform quality. The fusion process fully utilizes the optimal processing results of each area, so that the final image has stronger recognizability and analytical adaptability while maintaining authenticity.

[0122] S300 , determining a defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data.

[0123] Illustratively, image color features of the second optical data can be extracted, such as RGB (the mean, standard deviation, maximum value, minimum value, etc. of the R, G, and B channels can be counted separately), near-infrared grayscale value (the overall brightness distribution and contrast features can be extracted from the near-infrared channel), HSV (the RGB image can be converted to a more perceptually stable color space such as HSV, and indicators such as hue, saturation, and brightness can be extracted to enhance sensitivity to color differences); structural texture features of the second optical data can be extracted, such as LBP (local binary pattern, which can encode pixel intensity within a local neighborhood to obtain surface texture roughness and directionality information), Gabor filter response (Gabor kernels of different scales and directions can be applied to analyze the response of texture direction features (such as leaf veins and epidermal lines)), and edge contour (region boundary features can be obtained through Canny edge detection or Sobel operator to assist in morphological judgment); spatial distribution features of the second optical data can be extracted, such as the area, perimeter, aspect ratio, circularity, and other geometric features of the extracted region.

[0124] In addition, pre-trained or customized convolutional neural networks (such as ResNet and MobileNet) can be used to process the restored optical images, extract local and global patterns (such as cracks, spots, and decayed areas) from different convolutional layers, and use fully connected layers or feature pooling operations to compress high-dimensional features into fixed-length vectors to represent the semantic features of the second optical data.

[0125] Based on the first dielectric spectrum data, the real and imaginary parts of the complex dielectric constant at each frequency (that is, the complex dielectric constant at each frequency is split into real and imaginary parts) and the loss tangent (the ratio between the imaginary and real parts, which can reflect the degree of energy loss) can be calculated to obtain basic electrical characteristics. Spectral variation characteristics of the first dielectric spectrum data can be extracted, such as differential characteristics (which can calculate the rate of change of electrical parameters between adjacent frequencies, reflecting the smoothness and jumpiness of the response), peak characteristics (which can extract the frequency corresponding to the maximum complex dielectric constant), and energy characteristics (which can be integrated over specific frequency bands to represent the overall energy density, enhancing the characterization of frequency-domain behavior).

[0126] Based on pixel coordinates, the image color features, structural texture features, spatial distribution features, basic electrical features, and spectral variation features of the same region can be concatenated along the feature dimension to generate a fused feature vector that fully describes the optical and electrical properties of the region. This fused feature vector can be input into a prediction model, which can predict the defect probability of the quick-frozen vegetable (ranging from 0 to 1), reflecting the degree of abnormality. Alternatively, a threshold can be set to categorize the prediction results into normal, suspicious, or defective levels.

[0127] Prediction models can be constructed using multimodal classification or regression models, such as random forests, support vector machines (SVMs), multilayer perceptrons (MLPs), or fusion deep learning models (such as dual-branch CNNs and FCs). The output is a defect probability value for a specific area or the entire frozen vegetable, indicating the likelihood of structural or functional defects. Manually labeled or known samples can be used as training sets to identify defects. Model training can be performed using supervised learning methods, with parameters optimized through backpropagation to improve discriminative capabilities.

[0128] The method based on multimodal joint modeling not only improves the accuracy and stability of defect detection, but also provides a scientific and continuous quantitative basis for subsequent automated sorting decisions.

[0129] In one possible implementation, S300, determining a defect probability of quick-frozen vegetables based on the first dielectric spectrum data and the second optical data, includes: S310: Extracting surface defect features of the quick-frozen vegetables based on the second optical data, and determining the surface defect probability of the quick-frozen vegetables based on the surface defect features.

[0130] For example, the pixel values ​​of the second optical image (second optical data) can be standardized to a uniform interval (such as 0 to 1) to eliminate brightness differences; the second optical image can be denoised or edge-preserving filtered to enhance details and reduce background interference; morphological processing or semantic segmentation network can be used to limit the second optical image to the surface area of ​​the vegetable to eliminate background interference.

[0131] For potential defective areas on the surface of quick-frozen vegetables, three types of features can be extracted from the second optical image: color, texture, and structural shape. These features not only describe the image's surface information but also indicate possible defects such as spots, cracks, collapses, decay, and discoloration. Color features (which may include statistical features and color histograms, used to identify abnormal spots, decayed areas, or discolored areas) can be extracted: The RGB image (second optical image) can be converted into HSV (hue H - saturation S - brightness V) and Lab (close to human perception) space to enhance sensitivity to color anomalies. For each color channel (such as H, S, V or a, b), statistical features can be extracted. These include calculating the image's mean (indicating the dominant hue), standard deviation and variance (indicating the degree of dispersion in the color distribution), and maximum, minimum, and color difference range (used to detect sudden changes). A pixel distribution histogram for each color channel can be generated to describe color clustering or abnormal shifts, allowing comparison of color differences between defective and normal areas.

[0132] Extracting texture features (used to identify surface defects such as roughness, bumps, and cracks): The image can be converted to grayscale and a gray-level co-occurrence matrix (GLCM) constructed within a fixed window (such as 7×7 or 11×11) is constructed. This calculates the spatial co-occurrence relationship between pixel grayscale values ​​and extracts contrast (reflecting the degree of texture abruptness), homogeneity (reflecting texture smoothness), entropy (reflecting texture complexity), and energy (reflecting image repetitiveness). These four metrics are applied to each image block or ROI to form a local texture feature map. Alternatively, a set of Gabor spline filters (in multiple directions and frequencies) can be constructed and convolved with the image to extract edge directions and frequency responses. The response strength (mean and variance) is then statistically analyzed as texture features.

[0133] Extracting structural shape features (used to determine surface structural integrity and the presence of fractures, collapses, or deformation): Canny or Sobel operators can be used to perform edge detection on images to determine edge connectivity and the presence of anomalies such as fractures and cracks. The length, area, and boundary distribution density of the detected edges are then calculated to provide structural shape features. Alternatively, image gradients (such as Sobel x / y) can be calculated to identify local high-gradient regions (such as sharp concave points). Indicators such as gradient direction changes, slope distribution, and extreme value density can be extracted as structural shape features.

[0134] The above features can be aggregated to form a unified high-dimensional feature vector (surface defect feature), and all features can be normalized (such as Z-score or Min-Max) to eliminate dimensional differences.

[0135] A trained classification model, such as support vector machine (SVM), random forest, XGBoost, or convolutional neural network (CNN), can be used to input surface defect features into the classification model. The model outputs the surface defect probability in the range of 0 to 1. If it is a local prediction (image block), the maximum value, average value, or weighted summary can be taken to obtain the surface defect probability of the entire quick-frozen vegetable.

[0136] In addition to the above methods, the entire image or image block can be input into a convolutional neural network (such as ResNet, MobileNet), and a sigmoid output node can be set at the end of the network to directly predict the probability of surface defects. The convolutional neural network model can be trained using regression labels or classification labels. The closer the output value is to 1, the higher the defect risk.

[0137] This step not only improves the accuracy and robustness of defect detection, but also significantly enhances the system's ability to understand images after complex ice crystal interference, providing reliable data support for subsequent automatic sorting, thereby achieving the technical effects of improving detection efficiency, reducing misjudgments and missed judgments, and improving the level of intelligent sorting.

[0138] Optionally, S310, extracting surface defect features of the quick-frozen vegetables based on the second optical data, and determining the surface defect probability of the quick-frozen vegetables based on the surface defect features, includes: S311: Encode the second optical data based on a convolutional neural network to extract global features. The convolutional neural network is MobileNetV3-Small.

[0139] It can be understood that MobileNetV3-Small is a deep neural network designed specifically for edge computing and lightweight tasks. It uses depthwise separable convolution to reduce parameters and computational complexity, introduces the hard activation function h-swish and SE attention module to improve feature expression capabilities, and contains multiple Bottleneck modules to extract multi-scale, high-semantic features of images layer by layer.

[0140] For example, the original image (second optical data) can be uniformly adjusted to a standard input size accepted by MobileNetV3-Small, such as 224×224 or 160×160, and the pixel values ​​can be scaled to [0, 1] or standardized to a mean of 0 and a variance of 1 to adapt to the input specifications of the pre-trained network.

[0141] The first few layers of the MobileNetV3-Small network use standard convolution and depthwise separable convolution to extract low-level features such as edges and textures from the secondary optical data. This extraction process includes feature map compression and activation enhancement. The intermediate layers consist of multiple Bottleneck blocks, which compress and expand features layer by layer. Each layer outputs more abstract features, representing patterns at different scales, such as texture, boundaries, and structure within the image. The feature map of the final layer is spatially average-pooled, outputting a 1024-dimensional deep feature vector (global feature) representing the global visual representation of the image. Global features capture the overall structure, texture, and color characteristics of the vegetables, providing a foundation for subsequent judgment.

[0142] This step preserves key surface information and image semantics while ensuring low computational load, providing a stable, compact, and discriminative image expression basis for subsequent defect recognition, quality grading, and multimodal fusion.

[0143] S312: Extract color features, texture features, and morphological features from the second optical data.

[0144] For example, three additional image statistical features with defect sensitivity can be extracted based on the depth features to enhance the overall discrimination capability.

[0145] The secondary optical data can be converted from RGB space to HSV space. The variance of the saturation channel (S channel) is calculated as a color feature. Color features measure the degree of dispersion of color distribution in an image. For example, a defective area manifests as color deviation; a higher variance indicates a greater likelihood of color deviation. LBP (Local Binary Pattern) can be used to extract the texture structure of the secondary optical data, generating an LBP response map. Energy calculation (squared mean) of the LBP response map is performed to obtain texture energy, which is a texture feature. Texture features can reflect the texture complexity of a local area. For example, cracks and burrs generate higher texture energy. The contour of the secondary optical data can be extracted and the minimum bounding rectangle calculated. The degree of shape deviation is determined by the aspect ratio, which is a morphological feature. For example, frozen vegetables may have an abnormal shape (such as twisting or cracking) or an aspect ratio far from the standard value (such as a normal ellipse close to 1.0).

[0146] S313, global features, color features, texture features and morphological features are combined to obtain surface defect features.

[0147] For example, the color feature, texture feature, and morphological feature may be concatenated with the 1024-dimensional global feature to form a 1027-dimensional surface defect feature.

[0148] S314, performing surface defect probability prediction on the surface defect features to obtain the surface defect probability of the quick-frozen vegetables.

[0149] For example, the surface defect features can be input into the prediction model (XGBoost binary classification model (XGBClassifier)). The model traverses the features in a tree structure and calculates their weighted outputs on multiple weak classifiers (decision trees). The prediction process does not return a category label, but instead outputs a continuous value as the probability of surface defects of quick-frozen vegetables.

[0150] Prediction model training process: You can use the XGBClassifier in the XGBoost library to build a prediction model and set the following key parameters: objective='binary:logistic', specifies a binary logistic regression problem, and the output is a probability value; eval_metric='logloss', uses logarithmic loss as the evaluation criterion; max_depth, limits the maximum depth of the tree to control model complexity; learning_rate, the learning rate of each tree, balances fitting speed and generalization ability; n_estimators, the number of iterative trees, determines the overall capacity of the model; subsample and colsample_bytree are used to control overfitting and improve robustness through random sampling; set early_stopping_rounds to stop training early based on the validation set.

[0151] A large number of representative images of quick-frozen vegetables can be collected. Each image is labeled with defects based on manual experience or expert opinion. Images with obvious surface defects are labeled as 1, and images with normal surfaces without visible defects are labeled as 0. Global features, color features, texture features, and morphological features are extracted from each image and combined into a unified surface defect signature. A feature matrix and labels are constructed to serve as model input and supervised training, respectively. Randomly partitioning the dataset (feature matrix and labels) into a training set (e.g., 80%) and a validation set (e.g., 20%) ensures a balanced distribution of the two types of samples (defective and non-defective) across the two subsets, thus avoiding bias.

[0152] The feature matrix and labels of the training set are fed into the model. Using XGBoost's internal Gradient Boosted Tree (GBDT) mechanism, multiple weak classification trees are iteratively constructed. Each new tree corrects the prediction residuals from the previous round, continuously optimizing the model's prediction performance. The model is also evaluated on the validation set, monitoring the loss in real time. If early stopping is enabled, training automatically terminates when the validation set loss does not improve for multiple rounds. Model parameters such as max_depth, learning_rate, min_child_weight, gamma, and n_estimators can be adjusted using Grid Search or Bayesian Optimization (Optuna). The performance of different parameter combinations can be tested on the validation set to select the optimal solution. The trained XGBClassifier model can be serialized and saved (e.g., using joblib or pickle) for real-time prediction of surface defect probabilities in quick-frozen vegetables.

[0153] This step takes into account both feature expression capabilities and model generalization capabilities, and can efficiently and accurately evaluate the surface quality of quick-frozen vegetable images, thereby improving the intelligence and stability of defect recognition.

[0154] S320: Extracting internal corruption characteristics of the quick-frozen vegetables based on the first dielectric spectrum data, and determining the internal corruption probability of the quick-frozen vegetables based on the internal corruption characteristics.

[0155] For example, the key physical indicators reflecting the internal corruption of quick-frozen vegetables can be calculated based on the complex dielectric constant data (complex dielectric constants at multiple frequencies) of each sampling point in the first dielectric spectrum data. The corresponding dielectric loss factor can be calculated based on the real and imaginary parts of each complex dielectric constant, that is, ,in, Indicates the sampling points at a frequency The dielectric loss factor under Indicates the sampling points at a frequency The imaginary part of the complex dielectric constant under Indicates the sampling points at a frequency The real part of the complex permittivity under . The corresponding conductivity can be calculated based on the imaginary part of each complex permittivity.

[0156] Based on the real part of each complex permittivity and the corresponding dielectric loss factor, the real part difference and dielectric loss factor difference between different frequencies can be calculated as spectral response characteristics. Based on the real part, imaginary part, and corresponding dielectric loss factor of each complex permittivity, the average real part, average imaginary part, and average dielectric loss factor can be calculated as statistical characteristics. The changing trends of the real part, imaginary part, and corresponding dielectric loss factor of each complex permittivity can be fitted, and the first-order slope and second-order curvature parameters can be extracted as trend characteristics.

[0157] Spectral response features, statistical features, and trend features can be aggregated to form a unified high-dimensional feature vector (internal corruption feature). If the internal corruption feature has a high dimensionality, principal component analysis (PCA) or autoencoders can be used for feature compression, extracting the first few principal components as a comprehensive feature to preserve information while reducing noise.

[0158] Supervised classification models, such as support vector machines (SVMs), random forests, XGBoost, and logistic regression, can be used to input internal spoilage features into the classification model, which can then predict the probability of belonging to the spoilage category. The average probability can be calculated for the entire plant of quick-frozen vegetables, or a localized spoilage probability map can be generated for each sampling point.

[0159] A deep neural network regression model (such as 1D CNN or ResNet) can be used to input internal corruption features into the regression model. The model uses the corruption score as the regression target and outputs the internal corruption probability in the range [0, 1]. End-to-end prediction is achieved by combining multi-channel input.

[0160] This step can effectively identify non-visible defects such as hidden decay and tissue degradation inside quick-frozen vegetables, enabling rapid, non-destructive, and highly sensitive internal quality assessment.

[0161] Optionally, S320, extracting internal corruption characteristics of the quick-frozen vegetables based on the first dielectric spectrum data, and determining the internal corruption probability of the quick-frozen vegetables based on the internal corruption characteristics, includes: S321: Extract frequency feature values ​​of quick-frozen vegetables based on the first dielectric spectrum data.

[0162] For example, the first dielectric spectrum data may include complex dielectric constants of multiple sampling points at frequencies of 1 MHz, 5 MHz, and 10 MHz. The real parts of the complex dielectric constants of the multiple sampling points at a frequency of 1 MHz may be extracted ( ) is the first eigenvalue. The real part value at low frequency (1MHz) can reflect the polarization ability of the cell structure. Normal tissue structure is intact, the polarization ability is strong, and the real part value is high. After tissue corruption, the cell membrane ruptures, the polarization weakens, and the real part value decreases.

[0163] The difference rate between the imaginary part of the complex dielectric constant at a frequency of 5 MHz and the imaginary part of the complex dielectric constant at a frequency of 1 MHz can be calculated ( ) as the second eigenvalue, which can reflect the loss growth rate between low frequency (1MHz) and medium frequency (5MHz). The growth of the imaginary part indicates the increase of tissue conductivity, reflecting the release of cell fluid. The larger the imaginary part difference, the faster the energy loss grows and the higher the corruption risk.

[0164] The loss tangent at a frequency of 10 MHz can be calculated ( , the ratio between the imaginary part and the real part) is taken as the third eigenvalue. The third eigenvalue reflects the free water content under high frequency. The motion of free water molecules under high frequency (10MHz) dominates the response. The higher the loss tangent, the more free water. A high free water content can indicate cell rupture and juice exudation, which is a key sign of corruption.

[0165] The loss tangent at a frequency of 5MHz can be calculated ( ) as the fourth eigenvalue can reflect the relative relationship between cytoplasmic activity and polarization ability. If the loss tangent increases, it may be caused by leakage or denaturation of internal cell substances. It is one of the electrical indicators for evaluating cell dysfunction.

[0166] The first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue of each sampling point are combined to obtain the eigenvector of each sampling point, and the frequency eigenvalues ​​of the quick-frozen vegetables include the eigenvector of each sampling point.

[0167] The four eigenvalues ​​extracted through this step reflect the cell membrane polarization ability, energy loss slope, free water ratio and cytoplasmic conductivity state respectively. The four eigenvalues ​​provide a highly sensitive and structured electrical basis for the non-destructive identification of internal corruption of quick-frozen vegetables, supporting the construction of intelligent detection and discrimination models.

[0168] S322, calculating the difference between the frequency point characteristic value and the reference value corresponding to the category of quick-frozen vegetables to obtain the internal corruption characteristic.

[0169] For example, each type of vegetable (such as quick-frozen peas, corn, edamame, etc.) has a stable electrical response characteristic in a healthy state. A large number of healthy samples can be collected through experiments to calculate the characteristic values ​​of each frequency point of the healthy samples ( 、 、 、 ), set the average value or median of the characteristic value of each frequency point as the electrical benchmark template (benchmark value) of the corresponding category of healthy samples, and establish a table of vegetable categories and corresponding benchmark values.

[0170] The corresponding benchmark value can be found from the table according to the current quick-frozen vegetable category, and the difference between the four eigenvalues ​​of each sampling point and the corresponding benchmark value can be calculated respectively to obtain the difference vector of each sampling point. The internal corruption feature can include the difference vector of each sampling point.

[0171] This step not only takes into account the differences between samples, but also introduces category adaptability, making corruption identification more targeted and accurate.

[0172] S323, calculating the internal corruption probability of the quick-frozen vegetables based on the internal corruption characteristics.

[0173] For example, for each sampling point, the four difference values ​​in the difference vector can be weighted and summed to obtain a comprehensive score. A sigmoid function can then be used to map the comprehensive score to a probability value, which is the internal corruption probability of the sampling point. This method can be used to calculate the internal corruption probability of each sampling point.

[0174] The internal spoilage probability of quick-frozen vegetables can be calculated by taking the average of all sampling points as the internal spoilage probability. This is suitable for evenly distributed sampling points and reflects the global average spoilage level. Alternatively, the internal spoilage probability of quick-frozen vegetables can be calculated by taking a weighted average of the internal spoilage probabilities of each sampling point. This is useful when assigning higher weights to certain areas (such as the core tissue or central area). The internal spoilage probability of quick-frozen vegetables can provide a direct indicator of the risk of severe internal spoilage in the vegetables.

[0175] This step not only has good numerical stability and interpretability, but can also sensitively capture subtle deviations in electrical characteristics, enabling quantitative assessment and identification of the internal quality of quick-frozen vegetables, which helps to improve the accuracy and automation level of corruption detection.

[0176] S330: Determine the defect probability of the quick-frozen vegetables based on the surface defect probability and the internal corruption probability.

[0177] For example, weight coefficients can be set for the probability of surface defects and the probability of internal corruption. For example, if appearance is more important, the weight coefficient for the probability of surface defects can be set to 0.6, and the weight coefficient for the probability of internal corruption can be set to 0.4. If food safety is a priority, the weight for internal corruption can be set higher. The probability of surface defects and the corresponding weight coefficients, as well as the probability of internal corruption and the corresponding weight coefficients, are weighted and summed to obtain the probability of defects for quick-frozen vegetables.

[0178] The higher probability between the surface defect probability and the internal corruption probability can be used as the defect probability of quick-frozen vegetables. This method is applicable to any scenario where a type of defect reaches a high risk and needs to be processed or eliminated. It can effectively avoid the misjudgment of vegetables with good appearance but internal corruption.

[0179] This step can achieve more accurate and comprehensive quality judgment, effectively reduce the missed detection rate and misjudgment rate, improve the intelligence and reliability of the sorting system, and ultimately ensure the safety and grading consistency of quick-frozen vegetable products.

[0180] Optionally, S330, determining the defect probability of the quick-frozen vegetables based on the surface defect probability and the internal corruption probability, includes: S331, based on the category of quick-frozen vegetables, obtain the initial weights corresponding to the surface defect probability and the internal corruption probability.

[0181] For example, an initial weight coefficient can be pre-configured for each vegetable category, and a vegetable category weight mapping table can be established. Vegetables with easily cracked surfaces and obvious color differences (such as spinach) can be given a higher weight for surface defect probability, while vegetables with less noticeable internal liquefaction and corruption (such as corn kernels) can have their corresponding weight for internal corruption probability increased. This is shown in the following table: According to the categories of the identified quick-frozen vegetables, the weights corresponding to the probability of surface defects and the probability of internal corruption can be found from the table.

[0182] S332: Determine a temperature adjustment factor based on the current temperature.

[0183] It can be understood that in order to be closer to the actual environmental state of the quick-frozen vegetables, a temperature adjustment factor can be introduced. The temperature adjustment factor is used to dynamically reflect the potential impact of the current ambient temperature on the physical properties of the vegetables. Under extremely low temperature conditions, ice crystal formation, dielectric response and optical characteristics may change to varying degrees.

[0184] For example, to prevent extreme ratio changes caused by excessively low temperatures, a lower limit can be set for the current temperature. For example, if the current temperature is below a minimum temperature threshold (e.g., -25°C), the lower limit can be set as the actual operating temperature; if the current temperature is above the minimum temperature threshold, the current temperature is set as the actual operating temperature. Lower limit control can be used to eliminate the anomalous amplification effect of extremely low temperatures on calculation results.

[0185] The actual temperature used can be linearly mapped to a floating-point scaling factor, roughly in the range [-1.25, 0]. For example, ,in, represents the temperature adjustment factor, Indicates the actual temperature used. The normalization factor is determined by the minimum temperature threshold. The ratio between the minimum temperature threshold and the normalization factor remains constant. For example, if the minimum temperature threshold is -25°C and the normalization factor is 20, the ratio between the two is -1.25.

[0186] The temperature adjustment factor can reflect the potential impact of temperature on the photoelectric characteristics of quick-frozen vegetables and provide a dynamic reference for subsequent weight adjustment. By setting the minimum temperature protection threshold, the system can maintain a stable and reasonable response capability even in extremely low temperatures.

[0187] S333 , adjusting the initial weights corresponding to the surface defect probability and the internal corruption probability according to the temperature adjustment factor to obtain final weights corresponding to the surface defect probability and the internal corruption probability.

[0188] For example, a linear offset strategy can be used to adjust the initial weights corresponding to the surface defect probability and the internal corruption probability. ,in, represents the final weight corresponding to the probability of surface defects, represents the initial weight corresponding to the probability of surface defects, then , Represents the final weight corresponding to the probability of internal corruption.

[0189] S334, based on the final weights corresponding to the surface defect probability and the internal corruption probability, weighted summation of the surface defect probability and the internal corruption probability is performed to obtain the defect probability of the quick-frozen vegetables.

[0190] Exemplarily, according to the final weights corresponding to the surface defect probability and the internal corruption probability, the surface defect probability and the internal corruption probability are weightedly summed to calculate the defect probability of the quick-frozen vegetables.

[0191] This step dynamically adjusts the fusion weight of surface and internal defect probabilities based on the temperature adjustment factor, enabling the system to adapt to the changing trends of image and electrical parameter quality under different low-temperature environments. The final output defect probability comprehensively considers the reliability of both surface and internal dimensions, significantly improving the accuracy and robustness of the judgment results in complex cold chain scenarios.

[0192] S400, sorting the quick-frozen vegetables according to the defect probability.

[0193] For example, one or more sorting thresholds can be set to classify defect probabilities into multiple levels. For example, if the defect probability is less than 0.3, the quick-frozen vegetables can be judged as normal (high-quality); if the defect probability is greater than or equal to 0.3 and less than 0.6, the quick-frozen vegetables can be judged as slightly defective (edible defective); and if the defect probability is greater than or equal to 0.6, the quick-frozen vegetables can be judged as severely defective (can be eliminated or processed separately). The sorting thresholds can be dynamically adjusted according to product quality control standards to adapt to different quality requirements or market demands. If the prediction result is the defect probability of multiple areas, the overall defect level can be determined by the maximum value, average value, or weighted comprehensive method to improve overall recognition stability.

[0194] Each frozen vegetable is immediately graded after passing through the inspection area on the conveyor belt. The sorting control system accurately triggers rejection or diversion based on defect level at the corresponding location, with millisecond response times, facilitating high-speed sorting synchronization and accuracy. Sorting results are then directed to different collection channels, such as genuine products (for packaging), defective products (for reprocessing), and rejected products (for direct rejection).

[0195] The defect probability, judgment grade, and sorting results for each quick-frozen vegetable are automatically recorded, allowing for statistical analysis of the quality distribution of each batch and the proportion of defect types. If manual quality inspection identifies a misclassified sample, this information can be fed back to the system for correction. The prediction model can then be regularly retrained or fine-tuned based on updated samples to improve adaptability and accuracy.

[0196] This step directly links the defect probability with industrial sorting actions, realizing a closed-loop system for quick-frozen vegetables from high-dimensional perception data to physical grading control. This not only improves sorting efficiency and consistency, but also significantly reduces the risk of human misjudgment, providing technical support for large-scale intelligent quality inspection of quick-frozen foods.

[0197] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0198] Corresponding to the quick-frozen vegetable sorting method described in the above embodiment, the embodiment of the present application also provides a quick-frozen vegetable sorting device, and each unit of the device can implement each step of the quick-frozen vegetable sorting method. Figure 4 A structural block diagram of a quick-frozen vegetable sorting device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0199] Reference Figure 4 , the device comprises: An acquisition unit is configured to acquire initial optical data and initial dielectric spectrum data of the quick-frozen vegetables, and perform spatiotemporal alignment and compression on the initial optical data and initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data. The initial optical data includes a visible light and near-infrared dual-band image, and the initial dielectric spectrum data is obtained by collecting the complex dielectric constant of multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies.

[0200] The repair unit is configured to perform ice crystal repair on the first optical data based on the first dielectric spectrum data to obtain second optical data, wherein the ice crystal repair is used to eliminate the influence of ice crystal interference on the optical data.

[0201] The defect detection unit is used to determine the defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data.

[0202] The sorting unit is used to sort the quick-frozen vegetables according to the defect probability.

[0203] It should be noted that the information interaction, execution process, etc. between the above-mentioned units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0204] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0205] The present application also provides a quick-frozen vegetable sorting device. Figure 5 This is a schematic diagram of the structure of a quick-frozen vegetable sorting device provided in one embodiment of the present application. The quick-frozen vegetable sorting device includes an image acquisition device, a dielectric spectrum measurement device, and a control device. Figure 5 As shown, the control device 6 of the quick-frozen vegetable sorting equipment of this embodiment includes: at least one processor 60 ( Figure 5 Only one is shown), at least one memory 61 ( Figure 5 Only one is shown in the figure) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the quick-frozen vegetable sorting device implements the steps of any of the above-mentioned quick-frozen vegetable sorting method embodiments, or the quick-frozen vegetable sorting device implements the functions of each unit in the above-mentioned device embodiments.

[0206] For example, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the control device 6 of the quick-frozen vegetable sorting equipment.

[0207] The control device 6 of the quick-frozen vegetable sorting device can be a computing device such as a desktop computer, a notebook, a palmtop computer, or a cloud server. The quick-frozen vegetable sorting device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that Figure 5 It is only an example of quick-frozen vegetable sorting equipment and does not constitute a limitation of the quick-frozen vegetable sorting equipment. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access equipment, buses, etc.

[0208] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0209] In some embodiments, the memory 61 may be an internal storage unit of the control device 6 of the quick-frozen vegetable sorting device, such as a hard disk or memory of the quick-frozen vegetable sorting device. In other embodiments, the memory 61 may also be an external storage device of the quick-frozen vegetable sorting device, such as a plug-in hard disk equipped with the quick-frozen vegetable sorting device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory 61 may include both an internal storage unit of the quick-frozen vegetable sorting device and an external storage device. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 61 may also be used to temporarily store data that has been output or is about to be output.

[0210] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0211] An embodiment of the present application provides a computer program product. When the computer program product is run on a quick-frozen vegetable sorting device, the quick-frozen vegetable sorting device implements the steps of any of the above-mentioned method embodiments.

[0212] If the integrated unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the quick-frozen vegetable sorting equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, removable hard drives, magnetic disks, or optical disks. In some jurisdictions, based on legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.

[0213] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0214] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0215] In the embodiments provided in the present application, it should be understood that the disclosed quick-frozen vegetable sorting devices, equipment and methods can be implemented in other ways. For example, the quick-frozen vegetable sorting device and equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0216] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0217] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for sorting quick-frozen vegetables, characterized in that: include: Acquiring initial optical data and initial dielectric spectrum data of the quick-frozen vegetables, and performing spatiotemporal alignment and compression on the initial optical data and the initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data; wherein the initial optical data includes a visible light and near-infrared dual-band image, and the initial dielectric spectrum data is obtained by collecting complex dielectric constants at multiple sampling points on the surface of the quick-frozen vegetables at multiple frequencies; Based on the first dielectric spectrum data, performing ice crystal repair on the first optical data to obtain second optical data; wherein the ice crystal repair is used to eliminate the influence of ice crystal interference on the optical data; determining a defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data; The quick-frozen vegetables are sorted according to the defect probability.

2. The quick-frozen vegetable sorting method according to claim 1, wherein: The performing spatiotemporal alignment and compression on the initial optical data and the initial dielectric spectrum data to obtain first optical data and first dielectric spectrum data includes: extracting the three-dimensional coordinates corresponding to the initial dielectric spectrum data and the pixel coordinates of the initial optical data; Mapping the three-dimensional coordinates of the initial dielectric spectrum data to the pixel coordinates of the initial optical data based on a projection matrix to obtain converted dielectric spectrum data; wherein the projection matrix is ​​used to represent the mapping relationship between the three-dimensional coordinate system corresponding to the dielectric spectrum data and the pixel coordinate system of the optical data; performing lossless compression on the initial optical data to obtain the first optical data; Key frequency point data in the converted dielectric spectrum data is extracted, and the key frequency point data is compressed to obtain the first dielectric spectrum data.

3. The quick-frozen vegetable sorting method according to claim 1, wherein: The step of performing ice crystal repair on the first optical data based on the first dielectric spectrum data to obtain second optical data includes: Calculating ice-water conductivity data of a plurality of sampling points based on the first dielectric spectrum data; Based on the ice-water conductivity data of the plurality of sampling points, a continuous thermal map is generated using inverse distance weighted interpolation; Based on the continuous thermal map and the ice crystal threshold, determining the ice crystal covered area and generating a binary mask image; wherein the binary mask image includes ice crystal covered areas marked as 1 and non-ice crystal covered areas marked as 0; Based on the binary mask image, ice crystal repair is performed on the first optical data to obtain second optical data.

4. The quick-frozen vegetable sorting method according to claim 3, wherein: The step of performing ice crystal repair on the first optical data based on the binary mask image to obtain second optical data includes: Based on the binary mask image, performing ice crystal repair on the ice crystal covered area in the first optical data to obtain a repaired image; Based on the binary mask image, performing image enhancement on the non-ice crystal covered area in the first optical data to obtain an enhanced image; The restored image and the enhanced image are fused to obtain the second optical data.

5. The quick-frozen vegetable sorting method according to claim 4, characterized in that: The step of performing ice crystal repair on the ice crystal covered area in the first optical data based on the binary mask image to obtain a repaired image includes: extracting an image corresponding to the ice crystal covered area from the first optical data based on the binary mask image to obtain a first image; Based on the restoration network, performing ice crystal restoration on the first image to obtain the restored image; wherein the restoration network is a DeIce-GAN network, the restoration network includes a U-Net generator, a PatchGAN discriminator, and multiple loss functions, and the multiple loss functions include pixel loss, perceptual loss, and adversarial loss; The method further comprises: Obtaining a current temperature and a current relative humidity, and determining a repair intensity coefficient based on the current temperature and the current relative humidity; Determining a corresponding repair network based on the repair strength coefficient; wherein different repair strength coefficients correspond to different repair networks, and each repair network has a different convolution structure and number of convolution kernels; or Obtaining a current temperature and a current relative humidity, and determining a repair intensity coefficient based on the current temperature and the current relative humidity; Based on the restoration strength coefficient, the number of feature channels and the convolution output scaling factor of the restoration network are calculated.

6. The quick-frozen vegetable sorting method according to claim 4, characterized in that: The step of performing image enhancement on the non-ice crystal covered area in the first optical data based on the binary mask image to obtain an enhanced image includes: extracting an image corresponding to the area not covered by ice crystals from the first optical data based on the binary mask image to obtain a second image; performing multi-scale enhancement on the second image to obtain a third image; Based on the first optical data, calculating the local contrast of each pixel in the first optical data using a local sliding window, and normalizing the local contrast of each pixel to obtain an adjustment factor for each pixel; Based on the adjustment factor of each pixel, performing pixel-by-pixel enhancement adjustment on the third image to obtain the enhanced image; The method further comprises: Based on the adjustment factor of each pixel and the first optical data, the third image is enhanced and adjusted pixel by pixel to obtain the enhanced image.

7. The quick-frozen vegetable sorting method according to claim 5, characterized in that: The determining the defect probability of the quick-frozen vegetables based on the first dielectric spectrum data and the second optical data includes: extracting surface defect features of the quick-frozen vegetables based on the second optical data, and determining a surface defect probability of the quick-frozen vegetables based on the surface defect features; extracting internal corruption characteristics of the quick-frozen vegetables based on the first dielectric spectrum data, and determining internal corruption probabilities of the quick-frozen vegetables based on the internal corruption characteristics; The defect probability of the quick-frozen vegetables is determined based on the surface defect probability and the internal corruption probability.

8. The quick-frozen vegetable sorting method according to claim 7, characterized in that: The extracting the surface defect characteristics of the quick-frozen vegetables based on the second optical data, and determining the surface defect probability of the quick-frozen vegetables based on the surface defect characteristics, includes: Based on a convolutional neural network, encoding the second optical data to extract global features; wherein the convolutional neural network is MobileNetV3-Small; extracting color features, texture features, and morphological features from the second optical data; Performing feature splicing on the global feature, the color feature, the texture feature, and the morphological feature to obtain the surface defect feature; A surface defect probability prediction is performed on the surface defect features to obtain the surface defect probability of the quick-frozen vegetables.

9. The quick-frozen vegetable sorting method according to claim 7, wherein: The extracting the internal corruption characteristics of the quick-frozen vegetables based on the first dielectric spectrum data, and determining the internal corruption probability of the quick-frozen vegetables based on the internal corruption characteristics, includes: extracting frequency feature values ​​of the quick-frozen vegetables based on the first dielectric spectrum data; Calculating the difference between the frequency point characteristic value and the reference value corresponding to the category of the quick-frozen vegetables to obtain the internal corruption characteristic; Calculating the internal corruption probability of the quick-frozen vegetables based on the internal corruption characteristics; Determining the defect probability of the quick-frozen vegetables according to the surface defect probability and the internal corruption probability includes: Based on the category of the quick-frozen vegetables, obtaining initial weights corresponding to the surface defect probability and the internal corruption probability; determining a temperature adjustment factor according to the current temperature; Adjusting initial weights corresponding to the surface defect probability and the internal corruption probability according to the temperature adjustment factor to obtain final weights corresponding to the surface defect probability and the internal corruption probability; Based on the final weights corresponding to the surface defect probability and the internal corruption probability, the surface defect probability and the internal corruption probability are weightedly summed to obtain the defect probability of the quick-frozen vegetables.

10. A quick-frozen vegetable sorting device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Maize fine classification method and system based on multi-source time sequence remote sensing image feature fusion

    CN121686272A

  • Corn fine classification method and system based on multi-source time-series remote sensing image feature fusion

    CN121686272B

  • Glass bead defect detection method and system based on visual detection

    CN121696142A