Surface defect inspection apparatus and surface defect inspection method
The apparatus and method enhance defect detection accuracy by calculating brightness gradient intensity and applying noise reduction techniques to eliminate false positives in uneven regions and boundary lines, improving the reliability of defect identification.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- TOYOTA MOTOR EAST JAPAN
- Filing Date
- 2024-11-26
- Publication Date
- 2026-06-05
AI Technical Summary
Existing surface defect inspection systems misidentify defects in uneven regions such as character lines and near edge line angles, leading to inaccurate detection.
A surface defect inspection apparatus and method that calculates brightness gradient intensity in two orthogonal directions to detect edges, extracts defect candidates, and employs noise reduction techniques to remove false positives from uneven regions and boundary lines.
Improves detection accuracy by eliminating false detections in uneven regions and boundary areas, enhancing the reliability of defect identification.
Smart Images

Figure 2026092143000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a surface defect inspection apparatus and a surface defect inspection method suitable for inspecting states such as painting on the surface of an automobile body, for example.
Background Art
[0002] Conventionally, in the process of painting an automobile body, an inspector visually inspects the painted surface. However, visual inspection by an inspector is a labor-intensive task, and there are variations among individuals, so there is a risk of inspection errors and omissions. Also, in visual inspection by an inspector, the time required for inspection increases, and labor costs are one of the factors that raise the production cost of products. Therefore, automation of visual inspection has been desired, and in recent years, the development of surface defect inspection apparatuses capable of automatically inspecting optically has been underway.
[0003] For example, Patent Document 1 describes a surface inspection apparatus that acquires a photographed image of a painted surface on which a light and dark stripe pattern is formed by light irradiation, performs edge detection processing on the obtained photographed image, and extracts components having a predetermined luminance or higher to detect defects. According to this surface inspection apparatus, not only general uneven defects such as dust and peeling on the painted surface, but also defects such as paint color spots and scratches can be automatically and accurately detected.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] However, in uneven regions such as character lines, dots occur near the edge line angle, resulting in a problem of misdetecting them as defect candidates.
[0006] This invention was made based on these problems and aims to provide a surface defect inspection apparatus and a surface defect inspection method that can improve detection accuracy. [Means for solving the problem]
[0007] The surface defect inspection apparatus of the present invention comprises a light source that irradiates light onto a surface to be inspected; an imaging means that captures an image of the surface to be inspected irradiated by the light source; a defect candidate extraction means that calculates the brightness gradient intensity in two orthogonal directions based on the image captured by the imaging means to detect edges and extract defect candidates from the detection results; and a noise reduction means that removes noise from the defect candidates extracted by the defect candidate extraction means. The noise reduction means comprises an uneven region extraction means that extracts uneven regions of character lines from the image captured by the imaging means; a boundary line extraction means that extracts the boundary lines of the illuminated regions from the image captured by the imaging means; and a noise region removal means that removes uneven region defect candidates within the uneven region extracted by the uneven region extraction means, and boundary lines and neighboring region defect candidates within the neighboring region extracted by the boundary line extraction means, from the defect candidates extracted by the defect candidate extraction means.
[0008] The surface defect inspection method of the present invention includes: an imaging procedure to obtain an image by photographing a surface to be inspected irradiated with light from a light source; a defect candidate extraction procedure to detect edges by calculating the brightness gradient intensity in two orthogonal directions based on the image captured in the imaging procedure and extract defect candidates from the detection results; an uneven region extraction procedure to extract uneven regions of character lines from the image captured by the imaging means; a boundary line extraction procedure to extract the boundary lines of the illuminated regions from the image captured by the imaging means; and a noise region removal procedure to remove uneven region defect candidates within the uneven region extracted in the uneven region extraction procedure, and boundary lines and neighboring region defect candidates within the boundary line extraction procedure and their neighboring regions extracted by the boundary line extraction procedure from the defect candidates extracted in the defect candidate extraction procedure. [Effects of the Invention]
[0009] According to the present invention, since defect candidates within uneven regions extracted by the uneven region extraction means are removed from the defect candidates extracted by the defect candidate extraction means, it is possible to eliminate the false detection of dots occurring near edge line corners in uneven regions as defect candidates. Furthermore, since boundary line extraction means removes boundary line and nearby region defect candidates within the vicinity of the boundary line extracted by the boundary line extraction means from the defect candidates extracted by the defect candidate extraction means, it is possible to eliminate the false detection of defect candidates that tend to occur at the boundary line and nearby region of the illuminated area. Therefore, the accuracy of defect detection can be improved.
[0010] Furthermore, by calculating the brightness gradient intensity in two orthogonal directions to detect edges and extracting defect candidates from the detection results, edges can be easily detected for both the uneven regions of character lines where the direction in which the edge lines appear differs, and the boundary lines of the illuminated regions. [Brief explanation of the drawing]
[0011] [Figure 1] This figure shows the overall configuration of a surface defect inspection apparatus according to one embodiment of the present invention. [Figure 2] Figure 1 is a block diagram showing the configuration of the defect candidate extraction means and the noise reduction means. [Figure 3] This is an example of a preprocessed image obtained by a preprocessing means. [Figure 4] This shows an example of an edge detection image obtained by the edge detection means. [Figure 5] This figure shows the procedure for a surface defect inspection method according to one embodiment of the present invention. [Modes for carrying out the invention]
[0012] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0013] Figure 1 shows the overall configuration of a surface defect inspection device 1 according to one embodiment of the present invention. This surface defect inspection device 1, for example, uses the painted surface of an automobile body as the inspection surface M, and detects defects present on the surface of the inspection surface M.
[0014] The surface defect inspection apparatus 1 includes, for example, a light source 10 that irradiates light onto the surface to be inspected M, an imaging means 20 that captures an image of the surface to be inspected M irradiated by the light source 10, a moving means 30 that moves the position of the surface to be inspected M relative to the imaging means 20, a defect candidate extraction means 40 that extracts defect candidates from the image captured by the imaging means 20, a noise reduction means 50 that removes noise from the defect candidates extracted by the defect candidate extraction means, and a display means 60 that displays the result of noise removal by the noise reduction means 50.
[0015] The light source 10 preferably uses a straight-tube type lighting fixture, such as a straight-tube LED light or fluorescent lamp, and it is preferable to use a white light source because the body colors of automobiles vary widely. The light source 10 is preferably arranged in multiple locations relative to the surface to be inspected M so that the surface to be inspected M can be observed from multiple directions. The imaging means 20 has a camera 21, such as a CCD camera, which can obtain a digital image. The camera 21 is, for example, positioned opposite the light source 10 and configured to capture the reflected image of the light source 10 and its surrounding area.
[0016] The moving means 30 moves the position of the surface to be inspected relative to the imaging means 20 by moving at least one of the imaging means 20 and the surface to be inspected M. Preferably, the surface to be inspected M is transported in one direction at a constant speed by a transport means 30 such as a conveyor. The defect candidate extraction means 40 and the noise reduction means 50 can be configured by a computer, for example, and are configured to function as the defect candidate extraction means 40 or the noise reduction means 50 by executing a program. The display means 60 is configured by a display, for example, and is configured to display defects by attaching a circle mark or the like.
[0017] Figure 2 shows the configurations of the defect candidate extraction means 40 and the noise removal means 50 shown in Figure 1. The defect candidate extraction means 40 calculates the luminance gradient intensities in two orthogonal directions based on the image captured by the imaging means 20 to detect edges, and extracts defect candidates from the detection results. The defect candidate extraction means 40 preferably includes, for example, an image storage means 41 such as a memory that stores a plurality of images with different imaging times captured by the imaging means 20 while relatively moving the imaging means 20 and the inspection surface M, a preprocessing means 42 that preprocesses the image captured by the imaging means 20 to generate a preprocessed image, an edge detection means 43 that calculates the luminance gradient intensities in two orthogonal directions based on the image obtained by the imaging means 20 to detect edges, an extraction means 44 that extracts defect candidates from the detection results obtained by the edge detection means 43, and a defect candidate storage means 45 that stores the defect candidates.
[0018] The preprocessing means 42, for example, converts the image obtained by the imaging means 20 into a grayscale image or other grayscale image and reduces noise. Examples of noise reduction include a Gaussian filter and a median filter. Further, the preprocessing means 42 may, for example, cut out the area of the inspection surface M from the image obtained by the imaging means 20. FIG. 3 shows an example of the preprocessed image obtained by the preprocessing means 42. In FIG. 3, the light-colored part is an illumination area that is a mirror image of the light source 10, and mountain-shaped curves such as those on the left and right sides of the figure occur due to the character lines.
[0019] The edge detection means 43, for example, calculates the luminance gradient intensities in two orthogonal directions for the preprocessed image preprocessed by the preprocessing means 42 based on the image obtained by the imaging means 20 to detect edges. FIG. 4 shows an example of the edge detection image obtained by the edge detection means 43. Note that FIG. 4 is an edge detection image of the preprocessed image shown in FIG. 3.
[0020] The edge detection means 43 preferably generates a detection image for detecting edges over the entire image obtained by the imaging means 20, or over the entire region of the inspection surface M cut out by the preprocessing means 42. Examples of the two orthogonal directions include the X direction and the Y direction. As will be described later, when calculating the luminance gradient intensity in the X direction and the Y direction, it is difficult to detect the boundary line of the illumination region only in the X direction, and it is difficult to detect the uneven region of the character line only in the Y direction when extracting the uneven region of the character line and the boundary line of the illumination region by the noise removing means 50.
[0021] The extraction means 44 is configured to extract, for example, portions where the luminance gradient is greater than a predetermined threshold value from the detection result obtained by the edge detection means 43 as defect candidates. Specifically, the extraction means 44 is preferably configured to extract, for example, portions where the luminance gradient intensity is greater than a predetermined threshold value from the edge detection image obtained by the edge detection means 43 as defect candidates, perform binarization processing, and calculate the barycentric coordinates of the extracted defect candidates. The defect candidate storage means 45 is configured to store, for example, by a memory or the like, the barycentric coordinates of the defect candidates extracted by the extraction means 44.
[0022] The noise removing means 50 preferably includes a concavo-convex region extraction means 51 for extracting the concavo-convex region of the character line from the image captured by the imaging means 20, a boundary line extraction means 52 for extracting the boundary line of the illumination region from the image captured by the imaging means 20, and a noise region removing means 53 for removing the concavo-convex region defect candidates in the concavo-convex region extracted by the concavo-convex region extraction means 51 and the boundary line and the boundary line / nearby region defect candidates in the vicinity of the boundary line extracted by the boundary line extraction means 52 from the defect candidates extracted by the defect candidate extraction means 40.
[0023] This is because, in the uneven areas of character lines, dots may appear near the corners of the edge lines, leading to misidentification as a potential defect. Furthermore, near the boundaries of illuminated areas, even non-defective painted surfaces may be misidentified as potential defects due to differences in brightness.
[0024] The unevenness region extraction means 51 preferably extracts the unevenness region of the character line based on the edge detection image detected by the edge detection means 43, specifically, the calculation result of the brightness gradient intensity in the X direction. This is because the character line has edge lines in the Y direction. In Figure 4, the area shown by the white dashed line is the unevenness region of the character line.
[0025] The boundary line extraction means 52 preferably extracts the boundary line of the illuminated area based on the edge detection image detected by the edge detection means 43, specifically, the calculation result of the brightness gradient intensity in the Y direction. This is because the illuminated area exhibits edge lines in the X direction. In Figure 4, the horizontal white line represents the boundary line of the illuminated area.
[0026] The noise region removal means 53 is configured to remove, for example, defect candidates existing within the uneven region extracted by the uneven region extraction means 51 as uneven region defect candidates, and defect candidates existing within the boundary line and its vicinity extracted by the boundary line extraction means 52 as boundary line / neighborhood region defect candidates, and remove them as noise. The vicinity region of the boundary line of the illumination region is obtained, for example, by performing an expansion process on the boundary line of the illumination region obtained by edge detection.
[0027] Preferably, the defect detection means 50 also includes a continuity determination means 54 that, for example, determines that a defect is a defect if the distance and angle of movement between at least two images taken at different times are within the range of a reference distance and reference angle of movement that is expected to occur when a defect exists on the surface M under inspection, and that it is noise if it is outside this range. Preferably, the distance and angle of movement of the defect candidate are viewed between three or more consecutive images taken in chronological order, but the number of images can be arbitrarily determined depending on the surface M under inspection. Alternatively, they may be viewed between two images depending on the surface M under inspection. The distance of movement of the defect candidate is, for example, the length of the straight line connecting the defect candidates between images taken at different times, and the angle of movement of the defect candidate is, for example, the angle of the straight line connecting the defect candidates between images taken at different times. The continuity determination means 54 is configured, for example, to remove those that are determined to be noise from the defect candidates extracted by the defect candidate extraction means 40.
[0028] The surface defect inspection device 1 is used, for example, as follows. Figure 5 shows the procedure for a surface defect inspection method using the surface defect inspection device 1. In this surface defect inspection method, first, for example, the surface to be inspected M, which is irradiated with light from a light source 10, is photographed by the photographing means 20 (step S110; photographing procedure). At that time, for example, the position of the surface to be inspected M relative to the photographing means 20 is moved by the moving means 30 to acquire multiple images with different photographing times. The images taken by the photographing means 20 are stored in the image storage means 41.
[0029] Next, for example, defect candidates are extracted from multiple images taken at different times using the shooting procedure (step S110) (step S120; defect candidate extraction procedure). In the defect candidate extraction procedure (step S120), based on the images taken using the shooting procedure (step S110), the brightness gradient intensity in two orthogonal directions is calculated to detect edges, and defect candidates are extracted from the detection results.
[0030] Specifically, for example, first, the preprocessing means 42 preprocesses the image obtained by the imaging means 20 as described above (step S121; preprocessing procedure). Next, the edge detection means 43 calculates the brightness gradient intensity in two orthogonal directions, for example, the X direction and the Y direction, for the preprocessed image and detects edges (step S122; edge detection procedure). Subsequently, for example, the extraction means 44 extracts areas where the brightness gradient intensity is greater than a predetermined threshold from the detection results obtained in the edge detection procedure as defect candidates, performs binarization processing, and calculates the centroid coordinates of the extracted defect candidates (step S123; extraction procedure). The defect candidates extracted by the extraction procedure (step S123) are stored in the defect candidate storage means 45.
[0031] After extracting defect candidates using the defect candidate extraction procedure (step S120), noise is removed from the defect candidates, for example (step S130; noise removal procedure). In the noise removal procedure (step S130), for example, first, the unevenness region extraction means 51 extracts the unevenness region of the character line from the image captured by the imaging means 20 (step S131; unevenness region extraction procedure). In this case, it is preferable to extract the unevenness region of the character line based on the edge detection image detected by the edge detection means 43, specifically, the calculation result of the brightness gradient intensity in the X direction.
[0032] Furthermore, for example, the boundary line extraction means 52 extracts the boundary line of the illuminated area from the image captured by the imaging means 20 (step S132; boundary line extraction procedure). In this case, it is preferable to extract the boundary line of the illuminated area based on the edge detection image detected by the edge detection means 43, specifically, the calculation result of the brightness gradient intensity in the Y direction. Next, for example, the noise region removal means 53 removes the defect candidates extracted in the defect candidate extraction procedure (step S120) from the defect candidates, specifically the defect candidates within the uneven region extracted in the uneven region extraction procedure (step S131), and the boundary line and boundary line / neighbor region defect candidates extracted in the boundary line extraction procedure (step S132) (step S133; noise region removal procedure).
[0033] Next, for example, the continuity determination means 54 determines whether the distance and angle of movement between at least two images taken at different times for the defect candidate extracted in the defect candidate extraction procedure (step S120) are within the range of the reference movement distance and reference movement angle that are assumed to occur when a defect exists on the surface M under inspection (step S134; continuity determination procedure). If they are outside the range of the reference movement distance and reference movement angle, they are removed as noise.
[0034] Subsequently, for example, the display means 60 displays the result of noise removal in the noise removal procedure (step S130) (step S140; display procedure). The display means 60 displays, for example, a circular mark or the like on a display, indicating the centroid of the defect.
[0035] As described above, according to this embodiment, since defect candidates within uneven regions extracted by the uneven region extraction means 51 are removed from the defect candidates extracted by the defect candidate extraction means 40, it is possible to eliminate the false detection of dots occurring near edge line corners in uneven regions as defect candidates. Furthermore, since boundary line extraction means 52 removes boundary line and nearby region defect candidates extracted by the boundary line extraction means 52 from the defect candidates extracted by the defect candidate extraction means 40, it is possible to eliminate the false detection of defect candidates that tend to occur at the boundary line and nearby region of the illuminated area. Therefore, the accuracy of defect detection can be improved.
[0036] Furthermore, by calculating the luminance gradient intensity in two orthogonal directions to detect edges and extracting defect candidates from the detection results, edges can be easily detected in both the uneven regions of character lines where the direction in which the edge lines appear differs, and the boundary lines of the illuminated regions.
[0037] Although the present invention has been described above with reference to embodiments, the present invention is not limited to the above embodiments and can be modified in various ways. For example, although each component has been described in detail in the above embodiments, it is not necessary to have all components or procedures, and other components or procedures may be included.
[0038] Furthermore, although the above embodiment specifically described the inspection of the painted surface of an automobile body, the present invention can be applied not only to automobile bodies but also to the surface inspection of other painted products. Moreover, it can be applied not only to painted surfaces but also to the inspection of surfaces that have reflective properties. [Explanation of Symbols]
[0039] 1...Surface defect inspection device, 10...Light source, 20...Photography means, 21...Camera, 30...Movement means, 40...Defect candidate extraction means, 41...Image storage means, 42...Preprocessing means, 43...Edge detection means, 44...Extraction means, 45...Defect candidate storage means, 50...Noise removal means, 51...Rubber region extraction means, 52...Boundary line extraction means, 53...Noise region removal means, 54...Continuity determination means, 60...Display means, M...Surface under inspection
Claims
1. A light source that illuminates the surface to be inspected, A photographing means for capturing an image of the surface to be inspected, which has been illuminated by the light source, A defect candidate extraction means calculates the brightness gradient intensity in two orthogonal directions based on the image captured by the aforementioned imaging means to detect edges, and extracts defect candidates from the detection results. The system includes a noise reduction means for removing noise from defect candidates extracted by the defect candidate extraction means, The noise reduction means is An unevenness region extraction means for extracting uneven regions of character lines from an image captured by the aforementioned shooting means, A boundary extraction means for extracting the boundary of the illuminated area from the image captured by the aforementioned shooting means, The system includes a noise reduction means that removes, from the defect candidates extracted by the defect candidate extraction means, defect candidates within the uneven regions extracted by the uneven region extraction means, and boundary lines and neighboring region defect candidates within the neighboring regions extracted by the boundary line extraction means. A surface defect inspection apparatus characterized by the following features.
2. The imaging procedure involves photographing the surface under inspection, illuminated with light from a light source, to obtain an image, and A defect candidate extraction procedure is performed which, based on the image captured by the aforementioned shooting procedure, calculates the brightness gradient intensity in two orthogonal directions to detect edges, and extracts defect candidates from the detection results, A procedure for extracting uneven regions of character lines from an image captured by the aforementioned shooting means, A boundary extraction procedure for extracting the boundary of an illuminated area from an image captured by the aforementioned shooting means, A noise reduction procedure is performed to remove, from the defect candidates extracted by the defect candidate extraction procedure, the defect candidates within the uneven regions extracted by the uneven region extraction procedure, and the boundary lines and boundary / neighbor region defect candidates within the neighboring regions extracted by the boundary line extraction procedure. A surface defect inspection method characterized by including the following.