Pre-packaged sauced beef vacuum degree detection method based on machine vision

By using machine vision technology to refine the images of pre-packaged braised beef, adaptively segmenting vacuum defect areas, extracting texture features, and performing structural similarity comparisons, the problems of misjudgment and insufficient automation in existing detection methods for vacuum degree detection are solved, achieving efficient and accurate vacuum degree detection.

CN121962774AInactive Publication Date: 2026-05-01SHAANXI YIMING FOOD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI YIMING FOOD CO LTD
Filing Date
2026-03-26
Publication Date
2026-05-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing vacuum testing technologies for pre-packaged braised beef lack sophisticated processing methods, making it difficult to accurately capture vacuum defect characteristics. The detection results have a high error rate, low automation, and cannot be adapted to different packaging conditions.

Method used

A machine vision-based detection method is adopted, which extracts the effective area through image processing technology, performs high-frequency detail enhancement and gray-scale change analysis, adaptively divides the vacuum defect sensitive area, extracts local texture features, performs texture morphology analysis and structural similarity comparison, and realizes the accuracy and automation of vacuum degree detection.

Benefits of technology

It improves the accuracy and efficiency of vacuum degree detection, ensures the reliability and consistency of test results, adapts to braised beef products in different packaging states, and enhances the standardization and automation level of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962774A_ABST
    Figure CN121962774A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine vision, and discloses a pre-packaged sauced beef vacuum degree detection method based on machine vision, and the method comprises the steps: carrying out the effective region extraction of an original image of pre-packaged sauced beef, and obtaining a to-be-analyzed image; performing high-frequency detail enhancement on the to-be-analyzed image to obtain an enhanced grayscale image, and performing adaptive division to obtain a vacuum defect sensitive area; traversing the vacuum defect sensitive area, extracting image surface local texture features of the pre-packaged sauced beef, and determining vacuum degree distribution features; performing texture morphological analysis on the vacuum degree distribution characteristics to obtain vacuum degree morphological characteristic description; performing structural similarity comparison on the vacuum degree morphological feature description and a preset reference feature description to obtain morphological similarity, and judging whether the morphological similarity meets a qualification standard or not to output a vacuum degree detection result; the efficiency of the pre-packaged sauced beef vacuum degree detection method based on machine vision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

A Machine Vision-Based Method for Detecting the Vacuum Degree of Pre-packaged Braised Beef Technical Field

[0001] This invention relates to the field of machine vision technology, and in particular to a machine vision-based method for detecting the vacuum degree of pre-packaged braised beef. Background Technology

[0002] In the production and inspection of pre-packaged braised beef, vacuum degree testing is a crucial step in ensuring product quality and shelf life. Current technologies lack sophisticated methods for extracting and analyzing visual information from the packaging, making it difficult to accurately capture vacuum defect-related features in the area where the packaging material meets the beef. They also lack the ability to recognize image details, easily overlooking subtle signs of vacuum abnormalities. Furthermore, existing testing methods do not adaptively segment and analyze features based on the packaging characteristics of pre-packaged braised beef, resulting in weak targeting and an inability to effectively distinguish between vacuum defect-sensitive and normal areas. This leads to insufficient accuracy in vacuum degree testing and an inability to objectively reflect the actual vacuum state of the product.

[0003] Current vacuum degree testing technologies for pre-packaged braised beef lack standardized texture feature analysis and quantitative judgment systems. They rely solely on basic visual observation or simple image comparison, resulting in insufficient analysis of vacuum degree distribution characteristics and a lack of scientific numerical support for judgments. This leads to frequent misjudgments and missed detections, significantly reducing the overall efficiency and reliability of the testing process. Furthermore, existing testing methods have poor adaptability, failing to dynamically adjust to different packaging conditions. The low level of automation in the testing process increases the cost and error associated with manual intervention. Therefore, improving the accuracy and automation level of vacuum degree testing for pre-packaged braised beef has become an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a machine vision-based method for detecting the vacuum degree of pre-packaged braised beef, in order to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this invention provides a machine vision-based method for detecting the vacuum degree of pre-packaged braised beef, comprising: step a) using the visual information of the braised beef pieces inside the packaging bag and the visual information of the packaging material as the original image of the pre-packaged braised beef, and extracting the effective region from the original image to obtain the image to be analyzed of the pre-packaged braised beef; step b) performing high-frequency detail enhancement on the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef, and adaptively segmenting the pre-packaged braised beef based on the degree of grayscale abrupt changes in the enhanced grayscale image to obtain the vacuum defect sensitive area of ​​the pre-packaged braised beef. Step c: Traverse the vacuum defect sensitive area, extract the local texture features of the image surface of the pre-packaged braised beef, and determine the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features of the image surface; Step d: Perform texture morphology analysis on the vacuum degree distribution features to obtain the vacuum degree morphology feature description of the pre-packaged braised beef; Step e: Compare the vacuum degree morphology feature description with the preset reference feature description for structural similarity to obtain the morphological similarity of the pre-packaged braised beef, and determine whether the morphological similarity meets the qualification standard, so as to output the vacuum degree detection result of the pre-packaged braised beef.

[0006] In a preferred embodiment, the step of using the visual information of the braised beef chunks inside the packaging bag and the visual information of the packaging bag sealing material as the original image of the pre-packaged braised beef, and extracting the effective region from the original image to obtain the image of the pre-packaged braised beef to be analyzed, includes: acquiring the visual information of the braised beef chunks inside the packaging bag and the visual information of the packaging bag sealing material, and using the visual information as the original image of the pre-packaged braised beef; performing grayscale processing on the original image to obtain a grayscale image of the pre-packaged braised beef; performing edge detection on the grayscale image to obtain an edge intensity image of the pre-packaged braised beef; performing adaptive threshold segmentation on the edge intensity image to obtain a binary edge image of the pre-packaged braised beef; and performing morphological dilation on the binary edge image to obtain the image of the pre-packaged braised beef to be analyzed.

[0007] In a preferred embodiment, the step of enhancing the high-frequency details of the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef includes: performing low-pass filtering on the image to be analyzed to obtain a low-frequency background image of the pre-packaged braised beef; performing pixel difference comparison on the image to be analyzed based on the low-frequency background image to obtain a high-frequency detail image of the pre-packaged braised beef; performing nonlinear gain adjustment on the high-frequency detail image to obtain an enhanced detail image of the pre-packaged braised beef; and performing pixel-by-pixel superposition and fusion of the enhanced detail image and the low-frequency background image to obtain an enhanced grayscale image of the pre-packaged braised beef.

[0008] In a preferred embodiment, the step of adaptively segmenting the pre-packaged braised beef based on the gray-level abrupt change in the enhanced gray-level image to obtain the vacuum defect sensitive region of the pre-packaged braised beef includes: extracting the gradient response of the enhanced gray-level image in the horizontal and vertical directions, and synthesizing the gradient magnitude to obtain the gradient magnitude image of the pre-packaged braised beef; using the gradient magnitude image as the gray-level abrupt change intensity of the pre-packaged braised beef; performing local peak detection on the gradient magnitude image to obtain the gradient peak image of the pre-packaged braised beef; adaptively segmenting the gradient peak image to obtain a candidate sensitive region mask of the pre-packaged braised beef; and performing connected component analysis on the candidate sensitive region mask to obtain the vacuum defect sensitive region of the pre-packaged braised beef.

[0009] In a preferred embodiment, the adaptive segmentation of the gradient peak image to obtain a candidate sensitive region mask for the pre-packaged braised beef includes: dividing the gradient peak image into overlapping image sub-blocks; statistically analyzing the central tendency and dispersion of gradient magnitudes within the image sub-blocks to obtain local statistical features of the image sub-blocks; determining a dynamic segmentation threshold for the image sub-blocks based on the local statistical features; performing segmentation threshold fusion on the overlapping regions of the image sub-blocks to obtain a global adaptive threshold image for the pre-packaged braised beef; and performing a pixel-by-pixel comparison between the gradient peak image and the global adaptive threshold image to obtain a candidate sensitive region mask for the pre-packaged braised beef.

[0010] In a preferred embodiment, the step of traversing the vacuum defect sensitive region, extracting local texture features of the image surface of the pre-packaged braised beef, and determining the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features includes: segmenting the vacuum defect sensitive region into overlapping local sampling windows; performing statistical analysis on the pixel gray-level distribution within the local sampling windows to obtain the gray-level co-occurrence frequency of the local sampling windows; performing feature analysis on the local sampling windows based on the gray-level co-occurrence frequency to obtain the texture contrast intensity, texture direction consistency, and texture complexity of the local sampling windows; assigning vacuum degree response values ​​to the local sampling windows based on the texture contrast intensity, texture direction consistency, and texture complexity to obtain the vacuum response degree of the pre-packaged braised beef; and performing global mapping on the vacuum response degree to obtain the vacuum degree distribution features of the pre-packaged braised beef.

[0011] In a preferred embodiment, the step of statistically analyzing the pixel grayscale distribution within the local sampling window to obtain the grayscale co-occurrence frequency of the local sampling window includes: configuring the local sampling window with a combination of direction and step size based on a preset sampling direction and sampling step size to obtain a combination of direction and step size for the local window; performing directional sampling on the local sampling window based on the direction offset and step size distance in the combination of direction and step size to obtain pixel pairs of the local window; traversing the pixel pairs and statistically summarizing the frequency of simultaneous occurrence of grayscale values ​​of two pixels in the pixel pairs to obtain the grayscale co-occurrence frequency of the local sampling window.

[0012] In a preferred embodiment, the step of performing texture morphology analysis on the vacuum degree distribution features to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef includes: performing directional fitting on the vacuum degree distribution features to obtain the texture orientation distribution of the pre-packaged braised beef; based on the texture orientation distribution, performing principal direction analysis on the vacuum degree distribution features to obtain the texture dominant orientation of the vacuum defect sensitive area; measuring the texture density of the vacuum degree distribution features to obtain the texture roughness index of the vacuum degree distribution features; and providing a unified description of the texture orientation distribution, the texture dominant orientation, and the texture roughness index to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef.

[0013] In a preferred embodiment, the step of comparing the vacuum degree morphological feature description with a preset reference feature description to obtain the morphological similarity of the pre-packaged braised beef, and determining whether the morphological similarity meets the qualification standard, so as to output the vacuum degree detection result of the pre-packaged braised beef, includes: spatially registering the vacuum degree morphological feature description with the preset reference feature description to obtain the registered feature pair of the pre-packaged braised beef; measuring the registered features point by point to obtain the local structure matching index of the pre-packaged braised beef; normalizing the texture complexity of the local sampling window to obtain the weight coefficient of the local sampling window; performing weighted fusion on the local structure matching index based on the weight coefficient to obtain the morphological similarity of the pre-packaged braised beef; determining whether the morphological similarity meets the texture structure matching requirement consistent with the preset reference feature description, and outputting a vacuum degree qualification mark or a vacuum degree failure mark of the pre-packaged braised beef.

[0014] In a preferred embodiment, the formula for calculating the morphological similarity is as follows: ;in, The morphological similarity is... For the first The aforementioned weighting coefficients For the first The local structure matching index. This represents the total number of the local structure matching indices.

[0015] Compared with existing technologies, this invention has the following beneficial effects: 1. This invention achieves intelligent detection of vacuum level in pre-packaged braised beef using machine vision technology. From original image acquisition to effective area extraction, adaptive segmentation of vacuum defect sensitive areas is completed through high-frequency detail enhancement and gray-level abrupt change analysis. Then, through texture feature extraction and vacuum level distribution feature determination, the accuracy and refinement of vacuum level detection are achieved. The multi-dimensional analysis of image texture during the detection process, combined with gray-level co-occurrence frequency statistics and texture morphology analysis, makes the identification of vacuum level features more targeted, significantly improving the accuracy of vacuum level detection. It can accurately capture the vacuum defect features of pre-packaged braised beef and effectively identify abnormal vacuum levels.

[0016] 2. This invention, by constructing a standardized machine vision inspection process and calculating morphological similarity through structural similarity comparison and weighted fusion, achieves quantitative determination of vacuum degree detection results, improves the standardization and automation level of the inspection process, and significantly increases the detection efficiency of vacuum degree for pre-packaged braised beef. Simultaneously, the layered processing and adaptive analysis of images in the detection method allow the inspection process to adapt to braised beef products with different packaging states, improving the versatility and adaptability of the detection method. This provides an efficient and stable technical solution for vacuum degree detection of pre-packaged braised beef, ensuring the reliability and consistency of the detection results. Attached Figure Description

[0017] Figure 1 is a schematic flowchart of a machine vision-based vacuum degree detection method for pre-packaged braised beef according to an embodiment of the present invention; the realization of the purpose, functional characteristics and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] This application provides a machine vision-based method for detecting the vacuum degree of pre-packaged braised beef. The execution entity of this machine vision-based method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the machine vision-based method for detecting the vacuum degree of pre-packaged braised beef can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0020] Referring to Figure 1, it is a flowchart illustrating a machine vision-based method for detecting the vacuum level of pre-packaged braised beef according to an embodiment of the present invention. In this embodiment, the machine vision-based method for detecting the vacuum degree of pre-packaged braised beef includes: step a, using the visual information of the braised beef pieces inside the packaging bag and the visual information of the packaging bag sealing material as the original image of the pre-packaged braised beef, and extracting the effective region of the original image to obtain the image of the pre-packaged braised beef to be analyzed; in this embodiment, using the visual information of the braised beef pieces inside the packaging bag and the visual information of the packaging bag sealing material as the original image of the pre-packaged braised beef, and extracting the effective region of the original image to obtain the image of the pre-packaged braised beef to be analyzed includes: acquiring the visual information of the braised beef pieces inside the packaging bag and the visual information of the packaging bag sealing material, and using the visual information as the original image of the pre-packaged braised beef; performing grayscale processing on the original image to obtain a grayscale image of the pre-packaged braised beef; performing edge detection on the grayscale image to obtain an edge intensity image of the pre-packaged braised beef; performing adaptive threshold segmentation on the edge intensity image to obtain a binary edge image of the pre-packaged braised beef; and performing morphological dilation on the binary edge image to obtain the image of the pre-packaged braised beef to be analyzed.

[0021] The image acquisition device captures all the visual information of the braised beef pieces inside the packaging bag, and at the same time captures the overall visual information of the packaging bag material. The two types of visual information are integrated to form complete image information, which is the original image of the pre-packaged braised beef.

[0022] The red, green, and blue components of each pixel in the original image are calculated and processed to convert each pixel into a pixel with a corresponding grayscale value, so that the original image is converted into a single-channel image composed only of different grayscale values. This image is the grayscale image of the pre-packaged braised beef.

[0023] The difference in grayscale value between each pixel in the grayscale image and its neighboring pixels is calculated. The calculation results represent the degree of edge feature prominence at each pixel. The edge feature prominence values ​​of all pixels are integrated to form a new image, which is the edge intensity image of the pre-packaged braised beef.

[0024] Based on the pixel value distribution characteristics of different regions within the edge intensity image, corresponding segmentation numerical standards are set for different regions of the image. Pixels with pixel values ​​higher than the corresponding segmentation numerical standards are marked as edge pixels, and pixels with pixel values ​​lower than the corresponding segmentation numerical standards are marked as non-edge pixels. Only the marking information of edge pixels and non-edge pixels is retained to form a new image, which is the edge binary image of pre-packaged braised beef.

[0025] The edge pixels in the binary image are processed by region expansion. The adjacent pixels around each edge pixel are also marked as edge pixels, thus expanding the coverage of the edge pixels and making the edge regions in the image form a continuous whole. The image obtained after this processing is the image of the pre-packaged braised beef to be analyzed.

[0026] The beneficial effects are that this implementation process accurately extracts the effective analysis area of ​​pre-packaged braised beef from the original visual information through step-by-step image processing operations. Grayscale processing simplifies the image information dimensions, edge detection and adaptive threshold segmentation achieve accurate identification of the effective area, and morphological dilation operation makes the edge area more complete and continuous. The final image to be analyzed can accurately focus on the core area of ​​vacuum degree detection of pre-packaged braised beef, eliminate invalid image information, provide a clear and accurate image foundation for subsequent vacuum degree detection image analysis, and improve the pertinence and effectiveness of subsequent detection steps.

[0027] Step b: Perform high-frequency detail enhancement on the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef, and adaptively segment the pre-packaged braised beef based on the grayscale abrupt change in the enhanced grayscale image to obtain the vacuum defect sensitive region of the pre-packaged braised beef; In this embodiment of the invention, the step of performing high-frequency detail enhancement on the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef includes: performing low-pass filtering on the image to be analyzed to obtain a low-frequency background image of the pre-packaged braised beef; performing pixel difference comparison on the image to be analyzed based on the low-frequency background image to obtain a high-frequency detail image of the pre-packaged braised beef; performing nonlinear gain adjustment on the high-frequency detail image to obtain an enhanced detail image of the pre-packaged braised beef; and performing pixel-by-pixel superposition and fusion of the enhanced detail image and the low-frequency background image to obtain an enhanced grayscale image of the pre-packaged braised beef.

[0028] The step of adaptively segmenting the pre-packaged braised beef based on the gray-level abrupt change in the enhanced gray-level image to obtain the vacuum defect sensitive region of the pre-packaged braised beef includes: extracting the gradient response of the enhanced gray-level image in the horizontal and vertical directions, and synthesizing the gradient amplitude to obtain the gradient amplitude image of the pre-packaged braised beef; using the gradient amplitude image as the gray-level abrupt change intensity of the pre-packaged braised beef; performing local peak detection on the gradient amplitude image to obtain the gradient peak image of the pre-packaged braised beef; adaptively segmenting the gradient peak image to obtain a candidate sensitive region mask of the pre-packaged braised beef; and performing connected component analysis on the candidate sensitive region mask to obtain the vacuum defect sensitive region of the pre-packaged braised beef.

[0029] The adaptive segmentation of the gradient peak image to obtain a candidate sensitive region mask for the pre-packaged braised beef includes: dividing the gradient peak image into overlapping image sub-blocks; statistically analyzing the central tendency and dispersion of gradient magnitudes within the image sub-blocks to obtain local statistical features of the image sub-blocks; determining a dynamic segmentation threshold for the image sub-blocks based on the local statistical features; performing segmentation threshold fusion on the overlapping regions of the image sub-blocks to obtain a global adaptive threshold image for the pre-packaged braised beef; and performing a pixel-by-pixel comparison between the gradient peak image and the global adaptive threshold image to obtain a candidate sensitive region mask for the pre-packaged braised beef.

[0030] A weighted average of gray values ​​is performed on each pixel in the image to be analyzed and its neighboring pixels within a defined range. This operation filters out rapidly changing details in the image, retaining only the slowly changing basic background information. The resulting image is the low-frequency background image of pre-packaged braised beef.

[0031] The gray value of each pixel in the image to be analyzed is subtracted one by one from the gray value of the same pixel in the low-frequency background image. This calculation extracts the high-frequency detail information that was filtered out by the low-pass filter in the image to be analyzed. The new image composed of the pixel difference calculation results at all positions is the high-frequency detail image of the pre-packaged braised beef.

[0032] Nonlinear numerical amplification is performed on the gray values ​​of each pixel in the high-frequency detail image. The amplification ratio is set according to the different ranges of the pixel gray values ​​to enhance the subtle features related to vacuum degree in the image. The image formed after this adjustment is the enhanced detail image of pre-packaged braised beef.

[0033] The grayscale value of each pixel in the enhanced detail image is added one by one to the grayscale value of the same pixel in the low-frequency background image. The enhanced high-frequency detail information is then fused and restored with the original low-frequency background information. The new image composed of the superposition of pixels from all positions is the enhanced grayscale image of the pre-packaged braised beef.

[0034] For each pixel in the enhanced grayscale image, the difference in grayscale value between adjacent pixels in the horizontal direction and the difference in grayscale value between adjacent pixels in the vertical direction are calculated. The difference in these two directions is the gradient response of the corresponding pixel. Then, the horizontal and vertical gradient responses of each pixel are synthesized. The new image composed of the synthesis results of all pixels is the gradient amplitude image of the pre-packaged braised beef.

[0035] The pixel value of each pixel in the gradient magnitude image is directly used as the intensity of the gray-level change of the corresponding pixel in the enhanced gray-level image. The overall pixel value distribution of the gradient magnitude image is used to fully characterize the degree of gray-level change of the enhanced gray-level image.

[0036] The gradient magnitude image is processed region by region, and the pixel value with the largest value in each region is selected. The peak pixels selected from all regions are retained and integrated. The new image composed of these peak pixels is the gradient peak image of the pre-packaged braised beef.

[0037] The gradient peak image is divided into regions according to a fixed size specification. During the division process, adjacent image regions have overlapping pixels of a preset area. All the image regions obtained after the division are the overlapping image sub-blocks of the pre-packaged braised beef.

[0038] A comprehensive statistical calculation is performed on the gradient magnitude of all pixels within each image sub-block to obtain the central tendency and dispersion values ​​of the gradient magnitudes within each sub-block. These two types of values ​​together constitute the local statistical features of the image sub-block of pre-packaged braised beef. Using the local statistical features of each image sub-block as the sole criterion, a corresponding pixel value segmentation standard is set for each image sub-block. This standard serves as the dynamic segmentation threshold for the image sub-block of pre-packaged braised beef.

[0039] Numerical fusion calculations are performed on the different dynamic segmentation thresholds involved in the overlapping regions of image sub-blocks. The fused value is taken as the unified segmentation threshold for the overlapping region. Combined with the dynamic segmentation thresholds of the non-overlapping regions, a threshold distribution image covering the entire region of the gradient peak image is formed. This image is the global adaptive threshold image of pre-packaged braised beef.

[0040] The pixel value of each pixel in the gradient peak image is compared one by one with the threshold value at the same position in the global adaptive threshold image. Pixels with pixel values ​​higher than the corresponding threshold value are marked. The new image composed of all marked pixels is the candidate sensitive region mask for pre-packaged braised beef. Pixel connectivity detection is performed on all marked pixels in the candidate sensitive region mask. Adjacent and connected marked pixels are grouped into the same pixel region. All interconnected pixel regions in the mask are identified. All connected pixel regions obtained after this analysis are the vacuum defect sensitive regions of the pre-packaged braised beef.

[0041] The beneficial effects of this implementation process are that it enhances the vacuum defect-related details in pre-packaged braised beef images through high-frequency detail enhancement processing, making previously blurry subtle features clearly discernible. This lays a clear image foundation for the subsequent segmentation of vacuum defect-sensitive areas. At the same time, the adaptive segmentation process based on the degree of gray-scale abrupt change, through layer-by-layer processing of gradient analysis, local peak detection, adaptive segmentation, and connected component analysis, achieves accurate positioning and segmentation of vacuum defect-sensitive areas, effectively eliminating invalid areas in the image. This allows subsequent vacuum degree detection to focus on the core analysis area, significantly improving the targeting and accuracy of vacuum degree detection. Moreover, the entire processing flow is adaptively adjusted around the features of the image itself, adapting to the image detection needs of pre-packaged braised beef in different packaging states.

[0042] Step c: Traverse the vacuum defect sensitive area, extract local texture features of the image surface of the pre-packaged braised beef, and determine the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features of the image surface; In this embodiment of the invention, traversing the vacuum defect sensitive area, extracting local texture features of the image surface of the pre-packaged braised beef, and determining the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features of the image surface includes: dividing the vacuum defect sensitive area into overlapping local sampling windows; performing statistical analysis on the pixel gray-level distribution within the local sampling windows to obtain the gray-level co-occurrence frequency of the local sampling windows; performing feature analysis on the local sampling windows based on the gray-level co-occurrence frequency to obtain the texture contrast intensity, texture direction consistency, and texture complexity of the local sampling windows; assigning vacuum degree response values ​​to the local sampling windows based on the texture contrast intensity, texture direction consistency, and texture complexity to obtain the vacuum response of the pre-packaged braised beef; and performing global mapping on the vacuum response to obtain the vacuum degree distribution features of the pre-packaged braised beef.

[0043] The step of statistically analyzing the pixel grayscale distribution within the local sampling window to obtain the grayscale co-occurrence frequency of the local sampling window includes: configuring the local sampling window with a combination of direction and step size based on a preset sampling direction and sampling step size to obtain a combination of direction and step size for the local window; performing directional sampling on the local sampling window based on the direction offset and step size distance in the combination of direction and step size to obtain pixel pairs of the local window; traversing the pixel pairs and statistically summarizing the frequency of simultaneous occurrence of grayscale values ​​of two pixels in the pixel pairs to obtain the grayscale co-occurrence frequency of the local sampling window.

[0044] A global region segmentation operation is performed on the vacuum defect sensitive area according to a fixed size. During the segmentation operation, the overlapping pixel portion of a preset area is retained between two adjacent segmented regions. The set of all regions obtained by this segmentation method is the overlapping local sampling window of the pre-packaged braised beef.

[0045] A fixed sampling direction and sampling step size are preset for the local sampling window. Different sampling directions and different sampling step sizes are combined one by one. All the combination results are integrated and sorted out. The result set is the direction step size combination of the local window.

[0046] The specific orientation of the directional sampling is determined based on the directional offset set in the directional step combination. The pixel interval distance during directional sampling is determined based on the step distance set in the directional step combination. Pixels are selected in the local sampling window according to the determined orientation and pixel interval. Each time, two corresponding pixels are selected to form a pixel combination. All selected pixel combinations are the pixel pairs of the local window.

[0047] The process involves iterating through all pixel pairs within a local window, counting the number of times the gray values ​​of two pixels in each pair co-occur, and systematically summarizing the occurrence counts of all different gray value combinations to form a complete statistical result. This result is the gray-level co-occurrence frequency of the local sampling window.

[0048] Using the gray-level co-occurrence frequency of the local sampling window as the core analytical basis, a comprehensive analysis and calculation of the texture-related features within the local sampling window is carried out. Values ​​that can characterize the degree of difference between textures within the local sampling window, the degree of uniformity of texture direction within the local sampling window, and the degree of complexity of texture within the local sampling window are obtained respectively. These three values ​​are the texture contrast intensity, texture direction consistency, and texture complexity of the local sampling window.

[0049] The texture contrast intensity, texture direction consistency, and texture complexity of the local sampling window are used as the core assignment references. A corresponding vacuum degree-related value is matched for each local sampling window. The vacuum degree-related value obtained by matching is the vacuum response degree of the pre-packaged braised beef.

[0050] The vacuum response of all local sampling windows is mapped globally according to their actual location information in the vacuum defect sensitive area. The vacuum response of each local sampling window is accurately marked on its corresponding image location, forming a vacuum response distribution image covering the entire vacuum defect sensitive area. The entire content presented by this distribution image is the vacuum degree distribution feature of the pre-packaged braised beef.

[0051] The beneficial effects of this implementation process are that by segmenting the vacuum defect sensitive area into overlapping local sampling windows, it achieves refined traversal and analysis of the vacuum defect sensitive area. Relying on the statistical analysis of gray-level co-occurrence frequency, it accurately extracts the local texture features of the image surface, making the feature representation of texture contrast intensity, texture direction consistency, and texture complexity more consistent with the texture changes related to the vacuum degree of pre-packaged braised beef. Then, through vacuum degree response assignment and global mapping, the texture features are transformed into intuitive vacuum degree distribution features, presenting the vacuum degree distribution state in the vacuum defect sensitive area of ​​pre-packaged braised beef completely and accurately. This provides accurate and comprehensive feature basis for further analysis and judgment of vacuum degree, and greatly improves the refinement and accuracy of vacuum degree detection.

[0052] Step d: Perform texture morphology analysis on the vacuum degree distribution features to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef. In this embodiment of the invention, the step of performing texture morphology analysis on the vacuum degree distribution features to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef includes: performing direction fitting on the vacuum degree distribution features to obtain the texture direction distribution of the pre-packaged braised beef; based on the texture direction distribution, performing principal direction analysis on the vacuum degree distribution features to obtain the texture dominant orientation of the vacuum defect sensitive area; measuring the texture density of the vacuum degree distribution features to obtain the texture roughness index of the vacuum degree distribution features; and uniformly describing the texture direction distribution, the texture dominant orientation, and the texture roughness index to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef.

[0053] A global region segmentation operation is performed on the vacuum defect sensitive area according to a fixed size. During the segmentation operation, the overlapping pixel portion of a preset area is retained between two adjacent segmented regions. The set of all regions obtained by this segmentation method is the overlapping local sampling window of the pre-packaged braised beef.

[0054] A fixed sampling direction and sampling step size are preset for the local sampling window. Different sampling directions and different sampling step sizes are combined one by one. All the combination results are integrated and sorted out. The result set is the direction step size combination of the local window.

[0055] The specific orientation of the directional sampling is determined based on the directional offset set in the directional step combination. The pixel interval distance during directional sampling is determined based on the step distance set in the directional step combination. Pixels are selected in the local sampling window according to the determined orientation and pixel interval. Each time, two corresponding pixels are selected to form a pixel combination. All selected pixel combinations are the pixel pairs of the local window.

[0056] The process involves iterating through all pixel pairs within a local window, counting the number of times the gray values ​​of two pixels in each pair co-occur, and systematically summarizing the occurrence counts of all different gray value combinations to form a complete statistical result. This result is the gray-level co-occurrence frequency of the local sampling window.

[0057] Using the gray-level co-occurrence frequency of the local sampling window as the core analytical basis, a comprehensive analysis and calculation of the texture-related features within the local sampling window is carried out. Values ​​that can characterize the degree of difference between textures within the local sampling window, the degree of uniformity of texture direction within the local sampling window, and the degree of complexity of texture within the local sampling window are obtained respectively. These three values ​​are the texture contrast intensity, texture direction consistency, and texture complexity of the local sampling window.

[0058] The texture contrast intensity, texture direction consistency, and texture complexity of the local sampling window are used as the core assignment references. A corresponding vacuum degree-related value is matched for each local sampling window. The vacuum degree-related value obtained by matching is the vacuum response degree of the pre-packaged braised beef.

[0059] The vacuum response of all local sampling windows is mapped globally according to their actual location information in the vacuum defect sensitive area. The vacuum response of each local sampling window is accurately marked on its corresponding image location, forming a vacuum response distribution image covering the entire vacuum defect sensitive area. The entire content presented by this distribution image is the vacuum degree distribution feature of the pre-packaged braised beef.

[0060] The beneficial effects of this implementation process are that by segmenting the vacuum defect sensitive area into overlapping local sampling windows, it achieves refined traversal and analysis of the vacuum defect sensitive area. Relying on the statistical analysis of gray-level co-occurrence frequency, it accurately extracts the local texture features of the image surface, making the feature representation of texture contrast intensity, texture direction consistency, and texture complexity more consistent with the texture changes related to the vacuum degree of pre-packaged braised beef. Then, through vacuum degree response assignment and global mapping, the texture features are transformed into intuitive vacuum degree distribution features, presenting the vacuum degree distribution state in the vacuum defect sensitive area of ​​pre-packaged braised beef completely and accurately. This provides accurate and comprehensive feature basis for further analysis and judgment of vacuum degree, and greatly improves the refinement and accuracy of vacuum degree detection.

[0061] Step e: Compare the vacuum degree morphological feature description with the preset reference feature description to obtain the morphological similarity of the pre-packaged braised beef, and determine whether the morphological similarity meets the qualification standard, so as to output the vacuum degree detection result of the pre-packaged braised beef.

[0062] In this embodiment of the invention, the step of comparing the vacuum degree morphological feature description with a preset reference feature description to obtain the morphological similarity of the pre-packaged braised beef, and determining whether the morphological similarity meets the qualification standard, so as to output the vacuum degree detection result of the pre-packaged braised beef, includes: spatially registering the vacuum degree morphological feature description with the preset reference feature description to obtain the registered feature pair of the pre-packaged braised beef; measuring the registered features point by point to obtain the local structure matching index of the pre-packaged braised beef; normalizing the texture complexity of the local sampling window to obtain the weight coefficient of the local sampling window; weighting and fusing the local structure matching index based on the weight coefficient to obtain the morphological similarity of the pre-packaged braised beef; determining whether the morphological similarity meets the texture structure matching requirement consistent with the preset reference feature description, and outputting a vacuum degree qualification mark or a vacuum degree failure mark of the pre-packaged braised beef.

[0063] The formula for calculating the morphological similarity is as follows: ;in, The morphological similarity is... For the first The aforementioned weighting coefficients For the first The local structure matching index. This represents the total number of the local structure matching indices.

[0064] The vacuum degree morphological feature description and the preset reference feature description are aligned according to the image spatial position, so that the two types of feature descriptions form a one-to-one corresponding feature combination under the same spatial coordinates. This feature combination is the registered feature pair of pre-packaged braised beef.

[0065] The feature information of each group in the registered feature pair is quantified and measured one by one, and the matching degree between each group of features is calculated. This value is the local structure matching index of the pre-packaged braised beef.

[0066] Perform global normalization on the texture complexity values ​​of all local sampling windows to uniformly map the texture complexity values ​​to a fixed numerical range. The resulting value is the weight coefficient of the local sampling window.

[0067] Each local structure matching index is numerically combined with its corresponding weight coefficient, and then all the combined calculation results are fused and summarized across the entire domain. The summation result is the morphological similarity of the pre-packaged braised beef.

[0068] The texture complexity of the local sampling window is normalized, and the result obtained is the corresponding weight-related value. The registered features are measured point by point, and the result generated after measurement is the corresponding local structure matching correlation index. The total number of local structure matching correlation indices is the corresponding quantity-related value. All three types of values ​​come from the process of comparing the structural similarity between the vacuum degree morphological feature description and the preset reference feature description during the vacuum degree detection of pre-packaged braised beef.

[0069] The weighted values ​​of each local sampling window are multiplied by the square of the corresponding local structure matching index. All the multiplication results are summed, and the sum is divided by the sum of all weighted values. Finally, the square root of the quotient is taken. The result obtained through this series of operations can quantitatively reflect the structural similarity between the vacuum degree morphological feature description of pre-packaged braised beef and the preset reference feature description. This serves as the core quantitative basis for determining whether the vacuum degree of pre-packaged braised beef is qualified.

[0070] When the local structure matching correlation index of a single local sampling window increases, the result of multiplying it by the corresponding weight correlation value will also increase, and the overall result after summation will also improve accordingly. When the total weight correlation value remains unchanged, the final square root result will show an upward trend. When the weight correlation value of a single local sampling window increases, the influence of the square of its corresponding local structure matching correlation index will also increase. If the local structure matching correlation index is at a high level, it will push the final result up; if the local structure matching correlation index is at a low level, it will pull the final result down. When the total number of local structure matching correlation indices changes, if the product of the newly added local structure matching correlation index and the weight correlation value improves the overall summation result, the final result will increase; otherwise, it will decrease.

[0071] The morphological similarity is compared with the preset texture structure matching value. If the morphological similarity reaches the value, it is determined that the texture structure matching requirement is met, and the vacuum degree of the pre-packaged braised beef is qualified. If the morphological similarity does not reach the value, it is determined that the texture structure matching requirement is not met, and the vacuum degree of the pre-packaged braised beef is unqualified.

[0072] The beneficial effects of this implementation process are as follows: spatial registration ensures spatial consistency between the vacuum degree morphological feature description and the preset reference feature description; point-by-point measurement enables precise quantification of the degree of local feature matching; normalized weight coefficients give the feature matching results of different local sampling windows a reasonable weight ratio; weighted fusion of morphological similarity enables overall quantitative comparison of vacuum degree morphological features; and finally, the output of detection results through clear judgment criteria makes the detection and judgment of vacuum degree of pre-packaged braised beef more accurate, objective, and standardized, effectively avoiding subjective errors in detection and judgment, while realizing intuitive output of vacuum degree detection results, thus improving the practicality and efficiency of the detection process.

[0073] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0074] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A machine vision-based method for detecting the vacuum degree of pre-packaged braised beef, characterized in that, The method includes: Step a, using the visual information of the braised beef pieces inside the packaging bag and the visual information of the packaging bag sealing material as the original image of the pre-packaged braised beef, and extracting the effective region of the original image to obtain the image to be analyzed of the pre-packaged braised beef; Step b, performing high-frequency detail enhancement on the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef, and adaptively dividing the pre-packaged braised beef based on the grayscale abrupt change of the enhanced grayscale image to obtain the vacuum defect sensitive region of the pre-packaged braised beef; Step c, traversing the vacuum defect sensitive region, extracting the local texture features of the image surface of the pre-packaged braised beef, and determining the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features of the image surface; Step d, performing texture morphology analysis on the vacuum degree distribution features to obtain the vacuum degree morphology feature description of the pre-packaged braised beef; Step e, comparing the vacuum degree morphology feature description with a preset reference feature description for structural similarity to obtain the morphological similarity of the pre-packaged braised beef, and determining whether the morphological similarity meets the qualification standard, so as to output the vacuum degree detection result of the pre-packaged braised beef.

2. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The process of using the visual information of the braised beef chunks inside the packaging bag and the visual information of the packaging bag sealing material as the original image of the pre-packaged braised beef, and extracting the effective region from the original image to obtain the image to be analyzed for the pre-packaged braised beef, includes: acquiring the visual information of the braised beef chunks inside the packaging bag and the visual information of the packaging bag sealing material, and using the visual information as the original image of the pre-packaged braised beef; performing grayscale processing on the original image to obtain a grayscale image of the pre-packaged braised beef; performing edge detection on the grayscale image to obtain an edge intensity image of the pre-packaged braised beef; performing adaptive threshold segmentation on the edge intensity image to obtain a binary edge image of the pre-packaged braised beef; and performing morphological dilation on the binary edge image to obtain the image to be analyzed for the pre-packaged braised beef.

3. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The step of enhancing the high-frequency details of the image to be analyzed to obtain an enhanced grayscale image of the pre-packaged braised beef includes: performing low-pass filtering on the image to be analyzed to obtain a low-frequency background image of the pre-packaged braised beef; performing pixel difference comparison on the image to be analyzed based on the low-frequency background image to obtain a high-frequency detail image of the pre-packaged braised beef; performing nonlinear gain adjustment on the high-frequency detail image to obtain an enhanced detail image of the pre-packaged braised beef; and performing pixel-by-pixel superposition and fusion of the enhanced detail image and the low-frequency background image to obtain an enhanced grayscale image of the pre-packaged braised beef.

4. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The step of adaptively segmenting the pre-packaged braised beef based on the gray-level abrupt change in the enhanced gray-level image to obtain the vacuum defect sensitive region of the pre-packaged braised beef includes: extracting the gradient response of the enhanced gray-level image in the horizontal and vertical directions, and synthesizing the gradient amplitude to obtain the gradient amplitude image of the pre-packaged braised beef; using the gradient amplitude image as the gray-level abrupt change intensity of the pre-packaged braised beef; performing local peak detection on the gradient amplitude image to obtain the gradient peak image of the pre-packaged braised beef; adaptively segmenting the gradient peak image to obtain a candidate sensitive region mask of the pre-packaged braised beef; and performing connected component analysis on the candidate sensitive region mask to obtain the vacuum defect sensitive region of the pre-packaged braised beef.

5. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 4, characterized in that, The adaptive segmentation of the gradient peak image to obtain a candidate sensitive region mask for the pre-packaged braised beef includes: dividing the gradient peak image into overlapping image sub-blocks; statistically analyzing the central tendency and dispersion of gradient magnitudes within the image sub-blocks to obtain local statistical features of the image sub-blocks; determining a dynamic segmentation threshold for the image sub-blocks based on the local statistical features; performing segmentation threshold fusion on the overlapping regions of the image sub-blocks to obtain a global adaptive threshold image for the pre-packaged braised beef; and performing a pixel-by-pixel comparison between the gradient peak image and the global adaptive threshold image to obtain a candidate sensitive region mask for the pre-packaged braised beef.

6. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The process of traversing the vacuum defect sensitive area, extracting local texture features of the image surface of the pre-packaged braised beef, and determining the vacuum degree distribution features of the pre-packaged braised beef based on the local texture features includes: segmenting the vacuum defect sensitive area into overlapping local sampling windows; statistically analyzing the pixel gray-level distribution within the local sampling windows to obtain the gray-level co-occurrence frequency of the local sampling windows; performing feature analysis on the local sampling windows based on the gray-level co-occurrence frequency to obtain the texture contrast intensity, texture direction consistency, and texture complexity of the local sampling windows; assigning vacuum degree response values ​​to the local sampling windows based on the texture contrast intensity, texture direction consistency, and texture complexity to obtain the vacuum response degree of the pre-packaged braised beef; and globally mapping the vacuum response degree to obtain the vacuum degree distribution features of the pre-packaged braised beef.

7. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 6, characterized in that, The step of statistically analyzing the pixel grayscale distribution within the local sampling window to obtain the grayscale co-occurrence frequency of the local sampling window includes: configuring the local sampling window with a combination of direction and step size based on a preset sampling direction and sampling step size to obtain a combination of direction and step size for the local window; performing directional sampling on the local sampling window based on the direction offset and step size distance in the combination of direction and step size to obtain pixel pairs of the local window; traversing the pixel pairs and statistically summarizing the frequency of simultaneous occurrence of grayscale values ​​of two pixels in the pixel pairs to obtain the grayscale co-occurrence frequency of the local sampling window.

8. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The step of performing texture morphology analysis on the vacuum degree distribution features to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef includes: performing directional fitting on the vacuum degree distribution features to obtain the texture direction distribution of the pre-packaged braised beef; based on the texture direction distribution, performing principal direction analysis on the vacuum degree distribution features to obtain the texture dominant orientation of the vacuum defect sensitive area; measuring the texture density of the vacuum degree distribution features to obtain the texture roughness index of the vacuum degree distribution features; and providing a unified description of the texture direction distribution, the texture dominant orientation, and the texture roughness index to obtain a description of the vacuum degree morphology features of the pre-packaged braised beef.

9. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 1, characterized in that, The step of comparing the vacuum degree morphological feature description with a preset reference feature description to obtain the morphological similarity of the pre-packaged braised beef, and determining whether the morphological similarity meets the qualification standard, and outputting the vacuum degree detection result of the pre-packaged braised beef, includes: spatially registering the vacuum degree morphological feature description with the preset reference feature description to obtain the registered feature pair of the pre-packaged braised beef; measuring the registered features point by point to obtain the local structure matching index of the pre-packaged braised beef; normalizing the texture complexity of the local sampling window to obtain the weight coefficient of the local sampling window; weighting and fusing the local structure matching index based on the weight coefficient to obtain the morphological similarity of the pre-packaged braised beef; determining whether the morphological similarity meets the texture structure matching requirement consistent with the preset reference feature description, and outputting a vacuum degree qualification mark or a vacuum degree failure mark of the pre-packaged braised beef.

10. The method for detecting the vacuum degree of pre-packaged braised beef based on machine vision as described in claim 9, characterized in that, The formula for calculating the morphological similarity is as follows: ;in, The morphological similarity is... For the first The aforementioned weighting coefficients For the first The local structure matching index. This represents the total number of the local structure matching indices.