CN-122023373-A - Food additive packaging defect detection system based on machine vision
Abstract
The invention relates to the technical field of image recognition and detection, in particular to a food additive packaging defect detection system based on machine vision, which is characterized in that point cloud data are acquired for packaging bags quantitatively packaged by blanking equipment through a scanning module, a plurality of raised demarcation points are determined according to coordinate expression of the point cloud data through a construction module, blanking compaction state demarcations are constructed, surface images of the packaging bags are acquired through an image recognition module, a coding area is recognized, the coding area is divided into different subareas according to the blanking compaction state demarcations under the condition that the coding area has surface extension state difference risks, the number of groups of character groups formed by the same characters in the different subareas is counted through a recognition counting module, and finally a defect analysis module is matched with a detection strategy of the coding defect according to the number of the groups. Furthermore, the analysis of the difference of the extension states of the surface of the packaging bag caused by uneven material distribution is realized, and the coding defect caused by the surface extension change is accurately identified.
Inventors
- JIAO YANSEN
- YU LEI
Assignees
- 广东富盈生物科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260210
Claims (10)
- 1. A machine vision-based food additive package defect detection system, comprising: The scanning module is used for carrying out three-dimensional scanning on the packaging bags quantitatively packaged by the food additives through the blanking equipment to obtain point cloud data of the packaging bags; The construction module is connected with the scanning module and used for determining a plurality of raised boundary points according to the coordinate representation of the point cloud data and successively connecting the raised boundary points to construct blanking compaction state boundaries; The image recognition module is connected with the construction module and used for acquiring a surface image of the packaging bag and recognizing a coding area in the surface image, judging whether the coding area has a surface extension state difference risk according to the position relation between the coding area and a blanking compaction state dividing line, and dividing the coding area into different subareas based on the blanking compaction state dividing line; The recognition and statistics module is connected with the image recognition module and used for respectively carrying out character recognition on different subareas and counting the number of groups of the same characters in the different subareas to form a character group; The defect analysis module is respectively connected with the identification statistics module, the image identification module, the construction module and the scanning module and is used for matching a detection strategy of coding defects according to the group number; the detection strategy is to judge whether the coding area has defects according to the comparison situation of the gray level of the pixel points of the same characters in different subareas or the comparison situation of the gray level distribution curves of the pixels of the local dominant subareas at different moments.
- 2. The machine vision-based food additive package defect detection system of claim 1, wherein the build-up module is configured to build up a blanking compaction state demarcation line based on a plurality of raised demarcation points, wherein, The construction module takes the length direction of the packaging bag as a reference, uniformly sets a plurality of length direction reference lines along the length direction, and determines a point corresponding to the maximum value of coordinates, perpendicular to the horizontal ground direction, on each length direction reference line as a bulge demarcation point; and the construction module determines a connecting line which is sequentially connected and drawn by the raised dividing points along the width direction of the packaging bag as the blanking compaction state dividing line.
- 3. The machine vision-based food additive package defect detection system of claim 2, wherein the image recognition module is configured to determine whether there is a surface expansion state differential risk in the coded region based on a positional relationship between the coded region and a blanking compaction state boundary, wherein, And if the blanking compaction state boundary line passes through the coding region, the image recognition module judges that the coding region has a surface extension state difference risk.
- 4. The machine vision-based food additive package defect detection system of claim 3, wherein the image recognition module is configured to divide the different sub-areas, wherein, And the image recognition module is used for responding to a judging result that the surface extension state difference risk exists in the coding area, taking a blanking compaction state dividing line as a dividing boundary, and dividing the coding area into a compacted filler subarea and a non-compacted filler subarea.
- 5. The machine vision-based food additive package defect inspection system of claim 4, wherein the recognition statistics module is configured to count the number of groups of identical character groups, wherein, The recognition statistics module is used for recognizing characters in the compacted filling subarea and the non-compacted filling subarea, extracting the same characters in the compacted filling subarea and the non-compacted filling subarea into a character group, and counting the group number of the character group.
- 6. The machine vision-based food additive package defect detection system of claim 5, wherein the defect analysis module is configured to match a detection strategy for coding defects based on the group count, wherein, The defect analysis module is used for comparing the group number with a preset group number comparison condition; If the group number meets the group number comparison condition, the defect analysis module matches a detection strategy of coding defects to judge whether the coding region has defects according to the gray level comparison condition of pixel points of the same characters in each group in different sub-regions; If the group number does not accord with the group number comparison condition, the defect analysis module is matched with a detection strategy of the coding defect to judge whether the coding region has the defect according to the comparison condition of the pixel gray level distribution curves of the local dominant subregion at different moments; The group number comparison condition is that the group number is larger than a preset group number threshold value.
- 7. The machine vision-based food additive package defect detection system of claim 6, wherein the defect analysis module is configured to demarcate equally sized boxed regions in the compacted fill sub-region and the non-compacted fill sub-region, respectively, and calculate a pixel gray average of characters in each character group in both boxed regions.
- 8. The system of claim 7, wherein the defect analysis module is configured to determine whether the coded region is defective according to a pixel gray level average comparison of characters in each character group, wherein, And if the gray average value of the frame selection area in the compaction filling subarea in the character set is smaller than the gray average value of the frame selection area in the non-compaction filling subarea, the defect analysis module judges that the coding defect exists in the coding area.
- 9. The machine vision-based food additive package defect detection system of claim 6, wherein the defect analysis module is configured to construct a pixel gray scale profile of the locally dominant subregion at different times, wherein, The defect analysis module is used for collecting first pixel gray level distribution curves of pixel gray level values of a plurality of frame selection areas in the local dominant subarea along with the change of the frame selection areas and the blanking compaction state boundary distance at the first capturing moment after coding is completed; collecting a second pixel gray level distribution curve of which the pixel gray level value of a plurality of frame selection areas in a local dominant sub-area changes along with the distance between the frame selection areas and a blanking compaction state boundary line at a second capturing moment after coding is completed; The local dominant subregion is the compacted filler subregion, and the second capturing time is separated from the first capturing time by a preset time length.
- 10. The machine vision-based food additive package defect detection system of claim 9, wherein the defect analysis module is configured to determine whether the coded region is defective based on a comparison of a first area defined by a first pixel gray scale distribution curve and a horizontal axis and a second area defined by a second pixel gray scale distribution curve, wherein, And if the absolute value of the difference between the first area and the second area is larger than a preset area difference threshold, the defect analysis module judges that the coding area has defects.
Description
Food additive packaging defect detection system based on machine vision Technical Field The invention relates to the technical field of image recognition and detection, in particular to a food additive packaging defect detection system based on machine vision. Background In the field of food additive production and packaging, in the actual production of quantitative blanking packaging, after the food additive is quantitatively filled into a packaging bag by a blanking device, the food additive is unevenly distributed in the bag due to factors such as the falling gravity action of materials, uneven accumulation and the like, and the non-uniform state of compaction on one side and loose and white on one side is presented. The distribution difference enables the surface of the packaging bag to form obvious high-low bump boundaries, when the coding area spans the boundaries, the surface expansion degree is different, the compaction side surface is tight, the loosening side surface is loose, and coding characters are directly caused to present different expansion deformation in different areas. In the conveying process of a follow-up packaging bag by a conveyor belt, the additive in a loose state in the bag can shift in position, so that the surface extension state of an original formed coding area is further changed, the abnormality of character stretching and twisting is caused, and the recognition accuracy of coding characters in follow-up automatic sorting and tracing links is seriously influenced. For example, chinese patent publication No. CN119399203a discloses a method and system for detecting a package defect, which relates to the technical field of package detection, and the method for detecting a package defect includes creating target feature template information, obtaining a second image, detecting an edge of a second target feature, performing edge segmentation on the second target feature, identifying a segmented image of the second target feature, performing identification result matching according to the identification result of the second target feature and the target feature template information, performing misprint judgment on the second target feature based on the identification result matching result to obtain a misprint judgment result, extracting pixels of the segmented image of the second target feature if the misprint judgment result is not misprint, performing pixel matching according to a second pixel point set and the target feature template information, removing the matched second pixels, and performing defect judgment on the retained second pixels. Automatic detection of the printing defects of the packaging bag is realized. The character recognition or gray level detection adopted by the existing code printing defect detection technology does not consider the expansion state difference of the surface of the packaging bag caused by uneven material distribution, is difficult to accurately identify the code printing defect caused by surface expansion change, and cannot meet the high-precision requirement of packaging production on code printing quality detection. Disclosure of Invention Therefore, the invention provides a food additive packaging defect detection system based on machine vision, which is used for solving the problems that the prior art does not consider the expansion state difference of the surface of a packaging bag caused by uneven material distribution, is difficult to accurately identify the coding defect caused by surface expansion change, and cannot meet the high-precision requirement of packaging production on coding quality detection. To achieve the above object, the present invention provides a machine vision-based food additive package defect detection system, comprising: The scanning module is used for carrying out three-dimensional scanning on the packaging bags quantitatively packaged by the food additives through the blanking equipment to obtain point cloud data of the packaging bags; The construction module is connected with the scanning module and used for determining a plurality of raised boundary points according to the coordinate representation of the point cloud data and successively connecting the raised boundary points to construct blanking compaction state boundaries; The image recognition module is connected with the construction module and used for acquiring a surface image of the packaging bag and recognizing a coding area in the surface image, judging whether the coding area has a surface extension state difference risk according to the position relation between the coding area and a blanking compaction state dividing line, and dividing the coding area into different subareas based on the blanking compaction state dividing line; The recognition and statistics module is connected with the image recognition module and used for respectively carrying out character recognition on different subareas and counting the number of groups of the same cha