Intelligent quality analysis method for packaging production line based on deep learning

Through deep learning technology, Hough linear detection of the opening image of the packaging box is performed, and combined with the peak point of the sinusoidal curve, the accuracy of the quality detection of the opening of the packaging box is solved, and the accuracy and reliability of the detection are improved.

CN118735366BActive Publication Date: 2024-12-06SHAANXI SHENGYUAN PACKAGING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411231272.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-06
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

In the prior art, there are mis-checking and missed inspections in the quality inspection of the opening of the packaging box, resulting in inaccurate inspections, affecting the sealing, aesthetics and load-bearing capacity of the packaging box.

Method used

Using a deep learning-based method, the image after the opening of the packaging box is obtained for pre-processing, and Hoff linear detection is performed to obtain high bright spots, sinusoidal curve sets and characterization values. Combined with the peak point of the sinusoidal curve, the opening quality of the packaging box is judged.

Benefits of technology

It improves the accuracy of opening quality inspection of packaging boxes, can accurately identify abnormal situations such as opening size deviation, inclination and position offset, and reduces missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735366B_ABST
    Figure CN118735366B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to an intelligent quality analysis method for a packaging box production line based on deep learning. The method comprises: obtaining an opening edge image of a packaging box; performing Hough line detection on the opening edge image to obtain a highlight point in the Hough space, a set of sinusoidal curves corresponding to the highlight point, and a characterization value corresponding to the highlight point; obtaining an opening quality detection result of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set; the present invention can improve the accuracy of detecting the opening quality of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an intelligent quality analysis method for a packaging box production line based on deep learning. Background Art

[0002] In the process of packaging box production, opening the packaging box is a relatively important link, and the opening link in the packaging box production process is directly related to the performance and appearance quality of the packaging box produced subsequently; however, in the actual production process, various factors such as equipment accuracy, improper operation, material quality, etc. may affect the quality of the opening, that is, they may all lead to abnormal openings. When the quality of the opening does not meet the requirements, that is, when there is an abnormality in the opening on the packaging box, it will not only affect the sealing and aesthetics of the packaging box, but also may reduce its load-bearing capacity and service life. Therefore, in the process of packaging box production, it is very important to conduct opening quality inspection or analysis on the packaging box after opening.

[0003] In the prior art, the quality inspection of the opening of the packaging box is usually carried out manually. However, this manual inspection method is highly subjective and often results in false detections, missed detections, etc. Therefore, after the packaging box is opened, how to improve the accuracy of the inspection of the opening quality of the packaging box is an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above problems, the present invention provides an intelligent quality analysis method for a packaging box production line based on deep learning. The technical solution adopted is as follows:

[0005] An embodiment of the present invention provides an intelligent quality analysis method for a packaging box production line based on deep learning, comprising the following steps:

[0006] In the process of producing the packaging box, an image after opening is obtained and recorded as an opening image of the packaging box, and the opening image is preprocessed to obtain an opening edge image of the packaging box;

[0007] Performing Hough line detection on the opening edge image to obtain a highlight point in the Hough space, a set of sinusoidal curves corresponding to the highlight point, and a characterization value corresponding to the highlight point, wherein the characterization value corresponding to the highlight point refers to the number of times the highlight point is crossed by the sinusoidal curve in the Hough space;

[0008] The opening quality detection result of the packaging box is obtained according to the characterization value corresponding to the highlight point and the peak point of the sine curve in the sine curve set.

[0009] Beneficial effect: The present invention first obtains the opening edge image of the packaging box; then performs Hough line detection on the opening edge image to obtain the highlight point in the Hough space, the set of sinusoidal curves corresponding to the highlight point, and the characterization value corresponding to the highlight point; finally, according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set, the opening quality detection result of the packaging box is obtained; and the present invention can more accurately detect the opening quality of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set, that is, the present invention can improve the accuracy of detecting the opening quality of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] 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.

[0011] Figure 1 This is a flow chart of an intelligent quality analysis method for a packaging box production line based on deep learning according to the present invention;

[0012] Figure 2 This is the opening image of the packaging box. DETAILED DESCRIPTION

[0013] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the embodiments of the present invention.

[0014] 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 pertains.

[0015] This embodiment provides an intelligent quality analysis method for a packaging box production line based on deep learning, which is described in detail as follows:

[0016] like Figure 1 As shown, the intelligent quality analysis method of the packaging box production line based on deep learning includes the following steps:

[0017] Step S001, during the production process of the packaging box, an image after opening is obtained and recorded as the opening image of the packaging box, and the opening image is preprocessed to obtain the opening edge image of the packaging box.

[0018] The main purpose of this embodiment is to improve the accuracy of the opening quality detection of the packaging box; and before the opening detection, it is necessary to obtain the image after the opening, that is, to obtain the opening image of the packaging box. The specific acquisition process is:

[0019] First, any packaging box production line is selected, and the type of packaging boxes produced on the selected packaging box production line is consistent; in the process of producing packaging boxes on the packaging box production line, there is a link in which the packaging box is opened by an opening machine, and the packaging box after opening is also transmitted through a conveyor belt. This embodiment analyzes the opening quality, so this embodiment needs to capture images of the packaging boxes that have been opened and transmitted on the conveyor belt, and record the captured images as the opening images of the packaging boxes; and when this embodiment performs image capture, the camera is located directly above the captured packaging box, that is, the captured is a top view of the packaging box on the conveyor belt, such as Figure 2 As shown, Figure 2 This is the opening image of the packaging box.

[0020] Then, the opening image is denoised and grayscaled, and the image after denoising and grayscale processing is recorded as the image to be processed, and then the image to be processed is binarized, and the image after binarization processing is recorded as the binary image; and in this embodiment, the grayscale value of the pixel points belonging to the opening area on the binary image is 255, and the grayscale value of the pixel points not belonging to the opening area is 0; then, the canny edge detection operator is used to perform edge detection on the binary image, and the edge image obtained by edge detection is recorded as the opening edge image of the packaging box.

[0021] Therefore, this embodiment obtains the opening edge image of the packaging box through the above process; and the processes of denoising, grayscale processing, binarization processing and edge detection of the image are all well-known technologies, so they will not be described in detail.

[0022] Step S002, performing Hough line detection on the opening edge image to obtain a highlight point in the Hough space, a set of sine curves corresponding to the highlight point, and a characterization value corresponding to the highlight point, wherein the characterization value corresponding to the highlight point refers to the number of times the highlight point is crossed by the sine curve in the Hough space.

[0023] Then, the opening edge image obtained in step S001 is subjected to Hough line detection to obtain all highlight points in the Hough space and the characterization value corresponding to each highlight point in the Hough space. The characterization value corresponding to the highlight point refers to the number of times the corresponding highlight point is crossed by a sine curve in the Hough space, and the Hough space is composed of sine curves. After a straight line in the opening edge image is subjected to the Hough transform, it will be presented as a highlight point in the Hough space.

[0024] In addition, the process of performing Hough line detection on the opening edge image in this embodiment is a well-known technology, and thus will not be described in detail.

[0025] Then, a set of sinusoidal curves corresponding to the highlight points in the Hough space is obtained. The specific acquisition process is as follows: for any highlight point A in the Hough space: in the Hough space, a set constructed by all sinusoidal curves passing through the highlight point A is recorded as the set of sinusoidal curves corresponding to the highlight point A.

[0026] Therefore, this embodiment can obtain each highlight point in the Hough space, the set of sine curves corresponding to each highlight point, and the characterization value corresponding to each highlight point through the above process; subsequently, the opening quality of the packaging box will be determined by analyzing the set of sine curves corresponding to the highlight points and the characterization values ​​corresponding to the highlight points.

[0027] Step S003, obtaining the opening quality detection result of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sine curve in the sine curve set.

[0028] When the opening on the packaging box is abnormal, it indicates that the opening quality of the packaging box does not meet the requirements, and the opening abnormality includes but is not limited to deviation in opening size, tilted opening, offset in opening position, etc.; and under normal circumstances, it is generally determined based on manual measurement whether the opening on the packaging box is abnormal, but this method is more suitable for detecting whether there is a deviation in a single opening size, and when there are multiple openings on the packaging box, or when there is an opening abnormality such as tilted opening or offset in opening position, there will be problems of missed detection or false detection, which will lead to inaccurate opening quality detection results.

[0029] In order to solve the problem of inaccurate opening quality detection results, this embodiment will combine Hough transform, that is, Hough line detection, to improve the accuracy of opening quality detection of packaging boxes. In general, only the characterization value corresponding to the highlight point in the Hough space is used to determine whether the opening on the packaging box is abnormal. However, in general, there will be collinearity among the straight lines constituting the opening on the packaging box. When performing Hough line detection, two or more straight lines that are not the same straight line but have collinearity properties on the opening edge image are characterized by the same highlight point when performing Hough transform. That is, a highlight point in the Hough space may represent multiple straight lines with collinearity properties on the opening edge image, or the Hough line detection can only detect the length of the straight line, and it is impossible to determine whether the straight line is a straight line or a straight line formed by several collinear straight lines. Therefore, it is difficult to comprehensively determine the opening quality of the packaging box directly based on the characterization value of the highlight point; therefore, in order to ensure or improve the accuracy of opening quality detection, this embodiment will obtain the opening quality detection result of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sine curve in the sine curve set corresponding to the highlight point, which is specifically:

[0030] First, a packaging box design drawing is obtained, and the packaging box type corresponding to the packaging box design drawing is consistent with the packaging box type produced by the production line in this embodiment; then, in the packaging box design drawing, all the straight lines and the lengths of the straight lines constituting each opening are obtained, and recorded as the standard lengths of the standard straight lines, and then the standard length types that appear are counted; then, according to each standard length type, a preset characterization value interval corresponding to each standard length type is obtained; and a specific method for obtaining the preset characterization value interval is as follows: for any standard length type V, if the length represented by the standard length type V is r, then according to the resolution and the length represented by the standard length type V, the number of pixels corresponding to the length represented by the standard length type V can be obtained, and the number of pixels corresponding to the length represented by the standard length type V is recorded as , then the preset characterization value interval corresponding to the standard length type V is , where b is the preset swing constant; and in specific applications, the implementer can set the preset swing constant according to actual conditions, for example, in this embodiment, the preset swing constant is set to 15; in addition, the preset swing constant is set because the resolution of the Hough transform will also cause the points on a straight line on the opening edge image to fall within a smaller range in the Hough space.

[0031] In addition, when the length of a straight line is known, how to determine the number of pixel points on the straight line of corresponding length is a well-known technology, so it will not be described in detail in this embodiment.

[0032] Then, it is determined whether there are any cases in the characterization values ​​corresponding to all the highlight points in the Hough space that do not belong to the preset characterization value interval. If so, it is determined that the opening quality of the packaging box does not meet the requirements; and if it is determined that the characterization values ​​corresponding to all the highlight points in the Hough space belong to the preset characterization value interval, further judgment is required, that is, it is necessary to obtain the opening quality detection result of the packaging box after opening based on the peak point of the sine curve in the set of sine curves corresponding to the highlight points.

[0033] And when the characterization values ​​corresponding to all the highlight points in the Hough space belong to the preset characterization value interval, the reason why further judgment is required is that according to the preset characterization value interval, only the opening anomaly such as the deviation of the opening size can be more accurately identified, but the opening on the packaging box may also have the abnormal situation of opening position offset and opening tilt. When there is opening position offset and opening tilt, the opening quality of the packaging box does not meet the requirements. Therefore, it is necessary to further determine whether there is an abnormality in the opening of the packaging box, that is, when the characterization values ​​corresponding to all the highlight points in the Hough space belong to the preset characterization value interval, continue to determine the opening quality detection result of the packaging box after opening according to the peak point of the sine curve in the sine curve set corresponding to the highlight point, and the specific process is:

[0034] First, according to the peak points of the sine curves in the sine curve set corresponding to each highlight point in the Hough space, the fused feature value sequence corresponding to each highlight point is obtained, and the fused feature value sequence corresponding to the highlight point is a key factor for subsequently accurately obtaining the opening quality detection result of the packaging box; in addition, for the sake of ease of understanding, this embodiment will be described by taking the acquisition process of the fused feature value sequence corresponding to any highlight point B in the Hough space as an example, that is, the acquisition process of the fused feature value sequence corresponding to the highlight point B is:

[0035] The maximum peak point of each sine curve in the sine curve set C is obtained, and the set constructed by the maximum peak points of all sine curves in the sine curve set C is recorded as the peak point set G of the sine curve set C, and the sine curve set C is the sine curve set corresponding to the highlight point B.

[0036] Then, according to the polar coordinates of each maximum peak point in the peak point set G, the polar diameter sequence corresponding to each maximum peak point in the peak point set G is obtained, and the specific method for obtaining the polar diameter sequence corresponding to each maximum peak point in the peak point set G is: for any maximum peak point g in the peak point set G, in the peak point set G, all maximum peak points with the same polar angle as the maximum peak point g are obtained, and the set constructed by all the obtained maximum peak points with the same polar angle as the maximum peak point g is recorded as the peak point subset corresponding to the maximum peak point g, and then the sequence constructed by the polar diameters of all the maximum peak points in the peak point subset corresponding to the maximum peak point g is recorded as the polar diameter sequence corresponding to the maximum peak point g. Therefore, through the method for obtaining the polar diameter sequence corresponding to the maximum peak point g, the polar diameter sequence corresponding to each maximum peak point in the peak point set G can be obtained.

[0037] Then, according to the ratio of two adjacent diameters in the diameter sequence corresponding to each maximum peak point in the peak point set G, a first ratio sequence of each maximum peak point in the peak point set G is obtained, and the a-th first ratio in the first ratio sequence of the maximum peak point g is the ratio of the a-th diameter to the a+1-th diameter in the diameter sequence corresponding to the maximum peak point g; and if not affected by the resolution or other external factors, the first ratios in the first ratio sequence should be equal, but due to the interference of the resolution or other external factors, the first ratios in the first ratio sequence appear different, and in order to ensure the reliability of the fused feature value sequence obtained subsequently, this embodiment needs to determine the weight value of each first ratio according to the frequency of occurrence of different types of first ratios in the first ratio sequence, that is, it is necessary to obtain the weight value of each first ratio in the first ratio sequence of each maximum peak point in the peak point set G according to the first ratio type appearing in the first ratio sequence of each maximum peak point.

[0038] The specific method for obtaining the weight value of each first ratio in the first ratio sequence is: record the first ratio sequence of the maximum peak point g as the first ratio sequence F, first record the total number of first ratios in the first ratio sequence F as the comprehensive quantity representation value, and obtain the frequency value of each feature type corresponding to the first ratio sequence F; and for the fth first ratio in the first ratio sequence F of the maximum peak point g: obtain the feature type containing the fth first ratio, and record it as the target feature type, then obtain the ratio of the frequency value of the target feature type to the comprehensive quantity representation value, and record it as the second ratio; then obtain the ratio of the comprehensive ratio to the frequency value of the target feature type, and record it as the weight value of the fth first ratio. Therefore, according to the method for obtaining the weight value of the fth first ratio in the first ratio sequence F, the weight value of each first ratio in each first ratio sequence can be obtained.

[0039] In addition, in this embodiment, the method for obtaining the frequency value of each feature type corresponding to the first ratio sequence F is as follows: all first ratio types appearing in the first ratio sequence F are statistically obtained, and all first ratio types appearing in the first ratio sequence F are recorded as feature types corresponding to the first ratio sequence F, and the first ratio type refers to different types of values ​​existing in the first ratio sequence F; then, the frequency of each feature type corresponding to the first ratio sequence F appearing in the first ratio sequence F is statistically recorded, and recorded as the frequency value of the corresponding feature type.

[0040] For example: if the first ratio sequence F is {0.1, 0.2, 0.4, 0.1, 0.2, 0.7, 0.1, 0.4}, then the number of first ratio types existing in this first ratio sequence F is 4, among which the first first ratio type is 0.1, the second first ratio type is 0.2, the third first ratio type is 0.4, and the fourth first ratio type is 0.7. Moreover, in the first ratio sequence F, the frequency of occurrence of the first first ratio type is 3, the frequency of occurrence of the second first ratio type is 2, the frequency of occurrence of the third first ratio type is 2, and the frequency of occurrence of the fourth first ratio type is 1.

[0041] After obtaining the weight values ​​of each first ratio in the first ratio sequence, the fused feature value sequence corresponding to the highlight point B is obtained according to the weight values ​​of each first ratio in the first ratio sequence, and the specific method for obtaining the fused feature value sequence corresponding to the highlight point B is as follows: first, mark each first ratio in the first ratio sequence of each maximum peak point respectively to obtain the mark value of each first ratio in each first ratio sequence; then, the set constructed by the first ratio sequences of all maximum peak points in the peak point set G is recorded as the first ratio sequence set; then, in the first ratio sequence set, all sets constructed by all first ratios with the same mark value are recorded as first ratio subsets, that is, the same The mark values ​​of the first ratios in the first ratio subset are consistent; then the fused feature values ​​corresponding to each first ratio subset and the feature mark values ​​of the fused feature values ​​corresponding to each first ratio subset are obtained, and the sequence constructed by the fused feature values ​​corresponding to all first ratio subsets is recorded as the fused feature value sequence corresponding to highlight point B, and the feature mark value of the j-th fused feature value in the fused feature value sequence corresponding to highlight point B is greater than the feature mark value of the j-1-th fused feature value in the feature value sequence corresponding to highlight point B, and the feature mark value of the j-th fused feature value in the fused feature value sequence corresponding to highlight point B is less than the feature mark value of the j+1-th fused feature value in the fused feature value sequence corresponding to highlight point B.

[0042] And each first ratio in the first ratio sequence of each maximum peak point is marked, and the process of obtaining the marking value of each first ratio in each first ratio sequence is: for the cth first ratio in the first ratio sequence of the maximum peak point g, c is used as the marking value of the cth first ratio; that is, in the first ratio sequence set, the marking values ​​of the first ratios in different first ratio sequences but in the same position are the same.

[0043] In addition, the process of obtaining the fused feature values ​​corresponding to each first ratio subset and the feature marking value of the fused feature value is as follows: for any first ratio subset H0, the weighted value of each first ratio in the first ratio subset H0 is obtained, and the average of the weighted values ​​of all first ratios in the first ratio subset H0 is recorded as the fused feature value corresponding to the first ratio subset H0, and the marking value of the first ratio in the first ratio subset H0 is used as the feature marking value of the fused feature value corresponding to the first ratio subset H0, and the weighted value of any first ratio h0 in the first ratio subset H0 is the product of the first ratio h0 and the weight value of the first ratio h0.

[0044] So far, this embodiment has obtained the fused feature value sequence corresponding to the highlight point B, and this embodiment can also obtain the fused feature value sequence corresponding to other highlight points according to the method for obtaining the fused feature value sequence corresponding to the highlight point B; and because when a certain highlight point represents multiple straight lines with collinear properties on the opening edge image, then these straight lines with collinear properties will produce a relatively narrow peak in the Hough space, and because these straight lines with collinear properties are not continuous, that is, there are interruptions between these straight lines with collinear properties, so the peaks generated by these straight lines with collinear properties are not in the polar radius ρ direction. It will be completely continuous. Even if it is continuous, it will show a wider width change due to the length and interval of the straight line. At the same time, the peaks generated by these straight lines with collinear properties are more diverse and irregular. That is, when a highlight point represents multiple straight lines with collinear properties on the opening edge image, then the fused eigenvalue sequence corresponding to this highlight point should not have a periodic property. If a highlight point represents a straight line on the opening edge image, then the corresponding peak width in the Hough space will be relatively narrow, and the peak width will be more consistent and stable, which also indicates that the fused eigenvalue sequence corresponding to this highlight point should have a periodic property.

[0045] Therefore, the periodic property of the fused feature value sequence can also reflect whether there is an abnormality in the opening of the packaging box. Therefore, this embodiment next determines whether the fused feature value sequences corresponding to all the highlight points in the Hough space belong to the periodic sequence. If so, it indicates that there is no abnormality in the opening of the packaging box, and it can also be determined that the opening quality of the packaging box meets the requirements; and if it is determined that the fused feature value sequences corresponding to all the highlight points in the Hough space do not belong to the periodic sequence, it indicates that there are multiple collinear straight lines on the opening edge image. At this time, it is necessary to extract the highlight points whose fused feature value sequences in the Hough space do not belong to the periodic sequence, and record them as highlight points to be judged. Then, the set constructed by all the highlight points to be judged in the Hough space is recorded as the highlight point set to be judged, and then the target similarity set is obtained according to the set of sinusoidal curves corresponding to each highlight point to be judged in the highlight point set to be judged, and the quality of the packaging box opening is judged again based on the target similarity set. Therefore, the process of obtaining the target similarity set in this embodiment is:

[0046] First, an initial similarity set of each highlight point to be determined in the highlight point set to be determined is obtained, and a target similarity set is obtained based on the initial similarity sets of all highlight points to be determined in the highlight point set to be determined.

[0047] Based on the above description, it can be known that the initial similarity sets corresponding to the highlight points to be determined constitute the target similarity set, so the initial similarity sets of the highlight points to be determined need to be obtained next; in addition, for ease of understanding, this embodiment takes the acquisition process of the initial similarity set corresponding to any highlight point Q to be determined in the highlight point set to be determined as an example for description, that is, the acquisition process of the initial similarity set corresponding to the highlight point Q to be determined is:

[0048] First, in the set of sinusoidal curves corresponding to the highlight point Q to be determined, all sinusoidal curves that do not conform to the periodicity are obtained and recorded as the curves to be transformed of the highlight point Q to be determined; then, each curve to be transformed is inversely transformed, and the pixel points corresponding to each curve to be transformed can be obtained in the opening edge image through inverse transformation, and the pixel points corresponding to each curve to be transformed are recorded as the inversely transformed pixel points of the highlight point Q to be determined. The process of inversely transforming the curve to be transformed and determining the pixel points corresponding to the curve to be transformed in the opening edge image is a well-known technology, so it will not be described in detail in this embodiment.

[0049] Then, in the opening edge image, all edge straight lines corresponding to the highlight point Q to be judged are obtained, and they are all recorded as feature straight lines corresponding to the highlight point Q to be judged. If there are two collinear edge straight lines in the opening edge image, and after the Hough transform, the highlight point Q to be judged represents the two collinear edge straight lines, then these two edge straight lines are the feature straight lines of the highlight point Q to be judged; then, the line segment obtained by connecting all the feature straight lines corresponding to the highlight point Q to be judged is recorded as the first line segment, and there is a point on the first line segment that does not belong to the feature straight line, and the two endpoints of the first line segment belong to different feature straight lines.

[0050] Next, one endpoint of the first line segment is recorded as the starting endpoint, and the other endpoint of the first line segment is recorded as the ending endpoint. Then, starting from the starting endpoint on the first line segment, all edge pixel points belonging to the feature straight line and located on the first line segment are traversed in sequence, and are sorted in sequence according to the traversal order, and the sorted sequence is recorded as a comprehensive sequence. Next, in the comprehensive sequence, all inverse transformation pixel point groups corresponding to the highlight point Q to be judged are obtained, and the two inverse transformation pixel points in the inverse transformation pixel point group are adjacent in the comprehensive sequence, and the Euclidean distance between the two pixel points in each inverse transformation pixel point group is obtained, and recorded as the first distance corresponding to the corresponding inverse transformation pixel point group, and the first distance is the pixel distance; then the first distance corresponding to each inverse transformation pixel point group is converted into an actual distance, and recorded as the actual distance of the corresponding inverse transformation pixel point group, and the specific conversion process is a well-known technology, so this embodiment will not be described in detail.

[0051] Then, on the packaging box design drawing, the preset standard distance between two adjacent characteristic straight lines on the first line segment is obtained, and both are recorded as the characteristic distance corresponding to the first line segment. After that, the set constructed by all characteristic distances corresponding to the first line segment is recorded as the characteristic distance set. For example, if the characteristic straight line b0 and the characteristic straight line b1 are adjacent in position on the first line segment, that is, there is no other characteristic straight line between the characteristic straight line b0 and the characteristic straight line b1, then at this time, on the packaging box design drawing, the standard straight lines corresponding to the characteristic straight line b0 and the characteristic straight line b1 can be obtained, and the standard straight lines corresponding to the characteristic straight line b0 and the characteristic straight line b1 are recorded as c0 and c1, obtain the spacing distance between c0 and c1 on the packaging box design drawing, and record it as the preset standard spacing distance, and the process of obtaining the spacing distance between c0 and c1 is: record the line segment connecting c0 and c1 as the second line segment, mark the endpoints on c0 and c1 on the second line segment, then four endpoint positions will be marked, and then select two adjacent endpoints belonging to different feature lines on the second line segment, and both are recorded as target endpoints, the distance measured between the two target endpoints is the preset standard spacing distance, and the preset standard spacing distance is the actual distance, that is, the preset standard spacing distance is not the pixel distance.

[0052] Next, based on the actual distances of all inverse transformation pixel groups corresponding to the highlight point Q to be judged and the feature distance set, the similarities of each inverse transformation pixel group corresponding to the highlight point Q to be judged are obtained; and for ease of understanding, the present embodiment will take the similarity acquisition process of any inverse transformation pixel group L as an example to describe, that is, the specific acquisition process of the similarity of the inverse transformation pixel group L is: obtain the mapping value set of the inverse transformation pixel group L, and record the maximum value in the mapping value set as the similarity of the inverse transformation pixel group L, and the kth mapping value in the mapping value set is the value after negative correlation mapping of the kth first indicator value in the first indicator value set corresponding to the inverse transformation pixel group L, and the i-th first indicator value in the first indicator value set corresponding to the inverse transformation pixel group L is the absolute value of the difference between the actual distance of the inverse transformation pixel group L and the i-th characteristic distance in the feature distance set; and this embodiment uses To perform negative correlation mapping, and exp() is an exponential function with a constant e as the base, is the kth first index value in the first index value set corresponding to the inverse transformation pixel point group L, and The larger the value of , the smaller the corresponding similarity.

[0053] Therefore, through the above process, the similarities of each inverse transformation pixel point group corresponding to the highlight point Q to be judged can be obtained, and then the set constructed by the similarities of all inverse transformation pixel point groups of the highlight point Q to be judged is obtained, and recorded as the initial similarity set corresponding to the highlight point Q to be judged.

[0054] In this embodiment, the initial similarity set corresponding to each highlight point Q to be judged can be obtained according to the method of the initial similarity set corresponding to the highlight point Q to be judged, and then a new set constructed by the initial similarity sets corresponding to all the highlight points to be judged in the highlight point set to be judged is obtained, and recorded as the target similarity set; and the smaller the similarity in the target similarity set, the greater the probability that there is an abnormality in the opening of the packaging box, and conversely, the greater the similarity in the target similarity set, the smaller the probability that there is an abnormality in the opening of the packaging box.

[0055] In addition, the process of determining whether a sequence is a periodic sequence or determining whether a sine curve conforms to periodicity is a well-known technique, and thus will not be described in detail in this embodiment.

[0056] Therefore, the target similarity set is obtained through the above process, and then it is determined whether the similarities in the similarity set are all greater than the preset similarity threshold. If so, it indicates that there is no abnormality in the opening of the packaging box, and therefore it is determined that the opening quality of the packaging box meets the requirements; otherwise, it indicates that there is an abnormality in the opening of the packaging box, and therefore it is determined that the opening quality of the packaging box does not meet the requirements; and this embodiment can more accurately identify the abnormal situation of the opening position offset and the opening tilt by analyzing whether the fused feature value sequence conforms to the periodicity and by calculating the similarity of each inverse transformation pixel point group; and the opening position offset refers to that the two straight lines constituting the opening that were originally required to be on a straight line are still on the same straight line, but there may be movement in one direction at the same time, for example, both move to the left the same distance; the opening tilt refers to that the two straight lines constituting the opening that were required to be on a straight line are not on a straight line, that is, a certain straight line may be tilted at a certain angle.

[0057] In a specific application, the implementer needs to set the preset similarity threshold according to the actual situation. For example, in this embodiment, the preset similarity threshold can be set to 0.7.

[0058] To summarize, the present embodiment first acquires the opening edge image of the packaging box; then, by performing Hough line detection on the opening edge image, the highlight point in the Hough space, the set of sinusoidal curves corresponding to the highlight point, and the characterization value corresponding to the highlight point are obtained; finally, according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set, the opening quality detection result of the packaging box is obtained; and the present embodiment can more accurately detect the opening quality of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set corresponding to the highlight point, that is, the present embodiment can improve the accuracy of detecting the opening quality of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sinusoidal curve in the sinusoidal curve set corresponding to the highlight point.

[0059] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An intelligent quality analysis method for a packaging box production line based on deep learning, characterized in that: The method comprises the following steps: In the process of producing the packaging box, an image after opening is obtained and recorded as an opening image of the packaging box, and the opening image is preprocessed to obtain an opening edge image of the packaging box; Performing Hough line detection on the opening edge image to obtain a highlight point in the Hough space, a set of sinusoidal curves corresponding to the highlight point, and a characterization value corresponding to the highlight point, wherein the characterization value corresponding to the highlight point refers to the number of times the highlight point is crossed by the sinusoidal curve in the Hough space; Obtaining an opening quality detection result of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sine curve in the sine curve set; The method for obtaining the opening quality detection result of the packaging box according to the characterization value corresponding to the highlight point and the peak point of the sine curve in the sine curve set includes: Get the preset characterization value interval; If the representation values ​​corresponding to the highlight points in the Hough space do not all belong to the preset representation value interval, it is determined that the opening quality of the packaging box does not meet the requirements; If the characterization values ​​corresponding to the highlight points in the Hough space all belong to the preset characterization value interval, then the opening quality detection result of the packaging box is obtained according to the peak point of the sine curve in the sine curve set; The method for obtaining the opening quality detection result of the packaging box according to the peak point of the sine curve in the sine curve set includes: According to the peak points of the sine curves in the sine curve set, obtaining a fusion feature value sequence corresponding to the highlight points; If the fused eigenvalue sequences corresponding to all the highlight points in the Hough space belong to periodic sequences, it is determined that the opening quality of the packaging box meets the requirements; if the fused eigenvalue sequences corresponding to all the highlight points in the Hough space do not belong to periodic sequences, the highlight points whose fused eigenvalue sequences do not belong to periodic sequences are recorded as highlight points to be judged, and the set constructed by all the highlight points to be judged in the Hough space is recorded as the highlight point set to be judged, and a target similarity set is obtained according to a set of sinusoidal curves corresponding to each highlight point to be judged in the highlight point set to be judged, and if the similarities in the target similarity set are all greater than a preset similarity threshold, it is determined that the opening quality of the packaging box meets the requirements, otherwise, it is determined that the opening quality of the packaging box does not meet the requirements; The method for obtaining the fusion feature value sequence corresponding to the highlight point includes: For any highlight point B in the Hough space: Obtain the maximum peak point of each sine curve in the sine curve set C, and record the set constructed by the maximum peak points of all sine curves in the sine curve set C as the peak point set G of the sine curve set C; the sine curve set C is the sine curve set corresponding to the highlight point B; According to the polar coordinates of each maximum peak point in the peak point set G, obtaining a polar diameter sequence corresponding to each maximum peak point in the peak point set G; According to the ratio of two adjacent polar diameters in the polar diameter sequence corresponding to each maximum peak point, a first ratio sequence of each maximum peak point is obtained, the ath first ratio in the first ratio sequence F of the maximum peak point g is the ratio of the ath polar diameter to the a+1th polar diameter in the polar diameter sequence corresponding to the maximum peak point g, and the maximum peak point g is any maximum peak point in the peak point set G; Obtaining weight values ​​of the first ratios in the first ratio sequence according to the first ratio types appearing in the first ratio sequence; the first ratio type refers to different types of values ​​existing in the first ratio sequence; Obtaining a fusion feature value sequence corresponding to the highlight point B according to the weight values ​​of each first ratio in the first ratio sequence; The method for obtaining the polar diameter sequence corresponding to each maximum peak point in the peak point set G includes: For the maximum peak point g: in the peak point set G, a set constructed by all maximum peak points having the same polar angle as the maximum peak point g is recorded as the peak point subset corresponding to the maximum peak point g, and a sequence constructed by the polar diameters of all the maximum peak points in the peak point subset is recorded as the polar diameter sequence corresponding to the maximum peak point g; The method for obtaining the weight value of each first ratio in the first ratio sequence includes: For the first ratio sequence F of the maximum peak point g: the total number of first ratios in the first ratio sequence F is recorded as a comprehensive quantity representation value, and all first ratio types appearing in the first ratio sequence F are statistically obtained and recorded as feature types corresponding to the first ratio sequence F; the frequency of occurrence of each feature type corresponding to the first ratio sequence F in the first ratio sequence F is recorded as a frequency value of the corresponding feature type; For the f-th first ratio in the first ratio sequence F: among all feature types corresponding to the first ratio sequence F, obtain a feature type including the f-th first ratio and record it as a target feature type; record the ratio of the frequency value of the target feature type to the comprehensive quantitative representation value as a second ratio; record the ratio of the second ratio to the frequency value of the target feature type as a weight value of the f-th first ratio; The method for obtaining the fusion feature value sequence corresponding to the highlight point B includes: A set constructed from the first ratio sequences of all maximum peak points in the peak point set G is recorded as a first ratio sequence set; In the first ratio sequence set, all sets constructed by all first ratios with the same label value are recorded as first ratio subsets, and the label value of the cth first ratio in each first ratio sequence in the first ratio sequence set is c; For any first ratio subset H0, the average of the weighted values ​​of all first ratios in the first ratio subset H0 is recorded as the fused feature value corresponding to the first ratio subset H0, and the label value of the first ratio in the first ratio subset H0 is used as the feature label value of the fused feature value corresponding to the first ratio subset H0; the weighted value of any first ratio h0 in the first ratio subset H0 is the product of the first ratio h0 and the weight value of the first ratio h0; A sequence constructed by fusion feature values ​​corresponding to all the first ratio subsets is recorded as a fusion feature value sequence corresponding to the highlight point B, wherein the fusion feature values ​​in the fusion feature value sequence are arranged in ascending order according to feature mark values; The method of obtaining a target similarity set according to a set of sine curves corresponding to each highlight point to be determined in the set of highlight points to be determined comprises: For any highlight point Q to be determined in the set of highlight points to be determined: In the set of sinusoidal curves corresponding to the highlight point Q to be determined, all sinusoidal curves that do not conform to periodicity are obtained, and are all recorded as the curves to be transformed of the highlight point Q to be determined; in the opening edge image, pixel points corresponding to the curves to be transformed are obtained, and are all recorded as inverse transformation pixel points of the highlight point Q to be determined; In the opening edge image, all edge straight lines corresponding to the highlight point Q to be determined are obtained, and are all recorded as feature straight lines corresponding to the highlight point Q to be determined; a line segment obtained by connecting all feature straight lines corresponding to the highlight point Q to be determined is recorded as a first line segment; a sequence constructed by all edge pixel points located on the first line segment and belonging to the feature straight line is recorded as a comprehensive sequence; Obtain a packaging box design drawing; on the packaging box design drawing, obtain a preset standard spacing distance between two adjacent characteristic straight lines on the first line segment, and record both as characteristic distances corresponding to the first line segment, and record a set of all characteristic distances corresponding to the first line segment as a characteristic distance set; In the comprehensive sequence, all inverse transformation pixel point groups corresponding to the highlight point Q to be determined are obtained, and two inverse transformation pixel points in the inverse transformation pixel point group are adjacent in the comprehensive sequence; the Euclidean distance between the two pixel points in the inverse transformation pixel point group is converted into an actual distance, and recorded as the actual distance of the corresponding inverse transformation pixel point group; For any inverse transformation pixel point group L, a mapping value set of the inverse transformation pixel point group L is obtained, and the maximum value in the mapping value set is recorded as the similarity of the inverse transformation pixel point group L; the kth mapping value in the mapping value set is a value after negative correlation mapping of the kth first index value in the first index value set corresponding to the inverse transformation pixel point group L, and the kth first index value in the first index value set is the absolute value of the difference between the actual distance of the inverse transformation pixel point group L and the kth feature distance in the feature distance set; The set constructed by the similarities of all the inverse transformation pixel groups corresponding to the highlight point Q to be determined is recorded as the initial similarity set of the highlight point Q to be determined; A new set constructed from the initial similarity sets of all the highlight points to be judged in the highlight point set to be judged is recorded as a target similarity set.

2. The intelligent quality analysis method for packaging box production line based on deep learning according to claim 1 is characterized in that: The method for acquiring the opening edge image of the packaging box comprises: The image after the packaging box is opened is denoised and grayscaled, and the image after denoising and grayscale processing is recorded as an image to be processed. The image to be processed is binarized to obtain a binary image, and edge detection is performed on the binary image, and the edge image obtained by edge detection is recorded as the opening edge image of the packaging box. The grayscale value of the pixel points belonging to the opening area on the binary image is 255, and the grayscale value of the pixel points not belonging to the opening area is 0.

3. The intelligent quality analysis method for packaging box production line based on deep learning according to claim 1 is characterized in that: The method for obtaining the set of sinusoidal curves corresponding to the highlight points includes: For any highlight point A in the Hough space: in the Hough space, a set constructed by all the sinusoidal curves passing through the highlight point A is recorded as the sinusoidal curve set corresponding to the highlight point A.