Surface defect inspection device and surface defect inspection method
By dividing the surface into sections and employing a multi-stage defect extraction process, the device accurately identifies defects even with curved trajectories and changing camera angles, enhancing inspection accuracy.
Patent Information
- Application Number
- JP2021196063
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2025-12-22
- Estimated Expiration
- 2041-12-02
AI Technical Summary
Existing surface defect inspection devices struggle to accurately determine defects when the movement trajectory of defect candidates is curved, particularly when the camera angle changes to maintain brightness.
The device divides the inspected surface into sections and uses a multi-stage defect candidate extraction process, including binarization and luminance difference analysis, to identify defects based on the relationship between defect candidates and surface sections, even when the camera angle adjusts.
This approach allows for high-accuracy defect detection, even with curved trajectories, by ensuring consistent judgment across multiple images and accounting for varying brightness conditions.
Smart Images

Figure 0007789310000001 
Figure 0007789310000002 
Figure 0007789310000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a surface defect inspection device and a surface defect inspection method suitable for inspecting the condition of the paint on the surface of an automobile body, for example. [Background technology]
[0002] Traditionally, in the process of painting automobile bodies, inspectors have visually inspected the painted surface. However, visual inspection by inspectors is labor-intensive, and there is variation between individuals, which can lead to inspection errors or oversights. Furthermore, visual inspection by inspectors takes a lot of time, and labor costs are one factor that increase product production costs. Therefore, there is a demand for automation of visual inspection, and in recent years, progress has been made in developing surface defect inspection devices that can perform optical, automated inspections.
[0003] For example, Patent Document 1 describes a surface defect inspection device that photographs the surface to be inspected using an imaging means while moving the imaging means and the surface to be inspected relative to each other, extracts defect candidates from the multiple images taken, and determines that a defect exists if the movement distance and movement angle of the defect candidate between at least two or more images taken at different times are within a predetermined range. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Publication No. 2020-118572 Summary of the Invention [Problem to be solved by the invention]
[0005] However, the surface defect inspection device described in Patent Document 1 has the problem that, while it can make a judgment when the movement trajectory of a defect candidate is linear, it has difficulty making a judgment when the movement trajectory of the defect candidate is curved. For example, if the camera angle is changed in accordance with the movement of the surface to be inspected so as to maintain high brightness that makes it easy to extract defect candidates, the movement trajectory of the defect candidate will become curved. Therefore, it has been desired to be able to make a defect judgment with high accuracy even when the movement trajectory of the defect candidate is curved.
[0006] The present invention has been made in response to these problems, and aims to provide a surface defect inspection device and a surface defect inspection method that can determine defects with high accuracy even if the movement trajectory of a defect candidate is curved, and even if the camera angle is changed in accordance with the movement of the surface to be inspected. [Means for solving the problem]
[0007] The surface defect inspection device of the present invention comprises a light source that irradiates light onto the surface to be inspected, an imaging means that photographs the surface to be inspected illuminated by the light source to obtain an image, a moving means that moves the position of the surface to be inspected relatively to the imaging means, a defect candidate extraction means that extracts defect candidates from a plurality of images photographed by the imaging means at any given time while the moving means moves the imaging means and the surface to be inspected relatively, and a defect detection means that detects defects based on the defect candidates extracted by the defect candidate extraction means, and the defect detection means divides the surface to be inspected into a plurality of sections, and judges that a defect exists if a defect candidate extracted by the defect candidate extraction means is present in each section image area corresponding to the same section of the surface to be inspected for a number of images photographed by the imaging means at different photographing times that is equal to or greater than a reference judgment number.
[0008] The surface defect inspection method of the present invention includes an imaging procedure for obtaining an image by imaging the surface to be inspected illuminated with light from a light source, a defect candidate extraction procedure for extracting defect candidates from the image captured by the imaging procedure, and a defect detection procedure for detecting defects based on the defect candidates extracted by the defect candidate extraction procedure.In the defect detection procedure, the surface to be inspected is divided into a plurality of sections, and for images captured by the imaging means at different imaging times or more than a reference determination number, if a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected, it is determined that a defect exists. [Effects of the Invention]
[0009] According to the present invention, the surface to be inspected is divided into a plurality of sections, and for images captured by the photographing means at different photographing times equal to or greater than a reference determination number, if a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected, it is determined that there is a defect. Therefore, it is possible to determine whether a defect candidate is a defect or not from the relationship between the movement trajectory of the defect candidate and the movement trajectory of the section of the surface to be inspected. Therefore, even if the movement trajectory of the defect candidate is curved, for example, even if the angle of the camera is changed in accordance with the movement of the position of the surface to be inspected relative to the camera in order to increase the brightness of the defect candidate, it is possible to determine the defect with high accuracy.
[0010] Furthermore, when a defect candidate exists within a predetermined range from the boundary line of a partition image area corresponding to a partition on the inspected surface, the defective partition image area and the adjacent partition image area are deemed to be one partition image area corresponding to one partition on the inspected surface, thereby further improving the accuracy of defect determination. [Brief explanation of the drawings]
[0011] [Figure 1] 1 is a diagram illustrating the overall configuration of a surface defect inspection device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a block diagram illustrating a configuration of a defect detection unit shown in FIG. [Figure 3]FIG. 10 is a diagram illustrating an example of an image obtained by a preprocessing unit. [Figure 4] FIG. 10 is a diagram illustrating an example of an image obtained by an image dividing unit. [Figure 5] 10A and 10B are diagrams illustrating examples of binarized images binarized by changing the binarization threshold value. [Figure 6] FIG. 10 is a diagram illustrating an example of a defect candidate extracted by a secondary extraction unit. [Figure 7] FIG. 10 is a conceptual diagram in which the area around the reflected mirror image of the light source is divided according to the distance from the reflected mirror image of the light source. [Figure 8] FIG. 1 is a diagram showing a state in which a surface to be inspected is divided into a plurality of sections. [Figure 9] 10 is a diagram illustrating how, in the counting means, when a defect candidate exists within a predetermined range from the boundary line, the determination is made by expanding the range to include adjacent section image areas. FIG. [Figure 10] 10 is a diagram for explaining how a determination unit determines a defect based on the number of times a defect candidate is detected for each block number. FIG. [Figure 11] 1 is a diagram illustrating a procedure of a surface defect inspection method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0012] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0013] 1 shows the overall configuration of a surface defect inspection device 1 according to an embodiment of the present invention. This surface defect inspection device 1 detects defects present on the surface of an inspection target surface M, which may be, for example, the painted surface of an automobile body.
[0014] The surface defect inspection device 1 includes, for example, a light source 10 that irradiates light onto the surface M to be inspected, an imaging means 20 that photographs the surface M to be inspected illuminated by the light source 10 to obtain an image, a moving means 30 that moves the position of the surface M to be inspected relative to the imaging means 20, a defect candidate extraction means 40 that extracts defect candidates from multiple images taken by the imaging means 20 at any given time while moving the imaging means 20 and the surface M to be inspected relative to each other using the moving means 30, a defect detection means 50 that detects defects based on the defect candidates extracted by the defect candidate extraction means, and a display means 60 that displays the detection results by the defect detection means 50.
[0015] It is preferable to use a straight-tube lighting fixture, such as a straight-tube fluorescent lamp, LED lighting, or laser light, as the light source 10, but the light source is not limited to these types of lighting, and since there are a wide variety of car body colors, it is preferable to use a white light source. It is preferable to arrange multiple light sources 10 with respect to the surface M to be inspected, for example, so that the surface M to be inspected can be observed from multiple directions.
[0016] The photographing means 20 has a camera 21 such as a CCD camera, and is capable of obtaining digital images. The camera 21 is, for example, disposed so as to face the light source 10, and configured to photograph the reflected mirror image of the light source 10 and its surrounding area. The angle of the camera 21 is preferably configured to be changeable in accordance with the movement of the position of the surface M to be inspected relative to the camera 21. This is because if the angle of the camera 21 is fixed, the brightness of defect candidates may be low depending on the location of the surface M to be inspected, making it difficult to extract the defect candidates.
[0017] The moving means 30 moves at least one of the imaging means 20 and the surface M to be inspected, thereby moving the position of the surface M to be inspected relative to the imaging means 20. For example, the surface M to be inspected may be transported in one direction at a constant speed by a transport means such as a conveyor, or the camera 21 of the imaging means 20 may be moved in one direction at a constant speed. Note that FIG. 1 shows a case where the surface M to be inspected is moved by a conveyor or the like. The defect candidate extraction means 40 and the defect detection means 50 are, for example, configured by a computer, and are configured to extract defect candidates or detect defects by image processing. The display means 60 is, for example, configured by a display, and is configured to display, for example, a circle mark or the like at the center of gravity of the defect.
[0018] (Defect candidate extraction means 40) Fig. 2 shows the configuration of the defect candidate extraction means 40 and the defect detection means 50 shown in Fig. 1. The defect candidate extraction means 40 preferably includes an image storage means 41, such as a memory, for storing a plurality of images captured by the imaging means 20 at different capture times while moving the imaging means 20 and the surface M to be inspected relatively, a preprocessing means 42 for preprocessing the images captured by the imaging means 20, an image division means 43 for dividing an area including a reflected mirror image of the light source 10 into a plurality of segments in the longitudinal direction of an extraction target image based on the image obtained by the imaging means 20 to generate a plurality of segmented images, a primary extraction means 44 for binarizing the extraction target image based on the image obtained by the imaging means 20 and extracting primary defect candidates for extracting defect candidates, a primary defect candidate storage means 45 for storing the primary defect candidates, a secondary extraction means 46 for extracting defect candidates from the primary defect candidates, and a defect candidate storage means 47 for storing the defect candidates.
[0019] The pre-processing means 42 converts the image obtained by the imaging means 20 into a density image such as a grayscale image to extract the area of the surface M to be inspected and also reduces noise. Examples of noise reduction methods include a Gaussian filter and a median filter. Figure 3 shows an example of an image obtained by the pre-processing means 42. In Figure 3, the white part is the reflected mirror image of the light source 10.
[0020] The image division means 43 is preferably configured to, for example, cut out an area including one reflected mirror image of the light source 10 and its surrounding area from the image obtained by the preprocessing means 42, which is the image to be extracted, and divide the reflected mirror image into multiple parts in the longitudinal direction. Because the luminance differs between the center and end portions of the reflected mirror image in the longitudinal direction, dividing the image allows the primary extraction means 44 to perform binarization processing with high accuracy. FIG. 4 shows an example of an image divided by the image division means 43. In FIG. 4, the white areas represent the reflected mirror image of the light source 10. Note that in FIG. 4, gaps are left between each image to clearly show the division. Although FIG. 4 shows a case where the reflected mirror image is divided into six parts in the longitudinal direction by the image division means 43, the number of divisions can be set arbitrarily. The number of divisions is preferably in the range of, for example, 2 to 12.
[0021] The primary extraction means 44 is configured to, for example, sequentially perform binarization processing on each image processed by the preprocessing means 42 as an extraction target image while sequentially changing the binarization threshold value in one direction from the binarization reference value, compare the multiple binarized images obtained in the order of processing, and determine as a threshold image the binarized image when the number of appearances of defect candidate points changes from less than a predetermined reference number to equal to or greater than the predetermined reference number, or the binarized image when the number of appearances of defect candidate points changes from more than the predetermined reference number to equal to or less than the predetermined reference number, and extract primary defect candidates from this threshold image. In other words, the primary extraction means 44 automatically determines the binarization threshold based on the change in the number of appearances of defect candidate points that occurs as the binarization threshold changes, and performs binarization.
[0022] In the binarized image, defect candidate points appear, for example, in the peripheral region of the reflected mirror image of the light source 10. For example, as shown in FIG. 4, if the reflected mirror image of the light source 10 appears white, defect candidate points appear as white points in the peripheral region of the reflected mirror image of the light source 10. The binarization reference value may be, for example, between 0 and 255, and may be the maximum value of 255, the minimum value of 0, or any value between the maximum and minimum values. When the preferred range of the binarization threshold is known in advance for the surface M to be inspected, the binarization threshold can be quickly determined by setting a value close to that range as the binarization reference value. When the preferred range of the binarization threshold is unknown, the binarization threshold can be determined by setting the maximum or minimum value as the binarization reference value.
[0023] The direction in which the binarization threshold is changed is a decreasing direction when the binarization reference value is the maximum value of 255, an increasing direction when the binarization reference value is the minimum value of 0, and either a decreasing direction or an increasing direction when the binarization reference value is a value between the maximum and minimum values.
[0024] For example, in the case where the reflected mirror image of light source 10 and the defect candidate points appear in white as shown in Fig. 4, the number of defect candidate points that appear in the binarized image increases by changing the binarization threshold from a large value to a small value, and at a certain binarization threshold value, the number of defect candidate points that appear in the binarized image changes from less than a predetermined reference number to equal to or greater than the predetermined reference number. For reference, Fig. 5(A) shows an example of a binarized image binarized with a binarization threshold of 255, the maximum value, and Fig. 5(B) shows an example of a binarized image binarized with a binarization threshold smaller than 255, in which the number of defect candidate points that appear is greater than the predetermined reference number. 4, for example, when the reflected mirror image of light source 10 and the defect candidate points appear in white, conversely, by changing the binarization threshold from a small value to a large value, the number of defect candidate points that appear in the binarized image decreases, and at a certain binarization threshold, the number of defect candidate points that appear in the binarized image changes from being greater than a predetermined reference number to being equal to or less than the predetermined reference number. Also, for example, in the case of the inverted image of FIG. 4, where the reflected mirror image of light source 10 and the defect candidate points appear in black, the direction of change is opposite to that when they appear in white as described above.
[0025] The binarization threshold is preferably changed in increments of 1, but may be changed in increments of any other value such as 2 or 3. The reference occurrence number for comparing the occurrence number of defect candidate points can be set arbitrarily depending on the surface M to be inspected. As an example, the reference occurrence number is preferably set in the range of 3 to 10.
[0026] It is also preferable that the primary extraction means 44 extracts primary defect candidates by performing binarization processing on each of the plurality of divided images divided by the image division means 43. This is because the binarization processing can be performed in accordance with the difference in brightness between the center and end portions in the longitudinal direction of the reflected mirror image of the light source 10, and defect candidates can be extracted with higher accuracy.
[0027] The primary defect candidate storage means 45 is configured, for example, by a memory or the like, and is configured to store the barycentric coordinates of the primary defect candidates extracted by the primary extraction means 44.
[0028] The secondary extraction means 46 is configured to extract, as defect candidates, those primary defect candidates extracted by the primary extraction means 44 for which the difference in brightness between the brightness value of the primary defect candidate and the average brightness value of the surrounding areas of the primary defect candidate is equal to or greater than a predetermined brightness difference reference value, for example, an image processed by the preprocessing means 42, which is an extraction target image obtained by the photographing means 20. Specifically, for example, for an image processed by the division means 43, which is an extraction target image, the secondary extraction means 46 is configured to calculate the difference in brightness between the brightness value of the coordinates of the primary defect candidate stored in the primary defect candidate storage means 45 and the average brightness value of the coordinates of the surrounding areas of the primary defect candidate, and extract the defect candidate if the difference in brightness is equal to or greater than a predetermined brightness difference reference value.
[0029] That is, by extracting defect candidates in two stages, by the primary extraction means 44 and the secondary extraction means 46, it is possible to extract them with higher accuracy. Furthermore, the secondary extraction means 46 judges based on the luminance difference between the luminance value of the primary defect candidate and the average luminance value of its surroundings. Therefore, unlike when using luminance values, the same luminance difference reference value can be used even if the paint colors are different, and defect candidates can be extracted easily. Figure 6 shows an example of a defect candidate extracted by the secondary extraction means 46. In Figure 6, the white dots within the circles are defect candidates.
[0030] The secondary extraction means 46 is preferably configured to divide the area around the reflected mirror image of light source 10 into a plurality of areas according to the distance from the reflected mirror image of light source 10 for the image processed by division means 43, which is the extraction target image, and to set a luminance difference reference value for each of the divided distance areas. Since the luminance difference between the luminance value of a primary defect candidate and the average luminance value around the primary defect candidate changes depending on the distance from the reflected mirror image of light source 10, setting a luminance difference reference value for each distance area enables defect candidates to be extracted with higher accuracy.
[0031] Fig. 7 is a conceptual diagram showing the area around the reflected mirror image of light source 10 divided according to the distance from the reflected mirror image of light source 10. Fig. 7 shows the area around the reflected mirror image of light source 10 divided into multiple areas R2, R3, R4, R5, and R6 at predetermined pixel intervals from area R1 of the reflected mirror image. Note that in Fig. 7, each of areas R1, R2, R3, R4, R5, and R6 is shown with hatching to make it easier to understand.
[0032] The difference in distance between the reflected mirror image of each of adjacent regions R2, R3, R4, R5, and R6 and region R1, for example, the width of each of regions R2, R3, R4, and R5, can be set arbitrarily depending on the surface M to be inspected. The difference in distance between the reflected mirror image of each of adjacent regions R2, R3, R4, R5, and R6 and region R1 is preferably set in the range of 1 to 10 pixels, for example. Also, while FIG. 7 shows a case where the region around the reflected mirror image of light source 10 is divided into five regions, the number of divisions can also be set arbitrarily depending on the surface M to be inspected. The number of divisions is preferably set in the range of 6 to 10, for example.
[0033] The defect candidate storage means 47 is configured, for example, by a memory or the like, and is configured to store the barycentric coordinates of the defect candidates extracted by the secondary extraction means .
[0034] (Defect detection means 50) The defect detection means 50 is configured, for example, to divide the surface M to be inspected into a plurality of sections, and to judge a defect to exist when a defect candidate extracted by the defect candidate extraction means 40 exists in each section image area corresponding to the same section of the surface M to be inspected for a number of images equal to or greater than the reference judgment number and captured at different times by the imaging means 20. The reference judgment number for judging a defect, i.e., the number of images in which a defect candidate exists in a section image area corresponding to the same section of the surface M to be inspected, can be set arbitrarily to 2 or more, and, for example, 3 or more is more preferable.
[0035] Specifically, the defect detection means 50 preferably includes a section discrimination means 51 that divides the surface M to be inspected into a plurality of sections, identifies section image areas corresponding to the sections of the surface M to be inspected in the image captured by the photographing means 20, and discriminates the section of the surface M to be inspected in which the defect candidate exists from the section image area in which the defect candidate exists; a count counting means 52 that, based on the discrimination results by the section discrimination means 51, counts the number of times the defect candidate has been detected for each section of the surface M to be inspected for each image captured by the photographing means 20 at different photographing times; and a judgment means 53 that, if there is a section in which the number of times the defect candidate has been detected counted by the count counting means 52 is equal to or greater than a standard judgment number, judges that a defect exists in that section.
[0036] For example, as shown in FIG. 8, the section discrimination means 51 can be configured to divide the inspection surface M into multiple sections using a black-and-white grid or the like, perform binarization processing on a moving video of the inspection surface M, extract the movement trajectory of only the section lines, and synchronize the video captured by the imaging means 20 with the moving video of only the section lines to identify section image areas corresponding to the sections of the inspection surface M in the image captured by the imaging means 20. Furthermore, the size of the largest defect location known in advance is used as a reference value. If the size of the section is larger than the size of the defect candidate location, the section area is divided equally and smaller sections are used as the section image area, thereby improving the detection accuracy of defect candidates. Furthermore, to prevent detection errors due to shaking of the imaging means 20, it is preferable that the size of the section be approximately twice the size of the largest defect location. On the other hand, if the size of the section is larger than the size of the defect candidate location, multiple noises are likely to occur simultaneously within the same section, resulting in a decrease in detection accuracy. For these reasons, the size of the compartment can be set arbitrarily, but when inspecting the painted surface of a standard automobile, it is preferable that the length of one side be approximately 10 mm to 100 mm. Also, it is preferable that the compartment discrimination means 51 assigns a compartment number to each compartment separated by compartment lines, and identifies compartments in which defect candidates exist by the compartment number.
[0037] The number counting means 52 is preferably configured to, for example, count the section numbers in which defect candidates identified by the section discrimination means 51 exist for each image captured at different times, and determine the number of times the defect candidate has been detected for each section number. Furthermore, for example, when a defect candidate extracted by the defect candidate extraction means 40 exists within a predetermined range from the boundary line of a section image area corresponding to a section on the inspected surface M in an image captured by the imaging means 20, the number counting means 52 preferably determines that the defect section image area in which the defect candidate exists and an adjacent section image area located near the defect candidate are one section image area corresponding to one section on the inspected surface M. This is because, when a defect candidate exists near a section image area, i.e., near a section line, it is difficult to identify the section image area in which the defect candidate exists, i.e., the section, and the defect detection rate can be improved by expanding the determination to include adjacent section image areas.
[0038] For example, when a defect candidate exists within a predetermined range on one boundary line, as shown in Figure 9(A), it is preferable to determine the defect candidate by regarding the defective section image area 52a where the defect candidate exists and the adjacent section image area 52b where the defect candidate is adjacent across the boundary line within the predetermined range as one section image area corresponding to one section of the inspected surface M. Also, when a defect candidate exists within two boundary lines, as shown in Figure 9(B), it is preferable to determine the defect candidate by regarding the defective section image area 52a where the defect candidate exists, the two adjacent section image areas 52b where the defect candidate is adjacent across the boundary line within the predetermined range as one section image area corresponding to one section of the inspected surface. Note that in Figure 9, the defect candidates are indicated by black circles, the defective section image area 52a is indicated by hatching with a diagonal line extending downward to the right, and the adjacent section image area 52b is indicated by hatching with a diagonal line extending downward to the left.
[0039] It is preferable to determine whether a defect candidate exists within a predetermined range from the boundary line based on, for example, Equation 1. In Equation 1, d is the distance between the defect candidate and the boundary line, and A is the length of the boundary line in one section. d<(1 / 8)A (Equation 1) That is, if the distance d between the defect candidate and the boundary line is shorter than 1 / 8 of the length A of the boundary line, it is preferable to determine that the defect candidate is within the predetermined range.
[0040] 10, for example, when the number of times a defect candidate is detected for each section number tallied by the number-of-times tallying means 52 is equal to or greater than the reference determination number, it is preferable that the judging means 53 judges that a defect exists in the section corresponding to that section number. For example, as shown in Fig. 10, if (A) is an image captured by the imaging means 20 at an arbitrary imaging time, (B) is an image captured by the imaging means 20 a predetermined time after (A), the movement direction of the inspected surface M is X, and the defect candidates are indicated by black circles, in (A) a defect candidate exists in the section image areas corresponding to sections 32 and 33, and in (B) a defect candidate exists in the section image areas corresponding to sections 32 and 34, so when the reference determination number for the number of times a defect candidate is detected is set to 2 or more, it can be judged that the defect candidate existing in section 32 is a defect and the defect candidate existing in section 33 is a false defect.
[0041] This surface defect inspection device 1 is used, for example, as follows. FIG. 11 shows the procedure of a surface defect inspection method using the surface defect inspection device 1. In this surface defect inspection method, first, for example, the inspection surface M illuminated with light from the light source 10 is photographed by the imaging means 20, and the position of the inspection surface M relative to the imaging means 20 is moved by the moving means 30 to obtain multiple images photographed at different times (step S110; imaging procedure). At this time, it is preferable to change the angle of the camera 21 depending on the location of the inspection surface M, in accordance with the movement of the position of the inspection surface M relative to the camera 21, so that the brightness of defect candidates is increased. The images photographed by the imaging means 20 are stored in the image storage means 41.
[0042] Next, for example, defect candidates are extracted from each of a plurality of images captured at different times by the photographing procedure (step S110) (step S120; defect candidate extraction procedure). In the defect candidate extraction procedure (step S120), for example, first, the preprocessing means 42 preprocesses the image obtained by the photographing means 20 as described above (step S121; preprocessing procedure). Next, for example, the image dividing means 43 cuts out an area including one reflector image of the light source 10 and its surrounding area from the image preprocessed as described above, and divides the image into multiple parts in the longitudinal direction of the reflector image (step S122; image division procedure).
[0043] Next, for example, the primary extraction means 44 performs the binarization process as described above on each of the multiple divided images divided by the image division procedure (step S122) to extract primary defect candidates (step S123; primary extraction procedure). Specifically, for example, for a preprocessed image that is an extraction target image based on the image obtained by the photographing procedure (step S110), the binarization process is performed sequentially on each of the divided images divided by the image division procedure while sequentially changing the binarization threshold from a binarization reference value in one direction, and the multiple binarized images obtained in the order of processing are compared to determine as a threshold image the binarized image when the number of appearances of defect candidate points changes from less than a predetermined reference number to equal to or greater than the predetermined reference number, or the binarized image when the number of appearances of defect candidate points changes from more than the predetermined reference number to equal to or less than the predetermined reference number, and primary defect candidates are extracted from this threshold image. That is, for example, for one extraction target image, the binarization threshold is changed in one direction from the binarization reference value in order to repeat the binarization process, and the obtained binarized images are compared to find a threshold image from the change in the appearance number of defect candidate points, and primary defect candidates are extracted. The primary defect candidates extracted by the primary extraction procedure (step S123) are stored in the primary defect candidate storage means 45.
[0044] Thereafter, for example, the secondary extraction means 46 extracts defect candidates from the primary defect candidates extracted in the primary extraction procedure (step S123) as described above for the divided images that are extraction target images based on the image obtained in the photographing procedure (step S110) (step S124; secondary extraction procedure). Specifically, for example, for the divided images that are extraction target images, the brightness difference between the brightness value of the primary defect candidate and the average brightness value around the primary defect candidate is calculated, and if the brightness difference is equal to or greater than a predetermined brightness difference reference value, the defect candidate is extracted as a defect candidate. The defect candidates extracted in the secondary extraction procedure (step S124) are stored in the defect candidate storage means 47.
[0045] After defect candidates are extracted by the defect candidate extraction procedure (step S120), defects are detected based on the defect candidates extracted by the defect candidate extraction procedure (step S120) (step S130; defect detection procedure). In the defect detection procedure (step S130), for example, it is preferable to divide the inspected surface M into a plurality of sections, and for a plurality of images captured by the photographing means (step S110) at different photographing times equal to or greater than a reference determination number, determine that there is a defect if the defect candidates extracted by the defect candidate extraction procedure (step S120) exist in each section image area corresponding to the same section of the inspected surface M.
[0046] Specifically, for example, the section discrimination means 51 first divides the surface M to be inspected into a plurality of sections as described above, identifies section image areas corresponding to the sections of the surface M to be inspected for the images captured by the photographing procedure (step S110), and discriminates the sections of the surface M to be inspected in which defect candidates exist from the section image areas in which defect candidates exist (step S131; section discrimination procedure). Next, for example, the number counting means 52 counts the number of times defect candidates have been detected for each section of the surface M to be inspected for each image captured at different times by the photographing procedure (step S110) based on the discrimination results by the section discrimination procedure means 51 as described above (step S132; number counting procedure). Next, for example, the determination means 53 determines that a defect exists in a section if the number of times defect candidates detected as counted by the number counting procedure as described above is equal to or greater than the reference determination number (step S133; determination procedure).
[0047] Thereafter, for example, the display means 60 displays the detection results obtained in the defect detection procedure (step S130) (step S140; display procedure). The display means 60, for example, displays the defect by adding a circle mark or the like to the center of gravity of the defect on a display or the like. This allows inspection of surface defects to be performed.
[0048] As described above, according to this embodiment, the inspected surface M is divided into a plurality of sections, and for images captured by the imaging means 20 at different imaging times equal to or greater than the reference determination number, if a defect candidate extracted by the defect candidate extraction means 40 exists in each section image area corresponding to the same section of the inspected surface M, it is determined that the defect candidate is a defect. Therefore, it is possible to determine whether or not a defect candidate is a defect based on the relationship between the movement trajectory of the defect candidate and the movement trajectory of the section of the inspected surface M. Therefore, even if the movement trajectory of the defect candidate is curved, for example, even if the angle of the camera 21 is changed in accordance with the movement of the position of the inspected surface M relative to the camera 21 in order to increase the brightness of the defect candidate, it is possible to determine the defect with high accuracy.
[0049] Furthermore, when a defect candidate exists within a predetermined range from the boundary line of a division image area corresponding to a division on the inspected surface M, the defective division image area 52a and the adjacent division image area 52b are deemed to be one division image area corresponding to one division on the inspected surface M, thereby further improving the accuracy of defect determination.
[0050] Although the present invention has been described above with reference to the 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 specifically described in the above embodiments, not all components may be included, and other components may be included.
[0051] Although the above embodiment specifically describes the defect candidate extraction means 40 and the defect candidate extraction procedure (step S120), other configurations and procedures may be used to extract defect candidates. For example, the defect candidate extraction means 40 and the defect candidate extraction procedure (step S120) may extract defect candidates using conventionally known methods such as global binarization and local binarization. Furthermore, defect candidates may be extracted based on gradient images generated by, for example, performing difference calculations in two orthogonal directions on images acquired by the imaging means 20. In this case, difference calculations may be performed in both the positive and negative directions in the two orthogonal directions, and gradient images may be generated from the calculation results. Alternatively, difference calculations may be performed in the two orthogonal directions, and gradient images may be generated from the absolute values of gradient vectors calculated using only positive values from the calculation results and the absolute values of gradient vectors calculated using only negative values from the calculation results.
[0052] Furthermore, although the above embodiment has been specifically described with reference to the case where the painted surface of an automobile body is inspected, the present invention is not limited to automobile bodies and can be applied to the surface inspection of other painted products as well. Furthermore, the present invention is not limited to painted surfaces and can be applied to the inspection of reflective surfaces as well. [Explanation of symbols]
[0053] 1...surface defect inspection device, 10...light source, 20...photographing means, 21...camera, 30...moving means, 40...defect candidate extraction means, 41...image storage means, 42...preprocessing means, 43...image division means, 44...primary extraction means, 45...primary defect candidate storage means, 46...secondary extraction means, 47...defect candidate storage means, 50...defect detection means, 51...zone discrimination means, 52...counting means, 52a...defect zone image area, 52b...adjacent zone image area, 53...determination means, 60...display means, M...inspected surface
Claims
1. a light source that irradiates light onto the surface to be inspected; an imaging means for capturing an image of the surface to be inspected illuminated by the light source; a moving means for moving the position of the inspection surface relative to the imaging means; a defect candidate extracting means for extracting defect candidates from a plurality of images taken by the photographing means at arbitrary time intervals while the photographing means and the inspection surface are moved relatively by the moving means; a defect detection means for detecting defects based on the defect candidates extracted by the defect candidate extraction means, The defect detection means divides the surface to be inspected into a plurality of sections, and when a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected for a reference determination number or more of images photographed by the photographing means at different photographing times, the defect detection means determines that a defect exists in the same section, and The defect detection means a section discrimination means for dividing the surface to be inspected into a plurality of sections in advance, extracting a moving trajectory of only the section lines from a moving image of the divided surface to be inspected, and synchronizing an image photographed by the photographing means with the moving image of only the section lines to identify a section image area corresponding to the section of the surface to be inspected, and discriminating a section of the surface to be inspected in which a defect candidate exists from the section image area in which a defect candidate exists; a counting means for counting the number of times defect candidates are detected for each section of the inspection surface for each image taken by the photographing means at different photographing times based on the discrimination result by the section discriminating means; a determination means for determining that a defect exists in a section when the number of times the defect candidate has been detected, as counted by the counting means, is equal to or exceeds a reference determination number. A surface defect inspection device characterized by:
2. When a defect candidate extracted by the defect candidate extraction means exists within a predetermined range from a boundary line of a partition image area corresponding to a partition of the inspected surface in the image photographed by the photographing means, and there is only one boundary line within the predetermined range, the defect detection means determines that the defective partition image area in which the defect candidate exists and one adjacent partition image area adjacent to the defect candidate located within the predetermined range via the boundary line are one partition image area corresponding to the partition of the inspected surface; and when there are two boundary lines within the predetermined range, the defect detection means determines that the defective partition image area in which the defect candidate exists, two adjacent partition image areas adjacent to the defect candidate located within the predetermined range via the boundary lines, and one adjacent partition image area adjacent to the defect candidate at a corner of the two boundary lines located within the predetermined range are one partition image area corresponding to the partition of the inspected surface. The partition image area is a polygon with straight or curved sides, and each side is a boundary line.
2. The surface defect inspection device according to claim 1.
3. an imaging procedure in which an image of the surface to be inspected irradiated with light from a light source is captured by an imaging means, and a position of the surface to be inspected relative to the imaging means is moved by a moving means to obtain a plurality of images captured at different times; a defect candidate extraction step of extracting defect candidates from the images captured by the photographing step; a defect detection step for detecting defects based on the defect candidates extracted by the defect candidate extraction step, In the defect detection procedure, the surface to be inspected is divided into a plurality of sections, and for images photographed in the photographing procedure at different photographing times equal to or greater than a reference determination number, if a defect candidate extracted in the defect candidate extraction procedure exists in each section image area corresponding to the same section of the surface to be inspected, it is determined that a defect exists in the same section; The defect detection procedure includes: a section discrimination procedure for dividing the surface to be inspected into a plurality of sections in advance, extracting a movement trajectory of only the section lines from a captured video of the sectioned surface to be inspected being moved, and synchronizing the video of only the section lines with the image captured by the photographing procedure to identify section image areas corresponding to the sections of the surface to be inspected, and discriminating the sections of the surface to be inspected in which defect candidates exist from the section image areas in which defect candidates exist; a counting step of counting the number of times defect candidates are detected for each section of the inspection surface for each image taken at a different photographing time in the photographing step, based on a discrimination result in the section discrimination step; and a determination step of determining that a defect exists in a section when the number of times the defect candidate is detected, which is counted by the counting step, is equal to or exceeds a reference determination number. A surface defect inspection method characterized by:
Citation Information
Patent Citations
Optical detection device and method
CN109991233A
Defect inspection method and device
JP2008107311A
Surface defect inspection device and surface defect inspection method
JP2020118572A
Apparatus and method for detecting surface defect of workpiece, surface inspection system for workpiece, and program
JP2021056182A
Apparatus and method for inspecting glass substrate
US20200150052A1