Food traceability electronic sealing method and system

By acquiring the motion vector information of traceability electronic tags on food packaging, constructing a point spread function model for frequency domain deconvolution processing, and combining texture analysis and morphological processing, the problem of detecting the label sealing status under high-speed motion conditions was solved, achieving accurate identification of label information and integrity of traceability data.

CN121504483APending Publication Date: 2026-02-10ANHUI AIBAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511571534.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

On food packaging production lines, the sealing status of traceability electronic tags is difficult to detect accurately under high-speed conditions, leading to errors in tag information recognition and affecting the accuracy of traceability data.

Method used

By acquiring the exposure image sequence of traceability electronic tags on food packaging in motion, motion vector information is determined, a point spread function model is constructed for frequency domain deconvolution processing, and combined with texture analysis and morphological processing, the seal status is determined.

Benefits of technology

It enables the determination of the seal reliability of traceability electronic tags while food packaging is in motion, ensuring accurate identification of tag information and integrity of traceability data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504483A_ABST
    Figure CN121504483A_ABST
Patent Text Reader

Abstract

The invention provides a food traceability electronic sealing method and system. According to the method, an exposure image sequence of a traceability electronic tag on a food package in a motion state is obtained, motion vector information of the traceability electronic tag among frame exposure images is determined, and then a point spread function model is constructed according to the motion vector information and configuration parameters of an exposure imaging system. And the point spread function model is used for performing frequency domain deconvolution processing on each frame of exposure image in the exposure image sequence to obtain a corresponding processing image sequence, and then determining the sealing state of the traceability electronic tag according to the exposure image sequence and the processing image sequence, so that the traceability of the food package is realized when the food package is in a moving state. And the sealing reliability of the traceability electronic tag can be effectively judged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to data processing technology, and in particular to a method and system for electronic sealing for food traceability. Background Technology

[0002] With increasing efforts in food safety supervision and rising consumer demands for food origin and quality, food traceability technology is being widely applied in production, packaging, and distribution. By affixing traceability electronic tags to the surface of food packaging, the packaging can be linked to an electronic information system to record information such as production batch, raw material source, and distribution path, enabling full-process information tracking and traceability.

[0003] On food packaging production lines, traceability electronic tags are typically affixed to the surface of food packaging at high speed by automated labeling equipment. Due to the continuous movement of the packaged goods on the conveyor belt, as well as mechanical vibrations and surface morphology differences during the labeling process, the label sealing area is prone to problems such as motion blur, uneven lighting, and surface reflection during imaging. These factors not only affect the visual inspection of the sealing status but may also cause errors in label information recognition, thereby affecting the accuracy of subsequent traceability data.

[0004] In high-speed production line environments, camera-captured label images are prone to severe motion blur, making it difficult to identify surface defects (such as bubbles and wrinkles). Manual inspection, on the other hand, is inefficient and inconsistent, unsuitable for large-scale continuous production environments, and makes it difficult to provide real-time feedback on seal quality. Summary of the Invention

[0005] This application provides a method and system for electronic sealing of food traceability, which can effectively determine the reliability of the electronic sealing of traceability tags when food packaging is in motion.

[0006] Firstly, this application provides a method for electronic sealing for food traceability, including: Acquire the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and determine the motion vector information of the traceability electronic tag between each frame of exposed images; A point spread function model is constructed based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. The sealing status of the traceability electronic tag is determined based on the exposed image sequence and the processed image sequence.

[0007] Optionally, constructing the point spread function model based on the motion vector information and the configuration parameters of the exposure imaging system includes: The length axis is determined based on the dominant direction in the motion vector information, wherein the dominant direction is the direction corresponding to the maximum peak value in the vector direction histogram corresponding to the motion vector information; The blur length is determined based on the average motion speed in the motion vector information and the exposure time in the configuration parameters, wherein the blur length is used to characterize the range of the blur extension area of ​​the traceability electronic tag on the imaging plane during the exposure time; The diffusion vector is determined based on the length axis and the fuzzy length, and the convolution kernel of the point diffusion function model is configured as a uniformly distributed linear kernel along the diffusion vector.

[0008] Optionally, after configuring the convolution kernel of the point spread function model as a uniformly distributed linear kernel along the spread vector, the method further includes: The uniformly distributed linear kernel is normalized so that the sum of all elements in the convolution kernel of the normalized point spread function model is 1, so that the corresponding image frames in the exposed image sequence and the processed image sequence have the same overall brightness.

[0009] Optionally, after normalizing the uniformly distributed linear kernel, the method further includes: A two-dimensional Fourier transform is performed on the point spread function model to obtain the frequency response distribution of the point spread function model. The two-dimensional Fourier transform is used to convert the point spread function model from a spatial domain representation to a frequency domain representation. The frequency response distribution is used to characterize the transmission capability of different spatial frequency components. The modulation transfer function is obtained based on the optical transfer parameters of the exposure imaging system. The modulation transfer function is used to characterize the transfer efficiency of the exposure imaging system for different spatial frequency components. The frequency response distribution is subjected to spectral bandpass constraint based on the modulation transfer function to suppress high-frequency components that exceed the transmission range of the modulation transfer function.

[0010] Optionally, determining the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence includes: Spatial registration is performed on the processed image sequence and the corresponding exposed image sequence so that the processed image sequence and the exposed image sequence correspond pixel by pixel in the same coordinate system; The edge detail features in the processed image sequence are enhanced, and the enhanced processed image sequence is fused with the exposed image sequence to generate a corresponding image sequence to be identified; In the image sequence to be identified, a detection algorithm based on texture analysis and morphological processing is used to extract the defect location of the traceability electronic tag sealing area, and the sealing status is determined to be qualified or unqualified based on the area ratio of the defect location and a preset threshold.

[0011] Optionally, the step of extracting the defect location of the traceability electronic tag sealing area in the image sequence to be identified using a detection algorithm based on texture analysis and morphological processing includes: Texture features are extracted from the image blocks corresponding to the sealing area of ​​the traceability electronic tag in the image sequence to be identified, and texture feature outliers are determined. The image block is preprocessed morphologically to remove noise and smooth the background using opening operations, and to enhance the contour features of areas with abnormal brightness or darkness using top-hat and black-hat transformations. The texture feature outliers are fused with the morphological preprocessing results to generate a defect probability distribution map of the sealing area; The defect probability distribution map is segmented according to an adaptive threshold, the defect mask of the sealing area is extracted, and the boundary coordinates and area information of each defect location are determined based on the connected component analysis results of the defect mask.

[0012] Optionally, the sealing status is used to characterize whether there are bubbles or wrinkles after the traceability electronic tag is sealed onto the food packaging.

[0013] Secondly, this application provides a food traceability electronic seal system, comprising: The acquisition module is used to acquire the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and to determine the motion vector information of the traceability electronic tag between each frame of exposed images; The processing module is used to construct a point spread function model based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. The determination module is used to determine the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence.

[0014] Thirdly, this application provides an electronic device, comprising: Processor; and, Memory for storing the executable instructions of the processor; The processor is configured to perform any of the possible methods described in the first aspect by executing the executable instructions.

[0015] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the possible methods described in the first aspect.

[0016] The food traceability electronic sealing method and system provided in this application acquires the exposure image sequence of the traceability electronic tag on the food packaging in motion, and determines the motion vector information of the traceability electronic tag between each frame of the exposure image. Then, a point spread function model is constructed based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. Finally, the sealing status of the traceability electronic tag is determined based on the exposure image sequence and the processed image sequence, thereby realizing an effective judgment on the sealing reliability of the traceability electronic tag when the food packaging is in motion. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 This is a schematic flowchart illustrating a food traceability electronic seal method according to an example embodiment of this application; Figure 2 This is a flowchart illustrating a food traceability electronic seal method according to another example embodiment of this application; Figure 3 This is a schematic diagram of the structure of a food traceability electronic seal system according to an example embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an example embodiment of this application.

[0019] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0021] Figure 1 This is a flowchart illustrating an electronic seal method for food traceability according to an example embodiment of this application. Figure 1 As shown, the food traceability electronic seal method provided in this embodiment includes: S101. Obtain the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and determine the motion vector information of the traceability electronic tag between each frame of exposed images.

[0022] First, a high-speed industrial camera synchronized with the food packaging conveyor is used to acquire a continuous sequence of exposed images of traceability electronic tags, and each frame of the exposed image sequence is timestamped.

[0023] Specifically, high-speed industrial cameras can be deployed on food packaging production lines and synchronized with the conveyor belt's motion control system to ensure that the acquisition cycle and exposure time cover the continuous movement of the traceability electronic tags. Camera configuration includes exposure time, frame rate, resolution, and global shutter mode to avoid rolling shutter distortion during high-speed movement. Each acquired image frame is timestamped, forming a time-ordered sequence of exposure images.

[0024] Secondly, brightness equalization and noise reduction preprocessing are performed on each frame of the exposed image sequence, and the region of interest (ROI) containing the traceability electronic tag is extracted.

[0025] Specifically, brightness equalization and noise reduction can be performed on each frame of the exposed image to improve the robustness of subsequent motion vector calculations. Then, localization algorithms based on color, edge, or template matching can be used to extract the ROI region containing the traceability electronic tag, reducing the computational load of motion estimation.

[0026] Next, for the regions of interest images in adjacent frames, the dense optical flow algorithm is used to calculate the motion vector information of each pixel or feature point, and the overall motion direction and speed of the traceability electronic tag are determined based on the motion vector direction histogram.

[0027] Specifically, an algorithm based on optical flow (such as dense optical flow or pyramidal optical flow) can be used to calculate the motion vector of each pixel or feature point between adjacent ROI images. Then, the motion vector field is averaged and histogram of orientation is statistically analyzed to determine the overall motion direction and velocity of the label.

[0028] Optionally, feature point matching (such as ORB, SURF) and random sampling consensus algorithms can be used to remove outliers and improve motion estimation accuracy.

[0029] Finally, feature point matching and random consistency algorithms are used to remove outliers in the motion vector information to improve the accuracy of motion vector calculation and output motion vector information bound to the exposure image sequence.

[0030] Specifically, the motion vector information between each frame can be output as structured data (direction, velocity, pixel displacement) and bound to the exposure image sequence for subsequent point spread function model construction and deblurring processing.

[0031] S102. Construct a point spread function model based on motion vector information and the configuration parameters of the exposure imaging system.

[0032] In this step, a point spread function model can be constructed based on motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence.

[0033] In one specific implementation, the length axis can be determined first based on the dominant direction in the motion vector information. The dominant direction is the direction corresponding to the maximum peak value in the vector direction histogram of the motion vector information. Specifically, this can be achieved by statistically analyzing the direction histogram of the motion vector information, where the direction histogram covers a preset direction range. Then, the direction corresponding to the column with the highest peak frequency in the direction histogram is obtained and used as the direction of the length axis.

[0034] Then, the blur length is determined based on the average motion velocity in the motion vector information and the exposure time in the configuration parameters. The blur length characterizes the range of the blurred extension area of ​​the traceability electronic tag on the imaging plane within the exposure time. Specifically, it can be obtained by statistically analyzing the average motion velocity of the effective vectors in the motion vector information, reading the exposure time in the configuration parameters, and then multiplying the average motion velocity by the exposure time to obtain the blur length, which characterizes the range of the blurred extension area of ​​the traceability electronic tag on the imaging plane within the exposure time.

[0035] Next, the diffusion vector is determined based on the length axis and the fuzzy length, and the convolution kernel of the point spread function model is configured as a uniformly distributed linear kernel along the diffusion vector. Specifically, the diffusion vector can be constructed by combining the length axis direction with the fuzzy length. Uniformly distributed linear weights are then configured in the convolution kernel of the point spread function model along the diffusion vector, and the weights are normalized so that the sum of their coefficients equals 1.

[0036] S103. Determine the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence.

[0037] In this step, the location of the traceability electronic tag is detected and located in each frame of the exposed image sequence and the processed image sequence. The detection includes region segmentation and mask generation of the traceability electronic tag based on color, shape or template matching features.

[0038] Then, seal status features are extracted within the traceability electronic tag's location. These features include tag boundary integrity, surface smoothness, and printing clarity. Specifically, the surface smoothness feature detects reflective highlights in the processed image to identify the presence of bubbles or wrinkles on the traceability electronic tag's surface.

[0039] Next, the seal status characteristics are compared with preset thresholds to determine the seal status category of the traceability electronic tag. When the comparison result shows that the seal status characteristics meet the threshold, the seal status of the traceability electronic tag is determined to be a qualified seal status; otherwise, it is determined to be an abnormal seal status.

[0040] In this embodiment, by acquiring the exposure image sequence of the traceability electronic tag on the food packaging in motion, and determining the motion vector information of the traceability electronic tag between each frame of exposure image, a point spread function model is constructed based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of exposure image in the exposure image sequence to obtain the corresponding processed image sequence. Then, the sealing status of the traceability electronic tag is determined based on the exposure image sequence and the processed image sequence, thereby realizing an effective judgment on the sealing reliability of the traceability electronic tag when the food packaging is in motion, so as to ensure that subsequent scanning and traceability will not fail due to the sealing problem of the tag.

[0041] Figure 2 This is a flowchart illustrating a food traceability electronic seal method according to another example embodiment of this application. Figure 2 As shown, the food traceability electronic seal method provided in this embodiment includes: S201. Obtain the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and determine the motion vector information of the traceability electronic tag between each frame of exposed images.

[0042] First, a high-speed industrial camera synchronized with the food packaging conveyor is used to acquire a continuous sequence of exposed images of traceability electronic tags, and each frame of the exposed image sequence is timestamped.

[0043] Secondly, brightness equalization and noise reduction preprocessing are performed on each frame of the exposed image sequence, and the region of interest containing the traceability electronic tag is extracted.

[0044] Next, for the regions of interest images in adjacent frames, the dense optical flow algorithm is used to calculate the motion vector information of each pixel or feature point, and the overall motion direction and speed of the traceability electronic tag are determined based on the motion vector direction histogram.

[0045] Finally, feature point matching and random consistency algorithms are used to remove outliers in the motion vector information to improve the accuracy of motion vector calculation and output motion vector information bound to the exposure image sequence.

[0046] S202. Construct a point spread function model based on motion vector information and the configuration parameters of the exposure imaging system.

[0047] In one specific implementation, the length axis can be determined first based on the dominant direction in the motion vector information. The dominant direction is the direction corresponding to the maximum peak value in the vector direction histogram of the motion vector information. Specifically, this can be achieved by statistically analyzing the direction histogram of the motion vector information, where the direction histogram covers a preset direction range. Then, the direction corresponding to the column with the highest peak frequency in the direction histogram is obtained and used as the direction of the length axis.

[0048] Then, the blur length is determined based on the average motion velocity in the motion vector information and the exposure time in the configuration parameters. The blur length characterizes the range of the blurred extension area of ​​the traceability electronic tag on the imaging plane within the exposure time. Specifically, it can be obtained by statistically analyzing the average motion velocity of the effective vectors in the motion vector information, reading the exposure time in the configuration parameters, and then multiplying the average motion velocity by the exposure time to obtain the blur length, which characterizes the range of the blurred extension area of ​​the traceability electronic tag on the imaging plane within the exposure time.

[0049] In one possible scenario, if the area on the food packaging used to affix the traceability electronic tag is planar, then the blur length is the product of the average motion speed and the exposure time.

[0050] In another possible scenario, if the area on the food packaging used to affix the traceability electronic tag is cylindrical, directly configuring the blur length as the product of the average motion speed and exposure time will lead to an underestimation or overestimation of the blur length because the planar algorithm ignores the rotational component of the cylindrical surface. This error could exceed tens of pixels. The point spread function convolution kernel obtained based on the incorrect blur length cannot accurately reflect the actual blur trajectory, resulting in a distorted frequency response curve. Consequently, during frequency domain deconvolution, the incorrect point spread function will cause insufficient recovery of high-frequency components or noise amplification, blurring the label edges and fine structures. Therefore, for a cylindrical area on the food packaging used to affix the traceability electronic tag, the translational motion length is determined based on the product of the average motion speed and exposure time, where the translational direction corresponding to the translational motion length is consistent with the motion direction of the motion state. Then, a rotation correction vector is determined based on the position information of the preset marking point on the food packaging between each frame of the exposed image sequence. Finally, the blur length is determined based on the translational motion length and the rotation correction vector. Wherein, if the angle between the direction of the rotation correction vector and the translation direction is acute, then the fuzzy length is the sum of the translation length and the projection length of the rotation correction vector in the translation direction. If the angle between the direction of the rotation correction vector and the translation direction is obtuse, then the fuzzy length is the difference between the translation length and the projection length of the rotation correction vector in the translation direction.

[0051] It is worth noting that by calculating the translation and rotation components separately and synthesizing them in vector space, the actual total displacement of the cylindrical sealing area during exposure can be accurately characterized, thus accurately deriving the blur length parameter. This helps improve the accuracy of subsequent deconvolution processing and reduce residual blur. Compared with the planar model, surface correction eliminates displacement measurement errors caused by surface curvature, making the blur length more consistent with actual imaging conditions. Precise blur length input can generate convolution kernels that match the actual motion trajectory, enabling more targeted recovery of high-frequency details during frequency domain deconvolution while suppressing high-frequency noise amplification caused by blur parameter estimation errors, thereby improving the clarity of label edges and surface micro-textures.

[0052] Next, the diffusion vector is determined based on the length axis and the fuzzy length, and the convolution kernel of the point spread function model is configured as a uniformly distributed linear kernel along the diffusion vector. Specifically, the diffusion vector can be constructed by combining the length axis direction with the fuzzy length.

[0053] Then, the uniformly distributed linear kernel is normalized so that the sum of all elements in the convolution kernel of the normalized point spread function model is 1, ensuring that the corresponding image frames in the exposed image sequence and the processed image sequence have the same overall brightness. Specifically, the diffusion direction can be determined based on the motion vector information obtained when acquiring the exposed image sequence. A one-dimensional convolution kernel vector with a length equal to the blur length is established along the diffusion direction, and the initial weights of each position of the one-dimensional convolution kernel vector are set to the same value according to the principle of uniform distribution. Then, the sum of the values ​​of each element of the uniformly distributed linear kernel is calculated; a scaling factor is determined based on the sum, and each element value of the uniformly distributed linear kernel is multiplied by the scaling factor to ensure that the sum of all elements in the normalized convolution kernel is equal to 1. The convolution kernel of the normalized point spread function model is used to maintain the same overall brightness of the corresponding image frames in the exposed image sequence and the processed image sequence during frequency domain deconvolution operations.

[0054] To make it easier to understand, you can think of the above steps as drawing a line on paper with a brush. The paint on the brush represents the brightness of the image. If there's too much paint in the brush (the sum of all elements in the convolution kernel is greater than 1), the image will appear too bright, like overexposure. If there's too little paint in the brush (the sum of all elements in the convolution kernel is less than 1), the image will appear too dark. The purpose of the calculus normalization process is to adjust the amount of paint in the brush to be exactly the same as before, so that no matter how the brush stroke changes, the total brightness remains constant.

[0055] Furthermore, during direct deconvolution deblurring, the point spread function model may contain high-frequency components exceeding the transmission range of the imaging system. This can amplify imaging noise during deconvolution, resulting in "ringing" or false details. After normalizing the uniformly distributed linear kernel, a two-dimensional Fourier transform can be performed on the point spread function model to obtain its frequency response distribution. The two-dimensional Fourier transform converts the point spread function model from a spatial domain representation to a frequency domain representation, and the frequency response distribution characterizes the transmission capability of different spatial frequency components. The modulation transfer function (MTF) is obtained based on the optical transfer parameters of the exposure imaging system. The MTF characterizes the transmission efficiency of the exposure imaging system for different spatial frequency components. A spectral bandpass constraint is applied to the frequency response distribution based on the MTF to suppress high-frequency components exceeding the transmission range of the MTF. Optionally, the spectral bandpass constraint includes amplitude attenuation of frequency components in the frequency response distribution that exceed the cutoff frequency of the MTF, to avoid amplifying high-frequency noise that is not present in the exposed image during frequency domain deconvolution.

[0056] It's worth noting that label images may become blurry due to motion, and this blurring can be described using a blur model. This model then needs to be translated into a frequency domain representation, much like breaking down a sound into different pitches and examining the intensity of each. When a camera lens captures an image, it doesn't transmit certain very high frequencies (very fine details) well, just as a speaker is weak in the very high frequency range. In this case, a limit line needs to be drawn using the lens's performance table (i.e., modulation transfer function), retaining only the details it can transmit and reducing the intensity of other details. In this way, the image reconstructed by deconvolution will not amplify details or noise that were never actually present, thus appearing more realistic and clearer.

[0057] S203. Perform spatial registration processing on the processed image sequence and the corresponding exposure image sequence.

[0058] In this step, spatial registration is performed on the processed image sequence and the corresponding exposed image sequence so that the processed image sequence and the exposed image sequence correspond pixel by pixel in the same coordinate system.

[0059] Specifically, one could select corresponding image pairs from the exposure image sequence and the processing image sequence, then extract key points using a feature point matching algorithm and calculate the transformation matrix between the images, and perform a geometric transformation on the processing image sequence based on the transformation matrix to align it pixel-by-pixel with the corresponding exposure image in the same coordinate system.

[0060] S204. Enhance the edge detail features in the processed image sequence, and then fuse the enhanced processed image sequence with the exposure image sequence.

[0061] In this step, edge detail features in the processed image sequence are enhanced, and the enhanced processed image sequence is fused with the exposed image sequence to generate the corresponding image sequence to be identified.

[0062] Specifically, high-pass filtering or Laplacian operator operations can be performed on the processed image sequence to enhance edge details. Contrast enhancement processing is used to improve the visibility of texture information in the sealing area. The enhanced processed image sequence is then weighted and fused with the corresponding exposed image sequence to generate the image sequence to be recognized.

[0063] S205. In the image sequence to be identified, the detection algorithm based on texture analysis and morphological processing is used to determine whether the seal status is qualified or unqualified.

[0064] In this step, the defect location of the traceability electronic tag sealing area is extracted from the image sequence to be identified using a detection algorithm based on texture analysis and morphological processing. Based on the area ratio of the defect location and a preset threshold, the sealing status is determined to be qualified or unqualified.

[0065] In one possible implementation, texture features are extracted from image blocks corresponding to the sealing areas of traceable electronic tags in the image sequence to be identified. Contrast, energy, and entropy indices are obtained based on the gray-level co-occurrence matrix, and texture feature outliers are identified. Morphological preprocessing is performed on the image blocks to remove noise and smooth the background using opening operations, and to enhance the contour features of areas with abnormal brightness or darkness using top-hat and black-hat transforms. The texture feature outliers are then fused with the morphological preprocessing results to generate a defect probability distribution map of the sealing area. Based on adaptive thresholding, the defect probability distribution map is segmented, a defect mask of the sealing area is extracted, and the boundary coordinates and area information of each defect location are determined based on the connected component analysis results of the defect mask.

[0066] It's worth noting that in high-speed conveyor belt or labeling robotic arm scenarios, the label continues to move after application. The target displacement during the camera's exposure time causes image blurring / motion blurring, especially smoothing out or eliminating fine textures like tiny bubbles and wrinkles, making them unrecognizable by visual detection algorithms. Furthermore, if the image sensor used is a CMOS or CCD sensor, all incident light is integrated into a single pixel grayscale value during exposure. If the target displacement exceeds the physical equivalent length of a single pixel during exposure, convolutional smoothing occurs in the image brightness distribution. This motion blur manifests as high-frequency component attenuation in the spatial frequency domain, directly erasing high-frequency texture signals such as bubbles and wrinkles. Additionally, during signal processing, displacement during the exposure time can be considered a convolution operation with an ideal still image, with the convolution kernel shape proportional to the speed. High-speed motion increases the convolution kernel width, equivalent to applying a low-pass filter with excessively low bandwidth to the image. In this case, high-frequency information is weakened or even eliminated.

[0067] To address this, a point spread function can be precisely constructed by measuring motion parameters, allowing for reversible deconvolution in the frequency domain to recover the high-frequency signal. High-frequency signals are crucial for detecting surface micro-defects because bubbles and wrinkles typically exhibit sub-millimeter-level undulations, having minimal impact on low-frequency visual components but significantly affecting the amplitude and phase of high-frequency components. Therefore, the seal condition determined through these steps can characterize the presence of bubbles or wrinkles on the traceability electronic tag after it is affixed to food packaging. The presence of bubbles or wrinkles indicates an unqualified seal condition.

[0068] Figure 3 This is a schematic diagram illustrating the structure of a food traceability electronic seal system according to an example embodiment of this application. Figure 3 As shown, the food traceability electronic seal system 300 provided in this embodiment includes: The acquisition module 310 is used to acquire the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and to determine the motion vector information of the traceability electronic tag between each frame of exposed images; Processing module 320 is used to construct a point spread function model based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. The determination module 330 is used to determine the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence.

[0069] Optionally, the processing module 320 is specifically used for: The length axis is determined based on the dominant direction in the motion vector information, wherein the dominant direction is the direction corresponding to the maximum peak value in the vector direction histogram corresponding to the motion vector information; The blur length is determined based on the average motion speed in the motion vector information and the exposure time in the configuration parameters, wherein the blur length is used to characterize the range of the blur extension area of ​​the traceability electronic tag on the imaging plane during the exposure time; The diffusion vector is determined based on the length axis and the fuzzy length, and the convolution kernel of the point diffusion function model is configured as a uniformly distributed linear kernel along the diffusion vector.

[0070] Optionally, the processing module 320 is specifically used for: The uniformly distributed linear kernel is normalized so that the sum of all elements in the convolution kernel of the normalized point spread function model is 1, so that the corresponding image frames in the exposed image sequence and the processed image sequence have the same overall brightness.

[0071] Optionally, the processing module 320 is specifically used for: A two-dimensional Fourier transform is performed on the point spread function model to obtain the frequency response distribution of the point spread function model. The two-dimensional Fourier transform is used to convert the point spread function model from a spatial domain representation to a frequency domain representation. The frequency response distribution is used to characterize the transmission capability of different spatial frequency components. The modulation transfer function is obtained based on the optical transfer parameters of the exposure imaging system. The modulation transfer function is used to characterize the transfer efficiency of the exposure imaging system for different spatial frequency components. The frequency response distribution is subjected to spectral bandpass constraint based on the modulation transfer function to suppress high-frequency components that exceed the transmission range of the modulation transfer function.

[0072] Optionally, the determining module 330 is specifically used for: Spatial registration is performed on the processed image sequence and the corresponding exposed image sequence so that the processed image sequence and the exposed image sequence correspond pixel by pixel in the same coordinate system; The edge detail features in the processed image sequence are enhanced, and the enhanced processed image sequence is fused with the exposed image sequence to generate a corresponding image sequence to be identified; In the image sequence to be identified, a detection algorithm based on texture analysis and morphological processing is used to extract the defect location of the traceability electronic tag sealing area, and the sealing status is determined to be qualified or unqualified based on the area ratio of the defect location and a preset threshold.

[0073] Optionally, the determining module 330 is specifically used for: Texture features are extracted from the image blocks corresponding to the sealing area of ​​the traceability electronic tag in the image sequence to be identified, and texture feature outliers are determined. The image block is preprocessed morphologically to remove noise and smooth the background using opening operations, and to enhance the contour features of areas with abnormal brightness or darkness using top-hat and black-hat transformations. The texture feature outliers are fused with the morphological preprocessing results to generate a defect probability distribution map of the sealing area; The defect probability distribution map is segmented according to an adaptive threshold, the defect mask of the sealing area is extracted, and the boundary coordinates and area information of each defect location are determined based on the connected component analysis results of the defect mask.

[0074] Optionally, the sealing status is used to characterize whether there are bubbles or wrinkles after the traceability electronic tag is sealed onto the food packaging.

[0075] Figure 4 This is a schematic diagram of the structure of an electronic device according to an example embodiment of this application. For example... Figure 4 As shown, the electronic device 400 provided in this embodiment includes: a processor 401 and a memory 402; wherein: Memory 402 is used to store computer programs, and the memory may also be flash memory.

[0076] Processor 401 is used to execute the execution instructions stored in the memory to implement the various steps in the above method. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0077] Alternatively, the memory 402 can be either standalone or integrated with the processor 401.

[0078] When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include: Bus 403 is used to connect the memory 402 and the processor 401.

[0079] This embodiment also provides a readable storage medium storing a computer program, which, when executed by at least one processor of an electronic device, enables the electronic device to perform the methods provided in the various embodiments described above.

[0080] This embodiment also provides a program product including a computer program stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the methods provided in the various embodiments described above.

[0081] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0082] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for electronic sealing for food traceability, characterized in that, include: Acquire the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and determine the motion vector information of the traceability electronic tag between each frame of exposed images; A point spread function model is constructed based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. The sealing status of the traceability electronic tag is determined based on the exposed image sequence and the processed image sequence.

2. The electronic seal method for food traceability according to claim 1, characterized in that, The step of constructing a point spread function model based on the motion vector information and the configuration parameters of the exposure imaging system includes: The length axis is determined based on the dominant direction in the motion vector information, wherein the dominant direction is the direction corresponding to the maximum peak value in the vector direction histogram corresponding to the motion vector information; The blur length is determined based on the average motion speed in the motion vector information and the exposure time in the configuration parameters, wherein the blur length is used to characterize the range of the blur extension area of ​​the traceability electronic tag on the imaging plane during the exposure time; The diffusion vector is determined based on the length axis and the fuzzy length, and the convolution kernel of the point diffusion function model is configured as a uniformly distributed linear kernel along the diffusion vector.

3. The electronic seal method for food traceability according to claim 2, characterized in that, After configuring the convolution kernel of the point spread function model as a uniformly distributed linear kernel along the spread vector, the method further includes: The uniformly distributed linear kernel is normalized so that the sum of all elements in the convolution kernel of the normalized point spread function model is 1, so that the corresponding image frames in the exposed image sequence and the processed image sequence have the same overall brightness.

4. The electronic seal method for food traceability according to claim 3, characterized in that, After normalizing the uniformly distributed linear kernel, the process further includes: A two-dimensional Fourier transform is performed on the point spread function model to obtain the frequency response distribution of the point spread function model. The two-dimensional Fourier transform is used to convert the point spread function model from a spatial domain representation to a frequency domain representation. The frequency response distribution is used to characterize the transmission capability of different spatial frequency components. The modulation transfer function is obtained based on the optical transfer parameters of the exposure imaging system. The modulation transfer function is used to characterize the transfer efficiency of the exposure imaging system for different spatial frequency components. The frequency response distribution is subjected to spectral bandpass constraint based on the modulation transfer function to suppress high-frequency components that exceed the transmission range of the modulation transfer function.

5. The electronic seal method for food traceability according to claim 1, characterized in that, Determining the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence includes: Spatial registration is performed on the processed image sequence and the corresponding exposed image sequence so that the processed image sequence and the exposed image sequence correspond pixel by pixel in the same coordinate system; The edge detail features in the processed image sequence are enhanced, and the enhanced processed image sequence is fused with the exposed image sequence to generate a corresponding image sequence to be identified; In the image sequence to be identified, a detection algorithm based on texture analysis and morphological processing is used to extract the defect location of the traceability electronic tag sealing area, and the sealing status is determined to be qualified or unqualified based on the area ratio of the defect location and a preset threshold.

6. The electronic seal method for food traceability according to claim 5, characterized in that, The step of extracting the defect location of the traceability electronic tag sealing area in the image sequence to be identified using a detection algorithm based on texture analysis and morphological processing includes: Texture features are extracted from the image blocks corresponding to the sealing area of ​​the traceability electronic tag in the image sequence to be identified, and texture feature outliers are determined. The image block is preprocessed morphologically to remove noise and smooth the background using opening operations, and to enhance the contour features of areas with abnormal brightness or darkness using top-hat and black-hat transformations. The texture feature outliers are fused with the morphological preprocessing results to generate a defect probability distribution map of the sealing area; The defect probability distribution map is segmented according to an adaptive threshold, the defect mask of the sealing area is extracted, and the boundary coordinates and area information of each defect location are determined based on the connected component analysis results of the defect mask.

7. The electronic seal method for food traceability according to any one of claims 1-6, characterized in that, The seal status is used to indicate whether there are bubbles or wrinkles after the traceability electronic tag is sealed onto the food packaging.

8. A food traceability electronic seal system, characterized in that, include: The acquisition module is used to acquire the sequence of exposed images of the traceability electronic tag on the food packaging in motion, and to determine the motion vector information of the traceability electronic tag between each frame of exposed images; The processing module is used to construct a point spread function model based on the motion vector information and the configuration parameters of the exposure imaging system. The point spread function model is used to perform frequency domain deconvolution processing on each frame of the exposure image sequence to obtain the corresponding processed image sequence. The determination module is used to determine the sealing status of the traceability electronic tag based on the exposed image sequence and the processed image sequence.

9. An electronic device, characterized in that, include: processor; as well as, Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.