WO2021192376A1 - 外観検査システムおよびコンピュータプログラム - Google Patents

外観検査システムおよびコンピュータプログラム Download PDF

Info

Publication number
WO2021192376A1
WO2021192376A1 PCT/JP2020/039729 JP2020039729W WO2021192376A1 WO 2021192376 A1 WO2021192376 A1 WO 2021192376A1 JP 2020039729 W JP2020039729 W JP 2020039729W WO 2021192376 A1 WO2021192376 A1 WO 2021192376A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
inspected
offset
defect
visual inspection
Prior art date
Application number
PCT/JP2020/039729
Other languages
English (en)
French (fr)
Inventor
和也 森口
Original Assignee
日本電産株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電産株式会社 filed Critical 日本電産株式会社
Priority to CN202080098729.0A priority Critical patent/CN115298539A/zh
Publication of WO2021192376A1 publication Critical patent/WO2021192376A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • This disclosure relates to visual inspection systems and computer programs.
  • Japanese Patent Application Laid-Open No. 2013-224833 discloses a technique for defining a judgment standard for good / bad judgment for each specific pixel and automatically setting the judgment standard using the average value / standard deviation of brightness. .. According to the technique of Japanese Patent Application Laid-Open No. 2013-224833, it is possible to omit frequent manual changes in the judgment criteria, and it is possible to operate the visual inspection more efficiently.
  • the present disclosure provides a visual inspection system and a computer program that suppress over-detection while suppressing omission of defect detection.
  • the exemplary visual inspection system is an visual inspection system that determines the quality of the inspected object by using an image of the inspected object, and is a plurality of images of a plurality of articles determined to be non-defective.
  • a storage device that stores an image, a reference table in which a plurality of thresholds are described, and an offset table in which a plurality of offset values are described, and an interface device that receives image data of an inspected object and attribute data indicating attributes related to manufacturing conditions. , With an arithmetic circuit.
  • Each of the image of the object to be inspected and the plurality of images includes a plurality of partial regions.
  • Each of the plurality of threshold values in the reference table and each of the plurality of offset values in the offset table are set in association with each of the plurality of subregions.
  • Each of the plurality of threshold values is a reference for determining that the image of the object to be inspected contained in each of the plurality of associated subregions represents a defect.
  • the plurality of offset values include a first-class offset value that changes a part of the plurality of threshold values and a second-class offset value that does not change the remaining part.
  • the arithmetic circuit (a) performs a defect detection process predetermined for the image data, and if an image of at least one defect is included in the image of the object to be inspected, the object to be inspected is a defect candidate. Execute the process of extracting as.
  • the arithmetic circuit is (b) a process of cutting out a partial image from the image of the object to be inspected extracted as the defect candidate, and the position of the cut out partial image is the first position in the offset table. Performs processing, which is the position of the subregion with which the offset value of the species is associated. Further, the arithmetic circuit is (c) a process of determining whether or not the image feature amount of the cut out partial image is classified into the overdetection class, and the overdetection class is the offset of the first type. A process is executed in which the image feature amount of each partial image of the plurality of images is classified at a ratio of a predetermined value or more at the position of the partial region to which the value is associated.
  • the arithmetic circuit sets the threshold value of the reference table at the position of the partial region as the offset of the first type when (d) the image feature amount of the cut out partial image is classified into the overdetection class.
  • a process is performed in which the value is used to raise the criteria for determining that the image of the object to be inspected represents a defect.
  • the arithmetic circuit uses the reference table in which the threshold value is changed to execute a process of determining whether or not an image of at least one defect is included in the image of the object to be inspected.
  • the exemplary computer program according to the present disclosure is a computer program executed by the arithmetic circuit of the visual inspection system that determines the quality of the inspected object by using the image of the inspected object.
  • the visual inspection system is a storage device that stores a plurality of images taken of each of a plurality of articles determined to be non-defective, a reference table in which a plurality of threshold values are described, and an offset table in which a plurality of offset values are described.
  • An interface device that receives image data of the object to be inspected, and the arithmetic circuit.
  • Each of the image of the object to be inspected and the plurality of images includes a plurality of partial regions.
  • Each of the plurality of threshold values in the reference table and each of the plurality of offset values in the offset table are set in association with each of the plurality of subregions.
  • Each of the plurality of threshold values is a reference for determining that the image of the object to be inspected contained in each of the plurality of associated subregions represents a defect.
  • the plurality of offset values include a first-class offset value that changes a part of the plurality of threshold values and a second-class offset value that does not change the remaining part.
  • the computer program performs (a) a defect detection process predetermined for the image data on the arithmetic circuit, and when the image of at least one defect is included in the image of the object to be inspected, the computer program is inspected.
  • the process of extracting an object as a defect candidate is executed.
  • the computer program is (b) a process of cutting out a partial image from the image of the object to be inspected extracted as the defect candidate, and the position of the cut out partial image is the first position in the offset table. Execute the process, which is the position of the subregion to which the offset value of the species is associated.
  • the computer program is (c) a process of determining whether or not the image feature amount of the cut out partial image is classified into the overdetection class, and the overdetection class is the offset of the first type.
  • a process is executed, which is a class in which the image feature amount of each partial image of the plurality of images is classified at a ratio of a predetermined value or more at the position of the partial region to which the value is associated.
  • the computer program offsets the threshold value of the reference table at the position of the partial region of the first type when the image feature amount of the cut out partial image is classified into the overdetection class. The value is used to change to perform a process that raises the criteria for determining that the inspected object represents a defect.
  • the computer program (e) uses the reference table in which the threshold value is changed to execute a process of determining whether or not an image of at least one defect is included in the image of the object to be inspected.
  • FIG. 1 is a diagram showing a configuration example of the appearance inspection system 1000 of the present disclosure having the appearance inspection device 100.
  • FIG. 2 is a diagram schematically showing a configuration example of the visual inspection apparatus 100.
  • FIG. 3 is a diagram showing an example of the database 14Z in the storage device 14.
  • FIG. 4 is a diagram schematically showing an example of image data obtained by photographing the work 70.
  • FIG. 5 is a diagram showing an example of an image of the work 70 divided into a plurality of partial regions 72.
  • FIG. 6 is a flowchart showing the procedure of the visual inspection process.
  • FIG. 7 is a diagram showing an example of the result of defect detection processing when a scratch is present in a certain partial region 72b.
  • FIG. 8 is a diagram schematically showing the offset table 14c (upper row) and the position of the partial image cut out from the image 72 of the work 70 (lower row).
  • FIG. 9 is a diagram for explaining the process of step S8 of FIG.
  • FIG. 10 is a diagram for explaining step S10 of FIG.
  • FIG. 11 is a flowchart showing a specific procedure of the visual inspection process.
  • FIG. 12 is a flowchart showing the procedure of the database registration process.
  • FIG. 13 is a flowchart showing the procedure of the similarity tendency confirmation process.
  • FIG. 14 is a diagram for specifically explaining steps S56 and S58 of FIG.
  • FIG. 15 is a flowchart showing a procedure for generating / updating the offset table.
  • FIG. 16 is a flowchart showing a procedure for updating the database 14Z.
  • FIG. 17 is a flowchart showing the procedure of the offset table application process.
  • FIG. 18 is a diagram showing a configuration of a visual inspection system 1100 according to
  • FIG. 1 is a diagram showing a configuration example of the visual inspection system 1000 of the present disclosure having the visual inspection device 100.
  • FIG. 2 is a diagram schematically showing a configuration example of the visual inspection apparatus 100.
  • the visual inspection system 1000 includes an imaging device 30, a visual inspection device 100, and a monitor 130.
  • the visual inspection device 100, the input device 120 and the monitor 130 can be realized by a general-purpose digital computer system such as a PC.
  • the image pickup device 30 can be a digital still camera.
  • the image pickup apparatus 30 is communicably connected to the appearance inspection apparatus 100 by a wired communication cable or a wireless communication line (not shown).
  • the monitor 130 is communicably connected to the visual inspection device 100 by a wired communication cable (not shown).
  • the image pickup device 30 takes an image of the object to be inspected and sends the image data acquired by the image pickup to the appearance inspection device 100.
  • the visual inspection device 100 performs a visual inspection of the object to be inspected based on the image data received from the image pickup device 30 according to the procedure described later.
  • the procedure for visual inspection of the object to be inspected performed in the visual inspection system will be described with reference to FIG.
  • the object to be inspected is various articles such as various products or parts that are subject to visual inspection.
  • the object to be inspected may be referred to as a "work".
  • the work 70 is placed on the transfer table 62 and fixed to the transfer table 62 by the gripping mechanism.
  • the work 70 is, for example, a finished product of a hard disk drive, a housing of a hard disk drive in which a motor is incorporated, or the like.
  • the transfer table 62 can be moved in the horizontal direction by the transfer stage 64 with the work 70 on it.
  • the image pickup apparatus 30 is supported by a support member 60 above the transfer stage 64 so as to include the transfer stage 64 in the field of view.
  • the image pickup apparatus 30 images the work 70 in the field of view.
  • the work 70 may be gripped by the robot arm and placed in the imaging position.
  • a light source (not shown) may illuminate the work 70 during imaging.
  • the image data acquired by imaging is sent from the imaging device 30 to the visual inspection device 100.
  • An example of the size of the image acquired by one imaging is a horizontal 1600 pixel and a vertical 1200 image, and another example is a horizontal 800 pixel and a vertical 600 image.
  • the visual inspection device 100 includes an arithmetic circuit 10, a memory 12, a storage device 14, a communication circuit 16, and an image processing circuit 18. The components are connected to each other so as to be able to communicate with each other by the bus 20. Further, the visual inspection device 100 includes an interface device 22a that communicates with the image pickup device 30, an interface device 22b that communicates with the input device 120, and an interface device 22c that outputs video data to the monitor 130.
  • An example of the interface device 22a is a video input terminal or an Ethernet terminal.
  • An example of the interface device 22b is a USB terminal.
  • An example of the interface device 22c is an HDMI® terminal. Instead of these examples, other terminals may be used as the interface devices 22a to 22c.
  • the interface devices 22a to 22c may be wireless communication circuits for performing wireless communication.
  • a wireless communication circuit compliant with the Wi-Fi (registered trademark) standard that performs wireless communication using frequencies such as 2.4 GHz / 5.2 GHz / 5.3 GHz / 5.6 GHz. It has been known.
  • the arithmetic circuit 10 can be, for example, an integrated circuit (IC) chip such as a central processing unit (CPU) or a digital signal processing processor.
  • the memory 12 is a recording medium in which a computer program 12p for controlling the operation of the arithmetic circuit 10 is stored and a learned convolutional neural network 12n described later is constructed.
  • the substance of the learned convolutional neural network 12n is a plurality of parameters given to each artificial neuron constituting the input layer, the intermediate layer, and the output layer.
  • the parameters include a weight applied to each of the inputs to each artificial neuron and a threshold value to be compared with the weighted sum of the inputs (the sum of the products of the inputs and the weights).
  • the memory 12 does not have to be a single recording medium, but may be a set of a plurality of recording media.
  • the memory 12 may include, for example, a semiconductor volatile memory such as RAM and a semiconductor non-volatile memory such as flash ROM. At least a portion of the memory 12 may be a removable recording medium.
  • the storage device 14 stores a database which is a set of various data.
  • FIG. 3 shows an example of the database 14Z in the storage device 14.
  • the storage device 14 includes a plurality of images 14a in which each of the plurality of articles determined to be non-defective products is captured, a reference table 14b in which a plurality of threshold values are described, and an offset in which a plurality of offset values are described.
  • the table 14c is stored.
  • the storage device 14 may store the attribute data 14d indicating the attributes related to the manufacturing conditions of the object to be inspected. The contents of each stored data will be described in detail later.
  • the image pickup device 30 is a device that outputs an image signal for generating image data of the object to be inspected.
  • the image signal is sent to the arithmetic circuit 10 by wire or wirelessly.
  • a typical example of the image pickup apparatus 30 is a camera including an area sensor such as a CMOS image sensor or a CCD image sensor in which a large number of photodiodes are arranged in a matrix.
  • the image pickup apparatus 30 generates data of a color image or a monochrome image of the object to be inspected.
  • Various cameras for visual inspection can be used for the image pickup apparatus 30.
  • FIG. 4 schematically shows an example of image data obtained by photographing the work 70.
  • the image data is a frame image including an image of the work 70.
  • An exemplary image in this embodiment is an array of 256-gradation pixel values (“brightness” or “grayscale” values) that reflect the irregularities and patterns on the surface of the work 70. Pixel values may be referred to as luminance values or densities.
  • the frame image is a color image, for example, the pixel value can be defined by three colors of red, green, and blue, each of which is represented by 256 gradations.
  • the gradation value, the brightness value and the like may be comprehensively referred to as "image feature amount".
  • the "image feature amount” not only means the feature related to the pixel value, but also local such as the brightness histogram statistic for evaluating the basic properties of the image, the strength and weakness of the contrast between pixels, and the degree of pixel cohesion. It may also include Gray Level Co-occurrence Matrix (GLCM) features that can represent the features.
  • GLCM Gray Level Co-occurrence Matrix
  • a part of the transfer table 62 may be included as the background 70B in addition to the work 70 in one frame image.
  • the area 52 surrounded by the line 52L is the “inspection area”.
  • One frame image may include a plurality of inspection areas 52.
  • Alignment is performed so that the position of the work 70 in the frame image is aligned with a predetermined position in the frame image.
  • This alignment is to align the plurality of reference points of the work 70 with the plurality of reference points in the field of view of the image pickup apparatus 30.
  • the first step of such alignment is to adjust the physical arrangement relationship of the work 70 with respect to the lens optical axis of the image pickup apparatus 30.
  • the second step of alignment is to adjust the pixel position (coordinates) of the captured image.
  • the second stage alignment involves translating, rotating, enlarging and / or reducing the image by an image processing technique. As a result of such alignment, the inspection area 52 of each work 70 is always aligned with the area surrounded by the line 52L.
  • the image of the inspection area 52 of each work 70 can be processed in units of partial areas.
  • the above-mentioned alignment can be mainly executed by the arithmetic circuit 10 or the image processing circuit 18, but a mechanism (not shown) that changes the posture of the image pickup apparatus 30 according to a command from the arithmetic circuit 10 or the image processing circuit 18 It may be executed by rotating or translating the image pickup apparatus 30 in a plane parallel to the transport stage 64.
  • the monitor 130 is a device that displays the result of determination executed by the image processing device 100.
  • the monitor 130 can also display the image acquired by the image pickup apparatus 30.
  • the input device 120 is an input device that receives an input from a user including a designation of a selection area and gives it to the arithmetic circuit 10.
  • An example of the input device 120 is a touch panel, mouse and / or keyboard.
  • the monitor 130 and the input device 120 need not always be connected to the arithmetic circuit 10 by wire, but may be connected to the arithmetic circuit 10 only when necessary wirelessly or by wire via a communication interface.
  • the monitor 130 and the input device 120 may be a terminal device or a smartphone carried by the user.
  • the visual inspection system 1000 determines whether or not a defect is present in the object to be inspected by using an image.
  • the visual inspection system 1000 according to the exemplary embodiment uses a neural network to determine whether or not an image of a defect is present in the image of the object to be inspected. The presence or absence of defects is determined for each partial region when the article image is divided into a plurality of partial regions.
  • FIG. 5 shows an example of an image of the work 70 divided into a plurality of partial regions 72.
  • the plurality of partial regions 72 are in a grid pattern.
  • FIG. 5 illustrates one partial region 72a constituting the plurality of partial regions 72.
  • the plurality of partial regions 72 are set slightly larger than the image of the work 70 so as to completely include the inspection region 52 of the work 70 as a whole.
  • the visual inspection system 1000 uses, for example, the pixel values of all the pixels constituting the partial region 72a as inputs to the neural network to obtain an output from the neural network.
  • a convolutional neural network 12n that has been pre-learned using images of various defects such as "dirt”, “foreign matter”, and “scratches” and the names of the defects as teacher signals is used.
  • NS the type of defect is referred to as "class”.
  • a value indicating a size indicating that the image input to the neural network and the standard image judged to be normal do not match is output.
  • the output value may be referred to in the present specification as a "probability value" indicating a high possibility of being a defect.
  • the defect is a "scratch" on the surface of the hard disk drive housing.
  • the reflectance of the aluminum plate is higher than the reflectance of the coating, so the brightness value of the scratched image is higher than the brightness value of the image in the absence of scratches.
  • an image feature amount related to the brightness value of the input partial region image can be obtained from the intermediate layer of the convolutional neural network.
  • Each extracted image feature amount is treated as a hash value of the image of the input partial area.
  • any one of the plurality of images 14a in which each of the plurality of articles determined to be non-defective products stored in the storage device 14 was taken was used, it was determined to be a defect from the intermediate layer of the convolutional neural network. It is also possible to extract the image feature amount related to the brightness value of the partial region of the non-defective image corresponding to the position of the partial region.
  • the above-mentioned "probability value" is obtained for each subregion determined to contain a defect. Obtainable.
  • the probability value of the image of the partial region determined to be defective can be adjusted to be, for example, at least 50% or more.
  • the defect class name and probability value output from the neural network are defect candidate detection results based on the learning result of the neural network.
  • the visual inspection system 1000 changes the defect determination criteria based on the relationship with a plurality of articles determined to be non-defective, even if the article is once determined to contain defects. However, it is judged again whether or not the defect can be said to exist.
  • determining that a defect exists even though it is an article that should be determined to be a non-defective product is referred to as "overdetection". If over-detection occurs, the yield of the article will decrease, and it will have to be subject to repair, etc., and the cost of the article will increase.
  • the visual inspection system 1000 first determines whether or not the product is a non-defective product based on a criterion that is clearly determined to be a non-defective product. It was decided to relax the criteria for determining defects based on the relationship with multiple articles that were determined to be.
  • the visual inspection system 1000 When the visual inspection system 1000 performs a visual inspection, the following data is stored in the storage device 14 in advance.
  • Items judged to be non-defective are not limited to items judged to be non-defective from the beginning. Includes objects to be inspected that are once determined to be defective and then determined to be non-defective by, for example, visual judgment by an inspector, and objects to be inspected that are determined to be non-defective as a result of the processing according to the present disclosure described later. .. By including the latter two, the range of features of the image judged to be non-defective can be expanded.
  • Each of the "plurality of images" may include an image of only one article or may include an image of a plurality of articles. The image of each article judged to be non-defective is used to change the criteria for determining the presence or absence of defects.
  • Each of the "plurality thresholds” is a threshold value associated with each subregion when the image is divided into a plurality of subregions. Each threshold value is used as a reference for determining whether or not each partial region contains an image of a defect when determining the presence or absence of a defect in the inspected object once determined to have a defect.
  • the initial value of each of the "plurality of threshold values” is, for example, "0.5". As the threshold value approaches 1, only obvious defects and the like are determined to be "defects”. That is, the closer the threshold value is to 1, the more difficult it is to determine that the defect is a defect.
  • Each of the plurality of thresholds can be updated to a higher threshold value by each of the "plurality of offset values” described below.
  • the partial area may be an area composed of a plurality of consecutive pixels, or an area composed of one pixel, that is, an area defined by the size of one pixel.
  • one pixel can be, for example, an area defined by the size of three sub-pixels of red, green, and blue, which are arranged adjacent to each other.
  • Multiple offset values are used to update multiple thresholds described in the reference table.
  • the threshold value of the partial region is updated according to the offset value so that the criterion for determining the defect is higher. For example, the value obtained by adding the current threshold value and the offset value is updated as a new threshold value. This makes it possible to raise the criteria for determining a defect.
  • the "plurality of offset values” is not limited to the offset value for updating the threshold value, and may include an offset value that does not update the threshold value, that is, an offset value that maintains the current value.
  • an embodiment having both an offset value for maintaining the current value (type 1 offset value) and an offset value for updating the threshold value (type 2 offset value) is illustrated. Will be explained.
  • an offset value that maintains the current value is used, the calculation will be performed for all partial areas, so the calculation processing program can be simplified. For example, when adding an offset value to the current threshold value of each subregion, 0 is set for the offset value that does not update the threshold value, and a value greater than 0 is set for the offset value that updates the threshold value. Arithmetic processing that adds an offset value to the current threshold value for a partial area may be programmed. On the other hand, when the offset value is added only to the threshold value of a specific subregion, it is necessary to specify the subregion to be updated of the threshold value, which may complicate the programming of the arithmetic processing.
  • the visual inspection system 1000 again uses a higher threshold for determining that the article image is defective, and each partial region of the article image is defective. Determine if the image is included.
  • the visual inspection system 1000 registers the article image as one of the "plurality of images" shown in the above (a). On the other hand, when it is determined that any partial region in the article image still contains the image of the defect, the visual inspection system 1000 determines that the article in the article image contains the defect.
  • the above-mentioned "defect” is divided into a plurality of classes, and it is determined whether or not the defect is a defect for each class.
  • Examples of a plurality of classes are "dirt”, “foreign matter”, “scratch”, “burr”, “chip”, “deformation”, “color unevenness”, “unevenness”, and “cloudiness”.
  • the image of the subject to be inspected may have one or more classes of "defects” as described above.
  • the image of a non-defective product ((a) above) there may be features of one or more classes described above that are once determined to be “defects”.
  • the reference table (b) and the offset table (c) may be provided for each class of defects and used for determining the presence or absence of defects for each class.
  • one class corresponding to a defect will be described as an example, and the description of all the classes will be omitted because it is complicated.
  • the image processing device 100 that has acquired the image data executes the above-mentioned processing to perform an appearance inspection of the work 70. The contents of this process will be described in more detail below.
  • FIG. 6 is a flowchart showing a procedure of visual inspection processing.
  • step S2 the arithmetic circuit 10 performs a predetermined defect detection process on the image data, and extracts the inspected object as a defect candidate when the image of at least one defect is included in the image of the inspected object. do.
  • the "predetermined defect detection process” referred to here is a defect detection process using the convolutional neural network described above.
  • the inspected object is extracted as a defect candidate.
  • FIG. 7 shows an example of the result of the defect detection process when a scratch is present in a certain partial region 72b.
  • the defect class output from the convolutional neural network is "scratch", and the "probability value" indicating the high possibility of being a defect is 0.75.
  • the work 70 shown in FIG. 7 is extracted as a defect candidate.
  • a defect class other than "scratch” may be given.
  • a partial region determined to have a defect may be referred to as a “defect candidate region”.
  • step S4 and subsequent steps the criteria for determining defects are changed based on the relationship with a plurality of articles determined to be non-defective for the object to be inspected once determined to contain defects, and can it be said that the defects still exist?
  • the process of determining whether or not is performed again is performed.
  • the "offset table” includes a first-class offset value that changes a part of a plurality of threshold values and a second-class offset value that does not change the remaining part. Using each offset value, the threshold value of the criterion for determining whether or not the defect is set for each partial region is changed or maintained as it is. The method of creating the offset table will be described later.
  • step S4 the arithmetic circuit 10 cuts out a partial image from the image of the object to be inspected extracted as a defect candidate.
  • the position of the partial image to be cut out is the position of the partial area in the offset table 14c to which the offset value of the first type is associated.
  • FIG. 8 is a diagram schematically showing the offset table 14c (upper row) and the position of the partial image cut out from the image 72 of the work 70 (lower row).
  • the number of rows and columns of the offset table 14c provided in a grid pattern matches the number of rows and columns in which a plurality of subregions are partitioned. Therefore, it is possible to associate the position of each element of the offset table 14c with the position of each partial region set in the image 72.
  • the offset table 14c there are a first type offset value (value other than 0) and a second type offset value (value of 0).
  • first type offset value value other than 0
  • second type offset value value of 0
  • the images of the partial regions 72b, 72c, 72d, and 72e corresponding to the respective positions to which the offset values of the first type are assigned are cut out by the process of step S4.
  • step S6 the arithmetic circuit 10 determines whether or not the image feature amount of the cut out partial image is classified into the overdetection class.
  • the "overdetection class” is a class in which the image feature amount of each partial image of a plurality of images is classified at a ratio of a predetermined value or more at the position of the partial region to which the offset value of the first type is associated.
  • the "overdetection class" will be explained more clearly.
  • the plurality of images include images in which over-detection has occurred in the former visual inspection process.
  • a partial region where over-detection has been made (hereinafter, referred to as “over-detected partial region”) is cut out from these plurality of images.
  • the defect detection process according to step S2 is performed on the over-detected partial region, one or a plurality of image features related to the image of the input partial region can be obtained from the intermediate layer of the convolutional neural network.
  • a predetermined clustering process is performed on each of the obtained image feature amounts, the image can be divided into one or a plurality of clusters.
  • the cluster having the largest number of elements is classified into image features that tend to be over-detected in a plurality of past images.
  • the image feature amount may differ depending on the defect class in which over-detection has occurred (hereinafter, referred to as “over-detection class”).
  • the process of step S6 is a process of determining whether or not the partial image extracted in step S4 has an image feature amount belonging to the overdetection class.
  • clustering can be performed in a one-dimensional space according to the magnitude of the image features.
  • the number of image feature quantities is P (P: an integer of 2 or more)
  • clustering can be performed on the P-dimensional space according to the magnitude of the image feature quantity.
  • step S8 when the image feature amount of the cut out partial image is classified into the overdetection class, the arithmetic circuit 10 changes the threshold value of the reference table at the position of the partial region by using the offset value of the first kind. .. This raises the criteria for determining that the object to be inspected is defective.
  • step S8 has the significance of suppressing such over-detection by updating the reference table so that the threshold value at the position of the partial region becomes high.
  • FIG. 9 is a diagram for explaining the process of step S8 of FIG. Subsequently, it is assumed that a defect exists in the partial region 72b (FIG. 7). Further, in step S6, it is assumed that the image feature amount of the partial image cut out from the partial region 72b (FIG. 7) is classified into the overdetection class. For convenience of explanation, the partial image having the image feature amount classified into the overdetection class is only the partial region 72b (FIG. 7).
  • the arithmetic circuit 10 adds the threshold values and offset values of the reference table 14b and the offset table 14c at each position where the rows and columns are common.
  • the value of the position 72-1 corresponding to the partial region 72b is “0.5”.
  • the offset value of the first type at the position 72-2 corresponding to the partial region 72b is “0.3”.
  • a second type offset value "0.0" is set at each position corresponding to the partial region other than the partial region 72b.
  • the threshold value and offset value of the position corresponding to the partial area 72b When the threshold value and offset value of the position corresponding to the partial area 72b are added, it becomes “0.8". “0.8” is described in position 72-3 of the updated reference table 14b-2 obtained by addition. Since it is assumed that the partial image having the image feature amount classified into the overdetection class is only the partial region 72b (FIG. 7), the difference between the reference tables 14b and 14b-2 before and after the update is the position 72-3. Only the threshold of. However, when a plurality of image features are classified into the overdetection class, the threshold value of the position of other subregions can be updated.
  • step S10 the arithmetic circuit 10 determines whether or not the image of at least one defect is included in the image of the object to be inspected by using the reference table 14b-2 whose threshold value has been updated. Specifically, with respect to the partial region 72b (FIG. 7) in which the image of the defect is determined to exist in step S2, the already obtained probability value is compared with the threshold value of the reference table 14b-2. As a result of the comparison, the arithmetic circuit 10 determines that the defect still exists when the probability value is equal to or larger than the threshold value or larger than the threshold value. When the probability value is less than the threshold value or less than the threshold value, the arithmetic circuit 10 determines that there is no defect.
  • FIG. 10 is a diagram for explaining step S10 of FIG.
  • the arithmetic circuit 10 compares the probability value “0.75” in which the image of the position of the partial region 72b includes a defect with the threshold value “0.8” of the reference table 14b-2 corresponding to the position. Since the probability value is smaller than the threshold value, the arithmetic circuit 10 determines that there is no defect in the partial region 72b once determined to include the image of the defect in step S2.
  • the threshold value which is the judgment standard, is updated only when the result of the past non-defective product judgment is similar to the case where over-detection is performed. As a result, it is possible to suppress over-detection of defects while preventing undetected defects.
  • the "attribute data" of the inspected object is data indicating the attributes related to the manufacturing conditions of each inspected object.
  • the attributes related to the manufacturing conditions are, for example, the mold, the manufacturing line, the manufacturing factory, and the manufacturing date of each inspected object used at the time of manufacturing each inspected object. ..
  • the attribute data may be at least one data selected from a set (group) of the above-mentioned mold, production line, manufacturing factory, manufacturing date, and the like.
  • the attribute data can be represented by, for example, a combination of a character string indicating a name, a number, a symbol, and a numerical string. Attribute data is prepared for each inspected object. However, if the manufacturing conditions of each inspected object are common, one attribute data can be used as the attribute data for each inspected object.
  • a set of reference table and offset table can be prepared for each defect class.
  • FIG. 11 is a flowchart showing a specific procedure of the visual inspection process. This flowchart is executed by the arithmetic circuit 10 by utilizing the convolutional neural network 12n in the memory 12 and various data in the storage device 14.
  • the arithmetic circuit 10 acquires image data of the object to be inspected.
  • the image pickup apparatus 30 photographs an object to be inspected, acquires image data, and transmits the image data to the interface device 22a.
  • the arithmetic circuit 10 receives the image data received by the interface device 22a from the interface device 22a.
  • the arithmetic circuit 10 may acquire the image data from the storage device 14. In the latter example, the imaging device 30 may not be included as part of the visual inspection system 1000.
  • step S22 the arithmetic circuit 10 acquires the attribute data of the object to be inspected.
  • step S24 the arithmetic circuit 10 performs defect detection processing using the convolutional neural network 12n. Then, when a defect candidate region is detected in the image of the inspected object, the inspected object is extracted as a defect candidate. At this time, the defect class and the probability value are output for each defect candidate area.
  • step S26 the arithmetic circuit 10 executes the offset table application process.
  • the offset table application process corresponds to the process shown in FIG.
  • the reference table 14b is updated by the offset table 14c, and a new reference table 14b-2 is acquired. A specific description of the offset table application process will be described later.
  • step S28 the arithmetic circuit 10 uses the probability value output for each defect candidate region in step S24 and the updated threshold value of the reference table 14b-2 to determine whether or not a defect actually exists in the defect candidate region. Is determined. More specifically, the arithmetic circuit 10 compares the probability value of the position of the defect candidate region with the threshold value of the reference table 14b-2 of the position corresponding to the position. When the probability value is equal to or greater than the threshold value or larger than the threshold value, it is determined that the inspected object still has a defect, that is, the inspected object is a defective product, and the process ends. On the other hand, when the probability value is less than the threshold value or less than the threshold value, the arithmetic circuit 10 determines that there is no defect, and the process proceeds to step S30.
  • step S30 the arithmetic circuit 10 executes the update process of the database 14Z.
  • the image, attribute, and detection result of the object to be inspected which is once determined to be a defect candidate, are registered in the storage device 14 as a good product, and an offset table is created according to the presence or absence of a similar tendency of the image feature amount. This is the process of updating or deleting. A specific description of the database 14Z update process will be described later with reference to FIG.
  • step S28 the processing of the arithmetic circuit 10 ends. After that, for example, an inspector visually checks whether or not the inspected object has a defect. You may judge.
  • FIG. 12 is a process of generating an offset table, which is a prerequisite for executing step S30 of FIG.
  • the process of updating the database 14Z is also performed, but the process of updating will be described later with reference to FIG.
  • FIG. 12 is a flowchart showing the procedure of the database registration process. This flowchart is executed by the arithmetic circuit 10.
  • step S40 the arithmetic circuit 10 newly registers a non-defective image, an attribute, and a detection result in the storage device 14.
  • the database 14Z is generated.
  • Good product image refers to an image of an article judged to be "good product”.
  • the articles judged to be "non-defective” are not limited to the articles judged to be non-defective from the beginning. That is, an inspected object that is once determined to be defective and then determined to be a non-defective product, and an inspected object that is determined to be a non-defective product as a result of the processing according to the present disclosure described later are also included.
  • the "detection result" includes the detected range, the defect class, and the probability of the defect.
  • the detected range can be represented by the coordinates of the upper left corner and the coordinates of the lower right corner. Even if it is a non-defective product, the over-detection state differs depending on the sample, so it is registered as a separate and independent detection result.
  • step S42 the arithmetic circuit 10 executes a similar tendency confirmation process.
  • the "similarity tendency confirmation process” is to cluster non-defective images based on the same image feature amount of non-defective images having the same attributes, and if there is a cluster containing non-defective images in a predetermined ratio or more, such clustering. It is a process to save the classifier that realizes. The fact that the classifier was obtained means that the convolutional neural network 12n overdetected an image having a specific attribute and a specific image feature amount.
  • the similar tendency confirmation process will be described later with reference to FIGS. 13 and 14.
  • step S44 the arithmetic circuit 10 determines whether or not there is a similar tendency from the result of the similarity tendency confirmation process performed in step S42. If there is a similar tendency, the process proceeds to step S44, and if there is no similar tendency, the process ends without generating an offset table.
  • step S46 the arithmetic circuit 10 generates an offset table and registers it in the database 14Z.
  • an offset table is generated, and thereafter, when it is determined that an image having the same attribute and image feature amount is a defect, the defect determination criterion (threshold value) can be changed. This will be described with reference to FIG. 15 after the offset table generation process.
  • the processing of registering the offset table in the database 14Z is completed.
  • the offset table 14c is registered in the database 14Z as shown in FIG.
  • the similarity tendency confirmation process is a process of generating an offset table when the non-defective product image newly registered in step S40 of FIG. 12 tends to be similar in relation to the non-defective product image already registered in the database 14Z. be. Since the similarity tendency confirmation process is performed according to the attributes of the inspected object, the target attributes are determined in advance when the process is executed.
  • FIG. 13 is a flowchart showing the procedure of the similarity tendency confirmation process. This flowchart is executed by the arithmetic circuit 10.
  • step S50 the arithmetic circuit 10 extracts n images (n: an integer of 2 or more) from the database 14Z from the latest non-defective image among the non-defective images having the target attribute.
  • step S52 the arithmetic circuit 10 cuts out an over-detection region of one or a plurality of non-defective images in which over-detection has occurred from the extracted n non-defective images.
  • step S54 the arithmetic circuit 10 extracts a predetermined image feature amount.
  • the amount of image features to be extracted is predetermined.
  • the image feature amount may be, for example, a feature amount extracted by the convolutional neural network 12n or a GLCM feature amount.
  • the number of image features to be extracted is arbitrary.
  • step S56 the arithmetic circuit 10 executes the clustering process on the non-defective image of the same attribute including the over-detected non-defective image.
  • the K-means method can be used. Since the K-means method is a known technique, a specific description thereof will be omitted. A known clustering technique other than the K-means method may be used.
  • step S58 the arithmetic circuit 10 determines whether or not the number of samples belonging to the cluster including the over-detected non-defective image occupies m% (m: 0 or more and 100 or less real number, for example, 60) or more of the total number of samples. ..
  • m% 0 or more and 100 or less real number, for example, 60
  • the process proceeds to step S60. If it is less than m%, there is no similar tendency, and it is presumed that overdetection occurred suddenly. The process ends there.
  • step S60 the arithmetic circuit 10 stores the cluster classifier in the storage device 14.
  • FIG. 14 is a diagram for specifically explaining steps S56 and S58 of FIG.
  • Each non-defective image is plotted using two-dimensional image features.
  • the horizontal axis is the image feature amount related to brightness
  • the vertical axis is the GLCM feature amount related to contrast.
  • Cluster A is a plurality of points s on which the image features of the image determined to be defective by the convolutional neural network 12n are plotted and each image feature of the non-defective image group already registered in the database 14Z is plotted. Includes point a and.
  • step S58 of FIG. 12 determines in step S58 of FIG. 12 whether or not Q ⁇ m.
  • Q ⁇ m the image corresponding to the point s can be presumed to be over-detected like the non-defective image in which over-detection once occurred. Therefore, in step S60 of FIG. 13, it was decided to save the cluster classifier used for clustering and use it for the subsequent determination of the image of the object to be inspected.
  • the offset table generation / update process is a process executed in step S46 of FIG.
  • FIG. 15 is a flowchart showing the procedure of the offset table generation / update process. This flowchart is executed by the arithmetic circuit 10.
  • step S70 the arithmetic circuit 10 extracts n images from the database 14Z from the latest non-defective image among the non-defective images having the target attribute. This process is the same as step S50 in FIG. 13, but "n" does not have to be the same value.
  • step S72 the arithmetic circuit 10 generates an average image of n extracted non-defective images.
  • the pixel value at the position of the coordinates (x, y) of the average image is the average value of the pixel values of the coordinates (x, y) of each of the extracted n non-defective images.
  • step S74 the arithmetic circuit 10 inputs the average image to the convolutional neural network 12n, and generates an offset table using the output result.
  • the average image represents a typical non-defective image.
  • the average image is input to the convolutional neural network 12n, and defect detection processing is performed. Then, a defect candidate region can be detected in the average image. This is because the convolutional neural network 12n also detects a defect candidate region even for a non-defective image having an image feature amount of points belonging to the cluster A in FIG.
  • the detection result may include one or more defect candidate regions.
  • the defect class and the probability value can be output for each defect candidate area.
  • the arithmetic circuit 10 generates an offset table in which an offset value (type 1 offset value) corresponding to the magnitude of the probability value is described in one or a plurality of partial regions.
  • the generated offset table is similar to, for example, the offset table 14c of FIG.
  • step S76 the arithmetic circuit 10 extracts a defect candidate region for each defect class.
  • This process means preparing an offset table for each defect class. If the offset table contains defect candidate regions, it can be said that the convolutional neural network 12n has overdetected the defect class. Therefore, the defect candidate region can also be called an “overdetection region”.
  • step S78 the arithmetic circuit 10 sets the value of the region other than the overdetection region to 0 in the offset table for each defect class. As a result, the second type offset value is described in the offset table.
  • step S80 the arithmetic circuit 10 saves the offset table for each defect class in the database.
  • an offset table for each defect class is prepared in the database 14Z.
  • an offset table 14c for one defect class for example, defect class: scratch
  • FIG. 16 is a flowchart showing the procedure of the update process of the database 14Z.
  • step S44 determines whether there is a similar tendency or not. If it is determined in step S44 that there is a similar tendency, the process proceeds to step S96, and if it is determined that there is no similar tendency, the process proceeds to step S98.
  • step S96 the arithmetic circuit 10 updates the offset table.
  • step S98 the arithmetic circuit 10 deletes the offset table.
  • the reason for deleting the offset table is to reduce the risk of failing to detect defects. Setting the offset slightly increases the risk of undetection. Therefore, when it is judged that there is no similar tendency, the offset table is deleted assuming that the tendency of over-detection has disappeared, and the risk of undetection is suppressed.
  • FIG. 17 is a flowchart showing the procedure of the offset table application process. This flowchart is executed by the arithmetic circuit 10.
  • step S100 the arithmetic circuit 10 loads an offset table having the same attributes as the one to be inspected from the storage device.
  • the attributes of the object to be inspected are determined based on the attribute data acquired in step S22 of FIG.
  • step S102 the arithmetic circuit 10 cuts out a partial region of the image of the object to be inspected.
  • the position of the partial region to be cut out corresponds to, for example, the position in the offset table 14c (FIG. 8) in which the first type offset value (non-zero value) is described.
  • step S104 the arithmetic circuit 10 inputs the image feature amount of the cut out partial region into the cluster classifier saved in step S60 of FIG.
  • step S106 the arithmetic circuit 10 determines whether or not the image feature amount of the partial region is classified into a cluster including overdetection.
  • the cluster including over-detection is cluster A in the example of FIG. If the image feature amount is classified into a cluster including over-detection, the process proceeds to step S108, and if it is not classified, the process ends.
  • step S108 the arithmetic circuit 10 adds the first type offset value to the determination standard (threshold value) of the cut out partial region. This process corresponds to the process described with reference to FIG.
  • the threshold value of the reference table is updated to a larger value.
  • the image of the object to be inspected used for the determination of the deformation example may be acquired by the visual inspection apparatus 100 by taking an image of one or a plurality of articles in real time by the imaging apparatus (camera). Alternatively, after being photographed once, it may be stored in a large-capacity storage device, read from the large-capacity storage device, and acquired by the visual inspection device 100. An example of the latter will be described.
  • FIG. 18 shows the configuration of the visual inspection system 1100 according to the modified example.
  • the visual inspection system 1100 has a visual inspection device 100 and a secondary storage device 310 connected to the communication network 300.
  • the communication network 300 is, for example, a wide area network (WAN) such as the Internet, or a premises communication network (LAN) laid on the premises of a company or the like.
  • WAN wide area network
  • LAN premises communication network
  • the imaging device 30 is also connected to the communication network 300, the imaging device 30 is not an essential component of the visual inspection system 1100 at the time when the visual inspection device 100 performs the visual inspection.
  • the secondary storage device 310 is a so-called cloud storage. In this modification, the secondary storage device 310 receives and stores the image data of the object to be inspected taken and transmitted by the image pickup device 30 via the communication network 300.
  • the interface device 22d of the visual inspection device 100 receives the image data of the object to be inspected from the secondary storage device 310 via the communication network 300.
  • the arithmetic circuit 10 acquires the image data received by the interface device 22d, stores it in, for example, the storage device 14, and executes the above-described processing.
  • the visual inspection system and computer program according to the present disclosure can be suitably used for visual inspection of an article or part at a manufacturing site such as a factory.

Landscapes

  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

【課題】欠陥の検出漏れを抑えながら、過検出を抑制する技術を提供する。 【解決手段】被検査物の画像を利用して被検査物の良否を判定する外観検査システム等を提供する。外観検査システムは、良品画像、複数の閾値が記述された基準テーブル、および複数のオフセット値が記述されたオフセットテーブルを記憶した記憶装置と、演算回路とを備える。複数の閾値の各々は、対応付けられた複数の部分領域の各々に含まれる被検査物の像が欠陥を表していると判定するための基準である。演算回路は、部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理を実行する。部分画像の画像特徴量が過検出クラスに分類される場合、演算回路はさらに、部分領域の位置における基準テーブルの閾値を、オフセット値を用いて変更し、変更後の基準テーブルを用いて欠陥の像が被検査物の画像に含まれているか否かを判定する。

Description

外観検査システムおよびコンピュータプログラム
 本開示は、外観検査システムおよびコンピュータプログラムに関する。
 従来、被検査物を撮影して取得した画像を、基準となる物品の画像(基準画像)と比較することにより、被検査物に欠陥が存在するか否か、すなわち被検査物が良品であるか否か、を判定する外観検査が行われている。
 従来の外観検査装置では、良否判定のための判定基準を十分な検証を行った後、人手により装置に設定する。形状や表面の模様がよく変化する対象を検査する場合には、判定基準をこまめに変更する必要があるため、効率的な運用が困難であった。
 例えば日本国公開公報特開2013-224833号公報は、良否判定の判定基準を特定の画素毎に定義し、輝度の平均値/標準偏差を用いて判定基準を自動的に設定する技術を開示する。日本国公開公報特開2013-224833号公報の技術によれば、人手による判定基準のこまめな変更を省略化でき、外観検査のより効率的な運用が可能である。
日本国公開公報:特開2013-224833号公報
 しかしながら、日本国公開公報特開2013-224833号公報では、過検出を抑制すると、画素値のばらつきが大きい箇所の判定基準が緩くなり、欠陥の検出もれが発生してしまうおそれがあった。
 本開示は、欠陥の検出漏れを抑えながら、過検出を抑制する外観検査システムおよびコンピュータプログラムを提供する。
 本開示による例示的な外観検査システムは、被検査物の画像を利用して前記被検査物の良否を判定する外観検査システムであって、良品と判定された複数の物品が撮影された複数の画像、複数の閾値が記述された基準テーブル、および複数のオフセット値が記述されたオフセットテーブルを記憶した記憶装置と、被検査物の画像データおよび製造条件に関する属性を示す属性データを受け取るインタフェース装置と、演算回路とを備える。前記被検査物の画像および前記複数の画像の各々は、複数の部分領域を含む。前記基準テーブルの前記複数の閾値の各々および前記オフセットテーブルの前記複数のオフセット値の各々は、前記複数の部分領域の各々に対応付けて設定されている。前記複数の閾値の各々は、対応付けられた前記複数の部分領域の各々に含まれる前記被検査物の像が欠陥を表していると判定するための基準である。前記複数のオフセット値は、前記複数の閾値の一部を変化させる第1種のオフセット値および残りの一部を変化させない第2種のオフセット値を含む。前記演算回路は、(a)前記画像データに予め定められた欠陥検出処理を行い、少なくとも1つの欠陥の像が前記被検査物の画像に含まれている場合には前記被検査物を欠陥候補として抽出する処理を実行する。また、前記演算回路は、(b)前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理であって、切り出される前記部分画像の位置は、前記オフセットテーブル中の前記第1種のオフセット値が対応付けられた部分領域の位置である、処理を実行する。また、前記演算回路は、(c)切り出した前記部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理であって、前記過検出クラスは、前記第1種のオフセット値が対応付けられた部分領域の位置における、前記複数の画像の各部分画像の画像特徴量が所定以上の割合で分類されるクラスである、処理を実行する。また、前記演算回路は、(d)切り出した前記部分画像の画像特徴量が前記過検出クラスに分類される場合に、前記部分領域の位置における前記基準テーブルの閾値を、前記第1種のオフセット値を用いて変更して、前記被検査物の像が欠陥を表していると判定するための基準をより高くする処理を実行する。また、前記演算回路は、(e)前記閾値を変更した前記基準テーブルを用いて、少なくとも1つの欠陥の像が前記被検査物の画像に含まれているか否かを判定する処理を実行する。
 本開示による例示的なコンピュータプログラムは、被検査物の画像を利用して前記被検査物の良否を判定する外観検査システムの演算回路によって実行されるコンピュータプログラムである。前記外観検査システムは、良品と判定された複数の物品の各々が撮影された複数の画像、複数の閾値が記述された基準テーブル、および複数のオフセット値が記述されたオフセットテーブルを記憶した記憶装置と、被検査物の画像データを受け取るインタフェース装置と、前記演算回路とを備える。前記被検査物の画像および前記複数の画像の各々は、複数の部分領域を含む。前記基準テーブルの前記複数の閾値の各々および前記オフセットテーブルの前記複数のオフセット値の各々は、前記複数の部分領域の各々に対応付けて設定される。前記複数の閾値の各々は、対応付けられた前記複数の部分領域の各々に含まれる前記被検査物の像が欠陥を表していると判定するための基準である。前記複数のオフセット値は、前記複数の閾値の一部を変化させる第1種のオフセット値および残りの一部を変化させない第2種のオフセット値を含む。前記コンピュータプログラムは前記演算回路に、(a)前記画像データに予め定められた欠陥検出処理を行い、少なくとも1つの欠陥の像が前記被検査物の画像に含まれている場合には前記被検査物を欠陥候補として抽出する処理を実行させる。また、前記コンピュータプログラムは、(b)前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理であって、切り出される前記部分画像の位置は、前記オフセットテーブル中の前記第1種のオフセット値が対応付けられた部分領域の位置である、処理を実行させる。また、前記コンピュータプログラムは、(c)切り出した前記部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理であって、前記過検出クラスは、前記第1種のオフセット値が対応付けられた部分領域の位置における、前記複数の画像の各部分画像の画像特徴量が所定以上の割合で分類されるクラスである、処理を実行させる。また、前記コンピュータプログラムは、(d)切り出した前記部分画像の画像特徴量が前記過検出クラスに分類される場合に、前記部分領域の位置における前記基準テーブルの閾値を、前記第1種のオフセット値を用いて変更して、前記被検査物が欠陥を表していると判定するための基準をより高くする処理を実行させる。また、前記コンピュータプログラムは、(e)前記閾値を変更した前記基準テーブルを用いて、少なくとも1つの欠陥の像が前記被検査物の画像に含まれているか否かを判定する処理を実行させる。
 本開示にかかる例示的な実施形態によれば、未検出の発生を最低限に抑えながら、過検出を抑制することが可能になる。
図1は、外観検査装置100を有する、本開示の外観検査システム1000の構成例を示す図である。 図2は、主として外観検査装置100の構成例を模式的に示す図である。 図3は、記憶装置14内のデータベース14Zの一例を示す図である。 図4は、ワーク70を撮影した画像データの一例を模式的に示す図である。 図5は、複数の部分領域72に分けられたワーク70の画像の例を示す図である。 図6は、外観検査処理の手順を示すフローチャートである。 図7は、ある部分領域72bに傷が存在するときの欠陥検出処理の結果の一例を示す図である。 図8は、オフセットテーブル14c(上段)と、ワーク70の画像72から切り出される部分画像の位置(下段)とを模式的に示す図である。 図9は、図6のステップS8の処理を説明するための図である。 図10は、図6のステップS10を説明するための図である。 図11は、外観検査処理の具体的な手順を示すフローチャートである。 図12は、データベース登録処理の手順を示すフローチャートである。 図13は、類似傾向確認処理の手順を示すフローチャートである。 図14は、図13のステップS56およびS58を具体的に説明するための図である。 図15は、オフセットテーブルの生成・更新処理の手順を示すフローチャートである。 図16は、データベース14Zの更新処理の手順を示すフローチャートである。 図17は、オフセットテーブルの適用処理の手順を示すフローチャートである。 図18は、変形例にかかる外観検査システム1100の構成を示す図である。
 以下、添付の図面を参照しながら、本開示にかかる外観検査システムの実施形態を説明する。本明細書では、必要以上に詳細な説明は省略する場合がある。たとえば、既によく知られた事項の詳細説明や実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になるのを避け、当業者の理解を容易にするためである。なお、本発明者は、当業者が本開示を十分に理解するために添付図面および以下の説明を提供するのであって、これらによって特許請求の範囲に記載の主題を限定することを意図しない。以下の説明においては、同一または類似する構成要素には、同一の参照符号を付している。
 1.外観検査システムの構成
 図1は、外観検査装置100を有する、本開示の外観検査システム1000の構成例を示す図である。図2は、主として外観検査装置100の構成例を模式的に示す図である。
 図示されている例において、外観検査システム1000は、撮像装置30と、外観検査装置100と、モニタ130とを有している。外観検査装置100、入力装置120およびモニタ130は、汎用的なデジタルコンピュータシステム、例えばPCによって実現され得る。また撮像装置30は、デジタルスチルカメラであり得る。撮像装置30は、図示されない有線の通信ケーブルまたは無線通信回線で外観検査装置100と通信可能に接続されている。モニタ130は、図示されない有線の通信ケーブルで外観検査装置100と通信可能に接続されている。
 撮像装置30は被検査物を撮像し、撮像によって取得した画像データを外観検査装置100に送る。外観検査装置100は、後述の手順にしたがって、撮像装置30から受け取った画像データに基づき被検査物の外観検査を行う。
 図1を参照しながら、外観検査システムにおいて行われる被検査物の外観検査の手順を説明する。被検査物は、外観検査の対象となるさまざまな製品または部品などの各種の物品である。以下、被検査物を「ワーク」と称する場合がある。
 ワーク70は、移送台62に乗せられ、把持機構によって移送台62に固定される。ワーク70は、例えば、ハードディスクドライブの完成品、モータが組み込まれたハードディスクドライブの筐体等である。
 移送台62は、ワーク70を乗せたまま、搬送ステージ64によって水平方向に移動可能である。撮像装置30は搬送ステージ64を視野に含むよう、搬送ステージ64の上方でサポート部材60によって支持されている。撮像装置30は、視野内のワーク70の撮像を行う。ワーク70は、ロボットアームに把持されて撮像ポジションに置かれてもよい。なお、撮像にあたっては光源(図示せず)がワーク70を照らしてもよい。
 撮像によって取得された画像データは、撮像装置30から外観検査装置100に送られる。1回の撮像によって取得される画像のサイズの一例は横1600画素、縦1200画像であり、他の一例は横800画素、縦600画像である。
 次に、図2を参照する。
 外観検査装置100は、演算回路10と、メモリ12と、記憶装置14と、通信回路16と、画像処理回路18とを有している。構成要素同士はバス20で通信可能に接続されている。また外観検査装置100は、撮像装置30との通信を行うインタフェース装置22aと、入力装置120との通信を行うインタフェース装置22bと、モニタ130に映像データを出力するインタフェース装置22cとを有する。インタフェース装置22aの一例は、映像入力端子またはイーサネット端子である。インタフェース装置22bの一例は、USB端子である。インタフェース装置22cの一例は、HDMI(登録商標)端子である。これらの例に代えて、他の端子をインタフェース装置22a~22cとして利用してもよい。なお、インタフェース装置22a~22cは、無線通信を行うための無線通信回路であってもよい。そのような無線通信回路として、例えば2.4GHz/5.2GHz/5.3GHz/5.6GHz等の周波数を利用して無線通信を行う、Wi-Fi(登録商標)規格に準拠した無線通信回路が知られている。
 演算回路10は、例えば中央演算処理装置(CPU)またはデジタル信号処理プロセッサなどの集積回路(IC)チップであり得る。メモリ12は、演算回路10の動作を制御するコンピュータプログラム12pが格納され、後述の学習済み畳み込みニューラルネットワーク12nが構築された記録媒体である。なお、学習済み畳み込みニューラルネットワーク12nの実体は、入力層、中間層および出力層を構成する各人工ニューロンに付与される複数のパラメータである。複数のパラメータは、各人工ニューロンへの複数の入力の各々に適用される重みと、入力の重み付き和(入力と重みとの積の総和)と比較される閾値を含む。ニューラルネットワーク12nが演算し、結果を出力するためには、実際には演算回路10の処理が必要になることに留意されたい。なお、メモリ12上のニューラルネットワーク12nをなす複数のパラメータと、ニューラルネットワーク12nに関する演算回路10の演算機能とを一体化したハードウェア(特定用途向け集積回路(ASIC)、GPGPU、プログラマブルロジックデバイス)を採用してもよい。
 メモリ12は、単一の記録媒体である必要はなく、複数の記録媒体の集合であり得る。メモリ12は、例えばRAMなどの半導体揮発性メモリおよびフラッシュROMなどの半導体不揮発性メモリを含み得る。メモリ12の少なくとも一部は、取り外し可能な記録媒体であってもよい。
 記憶装置14は、種々のデータの集合であるデータベースを格納する。図3は、記憶装置14内のデータベース14Zの一例を示している。具体的には、記憶装置14は、良品と判定された複数の物品の各々が撮影された複数の画像14a、複数の閾値が記述された基準テーブル14b、および複数のオフセット値が記述されたオフセットテーブル14cを記憶している。さらに記憶装置14は、被検査物の製造条件に関する属性を示す属性データ14dを記憶していてもよい。記憶されている各データの内容等は後に詳述する。
 再び図2を参照する。
 撮像装置30は、被検査対物の画像のデータを生成するための画像信号を出力する装置である。画像信号は、有線または無線により、演算回路10に送られる。撮像装置30の典型例は、多数のフォトダイオードが行列状に配列されたCMOSイメージセンサまたはCCDイメージセンサなどのエリアセンサを備えるカメラである。撮像装置30は、被検査物のカラー画像またはモノクローム画像のデータを生成する。撮像装置30には、外観検査用の各種カメラを使用することができる。
 図4は、ワーク70を撮影した画像データの一例を模式的に示している。画像データは、ワーク70の像を含むフレーム画像である。本実施形態における例示的な画像は、ワーク70の表面が有する凹凸および模様を反映した256階調の画素値(「明るさ」または「グレースケール」の値)の配列である。画素値を輝度値または濃度と称する場合がある。フレーム画像がカラー画像である場合には、例えば、それぞれが256階調で表現される赤色、緑色および青色の3色で画素値が定義され得る。本明細書では、階調値、輝度値等を包括的に「画像特徴量」と呼ぶこともある。ただし、「画像特徴量」は画素値に関する特徴を意味するだけでなく、例えば画像の基本的な性質を評価する輝度ヒストグラム統計量、画素間のコントラストの強弱や画素のまとまり具合などの局所的な特徴を表すことができる、グレーレベルの同時生起行列(Grey Level Co-occurrence Matrix;GLCM)特徴量も含み得る。
 1枚のフレーム画像には、ワーク70以外に移送台62の一部が背景70Bとして含まれ得る。図4の例において、線52Lによって囲まれた領域52が「検査領域」である。1枚のフレーム画像は、複数の検査領域52を含んでいてもよい。
 フレーム画像中のワーク70の位置は、フレーム画像内において予め決められた位置に整合するようにアライメントが実行される。このアライメントは、ワーク70の複数の基準点を撮像装置30の視野における複数の基準点に一致させることである。このようなアライメントの第1段階は、撮像装置30のレンズ光軸に対するワーク70の物理的な配置関係を調整することである。アライメントの第2段階は、撮像された画像の画素位置(座標)を調整することである。第2段階のアライメントは、画像処理技術によって画像の並進、回転、拡大および/または縮小などを行うことを含む。このようなアライメントの結果、各ワーク70の検査領域52は、常に線52Lによって囲まれた領域に整合する。こうして、各ワーク70の検査領域52の画像を、部分領域単位で処理することが可能になる。なお、上述のアラインメントは、主として演算回路10または画像処理回路18によって実行され得るが、演算回路10または画像処理回路18からの指令に従い、撮像装置30の姿勢を変化させる機構(図示せず)が撮像装置30を搬送ステージ64に平行な平面内で回転させ、または平行移動させることによって実行されてもよい。
 モニタ130は、画像処理装置100が実行した判別の結果などを表示する装置である。モニタ130は、撮像装置30によって取得された画像を表示することもできる。
 入力装置120は、選択領域の指定を含むユーザからの入力を受け取り、演算回路10に与える入力デバイスである。入力装置120の一例は、タッチパネル、マウスおよび/またはキーボードである。モニタ130および入力装置120は、演算回路10に有線によって常に接続されている必要はなく、通信インタフェースを介して無線または有線によって必要なときだけ接続されていてもよい。モニタ130および入力装置120は、ユーザが携帯する端末装置またはスマートフォンであってもよい。
 2.外観検査の概要
 本開示にかかる外観検査システム1000は、画像を利用して被検査物に欠陥が存在するか否かを判定する。例示的な実施形態にかかる外観検査システム1000は、ニューラルネットワークを用いて、被検査物の画像内に欠陥の像が存在するか否かを判定する。欠陥の有無は、物品画像を複数の部分領域に分けたときの部分領域ごとに判定される。
 図5は、複数の部分領域72に分けられたワーク70の画像の例を示している。複数の部分領域72は格子状である。図5には、複数の部分領域72を構成する1つの部分領域72aが例示されている。複数の部分領域72は、全体としてワーク70の検査領域52を完全に含むよう、ワーク70の像よりも若干大きく設定されている。
 外観検査システム1000は、例えば部分領域72aを構成する全ての画素の画素値をニューラルネットワークへの入力として利用して、ニューラルネットワークからの出力を得る。本実施形態では、「汚れ」、「異物」、「傷」等の各種の欠陥の像と、各欠陥の名称とを教師信号として利用して予め学習が行われた畳み込みニューラルネットワーク12nが使用される。本明細書では、欠陥の種類を「クラス」と呼ぶ。部分領域72aの全ての画素の画素値がニューラルネットワークへ入力され、その結果、欠陥が存在すると判定されると、ニューラルネットワークは、該当すると考えられる欠陥のクラス名を出力する。
 さらに本実施形態では、欠陥のクラス名の出力とともに、ニューラルネットワークへ入力された像と正常であると判定される標準的な像とが一致しない程度の大きさを示す値を出力する。出力される値を、本明細書では欠陥である可能性の高さを示す「確率値」と呼ぶことがある。
 確率値の算出方法は種々考えられる。いま、欠陥がハードディスクドライブの筐体表面の「傷」であるとする。アルミプレートの上のコーティングに傷が入ると、コーティングの反射率よりもアルミプレートの反射率の方が高いため、傷の画像の輝度値は、傷が存在しない場合の画像の輝度値よりも高くなる。傷を含む部分領域の画像を畳み込みニューラルネットワークに入力すると、畳み込みニューラルネットワークの中間層からは、入力された部分領域の画像の輝度値に関する画像特徴量を得ることができる。抽出された各画像特徴量は、入力された部分領域の画像のハッシュ値として取り扱われる。また、例えば記憶装置14に記憶された、良品と判定された複数の物品の各々が撮影された複数の画像14aのいずれかを用いると、畳み込みニューラルネットワークの中間層からは、欠陥と判定された部分領域の位置に対応する、良品画像の部分領域の輝度値に関する画像特徴量も抽出することができる。入力された部分領域の画像のハッシュ値と、その部分領域の標準的な画像のハッシュ値とを比較したとき、ハッシュ値が近いほど両者は類似し、ハッシュ値が遠いほど両者は類似していないと言える。そこで、両者のハッシュ値の差が大きくなるほど100に近づく値を割り当て、差が小さくなるほど0に近づく値を割り当てることで、欠陥を含むと判断された各部分領域について、上述の「確率値」を得ることができる。なお、欠陥であると判定された部分領域の画像の確率値は、例えば少なくとも50%以上の値になるよう調整され得る。上述の、CNNによって抽出した画像特徴量をハッシュ値として抽出する技術は、公知である。よって詳細な説明は省略する。
 ニューラルネットワークから出力された欠陥のクラス名および確率値は、ニューラルネットワークの学習結果に基づく欠陥候補検出結果である。
 ところで、ある物品が欠陥を含むと判定された場合であっても、実際には欠陥には該当しないと判定される場合があり得る。例えば、物品の表面に汚れが着いているものの、その程度は小さく、機能的な問題および外観上の問題が実質的には生じない場合である。従来の外観検査では、熟練した検査員が物品を目視することにより、そのような汚れは欠陥には該当しないと判定していた。
 例示的な実施形態にかかる外観検査システム1000は、一旦、物品が欠陥を含むと判定した場合であっても、良品と判定された複数の物品との関係を踏まえて欠陥の判定基準を変更し、それでも欠陥が存在すると言えるかどうかを改めて判定する。本来は良品と判定すべき物品であるにも拘らず欠陥が存在すると判定することを、本明細書では「過検出」と呼ぶ。過検出が発生すると物品の歩留まりが下がり、改修等の対象とせざるを得ず、物品のコストが上昇する。そのような過検出を抑制するため、これまでの経験を踏まえて、良品と判定される範囲を広げることにより過検出を抑制するよう、欠陥の判定基準を変更することとした。
 なお、過検出を抑制するために当初から欠陥の判定基準を緩和するという方法も考えられる。しかしながら、過検出を抑制するあまり、本来欠陥と判定すべきところを良品と判定してしまう、つまり欠陥の未検出が発生するのでは外観検査の目的を達成できない。
 例示的な実施形態にかかる外観検査システム1000は、まずは明確に良品と判定される基準で良品であるか否かを判定し、良品ではなく欠陥が存在すると判定した場合には、それまでに良品と判定された複数の物品との関係を踏まえて欠陥の判定基準を緩和することとした。
 具体的な処理の概要は以下のとおりである。
 外観検査システム1000が外観検査を行う際には、下記のデータが記憶装置14に予め保存されている。
 (a)良品と判定された複数の物品の各々が撮影された複数の画像
 (b)複数の閾値が記述された基準テーブル
 (c)複数のオフセット値が記述されたオフセットテーブル
 上記(a)について説明する。
 良品と判定された物品は、当初から良品と判定された物品に限られない。一旦は欠陥ありと判定され、その後、例えば検査員による目視判定等によって良品と判定された被検査物、および、後述の本開示にかかる処理の結果、良品と判定された被検査物も含まれる。後二者を含めることによって良品と判定される画像の特徴の範囲を広げることができる。「複数の画像」の各々は、1個の物品の像のみを含んでもよいし複数の物品の像を含んでもよい。良品と判定された各物品の画像は、欠陥の存否を判定する基準を変更するために用いられる。
 上記(b)について説明する。
 「複数の閾値」の各々は、画像を複数の部分領域に分けたときの各部分領域に対応付けられた閾値である。各閾値は、一旦欠陥ありと判定された被検査物について、改めて欠陥の有無を判定する際に、各部分領域が欠陥の像を含むか否かを判定するための基準として利用される。本実施形態では、「複数の閾値」の各々の初期値は、例えば「0.5」である。閾値が1に近いほど、明らかな欠陥等のみが「欠陥」と判定される。つまり、閾値が1に近いほど欠陥であると判定されにくくなる。複数の閾値の各々は、次に説明する「複数のオフセット値」の各々によって、より高い閾値に更新され得る。
 なお、部分領域は、連続する複数の画素からなる領域であってもよいし、1個の画素からなる領域、すなわち1個の画素の大きさで定義される領域であってもよい。物品画像がカラーで表現される場合には、1画素は、例えば互いに隣接して配置される、赤、緑、青の三つのサブ画素の大きさで定義される領域であり得る。
 上記(c)について説明する。
 「複数のオフセット値」は、基準テーブルに記述された複数の閾値を更新するために用いられる。本実施形態にかかる処理によってある部分領域のオフセット値が算出されると、欠陥であると判定するための基準がより高くなるよう、当該部分領域の閾値が当該オフセット値に従って更新される。例えば、現在の閾値とオフセット値とを加算して得られた値を、新たな閾値として更新する。これにより、欠陥であると判定するための基準をより高くすることが可能になる。
 なお、「複数のオフセット値」は、閾値を更新するためのオフセット値に限られず、閾値を更新しないオフセット値、つまり現在の値を維持するオフセット値を含んでもよい。後述の実施形態の説明では、現在の値を維持するオフセット値(第1種のオフセット値)と、閾値を更新するためのオフセット値(第2種のオフセット値)とを両方有する態様を例示して説明する。
 現在の値を維持するオフセット値を使用すると、全ての部分領域を対象として演算を行うことになるため、演算処理のプログラムを簡単化できる。例えば、各部分領域の現在の閾値にオフセット値を加算する場合には、閾値を更新しないオフセット値には0を設定し、閾値を更新するオフセット値には0より大きい値を設定し、全ての部分領域に関して現在の閾値にオフセット値を加算する演算処理をプログラミングすればよい。他方、特定の部分領域の閾値のみにオフセット値を加算する場合には、閾値の更新を行う対象となる部分領域を指定する操作が必要になるため、演算処理のプログラミングが複雑化し得る。
 一旦は欠陥の像を含むと判定された物品画像について、外観検査システム1000は、欠陥であると判定するための基準をより高くした閾値を用いて、再度当該物品画像の各部分領域が欠陥の像を含むか否かを判定する。
 物品画像内のいずれの部分領域も欠陥の像を含まないと判定したときは、外観検査システム1000は、当該物品画像を、上記(a)に示す「複数の画像」の一つとして登録する。一方、物品画像内のいずれかの部分領域が引き続き欠陥の像を含むと判定したときは、外観検査システム1000は、当該物品画像の物品が欠陥を含むと判定する。
 上記処理によれば、未検出を防ぎつつ、過検出を抑制することが可能になる。
 本実施形態では、上述した「欠陥」を複数のクラスに分け、クラスごとに欠陥か否かを判定する。複数のクラスを例示すると、「汚れ」、「異物」、「傷」、「バリ」、「欠け」、「変形」、「色ムラ」、「凹凸」、「曇り」である。被検査物の画像には、上述した1または複数のクラスの「欠陥」が存在し得る。一方、良品の画像(上記(a))には、上述した1または複数のクラスの、一度は「欠陥」と判定された特徴が存在し得る。そこで、上記(b)の基準テーブル、上記(c)のオフセットテーブルも欠陥のクラスごとに設け、クラスごとの欠陥の有無の判定にあたって利用すればよい。後述の実施形態においては、欠陥に相当する1つのクラスを例示して説明し、すべてのクラスについての説明は煩雑になるため省略する。
 画像データを取得した画像処理装置100は、前述した処理を実行してワーク70の外観検査を実行する。以下、この処理の内容をより詳しく説明する。
 3. 外観検査処理
 3.1 外観検査処理の考え方の説明
 図6は、外観検査処理の手順を示すフローチャートである。
 ステップS2において、演算回路10は、画像データに予め定められた欠陥検出処理を行い、少なくとも1つの欠陥の像が被検査物の画像に含まれている場合には被検査物を欠陥候補として抽出する。ここで言う「予め定められた欠陥検出処理」とは、上述した畳み込みニューラルネットワークを利用した欠陥検出処理である。欠陥検出処理によって、少なくとも1つの欠陥の像が被検査物の画像に含まれている場合には、当該被検査物を欠陥候補として抽出する。図7は、ある部分領域72bに傷が存在するときの欠陥検出処理の結果の一例を示している。この例では、畳み込みニューラルネットワークから出力された欠陥クラスは「傷」であり、欠陥である可能性の高さを示す「確率値」は0.75である。この結果、図7に示すワーク70は欠陥候補として抽出される。なお、図7には、1つの部分領域のみに欠陥が存在すると判定されているが、複数の欠陥が存在することもあり得る。その場合、「傷」以外の欠陥クラスが付与されることがあり得る。本明細書では、欠陥が存在すると判定された部分領域を「欠陥候補領域」と呼ぶことがある。
 再び図6を参照する。続くステップS4以降では、一旦欠陥を含むと判定された被検査物に対して、良品と判定された複数の物品との関係を踏まえて欠陥の判定基準を変更し、それでも欠陥が存在すると言えるかどうかを改めて判定する処理が行われる。
 以下の処理では、予め用意された、上述の「基準テーブル」および「オフセットテーブル」が利用される。本実施形態では、「オフセットテーブル」は、複数の閾値の一部を変化させる第1種のオフセット値および残りの一部を変化させない第2種のオフセット値を含む。各オフセット値を用いて、部分領域ごとに設定された欠陥であるか否かを判定するための判定基準の閾値を変化させ、または変化させずにそのまま維持する。なお、オフセットテーブルの作成方法については後に説明する。
 ステップS4において、演算回路10は、欠陥候補として抽出された被検査物の画像から部分画像を切り出す。切り出される部分画像の位置は、オフセットテーブル14c中の第1種のオフセット値が対応付けられた部分領域の位置である。
 図8は、オフセットテーブル14c(上段)と、ワーク70の画像72から切り出される部分画像の位置(下段)とを模式的に示す図である。格子状に設けられたオフセットテーブル14cの行および列の数は、複数の部分領域が区画された行および列の数と一致する。よって、オフセットテーブル14cの各要素の位置と、画像72に設定された各部分領域の位置とを対応付けることが可能である。
 図8の上段を参照すると、オフセットテーブル14cには、第1種のオフセット値(0以外の値)と第2種のオフセット値(0の値)とが存在する。このうち、第1種のオフセット値が割り当てられた各位置に対応する部分領域72b,72c,72d,72eの画像が、ステップS4の処理によって切り出される。
 再び図6を参照する。
 ステップS6において、演算回路10は、切り出した部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する。「過検出クラス」は、第1種のオフセット値が対応付けられた部分領域の位置における、複数の画像の各部分画像の画像特徴量が所定以上の割合で分類されるクラスである。
 「過検出クラス」をよりわかりやすく説明する。まず、良品であると判定された複数の画像を用意する。複数の画像は、かつての外観検査処理において過検出が生じた画像を含む。これらの複数の画像を対象として、過検出がなされた部分領域(以下、「過検出部分領域」と呼ぶ。)を切り出す。過検出部分領域に対してステップS2による欠陥検出処理を行うと、畳み込みニューラルネットワークの中間層からは、入力された部分領域の画像に関する1または複数の画像特徴量を得ることができる。得られた各画像特徴量を対象として所定のクラスタリング処理を行うと、1または複数のクラスタに分けることができる。その中で、最も多い数の要素を有するクラスタは、過去の複数の画像において過検出がなされやすい傾向があった画像特徴量が分類されているといえる。画像特徴量は、過検出が発生した欠陥クラス(以下、「過検出クラス」と呼ぶ。)に応じて異なり得る。ステップS6の処理は、ステップS4で抽出された部分画像が過検出クラスに属する画像特徴量
を有するか否かを判定する処理である。
 なお、畳み込みニューラルネットワークの中間層から抽出される画像特徴量の数が1つの場合には、画像特徴量の大きさに応じて一次元空間上でクラスタリングが行われ得る。画像特徴量の数がP(P:2以上の整数)の場合には、画像特徴量の大きさに応じてP次元空間上でクラスタリングが行われ得る。
 ステップS8において、演算回路10は、切り出した部分画像の画像特徴量が過検出クラスに分類される場合に、部分領域の位置における基準テーブルの閾値を、第1種のオフセット値を用いて変更する。これにより、被検査物が欠陥品であると判定するための基準をより高くする。
 切り出した部分画像の画像特徴量が過検出クラスに分類されたということは、当該画像特徴量は過検出がなされやすい傾向があったと言える。ステップS8の処理は、部分領域の位置における基準テーブルの閾値が高くなるよう更新してそのような過検出を抑制する意義を有する。
 図9は、図6のステップS8の処理を説明するための図である。引き続き、部分領域72b(図7)に欠陥が存在する場合を想定する。さらにステップS6において、部分領域72b(図7)から切り出した部分画像の画像特徴量が過検出クラスに分類されたとする。説明の便宜上、過検出クラスに分類された画像特徴量を有する部分画像は部分領域72b(図7)のみである。
 演算回路10は、基準テーブル14bおよびオフセットテーブル14cの、行および列が共通する各位置の閾値およびオフセット値を加算する。図9の例では、基準テーブル14bにおいて、部分領域72bに対応する位置72-1の値は「0.5」である。オフセットテーブル14cにおいて、部分領域72bに対応する位置72-2における第1種のオフセット値は「0.3」である。なお、オフセットテーブル14cでは、部分領域72b以外の部分領域に対応する各位置には、第2種のオフセット値「0.0」が設定されている。
 部分領域72bに対応する位置の閾値およびオフセット値を加算すると、「0.8」になる。加算によって得られる更新後の基準テーブル14b-2の位置72-3には「0.8」が記述されている。なお、過検出クラスに分類された画像特徴量を有する部分画像が部分領域72b(図7)のみであると仮定したため、更新前後の基準テーブル14bおよび14b-2の相違点は、位置72-3の閾値のみである。しかしながら、複数の画像特徴量が過検出クラスに分類された場合には、他の部分領域の位置の閾値が更新され得る。
 再び図6を参照する。
 ステップS10において、演算回路10は、閾値を更新した基準テーブル14b-2を用いて、少なくとも1つの欠陥の像が被検査物の画像に含まれているか否かを判定する。具体的には、ステップS2において欠陥の像が存在すると判定した部分領域72b(図7)について、既に得られている確率値と、基準テーブル14b-2の閾値とを比較する。比較の結果、演算回路10は、確率値が閾値以上、または閾値よりも大きい場合には、依然として欠陥が存在すると判定する。演算回路10は、確率値が閾値未満、または閾値以下の場合には、欠陥は存在しないと判定する。
 図10は、図6のステップS10を説明するための図である。演算回路10は、部分領域72bの位置の像が欠陥を含む確率値「0.75」と、その位置に対応する基準テーブル14b-2の閾値「0.8」とを比較する。確率値が閾値よりも小さいため、演算回路10は、ステップS2では一旦欠陥の像を含むと判定した部分領域72bには欠陥は存在しないと判定する。
 以上説明したように、一旦は欠陥と判定された場合であっても、過去の良品判定の結果において過検出を行ったときと類似する場合にのみ判定基準である閾値を更新する。その結果、欠陥の未検出を防ぎつつ、欠陥の過検出を抑制することが可能になる。
 3.2 外観検査処理の具体的な説明
 外観検査処理のより具体的な例を説明する。以下の説明では、被検査物の「属性データ」を導入する。被検査物の「属性データ」とは、各被検査物の製造条件に関する属性を示すデータである。図3の属性データ14dとして示されるように、製造条件に関する属性は、例えば各被検査物の製造時に使用された金型、製造ライン、製造工場、そして各被検査物の製造年月日である。属性データは、上述した金型、製造ライン、製造工場、製造年月日等の集合(グループ)から選択された少なくとも1つのデータであり得る。なお、属性データは、例えば名称を示す文字列、番号、記号および数値列の組み合わせで表現され得る。属性データは被検査物ごとに用意される。ただし、各被検査物の製造条件が共通している場合には、1つの属性データが被検査物ごとの属性データとして利用され得る。
 属性データを採用する理由を説明する。ある被検査物に欠陥が認められた場合、金型、製造ラインおよび/または製造工場等が共通する他の被検査物にも同様の欠陥が認められることが経験的に知られている。そのため、被検査物に欠陥が存在すると一旦判定された後で改めて欠陥の存否を判断する際には、属性が共通する複数の被検査物に対しては、共通する基準テーブルおよびオフセットテーブルを採用する。これにより、再度の欠陥判定の結果のぶれを低減できる。
 上述のとおり、採用する属性を決定した後は、属性の種類ごとに基準テーブルおよびオフセットテーブルの組を用意する。基準テーブルおよびオフセットテーブルの組は欠陥クラスごとに用意され得る。
 図11は、外観検査処理の具体的な手順を示すフローチャートである。このフローチャートは、メモリ12内の畳み込みニューラルネットワーク12nおよび記憶装置14内の種々のデータを利用して演算回路10によって実行される。
 まずステップS20において、演算回路10は被検査物の画像データを取得する。画像データの取得方法は種々考えられる。例えば、撮像装置30が被検査物を撮影して画像データを取得し、インタフェース装置22aに送信する。演算回路10は、インタフェース装置22aが受信した画像データをインタフェース装置22aから受け取る。あるいは、撮像装置30からの被検査物の画像データをインタフェース装置22aが受信し、記憶装置14が当該画像データを格納した後、演算回路10は記憶装置14から画像データを取得してもよい。後者の例では、撮像装置30は外観検査システム1000の一部として含まれなくてもよい。
 ステップS22において、演算回路10は被検査物の属性データを取得する。
 ステップS24において、演算回路10は畳み込みニューラルネットワーク12nを用いて欠陥の検出処理を行う。そして、被検査物の画像内に欠陥候補領域を検出した場合には当該被検査物を欠陥候補として抽出する。このとき、欠陥候補領域ごとに、欠陥クラスおよび確率値が出力される。
 ステップS26において、演算回路10はオフセットテーブル適用処理を実行する。オフセットテーブル適用処理は図9に示す処理に相当する。オフセットテーブル適用処理により、基準テーブル14bがオフセットテーブル14cにより更新されて、新たな基準テーブル14b-2が取得される。オフセットテーブル適用処理の具体的な説明は後述する。
 ステップS28において、演算回路10は、ステップS24において欠陥候補領域ごとに出力された確率値と、更新した基準テーブル14b-2の閾値とを用いて、欠陥候補領域に実際に欠陥は存在するか否かを判定する。より具体的には、演算回路10は、欠陥候補領域の位置の確率値と、当該位置に対応する位置の基準テーブル14b-2の閾値とを比較する。確率値が閾値以上、または閾値よりも大きい場合には、被検査物には依然として欠陥が存在する、すなわち被検査物は不良品であると判定し処理は終了する。一方、確率値が閾値未満、または閾値以下の場合には、演算回路10は、欠陥は存在しないと判定し、処理はステップS30に進む。
 ステップS30において、演算回路10はデータベース14Zの更新処理を実行する。データベース14Zの更新処理は、一旦は欠陥候補と判断された被検査物の画像、属性および検出結果を良品として記憶装置14に登録し、さらに画像特徴量の類似傾向の有無に応じてオフセットテーブルを更新または削除する処理である。データベース14Zの更新処理の具体的な説明は、図16を参照しながら後述する。
 以上で図11による外観検査処理は終了する。
 なお、ステップS28において被検査物が不良品であると判定された後は演算回路10の処理は終了するが、その後、例えば検査員が目視により、被検査物に欠陥が存在するか否かを判定してもよい。
 3.3 データベース登録処理(類似傾向確認処理およびオフセットテーブルの生成・更新処理を含む)
 次に、図12を参照しながら、記憶装置14のデータベース14Zにオフセットテーブルを登録する処理を説明する。なお図12の処理は、図11のステップS30を実行するための前提となる、オフセットテーブルを生成する処理である。本実施形態ではデータベース14Zを更新する処理も行われるが、更新する処理については後に図16を参照しながら説明する。
 図12は、データベース登録処理の手順を示すフローチャートである。このフローチャートは、演算回路10によって実行される。
 ステップS40において、演算回路10は記憶装置14に、新たに良品画像、属性および検出結果を登録する。これによりデータベース14Zが生成される。「良品画像」は「良品」と判定された物品の画像を言う。既に説明したように、「良品」と判定された物品は、当初から良品と判定された物品に限られない。つまり、一旦は欠陥ありと判定され、その後、良品と判定された被検査物、および、後述の本開示にかかる処理の結果、良品と判定された被検査物も含まれる。また「検出結果」とは、検出した範囲、欠陥クラス、欠陥の確率を含む。検出した範囲は、例えば矩形の場合、左上隅の座標と右下隅の座標とによって表現され得る。なお、良品であっても過検出の状態はサンプルによって異なるので別個独立の検出結果として登録される。
 ステップS42において、演算回路10は類似傾向確認処理を実行する。「類似傾向確認処理」とは、同じ属性を有する良品画像の同じ画像特徴量に基づいて良品画像をクラスタリングし、所定の割合以上の良品画像を含むクラスタが存在する場合には、そのようなクラスタリングを実現したクラス分類器を保存する処理である。クラス分類器が得られたことは、特定の属性で、かつ特定の画像特徴量を有する画像に関しては、畳み込みニューラルネットワーク12nは過検出を行ったことを意味する。類似傾向確認処理は後に図13および図14を参照しながら説明する。
 ステップS44において、演算回路10は、ステップS42において行われた類似傾向確認処理の結果から、類似傾向があるか否かを判定する。類似傾向がある場合には処理はステップS44に進み、類似傾向がない場合にはオフセットテーブルを生成せず処理を終了する。
 ステップS46において、演算回路10はオフセットテーブルを生成し、データベース14Zに登録する。過検出を行った場合にはオフセットテーブルを生成し、以後、同じ属性および画像特徴量を有する画像が欠陥であると判定されたときに、欠陥の判定基準(閾値)を変更することができる。オフセットテーブルの生成処理後に図15を参照しながら説明する。
 以上の処理により、所定の条件に合致した場合には、オフセットテーブルをデータベース14Zに登録する処理が終了する。上述の処理を経て、図3に示すようにオフセットテーブル14cがデータベース14Zに登録される。
 次に、図13および図14を参照しながら類似傾向確認処理の具体的な内容を説明する。類似傾向確認処理は、図12のステップS40において新たに登録された良品画像がデータベース14Zに既に登録されている良品画像との関係で類似する傾向にある場合には、オフセットテーブルを生成する処理である。類似傾向確認処理は被検査物の属性に応じて行われるため、処理実行時には対象となる属性が予め決定されている。
 図13は、類似傾向確認処理の手順を示すフローチャートである。このフローチャートは、演算回路10によって実行される。
 ステップS50において、演算回路10は、対象の属性を有する良品画像のうち、最新の良品画像からn枚(n:2以上の整数)をデータベース14Zから抽出する。
 ステップS52において、演算回路10は抽出したn枚の良品画像のうち、過検出が発生していた1または複数の良品画像の過検出領域を切り出す。
 ステップS54において、演算回路10は所定の画像特徴量を抽出する。抽出すべき画像特徴量は予め定められている。画像特徴量は、例えば畳み込みニューラルネットワーク12nによって抽出した特徴量であってもよいし、GLCM特徴量であってもよい。抽出する画像特徴量の数は任意である。
 ステップS56において、演算回路10は過検出された良品画像を含む、同属性の良品画像でクラスタリング処理を実行する。クラスタリング処理として、例えばK-means 法を用いることができる。K-means 法は公知の技術であるから具体的な説明は省略する。K-means 法以外の公知のクラスタリング技術を用いてもよい。
 ステップS58において、演算回路10は過検出された良品画像を含むクラスタに属するサンプル数が全サンプル数のm%(m:0以上100以下の実数。例えば60)以上を占めるか否かを判定する。当該クラスタに属するサンプル数が全サンプル数のm%以上の場合には、かつての過検出と類似する傾向が存在することを意味し、処理はステップS60に進む。m%未満の場合には類似傾向がなく、突発的に過検出が発生したと推定される。そこで処理は終了する。
 ステップS60において、演算回路10はクラスタ分類器を記憶装置14に保存する。
 図14は、図13のステップS56およびS58を具体的に説明するための図である。各良品画像が2次元の画像特徴量を用いてプロットされている。例えば、横軸は輝度に関する画像特徴量であり、縦軸はコントラストに関するGLCM特徴量である。所定のクラスタリング技術によってクラスタリングを実行した結果、図14に示すように3つのクラスタA,BおよびCに分類されたとする。このうち、クラスタAに注目する。
 クラスタAは、畳み込みニューラルネットワーク12nによって欠陥があると判定された画像の画像特徴量がプロットされた点sと、既にデータベース14Zに登録されていた良品画像群の各画像特徴量がプロットされた複数の点aとを含む。
 総数n枚の画像のうち、クラスタAには点sを含めてk枚の画像の画像特徴量がプロットされたとする。演算回路10は、Q=(k/n)*100 の演算を行い、良品画像がクラスタAに分類される割合を求める。そして演算回路10は、図12のステップS58において、Q≧mであるか否かを判定する。Q≧mであるときは、点sに対応する画像は、かつて過検出が発生した良品画像と同様に過検出であると推定し得る。そこで、図13のステップS60において、クラスタリングに用いたクラスタ分類器を保存し、以後新たに行われる被検査物の画像の判定に利用することとした。
 次に、図15を参照しながら、オフセットテーブルの生成・更新処理の具体的な内容を説明する。オフセットテーブルの生成・更新処理は、図12のステップS46において実行される処理である。
 図15は、オフセットテーブルの生成・更新処理の手順を示すフローチャートである。このフローチャートは、演算回路10によって実行される。
 ステップS70において、演算回路10は、対象の属性を有する良品画像のうち、最新の良品画像からn枚をデータベース14Zから抽出する。この処理は図13のステップS50と同じであるが、「n」は同じ値である必要はない。
 ステップS72において、演算回路10は抽出したn枚の良品画像の平均画像を生成する。平均画像の座標(x,y)の位置の画素値は、抽出したn枚の良品画像のそれぞれの座標(x,y)の画素値の平均値である。
 ステップS74において、演算回路10は平均画像を畳み込みニューラルネットワーク12nに入力し、出力結果を利用してオフセットテーブルを生成する。より具体的に説明する。平均画像は典型的な良品画像を表すと言える。その平均画像を畳み込みニューラルネットワーク12nに入力し、欠陥の検出処理を行う。すると、平均画像内に欠陥候補領域が検出され得る。畳み込みニューラルネットワーク12nは、図14のクラスタAに属する点の画像特徴量を有する良品画像についても欠陥候補領域を検出してしまうからである。検出結果には、1または複数の欠陥候補領域が含まれ得る。また、各欠陥候補領域について、欠陥クラスおよび確率値も出力され得る。演算回路10は、1または複数の部分領域に、確率値の大きさに応じたオフセット値(第1種のオフセット値)を記述したオフセットテーブルを生成する。生成されたオフセットテーブルは、例えば図8のオフセットテーブル14cと同様である。
 ステップS76において、演算回路10は欠陥クラスごとに欠陥候補領域を抽出する。この処理は、欠陥クラスごとにオフセットテーブルを用意することを意味する。オフセットテーブルが欠陥候補領域を含む場合、その欠陥クラスについて畳み込みニューラルネットワーク12nは過検出を行ったと言うことができる。したがって、欠陥候補領域は「過検出領域」とも呼び得る。
 ステップS78において、演算回路10は欠陥クラスごとのオフセットテーブルにおいて、過検出領域以外の領域の値を0に設定する。これにより、オフセットテーブルには第2種のオフセット値が記述される。
 ステップS80において、演算回路10は欠陥クラスごとのオフセットテーブルをデータベースに保存する。これにより、データベース14Zには欠陥クラスごとのオフセットテーブルが用意されることになる。図3には、1つの欠陥クラス(例えば、欠陥クラス:傷)についてのオフセットテーブル14cがデータベース14Zに登録されている。
 なお、既にオフセットテーブルが存在していたとしても、新たに良品画像が登録されると、新たなオフセットテーブルが生成され、既存のオフセットテーブルが書き換えられる。そのような場合には、図15の処理はオフセットテーブルの更新処理と呼び得る。
 3.4 データベース更新処理
 次に、図16を参照しながらデータベース14Zの更新処理を説明する。なおステップS40、S42およびS44は、図12の処理と同じであるため説明は省略する。
 図16は、データベース14Zの更新処理の手順を示すフローチャートである。
 ステップS44において類似傾向があると判定された場合には、処理はステップS96に進み、類似傾向がないと判定された場合には、処理はステップS98に進む。
 ステップS96において、演算回路10はオフセットテーブルを更新する。一方、ステップS98において、演算回路10はオフセットテーブルを削除する。オフセットテーブルを削除する理由は、欠陥を検出し損なうリスクを抑えるためである。オフセットを設定すると、未検出のリスクが僅かに高まる。そのため、類似傾向がないと判断される場合には、過検出の傾向がなくなったとしてオフセットテーブルを削除し、未検出のリスクを抑えている。
 3.5 オフセットテーブルの適用処理
 次に、図17を参照しながら、オフセットテーブルの適用処理の具体的な内容を説明する。オフセットテーブルの適用処理は、図11のステップS26において行われる処理である。
 図17は、オフセットテーブルの適用処理の手順を示すフローチャートである。このフローチャートは、演算回路10によって実行される。
 ステップS100において、演算回路10は、記憶装置から、被検査物の属性と同じ属性のオフセットテーブルをロードする。なお、被検査物の属性は、図11のステップS22において取得された属性データに基づいて決定される。
 ステップS102において、演算回路10は被検査物の画像の部分領域を切り出す。切り出す部分領域の位置は、例えばオフセットテーブル14c(図8)内で第1種のオフセット値(非ゼロの値)が記述されている位置に対応する。
 ステップS104において、演算回路10は、図13のステップS60によって保存されたクラスタ分類器に、切り出した部分領域の画像特徴量を入力する。
 ステップS106において、演算回路10は、部分領域の画像特徴量が過検出を含むクラスタに分類されたか否かを判定する。過検出を含むクラスタとは、図14の例ではクラスタAである。画像特徴量が過検出を含むクラスタに分類された場合には処理はステップS108に進み、分類されなかった場合には処理は終了する。
 ステップS108において、演算回路10は、切り出した部分領域の判定基準(閾値)に第1種のオフセット値を加算する。この処理は、図9を参照しながら説明した処理に相当する。
 以上の処理によって、基準テーブルの閾値がより大きい値に更新される。これにより良品と判定される範囲が広がり、過検出を抑制することが可能になる。
 4. 変形例
 判定に利用される被検査物の画像は、撮像装置(カメラ)が1または複数の物品をリアルタイムで撮影して外観検査装置100に取得されてもよい。または、一旦撮影された後に大容量記憶装置に記憶され、当該大容量記憶装置から読み出されて外観検査装置100に取得されてもよい。後者の例を説明する。
 図18は、変形例にかかる外観検査システム1100の構成を示している。外観検査システム1100は、通信ネットワーク300に接続された外観検査装置100および二次記憶装置310を有する。通信ネットワーク300は、例えばインターネット等の広域通信網(WAN)、または企業等の構内に敷設された構内通信網(LAN)である。なお、撮像装置30も通信ネットワーク300に接続されているが、外観検査装置100が外観検査を行う時点では、撮像装置30は外観検査システム1100の必須の構成要素ではない。
 二次記憶装置310は、いわゆるクラウドストレージである。本変形例では、二次記憶装置310は、通信ネットワーク300を介して、撮像装置30が撮影し送信した被検査物の画像データを受信し、格納する。
 外観検査装置100のインタフェース装置22dは、通信ネットワーク300を介して二次記憶装置310から被検査物の画像データを受信する。演算回路10は、インタフェース装置22dが受信した画像データを取得し、例えば記憶装置14に格納して上述の処理を実行する。
 本開示による外観検査システムおよびコンピュータプログラムは、工場などの製造現場における物品または部品の外観検査に好適に利用され得る。
 1000・・・外観検査システム、10・・・演算回路、12・・・メモリ、14・・・記憶装置、16・・・通信回路、18・・・画像処理回路、22a~22c・・・インタフェース装置、30・・・撮像装置、120・・・入力装置、130・・・モニタ
 

Claims (22)

  1.  被検査物の画像を利用して前記被検査物の良否を判定する外観検査システムであって、
     良品と判定された複数の物品が撮影された複数の画像、複数の閾値が記述された基準テーブル、および複数のオフセット値が記述されたオフセットテーブルを記憶した記憶装置と、
     被検査物の画像データを受け取るインタフェース装置と、
     演算回路と
     を備え、前記被検査物の画像および前記複数の画像の各々は、複数の部分領域を含み、
     前記基準テーブルの前記複数の閾値の各々および前記オフセットテーブルの前記複数のオフセット値の各々は、前記複数の部分領域の各々に対応付けて設定されており、
     前記複数の閾値の各々は、対応付けられた前記複数の部分領域の各々に含まれる前記被検査物の像が欠陥を表していると判定するための基準であり、
     前記複数のオフセット値は、前記複数の閾値の一部を変化させる第1種のオフセット値および残りの一部を変化させない第2種のオフセット値を含み、
     前記演算回路は、
     (a)前記画像データに予め定められた欠陥検出処理を行い、少なくとも1つの欠陥の像が前記被検査物の画像に含まれている場合には前記被検査物を欠陥候補として抽出する処理と、
     (b)前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理であって、切り出される前記部分画像の位置は、前記オフセットテーブル中の前記第1種のオフセット値が対応付けられた部分領域の位置である、処理と、
     (c)切り出した前記部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理であって、前記過検出クラスは、前記第1種のオフセット値が対応付けられた部分領域の位置における、前記複数の画像の各部分画像の画像特徴量が所定以上の割合で分類されるクラスである、処理と、
     (d)切り出した前記部分画像の画像特徴量が前記過検出クラスに分類される場合に、前記部分領域の位置における前記基準テーブルの閾値を、前記第1種のオフセット値を用いて変更して、前記被検査物の像が欠陥を表していると判定するための基準をより高くする処理と、
     (e)前記閾値を変更した前記基準テーブルを用いて、少なくとも1つの欠陥の像が前記被検査物の画像に含まれているか否かを判定する処理と
     を実行する、外観検査システム。
  2.  前記インタフェース装置は、前記被検査物の製造条件に関する属性を示す属性データをさらに受け取り、
     前記記憶装置は、前記基準テーブルおよび前記オフセットテーブルを、予め分類された属性ごとに記憶しており、
     前記(b)の処理は、
     (b1)前記演算回路が、前記被検査物の属性データに基づいて、前記記憶装置に記憶された複数種類のオフセットテーブルのうちから、前記被検査物の属性と同じ属性を有する同属性オフセットテーブルを読み出す処理と、
     (b2)前記演算回路が、読み出した前記同属性オフセットテーブルに含まれる前記第1種のオフセット値が対応付けられた前記部分領域の位置において、前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理と、
     を包含する、請求項1に記載の外観検査システム。
  3.  前記製造条件に関する前記属性は、前記被検査物の製造時に使用された金型、製造ラインおよび製造工場からなるグループから選択された少なくとも1つである、請求項1または2に記載の外観検査システム。
  4.  前記演算回路は、前記(a)の処理で行われる前記欠陥検出処理において、前記画像データの第1画像特徴量を利用して前記少なくとも1つの欠陥の像を検出し、
     前記(c)の処理に用いられる前記画像特徴量を第2画像特徴量とするとき、
     前記第1画像特徴量と前記第2画像特徴量とは同一である、請求項1から3のいずれかに記載の外観検査システム。
  5.  前記(c)の処理における前記画像特徴量は、画像のグレーレベル同時生起行列(GLCM)に関する画像特徴量である、請求項1から3のいずれかに記載の外観検査システム。
  6.  前記(a)の処理における前記欠陥検出処理は複数種類の欠陥を検出するための処理であり、
     前記(a)の処理は、検出された前記少なくとも1つの欠陥の種類ごとに前記欠陥候補を抽出する処理を包含する、請求項1から5のいずれかに記載の外観検査システム。
  7.  前記記憶装置は、前記基準テーブルおよび前記オフセットテーブルを、前記欠陥の種類ごとに記憶しており、
     前記(b)の処理は、
     (b3)前記演算回路が、前記記憶装置に記憶された複数種類のオフセットテーブルのうちから、前記少なくとも1つの欠陥の種類に応じた同種類オフセットテーブルを読み出す処理と、
     (b4)前記演算回路が、読み出した前記同種類オフセットテーブルに含まれる前記第1種のオフセット値が対応付けられた前記部分領域の位置において、前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理と、
     を包含する、請求項6に記載の外観検査システム。
  8.  前記複数の部分領域の各々は、1画素で表される領域であり、
     前記基準テーブルの前記複数の閾値の各々および前記オフセットテーブルの前記複数のオフセット値の各々は、画素ごとに対応付けて設定されている、請求項1から7のいずれかに記載の外観検査システム。
  9.  (f)前記(e)の処理において前記少なくとも1つの欠陥の像が前記被検査物の画像に含まれていなかった場合に、前記被検査物の画像を、良品と判定された前記複数の物品の各々が撮影された前記複数の画像として前記記憶装置に追加して記憶する処理をさらに包含する、請求項1から8のいずれかに記載の外観検査システム。
  10.  (g)前記(f)の処理の後、前記記憶装置に記憶されている前記オフセットテーブルを、前記第2のオフセット値を変更したオフセットテーブルに書き換える処理をさらに包含する、請求項9に記載の外観検査システム。
  11.  前記(f)の処理は、
     (f1)類似する過検出結果が存在するか否かを判定する処理、および
     (f2)判定結果が、類似する過検出結果が存在することを示す場合には、前記オフセットテーブルの前記第2のオフセット値を書き換える処理
     を包含し、
     前記(f1)の処理は、前記第1種のオフセット値が対応付けられた部分領域の位置に関して、前記複数の画像の各部分画像の画像特徴量が前記所定以上の割合で前記過検出クラスに分類される場合に、類似する過検出結果が存在すると判定する処理である、請求項10に記載の外観検査システム。
  12.  前記(f1)の処理は、前記第1種のオフセット値が対応付けられた部分領域の位置に関し、前記複数の画像の各部分画像の画像特徴量に関して所定のクラスタリング処理を実行し、実行結果が前記所定以上の割合で同じクラスタに分類されたことを示す場合に、類似する過検出結果が存在すると判定する処理である、請求項11に記載の外観検査システム。
  13.  前記所定のクラスタリング処理に用いられるクラス分類器をさらに備え、
     前記(c)の処理は、前記クラス分類器を利用して、切り出した前記部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理である、請求項12に記載の外観検査システム。
  14.  前記(f)の処理は、
     (f3)判定結果が、類似する過検出結果が存在しないことを示す場合には、前記第2のオフセット値を変更したオフセットテーブルを破棄する処理
     を包含する、請求項11に記載の外観検査システム。
  15.  前記インタフェース装置は、前記被検査物の製造条件に関する属性を示す属性データをさらに受け取り、
     前記記憶装置は、良品と判定された前記複数の物品の各々が撮影された前記複数の画像、前記基準テーブルおよび前記オフセットテーブルを、予め分類された属性に関連付けて記憶しており、
     前記(g)の処理は、
     (g1)前記記憶装置に記憶された前記複数の画像から、前記インタフェース装置が受け取った前記属性データと同じ属性を有する画像群を選出し、
     (g2)前記画像群から少なくとも1枚の参照画像を生成し
     (g3)前記少なくとも1枚の参照画像の画像データに予め定められた前記欠陥検出処理を行い、1以上の欠陥の像が前記少なくとも1枚の参照画像に含まれていると判定された場合には、各欠陥の像の位置を表す領域と過検出が発生する程度を表す値とが関連付けられた過検出テーブルを生成し、
     (g4)前記過検出テーブルに、前記各欠陥の像の位置には前記過検出が発生する程度を表す第1の値を記述し、前記各欠陥の像の位置以外の位置には前記過検出が発生していないことを表す第2の値を記述し、
     (g5)前記記憶装置に記憶されている前記オフセットテーブルを、前記過検出テーブルを用いて前記第2のオフセット値を変更したオフセットテーブルに書き換える、請求項10から14のいずれかに記載の外観検査システム。
  16.  撮像装置をさらに備え、
     前記撮像装置は、前記被検査物を撮影して前記画像データを取得し、出力する、請求項1から15のいずれかに記載の外観検査システム。
  17.  前記撮像装置は、前記被検査物の画像データを前記インタフェース装置に送信し、
     前記演算回路は、前記インタフェース装置が受信した前記画像データを取得する、請求項16に記載の外観検査システム。
  18.  前記インタフェース装置は、前記撮像装置から前記被検査物の画像データを受信し、
     前記記憶装置は、受信した前記画像データを格納し、
     前記演算回路は、前記記憶装置から前記被検査物の画像データを取得する、請求項16に記載の外観検査システム。
  19.  通信ネットワークに接続された二次記憶装置をさらに備え、
     前記撮像装置は、前記通信ネットワークを介して前記被検査物の画像データを前記二次記憶装置に送信し、
     前記二次記憶装置は、受信した前記画像データを格納し、
     前記インタフェース装置は、前記通信ネットワークを介して前記二次記憶装置から前記被検査物の画像データを受信し、
     前記演算回路は、前記インタフェース装置が受信した前記画像データを取得する、請求項16に記載の外観検査システム。
  20.  前記(a)の処理における前記予め定められた欠陥検出処理は、学習済みのニューラルネットワークを用いて、前記被検査物の画像から前記少なくとも1つの欠陥の像を含まれているか否かを判定する処理であり、
     前記ニューラルネットワークは、良品および不良品を包含する複数の物品の各物品の画像と、前記各物品が良品であるか不良品であるかを示す良否データとを教師データとして用いた機械学習処理によって構築されている、請求項1から19のいずれかに記載の外観検査システム。
  21.  前記ニューラルネットワークは、良品および不良品を包含する複数の物品の各物品の画像と、前記各物品が良品であるか不良品であるかを示す良否データと、前記不良品の不良の種類を示す不良種類データとを教師データとして用いた機械学習処理によって構築されている、請求項20に記載の外観検査システム。
  22.  被検査物の画像を利用して前記被検査物の良否を判定する外観検査システムの演算回路によって実行されるコンピュータプログラムであって、
     前記外観検査システムは、
      良品と判定された複数の物品の各々が撮影された複数の画像、複数の閾値が記述された基準テーブル、および複数のオフセット値が記述されたオフセットテーブルを記憶した記憶装置と、
      被検査物の画像データを受け取るインタフェース装置と、
      前記演算回路と
     を備え、前記被検査物の画像および前記複数の画像の各々は、複数の部分領域を含み、 前記基準テーブルの前記複数の閾値の各々および前記オフセットテーブルの前記複数のオフセット値の各々は、前記複数の部分領域の各々に対応付けて設定されており、
      前記複数の閾値の各々は、対応付けられた前記複数の部分領域の各々に含まれる前記被検査物の像が欠陥を表していると判定するための基準であり、
     前記複数のオフセット値は、前記複数の閾値の一部を変化させる第1種のオフセット値および残りの一部を変化させない第2種のオフセット値を含み、
     前記コンピュータプログラムは前記演算回路に、
     (a)前記画像データに予め定められた欠陥検出処理を行い、少なくとも1つの欠陥の像が前記被検査物の画像に含まれている場合には前記被検査物を欠陥候補として抽出する処理と、
     (b)前記欠陥候補として抽出された前記被検査物の画像から部分画像を切り出す処理であって、切り出される前記部分画像の位置は、前記オフセットテーブル中の前記第1種のオフセット値が対応付けられた部分領域の位置である、処理と、
     (c)切り出した前記部分画像の画像特徴量が過検出クラスに分類されるか否かを判定する処理であって、前記過検出クラスは、前記第1種のオフセット値が対応付けられた部分領域の位置における、前記複数の画像の各部分画像の画像特徴量が所定以上の割合で分類されるクラスである、処理と、
     (d)切り出した前記部分画像の画像特徴量が前記過検出クラスに分類される場合に、前記部分領域の位置における前記基準テーブルの閾値を、前記第1種のオフセット値を用いて変更して、前記被検査物が欠陥を表していると判定するための基準をより高くする処理と、
     (e)前記閾値を変更した前記基準テーブルを用いて、少なくとも1つの欠陥の像が前記被検査物の画像に含まれているか否かを判定する処理と
     を実行させる、コンピュータプログラム。
PCT/JP2020/039729 2020-03-24 2020-10-22 外観検査システムおよびコンピュータプログラム WO2021192376A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202080098729.0A CN115298539A (zh) 2020-03-24 2020-10-22 外观检查系统和计算机程序

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020052573 2020-03-24
JP2020-052573 2020-03-24

Publications (1)

Publication Number Publication Date
WO2021192376A1 true WO2021192376A1 (ja) 2021-09-30

Family

ID=77891669

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/039729 WO2021192376A1 (ja) 2020-03-24 2020-10-22 外観検査システムおよびコンピュータプログラム

Country Status (2)

Country Link
CN (1) CN115298539A (ja)
WO (1) WO2021192376A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023095490A1 (ja) * 2021-11-26 2023-06-01 新興窯業株式会社 プログラム、情報処理装置、情報処理方法、学習モデルの生成方法、および撮影システム
JP7327866B1 (ja) 2023-02-07 2023-08-16 株式会社シュヴァルベル 学習モデル生成方法
JP7471031B2 (ja) 2022-02-08 2024-04-19 慶應義塾 欠陥推定装置、欠陥推定方法及びプログラム

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019132720A (ja) * 2018-01-31 2019-08-08 日本特殊陶業株式会社 外観検査装置及び外観検査方法
WO2019176614A1 (ja) * 2018-03-16 2019-09-19 日本電産株式会社 画像処理装置、画像処理方法、およびコンピュータプログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019132720A (ja) * 2018-01-31 2019-08-08 日本特殊陶業株式会社 外観検査装置及び外観検査方法
WO2019176614A1 (ja) * 2018-03-16 2019-09-19 日本電産株式会社 画像処理装置、画像処理方法、およびコンピュータプログラム

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023095490A1 (ja) * 2021-11-26 2023-06-01 新興窯業株式会社 プログラム、情報処理装置、情報処理方法、学習モデルの生成方法、および撮影システム
JP7471031B2 (ja) 2022-02-08 2024-04-19 慶應義塾 欠陥推定装置、欠陥推定方法及びプログラム
JP7327866B1 (ja) 2023-02-07 2023-08-16 株式会社シュヴァルベル 学習モデル生成方法

Also Published As

Publication number Publication date
CN115298539A (zh) 2022-11-04

Similar Documents

Publication Publication Date Title
WO2021192376A1 (ja) 外観検査システムおよびコンピュータプログラム
JP7004145B2 (ja) 欠陥検査装置、欠陥検査方法、及びそのプログラム
US11017259B2 (en) Defect inspection method, defect inspection device and defect inspection system
TWI670781B (zh) 疊代式缺陷濾除製程
WO2020137222A1 (ja) 欠陥検査装置、欠陥検査方法、及びそのプログラム
JP2004294202A (ja) 画面の欠陥検出方法及び装置
JP2008145226A (ja) 欠陥検査装置及び欠陥検査方法
WO2019194064A1 (ja) 画像処理装置、画像処理方法、外観検査システムおよび外観検査方法
TWI751372B (zh) 用於缺陷偵測之系統及方法
CN110596120A (zh) 玻璃边界缺陷检测方法、装置、终端及存储介质
US7634131B2 (en) Image recognition apparatus and image recognition method, and teaching apparatus and teaching method of the image recognition apparatus
JP2007285754A (ja) 欠陥検出方法および欠陥検出装置
KR20220016245A (ko) 불량 이미지 생성 장치 및 방법
WO2020071234A1 (ja) 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム
WO2014208193A1 (ja) ウエハ外観検査装置
JP2005309535A (ja) 画像自動分類方法
JP4244046B2 (ja) 画像処理方法および画像処理装置
JP2004212311A (ja) ムラ欠陥の検出方法及び装置
JP2009139133A (ja) 欠陥検出方法および欠陥検出装置
KR20230171378A (ko) 결함 검사 장치
WO2019176614A1 (ja) 画像処理装置、画像処理方法、およびコンピュータプログラム
JP2005164565A (ja) 低解像度および高解像度映像におけるフラットパネル用光関連板要素の欠陥検出方法
JP7380332B2 (ja) 画像処理装置、画像処理装置の制御方法およびプログラム
JP2005140655A (ja) シミ欠陥の検出方法及びその検出装置
CN110672631B (zh) 面板缺陷拍照方法和面板缺陷拍照装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20926441

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20926441

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP