A method and system for detecting flatness of plastic packaging containers for food

Through image information processing and system detection, the flatness of the plastic packaging container for food is screened out, which solves the problems of high detection cost and low efficiency in the prior art, and provides a low-cost and high-efficiency detection method.

CN118674722BActive Publication Date: 2024-11-22SHANDONG GUANGYAN NEW MATERIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162564.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-22
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the prior art, the flatness detection cost of plastic packaging containers for food is high and low efficiency, and requires high equipment costs and professional operation.

Method used

By obtaining the image information of the packaging container, corner point detection, data analysis, clustering and non-flatness retention value calculations are performed, and the bulging clusters are screened to determine the flatness, and the system of the image acquisition device and the data processing device is used for detection.

Benefits of technology

It realizes low-cost and high-efficiency flatness detection of plastic packaging containers for food, reducing inspection costs and improving inspection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674722B_ABST
    Figure CN118674722B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting the flatness of a plastic packaging container for food, wherein the method obtains image information of the packaging container to be detected, performs corner point detection processing on the image information to obtain multiple corner points, performs data analysis processing on the multiple corner points respectively to obtain multiple distribution values, and then performs clustering according to the distribution values ​​to obtain multiple cluster clusters, and then performs non-flatness retention force value calculation on the multiple cluster clusters respectively to screen out bulge clusters, and finally determines whether the flatness of the packaging container to be detected meets preset requirements according to the bulge clusters, thereby solving the technical problems of high detection cost and low detection efficiency in the related art when detecting the flatness of plastic packaging containers for food by mechanical contact measurement methods, laser scanning methods or ultrasonic detection methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for detecting the flatness of a plastic packaging container for food. Background Art

[0002] With the rapid development of social economy, the quantity and variety of food demanded by consumers in daily life are increasing. A large number of food production needs to be packaged in packaging containers for transportation, storage and sale. Among them, a large number of plastic packaging containers are needed to package food. During the food sales stage, the flatness of the surface of the plastic packaging container becomes one of the factors that determine whether consumers will buy the product. Therefore, during the production stage of plastic packaging containers, manufacturers need to conduct reliable and rapid testing of the flatness of plastic packaging containers for food.

[0003] In the related art, the flatness of plastic packaging containers for food is mainly detected by mechanical contact measurement method, laser scanning method or ultrasonic detection method, however, these methods usually require high equipment cost and professional operation, which leads to technical problems such as high detection cost and cumbersome detection process. Therefore, how to solve the technical problems of high cost and low efficiency in the related art when detecting the flatness of plastic packaging containers for food has become a technical problem that technicians in this field need to overcome. Summary of the invention

[0004] In order to solve the technical problems of high detection cost and low detection efficiency when detecting the flatness of plastic packaging containers for food, the purpose of the present invention is to provide a method and system for detecting the flatness of plastic packaging containers for food. The technical scheme adopted is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for detecting flatness of a plastic packaging container for food, comprising:

[0006] Acquire image information of a packaging container to be detected, and perform corner point detection processing on the image information to obtain multiple corner points;

[0007] Performing data analysis on the plurality of corner points to obtain a plurality of distribution values;

[0008] Performing clustering according to the plurality of distribution values ​​to obtain a plurality of cluster clusters;

[0009] Calculating the non-flatness retention force values ​​of the plurality of clusters respectively to screen out the bulge clusters;

[0010] It is determined whether the flatness of the packaging container to be inspected meets preset requirements based on the screened bulge clusters.

[0011] The method for detecting the flatness of a plastic food packaging container according to the embodiment of the present invention has the following beneficial effects:

[0012] The embodiment of the present invention provides a method for detecting the flatness of a plastic packaging container for food. After acquiring image information of the packaging container to be detected, the method performs corner point detection processing on the image information to obtain multiple corner points, performs data analysis processing on the multiple corner points respectively to obtain multiple distribution values, and then performs clustering according to the distribution values ​​to obtain multiple cluster clusters, and then performs non-flatness retention force value calculation on the multiple cluster clusters respectively to screen out bulge clusters, and finally determines whether the flatness of the packaging container to be detected meets preset requirements according to the bulge clusters, thereby solving the technical problems of high detection cost and low detection efficiency in the related art when detecting the flatness of plastic packaging containers for food by mechanical contact measurement methods, laser scanning methods or ultrasonic detection methods, and provides a method for detecting the flatness of plastic packaging containers for food with low cost and high detection efficiency.

[0013] According to other embodiments of the flatness detection method for plastic packaging containers for food, the performing corner point detection processing on the image information to obtain a plurality of corner points comprises:

[0014] Harris corner point detection is performed on the image information to obtain a plurality of corner points.

[0015] According to other embodiments of the flatness detection method for plastic packaging containers for food, the step of performing data analysis on the plurality of corner points to obtain a plurality of distribution values ​​comprises:

[0016] respectively obtaining position factor values ​​of a plurality of said corner points;

[0017] Respectively obtaining the response value differences of the plurality of corner points;

[0018] A plurality of the distribution values ​​are obtained by combining the plurality of the location factor values ​​and the plurality of the response value differences.

[0019] According to other embodiments of the flatness detection method for plastic packaging containers for food, the step of respectively obtaining position factor values ​​of the plurality of corner points comprises:

[0020] Get the number of neighboring corner points of the current corner point;

[0021] Obtaining angles between the current corner point and at least two neighboring corner points and a horizontal line;

[0022] The location factor value is calculated by combining the number of neighborhood corner points and the difference between the two angle values.

[0023] According to other embodiments of the flatness detection method for plastic packaging containers for food, the step of respectively obtaining the difference in response values ​​of the plurality of corner points comprises:

[0024] Obtaining the response value of the current corner point;

[0025] Respectively obtain the response values ​​of the neighboring corner points of the current corner point;

[0026] The response value of the current corner point and the response values ​​of the neighboring corner points are combined to calculate the difference in response values ​​of the plurality of corner points.

[0027] According to other embodiments of the flatness detection method for plastic packaging containers for food, the step of calculating the non-flatness retention force values ​​of the plurality of clusters to screen out the bulge clusters comprises:

[0028] Performing multiple linear enhancements with different preset coefficients on the acquired cluster cluster images composed of the multiple cluster clusters;

[0029] Sequentially obtain the mean distribution value and the mean gray value of all corner points in each cluster;

[0030] Performing data analysis on the distribution value mean and the gray value mean to obtain distribution mean variability and gray value mean variability respectively;

[0031] The unevenness retention value of each cluster is calculated in combination with the distribution mean variability and the gray value mean variability, and then it is determined in turn whether each cluster is a bulge cluster.

[0032] According to some other embodiments of the flatness detection method for plastic packaging containers for food of the present invention, the different preset coefficients include: the different preset coefficients are in an arithmetical relationship, and the different preset coefficients change from a minimum value to a maximum value in sequence to linearly enhance the cluster cluster image.

[0033] According to other embodiments of the present invention, the flatness detection method for plastic packaging containers for food, judging whether the flatness of the packaging container to be detected meets preset requirements based on the screened bulge clusters includes:

[0034] Obtaining the number of the bulge clusters, and obtaining the bulge cluster ratio according to the number of the bulge clusters;

[0035] Obtaining the flatness of the packaging container to be inspected according to the proportion of the bulge clusters;

[0036] Determine whether the flatness meets the preset requirements.

[0037] In a second aspect, an embodiment of the present invention provides a flatness detection system for a plastic packaging container for food, comprising:

[0038] An image acquisition device, used to collect image information of the packaging container to be inspected;

[0039] The data processing device is connected to the image acquisition device and is used to execute the flatness detection method for plastic packaging containers for food as described above to detect whether the flatness of the packaging container to be detected meets the preset requirements.

[0040] According to some other embodiments of the flatness detection system for plastic packaging containers for food of the present invention, the image acquisition device includes a high-resolution camera, and the data processing device includes a computer; the high-resolution camera is communicatively connected to the computer to transmit the image information of the packaging container to be detected to the computer. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 A schematic flow chart of a specific embodiment of a method for detecting flatness of a plastic packaging container for food provided by an embodiment of the present invention;

[0043] Figure 2 A schematic flow chart of sub-steps of a specific embodiment of step S200 in a method for detecting flatness of a plastic food packaging container provided by an embodiment of the present invention;

[0044] Figure 3 A schematic flow chart of sub-steps of a specific embodiment of step S400 in a method for detecting flatness of a plastic packaging container for food provided by an embodiment of the present invention;

[0045] Figure 4 A schematic flow chart of sub-steps of a specific embodiment of step S500 in a method for detecting flatness of a plastic food packaging container provided by an embodiment of the present invention;

[0046] Figure 5 The present invention provides a schematic diagram of the module composition of a specific embodiment of a system for detecting the flatness of a plastic packaging container for food provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method for detecting the flatness of a plastic food packaging container proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0048] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0049] The specific scheme of the flatness detection method for a plastic food packaging container provided by the present invention is described in detail below with reference to the accompanying drawings.

[0050] See also Figure 1 , which shows a method flow chart of a method for detecting flatness of a plastic packaging container for food provided by an embodiment of the present invention, which comprises the following steps:

[0051] S100, acquiring image information of a packaging container to be detected, and performing corner point detection processing on the image information to obtain a plurality of corner points;

[0052] In order to obtain high-definition image information of the packaging container to be detected, a high-resolution camera is usually used to shoot the packaging container to be detected. In the specific implementation process, the packaging container to be detected is placed in a flat, bright and uniformly lit environment, and the packaging container to be detected is photographed by a high-resolution camera. In addition, in order to improve the efficiency of image information acquisition, multiple packaging containers to be detected can be placed on a conveyor belt, and then the operation of the conveyor belt can be controlled to drive the multiple packaging containers to be detected to a preset position, and then one or more high-resolution cameras are used to obtain image information. In this embodiment, after the image information is obtained, corner point detection processing is performed on it to obtain multiple corner points for subsequent data processing operations.

[0053] S200, performing data analysis on multiple corner points to obtain multiple distribution values;

[0054] The purpose of the distribution values ​​of multiple corner points obtained through data processing is to determine the current uneven area.

[0055] S300, performing clustering according to multiple distribution values ​​to obtain multiple clusters;

[0056] After obtaining a plurality of distribution values ​​in step S200, a plurality of clusters are obtained by clustering the plurality of distribution values ​​through a clustering algorithm, and each cluster contains a non-flat domain having features such as scratches, bulges or deformities.

[0057] S400, respectively calculating the non-flatness retention force values ​​of the plurality of clusters to screen out the bulge clusters;

[0058] Among them, the non-flatness retention values ​​of the bulge cluster and other types of clusters (scratch clusters) are in different ranges. After calculating the non-flatness retention force values ​​of each cluster, the cluster corresponding to the non-flatness retention force value setting range of the bulge cluster is the bulge cluster.

[0059] S500: judging whether the flatness of the packaging container to be inspected meets preset requirements based on the screened bulge clusters.

[0060] A minimum standard is usually set for the flatness of the packaging container to be inspected. After the bulge clusters are screened out in step S400, whether the flatness of the packaging container to be inspected meets the preset requirements is finally determined by calculating whether the proportion of the bulge clusters is lower than the set minimum standard.

[0061] The embodiment of the present invention provides a method for detecting the flatness of a plastic packaging container for food. The method obtains high-definition image information of the packaging container to be detected, performs corner point detection processing on the image information to obtain multiple corner points, performs data analysis processing on the corner points respectively to obtain multiple distribution values, and then performs clustering according to the distribution values ​​to obtain multiple cluster clusters. A bulge cluster is screened out from the multiple cluster clusters, and finally, it is determined based on the bulge cluster whether the flatness of the packaging container to be detected meets preset requirements, thereby solving the technical problems of high detection cost and low detection efficiency in the related art when detecting the flatness of plastic packaging containers for food by mechanical contact measurement methods, laser scanning methods or ultrasonic detection methods.

[0062] In some embodiments, the corner point detection process performed on the image information in step S100 of the above embodiment is to obtain a plurality of corner points through Harris corner point detection process.

[0063] Reference Figure 2 In some embodiments, in the process of performing data analysis on multiple corner points to obtain multiple distribution values ​​in step S200 in the above embodiment, it is necessary to obtain the position factor values ​​and response value differences of multiple corner points respectively, and then calculate and obtain the distribution value according to the obtained position factor values ​​and response value differences, which specifically includes the steps of:

[0064] S210, respectively obtaining position factor values ​​of multiple corner points;

[0065] S220, respectively obtaining the response value differences of multiple corner points;

[0066] S230. Combining multiple location factor values ​​and multiple response value differences to obtain multiple distribution values.

[0067] In this embodiment, there is no restriction on the order in which step S210 and step S220 are executed, that is, step S220 can be executed before step S210.

[0068] Specifically, in some embodiments, the step S210 of the above embodiment of obtaining the position factor values ​​of multiple corner points respectively further specifically includes the following sub-steps:

[0069] S211, obtaining the number of corner points in the area of ​​the current corner point;

[0070] S212, obtaining angles between the current corner point and the horizontal line after connecting the lines with at least two neighboring corner points;

[0071] S213. Calculate the position factor value by combining the number of neighborhood corner points and the difference between the two angle values.

[0072] In this embodiment, after traversing multiple corner points in sequence as the current corner point, the position factor values ​​of the multiple corner points can be obtained respectively.

[0073] Specifically, in some embodiments, the implementation of steps S211 to S213 in the above embodiment is implemented by calculating the following formula (1):

[0074] (1)

[0075] in, Indicates the position factor value of the current corner point, Indicates the number of neighboring corner points of the current corner point, It represents the angle between the horizontal line and the line connecting the i-th neighborhood corner point and the current corner point. Represents the difference between two random angle values. That is, in this embodiment, the position factor value of the current corner point is proportional to the number of its neighboring corner points, and inversely proportional to the difference between the angle value between the line connecting its neighboring corner points and the current corner point and the horizontal line. In this embodiment, the isolation of the current corner point (the number of neighboring corner points) is quantitatively analyzed to determine the extension and continuity of the area where the current corner point is located. Among them, the more the number of neighboring corner points, the lower the isolation degree, and the greater the probability of the corresponding continuous corner point area. It represents the extension of the area composed of non-isolated corner points. If it extends in one direction, the difference between the angle between the current corner point and the horizontal line after connecting the two neighboring corner points will be smaller, and the larger the position factor value is, the more likely the area where the current corner point is located is a scratch or bulge area.

[0076] In some embodiments, the step S220 of the above embodiment respectively obtaining the difference of the response values ​​of the multiple corner points further specifically includes the following sub-steps:

[0077] S221, obtaining the response value of the current corner point;

[0078] S222, respectively obtaining the response values ​​of the area corner points of the current corner point;

[0079] S223. Combine the response value of the current corner point and the response values ​​of the neighboring corner points to calculate the difference in response values ​​of multiple corner points.

[0080] In this embodiment, after traversing a plurality of corner points in sequence as the current corner point, the differences in the response values ​​of the plurality of corner points can be obtained respectively.

[0081] Specifically, in some embodiments, the implementation of steps S221 to S223 in the above embodiment is implemented by calculating the following formula (2):

[0082] (2)

[0083] in, Indicates the difference in the response value of the current corner point, Represents the response value of the current corner point, Indicates the number of neighboring corner points of the current corner point, Represents the response value of the ith neighborhood corner point. That is, in this embodiment, the larger the response value of the current corner point, the greater the difference in its response value, and the larger the response value of the neighborhood corner point, the smaller the difference in its response value. In this embodiment, by performing a difference calculation on the magnitude of the response value of the current corner point and the neighborhood corner point, the similarity of the response value of the current corner point and the neighborhood corner point can be determined, and the similarity can reflect the extension continuity of the edge of the scratch or bulge. When the response values ​​are all within a small preset range, the smaller the difference in the obtained response value, the more it can be explained that the current corner point and the neighborhood corner point belong to the same type of non-flatness defect (scratches or bulges, etc.).

[0084] In some embodiments, the above embodiment step S300 combines multiple location factor values ​​and multiple response value differences to obtain multiple distribution values ​​and calculates them by the following formula (3):

[0085] (3)

[0086] in, Represents the distribution value of the current corner point, Represents the anti-zero coefficient. The distribution value of the current corner point is proportional to the position factor value of the current corner point. The distribution value of the current corner point is inversely proportional to the difference of the response value of the current corner point. Usually, the anti-zero coefficient The value of is 1.

[0087] Reference Figure 3 In some embodiments, after calculating the distribution values ​​of multiple corner points respectively through the above embodiment and clustering them through the ISODATA algorithm to obtain multiple clusters, the non-flatness retention values ​​of the multiple clusters are calculated respectively, and the clusters whose non-flatness retention values ​​are within the preset value range are the bulge clusters. Specifically, step S400 of the above embodiment includes the following sub-steps:

[0088] S410, performing multiple linear enhancements with different preset coefficients on the acquired cluster images composed of the multiple clusters;

[0089] Compared with defects such as scratches and bulges, the scratches are more sensitive to the enhancement coefficient because the grayscale values ​​of the scratches themselves and the surrounding pixels are quite different. However, the grayscale values ​​of the bulge edges and the surrounding pixels are less different and are more insensitive to the enhancement coefficient. By analyzing the change characteristics under different enhancement coefficients, the scratch clusters and bulge clusters can be effectively distinguished. In a specific example, the cluster image is enhanced multiple times with different preset coefficients using the following formula (4):

[0090] (4)

[0091] in, Represents the enhancement coefficient, which usually takes an initial value of 1 and increases by 0.1 each time until the maximum value is 5. represents the enhanced image, represents the image before enhancement, Represents a constant, usually 0.

[0092] S420, sequentially obtaining the mean distribution value and the mean gray value of all corner points in each cluster;

[0093] Among them, each cluster usually has multiple corner points. Before linear enhancement, the distribution value mean and gray value mean of all corner points in each cluster are obtained, and after each linear enhancement, the distribution value mean of all corner points in each cluster is also obtained. and gray value mean The distribution value is obtained by calculating the average value of steps 210 to S230 described in the above embodiment, and the gray value is a known quantity of image information processed by Harris corner point detection and is obtained by taking the average value.

[0094] S430, performing data analysis on the distribution value mean and the gray value mean to obtain the distribution mean variability and the gray value mean variability respectively;

[0095] Specifically, the distribution to mean variability is calculated using the following formula (5):

[0096] (5)

[0097] in, Indicates The distribution value mean variability of the clusters, represents the total number of linear enhancements, Indicates The mean distribution value of the current cluster after sublinear enhancement, Indicates The mean distribution value of the current cluster after sublinear enhancement, The value is usually 1. The scratch is relative to the bulge at different enhancement coefficients (i.e., in step S410, Therefore, under different enhancement coefficients, the mean variability of the distribution value shows a stable change trend (remains unchanged), which corresponds to the edge of the bulge in the plastic packaging container for food. On the contrary, the greater the change in the mean variability of the distribution value, the more it corresponds to the clustering of scratches in the plastic packaging container for food.

[0098] The gray value mean variability is calculated using the following formula (6):

[0099] (6)

[0100] in, Indicates The mean gray value variability of clusters, represents the total number of linear enhancements, Indicates The difference between the current gray value mean and the previous gray value mean after sublinear enhancement. The larger the gray value mean variability, the more likely the cluster is a cluster of scratches; conversely, the smaller the gray value mean variability, the more likely the cluster is a cluster of bulges.

[0101] S440, combining the distribution mean variability and the gray value mean variability to calculate the unevenness retention value of each cluster respectively, and then judge whether each cluster is a bulge cluster in turn.

[0102] Specifically, the non-flatness retention value of each cluster is calculated by the following formula (7);

[0103] (7)

[0104] in, represents a linear normalization function, that is, the normalized gray value mean variability is multiplied by the distribution value mean variability as a coefficient to obtain the non-flatness retention value. Indicates The non-flatness retention force value of a cluster. When the value is in a preset range, it indicates that the cluster is a bulge cluster. In another specific embodiment, when the value is in [0.8, 1], it indicates that the cluster is a bulge cluster.

[0105] Reference Figure 4 In some embodiments, after calculating the non-flatness retention force values ​​of the plurality of clusters obtained by the above embodiments to screen out the bulge clusters, step S500 determines whether the flatness of the packaging container to be inspected meets the preset requirements according to the screened bulge clusters, and includes sub-steps:

[0106] S510, obtaining the number of bulge clusters, and obtaining the proportion of bulge clusters according to the number of bulge clusters;

[0107] After calculating the non-flatness retention force value of each cluster in step S440 of the above embodiment, it is possible to determine whether each cluster is a bulge cluster, that is, to obtain the number of bulge clusters, and then calculate the bulge cluster ratio by the following formula (8):

[0108] (8)

[0109] in, Indicates the percentage of bulge clusters; Indicates the total number of clusters. After the above embodiment performs clustering by using the ISODATA algorithm to obtain multiple clusters, statistics of the multiple clusters can be obtained.

[0110] S520, obtaining the flatness of the packaging container to be inspected according to the proportion of bulge clusters;

[0111] After the bulge cluster ratio is calculated in step S510, the flatness is calculated according to the following formula (9):

[0112] (9)

[0113] in, Indicates the flatness value.

[0114] S530: Determine whether the flatness meets the preset requirements.

[0115] After the flatness of the packaging container to be inspected is calculated in the above step S520, the obtained flatness is compared with a preset flatness range value. When the obtained flatness value is within the preset flatness range value, it means that the flatness of the packaging container to be inspected meets the preset requirement.

[0116] Reference Figure 5 In the second aspect, the embodiment of the present invention also provides a flatness detection system for plastic packaging containers for food, which includes an image acquisition device and a data processing device, wherein the image acquisition device is connected to the data processing device in communication, and the image acquisition device is used to collect image information of the packaging container to be detected, and transmit the image information to the data processing device. After receiving the image information, the data processing device executes the flatness detection method for plastic packaging containers for food as described in any of the above embodiments to detect the packaging container to be detected, so as to determine whether the flatness of the packaging container to be detected meets the preset requirements. In this embodiment, after receiving the image information, the data processing device performs data processing on the image information in principle, which corresponds to the flatness detection method for plastic packaging containers for food described in any of the above embodiments. Furthermore, the flatness detection system for plastic packaging containers for food provided by the embodiment of the present invention can solve the technical problems of high detection cost and low detection efficiency in the related art when detecting the flatness of plastic packaging containers for food by mechanical contact measurement method, laser scanning method or ultrasonic detection method.

[0117] In some embodiments, in order to obtain high-definition image information of the packaging container to be inspected, the image acquisition device is implemented by a high-resolution camera. In addition, the data processing device is implemented by a computer, and the computer is loaded with a preset execution program, so that after the high-definition image information of the packaging container to be inspected is collected by the high-resolution camera and transmitted to the computer, the computer starts the loaded preset execution program to process the image information to determine whether the flatness of the packaging container to be inspected meets the preset requirements.

[0118] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for detecting the flatness of a plastic packaging container for food, characterized in that: The method comprises: Acquire image information of a packaging container to be detected, and perform corner point detection processing on the image information to obtain multiple corner points; Performing data analysis on the plurality of corner points to obtain a plurality of distribution values; Performing clustering according to the plurality of distribution values ​​to obtain a plurality of cluster clusters; Calculating the non-flatness retention force values ​​of the plurality of clusters respectively to screen out the bulge clusters; Judging whether the flatness of the packaging container to be inspected meets the preset requirements based on the screened bulge clusters; The performing data analysis on the plurality of corner points to obtain a plurality of distribution values ​​comprises: respectively obtaining position factor values ​​of a plurality of said corner points; Respectively obtaining the response value differences of the plurality of corner points; Combining a plurality of the location factor values ​​and a plurality of the response value differences to obtain a plurality of the distribution values; The obtaining of the position factor values ​​of the plurality of corner points respectively comprises: Get the number of neighboring corner points of the current corner point; Obtaining angles between the current corner point and at least two neighboring corner points and a horizontal line; Combining the number of the neighborhood corner points and the difference between the two angle values ​​to calculate the position factor value; The step of respectively obtaining the difference of the response values ​​of the plurality of corner points comprises: Obtaining the response value of the current corner point; Respectively obtain the response values ​​of the neighboring corner points of the current corner point; Combining the response value of the current corner point with the response value of the neighboring corner point to calculate the difference of the response values ​​of the plurality of corner points; The step of calculating the non-flatness retention force values ​​of the plurality of clusters to screen out the bulge clusters comprises: Performing multiple linear enhancements with different preset coefficients on the acquired cluster cluster images composed of the multiple cluster clusters; Each time linear enhancement is performed, the mean distribution value and the mean gray value of all corner points in each cluster are obtained in turn; Performing data analysis on the distribution value mean and the gray value mean to obtain distribution mean variability and gray value mean variability respectively; The unevenness retention value of each cluster is calculated in combination with the distribution mean variability and the gray value mean variability, and then it is determined in turn whether each cluster is a bulge cluster.

2. The method for detecting flatness of a plastic food packaging container according to claim 1, characterized in that: The performing corner point detection processing on the image information to obtain a plurality of corner points comprises: Harris corner point detection is performed on the image information to obtain a plurality of corner points.

3. The method for detecting flatness of a plastic food packaging container according to claim 1, characterized in that: The different preset coefficients include: the different preset coefficients are in an arithmetic progression relationship, and the different preset coefficients change from a minimum value to a maximum value in sequence to perform linear enhancement on the cluster image.

4. The method for detecting flatness of a plastic food packaging container according to any one of claim 1, characterized in that: The step of judging whether the flatness of the packaging container to be inspected meets preset requirements according to the screened bulge clusters includes: Obtaining the number of the bulge clusters, and obtaining the bulge cluster ratio according to the number of the bulge clusters; Obtaining the flatness of the packaging container to be inspected according to the proportion of the bulge clusters; Determine whether the flatness meets the preset requirements.

5. A flatness detection system for plastic packaging containers for food, characterized in that: include: An image acquisition device, used to collect image information of the packaging container to be inspected; A data processing device is connected to the image acquisition device and is used to execute the flatness detection method for plastic packaging containers for food as described in any one of claims 1 to 4 to detect whether the flatness of the packaging container to be detected meets preset requirements.

6. The flatness detection system for plastic packaging containers for food according to claim 5, characterized in that: The image acquisition device includes a high-resolution camera, and the data processing device includes a computer; the high-resolution camera is communicatively connected to the computer to transmit the image information of the packaging container to be inspected to the computer.