Methods, apparatus and packaging testing systems for packaging performance testing
By identifying the angle between the center seam and the binding direction line in the image of the packaged object, the system automatically determines whether the packaging performance of the packaging staples is qualified, solving the problem of low detection efficiency of packaging staples in the existing technology and realizing efficient and accurate packaging performance detection.
Patent Information
- Application Number
- CN202210690244.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-06-17
AI Technical Summary
Existing technologies for testing the encapsulation performance of encapsulation nails have low efficiency, cannot effectively guarantee testing accuracy, and cannot achieve intelligent operation.
By acquiring an image of the packaged surface, identifying the center seam and the straight line of the sealing pin's mounting direction, determining whether the mounting angle is within the predetermined range, and confirming whether the sealing performance of the sealing pin is qualified.
It enables rapid and accurate assessment of the sealing performance of the sealing nails without human visual inspection, improving inspection efficiency and accuracy, and avoiding manpower waste and visual fatigue.
Smart Images

Figure CN115035072B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of packaging performance testing technology, and more specifically, to a packaging performance testing method, apparatus, computer-readable storage medium, processor, and packaging testing system. Background Technology
[0002] Sealing pins are a crucial part of packaging boxes, preventing items from falling out or getting lost. If the sealing pins are not securely fastened, the box seal will be unstable, leading to items falling out and incomplete packages, resulting in product quality issues. Therefore, testing the sealing performance of the sealing pins is essential for assessing the proper sealing of the box and preventing item loss. By testing the sealing performance of the sealing pins, we can determine if the box is properly sealed, thus preventing product loss and quality problems caused by poor sealing. Conventional sealing inspection relies on human visual inspection. However, visual inspection is prone to fatigue, requires significant manpower and time, cannot guarantee accurate inspection, and cannot be developed into an intelligent inspection method.
[0003] The information disclosed above in the background section is only intended to enhance the understanding of the background art of the art described herein. Therefore, the background art may contain certain information that does not constitute prior art known to those skilled in the art in this country. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, computer-readable storage medium, processor, and packaging inspection system for testing packaging performance, in order to solve the problem of low efficiency in packaging performance testing of packaging pins in the prior art.
[0005] According to one aspect of the present invention, a method for detecting packaging performance is provided, comprising: acquiring an image of the packaging surface of a package, the packaging surface being the surface on which a packaging pin is located; identifying a center seam line and a straight line of the binding direction of the packaging pin in the image, the center seam line being the seam line of the seal of the package, and the straight line of the binding direction being the line connecting the centers of the two insertion holes of a packaging pin; determining that the packaging performance of the packaging pin is qualified when the binding angle is within a predetermined angle range, the binding angle being the angle between the straight line of the binding direction and the center seam line.
[0006] Optionally, identifying the center seam and the binding direction line of the packaging staple in the image includes: preprocessing the image to obtain the outline of the package; deleting the portion of the image outside the outline of the package to obtain a package image; identifying the center seam in the package image; and identifying the binding direction line in the package image.
[0007] Optionally, preprocessing the image to obtain the outline of the package includes: sharpening the image to obtain a first processed image; smoothing the first processed image to obtain a second processed image; and binarizing the second processed image to obtain the outline of the package.
[0008] Optionally, identifying the center seam in the package image includes: performing low-pass filtering on the package image to obtain a plurality of predetermined seam lines; calculating the length and edge angle of the predetermined seam lines, wherein the edge angle is the minimum angle between the predetermined seam line and the outline of the package; and determining the predetermined seam line as the center seam line when the length is greater than a predetermined length and the edge angle is less than a predetermined angle.
[0009] Optionally, identifying the binding direction line in the packaging image includes: extracting the portion of the packaging image whose brightness is lower than a predetermined brightness to obtain the two insertion holes of the packaging staple; and connecting the centers of the two insertion holes to obtain the binding direction line.
[0010] Optionally, the package has multiple packaging pins, all of which are driven into the packaging surface. After determining that the packaging performance of the packaging pins is qualified when the anchoring angle is within a predetermined angle range, the method further includes: determining that the package is qualified when the packaging performance of all the packaging pins is qualified.
[0011] According to another aspect of the present invention, a device for detecting the sealing performance of a sealing staple is also provided, comprising: an acquisition unit for acquiring an image of the sealing surface of a package, wherein the sealing surface is the surface on which the sealing staple is located; an identification unit for identifying a center seam line and a straight line of the fastening direction of the sealing staple in the image, wherein the center seam line is the gap line of the seal of the package, and the straight line of the fastening direction is the line connecting the centers of the two insertion holes of a sealing staple; and a first determination unit for determining that the sealing performance of the sealing staple is qualified when the fastening angle is within a predetermined angle range, wherein the fastening angle is the angle between the straight line of the fastening direction and the center seam line.
[0012] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any one of the methods described.
[0013] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes any of the methods described.
[0014] According to another aspect of the present invention, a packaging inspection system is also provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing any one of the methods described.
[0015] In this embodiment of the invention, the above-mentioned method for detecting packaging performance firstly acquires an image of the packaging surface of the package, where the packaging surface is the surface where the packaging pins are located on the package; then, it identifies the center seam line and the straight line of the mounting direction of the packaging pins in the image, where the center seam line is the seam line of the seal of the package, and the straight line of the mounting direction is the line connecting the centers of the two insertion holes of one packaging pin; finally, if the mounting angle is within a predetermined angle range, it is determined that the packaging performance of the packaging pins is qualified, where the mounting angle is the angle between the straight line of the mounting direction and the center seam line. This method determines whether the mounting direction of the packaging pins is off by identifying the angle between the center seam line and the straight line of the mounting direction of the packaging pins in the image of the packaging surface, thereby determining whether the packaging performance of the packaging pins is qualified. It eliminates the need for human visual inspection of the packaging performance, solving the problem of low efficiency in the prior art for detecting the packaging performance of packaging pins. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 A flowchart of a method for detecting packaging performance according to an embodiment of this application is shown;
[0018] Figure 2 A schematic diagram of the encapsulation surface of an encapsulation according to an embodiment of this application is shown;
[0019] Figure 3 A schematic diagram of a packaging performance testing apparatus according to an embodiment of this application is shown. Detailed Implementation
[0020] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, 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 application pertains.
[0021] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0022] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be an intermediate element present. Furthermore, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element via a third element.
[0023] As mentioned in the background section, the efficiency of packaging performance testing in the prior art is low. In order to solve the above problems, in a typical embodiment of this application, a method, apparatus, computer-readable storage medium, processor and packaging testing system for testing packaging performance are provided.
[0024] According to an embodiment of this application, a method for testing packaging performance is provided.
[0025] Figure 1 This is a flowchart of a method for detecting packaging performance according to an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0026] Step S101: Obtain an image of the packaging surface of the package, where the packaging surface is the surface where the packaging pins are located on the package.
[0027] Step S102: Identify the center seam line and the straight line of the mounting direction of the packaging pin in the above image. The center seam line is the gap line of the seal of the packaging. The straight line of the mounting direction is the center line connecting the two insertion holes of the packaging pin.
[0028] Step S103: If the binding angle is within the predetermined angle range, determine that the sealing performance of the above-mentioned sealing nail is qualified. The binding angle is the angle between the above-mentioned binding direction line and the above-mentioned center seam line.
[0029] In the above-mentioned method for testing packaging performance, firstly, an image of the packaging surface of the package is acquired, where the packaging surface is the surface where the packaging pins are located; then, the center seam line and the straight line of the mounting direction of the packaging pins are identified in the image, where the center seam line is the seam line of the seal of the package, and the straight line of the mounting direction is the line connecting the centers of the two insertion holes of one packaging pin; finally, if the mounting angle is within a predetermined angle range, the packaging performance of the packaging pin is determined to be qualified, where the mounting angle is the angle between the straight line of the mounting direction and the center seam line. This method determines whether the packaging performance of the packaging pin is qualified by identifying the angle between the center seam line and the straight line of the mounting direction of the packaging pin in the image of the packaging surface to determine whether the mounting direction of the packaging pin is deviated. It eliminates the need for human visual inspection of packaging performance, solving the problem of low efficiency in the prior art for testing the packaging performance of packaging pins.
[0030] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0031] It should also be noted that the aforementioned packaging material is typically a box. By installing a camera on the equipment that holds the packaging pins, an image of the packaging surface can be captured after packaging is completed, such as... Figure 2 As shown, the allowable deviation of the binding angle is set as α, and the predetermined angle range is (90°-α)~(90°+α). The detection method is not limited to detecting packaging nails, but is also applicable to other packaging components, such as packaging buckles and non-strip packaging parts.
[0032] In one optional embodiment of this application, identifying the center seam and the binding direction line of the packaging staple in the image includes: preprocessing the image to obtain the outline of the package; deleting the portion of the image outside the outline of the package to obtain a package image; identifying the center seam in the package image; and identifying the binding direction line in the package image. Specifically, by preprocessing the image, extracting the outline of the package, and deleting the portion of the image outside the outline of the package, interference with the subsequent identification of the center seam and binding direction line can be reduced, after which the center seam and binding direction line can be identified.
[0033] In one optional embodiment of this application, the image is preprocessed to obtain the outline of the package, including: sharpening the image to obtain a first processed image; smoothing the first processed image to obtain a second processed image; and binarizing the second processed image to obtain the outline of the package. Specifically, the package image is first sharpened to enhance the edges and grayscale transitions, making the package image clearer. Then, the package image is smoothed to optimize the image quality. A threshold is set to binarize the package image. The outline of the package is extracted using the Canny operator, and the image of the package is cropped from the outline. The angle between the circumscribed rectangle and the edge of the package is calculated, and the orientation is corrected by rotating the box around its center point to facilitate subsequent calculation of the angle and distance.
[0034] In one optional embodiment of this application, identifying the center seam in the package image includes: performing low-pass filtering on the package image to obtain a plurality of predetermined seam lines; calculating the length and edge angle of the predetermined seam lines, wherein the edge angle is the minimum angle between the predetermined seam line and the outline of the package; and determining the predetermined seam line as the center seam line when the length is greater than a predetermined length and the edge angle is less than a predetermined angle. Specifically, to address the reflective image interference from the tape under varying lighting conditions, a low-pass threshold is set to remove interference from light source reflections. This results in numerous wrinkles along the central seam (in the shadowed areas of the tape), which are designated seam lines. By calculating the pixel length of these designated seam lines, lines shorter than the predetermined length are removed, thus eliminating interference from localized tape wrinkles. The predetermined length is set based on the actual length of the package. The included angle of the edges of these designated seam lines is also calculated to determine if they are parallel to the edge of the package. If the length is greater than the predetermined length and the included angle is less than the predetermined angle, meaning the length of the designated seam line meets the requirements and is parallel to the edge of the package, then this designated seam line can be identified as the central seam line. Furthermore, the area of the pattern is used to remove pattern interference, further improving the accuracy of central seam line identification.
[0035] In one optional embodiment of this application, identifying the binding direction line in the aforementioned packaging image includes: extracting the portion of the packaging image where the image brightness is lower than a predetermined brightness to obtain the two insertion holes of the packaging pin; and connecting the centers of the two insertion holes to obtain the binding direction line. Specifically, the packaging pin is made of metal and has a brightness difference with the housing. When the packaging pin is attached, two insertion holes are generated, forming two small rectangles. After image processing, the image brightness detection detects the position of the packaging pin, and the center point of the hole is located by contour positioning. By connecting the center points, the binding direction line is obtained. If there are no insertion holes, it indicates that the packaging pin is not attached to the packaging material, and the packaging performance of the packaging pin is directly determined to be unqualified.
[0036] Optionally, further determine whether the position of the encapsulation pin is qualified. Locate the center point of the two hole contours by using the contour length, calculate the straight-line distance between the midpoint of the two insertion holes and the middle gap, and consider the position of the encapsulation pin to be qualified if the distance between the two is less than 2mm.
[0037] In one optional embodiment of this application, the package has multiple sealing pins, all of which are driven into the packaging surface. After determining that the packaging performance of the sealing pins is qualified when the anchoring angle is within a predetermined range, the method further includes: determining that the package is qualified if the packaging performance of all the sealing pins is qualified. Specifically, when the package has multiple sealing pins, it is necessary to determine whether the packaging performance of all the sealing pins is qualified. Only when the packaging performance of all the sealing pins is qualified can the package be determined to be qualified.
[0038] This application also provides a device for testing the packaging performance of a packaging pin. It should be noted that this device can be used to execute the packaging performance testing method for packaging pins provided in this application. The following describes the device for testing the packaging performance of a packaging pin provided in this application.
[0039] Figure 3 This is a schematic diagram of a device for testing the encapsulation performance of a sealing pin according to an embodiment of this application. Figure 3 As shown, the device includes:
[0040] The acquisition unit 10 is used to acquire an image of the packaging surface of the package, wherein the packaging surface is the surface on which the packaging pin is located on the package;
[0041] The identification unit 20 is used to identify the center seam line and the straight line of the binding direction of the packaging pin in the above image. The center seam line is the gap line of the seal of the packaging. The straight line of the binding direction is the center line connecting the two insertion holes of the packaging pin.
[0042] The first determining unit 30 is used to determine that the sealing performance of the sealing nail is qualified when the binding angle is within a predetermined angle range, wherein the binding angle is the angle between the binding direction line and the center seam.
[0043] In the aforementioned packaging performance testing device, an acquisition unit acquires an image of the packaging surface of the package, where the packaging surface is the surface where the packaging pins are located; an identification unit identifies the center seam line and the straight line of the mounting direction of the packaging pins in the image, where the center seam line is the seam line of the seal of the package, and the straight line of the mounting direction is the line connecting the centers of the two insertion holes of one packaging pin; a determination unit determines that the packaging performance of the packaging pins is qualified if the mounting angle is within a predetermined angle range, where the mounting angle is the angle between the straight line of the mounting direction and the center seam line. This device determines whether the packaging performance of the packaging pins is qualified by identifying the angle between the center seam line and the straight line of the mounting direction of the packaging pins in the packaging surface image, thereby eliminating the need for human visual inspection of the packaging performance and solving the problem of low efficiency in packaging pin packaging performance testing in the prior art.
[0044] It should be noted that the aforementioned packaging material is typically a box. By installing a camera on the equipment that holds the packaging pins, an image of the packaging surface can be captured after packaging is completed, such as... Figure 2 As shown, the set angle for the allowable deviation of the binding angle is α, and the range of the predetermined angle is (90°-α)~(90°+α).
[0045] In one optional embodiment of this application, the identification unit includes a preprocessing module, a deletion module, a first identification module, and a second identification module. The preprocessing module preprocesses the image to obtain the outline of the package; the deletion module deletes portions of the image outside the outline of the package to obtain a packaged image; the first identification module identifies the center seam line in the packaged image; and the second identification module identifies the binding direction line in the packaged image. Specifically, by preprocessing the image, extracting the outline of the package, and deleting portions of the image outside the outline of the package, interference with subsequent identification of the center seam line and binding direction line is reduced, after which the center seam line and binding direction line can be identified.
[0046] In one optional embodiment of this application, the preprocessing module includes a first preprocessing submodule, a second preprocessing submodule, and a third preprocessing submodule. The first preprocessing submodule is used to sharpen the image to obtain a first processed image; the second preprocessing submodule is used to smooth the first processed image to obtain a second processed image; and the third preprocessing submodule is used to binarize the second processed image to obtain the outline of the package. Specifically, the package image is first sharpened to enhance the edges and areas of grayscale abrupt changes, making the package image clearer. Then, the package image is smoothed to optimize the image quality. A threshold is set to binarize the package image. The outline of the package is extracted using the Canny operator, and the image of the package is cropped from the outline. The angle between the circumscribed rectangle and the edge of the package is calculated, and the orientation is corrected by rotating the box around its center point to facilitate subsequent calculations of the angle and distance.
[0047] In one optional embodiment of this application, the first identification module includes a first processing submodule, a calculation submodule, and a determination submodule. The first processing submodule is used to perform low-pass filtering on the packaged image to obtain a plurality of predetermined seam lines. The calculation submodule is used to calculate the length and edge angle of the predetermined seam lines, wherein the edge angle is the minimum angle between the predetermined seam line and the outline of the package. The determination submodule is used to determine the predetermined seam line as the center seam line when the length is greater than a predetermined length and the edge angle is less than a predetermined angle. Specifically, to address the reflective image interference from the tape under varying lighting conditions, a low-pass threshold is set to remove interference from light source reflections. This results in numerous wrinkles along the central seam (in the shadowed areas of the tape), which are designated seam lines. By calculating the pixel length of these designated seam lines, lines shorter than the predetermined length are removed, thus eliminating interference from localized tape wrinkles. The predetermined length is set based on the actual length of the package. The included angle of the edges of these designated seam lines is also calculated to determine if they are parallel to the edge of the package. If the length is greater than the predetermined length and the included angle is less than the predetermined angle, meaning the length of the designated seam line meets the requirements and is parallel to the edge of the package, then this designated seam line can be identified as the central seam line. Furthermore, the area of the pattern is used to remove pattern interference, further improving the accuracy of central seam line identification.
[0048] In one optional embodiment of this application, the second identification submodule includes a second processing submodule and a third processing submodule. The second processing submodule is used to extract the portion of the packaging image where the image brightness is lower than a predetermined brightness, thus obtaining the two insertion holes of the packaging pin. The third processing submodule is used to connect the centers of the two insertion holes to obtain the straight line of the mounting direction. Specifically, the packaging pin is made of metal and has a brightness difference with the housing. When the packaging pin is installed, two insertion holes are generated, forming two small rectangles. After image processing, the image brightness detection detects the position of the packaging pin. The center point of the hole is located by contour positioning, and the center point is connected to obtain the straight line of the mounting direction. If no insertion hole is found, it indicates that the packaging pin is not inserted into the packaging material, and the packaging performance of the packaging pin is directly determined to be unqualified.
[0049] Optionally, further determine whether the position of the encapsulation pin is qualified. Locate the center point of the two hole contours by using the contour length, calculate the straight-line distance between the midpoint of the two insertion holes and the middle gap, and consider the position of the encapsulation pin to be qualified if the distance between the two is less than 2mm.
[0050] In one optional embodiment of this application, the package has multiple sealing pins, all of which are driven into the packaging surface. The device further includes a second determining unit, which is used to determine that the packaging performance of the sealing pins is qualified when the stapling angle is within a predetermined angle range, and then determines that the package is qualified if the packaging performance of all the sealing pins is qualified. Specifically, when the package has multiple sealing pins, it is necessary to determine whether the packaging performance of all the sealing pins is qualified. Only when the packaging performance of all the sealing pins is qualified can the package be determined to be qualified.
[0051] The aforementioned packaging performance testing device includes a processor and a memory. The aforementioned acquisition unit, identification unit, and first determination unit are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0052] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the low efficiency of package pin performance testing in existing technologies.
[0053] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0054] This invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the above-described method.
[0055] This invention provides a processor for running a program, wherein the program executes the method described above when it runs.
[0056] This invention provides a packaging inspection system, including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0057] Step S101: Obtain an image of the packaging surface of the package, where the packaging surface is the surface where the packaging pins are located on the package.
[0058] Step S102: Identify the center seam line and the straight line of the mounting direction of the packaging pin in the above image. The center seam line is the gap line of the seal of the packaging. The straight line of the mounting direction is the center line connecting the two insertion holes of the packaging pin.
[0059] Step S103: If the binding angle is within the predetermined angle range, determine that the sealing performance of the above-mentioned sealing nail is qualified. The binding angle is the angle between the above-mentioned binding direction line and the above-mentioned center seam line.
[0060] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0061] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0062] Step S101: Obtain an image of the packaging surface of the package, where the packaging surface is the surface where the packaging pins are located on the package.
[0063] Step S102: Identify the center seam line and the straight line of the mounting direction of the packaging pin in the above image. The center seam line is the gap line of the seal of the packaging. The straight line of the mounting direction is the center line connecting the two insertion holes of the packaging pin.
[0064] Step S103: If the binding angle is within the predetermined angle range, determine that the sealing performance of the above-mentioned sealing nail is qualified. The binding angle is the angle between the above-mentioned binding direction line and the above-mentioned center seam line.
[0065] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0066] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0067] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0068] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0069] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0070] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0071] 1) In the packaging performance testing method of this application, firstly, an image of the packaging surface of the package is acquired, wherein the packaging surface is the surface where the packaging pins are located on the package; then, the center seam line and the straight line of the mounting direction of the packaging pins are identified in the image, wherein the center seam line is the gap line of the seal of the package, and the straight line of the mounting direction is the line connecting the centers of the two insertion holes of one packaging pin; finally, if the mounting angle is within a predetermined angle range, the packaging performance of the packaging pins is determined to be qualified, wherein the mounting angle is the angle between the straight line of the mounting direction and the center seam line. This method determines whether the mounting direction of the packaging pins is deviated by identifying the angle between the center seam line and the straight line of the mounting direction of the packaging pins in the packaging surface image, thereby determining whether the packaging performance of the packaging pins is qualified. It eliminates the need for human visual inspection of the packaging performance, solving the problem of low efficiency in packaging performance testing of packaging pins in the prior art.
[0072] 2) In the packaging performance testing device of this application, the acquisition unit acquires an image of the packaging surface of the package, wherein the packaging surface is the surface where the packaging pins are located on the package; the identification unit identifies the center seam line and the straight line of the mounting direction of the packaging pins in the image, wherein the center seam line is the gap line of the seal of the package, and the straight line of the mounting direction is the line connecting the centers of the two insertion holes of one packaging pin; the determination unit determines that the packaging performance of the packaging pins is qualified when the mounting angle is within a predetermined angle range, wherein the mounting angle is the angle between the straight line of the mounting direction and the center seam line. This device determines whether the mounting direction of the packaging pins is deviated by identifying the angle between the center seam line and the straight line of the mounting direction of the packaging pins in the packaging surface image, thereby determining whether the packaging performance of the packaging pins is qualified. It eliminates the need for human visual inspection of the packaging performance, solving the problem of low efficiency in the prior art for testing the packaging performance of packaging pins.
[0073] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for testing packaging performance, characterized in that, include: Acquire an image of the encapsulation surface of the package, where the encapsulation surface is the surface where the encapsulation pins are located on the package; Identify the center seam line and the straight line of the binding direction of the packaging pin in the image. The center seam line is the seam line of the seal of the packaging. The straight line of the binding direction is the line connecting the center of the two insertion holes of the packaging pin. When the binding angle is within a predetermined range, the sealing performance of the sealing staple is determined to be qualified. The binding angle is the angle between the binding direction line and the center seam line. Identifying the center seam and the binding direction line of the packaging staple in the image includes: preprocessing the image to obtain the outline of the package; deleting the portion of the image outside the outline of the package to obtain a package image; identifying the center seam in the package image; and identifying the binding direction line in the package image. Identifying the binding direction line in the packaging image includes: extracting the portion of the packaging image whose brightness is lower than a predetermined brightness to obtain the two insertion holes of the packaging staple; and connecting the centers of the two insertion holes to obtain the binding direction line. Identifying the center seam in the package image includes: performing low-pass filtering on the package image to obtain multiple predetermined seam lines; calculating the length and edge angle of the predetermined seam lines, wherein the edge angle is the minimum angle between the predetermined seam line and the outline of the package; and determining the predetermined seam line as the center seam line when the length is greater than a predetermined length and the edge angle is less than a predetermined angle.
2. The method according to claim 1, characterized in that, The image is preprocessed to obtain the outline of the package, including: The image is sharpened to obtain a first processed image; The first processed image is smoothed to obtain the second processed image; The second processed image is binarized to obtain the outline of the package.
3. The method according to claim 1 or 2, characterized in that, The package has multiple sealing pins, all of which are driven into the packaging surface. After determining that the packaging performance of the sealing pins is qualified, and assuming the anchoring angle is within a predetermined range, the method further includes: If the encapsulation performance of all the encapsulation pins is qualified, the encapsulation of the package is determined to be qualified.
4. A device for testing the sealing performance of a sealing nail, characterized in that, include: An acquisition unit is used to acquire an image of the packaging surface of the package, wherein the packaging surface is the surface on which the packaging pins are located on the package; The identification unit is used to identify the center seam line and the binding direction line of the packaging nail in the image. The center seam line is the gap line of the seal of the package. The binding direction line is the center line connecting the two insertion holes of the packaging nail. The first determining unit is used to determine that the sealing performance of the sealing staple is qualified when the binding angle is within a predetermined angle range, wherein the binding angle is the angle between the binding direction line and the center seam line; The recognition unit includes a preprocessing module, a deletion module, a first recognition module, and a second recognition module. The preprocessing module preprocesses the image to obtain the outline of the package. The deletion module deletes portions of the image outside the outline of the package to obtain a packaged image. The first recognition module identifies the center seam in the packaged image. The second recognition module identifies the binding direction line in the packaged image. The second identification module includes a second processing submodule and a third processing submodule. The second processing submodule is used to extract the portion of the image brightness in the packaging image that is lower than a predetermined brightness to obtain the two insertion holes of the packaging nail. The third processing submodule is used to connect the centers of the two insertion holes to obtain the straight line of the binding direction. The first identification module includes a first processing submodule, a calculation submodule, and a determination submodule. The first processing submodule is used to perform low-pass filtering on the package image to obtain multiple predetermined seam lines. The calculation submodule is used to calculate the length and edge angle of the predetermined seam line, wherein the edge angle is the minimum angle between the predetermined seam line and the outline of the package. The determination submodule is used to determine the predetermined seam line as the center seam line when the length is greater than a predetermined length and the edge angle is less than a predetermined angle.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program performs the method according to any one of claims 1 to 3.
6. A processor, characterized in that, The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 3 when it runs.
7. A packaging inspection system, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising methods for performing any one of claims 1 to 3.
Citation Information
Patent Citations
Cigarette packet seal defect detecting system based on image identification technology
CN103512888A