Sealing detection method, device and system
By using a detection mechanism consisting of a light source and a detection camera, combined with image processing technology and an improved least squares method, automated sealing detection of medical consumable packaging bags has been achieved. This solves the problems of low efficiency and poor accuracy of manual detection, ensuring high efficiency and reliability of sealing detection.
Patent Information
- Application Number
- CN202511658696.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Current technologies for testing the sealing of medical consumable packaging rely on manual inspection, which is costly, inefficient, and prone to omissions and misjudgments, leading to the risk of sealing failure.
The detection mechanism, consisting of a light source and a detection camera, automatically detects the sealing line fitting and tilt angle of the inner and outer packaging bags through image processing technology. Combined with the improved least squares method and the Canny edge detection algorithm, it realizes the automated determination of the sealing status.
This improves the efficiency and accuracy of seal detection, ensuring that a seal is considered good only when both the inner and outer packaging bags are properly sealed, thus avoiding missed or false detections and guaranteeing the integrity and safety of the tested items.
Smart Images

Figure CN121113402A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of sealing detection equipment, and particularly relates to a sealing detection method, device and system. BACKGROUND
[0002] After medical devices such as medical consumables are produced, two layers of packaging are required. The first layer is an inner packaging bag, which is a light blue medical paper-plastic bag, and the second layer is a transparent polyvinyl chloride plastic packaging bag.
[0003] In the requirements for sealed packaging, the first layer of sealing cannot fail to be successfully sealed, and the second layer of packaging bag cannot fail to be sealed and cannot be skewed, otherwise, the sealed packaging will fail, medical devices such as medical consumables will be contaminated, and medical accidents will be caused.
[0004] In the prior art, the sealing of the packaging of medical devices such as medical consumables is checked by manual observation, which is high in cost and low in checking efficiency, and is prone to missed checking and misjudgment due to fatigue during long-time checking. SUMMARY
[0005] Therefore, the application aims to provide a sealing detection method to alleviate the problems of high cost and low checking efficiency in manual observation in the prior art, and to alleviate the problems of missed checking and misjudgment.
[0006] In a first aspect, the application provides a sealing detection method applied to a control unit in a sealing detection system, and the system further comprises: A detection mechanism comprising a light source and a detection camera, the light source comprising a surface light source and an arched tunnel light source, the light emitting end of the surface light source facing the detection object, the arched tunnel light source being arranged on the side of the detection object away from the surface light source, and the detection camera being arranged on the side of the arched tunnel light source away from the detection object and facing the detection object, the detection mechanism having two and forming a first detection station and a second detection station for detecting two sides of the detection object respectively.
[0007] The method comprises: acquiring a shooting image at a target point; performing inner packaging region extraction and outer packaging contour extraction on the shooting image; determining whether the distance between the edge of the inner packaging bag and the outer packaging contour is greater than a specified pixel; If yes, fitting a sealing line to the inner packaging bag to obtain a sealing line fitting result, and simultaneously extracting an outer packaging sealing line to determine the inclination angle of the outer packaging sealing line relative to the outer packaging edge; obtaining a sealing detection result based on the sealing line fitting result, the outer packaging sealing line and the inclination angle of the outer packaging sealing line.
[0008] With reference to the first aspect, the embodiment of the present application provides a first possible implementation manner of the first aspect, and the step of obtaining the sealing detection result based on the inner packaging bag sealing line fitting result, the outer packaging sealing line and the inclination angle of the outer packaging sealing line comprises: If the inner packaging bag sealing line fitting result, the outer packaging sealing line and the inclination angle all meet the preset requirement, the sealing detection result is determined to be good sealing.
[0009] With reference to the first aspect, the embodiment of the present application provides a first possible implementation manner of the first aspect, and the step of obtaining the sealing line fitting result by fitting the sealing line of the inner packaging bag comprises: After the edge line extraction is performed on the photographed image, for each edge line, a specified pixel is translated inward to obtain a reference line.
[0010] For each reference line, an edge point finding operator is used to find the sealing line to obtain a plurality of points.
[0011] It is judged whether the linear fitting of the plurality of points by using the specified algorithm can obtain a fitting sealing line.
[0012] If yes, the sealing line fitting result is determined to be qualified.
[0013] If no, the sealing line fitting result is determined to be abnormal.
[0014] With reference to the first aspect, the embodiment of the present application provides a first possible implementation manner of the first aspect, and the specified algorithm is an improved least square method; the step of judging whether the linear fitting of the plurality of points by using the specified algorithm can obtain the fitting sealing line comprises: Two sampling points are randomly extracted from the plurality of points to determine a temporary straight line; Distances of all the other points to the temporary straight line are calculated, and target points with distances less than a preset threshold are classified into a consensus set to obtain a plurality of consensus sets; A consensus set corresponding to a temporary straight line with the largest number of target points in the consensus set is selected as a maximum consensus set; Based on all the target points in the consensus set, a final fitting is performed by using the least square method to obtain a fitting straight line equation of the sealing line; According to the fitting degree of the fitting straight line equation or the proportion of the target points in the consensus set, it is judged whether the continuity of the sealing line is qualified.
[0015] With reference to the first aspect, the embodiment of the present application provides a first possible implementation manner of the first aspect, and the step of extracting the outer packaging sealing line and determining the inclination angle of the outer packaging sealing line relative to the outer packaging edge further comprises: The photographed image is subjected to enhancement processing to obtain an increased photographed image; Canny edge extraction is performed on the captured image to extract two side edge lines of the entire outer packaging bag.
[0016] For each edge line, a specified pixel is translated inward to extract an outer packaging sealing line.
[0017] It is determined whether the angle between the outer packaging sealing line and the outer packaging edge line is less than a preset angle threshold.
[0018] If yes, it is confirmed that the outer packaging bag is sealed well.
[0019] If no, it is confirmed that the outer packaging bag sealing line is inclined.
[0020] In combination with the first aspect, the embodiments of the present application provide a first possible implementation manner of the first aspect, and the step of performing enhancement processing on the captured image comprises: acquiring a preset target gray scale range; analyzing a gray scale histogram of the captured image, and determining a characteristic gray scale range representing valid information in the captured image based on the histogram shape; calculating linear transformation coefficients according to the target gray scale range and the characteristic gray scale range; wherein the linear transformation coefficients comprise a gain parameter and an offset parameter; performing linear transformation based on the gain parameter and the offset parameter to obtain an enhanced captured image after performing point operation to calculate the gray scale square of each pixel of the captured image.
[0021] In combination with the first aspect, the embodiments of the present application provide a first possible implementation manner of the first aspect, and the step of calculating linear transformation coefficients according to the target gray scale range and the characteristic gray scale range comprises: calculating as follows: α = (Z_max - Z_min) ÷ (X_high - X_low); β = Z_min - (α × X_low) wherein α is the gain parameter, β is the offset parameter, Z_max is the upper limit value of the target gray scale range, Z_min is the lower limit value of the target gray scale range, X_high is the upper limit value of the characteristic gray scale range, and X_low is the lower limit value of the characteristic gray scale range.
[0022] In combination with the first aspect, the embodiments of the present application provide a first possible implementation manner of the first aspect, and the step of acquiring the captured image at the target point further comprises: acquiring the packaging type of the target workpiece.
[0023] determining the target point based on the packaging type.
[0024] moving the target workpiece to the target point.
[0025] In a second aspect, the present application provides a sealing detection device applied to a control unit in a sealing detection system, the device comprising: An acquisition module configured to acquire a photographed image at a target point.
[0026] An extraction module configured to perform inner packaging area extraction and outer packaging contour extraction on the photographed image.
[0027] A judgment module configured to judge whether a distance between an inner packaging bag edge and the outer packaging contour is greater than a specified pixel.
[0028] A fitting module configured to, in the case that the distance between the inner packaging bag edge and the outer packaging contour is greater than the specified pixel, perform sealing line fitting on the inner packaging bag to obtain a sealing line fitting result, extract an outer packaging sealing line, and determine an inclination angle of the outer packaging sealing line relative to an outer packaging edge.
[0029] A detection module configured to obtain a sealing detection result based on the sealing line fitting result, the outer packaging sealing line, and the inclination angle.
[0030] In a third aspect, the present application provides a sealing detection system comprising a control unit configured to execute the sealing detection method provided above.
[0031] Further, the system further comprises: A detection platform made of high-transparency material and configured to carry a detection object.
[0032] A transfer mechanism configured to pick up the detection object and transfer it to the detection platform, or move the detection object out of the detection platform.
[0033] A conveying device drivingly connected to the detection platform to drive the detection platform to sequentially pass through a first detection station and a second detection station. The first detection station and the second detection station are each provided with a plurality of detection points. The detection platform stops at the detection points to enable a detection camera to photograph the detection object at the corresponding positions.
[0034] The embodiments of the present application have the following beneficial effects: In the present application, the detection object is respectively photographed by the detection camera at the top surface and the bottom surface of the detection object under the target point in the first detection station and the second detection station, after the photographing, the inner packaging area extraction and the outer packaging contour extraction are carried out on the photographed image, whether the distance between the inner packaging bag edge and the outer packaging contour is greater than the specified pixel is judged to determine whether the outer packaging is sealed, after confirming that the outer packaging is sealed, the sealing line fitting of the inner packaging bag is used to judge the sealing property of the inner packaging, when confirming that the inner and outer packaging are both well sealed, the outer packaging sealing line is extracted again to judge the inclination angle of the outer packaging sealing line, based on the above multiple detections, the final sealing detection result is obtained, in the whole process, no human intervention is needed, the detection efficiency is high, and the detection is more accurate.
[0035] Other features and advantages of the present application will be set forth in the descriptions below, and in part will become apparent to those skilled in the art upon examination of the following or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and attained by the structure particularly pointed out in the description, claims and drawings.
[0036] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or the prior art description. Obviously, the drawings described below are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creating laborious work.
[0038] Figure 1 The flowchart provided by the embodiment of the present application is shown in the figure; Figure 2 The structural diagram of the sealing detection device provided by the embodiment of the present application is shown in the figure; Figure 3 The axial structural diagram of the sealing detection system provided by the embodiment of the present application is shown in the figure; Figure 1 ; Figure 4 The axial structural diagram of the sealing detection system provided by the embodiment of the present application is shown in the figure; Figure 2 ; Figure 5 The top view structural diagram of the sealing detection system provided by the embodiment of the present application is shown in the figure; Figure 6 The side view structural diagram of the sealing detection system provided by the embodiment of the present application is shown in the figure.
[0039] Reference signs: 1 - acquisition module; 2 - extraction module; 3 - determination module; 4 - fitting module; 5 - detection module; 100 - detection platform; 200 - detection mechanism; 210 - detection camera; 220 - area light source; 230 - arched tunnel light source; 300 - transfer mechanism; 310 - horizontal drive assembly; 311 - first drive member; 312 - second drive member; 320 - longitudinal drive assembly; 330 - pickup assembly; 400 - conveying device; 500 - storage assembly; 510 - storage slot; 520 - partition; 530 - proximity sensor. DETAILED DESCRIPTION
[0040] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in connection with the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0041] In order to facilitate the understanding of the present embodiment, the technical terms designed in the present application will be briefly introduced first.
[0042] Blob analysis (connected component analysis): is a basic technique in machine vision and image processing, used to detect, analyze and process the features of connected regions (i.e. "Blob") in images. Among them, "Blob" can be understood as a collection of connected pixels with similar properties (such as gray value, color, texture) in the image. It usually corresponds to a "spot" or a "region" in the image, such as parts, product defects (such as black spots, scratches) in industrial detection, cells, tumors in medical images, vehicles in traffic monitoring, apples in natural scenes, human faces, etc. "Analysis" refers to extracting various properties of these connected regions, and performing screening, counting and measurement.
[0043] Canny edge extraction (Canny Edge Detection) is an edge detection algorithm in image processing. It is used to extract accurate, continuous and thin edges from images. It accurately locates the boundaries of gray value changes in digital images through the process of "denoising > calculating gradient > non-maximum suppression > double threshold connection".
[0044] Embodiment 1 The application embodiment provided by the application embodiment provides a sealing detection method, which is applied to a control unit in a sealing detection system. The system further comprises a detection mechanism 200, which comprises a light source and a detection camera 210. The light source comprises a surface light source 220 and an arched tunnel light source 230. The light emitting end of the surface light source 220 faces the detection object. The arched tunnel light source 230 is arranged on the side of the detection object away from the surface light source 220. The detection camera 210 is arranged on the side of the arched tunnel light source 230 away from the detection object and faces the detection object. The detection mechanism 200 has two and forms a first detection station and a second detection station, which are respectively used for detecting two surfaces of the detection object.
[0045] In combination Figure 1 As shown in the figure, the method is as follows: S100, a shooting image under a target point is acquired.
[0046] S200, inner packaging area extraction and outer packaging contour extraction are performed on the shooting image.
[0047] S300, it is judged whether the distance between the inner packaging bag edge and the outer packaging contour is greater than a specified pixel.
[0048] If yes, steps S400-S500 are executed.
[0049] S400, a sealing line fitting result is obtained by fitting the sealing line of the inner packaging bag. Meanwhile, the outer packaging sealing line is extracted, and the inclination angle of the outer packaging sealing line relative to the outer packaging edge is determined.
[0050] S500, a sealing detection result is obtained based on the sealing line fitting result, the outer packaging sealing line and the inclination angle.
[0051] Specifically, in the embodiment, the detection object is respectively shot by the detection camera 210 at the top surface and the bottom surface of the detection object under the target point in the first detection station and the second detection station. After shooting, the image shot by the detection camera 210 is subjected to inner packaging area extraction and outer packaging contour extraction. Then, it is judged whether the outer packaging is sealed by judging whether the distance between the inner packaging bag edge and the outer packaging contour is greater than a specified pixel. After confirming that the outer packaging is sealed, the sealing property of the inner packaging is judged by fitting the sealing line of the inner packaging bag. When it is confirmed that the inner and outer packaging are both well sealed, the outer packaging sealing line is extracted again to judge the inclination angle of the outer packaging sealing line. Based on the above multiple detections, the sealing detection result is finally obtained. In the whole detection process, no human intervention is needed, the detection efficiency is high, and the detection is more accurate.
[0052] Wherein, in the detection, since the detection camera 210 is a surface light source and the arc-shaped tunnel light source 230 is circumferentially arranged, the reflection problem of the packaging bag of the medical consumables can be relieved, and the sealing opening of the outer packaging bag can be highlighted, thereby ensuring the accuracy of the detection. The surface light source 220 can cover the internal sealing defects and the content problems, and the arc-shaped tunnel light source 230 can capture the surface sealing defects and the appearance defects. In the embodiment, the two are combined to detect the sealing state of the detection object in one time and in all directions through the sealing detection method.
[0053] Moreover, the combination of the surface light source 220 and the arc-shaped tunnel light source 230 can meet the illumination requirements of sealing detection objects with different materials and different structures, and can improve the image quality and the detection accuracy. For specific defect types, the most suitable light source illumination mode or combination mode can be used to obtain images with higher contrast, clearer details and less interference, thereby improving the accuracy and reliability of the sealing detection method.
[0054] Specifically, in the embodiment, the target points are multiple and located in the first detection station and the second detection station. After the detection object moves to the first detection station and the second detection station, the detection object is illuminated by the surface light source 220 and the arc-shaped tunnel, and the detection object is photographed by the detection camera 210 to obtain a photographed image.
[0055] It should be noted that in the embodiment, the specified pixels are 150 pixels. The distance between the edge of the inner packaging bag and the outline of the outer packaging bag is the straight-line distance between the sealing edge of one side of the inner packaging and the sealing edge of the closest outer packaging bag on the opposite side.
[0056] In the embodiment, after the step S300, the method further includes: If not, the step S310 is performed.
[0057] In the step S310, it is determined that the sealing detection result is that the outer packaging bag is not sealed.
[0058] In the step of judging whether the distance between the edge of the inner packaging bag and the outline of the outer packaging bag is greater than the specified pixels, if the distance is not greater than the specified pixels, it is directly determined that the sealing detection result is that the outer packaging bag is not sealed, and subsequent sealing line fitting and inclination angle judgment and other processes are not required, thereby reducing the processing steps and improving the detection efficiency, and the misjudgment caused by the unsealed outer packaging is avoided.
[0059] In the embodiment, the step S500 includes: In the step S510, if the inner packaging bag sealing line fitting result, the outer packaging sealing line and the inclination angle all meet the preset requirements, it is determined that the sealing detection result is that the sealing is good.
[0060] Specifically, in the embodiment, the sealing detection result is finally determined by comprehensively judging whether the inner packaging bag sealing line fitting result, the outer packaging sealing line existence and the inclination angle all meet the preset requirements, so as to realize comprehensive and automatic determination of the inner and outer packaging sealing quality. Thus, it is ensured that the sealing is determined to be good only when all the key sealing indicators are qualified, the accuracy and reliability of the detection result are significantly improved, the missed judgment or misjudgment caused by single detection is avoided, and the integrity and safety of the detected packaging are further ensured.
[0061] In the embodiment, the step S500 of performing sealing line fitting on the inner packaging bag to obtain the sealing line fitting result further includes: S501, after performing edge line extraction on the photographed image, for each edge line, the reference line is obtained by translating inwardly by a specified pixel.
[0062] S502, for each reference line, the sealing line is searched by using the edge point finding operator to obtain a plurality of points.
[0063] S503, it is judged whether the linear fitting of the plurality of points by using the specified algorithm can obtain the fitted sealing line.
[0064] If yes, step S504 is performed; if no, step S505 is performed.
[0065] S504, it is determined that the sealing line fitting result is qualified.
[0066] S505, it is determined that the sealing line fitting result is abnormal.
[0067] In the embodiment, the extracted edge lines are the left and right edge lines of the inner packaging bag region, that is, the actual boundary of the inner packaging bag. The reference line is generated by translating the edge line inwardly (from the edge of the packaging bag towards the center of the packaging bag). Based on the reference line, the fitted sealing point is accurately searched and the linear fitting and existence judgment are performed by using the algorithm, so as to realize high-precision and automatic positioning and determination of the inner packaging sealing line. The accuracy and reliability of the sealing defect identification are improved, the false detection or missed detection caused by the sealing line blur or position deviation is effectively avoided, and the robustness and automation level of the entire detection system are further improved.
[0068] Specifically, in this embodiment, if the inner and outer edge lines are less than or equal to 150 pixels, it is directly determined that the outer packaging bag is not sealed. First, the inner packaging bag needs to be extracted from the captured image. The color of the inner packaging bag after sealing is darker than that of the unsealed inner packaging bag, and a sealing line can be seen. By using the color difference between the inner packaging bag (light blue) and the outer packaging bag (transparent) and the background, the contrast between the inner packaging bag region and the background can be significantly enhanced by using the G channel minus the R channel (the value of the light blue in the G channel is higher, and the value in the R channel is lower), and the irrelevant information is suppressed. Therefore, the pixel value of the green channel is subtracted from the pixel value of the red channel, and linear image enhancement is performed at the same time to highlight the light blue object and make the surrounding pixels black, so that the inner packaging bag region is more prominent. In this way, an image with only the inner packaging bag is obtained.
[0069] Subsequently, the inner packaging bag is extracted by using blob (connected component analysis) analysis. The enhanced image is converted into a binary image by setting a threshold. The inner packaging bag region becomes white (foreground, pixel value 255), and the background becomes black (background, pixel value 0). Blob analysis is performed on the binary image to identify and mark all connected white regions. At this time, according to the known approximate area and shape of the packaging bag, a suitable filter (aspect ratio in this embodiment) is set to accurately extract the pixel region representing the inner packaging bag from all connected domains and exclude possible noise points. Subsequently, the region is converted into an edge, and only the edge lines at both ends are extracted. After translating the left and right edge lines inward by a specified number of pixels (150 pixels), two new reference lines are obtained, so that the search range of the sealing line is accurately positioned to the most likely position of the sealing line.
[0070] Subsequently, a narrow "caliper" shaped search region is set around each reference line after translation. In this region, an edge point detection operator is used to search and locate the points with the most dramatic gray scale changes (i.e. edge points) at fixed intervals along the reference line. These points are potential sealing line feature points. All collected sealing line feature points are fitted with a straight line using the least squares method. If a line is successfully fitted, it indicates that there are enough points and the points are linearly arranged, forming an effective sealing line, and it is determined that the inner packaging bag is sealed. If it cannot be fitted into a line, it can be considered that the number of feature points found is extremely small, and the points are too scattered, resulting in a huge fitting error. It is determined that the inner packaging bag on that side is not sealed or poorly sealed, indicating that no continuous linear edge feature is found in this region, and it is determined that the inner packaging bag is not sealed.
[0071] In the above process, although a narrow "caliper" shaped search region is set, it still cannot be ruled out that a "stain" on the seal line can cause the edge point to jump to the boundary of the "stain" instead of the seal line. If the conventional least squares method is used, it is very sensitive to such points. Therefore, the specified algorithm in this application is an improved least squares method, and the core idea of the improvement is to use the geometric feature that the seal line should be a continuous path within the caliper.
[0072] In combination with the first aspect, step S503 comprises: S5031, randomly extracting two sampling points from a plurality of points to determine a temporary straight line.
[0073] S5032, calculating the distance of all remaining points to the temporary straight line, and classifying the target points with a distance less than a preset threshold into a consensus set, to obtain a plurality of consensus sets.
[0074] S5033, selecting the consensus set corresponding to the temporary straight line with the most target points in the consensus set as the maximum consensus set.
[0075] S5034, based on all target points in the consensus set, performing final fitting by least squares method to obtain a fitting straight line equation of the seal line.
[0076] S5035, judging whether the continuity of the seal line is qualified according to the fitting goodness of the fitting straight line equation or the proportion of the target points in the consensus set.
[0077] First, in step S5031, random sampling: from the plurality of points found in step S502, two points are randomly extracted as sampling points, based on the principle of determining a straight line based on two points, to construct a straight line model with the least sample size.
[0078] Then, in step S5032, consensus set construction: for the temporary straight line determined in step S5031, the distance (specifically, the perpendicular distance) of all points other than the sampling points to the straight line is calculated. Points with a distance less than a certain threshold (for example, half the width of the caliper) are marked as "inside points" (i.e. target points), and they are considered to be in consensus with the temporary straight line.
[0079] The above process of randomly selecting sampling points, constructing temporary straight lines, and determining consensus sets is repeated multiple times (such as 100 times, 1000 times), to obtain a plurality of consensus sets. Through a large number of repeated random sampling and evaluation, the algorithm traverses the possible model space in a "brute force" but efficient way.
[0080] Then, in step S5033, the consensus set corresponding to the temporary model with the most target points (i.e. the largest consensus set size) is selected and named as the "maximum consensus set".
[0081] It can be understood that the "correct points" generated by the real sealing line will form the mainstream in quantity. Even if there are up to 30%-40% of interference points (outliers), as long as two "correct points" are sampled at one time, the temporary straight line established thereby will obtain a large number of other "correct points" (i.e., a large consensus set). A model that has "polluted points" is difficult to obtain a large number of recognitions of other points. Therefore, by declaring the consensus set corresponding to the temporary straight line with the largest number of target points as the largest consensus set, a pure data set can be obtained, and the points in the data set have a very high probability of being from the real sealing line, and the polluted points and noise points have been effectively excluded.
[0082] Subsequently, in step S5034, final fitting is performed: after obtaining the filtered and high-quality "largest consensus set", all points in the "largest consensus set" are used to perform least square fitting on all points in the set again, and a final fitting straight line equation is fitted.
[0083] It can be understood that the conventional least square method is very sensitive to outliers, but has the advantage of giving the optimal fitting result without bias. Now, the outliers have been removed in the previous steps, and only high-confidence target points are left. At this time, the least square method is used again, so that its high-precision advantage can be fully utilized, and its disadvantage of being afraid of interference is avoided.
[0084] Finally, step S5035 is performed to perform continuity judgment, which has two judgment bases: target point proportion or fitting degree of the fitting straight line equation.
[0085] For the target point proportion: the target point proportion = the number of target points in the largest consensus set ÷ the number of all points found in step S502, which directly reflects the "continuity" or "cleanliness" of the sealing line. If the sealing line is continuous and clear, most of the edge points should fall within the largest consensus set, and the proportion will be high (for example, > 85%). If the sealing line has a fracture or is seriously polluted, a large number of points will be excluded as outliers, resulting in a low inner point proportion. A threshold (such as 70%) can be set, and if the threshold is lower, it is judged as unqualified.
[0086] For the fitting degree of the fitting straight line equation: for example, the residual sum of squares or R 2 determination coefficient of the final fitting straight line, which measures the closeness of the points in the largest consensus set to the final straight line. Even if the inner point proportion is high, if these inner points are very scattered, the residual of the fitted straight line is large, which indicates that the sealing line is continuous but not straight, and may have bends or jitter, which is also a quality defect.
[0087] The above indicators are comprehensively given a binary judgment of "qualified" or "unqualified", so as to realize the automatic detection of the sealing quality.
[0088] In this way, by random sampling combined with the consensus set mechanism, it is ensured that the algorithm will not be affected by individual "stains", and always strives to find the geometric model supported by the most evidence (edge points) and representing the continuous path of the sealing line.
[0089] In this embodiment, step S400 further includes: S410, performing enhancement processing on the photographed image to obtain an increased photographed image.
[0090] S420, performing Canny edge extraction on the photographed image to extract the two side edge lines of the entire outer packaging bag.
[0091] S430, for each edge line, translating inwardly by a specified pixel to extract the outer packaging sealing line.
[0092] S440, judging whether the angle between the outer packaging sealing line and the outer packaging edge line is less than a preset angle threshold.
[0093] S450, if yes, confirming that the outer packaging bag is sealed well.
[0094] S460, if no, confirming that the outer packaging bag sealing line is inclined.
[0095] In this embodiment, by performing Canny edge extraction on the photographed image, the two side edge lines of the transparent outer packaging bag are accurately obtained, and the sealing line extraction is performed based on the region after the inward translation of the specified pixel, thereby relieving the technical problem of low contrast between the transparent material edge and the background and difficulty in accurately capturing. By calculating and judging whether the angle between the outer packaging sealing line and the edge line is less than a preset threshold, the automatic and quantitative determination of whether the outer packaging sealing is inclined is realized, the accuracy and reliability of the detection are significantly improved, the sealing failure problem caused by the inclined sealing line is eliminated, and the integrity and safety of the medical consumable packaging are further ensured.
[0096] Specifically, in this embodiment, the contour of the outer packaging bag needs to be extracted first. Since the transparent material used for the outer packaging has very low contrast with the background (usually white or gray glass plate), the human eye is difficult to distinguish, and the traditional threshold segmentation method is basically ineffective. Therefore, the photographed image is first enhanced. Then, the canny edge extraction is performed on the outer packaging bag image to extract the entire packaging bag, and then the left and right side edges are extracted. The sealing line is extracted by translating inwardly from the left and right edges by 150 pixels, and then the angle between the sealing line and the outer edge is judged.
[0097] The Canny edge detection algorithm adopted is as follows: first, the image is slightly blurred to remove camera noise and small scratches on the packaging bag and the like, and the brightness gradient intensity and direction of each pixel point in the image are calculated. Although the gray scale changes slightly at the transparent edge, there is still a gradient change, and the Canny algorithm is very sensitive to this. Subsequently, only the points with the maximum intensity in the gradient direction are retained, and the edge line is thinned. Subsequently, the gradient intensity is compared with the preset high threshold and low threshold, if the gradient intensity is greater than the high threshold, it is determined as a strong edge (i.e. a boundary); if the gradient intensity is between the low threshold and the high threshold, it is determined as a "weak edge" (i.e. a possible boundary); if the gradient intensity is less than the low threshold, it is determined as "suppressed" (i.e. not a boundary). Finally, only the "weak edges" connected to the "strong edges" are retained to effectively ensure that the extracted edges are continuous, complete contour lines, rather than intermittent points. Thus, a binary image is obtained, in which the white pixel points form the edge lines of the left and right sides and the upper and lower sides of the outer packaging bag.
[0098] In combination with the first aspect, step S410 comprises: S411, obtaining a preset target gray scale range; S412, analyzing a gray scale histogram of the captured image, and determining a feature gray scale range representing valid information in the captured image based on the histogram shape; S413, calculating a linear transformation coefficient according to the target gray scale range and the feature gray scale range; wherein the linear transformation coefficient comprises a gain parameter and an offset parameter; S414, after performing point operation to calculate the gray scale square of each pixel of the captured image, performing linear transformation based on the gain parameter and the offset parameter to obtain an enhanced captured image.
[0099] Specifically, in step S411, (1) For display: usually [0, 255] (8-bit image).
[0100] (2) For subsequent processing: depends on your camera bit depth or library function requirements, may be [0, 1023] (10-bit), [0, 4095] (12-bit), or [0.0, 1.0] (float normalized).
[0101] We denote the target minimum value as Z_min and the maximum value as Z_max, thereby determining the target gray scale range [Z_min, Z_max] of the output image.
[0102] Through this step, the "starting line" Z_min and the "finish line" Z_max of the gray scale are set according to the requirements of the downstream application.
[0103] S412, analyze the gray histogram of the input image, and determine the feature gray range representing the effective information in the input image based on the histogram shape.
[0104] Specifically, the feature gray range [X_low, X_high] of the input image is counted, where X_low is the minimum value of the feature gray range, specifically the critical point at which the number of pixels on the low gray side of the histogram begins to grow steadily, and X_high is the maximum value of the feature gray range, specifically the critical point at which the number of pixels on the high gray side of the histogram begins to decrease significantly.
[0105] This is the most critical step. Directly use the minimum gray value (I_min) and the maximum gray value (I_max) of the image, because they may be determined by only a few extreme noise pixels or saturated pixels, and cannot represent the true dynamic range of the main content of the image. Directly using them for calculation will result in poor transformation effect and insufficient contrast stretching. Therefore, we need to find the boundary of "effective information" by analyzing the shape of the gray histogram, that is, to find the range that can represent "effective information".
[0106] Draw the gray histogram: analyze the gray histogram of the input image I after square enhancement.
[0107] Determine the low threshold X_low: on the histogram, starting from the low gray value end, ignore the small number of pixels on the left that may represent "pure background noise", and find a gray value point X_low. On the right of this point, the number of pixels begins to increase significantly and steadily. This point represents the starting point of the effective signal region, indicating that the real object information begins to appear. This point is X_low, which effectively filters out the noise in the dark field.
[0108] Determine the high threshold X_high: similarly, at the high gray value end of the histogram, ignore the small number of "saturated pixels" or highlight noise on the right, and find a gray value point X_high. On the left of this point, the number of pixels begins to decrease significantly. This point represents the end point of the effective signal region, and this point is X_high, which effectively filters out the noise and overexposure points in the bright field.
[0109] The interval [X_low, X_high] determined in the above manner can accurately capture the gray dynamic range of the distribution of most useful information (such as edges and textures in the figure) contained in the image, which is a key prerequisite for achieving high-quality adaptive enhancement. Our goal is to map this interval to [Z_min, Z_max].
[0110] S413, according to the target gray scale range and the feature gray scale range, calculate linear transformation coefficients, linear transformation coefficients including gain parameter a and offset parameter b.
[0111] Specifically, the calculation formula is as follows: a = (total width of target output range) ÷ (width of input valid signal range) Expressed in formula: a = (Z_max - Z_min) ÷ (X_high - X_low) Where (X_high - X_low) is the "width" of the input signal, (Z_max - Z_min) is the "width" of the desired output. The gain parameter a is the ratio of the two widths. If a>1, it means to amplify the contrast; if a<1, it means to compress the contrast. According to the description (let the light be brighter and the dark be darker), a will usually be greater than 1.
[0112] At the same time, calculate the preset value b (offset parameter), specifically, the calculation formula is as follows: b = start of target output - (input start after stretching) Expressed in formula: b = Z_min - (a × X_low) After the gain of a, the original input valid signal start X_low becomes a × X_low. But we want it to be mapped to Z_min. Therefore, we need to add an offset b, so that a × X_low + b = Z_min, and the above formula is obtained by back calculation.
[0113] Next, an example is given: Suppose: The target output range is [0, 255].
[0114] After analyzing the histogram, it is determined that the effective gray scale range of the input image is [100, 600].
[0115] Calculate: a = (255 - 0) ÷ (600 - 100) = 255 ÷ 500 = 0.51 Here a < 1, because the input range (500) is wider than the output range (255), so it is compressing the contrast. If you want to force amplification, you need to adjust [X_low, X_high], for example, take [300, 600] only, then a = 255 ÷ 300 = 0.85 (still less than 1). If you want to be greater than 1, the input range must be less than 255, for example, take [100, 300], then a = 255 ÷ 200 ≈ 1.28.
[0116] β = 0 - 0.51 × 100 = -51 The final transformation is: I_out = 0.51 × I_in - 51 When I_in = 100 (the start of the valid range), I_out = 0.51 × 100 - 51 = 0.
[0117] When I_in = 600 (the end of the valid range), I_out = 0.51 × 600 - 51 = 255.
[0118] In this way, the valid range is accurately mapped to the entire output range.
[0119] Subsequently, after performing point operation to calculate the gray square of each pixel of the photographed image, a linear transformation is performed based on the gain parameter and the offset parameter to obtain an enhanced photographed image.
[0120] Specifically, image enhancement is achieved by multiplying the image with itself through point operation. Specifically, for each pixel point in the input image, the gray value I new (x,y) in the new image is calculated and output from the square of the original gray value I new(x, y) = I(x, y) x I(x, y), which greatly amplifies the contrast between the weak target (edge) and the background, making the originally insignificant edge very prominent. Then, on the basis of the above square operation, a linear transformation is performed: I_final(x, y) = a x [I(x, y) x I(x, y)] + b; where a is a gain parameter, and b is a bias parameter. a is usually a gain (Gain) parameter greater than 1, which further amplifies the contrast difference after the square enhancement, making the bright ones brighter and the dark ones darker, so that the edge signal is stronger; b is a bias parameter, which adjusts the overall brightness level. Because the square and multiplication by the coefficient make the overall gray value of the image very large, which may exceed the standard display range (0-255) or the camera bit depth (such as 0-4095), adding a fixed value can shift it back to a suitable range, or set a more ideal brightness baseline for the subsequent Canny algorithm.
[0121] In the embodiment, before step S100, the method further comprises: S10, obtaining the packaging type of the target workpiece.
[0122] S20, determining the target point based on the packaging type.
[0123] S30, moving the target workpiece to the target point.
[0124] Specifically, in the embodiment, the detection object needs to be detected before detection, so as to query the type from the pre-set database, so as to determine whether it belongs to the "long packaging" (length ≥ 150 mm) or "short packaging" (length < 150 mm).
[0125] The main control unit (such as PLC or industrial computer) of the system calls the pre-set moving and photographing program from the memory according to the determined packaging type. If it is short packaging, the target point is set to 1, that is, the center point directly below the detection camera 210. An image taken at this point can cover the entire sealing area of the workpiece. If it is long packaging, the target point is set to 2, that is, the first point (for photographing the left sealing area of the packaging) and the second point (for photographing the right sealing area of the packaging). The system needs to move to these two points in sequence to take pictures, so as to obtain complete detection images.
[0126] Subsequently, the workpiece is accurately positioned to each target point determined in the first detection station and the second detection station, and image acquisition is performed by the detection camera.
[0127] The embodiment avoids the efficiency waste caused by the unified multiple photographing for all workpieces, and prevents the problems of insufficient edge resolution or increased distortion caused by the single photographing for long workpieces, while ensuring the detection quality and maximizing the system throughput.
[0128] The sealing detection device provided in the embodiment is applied to a control unit in the provided sealing detection system. Figure 2 As shown in the figure, the device comprises an acquisition module 1, an extraction module 2, a judgment module 3, a fitting module 4, and a detection module 5.
[0129] The acquisition module 1 is configured to acquire a photographed image under a target point.
[0130] The extraction module 2 is configured to perform inner packaging area extraction and outer packaging contour extraction on the photographed image.
[0131] The judgment module 3 is configured to judge whether the distance between the inner packaging bag edge and the outer packaging contour is greater than a specified pixel.
[0132] The fitting module 4 is configured to, in the case that the distance between the inner packaging bag edge and the outer packaging contour is greater than the specified pixel, perform sealing line fitting on the inner packaging bag to obtain a sealing line fitting result, and extract an outer packaging sealing line.
[0133] The detection module 5 is configured to obtain a sealing detection result based on the sealing line fitting result, the outer packaging sealing line, and the inclination angle.
[0134] In a third aspect, the embodiment of the present application further provides a sealing detection system. Figures 3 to 6 The sealing detection system provided in the embodiment comprises a control unit configured to execute the sealing detection method provided above, and further comprises a detection platform 100, a transfer mechanism 300, and a conveying device 400.
[0135] The bottom surface of the detection platform 100 is made of high-transparency material and is configured to carry a detection object. The transfer mechanism 300 is configured to pick up the detection object and transfer it to the detection platform 100, or move the detection object out of the detection platform 100. The conveying device 400 is in driving connection with the detection platform 100.
[0136] The conveying device 400 drives the detection platform 100 to sequentially pass through a first detection station and a second detection station.
[0137] In addition, the two detection mechanisms 200 in the embodiment are circumferentially formed with the first detection station and the second detection station on the detection platform 100.
[0138] Specifically, the light emitting end of the area light source 220 in the embodiment faces the detection platform 100, the arc tunnel light source 230 is arranged on the side of the detection platform 100 away from the area light source 220, and the detection camera 210 is arranged on the side of the arc tunnel light source 230 away from the detection platform 100 and faces the detection platform 100.
[0139] Specifically, after the medical consumable packaging is completed, the medical consumable with the packaging bag is stacked at the picking position of the transfer mechanism 300. Then, the transfer mechanism 300 picks up the packaged medical consumable and moves to the detection platform 100. At this time, the detection platform 100 is in the initial position, and the transfer mechanism 300 stops at this position. The conveying device 400 is driven to drive the detection platform 100 to reach the detection position of the detection mechanism 200.
[0140] After the detection platform 100 reaches the detection position, the detection platform 100 is irradiated by the light source, and the first detection position and the second detection position respectively capture the upper side and the lower side of the packaged medical consumable to realize the detection of the outer packaging of the medical consumable.
[0141] During the detection, since the detection camera 210 is an area light and the arc tunnel light source 230 is arranged in the circumferential direction, the reflection problem of the packaging bag of the medical consumable can be alleviated, and the sealing opening of the outer packaging bag can be highlighted, thereby ensuring the accuracy of the detection.
[0142] The area light source 220 can cover internal sealing defects and content problems, and the arc tunnel light source 230 can capture surface sealing defects and appearance defects. In the embodiment, the two are combined to realize one-time and all-around detection of the sealing state of the detection object.
[0143] In addition, the combination of the area light source 220 and the arc tunnel light source 230 can meet the illumination requirements of sealing detection objects with different materials and different structures, and can also improve the image quality and detection accuracy. For specific defect types, the most suitable light source illumination mode or combination mode can be used to obtain images with higher contrast, clearer details, and less interference, thereby improving the recognition accuracy and reliability of the machine vision algorithm.
[0144] In addition, when detecting packaging bags of different specifications, the conveying device 400 can accurately place the packaging bag of the medical consumable at the detection point of the detection mechanism 200 to realize the detection of the packaging bag of the medical consumable with different specifications.
[0145] After the detection is completed, the conveying device 400 drives the detection platform 100 to perform a reset movement, and the detection platform 100 moves back to the initial position. The transfer mechanism 300 picks up the detection object after the detection and moves it to the next area according to the detection result.
[0146] In the embodiment, a plurality of detection points (i.e. the target point) are arranged in the first detection station and the second detection station. The detection platform 100 stops at the detection point, so that the detection camera 210 can capture the detection object at the corresponding position.
[0147] In the embodiment, the packaging bag with a length less than 150 mm is regarded as a short packaging bag. When the short packaging bag is detected, the conveying device 400 drives the short packaging bag to move to the opposite side of the detection mechanism 200, and the detection mechanism 200 captures the middle part of the short packaging bag, so that the entire short packaging bag can be captured, i.e. one detection point is arranged in the first detection station and the second detection station. When the detection platform 100 reaches the detection point, the detection mechanism 200 can capture the entire short packaging bag, and then image analysis is performed on the captured image, so that the detection of the sealing property of the short packaging bag is realized.
[0148] In the embodiment, the packaging bag with a length of 150 mm-300 mm is regarded as a long packaging bag. When the long packaging bag is detected, the conveying device 400 drives the detection platform 100 or the detection mechanism 200, so that the detection mechanism 200 captures the long packaging bag twice, i.e. two detection points are arranged in the first detection station and the second detection station respectively, so that the two sides of the long packaging bag are captured separately, and then image analysis is performed on the images captured twice, so that the detection of the sealing property of the long packaging bag is realized.
[0149] In the structure, the sealing detection device provided in the embodiment adopts the moving capturing mode to capture and detect the sealing property of the packaging bag of the medical consumable. A plurality of detection points can be arranged in the first detection station and the second detection station, so that the short packaging bag and the long packaging bag can be accurately detected, and the sealing detection of the medical consumable packaging with different lengths can be compatible, and the applicability is better.
[0150] Specifically, in the embodiment, the conveying device 400 specifically adopts a linear module. The linear module in the embodiment includes a ball linear guide and a servo motor connected in transmission, and can realize stable linear motion. When the detection platform 100 is driven to move, the packaging bag can be accurately moved and delivered to the preset detection point of the detection mechanism 200, so that the target area (especially the sealing opening) of the packaging bag is located at the fixed position of the imaging field during each capturing.
[0151] In the embodiment, the sealing detection device further includes a storage assembly 500. The storage assembly 500 has a first storage space for placing qualified products and a second storage space for placing unqualified products, and the first storage space and the second storage space are located on the moving track of the moving mechanism 300.
[0152] In the embodiment, after the detection mechanism 200 completes the sealing detection of the medical consumable packaging bag on the detection platform 100, the image analysis result (qualified or unqualified) can be automatically judged.
[0153] Subsequently, the conveying mechanism 300 will convey and place the qualified product in the first storage space according to the judgment result, and will convey and place the unqualified product in the second storage space, thereby realizing the automatic detection and classification of the packaging bag.
[0154] In the embodiment, the storage assembly 500 includes a storage groove 510 and a partition plate 520. The inner wall of the storage groove 510 is provided with a plurality of clamping grooves along the extension direction of the storage groove 510. The partition plate 520 is matched with the clamping grooves, and a plurality of partition plates 520 are detachably inserted into the storage groove 510 to form the first storage space and the second storage space.
[0155] In the embodiment, the inner wall of the storage groove 510 is provided with a plurality of clamping grooves along the extension direction of the storage groove 510. The partition plate 520 is matched with the clamping grooves, and a plurality of partition plates 520 are detachably inserted into the storage groove 510 to form the first storage space and the second storage space.
[0156] In the embodiment, the inner wall of the storage groove 510 is provided with a plurality of clamping grooves along the extension direction of the storage groove 510. The partition plate 520 is matched with the clamping grooves, and a plurality of partition plates 520 are detachably inserted into the storage groove 510 to form the first storage space and the second storage space.
[0157] When short packaging bags need to be stored, more partition plates 520 can be inserted to divide the storage groove 510 into multiple smaller independent spaces, facilitating classification and stacking and preventing tilting. When long packaging bags need to be stored, some partition plates 520 can be reduced or even removed to form a longer storage space to accommodate long packaging bags (length up to 400 mm). With this structure, different specifications of medical consumable packaging bags can be stored without replacing the entire storage assembly 500, greatly improving the adaptability and operation convenience of the equipment.
[0158] It should be noted that in the embodiment, the undetected medical consumable packaging bags are placed in the storage box, and the storage box is also provided with a plurality of storage grooves 510. The undetected medical consumable packaging bags are stacked in the storage box.
[0159] In the embodiment, the storage assembly 500 includes a proximity sensor 530. The proximity sensor 530 is provided on the outer wall of the storage groove 510.
[0160] Specifically, in the embodiment, the plurality of proximity sensors 530 are arranged on the outer wall of the storage slot 510 and are arranged at intervals. The proximity sensor 530 can detect the distance between itself and the detection mechanism 200. Whether the storage slot 510 is placed at the preset position can be determined by the detection result of the proximity sensor 530, so as to ensure that the transfer mechanism 300 can put the detected packaging bag into the storage slot 510.
[0161] In the embodiment, the transfer mechanism 300 includes a horizontal driving assembly 310, a longitudinal driving assembly 320, and a pickup assembly 330.
[0162] The horizontal driving assembly 310 has a horizontal moving end, and the horizontal driving assembly 310 is arranged on one side of the detection platform 100. The longitudinal driving assembly 320 has a longitudinal moving end, and the longitudinal driving assembly 320 is in transmission connection with the horizontal moving end. The pickup assembly 330 includes a pickup piece for picking up the detected object, and the pickup piece is in transmission connection with the longitudinal moving end.
[0163] In the embodiment, the horizontal driving assembly 310 can drive the horizontal moving end to move in the horizontal plane. The longitudinal driving assembly 320 is installed on the horizontal moving end, so as to move horizontally with the horizontal moving end and can drive the longitudinal moving end to move up and down in the vertical direction, so as to drive the pickup piece to move in the horizontal and vertical directions.
[0164] In the embodiment, the moving track of the horizontal moving end is relative to the material stacking place, the storage slot 510, and the detection platform 100, so that the pickup piece can be driven by the linkage structure of the horizontal driving assembly 310 and the longitudinal driving assembly 320 to perform the actions of downward material taking, material transferring, and downward material placing.
[0165] In the embodiment, the horizontal driving assembly 310 includes a first driving piece 311 and a second driving piece 312. The first driving piece 311 is arranged on one side of the detection platform 100 and has a first moving end. The second driving piece 312 is arranged on the first moving end, and the moving end of the second driving piece 312 is the horizontal moving end.
[0166] In the embodiment, the horizontal moving structure is formed by the first driving piece 311 and the second driving piece 312 in transmission connection with the first driving piece 311.
[0167] As an implementable manner, the first driving piece 311 can be a large-range moving driving piece, and the second driving piece 312 can be a small-range fine adjustment driving piece. The two are used in cooperation to realize accurate movement of the pickup piece.
[0168] In the embodiment, the first driving member 311 and the second driving member 312 are both driven in the horizontal direction through rotating structures, that is, the moving tracks of the first moving end and the moving end of the second driving member 312 are both arc-shaped. Thus, the working area between the picking position, the detection platform 100 and the storage assembly 500 is covered. Compared with the linear reciprocating moving track, the arc-shaped moving path is generally shorter and smoother, and the invalid stroke is reduced, so that the efficiency of picking the parts in a large range is significantly improved.
[0169] Moreover, under the structure, the second driving member 312 can finely and flexibly adjust the position of the first driving member 311 after positioning. The superposition of the two arc-shaped structures expands the reachable working range and positioning flexibility of the picking part in the horizontal plane.
[0170] In the embodiment, the moving mechanism further includes a positioning camera. The positioning camera is arranged on the longitudinal driving assembly 320, and the shooting direction of the positioning camera faces downward.
[0171] Specifically, the positioning camera in the embodiment is a 3D camera. The 3D camera is arranged on one side of the first driving member 311, and the shooting direction of the 3D camera faces downward. When the transfer mechanism 300 picks the undetected packaging bag containing medical consumables, the 3D camera can shoot the relative position of the picking assembly 330 and the packaging bag, so as to realize the judgment of the size of the packaging bag, determine the specification of the packaging bag and the detection mode of the packaging bag, and drive the first driving member 311, the second driving member 312 and the longitudinal driving assembly 320 according to the specific position of the packaging bag, so that the picking assembly 330 can accurately pick the packaging bag.
[0172] In the embodiment, the picking part is a vacuum suction cup. The picking assembly 330 further includes a vacuum generator connected with the vacuum suction cup.
[0173] The vacuum suction cup picks the packaging bag containing medical consumables in the mode of negative pressure adsorption, has a large contact area and uniform stress, and is not easy to damage the packaging bag.
[0174] In the embodiment, when picking, the horizontal driving assembly 310 drives the longitudinal driving assembly 320 and the vacuum suction cup to move above the packaging bag, then the longitudinal driving assembly 320 drives the vacuum suction cup to move downward to adhere the vacuum suction cup to the packaging bag, the vacuum generator generates negative pressure, and the suction cup is firmly adsorbed on the surface of the packaging bag.
[0175] In the embodiment, when placing, the vacuum generator quickly releases the negative pressure (or switches to positive pressure blowing), the suction cup can instantaneously separate from the packaging bag, realizes quick and reliable release, significantly shortens the pick-and-place cycle time, and improves the overall efficiency.
[0176] And, the vacuum chuck can be provided in plurality. And at least two vacuum chucks are provided in line to form a vacuum chuck group, and the vacuum chuck group is provided in plurality, and the plurality of vacuum chuck groups are provided in parallel.
[0177] The plurality of vacuum chucks are provided in line to form a vacuum chuck group, thereby forming multi-point suction and pickup of the packaging bag to ensure stable suction.
[0178] The plurality of vacuum chuck groups are provided in parallel, thereby enabling simultaneous suction and pickup of the plurality of packaging bags to improve detection efficiency.
[0179] Specifically, in the embodiment, the vacuum chucks are four in total, and each two form a vacuum chuck group and are used for suction and pickup of one packaging bag, and the two vacuum chuck groups can simultaneously suction and pickup two packaging bags, thereby improving detection efficiency.
[0180] In the embodiment, the detection platform 100 is made of high-transparency glass.
[0181] The conveying device 400 is directly connected with the detection platform 100 to drive the detection platform 100 to move along the arrangement direction of the first sub-light source and the second sub-light source, so that the first detection member and the second detection member can sequentially detect the top surface and the bottom surface of the packaging bag on the detection platform 100.
[0182] Meanwhile, the flatness and optical uniformity of the high-transparency glass help maintain the stability and uniformity of the “arched light” field formed by the second sub-light source and the second detection member. The smooth surface of the glass can reduce unnecessary diffuse reflection, so that the arched light can be more concentrated and regular on the sealing area of the bottom surface of the packaging bag, further highlighting the defect features, improving the sensitivity and reliability of the bottom surface detection, and providing a clear and distortion-free optical channel for the bottom surface detection (especially the key arched light imaging).
[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0184] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms “mounting”, “connection”, “connection” should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or the communication inside two elements. 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.
[0185] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0186] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0187] Finally, it should be noted that: the above embodiments are only specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not limited thereto, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art within the technical range disclosed by the present application can modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for detecting a seal, characterized in that, A control unit is used in a seal detection system, the system further comprising: The inspection mechanism includes a light source and an inspection camera. The light source includes a surface light source and an arched tunnel light source. The light-emitting end of the surface light source faces the object to be inspected. The arched tunnel light source is located on the side of the object to be inspected away from the surface light source. The inspection camera is located on the side of the arched tunnel light source away from the object to be inspected, with its inspection end facing the object to be inspected. The inspection mechanism has two parts, forming a first inspection station and a second inspection station, for inspecting two sides of the object to be inspected, respectively. The method includes: Acquire images taken at the target location; The inner packaging area and outer packaging contour are extracted from the captured image; Determine whether the distance between the edge of the inner packaging bag and the outline of the outer packaging is greater than a specified number of pixels; If so, the sealing line of the inner packaging bag is fitted to obtain the sealing line fitting result. At the same time, the outer packaging sealing line is extracted, and the inclination angle of the outer packaging sealing line relative to the edge of the outer packaging is determined. Based on the sealing line fitting results, the outer packaging sealing line, and the tilt angle, the sealing test results are obtained.
2. The method according to claim 1, characterized in that, The steps for obtaining the seal detection result based on the seal line fitting result, the outer packaging seal line, and the tilt angle include: If the fitting result of the inner packaging bag sealing line, the outer packaging sealing line, and the tilt angle all meet the preset requirements, the sealing test result is determined to be a good seal.
3. The method according to claim 1, characterized in that, The step of fitting the sealing line of the inner packaging bag to obtain the sealing line fitting result includes: After extracting the edge lines from the captured image, for each edge line, shift it inward by a specified number of pixels to obtain the baseline. For each of the aforementioned baselines, an edge-finding operator is used to find the sealing line, resulting in several points; Determine whether a fitted sealing line can be obtained after linearly fitting the specified number of points using a designated algorithm; If so, the sealing line fitting result is deemed acceptable; If not, the sealing line fitting result is determined to be abnormal.
4. The method according to claim 3, characterized in that, The specified algorithm is an improved least squares method; the step of determining whether a fitted seal line can be obtained after linearly fitting the specified algorithm to the several points includes: Two sampling points are randomly selected from the aforementioned points to determine a temporary straight line; Calculate the distance from all other points to the temporary straight line, and include target points whose distance is less than a preset threshold into a consensus set to obtain multiple consensus sets; The consensus set corresponding to the temporary straight line with the largest number of target points in the consensus set is selected as the maximum consensus set. Based on all the target points in the consensus set, the least squares method is used to perform a final fitting to obtain the fitted straight line equation of the sealing line. The continuity of the sealing line is determined based on the goodness of fit of the fitted linear equation or the proportion of the target points within the consensus set.
5. The method according to claim 1, characterized in that, The step of extracting the outer packaging seal line and determining the inclination angle of the outer packaging seal line relative to the edge of the outer packaging further includes: The captured image is enhanced to obtain the enhanced captured image; Canny edge extraction is performed on the captured image to extract the edge lines on both sides of the entire outer packaging bag; For each of the aforementioned edge lines, the specified pixel is translated inward to extract the outer packaging sealing line; Determine whether the angle between the outer packaging sealing line and the outer packaging edge line is less than a preset angle threshold. If so, confirm that the outer packaging bag is sealed properly; If not, check that the sealing line on the outer packaging bag is tilted.
6. The method according to claim 5, characterized in that, The step of enhancing the captured image includes: Obtain the preset target grayscale range; Analyze the grayscale histogram of the captured image, and determine the feature grayscale range representing effective information in the captured image based on the histogram shape; Based on the target grayscale range and the feature grayscale range, linear transformation coefficients are calculated; wherein, the linear transformation coefficients include a gain parameter and an offset parameter; After performing point operations on the captured image to calculate the square of the gray level of each pixel, a linear transformation is performed based on the gain parameter and the offset parameter to obtain the enhanced captured image.
7. The method according to claim 6, characterized in that, The step of calculating the linear transformation coefficients based on the target grayscale range and the feature grayscale range includes: Calculate using the following formula: α = (Z_max - Z_min)÷(X_high - X_low); β = Z_min - (α × X_low) Wherein, α is the gain parameter, β is the offset parameter, Z_max is the upper limit of the target grayscale range, Z_min is the lower limit of the target grayscale range, X_high is the upper limit of the feature grayscale range, and X_low is the lower limit of the feature grayscale range.
8. The method according to claim 1, characterized in that, Before the step of acquiring the captured image at the target location, the method further includes: Obtain the packaging type of the target workpiece; Based on the packaging type, determine the target location; Move the target workpiece to the target point.
9. A sealing detection device, characterized in that, A control unit applied in a sealing detection system; the device includes: The acquisition module is used to acquire images captured at the target location; The extraction module is used to extract the inner packaging area and the outer packaging contour from the captured image; The judgment module is used to determine whether the distance between the edge of the inner packaging bag and the outline of the outer packaging is greater than a specified number of pixels; The fitting module is used to perform sealing line fitting on the inner packaging bag when the distance between the edge of the inner packaging bag and the outline of the outer packaging bag is greater than a specified number of pixels, and to obtain the sealing line fitting result. At the same time, the outer packaging sealing line is extracted and the tilt angle of the outer packaging sealing line relative to the edge of the outer packaging is determined. The detection module is used to obtain the sealing detection result based on the sealing line fitting result, the outer packaging sealing line, and the tilt angle.
10. A sealing detection system, characterized in that, The system includes a control unit for performing the method as described in any one of claims 1-8; the system further includes: The testing platform is made of a highly transparent material and is used to support the test items; A transfer mechanism is used to pick up the object to be tested and transfer it to the testing platform, or to remove the object to be tested from the testing platform; A conveying device is connected to the detection platform to drive the detection platform to pass through the first detection station and the second detection station in sequence; Both the first and second testing stations are equipped with multiple testing points. The detection platform stops at the detection point so that the detection camera can capture the detection object at the corresponding location.
Citation Information
Patent Citations
Exhaust bag and manufacture method thereof
CN103029892A
Sealing detecting equipment and method
CN106353051A
Abnormal monitoring system of automatic packaging machine
CN116958124A
Linear defect detection method, defect detection equipment, storage medium and product
CN119579565A
Inspection system, and inspection method
JP2016217760A