Motion direction defect detection method and device
By using an area array camera to correct images, and combining vertical illumination and acquisition systems with image correction algorithms, the problem of inability to image defects in the direction of motion in traditional printing inspection is solved, achieving stable imaging and recognition, and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DAHENG IMAGE VISION CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-17
AI Technical Summary
In traditional printing inspection solutions, defects in the direction of movement cannot be effectively imaged and identified, and there are problems such as uneven field of view, small effective field of view, and high cost.
The method of image correction using area array cameras, by setting up an illumination system perpendicular to the product's movement direction and an acquisition system perpendicular to the surface, combined with image correction algorithms and enhancement processing, achieves stable imaging and identification of defects.
It achieves clear imaging and recognition of surface defects in the direction of movement of printed products, improves the uniformity of the imaging field of view, reduces costs, and has hardware advantages.
Smart Images

Figure CN121877908A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of quality inspection of printed products, and more specifically, to a method and apparatus for detecting defects in the direction of motion. Background Technology
[0002] In existing technologies, printing quality inspection is mainly divided into surface defect detection and printing defect detection, with deformation defects in the product's motion direction falling under the category of surface defects. Surface defect imaging detection typically involves incident light illuminating the product surface, a detector receiving the reflected light to acquire surface information images, and then using software algorithms for image processing to complete defect identification. In traditional printing surface inspection methods, the incident direction of the light source is the same as the product's motion direction and cannot be changed. This means that surface deformation defects with the same extension direction as the product's motion direction will not show a significant change in the direction of reflected light after incident light irradiation. Therefore, the defect imaging contrast is low or non-existent, making it impossible to effectively identify and detect such defects. Even if the problem of detecting defects in the motion direction is solved, such as with linear array oblique lighting schemes, problems such as poor uniformity within the field of view, small effective field of view, large space occupation, and high cost still exist. This has always been an industry challenge in printing inspection, failing to meet the requirements for stable imaging and defect identification of defects in the motion direction. Summary of the Invention
[0003] The purpose of this invention is to provide a detection method and apparatus that uses an area array camera to correct images, thereby achieving stable imaging and defect identification of surface defects in the direction of motion of printed products, and solving the problem that traditional printing inspection schemes and linear array oblique lighting schemes cannot effectively detect defects in the direction of motion.
[0004] The technical solution of this invention is: a method for detecting defects in the direction of motion, the method comprising:
[0005] S1. Setting up the detection device: Place the product to be inspected horizontally on the conveyor belt. Set up an illumination system on the side of the conveyor belt of the product to be inspected. The height of the illumination system is greater than the upper surface of the product to be inspected. The illumination system emits light from the upper surface of the product to be inspected in an approximately horizontal direction. The emitted light is perpendicular to the movement direction of the product to be inspected. Set up a collection system with a lens facing downwards directly above the location of the illumination system on the conveyor belt. The optical axis of the collection system is perpendicular to the surface of the product to be inspected.
[0006] S2. After setting up the detection device, first place the white balance paper on the conveyor belt, turn on the lighting system, and use the acquisition system to acquire the raw image of the white balance paper; then turn off the lighting system and use the acquisition system to acquire the dark image of the white balance paper.
[0007] S3. Calculate the image correction matrix parameters for each pixel. And save the image correction matrix parameters To the data acquisition system;
[0008] S4. Place the product to be inspected on the conveyor belt, turn on the lighting system, and use the acquisition system to acquire a top-view image of the product to be inspected.
[0009] S5. For the top-view image acquired in step S4, enhance the line defects in the image, extract the image edge features, and then use the BLOB analysis tool to filter out the line defects, and finally give the image defect detection results.
[0010] In any of the above technical solutions, further, the image correction matrix parameters The calculation method is as follows:
[0011] ;
[0012] in, The preset target grayscale value, The coordinates in the Raw image are The grayscale value of the pixel, The coordinates in the Drak image are The grayscale value of the pixel.
[0013] In any of the above technical solutions, further, the specific process of enhancing line defects in the image in step S5 includes:
[0014] S51. Convert the image from RGB space to HSV space and obtain the independent luminance component V(x,y);
[0015] S52. The Retinex algorithm based on a single scale decomposes the luminance component V(x,y) into a reflection component R(x,y) and an illumination component L(x,y). The formula for calculating the reflection component R(x,y) is as follows:
[0016] ;
[0017] in, It is a Gaussian filter. It is the size of the Gaussian filter kernel;
[0018] S53. Adaptive gamma correction is applied to the reflection component R(x,y). First, the optimal brightness-dark separation threshold T for the reflection component is calculated using the Otsu method. Then, a smaller gamma correction coefficient is designed for the dark area. A larger gamma correction coefficient is designed for the bright area. The design formula is as follows:
[0019] ;
[0020] S54. Use adaptive gamma correction coefficients to correct the reflection component. The correction formula is as follows:
[0021] ;
[0022] in, This is the corrected reflection component image;
[0023] S55. The corrected reflection component image Combine with the illumination component L(x,y) to reconstruct the luminance component. Then, the reconstructed luminance components are merged with the original H and S components of the image to restore the color space to RGB, resulting in an image with enhanced line defects.
[0024] S56. Use the Canny algorithm to extract image edge features, and use the computer's BLOB analysis tool to filter out linear defects, finally giving the image defect detection results.
[0025] A detection device based on the method for detecting motion direction defects described in any of the above technical solutions is also provided. The detection device detects motion direction defects on the upper surface of the product to be inspected. The detection device includes: an illumination system, a data acquisition system, and a conveyor belt.
[0026] The lighting system is set on the side of the conveyor belt, with the light emitting surface of the lighting system facing the conveyor belt. The product to be inspected is placed horizontally on the conveyor belt, and the lighting system is set at a height greater than the upper surface of the product to be inspected.
[0027] The acquisition system is positioned directly above the area illuminated by the lighting system on the conveyor belt, with the optical axis of the acquisition system perpendicular to the surface of the conveyor belt.
[0028] In any of the above technical solutions, the angle between the emitted light direction of the lighting system and the horizontal plane is in the range of 0° to 30°, and the horizontal distance between the lighting system and the product to be inspected is maintained at 50mm to 100mm.
[0029] The beneficial effects of this invention are:
[0030] Compared with traditional defect detection stations, the technical solution in this invention can effectively achieve clear imaging of defects in the direction of movement, while traditional stations and linear array oblique lighting stations cannot image this type of defect.
[0031] The adoption of image correction methods significantly improves the effective imaging field of view of the acquisition system, while also enhancing the uniformity of imaging and solving the inherent problem of uneven imaging in unilateral lighting methods.
[0032] The solution of using a planar array camera to correct images overcomes the disadvantages of traditional line scan inspection systems and line array oblique lighting stations in the printing industry, which cannot detect defects in the direction of motion. It also has hardware advantages such as small footprint, low cost, and high feasibility. Attached Figure Description
[0033] The advantages of the above and additional aspects of the present invention will become apparent and readily understood in the description of the embodiments in conjunction with the following drawings, wherein:
[0034] Figure 1 This is a schematic diagram of the device from different perspectives regarding the method and apparatus for detecting motion direction defects according to an embodiment of the present invention;
[0035] Figure 2 This is a schematic diagram of a conventional defect detection device from different perspectives, illustrating a method and apparatus for detecting motion direction defects according to an embodiment of the present invention.
[0036] Figure 3 This is an imaging schematic diagram of a conventional defect detection system for a method and apparatus for detecting defects in the direction of motion according to an embodiment of the present invention;
[0037] Figure 4 This is an imaging schematic diagram of the defect detection method and apparatus according to an embodiment of the present invention;
[0038] Figure 5 This is a raw schematic diagram of the acquisition of a method and apparatus for detecting motion direction defects according to an embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram of Drak data collected by a method and apparatus for detecting motion direction defects according to an embodiment of the present invention;
[0040] Figure 7 This is an imaging reference image of the corrected target grayscale value of the method and apparatus for detecting motion direction defects according to an embodiment of the present invention;
[0041] Figure 8 The image is the original image acquired by the acquisition system of the method and apparatus for detecting motion direction defects according to an embodiment of the present invention;
[0042] Figure 9 This is a method and apparatus for detecting motion direction defects according to an embodiment of the present invention. Figure 8 The calibrated image;
[0043] Figure 10 This is a method and apparatus for detecting motion direction defects according to an embodiment of the present invention. Figure 8 Images of the same product under inspection acquired using traditional defect detection methods;
[0044] Figure 11 This is a comparison diagram of the effects of the detection scheme of the present invention and the traditional detection scheme for scratch defects of the same product under inspection, according to an embodiment of the present invention, in the detection method and apparatus for defects in the direction of motion. The angle between the lighting system and the horizontal direction is 0°.
[0045] Figure 12 This is a comparison diagram of the effects of the detection scheme of the present invention and the traditional detection scheme for scratch defects on the same product under inspection, according to an embodiment of the present invention, in the detection method and apparatus for detecting defects in the direction of motion. The angle between the lighting system and the horizontal direction is 15°.
[0046] Figure 13 This is a comparison diagram of the effects of the present invention's detection scheme and the conventional detection scheme for the same product under inspection's imprint defects, based on a method and apparatus for detecting motion direction defects according to an embodiment of the present invention.
[0047] Among them, 1-lighting system, 2-product to be inspected, 3-defects in the direction of movement, and 4-acquisition system. Detailed Implementation
[0048] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0049] In the following description, many specific details are set forth in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0050] To address the shortcomings of the existing technology, such as Figure 1 As shown, this embodiment provides a method for detecting defects in the direction of motion, the method comprising:
[0051] S1. Setting up the detection device: Place the product to be inspected 2 horizontally on the conveyor belt. Set up an illumination system 1 on the side of the conveyor belt of the product to be inspected 2. The height of the illumination system 1 is greater than the upper surface of the product to be inspected 2. The illumination system 1 emits light from the upper surface of the product to be inspected 2 in an approximately horizontal direction. The emitted light is perpendicular to the movement direction of the product to be inspected 2. Set up a collection system 4 with the lens facing downwards directly above the location of the illumination system 1 on the conveyor belt. The optical axis of the collection system 4 is perpendicular to the surface of the product to be inspected 2.
[0052] The angle between the emitted light direction of the lighting system 1 and the horizontal plane can be in the range of 0° to 30°; preferably, the horizontal distance between the lighting system 1 and the product to be inspected 2 is best maintained at 50mm to 100mm, so as to ensure that the defective area receives uniform incident light and produces clear reflected light components.
[0053] In this embodiment, the acquisition system 4 consists of a high-resolution area array camera paired with a fixed-focus lens.
[0054] like Figure 2 As shown, this illustrates a traditional defect detection method. The direction of the light emitted from the illumination system and the extension direction of the defects distributed along the direction of movement on the inspected product both lie in a plane parallel to the direction of movement. This results in only a small amount of light changing its propagation direction when reflected by the defects. Therefore, when this type of moving-direction defect 3 is imaged in the acquisition system, its grayscale is basically the same as the background, as shown in the image. Figure 3 As shown, no defect features can be observed.
[0055] This invention employs the defect detection method provided in step S1 above. The direction of the light emitted from the illumination system is perpendicular to the extension direction of this type of defect, thereby generating a large amount of reflected light components when the illumination light passes through the defect and enters the acquisition system, such as... Figure 4 As shown, this type of defect can display a pattern of alternating light and dark in the acquisition system, which significantly improves the contrast of the defect in the image, realizes stable imaging and defect identification of surface defects in the direction of movement of printed products, and solves the problem that defects in the direction of movement cannot be effectively detected in traditional detection methods.
[0056] However, because the present invention uses a single-sided illumination method and the illumination direction is very close to the horizontal direction, the gray level distribution in the acquired image is uneven. Specifically, the gray level is high when the product is close to the light source and low when it is far away from the light source, which introduces a new problem of uneven imaging field of view, affecting the accurate extraction of defect features and the overall image quality.
[0057] To overcome this new problem, the present invention further introduces the following image correction algorithm based on an area scan camera to compensate for the non-uniformity disadvantage introduced by unilateral illumination, while maintaining the advantages of the present invention in detecting defects in the direction of motion:
[0058] S2. After setting up the detection device, first place the white balance paper on the conveyor belt, turn on the lighting system 1, and use the acquisition system 4 to acquire the raw image of the white balance paper, such as... Figure 5 As shown; then turn off the lighting system 1, and use the acquisition system 4 to acquire the dark field image of the white balance paper, as shown. Figure 6 As shown.
[0059] In this embodiment, from a top-down perspective, the lighting system 1 is located to the left of the direction of movement of the product 2 under inspection, causing the grayscale value of the raw image of the white balance paper to decrease linearly from left to right. The dark image is the black field image of the acquisition system 4 in the absence of external lighting.
[0060] S3. Calculate the image correction matrix parameters for each pixel. :
[0061] ;
[0062] in, The preset target grayscale value has the following color: Figure 7 As shown, The coordinates in the Raw image are The grayscale value of the pixel, The coordinates in the Drak image are The grayscale value of the pixel.
[0063] Save image correction matrix parameters In the acquisition system 4, the image correction matrix parameters are called during subsequent acquisition processes. The grayscale of each pixel in the image is corrected in real time to ensure that the acquired image is uniformly imaged.
[0064] S4. Place the product to be inspected 2 on the conveyor belt, turn on the lighting system 1, and use the acquisition system 4 to acquire a top view image of the product to be inspected 2.
[0065] S5. For the top-view image acquired in step S4, use an adaptive brightness line enhancement defect detection algorithm to detect line-like defects in the direction of motion. Specific steps include:
[0066] S51. Convert the image from RGB space to HSV space, which has more thorough color separation, and obtain the independent luminance component V(x,y).
[0067] S52. The Retinex algorithm based on a single scale decomposes the luminance component V(x,y) into a reflection component R(x,y) and an illumination component L(x,y). The formula for calculating the reflection component R(x,y) is as follows:
[0068] ;
[0069] in, It is a Gaussian filter. It is the size of the Gaussian filter kernel.
[0070] S53. Adaptive gamma correction is applied to the reflection component R(x,y). First, the optimal brightness-dark separation threshold T for the reflection component is calculated using the Otsu method (OTSU). A smaller gamma correction coefficient is designed for the dark area. A larger gamma correction coefficient is designed for the bright area. The design formula is as follows:
[0071] ;
[0072] S54. Use adaptive gamma correction coefficients to correct the reflection component. The correction formula is as follows:
[0073] ;
[0074] in, The corrected reflection component image is obtained by adaptively increasing the value of the dark area and decreasing the value of the bright area, which enhances the lines and balances the brightness of the image.
[0075] S55. The corrected reflection component image Combine with the illumination component L(x,y) to reconstruct the luminance component. Then, the reconstructed luminance components are merged with the original H and S components of the image to restore the color space to RGB, resulting in an image with enhanced line defects.
[0076] S56. Use the Canny algorithm to extract image edge features, and use the computer's BLOB analysis tool to filter out linear defects, finally giving the image defect detection results.
[0077] The following are three practical testing implementation examples:
[0078] like Figure 11 As shown, in this embodiment, detection is performed when the angle between the extension direction of the scratch defect and the product movement direction is 0°; as Figure 11 As shown in the left figure, when using the device of the present invention, the scratch defect is imaged as a thin, elongated shadow, and the defect is clearly visible; however, when using a traditional detection method, the scratch defect cannot be imaged, such as... Figure 11 As shown in the right figure, this embodiment verifies the effectiveness of the method of the present invention in detecting scratch defects in the standard motion direction.
[0079] like Figure 12 As shown, in this embodiment, the detection is performed when the angle between the extension direction of the scratch defect and the product movement direction is 15°; as Figure 12 As shown in the left figure, when using the device of the present invention, the scratch defect is imaged as a thin, elongated shadow, with obvious features; while when using a traditional detection method, the scratch defect cannot be imaged, such as... Figure 12 As shown in the right figure, this embodiment demonstrates that the method of the present invention is applicable to detection scenarios involving scratches in or near the direction of movement.
[0080] like Figure 13As shown, in this embodiment, detection is performed when the angle between the extension direction of the embossing (bore) defect and the product movement direction is 0°; as Figure 13 As shown in the left figure, when using the device of the present invention, the imprint defect is imaged as a blocky image with alternating light and dark areas, and the defect is clearly visible and its features are obvious; while when using a traditional detection method, the imprint defect is not visible and has no feature information, such as... Figure 13 As shown in the right figure, this embodiment further verifies the applicability of the method of the present invention in the detection of imprint defects in the direction of motion.
[0081] Through the above embodiments, the present invention employs an image correction method using an area scan camera to achieve stable imaging and defect identification of surface defects (including but not limited to scratches, embossing defects, and unevenness defects) in the direction of movement of printed products, solving the problem that traditional line scan inspection systems cannot effectively detect such defects. Furthermore, the device of the present invention occupies little space and has low cost, exhibiting significant hardware advantages.
[0082] In summary, this invention proposes a method for detecting defects in the direction of motion, comprising:
[0083] S1. Setting up the detection device: Place the product to be inspected 2 horizontally on the conveyor belt. Set up an illumination system 1 on the side of the conveyor belt of the product to be inspected 2. The height of the illumination system 1 is greater than the upper surface of the product to be inspected 2. The illumination system 1 emits light from the upper surface of the product to be inspected 2 in an approximately horizontal direction. The emitted light is perpendicular to the movement direction of the product to be inspected 2. Set up a collection system 4 with the lens facing downwards directly above the location of the illumination system 1 on the conveyor belt. The optical axis of the collection system 4 is perpendicular to the surface of the product to be inspected 2.
[0084] S2. After setting up the detection device, first place the white balance paper on the conveyor belt, turn on the illumination system 1, and use the acquisition system 4 to acquire the raw state image of the white balance paper (Raw); then turn off the illumination system 1 and use the acquisition system 4 to acquire the dark field image of the white balance paper (Dark).
[0085] S3. Calculate the image correction matrix parameters for each pixel. And save the image correction matrix parameters To the acquisition system 4.
[0086] S4. Place the product to be inspected 2 on the conveyor belt, turn on the lighting system 1, and use the acquisition system 4 to acquire a top view image of the product to be inspected 2.
[0087] S5. For the acquired top-view image, enhance the line defects in the image, extract the image edge features, and then use the BLOB analysis tool to filter out the line defects, and finally give the image defect detection results.
[0088] The present invention also provides a detection device based on the above detection method. The detection device detects the movement direction defect 3 on the upper surface of the product to be inspected 2. The detection device includes: an illumination system 1, a data acquisition system 4, and a conveyor belt.
[0089] The lighting system 1 is set on the side of the conveyor belt, and the light emitting surface of the lighting system 1 faces the conveyor belt. The product to be inspected 2 is placed horizontally on the conveyor belt, and the lighting system 1 is set at a height greater than the upper surface of the product to be inspected 2.
[0090] The acquisition system 4 is positioned directly above the illumination area of the lighting system 1 on the conveyor belt, and the optical axis of the acquisition system 4 is perpendicular to the surface of the conveyor belt.
[0091] The steps in this invention can be adjusted, combined, or deleted according to actual needs.
[0092] The units in the device of the present invention can be merged, divided, or reduced according to actual needs.
[0093] In this invention, the terms "installation," "connection," "linking," and "fixing" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; "linking" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances.
[0094] The shapes of the components in the accompanying drawings are schematic and may differ from their actual shapes. The drawings are only used to illustrate the principles of the present invention and are not intended to limit the present invention.
[0095] Although the invention has been disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and not intended to limit the application of the invention. The scope of protection of the invention is defined by the appended claims and may include various variations, modifications, and equivalents made to the invention without departing from the scope and spirit of the invention.
Claims
1. A method for detecting defects in the direction of motion, characterized in that, The method includes: S1. Setting up a detection device: Place the product to be inspected (2) horizontally on the conveyor belt. Set up an illumination system (1) on the side of the conveyor belt of the product to be inspected (2). The height of the illumination system (1) is greater than the upper surface of the product to be inspected (2). The illumination system (1) emits light on the upper surface of the product to be inspected (2) in an approximately horizontal direction. The emitted light is perpendicular to the movement direction of the product to be inspected (2). Set up a collection system (4) with the lens facing downwards directly above the location of the illumination system (1) on the conveyor belt. The optical axis of the collection system (4) is perpendicular to the surface of the product to be inspected (2). S2. After setting up the detection device, first place the white balance paper on the conveyor belt, turn on the lighting system (1), and use the acquisition system (4) to acquire the raw state image of the white balance paper; then turn off the lighting system (1) and use the acquisition system (4) to acquire the dark field image of the white balance paper. S3. Calculate the image correction matrix parameters for each pixel. And save the image correction matrix parameters To the acquisition system (4); S4. Place the product to be inspected (2) on the conveyor belt, turn on the lighting system (1), and use the acquisition system (4) to acquire a top view image of the product to be inspected (2); S5. For the top-view image acquired in step S4, enhance the line defects in the image, extract the image edge features, and then use the BLOB analysis tool to filter out the line defects, and finally give the image defect detection results.
2. The method and apparatus for detecting defects in the direction of motion as described in claim 1, characterized in that, The image correction matrix parameters The calculation method is as follows: ; in, The preset target grayscale value, The coordinates in the Raw image are The grayscale value of the pixel, The coordinates in the Drak image are The grayscale value of the pixel.
3. The method and apparatus for detecting defects in the direction of motion as described in claim 1, characterized in that, The specific process of enhancing line defects in the image in step S5 includes: S51. Convert the image from RGB space to HSV space and obtain the independent luminance component V(x,y); S52. The Retinex algorithm based on a single scale decomposes the luminance component V(x,y) into a reflection component R(x,y) and an illumination component L(x,y). The formula for calculating the reflection component R(x,y) is as follows: ; in, It is a Gaussian filter. It is the size of the Gaussian filter kernel; S53. Adaptive gamma correction is applied to the reflection component R(x,y). First, the optimal brightness-dark separation threshold T for the reflection component is calculated using the Otsu method. Then, a smaller gamma correction coefficient is designed for the dark area. A larger gamma correction coefficient is designed for the bright area. The design formula is as follows: ; S54. Use adaptive gamma correction coefficients to correct the reflection component. The correction formula is as follows: ; in, This is the corrected reflection component image; S55. The corrected reflection component image Combine with the illumination component L(x,y) to reconstruct the luminance component. Then, the reconstructed luminance components are merged with the original H and S components of the image to restore the color space to RGB, resulting in an image with enhanced line defects. S56. Use the Canny algorithm to extract image edge features, and use the computer's BLOB analysis tool to filter out linear defects, finally giving the image defect detection results.
4. A detection device based on the method for detecting motion direction defects as described in any one of claims 1-3, characterized in that, The detection device detects the movement direction defect (3) on the upper surface of the product to be inspected (2). The detection device includes: a lighting system (1), a data acquisition system (4), and a conveyor belt. The lighting system (1) is set on the side of the conveyor belt, and the light emitting surface of the lighting system (1) faces the conveyor belt. The product to be inspected (2) is placed horizontally on the conveyor belt, and the setting height of the lighting system (1) is greater than the upper surface of the product to be inspected (2). The acquisition system (4) is positioned directly above the illumination area of the lighting system (1) of the conveyor belt, and the optical axis of the acquisition system (4) is perpendicular to the surface of the conveyor belt.
5. The detection device as described in claim 4, characterized in that, The angle between the emitted light direction of the lighting system (1) and the horizontal plane is in the range of 0° to 30°, and the horizontal distance between the lighting system (1) and the product to be inspected (2) is maintained at 50mm to 100mm.