Surface defect inspection device and surface defect inspection method

The apparatus automatically adjusts binarization thresholds and divides images by distance from the light source to maintain consistent defect detection accuracy across different inspection sites and colorings, eliminating the need for manual parameter adjustments.

JP7716065B2Active Publication Date: 2025-07-31TOYOTA MOTOR EAST JAPAN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2021159570
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2025-07-31
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

Existing surface defect inspection apparatuses require manual adjustment of parameters based on the inspection site and coloring, leading to variations in defect detection accuracy.

Method used

A surface defect inspection apparatus that automatically adjusts binarization threshold values by monitoring changes in the number of defect candidate points during binarization processing, using a straight tube type lighting fixture and dividing the image into regions based on distance from the light source to account for luminance differences.

Benefits of technology

Enables accurate and automatic defect candidate extraction without manual parameter adjustments, ensuring consistent detection accuracy across varying inspection sites and colorings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007716065000001
    Figure 0007716065000001
  • Figure 0007716065000002
    Figure 0007716065000002
  • Figure 0007716065000003
    Figure 0007716065000003
Patent Text Reader

Abstract

To provide a surface defect inspection device and a surface defect inspection method with which it is possible to automatically set parameters.SOLUTION: Defect candidate extraction means 40 includes primary extraction means 44 for performing binarization processing on the image to be extracted, that is based on an image obtained by imaging means 20 and extracting a primary defect candidate, and secondary extraction means 46 for extracting a defect candidate from the primary defect candidate. The primary extraction means 44 sequentially performs binarization processing on the image to be extracted while sequentially changing a binarization threshold in one direction from a binarization reference value, compares binarized images obtained in order of processing, and finds a binarized image, as a threshold image, when the number of occurrences of defect candidate points has increased to a prescribed reference number or more from the state of being fewer than the prescribed reference number, or when the number of occurrences of defect candidate points has decreased to a prescribed reference number or below from the state of being more than the prescribed reference number.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

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, inspection work on the painted surface has been carried out visually by inspectors. However, visual inspection by inspectors is a labor-intensive task, and there are variations among individuals, so there is a risk of inspection errors and omissions. In addition, in visual inspection by inspectors, the time required for inspection also 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 promoted.

[0003] For example, Patent Document 1 describes a surface defect inspection apparatus that acquires a photographed image of a painted surface of an automobile irradiated with light, performs binarization on the obtained photographed image to extract defect candidates, and determines that a defect exists when the luminance change in two orthogonal directions for the defect candidates is equal to or greater than a set value.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, in the surface defect inspection apparatus described in Patent Document 1, since the overall average luminance of the captured image changes depending on the inspection site and the coloring, there is variation in the defect detection accuracy. Therefore, there has been a problem that the parameters of the image processing have to be adjusted according to the inspection site and the coloring, and the settings have to be changed manually.

[0006] The present invention has been made based on such problems, and an object thereof is to provide a surface defect inspection apparatus and a surface defect inspection method capable of automatically setting parameters.

Means for Solving the Problems

[0007] The surface defect inspection apparatus of the present invention includes a light source that irradiates light onto a surface to be inspected, imaging means that captures the surface to be inspected irradiated by the light source to obtain an image, defect candidate extraction means that extracts defect candidates from the image captured by the imaging means, and defect detection means that detects defects based on the defect candidates extracted by the defect candidate extraction means. The defect candidate extraction means performs binarization processing in order while changing the binarization threshold value in one direction from the binarization reference value for the extraction target image based on the image obtained by the imaging means, compares a plurality of binarized images obtained in the order of the processing, and when the number of defect candidate points changes from less than a predetermined reference number to a predetermined reference number or more, or when the number of defect candidate points changes from more than a predetermined reference number to a predetermined reference number or less, the binarized image at that time is used as a threshold image, and it has primary extraction means for extracting primary defect candidates for extracting defect candidates from this threshold image.

[0008] The surface defect inspection method of the present invention includes a photographing procedure for obtaining an image by photographing a surface to be inspected irradiated with light from a light source, a defect candidate extraction procedure for extracting defect candidates from the image photographed by the photographing procedure, and a defect detection procedure for detecting defects based on the defect candidates extracted by the defect candidate extraction procedure. The defect candidate extraction procedure performs binarization processing in order while changing the binarization threshold value in one direction from the binarization reference value for the extraction target image based on the image obtained by the photographing procedure, compares a plurality of binarized images obtained in the order of the processing, and uses the binarized image when the number of appearances of defect candidate points changes from less than a predetermined reference number to equal to or more than the predetermined reference number, or the binarized image when the number of appearances of defect candidate points changes from more than a predetermined reference number to equal to or less than the predetermined reference number as a threshold image, and includes a primary extraction procedure for extracting primary defect candidates for extracting defect candidates from this threshold image.

Effect of the Invention

[0009] According to the present invention, binarization processing is performed in order while changing the binarization threshold value in one direction from the binarization reference value, and the binarized image when the number of appearances of defect candidate points changes from less than a predetermined reference number to equal to or more than the predetermined reference number is used as a threshold image, or the binarized image when the number of appearances of defect candidate points changes from more than a predetermined reference number to equal to or less than the predetermined reference number is used as a threshold image to extract primary defect candidates. Therefore, image processing can be automatically performed, and an image with little difference in overall average luminance can be obtained even if the inspection part and the coloring are different. Thus, it is not necessary to manually change the setting of parameters according to the inspection part and the coloring, and it can be automatically set, and defect candidates can be easily extracted.

[0010] In particular, for the extraction target image based on the image obtained by the photographing means, among the primary defect candidates extracted by the primary extraction means, those with a luminance difference between the luminance value of the primary defect candidate and the average luminance value around the primary defect candidate being equal to or more than a predetermined luminance difference reference value are extracted as defect candidates. Therefore, the same luminance difference reference value can be used even if the coloring is different, and defect candidates can be easily extracted.

[0011] In addition, for the extraction target image based on the image obtained by the photographing means, the area around the mirror image of the light source is divided into a plurality of parts according to the distance from the mirror image of the light source, and the luminance difference reference value is set for each of the divided plurality of distance areas. Therefore, the luminance difference reference value can be set according to the luminance difference that changes depending on the distance from the mirror image of the light source, and defect candidates can be extracted with higher accuracy.

[0012] Furthermore, a straight tube type lighting fixture is used as the light source, and for the extraction target image based on the image obtained by the photographing means, the area including the mirror image of the light source is divided into a plurality of parts in the length direction, and binarization processing is performed for each of the divided plurality of divided images to extract primary defect candidates. Therefore, in accordance with the difference in luminance between the central part and the end part in the length direction of the mirror image of the light source, binarization processing can be performed, and defect candidates can be extracted with higher accuracy.

Brief Description of the Drawings

[0013]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Embodiments for Carrying Out the Invention

[0014] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[0015] FIG. 1 shows the overall configuration of a surface defect inspection apparatus 1 according to an embodiment of the present invention. This surface defect inspection apparatus 1 is configured to, for example, use the painted surface of an automobile body as the inspection surface M and detect defects existing on the surface of the inspection surface M.

[0016] The surface defect inspection apparatus 1 includes, for example, a light source 10 that irradiates light onto the inspection surface M, an imaging means 20 that captures the inspection surface M irradiated by the light source 10 to obtain an image, a moving means 30 that relatively moves the position of the inspection surface M with respect to the imaging means 20, a defect candidate extraction means 40 that extracts defect candidates from a plurality of images captured by the imaging means 20 at arbitrary time intervals while relatively moving the imaging means 20 and the inspection surface M by 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 result by the defect detection means 50.

[0017] For the light source 10, it is preferable to use a straight tube type lighting fixture, for example, a straight tube type fluorescent lamp or an LED lighting. Also, since the colors of automobile bodies are diverse, it is preferable to use a white light source. The light source 10 is preferably arranged in a plurality with respect to the inspection surface M so that the inspection surface M can be observed from multiple directions. The imaging means 20 includes, for example, a camera 21 such as a CCD camera and is capable of obtaining a digital image. The camera 21 is arranged, for example, to face the light source 10 and is configured to capture the reflected mirror image of the light source 10 and its surrounding area.

[0018] The moving means 30 relatively moves the position of the inspection surface M with respect to the imaging means 20 by moving at least one of the imaging means 20 and the inspection surface M. For example, it is preferably configured such that the inspection surface M is conveyed in one direction at a constant speed by a conveying means such as a conveyor. 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 configured by, for example, a display or the like, and is configured to display, for example, a circular mark or the like at the center of gravity of the defect.

[0019] (Defect candidate extraction means 40) FIG. 2 shows the configurations of the defect candidate extraction means 40 and the defect detection means 50 shown in FIG. 1. The defect candidate extraction means 40 includes, for example, an image storage means 41 such as a memory that stores a plurality of images with different imaging times taken by the imaging means 20 while relatively moving the imaging means 20 and the inspection surface M, a preprocessing means 42 that preprocesses the images taken by the imaging means 20, an image dividing means 43 that divides, in the length direction, a region including the mirror image of the light source 10 into a plurality of parts for an extraction target image based on the images obtained by the imaging means 20 to obtain a plurality of divided images, a primary extraction means 44 that performs binarization processing on the extraction target image based on the images obtained by the imaging means 20 and extracts primary defect candidates for extracting defect candidates, a primary defect candidate storage means 45 that stores the primary defect candidates, a secondary extraction means 46 that extracts defect candidates from the primary defect candidates, and a defect candidate storage means 47 that stores the defect candidates. It is preferably provided with these components.

[0020] The preprocessing means 42, for example, converts the images obtained by the imaging means 20 into grayscale images or other grayscale images, cuts out the region of the inspection surface M, and reduces noise. Examples of noise reduction include a Gaussian filter and a median filter. FIG. 3 shows an example of the image obtained by the preprocessing means 42. In FIG. 3, the white portion is the mirror image of the light source 10.

[0021] The image segmentation means 43 is preferably configured to cut out, for example, an area including one mirror image of the light source 10 and its peripheral area from the image obtained by the preprocessing means 42 which is the image to be extracted, and divide it into a plurality in the length direction of the mirror image. This is because the luminance is different between the central part and the end part in the length direction of the mirror image, so by dividing the image, the binarization process can be performed with high accuracy in the primary extraction means 44. FIG. 4 shows an example of the image divided by the image segmentation means 43. In FIG. 4, the white part is the mirror image of the light source 10. Note that in FIG. 4, in order to clearly show that it is divided, gaps are provided between each image. Also, in FIG. 4, the case where the image is divided into 6 in the length direction of the mirror image by the image segmentation means 43 is shown, but the number of divisions can be set arbitrarily. The number of divisions is preferably in the range of, for example, 2 to 12.

[0022] The primary extraction means 44, for example, for the image processed by the preprocessing means 42 which is the image to be extracted, sequentially performs binarization processing while sequentially changing the binarization threshold value in one direction from the binarization reference value, compares a plurality of binarized images obtained in the order of processing, and when the number of appearance of defect candidate points changes from less than a predetermined reference number to equal to or more than the predetermined reference number, or when the number of appearance of defect candidate points changes from more than the predetermined reference number to equal to or less than the predetermined reference number, the binarized image at that time is used as a threshold image, and primary defect candidates are extracted from this threshold image. That is, the primary extraction means 44 automatically determines the binarization threshold value based on the change in the number of appearance of defect candidate points accompanying the change in the binarization threshold value and performs binarization. In this way, using the number of appearance of defect candidate points as a substitute characteristic for the overall average luminance and determining the binarization threshold value has been found from experimental results.

[0023] In the binary image, defect candidate points appear, for example, in the peripheral region of the mirror image of the light source 10. For example, as shown in FIG. 4, when the mirror image of the light source 10 appears white, it appears as white points in the peripheral region of the mirror image of the light source 10. The binary threshold value may be, for example, between 0 and 255, and may be 255, the maximum value, or 0, the minimum value, or any value between the maximum value and the minimum value. When the preferable range of the binary threshold value is known in advance by the inspection surface M, the binary threshold value can be quickly determined by setting a value in the vicinity thereof as the binary reference value. When the preferable range of the binary threshold value is unknown, the binary threshold value can be determined by using the maximum value or the minimum value as the binary reference value.

[0024] The direction in which the binary threshold value changes is a decreasing direction when the binary reference value is 255, the maximum value, an increasing direction when the binary reference value is 0, the minimum value, and may be either a decreasing direction or an increasing direction when the binary reference value is a value between the maximum value and the minimum value.

[0025] For example, as shown in FIG. 4, when the mirror image of the light source 10 and the defect candidate points appear white, by changing the binary threshold value from a large value to a small value, the number of defect candidate points appearing in the binary image increases. When the binary threshold value is at a certain value, the number of defect candidate points appearing in the binary image changes from less than a predetermined reference number to equal to or more than the predetermined reference number. As a reference, FIG. 5(A) shows an example of a binary image binary-coded with the binary threshold value being 255, the maximum value, and FIG. 5(B) shows an example of a binary image binary-coded with the binary threshold value being a value smaller than 255 and with the number of defect candidate points appearing being more than the predetermined reference number. Incidentally, for example, when the mirror image of the light source 10 and the defect candidate points appear white as shown in FIG. 4, conversely, by changing the binary threshold value from a small value to a large value, the number of defect candidate points appearing in the binary image decreases. When the binary threshold value is at a certain value, the number of defect candidate points appearing in the binary image changes from more than a predetermined reference number to equal to or less than the predetermined reference number.

[0026] Also, for example, in the case of the inverted image of FIG. 4 where the mirror image of the light source 10 and the defect candidate points appear in black, by changing the binarization threshold value from a small value to a large value, the number of defect candidate points appearing in the binarized image increases. When the binarization threshold value is at a certain value, the number of defect candidate points appearing in the binarized image changes from a state where it is less than a predetermined reference number to a state where it is equal to or greater than the predetermined reference number. Note that, for example, in the case of the inverted image of FIG. 4 where the mirror image of the light source 10 and the defect candidate points appear in black, conversely, by changing the binarization threshold value from a large value to a small value, the number of defect candidate points appearing in the binarized image decreases. When the binarization threshold value is at a certain value, the number of defect candidate points appearing in the binarized image changes from a state where it is more than a predetermined reference number to a state where it is equal to or less than the predetermined reference number.

[0027] The binarization threshold value is preferably changed one by one, but it may be changed by any value such as 2 or 3. The reference number for comparing the number of defect candidate points can be arbitrarily set according to the inspection surface M. For example, it is preferable to set it in the range of 3 to 10.

[0028] The primary extraction means 44 preferably performs binarization processing for each of the plurality of divided images divided by the image division means 43 and extracts primary defect candidates. This is because the binarization process can be performed in accordance with the difference in luminance between the central portion and the end portion in the length direction of the mirror image of the light source 10, and defect candidates can be extracted with higher accuracy.

[0029] The primary defect candidate storage means 45 is constituted by, for example, a memory or the like, and is configured to store the centroid coordinates of the primary defect candidates extracted by the primary extraction means 44.

[0030] The secondary extraction means 46 is configured to extract, for example, among the primary defect candidates extracted by the primary extraction means 44 from the image processed by the preprocessing means 42 which is the extraction target image obtained by the imaging means 20, those having a luminance difference between the luminance value of the primary defect candidate and the average luminance value of the periphery of the primary defect candidate that is equal to or greater than a predetermined luminance difference reference value, as defect candidates. Specifically, for example, for the image processed by the segmentation means 43 which is the extraction target image, the luminance difference between the luminance value of the coordinates of the primary defect candidate stored in the primary defect candidate storage means 45 and the average luminance value of the coordinates of the periphery of the primary defect candidate is calculated, and when the luminance difference is equal to or greater than a predetermined luminance difference reference value, it is configured to extract as a defect candidate.

[0031] That is, by extracting defect candidates in two stages of the primary extraction means 44 and the secondary extraction means 46, it is possible to extract with higher accuracy. Also, in the secondary extraction means 46, since it is determined by the luminance difference between the luminance value of the primary defect candidate and the average luminance value of its periphery, unlike the case of using the luminance value, even if the coloring is different, the same luminance difference reference value can be used, and defect candidates can be extracted simply. FIG. 6 shows an example of defect candidates extracted by the secondary extraction means 46. In FIG. 6, the white dots surrounded by ○ are defect candidates.

[0032] The secondary extraction means 46 is also preferably configured to, for example, for the image processed by the segmentation means 43 which is the extraction target image, divide the region around the mirror image of the light source 10 into a plurality according to the distance from the mirror image of the light source 10, and set a luminance difference reference value for each of the divided plurality of distance regions. This is because the luminance difference between the luminance value of the primary defect candidate and the average luminance value of the periphery of the primary defect candidate changes according to the distance from the mirror image of the light source 10, and by setting the luminance difference reference value for each distance region, defect candidates can be extracted with higher accuracy.

[0033] Fig. 7 shows a conceptual diagram in which the area around the mirror image of the light source 10 is divided according to the distance from the mirror image of the light source 10. In Fig. 7, regarding the area around the mirror image of the light source 10, a state is shown in which the area is divided into a plurality of regions R2, R3, R4, R5, and R6 at every predetermined pixel from the region R1 of the mirror image. In Fig. 7, in order to clearly show each of the regions R2, R3, R4, R5, and R6, hatching is attached to each of them.

[0034] The difference in the distance from the region R1 of the mirror image of each adjacent region R2, R3, R4, R5, R6, for example, the width of each of the regions R2, R3, R4, R5, can be arbitrarily set according to the inspection surface M. The difference in the distance from the region R1 of the mirror image of each adjacent region R2, R3, R4, R5, R6 is preferably in the range of, for example, 1 pixel to 10 pixels. In Fig. 7, the case where the area around the mirror image of the light source 10 is divided into five regions is shown, but the number of divisions can also be arbitrarily set according to the inspection surface M. The number of divisions is preferably, for example, 6 to 10.

[0035] The defect candidate storage means 47 is constituted by, for example, a memory or the like, and is configured to store the barycentric coordinates of the defect candidates extracted by the secondary extraction means 46.

[0036] (Defect detection means 50) The defect detection means 50 includes, for example, a continuity determination means 51 that determines a defect when, among the defect candidates extracted by the defect candidate extraction means 40, the movement distance and movement angle between at least two or more images with different shooting times are within the ranges of a reference movement distance and a reference movement angle that are assumed to move when a defect exists on the inspection surface M, and a reference value storage means 52 that stores the reference movement distance and the reference movement angle. The movement distance and movement angle of the defect candidate are preferably, for example, viewed among three or more consecutive images in the order of shooting time, but the number of images can be arbitrarily determined according to the inspection surface M. Also, depending on the inspection surface M, it may be viewed between two images. The movement distance of the defect candidate is, for example, the length of a straight line connecting the defect candidates between images with different shooting times, and the movement angle of the defect candidate is, for example, the angle of a straight line connecting the defect candidates between images with different shooting times.

[0037] The reference movement distance and the reference movement angle that are assumed to move when a defect exists on the inspection surface M are preferably set based on a mark movement locus obtained by, for example, attaching a mark to the inspection surface M in advance and shooting with the shooting means 20 at regular time intervals while moving the inspection surface M at a constant speed by the movement means 30 and then combining these multiple reference images.

[0038] This surface defect inspection apparatus 1 is used, for example, as follows. FIG. 8 shows the procedure of a surface defect inspection method using the surface defect inspection apparatus 1. In this surface defect inspection method, first, for example, the inspection surface M irradiated with light from the light source 10 is photographed by the photographing means 20, and at the same time, the position of the inspection surface M with respect to the photographing means 20 is relatively moved by the moving means 30 to obtain a plurality of images with different photographing times (step S110; photographing procedure). The images photographed by the photographing means 20 are stored in the image storage means 41.

[0039] Next, for example, defect candidates are extracted from a plurality of images with different shooting times shot by the shooting procedure (step S110) (step S120; defect candidate extraction procedure). In the defect candidate extraction procedure (step S120), for example, first, preprocessing is performed on the image obtained by the shooting means 20 as described above by the preprocessing means 42 (step S121; preprocessing procedure). Subsequently, for example, the image dividing means 43 cuts out a region including one mirror image of the light source 10 and its peripheral region from the preprocessed image as described above, and divides it into a plurality in the length direction of the mirror image (step S122; image dividing procedure).

[0040] Next, for example, the primary extraction means 44 performs binarization processing on each of the plurality of divided images divided by the image dividing procedure (step S122) as described above, and extracts primary defect candidates (step S123; primary extraction procedure). Specifically, for example, for the preprocessed image which is the extraction target image based on the image obtained by the shooting procedure (step S110), for each of the divided images divided by the image dividing procedure, while changing the binarization threshold value in one direction in order from the binarization reference value, binarization processing is sequentially performed, and a plurality of binarized images obtained in the order of processing are compared. The binarized image when the number of appearance of defect candidate points changes from less than a predetermined reference number to equal to or more than the predetermined reference number, or the binarized image when the number of appearance of defect candidate points changes from more than a predetermined reference number to less than or equal to the predetermined reference number is used as the threshold image, and primary defect candidates are extracted from this threshold image. That is, for example, for one extraction target image, the binarization threshold value is sequentially changed in one direction from the binarization reference value, binarization processing is repeatedly performed, the obtained binarized images are compared, the threshold image is found from the change in the number of appearance 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.

[0041] After that, for example, by the secondary extraction means 46, for the divided image which is the extraction target image based on the image obtained by the photographing procedure (step S110), defect candidates are extracted from the primary defect candidates extracted by the primary extraction procedure (step S123) as described above (step S124; secondary extraction procedure). Specifically, for example, for the divided image which is the extraction target image, the luminance difference between the luminance value of the primary defect candidate and the average luminance value around the primary defect candidate is calculated, and when the luminance difference is equal to or greater than a predetermined luminance difference reference value, it is extracted as a defect candidate. The defect candidates extracted by the secondary extraction procedure (step S124) are stored in the defect candidate storage means 47.

[0042] After defect candidates are extracted by the defect candidate extraction procedure (step S120), for example, in the defect detection means 50, based on the defect candidates extracted as described above, defects are detected by the continuity determination means 51 (step S130; defect detection procedure). Specifically, for example, in the extracted defect candidates, when the moving distance and moving angle between at least two or more images with different shooting times are within the range of the reference moving distance and reference moving angle that are assumed to move when there are defects on the inspection surface M, it is determined that there are defects.

[0043] After that, the display means 60 displays the detection result obtained by the defect detection procedure (step S130) (step S140; display procedure). In the display means 60, for example, on a display or the like, a circular mark or the like is attached to the center of gravity of the defect and displayed. Thereby, inspection of surface defects can be performed.

[0044] According to this embodiment, the binarization process is sequentially performed while changing the binarization threshold value sequentially in one direction from the binarization reference value, and the binarized image when the number of defect candidate points becomes equal to or more than a predetermined reference number from a state where the number of defect candidate points is less than the predetermined reference number, or the binarized image when the number of defect candidate points becomes equal to or less than the predetermined reference number from a state where the number of defect candidate points is more than the predetermined reference number is used as the threshold image, and the primary defect candidates are extracted. Therefore, image processing can be automatically performed, and an image with a small difference in overall average luminance can be obtained even if the inspection part and the coloring are different. Thus, it is not necessary to manually change the setting of parameters according to the inspection part and the coloring, and the parameters can be automatically set, and defect candidates can be easily extracted.

[0045] In particular, for the extraction target image based on the image obtained by the photographing means 20, among the primary defect candidates extracted by the primary extraction means 44, those with a luminance difference between the luminance value of the primary defect candidate and the average luminance value around the primary defect candidate being equal to or more than a predetermined luminance difference reference value are extracted as defect candidates. Therefore, the same luminance difference reference value can be used even if the coloring is different, and defect candidates can be easily extracted.

[0046] Also, for the extraction target image based on the image obtained by the photographing means 20, the area around the mirror image of the light source 10 is divided into a plurality according to the distance from the mirror image of the light source 10, and the luminance difference reference value is set for each of the divided plurality of distance areas. Therefore, the luminance difference reference value can be set according to the luminance difference that changes according to the distance from the mirror image of the light source 10, and defect candidates can be extracted with higher accuracy.

[0047] Furthermore, a straight tube type lighting fixture is used for the light source 10, and for the extraction target image based on the image obtained by the photographing means 20, the area including the mirror image of the light source 10 is divided into a plurality in the length direction, and the binarization process is performed for each of the divided plurality of divided images, and the primary defect candidates are extracted. Therefore, in accordance with the difference in luminance between the central part and the end part in the length direction of the mirror image of the light source 10, the binarization process can be performed, and defect candidates can be extracted with higher accuracy.

[0048] The present invention has been described above by way of embodiments. However, the present invention is not limited to the above embodiments and can be variously modified. For example, in the above embodiments, each component has been specifically described. However, not all components need to be provided, and other components may be provided.

[0049] Also, in the above embodiments, the case of inspecting the painted surface of an automobile body has been specifically described. However, the present invention is not limited to the automobile body and can also be applied to the case of inspecting the surface of other painted products. Furthermore, it can also be applied not only to the painted surface but also to the case of inspecting the surface having reflective properties.

[0050] Furthermore, in the above embodiments, the defect detection means 50 and the defect detection procedure (step S130) have been specifically described. However, defects may be detected by other configurations and procedures.

Explanation of Reference Numerals

[0051] 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 segmentation 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... Continuity determination means, 52... Reference value storage means, 60... Display means, M... Surface to be inspected

Claims

1. A light source that irradiates light onto the surface to be inspected, imaging means for imaging the surface to be inspected irradiated by the light source to obtain an image, defect candidate extraction means for extracting defect candidates from the image captured by the imaging means, defect detection means for detecting defects based on the defect candidates extracted by the defect candidate extraction means, and the defect candidate extraction means performs binarization processing on the extraction target image based on the image obtained by the imaging means while sequentially changing the binarization threshold value in one direction from the binarization reference value, compares the plurality of binarized images obtained in the order of processing, and when the number of appearances of defect candidate points changes from less than a predetermined reference number to a predetermined reference number or more, or when the number of appearances of defect candidate points changes from more than a predetermined reference number to less than a predetermined reference number, the binarized image at that time is used as a threshold image, and primary extraction means for extracting primary defect candidates for extracting the defect candidates is extracted from this threshold image; for the extraction target image based on the image obtained by the imaging means, among the primary defect candidates extracted by the primary extraction means, secondary extraction means for extracting those having a luminance difference between the luminance value of the primary defect candidate and the average luminance value around the primary defect candidate of a predetermined luminance difference reference value or more as the defect candidates A surface defect inspection apparatus characterized by the above.

2. The surface defect inspection apparatus according to claim 1, wherein the secondary extraction means divides a region around the mirror image of the light source in the extraction target image based on the image obtained by the imaging means into a plurality according to the distance from the mirror image of the light source, and sets the luminance difference reference value for each of the divided plurality of distance regions.

3. An imaging procedure for imaging the surface to be inspected irradiated with light from a light source to obtain an image, a defect candidate extraction procedure for extracting defect candidates from the image captured by the imaging procedure, including a defect detection procedure for detecting defects based on the defect candidates extracted by the defect candidate extraction procedure, and the defect candidate extraction procedure For the extraction target image based on the image obtained by the imaging procedure, perform binarization processing in order while changing the binarization threshold value in one direction from the binarization reference value in order, compare the plurality of binarized images obtained in the order of processing, and when the number of appearance of defect candidate points changes from less than a predetermined reference number to equal to or more than the predetermined reference number, or when the number of appearance of defect candidate points changes from more than a predetermined reference number to equal to or less than the predetermined reference number, the binarized image at that time is used as a threshold image, and a primary extraction procedure for extracting a primary defect candidate for extracting the defect candidate from this threshold image; For the extraction target image based on the image obtained by the imaging procedure, among the primary defect candidates extracted by the primary extraction procedure, those with a luminance difference between the luminance value of the primary defect candidate and the average luminance value around the primary defect candidate being equal to or more than a predetermined luminance difference reference value are extracted as the defect candidates, including a secondary extraction procedure; A surface defect inspection method characterized by the above.

4. In the secondary extraction procedure, for the extraction target image based on the image obtained by the imaging procedure, the region around the mirror image of the light source is divided into a plurality according to the distance from the mirror image of the light source, and the luminance difference reference value is set for each of the divided plurality of distance regions. The surface defect inspection method according to claim 3.

Citation Information

Patent Citations

  • Wood defect detector and method therefor

    JP2011095108A

  • Surface defect inspection device and surface defect inspection method

    JP2019200775A