Seal detection method, apparatus, and storage medium

By using X-ray equipment and image processing technology, abnormal sealing of material bags can be automatically detected, solving the problem of low efficiency in manual inspection and achieving efficient and accurate sealing inspection.

CN116342462BActive Publication Date: 2025-12-23HEFEI MEIYA OPTOELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111601715.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-12-23
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

In existing technologies, manual visual inspection of material bag sealing abnormalities is inefficient and labor-intensive, and cannot accurately detect foreign objects inside the seal, thus affecting production efficiency.

Method used

X-ray equipment is used to acquire images of material bags. Image processing technology is used to determine the sealing location and detect foreign objects, including shape recognition, centroid calculation and curvature analysis. The sealing anomalies are judged by combining the pixel grayscale average.

Benefits of technology

It enables convenient and efficient detection of abnormalities in the sealing of material bags, and is applicable to material bags of different shapes and types, reducing manual intervention and improving production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342462B_ABST
    Figure CN116342462B_ABST
Patent Text Reader

Abstract

The application discloses a sealing detection method, device and storage medium. The sealing detection method comprises the following steps: acquiring a material bag image, wherein the material bag image is collected by an X-ray device; determining a sealing position in a material bag region according to the material bag region; extracting a sealing region from the material bag region according to the sealing position, and performing foreign matter detection on the sealing region. The sealing detection method can conveniently detect whether the sealing of the material bag is abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of defect detection, and in particular to a sealing detection method, a sealing detection device and a storage medium. BACKGROUND

[0002] There are more small package foods in the market, and whether the package sealing is abnormal will directly affect the product quality and customer experience. At present, the market mainly checks whether the material bag sealing is abnormal through manual visual method. The main disadvantages of this method are: 1) for the bag with oil inside the sealing and no obvious difference on the surface of the bag sealing, the human eye cannot accurately distinguish it, and it must be checked by a specific means; 2) if each bag needs to be checked by a specific means, it will consume a lot of manpower, and also will affect the yield of other processes due to slow inspection speed. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the related art. To this end, a first object of the present application is to provide a sealing detection method for conveniently detecting whether the material bag sealing is abnormal.

[0004] A second object of the present application is to provide a computer readable storage medium.

[0005] A third object of the present application is to provide a sealing detection device.

[0006] To achieve the above object, a sealing detection method according to a first aspect of the present application is provided, which comprises: acquiring a material bag image and extracting a material bag region, wherein the material bag image is collected by an X-ray device; determining a sealing position in the material bag region according to the material bag region; extracting a sealing region from the material bag region according to the sealing position, and performing foreign matter detection on the sealing region.

[0007] The sealing detection method of the present application can conveniently detect whether the material bag sealing is abnormal. First, the X-ray device is used to collect a material bag image, and then a material bag region is extracted from the material bag image. The sealing position of the material bag is determined according to the material bag region, and foreign matter detection is performed on the sealing position to determine whether there is foreign matter such as clamping material. Thus, it can be conveniently detected whether the material bag sealing is abnormal.

[0008] In addition, the sealing detection method of the present application can have the following additional technical features:

[0009] According to one embodiment of the present application, the determination of the sealing position in the material bag region according to the material bag region comprises: rotating the material bag region to a horizontal position at any long side of the material bag region; and determining the sealing position of the material bag in the material bag image according to the shape and / or sealing form of the material bag region.

[0010] According to one embodiment of the present application, before the step of determining the sealing position in the material bag region according to the material bag region, the method further comprises: performing mean filtering on the material bag region to reduce image acquisition noise points.

[0011] According to one embodiment of the present application, the step of determining the sealing position of the material bag in the material bag image according to the shape and / or sealing form of the material bag region comprises: if the shape of the material bag is rectangular and single-side sealing, or the shape of the material bag is a shape with a notch, performing histogram statistics on the material bag region to obtain a first pixel value corresponding to a histogram peak and a second pixel value corresponding to a histogram valley; performing segmentation on the material bag image according to a middle pixel value between the first pixel value and the second pixel value to obtain a material region and a packaging inner region; calculating a first centroid of the material region and a second centroid of the packaging inner region respectively; and determining the sealing position according to the first centroid and the second centroid.

[0012] According to one embodiment of the present application, the step of determining the sealing position according to the first centroid and the second centroid comprises: when the first centroid is on the left side of the second centroid, determining that the sealing position is on the right side of the material bag region; and when the first centroid is on the right side of the second centroid, determining that the sealing position is on the left side of the material bag region.

[0013] According to one embodiment of the present application, the step of determining the sealing position of the material bag in the material bag image according to the shape and / or sealing form of the material bag region comprises: if the shape of the material bag is rectangular and double-side sealing, determining that the sealing position is on the left and right sides of the material bag region.

[0014] According to one embodiment of the present application, the step of determining the sealing position in the material bag region according to the material bag region comprises: if the shape of the material bag is square, determining that the sealing position is on the four sides of the material bag.

[0015] According to one embodiment of the present application, the step of determining the sealing position of the material bag in the material bag image according to the shape and / or sealing form of the material bag region comprises: if the shape of the material bag is a shape with a notch, calculating a curvature value of a material edge point by the following formula:

[0016]

[0017] wherein P i is a current point, P i-k is a previous point spaced k points away from the point P i , P i+ka point P i a point behind the point P by k points, k being a preset interval i a curvature value of the i-th point; obtaining a gap of the bag region according to the curvature value; if the gap is on the upper side and / or the lower side in the bag region, a side closer to the gap in the left and right sides is a sealing position of the bag; and / or, if the gap is on the left side and / or the right side in the bag region, a side closer to the gap in the upper and lower sides is the sealing position of the bag.

[0018] According to an embodiment of the present application, the extracting a sealing region from the bag region according to the sealing position comprises: offsetting a region of a preset distance inward from a bag edge corresponding to the sealing position as the sealing region.

[0019] According to an embodiment of the present application, the foreign matter detection on the sealing region comprises: calculating a pixel gray mean value in the sealing region; counting pixel points with a gray value less than the pixel gray mean value in the sealing region, and recording the pixel points as bad points; calculating a density or a quantity of the bad points; and determining that the sealing region has a material clamping condition when the density is greater than a preset density value or the quantity is greater than a preset quantity.

[0020] According to an embodiment of the present application, before the calculating the pixel gray mean value in the sealing region, the method further comprises: performing an enhancement processing on the sealing region by using an image enhancement method such as a sobel, a Laplacian operator or a histogram enhancement.

[0021] To achieve the above object, a second aspect of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the sealing detection method is realized.

[0022] The computer readable storage medium of the embodiment of the present application can conveniently detect whether the sealing of the bag is abnormal when the computer program stored thereon is executed by a processor.

[0023] To achieve the above object, a third aspect of the present application provides a sealing detection device, which comprises a memory, a processor and a computer program stored in the memory. When the computer program is executed by the processor, the sealing detection method is realized.

[0024] The sealing detection device of the embodiment of the present application can conveniently detect whether the sealing of the bag is abnormal by realizing the sealing detection method.

[0025] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following and the attendant drawings or can be learned by practice of the application. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 is a flow chart of a seal detection method according to an embodiment of the application.

[0027] Figure 2 is a schematic diagram of a seal detection method according to an example of the application. DETAILED DESCRIPTION

[0028] Embodiments of the application are described in detail below with reference to the attached drawing figures, wherein the same or like reference numerals and characters throughout the figures denote the same or like components, functions or structures.

[0029] A seal detection method, apparatus and storage medium according to embodiments of the application are described below with reference to the accompanying drawings.

[0030] Figure 1 is a flow chart of a seal detection method according to an embodiment of the application.

[0031] As shown in Figure 1 , the seal detection method comprises:

[0032] S11, acquiring a material bag image and extracting a material bag region, wherein the material bag image is acquired by an X-ray device.

[0033] Specifically, first, a material bag image is acquired, and a material bag region in the material bag image is extracted, and then the material bag region is subjected to mean filtering to reduce image acquisition noise points. After the material bag region is subjected to mean filtering, the material bag region is subjected to fixed threshold binarization processing.

[0034] S12, determining a seal position in the material bag region according to the material bag region.

[0035] Since there are many kinds of materials in the material bag, such as meat, sandwich, vegetables, sauce, etc., the sealing position of the material bag will change accordingly due to the different kinds of materials in the material bag. In the implementation of the present step, the shape of the material bag can include a rectangle, a square, a shape with a notch, etc. The shape of the material bag region can be determined according to the input of the user. Before the detection device applies the method for detection, the user can input the shape of the material bag through the input module of the detection device, and the shape of the material bag region is determined by reading the input of the user. The shape of the material bag region can also be calculated. As an example, the minimum circumscribed rectangle of the material bag region can be calculated. If the four sides of the minimum circumscribed rectangle are not equal, it is determined to be a rectangle. If the four sides are equal, it is determined to be a square.

[0036] Meanwhile, the user can also input the sealing form of the material bag region through the input module of the detection device. The sealing form includes single-side sealing, double-side sealing, etc.

[0037] Further, the sealing position of the material bag in the material bag image is determined according to the shape of the material bag region.

[0038] In an embodiment, if the shape of the material bag region is a square, it is determined that the sealing position is at the four sides of the material bag. In the implementation of the present step, the material bag region can also be rotated first so that any long side of the material bag region is in a horizontal position. This long side can be any side of the square. Then the four sides of the material bag are determined as the sealing region.

[0039] In an embodiment, if the shape of the material bag region is not a square, the material bag region is rotated so that any long side of the material bag region is in a horizontal position.

[0040] As an example, a horizontal circumscribed rectangle can be set for the material bag. Then the material bag is rotated while keeping the direction of the circumscribed rectangle unchanged. During the rotation of the material bag, the size of the circumscribed rectangle will change constantly. The rotation angle is obtained according to the principle of the minimum circumscribed rectangle. Then the material bag is rotated to the horizontal direction according to the rotation angle.

[0041] Further, the sealing position of the material bag in the material bag image is determined according to the shape of the material bag region and / or the sealing form.

[0042] Specifically, if it is determined that the shape of the material bag region is a rectangle and the material bag is single-side sealed, the method for determining the sealing position of the material bag includes the following steps:

[0043] Histogram statistics are performed on the material bag area to obtain the first pixel value corresponding to the peak and the second pixel value corresponding to the trough. The material bag image is segmented based on the middle pixel value of the first and second pixel values ​​to obtain the material area and the packaging inner area. The first centroid of the material area and the second centroid of the packaging inner area are calculated respectively. The sealing position is determined based on the first and second centroids.

[0044] Specifically, after obtaining the material region and the packaging inner region, the maximum connected component of the segmented material region is calculated, and the first centroid of the material region is obtained based on the contour of the maximum connected component. At the same time, the second centroid of the packaging inner region is calculated.

[0045] When the first centroid is to the left of the second centroid, the sealing position is determined to be on the right side of the material bag area; when the first centroid is to the right of the second centroid, the sealing position is determined to be on the left side of the material bag area.

[0046] As an example, for a specific material bag, if its material bag area is determined to be rectangular and sealed on one side, a histogram can be generated from the material bag area in the material bag image. Figure 2 As shown in (a), by obtaining the first pixel value corresponding to the peak and the second pixel value corresponding to the trough in the histogram, and obtaining the median value between the first and second pixel values, the image of the material bag can be segmented based on this median value to obtain the following: Figure 2 The packaging interior area shown in (b) and as shown in [the image] Figure 2 The material area is shown in (c). Obtain the first centroid and the second centroid, and determine the sealing position based on the first centroid and the second centroid.

[0047] If the material bag is rectangular and has a double-sided seal, then the seal is determined to be located on the left and right sides of the material bag area.

[0048] If the shape of the material bag area is determined to be a notched shape, the methods for determining the sealing position of the material bag include the following two methods.

[0049] Method 1 is the same as the above-mentioned material bag, which is rectangular in shape and sealed on one side.

[0050] Method 2 specifically includes the following steps:

[0051] B1 calculates the curvature value at the edge point of the material.

[0052] Specifically, the edges of the bag region are subjected to Gaussian smoothing. After the Gaussian smoothing, the chamfer region of the bag is removed, specifically, if the notch is on the upper side and / or the lower side in the bag region, the left and right side edges are translated inward by a fixed distance to determine the middle region in the bag region, i.e., the part after the chamfer region of the bag is removed, so that the notch position can be determined for the upper and lower sides of the middle region, so that the influence of the chamfer region of the bag on the curvature value calculation can be excluded.

[0053] If the notch is on the left side and / or the right side in the bag region, the upper and lower side edges are translated inward by a fixed distance to determine the middle region in the bag region, i.e., the part after the chamfer region of the bag is removed, so that the notch position can be determined for the left and right sides of the middle region, so that the influence of the chamfer region of the bag on the curvature value calculation can be excluded.

[0054] After the above processing of the bag region, the curvature values of the points on the edges of the processed bag region are calculated by a formula, so as to realize the calculation of the region values of the bag edge points. Specifically, the curvature values of the bag edge points are calculated by the following formula:

[0055]

[0056] wherein P i is the current point, P i-k is the previous point spaced k points away from the point P i , P i+k is the next point spaced k points away from the point P i , k is a preset interval, and K i is the curvature value of the i-th point.

[0057] B2, obtaining the notch of the bag region according to the curvature values.

[0058] Specifically, a curvature value threshold can be preset, and then a region with a curvature value greater than the curvature value threshold is obtained, and the region is regarded as a notch candidate region. In this way, the influence of the sharp corner region caused by the folding of the bag on the determination of the sealing position can be prevented.

[0059] After obtaining the notch candidate region, the area of the notch candidate region is obtained, and the area is compared with a pre-obtained area threshold, so as to remove the notch candidate regions that do not meet the conditions, and the notch candidate regions that pass the comparison are determined as the final notches.

[0060] B3, determining the sealing position according to the notches.

[0061] Specifically, if the notch is on the upper side and / or the lower side in the bag region, the side closer to the notch among the left and right sides is the sealing position of the bag;

[0062] And / or,

[0063] If the notch is located on the left and / or right side of the material bag area, the side closer to the notch on the upper or lower side is the sealing position of the material bag.

[0064] S13, extract the sealing area from the material bag area according to the sealing position, and perform foreign object detection on the sealing area.

[0065] Specifically, after determining the sealing position of the material bag, the area offset inward by a preset distance from the edge of the material bag corresponding to the sealing position is designated as the sealing area. Then, the average grayscale value of the pixels within the sealing area is calculated; pixels with grayscale values ​​less than the average grayscale value within the sealing area are counted and marked as defective pixels; the density or number of defective pixels is calculated; when the density exceeds a preset density value or the number exceeds a preset number, it is determined that there is material trapping in the sealing area (such as oil trapping, material trapping, etc.).

[0066] As an example, after determining the sealing position of the material bag, the sealing area can be obtained by etching a fixed width inward from the sealing position. A detection window can then be pre-established. After extracting the sealing area, a portion of this area is inspected using this detection window. Specifically, the average grayscale value of the pixels within the detection window is obtained and used as a pixel threshold. Pixels with grayscale values ​​less than this threshold are identified as defective pixels. A fixed-size circle is then drawn centered on each defective pixel. The number of defective pixels within this circle is checked against the threshold; if the number exceeds the threshold, the defective pixel is considered to contain trapped material. Furthermore, the detection window is used to traverse the entire sealing area to obtain the material trapping status of the entire sealing area.

[0067] Optionally, before calculating the average grayscale value of pixels within the sealed area, image enhancement methods such as Sobel, Laplacian operators, or grayscale enhancement can be used to enhance the sealed area to increase the image contrast.

[0068] In one embodiment of the present invention, after obtaining the shape and sealing form of the material bag area, the material bag area can first be rotated to a horizontal position, and then the sealing position of the material bag in the material bag image can be determined according to the shape and / or sealing position of the material bag area. The shape of the material bag area includes rectangles, squares, and shapes with notches, and the sealing position of the material bag area includes single-sided sealing and double-sided sealing.

[0069] In summary, the sealing detection method of the embodiment of the present application firstly acquires the material bag image by using the X-ray equipment, then extracts the material bag region from the material bag image, determines the sealing position of the material bag according to the material bag region, and performs the material clamping detection on the sealing position to determine whether there is material clamping and the position of the material clamping. Thus, it can be convenient to detect whether the sealing of the material bag is abnormal. Moreover, the present application proposes different methods for determining the sealing position according to different shapes of the material bag region, so that the sealing detection method of the embodiment of the present application can be applied to the material bags for packaging different kinds of materials.

[0070] Further, the present application proposes a computer readable storage medium.

[0071] In the embodiment of the present application, the computer readable storage medium stores the computer program, and the computer program is executed by the processor to realize the sealing detection method.

[0072] The computer readable storage medium of the embodiment of the present application, when the computer program stored thereon is executed by the processor, firstly acquires the material bag image by using the X-ray equipment, then extracts the material bag region from the material bag image, determines the sealing position of the material bag according to the material bag region, and performs the material clamping detection on the sealing position to determine whether there is material clamping and the position of the material clamping. Thus, it can be convenient to detect whether the sealing of the material bag is abnormal. Moreover, the present application proposes different methods for determining the sealing position according to different shapes of the material bag region, so that the sealing detection method of the embodiment of the present application can be applied to the material bags for packaging different kinds of materials.

[0073] Further, the present application proposes a sealing detection device.

[0074] In the embodiment of the present application, the sealing detection device comprises a memory, a processor and a computer program stored in the memory, and the computer program is executed by the processor to realize the sealing detection method.

[0075] The sealing detection device of the embodiment of the present application, by realizing the sealing detection method, firstly acquires the material bag image by using the X-ray equipment, then extracts the material bag region from the material bag image, determines the sealing position of the material bag according to the material bag region, and performs the material clamping detection on the sealing position to determine whether there is material clamping and the position of the material clamping. Thus, it can be convenient to detect whether the sealing of the material bag is abnormal. Moreover, the present application proposes different methods for determining the sealing position according to different shapes of the material bag region, so that the sealing detection method of the embodiment of the present application can be applied to the material bags for packaging different kinds of materials. Specifically, the sealing detection device is specifically an X-ray detection device for packaging.

[0076] It is to be appreciated that the above description and the examples that follow are intended to be illustrative only and that changes can be made to the description, as represented by the above listed elements, by the steps recited in the flow charts, and by the examples that follow, without departing from the spirit of the application. Accordingly, the scope of the present application is intended to be defined only by the appended claims.

[0077] It should be understood that aspects of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following techniques, which are well known in the art of hardware implementation, can be used: a hybrid of the above techniques, a mixture of two or more of the above techniques, or a combination of the above techniques with other techniques not listed above.

[0078] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples.

[0079] In the description of the application, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the application and simplifying the description, and does not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application.

[0080] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "a plurality of" is at least two, such as two, three, etc., unless otherwise specifically limited.

[0081] In the present application, unless otherwise specifically defined and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be broadly understood, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship of two elements, unless otherwise specifically defined. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0082] In the present application, unless otherwise specifically defined and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. Moreover, the first feature "above", "above" and "above" the second feature can be directly above or obliquely above the first feature, or only indicate that the horizontal height of the first feature is higher than that of the second feature. The first feature "below", "below" and "below" the second feature can be directly below or obliquely below the first feature, or only indicate that the horizontal height of the first feature is less than that of the second feature.

[0083] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as a limitation on the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A method of detecting a closure, characterized by, The method comprises: acquiring a material bag image and extracting a material bag region, wherein the material bag image is collected by an X-ray device; determining a sealing position in the material bag region according to the material bag region; extracting a sealing region from the material bag region according to the sealing position, and performing foreign matter detection on the sealing region; the determining of the sealing position in the material bag region according to the material bag region comprises: rotating the material bag region so that any long side of the material bag region is in a horizontal position; if the shape of the material bag is rectangular and single-side sealing, performing histogram statistics on the material bag region to obtain a first pixel value corresponding to a histogram peak and a second pixel value corresponding to a histogram trough; segmenting the material bag image according to a middle pixel value between the first pixel value and the second pixel value to obtain a material region and an inner packaging region; calculating a first centroid of the material region and a second centroid of the inner packaging region respectively; determining the sealing position according to the first centroid and the second centroid.

2. The cap detection method of claim 1, wherein Before the determining of the sealing position in the material bag region according to the material bag region, the method further comprises: performing mean filtering on the material bag region to reduce image acquisition noise points.

3. The cap detection method of claim 1, wherein The determining of the sealing position in the material bag region according to the material bag region further comprises: if the shape of the material bag is a shape with a notch, performing histogram statistics on the material bag region to obtain a first pixel value corresponding to a histogram peak and a second pixel value corresponding to a histogram trough; segmenting the material bag image according to a middle pixel value between the first pixel value and the second pixel value to obtain a material region and an inner packaging region; calculating a first centroid of the material region and a second centroid of the inner packaging region respectively; determining the sealing position according to the first centroid and the second centroid.

4. The method of claim 3, wherein The determining of the sealing position according to the first centroid and the second centroid comprises: when the first centroid is on the left side of the second centroid, determining that the sealing position is on the right side of the material bag region; when the first centroid is on the right side of the second centroid, determining that the sealing position is on the left side of the material bag region.

5. The cap detection method of claim 1, wherein The determining of the sealing position in the material bag region according to the material bag region further comprises: if the shape of the material bag is rectangular and double-side sealing, determining that the sealing position is on both left and right sides of the material bag region.

6. The cap detection method of claim 1, wherein The determining of the sealing position in the material bag region according to the material bag region further comprises: if the shape of the material bag is square, determining that the sealing position is on four sides of the material bag.

7. The cap detection method of claim 1, wherein The determining of the sealing position in the material bag region according to the material bag region further comprises: if the shape of the material bag is a shape with a notch, calculating a curvature value of a material edge point through the following formula: wherein, is a current point, is a point interval preceding point of the point, is a point interval succeeding point of the point, is a preset interval, is a curvature value of the point; obtaining a notch of the material bag region according to the curvature value; if the notch is on the upper side and / or the lower side in the material bag region, the side closer to the notch among the left and right sides is the sealing position of the material bag. If the gap is on the left side and / or the right side in the material bag region, the side closer to the gap in the upper and lower sides is the sealing position of the material bag; The gap of the material bag region is obtained according to the curvature value, comprising: The gap of the material bag region is obtained according to the curvature value, a preset curvature value threshold and a preset area threshold.

8. The method of detecting a closure according to any one of claims 3-7, wherein, The sealing area is extracted from the material bag region according to the sealing position, comprising: The area of the material bag edge corresponding to the sealing position is offset inward by a preset distance as the sealing area.

9. The cap detection method of claim 1, wherein The foreign matter detection on the sealing area, comprising: Calculating the average pixel gray value in the sealing area; Counting the pixel points with the gray value less than the average pixel gray value in the sealing area, and recording the pixel points as bad points; Calculating the density or quantity of the bad points; When the density is greater than a preset density value, or the quantity is greater than a preset quantity, it is determined that the sealing area has a material clamping condition.

10. The method of claim 9, wherein the step of detecting the seal comprises the step of: Before the calculation of the average pixel gray value in the sealing area, further comprising: ​ Using a sobel, Laplacian operator or histogram enhancement image enhancement method to perform enhancement processing on the sealing area.

11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the sealing detection method in any one of claims 1-10.

12. A closure detection apparatus comprising a memory, a processor and a computer program stored on the memory, characterised in that, The computer program is executed by the processor to realize the sealing detection method in any one of claims 1-10.

Citation Information

Patent Citations

  • Package inspection apparatus

    CN102837852A

  • Detecting system and detecting method for plastic automatic sealing bag

    CN107014821A