WO2020071234A1 - 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム - Google Patents

画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム

Info

Publication number
WO2020071234A1
WO2020071234A1 PCT/JP2019/037851 JP2019037851W WO2020071234A1 WO 2020071234 A1 WO2020071234 A1 WO 2020071234A1 JP 2019037851 W JP2019037851 W JP 2019037851W WO 2020071234 A1 WO2020071234 A1 WO 2020071234A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
defective
inspection
image
data
Prior art date
Application number
PCT/JP2019/037851
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 JP2020550353A priority Critical patent/JPWO2020071234A1/ja
Publication of WO2020071234A1 publication Critical patent/WO2020071234A1/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

Definitions

  • the present application relates to an image processing device, an image processing method, and a visual inspection system that can be used for visual inspection.
  • the present application also relates to a computer program used for image processing.
  • JP-A-2017-194334 and JP-A-2016-212488 disclose an inspection method for determining a true defect appearing on the appearance of an article through a two-step inspection.
  • the method disclosed in Japanese Patent Application Laid-Open No. 2017-194334 in the first stage inspection, an image is divided into a plurality of blocks, and a defect candidate is determined for each of the divided blocks.
  • the block determined as a defect candidate is further divided into sub-blocks, and a true defect is determined for each sub-block.
  • a defect inspection using a line camera is performed in the first stage inspection. If it is determined in the first stage inspection that there is a defect, in the second stage inspection, a true defect is determined by performing a defect inspection using a color area camera.
  • an object to be determined to be determined to be “non-defective” may be determined to be “defective” by non-defective inspection using a visual inspection device, that is, so-called overdetection may occur.
  • JP-A-2017-194334 or JP-A-2016-212488 a precise defect inspection can be performed without increasing the time required for the inspection.
  • Embodiments of the present disclosure provide a novel image processing apparatus, image processing method, appearance inspection system, and computer program that can be used for appearance inspection.
  • An image processing device includes, in an exemplary embodiment, a processor, a memory that stores a program that controls an operation of the processor, and a learned good image database.
  • the processor acquires data of an image including an inspection region of the inspection object, and acquires a pixel value at each pixel position included in the inspection region from the image data, A statistic determined based on data of an image including a reference region included in each of the plurality of non-defective products, and a pixel included in the inspection region based on the pixel value at each pixel position included in the inspection region
  • a pre-determination step including extracting a unique pixel from a group, and determining whether the inspection object is a candidate for a defective product based on an array of pixels including the extracted unique pixel.
  • a determining step includes the determining, the based on whether the or the object to be inspected is non-defective said shape characteristic parameter.
  • An image processing device includes, in an exemplary embodiment, a processor, a memory that stores a program that controls an operation of the processor, and a learned good image database.
  • the processor acquires data of an image including an inspection region of the inspection object, and acquires a pixel value at each pixel position included in the inspection region from the image data, A statistic determined based on data of an image including a reference region included in each of the plurality of non-defective products, and a pixel included in the inspection region based on the pixel value at each pixel position included in the inspection region
  • a pre-determination step including extracting a unique pixel from a group, and determining whether the inspection object is a candidate for a defective product based on an array of pixels including the extracted unique pixel.
  • a visual inspection system includes the above-described image processing device, a light source that irradiates the inspection object with light, and an image sensor that outputs an image signal for generating data of the image. And a monitor for displaying a result of the determination performed by the processor included in the image processing apparatus.
  • An image processing method includes, in an exemplary embodiment, acquiring data of an image including an inspection region of an inspection object, and obtaining a pixel at each pixel position included in the inspection region from the image data. Acquiring a value, a statistic determined based on data of an image including a reference region each of a plurality of non-defective products, and the pixel value at each pixel position included in the inspection region, Extracting a unique pixel from a pixel group included in the inspection region, and determining whether the inspection object is a candidate for a defective product based on an array of pixels including the extracted unique pixel.
  • Comprising the method comprising, using a machine learning method, and a determination step includes a determining, a based on whether the or the object to be inspected is non-defective said shape characteristic parameter.
  • An image processing method includes, in an exemplary embodiment, acquiring data of an image including an inspection region of an inspection object, and obtaining a pixel at each pixel position included in the inspection region from the image data. Acquiring a value, a statistic determined based on data of an image including a reference region each of a plurality of non-defective products, and the pixel value at each pixel position included in the inspection region, Extracting a unique pixel from a pixel group included in the inspection region, and determining whether the inspection object is a candidate for a defective product based on an array of pixels including the extracted unique pixel.
  • a computer program acquires data of an image including an inspection region of an inspection object, and obtains a pixel value at each pixel position included in the inspection region from the image data. And, based on the statistics determined based on the data of the image including the reference region of each of a plurality of non-defective products, and the inspection based on the pixel value at each pixel position included in the inspection region Extracting a unique pixel from a pixel group included in the region, and, based on an array of pixels including the extracted unique pixel, to determine whether the inspection object is a candidate for a defective product, And a pre-determining step including: determining a shape of the two-dimensional pattern of the pixel array including the singular pixel when determining that the inspection object is a candidate for a defective product.
  • a computer-implemented determination step including acquiring the data and determining whether or not the inspection object is a non-defective product based on the shape characteristic parameter using a machine learning method.
  • a computer program acquires data of an image including an inspection region of an inspection object, and obtains a pixel value at each pixel position included in the inspection region from the image data. And, based on the statistics determined based on the data of the image including the reference region of each of a plurality of non-defective products, and the inspection based on the pixel value at each pixel position included in the inspection region Extracting a unique pixel from a pixel group included in the region, and, based on an array of pixels including the extracted unique pixel, to determine whether the inspection object is a candidate for a defective product, And a pre-determining step including: when determining that the object to be inspected is a candidate for a defective product, is a source of a two-dimensional pattern of an array of pixels including the unique pixel.
  • a first-stage inspection for determining whether an inspected object is a candidate for a defective product based on an array of pixels classified as unique pixels, and a machine learning method or matching
  • a new image processing method that can reduce overdetection by performing a second-stage inspection for determining whether or not an inspection object among defective candidates is a non-defective item using a method.
  • An apparatus, an image processing method, a visual inspection system, and a computer program are provided.
  • FIG. 1 is a block diagram illustrating a configuration example of a visual inspection system according to the present disclosure.
  • FIG. 2 is a diagram schematically illustrating a configuration of a part of the appearance inspection system.
  • FIG. 3 is a functional block diagram illustrating functional blocks for performing image processing of the image processing apparatus 100 according to the first embodiment.
  • FIG. 4 is a diagram showing a sample image for explaining the arrangement of unique pixels.
  • FIG. 5A is a flowchart illustrating an example of a process of executing the first-stage inspection in the image processing according to the first embodiment.
  • FIG. 5B is a flowchart illustrating an example of a process of executing a second-stage inspection in the image processing according to the first embodiment.
  • FIG. 6 is a diagram for explaining the work 70.
  • FIG. 1 is a block diagram illustrating a configuration example of a visual inspection system according to the present disclosure.
  • FIG. 2 is a diagram schematically illustrating a configuration of a part of the appearance inspection system.
  • FIG. 7A is a diagram illustrating a sample of image data of an inspection object determined to be non-defective.
  • FIG. 7B is a diagram illustrating a sample of image data of the inspection object that may be determined to be non-defective in the appearance inspection although it is originally non-defective.
  • FIG. 7C is a diagram illustrating a sample of the image data of the inspection object determined to be a non-defective product.
  • FIG. 7D is a diagram illustrating a sample of the image data of the inspection object that may be determined to be non-defective in the appearance inspection, although it is originally a non-defective product.
  • FIG. 8 is a flowchart illustrating an example of processing of the learning device 350 in the learning phase.
  • FIG. 8 is a flowchart illustrating an example of processing of the learning device 350 in the learning phase.
  • FIG. 9 is a diagram schematically illustrating the distribution of N pixel values Vn (p, q) in the learned good image database 200 for a specific pixel (p, q).
  • FIG. 10 is a functional block diagram illustrating functional blocks for executing image processing of the image processing apparatus 100 according to the second embodiment.
  • FIG. 11 is a flowchart illustrating an example of a process of performing a second-stage inspection in the image processing according to the second embodiment.
  • FIG. 12 is a functional block diagram illustrating variations of functional blocks for executing image processing of the image processing apparatus 100 according to the second embodiment.
  • An image processing apparatus includes, in a non-limiting exemplary embodiment, a processor, a memory storing a program for controlling an operation of the processor, and a learned good image database. .
  • the processor performs the following processing according to the program. (1) Acquire image data including an inspection area of the inspection object. (2) Obtain a pixel value at each pixel position included in the inspection area from the image data. (3) A pixel included in the inspection area based on a statistic determined based on image data including a reference area included in each of the plurality of non-defective products and a pixel value at each pixel position included in the inspection area. Extract singular pixels from the group.
  • the image processing method of the present embodiment can also be executed by using the apparatus shown in FIGS.
  • a step including the processes (1) to (4) may be referred to as a pre-determination step
  • a step including the processes (5) and (6) may be referred to as a determination step.
  • the pre-judgment step is a step used in the first-stage inspection and defines a process for determining whether or not the inspection object is a candidate for a defective product.
  • the determination step is a step that is used in the second-stage inspection and defines processing for determining whether or not the inspection object is a non-defective product.
  • FIG. 1 is a block diagram illustrating a configuration example of a visual inspection system according to the present disclosure.
  • the visual inspection system 1000 includes an image processing apparatus 100 having a processor 10 and a memory 12.
  • Processor 10 may be an integrated circuit (IC) chip, such as a central processing unit (CPU) or a digital signal processor.
  • IC integrated circuit
  • CPU central processing unit
  • FPGA field programmable gate array
  • the processor 10 may be an FPGA.
  • the memory 12 is a recording medium storing a computer program for controlling the operation of the processor 10.
  • the memory 12 does not need to be a single recording medium, but may be a collection of a plurality of recording media.
  • the memory 12 may include a semiconductor volatile memory such as a RAM, a semiconductor nonvolatile memory such as a flash ROM, and a storage device such as a hard disk drive. At least a part of the memory 12 may be a removable recording medium.
  • the memory 12 stores “learned non-defective image data” that can be used for non-defective / defective judgment in one embodiment.
  • the processor 10 may be connected to a server or database device on the cloud separately from the memory 12 by wire or wirelessly.
  • the server or the database device may store the learned good image data.
  • the visual inspection system 1000 further includes a light source 20, an image sensor (imaging device) 30, a display 40, and an operation device 50.
  • the light source 20 is an illumination device that irradiates an inspection object (inspection target) with light.
  • the object to be inspected is various articles such as various products or parts to be subjected to the appearance inspection.
  • the inspection object may be referred to as a “work”.
  • the light source 20 may be, for example, an LED lighting unit in which a large number of white LED elements are arranged in a plane or a ring.
  • the light source 20 includes a lighting circuit (not shown).
  • light source 20 is arranged to allow coaxial epi-illumination.
  • the wavelength (color) of the light emitted by the light source 20 is not particularly limited, but can be selected according to the inspection target.
  • the polarization state of light may be either polarization or non-polarization, but it is desirable that the polarization state does not change between the time of learning a good product and the time of inspection.
  • the light source 20 is connected to the processor 10, but such a connection is not essential. Operations such as turning on / off the light source 20 and adjusting the illuminance may be performed directly by the user on the lighting circuit of the light source 20 without going through the processor 10.
  • the imaging device 30 is a device that outputs an image signal for generating data of an image of an object to be inspected.
  • the image signal is sent to the processor 10 by wire or wirelessly.
  • a typical example of the imaging device 30 is a camera including an area sensor such as a CMOS image sensor or a CCD image sensor in which many photodiodes are arranged in a matrix.
  • the imaging device 30 generates data of a color image or a monochrome image of the inspection object.
  • Various cameras for visual inspection can be used for the imaging device 30.
  • the display 40 is a device that displays a result of the determination performed by the image processing apparatus 100 and the like.
  • the display 40 may be referred to as a monitor, and can display an image acquired by the imaging device 30.
  • the operation device 50 is an input device that receives an input from a user including a designation of a selection area and gives the input to the processor 10. Examples of the operation device 50 are a touch panel, a mouse, and / or a keyboard.
  • the display 40 and the operation device 50 need not always be connected to the processor 10 by wire, but may be connected to the processor 10 wirelessly or by wire only when necessary.
  • the display 40 and the operation device 50 may be a terminal device or a smartphone carried by the user.
  • FIG. 2 is a diagram schematically illustrating a configuration example of a part of the appearance inspection system 1000.
  • the light source 20 and the imaging device 30 are supported by the support member 60 inside the housing 120.
  • the work 70 to be inspected is placed on the transfer table 62 and fixed to the transfer table 62 by a gripping mechanism.
  • the transfer table 62 can be moved in the horizontal direction by the transfer stage 64 while the work 70 is placed thereon.
  • the imaging device 30 captures an image of the work 70 while the illumination is being performed.
  • the work 70 may be held by the robot arm and placed at the imaging position.
  • Data of an image obtained by imaging is sent from the imaging device 30 to the image processing device 100 in FIG.
  • the number of pixels of an image obtained by one imaging is, for example, 300,000 to 50,000,000 pixels.
  • the image processing device 100, the display 40, and the operation device 50 in FIG. 1 can be realized by a general-purpose digital computer system, for example, a personal computer.
  • the image processing apparatus 100 that has acquired the image data performs the above-described processing and performs the appearance inspection of the work 70.
  • FIG. 3 is a functional block diagram illustrating functional blocks for executing image processing of the image processing apparatus 100 according to the present embodiment.
  • Each block in the functional block diagram is shown not in a hardware unit but in a functional block unit.
  • the software used for the image processing is, for example, a module configuring a computer program for executing a specific process corresponding to each functional block.
  • Such a computer program is stored in the memory 12, for example.
  • the processor 10 can read instructions from the memory 12 and sequentially execute each processing.
  • the functional block illustrated in FIG. 3 for executing image processing according to the present embodiment includes a pre-judgment unit 300A that executes a pre-judgment step and a judgment unit 300B that executes a judgment step.
  • the pre-determination unit 300A is a unit that determines whether the inspection object is a candidate for a defective product.
  • the pre-judgment unit 300A has a comparison unit 320.
  • the pre-determination unit 300A acquires the input image data 310
  • the pre-determination unit 300A generates and outputs a binary image 330 expressing an array of pixels including unique pixels from the input image data 310 while referring to the learned good image database 200. I do.
  • an array of pixels including a unique pixel is referred to as an “array of unique pixels”.
  • FIG. 4 is a diagram showing a sample image of the binary image 330 for explaining the arrangement of the unique pixels.
  • the arrangement of the unique pixels is expressed in a non-defective image and a binary image 330 including the unique pixels 331 described later.
  • the peculiar pixels 331 are displayed at a gray scale white (bright) level
  • the non-defective image is displayed at a brae scale black (dark) level.
  • a black level can be assigned to the unique pixel 331
  • a white level can be assigned to the non-defective image.
  • the array of unique pixels means a two-dimensional pattern formed by the unique pixels 331 included in the binary image 330 that is the output image, or an array of data including the coordinates where the unique pixels 331 are located in the binary image 330. I do.
  • the output image is not limited to the binary image, and may include, for example, pixels that are not classified as any of good pixels and unique pixels 331.
  • the determination unit 300B is a unit that determines whether or not the inspected object among the candidates for the defective product is a non-defective product.
  • the determination unit 300B has a learning device 350 and a classifier 360.
  • the determination unit 300B acquires the shape feature parameters of the two-dimensional pattern from the arrangement of the unique pixels.
  • the learning device 350 is a supervised learning device that performs machine learning based on the shape characteristic parameters of the inspection object that is a candidate for a defective product, and generates a learned model.
  • the classifier 360 uses the learned model generated by the learning device 350 to determine whether or not the inspection object is a non-defective product, and outputs a determination result 370.
  • FIG. 5A is a flowchart illustrating an example of a process of executing the first-stage inspection in the image processing according to the present embodiment.
  • step S12 the processor 10 acquires image data of the work 70.
  • the image data is, for example, a frame image including an image of the work 70 as schematically shown in FIG.
  • the actual image is an array of, for example, 256 gradation pixel values (“brightness” or “gray scale” values) reflecting the unevenness and pattern of the surface of the work 70. Pixel values may be referred to as luminance values or densities.
  • input image data 310 is input data to be input to the processor 10 and corresponds to image data of the work 70.
  • One frame image may include a part of the transfer table 62 other than the work 70 as the background 70B.
  • the area 82 surrounded by the line 82L is the “inspection area”.
  • One frame image may include a plurality of inspection areas 82. Alignment is performed so that the position of the work 70 matches a predetermined position in the frame image. This alignment is to make the plurality of reference points of the work 70 coincide with the plurality of reference points in the field of view of the imaging device 30.
  • the first stage of such alignment is to adjust the physical positional relationship of the work 70 with respect to the lens optical axis of the imaging device 30.
  • the second stage of the alignment is to adjust the pixel positions (coordinates) of the captured image.
  • the second stage of alignment involves translating, rotating, enlarging and / or reducing the image by image processing techniques, and the like.
  • the inspection area 82 of each work 70 always aligns with the area surrounded by the line 82L.
  • the image of the inspection area 82 of each work 70 belonging to the same type can be compared with a non-defective sample image (master or reference) in pixel units.
  • step S14 of FIG. 5A the processor 10 acquires a pixel value in the inspection area 82 from the input image data 310.
  • the pixel value of the pixel at the position of the coordinates (i, j) can be represented by V (i, j).
  • the coordinates (i, j) indicate, for example, the pixel position at j row and i column.
  • i and j are each a positive integer.
  • the input image data 310 is composed of, for example, an array of 640 ⁇ 480 pixels, the relationship of 1 ⁇ i ⁇ 640 and 1 ⁇ j ⁇ 480 is satisfied, but the pixel values of the pixels located outside the inspection area 82 are as follows. Not required for processing.
  • the pixel value is, for example, a numerical value (luminance value) indicating the brightness of 256 gradations, but may be another characteristic amount in pixel units.
  • the pixel at the position of the coordinates (i, j) may be referred to as a pixel (i, j).
  • step S ⁇ b> 16 the processor 10 acquires, from the learned non-defective image database 200, the statistics of the non-defective image data 210 including the reference region of each of the non-defective items.
  • the reference area refers to an area to be compared with the inspection area of the work 70. As described above, the image of the inspection area 82 of each work 70 belonging to the same product type can be compared with the image of the reference area of the non-defective sample in pixel units.
  • the processor 10 acquires the statistic of the pixel value of the reference region for each pixel from the learned good image database 200.
  • This statistic is a statistic determined based on the non-defective image data 210 including the reference region of each of the plurality of non-defective products. More specifically, this statistic is a statistic based on a pixel value at each pixel position in a reference area to be compared with the inspection area 82 of the work 70.
  • the statistics include, for example, an average value, a variance, a standard deviation, a maximum value, a minimum value, and a median of pixel values at each pixel position. In this embodiment, an average value and a standard deviation of pixel values at each pixel position in the reference area are used as statistics.
  • the learned non-defective image database 200 can be created based on, for example, N pieces of non-defective image data 210 (N is an integer of 2 or more). N can preferably be 10 or more, for example 20 or more.
  • the average pixel value ⁇ (i, j) and the standard deviation ⁇ (i, j) of the pixel (i, j) are previously calculated from the N pieces of non-defective image data, and the average pixel value ⁇ (i, j) and the standard The deviation ⁇ (i, j) is included in the learned good image database 200.
  • the average pixel value ⁇ (i, j) obtained from the data 210 of the N good-quality images is calculated by the following equation.
  • V n (i, j) is the pixel value of the pixel (i, j) in the image data of the n-th good sample.
  • the standard deviation ⁇ (i, j) is calculated by the following equation.
  • the processor 10 classifies non-defective pixels and unique pixels. More specifically, the processor 10 calculates the pixel value V (i, J) of each pixel (i, j) in the inspection area 82 of the workpiece 70 from the learned good image database 200 by the average pixel value ⁇ (i , J), the absolute value of V (i, J) - ⁇ (i, j) is determined as the deviation. When the deviation exceeds the threshold T, the pixel (i, j) is classified as a unique pixel, and when the deviation is equal to or smaller than the threshold T, the pixel (i, j) is classified as a good pixel. Thereby, the processor 10 generates an array of unique pixels.
  • the threshold T is, for example, a coefficient k ⁇ ⁇ (i, j).
  • the coefficient k is a predetermined positive constant, and the same value is given to all the pixels (i, j) in common.
  • the coefficient k can be set, for example, within a range of 2 or more and 5 or less. Increasing the coefficient k makes it easier to classify as good pixels. The determination of the coefficient k can often be made by trial and error.
  • the processor 10 may classify the non-defective pixels and the unique pixels based on, for example, the edge intensity of the pixel value at each pixel position in the reference area.
  • the “pixel value” is used as a term including a luminance value, a density, an edge intensity, and the like.
  • the edge strength indicates the magnitude of the density gradient vector between the pixel of interest (i, j) and its neighboring pixels.
  • the processor 10 does not classify the non-defective pixels and the unique pixels based on the statistic of the pixel value, but instead of the statistic and the inspection area 82 determined by the non-defective image data 210 including the reference region of each of the plurality of non-defective pixels.
  • the processor 10 does not classify the non-defective pixels and the unique pixels based on the statistic of the pixel value, but instead of the statistic and the inspection area 82 determined by the non-defective image data 210 including the reference region of each of the plurality of non-defective pixels.
  • only the unique pixels may be extracted from the pixel group included in the inspection area 82.
  • the pixel value at each pixel position includes, for example, the edge strength described above.
  • the processor 10 may extract only the unique pixels from the pixel group included in the inspection area 82 based on the edge intensity of the pixel value at each pixel position.
  • the processor 10 compares the edge strength of each pixel value in the inspection area 82 of the work 70 with the average edge strength which is a statistic obtained from the learned good image database 200, and determines the absolute value of the difference.
  • the average edge intensity is obtained by averaging the edge intensity I (i, j) of the pixel (i, j) in each of the data 210 of the N non-defective images, similarly to the average value and the standard deviation of the pixels. Is determined by
  • the processor 10 determines from the pixel group included in the inspection area 82 that: The pixel (i, j) is extracted as a unique pixel. Thereby, the processor 10 can generate an array of unique pixels including the extracted unique pixels.
  • step S20 the processor 10 determines whether or not the inspection object is a candidate for a defective product based on the arrangement of the unique pixels including the extracted unique pixels. In other words, the processor 10 determines whether or not the inspection object is a candidate for a defective product based on the arrangement of the unique pixels classified as the unique pixels.
  • the morphological processing may be performed on the arrangement of the unique pixels.
  • the morphological processing includes, for example, removal of isolated singular pixels and connection of adjacent singular pixels.
  • a method using a shape characteristic parameter described later can be applied, but is not particularly limited.
  • the work 70 determined to be a candidate for a defective product in the first stage inspection may actually be a non-defective product.
  • the visual inspection device visually inspects the work 70 determined to be a candidate for a defective product by, for example, a person, it may be determined that the work 70 falls within the range of the non-defective product. This is likely to occur, for example, when the N pieces of good image data 210 serving as the basis of the learned good image database 200 are obtained from only ideally good products.
  • a large number of castings can be manufactured by using a plurality of dies. For example, if ten dies are used, the number of products can be increased tenfold. Ideally, it is desired that the plurality of molds have the same shape. This is because a large number of castings having the same shape can be manufactured.
  • a mold used for a long period of time changes over time, and causes wear or damage. Therefore, inspections for repairing damaged molds and maintaining their shapes are regularly performed in factories. However, due to the repetition of this maintenance, it is often the case that the individual shapes of a plurality of castings manufactured using a plurality of dies differ slightly depending on the degree of wear or damage of the dies. . Under such circumstances, when an appearance inspection for inspecting defects such as dents or scratches of the cast product is performed, for example, when a person inspected by visual inspection, an inspected object determined to be a non-defective product has a delicate shape of a mold. The problem of overdetection as a defective product due to the difference may occur.
  • FIGS. 7A and 7C are diagrams showing samples of image data of an inspection object determined to be non-defective.
  • FIGS. 7B and 7D are diagrams showing samples of image data of the inspection object which may be determined to be non-defective in the appearance inspection, although they are originally non-defective.
  • Each of the sample images shown in FIGS. 7A to 7D is an image including a partial region of the substrate surface subjected to the electrodeposition coating (ED).
  • the sample image shown in FIG. 7A is a sample of the image data of the inspection object determined to be non-defective.
  • the sample image shown in FIG. 7B is a sample of the image data of the inspection object that may be determined to be non-defective in the appearance inspection although it is originally non-defective.
  • sample image shown in FIG. 7C is a sample of the image data of the inspection object determined to be non-defective.
  • the sample image shown in FIG. 7D is a sample of the image data of the inspection object that may be determined to be non-defective in the appearance inspection although it is originally non-defective.
  • One of the causes of over-detection is that the line width or shape of the crank or corner portion of the groove in the area enclosed by the dashed rectangle is slightly different. This subtle difference in shape occurs due to variations in individual shapes caused by mold maintenance.
  • a pre-determination step is performed in the first-stage inspection, and then a determination step using a machine learning method is performed in the second-stage inspection.
  • a determination step using the machine learning method will be described in more detail.
  • FIG. 5B is a flowchart illustrating an example of a process of performing the second-stage inspection in the image processing according to the present embodiment.
  • step S22 the processor 10 obtains the shape characteristic parameters of the two-dimensional pattern of the arrangement of the unique pixels when it is determined in the first inspection that the inspection object is a candidate for a defective product.
  • the connected components in the binary image of the arrangement of the unique pixels shown in FIG. 4 can be classified according to the shape characteristics.
  • a shape feature parameter can be obtained.
  • the shape feature parameter is, for example, a center of gravity, a circumscribed rectangle (also referred to as a “bounding box”), an area, a perimeter, a circularity, or a Euler number determined from the two-dimensional pattern of the unique pixels.
  • step 24 the processor 10 determines whether or not the inspection object is non-defective based on the shape characteristic parameters using a machine learning method. For example, supervised learning classification can be applied to the machine learning method.
  • FIG. 8 is a flowchart illustrating an example of processing of the learning device 350 in the learning phase.
  • step S30 the processor 10 performs a pre-determination step on each of the plurality of inspection objects to acquire an array of unique pixels.
  • data of an array of a plurality of unique pixels for a plurality of inspection objects is obtained.
  • step S32 the processor 10 acquires, as learning data, shape characteristic parameters of an array of unique pixels from candidates for defective products among the plurality of inspection objects and the inspection object determined in the first stage inspection. Finally, M shape feature parameters extracted from an array of M unique pixels for M defective candidates are acquired.
  • M is 2 or more, preferably 10 or more. M can be, for example, 20 or more.
  • step S 34 supervised learning data in which each acquired learning data is labeled with a good (OK) or defective (NG) label is input to the learning device 350. Labels are also called teacher data.
  • step S36 the learning device 350 generates a learned model based on the supervised learning data, and outputs the generated model to the classifier 360.
  • the learned model is, for example, a support vector machine (SVM).
  • the classifier 360 performs binary classification using the trained model. More specifically, when the inspection object is determined to be a candidate for a defective product in the inspection at the first stage, the classifier 360 determines whether the inspection object is a non-defective product based on the shape characteristic parameter of the array of the unique pixels of the inspection object. Is determined. The classifier 360 outputs a determination result 370 indicating whether or not the inspection object is a non-defective product. The determination result 370 is displayed on the display 40, for example.
  • the trained model (or the classifier 360) includes, for example, a logistic circuit, a random forest, a decision jungle, a boost decision tree, an averaging perceptron, a linear SVC, a local detail SVM, a Bayes point machine, and a naive Bayes.
  • a classifier for performing binary classification such as a neural network, can be widely used.
  • the shape of the inspection object is added to the classifier including the learned model.
  • the inspection object can be classified into one of a non-defective product and a defective product.
  • the inspection in the second stage does not particularly require a learned good image database, and a general-purpose SVM can be used as a classifier, so that the program can be easily mounted on a computer.
  • the appearance inspection according to the second embodiment is different from the first embodiment in that an image matching process is performed as a second stage inspection.
  • the processing and functional blocks for performing the first-stage inspection are as described in the first embodiment, and a description thereof will be omitted.
  • processing and functional blocks for performing the second-stage inspection will be described in more detail.
  • FIG. 9 is a diagram schematically illustrating the distribution of N pixel values Vn (p, q) in the learned good image database 200 for a specific pixel (p, q).
  • the horizontal axis of the graph is the magnitude of the pixel value Vn (p, q), and the vertical axis is the frequency of appearance of the pixel value Vn (p, q).
  • the height of the bar indicates the frequency of appearance of the pixel having that pixel value.
  • the graph shows a normal distribution N ( ⁇ , ⁇ 2 ) for reference.
  • the symbol A represents the pixel value VA (p, q) of the pixel (p, q) in the image data including the inspection area 82 of the inspection object A.
  • the symbol B represents the pixel value VB (p, q) of the pixel (p, q) in the non-defective image data including the reference area of the non-defective sample B.
  • the symbol C represents the pixel value VC (p, q) of the pixel (p, q) in the non-defective image data including the reference area included in the non-defective sample C.
  • the inspection object A is a defective product candidate in the first-stage inspection.
  • the deviation of the pixel value VB (p, q) of the non-defective sample B exceeds 3 ⁇ , and is larger than the deviation of the pixel value VA (p, q) of the inspection object A.
  • the deviation of the pixel value VA (p, q) of the inspection object A exceeds the threshold value T (2 ⁇ )
  • the inspection object A is determined to be a defective product in the first stage inspection.
  • the object to be inspected which should originally be determined to be a non-defective product, is determined to be not a non-defective product in the first stage of the visual inspection.
  • This is a problem that can occur when an inspection for good product learning is performed based on various statistics determined by a normal distribution, and is considered to be one factor that causes overdetection.
  • the processor 10 performs the following processing according to a program. (1) Acquire image data including an inspection area of the inspection object. (2) Obtain a pixel value at each pixel position included in the inspection area from the image data.
  • a pixel included in the inspection area based on a statistic determined based on image data including a reference area included in each of the plurality of non-defective products and a pixel value at each pixel position included in the inspection area. Extract singular pixels from the group.
  • the data of the original image from which the two-dimensional pattern of the pixel array including the unique pixel is generated and the learned non-defective image database are stored.
  • the matching is performed with the data of the non-defective image including the reference area included in each of the plurality of non-defective items.
  • the inspection object is determined to be non-defective.
  • the pre-determination step including the processes (1) to (4) is the same as that of the first embodiment.
  • the determination step including the processing of (5) and (6) is a step that defines processing for performing, for example, region-based or feature-point-based matching, which is different from the machine learning method.
  • FIG. 10 is a functional block diagram illustrating functional blocks for performing image processing of the image processing apparatus 100 according to the present embodiment.
  • the functional block illustrated in FIG. 10 for executing image processing according to the present embodiment includes a pre-judgment unit 300A and a judgment unit 300B used for executing template matching.
  • the determination unit 300B is a unit that determines whether or not the inspection object is a non-defective product.
  • the determination unit 30B has a template matching unit 390.
  • the template matching unit 390 uses, as a template, the data 380 of the original image from which the two-dimensional pattern of the arrangement of the unique pixels is generated, and each of the plurality of non-defective products included in the learned non-defective image database 200 has A template matching is performed on the non-defective image data 210 including the reference area to determine whether or not the inspection object is a non-defective object, and a result 370 of the discrimination is output.
  • FIG. 11 is a flowchart illustrating an example of a process of executing the second-stage inspection in the image processing according to the present embodiment.
  • the processor 10 determines whether or not the inspection object is a candidate for a defective product, and Output the array of unique pixels including
  • step S23 when the processor 10 determines in the first stage inspection that the inspection object is a candidate for a defective product, the processor 10 determines whether the input image data 310 is a source of the two-dimensional pattern of the array of the unique pixels. Is matched with N pieces of non-defective image data 210 included in the learned non-defective image database 200 and including reference regions of a plurality of non-defective images.
  • Matching is a method of superimposing images and detecting a difference between the images to determine whether the two images are the same, and includes, for example, region-based or feature point-based matching.
  • the processor 10 uses the original image data 380 as a template, and performs template matching on the N pieces of non-defective image data 210 included in the learned non-defective image database 200.
  • the processor 10 performs template matching based on an evaluation value for evaluating a similarity or a difference between two images.
  • the evaluation value is defined by, for example, “sum of square errors of each pixel value (SSD)”, “sum of absolute values of errors of each pixel value (SAD)”, or “normalized mutual function (NCC)”.
  • step S25 the processor 10 determines that the inspection object is non-defective when the original image data 380 matches at least one of the N pieces of non-defective image data 210. More specifically, when the evaluation value of the SSD or the like is equal to or smaller than the threshold value, the processor 10 determines that the inspection object determined to be a defective product candidate in the first stage inspection is a non-defective product. When the evaluation value of the SSD or the like exceeds the threshold, the processor 10 determines that the inspection object determined to be a candidate for a defective product in the first stage inspection is a defective product.
  • the threshold used for template matching is often determined by trial and error.
  • the test object A Should match the image data of the good sample.
  • the inspection object A determined to be a defective candidate in the first-stage inspection can be finally determined to be a non-defective product.
  • overdetection can be suppressed by using a relatively simple algorithm such as template matching.
  • the learned good image database 200 can be commonly used for the first and second stages of inspection, the number of design steps for preparing the learned good image database for template matching can be reduced. Becomes The program can be easily mounted on the computer, and the memory cost can be reduced.
  • FIG. 12 is a functional block diagram illustrating variations of functional blocks for executing image processing of the image processing apparatus 100 according to the present embodiment.
  • This variation further includes another learned good image database 201 different from the learned good image database 200.
  • the learned good image database 201 can be created based on, for example, N (N is an integer of 2 or more) good image data 211.
  • N can preferably be 10 or more, for example 20 or more.
  • the processor 10 uses the original image data 380 as a template, and performs template matching on the non-defective image data 211 included in another learned non-defective image database 201 and including the reference region of each of the plurality of non-defective items.
  • the object to be inspected in the first stage inspection is It may be more likely to be determined to be a defective product candidate.
  • the data 211 of the N non-defective images having a larger degree of variation than the data 210 of the N non-defective images was used, and it was determined that the candidate was a defective product in the first stage inspection.
  • Some of the inspected objects can be determined as non-defective products in the second stage inspection.
  • the template matching unit 390 When the template matching unit 390 over-detects the original image data 380 of the inspection object, which should originally be determined to be a non-defective product, the template matching unit 390 generates the non-defective image data 211 in the learned non-defective image database 201. It is possible to additionally register the image data. Good image data 2 in the learned good image database 200 10 has already been optimized by an engineer or designer. Therefore, it is not preferable to easily access the database at the work site and additionally register the erroneously detected original image data 380 to the non-defective image data 210. This is because an unexpected change may occur in the content of the learning data, and the detection sensitivity may be largely shifted.
  • the image processing device, the image processing method, the appearance inspection system, the appearance inspection method, and the computer program according to the present disclosure can be suitably used for the appearance inspection of a product or a part at a manufacturing site such as a factory.

Abstract

外観検査に用いられ得る新しい画像処理装置、外観検査システムおよびコンピュータプログラムを提供する。本開示の画像処理装置(100)は、プロセッサ(10)、プログラムを記憶するメモリ(12)、学習済み良品画像データベースを備える。プログラムに従って、プロセッサは、被検査物の検査領域を含む画像データを取得し、画像データから検査領域内に含まれる各画素位置における画素値を取得し、各良品の画像データから決定された統計量および検査領域内の各画素位置における画素値に基づいて、検査領域内の画素群から特異画素を抽出し、特異画素の配列に基づいて、被検査物が不良品の候補であるか否かを判別し、被検査物が不良品の候補であると判定した場合、配列の2次元パターンの形状特徴パラメータを取得し、機械学習法を用いて、被検査物が良品であるか否かを形状特徴パラメータに基づいて判定することを実行する。

Description

画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム
本願は、外観検査に用いられ得る画像処理装置、画像処理方法および外観検査システムに関している。また、本願は、画像処理に使われるコンピュータプログラムにも関している。
工場などの製造現場では、製造された完成品または部品の外観に現れた欠陥、傷、異物、および汚れを目視検査によって検出することが行われている。このような外観検査を機械化または自動化するため、さまざまな画像処理技術が開発されている。 
特開2017-194334号公報および特開2016-212488号公報は、2段階の検査を経て物品の外観に現れた真の欠陥を判別する検査方法を開示している。特開2017-194334号公報に開示された方法では、第1段階の検査において、画像を複数のブロックに分割し、分割したブロック毎に欠陥の候補を判定する。第2段階の検査において、欠陥の候補と判定したブロックをサブブロックにさらに分割し、サブブロック毎に真の欠陥を判定する。特開2016-212488号公報に開示された方法では、第1段階の検査において、ラインカメラを用いた欠陥検査を行う。第1段階の検査で欠陥有りと判定した場合、第2段階の検査において、カラーのエリアカメラを用いた欠陥検査を行い真の欠陥を判定する。
特開2017-194334号公報 特開2016-212488号公報
目視検査では「良品」と判別されるべき被検査物を、外観検査装置を用いた良品検査によって「不良品」と判別してしまう、いわゆる過検出が生じる場合がある。 
特開2017-194334号公報または特開2016-212488号公報が開示する2段階の検査によれば、検査に要する時間を増大させることなく、精密な欠陥検査を行うことが可能となる。しかしながら、例えば鋳造品の微妙な形状の違いに起因して生じ得る過検出を低減することは困難である。 
本開示の実施形態は、外観検査に用いられ得る新規な画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラムを提供する。
本開示の画像処理装置は、例示的な実施形態において、プロセッサと、前記プロセッサの動作を制御するプログラムを記憶するメモリと、学習済み良品画像データベースと、を備える。前記プログラムに従って、前記プロセッサは、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、を包含する判定ステップと、を実行する。 
本開示の画像処理装置は、例示的な実施形態において、プロセッサと、前記プロセッサの動作を制御するプログラムを記憶するメモリと、学習済み良品画像データベースと、を備える。前記プログラムに従って、前記プロセッサは、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、を実行する。 
本開示の外観検査システムは、例示的な実施形態において、上記の画像処理装置と、前記被検査物を光で照射する光源と、前記画像のデータを生成するための画像信号を出力するイメージセンサと、前記画像処理装置が備える前記プロセッサが実行した判別の結果を表示するモニタとを備える。 
本開示の画像処理方法は、例示的な実施形態において、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、を包含する判定ステップと、を含む。 
本開示の画像処理方法は、例示的な実施形態において、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、を含む。 
本開示のコンピュータプログラムは、例示的な実施形態において、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、を包含する判定ステップと、をコンピュータに実行させる。 
本開示のコンピュータプログラムは、例示的な実施形態において、被検査物が有する検査領域を含む画像のデータを取得することと、前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、を包含するプレ判定ステップと、前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、をコンピュータに実行させる。
本開示の実施形態によれば、特異画素に分類された画素の配列に基づいて被検査物が不良品の候補であるか否かを判別する第1段階の検査、および、機械学習法またはマッチング手法を用いて、不良品の候補の中の被検査物が良品であるか否かを判別する第2段階の検査を実施することによって過検出を低減することが可能となる、新規な画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラムが提供される。
図1は、本開示の外観検査システムの構成例を示すブロック図である。 図2は、外観検査システムの一部の構成を模式的に示す図である。 図3は、第1の実施形態による画像処理装置100の、画像処理を実行するための機能ブロックを例示する機能ブロック図である。 図4は、特異画素の配列を説明するためのサンプル画像を示す図である。 図5Aは、第1の実施形態による画像処理における第1段階の検査を実行する処理の例を示すフローチャートである。 図5Bは、第1の実施形態による画像処理における第2段階の検査を実行する処理の例を示すフローチャートである。 図6は、ワーク70を説明するための図である。 図7Aは、良品であると判定される被検査物の画像データのサンプルを示す図である。 図7Bは、本来は良品であるにもかかわらず、外観検査において良品ではないと判定される可能性がある被検査物の画像データのサンプルを示す図である。 図7Cは、良品であると判定される被検査物の画像データのサンプルを示す図である。 図7Dは、本来は良品であるにもかかわらず、外観検査において良品ではないと判定される可能性がある被検査物の画像データのサンプルを示す図である。 図8は、学習のフェーズにおける学習器350の処理の例を示すフローチャートである。 図9は、ある特定の画素(p,q)について、学習済み良品画像データベース200内のN個の画素値Vn(p,q)の分布を模式的に示す図である。 図10は、第2の実施形態による画像処理装置100の、画像処理を実行するための機能ブロックを例示する機能ブロック図である。 図11は、第2の実施形態による画像処理における第2段階の検査を実行する処理の例を示すフローチャートである。 図12は、第2の実施形態による画像処理装置100の、画像処理を実行するための機能ブロックのバリエーションを例示する機能ブロック図である。
<第1の実施形態> 本開示の画像処理装置は、非限定的で例示的な実施形態において、プロセッサと、プロセッサの動作を制御するプログラムを記憶するメモリと、学習済み良品画像データベースとを備える。プロセッサは、プログラムに従って、以下の処理を実行する。 (1)被検査物が有する検査領域を含む画像のデータを取得する。 (2)画像のデータから検査領域内に含まれる各画素位置における画素値を取得する。 (3)複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および検査領域内に含まれる各画素位置における画素値に基づいて、検査領域内に含まれる画素群から特異画素を抽出する。 (4)抽出した特異画素を含む画素の配列に基づいて、被検査物が不良品の候補であるか否かを判別する。 (5)被検査物が不良品の候補であると判定した場合において、特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得する。 (6)機械学習法を用いて、被検査物が良品であるか否かを形状特徴パラメータに基づいて判定する。 
本実施形態の画像処理方法も、図1および図2に示される装置を用いて実行可能である。本明細書において、上記(1)から(4)までの処理を含むステップをプレ判定ステップと呼び、上記(5)および(6)の処理を含むステップを判定ステップと呼ぶ場合がある。プレ判定ステップは、第1段階の検査に用いられ、被検査物が不良品の候補であるか否かを判別するための処理を規定したステップである。判定ステップは、第2段階の検査に用いられ、被検査物が良品であるか否かを判定するための処理を規定したステップである。 
図1は、本開示の外観検査システムの構成例を示すブロック図である。図示されている例において、外観検査システム1000は、プロセッサ10およびメモリ12を有する画像処理装置100を備える。プロセッサ10は、例えば中央演算処理装置(CPU)またはデジタル信号処理プロセッサなどの集積回路(IC)チップであり得る。本明細書において、「プロセッサ」は、プロセッサを組み込んだフィールド・プログラマブル・ゲート・アレイ(FPGA)などのICチップを含む用語として広く解釈される。例えば、プロセッサ10は、FPGAであってもよい。 
メモリ12は、プロセッサ10の動作を制御するコンピュータプログラムを格納した記録媒体である。メモリ12は、単一の記録媒体である必要はなく、複数の記録媒体の集合であり得る。メモリ12は、例えばRAMなどの半導体揮発性メモリ、フラッシュROMなどの半導体不揮発性メモリ、およびハードディスクドライブなどのストレージ装置を含み得る。メモリ12の少なくとも一部は、取り外し可能な記録媒体であってもよい。メモリ12は、ある実施形態において、良品/不良品判定に使用され得る「学習済み良品画像データ」を記憶している。 
プロセッサ10は、メモリ12とは別に、クラウド上のサーバまたはデータベース装置に有線または無線によって接続されていてもよい。この場合、サーバまたはデータベース装置が学習済み良品画像データを記憶していてもよい。 
外観検査システム1000は、更に、光源20と、イメージセンサ(撮像装置)30と、ディスプレイ40と、操作装置50とを備える。 
光源20は、被検査物(検査対象)を光で照射する照明装置である。被検査物は、外観検査の対象となるさまざまな製品または部品などの各種の物品である。以下、被検査物を「ワーク」と称する場合がある。光源20は、例えば多数の白色LED素子が面状またはリング状に配列されたLED照明ユニットであり得る。光源20は不図示の点灯回路を備えている。ある実施形態において、光源20は同軸落射照明を可能にするように配置される。光源20が放射する光の波長(色)は、特に限定されないが、検査対象に応じて選択され得る。光の偏光状態は、偏光または非偏光のいずれであってもよいが、良品学習時と検査時とで偏光状態が変化していないことが望ましい。図1の例において、光源20はプロセッサ10に接続されているが、このような接続は不可欠ではない。光源20のオン/オフおよび照度調整などの動作は、プロセッサ10を介することなく、光源20の点灯回路に対してユーザから直接に行われてもよい。 
撮像装置30は、被検査対物の画像のデータを生成するための画像信号を出力する装置である。画像信号は、有線または無線により、プロセッサ10に送られる。撮像装置30の典型例は、多数のフォトダイオードが行列状に配列されたCMOSイメージセンサまたはCCDイメージセンサなどのエリアセンサを備えるカメラである。撮像装置30は、被検査物のカラー画像またはモノクローム画像のデータを生成する。撮像装置30には、外観検査用の各種カメラを使用することができる。 
ディスプレイ40は、画像処理装置100が実行した判別の結果などを表示する装置である。ディスプレイ40は、モニタと称されることもあり、撮像装置30によって取得された画像を表示することもできる。 
操作装置50は、選択領域の指定を含むユーザからの入力を受け取り、プロセッサ10に与える入力デバイスである。操作装置50の例は、タッチパネル、マウスおよび/またはキーボードである。ディスプレイ40および操作装置50は、プロセッサ10に有線によって常に接続されている必要はなく、通信インタフェースを介して無線または有線によって必要なときだけ接続されていてもよい。ディスプレイ40および操作装置50は、ユーザが携帯する端末装置またはスマートフォンであってもよい。 
図2は、外観検査システム1000の一部の構成例を模式的に示す図である。光源20および撮像装置30は、筐体120の内部において、サポート部材60によって支持されている。被検査物であるワーク70は、移送台62に乗せられ、把持機構によって移送台62に固定される。移送台62は、ワーク70を乗せたまま、搬送ステージ64によって水平方向に移動可能である。移送台62が光源20の真下に位置しているとき、光源20からワーク70に対する同軸落射照明が行われる。照明が行われている間に撮像装置30は、ワーク70の撮像を行う。ワーク70は、ロボットアームに把持されて撮像ポジションに置かれてもよい。 
撮像によって取得された画像のデータは、撮像装置30から図1の画像処理装置100に送られる。1回の撮像によって取得される画像の画素数は、例えば30万画素から5000万画素である。図1の画像処理装置100、ディスプレイ40および操作装置50は、汎用的なデジタルコンピュータシステム、例えばパーソナルコンピュータによって実現され得る。 
画像データを取得した画像処理装置100は、前述した処理を実行してワーク70の外観検査を実行する。 
図3を参照する。図3は、本実施形態による画像処理装置100の、画像処理を実行するための機能ブロックを例示する機能ブロック図である。機能ブロック図における各ブロックは、ハードウェア単位ではなく機能ブロック単位で示される。画像処理に用いるソフトウェアは、例えば、各機能ブロックに対応した特定の処理を実行させるためのコンピュータプログラムを構成するモジュールである。そのようなコンピュータプログラムは、例えばメモリ12に格納される。プロセッサ10は、メモリ12から命令を読み出して各処理を逐次実行することができる。 
本実施形態による画像処理を実行するための図3に例示する機能ブロックは、プレ判定ステップを実行するプレ判定ユニット300Aおよび判定ステップを実行する判定ユニット300Bを有する。 
プレ判定ユニット300Aは、被検査物が不良品の候補であるか否かを判別するユニットである。プレ判定ユニット300Aは、比較ユニット320を有する。プレ判定ユニット300Aは、入力画像データ310を取得すると、学習済み良品画像データベース200を参照しながら、入力画像データ310から、特異画素を含む画素の配列を表現した2値画像330を生成して出力する。以下、特異画素を含む画素の配列を「特異画素の配列」を表記することとする。 
図4は、特異画素の配列を説明するための2値画像330のサンプル画像を示す図である。 
特異画素の配列は、後述する良品画像および特異画素331を含む2値画像330内に表現される。図4には、特異画素331をグレースケールの白(明)レベルで表示し、良品画像をブレースケールの黒(暗)レベルで表示している。これとは逆に、特異画素331に黒レベルを割り当て、良品画像に白レベルを割り当てることができる。例えば、特異画素の配列は、出力画像である2値画像330に含まれる特異画素331が形成する2次元パターン、または、2値画像330において特異画素331が位置する座標を含むデータの配列を意味する。出力画像は、2値画像に限られず、例えば、良品画素および特異画素331のいずれにも分類されない画素を含んでいても構わない。 
判定ユニット300Bは、不良品の候補の中の被検査物が良品であるか否かを判定するユニットである。判定ユニット300Bは、学習器350および分類器360を有する。判定ユニット300Bは、特異画素の配列をプレ判定ユニット300Aから受け取ると、特異画素の配列からその2次元パターンの形状特徴パラメータを取得する。学習器350は、不良品の候補である被検査物の形状特徴パラメータに基づいて機械学習を行う教師あり学習器であり、学習済みモデルを生成する。分類器360は、学習器350が生成した学習済みモデルを利用して被検査物が良品であるか否かを判別し、判別結果370を出力する。 
図5Aに示すフローチャートを参照する。以下、本実施形態による画像処理の内容をより詳しく説明する。 
図5Aは、本実施形態による画像処理における第1段階の検査を実行する処理の例を示すフローチャートである。 
まず、ステップS12において、プロセッサ10は、ワーク70の画像データを取得する。画像データは、例えば図6に模式的に示されるように、ワーク70の像を含むフレーム画像である。現実の画像は、ワーク70の表面が有する凹凸および模様を反映した例えば256階調の画素値(「明るさ」または「グレースケール」の値)の配列である。画素値を輝度値または濃度と称する場合がある。図3に示す機能ブロック図において、入力画像データ310が、プロセッサ10に入力する入力データであり、ワーク70の画像データに相当する。 
1枚のフレーム画像には、ワーク70以外に移送台62の一部が背景70Bとして含まれ得る。図6の例において、線82Lによって囲まれた領域82が「検査領域」である。1枚のフレーム画像は、複数の検査領域82を含んでいてもよい。ワーク70の位置は、フレーム画像内において予め決められた位置に整合するようにアライメントが実行される。このアライメントは、ワーク70の複数の基準点を撮像装置30の視野における複数の基準点に一致させることである。このようなアライメントの第1段階は、撮像装置30のレンズ光軸に対するワーク70の物理的な配置関係を調整することである。アライメントの第2段階は、撮像された画像の画素位置(座標)を調整することである。第2段階のアライメントは、画像処理技術によって画像の並進、回転、拡大および/または縮小などを行うことを含む。このようなアライメントの結果、各ワーク70の検査領域82は、常に線82Lによって囲まれた領域に整合する。こうして、同じ品種に属する各ワーク70の検査領域82の画像は、画素単位で良品見本
画像(マスタまたはレファレンス)と比較することが可能になる。 
図5AのステップS14において、プロセッサ10は、入力画像データ310から検査領域82内の画素値を取得する。座標(i,j)の位置にある画素の画素値をV(i,j)で表現することができる。座標(i,j)は、例えばj行i列の画素位置を示す。ここでiおよびjは、それぞれ、正の整数である。入力画像データ310が例えば640×480画素の配列から構成される場合、1≦i≦640、1≦j≦480の関係を満たすが、検査領域82の外側に位置する画素の画素値は以下の処理に不要である。画素値は、例えば256階調の明るさを示す数値(輝度値)であるが、画素単位の他の特徴量であってもよい。以下、座標(i,j)の位置にある画素を画素(i,j)と称する場合がある。 
ステップS16において、プロセッサ10は、複数の良品のそれぞれが有する参照領域を含む良品画像のデータ210の統計量を学習済み良品画像データベース200から取得する。参照領域とは、ワーク70の検査領域と対比されるべき領域を意味する。上述したとおり、同じ品種に属する各ワーク70の検査領域82の画像は、画素単位で良品見本の参照領域の画像と比較することができる。 
プロセッサ10は、具体的に、学習済み良品画像データベース200から参照領域の画素値の統計量を画素毎に取得する。この統計量は、複数の良品のそれぞれが有する参照領域を含む良品画像のデータ210に基づいて決定された統計量である。より詳細には、この統計量は、ワーク70の検査領域82と対比されるべき参照領域内の各画素位置における画素値に基づく統計量である。統計量は、例えば、各画素位置における画素値の平均値、分散、標準偏差、最大値、最小値および中央値を含む。本実施形態では、統計量とし、参照領域内の各画素位置における画素値の平均値および標準偏差を用いる。 
学習済み良品画像データベース200は、例えばN枚(Nは2以上の整数)の良品画像のデータ210に基づいて作製され得る。Nは、好ましくは10以上、例えば20以上であり得る。予めN枚の良品画像データから画素(i,j)の平均画素値μ(i,j)および標準偏差σ(i,j)が算出されており、平均画素値μ(i,j)および標準偏差σ(i,j)が学習済み良品画像データベース200に含められている。 
N枚の良品画像のデータ210から取得される平均画素値μ(i,j)は、以下の式によって算出される。ここで、V(i,j)は、n番目の良品見本の画像データにおける画素(i,j)の画素値である。  
Figure JPOXMLDOC01-appb-M000001
標準偏差σ(i,j)は、以下の式によって算出される。  
Figure JPOXMLDOC01-appb-M000002
この式の左辺は分散σであるため、分散の平方根が標準偏差σ(i,j)である。 
ステップS18において、プロセッサ10は、良品画素および特異画素の分類を行う。具体的に説明すると、プロセッサ10は、ワーク70の検査領域82内における各画素(i,j)の画素値V(i,J)を学習済み良品画像データベース200から取得した平均画素値μ(i,j)と比較して、V(i,J)-μ(i,j)の絶対値を偏差として求める。この偏差が閾値Tを超えたとき、その画素(i,j)を特異画素に分類し、偏差が閾値T以下のとき、画素(i,j)を良品画素に分類する。これにより、プロセッサ10は、特異画素の配列を生成する。ここで、閾値Tは、例えば係数k×σ(i,j)である。係数kは予め定められた正の定数であり、全ての画素(i,j)に共通して同じ値が与えられている。係数kは例えば2以上5以下の範囲内に設定され得る。係数kを大きくすると、良品画素に分類されるやすくなる。係数kの決定は、しばしば試行錯誤によって行われ得る。 
プロセッサ10は、例えば、参照領域内の各画素位置における画素値のエッジ強度に基づいて良品画素および特異画素の分類を行ってもよい。本明細書において、「画素値」は、輝度値、濃度またはエッジ強度などを含む用語として用いる。エッジ強度は、着目する画素(i,j)とその近傍画素の間の濃度勾配ベクトルの大きさを表す。 
プロセッサ10は、画素値の統計量に基づいて良品画素および特異画素の分類を行う代わりに、複数の良品のそれぞれが有する参照領域を含む良品画像のデータ210によって決定される統計量および検査領域82内に含まれる各画素位置における画素値に基づいて、検査領域82内に含まれる画素群から特異画素だけを抽出してもよい。各画素位置における画素値は、例えば上述したエッジ強度などを含む。 
プロセッサ10は、各画素位置における画素値のエッジ強度に基づいて、検査領域82内に含まれる画素群から特異画素だけを抽出してもよい。プロセッサ10は、ワーク70の検査領域82内における各画素値のエッジ強度を、学習済み良品画像データベース200から取得した統計量である平均のエッジ強度と比較して、それらの差分の絶対値を求める。ここで、平均のエッジ強度は、画素の平均値および標準偏差と同様に、N枚の良品画像のデータ210のそれぞれにおける画素(i,j)のエッジ強度I(i,j)を平均することにより求まる。 
プロセッサ10は、エッジ強度I(i,j)と画素(i,j)の平均のエッジ強度との差分の絶対値が閾値Tを超えた場合において、検査領域82内に含まれる画素群から、その画素(i,j)を特異画素として抽出する。これにより、プロセッサ10は、抽出した特異画素を含む特異画素の配列を生成することができる。 
ステップS20において、プロセッサ10は、抽出した特異画素を含む特異画素の配列に基づいて、被検査物が不良品の候補であるか否かを判別する。換言すると、プロセッサ10は、特異画素に分類された特異画素の配列に基づいて、被検査物が不良品の候補であるか否かを判別する。このとき、特異画素の配列に対してモルフォロジ処理を行ってもよい。モルフォロジ処理は、例えば孤立した特異画素の除去、隣接する特異画素の連結を含む。特異画素の配列に基づいて被検査物が不良品の候補であるか否かを判別するアルゴリズムには、一例として、後述する形状特徴パラメータを用いる手法を適用することができるが、特に限定されない。 
第1段階の検査において不良品の候補であると判定したワーク70が現実には良品であることがある。外観検査装置が不良品の候補であると判別したワーク70を、例えば人が目視によって検査した場合、良品限度の範囲内に入ると決論づけられることがある。これは、例えば、学習済み良品画像データベース200の基礎となるN枚の良品画像のデータ210が、理想的に優れた良品のみから取得された場合に生じやすくなる。 
例えば、金型を用いて鋳造品を製造する製造現場において、複数の金型を使用することにより、鋳造品を大量に製造することができる。例えば10台の金型を使用すれば、製造数を10倍に増やすことができる。理想的には、複数の金型は同一の形状であることが望まれる。同一の形状を有する鋳造品を大量に製造することができるためである。 
長い期間において使用された金型は経時変化し、摩耗または損傷などが生じる。そのため、工場において、損傷した金型を補修し、その形状を保守する点検が定期的に行われている。しかし、この保守が繰り返されることにより、複数の金型を用いて製造した複数の鋳造品の間で、個々の形状が、金型の摩耗または損傷の程度によって微妙に異なってしまうことがしばしば起きる。このような状況下で、鋳造品の打痕または傷などの欠陥を検査する外観検査を実施すると、例えば人が目視によって検査した場合において良品と判定する被検査物が、金型の微妙な形状の違いに起因して不良品と過検出されてしまうという問題が生じ得る。 
図7Aおよび図7Cは、良品であると判定される被検査物の画像データのサンプルを示す図である。図7Bおよび図7Dは、本来は良品であるにもかかわらず、外観検査において良品ではないと判定される可能性がある被検査物の画像データのサンプルを示す図である。 
図7Aから図7Dに示すそれぞれのサンプル画像は、電着塗装(ED)処理した基板表面の一部の領域を含む画像である。図7Aに示すサンプル画像は、良品であると判定される被検査物の画像データのサンプルである。一方、図7Bに示すサンプル画像は、本来は良品であるにもかかわらず、外観検査において良品ではないと判定される可能性がある被検査物の画像データのサンプルである。 
これらと同様に、図7Cに示すサンプル画像は、良品であると判定される被検査物の画像データのサンプルである。一方、図7Dに示すサンプル画像は、本来は良品であるにもかかわらず、外観検査において良品ではないと判定される可能性がある被検査物の画像データのサンプルである。過検出の要因の1つは、破線の矩形で囲んだ領域内の溝のクランクまたは隅の部分の線幅または形状が、若干異なっているためである。この微妙な形状の違いは、金型の保守によって生じる個々の形状のばらつきに起因して発生する。 
このような過検出を低減するために、本実施形態では、第1段階の検査においてプレ判定ステップを実行した後、第2段階の検査において機械学習法を用いた判定ステップを実行する。以下、機械学習法を用いた判定ステップをより詳しく説明する。 
図3および図5Bを参照する。図5Bは、本実施形態による画像処理における第2段階の検査を実行する処理の例を示すフローチャートである。 
ステップS22において、プロセッサ10は、第1段階の検査で被検査物が不良品の候補であると判定した場合において、特異画素の配列の2次元パターンの形状特徴パラメータを取得する。図4に示す特異画素の配列の2値画像の中の連結成分は、形状の特徴によって分類できる。その特徴を数値化することにより形状特徴パラメータが得られる。形状特徴パラメータは、例えば、特異画素の2次元パターンから決定される重心、外接長方形(「バウンディングボックス」とも称される。)、面積、周囲長さ、円形度またはオイラー数である。 
ステップ24において、プロセッサ10は、機械学習法を用いて、被検査物が良品であるか否かを形状特徴パラメータに基づいて判定する。機械学習法に、例えば教師あり学習の分類を適用することができる。 
以下、機械学習法における学習のフェーズおよびランタイムのフェーズの内容をそれぞれより詳しく説明する。 
<学習のフェーズ> 図8は、学習のフェーズにおける学習器350の処理の例を示すフローチャートである。 
ステップS30において、プロセッサ10は、複数の被検査物のそれぞれに対し、プレ判定ステップを実行して、特異画素の配列を取得する。これにより、複数の被検査物についての複数の特異画素の配列のデータを得る。 
ステップS32において、プロセッサ10は、複数の被検査物のうちの不良品の候補と第1段階の検査において判定した被検査物から、特異画素の配列の形状特徴パラメータを学習データとして取得する。最終的に、M個の不良品の候補についてのM個の特異画素の配列から抽出したM個の形状特徴パラメータを取得する。Mは、2以上であり、好ましくは10以上である。Mは、例えば20以上であり得る。 
ステップS34において、取得したそれぞれの学習データに良品(OK)または不良品(NG)のラベルを付した教師あり学習データを学習器350に入力する。ラベルは、教師データとも称される。 
ステップS36において、学習器350は、教師あり学習データに基づいて学習済みモデルを生成し、分類器360に出力する。学習済みモデルは、例えばサポートベクターマシン(SVM)である。 
<ランタイムのフェーズ> 図5Bに示すステップS24において、分類器360は、学習済みモデルを用いて、2項分類を行う。より詳細には、第1段階の検査において被検査物を不良品の候補と判定した場合において、分類器360は、その被検査物の特異画素の配列の形状特徴パラメータに基づいて、それが良品であるか否かを判別する。分類器360は、被検査物が良品であるか否かを示す判別結果370を出力する。その判別結果370は、例えばディスプレイ40に表示される。 
学習済みモデル(または分類器360)には、サポートベクターマシン以外に、例えば、ロジスティック回路、ランダムフォレスト、デシジョンジャングル、ブースト 決定木、平均化パーセプトロン、線形SVC、ローカル詳細SVM、ベイズポイントマシン、単純ベイズまたはニューラルネットワークなどの2項分類を行う分類器を広く利用することができる。 
本実施形態によれば、第1段階の検査で被検査物が不良品の候補であると判定した場合に、第2段階の検査において、学習済みモデルを備える分類器にその被検査物の形状特徴パラメータを与えることにより、その被検査物を良品および不良品の一方に分類することができる。第2段階の検査を実行することにより、被検査物の外観検査において発生し得る過検出を低減することが可能となる。さらに、第2段階の検査は、学習済み良品画像データベースを特に必要とせず、かつ、汎用的なSVMを分類器に利用できるために、コンピュータへのプログラムの実装を容易に行うことができる。 
<第2の実施形態> 第2の実施形態による外観検査は、第2段階の検査として画像のマッチング処理を行う点で、第1の実施形態とは異なる。第1段階の検査を行う処理および機能ブロックは、第1の実施形態で説明したとおりであり、その説明は省略することとする。以下、第2段階の検査を行う処理および機能ブロックをより詳しく説明する。 
図9は、ある特定の画素(p,q)について、学習済み良品画像データベース200内のN個の画素値Vn(p,q)の分布を模式的に示す図である。グラフの横軸は、画素値Vn(p,q)の大きさであり、縦軸は画素値Vn(p,q)の出現頻度である。バーの高さは、その画素値を持つ画素の出現頻度を示している。グラフには、参考のため、正規分布N(μ、σ)が記載されている。 
図9の正規分布において記号Aは、被検査物Aが有する検査領域82を含む画像データ内の画素(p,q)の画素値VA(p,q)を表している。記号Bは、良品見本Bが有する参照領域を含む良品の画像データ内の画素(p,q)の画素値VB(p,q)を表している。記号Cは、良品見本Cが有する参照領域を含む良品の画像データ内の画素(p,q)の画素値VC(p,q)を表している。 
第1段階の検査において、例えば、上述した閾値Tの係数kを2に設定する場合において、第1段階の検査において被検査物Aが不良品の候補であるか否かを判定することを考える。図示されるように、例えば良品見本Bの画素値VB(p,q)の偏差は3σを超えており、被検査物Aの画素値VA(p,q)の偏差よりも大きい値を示す。しかしながら、被検査物Aの画素値VA(p,q)の偏差は閾値T(2σ)を超えるために、第1段階の検査において被検査物Aは不良品の候補であると判定される。つまり、本来は良品であると判定されるべき被検査物が、第1段階の検査による外観検査では良品ではないと判定される。これは、正規分布によって決定される様々な統計量に基づいて良品学習の検査を行う場合に発生し得る問題であり、過検出を生じさせる1つの要因になっていると考えられる。 
本実施形態による第2段階の検査では、特異画素の配列の2次元パターンの生成の元となった原画像のデータと、複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことにより、被検査物が良品であるか否かを判定する。プロセッサ10は、プログラムに従って、以下の処理を実行する。 (1)被検査物が有する検査領域を含む画像のデータを取得する。 (2)画像のデータから検査領域内に含まれる各画素位置における画素値を取得する。 (3)複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および検査領域内に含まれる各画素位置における画素値に基づいて、検査領域内に含まれる画素群から特異画素を抽出する。 (4)抽出した特異画素を含む画素の配列に基づいて、被検査物が不良品の候補であるか否かを判別する。 (5)被検査物が不良品の候補であると判定した場合において、特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、学習済み良品画像データベース内に含まれる、複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行う。 (6)原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、被検査物は良品であると判定する。 
上記(1)から(4)までの処理を含むプレ判定ステップは、第1の実施形態と同じステップである。上記(5)および(6)の処理を含む判定ステップは、機械学習法とは異なり例えば領域ベースまたは特徴点ベースのマッチングを行うための処理を規定したステップである。 
図10および11を参照して、本実施形態による第2段階の検査の内容をより詳しく説明する。 
図10は、本実施形態による画像処理装置100の、画像処理を実行するための機能ブロックを例示する機能ブロック図である。 
本実施形態による画像処理を実行するための図10に例示する機能ブロックは、プレ判定ユニット300A、および、テンプレートマッチングを実行するために用いる判定ユニット300Bを有する。 
判定ユニット300Bは、被検査物が良品であるか否かを判定するユニットである。判定ユニット30Bは、テンプレートマッチングユニット390を有する。テンプレートマッチングユニット390は、特異画素の配列の2次元パターンの生成の元となった原画像のデータ380をテンプレートとして利用し、学習済み良品画像データベース200内に含まれる、複数の良品のそれぞれが有する参照領域を含む良品画像のデータ210にテンプレートマッチングを行い、被検査物が良品であるか否かを判別し、その判別結果370を出力する。 
図11は、本実施形態による画像処理における第2段階の検査を実行する処理の例を示すフローチャートである。 
第1の実施形態と同様に、第1段階の検査において、プロセッサ10は、入力画像データ310を取得すると、被検査物が不良品の候補であるか否かを判定し、かつ、特異画素を含む特異画素の配列を出力する。 
ステップS23において、プロセッサ10は、第1段階の検査において被検査物が不良品の候補であると判定した場合において、特異画素の配列の2次元パターンの生成の元となった、入力画像データ310に相当する原画像のデータ380と、学習済み良品画像データベース200内に含まれる、複数の良品のそれぞれが有する参照領域を含むN枚の良品画像のデータ210とのマッチングを行う。 
マッチングは、2つの画像が同じであるかどうかを判断するために、画像を重ね合わせてそれらの差分を検知する手法であり、例えば領域ベースまたは特徴点ベースのマッチングを含む。本実施形態では、プロセッサ10は、原画像のデータ380をテンプレートとして利用し、学習済み良品画像データベース200内に含まれるN枚の良品画像のデータ210にテンプレートマッチングを行う。 
プロセッサ10は、2つの画像間の類似度または相違度を評価するための評価値に基づいてテンプレートマッチングを行う。評価値は、例えば「各画素値の2乗誤差の和(SSD)」、「各画素値の誤差の絶対値の和(SAD)」または「正規化相互関数(NCC)」によって規定される。 
ステップS25において、プロセッサ10は、原画像のデータ380が、N枚の良品画像のデータ210のうちの少なくとも1つにマッチングした場合において、被検査物は良品であると判定する。より具体的に説明すると、プロセッサ10は、SSDなどの評価値が閾値以下である場合、第1段階の検査において不良品の候補であると判定した被検査物は良品であると判定する。プロセッサ10は、SSDなどの評価値が閾値を超えた場合、第1段階の検査において不良品の候補であると判定した被検査物は不良品であると判定する。テンプレートマッチングに用いる閾値は、しばしば試行錯誤によって決定される。 
本来は良品であると判定されるべき、良品限度の範囲内にある被検査物Aに一致または類似する良品見本の画像データが学習済み良品画像データベース200に含まれていれば、被検査物Aの画像データは、その良品見本の画像データにマッチングするはずである。本実施形態によれば、第2段階の検査でテンプレートマッチングを行うことにより、第1段階の検査で不良品の候補であると判定した被検査物Aを最終的に良品と判定し得る。このように、テンプレートマッチングなどの比較的簡単なアルゴリズムを用いて、過検出を抑制することができる。 
さらに、第1段階および第2段階の検査に、学習済み良品画像データベース200を共通に利用することができるので、テンプレートマッチング用に学習済み良品画像データベースを準備する設計工数などを削減することが可能となる。コンピュータへのプログラムの実装を容易に行うことができ、かつ、メモリコストなども抑えることが可能となる。 
図12は、本実施形態による画像処理装置100の、画像処理を実行するための機能ブロックのバリエーションを例示する機能ブロック図である。 
このバリエーションは、学習済み良品画像データベース200とは異なる別の学習済み良品画像データベース201をさらに備えている。学習済み良品画像データベース201は、学習済み良品画像データベース200と同様に、例えばN枚(Nは2以上の整数)の良品画像のデータ211に基づいて作製され得る。Nは、好ましくは10以上、例えば20以上であり得る。 
プロセッサ10は、原画像のデータ380をテンプレートとして利用し、別の学習済み良品画像データベース201内に含まれる、複数の良品のそれぞれが有する参照領域を含む良品画像のデータ211にテンプレートマッチングを行う。 
上述したように、例えば、学習済み良品画像データベース200の基礎となるN枚の良品画像のデータ210が、理想的に優れた良品のみから取得された場合、第1段階の検査において被検査物が不良品の候補であると判定されることが生じやすくなり得る。テンプレートマッチング用のデータベースとして、N枚の良品画像のデータ210よりもばらつきの程度が大きいN枚の良品画像のデータ211を用いることにより、第1段階の検査において不良品の候補であると判定した被検査物の中の幾つかの被検査物を第2段階の検査において良品と判定することが可能となる。 
実際の作業現場において、テンプレートマッチングユニット390が、本来は良品であると判定すべき被検査物の原画像のデータ380を過検出した場合、学習済み良品画像データベース201内の良品画像のデータ211にその画像データを追加登録することが可能である。学習済み良品画像データベース200内の良品画像のデータ2
10は、エンジニアまたは設計者によって既に最適化されている。そのため、作業現場においてそのデータベースに容易にアクセスし、誤検出した原画像のデータ380を良品画像のデータ210に追加登録することは好ましくない。学習データの内容に予想外の変動が生じる可能性があり、検出感度が大きくずれてしまうことが起こり得るためである。
本開示の画像処理装置、画像処理方法、外観検査システム、外観検査方法、およびコンピュータプログラムは、工場などの製造現場における製品または部品の外観検査に好適に利用され得る。
1000・・・外観検査システム、10・・・プロセッサ10・・・メモリ、100・・・画像処理装置、20・・・光源、30・・・イメージセンサ(撮像装置)、40・・・ディスプレイ、50・・・操作装置

Claims (21)

  1. プロセッサと、 前記プロセッサの動作を制御するプログラムを記憶するメモリと、 学習済み良品画像データベースと、を備え、 前記プログラムに従って、前記プロセッサは、  被検査物が有する検査領域を含む画像のデータを取得することと、  前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、  複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、  抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、  前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、  機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、を包含する判定ステップと、を実行する、画像処理装置。
  2. 前記検査領域内に含まれる前記画素群から前記特異画素を抽出することは、 前記参照領域内の各画素位置における画素値に基づく前記統計量を、前記学習済み良品画像データベースから取得することと、 前記検査領域内の各画素位置における前記画素値を前記統計量と比較して、前記検査領域内の各画素を良品画素および前記特異画素の一方に分類することと、を包含する、請求項1に記載の画像処理装置。
  3. 前記プロセッサは、 複数の被検査物のそれぞれに対し、前記プレ判定ステップを実行して、前記特異画素を含む画素の配列を取得し、 前記複数の被検査物のうちの不良品の候補と判定した被検査物から、前記配列の前記形状特徴パラメータを含む学習データを取得し、 それぞれに良品または不良品のラベルを付した前記学習データに基づいて学習済みモデルを生成する、請求項1または2に記載の画像処理装置。
  4. 前記学習済みモデルは、サポートベクターマシンである、請求項3に記載の画像処理装置。
  5. 前記プロセッサは、前記学習済みモデルを用いて、前記プレ判定ステップを実行することにより不良品の候補と判定した被検査物の前記配列の前記形状特徴パラメータに基づいて、前記被検査物が良品であるか否かを判別する、請求項3または4に記載の画像処理装置。
  6. プロセッサと、 前記プロセッサの動作を制御するプログラムを記憶するメモリと、 学習済み良品画像データベースと、を備え、 前記プログラムに従って、前記プロセッサは、  被検査物が有する検査領域を含む画像のデータを取得することと、  前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、  複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、  抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、  前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、  前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、を実行する、画像処理装置。
  7. 前記検査領域内に含まれる前記画素群から前記特異画素を抽出することは、 前記参照領域内の各画素位置における画素値に基づく前記統計量を、前記学習済み良品画像データベースから取得することと、 前記検査領域内の各画素位置における前記画素値を前記統計量と比較して、前記検査領域内の各画素を良品画素および前記特異画素の一方に分類することと、を包含する、請求項6に記載の画像処理装置。
  8. 前記プロセッサは、 前記原画像のデータをテンプレートとして利用し、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータにテンプレートマッチングを行う、請求項6または7に記載の画像処理装置。
  9. 前記学習済み良品画像データベースとは異なる別の学習済み良品画像データベースをさらに備え、 前記プロセッサは、前記原画像のデータをテンプレートとして利用し、前記別の学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータにテンプレートマッチングを行う、請求項6または7に記載の画像処理装置。
  10. 請求項1から9のいずれかに記載の画像処理装置と、 前記被検査物を光で照射する光源と、 前記画像のデータを生成するための画像信号を出力するイメージセンサと、 前記画像処理装置が備える前記プロセッサが実行した判別の結果を表示するモニタと、を備える、外観検査システム。
  11. 外観検査に用いられる画像処理方法であって、  被検査物が有する検査領域を含む画像のデータを取得することと、  前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、  複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、  抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、  前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、  機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、 を包含する判定ステップと、を含む、画像処理方法。
  12. 前記検査領域内に含まれる前記画素群から前記特異画素を抽出することは、 前記参照領域内の各画素位置における画素値に基づく前記統計量を、前記学習済み良品画像データベースから取得することと、 前記検査領域内の各画素位置における前記画素値を前記統計量と比較して、前記検査領域内の各画素を良品画素および前記特異画素の一方に分類することと、を包含する、請求項11に記載の画像処理方法。
  13. 複数の被検査物のそれぞれに対し、前記プレ判定ステップを実行して、前記特異画素を含む画素の配列を取得し、 前記判定ステップは、 前記複数の被検査物のうちの不良品の候補と判定した被検査物から、前記配列の前記形状特徴パラメータを含む学習データを取得することと、 それぞれに良品または不良品のラベルを付した前記学習データに基づいて学習済みモデルを生成することと、を含む、請求項11または12に記載の画像処理方法。
  14. 前記学習済みモデルは、サポートベクターマシンである、請求項13に記載の画像処理方法。
  15. 前記判定ステップは、前記学習済みモデルを用いて、前記プレ判定ステップを実行することにより不良品の候補と判定した被検査物の前記配列の前記形状特徴パラメータに基づいて、前記被検査物が良品であるか否かを判別することを含む、請求項13または14に記載の画像処理方法。
  16. 外観検査に用いられる画像処理方法であって、  被検査物が有する検査領域を含む画像のデータを取得することと、  前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、  複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、  抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、  前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、  前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、を含む、画像処理方法。
  17. 前記検査領域内に含まれる前記画素群から前記特異画素を抽出することは、 前記参照領域内の各画素位置における画素値に基づく前記統計量を、前記学習済み良品画像データベースから取得することと、 前記検査領域内の各画素位置における前記画素値を前記統計量と比較して、前記検査領域内の各画素を良品画素および前記特異画素の一方に分類することと、を包含する、請求項16に記載の画像処理方法。
  18. 前記判定ステップは、前記原画像のデータをテンプレートとして利用し、前記学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータにテンプレートマッチングを行うことを含む、請求項16または17に記載の画像処理装置。
  19. 前記判定ステップは、前記原画像のデータをテンプレートとして利用し、前記学習済み良品画像データベースとは異なる別の学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータにテンプレートマッチングを行うことを含む、請求項16または17に記載の画像処理方法。
  20. 被検査物が有する検査領域を含む画像のデータを取得することと、 前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、 複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、 抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、 前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの形状特徴パラメータを取得することと、 機械学習法を用いて、前記被検査物が良品であるか否かを前記形状特徴パラメータに基づいて判定することと、を包含する判定ステップと、をコンピュータに実行させるコンピュータプログラム。
  21. 被検査物が有する検査領域を含
    む画像のデータを取得することと、 前記画像のデータから前記検査領域内に含まれる各画素位置における画素値を取得することと、 複数の良品のそれぞれが有する参照領域を含む画像のデータに基づいて決定された統計量、および前記検査領域内に含まれる各画素位置における前記画素値に基づいて、前記検査領域内に含まれる画素群から特異画素を抽出することと、 抽出した前記特異画素を含む画素の配列に基づいて、前記被検査物が不良品の候補であるか否かを判別することと、 を包含するプレ判定ステップと、 前記被検査物が不良品の候補であると判定した場合において、前記特異画素を含む画素の配列の2次元パターンの生成の元となった原画像のデータと、学習済み良品画像データベース内に含まれる、前記複数の良品のそれぞれが有する参照領域を含む良品画像のデータとのマッチングを行うことと、 前記原画像のデータが、複数の良品画像のデータのうちの少なくとも1つにマッチングした場合において、前記被検査物は良品であると判定することと、を包含する判定ステップと、をコンピュータに実行させるコンピュータプログラム。
PCT/JP2019/037851 2018-10-05 2019-09-26 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム WO2020071234A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020550353A JPWO2020071234A1 (ja) 2018-10-05 2019-09-26 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-190100 2018-10-05
JP2018190100 2018-10-05

Publications (1)

Publication Number Publication Date
WO2020071234A1 true WO2020071234A1 (ja) 2020-04-09

Family

ID=70055042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/037851 WO2020071234A1 (ja) 2018-10-05 2019-09-26 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム

Country Status (2)

Country Link
JP (1) JPWO2020071234A1 (ja)
WO (1) WO2020071234A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113566730A (zh) * 2021-07-29 2021-10-29 广东电网有限责任公司 电池膨胀形变检测系统及方法
WO2021225016A1 (ja) * 2020-05-08 2021-11-11 ダイキン工業株式会社 外観検査システム
WO2022158060A1 (ja) * 2021-01-25 2022-07-28 株式会社荏原製作所 加工面判定装置、加工面判定プログラム、加工面判定方法、加工システム、推論装置、及び、機械学習装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001266126A (ja) * 2000-03-21 2001-09-28 Toshiba Corp 欠陥検出方法及びその装置並びにマスクの製造方法
JP2005265661A (ja) * 2004-03-19 2005-09-29 Ovit:Kk 画像処理方法およびその装置
JP2010117132A (ja) * 2008-10-16 2010-05-27 Topcon Corp ウェハのパターン検査方法及び装置
JP2011214903A (ja) * 2010-03-31 2011-10-27 Denso It Laboratory Inc 外観検査装置、外観検査用識別器の生成装置及び外観検査用識別器生成方法ならびに外観検査用識別器生成用コンピュータプログラム
JP2017216392A (ja) * 2016-06-01 2017-12-07 株式会社ニューフレアテクノロジー パターン検査装置及びパターン検査方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4104213B2 (ja) * 1998-07-08 2008-06-18 松下電器産業株式会社 欠陥検出方法
US7283659B1 (en) * 2002-01-09 2007-10-16 Kla-Tencor Technologies Corporation Apparatus and methods for searching through and analyzing defect images and wafer maps
JP2009139133A (ja) * 2007-12-04 2009-06-25 Seiko Epson Corp 欠陥検出方法および欠陥検出装置
KR101417467B1 (ko) * 2012-12-12 2014-07-08 주식회사 포스코 교차 조명에 의한 후판의 표면 영상 처리 장치 및 방법
KR20140121069A (ko) * 2013-04-05 2014-10-15 엘지디스플레이 주식회사 화상 처리 방법 및 장치
JP6696323B2 (ja) * 2016-06-27 2020-05-20 大日本印刷株式会社 パターン検査装置およびパターン検査方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001266126A (ja) * 2000-03-21 2001-09-28 Toshiba Corp 欠陥検出方法及びその装置並びにマスクの製造方法
JP2005265661A (ja) * 2004-03-19 2005-09-29 Ovit:Kk 画像処理方法およびその装置
JP2010117132A (ja) * 2008-10-16 2010-05-27 Topcon Corp ウェハのパターン検査方法及び装置
JP2011214903A (ja) * 2010-03-31 2011-10-27 Denso It Laboratory Inc 外観検査装置、外観検査用識別器の生成装置及び外観検査用識別器生成方法ならびに外観検査用識別器生成用コンピュータプログラム
JP2017216392A (ja) * 2016-06-01 2017-12-07 株式会社ニューフレアテクノロジー パターン検査装置及びパターン検査方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021225016A1 (ja) * 2020-05-08 2021-11-11 ダイキン工業株式会社 外観検査システム
JP2021177154A (ja) * 2020-05-08 2021-11-11 ダイキン工業株式会社 外観検査システム
JP7410402B2 (ja) 2020-05-08 2024-01-10 ダイキン工業株式会社 外観検査システム
WO2022158060A1 (ja) * 2021-01-25 2022-07-28 株式会社荏原製作所 加工面判定装置、加工面判定プログラム、加工面判定方法、加工システム、推論装置、及び、機械学習装置
CN113566730A (zh) * 2021-07-29 2021-10-29 广东电网有限责任公司 电池膨胀形变检测系统及方法
CN113566730B (zh) * 2021-07-29 2023-09-08 广东电网有限责任公司 电池膨胀形变检测系统及方法

Also Published As

Publication number Publication date
JPWO2020071234A1 (ja) 2021-09-02

Similar Documents

Publication Publication Date Title
TWI787296B (zh) 光學檢測方法、光學檢測裝置及光學檢測系統
WO2020071234A1 (ja) 画像処理装置、画像処理方法、外観検査システムおよびコンピュータプログラム
US20230162347A1 (en) System and method for set up of production line inspection
JP4776308B2 (ja) 画像欠陥検査装置、画像欠陥検査システム、欠陥分類装置及び画像欠陥検査方法
JP2017049974A (ja) 識別器生成装置、良否判定方法、およびプログラム
JP2008145226A (ja) 欠陥検査装置及び欠陥検査方法
Eshkevari et al. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method
JP2021515885A (ja) 照明条件を設定する方法、装置、システム及びプログラム並びに記憶媒体
WO2019194064A1 (ja) 画像処理装置、画像処理方法、外観検査システムおよび外観検査方法
KR20120014886A (ko) 검사 레시피 생성 및 검사 레시피를 기반으로 한 검사
JP2020532122A (ja) 透明又は半透明ウェハを対象にした欠陥検出
WO2021192376A1 (ja) 外観検査システムおよびコンピュータプログラム
JP2003271927A (ja) 欠陥検査方法
JP2010164487A (ja) 欠陥検査装置及び欠陥検査方法
Tang et al. Anomaly detection of core failures in die casting X-ray inspection images using a convolutional autoencoder
WO2019176614A1 (ja) 画像処理装置、画像処理方法、およびコンピュータプログラム
CN114226262A (zh) 瑕疵检测方法、瑕疵分类方法及其系统
TW202034421A (zh) 濾色器檢查裝置、檢查裝置、濾色器檢查方法及檢查方法
CN115131355B (zh) 利用电子设备数据检测防水布异常的智能方法
CA3097316A1 (en) System and method for detecting defects on imaged items
Ettalibi et al. AI and Computer Vision-based Real-time Quality Control: A Review of Industrial Applications
Chigateri et al. Recognition and classification of casting defects using the CNN algorithm
US11982628B2 (en) System and method for detecting defects on imaged items
WO2019194065A1 (ja) 画像処理装置、画像処理方法、外観検査システムおよび外観検査方法
Papagianni et al. Surface Defects Detection on Pressure Die Castings by Machine Learning Exploiting Machine Vision Features

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: 19869461

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020550353

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19869461

Country of ref document: EP

Kind code of ref document: A1