Visual identification-based intelligent quality detection method for unfrozen quick-frozen strawberries
By acquiring image sequences in a constant temperature and humidity environment, combining dynamic frame difference method and multispectral analysis to eliminate condensation interference, extracting juice seepage characteristics, and utilizing a long short-term memory network model, the accuracy and automation issues of thawing quality assessment of quick-frozen strawberries were solved, achieving non-destructive, real-time monitoring and prediction of the thawing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies struggle to accurately and quickly assess the quality of quick-frozen strawberries after thawing without damaging the sample. In particular, the time-dynamic characteristics of juice seepage and tissue structure changes during thawing are difficult to monitor continuously, and condensation interference can lead to identification errors.
A visual recognition-based approach was adopted, which involves acquiring image sequences in a constant temperature and humidity environment, combining dynamic frame difference method, region growing algorithm and multispectral analysis to eliminate condensation interference, extracting dynamic features of juice seepage, and using a long short-term memory network model for quality prediction.
It enables automatic and non-destructive monitoring of juice seepage and tissue changes during the thawing process of quick-frozen strawberries, improving the scientific nature and automation level of quality control, reducing errors caused by condensation interference, and enhancing the time sensitivity and accuracy of detection.
Smart Images

Figure CN121640449A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quality detection, and in particular to a frozen strawberry quality intelligent detection method based on visual recognition after thawing. BACKGROUND
[0002] Frozen strawberries are an important category of fruit and vegetable cold chain processing, and their quality after thawing directly affects consumer sensory acceptance and market sales value. During the thawing process, the cell structure of strawberries is prone to rupture, leading to excessive juice leakage, fruit surface collapse, and loose organization. Therefore, how to accurately and quickly evaluate the quality of thawed strawberries without damaging the samples has become a key technical problem in the field of cold chain fruit quality monitoring. Currently, the evaluation of the quality of thawed frozen strawberries mainly relies on manual observation and end-point physical detection, such as weighing juice loss, visually inspecting fruit flesh integrity, or using a microscope to evaluate cell structure integrity. These methods are not only inefficient, subjective, and poorly reproducible, but also difficult to achieve continuous dynamic monitoring of the entire thawing process, making it difficult to meet the needs of industrial automated sorting and intelligent quality control.
[0003] Some studies have begun to introduce computer vision technology for image recognition and analysis of thawed strawberries, but most focus on extracting color or texture features from single images, ignoring the time dynamic characteristics of juice leakage and tissue structure changes during the thawing process. In addition, the thawing process is often accompanied by the attachment of condensed water, which can easily form a high-reflectance interference area in the image, causing juice recognition errors, and existing methods generally lack a systematic processing mechanism for this interference. SUMMARY
[0004] The present application provides a frozen strawberry quality intelligent detection method based on visual recognition after thawing, which can automatically and non-destructively extract key dynamic features during the thawing process, and use intelligent models to predict and evaluate the thawed quality of strawberries in real time, thereby improving the scientificity, efficiency, and automation level of quality control.
[0005] The frozen strawberry quality intelligent detection method based on visual recognition after thawing includes the following steps: S1: Collecting sequence images during the thawing process of frozen strawberries to obtain an image sequence including time dimension information; S2: Performing condensed water interference elimination processing on the image sequence to obtain a corrected image sequence; S3: Extracting juice leakage dynamic features from the corrected image sequence, the juice leakage dynamic features including an area change rate of juice leakage and texture evolution features of the juice leakage area; S4: Inputting the juice leakage dynamic features into a quality evaluation model to output a quality prediction result at the completion of thawing.
[0006] Optionally, the sequence images of the quick-frozen strawberries during the thawing process in the S1 specifically include: placing the quick-frozen strawberry sample to be detected in a collection area in a constant-temperature and constant-humidity environment, continuously shooting from the beginning of thawing to the end of thawing by using an industrial camera fixed above the sample, and obtaining a sequence of images with uniform time stamps.
[0007] Optionally, the collection process of the quick-frozen strawberries further includes limiting the collection environment, specifically including: S11, clearly under constant-temperature and constant-humidity conditions; S12, device configuration: using an industrial camera with a fixed viewing angle; S13, collection parameters: limiting the collection frequency range; S14, time information: emphasizing continuous shooting and recording time stamps to ensure the integrity of time dimension information; S15, process coverage: clearly that the collection period covers the whole process from the beginning to the end of thawing.
[0008] Optionally, the condensation water interference elimination processing of the sequence of images in the S2 specifically includes: identifying the condensation water interference area based on a dynamic frame difference method and a region growing algorithm; distinguishing the condensation water and the juice exudation area through multi-spectral analysis; correcting the identified condensation water interference area by using an image inpainting algorithm; obtaining the corrected sequence of images with the condensation water interference eliminated.
[0009] Optionally, the identification of the condensation water interference area includes detecting the brightness change area between continuous frames based on a dynamic frame difference method, calculating the frame difference image of each pixel, obtaining a dynamic growing area, and expanding the connectivity in the dynamic growing area by using a region growing algorithm; the connectivity expansion includes: filtering and denoising the frame difference image and setting a high threshold and a low threshold , taking a pixel higher than as an initial seed point; performing pixel-by-pixel expansion based on an 8-neighbor connectivity model, and when the neighbor pixel meets the condition that ≥ and is consistent with the current area gray scale statistics, it is included in the growing area, and the area mean and standard deviation are updated in real time during the expansion process to realize adaptive growth; wherein represents the frame difference value of the pixel point p at time t, i.e., the brightness change amplitude between the two continuous frames of the pixel point; After the expansion is completed, the condensation water interference area set is obtained through morphological smoothing, small area rejection, and adjacent connected domain merging post-processing operations.
[0010] Optionally, the intelligent quality detection method for quick-frozen strawberries based on visual recognition after thawing specifically comprises the following steps: The pixel level reconstruction is performed on the condensate water interference area by using an image restoration function; The image restoration function is based on a Poisson restoration algorithm or a sample texture migration algorithm, the pixel gradient field and the neighborhood texture distribution are reconstructed in the condensate water interference area, the brightness and the hue of the restoration area are continuously transitioned, the surrounding non-interference area is kept consistent, the corrected image frame is generated, and the corrected image sequence after the condensate water interference elimination is formed.
[0011] Optionally, the extraction of the juice exudation dynamic feature in S3 specifically comprises the following steps: identifying the juice exudation area in each image based on an image segmentation algorithm, and calculating the change rate of the pixel number of the juice exudation area between adjacent frames as the exudation area change rate.
[0012] Optionally, S3 further comprises the following steps: extracting the texture feature based on the gray level co-occurrence matrix in the juice exudation area, and calculating the slope of the texture feature value change over time as the exudation area texture evolution feature.
[0013] Optionally, S4 comprises the following steps: inputting the time sequence data of the exudation area change rate and the time sequence data of the exudation area texture evolution feature into a pre-trained long short-term memory network model.
[0014] Optionally, the long short-term memory network model analyzes the time dependence of the dynamic feature, and outputs a structured quality prediction result, the quality prediction result at least includes the numerical prediction of the juice retention rate and the grade score of the cell integrity.
[0015] The beneficial effects of the present application are as follows: The present application arranges an industrial camera in a constant temperature and humidity environment to stabilize the acquisition parameters and obtain the thawing process image sequence, and combines with the time stamp label to construct a high consistency image data stream covering the whole thawing process; compared with the traditional quality evaluation method based on static images, the whole process dynamic behavior of juice exudation and surface change can be captured, and the time sensitivity and authenticity of the thawing quality detection are improved.
[0016] The present application aims at the problem of condensate water interference exudation area identification in the thawing process, constructs a three-stage interference elimination mechanism including dynamic frame difference method to identify the significant change area, region growing algorithm to enhance the spatial connectivity, and multispectral ratio analysis to distinguish the condensate water and juice, and combines with the image restoration algorithm to complete the pixel level correction; the error caused by the condensate water reflection and local shielding on the subsequent area and texture extraction is reduced, and the stability and reliability of the quality feature data are improved.
[0017] This invention constructs a temporal feature vector by combining the rate of change of juice seepage area and the rate of change of texture energy, and inputs it into a pre-trained long short-term memory neural network (LSTM). The output includes structured prediction results of juice retention rate and cell integrity. This not only realizes automated, data-driven prediction of post-thaw quality level, but also has strong time-dependent modeling capabilities, improving the traditional static visual evaluation + manual assessment mode and enhancing the intelligence and practicality of thaw quality assessment. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Fig. 1 This is a flowchart of a method according to an embodiment of the present invention; Fig. 2 This is a logical framework diagram of an embodiment of the present invention; Detailed Implementation
[0020] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. For some well-known technologies, those skilled in the art may also use other alternative methods to implement the invention. Moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0021] like Figs. 1-2 As shown, the intelligent quality detection method for quick-frozen strawberries after thawing based on visual recognition includes the following steps: S1: Collect sequence images of quick-frozen strawberries during the thawing process to obtain image sequences including time dimension information; S1 specifically includes: The frozen strawberry samples to be tested were placed in a constant temperature and humidity collection area, and an industrial camera fixed directly above the sample was used to capture images at a rate of [missing information - likely a speed or unit of time]. The frame acquisition frequency is such that continuous shooting occurs from the start to the end of the thawing process, resulting in an image sequence with a uniform timestamp. , is represented as: ;in, Indicates at time The acquired single-frame image represents the time-series image set obtained from the start to the end of the thawing process. Indicates the start time of thawing. Indicates the end time of thawing. This indicates the image acquisition frequency, with a value range of [value range missing]. , denotes the time interval between the acquisition of two adjacent images, denotes the duration of the entire thawing process; each image is accompanied by a time stamp for recording the acquisition time information, ensuring the continuity and traceability of the time dimension of the sequence.
[0022] To ensure the stability and consistency of data acquisition, the acquisition environment is maintained at a constant temperature and humidity, i.e., the environmental temperature and relative humidity remain constant: ; wherein, denotes the rate of change of the environmental temperature with respect to time, denotes the rate of change of the environmental temperature with respect to time, denotes the environmental temperature of the acquisition area, denotes the relative humidity of the acquisition area.
[0023] During the entire acquisition process, the environmental temperature and relative humidity change very little with time, and remain essentially constant. This condition indicates that the acquisition environment is at a constant temperature and humidity, and the temperature and humidity do not fluctuate significantly with time. This ensures that the external environment of the frozen strawberries during the thawing process is consistent, thereby making the image acquisition results stable and reliable, and not affected by environmental interference factors, including increased condensation due to temperature rise or changes in surface reflectivity due to humidity fluctuations. This provides more comparable and accurate data for subsequent image analysis.
[0024] The industrial camera is fixedly installed directly above the sample, with the optical axis perpendicular to the sample surface and the viewing angle remaining unchanged, to avoid image distortion or area recognition errors caused by angle deviation. Through the above settings, the obtained image sequence has time dimension consistency, spatial viewing angle stability, and environmental condition uniformity, providing a standardized data basis for subsequent condensation interference elimination and juice exudation dynamic feature extraction; The S1 scheme is mainly to ensure the stability, repeatability and time continuity of the image acquisition process, so as to provide a reliable data basis for subsequent feature extraction and quality prediction. The acquisition is carried out in a constant temperature and humidity environment to avoid the influence of temperature and humidity fluctuations on the thawing speed, surface condensate formation and illumination reflection characteristics of strawberries. If the environmental conditions are unstable, the surface state change during thawing will bring uncertainty, so that the image features cannot truly reflect the natural evolution of strawberry quality. Therefore, constant temperature and humidity control is the key to realizing the comparability and consistency of experiments between different samples. An industrial camera with a fixed viewing angle is used to eliminate image distortion and shadow differences caused by changes in shooting angle and light incidence direction. The camera optical axis is perpendicular to the sample surface, which can ensure that the spatial geometric relationship of each frame of image remains consistent, thereby ensuring that the subsequent extracted exudation area, morphology and texture information are only affected by the sample itself, not by changes in imaging conditions. The acquisition frequency is set in the range of 2-5 frames per minute, which is based on the time scale of the thawing process and the surface change rate of strawberries. Too high a frequency will cause redundant data and increase the storage and computing burden. Too low a frequency may miss the key stage of juice exudation. This frequency range can ensure dynamic continuity while taking into account data processing efficiency. Finally, a uniform timestamp is added to each frame of image to preserve the complete time dimension information, so that subsequent analysis can correspond the image features to the time sequence and realize the calculation of dynamic indicators such as exudation rate and texture evolution. Continuous shooting and recording of time information enable the model to accurately capture the entire process of quality change, rather than making judgments based on static results only. In summary, this scheme standardizes, traces and has time dynamics of the visual data of the thawing process through four key designs of constant temperature and humidity control, fixed camera arrangement, reasonable sampling frequency and time sequence recording, providing a high-quality input basis for subsequent condensate interference elimination and quality evaluation model.
[0025] S2: condensate interference elimination processing is performed on the image sequence to obtain a corrected image sequence; S2 specifically includes: S21: detecting the brightness change area between consecutive frames based on a dynamic frame difference method to calculate the frame difference image of each pixel: ; wherein, represents the time index or timestamp corresponding to the previous frame; represents the pixel coordinates in the image, represents the pixel difference value between time t and the previous frame, t represents the time index or timestamp corresponding to the current frame, represents the gray value of the image at time t at pixel position (x, y), represents the gray value of the image at time at pixel position , The frame difference threshold used in the dynamic frame difference method to determine the significance of pixel changes is when... When this happens, the pixel is marked as a dynamically changing region.
[0026] This expression is the core of the dynamic frame difference method, used to detect dynamically changing regions in an image. During the formation of condensation, its reflective and brightness characteristics manifest as sudden, localized brightness changes in the image, easily resulting in significant grayscale differences across consecutive frames. By calculating the difference between each pixel, regions with sudden brightness changes can be effectively identified, initially pinpointing potential interference areas containing condensation. The advantages of this method are its insensitivity to ambient light changes, low computational cost, and applicability to localized change detection in static shooting scenarios, making it suitable for identifying the dynamic accumulation of condensation during the thawing process of quick-frozen strawberries.
[0027] Then, a connectivity expansion algorithm is used in regions with significant differences, i.e., dynamically changing regions, to obtain a set of candidate regions for condensate water: ; The specific steps include: 1. Input and Objective: Input: Frame difference map Frame difference threshold ; Output: Set of candidate connected components The material properties are not determined in this step, based solely on significant temporal changes.
[0028] 2. Preprocessing (noise suppression and normalization): right Perform small window mid-range filtering or bilateral filtering to reduce isolated noise and salt-and-pepper noise while preserving boundaries; Optionally, normalization can be applied to a fixed dynamic range to facilitate subsequent unified threshold processing; Generate an effective video mask, including excluding areas with fixed height differences such as camera borders and rulers, and grow only within the mask.
[0029] 3. Seed point selection (dual threshold hysteresis strategy): Set a high threshold With low threshold ,in = and > (For example ≈ 1.5 ); Will satisfy (x,y)> The pixels are used as the initial seed set 0; This hysteresis threshold strategy can reduce noise trigger and ensure that region growing is only initiated from the most significant changed pixels.
[0030] 4. Connectivity model and neighborhood search; Connectivity: 4-neighborhood or 8-neighborhood (8-neighborhood is recommended for shape integrity); For each seed, neighborhood expansion is performed using a queue or stack approach.
[0031] 5. Growth admission conditions: for the inclusion of a candidate neighborhood pixel p, the following conditions must be met simultaneously: 5.1. Intensity threshold: ≥ (ensure that it belongs to the changed pixels); 5.2. Region consistency: based on the online statistics of the current region, including the mean , standard deviation , consistency constraints are made, such as: The deviation from the region mean is not more than a threshold (e.g. is not greater than a preset range), or the standard score does not exceed a given coefficient (e.g. 2-3); 5.3. Gradient / boundary constraint: if it is necessary to avoid crossing boundaries, an upper limit constraint on can be introduced, including continuing growth only in areas with small local gradients to maintain the smoothness and consistency of the candidate region.
[0032] After each pixel is included, the region statistics , are updated online to make the threshold adaptive to the true distribution within the region; 6. Stopping condition and region closure: when the expansion queue is empty or the region size reaches the upper limit, including preventing abnormal generalization, the current region growth is stopped; repeat the above expansion process for all seeds to obtain a set of initial connected regions.
[0033] 7. Region post-processing (morphology and merging): Small region elimination: delete small connected domains with an area less than , including noise and flicker points; Hole filling: fill the internal cavities to obtain topologically complete candidate patches.
[0034] Morphological smoothing: perform light opening / closing operations on the boundary as needed to remove burrs and bridge fine gaps.
[0035] Adjacent merging: merge adjacent small patches with a spatial distance less than and similar intensity statistics to avoid excessive fragmentation; 8. Output set: the union of all connected components obtained by the above procedure as the candidate set , which represents the region with significant temporal change, and the above procedure only guarantees the connectivity and consistency; whether it is condensation water will be determined in the subsequent multispectral discrimination, including the infrared / visible light ratio threshold material property identification.
[0036] wherein, the pixel set of the condensation water interference region obtained by region growing, represents a region growing function for expanding the connected region from the seed pixel, represents the frame difference image between the current frame and the previous frame, represents the frame difference threshold for determining whether the pixel change is significant.
[0037] The core purpose of S21 is to identify the condensation water interference region in the image sequence, thereby providing a basis for subsequent image correction and feature extraction; its design is based on two key technologies: dynamic frame difference method and region growing algorithm, which are explained as follows: Condensation water gradually condenses on the surface of strawberries or the shooting window during thawing, causing a significant change in local image brightness. Since the collection environment remains static and the camera is fixed, except for condensation water and juice seepage, other parts of the image should remain relatively stable. Therefore, the change in pixel gray value between two consecutive frames can reflect the newly appearing or expanding liquid interference region. By calculating the frame difference and setting a threshold, the dynamic change region of suspected condensation water can be quickly screened out; Dynamic frame difference can only detect individual pixels with significant gray scale changes, which are often fragmented and discontinuous. Condensation water has a certain connectivity and aggregation in the actual picture, appearing as a continuous region rather than an isolated point. Therefore, a region growing algorithm is used to expand the seed point with high frame difference pixels according to gray scale similarity and neighborhood connectivity, which can effectively construct a more complete condensation water candidate region for subsequent segmentation and repair processing.
[0038] The setting of the frame difference threshold is crucial for recognition effect. If it is set too low, natural light fluctuations, image noise, and other non-condensation water factors will also be marked as interference regions; if it is set too high, some real condensation water regions may be missed. Therefore, this threshold needs to be calibrated through experiments to ensure both sensitivity and recognition accuracy.
[0039] In summary, this method combines temporal change detection and spatial structure completion, does not rely on external labeling or prior models, and is suitable for automated and highly versatile condensation water region identification tasks. It provides accurate interference region positioning for subsequent physical spectral-based differentiation of condensation water and juice seepage, as well as image repair.
[0040] S22: Using multi-spectral analysis method, extract reflectance vector at different wave bands; ; wherein, pixel multi-band reflectance vector of pixel, represents reflectance intensity of red, green, blue wave band of visible light, represents reflectance intensity of near-infrared wave band, represents reflectance of red wave band, represents reflectance of green wave band, represents reflectance of blue wave band, represents horizontal and vertical coordinate position of pixel in image; According to experience, determine the condition to distinguish condensate water and juice area: ; When the ratio of reflectance of near-infrared wave band to the sum of reflectance of three visible light wave bands (red, green, blue) of a certain pixel is greater than a set threshold value η, it is considered that the pixel belongs to condensate water interference area wherein, represents reflectance threshold value of condensate water and juice, and the value is 0.25-0.45, which is used to determine the characteristic difference of wave band energy ratio. Under constant light condition, the near-infrared reflectance of condensate water area is usually 30%-45% of the sum of reflectance of three visible light wave bands, while the ratio of strawberry juice area is generally lower than 25%. Therefore, the threshold value is set in the range of 0.25-0.45, which can better distinguish the two; When the ambient light is weak or the near-infrared illumination is low, a low value (about 0.25-0.30) can be appropriately taken; When the ambient light is strong or the condensate water reflection is significant, a higher value (about 0.35-0.45) can be appropriately taken to avoid misjudging the high light of fruit surface as condensate water.
[0041] This range takes into account the natural fluctuation of spectral reflectance and the difference of different sample surface characteristics, and can adapt to most thawing experimental conditions without the need for recalibration.
[0042] At pixel position In the prior art, after multi-band imaging of the same scene, a reflectivity vector of the pixel under different spectral bands is obtained, and the vector comprehensively describes the energy reflection characteristics of the pixel under red light, green light, blue light and near-infrared light. There is a significant difference between the condensed water and the strawberry juice in the spectral reflectivity characteristics. The condensed water mainly shows the characteristics of strong surface specular reflection and weak near-infrared absorption, while the juice area has strong near-infrared absorption and low visible light reflectivity due to the presence of pigments and sugar. Therefore, by simultaneously obtaining reflectivity information under multiple bands, the two liquid areas can be more accurately distinguished; the traditional single-band gray or RGB image often cannot effectively distinguish the similar visual performance of the condensed water and the juice, and the introduction of the near-infrared band information can enhance the sensitivity to the difference in material composition and realize the discrimination based on the physical spectral characteristics. S22 is to distinguish the condensed water area and the juice exudation area from the physical optical characteristics by using multi-spectral imaging technology. During the thawing process of the quick-frozen strawberries, the condensed water and the juice may appear on the sample surface, and the two are similar in the visible light image and are easy to confuse. However, from the spectral reflectivity characteristics, the two are obviously different: the condensed water surface is smooth, the refractive index is high, and the main performance is specular reflection, which is strong in the visible light band and weak in the near-infrared absorption; while the strawberry juice contains sugar, pigments and organic acids, the surface is rough, the scattering reflection is dominant, and the reflection is weak in the visible light but the near-infrared absorption is significant.
[0043] Based on this physical difference, the scheme uses multi-spectral imaging to obtain the reflectivity vector of each pixel under four bands of red, green, blue and near-infrared, and determines the pixel attribute by calculating the ratio of the sum of the near-infrared reflectivity to the visible light reflectivity. When the ratio is higher than the empirical threshold, it means that the pixel has relatively stronger reflection energy in the near-infrared region, which is consistent with the spectral characteristics of the condensed water, so it is classified as a condensed water area.
[0044] The design basis of this determination method is the physical law of spectral energy distribution. Different substances have different absorption and reflection characteristics for different bands of light. Through multi-band joint analysis, instead of relying on single visible light brightness information, the accuracy and robustness of the condensed water recognition can be effectively improved. Therefore, the scheme uses the spectral discrimination principle to realize the automatic distinction between the condensed water and the juice, and provides a region segmentation basis for subsequent image repair and quality feature extraction.
[0045] S23: For the identified condensed water interference area , a correction algorithm based on image repair is used, including Poisson repair or sample texture migration method, to reconstruct the pixels: ; Among them, represents the original image frame at time t, represents the corrected single-frame image, represents an image restoration operation, and finally obtains a corrected image sequence : ; wherein , , …, represents the sequence index; The sequence effectively eliminates the interference of condensed water, providing clear and interference-suppressed high-quality image data for subsequent dynamic feature extraction of juice seepage.
[0046] S23 is a pixel-level repair and correction of the identified condensed water interference area to restore the true visual information of the original strawberry surface, ensuring that the subsequent juice seepage feature extraction is not disturbed. Condensed water will form high-light reflection spots or blurred areas on the surface of the strawberry or the imaging window during thawing, which often blocks the true surface texture, causing the feature extraction model to misjudge. Therefore, after identifying the condensed water area, image restoration reconstruction must be performed on it to make the texture, brightness and color of the disturbed area transition naturally with the surrounding area.
[0047] Image restoration function The design is based on two commonly used methods: One is Poisson restoration, which solves the pixel gradient field in the condensed water area, making the boundary gradient consistent with the surrounding unobstructed area, thereby restoring continuous lighting and tone distribution; The second is the sample texture transfer method, which uses the texture features of the surrounding undisturbed area to fill in, making the repaired area consistent in local structure and color statistics; The combination of these two methods can balance smooth transition and detail restoration, avoiding problems such as edge abruptness and color block distortion caused by direct masking or interpolation.
[0048] In summary, the design rationale of this scheme is based on the principle of image physical consistency, which combines local gradient matching and texture structure reconstruction to naturally repair the condensed water interference area and obtain a corrected image sequence, providing clear and interference-free high-quality data input for subsequent dynamic feature extraction and quality prediction.
[0049] S3: Extract juice seepage dynamic features from the corrected image sequence, including seepage area change rate and seepage area texture evolution features; S3 specifically includes: S31: For each frame of the corrected image sequence An image segmentation algorithm is used, including a superpixel-based region segmentation method, to identify the juice seepage area and generate a binary mask image : ; The expression represents that in the image at time t, for each pixel position (x, y), it is judged whether it belongs to the juice exudation area, if the pixel belongs to the exudation area, it is assigned a value of 1 in the binary mask image; if not, it is assigned a value of 0. The binary image generated in this way can identify the position and range of all juice exudation areas in the current frame in space. In image analysis, in order to quantitatively calculate a specific area, including area, shape or texture features, it is usually necessary to separate the area from the background. The form of the binary mask is simple, efficient in calculation, and can clearly distinguish the region of interest (ROI) from the non-target area. By defining the exudation area mask , the number of pixels can be easily counted to calculate the juice exudation area, and further used for dynamic change rate analysis; represents the pixel set of the juice exudation area at time ; The above-mentioned superpixel segmentation method has the basic idea of first dividing the image into a plurality of superpixel units with similar color, brightness or texture features, and then determining the exudation area based on the aggregation relationship of these units. The specific process is as follows: 1. First, pre-process the corrected image , including Gaussian smoothing denoising and brightness normalization, and then divide the entire image into a plurality of superpixel units using a commonly used superpixel segmentation algorithm, each superpixel is a small area composed of pixels with similar color space and spatial position, the internal features are relatively uniform, and the boundary is accurate; 2. Calculate a plurality of descriptive features for each superpixel, including average brightness, color channel mean, including R, G, B components or Lab color space values, local contrast and texture energy, etc. These features can reflect the physical properties of the local area, among which the juice exudation area usually shows increased brightness, decreased color saturation and increased texture smoothness; 3. Input the features of all superpixels into a set classification criterion, which can be a threshold rule or a trained clustering model. If the brightness and saturation features of a superpixel simultaneously satisfy the juice exudation feature threshold condition, the superpixel is marked as a candidate exudation area; if not, it is marked as background or non-exudation area.
[0050] 4. Perform aggregation processing based on the spatial adjacency relationship on adjacent candidate superpixels, merge regions that are connected to each other and similar in features into a whole exudation area; at the same time, edge constraints are used, including using gradient amplitude or boundary confidence to correct the edge, to ensure that the segmentation result closely follows the real juice boundary; 5. Finally, define the superpixel set that is judged to be a juice exudation area as where the pixel value of the bleeding area is 1 and the rest is 0; Then the bleeding area of each frame is calculated: where B(t) represents the binary mask image at time t The sum of all pixels in B(t) is the total number of pixels in the bleeding area, i.e., the area of the bleeding area in the current frame. When represents that the pixel belongs to the bleeding area, represents that the pixel does not belong to the bleeding area, and thus the sum result represents the number of all bleeding pixels in the current frame; this expression is based on the basic principle of binary area calculation. After the bleeding area is identified by a superpixel or other segmentation algorithm, the binary mask image provides pixel-level spatial distribution information. By counting the number of pixels with a value of 1 in the mask, the projected area of the bleeding area in the image can be obtained. If the image resolution is fixed and the pixel size is known, the area value can be further converted into a real physical area. This method has the advantages of simple calculation and strong adaptability, and can directly reflect the growth trend of juice bleeding over time, providing basic data for subsequent calculation of the bleeding area change rate, and is one of the key parameters for representing the degree of juice release in the thawing process; and the bleeding area change rate is calculated according to the area change between adjacent frames: ; represents the relative change rate of the bleeding area between two adjacent frames, i.e., the growth or reduction amplitude of the bleeding area from the previous time t-1 to the current time t. If , it indicates that the bleeding area is expanding; if , it indicates that the bleeding area is shrinking; and if , it indicates that the bleeding area remains basically unchanged. Wherein, represents the bleeding area change rate at time . represents the corrected image at time ; represents the binary mask of the bleeding area; represents the pixel set of the bleeding area at time ; represents the pixel area of the bleeding area at time ; represents the bleeding area change rate between adjacent frames. represents the spatial coordinate position of the pixel in the image; represents the time index of image acquisition.
[0051] S32: Within each frame of the bleeding area , texture feature values are extracted based on a gray level co-occurrence matrix. One or more of the four commonly used texture indicators are selected, such as energy, contrast, homogeneity, or entropy. Taking the energy feature as an example, the calculation formula is: ; wherein, denotes the time instant the gray level in the gray level co-occurrence matrix of the bleeding region and the joint probability distribution, is the number of gray levels; the above expression denotes: calculating the energy eigenvalue of the gray level co-occurrence matrix at the time instant t, which is used to quantify the uniformity or regularity of the image texture. The gray level co-occurrence matrix reflects the probability distribution of the spatial co-occurrence of the pixel gray levels and in the image, and the energy eigenvalue is the sum of the squares of the probabilities, which represents the smoothness or repetition degree of the texture. The greater the value, the more concentrated the gray distribution and the smoother the texture; the smaller the value, the more discrete the gray distribution and the more complex the texture. The expression is based on the gray level co-occurrence matrix texture feature theory; the energy eigenvalue is one of the commonly used texture statistical indicators, which can reflect the spatial autocorrelation of the pixel gray levels in the image; for the juice bleeding region in the thawing process of the quick-frozen strawberry, the surface texture will change over time, being rough and uneven at the beginning, and gradually becoming smooth and the reflection being enhanced. By calculating the energy eigenvalue and monitoring its change over time, the texture evolution trend can be quantitatively described, so as to serve as a key characterization parameter of the thawing quality change.
[0052] The slope of the change of the texture eigenvalue over time is calculated, which is used as the texture evolution feature of the bleeding region: ; when the time interval is normalized to 1 frame, the difference value can be directly taken; wherein, denotes the texture energy eigenvalue at the time instant ; denotes the slope of the change of the texture feature over time, including the texture evolution feature.
[0053] The above expression denotes the change amount of the texture energy eigenvalue between the adjacent two frames of images, that is, the change rate of the texture feature over time. If , it means that the texture energy of the current frame is higher than that of the previous frame, and the image texture tends to be smoother and the brightness distribution is more concentrated; if , it means that the texture energy decreases, and the surface texture becomes more complex or uneven. The expression is derived from the time series difference idea and is used to reflect the dynamic change trend of the texture feature over time. In the thawing process of the quick-frozen strawberry, the juice bleeding will cause the surface to gradually lose the roughness and the reflection to be enhanced, and the texture energy generally shows an upward trend. By calculating the energy difference value of the adjacent frames, the texture evolution speed changing over time can be quantified without complex time modeling. Therefore, The surface state change of juice exudation area can directly reflect the trend of surface smoothing or roughening during thawing process, which is an important dynamic indicator for describing the trend of surface smoothing or roughening during thawing process, and provides key time characteristic input for quality evaluation model.
[0054] Finally, the two types of dynamic features extracted are combined into a feature vector: At time t, the exudation area change rate and the texture feature change rate are combined into a two-dimensional feature vector , which is used to represent the spatial variation characteristics and surface texture evolution characteristics of the frozen strawberry during thawing process. The vector comprehensively reflects the dynamic behavior of the thawing process, and provides input features for the subsequent quality evaluation model; the expression is based on the idea of multi-feature fusion, which combines the geometric indicators reflecting the quantitative change and the structural indicators reflecting the qualitative change, including the texture evolution characteristics, so that the model can capture the speed of juice exudation and the surface organization change law during thawing process. The area change rate reflects the macro dynamic process of juice exudation, and the texture change rate describes the uniformization trend of the surface at the microscopic level. The combination of the two can more comprehensively describe the evolution state of the thawing quality of strawberries, thereby improving the accuracy and stability of quality prediction; among them, represents the exudation area change rate between adjacent frames; the feature vector is used as the input of the subsequent quality evaluation model; it is used to reflect the speed of juice exudation and the texture evolution trend during thawing process, and provides quantitative basis for quality change prediction; By analyzing the time sequence change of the juice exudation area in the corrected image sequence, the key features that can represent the thawing dynamic process are extracted to reflect the quality change trend of the frozen strawberry during thawing process; during thawing process, the juice on the surface of the strawberry will gradually exude and form a reflective wet area, which is characterized by increased brightness and smooth texture in the image. By extracting these areas based on superpixel or threshold segmentation algorithm, the spatial distribution of the exudation area can be automatically identified. This design is based on the physical characteristics of image brightness and texture change, which can avoid subjective human labeling errors, making the detection results objective and repeatable; as the thawing time advances, the area of the juice exudation area will usually gradually expand. After normalizing the exudation area change between adjacent frames, the relative change rate can reflect the dynamic characteristics of the juice exudation rate. This index is time sensitive and can describe the speed and stage change of juice release during thawing process, which is an intuitive parameter for measuring the thawing state of the internal organization of the strawberry; the surface of the strawberry is rough at the beginning of thawing, and as the juice coverage increases, the surface gradually becomes smooth, and the energy feature in the gray level co-occurrence matrix increases due to the uniformity of the texture, and the time change slope of the energy feature can quantitatively describe the evolution trend of the surface from rough to smooth.
[0055] S4: input the juice exudation dynamic characteristics into the quality evaluation model, and output the quality prediction result at the completion of thawing; S4 specifically includes: S41: construct an input time sequence characteristic matrix: The expression constructs a feature vector of each time point t in the thawing process Each vector is composed of two key indicators: the juice exudation area change rate And the texture energy change rate And these time sequence characteristics are combined in time sequence into a complete input sequence For subsequent model analysis. Wherein X represents the juice exudation dynamic characteristic sequence in the entire thawing period, Ft represents the feature vector at time t; represents the exudation area change rate at time t, represents the texture energy change rate at time t. , …, represents different time points in the thawing process; The expression embodies the idea of time sequence characteristic modeling; in the thawing process of strawberries, juice exudation and surface texture will dynamically evolve over time, rather than being static and unchanging. By inputting these two characteristics in the form of time sequence into the model, the model can learn the correlation between the change trend and the thawing quality. reflects the juice release speed, reflects the surface structure change rate, and the two form a state description at each moment. The overall sequence Then constitutes the dynamic behavior trajectory of the whole thawing process, providing a high-quality time sequence input basis for the subsequent LSTM model; S42: input the sequence Into the pre-trained LSTM network: The expression indicates that the time sequence X of juice exudation dynamic characteristics is input into a pre-trained long short-term memory neural network (LSTM) model. Based on the historical change pattern of these time sequence characteristics, the model outputs a structured quality prediction result Y, wherein represents the long short-term memory network model, represents the structured output result vector.
[0056] LSTM is a kind of recurrent neural network suitable for processing time series data, which has good memory ability and long-term dependence modeling capability. In the process of frozen strawberry thawing, the juice exudation area and texture features evolve gradually with time, which has obvious time dependence. By inputting these features in time sequence into LSTM, the model can automatically learn the mapping relationship between the dynamic change rule and the final quality indicators, including juice retention rate and cell integrity, so as to realize intelligent prediction of thawing quality. This design takes advantage of LSTM in modeling nonlinear, time-varying and physiological processes, which can significantly improve the understanding ability and prediction accuracy of the model to the thawing behavior. S43: The model output result includes at least two items: ; The structured quality prediction result Y output by the model finally includes two key indicators, juice retention rate and cell integrity score , the former is a continuous numerical value, which is used to quantify the proportion of juice retained by the fruit after thawing; the latter is a discrete level, which is used to represent the damage or integrity of the cell structure of strawberry; this output form reflects two core dimensions of thawing quality: Juice retention rate is a direct indicator to measure the water loss of fruit, usually expressed as a percentage, the higher the value, the better the water retention of fruit tissue and the better the quality; Cell integrity score reflects the degree of cell wall rupture or tissue collapse during thawing, which has an important influence on fruit texture and taste, and is suitable for classification and expression by grade score, including A / B / C / D; By outputting these two indicators at the same time, the model can more comprehensively evaluate the overall quality of thawed strawberries, both quantitative analysis at the continuous numerical level and qualitative judgment at the level of grade evaluation, improving the interpretability and practicality of the evaluation results; among them, represents the numerical prediction result of juice retention rate, reflecting the degree of water loss of fruit during thawing, represents the grade score of cell integrity, output as a discrete level, including A / B / C / D, which evaluates the integrity of the tissue structure of strawberry.
[0057] The present application covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present application. In order to make the public have a thorough understanding of the present application, specific details are described in the following preferred embodiments of the present application, and the present application can also be completely understood without the description of these details for those skilled in the art. In addition, in order to avoid unnecessary confusion to the essence of the present application, well-known methods, processes, procedures, elements and circuits, etc. are not described in detail.
[0058] The above merely describes the preferred embodiments of the present application, and it should be pointed out that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should also be considered as falling within the protection scope of the present application.
Claims
1. A method for intelligent detection of the quality of quick-frozen strawberries after thawing based on visual recognition, characterized in that, The method comprises the following steps: S1: collecting sequential images during the thawing process of quick-frozen strawberries to obtain an image sequence including time dimension information; S2: performing condensate interference elimination processing on the image sequence to obtain a corrected image sequence; S3: extracting juice exudation dynamic characteristics from the corrected image sequence, the juice exudation dynamic characteristics including exudation area change rate and exudation area texture evolution characteristics; S4: inputting the juice exudation dynamic characteristics into a quality evaluation model to output a quality prediction result at the completion of thawing. 2.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 1, characterized in that, The collection of sequential images during the thawing process of quick-frozen strawberries in S1 specifically comprises: placing the quick-frozen strawberry sample to be detected in a collection area in a constant temperature and humidity environment, continuously shooting from the beginning of thawing to the end of thawing by using an industrial camera fixed above the sample, and obtaining an image sequence with uniform time stamps. 3.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 1, characterized in that, The collection process of the quick-frozen strawberries further comprises limiting the collection environment, specifically comprising: S11, clearly performing under constant temperature and humidity conditions; S12, device configuration: using an industrial camera with a fixed viewing angle; S13, collection parameters: limiting the collection frequency range; S14, time information: emphasizing continuous shooting and recording time stamps throughout the process to ensure the integrity of the time dimension information; S15, process coverage: clearly covering the whole process from the beginning to the end of thawing during the collection period. 4.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 1, characterized in that, The condensate interference elimination processing on the image sequence in S2 specifically comprises: identifying the condensate interference area based on a dynamic frame difference method and a region growing algorithm; distinguishing the condensate and juice exudation areas through multispectral analysis; correcting the identified condensate interference area by using an image inpainting algorithm; obtaining a corrected image sequence with the condensate interference eliminated. 5.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 4, characterized in that, The identification of the condensate interference area comprises detecting the brightness change area between consecutive frames by using a dynamic frame difference method, calculating the frame difference image of each pixel to obtain a dynamic growing area, and expanding the connectivity in the dynamic growing area by using a region growing algorithm; the connectivity expansion comprises: Filtering and setting high threshold value for frame difference image , low threshold value , and taking pixels higher than as initial seed points Based on the 8-neighbor connected model, pixel-by-pixel expansion is performed, and a neighborhood pixel is included in the growing region when it meets the condition that ≥ and is consistent with the current region gray statistical quantity, and the region mean and standard deviation are updated in real time during the expansion process to realize adaptive growth; wherein represents the frame difference value of the pixel point p at time t; that is, the brightness change amplitude of the pixel point between two consecutive frames of images; After the expansion is completed, the condensate interference area set is obtained through morphological smoothing, small area rejection, and adjacent connected domain merging post-processing operations. 6.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 4, characterized in that, The correction processing specifically comprises: reconstructing the pixels in the condensate interference area at the pixel level by using an image inpainting function; the image inpainting function is based on the Poisson inpainting method, which reconstructs the pixel gradient field and neighborhood texture distribution in the condensate interference area to make the brightness and hue of the repaired area continuously transition and consistent with the surrounding non-interference area, generates a corrected image frame, and constitutes a corrected image sequence after the condensate interference is eliminated. 7.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 1, characterized in that, The extraction of juice exudation dynamic characteristics in S3 specifically comprises identifying the juice exudation area in each image based on an image segmentation algorithm, and calculating the change rate of the number of pixels in the juice exudation area between adjacent frames as the exudation area change rate. 8.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 7, characterized in that, S3 also comprises: extracting texture features based on a gray level co-occurrence matrix in the juice exudation area, and calculating the slope of the texture feature value change over time as the exudation area texture evolution characteristics. 9.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 1, characterized in that, The S4 comprises inputting the time series data of the exudation area change rate and the time series data of the exudation area texture evolution feature into a pre-trained long short-term memory network model. 10.The visual recognition-based intelligent detection method for the quality of quick-frozen strawberries after thawing according to claim 9, characterized in that, The long short-term memory network model outputs a structured quality prediction result by analyzing the time dependence of the dynamic feature, and the quality prediction result at least includes numerical prediction of juice retention rate and grade score of cell integrity.