An online food material bag sealing defect detection method

By employing a three-stage detection method that combines sealing images and X-ray transmission images, the problem of the inability to classify and detect defects on both sides of the material package in existing technologies has been solved. This enables comprehensive detection of defects such as missing seals, oil leakage, material leakage, material jamming, and oil seepage, thereby improving the accuracy and efficiency of the detection.

CN116482126BActive Publication Date: 2026-05-22TECHIK INSTR SHANGHAI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TECHIK INSTR SHANGHAI
Filing Date
2023-04-25
Publication Date
2026-05-22

Smart Images

  • Figure CN116482126B_ABST
    Figure CN116482126B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of online food package seal defect detection method, method includes the A detection stage, B detection stage and C detection stage of sequentially executed, wherein A detection stage detects the seal loss of package one side and the oil or material leakage defect of leakage;B detection stage detects the material leakage defect of package;C detection the seal loss of another side and the oil or material leakage defect of leakage, while detecting the internal oil penetration of transparent package;After completing three detection stages, the detection results of three stages are integrated, and the final detection result is obtained.Compared with prior art, the present application has the advantages of classifying different kinds of defects on the front and back of the package, facilitating subsequent defect processing, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food packaging inspection, and in particular to an online method for detecting defects in the sealing of food ingredient packages. Background Technology

[0002] In the production of ready-to-eat food seasoning packets, the packets are first filled and then sealed. However, because sealing equipment often uses heat sealing, packaging defects and uneven filling can occur during the filling and sealing process. This can result in food material residue remaining in the sealing area, known as "material trapping." Alternatively, if the heat sealing temperature is too low, the seal may not be completely tight, leading to oil leakage. Furthermore, excessively high heat sealing temperatures can cause wrinkles and tears in the sealed packets, also resulting in oil leakage. Transporting or packaging leaking or material-trapped packets into ready-to-eat food products can lead to spoilage. Therefore, testing is necessary to identify and remove defective packets. Current testing methods cannot classify different types of defects on both sides of the packets, hindering subsequent defect handling. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the existing technology by providing an online method for detecting sealing defects in food ingredient packages. The method involves sequentially executing detection stages A, B, and C to detect the sealing defects on both sides of the ingredient package and classify different types of defects.

[0004] The objective of this invention can be achieved through the following technical solutions:

[0005] An online method for detecting sealing defects in food ingredient packages, comprising sequentially executed detection stages A, B, and C, wherein the specific steps of detection stage A are as follows:

[0006] A first sealing image is obtained from one side of the food ingredient package. Sealing information is determined based on this image, including the front and back of the packaging, the inflow angle of the packaging, and the position of the corresponding sealing area. The first sealing area of ​​the first sealing image is then determined. Simultaneously, A1 and A2 are performed on the first sealing image. The specific steps are as follows:

[0007] A1. Sharpen and enhance the texture of the first sealing area to obtain a bright and dark image. Then perform binarization processing and calculate the proportion of striped texture in the entire first sealing area. If the proportion is less than the first threshold, it is determined that the seal is missing and a warning of the first seal is missing is issued. Otherwise, a normal signal is issued.

[0008] A2. Detect the color of the first sealing area and compare the detected color with the color template. If the detected color difference exceeds the second threshold, it is determined that there is an oil or material leakage defect and a first oil or material leakage defect warning is issued. Otherwise, a normal signal is issued.

[0009] The specific steps in the B-stage testing are as follows:

[0010] B1. Obtain the X-ray transmission image of the seal. Locate the seal position using the seal information obtained in A1. Determine the second seal area in the X-ray transmission image. Enhance the contrast of the grayscale perspective view area corresponding to the second seal area. Determine whether the grayscale difference of the enhanced grayscale perspective view area exceeds the third threshold. If it exceeds the threshold, issue a material clamping defect warning; otherwise, issue a normal signal.

[0011] The specific steps in the C-stage detection are as follows:

[0012] C1. Obtain a second sealing image from the other side of the food ingredient package. Use the sealing information obtained in A1 to locate the sealing position and determine the third sealing area of ​​the second sealing image.

[0013] C2. Determine whether the food ingredient package is transparent at this time. If not, execute both C31 and C32.

[0014] The specific steps of C31 are as follows: sharpen and enhance the texture of the third sealing area to obtain a bright and dark image, then perform binarization processing, calculate the proportion of striped texture in the entire third sealing area, if the proportion is less than the fourth threshold, it is determined that the sealing is missing and a second sealing is missing warning is issued; otherwise, a normal signal is issued.

[0015] The specific steps of C32 are as follows: detect the color of the third sealing area, compare the detected color with the color template, if the detected color exceeds the fifth threshold, it is determined that there is an oil or material leakage defect, and a second oil or material leakage defect warning is issued; otherwise, a normal signal is issued.

[0016] In the above process, the sealed image of one side of the food ingredient package is obtained based on a camera and a light source on the same side as that side. The camera obtains the sealed image through the light reflected from the food ingredient package.

[0017] After completing the three testing stages, the results from all three stages are combined to obtain the final test result.

[0018] Furthermore, in C2, if the food ingredient package is transparent, a perspective image is obtained from the other side of the food ingredient package, and the color of the sealing area corresponding to the perspective image is detected. If the obviousness of the detected discoloration exceeds the sixth threshold, it is determined that there is an oil seepage defect on the surface of the transparent packaging or inside the seal, and an oil seepage defect warning is issued; otherwise, a normal signal is issued.

[0019] Furthermore, the perspective image is obtained based on a camera on the same side as the food package and a light source on the opposite side. The camera obtains the perspective image through light passing through the food package.

[0020] Furthermore, the final test results include the results of testing whether the seals on the front and back of the food ingredient package are missing, whether there is oil leakage, whether there is material jamming, and also the results of testing whether there is oil seepage in transparent packaging.

[0021] Furthermore, the specific steps for determining the sealing information based on the first sealing image are as follows: matching the first sealing image with pre-stored packaging feature data, and confirming whether the current food package is the front or back, the inflow angle of the packaging, and the position of the corresponding sealing area through image rotation and feature registration.

[0022] Furthermore, the pre-stored packaging feature data is matched with the packaging of the detected food ingredient packet.

[0023] Furthermore, the pre-stored packaging feature data includes color data and character data.

[0024] Furthermore, in A2, comparing the detected color with the color template specifically involves comparing the RGB values.

[0025] Furthermore, the camera is a line scan camera.

[0026] Furthermore, the light source is an LED light.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] (1) Through a combination of three stages of detection, images of the front and back sides are detected from both sides of the packaging seal. The front and back sides are checked for defects such as missing seals, oil leakage or material leakage, and whether the material package has material clamping defects. This enables the classification of different types of defects on the front and back sides of the material package, which is beneficial for subsequent defect processing.

[0029] (2) Obtain a perspective image of the transparent packaging material bag to detect internal oil leakage and discover defects inside the transparent packaging. Attached Figure Description

[0030] Figure 1 This is a flowchart of the present invention;

[0031] Figure 2 This is an illustration showing the effect of oil leakage as a detected defect in the material package.

[0032] Figure 3 This is an image showing the effect of the detected defect in the material package being the sealing and clamping of the material. Detailed Implementation

[0033] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0034] This invention proposes an online method for detecting defects in the sealing of food ingredient packages. The flowchart of the method is as follows: Figure 1 As shown. The method includes detection phase A, detection phase B, and detection phase C, which are performed sequentially.

[0035] The specific steps in the A-stage detection phase are as follows:

[0036] A first sealing image is obtained from one side of the food ingredient package. Sealing information is determined based on this image, including the front and back of the packaging, the inflow angle of the packaging, and the position of the corresponding sealing area. The first sealing area of ​​the first sealing image is then determined. Simultaneously, A1 and A2 are performed on the first sealing image. The specific steps are as follows:

[0037] A1. Sharpen and enhance the texture of the first sealing area to obtain a bright and dark image. Then perform binarization processing and calculate the proportion of striped texture in the entire first sealing area. If the proportion is less than the first threshold, it is determined that the seal is missing and a warning of the first seal is missing is issued. Otherwise, a normal signal is issued.

[0038] A2. Detect the color of the first sealing area and compare the detected color with the color template. If the detected color difference exceeds the second threshold, it is determined that there is an oil or material leakage defect and a first oil or material leakage defect warning is issued. Otherwise, a normal signal is issued.

[0039] In inspection phase A, the captured image is first matched with the stored template. Through image rotation and feature registration, the front or back of the product, the inflow angle of the packaging, and the corresponding sealing area position are confirmed. This data is recorded by the equipment for reference in inspections B and C. Next, two simultaneous inspection steps are performed: first, the texture at the sealing position is sharpened and enhanced, and the bright and dark images are binarized to calculate the proportion of striped texture in the entire sealing area to check for any areas that are not fully sealed or insufficiently sealed; second, the color of the current area is compared with the template color. If a color difference exceeds a set threshold, an oil or material leakage defect is determined. An alarm is triggered if any defect is detected in either of these steps, at which point inspection phase A ends.

[0040] The specific steps in the B-stage testing are as follows:

[0041] B1. Obtain the X-ray transmission image of the seal. Locate the seal position using the seal information obtained in A1. Determine the second seal area in the X-ray transmission image. Enhance the contrast of the grayscale perspective view area corresponding to the second seal area. Determine whether the grayscale difference of the enhanced grayscale perspective view area exceeds the third threshold. If it does, issue a material clamping defect warning; otherwise, issue a normal signal.

[0042] In inspection stage B, X-ray transmission images are acquired. Since X-rays cannot capture color information from the packaging surface and cannot determine the seal location, the seal location is first determined using the packaging location information obtained in stage A. The corresponding grayscale transmission image area of ​​the seal is then enhanced for contrast. If there is product material or leaking oil inside the seal layer, it will block X-rays, causing a difference in grayscale compared to normal. When the grayscale difference exceeds a set threshold, a material inclusion defect is detected, triggering an alarm. At this point, stage B of the inspection ends.

[0043] The specific steps in the C-stage detection are as follows:

[0044] C1. Obtain a second sealing image from the other side of the food ingredient package. Use the sealing information obtained in A1 to locate the sealing position and determine the third sealing area of ​​the second sealing image.

[0045] C2. Determine whether the food ingredient package is transparent at this time. If not, execute both C31 and C32.

[0046] The specific steps of C31 are as follows: sharpen and enhance the texture of the third sealing area to obtain a bright and dark image, then perform binarization processing, calculate the proportion of striped texture in the entire third sealing area, if the proportion is less than the fourth threshold, it is determined that the sealing is missing and a second sealing is missing warning is issued; otherwise, a normal signal is issued.

[0047] The specific steps of C32 are as follows: detect the color of the third sealing area, compare the detected color with the color template, if the detected color exceeds the fifth threshold, it is determined that there is an oil or material leakage defect, and a second oil or material leakage defect warning is issued; otherwise, a normal signal is issued.

[0048] In the above process, the sealed image of one side of the food ingredient package is obtained based on a camera and a light source on the same side as that side. The camera obtains the sealed image through the light reflected from the food ingredient package.

[0049] In inspection stage C, the packaging location information provided in stage A is used as a reference. If the packaging is non-transparent, the inspection method in stage A is the same as in stage C: analyzing the seal texture and the color of the outer seal to confirm sealing defects and surface oil stains. If the packaging is transparent, a perspective image is obtained, and color analysis can be used. If there is oil seepage inside or outside the seal, or material inclusions in the layers, it will be reflected in the color difference in the image. If the obviousness of the discoloration exceeds the set parameters, a defect can be identified, and an alarm will be triggered. At this point, stage C inspection ends.

[0050] After completing three testing stages, the results from all three stages are combined to obtain the final test result. The final test result includes the results of checking for missing seals on both sides of the food ingredient package, oil leakage, and material contamination, as well as the results of checking for oil seepage in transparent packaging. The test results are shown in the image below. Figure 2 and Figure 3 As shown. Figure 2 This is an illustration showing the effect of oil leakage as a detected defect in the material package.

[0051] Figure 3 This is an image showing the effect of the detected defect in the material package being the sealing and clamping of the material.

[0052] In C2, if the food ingredient package is transparent, a perspective image is acquired from the other side of the package. The color of the corresponding sealed area in the perspective image is detected. If the intensity of the detected discoloration exceeds the sixth threshold, an oil seepage defect is determined to exist on the surface of the transparent packaging or inside the seal, and an oil seepage defect warning is issued; otherwise, a normal signal is issued. The perspective image is obtained using a camera on the same side as the package and a light source on the opposite side. The camera obtains the perspective image through light passing through the food ingredient package.

[0053] In this invention, the threshold corresponding to the proportion of striped texture in the entire first sealing area can be 90% or 95%. The threshold corresponding to different colors can be the difference threshold of RGB values, which can be 20%. The threshold corresponding to grayscale difference can be 3, and the corresponding threshold can be set according to different packaging.

[0054] This invention employs a three-stage combined inspection process to comprehensively inspect both transparent and opaque packaging from the upper and lower surfaces of the sealed packaging, as well as the interior of the interlayer. This provides a comprehensive solution for addressing issues such as poor sealing, oil leakage, and material jamming on the production line. The invention also categorizes and detects different sealing defects, which is beneficial for subsequent defect handling.

[0055] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for detecting defects in the sealing of food ingredient packages online, characterized in that, The method includes three detection phases, A, B, and C, executed sequentially. The specific steps of the A detection phase are as follows: A first sealing image is obtained from one side of the food ingredient package. Sealing information is determined based on this image, including the front and back of the packaging, the inflow angle of the packaging, and the position of the corresponding sealing area. The first sealing area of ​​the first sealing image is then determined. Simultaneously, A1 and A2 are performed on the first sealing image. The specific steps are as follows: A1. Sharpen and enhance the texture of the first sealing area to obtain a bright and dark image. Then perform binarization processing and calculate the proportion of striped texture in the entire first sealing area. If the proportion is less than the first threshold, it is determined that the seal is missing and a warning of the first seal is missing is issued. Otherwise, a normal signal is issued. A2. Detect the color of the first sealing area and compare the detected color with the color template. If the detected color difference exceeds the second threshold, it is determined that there is an oil or material leakage defect and a first oil or material leakage defect warning is issued. Otherwise, a normal signal is issued. The specific steps in the B-stage testing are as follows: B1. Obtain the X-ray transmission image of the seal. Locate the seal position using the seal information obtained in A1. Determine the second seal area in the X-ray transmission image. Enhance the contrast of the grayscale perspective view area corresponding to the second seal area. Determine whether the grayscale difference of the enhanced grayscale perspective view area exceeds the third threshold. If it exceeds the threshold, issue a material clamping defect warning; otherwise, issue a normal signal. The specific steps in the C-stage detection are as follows: C1. Obtain a second sealing image from the other side of the food ingredient package. Use the sealing information obtained in A1 to locate the sealing position and determine the third sealing area of ​​the second sealing image. C2. Determine whether the food ingredient package is transparent at this time. If not, execute both C31 and C32. The specific steps of C31 are as follows: sharpen and enhance the texture of the third sealing area to obtain a bright and dark image, then perform binarization processing, calculate the proportion of striped texture in the entire third sealing area, if the proportion is less than the fourth threshold, it is determined that the sealing is missing and a second sealing is missing warning is issued; otherwise, a normal signal is issued. The specific steps of C32 are as follows: detect the color of the third sealing area, compare the detected color with the color template, if the detected color exceeds the fifth threshold, it is determined that there is an oil or material leakage defect, and a second oil or material leakage defect warning is issued; otherwise, a normal signal is issued. In the above process, the sealed image of one side of the food ingredient package is obtained based on a camera and a light source on the same side as that side. The camera obtains the sealed image through the light reflected from the food ingredient package. After completing the three testing stages, the results from the three stages are combined to obtain the final test result; In C2, if the food ingredient package is transparent, a perspective image is obtained from the other side of the food ingredient package, and the color of the sealing area corresponding to the perspective image is detected. If the obviousness of the detected discoloration exceeds the sixth threshold, it is determined that there is an oil seepage defect on the surface of the transparent packaging or inside the seal, and an oil seepage defect warning is issued; otherwise, a normal signal is issued. The final test results include the results of testing whether the seals on the front and back of the food ingredient package are missing, whether there is oil leakage, whether there is any material trapped, and also the results of testing whether there is oil seepage in transparent packaging.

2. The method for detecting defects in the sealing of food ingredient packages according to claim 1, characterized in that, The perspective image is obtained based on a camera on the same side as the food package and a light source on the opposite side. The camera obtains the perspective image through light passing through the food package.

3. The method for detecting defects in the sealing of food ingredient packages according to claim 1, characterized in that, The specific steps for determining sealing information based on the first sealing image are as follows: match the first sealing image with pre-stored packaging feature data, and confirm whether the current food package is the front or back, the inflow angle of the packaging, and the position of the corresponding sealing area through image rotation and feature registration.

4. The method for detecting defects in the sealing of food ingredient packages according to claim 3, characterized in that, The pre-stored packaging feature data is matched with the packaging of the detected food ingredient packets.

5. The method for detecting defects in the sealing of food ingredient packages according to claim 3, characterized in that, The pre-stored packaging feature data includes color data and character data.

6. The method for detecting defects in the sealing of food ingredient packages according to claim 1, characterized in that, In A2, the detected color is compared with the color template, specifically by comparing the RGB values.

7. The method for detecting defects in the sealing of food ingredient packages according to claim 1, characterized in that, The camera is a line scan camera.

8. The method for detecting defects in the sealing of food ingredient packages according to claim 1, characterized in that, The light source is an LED lamp.