JP2006337152A - Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium - Google Patents

Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium Download PDF

Info

Publication number
JP2006337152A
JP2006337152A JP2005161636A JP2005161636A JP2006337152A JP 2006337152 A JP2006337152 A JP 2006337152A JP 2005161636 A JP2005161636 A JP 2005161636A JP 2005161636 A JP2005161636 A JP 2005161636A JP 2006337152 A JP2006337152 A JP 2006337152A
Authority
JP
Japan
Prior art keywords
image
teaching
inspection
image processing
generation
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2005161636A
Other languages
Japanese (ja)
Inventor
Masakazu Yanase
正和 柳瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2005161636A priority Critical patent/JP2006337152A/en
Publication of JP2006337152A publication Critical patent/JP2006337152A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a teaching image forming method, capable of forming a teaching image enabling algorithm to perform high speed processing so as to acquire processing becoming a target, in a self-developable manner in a teaching process, a teaching image forming apparatus, a program, a recording medium, an image processing algorithm forming method capable of forming proper image processing algorithm at a high speed, an image processing algorithm forming apparatus, an image inspecting method capable of properly determining the quality of an inspection target image, an image inspecting device, a program and a recording medium. <P>SOLUTION: The feature value of the inspection region image in an indicated inspection region is calculated for a teaching image, having an inspection region and a novel flaw adding and teaching image having a change inspection region image changed in the feature value of the inspection region image is formed, at a position where the calculated image is arranged. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、教示用画像生成方法および装置、画像処理アルゴリズム生成方法および装置、画像検査方法および装置、プログラムならびに記録媒体に関し、特に、画像データから所望の領域を抽出するための教示用画像生成方法および装置、画像処理アルゴリズム生成方法および装置、画像検査方法および装置、プログラムならびに記録媒体に関する。   The present invention relates to a teaching image generation method and apparatus, an image processing algorithm generation method and apparatus, an image inspection method and apparatus, a program, and a recording medium, and more particularly to a teaching image generation method for extracting a desired region from image data. The present invention relates to an image processing algorithm generation method and apparatus, an image inspection method and apparatus, a program, and a recording medium.

近年、CCD等の画像撮像デバイスやパーソナルコンピュータ等の画像処理機器の低価格化により、画像処理の適用分野が広がりつつある。とりわけ、産業分野における欠陥検査への画像処理の適用は広範に渡り、製品やデバイスの歩留まり、品質の向上や目視検査員削減によるコストダウンのためにますますその必要性を高めている。したがって、現状では欠陥検査のために、画像処理技術を適用した多種多様な欠陥検査装置が開発されている。   In recent years, application fields of image processing are expanding due to lower prices of image processing devices such as CCDs and image processing devices such as personal computers. In particular, the application of image processing to defect inspection in the industrial field is widespread, increasing the need for product and device yield, quality improvements and cost reductions by reducing visual inspectors. Therefore, at present, a wide variety of defect inspection apparatuses to which image processing technology is applied have been developed for defect inspection.

このような画像処理型欠陥検査装置においては、対象とする製品やデバイスによって多種多様な欠陥が存在するため、技術者が欠陥対象毎に画像処理アルゴリズムや欠陥分類アルゴリズムを専用設計することが一般的である。しかし、画像処理型欠陥検査装置の専用設計は、技術者の経験に頼るところが多く、その開発・導入において非常に多くの工数を要する。   In such an image processing type defect inspection apparatus, since there are various types of defects depending on the target product or device, it is common for engineers to design image processing algorithms and defect classification algorithms exclusively for each defect target. It is. However, the dedicated design of the image processing type defect inspection apparatus often relies on the experience of engineers, and requires a very large number of man-hours for its development and introduction.

このような課題に対して、近年、学習機能を有する画像処理型欠陥検査装置が開発されている。画像処理型欠陥検査装置で利用される学習アルゴリズムとしては、ニューラルネットワークや進化的手法などの最適化手法が挙げられる。   In recent years, an image processing type defect inspection apparatus having a learning function has been developed for such a problem. Learning algorithms used in the image processing type defect inspection apparatus include optimization methods such as neural networks and evolutionary methods.

特許第3476913号公報(特許文献1)(以下においては、従来技術Aとも称する)には、ニューラルネットワークを適用した学習型欠陥種別判定装置に関する技術(以下においては、従来技術Aとも称する)が開示されている。従来技術Aの装置においては、まず学習前に、学習用教示画像である入力画像に対して画像処理を行なうことで欠陥が抽出し、抽出した欠陥の欠陥情報(面積、重心位置、フェレ径、欠陥の明るさ等)を検出している。   Japanese Patent No. 3476913 (Patent Document 1) (hereinafter also referred to as Conventional Technology A) discloses a technology (hereinafter also referred to as Conventional Technology A) relating to a learning type defect type determination apparatus to which a neural network is applied. Has been. In the apparatus of prior art A, first, before learning, defects are extracted by performing image processing on an input image that is a learning teaching image, and defect information (area, barycentric position, ferret diameter, The brightness of the defect is detected.

また、従来技術Aの装置においては、学習器であるニューラルネットワークの入力層には抽出した欠陥の欠陥情報を割り当て、出力層には欠陥の種類(キズ、ゴミ、露光不良、現像不良など数十種類)を割り当てている。すなわち、従来技術Aの装置においては、入力された欠陥情報と出力される欠陥の種類の対応が適切になるように、ニューラルネットワークの中間層を最適化することで学習するものである。   Further, in the apparatus of the prior art A, defect information of the extracted defect is assigned to the input layer of the neural network that is a learning device, and the defect type (scratches, dust, exposure failure, development failure, etc.) is assigned to the output layer. Type). That is, in the apparatus of the prior art A, learning is performed by optimizing the intermediate layer of the neural network so that the correspondence between the input defect information and the output defect type is appropriate.

しかしながら、従来技術Aの学習型欠陥種別判定装置では、学習用教示画像の欠陥種別判定に特化したものとなり、学習用教示画像と少しだけ異なる検査対象画像に対する欠陥種別判定であっても精度が著しく低下するという過学習状態になりやすいことが知られている。   However, the learning type defect type determination device of the prior art A is specialized for determining the defect type of the teaching image for learning, and the accuracy is high even when determining the defect type for an inspection target image that is slightly different from the teaching image for learning. It is known that an overlearning state is likely to occur that is significantly reduced.

このような課題に対する対応策の技術として、特開平11−282822号公報(特許文献2)に開示されている画像処理プログラム合成方法の技術(以下においては、従来技術Bとも称する)がある。従来技術Bでは、進化的手法の一手法である遺伝的アルゴリズムを用いて画像処理アルゴリズムを自動生成している。また、従来技術Bでは、自動生成に用いる教示用画像に、画像変換をかけた画像を新規教示用画像として追加することで教示用画像と類似した検査対象画像の欠陥種別判定精度が向上したことが報告されている。   As a countermeasure technique for such a problem, there is a technique of an image processing program synthesizing method disclosed in Japanese Patent Laid-Open No. 11-282822 (Patent Document 2) (hereinafter also referred to as Conventional Technology B). In the conventional technique B, an image processing algorithm is automatically generated using a genetic algorithm which is one of evolutionary techniques. Further, in the conventional technique B, the defect type determination accuracy of the inspection target image similar to the teaching image is improved by adding the image subjected to image conversion as a new teaching image to the teaching image used for automatic generation. Has been reported.

また、特開平5−149728号公報(特許文献3)には、良品サンプルを撮像して得られたサンプル画像に、画像メモリに保存されている不良パターンから選択したもの一つを合成して教示用画像を作成する技術(以下においては、従来技術Cとも称する)が開示されている。従来技術Cでは、作業員がビデオモニタに表示された良品サンプルと不良パターンの合成画像を見ながら、入力装置を用いて、不良パターンの位置、回転角度、倍率、濃度、色などの情報を入力することで教示用画像を作成している。   Japanese Patent Application Laid-Open No. 5-149728 (Patent Document 3) teaches a sample image obtained by imaging a non-defective sample by synthesizing one selected from defective patterns stored in an image memory. A technique for creating a commercial image (hereinafter also referred to as Conventional Technology C) is disclosed. In the prior art C, an operator inputs information such as the position, rotation angle, magnification, density, and color of a defective pattern using an input device while viewing a composite image of a non-defective sample and a defective pattern displayed on a video monitor. By doing so, an image for teaching is created.

さらにまた、従来技術Cに開示されている教示用画像の作成方法としては、良品サンプルを撮像して得られたサンプル画像に、作業員が、入力装置としての例えばマウスやライトペンなどを用いた描画ツールでもって直接画像を編集する方法がある。
特許第3476913号公報 特開平11−282822号公報 特開平5−149728号公報
Furthermore, as a method for creating the teaching image disclosed in the prior art C, an operator uses, for example, a mouse or a light pen as an input device for a sample image obtained by imaging a non-defective sample. There is a way to edit images directly with a drawing tool.
Japanese Patent No. 3476913 JP-A-11-282822 Japanese Patent Laid-Open No. 5-149728

前述したように、従来技術Aでは、学習用教示画像の欠陥種別判定に特化したものとなり、教示画像と少しだけ異なる検査対象画像に対する欠陥種別判定であっても精度が著しく低下するという過学習状態になりやすいという課題がある。   As described above, the conventional technique A is specialized in the determination of the defect type of the teaching image for learning, and the over-learning that accuracy is remarkably lowered even in the defect type determination for the inspection target image that is slightly different from the teaching image. There is a problem that it tends to become a state.

また、従来技術Bにおいては、教示用画像に画像変換をかけた画像を新規教示用画像として追加している。当該画像変換は具体的には明度変更、コントラスト変更、幾何学変更などが含まれる。   In the prior art B, an image obtained by performing image conversion on the teaching image is added as a new teaching image. Specifically, the image conversion includes brightness change, contrast change, geometric change, and the like.

ここで、たとえば、実環境における照明変動を考慮した教示用画像の明度変更によって作成した新規教示用画像を追加することに関して説明する。実際には教示用画像の各画素の濃度を一定オフセット値αだけ加えることで明度変更を行っている。   Here, for example, a description will be given of adding a new teaching image created by changing the brightness of the teaching image in consideration of illumination variation in an actual environment. Actually, the brightness is changed by adding the density of each pixel of the teaching image by a fixed offset value α.

たとえば、αが“5”、“10”、“20”の3つの場合に対する欠陥種別判定精度の向上を行ないたい場合には、各画素に濃度値“5”を加えた第1の新規教示用画像と、各画素に濃度値“10”を加えた第2の新規教示用画像2と、各画素に濃度値“20”を加えた第3の新規教示用画像との3枚の教示用画像を追加する必要がある。すなわち、画像変換をかけた変化量の種類に応じて追加すべき新規教示用画像の数が増加する。   For example, in the case where it is desired to improve the defect type determination accuracy for three cases where α is “5”, “10”, and “20”, the first new instruction for adding a density value “5” to each pixel is used. Three teaching images of an image, a second new teaching image 2 in which a density value “10” is added to each pixel, and a third new teaching image in which a density value “20” is added to each pixel Need to be added. That is, the number of new teaching images to be added increases according to the type of change amount after image conversion.

さらにまた、明度変更以外のコントラスト変更に着目しても同様に、変化量の種類に応じて追加すべき新規教示用画像の数が増加する。これはつまり、画像変換の種類とそれぞれの画像変換の変化量の種類の積に相当する数の新規教示用画像を追加する必要があることを意味する。   Furthermore, even if attention is focused on a contrast change other than a brightness change, the number of new teaching images to be added increases according to the type of change amount. This means that it is necessary to add a number of new teaching images corresponding to the product of the type of image conversion and the type of change amount of each image conversion.

このように追加する教示用画像も含めた全ての教示用画像の数が多くなればなるほど、画像処理アルゴリズムの学習に要する時間が増大するという問題がある。   As the number of all teaching images including the teaching images to be added increases, the time required for learning the image processing algorithm increases.

従来技術Cは、良品サンプルを撮像して得られたサンプル画像に、画像メモリに保存されている不良パターンから選択したもの一つを合成して作成した教示用画像を新規教示用画像として追加する方法である。したがって、追加する不良パターンの数だけ新規教示用画像を追加する必要があるため、追加する教示用画像も含めた全ての教示用画像の数が多くなればなるほど、画像処理アルゴリズムの学習に要する時間が増大するという問題がある。   Prior art C adds a teaching image created by synthesizing one selected from defective patterns stored in an image memory to a sample image obtained by imaging a non-defective sample as a new teaching image. Is the method. Therefore, since it is necessary to add new teaching images as many as the number of defective patterns to be added, the time required for learning the image processing algorithm increases as the number of all teaching images including the added teaching images increases. There is a problem that increases.

さらにまた、従来技術Cにおいては、作業員がビデオモニタに表示された良品サンプルと不良パターンの合成画像を見ながら、入力装置を用いて、不良パターンの位置、回転角度、倍率、濃度、色などの情報を入力する必要があるため、1枚の教示用画像を作成することに対する作業員への負担が大きく、時間とコストが増大する。   Furthermore, in the prior art C, an operator uses the input device while viewing a composite image of a non-defective sample and a defective pattern displayed on a video monitor, and the like, the position, rotation angle, magnification, density, color, etc. Therefore, the burden on the worker for creating one teaching image is large, and the time and cost are increased.

また、従来技術Cに開示されているもう一つの教示用画像の作成方法は、良品サンプルを撮像して得られたサンプル画像に、作業員が、入力装置としての例えばマウスやライトペンなどを用いた描画ツールでもって直接画像を編集するという方法である。すなわち、当該方法は人為的であるため、実際の欠陥とのコントラストなどの差が大きくなり、学習結果として得られたものの信頼性が低下する可能性があるという課題がある。   Another teaching image creation method disclosed in the prior art C is that a worker uses, for example, a mouse or a light pen as an input device for a sample image obtained by imaging a non-defective sample. It is a method of directly editing an image with a drawing tool. That is, since the method is artificial, there is a problem that a difference in contrast with an actual defect becomes large, and the reliability of what is obtained as a learning result may be reduced.

本発明は、上述の問題点を解決するためになされたものであって、その目的は、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに高速に処理させることが可能な教示用画像を生成することが可能な教示用画像生成方法および装置を提供することである。   The present invention has been made in order to solve the above-mentioned problems, and its purpose is for teaching which can cause an algorithm that learns a self-developed target process in a teaching process to be processed at high speed. It is an object to provide a teaching image generation method and apparatus capable of generating an image.

本発明の他の目的は、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに高速に処理させることが可能な教示用画像を生成することが可能なプログラムおよび当該プログラムを記録した記録媒体を提供することである。   Another object of the present invention is to provide a program that can generate a teaching image that can be processed at high speed by an algorithm that learns a target process in a self-developed manner in the teaching process, and a record that records the program. To provide a medium.

本発明のさらに他の目的は、優良な画像処理アルゴリズムを高速に生成することが可能な画像処理アルゴリズム生成方法および装置を提供することである。   Still another object of the present invention is to provide an image processing algorithm generation method and apparatus capable of generating an excellent image processing algorithm at high speed.

本発明のさらに他の目的は、優良な画像処理アルゴリズムを高速に生成することが可能なプログラムおよび当該プログラムを記録した記録媒体を提供することである。   Still another object of the present invention is to provide a program capable of generating an excellent image processing algorithm at high speed and a recording medium recording the program.

本発明のさらに他の目的は、適切に検査対象画像の良否を判定可能な画像検査方法および装置を提供することである。   Still another object of the present invention is to provide an image inspection method and apparatus capable of appropriately determining the quality of an inspection target image.

本発明のさらに他の目的は、適切に検査対象画像の良否を判定可能なプログラムおよび当該プログラムを記録した記録媒体を提供することである。   Still another object of the present invention is to provide a program capable of appropriately determining the quality of an inspection target image and a recording medium on which the program is recorded.

上述の課題を解決するために、この発明のある局面に従うと、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する教示用画像生成方法は、検査領域を有する教示用画像を入力する工程と、検査領域を指定する工程と、指定された検査領域内の検査領域画像の特徴量を算出する工程と、教示用画像内で画像を配置する位置を算出する工程と、検査領域画像の特徴量を変化させた変化検査領域画像を生成する工程と、算出された画像を配置する位置に変化検査領域画像を配置した新規欠陥追加教示用画像を生成する工程とを含む。   In order to solve the above-described problems, according to one aspect of the present invention, for teaching to generate a teaching image having an inspection region for causing an algorithm that learns a target process in a self-developed manner in the teaching process. An image generation method includes a step of inputting a teaching image having an inspection region, a step of designating an inspection region, a step of calculating a feature amount of the inspection region image in the designated inspection region, and a teaching image. A step of calculating the position where the image is arranged, a step of generating a changed inspection region image in which the feature amount of the inspection region image is changed, and a new defect addition in which the changed inspection region image is arranged at the position where the calculated image is arranged Generating a teaching image.

好ましくは、所定の終了条件は、ユーザによる指示を受付ける工程をさらに含み、検査領域を指定する工程は、受付けたユーザの指示に基づいて、検査領域を指定する。   Preferably, the predetermined end condition further includes a step of receiving an instruction from the user, and the step of specifying the inspection region specifies the inspection region based on the received user instruction.

好ましくは、画像を配置する位置は、検査領域画像と重ならない位置である。
好ましくは、 検査領域画像の特徴量を算出する工程は、検査領域画像の重心位置を算出する工程を含み、画像を配置する位置を算出する工程は、画像を配置する位置を、算出された検査領域画像の重心位置を中心に近傍から探索して算出する。
Preferably, the position where the image is arranged is a position that does not overlap the inspection region image.
Preferably, the step of calculating the feature amount of the inspection region image includes a step of calculating a center of gravity position of the inspection region image, and the step of calculating the position where the image is arranged includes calculating the position where the image is arranged A search is performed from the vicinity with the center of gravity of the region image as a center, and the calculation is performed.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、変化検査領域画像を生成する工程は、検査領域が抽出すべき領域であると判定された場合、検査領域画像の面積を縮小させた変化検査領域画像を生成する。   Preferably, the method further includes a step of determining whether or not the inspection region is a region to be extracted, and the step of generating the change inspection region image is performed when the inspection region is determined to be the region to be extracted. A change inspection area image in which the area of the image is reduced is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、変化検査領域画像を生成する工程は、検査領域が抽出すべき領域でないと判定された場合、検査領域画像の面積を拡大させた変化検査領域画像を生成する。   Preferably, the method further includes a step of determining whether or not the inspection region is a region to be extracted, and the step of generating the changed inspection region image is performed when the inspection region is determined not to be the region to be extracted. A change inspection area image in which the area is enlarged is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、検査領域画像の特徴量を算出する工程は、検査領域画像の重心位置を算出する工程を含み、教示用画像を入力する工程は、検査領域が抽出すべき領域であると判定された場合、新たに、検査領域を有する新規教示用画像を入力し、新規欠陥追加教示用画像を生成する工程は、新規教示用画像内の、検査領域画像の重心位置と対応する位置に、変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   Preferably, the method further includes a step of determining whether or not the inspection region is a region to be extracted, and the step of calculating the feature amount of the inspection region image includes a step of calculating a centroid position of the inspection region image. In the step of inputting an image, when it is determined that the inspection region is a region to be extracted, a step of newly inputting a new teaching image having an inspection region and generating a new defect adding teaching image is a new step. A new defect addition teaching image in which the changed inspection area image is arranged at a position corresponding to the center of gravity position of the inspection area image in the teaching image is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、検査領域画像の特徴量を算出する工程は、検査領域画像の重心位置を算出する工程を含み、教示用画像を入力する工程は、検査領域が抽出すべき領域であると判定された場合、新たに、検査領域を有する新規教示用画像を入力し、 新規教示用画像の検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、新規欠陥追加教示用画像を生成する工程は、新規教示用画像の検査領域が抽出すべき領域でないと判定された場合、新規教示用画像内の、検査領域画像の重心位置と対応する位置に、変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   Preferably, the method further includes a step of determining whether or not the inspection region is a region to be extracted, and the step of calculating the feature amount of the inspection region image includes a step of calculating a centroid position of the inspection region image. In the step of inputting an image, when it is determined that the inspection area is an area to be extracted, a new teaching image having an inspection area is newly input, and the inspection area of the new teaching image is an area to be extracted. A step of determining whether or not there is a step of generating a new defect addition teaching image, when it is determined that the inspection region of the new teaching image is not a region to be extracted, A new defect addition teaching image in which the changed inspection area image is arranged at a position corresponding to the center of gravity position of the inspection area image is generated.

好ましくは、変化検査領域画像を生成する工程は、検査領域が抽出すべき領域であると判定された場合、検査領域画像の面積を縮小させた変化検査領域画像を生成する。   Preferably, in the step of generating the change inspection area image, when it is determined that the inspection area is an area to be extracted, a change inspection area image in which the area of the inspection area image is reduced is generated.

好ましくは、変化検査領域画像を生成する工程は、検査領域が抽出すべき領域でないと判定された場合、検査領域画像の面積を拡大させた変化検査領域画像を生成する。   Preferably, in the step of generating the change inspection region image, when it is determined that the inspection region is not a region to be extracted, a change inspection region image in which the area of the inspection region image is enlarged is generated.

好ましくは、検査領域画像および変化検査領域画像の周囲に、それぞれ、第1および第2検査周囲領域を設定する工程と、検査領域画像の第1濃度値と、第1検査周囲領域内の領域であって検査領域画像以外の背景領域の第1背景画像の第2濃度値と、第2検査周囲領域内の領域であって変化検査領域画像以外の背景領域の第2背景画像の第3濃度値とに基づいて、変化検査領域画像の第4濃度値を算出する工程とをさらに含む。   Preferably, the step of setting the first and second inspection surrounding regions around the inspection region image and the change inspection region image, the first density value of the inspection region image, and the region in the first inspection surrounding region, respectively. The second density value of the first background image in the background area other than the examination area image, and the third density value of the second background image in the background area other than the changed examination area image in the second examination surrounding area. And calculating a fourth density value of the change inspection region image based on the above.

好ましくは、第1濃度値は、検査領域画像の全画素の平均濃度値であり、第2濃度値は、第1背景画像の全画素の平均濃度値であり、第3濃度値は、第2背景画像の全画素の平均濃度値であり、検査領域画像を、変化検査領域画像と同じサイズおよび形状にする工程と、変化検査領域画像の第4濃度値を算出する工程は、変化検査領域画像の全画素の濃度値を、変化検査領域画像と同じサイズおよび形状にされた検査領域画像の全画素の濃度値にそれぞれ設定する工程と、設定された変化検査領域画像の全画素の濃度値の平均値と第3濃度値との差の値と、第1濃度値と第2濃度値との差の値との差の値の絶対値が、所定値以下でない場合、所定値以下となるように、設定された変化検査領域画像の全画素の濃度値に、絶対値を加算または減算する工程とをさらに含む。   Preferably, the first density value is an average density value of all pixels of the inspection area image, the second density value is an average density value of all pixels of the first background image, and the third density value is the second density value. The average density value of all the pixels of the background image, the step of making the inspection area image the same size and shape as the change inspection area image, and the step of calculating the fourth density value of the change inspection area image are the change inspection area image Setting the density values of all the pixels to the density values of all the pixels of the inspection area image having the same size and shape as the change inspection area image, and the density values of all the pixels of the set change inspection area image If the absolute value of the difference between the difference between the average value and the third density value and the difference between the first density value and the second density value is not less than a predetermined value, the absolute value is less than the predetermined value. The absolute value is added to or subtracted from the density value of all pixels in the set change inspection area image. Further comprising the step of.

この発明の他の局面に従うと、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する教示用画像生成装置は、検査領域を有する教示用画像を入力する画像入力部と、検査領域を指定する検査領域指定部と、指定された検査領域内の検査領域画像の特徴量を算出する特徴量算出部と、教示用画像内で画像を配置する位置を算出する位置算出部と、検査領域画像の特徴量を変化させた変化検査領域画像を生成する変化検査領域画像生成部と、算出された画像を配置する位置に変化検査領域画像を配置した新規欠陥追加教示用画像を生成する画像生成部とを備える。   According to another aspect of the present invention, there is provided a teaching image generating apparatus for generating a teaching image having an inspection region for causing an algorithm that learns a target process in a self-developed manner in the teaching process. An image input unit for inputting a teaching image, an inspection region specifying unit for specifying an inspection region, a feature amount calculating unit for calculating a feature amount of an inspection region image in the specified inspection region, and a teaching image A position calculation unit that calculates a position where the image is to be arranged; a change inspection region image generation unit that generates a change inspection region image in which the feature amount of the inspection region image is changed; An image generation unit that generates a new defect addition teaching image in which the image is arranged.

好ましくは、ユーザによる指示を受付ける入力部をさらに備え、検査領域指定部は、受付けたユーザの指示に基づいて、検査領域を指定する。   Preferably, the apparatus further includes an input unit that receives an instruction from the user, and the inspection area specifying unit specifies the inspection area based on the received user instruction.

好ましくは、画像を配置する位置は、検査領域画像と重ならない位置である。
好ましくは、特徴量算出部は、検査領域画像の重心位置を算出し、位置算出部は、画像を配置する位置を、算出された検査領域画像の重心位置を中心に近傍から探索して算出する。
Preferably, the position where the image is arranged is a position that does not overlap the inspection region image.
Preferably, the feature amount calculation unit calculates a centroid position of the inspection region image, and the position calculation unit calculates a position where the image is to be arranged by searching from the vicinity around the calculated centroid position of the inspection region image. .

好ましくは、検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、変化検査領域画像生成部は、検査領域が抽出すべき領域であると判定された場合、検査領域画像の面積を縮小させた変化検査領域画像を生成する。   Preferably, an inspection region determination unit that determines whether or not the inspection region is a region to be extracted is further included, and the change inspection region image generation unit performs inspection when it is determined that the inspection region is a region to be extracted. A change inspection area image in which the area of the area image is reduced is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、変化検査領域画像生成部は、検査領域が抽出すべき領域でないと判定された場合、検査領域画像の面積を拡大させた変化検査領域画像を生成する。   Preferably, an inspection area determination unit that determines whether the inspection area is an area to be extracted is further included, and the change inspection area image generation unit determines that the inspection area is not an area to be extracted. A change inspection area image in which the area of the image is enlarged is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、特徴量算出部は、検査領域画像の重心位置を算出し、画像入力部は、検査領域が抽出すべき領域であると判定された場合、新たに、検査領域を有する新規教示用画像を入力し、画像生成部は、新規教示用画像内の、検査領域画像の重心位置と対応する位置に、変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   Preferably, the image processing apparatus further includes an inspection region determination unit that determines whether or not the inspection region is a region to be extracted, the feature amount calculation unit calculates a center of gravity position of the inspection region image, and the image input unit includes the inspection region When it is determined that the region is to be extracted, a new teaching image having an inspection region is newly input, and the image generation unit is set to a position corresponding to the center of gravity position of the inspection region image in the new teaching image. Then, a new defect addition teaching image in which the change inspection area image is arranged is generated.

好ましくは、検査領域が抽出すべき領域であるか否かを判定する第1検査領域判定部をさらに備え、特徴量算出部は、検査領域画像の重心位置を算出し、画像入力部は、検査領域が抽出すべき領域であると判定された場合、新たに、検査領域を有する新規教示用画像を入力し、新規教示用画像の検査領域が抽出すべき領域であるか否かを判定する第2検査領域判定部をさらに備え、画像生成部は、新規教示用画像の検査領域が抽出すべき領域でないと判定された場合、新規教示用画像内の、検査領域画像の重心位置と対応する位置に、変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   Preferably, the image processing apparatus further includes a first inspection region determination unit that determines whether or not the inspection region is a region to be extracted, the feature amount calculation unit calculates a center of gravity position of the inspection region image, and the image input unit When it is determined that the area is an area to be extracted, a new teaching image having an inspection area is newly input, and it is determined whether the inspection area of the new teaching image is an area to be extracted. 2 an inspection area determination unit, and when the image generation unit determines that the inspection area of the new teaching image is not an area to be extracted, the position corresponding to the barycentric position of the inspection area image in the new teaching image Then, a new defect addition teaching image in which the change inspection area image is arranged is generated.

好ましくは、検査領域画像および変化検査領域画像の周囲に、それぞれ、第1および第2検査周囲領域を設定する領域設定部と、検査領域画像の第1濃度値と、第1検査周囲領域内の領域であって検査領域画像以外の背景領域の第1背景画像の第2濃度値と、第2検査周囲領域内の領域であって変化検査領域画像以外の背景領域の第2背景画像の第3濃度値とに基づいて、変化検査領域画像の第4濃度値を算出する濃度値算出部とをさらに備える。   Preferably, an area setting unit for setting the first and second examination surrounding areas around the examination area image and the change examination area image, the first density value of the examination area image, and the first examination surrounding area, The second density value of the first background image in the background area other than the inspection area image and the third density of the second background image in the background area other than the change inspection area image in the second inspection surrounding area. A density value calculation unit that calculates a fourth density value of the change inspection region image based on the density value is further provided.

この発明のさらに他の局面に従うと、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する処理をコンピュータに実行させるための教示用画像生成プログラムは、検査領域を有する教示用画像を入力するステップと、検査領域を指定するステップと、指定された検査領域内の検査領域画像の特徴量を算出するステップと、教示用画像内で画像を配置する位置を算出するステップと、検査領域画像の特徴量を変化させた変化検査領域画像を生成するステップと、算出された画像を配置する位置に変化検査領域画像を配置した新規欠陥追加教示用画像を生成するステップとをコンピュータに実行させる。   According to still another aspect of the present invention, teaching for causing a computer to execute processing for generating a teaching image having an inspection area for causing an algorithm that learns a target processing in a self-developed manner in the teaching process. The image generation program includes a step of inputting a teaching image having an inspection area, a step of specifying the inspection area, a step of calculating a feature amount of the inspection area image in the specified inspection area, Calculating a position for arranging the image in step, generating a changed inspection area image in which the feature amount of the inspection area image is changed, and a new defect in which the changed inspection area image is arranged at the position where the calculated image is arranged Generating an additional teaching image.

この発明のさらに他の局面に従うと、記録媒体は、教示用画像生成プログラムを記録した媒体である。   According to still another aspect of the present invention, the recording medium is a medium on which a teaching image generation program is recorded.

この発明のさらに他の局面に従うと、予め準備された複数種類の画像処理フィルタを用いて、教示用画像生成方法により生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する画像処理アルゴリズム生成方法は、複数の画像処理アルゴリズムを生成する工程を、所定の終了条件を満たすまで世代を変えながら繰り返す工程を含み、所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、1以上の最終画像処理アルゴリズムであり、複数の画像処理アルゴリズムの各々は、複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、N(自然数)+1世代の複数の画像処理アルゴリズムを生成する工程は、新規欠陥追加教示用画像に、N世代の複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成する工程と、N世代の複数の画像処理アルゴリズムの各々に対し、目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出する工程と、N世代の複数の画像処理アルゴリズムのうち、所定値以上の評価値が算出されたN世代の画像処理アルゴリズムを1以上選択する工程と、選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成する工程とを含む。   According to still another aspect of the present invention, a new defect addition teaching image having one or more inspection areas generated by a teaching image generating method using a plurality of types of image processing filters prepared in advance. An image processing algorithm generation method for generating one or more final image processing algorithms for generating an image corresponding to a target image prepared in advance includes a step of generating a plurality of image processing algorithms until a predetermined end condition is satisfied. The image processing algorithm generated in a generation that satisfies a predetermined end condition, including a step of repeating while changing the generation, is one or more final image processing algorithms, and each of the plurality of image processing algorithms includes a plurality of types of images. Algorithms that use multiple selected image processing filters selected in a random order without interfering with processing filters The process of generating a plurality of image processing algorithms of N (natural number) +1 generation is performed after a plurality of processes of N generations, each of which has been subjected to processing of a plurality of image processing algorithms of N generations on a new defect addition teaching image. A step of generating an image, a step of calculating an evaluation value serving as a reference for evaluation based on a target image and a corresponding processed image of N generations for each of a plurality of N generation image processing algorithms; Of the plurality of N generation image processing algorithms, a step of selecting one or more N generation image processing algorithms for which an evaluation value equal to or greater than a predetermined value is selected, and one or more of the selected one or more N generation image processing algorithms Generating an image processing algorithm that has been changed so that the evaluation value becomes high as an image processing algorithm of the N + 1 generation.

好ましくは、所定の終了条件は、N世代の選択された1以上の画像処理アルゴリズムのいずれかの評価値が、所定値以上となる条件である。   Preferably, the predetermined end condition is a condition in which an evaluation value of any one or more of the N generations of selected image processing algorithms is equal to or greater than a predetermined value.

好ましくは、複数の画像処理アルゴリズムのうち、N世代の選択された1以上の画像処理アルゴリズム以外の1以上の画像処理アルゴリズムを、進化的手法を用いてN+1世代の1以上の画像処理アルゴリズムとして生成する工程をさらに含む。   Preferably, among the plurality of image processing algorithms, one or more image processing algorithms other than the N generation selected one or more image processing algorithms are generated as an N + 1 generation one or more image processing algorithms using an evolutionary method. The method further includes the step of:

好ましくは、進化的手法は、遺伝的アルゴリズムである。
好ましくは、教示用画像生成方法により生成された新規欠陥追加教示用画像の数が、新規欠陥追加教示用画像内の検査領域の数よりも多い。
Preferably, the evolutionary approach is a genetic algorithm.
Preferably, the number of new defect addition teaching images generated by the teaching image generation method is larger than the number of inspection areas in the new defect addition teaching image.

この発明のさらに他の局面に従うと、予め準備された複数種類の画像処理フィルタを用いて、教示用画像生成方法により生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する画像処理アルゴリズム生成装置は、複数の画像処理アルゴリズムを生成するための画像処理アルゴリズム生成部を備え、画像処理アルゴリズム生成部は、複数の画像処理アルゴリズムを生成する処理を、所定の終了条件を満たすまで世代を変えながら繰り返し、所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、1以上の最終画像処理アルゴリズムであり、複数の画像処理アルゴリズムの各々は、複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、N(自然数)+1世代の複数の画像処理アルゴリズムを生成する工程は、新規欠陥追加教示用画像に、N世代の複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成する画像データ変換部と、N世代の複数の画像処理アルゴリズムの各々に対し、目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出する画像処理アルゴリズム性能評価部とをさらに備え、画像処理アルゴリズム性能評価部は、N世代の複数の画像処理アルゴリズムのうち、所定値以上の評価値が算出されたN世代の画像処理アルゴリズムを1以上選択し、画像処理アルゴリズム生成部は、選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成する。   According to still another aspect of the present invention, a new defect addition teaching image having one or more inspection areas generated by a teaching image generating method using a plurality of types of image processing filters prepared in advance. An image processing algorithm generation device that generates one or more final image processing algorithms that generate an image corresponding to a target image prepared in advance includes an image processing algorithm generation unit for generating a plurality of image processing algorithms. The image processing algorithm generation unit repeats the process of generating a plurality of image processing algorithms while changing the generation until a predetermined end condition is satisfied, and the image processing algorithm generated in the generation that satisfies the predetermined end condition is 1 The final image processing algorithm described above, and each of the plurality of image processing algorithms includes a plurality of types of image processing algorithms. A process for generating a plurality of image processing algorithms of N (natural number) +1 generation is used for new defect addition teaching. An image data conversion unit that generates a plurality of N generation processed images, each of which has been subjected to processing of a plurality of N generation image processing algorithms, and a target image for each of the N generation image processing algorithms And an image processing algorithm performance evaluation unit that calculates an evaluation value serving as a reference for evaluation based on the corresponding N generation processed images, and the image processing algorithm performance evaluation unit includes a plurality of N generations of image processing Among the algorithms, one or more N generations of image processing algorithms for which an evaluation value equal to or greater than a predetermined value is selected, and the image processing algorithm generation unit, Each of the 4-option by one or more N plurality of image processing algorithms generations were, the image processing algorithm were varied as evaluation value increases generated as image processing algorithms N + 1 generation.

好ましくは、所定の終了条件は、N世代の選択された1以上の画像処理アルゴリズムのいずれかの評価値が、所定値以上となる条件である。   Preferably, the predetermined end condition is a condition in which an evaluation value of any one or more of the N generations of selected image processing algorithms is equal to or greater than a predetermined value.

好ましくは、複数の画像処理アルゴリズムのうち、N世代の選択された1以上の画像処理アルゴリズム以外の1以上の画像処理アルゴリズムを、進化的手法を用いてN+1世代の1以上の画像処理アルゴリズムとして生成する進化的画像処理アルゴリズム生成部をさらに備える。   Preferably, among the plurality of image processing algorithms, one or more image processing algorithms other than the N generation selected one or more image processing algorithms are generated as an N + 1 generation one or more image processing algorithms using an evolutionary method. And an evolutionary image processing algorithm generating unit.

好ましくは、教示用画像生成方法により生成された新規欠陥追加教示用画像の数が、新規欠陥追加教示用画像内の検査領域の数よりも多い。   Preferably, the number of new defect addition teaching images generated by the teaching image generation method is larger than the number of inspection areas in the new defect addition teaching image.

この発明のさらに他の局面に従うと、予め準備された複数種類の画像処理フィルタを用いて、教示用画像生成プログラムにより生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する処理をコンピュータに実行させるための画像処理アルゴリズム生成プログラムは、複数の画像処理アルゴリズムを生成するステップと、複数の画像処理アルゴリズムを生成するステップを、所定の終了条件を満たすまで世代を変えながら繰り返すステップとをコンピュータに実行させ、所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、1以上の最終画像処理アルゴリズムであり、複数の画像処理アルゴリズムの各々は、複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、N(自然数)+1世代の複数の画像処理アルゴリズムを生成するステップは、新規欠陥追加教示用画像に、N世代の複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成するステップと、N世代の複数の画像処理アルゴリズムの各々に対し、目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出するステップと、N世代の複数の画像処理アルゴリズムのうち、所定値以上の評価値が算出されたN世代の画像処理アルゴリズムを1以上選択するステップと、選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成するステップとを含む。   According to still another aspect of the present invention, a new defect addition teaching image having one or more inspection areas generated by a teaching image generation program using a plurality of types of image processing filters prepared in advance. An image processing algorithm generation program for causing a computer to execute a process of generating one or more final image processing algorithms for generating an image corresponding to a target image prepared in advance includes a step of generating a plurality of image processing algorithms; The step of generating a plurality of image processing algorithms is repeated while changing the generation until a predetermined end condition is satisfied, and the image processing algorithm generated in the generation that satisfies the predetermined end condition is: One or more final image processing algorithms, each of a plurality of image processing algorithms Is an algorithm that uses a plurality of selected image processing filters selected from a plurality of types of image processing filters without interfering in a random order, and generates a plurality of N (natural number) +1 generation image processing algorithms. Generating a plurality of N generations of post-processing images obtained by performing processing of a plurality of N generations of image processing algorithms on the new defect addition teaching image, and for each of the N generations of image processing algorithms A step of calculating an evaluation value serving as a reference for evaluation based on the target image and the corresponding N generation processed images, and an evaluation value equal to or greater than a predetermined value among a plurality of N generation image processing algorithms is calculated. Selecting one or more selected N generation image processing algorithms, and selecting each of the selected one or more N generation image processing algorithms. Value changes image processing algorithms were so increases and generating an image processing algorithms N + 1 generation.

この発明のさらに他の局面に従うと、記録媒体は、画像処理アルゴリズム生成プログラムを記録した媒体である。   According to still another aspect of the present invention, the recording medium is a medium on which an image processing algorithm generation program is recorded.

この発明のさらに他の局面に従うと、画像検査方法は、画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する工程を含む。   According to still another aspect of the present invention, the image inspection method includes a step of determining pass / fail of the inspection target image using the image processing algorithm generated by the image processing algorithm generation method.

この発明のさらに他の局面に従うと、画像検査装置は、画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する画像良否判定部を含む。   According to still another aspect of the present invention, the image inspection apparatus includes an image quality determination unit that determines the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation method.

この発明のさらに他の局面に従うと、画像検査プログラムは、画像処理アルゴリズム生成プログラムにより生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定するステップをコンピュータに実行させる。   According to still another aspect of the present invention, the image inspection program causes the computer to execute a step of determining the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation program.

この発明のさらに他の局面に従うと、記録媒体は、画像検査プログラムを記録した媒体である。   According to still another aspect of the present invention, the recording medium is a medium on which an image inspection program is recorded.

本発明に係る教示用画像生成方法は、検査領域を有する教示用画像において、指定された検査領域内の検査領域画像の特徴量を算出し、算出された画像を配置する位置に、検査領域画像の特徴量を変化させた変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   In the teaching image generation method according to the present invention, in the teaching image having the inspection region, the feature amount of the inspection region image in the designated inspection region is calculated, and the inspection region image is arranged at the position where the calculated image is arranged. A new defect addition teaching image in which a changed inspection area image in which the feature amount is changed is generated.

したがって、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、本発明により生成された教示用画像は、複数種類の検査領域画像を有するので、複数種類の検査領域画像の各々を有する教示用画像を使用するよりも、当該アルゴリズムに高速に処理させることができるという効果を奏する。   Therefore, since the teaching image generated by the present invention for causing the algorithm to learn the target process in a self-developed manner in the teaching process has a plurality of types of inspection region images, a plurality of types of inspection region images are obtained. There is an effect that the algorithm can be processed at a higher speed than using a teaching image having each of the above.

本発明に係る教示用画像生成装置は、検査領域を有する教示用画像において、指定された検査領域内の検査領域画像の特徴量を算出し、算出された画像を配置する位置に、検査領域画像の特徴量を変化させた変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   The teaching image generation apparatus according to the present invention calculates a feature amount of an inspection region image in a specified inspection region in a teaching image having an inspection region, and places the calculated image at a position where the calculated image is arranged. A new defect addition teaching image in which a changed inspection area image in which the feature amount is changed is generated.

したがって、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、本発明により生成された教示用画像は、複数種類の検査領域画像を有するので、複数種類の検査領域画像の各々を有する教示用画像を使用するよりも、当該アルゴリズムに高速に処理させることができるという効果を奏する。   Therefore, since the teaching image generated by the present invention for causing the algorithm to learn the target process in a self-developed manner in the teaching process has a plurality of types of inspection region images, a plurality of types of inspection region images are obtained. There is an effect that the algorithm can be processed at a higher speed than using a teaching image having each of the above.

本発明に係る教示用画像生成プログラムは、検査領域を有する教示用画像において、指定された検査領域内の検査領域画像の特徴量を算出し、算出された画像を配置する位置に、検査領域画像の特徴量を変化させた変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   The teaching image generation program according to the present invention calculates the feature amount of the inspection region image in the designated inspection region in the teaching image having the inspection region, and at the position where the calculated image is arranged, the inspection region image A new defect addition teaching image in which a changed inspection area image in which the feature amount is changed is generated.

したがって、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、本発明により生成された教示用画像は、複数種類の検査領域画像を有するので、複数種類の検査領域画像の各々を有する教示用画像を使用するよりも、当該アルゴリズムに高速に処理させることができるという効果を奏する。   Therefore, since the teaching image generated by the present invention for causing the algorithm to learn the target process in a self-developed manner in the teaching process has a plurality of types of inspection region images, a plurality of types of inspection region images are obtained. There is an effect that the algorithm can be processed at a higher speed than using a teaching image having each of the above.

本発明に係る記録媒体は、教示用画像生成プログラムを記録する。教示用画像生成プログラムは、検査領域を有する教示用画像において、指定された検査領域内の検査領域画像の特徴量を算出し、算出された画像を配置する位置に、検査領域画像の特徴量を変化させた変化検査領域画像を配置した新規欠陥追加教示用画像を生成する。   A recording medium according to the present invention records a teaching image generation program. The teaching image generation program calculates the feature amount of the inspection region image in the designated inspection region in the teaching image having the inspection region, and sets the feature amount of the inspection region image at the position where the calculated image is arranged. A new defect addition teaching image in which the changed inspection area image that has been changed is arranged is generated.

したがって、教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、本発明により生成された教示用画像は、複数種類の検査領域画像を有するので、複数種類の検査領域画像の各々を有する教示用画像を使用するよりも、当該アルゴリズムに高速に処理させることができるという効果を奏する。   Therefore, since the teaching image generated by the present invention for causing the algorithm to learn the target process in a self-developed manner in the teaching process has a plurality of types of inspection region images, a plurality of types of inspection region images are obtained. There is an effect that the algorithm can be processed at a higher speed than using a teaching image having each of the above.

本発明に係る画像処理アルゴリズム生成方法は、教示用画像生成方法により生成された、処理効率のいい検査領域画像を使用して画像処理アルゴリズムを生成する。   The image processing algorithm generation method according to the present invention generates an image processing algorithm using an inspection area image with high processing efficiency generated by the teaching image generation method.

したがって、所定値以上の評価値の画像処理アルゴリズムを高速に生成することができる。   Therefore, an image processing algorithm having an evaluation value equal to or greater than a predetermined value can be generated at high speed.

本発明に係る画像処理アルゴリズム生成装置は、教示用画像生成方法により生成された、処理効率のいい検査領域画像を使用して画像処理アルゴリズムを生成する。   The image processing algorithm generation apparatus according to the present invention generates an image processing algorithm using an inspection area image with high processing efficiency generated by the teaching image generation method.

したがって、所定値以上の評価値の画像処理アルゴリズムを高速に生成することができる。   Therefore, an image processing algorithm having an evaluation value equal to or greater than a predetermined value can be generated at high speed.

本発明に係る画像処理アルゴリズム生成プログラムは、教示用画像生成プログラムにより生成された、処理効率のいい検査領域画像を使用して画像処理アルゴリズムを生成する。   The image processing algorithm generation program according to the present invention generates an image processing algorithm using an inspection area image with high processing efficiency generated by the teaching image generation program.

したがって、所定値以上の評価値の画像処理アルゴリズムを高速に生成することができる。   Therefore, an image processing algorithm having an evaluation value equal to or greater than a predetermined value can be generated at high speed.

本発明に係る記録媒体は、画像処理アルゴリズム生成プログラムを記録する。画像処理アルゴリズム生成プログラムは、教示用画像生成プログラムにより生成された、処理効率のいい検査領域画像を使用して画像処理アルゴリズムを生成する。   The recording medium according to the present invention records an image processing algorithm generation program. The image processing algorithm generation program generates an image processing algorithm using an inspection region image with high processing efficiency generated by the teaching image generation program.

したがって、所定値以上の評価値の画像処理アルゴリズムを高速に生成することができる。   Therefore, an image processing algorithm having an evaluation value equal to or greater than a predetermined value can be generated at high speed.

本発明に係る画像検査方法は、画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する。   The image inspection method according to the present invention determines the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation method.

したがって、適切に検査対象画像の良否を判定できる。
本発明に係る画像検査装置は、画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する。
Therefore, the quality of the inspection target image can be determined appropriately.
The image inspection apparatus according to the present invention determines the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation method.

したがって、適切に検査対象画像の良否を判定できる。
本発明に係る画像検査プログラムは、画像処理アルゴリズム生成プログラムにより生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する。
Therefore, the quality of the inspection target image can be determined appropriately.
The image inspection program according to the present invention determines the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation program.

したがって、適切に検査対象画像の良否を判定できる。
本発明に係る記録媒体は、画像検査プログラムを記録する。画像検査プログラムは、画像処理アルゴリズム生成プログラムにより生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する。
Therefore, the quality of the inspection target image can be determined appropriately.
The recording medium according to the present invention records an image inspection program. The image inspection program determines the quality of the inspection target image using the image processing algorithm generated by the image processing algorithm generation program.

したがって、適切に検査対象画像の良否を判定できる。   Therefore, the quality of the inspection target image can be determined appropriately.

以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

<第1の実施の形態>
図1は、本実施の形態における教示用画像生成装置500の内部の構成を示すブロック図である。教示用画像生成装置500は、たとえば、PC(Personal Computer)やワークステーション等のコンピュータである。なお、図1には、説明のために、記録媒体555、画像データ入力部600も示している。記録媒体555には、後述する教示用画像生成プログラム180が記録されている。すなわち、教示用画像生成プログラム180は、媒体等に記録されてプログラム製品として流通される。
<First Embodiment>
FIG. 1 is a block diagram showing an internal configuration of a teaching image generation apparatus 500 according to the present embodiment. The teaching image generation apparatus 500 is a computer such as a PC (Personal Computer) or a workstation. Note that FIG. 1 also shows a recording medium 555 and an image data input unit 600 for explanation. The recording medium 555 stores a teaching image generation program 180 described later. That is, the teaching image generation program 180 is recorded on a medium or the like and distributed as a program product.

画像データ入力部600は、詳細は後述するが、教示用画像生成装置500に画像データを送信する機能を有する。   Although details will be described later, the image data input unit 600 has a function of transmitting image data to the teaching image generation apparatus 500.

図1を参照して、教示用画像生成装置500には、表示部530と、マウス542と、キーボード544とが接続される。   With reference to FIG. 1, display unit 530, mouse 542, and keyboard 544 are connected to teaching image generation apparatus 500.

表示部530は、ユーザに各種情報を、文字や画像等で表示する機能を有する。表示部530は、教示用画像生成装置500から出力された画像データに基づいた画像を表示する。表示部530は、液晶ディスプレイ(LCD(Liquid Crystal Display))、CRT(Cathode Ray Tube)、FED(Field Emission Display)、PDP(Plasma Display Panel)、有機ELディスプレイ(Organic Electro luminescence Display)、ドットマトリクス等その他の画像表示方式の表示機器のいずれであってもよい。   The display unit 530 has a function of displaying various types of information as characters, images, and the like to the user. Display unit 530 displays an image based on the image data output from teaching image generation apparatus 500. The display unit 530 is a liquid crystal display (LCD (Liquid Crystal Display)), a CRT (Cathode Ray Tube), an FED (Field Emission Display), a PDP (Plasma Display Panel), an organic EL display (Organic Electroluminescence Display), a dot matrix, or the like. Any other display device of an image display method may be used.

マウス542は、ユーザが教示用画像生成装置500を操作するためのインターフェースである。キーボード544は、ユーザが教示用画像生成装置500を操作するためのインターフェースである。なお、表示部530およびキーボード544は、教示用画像生成装置500の内部に設けられる構成であってもよい。また、マウス542は、たとえば、タッチパッド等として、教示用画像生成装置500の内部に設けられる構成であってもよい。また、教示用画像生成装置500には、ペンタブレットが入力機器として接続されていてもよい。   The mouse 542 is an interface for the user to operate the teaching image generation apparatus 500. The keyboard 544 is an interface for the user to operate the teaching image generation apparatus 500. The display unit 530 and the keyboard 544 may be provided inside the teaching image generation apparatus 500. Further, the mouse 542 may be configured to be provided inside the teaching image generation apparatus 500 as, for example, a touch pad. In addition, a pen tablet may be connected to the teaching image generation apparatus 500 as an input device.

教示用画像生成装置500は、制御部510と、データ一時記憶部522と、記憶部520と、通信部560と、通信部562と、VDP(Video Display Processor)532と、CGROM(Character Graphic Read Only Memory)534と、VRAM(Video Random Access Memory)536と、入力部540と、記録媒体アクセス部550とを含む。   The teaching image generation apparatus 500 includes a control unit 510, a data temporary storage unit 522, a storage unit 520, a communication unit 560, a communication unit 562, a VDP (Video Display Processor) 532, and a CGROM (Character Graphic Read Only). Memory 534, VRAM (Video Random Access Memory) 536, an input unit 540, and a recording medium access unit 550.

CGROM534には、フォントデータ、図形データなど、VDP532が、表示部530で表示される画像を生成するための画像データが記憶されている。   The CGROM 534 stores image data such as font data and graphic data for the VDP 532 to generate an image displayed on the display unit 530.

記憶部520には、制御部510に後述する処理を行なわせるための教示用画像生成プログラム180、画像処理アルゴリズムに学習させるための教示用画像データベース182、その他各種プログラムおよびデータ等が記憶されている。記憶部520は、制御部510によってデータアクセスされる。なお、教示用画像データベース182は、各々が異なる複数種類の教示用画像のデータから構成されるデータベースである。なお、教示用画像についての詳細は後述する。   The storage unit 520 stores a teaching image generation program 180 for causing the control unit 510 to perform processing to be described later, a teaching image database 182 for causing the image processing algorithm to learn, and various other programs and data. . The storage unit 520 is accessed by the control unit 510. The teaching image database 182 is a database composed of data of a plurality of types of teaching images that are different from each other. Details of the teaching image will be described later.

記憶部520は、大容量のデータを記憶可能なハードディスクである。なお、記憶部520は、ハードディスクに限定されることなく、電源を供給されなくてもデータを保持可能な媒体(たとえば、フラッシュメモリ)であればよい。   The storage unit 520 is a hard disk capable of storing a large amount of data. Note that the storage unit 520 is not limited to a hard disk, and may be any medium (for example, a flash memory) that can hold data without being supplied with power.

すなわち、記憶部520は、記憶の消去・書き込みを何度でも行えるEPROM(Erasable Programmable Read Only Memory)、電気的に内容を書き換えることができるEEPROM(Electronically Erasable and Programmable Read Only Memory)、紫外線を使って記憶内容の消去・再書き込みを何度でも行えるUV−EPROM(Ultra-Violet Erasable Programmable Read Only Memory)、その他、不揮発的にデータを記憶保持可能な構成を有する回路のいずれであってもよい。   That is, the storage unit 520 uses an EEPROM (Erasable Programmable Read Only Memory) capable of erasing and writing the memory any number of times, an EEPROM (Electronically Erasable and Programmable Read Only Memory) capable of being electrically rewritten, and ultraviolet rays. Any of a UV-EPROM (Ultra-Violet Erasable Programmable Read Only Memory) capable of erasing and rewriting stored contents any number of times and a circuit having a configuration capable of storing and storing data in a nonvolatile manner may be used.

制御部510は、記憶部520に記憶された教示用画像生成プログラム180に従って、教示用画像生成装置500の内部の各機器に対する各種処理や、演算処理等を行なう機能を有する。制御部510は、マイクロプロセッサ(Microprocessor)、プログラミングすることができるLSI(Large Scale Integration)であるFPGA(Field Programmable Gate Array)、特定の用途のために設計、製造される集積回路であるASIC(Application Specific Integrated Circuit)、その他の演算機能を有する回路のいずれであってもよい。   Control unit 510 has a function of performing various types of processing, arithmetic processing, and the like for each device inside teaching image generation apparatus 500 in accordance with teaching image generation program 180 stored in storage unit 520. The control unit 510 includes a microprocessor, an FPGA (Field Programmable Gate Array), which is an LSI (Large Scale Integration) that can be programmed, and an ASIC (Application, which is an integrated circuit designed and manufactured for a specific application. Specific Integrated Circuit) or any other circuit having an arithmetic function may be used.

また、制御部510は、記憶部520に記憶された教示用画像生成プログラム180に従って、VDP532に対し、画像を生成させ、当該画像を表示部530に表示させる指示(以下においては、「描画指示」とも称する)をだす。   The control unit 510 also instructs the VDP 532 to generate an image and display the image on the display unit 530 in accordance with the teaching image generation program 180 stored in the storage unit 520 (hereinafter, “drawing instruction”). Also called).

VDP532は表示部530と接続されている。VDP532は、制御部510からの描画指示に応じて、CGROM534から必要な画像データを読出し、VRAM536を利用して画像を生成する。そして、VDP532は、VRAM536に記憶された画像データを読出し、表示部530に、当該画像データに基づく画像を表示させる。   The VDP 532 is connected to the display unit 530. The VDP 532 reads necessary image data from the CGROM 534 in accordance with a drawing instruction from the control unit 510 and generates an image using the VRAM 536. The VDP 532 reads out the image data stored in the VRAM 536 and causes the display unit 530 to display an image based on the image data.

VRAM536は、VDP532が生成した画像を一時的に記憶する機能を有する。
データ一時記憶部522は、制御部510によってデータアクセスされ、一時的にデータを記憶するワークメモリとして使用される。
The VRAM 536 has a function of temporarily storing an image generated by the VDP 532.
The data temporary storage unit 522 is accessed as data by the control unit 510 and used as a work memory for temporarily storing data.

データ一時記憶部522は、データを一時的に記憶可能なRAM(Random Access Memory)、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、SDRAM(Synchronous DRAM)、ダブルデータレートモードという高速なデータ転送機能を持ったSDRAMであるDDR−SDRAM(Double Data Rate SDRAM)、Rambus社が開発した高速インターフェース技術を採用したDRAMであるRDRAM(Rambus Dynamic Random Access Memory)、Direct−RDRAM(Direct Rambus Dynamic Random Access Memory)、その他、データを揮発的に記憶保持可能な構成を有する回路のいずれであってもよい。   The data temporary storage unit 522 is a high-speed RAM (Random Access Memory), SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous DRAM), or double data rate mode capable of temporarily storing data. DDR-SDRAM (Double Data Rate SDRAM), which is an SDRAM with excellent data transfer function, RDRAM (Rambus Dynamic Random Access Memory), DRAM that adopts high-speed interface technology developed by Rambus, Direct-RDRAM (Direct Rambus Dynamic) Random Access Memory) or any other circuit having a configuration capable of storing and storing data in a volatile manner.

入力部540には、マウス542と、キーボード544とが接続されている。ユーザは、マウス542またはキーボード544を利用して、教示用画像生成装置500に指示を与える。マウス542またはキーボード544からの入力指示は、入力部540を介して制御部510に伝達される。制御部510は、入力部540からの入力指示に基づいて所定の処理を行なう。   A mouse 542 and a keyboard 544 are connected to the input unit 540. The user gives an instruction to the teaching image generation apparatus 500 using the mouse 542 or the keyboard 544. An input instruction from the mouse 542 or the keyboard 544 is transmitted to the control unit 510 via the input unit 540. Control unit 510 performs predetermined processing based on an input instruction from input unit 540.

記録媒体アクセス部550は、教示用画像生成プログラム180が記録された記録媒体555から、教示用画像生成プログラム180を読出す機能を有する。記録媒体555に記憶されている教示用画像生成プログラム180は、制御部510の動作(インストール処理)により、記録媒体アクセス部550から読み出され、記憶部520に記憶される。   The recording medium access unit 550 has a function of reading the teaching image generation program 180 from the recording medium 555 on which the teaching image generation program 180 is recorded. The teaching image generation program 180 stored in the recording medium 555 is read from the recording medium access unit 550 and stored in the storage unit 520 by the operation (installation process) of the control unit 510.

このインストール処理用プログラムは、予め、記憶部520に格納されており、インストール処理は、制御部510が、インストール処理用プログラムに基づいて行なう。   The installation processing program is stored in advance in the storage unit 520, and the installation processing is performed by the control unit 510 based on the installation processing program.

なお、記憶部520には、教示用画像生成プログラム180がインストールされていなくてもよい。この場合、制御部510は、記録媒体アクセス部550を介して、記録媒体555に記憶された教示用画像生成プログラム180を読み出して、教示用画像生成プログラム180に基づいた所定の処理を行なう。   Note that the teaching image generation program 180 may not be installed in the storage unit 520. In this case, the control unit 510 reads the teaching image generation program 180 stored in the recording medium 555 via the recording medium access unit 550, and performs predetermined processing based on the teaching image generation program 180.

記録媒体555は、DVD−ROM(Digital Versatile Disk Read Only Memory)、CD−ROM(Compact Disk Read Only Memory)、MO(Magneto Optical Disk)、フロッピー(登録商標)ディスク、CF(Compact Flash) カード、SM(Smart Media(登録商標))、MMC(Multi Media Card)、SD(Secure Digital)メモリーカード、メモリースティック(登録商標)、xDピクチャーカードおよびUSBメモリ、磁気テープ、その他不揮発性メモリのいずれであってもよい。   The recording medium 555 includes a DVD-ROM (Digital Versatile Disk Read Only Memory), a CD-ROM (Compact Disk Read Only Memory), an MO (Magneto Optical Disk), a floppy (registered trademark) disk, a CF (Compact Flash) card, and an SM. (Smart Media (registered trademark)), MMC (Multi Media Card), SD (Secure Digital) memory card, Memory Stick (registered trademark), xD picture card and USB memory, magnetic tape, and other non-volatile memory Good.

通信部560は、制御部510とデータの授受を行なう。また、通信部560は、画像データ入力部600と有線または無線で、データの授受を行なう。   Communication unit 560 exchanges data with control unit 510. Communication unit 560 exchanges data with image data input unit 600 in a wired or wireless manner.

制御部510は、通信部560を介して、画像データ入力部600を制御するための制御データを送信する。また、制御部510は、画像データ入力部600から、通信部560を介して、送信した制御データに応じたデータを受信する。   Control unit 510 transmits control data for controlling image data input unit 600 via communication unit 560. Control unit 510 receives data corresponding to the transmitted control data from image data input unit 600 via communication unit 560.

通信部560は、USB(Universal Serial Bus)1.1、USB2.0、その他シリアル転送を行なう通信用インターフェースのいずれであってもよい。また、通信部560は、イーサネット(登録商標)を利用した通信用インターフェースであってもよい。また、通信部560は、セントロニクス仕様、IEEE1284(Institute of Electrical and Electronic Engineers 1284)、その他パラレル転送を行なう通信用インターフェースのいずれであってもよい。また、通信部560は、IEEE1394、その他SCSI規格を利用した通信用インターフェースのいずれであってもよい。   The communication unit 560 may be any of USB (Universal Serial Bus) 1.1, USB 2.0, and other communication interfaces for performing serial transfer. The communication unit 560 may be a communication interface using Ethernet (registered trademark). The communication unit 560 may be any of a Centronics specification, IEEE 1284 (Institute of Electrical and Electronic Engineers 1284), and other communication interfaces that perform parallel transfer. The communication unit 560 may be any one of communication interfaces using IEEE 1394 or other SCSI standards.

また、通信部560は、無線LANの規格であるIEEE802.11a、IEEE802.11b、IEEE802.11g、その他無線技術を利用してデータ通信を行なう通信用インターフェースのいずれであってもよい。   The communication unit 560 may be any of wireless LAN standards IEEE802.11a, IEEE802.11b, IEEE802.11g, and other communication interfaces for performing data communication using a wireless technology.

通信部562は、制御部510と、データの授受を行なう。通信部562は、通信部560と同様なので詳細な説明は繰り返さない。   Communication unit 562 exchanges data with control unit 510. Since communication unit 562 is similar to communication unit 560, detailed description will not be repeated.

通信部610は、通信部562およびネットワーク620とデータの授受を行なう。ネットワーク150は、インターネットなどの外部のネットワークである。通信部610は、イーサネット(登録商標)を利用した通信用インターフェース(たとえば、ルータ)である。また、通信部610と、ネットワーク150とは、無線または有線でデータの授受を行なう。当該有線は、たとえば、電話線、光ファイバケーブル等である。   Communication unit 610 exchanges data with communication unit 562 and network 620. The network 150 is an external network such as the Internet. The communication unit 610 is a communication interface (for example, a router) using Ethernet (registered trademark). Communication unit 610 and network 150 exchange data wirelessly or by wire. The wire is, for example, a telephone line or an optical fiber cable.

したがって、本実施の形態における教示用画像生成装置500は、ネットワーク150から、通信部610および通信部562を介して、プログラムをダウンロード処理を行ない、記憶部520に格納することもできる。この場合、当該ダウンロードしたプログラムは、教示用画像生成プログラム180である。   Therefore, teaching image generation apparatus 500 in the present embodiment can also download a program from network 150 via communication unit 610 and communication unit 562 and store the program in storage unit 520. In this case, the downloaded program is the teaching image generation program 180.

制御部510は、ネットワーク150からダウンロードしたプログラム(教示用画像生成プログラム180)に従って、所定の処理を行なう。このダウンロード用プログラムは、予め、記憶部520に格納されており、ダウンロード処理は、制御部510が、ダウンロード用プログラムに基づいて行なう。   Control unit 510 performs predetermined processing in accordance with a program downloaded from network 150 (teaching image generation program 180). The download program is stored in advance in the storage unit 520, and the download process is performed by the control unit 510 based on the download program.

以上の構成の教示用画像生成装置500により、教示用画像が生成される。
図2は、画像データ入力部600の内部構成を示すブロック図である。なお、図2には、説明のために、教示用画像生成装置500内の通信部560も示している。
A teaching image is generated by the teaching image generating apparatus 500 having the above configuration.
FIG. 2 is a block diagram showing the internal configuration of the image data input unit 600. Note that FIG. 2 also shows a communication unit 560 in the teaching image generation apparatus 500 for explanation.

図2を参照して、画像データ入力部600は、ステージ640に設置された検査対象となる検査対象物650に光を当てて、検査対象物650の反射光をデータに変換する機能を有する。検査対象物650は、液晶パネル、半導体、電子部品、プラスチック、金属、木材、紙、布等のいずれであってもよい。   Referring to FIG. 2, image data input unit 600 has a function of irradiating light to inspection object 650 to be inspected installed on stage 640 and converting reflected light of inspection object 650 into data. The inspection object 650 may be a liquid crystal panel, a semiconductor, an electronic component, plastic, metal, wood, paper, cloth, or the like.

画像データ入力部600は、制御部610と、光源620と、カメラ630とを含む。制御部610は、教示用画像生成装置500内の通信部560とデータの授受を行なう。制御部610は、前述の制御部510と同様な構成および機能を有する。制御部610は、通信部560を介して、制御部510から受信した制御データに基づいて、光源620と、カメラ630とを制御する。   The image data input unit 600 includes a control unit 610, a light source 620, and a camera 630. Control unit 610 exchanges data with communication unit 560 in teaching image generation apparatus 500. Control unit 610 has the same configuration and function as control unit 510 described above. Control unit 610 controls light source 620 and camera 630 based on control data received from control unit 510 via communication unit 560.

光源620は、制御部610の制御により、光を検査対象物650に当てる。
カメラ630は、制御部610の制御により、検査対象物650からの反射光を撮像する機能を有する。カメラ630は、(Charge Coupled Devices)CCD方式、(Complementary Metal Oxide Semiconductor)CMOS方式、または他の方式のカメラのいずれであってもよい。
The light source 620 applies light to the inspection object 650 under the control of the control unit 610.
The camera 630 has a function of imaging reflected light from the inspection object 650 under the control of the control unit 610. The camera 630 may be either a (Charge Coupled Devices) CCD system, a (Complementary Metal Oxide Semiconductor) CMOS system, or another system camera.

また、カメラ630は、撮像したデータを画像データとして、制御部610へ送信する。制御部610は、受信した画像データを、通信部560を介して、制御部510へ送信する。制御部510は、受信した画像データを後述する教示用原画像として記憶部520に記憶させる。制御部510は、当該受信した画像データを、表示部530に表示させる処理を行なう。検査員(ユーザ)は、表示部530に表示された画像(以下においては、検査画像とも称する)を参照することで、検査対象物650が不良品であるか否かが判定可能となる。なお、検査員(ユーザ)は、直接、検査対象物650を見て、不良品であるか否かを判定してもよい。   In addition, the camera 630 transmits the captured data to the control unit 610 as image data. Control unit 610 transmits the received image data to control unit 510 via communication unit 560. The control unit 510 stores the received image data in the storage unit 520 as a teaching original image to be described later. Control unit 510 performs processing for displaying the received image data on display unit 530. The inspector (user) can determine whether or not the inspection object 650 is a defective product by referring to an image (hereinafter, also referred to as an inspection image) displayed on the display unit 530. Note that the inspector (user) may directly check the inspection object 650 and determine whether or not it is a defective product.

ここで、以下に使用する用語の定義を行なう。まず、検査対象物650が不良品であると検査員(ユーザ)が判定する要因となる真正の欠陥のことを真欠陥とする。一方、検査工程で抽出される欠陥ではあるが、検査員(ユーザ)が検査対象物650を不良品と判定するには至らず、検査対象が良品であると判定可能な欠陥のことを擬似欠陥とする。   Here, the terms used below are defined. First, a genuine defect that causes an inspector (user) to determine that the inspection object 650 is defective is defined as a true defect. On the other hand, although it is a defect extracted in the inspection process, the inspector (user) does not determine that the inspection object 650 is a defective product, and a defect that can be determined that the inspection target is a non-defective product is a pseudo defect. And

次に、検査対象物650を撮像した画像のうち、画像中に擬似欠陥の有無に係わらず真欠陥が一つも存在しない画像を良品画像とし、画像中に擬似欠陥の有無に係わらず真欠陥が一つでも存在する画像を欠陥画像とする。良品画像と欠陥画像とはそれぞれ教示用画像となり得るものとする。   Next, among the images obtained by imaging the inspection object 650, an image in which no true defect exists in the image regardless of the presence or absence of a pseudo defect is defined as a non-defective image. At least one existing image is defined as a defect image. The non-defective image and the defect image can be teaching images.

以下の実施の形態で使用する画像のサイズは、たとえば、横640画素、縦480画素であるとする。なお、以下の実施の形態で使用する画像のサイズは、横640画素、縦480画素に限定されることはなく、任意のサイズ(たとえば、横320画素、縦240画素)であってもよい。   Assume that the size of an image used in the following embodiments is, for example, horizontal 640 pixels and vertical 480 pixels. Note that the size of an image used in the following embodiments is not limited to 640 pixels wide and 480 pixels high, and may be any size (eg, 320 pixels wide and 240 pixels high).

また、以下の実施の形態で使用する画像の画素の有する濃度値は、“0”〜“255”の範囲の値である。また、濃度値が“0”の場合、対応する画素は黒であるとする。また、濃度値が“255”の場合、対応する画素は白であるとする。なお、以下の実施の形態で使用する画像の画素の有する濃度値は、“0”〜“255”の範囲の値に限定されることはなく、任意の範囲の値であってもよい。   Further, the density values of the pixels of the image used in the following embodiments are values in the range of “0” to “255”. If the density value is “0”, the corresponding pixel is assumed to be black. If the density value is “255”, the corresponding pixel is white. Note that the density values of the pixels of the image used in the following embodiments are not limited to values in the range of “0” to “255”, and may be values in an arbitrary range.

図3は、一例としての教示用画像600を示す図である。
図3を参照して、教示用画像600は、欠陥領域660を含む。欠陥領域660は欠陥自体領域620を含む。ここで、欠陥自体領域とは、欠陥そのものを示す領域である。欠陥自体領域は、真欠陥を示す領域である真欠陥自体領域と、擬似欠陥を示す領域である擬似欠陥自体領域とに分類される。以下においては、真欠陥自体領域を単に真欠陥とも称する。また、擬似欠陥自体領域を単に擬似欠陥とも称する。また、真欠陥および擬似欠陥を総括的に欠陥とも称する。
FIG. 3 is a diagram showing a teaching image 600 as an example.
Referring to FIG. 3, teaching image 600 includes a defective area 660. The defect area 660 includes a defect itself area 620. Here, the defect itself region is a region indicating the defect itself. The defect itself region is classified into a true defect itself region which is a region showing a true defect and a pseudo defect itself region which is a region showing a pseudo defect. Hereinafter, the true defect itself region is also simply referred to as a true defect. Further, the pseudo defect itself region is also simply referred to as a pseudo defect. Also, true defects and pseudo defects are collectively referred to as defects.

教示用画像600内の欠陥自体領域620以外の領域が背景領域である。すなわち、教示用画像600は、背景領域と欠陥領域とから構成される。また、欠陥領域660内の欠陥自体領域620以外の領域が欠陥背景領域662である。本実施の形態においては、欠陥領域は矩形領域とする。なお、欠陥領域の形状は、矩形に限定されることなく、たとえば、円や楕円等であってもよい。   An area other than the defect itself area 620 in the teaching image 600 is a background area. That is, the teaching image 600 includes a background area and a defect area. Further, a region other than the defect itself region 620 in the defect region 660 is a defect background region 662. In the present embodiment, the defect area is a rectangular area. The shape of the defect area is not limited to a rectangle, and may be, for example, a circle or an ellipse.

また、欠陥領域660は、欠陥自体領域620の重心を矩形領域の中心として、画像中の横方向縦方向ともに欠陥自体領域620のフェレ径の2倍のサイズの矩形領域とする。ただし、画像の端部に欠陥領域660が存在する場合においては、画像の端部を優先し、欠陥領域660である矩形領域はフェレ径の2倍のサイズよりも小さくなる。   The defect area 660 is a rectangular area having a size that is twice the diameter of the defect itself 620 in the horizontal and vertical directions in the image, with the center of gravity of the defect area 620 as the center of the rectangular area. However, when the defect area 660 exists at the edge of the image, the edge of the image is given priority, and the rectangular area that is the defect area 660 is smaller than twice the size of the ferret diameter.

また、教示用画像は、教示用原画像と教示用目標画像とに分類される。真欠陥の有無に係わらず、検査対象物650を撮像した画像を教示用原画像とし、教示用原画像中の真欠陥自体領域に関する情報を画像で与えたものを教示用目標画像と呼ぶこととする。なお、教示用原画像と、教示用原画像に対応する教示用目標画像とは、対応づけられて記憶部520に記憶される。   The teaching images are classified into teaching original images and teaching target images. Regardless of the presence or absence of a true defect, an image obtained by imaging the inspection object 650 is used as a teaching original image, and an image provided with information on the true defect itself area in the teaching original image is referred to as a teaching target image. To do. The teaching original image and the teaching target image corresponding to the teaching original image are stored in the storage unit 520 in association with each other.

ここで、教示用原画像とは、画像処理アルゴリズムによる画像処理の対象となる画像である。教示用目標画像とは、教示用原画像に対して画像処理アルゴリズムによる画像処理を行なった画像が一致または近似することが望まれる画像である。   Here, the teaching original image is an image subjected to image processing by an image processing algorithm. The teaching target image is an image for which it is desired that an image obtained by performing image processing with an image processing algorithm on the teaching original image matches or approximates.

本実施の形態における教示用目標画像は各画素の濃度値が“0”または“255”、すなわち、黒または白の2値画像とする。教示用目標画像は、教示用目標画像中の欠陥の画素のみが白く、その他の画素が黒い画像とする。   The target image for teaching in the present embodiment is a binary image in which the density value of each pixel is “0” or “255”, that is, black or white. The teaching target image is an image in which only defective pixels in the teaching target image are white and other pixels are black.

図4は、一例としての教示用原画像700および教示用目標画像700Aを示す図である。   FIG. 4 is a diagram showing a teaching original image 700 and a teaching target image 700A as an example.

図4(A)は、一例としての教示用原画像700を示す。教示用原画像700は、真欠陥720と、擬似欠陥710とを含む。   FIG. 4A shows a teaching original image 700 as an example. The teaching original image 700 includes a true defect 720 and a pseudo defect 710.

図4(B)は、一例としての教示用目標画像700Aを示す。教示用目標画像700Aは、真欠陥720に対応した真欠陥対応画像720Aを含む。   FIG. 4B shows a teaching target image 700A as an example. The teaching target image 700A includes a true defect corresponding image 720A corresponding to the true defect 720.

次に、教示用画像生成装置500により教示用原画像内の欠陥を利用して、教示用原画像に欠陥をさらに追加した画像を生成する処理について説明する。以下においては、教示用原画像に追加する元となる欠陥を追加元教示用欠陥とも称する。また、追加元教示用欠陥に基づいて新たに追加される欠陥を新規追加教示用欠陥とも称する。また、教示用原画像内の追加元教示用欠陥を利用して、教示用原画像に新規追加教示用欠陥を追加した画像を新規欠陥追加教示用画像とも称する。新規欠陥追加教示用画像を生成する処理を新規欠陥追加教示用画像生成処理とも称する。   Next, processing for generating an image in which a defect is further added to the teaching original image using the defect in the teaching original image by the teaching image generating apparatus 500 will be described. In the following, the defect to be added to the teaching original image is also referred to as an adding source teaching defect. A defect newly added based on the additional source teaching defect is also referred to as a new additional teaching defect. Further, an image obtained by adding a new additional teaching defect to the teaching original image using the additional original teaching defect in the teaching original image is also referred to as a new defect adding teaching image. The process of generating a new defect addition teaching image is also referred to as a new defect addition teaching image generation process.

次に、新規欠陥追加教示用画像生成処理について説明する。
図5は、新規欠陥追加教示用画像生成処理のフローチャートである。
Next, a new defect addition teaching image generation process will be described.
FIG. 5 is a flowchart of a new defect addition teaching image generation process.

図5を参照して、ステップS100では、制御部510が、記憶部520から教示用原画像データを読み出す。なお、制御部510は、検査対象物650を撮像した画像である教示用原画像データを画像データ入力部600から入力してもよい。読み出した教示用原画像は、たとえば、図4の教示用原画像700であるとする。   Referring to FIG. 5, in step S <b> 100, control unit 510 reads teaching original image data from storage unit 520. Control unit 510 may input teaching original image data, which is an image of inspection object 650, from image data input unit 600. Assume that the read teaching original image is, for example, the teaching original image 700 of FIG.

以下においては、このステップS100において読み出した教示用原画像700に含まれる欠陥(たとえば、真欠陥720および擬似欠陥710の各々に対応する欠陥)を初期教示用欠陥と呼ぶことにする。また、真欠陥である初期教示用欠陥を初期教示用真欠陥と呼ぶこととする。また、擬似欠陥である初期教示用欠陥を初期教示用擬似欠陥と呼ぶことととする。   Hereinafter, a defect (for example, a defect corresponding to each of the true defect 720 and the pseudo defect 710) included in the teaching original image 700 read in step S100 is referred to as an initial teaching defect. The initial teaching defect that is a true defect is referred to as an initial teaching true defect. The initial teaching defect that is a pseudo defect is referred to as an initial teaching pseudo defect.

本実施の形態においては、教示用原画像を1枚入力した場合について説明する。しかし、本実施の形態は、これに限定されることなく、必要に応じて複数枚の教示用原画像を入力してもよい。この場合、以下に説明する処理が、教示用原画像の枚数分繰り返される。   In this embodiment, a case where one teaching original image is input will be described. However, the present embodiment is not limited to this, and a plurality of teaching original images may be input as necessary. In this case, the processing described below is repeated for the number of teaching original images.

ステップS100の処理が終了すると、ステップS102に進む。
ステップS102では、制御部510が、表示部530に、教示用原画像700を表示させるための描画指示をVDP532に送る。VDP532は、当該描画指示に基づいて、表示部530に教示用原画像700を表示させる。その後、ステップS104に進む。
When the process of step S100 ends, the process proceeds to step S102.
In step S <b> 102, control unit 510 sends a drawing instruction for displaying teaching original image 700 to display unit 530 to VDP 532. The VDP 532 displays the teaching original image 700 on the display unit 530 based on the drawing instruction. Thereafter, the process proceeds to step S104.

ステップS104では、追加教示用欠陥選択処理が行なわれる。追加教示用欠陥選択処理では、制御部510が、ステップS100で読み出した教示用原画像700中の真欠陥720および擬似欠陥710を選択する。具体的には、ユーザが、表示部530に表示された教示用原画像700を参照して、マウス542等の入力装置を利用して、たとえば、真欠陥720および擬似欠陥710のそれぞれの輪郭部分に、たとえば、線を引くことで欠陥を囲んで、2つの欠陥を選択する選択処理を行なう。制御部510は、当該選択処理に基づいて、2つの欠陥をそれぞれ囲む線のデータ(以下においては、線データとも称する)を記憶部520に記憶させる。   In step S104, additional teaching defect selection processing is performed. In the additional teaching defect selection process, control unit 510 selects true defect 720 and pseudo defect 710 in teaching original image 700 read in step S100. Specifically, the user refers to the teaching original image 700 displayed on the display unit 530 and uses an input device such as the mouse 542, for example, each contour portion of the true defect 720 and the pseudo defect 710. For example, a selection process for selecting two defects by surrounding a defect by drawing a line is performed. Based on the selection process, control unit 510 causes storage unit 520 to store line data (hereinafter also referred to as line data) surrounding two defects.

なお、当該選択処理は、制御部510が、教示用原画像700に基づいて、自動的に上記の線データを作成してもよい。ステップS104の処理により選択された真欠陥720および擬似欠陥710は追加元教示用欠陥である。なお、全初期教示用欠陥は、真欠陥に対応する初期教示用真欠陥と、擬似欠陥に対応する初期教示用擬似欠陥とに分類される。その後、ステップS106に進む。   In the selection process, the control unit 510 may automatically create the line data based on the teaching original image 700. The true defect 720 and the pseudo defect 710 selected by the processing in step S104 are additional source teaching defects. All initial teaching defects are classified into initial teaching true defects corresponding to true defects and initial teaching pseudo defects corresponding to pseudo defects. Thereafter, the process proceeds to step S106.

ステップS106では、追加元教示用欠陥指定画像生成処理が行なわれる。追加元教示用欠陥指定画像生成処理では、制御部510が、記憶部520から線データを読出し、当該線データに基づいて、追加元教示用欠陥指定画像を生成する。制御部510は、記憶部520に追加元教示用欠陥指定画像のデータを教示用原画像と対応付けて記憶させる。なお、ステップS106の処理は行なわれなくてもよい。   In step S106, an additional source teaching defect designation image generation process is performed. In the additional source teaching defect designation image generation process, the control unit 510 reads line data from the storage unit 520, and generates an additional source teaching defect designation image based on the line data. The control unit 510 causes the storage unit 520 to store the data of the additional source teaching defect designation image in association with the teaching original image. Note that the process of step S106 may not be performed.

図6は、教示用原画像700と、教示用原画像700に基づいて生成された追加元教示用欠陥指定画像705Aを示す。   FIG. 6 shows a teaching original image 700 and an additional source teaching defect designation image 705A generated based on the teaching original image 700.

図6(A)は、教示用原画像700を示す。
図6(B)は、追加元教示用欠陥指定画像705Aを示す。追加元教示用欠陥指定画像705Aは、白と黒の2値画像である。追加元教示用欠陥指定画像705Aは、真欠陥720に対応した真欠陥対応画像720Aと、擬似欠陥710Aに対応した擬似欠陥対応画像710Aとを含む。真欠陥対応画像720Aは、ユーザが、真欠陥720の輪郭部分に引いた線に基づくものである。擬似欠陥対応画像710Aは、ユーザが、擬似欠陥710の輪郭部分に引いた線に基づくものである。
FIG. 6A shows a teaching original image 700.
FIG. 6B shows an additional source teaching defect designation image 705A. The additional source teaching defect designation image 705A is a binary image of white and black. The added source teaching defect designation image 705A includes a true defect corresponding image 720A corresponding to the true defect 720 and a pseudo defect corresponding image 710A corresponding to the pseudo defect 710A. The true defect corresponding image 720 </ b> A is based on a line drawn by the user on the contour portion of the true defect 720. The pseudo defect corresponding image 710 </ b> A is based on a line drawn by the user on the contour portion of the pseudo defect 710.

再び、図5を参照して、ステップS106の処理が終了すると、ステップS108に進む。   Referring to FIG. 5 again, when the process of step S106 is completed, the process proceeds to step S108.

ステップS108では、欠陥領域設定処理が行なわれる。欠陥領域設定処理では、制御部510が、真欠陥対応画像720Aおよび擬似欠陥対応画像710Aの各々のフェレ径を算出する。そして、制御部510は、当該算出したフェレ径に基づいて、教示用原画像700の真欠陥720および擬似欠陥710の各々に対し、欠陥領域を設定する。   In step S108, a defective area setting process is performed. In the defect area setting process, control unit 510 calculates the ferret diameter of each of true defect corresponding image 720A and pseudo defect corresponding image 710A. Then, control unit 510 sets a defect region for each of true defect 720 and pseudo defect 710 of teaching original image 700 based on the calculated ferret diameter.

図7は、教示用原画像700に対し欠陥領域を設定した欠陥領域設定画像である。
図7を参照して、教示用原画像700には、欠陥領域760と欠陥領域750が設定される。欠陥領域760は、真欠陥720に対して設定された領域である。欠陥領域750は、擬似欠陥710に対して設定された領域である。
FIG. 7 is a defect area setting image in which a defect area is set for the teaching original image 700.
Referring to FIG. 7, defect area 760 and defect area 750 are set in teaching original image 700. The defect area 760 is an area set for the true defect 720. The defect area 750 is an area set for the pseudo defect 710.

再び、図5を参照して、ステップS108の処理が終了すると、ステップS110に進む。   Referring to FIG. 5 again, when the process of step S108 ends, the process proceeds to step S110.

ステップS110では、特徴量算出処理が行なわれる。特徴量算出処理では、制御部510が、欠陥領域760および欠陥領域750の各々の特徴量を算出する。当該特徴量は、欠陥領域内の欠陥における、画像上での重心位置、面積、角度(回転角度)、コントラスト等である。   In step S110, a feature amount calculation process is performed. In the feature amount calculation process, control unit 510 calculates the feature amounts of defect area 760 and defect area 750. The feature amount includes the position of the center of gravity on the image, the area, the angle (rotation angle), the contrast, and the like of the defect in the defect region.

たとえば、欠陥領域760の特徴量は、追加元教示用欠陥指定画像705A内の、真欠陥対応画像720Aに基づいて、制御部510が、画像上での重心位置、面積、角度(回転角度)を算出する。   For example, the feature amount of the defect area 760 is determined based on the true defect correspondence image 720A in the additional source teaching defect designation image 705A by the control unit 510 based on the center of gravity position, area, and angle (rotation angle) on the image. calculate.

なお、本実施の形態におけるコントラストとは、欠陥領域における欠陥自体領域の平均濃度値と、欠陥背景領域の平均濃度値との差の絶対値とする。   Note that the contrast in the present embodiment is the absolute value of the difference between the average density value of the defect itself in the defect area and the average density value of the defect background area.

制御部510が、たとえば、欠陥領域760のコントラストを算出する場合、欠陥領域760において、欠陥自体領域である欠陥720の全画素の平均濃度値(以下においては、欠陥自体領域平均濃度値とも称する)と、欠陥領域760内の前述した欠陥背景領域内の画像の全画素の平均濃度値(以下においては、欠陥背景領域平均濃度値とも称する)とを算出する。   For example, when the control unit 510 calculates the contrast of the defect region 760, the average density value of all pixels of the defect 720 that is the defect itself region in the defect region 760 (hereinafter, also referred to as the defect itself region average density value). And the average density value of all the pixels of the image in the above-described defect background area in the defect area 760 (hereinafter, also referred to as the defect background area average density value).

そして、制御部510は、欠陥自体領域平均濃度値と欠陥背景領域平均濃度値との差の絶対値を求め、当該絶対値を欠陥領域760のコントラストとする。制御部510は、算出した欠陥領域760および欠陥領域750の各々の特徴量を、記憶部520に、欠陥領域に対応付けて記憶させる。その後、ステップS112に進む。   Then, the control unit 510 obtains the absolute value of the difference between the defect itself area average density value and the defect background area average density value, and uses the absolute value as the contrast of the defect area 760. Control unit 510 causes storage unit 520 to store the calculated feature amounts of defect area 760 and defect area 750 in association with the defect area. Thereafter, the process proceeds to step S112.

ステップS112では、新規追加欠陥数決定処理が行なわれる。新規追加欠陥数決定処理では、ステップS104において選択した追加元教示用欠陥(真欠陥720および擬似欠陥710)の各々に対し、追加元教示用欠陥のどの特徴量をどの程度変化させた欠陥を教示用原画像700に新たに追加するのかを決定することで追加する欠陥の数を決定する処理が行なわれる。当該処理は、記憶部520に記憶された新規追加教示用欠陥の数を設定するための特徴量変化設定データを制御部510が読み出して行なう。   In step S112, a newly added defect number determination process is performed. In the new additional defect number determination process, for each of the additional source teaching defects (true defect 720 and pseudo defect 710) selected in step S104, a defect in which which feature quantity of the additional source teaching defect is changed is taught. A process of determining the number of defects to be added is performed by determining whether to newly add to the original image 700 for use. The processing is performed by the control unit 510 reading out the feature amount change setting data for setting the number of newly added teaching defects stored in the storage unit 520.

特徴量変化設定データにより、変化させる特徴量が、たとえば、面積であって、追加元教示用欠陥の面積をそれぞれ2%および4%減少させる場合、教示用原画像700に新たに追加される新規追加教示用欠陥は2つとなる。   When the feature quantity to be changed is, for example, an area based on the feature quantity change setting data, and the area of the addition source teaching defect is reduced by 2% and 4%, respectively, a new one newly added to the teaching original image 700 There are two additional teaching defects.

特徴量変化設定データにより、変化させる特徴量が、たとえば、コントラストであって、追加元教示用欠陥のコントラストをそれぞれ2%および4%減少させる場合、教示用原画像700に新たに追加される新規追加教示用欠陥は2つとなる。   When the feature amount to be changed is, for example, contrast by the feature amount change setting data, and the contrast of the defect in the additional source teaching is reduced by 2% and 4%, respectively, a new newly added to the teaching original image 700 There are two additional teaching defects.

つまり、選択した特徴量とそれぞれの変化量を指定することで、新規追加教示用欠陥の数が決定される。   That is, the number of newly added teaching defects is determined by designating the selected feature amount and each change amount.

制御部510は、決定された欠陥の数の情報を記憶部520に記憶させる。
なお、当該処理は、設定データを使用せず、ユーザが、表示部530に表示されたGUI(Graphical User Interface)において、マウス524またはキーボード544等の入力機器を用いて、特徴量変化設定データに対応するようなデータを入力することで行なわれてもよい。その後、ステップS114に進む。
The control unit 510 causes the storage unit 520 to store information on the determined number of defects.
In this process, the setting data is not used, and the user uses the input device such as the mouse 524 or the keyboard 544 in the GUI (Graphical User Interface) displayed on the display unit 530 to change the feature amount change setting data. It may be performed by inputting corresponding data. Thereafter, the process proceeds to step S114.

ステップS114では、新規追加教示用欠陥リスト作成処理が行なわれる。新規追加教示用欠陥リスト作成処理では、制御部510が、追加元教示用欠陥としての真欠陥720および擬似欠陥710にそれぞれ追加元教示用欠陥ID1,2を割り当てる。そして、制御部510が、ステップS112で読み出された特徴量変化設定データおよび追加する欠陥の数に基づいて、全新規追加教示用欠陥について、任意の順番に新規追加教示用欠陥IDを、たとえば、1〜4まで割り当てて、新規追加教示用欠陥リストテーブルを作成する。作成された新規追加教示用欠陥リストテーブルは、制御部510が、記憶部520に記憶させる。   In step S114, a newly added teaching defect list creation process is performed. In the new additional teaching defect list creation process, control unit 510 assigns additional source teaching defect IDs 1 and 2 to true defect 720 and pseudo defect 710 as additional source teaching defects, respectively. Then, based on the feature amount change setting data read in step S112 and the number of defects to be added, the control unit 510 assigns new additional teaching defect IDs in any order, for example, for all new additional teaching defects. 1 to 4 are assigned to create a new additional teaching defect list table. The newly added teaching defect list table is stored in the storage unit 520 by the control unit 510.

図8は、一例としての新規追加教示用欠陥リストテーブルT100を示す図である。
図8を参照して、新規追加教示用欠陥リストテーブルT100は、追加元教示用欠陥に対して同時に変化させる特徴量の数が2つである場合の例を示している。なお、変化させる特徴量は、3つ以上であってもよい。
FIG. 8 is a diagram showing a new additional teaching defect list table T100 as an example.
Referring to FIG. 8, new additional teaching defect list table T100 shows an example in which the number of feature quantities to be simultaneously changed with respect to the additional source teaching defect is two. Note that the number of feature quantities to be changed may be three or more.

新規追加教示用欠陥リストテーブルT100は、たとえば、追加元教示用欠陥ID1,ID2がそれぞれ割り当てられた2つの追加元教示用欠陥の各々に対し追加する欠陥の数が2つである場合のリストを示す。   The new additional teaching defect list table T100 is, for example, a list when the number of defects to be added is two for each of the two additional source teaching defects to which the additional source teaching defects ID1 and ID2 are respectively assigned. Show.

新規追加教示用欠陥リストテーブルT100は、複数の新規追加教示用欠陥IDの各々と、追加元教示用欠陥IDと、変化させる特徴量と、特徴量の変化量とを対応づけたリストテーブルである。以下においては、各新規追加教示用欠陥IDに割り当てられたデータを新規追加教示用欠陥データとも称する。したがって、新規追加教示用欠陥リストテーブルT100は、複数の新規追加教示用欠陥データから構成される。   The new additional teaching defect list table T100 is a list table in which each of a plurality of new additional teaching defect IDs, an additional source teaching defect ID, a feature amount to be changed, and a feature amount change amount are associated with each other. . Hereinafter, the data assigned to each new additional teaching defect ID is also referred to as new additional teaching defect data. Therefore, the newly added teaching defect list table T100 includes a plurality of newly added teaching defect data.

再び、図5を参照して、ステップS114の処理が終了すると、ステップS120に進む。   Referring to FIG. 5 again, when the process of step S114 ends, the process proceeds to step S120.

ステップS120では、新規追加教示用欠陥リストテーブルT100から読み出すデータを特定するためのカウンタkに“1”が設定される。その後、ステップS122に進む。   In step S120, "1" is set to the counter k for specifying data to be read from the newly added teaching defect list table T100. Thereafter, the process proceeds to step S122.

ステップS122では、制御部510が、カウンタkに対応した新規追加教示用欠陥データを記憶部520から読み出す。カウンタkが“1”である場合、制御部510は、新規追加教示用欠陥リストテーブルT100の新規追加教示用欠陥IDが“1”に対応する新規追加教示用欠陥データを記憶部520から読み出す。   In step S122, control unit 510 reads defect data for newly added teaching corresponding to counter k from storage unit 520. When the counter k is “1”, the control unit 510 reads from the storage unit 520 the new additional teaching defect data corresponding to the new additional teaching defect ID “1” in the new additional teaching defect list table T100.

この場合、新規追加教示用欠陥データに基づく新規追加教示用欠陥は、追加元教示用欠陥ID“1”に対応する欠陥の面積のみを5%小さくした欠陥となる。   In this case, the new additional teaching defect based on the new additional teaching defect data is a defect in which only the area of the defect corresponding to the additional source teaching defect ID “1” is reduced by 5%.

なお、カウンタkが“4”である場合、制御部510は、新規追加教示用欠陥リストテーブルT100の新規追加教示用欠陥IDが“4”に対応する新規追加教示用欠陥データを記憶部520から読み出す。   When the counter k is “4”, the control unit 510 stores new additional teaching defect data corresponding to the new additional teaching defect ID “4” in the new additional teaching defect list table T100 from the storage unit 520. read out.

この場合、新規追加教示用欠陥データに基づく新規追加教示用欠陥は、追加元教示用欠陥ID“2”に対応する欠陥の面積を5%小さくするとともに、コントラストを5%低下させた欠陥となる。ステップS122の処理が終了すると、ステップS130の処理に進む。   In this case, the new additional teaching defect based on the new additional teaching defect data is a defect in which the area of the defect corresponding to the additional source teaching defect ID “2” is reduced by 5% and the contrast is reduced by 5%. . When the process of step S122 ends, the process proceeds to step S130.

ステップS130では、新規追加教示用欠陥の描画位置を決定する新規追加欠陥描画位置決定処理が行なわれる。新規追加教示用欠陥の描画位置は欠陥の重心位置で表現するものとする。また、新規追加教示用欠陥の描画位置は、教示用原画像内において、新規追加教示用欠陥が、教示用原画像内の初期教示用欠陥、または、すでに追加された新規追加教示用欠陥の一部とも重ならない位置に決定される。さらに、新規追加教示用欠陥の描画位置は、新規追加教示用欠陥が、教示用原画像内に収まる位置に決定される。   In step S130, a new additional defect drawing position determination process for determining the drawing position of the new additional teaching defect is performed. The drawing position of the newly added teaching defect is expressed by the position of the center of gravity of the defect. In addition, the drawing position of the newly added teaching defect is determined based on whether the newly added teaching defect is an initial teaching defect in the teaching original image or a newly added teaching defect that has already been added. The position is determined so as not to overlap with the part. Further, the drawing position of the newly added teaching defect is determined at a position where the newly added teaching defect falls within the teaching original image.

図9は、新規追加欠陥描画位置決定処理のフローチャートである。以下に説明する処理においては、たとえば、図4の教示用原画像700が使用されるものとする。   FIG. 9 is a flowchart of the newly added defect drawing position determination process. In the processing described below, for example, the teaching original image 700 of FIG. 4 is used.

図9を参照して、ステップS131では、初期設定処理が行なわれる。初期設定処理では、制御部510が、ユーザがあらかじめ設定しておいた描画位置設定データを記憶部520から読み出す。そして、読み出した描画位置設定データに基づき、初期設定を行なう。   Referring to FIG. 9, in step S131, an initial setting process is performed. In the initial setting process, control unit 510 reads drawing position setting data set in advance by the user from storage unit 520. Then, initial setting is performed based on the read drawing position setting data.

描画位置設定データには、新規追加教示用欠陥の描画位置の選択を、追加元教示用欠陥の近傍から行なうか否かを示す近傍選択データが含まれる。近傍選択データが、たとえば、“1”に設定されている場合、新規追加教示用欠陥の描画位置の選択は、追加元教示用欠陥の近傍から行なわれる。   The drawing position setting data includes neighborhood selection data indicating whether or not the drawing position of the newly added teaching defect is selected from the vicinity of the adding source teaching defect. When the neighborhood selection data is set to “1”, for example, the drawing position of the newly added teaching defect is selected from the vicinity of the adding source teaching defect.

また、描画位置設定データには、追加元教示用欠陥が配置された描画位置が、背景の濃度値に対して妥当な位置であるかを判定するときに、濃度値の分散値を使用するか否かを示す分散値使用許可データが含まれる。分散値使用許可データが、たとえば、“1”に設定されている場合、当該判定の際、濃度値の分散値を使用する。   Whether to use the density value dispersion value in the drawing position setting data when determining whether the drawing position where the additional source teaching defect is arranged is an appropriate position with respect to the background density value. Distributed value use permission data indicating whether or not is included. For example, when the dispersion value use permission data is set to “1”, the dispersion value of the density value is used in the determination.

ステップS131の処理が終了すると、ステップS132に進む。
ステップS132では、制御部510が、新規追加教示用欠陥の描画位置の選択を、追加元教示用欠陥の近傍から行なうか否かを判定する。具体的には、読み出した近傍選択データが“1”であるか否かを判定する。ステップS132において、YESならば、ステップS133に進む。一方、ステップS132において、NOならば、ステップS133Aに進む。
When the process of step S131 ends, the process proceeds to step S132.
In step S132, control unit 510 determines whether or not to select the drawing position of the newly added teaching defect from the vicinity of the additional source teaching defect. Specifically, it is determined whether or not the read neighborhood selection data is “1”. If YES in step S132, the process proceeds to step S133. On the other hand, if NO at step S132, the process proceeds to step S133A.

ステップS133では、制御部510が、新規追加教示用欠陥の描画位置の選択を、追加元教示用欠陥の近傍から行なう。具体的には、制御部510は、教示用原画像700の追加元教示用欠陥(たとえば、真欠陥720)の重心位置から、たとえば、4画素離れた位置を描画位置に決定する。なお、制御部510は、ステップS133の処理が行なわれる毎に、たとえば、螺旋上に、前回決めた描画位置から4画素離れた位置を描画位置に決定する。なお、描画位置の決め方は、螺旋上に限定されることはない。また、描画位置を決定する際の4画素離れた位置というのは、一例であって、たとえば、8画素離れた位置であってもよい。その後、ステップS133Bに進む。   In step S133, control unit 510 selects the drawing position of the newly added teaching defect from the vicinity of the additional source teaching defect. Specifically, control unit 510 determines, for example, a position 4 pixels away from the barycentric position of the additional source teaching defect (for example, true defect 720) of teaching original image 700 as the drawing position. Note that each time the process of step S133 is performed, the controller 510 determines, for example, a position on the spiral that is 4 pixels away from the previously determined drawing position as the drawing position. Note that the method of determining the drawing position is not limited to the spiral. Further, the position 4 pixels away when determining the drawing position is an example, and may be a position 8 pixels away, for example. Thereafter, the process proceeds to step S133B.

ステップS133Aでは、制御部510が、新規追加教示用欠陥の描画位置の選択をランダムに行なう。制御部510は、教示用原画像700の追加元教示用欠陥(たとえば、真欠陥720)の位置に関係なく、ランダムに、新規追加教示用欠陥の描画位置を決定する。その後、ステップS133Bに進む。   In step S133A, control unit 510 randomly selects the drawing position of the newly added teaching defect. The control unit 510 randomly determines the drawing position of the new additional teaching defect regardless of the position of the additional source teaching defect (for example, the true defect 720) of the teaching original image 700. Thereafter, the process proceeds to step S133B.

なお、新規追加教示用欠陥の描画位置の選択処理は、ステップS133,S133Aの処理に限定されることはない。たとえば、新規追加教示用欠陥の描画位置の選択処理は、画像の左上の画素から画像の右端に向かって順番に行なわれてもよい。   Note that the process of selecting the drawing position of the newly added teaching defect is not limited to the processes of steps S133 and S133A. For example, the processing for selecting the drawing position of the newly added teaching defect may be performed in order from the upper left pixel of the image toward the right edge of the image.

ステップS133Bでは、新規追加教示用欠陥作成処理が行なわれる。新規追加教示用欠陥作成処理では、制御部510が、ステップS122で読み出した新規追加教示用欠陥データに基づいて新規追加教示用欠陥のサイズおよび形状を決定する。   In step S133B, a new additional teaching defect creation process is performed. In the new additional teaching defect creation process, control unit 510 determines the size and shape of the new additional teaching defect based on the new additional teaching defect data read in step S122.

なお、制御部510が新規追加教示用欠陥データに基づいて作成する新規追加教示用欠陥の面積やフェレ径などのサイズが追加元教示用欠陥と異なる場合、制御部510は、画像処理の一般的技術を用いて拡大・縮小、縦横比変更処理を行なうことにより、新規追加教示用欠陥のサイズおよび形状を決定する。   In addition, when the size of the newly added teaching defect created by the control unit 510 based on the newly added teaching defect data is different from the size of the additional source teaching defect, the control unit 510 performs general image processing. The size and shape of the newly added teaching defect are determined by performing enlargement / reduction and aspect ratio change processing using the technology.

また、制御部510が新規追加教示用欠陥データに基づいて作成する新規追加教示用欠陥が追加元教示用欠陥に対して回転する場合、制御部510は、画像処理の一般的技術を用いて回転変換を行なうことにより、新規追加教示用欠陥のサイズおよび形状を決定する。なお、新規追加教示用欠陥の全画素の濃度値は、後述する処理により算出される。   When the new additional teaching defect created by the control unit 510 based on the new additional teaching defect data rotates with respect to the additional source teaching defect, the control unit 510 rotates using a general technique of image processing. By performing the conversion, the size and shape of the newly added teaching defect are determined. It should be noted that the density values of all the pixels of the newly added teaching defect are calculated by processing to be described later.

図10は、教示用原画像700に新規追加教示用欠陥を配置した新規欠陥追加教示用画像705を示す。   FIG. 10 shows a new defect addition teaching image 705 in which a new additional teaching defect is arranged on the teaching original image 700.

図10を参照して、新規欠陥追加教示用画像705は、ステップS133またはS133Aの処理により決定された描画位置に、新規追加教示用欠陥724を配置した画像の一例である。   Referring to FIG. 10, new defect addition teaching image 705 is an example of an image in which new additional teaching defect 724 is arranged at the drawing position determined by the process of step S133 or S133A.

再び、図9を参照して、ステップS133Bの処理が終了すると、ステップS134に進む。   Referring to FIG. 9 again, when the process of step S133B ends, the process proceeds to step S134.

ステップS134では、制御部510が、ステップS133またはステップS133Aで決定された追加教示用欠陥の描画位置に配置された追加教示用欠陥が、他の欠陥と重なるか否かを判定する。   In step S134, control unit 510 determines whether or not the additional teaching defect arranged at the drawing position of the additional teaching defect determined in step S133 or step S133A overlaps with another defect.

具体的には、制御部510が、追加元教示用欠陥の位置および新規追加教示用欠陥のサイズ等に基づいて定められている、新規追加教示用欠陥を構成する複数の画素の各々座標と、追加元教示用欠陥またはすでに追加された新規追加教示用欠陥を構成する複数の画素の各々の座標とが重なっているか否かを判定する。   Specifically, the control unit 510 determines the coordinates of the plurality of pixels constituting the new additional teaching defect, which are determined based on the position of the additional original teaching defect, the size of the new additional teaching defect, and the like, It is determined whether or not the coordinates of each of a plurality of pixels constituting the addition source teaching defect or the newly added teaching defect that has already been added overlap.

ステップS134において、YESならば、再度、ステップS132の処理が行なわれる。一方、ステップS134において、NOならば、ステップS135に進む。   If YES in step S134, the process of step S132 is performed again. On the other hand, if NO at step S134, the process proceeds to step S135.

ステップS135では、欠陥領域設定処理が行なわれる。欠陥領域設定処理では、制御部510が、新規追加教示用欠陥724に対して欠陥領域を設定する。具体的には、制御部510は、追加教示用欠陥724の描画位置、面積およびフェレ径情報から得られるサイズ情報に基づいて、欠陥領域の横幅の画素数と縦幅の画素数とを算出し、新規追加教示用欠陥724に対して欠陥領域を設定する。   In step S135, a defective area setting process is performed. In the defect area setting process, control unit 510 sets a defect area for newly added teaching defect 724. Specifically, control unit 510 calculates the number of horizontal pixels and the number of vertical pixels of the defect area based on the size information obtained from the drawing position, area, and ferret diameter information of additional teaching defect 724. Then, a defect area is set for the newly added teaching defect 724.

図11は、教示用原画像705に対し欠陥領域を設定した欠陥領域設定画像である。
図11を参照して、教示用原画像705には、欠陥領域762が設定される。欠陥領域762は、新規追加教示用欠陥724に対して設定された領域である。
FIG. 11 is a defect area setting image in which a defect area is set for the teaching original image 705.
Referring to FIG. 11, defect area 762 is set in teaching original image 705. The defect area 762 is an area set for the newly added teaching defect 724.

再び、図9を参照して、次に、制御部510は、欠陥領域762内の画素から、新規追加教示用欠陥724の画素部分を除くことで、欠陥領域762に対応する新規追加教示用欠陥背景領域の画素を算出する。その後、ステップS136に進む。   Referring again to FIG. 9, next, control unit 510 removes the pixel portion of new additional teaching defect 724 from the pixels in defective region 762, thereby newly adding new teaching defect corresponding to defective region 762. The pixels in the background area are calculated. Thereafter, the process proceeds to step S136.

ステップS136では、平均濃度値比較処理が行なわれる。平均濃度値比較処理では、制御部510が、新規追加教示用欠陥背景領域内の全画素の濃度値の平均値(以下においては、新規追加教示用欠陥背景領域平均濃度値とも称する)を算出する。その後、ステップS136Aに進む。   In step S136, an average density value comparison process is performed. In the average density value comparison process, control unit 510 calculates an average value of density values of all pixels in the newly added teaching defect background area (hereinafter, also referred to as a new additional teaching defect background area average density value). . Thereafter, the process proceeds to step S136A.

ステップS136Aでは、制御部510が、ステップS110で算出された欠陥領域760内の欠陥背景領域平均濃度値と、ステップS136で算出された新規追加教示用欠陥背景領域平均濃度値との差の絶対値が、所定値(たとえば、60)以下であるか否かを判定する。   In step S136A, control unit 510 determines the absolute value of the difference between the defect background area average density value in defect area 760 calculated in step S110 and the newly added teaching defect background area average density value calculated in step S136. Is less than a predetermined value (for example, 60).

すなわち、ステップS136,S136Aの処理では、ステップS133またはS133Aの処理により決定された新規追加教示用欠陥の描画位置が適切な位置であるか否かが判定される。   That is, in the process of steps S136 and S136A, it is determined whether or not the drawing position of the newly added teaching defect determined by the process of step S133 or S133A is an appropriate position.

ステップS136Aにおいて、YESならば、ステップS137の処理に進む。一方、ステップS136Aにおいて、NOならば、再度、ステップS132の処理が行なわれる。   If YES in step S136A, the process proceeds to step S137. On the other hand, if NO at step S136A, the process at step S132 is performed again.

ステップS137では、制御部510が、ステップS133またはS133Aの処理により決定された新規追加教示用欠陥の描画位置が背景の濃度値に対して妥当な位置であるかを判定するときに、濃度値の分散値を使用するか否かを判定する。具体的には、制御部510は、分散値使用許可データが“1”であるか否かを判定する。ステップS137において、YESならば、ステップS137Aに進む。一方、ステップS137において、NOならば、この新規追加欠陥描画位置決定処理の処理は終了し、再度、新規欠陥追加教示用画像生成処理に戻り、ステップS130の次のステップS140に進む。   In step S137, when the control unit 510 determines whether the drawing position of the new additional teaching defect determined by the process of step S133 or S133A is an appropriate position with respect to the density value of the background, Determine whether to use the variance value. Specifically, control unit 510 determines whether or not the distributed value use permission data is “1”. If YES at step S137, the process proceeds to step S137A. On the other hand, if “NO” in the step S137, the process of determining the new additional defect drawing position is ended, and the process returns to the new defect adding teaching image generation process again, and proceeds to the step S140 after the step S130.

ステップS137Aでは、濃度値分散比較処理が行なわれる。濃度値分散比較処理では、制御部510が、欠陥領域760内の欠陥背景領域の全画素の濃度値の分散値(以下においては、追加元教示用欠陥背景領域分散値とも称する)を算出する。   In step S137A, density value dispersion comparison processing is performed. In the density value variance comparison process, control unit 510 calculates a variance value of density values of all pixels in the defective background area in defective area 760 (hereinafter also referred to as an additional source teaching defect background area variance value).

次に、制御部510が、新規追加教示用欠陥背景領域の全画素の濃度値の分散値(以下においては、新規追加教示用欠陥背景領域分散値とも称する)を算出する。その後、ステップS137Bに進む。   Next, control unit 510 calculates a variance value of density values of all pixels in the newly added teaching defect background region (hereinafter also referred to as a newly added teaching defect background region variance value). Thereafter, the process proceeds to step S137B.

ステップS137Bでは、制御部510が、ステップS137Aで算出された追加元教示用欠陥背景領域分散値と、ステップS137Aで算出された新規追加教示用欠陥背景領域分散値との差の絶対値が、所定値(たとえば、60)以下であるか否かを判定する。   In step S137B, control unit 510 determines that the absolute value of the difference between the additional source teaching defect background area variance calculated in step S137A and the new additional teaching defect background area variance calculated in step S137A is predetermined. It is determined whether or not it is a value (for example, 60) or less.

すなわち、ステップS137A,S137Bの処理では、ステップS133またはS133Aの処理により決定された新規追加教示用欠陥の描画位置が、ステップS136,S136Aの処理の処理よりも、さらに適切な位置であるか否かが判定される。   That is, in the processing of steps S137A and S137B, whether or not the drawing position of the newly added teaching defect determined by the processing of step S133 or S133A is a more appropriate position than the processing of steps S136 and S136A. Is determined.

ステップS137Bにおいて、YESならば、この新規追加欠陥描画位置決定処理の処理は終了し、再度、新規欠陥追加教示用画像生成処理に戻り、ステップS130の次のステップS140に進む。一方、ステップS137Bにおいて、NOならば、再度、ステップS132の処理が行なわれる。   If “YES” in the step S137B, the process of the new additional defect drawing position determination process is ended, the process returns to the new defect additional teaching image generation process again, and proceeds to the step S140 subsequent to the step S130. On the other hand, if NO at step S137B, the process at step S132 is performed again.

以上の新規追加欠陥描画位置決定処理により、新規追加教示用欠陥の描画位置が決定される。   With the above-described new additional defect drawing position determination processing, the drawing position of the new additional teaching defect is determined.

再び、図5を参照して、ステップS130の処理の後、ステップS140の処理が行なわれる。   Referring to FIG. 5 again, after step S130, step S140 is performed.

ステップS140では、新規追加教示用欠陥描画処理が行なわれる。新規追加教示用欠陥描画処理では、制御部510およびVDP532の処理により、表示部530に表示させる画像データを記憶するためのVRAM536に、教示用原画像700が描画される。   In step S140, a new additional teaching defect drawing process is performed. In the new additional teaching defect rendering process, the teaching original image 700 is rendered in the VRAM 536 for storing image data to be displayed on the display unit 530 by the processing of the control unit 510 and the VDP 532.

次に、新規追加教示用欠陥724の全画素の濃度値が算出される。具体的には、新規追加教示用欠陥724と、追加元教示用欠陥720とのサイズおよび形状が同じである場合、制御部510は、新規追加教示用欠陥724の全画素の濃度値を、欠陥720の濃度値に設定する。   Next, the density values of all the pixels of the newly added teaching defect 724 are calculated. Specifically, when the size and shape of the new additional teaching defect 724 and the additional source teaching defect 720 are the same, the control unit 510 determines the density values of all the pixels of the new additional teaching defect 724 as defects. The density value is set to 720.

新規追加教示用欠陥724が拡大、縮小、回転等の処理を施され、新規追加教示用欠陥724と、追加元教示用欠陥720とのサイズおよび形状が異なる場合、制御部510は、追加元教示用欠陥720を、新規追加教示用欠陥724と同じサイズおよび形状になるように拡大、縮小、回転等の処理をすることで形状を変更する。そして、新規追加教示用欠陥724の全画素の濃度値を、形状が変更された欠陥720の全画素の濃度値にそれぞれ設定する。   When the new additional teaching defect 724 is subjected to processing such as enlargement, reduction, and rotation, and the size and shape of the new additional teaching defect 724 and the additional source teaching defect 720 are different from each other, the control unit 510 performs the additional source teaching. The shape is changed by subjecting the defect 720 for enlargement, reduction, rotation, etc. to the same size and shape as the newly added teaching defect 724. Then, the density value of all pixels of the newly added teaching defect 724 is set to the density value of all pixels of the defect 720 whose shape has been changed.

次に、制御部510は、新規追加教示用欠陥724の全画素の平均値(以下においては、新規追加教示用欠陥平均濃度値とも称する)を算出する。次に、制御部510は、新規追加教示用欠陥平均濃度値と、前述した新規追加教示用欠陥背景領域平均濃度値との差の絶対値(以下においては、新規追加教示用欠陥コントラストとも称する)を求める。   Next, the control unit 510 calculates an average value of all pixels of the new additional teaching defect 724 (hereinafter, also referred to as a new additional teaching defect average density value). Next, the control unit 510 calculates the absolute value of the difference between the new additional teaching defect average density value and the above-described new additional teaching defect background area average density value (hereinafter also referred to as new additional teaching defect contrast). Ask for.

次に、制御部510は、新規追加教示用欠陥コントラストと、前述の欠陥領域760のコントラストとの差の絶対値が、所定値(たとえば、0.4)以下であれば、設定した新規追加教示用欠陥724の全画素の濃度値を、最終的な濃度値とする。なお、所定値は、“0”であってもよい。   Next, if the absolute value of the difference between the newly added teaching defect contrast and the contrast of the defect area 760 is equal to or smaller than a predetermined value (for example, 0.4), the control unit 510 sets the newly added teaching. The density value of all pixels of the defect 724 for use is set as the final density value. The predetermined value may be “0”.

また、制御部510は、新規追加教示用欠陥コントラストと、欠陥領域760のコントラストとの差の絶対値が、所定値より大きければ、新規追加教示用欠陥コントラストが、所定値以下となるように、当該求めた差の絶対値(オフセット値)を、新規追加教示用欠陥724の全画素の濃度値に加算または減算することで、最終的な新規追加教示用欠陥724の全画素の濃度値を算出する。   In addition, if the absolute value of the difference between the newly added teaching defect contrast and the contrast of the defect area 760 is greater than a predetermined value, the control unit 510 causes the newly added teaching defect contrast to be equal to or less than the predetermined value. By adding or subtracting the absolute value (offset value) of the obtained difference to the density value of all pixels of the new additional teaching defect 724, the final density value of all pixels of the new additional teaching defect 724 is calculated. To do.

次に、制御部510およびVDP532の処理により、VRAM536上の、新規追加欠陥描画位置決定処理により決定された新規追加教示用欠陥の描画位置に、ステップS133Bで形状が生成され、上記処理で濃度値が決定された新規追加教示用欠陥724を描画する。その後、ステップS150に進む。   Next, by the processing of the control unit 510 and the VDP 532, a shape is generated in step S133B at the drawing position of the new additional teaching defect determined by the new additional defect drawing position determination process on the VRAM 536, and the density value is obtained by the above process. The newly added teaching defect 724 for which is determined is drawn. Thereafter, the process proceeds to step S150.

ステップS150では、制御部510が、ステップS112の処理で決定された新規追加元教示用欠陥の数と、ステップS140で描画した新規追加教示用欠陥の数とが等しいか否かを判定する。ステップS150において、YESならば、ステップS160に進む。一方、ステップS150において、NOならば、ステップS152に進む。   In step S150, control unit 510 determines whether the number of newly added source teaching defects determined in step S112 is equal to the number of newly added teaching defects drawn in step S140. If YES in step S150, the process proceeds to step S160. On the other hand, if NO at step S150, the process proceeds to step S152.

ステップS152では、制御部510が、カウンタkを“1”インクリメントする。その後、再度、ステップS122の処理が行なわれる。   In step S152, control unit 510 increments counter k by “1”. Thereafter, the process of step S122 is performed again.

ステップS160では、制御部510が、VRAM536に記憶された画像データ(新規欠陥追加教示用画像のデータ)を、記憶部520に記憶させる。そして、この新規欠陥追加教示用画像生成処理は終了する。   In step S160, control unit 510 causes storage unit 520 to store the image data (new defect addition teaching image data) stored in VRAM 536. Then, the new defect addition teaching image generation process ends.

以上説明した新規欠陥追加教示用画像生成処理により新規欠陥追加教示用画像が生成される。   The new defect addition teaching image is generated by the new defect addition teaching image generation processing described above.

図12は、本実施の形態における教示用画像生成装置500の機能ブロック図である。
図12を参照して、教示用画像生成装置500は、教示用画像生成管理部として動作する。教示用画像生成装置500には、画像データ入力部600および表示部530が接続されている。
FIG. 12 is a functional block diagram of the teaching image generation apparatus 500 in the present embodiment.
Referring to FIG. 12, teaching image generation apparatus 500 operates as a teaching image generation management unit. An image data input unit 600 and a display unit 530 are connected to the teaching image generation apparatus 500.

教示用画像生成装置500は、制御部510を含む。
制御部510は、画像入力部511、欠陥選択部512、画像処理演算部513、新規追加教示用欠陥描画部514、教示用画像生成完了判定部516として動作する。教示用画像データベース182は、記憶部520に記憶されている。教示用画像データベース182は、画像データ入力部600から入力された教示用原画像を含む。
Teaching image generation apparatus 500 includes a control unit 510.
The control unit 510 operates as an image input unit 511, a defect selection unit 512, an image processing calculation unit 513, a new additional teaching defect drawing unit 514, and a teaching image generation completion determination unit 516. The teaching image database 182 is stored in the storage unit 520. The teaching image database 182 includes the teaching original image input from the image data input unit 600.

画像入力部511は、前述のステップS100の処理を行なう機能を有する。
欠陥選択部512は、前述のステップS104の処理を行なう機能を有する。
The image input unit 511 has a function of performing the process of step S100 described above.
The defect selection unit 512 has a function of performing the process of step S104 described above.

画像処理演算部513は、前述のステップS108,S110,S112,S114,S120,S122,S130,S152の処理を行なう機能を有する。   The image processing calculation unit 513 has a function of performing the processes of steps S108, S110, S112, S114, S120, S122, S130, and S152 described above.

新規追加教示用欠陥描画部514は、前述のステップS140の処理を行なう機能を有する。   The newly added teaching defect drawing unit 514 has a function of performing the process of step S140 described above.

教示用画像生成完了判定部516は、前述のステップS150の処理を行なう機能を有する。   The teaching image generation completion determination unit 516 has a function of performing the process of step S150 described above.

記憶部520は、新規欠陥追加教示用画像生成処理により新規欠陥追加教示用画像を記憶する教示用画像記憶部として動作する。   The storage unit 520 operates as a teaching image storage unit that stores a new defect addition teaching image by the new defect addition teaching image generation processing.

以上説明したように、本実施の形態では、検査対象物650を撮像した教示用原画像から追加元教示用欠陥を決定し、追加元教示用欠陥の特徴量を変化させた新規追加教示用欠陥を、教示用原画像に追加した新規欠陥追加教示用画像を生成する。したがって、新規欠陥追加教示用画像は、人為的に教示用原画像に新規追加教示用欠陥を描画して追加する場合と比較して、より実環境における欠陥の特徴量を反映した新規追加教示用欠陥が配置された画像となるという効果を奏する。   As described above, in the present embodiment, a new additional teaching defect in which the additional source teaching defect is determined from the teaching original image obtained by imaging the inspection object 650 and the feature amount of the additional source teaching defect is changed. Is added to the teaching original image, and a new defect adding teaching image is generated. Therefore, the new defect addition teaching image is for the new additional teaching that reflects the feature amount of the defect in the actual environment, as compared to the case where the new additional teaching defect is artificially drawn and added to the original teaching image. There is an effect that an image in which defects are arranged is obtained.

また、本実施の形態では、1枚の教示用原画像上に複数の新規追加教示用欠陥を追加する。したがって、1つの新規追加教示用欠陥を配置した画像を、複数作成して、記憶部520に記憶させておく必要がないため、記憶部520へのアクセス時間を短縮できるという効果を奏する。   In the present embodiment, a plurality of newly added teaching defects are added on one teaching original image. Therefore, since it is not necessary to create a plurality of images in which one new additional teaching defect is arranged and store it in the storage unit 520, the access time to the storage unit 520 can be shortened.

また、複数の新規追加教示用欠陥が配置された画像を記憶部520に記憶させることで、記憶部520の使用する記憶領域を少なくすることができ、結果としてコストダウンを実現することが可能となるという効果を奏する。   In addition, by storing an image in which a plurality of new additional teaching defects are arranged in the storage unit 520, the storage area used by the storage unit 520 can be reduced, and as a result, cost reduction can be realized. The effect of becoming.

また、新規追加教示用欠陥の描画位置を、教示用原画像内の追加元教示用欠陥の重心位置を中心にして探索することにより決定する。これにより、新規追加教示用欠陥の描画位置が、追加元教示用欠陥の重心位置の近い位置に決定された場合、新規追加教示用欠陥の欠陥背景領域は、追加元教示用欠陥の欠陥背景領域と似通ったものとなる。したがって、検査対象の場所に依存する欠陥の出現性を反映することが可能となるという効果を奏する。   Further, the drawing position of the newly added teaching defect is determined by searching around the position of the center of gravity of the additional source teaching defect in the original teaching image. Thus, when the drawing position of the new additional teaching defect is determined to be close to the position of the center of gravity of the additional original teaching defect, the defect background area of the new additional teaching defect is the defect background area of the additional original teaching defect. It will be similar to Therefore, there is an effect that it is possible to reflect the appearance of the defect depending on the location to be inspected.

また、追加元教示用欠陥の濃度値を変更した新規追加教示用欠陥を生成する場合、新規追加教示用欠陥の平均濃度値と、追加元教示用欠陥の平均濃度値との差分のオフセットを新規追加教示用欠陥の画素に加算または減算する。   In addition, when a new additional teaching defect in which the density value of the additional source teaching defect is changed is generated, an offset of a difference between the average density value of the new additional teaching defect and the average density value of the additional source teaching defect is newly set. Addition or subtraction to additional teaching defect pixels.

すなわち、追加元教示用欠陥の濃度分布形状を保持したまま濃度軸に沿って平行移動したものが、新規追加教示用欠陥の濃度分布形状となる。したがって、追加元教示用欠陥の濃度分布と同じ濃度分布であるが面積や出現位置が異なる新規追加教示用欠陥を作成することができる。   That is, the density distribution shape of the newly added teaching defect is the one that is translated along the density axis while maintaining the density distribution shape of the additional source teaching defect. Therefore, a new additional teaching defect having the same density distribution as that of the additional source teaching defect but having a different area and appearance position can be created.

その結果、人為的に教示用原画像に新規追加教示用欠陥を追加する場合と比較して、より実環境における欠陥の特徴量を反映した新規追加教示用欠陥を教示用原画像に追加することができるという効果を奏する。   As a result, compared to the case where a new additional teaching defect is artificially added to the teaching original image, a new additional teaching defect reflecting the feature amount of the defect in the actual environment is added to the teaching original image. There is an effect that can be.

<第2の実施の形態>
本実施の形態では、第1の実施の形態よりも、より学習に適した新規欠陥追加教示用画像を生成する処理について説明する。以下においては、学習に適した新規欠陥追加教示用画像を生成する処理を、新規欠陥追加教示用画像生成処理Aとも称する。
<Second Embodiment>
In the present embodiment, a process for generating a new defect addition teaching image more suitable for learning than in the first embodiment will be described. Hereinafter, the process of generating a new defect addition teaching image suitable for learning is also referred to as a new defect addition teaching image generation process A.

図13は、本実施の形態における教示用画像生成装置500Aの内部の構成を示すブロック図である。   FIG. 13 is a block diagram showing an internal configuration of teaching image generation apparatus 500A in the present embodiment.

図13を参照して、教示用画像生成装置500Aは、教示用画像生成装置500と比較して、記録媒体555の代わりに記録媒体555Aにデータアクセスする点と、記憶部520に、教示用画像生成プログラム180の代わりに教示用画像生成プログラム180Aが記録されている点と、記録媒体555Aに教示用画像生成プログラム180Aが記録されている点とが異なる。それ以外の構成および機能は教示用画像生成装置500と同様なので詳細な説明は繰り返さない。   Referring to FIG. 13, teaching image generation apparatus 500 </ b> A has data access to recording medium 555 </ b> A instead of recording medium 555 as compared with teaching image generation apparatus 500, and teaching image is stored in storage unit 520. A difference is that a teaching image generation program 180A is recorded instead of the generation program 180 and a teaching image generation program 180A is recorded on the recording medium 555A. Since other configurations and functions are the same as those of teaching image generation apparatus 500, detailed description will not be repeated.

図14は、新規欠陥追加教示用画像生成処理Aのフローチャートである。
図14を参照して、新規欠陥追加教示用画像生成処理Aは図5の新規欠陥追加教示用画像生成処理と比較して、ステップS102と、ステップS104との処理の間にステップS103Aの処理が行なわれる点と、ステップS112の代わりにステップS112Aの処理が行なわれる点と、ステップS114の代わりにステップS114Aの処理が行なわれる点と、ステップS120の代わりにステップS120Aの処理が行なわれる点と、ステップS122の代わりにステップS122Aの処理が行なわれる点とが異なる。それ以外の処理は、新規欠陥追加教示用画像生成処理と同様なので詳細な説明は繰り返さない。
FIG. 14 is a flowchart of the image generation process A for new defect addition teaching.
Referring to FIG. 14, the new defect addition teaching image generation process A is different from the new defect addition teaching image generation process of FIG. 5 in that the process of step S103A is performed between the processes of step S102 and step S104. A point that is performed, a point that the process of step S112A is performed instead of step S112, a point that the process of step S114A is performed instead of step S114, a point that the process of step S120A is performed instead of step S120, The difference is that the process of step S122A is performed instead of step S122. Since the other processes are the same as the new defect addition teaching image generation process, detailed description will not be repeated.

なお、新規欠陥追加教示用画像生成処理AのステップS100において読み出した教示用原画像は、たとえば、図4の教示用原画像700であるとする。   It is assumed that the teaching original image read in step S100 of the new defect addition teaching image generation process A is, for example, the teaching original image 700 of FIG.

新規欠陥追加教示用画像生成処理Aでは、ステップS102の処理の後、ステップS103Aに進む。   In the new defect addition teaching image generation process A, the process proceeds to step S103A after the process of step S102.

ステップS103Aでは、欠陥判定処理が行なわれる。欠陥判定処理では、制御部510が、ステップS100で読み出した教示用原画像700中の欠陥が、真欠陥または擬似欠陥のいずれであるかを判定する。   In step S103A, a defect determination process is performed. In the defect determination processing, control unit 510 determines whether the defect in teaching original image 700 read in step S100 is a true defect or a pseudo defect.

具体的には、ユーザが、表示部530に表示された教示用原画像700を参照して、教示用原画像700内の欠陥を真欠陥または擬似欠陥のいずれかに設定する。当該設定は、ユーザが、マウス542またはキーボード544等の入力装置を利用して、制御部510に指示を与えることで行なわれる。   Specifically, the user refers to the teaching original image 700 displayed on the display unit 530 and sets the defect in the teaching original image 700 to either a true defect or a pseudo defect. The setting is performed by the user giving an instruction to the control unit 510 using an input device such as the mouse 542 or the keyboard 544.

制御部510は、当該指示に基づいて、前述の欠陥判定処理を行なう。本実施の形態では、教示用原画像700の欠陥720が真欠陥に設定され、欠陥710が擬似欠陥に設定されたとする。以下においては、当該欠陥の設定情報を示すデータを欠陥設定データとも称する。欠陥設定データは、制御部510が、記憶部520に記憶させる。   Control unit 510 performs the above-described defect determination process based on the instruction. In the present embodiment, it is assumed that the defect 720 of the teaching original image 700 is set as a true defect and the defect 710 is set as a pseudo defect. Hereinafter, data indicating the setting information of the defect is also referred to as defect setting data. The defect setting data is stored in the storage unit 520 by the control unit 510.

ステップS112Aでは、新規追加欠陥数決定処理Aが行なわれる。新規追加欠陥数決定処理Aでは、ステップS104において選択した追加元教示用欠陥(真欠陥720および擬似欠陥710)の各々に対し、追加元教示用欠陥のどの特徴量をどの程度変化させた欠陥を教示用原画像700に新たに追加するのかを決定することで追加する欠陥の数を決定する処理が行なわれる。当該処理は、記憶部520に記憶された新規追加教示用欠陥の数を設定するための特徴量変化設定データを制御部510が読み出して行なう。   In step S112A, a newly added defect count determination process A is performed. In the new additional defect number determination process A, a defect in which which feature amount of the additional source teaching defect is changed to how much is added to each of the additional source teaching defect (true defect 720 and pseudo defect 710) selected in step S104. Processing for determining the number of defects to be added is performed by determining whether to newly add to the teaching original image 700. The processing is performed by the control unit 510 reading out the feature amount change setting data for setting the number of newly added teaching defects stored in the storage unit 520.

本実施の形態における特徴量変化設定データは、追加元教示用欠陥が真欠陥である場合、追加元教示用欠陥の面積を減少させた新規追加教示用欠陥の数を特定するためのデータである。   The feature amount change setting data in the present embodiment is data for specifying the number of new additional teaching defects in which the area of the additional source teaching defect is reduced when the additional source teaching defect is a true defect. .

また、特徴量変化設定データは、追加元教示用欠陥が擬似欠陥である場合、追加元教示用欠陥の面積を増加させた新規追加教示用欠陥の数を特定するためのデータである。   The feature amount change setting data is data for specifying the number of new additional teaching defects in which the area of the additional source teaching defect is increased when the additional source teaching defect is a pseudo defect.

ここで、特徴量変化設定データは、真欠陥である追加元教示用欠陥に対しては、変化させる特徴量が、面積のみであって、たとえば、当該面積を10,20%それぞれ減少させるデータである。したがって、真欠陥としての新規追加教示用欠陥の数は2つとなる。   Here, the feature amount change setting data is data for reducing only the area of the additional source teaching defect that is a true defect, for example, by reducing the area by 10, 20%, respectively. is there. Therefore, the number of new additional teaching defects as true defects is two.

また、特徴量変化設定データは、擬似欠陥である追加元教示用欠陥に対しては、変化させる特徴量が、面積のみであって、たとえば、当該面積を10,20%それぞれ増加させるデータでもある。したがって、擬似欠陥としての新規追加教示用欠陥の数は2つとなる。   In addition, the feature amount change setting data is data that increases the feature amount only for the area, for example, by 10% or 20% for the additional source teaching defect that is a pseudo defect. . Therefore, the number of new additional teaching defects as pseudo defects is two.

具体的には、制御部510は、記憶部520から欠陥設定データを読出し、真欠陥および擬似欠陥の数を認識し、特徴量変化設定データに基づいて、新規追加教示用欠陥の数を決定する。本実施の形態においては、欠陥設定データは、1つの真欠陥と、1つの擬似欠陥の情報を示すので、制御部510は、前述の特徴量変化設定データに基づいて、真欠陥としての新規追加教示用欠陥の数を2つに決定し、擬似欠陥としての新規追加教示用欠陥の数を2つに決定する。制御部510は、決定した欠陥の数の情報を記憶部520に記憶させる。なお、欠陥設定データは、1つの真欠陥と、1つの擬似欠陥の情報を示すデータに限定されることはない。欠陥設定データは、たとえば、2つ以上の真欠陥と、2つ以上の擬似欠陥の情報を示すデータであってもよい。すなわち、欠陥設定データは、ステップS100により読み出された教示用原画像に応じて変わる。   Specifically, control unit 510 reads defect setting data from storage unit 520, recognizes the number of true defects and pseudo defects, and determines the number of new additional teaching defects based on the feature amount change setting data. . In the present embodiment, since the defect setting data indicates information on one true defect and one pseudo defect, the control unit 510 adds a new defect as a true defect based on the above-described feature amount change setting data. The number of teaching defects is determined to be two, and the number of newly added teaching defects as pseudo defects is determined to be two. The control unit 510 causes the storage unit 520 to store information on the determined number of defects. The defect setting data is not limited to data indicating information on one true defect and one pseudo defect. The defect setting data may be data indicating information on two or more true defects and two or more pseudo defects, for example. That is, the defect setting data changes according to the teaching original image read out in step S100.

ステップS114Aでは、新規追加教示用欠陥リスト作成処理Aが行なわれる。新規追加教示用欠陥リスト作成処理Aでは、制御部510が、ステップS110により算出された欠陥の面積に基づいて、面積が大きい欠陥から、追加元教示用欠陥ID1,2を割り当てる。真欠陥720は、擬似欠陥710よりも大きいので、真欠陥720および擬似欠陥710にそれぞれ、追加元教示用欠陥ID1,2が割り当てられる。   In step S114A, a newly added teaching defect list creation process A is performed. In the new additional teaching defect list creation process A, the control unit 510 assigns additional source teaching defects ID 1 and 2 from defects having a large area based on the defect area calculated in step S110. Since the true defect 720 is larger than the pseudo defect 710, the additional source teaching defects ID 1 and 2 are assigned to the true defect 720 and the pseudo defect 710, respectively.

次に、制御部510が、ステップS112Aで読み出された特徴量変化設定データおよび追加する欠陥の数に基づいて、全新規追加教示用欠陥について、新規追加教示用欠陥IDを、たとえば、1〜4まで割り当てて、新規追加教示用欠陥リストテーブルを作成する。作成された新規追加教示用欠陥リストテーブルは、制御部510が、記憶部520に記憶させる。   Next, based on the feature amount change setting data read in step S112A and the number of defects to be added, control unit 510 assigns new additional teaching defect IDs, for example, 1 to Allocate up to 4, and create a new additional teaching defect list table. The newly added teaching defect list table is stored in the storage unit 520 by the control unit 510.

図15は、一例としての新規追加教示用欠陥リストテーブルT200を示す図である。
図15を参照して、新規追加教示用欠陥リストテーブルT200は、追加元教示用欠陥ID1,ID2がそれぞれ割り当てられた2つの追加元教示用欠陥の各々に対し追加する欠陥の数が2つである場合のリストを示す。
FIG. 15 is a diagram showing a newly added teaching defect list table T200 as an example.
Referring to FIG. 15, new additional teaching defect list table T200 has two defects added to each of two additional source teaching defects assigned with additional source teaching defects ID1 and ID2, respectively. Here is a list of cases.

再び、図14を参照して、ステップS114Aの処理の後、ステップS120Aに進む。   Referring to FIG. 14 again, after the process of step S114A, the process proceeds to step S120A.

ステップS120Aでは、制御部510が、新規追加教示用欠陥リストテーブルT200から読み出すデータを特定するためのカウンタkを“1”に設定する。その後、ステップS122Aに進む。   In step S120A, control unit 510 sets counter k for specifying data to be read from newly added teaching defect list table T200 to “1”. Thereafter, the process proceeds to step S122A.

ステップS122Aでは、制御部510が、カウンタkに対応した新規追加教示用欠陥データを記憶部520から読み出す。カウンタkが、たとえば、“1”である場合、制御部510は、新規追加教示用欠陥リストテーブルT200の新規追加教示用欠陥IDが“1”に対応する新規追加教示用欠陥データを記憶部520から読み出す。   In step S122A, control unit 510 reads out newly added teaching defect data corresponding to counter k from storage unit 520. When the counter k is, for example, “1”, the control unit 510 stores the newly added teaching defect data corresponding to the newly added teaching defect ID “1” in the newly added teaching defect list table T200. Read from.

そして、図5の新規欠陥追加教示用画像生成処理と同様に、ステップS122A,S130,S140,S152の処理が、ステップS150の条件を満足するまで繰り返されることにより、新規欠陥追加教示用画像が生成される。   Then, similarly to the new defect addition teaching image generation processing of FIG. 5, the processing of steps S122A, S130, S140, and S152 is repeated until the condition of step S150 is satisfied, thereby generating a new defect addition teaching image. Is done.

図16は、本実施の形態で生成された新規欠陥追加教示用画像700Bを示す図である。   FIG. 16 is a diagram showing a new defect addition teaching image 700B generated in the present embodiment.

図16を参照して、新規欠陥追加教示用画像700Bには、追加元教示用欠陥としての真欠陥720に対し、面積を10,20%それぞれ減少させた、真欠陥としての新規追加教示用欠陥722、724が配置される。また、新規欠陥追加教示用画像700Bには、追加元教示用欠陥としての擬似欠陥710に対し、面積を10,20%それぞれ増加させた、擬似欠陥としての新規追加教示用欠陥712、714が配置される。   Referring to FIG. 16, new defect addition teaching image 700 </ b> B has a new additional teaching defect as a true defect in which the area is reduced by 10, 20% with respect to true defect 720 as an addition source teaching defect, respectively. 722, 724 are arranged. Further, in the new defect addition teaching image 700B, new additional teaching defects 712 and 714 as pseudo defects, which are respectively increased by 10% and 20% with respect to the pseudo defect 710 as the additional source teaching defect, are arranged. Is done.

なお、前述したステップS136Aにおいて、制御部510が、追加教示用欠陥に対応する欠陥領域のコントラストが、追加元教示用欠陥に対応する欠陥領域のコントラストとほぼ等しくなるように、新規追加教示用欠陥平均濃度値を変化させる処理を行なったとする。   In step S136A described above, control unit 510 causes new additional teaching defect so that the contrast of the defect area corresponding to the additional teaching defect is substantially equal to the contrast of the defect area corresponding to the additional source teaching defect. It is assumed that processing for changing the average density value is performed.

新規追加教示用欠陥724の新規追加教示用欠陥背景領域平均濃度値は、追加元教示用欠陥としての真欠陥720の背景領域の平均濃度値よりも高い。したがって、新規追加教示用欠陥平均濃度値を変化させる処理により、前述の新規追加教示用欠陥724の平均濃度値は、真欠陥720の平均濃度値より高く設定される。   The new additional teaching defect background area average density value of the new additional teaching defect 724 is higher than the average density value of the background area of the true defect 720 as the additional source teaching defect. Therefore, the average density value of the new additional teaching defect 724 is set higher than the average density value of the true defect 720 by the process of changing the new additional teaching defect average density value.

新規追加教示用欠陥714も、新規追加教示用欠陥724と同様に設定される。
以上説明したように、本実施の形態では、追加元教示用欠陥が真欠陥である場合、追加元教示用欠陥の面積を減少させた新規追加教示用欠陥を生成する。追加元教示用欠陥が擬似欠陥である場合、追加元教示用欠陥の面積を増加させた新規追加教示用欠陥を生成する。
The new additional teaching defect 714 is set in the same manner as the new additional teaching defect 724.
As described above, in the present embodiment, when the additional source teaching defect is a true defect, a new additional teaching defect in which the area of the additional source teaching defect is reduced is generated. If the additional source teaching defect is a pseudo defect, a new additional teaching defect in which the area of the additional source teaching defect is increased is generated.

したがって、新規欠陥追加教示用画像を学習させるアルゴリズムに対し、真欠陥は小さくなればなるほど検出しにくく、擬似欠陥は大きくなればなるほど検出してはいけないのに検出してしまうという問題を反映させることができる。すなわち、より学習に適した教示用画像としての新規欠陥追加教示用画像を生成することができるという効果を奏する。   Therefore, reflect the problem that the true defect becomes harder to detect as the defect becomes smaller, and the false defect should not be detected as the defect becomes larger, in the algorithm for learning the new defect addition teaching image. Can do. That is, it is possible to generate a new defect addition teaching image as a teaching image more suitable for learning.

また、本実施の形態によれば、教示用画像として必要性の低い大きい真欠陥や小さい擬似欠陥である新規追加教示用欠陥を追加することがないので、教示用画像作成に要する時間を短縮することができるという効果を奏する。   In addition, according to the present embodiment, since there is no need to add a new additional teaching defect, which is a large true defect or a small pseudo defect, which is not necessary as a teaching image, the time required for creating the teaching image is shortened. There is an effect that can be.

<第3の実施の形態>
第1および第2の実施の形態の新規欠陥追加教示用画像生成処理または新規欠陥追加教示用画像生成処理Aでは、教示用原画像の追加元教示用欠陥を利用して、教示用原画像に新規欠陥追加教示用画像を追加していた。本実施の形態では、教示用原画像が真欠陥が存在する欠陥画像である場合、新たに画像データを読み込んで、当該読み込んだ画像に対し、新規欠陥追加教示用画像を追加する処理について説明する。以下においては、当該処理を新規欠陥追加教示用画像生成処理Bとも称する。
<Third Embodiment>
In the new defect addition teaching image generation processing or the new defect addition teaching image generation processing A of the first and second embodiments, the teaching original image is converted into the teaching original image using the additional source teaching defect of the teaching original image. A new defect addition teaching image was added. In the present embodiment, when the teaching original image is a defect image in which a true defect exists, processing for newly reading image data and adding a new defect addition teaching image to the read image will be described. . Hereinafter, this process is also referred to as a new defect addition teaching image generation process B.

図17は、本実施の形態における教示用画像生成装置500Bの内部の構成を示すブロック図である。   FIG. 17 is a block diagram showing an internal configuration of teaching image generation apparatus 500B in the present embodiment.

図17を参照して、教示用画像生成装置500Bは、図1の教示用画像生成装置500と比較して、記録媒体555の代わりに記録媒体555Bにデータアクセスする点と、記憶部520に、教示用画像生成プログラム180の代わりに教示用画像生成プログラム180Bが記録されている点と、記録媒体555Bに教示用画像生成プログラム180Bが記録されている点とが異なる。それ以外の構成および機能は教示用画像生成装置500と同様なので詳細な説明は繰り返さない。   Referring to FIG. 17, teaching image generation apparatus 500B performs data access to recording medium 555B instead of recording medium 555 as compared with teaching image generation apparatus 500 in FIG. The difference is that the teaching image generation program 180B is recorded instead of the teaching image generation program 180 and the teaching image generation program 180B is recorded on the recording medium 555B. Since other configurations and functions are the same as those of teaching image generation apparatus 500, detailed description will not be repeated.

図18は、新規欠陥追加教示用画像生成処理Bのフローチャートである。
図18を参照して、ステップS300では、図5のステップS100と同様に、制御部510が、教示用原画像データを読み出す。読み出した教示用原画像は、たとえば、図4の教示用原画像700であるとする。その後、ステップS302に進む。
FIG. 18 is a flowchart of the new defect addition teaching image generation process B.
Referring to FIG. 18, in step S300, as in step S100 of FIG. 5, control unit 510 reads teaching original image data. Assume that the read teaching original image is, for example, the teaching original image 700 of FIG. Thereafter, the process proceeds to step S302.

ステップS302では、ステップS102と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS303に進む。   In step S302, processing similar to that in step S102 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S303.

ステップS303では、ステップS103Aと同様に欠陥判定処理が行なわれる。すなわち、制御部510が、教示用原画像700中の欠陥が、真欠陥または擬似欠陥のいずれであるかを判定する。当該判定の具体的な処理は、ステップS103Aと同様なので詳細な説明は繰り返さない。   In step S303, defect determination processing is performed as in step S103A. That is, control unit 510 determines whether a defect in teaching original image 700 is a true defect or a pseudo defect. Since the specific process of the determination is the same as that in step S103A, detailed description will not be repeated.

次に、制御部510は、教示用原画像700中に真欠陥があると判定すると、その教示用原画像を欠陥画像と判定する。一方、制御部510は、教示用原画像700中に擬似欠陥があっても、真欠陥がないと判定すると、その教示用原画像を良品画像と判定する。制御部510は、教示用原画像が、欠陥画像または良品画像のいずれかである情報を示す画像判定データと、欠陥設定データとを、記憶部520に記憶させる。その後、ステップS310に進む。   Next, when controller 510 determines that there is a true defect in teaching original image 700, controller 510 determines that the teaching original image is a defective image. On the other hand, if controller 510 determines that there is no true defect even if there is a pseudo defect in teaching original image 700, controller 510 determines that the teaching original image is a non-defective image. Control unit 510 causes storage unit 520 to store image determination data indicating information that the teaching original image is either a defect image or a non-defective image, and defect setting data. Thereafter, the process proceeds to step S310.

ステップS310では、制御部510が、ステップS300で読み込んだ教示用原画像がステップS303の処理により欠陥画像であるか否かを判定する。ステップS310において、YESならば、ステップS312に進む。一方、ステップS310において、NOならば、ステップS314に進む。   In step S310, control unit 510 determines whether or not the teaching original image read in step S300 is a defective image by the process in step S303. If YES in step S310, the process proceeds to step S312. On the other hand, if NO at step S310, the process proceeds to step S314.

ステップS312では、新規欠陥追加用画像のデータを入力する。具体的には、制御部510が、図5のステップS100と同様に、教示用原画像データを新たに読み出す。以下においては、この処理において、新たに読み出した教示用原画像データに基づく教示用原画像を新規欠陥追加用画像とも称する。   In step S312, new defect addition image data is input. Specifically, control unit 510 newly reads teaching original image data in the same manner as step S100 in FIG. Hereinafter, in this process, the teaching original image based on the newly read teaching original image data is also referred to as a new defect adding image.

図19は、本実施の形態における新規欠陥追加用画像および新規欠陥追加教示用画像を示す。   FIG. 19 shows a new defect addition image and a new defect addition teaching image in the present embodiment.

図19(A)は、ステップS312の処理で読み出された新規欠陥追加用画像800を示す図である。新規欠陥追加用画像800は、一例として、擬似欠陥810はあるものの、真欠陥はない、良品画像であるとする。   FIG. 19A is a diagram showing a new defect addition image 800 read out in the process of step S312. As an example, it is assumed that the new defect addition image 800 is a non-defective image having pseudo defects 810 but no true defects.

図19(B)は、新規欠陥追加教示用画像生成処理Bにより生成された新規欠陥追加教示用画像800Aを示す図である。   FIG. 19B is a diagram showing a new defect addition teaching image 800A generated by the new defect addition teaching image generation processing B.

再び、図18を参照して、ステップS312の処理の後、ステップS313に進む。
ステップS313では、教示用原画像としての新規欠陥追加用画像に対し、ステップS303と同様な欠陥判定処理が行なわれる。すなわち、制御部510は、新規欠陥追加用画像を欠陥画像または良品画像のいずれであるかを判定する。そして、制御部510は、新規欠陥追加用画像が、欠陥画像または良品画像のいずれかである情報を示す画像判定データと、欠陥設定データとを、記憶部520に記憶させる。その後、ステップS314に進む。
Referring to FIG. 18 again, after the process of step S312, the process proceeds to step S313.
In step S313, defect determination processing similar to that in step S303 is performed on the new defect addition image as the teaching original image. That is, control unit 510 determines whether the new defect addition image is a defect image or a non-defective image. Then, control unit 510 causes storage unit 520 to store image determination data indicating information that the new defect addition image is either a defect image or a non-defective image, and defect setting data. Thereafter, the process proceeds to step S314.

ステップS314では、ステップS104と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS316に進む。   In step S314, the same processing as in step S104 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S316.

ステップS316では、ステップS106と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS318に進む。   In step S316, processing similar to that in step S106 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S318.

ステップS318では、ステップS108と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS320に進む。   In step S318, the same processing as in step S108 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S320.

ステップS320では、ステップS110と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS322に進む。   In step S320, the same processing as in step S110 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S322.

ステップS322では、ステップS112Aと同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS324に進む。   In step S322, processing similar to that in step S112A is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S324.

ステップS324では、ステップS114Aと同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS330に進む。   In step S324, the same processing as in step S114A is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S330.

ステップS330では、ステップS120Aと同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS332に進む。   In step S330, the same process as in step S120A is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S332.

ステップS332では、ステップS122Aと同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS334に進む。   In step S332, the same processing as in step S122A is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S334.

ステップS334では、ステップS313の処理により判定された新規欠陥追加用画像に対応する画像判定データに基づいて、新規欠陥追加用画像が、良品画像であるか否かを判定する。ステップS334において、YESならば、ステップS340に進む。一方、ステップS334において、NOならば、ステップS336に進む。   In step S334, based on the image determination data corresponding to the new defect addition image determined in step S313, it is determined whether or not the new defect addition image is a non-defective image. If YES at step S334, the process proceeds to step S340. On the other hand, if NO at step S334, the process proceeds to step S336.

ステップS336では、ステップS130と同様な処理が行なわれるので詳細な説明は繰り返さない。その後、ステップS340に進む。   In step S336, the same processing as in step S130 is performed, and thus detailed description will not be repeated. Thereafter, the process proceeds to step S340.

ステップS340では、新規追加教示用欠陥描画処理Bが行なわれる。新規追加教示用欠陥描画処理Bでは、ステップS334の処理により、新規欠陥追加用画像が良品画像であると判定された場合、制御部510およびVDP532の処理により、表示部530に表示させる画像データを記憶するためのVRAM536に、新規欠陥追加用画像800が描画される(図19(A)参照)。そして、制御部510およびVDP532の処理により、VRAM536上の、ステップS320で算出された教示用原画像700の真欠陥720の重心位置に、教示用原画像700の真欠陥720と同じ新規追加教示用欠陥820が描画される(図19(B)参照)。   In step S340, a new additional teaching defect drawing process B is performed. In the new additional teaching defect rendering process B, if it is determined in step S334 that the new defect adding image is a non-defective image, image data to be displayed on the display unit 530 is processed by the control unit 510 and the VDP 532. The new defect addition image 800 is drawn in the VRAM 536 for storing (see FIG. 19A). Then, by the processing of the control unit 510 and the VDP 532, the same additional position for the new defect 720 as the true defect 720 of the original image 700 for teaching is placed on the center of gravity of the true defect 720 of the original image 700 for teaching calculated in step S320 on the VRAM 536. A defect 820 is drawn (see FIG. 19B).

なお、新規追加教示用欠陥描画処理Bでは、ステップS334の処理により、新規欠陥追加用画像が欠陥画像であると判定された場合、ステップS140の処理と同様に、制御部510およびVDP532の処理により、VRAM536に、教示用原画像700が描画される。そして、さらに、制御部510およびVDP532の処理により、VRAM536上の、ステップS336の新規追加欠陥描画位置決定処理により決定された新規追加教示用欠陥の描画位置に、ステップS133Bで生成された追加教示用欠陥を描画する。その後、ステップS350に進む。   In addition, in the new additional teaching defect rendering process B, when it is determined in step S334 that the new defect addition image is a defect image, the control unit 510 and the VDP 532 perform the same process as in step S140. The teaching original image 700 is drawn in the VRAM 536. Further, by the processing of the controller 510 and the VDP 532, the additional teaching defect generated in step S133B is generated on the VRAM 536 at the drawing position of the new additional teaching defect determined in step S336. Draw the defect. Thereafter, the process proceeds to step S350.

ステップS350では、制御部510が、ステップS322の処理で決定された新規追加元教示用欠陥の数と、ステップS340で描画した新規追加教示用欠陥の数とが等しいか否かを判定する。ステップS350において、YESならば、ステップS360に進む。一方、ステップS350において、NOならば、ステップS352に進む。   In step S350, control unit 510 determines whether or not the number of newly added source teaching defects determined in step S322 is equal to the number of newly added teaching defects drawn in step S340. If YES in step S350, the process proceeds to step S360. On the other hand, if NO at step S350, the process proceeds to step S352.

ステップS352では、制御部510が、カウンタkを“1”インクリメントする。その後、再度、ステップS332の処理が行なわれる。   In step S352, control unit 510 increments counter k by “1”. Thereafter, the process of step S332 is performed again.

ステップS360では、制御部510が、VRAM536に記憶された画像データ(新規欠陥追加教示用画像のデータ)を、記憶部520に記憶させる。そして、この新規欠陥追加教示用画像生成処理Bは終了する。   In step S360, control unit 510 causes storage unit 520 to store the image data (new defect addition teaching image data) stored in VRAM 536. Then, the new defect addition teaching image generation process B ends.

以上説明した新規欠陥追加教示用画像生成処理Bにより新規欠陥追加教示用画像が生成される。   A new defect addition teaching image is generated by the new defect addition teaching image generation process B described above.

再び、図19を参照して、本実施の形態では、ステップS312の処理で読み込んだ新規欠陥追加用画像は、良品画像である新規欠陥追加用画像800あるので、新規欠陥追加教示用画像生成処理Bにより新規欠陥追加教示用画像800Aが生成される。   Referring to FIG. 19 again, in the present embodiment, the new defect addition image read in the process of step S312 is a new defect addition image 800 that is a non-defective image. Therefore, a new defect addition teaching image generation process is performed. By B, a new defect addition teaching image 800A is generated.

以上説明したように、本実施の形態では、入力した最初の教示用原画像が欠陥画像である場合、教示用原画像データを新たに読み出し、新規欠陥追加用画像とする。そして、新規欠陥追加用画像が良品画像である場合、新規欠陥追加用画像内における、最初の教示用原画像の真欠陥の重心位置と対応する位置に、最初の教示用原画像の真欠陥と同じ新規追加教示用欠陥を追加した新規欠陥追加教示用画像を生成する。   As described above, in the present embodiment, when the first input teaching original image is a defect image, the teaching original image data is newly read out and used as a new defect adding image. If the new defect addition image is a non-defective image, the true defect of the first teaching original image is located at the position corresponding to the center of gravity of the true defect of the first teaching original image in the new defect adding image. A new defect addition teaching image to which the same new additional teaching defect is added is generated.

したがって、新規欠陥追加教示用画像は、最初の教示用原画像の追加元教示用欠陥と背景が同じ環境での欠陥の面積やコントラスト変動を再現することが可能となるという効果を奏する。   Therefore, the new defect additional teaching image has an effect that it is possible to reproduce the defect area and contrast variation in the environment where the background is the same as the additional source teaching defect of the first teaching original image.

なお、新規欠陥追加用画像が真欠陥を有する欠陥画像である場合で、かつ、新規欠陥追加用画像の追加元教示用欠陥の重心位置が、新規追加教示用欠陥の描画位置と同じとなった場合、追加元教示用欠陥と、新規追加教示用欠陥とが重なるので新規追加教示用欠陥を新規欠陥追加用画像に描画ができない。   In addition, when the image for new defect addition is a defect image having a true defect, and the center of gravity position of the defect for original addition of the image for new defect addition is the same as the drawing position of the defect for new additional teaching. In this case, since the additional source teaching defect and the new additional teaching defect overlap, the new additional teaching defect cannot be drawn on the new defect adding image.

しかし、新規欠陥追加用画像が良品画像である場合には、上記のような問題はなく、新規追加教示用欠陥を教示用原画像としての新規欠陥追加用画像に描画することができるという効果を奏する。   However, when the new defect addition image is a non-defective image, there is no problem as described above, and the effect of being able to draw the new additional teaching defect on the new defect adding image as the teaching original image. Play.

<第4の実施の形態>
次に、前述の第1〜第3の実施の形態の処理により生成された教示用画像としての新規欠陥追加教示用画像を学習アルゴリズムに学習させ、画像処理アルゴリズムを生成する画像処理アルゴリズム生成処理について説明する。
<Fourth embodiment>
Next, an image processing algorithm generation process for generating an image processing algorithm by causing a learning algorithm to learn a new defect addition teaching image as a teaching image generated by the processing of the first to third embodiments described above. explain.

図20は、本実施の形態における画像処理アルゴリズム生成装置500Cの内部の構成を示すブロック図である。   FIG. 20 is a block diagram showing an internal configuration of image processing algorithm generation apparatus 500C in the present embodiment.

図20を参照して、画像処理アルゴリズム生成装置500Cは、図1の教示用画像生成装置500と比較して、記録媒体555の代わりに記録媒体555Cにデータアクセスする点と、記憶部520に、教示用画像生成プログラム180の代わりに画像処理アルゴリズム生成プログラム180Cが記録されている点と、記録媒体555Cに画像処理アルゴリズム生成プログラム180Cが記録されている点とが異なる。それ以外の構成および機能は教示用画像生成装置500と同様なので詳細な説明は繰り返さない。以上の構成の画像処理アルゴリズム生成装置500Cにより、画像処理アルゴリズムが生成される。   Referring to FIG. 20, image processing algorithm generation apparatus 500 </ b> C has data access to recording medium 555 </ b> C instead of recording medium 555 as compared with teaching image generation apparatus 500 of FIG. The difference is that the image processing algorithm generation program 180C is recorded instead of the teaching image generation program 180 and the image processing algorithm generation program 180C is recorded on the recording medium 555C. Since other configurations and functions are the same as those of teaching image generation apparatus 500, detailed description will not be repeated. An image processing algorithm is generated by the image processing algorithm generation apparatus 500C having the above configuration.

次に、画像処理アルゴリズム生成装置500Cにより画像処理アルゴリズムを生成するための処理について説明する。本実施の形態においては、画像処理フィルタの組合せを探索する組合せ最適化問題としてとらえ、進化的手法の一つである遺伝的アルゴリズムを用いて画像処理フィルタの組合せの最適化を行なう。すなわち、最適な画像処理フィルタの組合せ(局所解)を探索する。これらの画像処理フィルタの組合せである画像処理アルゴリズムを遺伝的アルゴリズムの1つの個体で表現する。以下においては、画像処理アルゴリズムを個体とも称する。   Next, processing for generating an image processing algorithm by the image processing algorithm generation apparatus 500C will be described. In the present embodiment, the combination of image processing filters is optimized by using a genetic algorithm, which is one of the evolutionary methods, as a combination optimization problem for searching for combinations of image processing filters. That is, the optimum combination of image processing filters (local solution) is searched. An image processing algorithm which is a combination of these image processing filters is expressed by one individual genetic algorithm. Hereinafter, the image processing algorithm is also referred to as an individual.

図21は、画像処理アルゴリズム生成処理のフローチャートである。
図21を参照して、ステップS400では、制御部510が、初期パラメータの設定を行なう。詳細は後述するが、初期パラメータには、N世代の個体数m、交叉確率Pc、突然変異確率Pm、終了条件、N+1世代に追加する優良個体数g1、N+1世代に追加するランダム生成個体数g2、N+1世代に追加するN世代の最良の個体を考慮した確率的生成個体数g3、N+1世代に追加するN世代の最良の個体を考慮した確率的生成時の確率変動割合、確率変動割合の変化率、1つの個体の画像処理フィルタ長の最大値L等がある。本実施の形態では、N世代の個体数mは、たとえば、“100”に設定されたとする。
FIG. 21 is a flowchart of image processing algorithm generation processing.
Referring to FIG. 21, in step S400, control unit 510 sets initial parameters. Although details will be described later, the initial parameters include the number m of the N generations, the crossover probability Pc, the mutation probability Pm, the termination condition, the number of excellent individuals g1 added to the N + 1 generation, and the number of randomly generated individuals added to the N + 1 generation g2. , Probabilistic generation number g3 considering N generation best individual added to N + 1 generation, Probability change rate at probability generation considering N generation best individual added to N + 1 generation, change of probability change rate Rate, the maximum value L of the image processing filter length of one individual, and the like. In the present embodiment, it is assumed that the number m of N generations is set to “100”, for example.

なお、上記パラメータでは、g1+g2+g3≦mが成立する。優良個体数g1、ランダム生成個体数g2、確率的生成個体数g3は、個体数mに対し、5%以下の個数であることが望ましい。   Note that g1 + g2 + g3 ≦ m holds for the above parameters. The number of excellent individuals g1, the number of randomly generated individuals g2, and the number of randomly generated individuals g3 are desirably 5% or less with respect to the number of individuals m.

本実施例における終了条件は、最良の個体の評価値が、所定値(たとえば、1000)以上となる条件、または、後述する世代交代処理を繰り返す回数が所定回数(たとえば、100回)となる条件である。その後、ステップS401の処理が行なわれる。   The end condition in the present embodiment is a condition that the evaluation value of the best individual is a predetermined value (for example, 1000) or more, or a condition that the number of times of repeating the generation change process described later is a predetermined number (for example, 100). It is. Thereafter, the process of step S401 is performed.

ステップS401では、制御部510が、最初(1世代)の画像処理アルゴリズムをランダムにm個生成する。本実施の形態では、画像処理アルゴリズムは、予め準備された複数種類の画像処理フィルタの組合せによるものである。   In step S401, control unit 510 randomly generates m first (one generation) image processing algorithms. In the present embodiment, the image processing algorithm is based on a combination of a plurality of types of image processing filters prepared in advance.

図22は、フィルタテーブルT300を示す。フィルタテーブルT300は、画像処理フィルタの種類を特定するためのフィルタIDと画像処理フィルタの対応付けを示す。フィルタID“1”,“2”,“3” ,“4” ,“5” ,“6”には、それぞれ、平滑化フィルタ、中間値フィルタ、最大値フィルタ、最小値フィルタ、Sobel(ゾーベル)フィルタおよびラプラシアンフィルタが対応付けられている。   FIG. 22 shows the filter table T300. The filter table T300 indicates a correspondence between a filter ID for specifying the type of the image processing filter and the image processing filter. The filter IDs “1”, “2”, “3”, “4”, “5”, “6” respectively include a smoothing filter, an intermediate value filter, a maximum value filter, a minimum value filter, and a Sobel. A filter and a Laplacian filter are associated with each other.

たとえば、平滑化フィルタは、注目画素とその近傍領域の画素の有する濃度値の平均値で注目画素の濃度値を置き換える処理を行なうフィルタである。また、平滑化フィルタの持つパラメータとしては、たとえば近傍領域を規定するパラメータ等がある。当該パラメータの値が、たとえば、“3”の場合は、フィルタサイズは3画素×3画素と規定される。この場合は注目画素とその近傍の8画素がフィルタ処理の対象となる。なお、平滑化フィルタ、中間値フィルタ、最大値フィルタが使用するフィルタサイズは、3画素×3画素に限定されることはなく任意のサイズ(たとえば、5画素×5画素)であってもよい。   For example, the smoothing filter is a filter that performs a process of replacing the density value of the target pixel with the average value of the density values of the target pixel and pixels in the vicinity thereof. In addition, as a parameter of the smoothing filter, for example, there is a parameter that defines a neighboring region. For example, when the value of the parameter is “3”, the filter size is defined as 3 pixels × 3 pixels. In this case, the target pixel and 8 pixels in the vicinity thereof are targeted for filtering. The filter size used by the smoothing filter, the intermediate value filter, and the maximum value filter is not limited to 3 pixels × 3 pixels, and may be any size (for example, 5 pixels × 5 pixels).

なお、本実施の形態で使用されるフィルタは、上記フィルタに限定されることなく、他のフィルタ(たとえば、ガウシアンフィルタ)であってもよい。また、本実施の形態においては、画素の有する濃度値は、“0”〜“255”の範囲の値である。また、濃度値が“0”の場合、対応する画素は黒であるとする。また、濃度値が“255”の場合、対応する画素は白であるとする。また、画像処理アルゴリズムは種々の画像処理モジュール(フィルタ)の組合せと、各画像処理モジュールの持つパラメータ値によって表現される。   The filter used in the present embodiment is not limited to the above filter, and may be another filter (for example, a Gaussian filter). In the present embodiment, the density value of the pixel is a value in the range of “0” to “255”. If the density value is “0”, the corresponding pixel is assumed to be black. If the density value is “255”, the corresponding pixel is white. The image processing algorithm is expressed by a combination of various image processing modules (filters) and parameter values possessed by each image processing module.

再び、図21を参照して、ステップS401では、制御部510が、1つの個体の画像処理フィルタ長の最大値Lに基づいて、上記フィルタを組み合わせた個体を生成する。ここで、最大値Lとは、フィルタを組み合わせる最大の数を示す。本実施の形態では、最大値Lは、たとえば、“8”であるとする。なお、最大値Lは“8”に限定されることなく任意の値(たとえば、“10”)であってもよい。最大値Lは、ユーザが経験的に決める値であり、個体の処理する難易度が高いほど、最大値Lを大きく設定することが望ましい。   Referring to FIG. 21 again, in step S401, control unit 510 generates an individual obtained by combining the filters based on the maximum value L of the image processing filter length of one individual. Here, the maximum value L indicates the maximum number of filters to be combined. In the present embodiment, it is assumed that the maximum value L is, for example, “8”. The maximum value L is not limited to “8” and may be an arbitrary value (for example, “10”). The maximum value L is a value empirically determined by the user, and it is desirable that the maximum value L is set larger as the difficulty of processing by the individual is higher.

制御部510は、生成する個体毎に、フィルタの個数を、“1”〜“8”の範囲でランダムに決定する。そして、制御部510は、生成する個体毎に決定されたフィルタの個数に基づいて、複数種類(図22の6種類)のフィルタの中から使用する画像処理フィルタを重複を妨げないでランダムに選択する。   The control unit 510 randomly determines the number of filters in the range of “1” to “8” for each individual to be generated. Then, based on the number of filters determined for each individual to be generated, the control unit 510 randomly selects an image processing filter to be used from among a plurality of types of filters (six types in FIG. 22) without preventing duplication. To do.

図23は、本実施の形態において生成された個体を示す図である。
図23(A)は、ステップS401により、ランダムに生成されたm個の個体I(N)_1〜I(N)_mを示す。ステップS401により、m個の個体I(N)_1〜I(N)_mの各々が使用するフィルタの個数はランダムとなる。各個体を構成する番号は、フィルタIDを示す。たとえば、個体I(N)_1では、処理対象画像に対して、フィルタID“1”,“3”,“1”,“6”,“5”にそれぞれ対応するフィルタによる処理が順に行なわれる。すなわち、個体I(N)_1の一番左側に対応するフィルタIDが、処理対象画像に対して、一番最初に使用されるフィルタである。個体I(N)_1の一番右側に対応するフィルタIDが、処理対象画像に対して、一番最後に使用されるフィルタである。以下においては、処理対象画像に対して、個体I(N)_k(自然数)の画像処理が行なわれた画像を処理後画像とも称する。
FIG. 23 is a diagram showing an individual generated in the present embodiment.
FIG. 23A shows m individuals I (N) _1 to I (N) _m randomly generated in step S401. By step S401, the number of filters used by each of the m individuals I (N) _1 to I (N) _m becomes random. The number constituting each individual indicates a filter ID. For example, in the individual I (N) _1, the processing target image is sequentially processed by the filters corresponding to the filter IDs “1”, “3”, “1”, “6”, “5”. That is, the filter ID corresponding to the leftmost side of the individual I (N) _1 is the first filter used for the processing target image. The filter ID corresponding to the rightmost side of the individual I (N) _1 is the last filter used for the processing target image. Hereinafter, an image obtained by performing image processing of the individual I (N) _k (natural number) on the processing target image is also referred to as a post-processing image.

再び、図21を参照して、ステップS401の処理が終了するとステップS402に進む。   Referring to FIG. 21 again, when the process of step S401 ends, the process proceeds to step S402.

ステップS402では、制御部510が、記憶部520に記憶された教示用画像データベース182の中から教示用画像としての処理対象画像データを選択し、記憶部520から処理対象画像データを読み出す。当該読み出される処理対象画像は、前述の第1〜第3の実施の形態のうち、たとえば、第2の実施の形態の処理により生成された新規欠陥追加教示用画像であるとする。なお、当該読み出される処理対象画像は、第1および第3の実施の形態の処理により生成された新規欠陥追加教示用画像であってもよい。教示用画像データベース182は、各々が異なる複数種類の教示用画像データを含むデータベースである。   In step S 402, control unit 510 selects processing target image data as a teaching image from teaching image database 182 stored in storage unit 520, and reads processing target image data from storage unit 520. It is assumed that the processing target image to be read is, for example, a new defect addition teaching image generated by the processing of the second embodiment among the first to third embodiments described above. The read processing target image may be a new defect addition teaching image generated by the processing of the first and third embodiments. The teaching image database 182 is a database including a plurality of types of teaching image data, each of which is different.

本実施の形態では、教示用画像は、処理対象画像と教示用目標画像とに分類される。教示用目標画像とは、処理対象画像に対して画像処理アルゴリズムによる画像処理を行なった画像が一致または近似することが望まれる画像である。処理対象画像に対して画像処理アルゴリズムによる画像処理を行なった画像が、前述の教示用目標画像に近い程、当該画像処理アルゴリズムの画像の認識率が高いといえる。   In the present embodiment, the teaching image is classified into a processing target image and a teaching target image. The target image for teaching is an image for which it is desired that an image obtained by performing image processing with an image processing algorithm on the processing target image matches or approximates. It can be said that the image recognition rate of the image processing algorithm is higher as the image obtained by performing the image processing on the processing target image is closer to the teaching target image.

また、教示用目標画像は、2値画像に限定されることなく、たとえば、濃度値が“0”、“128”、“255”からなる3値画像であってもよい。この場合、濃度値が、たとえば、“128”付近の画素のみを抽出することになる。教示用目標画像は、たとえば、所望の抽出領域が配置された画像である。   Further, the teaching target image is not limited to a binary image, and may be, for example, a ternary image having density values of “0”, “128”, and “255”. In this case, for example, only pixels having a density value near “128” are extracted. The teaching target image is, for example, an image in which a desired extraction region is arranged.

図24は、本実施の形態における処理対象画像700Bおよび教示用目標画像700Cを示す図である。   FIG. 24 is a diagram showing a processing target image 700B and a teaching target image 700C in the present embodiment.

図24(A)は、処理対象画像700Bを示す図である。処理対象画像700Bには、真欠陥720,722,724と、擬似欠陥710,712,714とが含まれる。   FIG. 24A shows a processing target image 700B. The processing target image 700B includes true defects 720, 722, and 724 and pseudo defects 710, 712, and 714.

図24(B)は、教示用目標画像700Cを示す図である。教示用目標画像700Cは、所望の抽出領域720C,722C,724Cを有する。教示用目標画像700Cは、抽出領域720C,722C,724Cの画素のみが白く、抽出領域720C,722C,724C以外の画素が黒い画像とする。なお、処理対象画像700Bと、処理対象画像に対応する教示用目標画像700Cとは、対応づけられて記憶部520に記憶される。   FIG. 24B is a diagram showing a teaching target image 700C. The teaching target image 700C has desired extraction regions 720C, 722C, and 724C. In the teaching target image 700C, only the pixels in the extraction areas 720C, 722C, and 724C are white, and the pixels other than the extraction areas 720C, 722C, and 724C are black. Note that the processing target image 700B and the teaching target image 700C corresponding to the processing target image are associated with each other and stored in the storage unit 520.

再び、図21を参照して、ステップS402の処理が終了するとステップS403Aに進む。   Referring to FIG. 21 again, when the process of step S402 ends, the process proceeds to step S403A.

ステップS403Aでは、制御部510が、個体I(N)_mにおいて、世代を表す世代番号Nを“1”に設定する。世代番号Nは、後述する世代交代処理が行なわれる毎に“1”インクリメントされる。その後、ステップS403Bに進む。   In step S403A, control unit 510 sets generation number N representing a generation to “1” in individual I (N) _m. The generation number N is incremented by “1” every time a generation change process described later is performed. Thereafter, the process proceeds to step S403B.

ステップS403Bでは、制御部510が、m個の個体I(N)_1〜I(N)_mの各々に対し後述の処理を実行するために使用するカウンタkを“1”に設定する。その後、ステップS404に進む。   In step S403B, control unit 510 sets counter k used to execute a process to be described later to “1” for each of m individuals I (N) _1 to I (N) _m. Thereafter, the process proceeds to step S404.

ステップS404では、制御部510が、ステップS401において生成されたm個の個体I(N)_1〜I(N)_mのうち、k番目の個体I(N)_kによる画像処理を、処理対象画像に対して行ない、処理後画像を生成する。   In step S404, the control unit 510 performs image processing on the kth individual I (N) _k among the m individuals I (N) _1 to I (N) _m generated in step S401. To generate an image after processing.

たとえば、k=1のときは、個体I(N)_1による画像処理を、処理対象画像に対して行なうことになる。この場合、処理対象画像には、フィルタID“1”,“3”,“1”,“6”,“5”にそれぞれ対応するフィルタによる処理が順に行なわれる。処理対象画像に個体I(N)_1による画像処理が行なわれた画像が、個体I(N)_1の処理後画像となる。ステップS404の処理が終了すると、ステップS405に進む。   For example, when k = 1, image processing by the individual I (N) _1 is performed on the processing target image. In this case, the processing target image is sequentially processed by the filters corresponding to the filter IDs “1”, “3”, “1”, “6”, “5”. An image obtained by performing image processing on the processing target image with the individual I (N) _1 is a processed image of the individual I (N) _1. When the process of step S404 ends, the process proceeds to step S405.

ステップS405では、制御部510が、処理後画像から個体(画像処理アルゴリズム)の評価値を算出する。本実施の形態では、ステップS402において読み出された教示用画像データに含まれるデータに基づく、教示用目標画像と、処理後画像との、各画素間の濃度値の差の絶対値を全ての画素分求める。そして、各画素に対して求めた絶対値を全ての画素分加算した値(以下においては、画像差分値とも称する)を求め、所定値(たとえば、2000)から減算する。本実施の形態では、当該減算することにより求められた値を、画像処理アルゴリズムの評価値とする。   In step S405, control unit 510 calculates an evaluation value of the individual (image processing algorithm) from the processed image. In the present embodiment, the absolute values of the differences in density values between the pixels of the teaching target image and the processed image based on the data included in the teaching image data read out in step S402 are all set. Find pixels. Then, a value obtained by adding the absolute values obtained for each pixel for all the pixels (hereinafter also referred to as an image difference value) is obtained and subtracted from a predetermined value (for example, 2000). In the present embodiment, the value obtained by the subtraction is used as the evaluation value of the image processing algorithm.

したがって、画像差分値が小さいほど、すなわち、評価値が大きいほど、対応する個体(画像処理アルゴリズム)によって生成された処理後画像は教示用目標画像に近いものとなる。すなわち、当該個体(画像処理アルゴリズム)は、処理対象画像を、教示用目標画像と認識する認識率が高いといえる。すなわち、個体(画像処理アルゴリズム)の評価値が大きいほど、優良な(認識率の高い)画像処理アルゴリズムであるといえる。ステップS405の処理が終了すると、ステップS406に進む。   Therefore, the smaller the image difference value, that is, the larger the evaluation value, the closer the processed image generated by the corresponding individual (image processing algorithm) is to the teaching target image. That is, it can be said that the individual (image processing algorithm) has a high recognition rate for recognizing the processing target image as the teaching target image. That is, it can be said that the larger the evaluation value of an individual (image processing algorithm), the better (higher recognition rate) image processing algorithm. When the process of step S405 ends, the process proceeds to step S406.

ステップS406では、制御部510が、カウンタkを1インクリメントする。その後、ステップS407に進む。   In step S406, control unit 510 increments counter k by 1. Thereafter, the process proceeds to step S407.

ステップS407では、制御部510が、カウンタkが個体の数mより大きいか否かを判定する。ステップS407において、YESならば、ステップS408に進む。一方、ステップS407において、NOならば、再度、ステップS404の処理が行なわれる。すなわち、m個全ての個体の評価値の算出が完了した場合、ステップS408に進む。   In step S407, control unit 510 determines whether counter k is greater than the number m of individuals. If YES in step S407, the process proceeds to step S408. On the other hand, if NO at step S407, the process at step S404 is performed again. That is, when the calculation of evaluation values for all m individuals is completed, the process proceeds to step S408.

ステップS408では、制御部510が、m個全ての個体の中から最良の個体(画像処理アルゴリズム)を決定する。この場合、算出された評価値が最も大きい個体(画像処理アルゴリズム)が最良の個体となる。その後、ステップS409に進む。   In step S408, control unit 510 determines the best individual (image processing algorithm) from all m individuals. In this case, the individual with the largest calculated evaluation value (image processing algorithm) is the best individual. Thereafter, the process proceeds to step S409.

ステップS409では、制御部510が、前述の終了条件を満たしているか否かを判定する。ステップS409において、YESならば、この画像処理アルゴリズム生成処理は終了する。画像処理アルゴリズム生成処理が終了するのは、たとえば、ある世代の最良の個体(画像処理アルゴリズム)の評価値が1000以上の場合である。または、世代番号Nが、100以上の値となった場合である。すなわち、後述する世代交代処理が、100回行なわれた場合である。世代交代処理が100回行なわれると、その世代の最良の個体(画像処理アルゴリズム)の評価値が1000未満であっても、画像処理アルゴリズム生成処理が終了する。   In step S409, control unit 510 determines whether or not the above-described termination condition is satisfied. If YES in step S409, the image processing algorithm generation process ends. The image processing algorithm generation process ends when, for example, the evaluation value of the best individual (image processing algorithm) of a generation is 1000 or more. Or, the generation number N is a value of 100 or more. That is, this is a case where the generation change process described later is performed 100 times. When the generation change process is performed 100 times, the image processing algorithm generation process ends even if the evaluation value of the best individual (image processing algorithm) of that generation is less than 1000.

この画像処理アルゴリズム生成処理が終了したときの世代(以下においては、最終世代とも称する)における、m個全ての個体(画像処理アルゴリズム)またはステップS408で決定された最終世代の最良の個体(画像処理アルゴリズム)が、最終的な個体(画像処理アルゴリズム)、すなわち、最終画像処理アルゴリズムである。   All m individuals (image processing algorithm) in the generation when the image processing algorithm generation processing is completed (hereinafter also referred to as the final generation) or the best individual of the final generation determined in step S408 (image processing) Algorithm) is the final individual (image processing algorithm), that is, the final image processing algorithm.

一方、ステップS409において、NOならば、ステップS410の処理が行なわれる。   On the other hand, if NO at step S409, the process at step S410 is performed.

ステップS410では、進化的手法による次世代画像処理アルゴリズム生成処理が行なわれる。なお、以下に説明する次世代画像処理アルゴリズム生成処理は、進化的手法では、世代交代処理または遺伝的操作と呼ばれる。なお、遺伝的アルゴリズムにおいても、以下に説明する次世代画像処理アルゴリズム生成処理は世代交代処理または遺伝的操作と呼ばれる。   In step S410, next-generation image processing algorithm generation processing is performed using an evolutionary method. Note that the next-generation image processing algorithm generation processing described below is called generation change processing or genetic operation in an evolutionary method. Also in the genetic algorithm, the next generation image processing algorithm generation processing described below is called generation change processing or genetic operation.

図25は、次世代画像処理アルゴリズム生成処理のフローチャートである。
図25を参照して、ステップS510では、制御部510が、世代番号N、すなわち、N世代のm個の個体(画像処理アルゴリズム)に対し、対応する評価値に基づいて順位付けを行なう。本実施の形態では、評価値が最も大きい個体を最良(1番目)の個体とし、評価値が最も小さい個体がm番目の個体となる。なお、評価値が全く同じ個体が複数存在する場合には、その複数の個体間の順位の前後は任意とする。その後、ステップS520に進む。
FIG. 25 is a flowchart of next-generation image processing algorithm generation processing.
Referring to FIG. 25, in step S510, control unit 510 ranks generation number N, that is, m individuals (image processing algorithm) of N generations based on corresponding evaluation values. In the present embodiment, the individual with the highest evaluation value is the best (first) individual, and the individual with the lowest evaluation value is the mth individual. If there are a plurality of individuals having the same evaluation value, the order between the plurality of individuals is arbitrary. Thereafter, the process proceeds to step S520.

ステップS520では、ステップS510において順位付けられたm個の個体のうち、前述のステップS400で設定した優良個体数g1に基づいて、1番目からg1番目の個体を、変化させることなくN+1世代に追加する。   In step S520, among the m individuals ranked in step S510, the first to g1 individuals are added to the N + 1 generation without change based on the number of excellent individuals g1 set in step S400 described above. To do.

ここで、優良個体数g1とは、N世代のm個の個体のうち、変化させることなくN+1世代に追加させる個体の数である。本実施の形態では、優良個体数g1は“1”であるとする。すなわち、本実施の形態では、1番目の個体のみをN+1世代に追加する。具体的には、制御部510が、当該1番目の個体(画像処理アルゴリズム)を記憶部520に記憶させる。なお、N+1世代には、最初、個体はないものとする。なお、優良個体数g1は“1”に限定されることなく任意の値(たとえば、“2”)であってもよい。   Here, the number of excellent individuals g1 is the number of individuals to be added to the (N + 1) generation without being changed among the m individuals of the N generations. In the present embodiment, it is assumed that the number of excellent individuals g1 is “1”. That is, in the present embodiment, only the first individual is added to the N + 1 generation. Specifically, control unit 510 causes storage unit 520 to store the first individual (image processing algorithm). It is assumed that there are no individuals in the N + 1 generation at first. The number of excellent individuals g1 is not limited to “1” and may be an arbitrary value (for example, “2”).

再び、図23を参照して、図23(B)は、N+1世代の個体を示す図である。なお、本実施の形態では、N+1世代の個体を生成する場合、個体数mは変化しないものとする。ステップS520の処理により、N世代の個体I(N)_1は、変化せず、すなわち、フィルタの組合せが変化することなく、N+1世代に追加され、個体I(N+1)_1となる。   Referring to FIG. 23 again, FIG. 23 (B) is a diagram showing an N + 1 generation individual. In the present embodiment, it is assumed that the number m of individuals does not change when an N + 1 generation individual is generated. Through the process of step S520, the N generations of individuals I (N) _1 are not changed, that is, the filters are not changed, and are added to the N + 1 generation to become individuals I (N + 1) _1.

再び、図25を参照して、ステップS520の処理が終了すると、ステップS530に進む。   Referring to FIG. 25 again, when the process of step S520 ends, the process proceeds to step S530.

ステップS530では、N世代の最良な画像処理アルゴリズムを考慮した確率的生成処理が行なわれる。確率的生成処理では、制御部510が、ステップS510において行なわれたm個の個体の順位付け、前述のステップS400で設定した確率的生成個体数g3、確率変動割合および確率変動割合の変化率に基づいて、g3個の個体を生成し、N+1世代に追加する。   In step S530, a stochastic generation process is performed in consideration of the best image processing algorithm of N generations. In the probabilistic generation process, the control unit 510 ranks the m individuals performed in step S510, sets the probability generation number g3, the probability variation rate, and the probability variation rate change rate set in step S400 described above. Based on this, g3 individuals are generated and added to the N + 1 generation.

確率的生成処理における個体の生成方法では、N+1世代の個体において、複数種類のフィルタの中からフィルタを選択する選択確率を、N世代の最良の個体で使用されるフィルタに基づいて変化させる。   In the individual generation method in the stochastic generation process, the selection probability of selecting a filter from a plurality of types of filters in the N + 1 generation individual is changed based on the filter used in the best individual of the N generations.

ここで、確率的生成個体数g3とは、N+1世代に追加するN世代の最良の個体を考慮した個体の数である。確率変動割合Pfは、N+1世代に追加するN世代の最良の個体を考慮した確率的生成時の確率である。確率的生成個体数g3、確率変動割合および変化率は、ユーザが経験的に決める値である。   Here, the number of probabilistic generations g3 is the number of individuals considering the best individual of N generations to be added to the N + 1 generation. The probability variation ratio Pf is a probability at the time of probabilistic generation in consideration of the best individual of N generations added to the N + 1 generation. The probabilistic generation number g3, the probability variation rate, and the change rate are values determined by the user empirically.

本実施の形態では、確率的生成個体数g3は、“2”であるとする。なお、確率的生成個体数g3は、“2”に限定されることなく任意の値であってもよい。   In the present embodiment, it is assumed that the number of probabilistically generated individuals g3 is “2”. The probabilistic generation number g3 is not limited to “2”, and may be an arbitrary value.

再び、図23(B)を参照して、ステップS530により、個体I(N+1)_2および個体I(N+1)_3がN+1世代に追加される。   Referring to FIG. 23B again, in step S530, the individual I (N + 1) _2 and the individual I (N + 1) _3 are added to the N + 1 generation.

再び、図25を参照して、ステップS530の処理の後、ステップS540に進む。
ステップS540では、前述のステップS400で設定したランダム生成個体数g2に基づいて、ステップS401と同様の方法により、ランダムにg2個の個体を生成し、N+1世代に追加する。ここで、ランダム生成個体数g2とは、ランダムに生成し、N+1世代に追加する個体の数である。本実施の形態では、ランダム生成個体数g2は“1”であるとする。なお、ランダム生成個体数g2は“1”に限定されることなく任意の値(たとえば、“2”)であってもよい。
Referring to FIG. 25 again, after the process of step S530, the process proceeds to step S540.
In step S540, g2 individuals are randomly generated based on the number g2 of randomly generated individuals set in step S400 described above and added to the N + 1 generation by the same method as in step S401. Here, the randomly generated number of individuals g2 is the number of individuals that are randomly generated and added to the N + 1 generation. In the present embodiment, it is assumed that the number of randomly generated individuals g2 is “1”. Note that the number of randomly generated individuals g2 is not limited to “1” and may be an arbitrary value (for example, “2”).

再び、図23(B)を参照して、ステップS540により、個体I(N+1)_4がN+1世代に追加される。なお、個体I(N+1)_4は、個体I(N)_4と同じになる場合もある。   Referring to FIG. 23B again, in step S540, the individual I (N + 1) _4 is added to the N + 1 generation. Note that the individual I (N + 1) _4 may be the same as the individual I (N) _4.

再び、図25を参照して、ステップS540の処理が終了すると、ステップS550に進む。   Referring to FIG. 25 again, when the process of step S540 is completed, the process proceeds to step S550.

ステップS550では、N世代のm(100)個の個体から、遺伝的操作の一つである交叉によりm−(g1+g2+g3)個の個体を生成する。すなわち、N世代のm(100)個の個体から、交叉により100−(1+1+2)=96個の個体を生成する。   In step S550, m- (g1 + g2 + g3) individuals are generated from m (100) individuals of N generations by crossover, which is one of the genetic operations. That is, 100− (1 + 1 + 2) = 96 individuals are generated by crossover from m (100) individuals of N generations.

図26は、本実施の形態における交叉または突然変異のための個体の選択手法の一例を示す図である。   FIG. 26 is a diagram illustrating an example of an individual selection method for crossover or mutation in the present embodiment.

図26を参照して、まず、制御部510が、100個の10%である10個を、100個の個体の中からランダムに選択する(図26(B))。そして、制御部510は、ランダム選択した10個の個体のうち、最も評価値の高い個体を最優良個体として選択する(図26(C))。制御部510は、以上の処理を2回繰り返すことにより、100個の個体の中から2個の個体(以下においては、交叉対象2個体とも称する)をランダムに選択する。   Referring to FIG. 26, first, control unit 510 randomly selects 10 pieces, which is 10% of 100 pieces, from 100 individuals (FIG. 26B). Then, control unit 510 selects the individual with the highest evaluation value as the best individual among the 10 individuals selected at random (FIG. 26C). Control unit 510 repeats the above process twice to randomly select two individuals (hereinafter, also referred to as two crossover targets) from 100 individuals.

そして、制御部510は、前述の交叉確率Pcに基づいて、交叉対象2個体を交叉させ、2つの個体を生成する。ここで、交叉確率Pcとは、交叉対象2個体を交叉させる確率である。本実施の形態では、交叉確率Pcは、0.9(90%)であるとする。なお、交叉確率Pcは、0.9に限定されることはない。交叉は、以下に説明する手法により行なわれる。   Then, the control unit 510 crosses two crossing target individuals based on the crossing probability Pc described above, and generates two individuals. Here, the crossover probability Pc is the probability of crossing two crossover target individuals. In the present embodiment, it is assumed that the crossover probability Pc is 0.9 (90%). Note that the crossover probability Pc is not limited to 0.9. Crossover is performed by the method described below.

図27は、交叉、突然変異を説明するための図である。
図27(A)および図27(B)は、交叉を説明するための図である。
FIG. 27 is a diagram for explaining crossover and mutation.
FIG. 27A and FIG. 27B are diagrams for explaining crossover.

図27(A)および図27(B)を参照して、交叉とは、互いに隣り合う2つの構成要素を任意の位置(以下においては、交叉点)で切断し、切断された一方を互いに交換することで、第N+1世代の2つの新しい個体を生成するものである。   Referring to FIG. 27A and FIG. 27B, crossing means cutting two adjacent components at an arbitrary position (hereinafter, the crossing point) and exchanging the cut ones with each other. By doing so, two new individuals of the (N + 1) th generation are generated.

以上の交叉の処理を繰り返すことにより、N世代のm(100)個の個体から、96個の個体を生成する。   By repeating the above crossover process, 96 individuals are generated from m (100) individuals of N generations.

再び、図25を参照して、ステップS550の処理が終了すると、ステップS560に進む。   Referring to FIG. 25 again, when the process of step S550 ends, the process proceeds to step S560.

ステップS560では、ステップS550で生成した96個の個体(以下においては、突然変異対象個体とも称する)に対して、前述の突然変異確率Pmに基づいて遺伝的操作の一つである突然変異を施す(以下においては、突然変異処理とも称する)。ここで、突然変異確率Pmとは、96個の突然変異対象個体に対して、突然変異を行なう確率である。本実施の形態では、突然変異確率Pmは、0.05(5%)であるとする。なお、突然変異確率Pmは、0.05に限定されることはない。本実施の形態では、突然変異は、制御部510が、以下に説明する手法を96個の突然変異対象個体の各々に対し5%の確率で行なう。   In step S560, the 96 individuals generated in step S550 (hereinafter also referred to as mutation target individuals) are mutated as one of the genetic operations based on the mutation probability Pm. (In the following, also referred to as mutation treatment). Here, the mutation probability Pm is a probability of performing mutation on 96 mutation target individuals. In the present embodiment, it is assumed that the mutation probability Pm is 0.05 (5%). The mutation probability Pm is not limited to 0.05. In the present embodiment, for mutation, control unit 510 performs the method described below with a probability of 5% for each of the 96 mutation target individuals.

再び、図27を参照して、図27(C)は、突然変異を説明するための図である。
図27(C)を参照して、突然変異とは、第N世代の1つの個体の任意の位置(突然変異部)を選択し、突然変異部に対応する個体(画像処理フィルタ)の種類をランダムに任意の個体(画像処理フィルタ)に変更することで第N+1世代の新しい個体を生成するものである。なお、突然変異部は、複数であってもよい。
Referring to FIG. 27 again, FIG. 27C is a diagram for explaining the mutation.
Referring to FIG. 27C, mutation means that an arbitrary position (mutation part) of one individual of the Nth generation is selected, and the type of individual (image processing filter) corresponding to the mutation part is selected. A new individual of the (N + 1) th generation is generated by changing to an arbitrary individual (image processing filter) at random. There may be a plurality of mutation parts.

そして、制御部510は、突然変異処理が行なわれた96個の個体をN+1世代に追加する。具体的には、制御部510が、生成した96個の個体(画像処理アルゴリズム)を記憶部520に記憶させる。以上の処理により、N+1世代の個体の数は、N世代と同じ個体の数となる。すなわち、記憶部520に記憶された個体(画像処理アルゴリズム)の数は100個となる。そして、この次世代画像処理アルゴリズム生成処理は終了し、図21の画像処理アルゴリズム生成処理の処理に戻り、ステップS412に進む。   Then, control unit 510 adds 96 individuals that have been subjected to mutation processing to the N + 1 generation. Specifically, control unit 510 causes storage unit 520 to store the generated 96 individuals (image processing algorithm). Through the above processing, the number of individuals of the (N + 1) th generation is the same as the number of individuals of the Nth generation. That is, the number of individuals (image processing algorithms) stored in the storage unit 520 is 100. Then, this next-generation image processing algorithm generation process ends, the process returns to the image processing algorithm generation process of FIG. 21, and the process proceeds to step S412.

なお、本実施の形態における次世代画像処理アルゴリズム生成処理内のステップS520,S530,S540,S550,S560の処理の順序は、前述の順番に限定されることはなく、任意である。たとえば、ステップS530の処理が、ステップS520の処理よりも先に行なわれてもよい。   Note that the order of the processes in steps S520, S530, S540, S550, and S560 in the next-generation image processing algorithm generation process in the present embodiment is not limited to the order described above, and is arbitrary. For example, the process of step S530 may be performed prior to the process of step S520.

ステップS412では、制御部510が、世代番号Nを1インクリメントする。その後、再度、ステップS403Bの処理が行なわれる。   In step S412, control unit 510 increments generation number N by one. Thereafter, the process of step S403B is performed again.

そして、ステップS409で、終了条件が満たされたと判定されるまで、ステップS403B,S404,S405,S406,S407,S408,S410,S412の処理が繰り返される。以上の処理により、世代が交代するにつれてm個の個体(画像処理アルゴリズム)が、優秀な(認識率の高い)m個の個体(画像処理アルゴリズム)に変化していく。そして、ステップS409で終了条件が満たされたときには、記憶部520には、優良な100個の個体(画像処理アルゴリズム)が記憶される。   Then, the processes of steps S403B, S404, S405, S406, S407, S408, S410, and S412 are repeated until it is determined in step S409 that the end condition is satisfied. Through the above processing, m individuals (image processing algorithms) are changed to excellent (high recognition rate) m individuals (image processing algorithms) as generations change. When the end condition is satisfied in step S409, the storage unit 520 stores 100 excellent individuals (image processing algorithms).

以上、本実施の形態においては、最適化手法として遺伝的アルゴリズムを使用したが、遺伝的プログラミングや進化的アルゴリズムなど他の進化的手法を用いてもよいし、ニューラルネットワークなどの進化的手法以外の最適化手法を用いてもよいものとする。   As described above, in this embodiment, a genetic algorithm is used as an optimization method. However, other evolutionary methods such as genetic programming and evolutionary algorithm may be used, and other than evolutionary methods such as a neural network. An optimization method may be used.

また、画像処理フィルタとして図22に挙げたものは一例であり、ノイズ除去や2値化処理なども画像処理フィルタに含めても構わないものとする。   Further, the image processing filter illustrated in FIG. 22 is an example, and noise removal, binarization processing, and the like may be included in the image processing filter.

図28は、本実施の形態における画像処理アルゴリズム生成装置500Cの機能ブロック図である。   FIG. 28 is a functional block diagram of an image processing algorithm generation device 500C in the present embodiment.

図28を参照して、画像処理アルゴリズム生成装置500Cは、画像処理アルゴリズム管理部として動作する。画像処理アルゴリズム生成装置500Cには、画像データ入力部600および表示部530が接続されている。   Referring to FIG. 28, image processing algorithm generation apparatus 500C operates as an image processing algorithm management unit. An image data input unit 600 and a display unit 530 are connected to the image processing algorithm generation apparatus 500C.

画像処理アルゴリズム生成装置500Cは、制御部510を含む。
制御部510は、初期パラメータ設定部511C、目標画像設定部512C、画像処理アルゴリズム生成部513C、画像データ変換部514C、画像処理アルゴリズム性能評価部515C、画像処理アルゴリズム生成完了判断部516Cとして動作する。教示用画像データベース182は、記憶部520に記憶されている。教示用画像データベース182は、画像データ入力部600から入力された処理対象画像を含む。
The image processing algorithm generation device 500C includes a control unit 510.
The control unit 510 operates as an initial parameter setting unit 511C, a target image setting unit 512C, an image processing algorithm generation unit 513C, an image data conversion unit 514C, an image processing algorithm performance evaluation unit 515C, and an image processing algorithm generation completion determination unit 516C. The teaching image database 182 is stored in the storage unit 520. The teaching image database 182 includes the processing target image input from the image data input unit 600.

初期パラメータ設定部511Cは、ユーザがあらかじめ設定されている初期パラメータを変更したい際に、マウス524またはキーボード544等の入力機器を用いたユーザからの指示に基づいて、初期パラメータを変更する機能を有する。初期パラメータ設定部511Cは、前述のステップS400の処理を行なう機能を有する。   The initial parameter setting unit 511C has a function of changing an initial parameter based on an instruction from the user using an input device such as a mouse 524 or a keyboard 544 when the user wants to change an initial parameter set in advance. . The initial parameter setting unit 511C has a function of performing the process of step S400 described above.

目標画像設定部512Cは、ユーザが、教示用画像データベース182を構成する教示用画像データの処理対象画像を表示部530で参照して、マウス524またはキーボード544等の入力機器を用いたユーザからの指示の基づいて、所望の抽出領域を配置した教示用目標画像を生成する機能を有する。   The target image setting unit 512C refers to the processing target image of the teaching image data constituting the teaching image database 182 on the display unit 530, and the target image setting unit 512C receives information from the user using the input device such as the mouse 524 or the keyboard 544. Based on the instruction, it has a function of generating a target image for teaching in which a desired extraction area is arranged.

画像処理アルゴリズム生成部513は、前述のステップS401、S410の処理を行なう機能を有する。   The image processing algorithm generation unit 513 has a function of performing the processes of steps S401 and S410 described above.

画像データ変換部514Cは、前述のステップS404の処理を行なう機能を有する。
画像処理アルゴリズム性能評価部515Cは、前述のステップS405,S408の処理を行なう機能を有する。
The image data conversion unit 514C has a function of performing the process of step S404 described above.
The image processing algorithm performance evaluation unit 515C has a function of performing the processes of steps S405 and S408 described above.

画像処理アルゴリズム生成完了判断部516Cは、前述のステップS409の処理を行なう機能を有する。   The image processing algorithm generation completion determination unit 516C has a function of performing the process of step S409 described above.

記憶部520は、画像処理アルゴリズム生成完了判断部516Cで優良な個体(画像処理アルゴリズムの)生成が完了と判断された時、当該優良な個体(画像処理アルゴリズム)を記憶する画像処理アルゴリズム記憶部として動作する。   When the image processing algorithm generation completion determination unit 516C determines that generation of a good individual (image processing algorithm) is complete, the storage unit 520 is an image processing algorithm storage unit that stores the good individual (image processing algorithm). Operate.

図29は、従来手法および本実施の形態のそれぞれで100世代目の画像処理アルゴリズムを生成するのに要した時間を測定したシミュレーション結果である。シミュレーション条件は、使用する画像サイズを横640画素、縦480画素とし、各世代の個体数mを100とし、使用するフィルタの最大値Lを8とした。   FIG. 29 shows simulation results obtained by measuring the time required to generate the 100th generation image processing algorithm in each of the conventional method and the present embodiment. The simulation conditions were such that the image size to be used was 640 pixels wide and 480 pixels vertical, the number m of individuals of each generation was 100, and the maximum value L of the filter to be used was 8.

図29を参照して、従来手法では、1枚の処理対象画像(教示用画像)に対し、欠陥の特徴量を変化させた画像を9枚作成し、トータルで処理対象画像10枚を、本実施の形態の画像処理アルゴリズム生成処理で使用した。   Referring to FIG. 29, in the conventional method, nine images in which the defect feature amount is changed are created for one processing target image (teaching image), and a total of 10 processing target images are recorded. Used in the image processing algorithm generation processing of the embodiment.

本実施の形態では、第2の実施の形態の方法で、1つの追加元教示用欠陥に基づいて生成した9個の新規追加教示用欠陥を追加することにより作成された新規欠陥追加教示用画像を1枚を、本実施の形態の画像処理アルゴリズム生成処理で使用した。   In the present embodiment, a new defect additional teaching image created by adding nine new additional teaching defects generated based on one additional source teaching defect by the method of the second embodiment. Was used in the image processing algorithm generation processing of the present embodiment.

従来手法では、世代交代処理を100回繰り返すのに要する時間は、4269秒であったが、本実施の形態では801秒と大幅に時間を短縮することができた。   In the conventional method, the time required to repeat the generation change process 100 times is 4269 seconds, but in this embodiment, the time can be significantly reduced to 801 seconds.

以上説明したように、本実施の形態では、1つの追加元教示用欠陥に基づいて生成した複数個の新規追加教示用欠陥を追加することにより作成された新規欠陥追加教示用画像を1枚を処理対象画像として、画像処理アルゴリズムを生成することで、複数種類の処理対象画像を使用して画像処理アルゴリズムを生成する従来手法より、画像処理を施す回数を低減できる。   As described above, in this embodiment, one new defect addition teaching image created by adding a plurality of new additional teaching defects generated based on one additional source teaching defect is obtained. By generating an image processing algorithm as a processing target image, it is possible to reduce the number of times image processing is performed, compared to the conventional method of generating an image processing algorithm using a plurality of types of processing target images.

したがって、画像処理アルゴリズム生成に要する時間を短縮することができるという効果を奏する。   Therefore, the time required for generating the image processing algorithm can be shortened.

また、本実施の形態では、大域的探索手法である進化的手法を利用することで、画像処理フィルタの組合せが膨大である場合にも効率的に探索が可能であり、画像処理アルゴリズム生成に要する時間を短縮できるという効果を奏する。   Also, in this embodiment, by using an evolutionary method that is a global search method, it is possible to efficiently search even when the number of image processing filter combinations is enormous, and it is necessary to generate an image processing algorithm. There is an effect that the time can be shortened.

<第5の実施の形態>
次に、第4の実施の形態で生成された画像処理アルゴリズムを使用して、画像検査を行なう処理について説明する。
<Fifth embodiment>
Next, processing for performing an image inspection using the image processing algorithm generated in the fourth embodiment will be described.

図30は、本実施の形態における画像検査装置500Dの内部の構成を示すブロック図である。   FIG. 30 is a block diagram showing an internal configuration of image inspection apparatus 500D in the present embodiment.

図30を参照して、画像検査装置500Dは、図1の教示用画像生成装置500と比較して、記録媒体555の代わりに記録媒体555Dにデータアクセスする点と、記憶部520に、教示用画像生成プログラム180の代わりに画像検査プログラム180Dが記録されている点と、記録媒体555Dに画像検査プログラム180Dが記録されている点と、記憶部520に画像処理アルゴリズムデータベース184がさらに記録されている点が異なる。それ以外の構成および機能は教示用画像生成装置500と同様なので詳細な説明は繰り返さない。   Referring to FIG. 30, image inspection apparatus 500 </ b> D performs data access to recording medium 555 </ b> D instead of recording medium 555, as compared with teaching image generation apparatus 500 of FIG. An image inspection program 180D is recorded instead of the image generation program 180, an image inspection program 180D is recorded on the recording medium 555D, and an image processing algorithm database 184 is further recorded in the storage unit 520. The point is different. Since other configurations and functions are the same as those of teaching image generation apparatus 500, detailed description will not be repeated.

画像処理アルゴリズムデータベース184は、第4の実施の形態で生成された複数の画像処理アルゴリズムからなるデータベースである。ここで、画像処理アルゴリズムとは、1つ以上の画像処理フィルタにより構成されるものである。以上の構成の画像検査装置500Dにより、画像検査処理が行なわれる。   The image processing algorithm database 184 is a database composed of a plurality of image processing algorithms generated in the fourth embodiment. Here, the image processing algorithm is composed of one or more image processing filters. Image inspection processing is performed by the image inspection apparatus 500D having the above configuration.

次に、画像検査処理について説明する。
図31は、画像検査処理のフローチャートである。
Next, the image inspection process will be described.
FIG. 31 is a flowchart of the image inspection process.

図31を参照して、ステップS601では、初期パラメータ設定処理が行なわれる。初期パラメータ設定処理では、制御部510が、初期パラメータを設定する。初期パラメータとしては、後述するステップS603にて選択する画像処理アルゴリズムのID、真欠陥か擬似欠陥であるかを判断するための欠陥面積の閾値などがある。この閾値以上の面積の欠陥を有する検査対象物650は、不良品であり、この閾値よりも大きい面積の欠陥が一つも存在しない検査対象物650は良品である。   Referring to FIG. 31, in step S601, an initial parameter setting process is performed. In the initial parameter setting process, control unit 510 sets initial parameters. The initial parameters include the ID of the image processing algorithm selected in step S603, which will be described later, and a defect area threshold value for determining whether the defect is a true defect or a pseudo defect. The inspection object 650 having a defect with an area equal to or larger than the threshold is a defective product, and the inspection object 650 having no defect with an area larger than the threshold is a non-defective product.

特に、この閾値を1とすることで、後述する画像処理アルゴリズム適用結果の出力である2値化画像に濃度値が255(白)の画素が一つでも存在すれば検査対象物650を不良品と判定することができる。その後、ステップS602に進む。   In particular, by setting this threshold value to 1, if there is at least one pixel having a density value of 255 (white) in a binarized image that is an output of an image processing algorithm application result described later, the inspection object 650 is defective. Can be determined. Thereafter, the process proceeds to step S602.

ステップS602では、画像データ入力部600を用いて検査対象物650を撮像することにより検査対象画像を入力する。また、オフライン画像検査を行なう場合には、教示用画像データベース182より、処理対象画像としての検査対象画像を選択することにより画像を入力する。その後、ステップS603に進む。   In step S <b> 602, an inspection target image is input by imaging the inspection target 650 using the image data input unit 600. When performing offline image inspection, an image is input by selecting an inspection target image as a processing target image from the teaching image database 182. Thereafter, the process proceeds to step S603.

ステップS603では、制御部510が、記憶部520に記憶されている画像処理アルゴリズムデータベース184より、ステップS601で指定したIDを有する画像処理アルゴリズムを選択し、当該選択した画像処理アルゴリズムを記憶部520から読み出す。   In step S603, control unit 510 selects an image processing algorithm having the ID specified in step S601 from image processing algorithm database 184 stored in storage unit 520, and stores the selected image processing algorithm from storage unit 520. read out.

なお、ある検査対象画像に対して画像処理アルゴリズムを適用した結果の出力画像は濃度値が0か255かの2値化画像であるものとする。特に、本実施の形態においては、欠陥候補画素の濃度値のみが255(白)となるものとする。その後、ステップS604に進む。   Note that an output image obtained as a result of applying the image processing algorithm to a certain inspection target image is a binary image having a density value of 0 or 255. In particular, in the present embodiment, it is assumed that only the density value of the defect candidate pixel is 255 (white). Thereafter, the process proceeds to step S604.

ステップS604では、制御部510が、ステップS602で入力した検査対象画像に対して、ステップS603で読み出した画像処理アルゴリズムを施し、画像処理結果としての2値化画像を出力する。その後、ステップS605に進む。   In step S604, control unit 510 performs the image processing algorithm read in step S603 on the inspection target image input in step S602, and outputs a binary image as an image processing result. Thereafter, the process proceeds to step S605.

ステップS605では、制御部510が、ステップS604により得られた2値化画像に対してラベリング手法を用いて全ての欠陥候補の特徴量を算出する。ここで、特徴量は、たとえば、面積である。その後、ステップS606に進む。   In step S605, control unit 510 calculates feature amounts of all defect candidates using a labeling method for the binarized image obtained in step S604. Here, the feature amount is, for example, an area. Thereafter, the process proceeds to step S606.

ステップS606では、制御部510が、ステップS601において設定した検査対象物650が良品か不良品であるかを判断するための欠陥面積の閾値を用いて、各欠陥候補が真欠陥であるか擬似欠陥であるかを判定する。制御部510は、当該判定に基づき、一つでも真欠陥がある検査対象物650を不良品であると判定する。以下においては、当該判定結果を良品/不良品判定結果とも称する。その後、ステップS607に進む。   In step S606, control unit 510 uses the defect area threshold for determining whether inspection object 650 set in step S601 is a non-defective product or a defective product to determine whether each defect candidate is a true defect or a pseudo defect. It is determined whether it is. Based on the determination, control unit 510 determines that inspection object 650 having at least one true defect is a defective product. Hereinafter, the determination result is also referred to as a non-defective product / defective product determination result. Thereafter, the process proceeds to step S607.

ステップS607では、制御部510およびVDP532が、ステップS606での良品/不良品判定結果を表示部530に出力する。   In step S607, control unit 510 and VDP 532 output the non-defective / defective product determination result in step S606 to display unit 530.

以上により、この画像検査処理は終了する。
図32は、本実施の形態における画像検査装置500Dの機能ブロック図である。
Thus, the image inspection process ends.
FIG. 32 is a functional block diagram of an image inspection apparatus 500D in the present embodiment.

図32を参照して、画像検査装置500Dは、画像検査管理部として動作する。画像検査装置500Dには、画像データ入力部600および表示部530が接続されている。   Referring to FIG. 32, image inspection apparatus 500D operates as an image inspection management unit. An image data input unit 600 and a display unit 530 are connected to the image inspection apparatus 500D.

画像検査装置500Dは、制御部510と、画像検査結果出力部510Dと、記憶部520とを含む。   Image inspection apparatus 500D includes a control unit 510, an image inspection result output unit 510D, and a storage unit 520.

制御部510は、初期パラメータ設定部511D、画像処理アルゴリズム選択部512D、画像データ変換部513D、欠陥候補特徴量算出部514D、良品/不良品判定部515Dとして動作する。   The control unit 510 operates as an initial parameter setting unit 511D, an image processing algorithm selection unit 512D, an image data conversion unit 513D, a defect candidate feature amount calculation unit 514D, and a non-defective / defective product determination unit 515D.

記憶部520には、教示用画像データベース182および画像処理アルゴリズムデータベース184が記憶されている。教示用画像データベース182は、画像データ入力部600から入力された処理対象画像を含む。   The storage unit 520 stores a teaching image database 182 and an image processing algorithm database 184. The teaching image database 182 includes the processing target image input from the image data input unit 600.

画像検査結果出力部510Dは、制御部510およびVDP532の動作を行なう。
画像検査装置500Dは、検査対象画像を画像データ入力部600から取得する。オフライン画像検査を行なう場合には、検査前に画像データ入力部600によって取得された少なくとも1枚以上の検査対象画像データを、記憶部520に記憶させ、検査時に記憶部520の教示用画像データベース182より検査対象画像データを取得する。
Image inspection result output unit 510D operates control unit 510 and VDP 532.
The image inspection apparatus 500D acquires the inspection target image from the image data input unit 600. When performing offline image inspection, at least one or more inspection object image data acquired by the image data input unit 600 before the inspection is stored in the storage unit 520, and the teaching image database 182 of the storage unit 520 is stored at the time of inspection. The image data to be inspected is acquired.

初期パラメータ設定部511Dでは、ユーザがあらかじめ設定されている初期パラメータを変更したい際に、マウス542またはキーボード544等の入力装置を用いて、初期パラメータを変更する機能を提供する。初期パラメータ設定部511Dでは図31のステップS601の処理を行なう機能を有する。   The initial parameter setting unit 511D provides a function of changing an initial parameter by using an input device such as a mouse 542 or a keyboard 544 when the user wants to change an initial parameter set in advance. The initial parameter setting unit 511D has a function of performing the process of step S601 in FIG.

画像処理アルゴリズム選択部512Dは、ステップS603の処理を行なう機能を有する。すなわち、画像処理アルゴリズムデータベース184に記憶されている複数の画像処理アルゴリズムの中から所望の画像処理アルゴリズムを選択する。   The image processing algorithm selection unit 512D has a function of performing the process of step S603. That is, a desired image processing algorithm is selected from a plurality of image processing algorithms stored in the image processing algorithm database 184.

画像データ変換部513Dは、ステップS604の処理を行なう機能を有する。
欠陥候補特徴量算出部514Dは、ステップS605の処理を行なう機能を有する。
The image data conversion unit 513D has a function of performing the process of step S604.
The defect candidate feature amount calculation unit 514D has a function of performing the process of step S605.

良品/不良品判定部515Dは、ステップS606の処理を行なう機能を有する。
画像検査結果出力部510Dは、ステップS607の処理を行なう機能を有する。
The non-defective product / defective product determination unit 515D has a function of performing the process of step S606.
The image inspection result output unit 510D has a function of performing the process of step S607.

次に、異なる2つの画像処理アルゴリズムをそれぞれ使用した画像検査処理を行なった場合について説明する。   Next, a case where image inspection processing using two different image processing algorithms is performed will be described.

図33は、ステップS603で選択される画像処理アルゴリズムを生成するために使用した異なる2つの処理対象画像を示す図である。   FIG. 33 is a diagram showing two different processing target images used to generate the image processing algorithm selected in step S603.

図33(A)は、処理対象画像900である。処理対象画像900は、検査対象物650を撮像することで得られた画像である。処理対象画像900には、真欠陥820が含まれる。   FIG. 33A shows a processing target image 900. The processing target image 900 is an image obtained by imaging the inspection target object 650. The processing target image 900 includes a true defect 820.

図33(B)は、処理対象画像900Aである。処理対象画像900Aは、処理対象画像900を使用して、第1および2の実施の形態の方法により生成した画像である。処理対象画像900Aは、真欠陥820の面積およびコントラストを25%低下させた新規追加教示用欠陥824を、真欠陥として生成して、追加した画像である。   FIG. 33B shows a processing target image 900A. The processing target image 900A is an image generated using the processing target image 900 by the methods of the first and second embodiments. The processing target image 900A is an image in which a new additional teaching defect 824 in which the area and contrast of the true defect 820 are reduced by 25% is generated as a true defect and added.

図34は、異なる2つの画像処理アルゴリズムをそれぞれ使用した画像検査処理を行なった結果を示す表T400である。   FIG. 34 is a table T400 showing the results of image inspection processing using two different image processing algorithms.

図34を参照して、画像処理アルゴリズムAは、第4の実施の形態の画像処理アルゴリズム生成処理において、処理対象画像を処理対象画像900として、生成された最良の画像処理アルゴリズムである。   Referring to FIG. 34, image processing algorithm A is the best image processing algorithm generated in the image processing algorithm generation processing of the fourth embodiment, with the processing target image as processing target image 900.

画像処理アルゴリズムBは、第4の実施の形態の画像処理アルゴリズム生成処理において、処理対象画像を処理対象画像900Aとして、生成された最良の画像処理アルゴリズムである。   The image processing algorithm B is the best image processing algorithm generated in the image processing algorithm generation processing of the fourth embodiment with the processing target image as the processing target image 900A.

○は、検査対象物650を撮像することで得られた検査対象画像が、真欠陥を含む欠陥画像である場合、ステップS606で、検査対象物650を不良品であると正しく判定されたことを示す。すなわち、欠陥画像が真欠陥を含む場合、欠陥画像に含まれる欠陥候補が、真欠陥と正しく判定されたことを示す。   ○ indicates that when the inspection object image obtained by imaging the inspection object 650 is a defect image including a true defect, the inspection object 650 is correctly determined to be defective in step S606. Show. That is, when the defect image includes a true defect, it indicates that the defect candidate included in the defect image is correctly determined as a true defect.

×は、検査対象物650を撮像することで得られた検査対象画像が、真欠陥を含む欠陥画像である場合、ステップS606で、検査対象物650を不良品であると正しく判定できなかったことを示す。すなわち、欠陥画像が真欠陥を含む場合、欠陥画像に含まれる欠陥候補が、真欠陥と正しく判定されなかったことを示す。   X: When the inspection object image obtained by imaging the inspection object 650 is a defect image including a true defect, the inspection object 650 could not be correctly determined as a defective product in step S606. Indicates. That is, if the defect image includes a true defect, it indicates that the defect candidate included in the defect image has not been correctly determined as a true defect.

図35は、異なる2つの画像処理アルゴリズムをそれぞれ使用した画像検査処理で使用した一例としての検査対象画像950を示す図である。   FIG. 35 is a diagram showing an inspection target image 950 as an example used in the image inspection processing using two different image processing algorithms.

図35を参照して、検査対象画像950は、真欠陥952を含む。真欠陥952は、図33(A)の処理対象画像900の真欠陥820の面積またはコントラストを変化させた欠陥である。なお、検査対象画像950の背景画像と、処理対象画像900の背景画像との濃度分布は同じである。   Referring to FIG. 35, inspection object image 950 includes a true defect 952. The true defect 952 is a defect in which the area or contrast of the true defect 820 of the processing target image 900 in FIG. The density distribution of the background image of the inspection target image 950 and the background image of the processing target image 900 are the same.

変動特徴量の行の、5〜35は、それぞれ、対応する特徴量を低下させた%を示す。
まず、処理対象画像900を利用して、処理対象画像900の真欠陥820の面積のみを5〜35%それぞれ低下した複数の検査対象画像を生成して、複数の検査対象画像の各々に対しステップS604で画像処理アルゴリズムAを施し、画像検査処理を行なった。当該画像検査処理では、15%まで真欠陥820の面積を低下させた真欠陥に対しても、検査対象画像は、欠陥画像と正しく判定された。すなわち、検査対象物650が不良品であると正しく判定された。
5 to 35 in the row of the variation feature amount respectively indicate% in which the corresponding feature amount is reduced.
First, by using the processing target image 900, a plurality of inspection target images in which only the area of the true defect 820 of the processing target image 900 is reduced by 5 to 35% are generated, and a step is performed for each of the plurality of inspection target images. In step S604, the image processing algorithm A is applied to perform image inspection processing. In the image inspection process, the inspection target image was correctly determined as a defect image even for a true defect in which the area of the true defect 820 was reduced to 15%. That is, it was correctly determined that the inspection object 650 is a defective product.

また、処理対象画像900を利用して、処理対象画像900の真欠陥820のコントラストのみを5〜35%それぞれ低下した複数の検査対象画像を生成して、複数の検査対象画像の各々に対しステップS604で画像処理アルゴリズムAを施し、画像検査処理を行なった。当該画像検査処理では、20%まで真欠陥820のコントラストを低下させた真欠陥に対しても、検査対象画像は、欠陥画像と正しく判定された。すなわち、検査対象物650が不良品であると正しく判定された。   Further, using the processing target image 900, a plurality of inspection target images in which only the contrast of the true defect 820 of the processing target image 900 is reduced by 5 to 35% are generated, and a step is performed for each of the plurality of inspection target images. In step S604, the image processing algorithm A is applied to perform image inspection processing. In the image inspection processing, the inspection target image was correctly determined as a defect image even for a true defect in which the contrast of the true defect 820 was reduced to 20%. That is, it was correctly determined that the inspection object 650 is a defective product.

また、処理対象画像900を利用して、処理対象画像900の真欠陥820の面積のみを5〜35%それぞれ低下した複数の検査対象画像を生成して、複数の検査対象画像の各々に対しステップS604で画像処理アルゴリズムBを施し、画像検査処理を行なった。当該画像検査処理では、25%まで真欠陥820の面積を低下させた真欠陥に対しても、検査対象画像は、欠陥画像と正しく判定された。すなわち、検査対象物650が不良品であると正しく判定された。   Further, by using the processing target image 900, a plurality of inspection target images in which only the area of the true defect 820 of the processing target image 900 is reduced by 5 to 35% are generated, and a step is performed for each of the plurality of inspection target images. In step S604, the image processing algorithm B is applied to perform image inspection processing. In the image inspection process, the inspection target image was correctly determined as a defect image even for a true defect in which the area of the true defect 820 was reduced to 25%. That is, it was correctly determined that the inspection object 650 is a defective product.

また、処理対象画像900を利用して、処理対象画像900の真欠陥820のコントラストのみを5〜35%それぞれ低下した複数の検査対象画像を生成して、複数の検査対象画像の各々に対しステップS604で画像処理アルゴリズムBを施し、画像検査処理を行なった。当該画像検査処理では、35%まで真欠陥820のコントラストを低下させた真欠陥に対しても、検査対象画像は、欠陥画像と正しく判定された。すなわち、検査対象物650が不良品であると正しく判定された。   Also, using the processing target image 900, a plurality of inspection target images in which only the contrast of the true defect 820 of the processing target image 900 is reduced by 5 to 35% are generated, and a step is performed for each of the plurality of inspection target images. In step S604, the image processing algorithm B is applied to perform image inspection processing. In the image inspection processing, the inspection target image was correctly determined as a defect image even for a true defect in which the contrast of the true defect 820 was reduced to 35%. That is, it was correctly determined that the inspection object 650 is a defective product.

以上により、欠陥を追加した画像(処理対象画像900A)を利用して生成した画像処理アルゴリズムBを使用した画像検査処理の方が、欠陥が追加されていない画像(処理対象画像900)を利用して生成した画像処理アルゴリズムAを使用した画像検査処理より、処理対象画像900を利用して、処理対象画像900の真欠陥820の特徴量をそれぞれ変化させた複数の検査対象画像のうち、欠陥画像と正しく判定できる画像の数が多かった。   As described above, the image inspection processing using the image processing algorithm B generated using the image with the defect added (processing target image 900A) uses the image without the defect added (processing target image 900). From the image inspection process using the image processing algorithm A generated in this way, the defect image among the plurality of inspection object images in which the feature amount of the true defect 820 of the processing object image 900 is changed using the processing object image 900. There were many images that could be judged correctly.

以上説明したように、本実施の形態では、画像検査処理時に、第1および2の実施の形態で生成された処理対象画像を使用した第4の実施の形態で生成された画像処理アルゴリズムBを使用している。   As described above, in the present embodiment, the image processing algorithm B generated in the fourth embodiment using the processing target image generated in the first and second embodiments is used in the image inspection process. I use it.

したがって、画像検査処理時で使用する画像処理アルゴリズムBは、教示用原画像上に存在する欠陥の特徴量が変化した新規欠陥の特徴も学習しているため、照明条件やカメラパラメータが異なる場合などの環境の変化に対しても、信頼性の高い検査が可能となるという効果を奏する。   Therefore, the image processing algorithm B used in the image inspection process also learns the feature of a new defect whose feature amount of the defect existing on the original image for teaching has changed, so that the illumination conditions and camera parameters are different. Even if the environment changes, there is an effect that a highly reliable inspection is possible.

なお、本実施の形態では、良品/不良品の判断基準として、欠陥候補の面積を使用したが、本実施の形態はこれに限定されることはない。良品/不良品の判断基準は、検査対象を良品か不良品かのどちらであるかを判断できる基準となるもの(たとえば、欠陥候補の形状)であれば何であってもよい。   In the present embodiment, the defect candidate area is used as a non-defective / defective product determination criterion, but the present embodiment is not limited to this. The criteria for determining good / defective products may be anything as long as they are criteria (for example, the shape of a defect candidate) that can determine whether the inspection object is a good product or a defective product.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本発明は、画像検査装置、画像変換装置、画像認識装置、パターンマッチング装置、画像を用いた位置決め装置、画像認識機能付自律ロボット、画像認識機能付産業用ロボットなどに利用される。   The present invention is used for an image inspection apparatus, an image conversion apparatus, an image recognition apparatus, a pattern matching apparatus, a positioning apparatus using an image, an autonomous robot with an image recognition function, an industrial robot with an image recognition function, and the like.

本実施の形態における教示用画像生成装置の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the image generation apparatus for teaching in this Embodiment. 画像データ入力部の内部構成を示すブロック図であるIt is a block diagram which shows the internal structure of an image data input part. 一例としての教示用画像を示す図である。It is a figure which shows the image for a teaching as an example. 一例としての教示用原画像および教示用目標画像を示す図である。It is a figure which shows the original image for teaching and the target image for teaching as an example. 新規欠陥追加教示用画像生成処理のフローチャートである。It is a flowchart of the image generation process for new defect addition teaching. 教示用原画像と、教示用原画像に基づいて生成された追加元教示用欠陥指定画像を示す。The teaching original image, and the additional original teaching defect designation image generated based on the teaching original image are shown. 教示用原画像に対し欠陥領域を設定した欠陥領域設定画像である。It is a defect area setting image in which a defect area is set for a teaching original image. 一例としての新規追加教示用欠陥リストテーブルを示す図である。It is a figure which shows the defect list table for newly added teachings as an example. 新規追加欠陥描画位置決定処理のフローチャートである。It is a flowchart of new addition defect drawing position determination processing. 教示用原画像に新規追加教示用欠陥を配置した新規欠陥追加教示用画像を示す。A new defect additional teaching image in which a new additional teaching defect is arranged in the teaching original image is shown. 教示用原画像に対し欠陥領域を設定した欠陥領域設定画像である。It is a defect area setting image in which a defect area is set for a teaching original image. 本実施の形態における教示用画像生成装置の機能ブロック図である。It is a functional block diagram of the teaching image generation apparatus in the present embodiment. 本実施の形態における教示用画像生成装置の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the image generation apparatus for teaching in this Embodiment. 新規欠陥追加教示用画像生成処理Aのフローチャートである。It is a flowchart of the image generation process A for new defect addition teaching. 一例としての新規追加教示用欠陥リストテーブルを示す図である。It is a figure which shows the defect list table for newly added teachings as an example. 本実施の形態で生成された新規欠陥追加教示用画像を示す図である。It is a figure which shows the image for a new defect addition teaching produced | generated in this Embodiment. 本実施の形態における教示用画像生成装置の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the image generation apparatus for teaching in this Embodiment. 新規欠陥追加教示用画像生成処理Bのフローチャートである。It is a flowchart of the image generation process B for new defect addition teaching. 本実施の形態における新規欠陥追加用画像および新規欠陥追加教示用画像を示す。The image for new defect addition and the image for new defect addition teaching in this Embodiment are shown. 本実施の形態における画像処理アルゴリズム生成装置の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the image processing algorithm production | generation apparatus in this Embodiment. 画像処理アルゴリズム生成処理のフローチャートである。It is a flowchart of an image processing algorithm generation process. フィルタテーブルを示す。A filter table is shown. 本実施の形態において生成された個体を示す図である。It is a figure which shows the individual | organism | solid produced | generated in this Embodiment. 本実施の形態における処理対象画像および教示用目標画像を示す図である。It is a figure which shows the process target image and the target image for teaching in this Embodiment. 次世代画像処理アルゴリズム生成処理のフローチャートである。It is a flowchart of a next-generation image processing algorithm generation process. 本実施の形態における交叉または突然変異のための個体の選択手法の一例を示す図である。It is a figure which shows an example of the selection method of the individual for the crossover or mutation in this Embodiment. 交叉、突然変異を説明するための図である。It is a figure for demonstrating crossing and a mutation. 本実施の形態における画像処理アルゴリズム生成装置の機能ブロック図である。It is a functional block diagram of the image processing algorithm production | generation apparatus in this Embodiment. 従来手法および本実施の形態のそれぞれで100世代目の画像処理アルゴリズムを生成するのに要した時間を測定したシミュレーション結果である。It is the simulation result which measured the time required in order to produce | generate the image processing algorithm of the 100th generation in each of the conventional method and this Embodiment. 本実施の形態における画像検査装置の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the image inspection apparatus in this Embodiment. 画像検査処理のフローチャートである。It is a flowchart of an image inspection process. 本実施の形態における画像検査装置の機能ブロック図である。It is a functional block diagram of the image inspection apparatus in the present embodiment. 画像処理アルゴリズムを生成するために使用した異なる2つの処理対象画像を示す図である。It is a figure which shows two different process target images used in order to produce | generate an image processing algorithm. 異なる2つの画像処理アルゴリズムをそれぞれ使用した画像検査処理を行なった結果を示す表T400である。It is Table T400 which shows the result of having performed the image test | inspection process which each uses two different image processing algorithms. 異なる2つの画像処理アルゴリズムをそれぞれ使用した画像検査処理で使用した一例としての検査対象画像を示す図である。It is a figure which shows the test object image as an example used by the image test | inspection process which each uses two different image processing algorithms.

符号の説明Explanation of symbols

180,180A,180B 教示用画像生成プログラム、180C 画像処理アルゴリズム生成プログラム、180D 画像検査プログラム、182 教示用画像データベース、184 画像処理アルゴリズムデータベース、500,500A,500B 教示用画像生成装置、500C 画像処理アルゴリズム生成装置、500D 画像検査装置、510 制御部、520 記憶部、530 表示部、532 VDP、555,555A,555B,555C 記録媒体、600 画像データ入力部。   180, 180A, 180B Teaching image generation program, 180C image processing algorithm generation program, 180D image inspection program, 182 Teaching image database, 184 image processing algorithm database, 500, 500A, 500B Teaching image generation device, 500C image processing algorithm Generation device, 500D image inspection device, 510 control unit, 520 storage unit, 530 display unit, 532 VDP, 555, 555A, 555B, 555C recording medium, 600 image data input unit.

Claims (38)

教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する教示用画像生成方法であって、
前記検査領域を有する教示用画像を入力する工程と、
前記検査領域を指定する工程と、
前記指定された検査領域内の検査領域画像の特徴量を算出する工程と、
前記教示用画像内で画像を配置する位置を算出する工程と、
前記検査領域画像の特徴量を変化させた変化検査領域画像を生成する工程と、
前記算出された画像を配置する位置に前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する工程とを含む、教示用画像生成方法。
A teaching image generation method for generating a teaching image having an inspection region for processing by an algorithm that learns a target process in a self-developed manner in a teaching process,
Inputting a teaching image having the inspection area;
Designating the inspection area;
Calculating a feature amount of an inspection region image in the designated inspection region;
Calculating a position where the image is arranged in the teaching image;
Generating a change inspection region image in which the feature amount of the inspection region image is changed;
Generating a new defect addition teaching image in which the change inspection area image is arranged at a position where the calculated image is arranged.
ユーザによる指示を受付ける工程をさらに含み、
前記検査領域を指定する工程は、前記受付けたユーザの指示に基づいて、前記検査領域を指定する、請求項1に記載の教示用画像生成方法。
Further comprising receiving a user instruction,
The teaching image generation method according to claim 1, wherein the step of designating the inspection area designates the inspection area based on the received user instruction.
前記画像を配置する位置は、前記検査領域画像と重ならない位置である、請求項1または請求項2に記載の教示用画像生成方法。   The teaching image generation method according to claim 1, wherein a position where the image is arranged is a position that does not overlap the inspection region image. 前記検査領域画像の特徴量を算出する工程は、
前記検査領域画像の重心位置を算出する工程を含み、
前記画像を配置する位置を算出する工程は、前記画像を配置する位置を、算出された前記検査領域画像の重心位置を中心に近傍から探索して算出する、請求項1〜請求項3のいずれかに記載の教示用画像生成方法。
The step of calculating the feature amount of the inspection area image includes
Calculating a center of gravity position of the inspection region image,
The step of calculating the position where the image is to be arranged is calculated by searching for the position where the image is to be arranged from the vicinity around the calculated gravity center position of the inspection region image. The teaching image generating method according to claim 1.
前記検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、
前記変化検査領域画像を生成する工程は、前記検査領域が前記抽出すべき領域であると判定された場合、前記検査領域画像の面積を縮小させた前記変化検査領域画像を生成する、請求項1〜請求項4のいずれかに記載の教示用画像生成方法。
Further comprising determining whether the inspection area is an area to be extracted;
The step of generating the change inspection region image generates the change inspection region image in which the area of the inspection region image is reduced when it is determined that the inspection region is the region to be extracted. The teaching image generation method according to claim 4.
前記検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、
前記変化検査領域画像を生成する工程は、前記検査領域が前記抽出すべき領域でないと判定された場合、前記検査領域画像の面積を拡大させた前記変化検査領域画像を生成する、請求項1〜請求項4のいずれかに記載の教示用画像生成方法。
Further comprising determining whether the inspection area is an area to be extracted;
The step of generating the change inspection region image generates the change inspection region image in which the area of the inspection region image is enlarged when it is determined that the inspection region is not the region to be extracted. The teaching image generation method according to claim 4.
前記検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、
前記検査領域画像の特徴量を算出する工程は、
前記検査領域画像の重心位置を算出する工程を含み、
前記教示用画像を入力する工程は、前記検査領域が前記抽出すべき領域であると判定された場合、新たに、前記検査領域を有する新規教示用画像を入力し、
前記新規欠陥追加教示用画像を生成する工程は、前記新規教示用画像内の、前記検査領域画像の重心位置と対応する位置に、前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する、請求項1〜請求項3のいずれかに記載の教示用画像生成方法。
Further comprising determining whether the inspection area is an area to be extracted;
The step of calculating the feature amount of the inspection area image includes
Calculating a center of gravity position of the inspection region image,
In the step of inputting the teaching image, when it is determined that the inspection region is the region to be extracted, a new teaching image having the inspection region is newly input.
The step of generating the new defect addition teaching image generates a new defect addition teaching image in which the change inspection area image is arranged at a position corresponding to the center of gravity position of the inspection area image in the new teaching image. The teaching image generation method according to any one of claims 1 to 3.
前記検査領域が抽出すべき領域であるか否かを判定する工程をさらに含み、
前記検査領域画像の特徴量を算出する工程は、
前記検査領域画像の重心位置を算出する工程を含み、
前記教示用画像を入力する工程は、前記検査領域が前記抽出すべき領域であると判定された場合、新たに、前記検査領域を有する新規教示用画像を入力し、
前記新規教示用画像の前記検査領域が前記抽出すべき領域であるか否かを判定する工程をさらに含み、
前記新規欠陥追加教示用画像を生成する工程は、前記新規教示用画像の前記検査領域が前記抽出すべき領域でないと判定された場合、前記新規教示用画像内の、前記検査領域画像の重心位置と対応する位置に、前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する、請求項1〜請求項3のいずれかに記載の教示用画像生成方法。
Further comprising determining whether the inspection area is an area to be extracted;
The step of calculating the feature amount of the inspection area image includes
Calculating a center of gravity position of the inspection region image,
In the step of inputting the teaching image, when it is determined that the inspection region is the region to be extracted, a new teaching image having the inspection region is newly input.
Determining whether the inspection area of the new teaching image is the area to be extracted;
In the step of generating the new defect addition teaching image, when it is determined that the inspection area of the new teaching image is not the area to be extracted, the position of the center of gravity of the inspection area image in the new teaching image 4. The teaching image generation method according to claim 1, wherein a new defect addition teaching image in which the change inspection area image is arranged at a position corresponding to is generated. 5.
前記変化検査領域画像を生成する工程は、前記検査領域が前記抽出すべき領域であると判定された場合、前記検査領域画像の面積を縮小させた前記変化検査領域画像を生成する、請求項7または請求項8に記載の教示用画像生成方法。   The step of generating the change inspection region image generates the change inspection region image in which the area of the inspection region image is reduced when it is determined that the inspection region is the region to be extracted. Alternatively, the teaching image generation method according to claim 8. 前記変化検査領域画像を生成する工程は、前記検査領域が前記抽出すべき領域でないと判定された場合、前記検査領域画像の面積を拡大させた前記変化検査領域画像を生成する、請求項7または請求項8に記載の教示用画像生成方法。   The step of generating the change inspection region image generates the change inspection region image obtained by enlarging the area of the inspection region image when it is determined that the inspection region is not the region to be extracted. The teaching image generation method according to claim 8. 前記検査領域画像および前記変化検査領域画像の周囲に、それぞれ、第1および第2検査周囲領域を設定する工程と、
前記検査領域画像の第1濃度値と、前記第1検査周囲領域内の領域であって前記検査領域画像以外の背景領域の第1背景画像の第2濃度値と、前記第2検査周囲領域内の領域であって前記変化検査領域画像以外の背景領域の第2背景画像の第3濃度値とに基づいて、前記変化検査領域画像の第4濃度値を算出する工程とをさらに含む、請求項1〜請求項10のいずれかに記載の教示用画像生成方法。
Setting the first and second inspection surrounding areas around the inspection area image and the change inspection area image, respectively;
The first density value of the inspection area image, the second density value of the first background image in the background area other than the inspection area image, which is an area in the first inspection surrounding area, and in the second inspection surrounding area And calculating a fourth density value of the change inspection area image based on a third density value of a second background image of a background area other than the change inspection area image. The teaching image generation method according to claim 1.
前記第1濃度値は、前記検査領域画像の全画素の平均濃度値であり、
前記第2濃度値は、前記第1背景画像の全画素の平均濃度値であり、
前記第3濃度値は、前記第2背景画像の全画素の平均濃度値であり、
前記検査領域画像を、前記変化検査領域画像と同じサイズおよび形状にする工程と、
前記変化検査領域画像の前記第4濃度値を算出する工程は、前記変化検査領域画像の全画素の濃度値を、前記変化検査領域画像と同じサイズおよび形状にされた前記検査領域画像の全画素の濃度値にそれぞれ設定する工程と、
前記設定された前記変化検査領域画像の全画素の濃度値の平均値と前記第3濃度値との差の値と、前記第1濃度値と前記第2濃度値との差の値との差の値の絶対値が、所定値以下でない場合、前記所定値以下となるように、前記設定された前記変化検査領域画像の全画素の濃度値に、前記絶対値を加算または減算する工程とをさらに含む、請求項11に記載の教示用画像生成方法。
The first density value is an average density value of all pixels of the inspection area image;
The second density value is an average density value of all pixels of the first background image,
The third density value is an average density value of all pixels of the second background image;
Making the inspection area image the same size and shape as the change inspection area image;
The step of calculating the fourth density value of the change inspection area image includes setting the density values of all pixels of the change inspection area image to all pixels of the inspection area image having the same size and shape as the change inspection area image. A process for setting each density value,
The difference between the average value of the density values of all the pixels of the set change inspection region image and the third density value, and the difference value between the first density value and the second density value A step of adding or subtracting the absolute value to the density value of all the pixels of the set change inspection region image so that the absolute value of the value is not less than the predetermined value when the absolute value is not less than the predetermined value. The teaching image generation method according to claim 11, further comprising:
教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する教示用画像生成装置であって、
前記検査領域を有する教示用画像を入力する画像入力部と、
前記検査領域を指定する検査領域指定部と、
前記指定された検査領域内の検査領域画像の特徴量を算出する特徴量算出部と、
前記教示用画像内で画像を配置する位置を算出する位置算出部と、
前記検査領域画像の特徴量を変化させた変化検査領域画像を生成する変化検査領域画像生成部と、
前記算出された画像を配置する位置に前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する画像生成部とを備える、教示用画像生成装置。
A teaching image generating device for generating a teaching image having an inspection region for processing by an algorithm that learns a target process in a self-developed manner in a teaching process,
An image input unit for inputting a teaching image having the inspection region;
An inspection area designating unit for designating the inspection area;
A feature amount calculating unit for calculating a feature amount of an inspection region image in the designated inspection region;
A position calculation unit for calculating a position where the image is arranged in the teaching image;
A change inspection region image generation unit that generates a change inspection region image in which the feature amount of the inspection region image is changed;
An teaching image generation apparatus comprising: an image generation unit that generates a new defect addition teaching image in which the change inspection area image is arranged at a position where the calculated image is arranged.
ユーザによる指示を受付ける入力部をさらに備え、
前記検査領域指定部は、前記受付けたユーザの指示に基づいて、前記検査領域を指定する、請求項13に記載の教示用画像生成装置。
It further includes an input unit that receives instructions from the user,
The teaching image generation apparatus according to claim 13, wherein the inspection area specifying unit specifies the inspection area based on the received user instruction.
前記画像を配置する位置は、前記検査領域画像と重ならない位置である、請求項13または請求項14に記載の教示用画像生成装置。   The teaching image generation apparatus according to claim 13 or 14, wherein a position where the image is arranged is a position that does not overlap the inspection region image. 前記特徴量算出部は、前記検査領域画像の重心位置を算出し、
前記位置算出部は、前記画像を配置する位置を、算出された前記検査領域画像の重心位置を中心に近傍から探索して算出する、請求項13〜請求項15のいずれかに記載の教示用画像生成装置。
The feature amount calculation unit calculates a gravity center position of the inspection region image,
The teaching position according to any one of claims 13 to 15, wherein the position calculation unit searches for and calculates a position where the image is to be arranged from the vicinity around the calculated gravity center position of the inspection region image. Image generation device.
前記検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、
前記変化検査領域画像生成部は、前記検査領域が前記抽出すべき領域であると判定された場合、前記検査領域画像の面積を縮小させた前記変化検査領域画像を生成する、請求項13〜請求項16のいずれかに記載の教示用画像生成装置。
An inspection area determination unit that determines whether or not the inspection area is an area to be extracted;
The change inspection region image generation unit generates the change inspection region image in which the area of the inspection region image is reduced when it is determined that the inspection region is the region to be extracted. Item 17. The teaching image generation device according to any one of Items 16.
前記検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、
前記変化検査領域画像生成部は、前記検査領域が前記抽出すべき領域でないと判定された場合、前記検査領域画像の面積を拡大させた前記変化検査領域画像を生成する、請求項13〜請求項16のいずれかに記載の教示用画像生成装置。
An inspection area determination unit that determines whether or not the inspection area is an area to be extracted;
The change inspection region image generation unit generates the change inspection region image in which the area of the inspection region image is enlarged when it is determined that the inspection region is not the region to be extracted. The teaching image generation device according to any one of 16.
前記検査領域が抽出すべき領域であるか否かを判定する検査領域判定部をさらに備え、
前記特徴量算出部は、前記検査領域画像の重心位置を算出し、
前記画像入力部は、前記検査領域が前記抽出すべき領域であると判定された場合、新たに、前記検査領域を有する新規教示用画像を入力し、
前記画像生成部は、前記新規教示用画像内の、前記検査領域画像の重心位置と対応する位置に、前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する、請求項13〜請求項15のいずれかに記載の教示用画像生成装置。
An inspection area determination unit that determines whether or not the inspection area is an area to be extracted;
The feature amount calculation unit calculates a gravity center position of the inspection region image,
When it is determined that the inspection area is the area to be extracted, the image input unit newly inputs a new teaching image having the inspection area,
The image generation unit generates a new defect addition teaching image in which the change inspection region image is arranged at a position corresponding to the center of gravity of the inspection region image in the new teaching image. Item 16. The teaching image generation device according to any one of Items 15.
前記検査領域が抽出すべき領域であるか否かを判定する第1検査領域判定部をさらに備え、
前記特徴量算出部は、前記検査領域画像の重心位置を算出し、
前記画像入力部は、前記検査領域が前記抽出すべき領域であると判定された場合、新たに、前記検査領域を有する新規教示用画像を入力し、
前記新規教示用画像の前記検査領域が前記抽出すべき領域であるか否かを判定する第2検査領域判定部をさらに備え、
前記画像生成部は、前記新規教示用画像の前記検査領域が前記抽出すべき領域でないと判定された場合、前記新規教示用画像内の、前記検査領域画像の重心位置と対応する位置に、前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成する、請求項13〜請求項15のいずれかに記載の教示用画像生成装置。
A first inspection area determination unit that determines whether the inspection area is an area to be extracted;
The feature amount calculation unit calculates a gravity center position of the inspection region image,
When it is determined that the inspection area is the area to be extracted, the image input unit newly inputs a new teaching image having the inspection area,
A second inspection region determination unit that determines whether or not the inspection region of the new teaching image is the region to be extracted;
When it is determined that the inspection area of the new teaching image is not the area to be extracted, the image generation unit is located at a position corresponding to the center of gravity position of the inspection area image in the new teaching image. The teaching image generation apparatus according to any one of claims 13 to 15, which generates a new defect addition teaching image in which a change inspection area image is arranged.
前記検査領域画像および前記変化検査領域画像の周囲に、それぞれ、第1および第2検査周囲領域を設定する領域設定部と、
前記検査領域画像の第1濃度値と、前記第1検査周囲領域内の領域であって前記検査領域画像以外の背景領域の第1背景画像の第2濃度値と、前記第2検査周囲領域内の領域であって前記変化検査領域画像以外の背景領域の第2背景画像の第3濃度値とに基づいて、前記変化検査領域画像の第4濃度値を算出する濃度値算出部とをさらに備える、請求項13〜請求項20のいずれかに記載の教示用画像生成装置。
An area setting unit for setting first and second inspection surrounding areas around the inspection area image and the change inspection area image, respectively;
The first density value of the inspection area image, the second density value of the first background image in the background area other than the inspection area image, which is an area in the first inspection surrounding area, and in the second inspection surrounding area And a density value calculation unit that calculates a fourth density value of the change inspection area image based on a third density value of the second background image of the background area other than the change inspection area image. The teaching image generation apparatus according to any one of claims 13 to 20.
教示過程において自己発展的に目標となる処理を習得するアルゴリズムに処理させるための、検査領域を有する教示用画像を生成する処理をコンピュータに実行させるための教示用画像生成プログラムであって、
前記検査領域を有する教示用画像を入力するステップと、
前記検査領域を指定するステップと、
前記指定された検査領域内の検査領域画像の特徴量を算出するステップと、
前記教示用画像内で画像を配置する位置を算出するステップと、
前記検査領域画像の特徴量を変化させた変化検査領域画像を生成するステップと、
前記算出された画像を配置する位置に前記変化検査領域画像を配置した新規欠陥追加教示用画像を生成するステップとをコンピュータに実行させる、教示用画像生成プログラム。
A teaching image generation program for causing a computer to execute a process of generating a teaching image having an inspection area, in order to cause an algorithm that learns a self-developed target process in a teaching process.
Inputting a teaching image having the inspection region;
Designating the inspection area;
Calculating a feature amount of an inspection region image in the designated inspection region;
Calculating a position where the image is arranged in the teaching image;
Generating a changed inspection area image in which the feature amount of the inspection area image is changed;
A teaching image generation program causing a computer to execute a step of generating a new defect addition teaching image in which the change inspection area image is arranged at a position where the calculated image is arranged.
請求項21に記載の教示用画像生成プログラムを記録した、記録媒体。   A recording medium on which the teaching image generation program according to claim 21 is recorded. 予め準備された複数種類の画像処理フィルタを用いて、請求項1〜12のいずれかの教示用画像生成方法により生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する画像処理アルゴリズム生成方法であって、
複数の画像処理アルゴリズムを生成する工程を、所定の終了条件を満たすまで世代を変えながら繰り返す工程を含み、
前記所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、前記1以上の最終画像処理アルゴリズムであり、
前記複数の画像処理アルゴリズムの各々は、前記複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、
N(自然数)+1世代の前記複数の画像処理アルゴリズムを生成する工程は、
前記新規欠陥追加教示用画像に、N世代の前記複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成する工程と、
前記N世代の複数の画像処理アルゴリズムの各々に対し、前記目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出する工程と、
前記N世代の複数の画像処理アルゴリズムのうち、所定値以上の前記評価値が算出されたN世代の画像処理アルゴリズムを1以上選択する工程と、
前記選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、前記評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成する工程とを含む、画像処理アルゴリズム生成方法。
Using a plurality of types of image processing filters prepared in advance, a new defect addition teaching image having one or more inspection areas generated by the teaching image generation method according to any one of claims 1 to 12 is previously stored. An image processing algorithm generation method for generating one or more final image processing algorithms for generating an image corresponding to a prepared target image,
Including a step of generating a plurality of image processing algorithms by repeating generations until a predetermined end condition is satisfied,
The image processing algorithm generated in the generation that satisfies the predetermined end condition is the one or more final image processing algorithms,
Each of the plurality of image processing algorithms is an algorithm that uses a plurality of selected image processing filters selected from the plurality of types of image processing filters without hindering duplication in a random order;
The step of generating the plurality of image processing algorithms of N (natural number) +1 generation includes:
Generating a plurality of N generations of processed images obtained by performing processing of the plurality of image processing algorithms of N generations on the new defect addition teaching image;
For each of the N generation image processing algorithms, calculating an evaluation value serving as an evaluation reference based on the target image and a corresponding N generation processed image;
Selecting one or more N generation image processing algorithms for which the evaluation value equal to or greater than a predetermined value is selected from among the plurality of N generation image processing algorithms;
Generating an image processing algorithm in which each of the selected one or more N generation image processing algorithms is changed so that the evaluation value is high as an N + 1 generation image processing algorithm. Algorithm generation method.
前記所定の終了条件は、前記N世代の選択された1以上の画像処理アルゴリズムのいずれかの前記評価値が、所定値以上となる条件である、請求項24に記載の画像処理アルゴリズム生成方法。   25. The image processing algorithm generation method according to claim 24, wherein the predetermined end condition is a condition in which the evaluation value of any one or more of the N generations of selected image processing algorithms is a predetermined value or more. 前記複数の画像処理アルゴリズムのうち、前記N世代の選択された1以上の画像処理アルゴリズム以外の1以上の画像処理アルゴリズムを、進化的手法を用いてN+1世代の1以上の画像処理アルゴリズムとして生成する工程をさらに含む、請求項24または請求項25に記載の画像処理アルゴリズム生成方法。   Among the plurality of image processing algorithms, one or more image processing algorithms other than the N generation selected one or more image processing algorithms are generated as an N + 1 generation one or more image processing algorithms using an evolutionary method. The image processing algorithm generation method according to claim 24, further comprising a step. 前記進化的手法は、遺伝的アルゴリズムである、請求項26に記載の画像処理アルゴリズム生成方法。   The image processing algorithm generation method according to claim 26, wherein the evolutionary method is a genetic algorithm. 請求項1〜12のいずれかの教示用画像生成方法により生成された新規欠陥追加教示用画像の数が、新規欠陥追加教示用画像内の検査領域の数よりも多い、請求項24〜請求項27に記載の画像処理アルゴリズム生成方法。   The number of new defect addition teaching images generated by the teaching image generation method according to any one of claims 1 to 12 is greater than the number of inspection areas in the new defect addition teaching image. 27. The image processing algorithm generation method according to 27. 予め準備された複数種類の画像処理フィルタを用いて、請求項1〜11のいずれかの教示用画像生成方法により生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する画像処理アルゴリズム生成装置であって、
複数の画像処理アルゴリズムを生成するための画像処理アルゴリズム生成部を備え、
前記画像処理アルゴリズム生成部は、前記複数の画像処理アルゴリズムを生成する処理を、所定の終了条件を満たすまで世代を変えながら繰り返し、
前記所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、前記1以上の最終画像処理アルゴリズムであり、
前記複数の画像処理アルゴリズムの各々は、前記複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、
N(自然数)+1世代の前記複数の画像処理アルゴリズムを生成する工程は、
前記新規欠陥追加教示用画像に、N世代の前記複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成する画像データ変換部と、
前記N世代の複数の画像処理アルゴリズムの各々に対し、前記目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出する画像処理アルゴリズム性能評価部とをさらに備え、
前記画像処理アルゴリズム性能評価部は、前記N世代の複数の画像処理アルゴリズムのうち、所定値以上の前記評価値が算出されたN世代の画像処理アルゴリズムを1以上選択し、、
前記画像処理アルゴリズム生成部は、前記選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、前記評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成する、画像処理アルゴリズム生成装置。
A new defect addition teaching image having one or more inspection areas generated by the teaching image generating method according to any one of claims 1 to 11 using a plurality of types of image processing filters prepared in advance. An image processing algorithm generation device that generates one or more final image processing algorithms that generate an image corresponding to a prepared target image,
An image processing algorithm generation unit for generating a plurality of image processing algorithms;
The image processing algorithm generation unit repeats the process of generating the plurality of image processing algorithms while changing the generation until a predetermined end condition is satisfied,
The image processing algorithm generated in the generation that satisfies the predetermined end condition is the one or more final image processing algorithms,
Each of the plurality of image processing algorithms is an algorithm that uses a plurality of selected image processing filters selected from the plurality of types of image processing filters without hindering duplication in a random order;
The step of generating the plurality of image processing algorithms of N (natural number) +1 generation includes:
An image data conversion unit that generates a plurality of N generation post-processing images obtained by performing processing of the N generation of the plurality of image processing algorithms on the new defect addition teaching image;
For each of the N generations of image processing algorithms, an image processing algorithm performance evaluation unit that calculates an evaluation value serving as a reference for evaluation based on the target image and the corresponding N generations of processed images In addition,
The image processing algorithm performance evaluation unit selects one or more N generation image processing algorithms for which the evaluation value equal to or greater than a predetermined value is selected from the N generation image processing algorithms,
The image processing algorithm generation unit generates, as an N + 1 generation image processing algorithm, an image processing algorithm in which each of the selected one or more N generation image processing algorithms is changed so that the evaluation value increases. An image processing algorithm generation device.
前記所定の終了条件は、前記N世代の選択された1以上の画像処理アルゴリズムのいずれかの前記評価値が、所定値以上となる条件である、請求項29に記載の画像処理アルゴリズム生成装置。   30. The image processing algorithm generation device according to claim 29, wherein the predetermined end condition is a condition in which the evaluation value of any one or more of the N generations of selected image processing algorithms is equal to or greater than a predetermined value. 前記複数の画像処理アルゴリズムのうち、前記N世代の選択された1以上の画像処理アルゴリズム以外の1以上の画像処理アルゴリズムを、進化的手法を用いてN+1世代の1以上の画像処理アルゴリズムとして生成する進化的画像処理アルゴリズム生成部をさらに備える、請求項29または請求項30に記載の画像処理アルゴリズム生成装置。   Among the plurality of image processing algorithms, one or more image processing algorithms other than the N generation selected one or more image processing algorithms are generated as an N + 1 generation one or more image processing algorithms using an evolutionary method. The image processing algorithm generation apparatus according to claim 29 or 30, further comprising an evolutionary image processing algorithm generation unit. 請求項1〜12のいずれかの教示用画像生成方法により生成された新規欠陥追加教示用画像の数が、新規欠陥追加教示用画像内の検査領域の数よりも多い、請求項29〜請求項31に記載の画像処理アルゴリズム生成装置。   The number of new defect addition teaching images generated by the teaching image generation method according to any one of claims 1 to 12 is greater than the number of inspection areas in the new defect addition teaching image. 31. An image processing algorithm generation device according to 31. 予め準備された複数種類の画像処理フィルタを用いて、請求項22の教示用画像生成プログラムにより生成された、1以上の検査領域を有する新規欠陥追加教示用画像に対して予め準備された目標画像に相当する画像を生成するような1以上の最終画像処理アルゴリズムを生成する処理をコンピュータに実行させるための画像処理アルゴリズム生成プログラムであって、
複数の画像処理アルゴリズムを生成するステップと、
前記複数の画像処理アルゴリズムを生成するステップを、所定の終了条件を満たすまで世代を変えながら繰り返すステップとをコンピュータに実行させ、
前記所定の終了条件が満たされた世代で生成された画像処理アルゴリズムは、前記1以上の最終画像処理アルゴリズムであり、
前記複数の画像処理アルゴリズムの各々は、前記複数種類の画像処理フィルタから重複を妨げないで選択した複数の選択画像処理フィルタを、ランダムな順序で使用するアルゴリズムであり、
N(自然数)+1世代の前記複数の画像処理アルゴリズムを生成するステップは、
前記新規欠陥追加教示用画像に、N世代の前記複数の画像処理アルゴリズムの処理をそれぞれ施したN世代の複数の処理後画像を生成するステップと、
前記N世代の複数の画像処理アルゴリズムの各々に対し、前記目標画像と、対応するN世代の処理後画像とに基づいて、評価の基準となる評価値を算出するステップと、
前記N世代の複数の画像処理アルゴリズムのうち、所定値以上の前記評価値が算出されたN世代の画像処理アルゴリズムを1以上選択するステップと、
前記選択された1以上のN世代の複数の画像処理アルゴリズムの各々を、前記評価値が高くなるように変化させた画像処理アルゴリズムをN+1世代の画像処理アルゴリズムとして生成するステップとを含む、画像処理アルゴリズム生成プログラム。
A target image prepared in advance for a new defect addition teaching image having one or more inspection areas generated by the teaching image generation program of claim 22 using a plurality of types of image processing filters prepared in advance. An image processing algorithm generation program for causing a computer to execute processing for generating one or more final image processing algorithms for generating an image corresponding to
Generating a plurality of image processing algorithms;
Repeating the step of generating the plurality of image processing algorithms while changing the generation until a predetermined end condition is satisfied,
The image processing algorithm generated in the generation that satisfies the predetermined end condition is the one or more final image processing algorithms,
Each of the plurality of image processing algorithms is an algorithm that uses a plurality of selected image processing filters selected from the plurality of types of image processing filters without hindering duplication in a random order;
The step of generating the plurality of image processing algorithms of N (natural number) +1 generation includes:
Generating a plurality of N generations of processed images obtained by performing processing of the plurality of image processing algorithms of N generations on the new defect addition teaching image;
For each of the N generation image processing algorithms, calculating an evaluation value serving as a reference for evaluation based on the target image and a corresponding N generation processed image;
Selecting one or more N generation image processing algorithms for which the evaluation value equal to or greater than a predetermined value is selected from among the plurality of N generation image processing algorithms;
Generating an image processing algorithm in which each of the selected one or more N generation image processing algorithms is changed so that the evaluation value becomes high as an N + 1 generation image processing algorithm. Algorithm generator.
請求項33に記載の画像処理アルゴリズム生成プログラムを記録した、記録媒体。   A recording medium on which the image processing algorithm generation program according to claim 33 is recorded. 請求項24〜28のいずれかに記載の画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する工程を含む、画像検査方法。   An image inspection method including a step of determining pass / fail of an image to be inspected using the image processing algorithm generated by the image processing algorithm generation method according to claim 24. 請求項24〜28のいずれかに記載の画像処理アルゴリズム生成方法により生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定する画像良否判定部を含む、画像検査装置。   An image inspection apparatus including an image quality determination unit that determines quality of an inspection target image using the image processing algorithm generated by the image processing algorithm generation method according to claim 24. 請求項33に記載の画像処理アルゴリズム生成プログラムにより生成された画像処理アルゴリズムを用いて、検査対象画像の良否を判定するステップをコンピュータに実行させる、画像検査プログラム。   An image inspection program for causing a computer to execute a step of determining pass / fail of an image to be inspected using the image processing algorithm generated by the image processing algorithm generation program according to claim 33. 請求項37に記載の画像検査プログラムを記録した、記録媒体。   A recording medium on which the image inspection program according to claim 37 is recorded.
JP2005161636A 2005-06-01 2005-06-01 Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium Pending JP2006337152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005161636A JP2006337152A (en) 2005-06-01 2005-06-01 Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005161636A JP2006337152A (en) 2005-06-01 2005-06-01 Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium

Publications (1)

Publication Number Publication Date
JP2006337152A true JP2006337152A (en) 2006-12-14

Family

ID=37557840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005161636A Pending JP2006337152A (en) 2005-06-01 2005-06-01 Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium

Country Status (1)

Country Link
JP (1) JP2006337152A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009294170A (en) * 2008-06-09 2009-12-17 Sharp Corp Apparatus, method, and program for defect detection and recording medium
JP2015069239A (en) * 2013-09-26 2015-04-13 株式会社Screenホールディングス Target image generation support device, target image generation support method, and program
JP2015069238A (en) * 2013-09-26 2015-04-13 株式会社Screenホールディングス Target image generation support device, target image generation support method, and program
WO2016051640A1 (en) * 2014-09-30 2016-04-07 ソニー株式会社 Information processing device, information processing method, and program
WO2017203600A1 (en) * 2016-05-24 2017-11-30 株式会社日立ハイテクノロジーズ Defect classification device and defect classification method
JPWO2017109854A1 (en) * 2015-12-22 2018-10-11 オリンパス株式会社 Learning image automatic selection device, learning image automatic selection method, and learning image automatic selection program
JP2020060879A (en) * 2018-10-05 2020-04-16 オムロン株式会社 Learning device, image generator, method for learning, and learning program
WO2020262571A1 (en) * 2019-06-28 2020-12-30 富士フイルム株式会社 Learning image generation device, method and program , and learning method, device and program
JPWO2019167277A1 (en) * 2018-03-02 2021-02-12 日本電気株式会社 Image collection device, image collection system, image collection method, image generation device, image generation system, image generation method, and program
JP2021017296A (en) * 2019-07-17 2021-02-15 Jfeスチール株式会社 Method and apparatus for monitoring belt abnormality for belt conveyor
KR20210119883A (en) 2020-03-25 2021-10-06 도쿄엘렉트론가부시키가이샤 Abnormality detection apparatus and abnormality detection method
JP7468088B2 (en) 2020-02-18 2024-04-16 東洋製罐グループホールディングス株式会社 Image processing system and image processing program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05149728A (en) * 1991-10-04 1993-06-15 Omron Corp Visually recognizing device
JPH08272971A (en) * 1995-03-31 1996-10-18 Toyota Motor Corp Object recognizing method
JPH11282822A (en) * 1998-03-26 1999-10-15 Toshiba Corp Image processing program combination method and device and optimum solution searching method and device
JP2000057349A (en) * 1998-08-10 2000-02-25 Hitachi Ltd Method for sorting defect, device therefor and method for generating data for instruction
JP2006048370A (en) * 2004-08-04 2006-02-16 Kagawa Univ Method for recognizing pattern, method for generating teaching data to be used for the method and pattern recognition apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05149728A (en) * 1991-10-04 1993-06-15 Omron Corp Visually recognizing device
JPH08272971A (en) * 1995-03-31 1996-10-18 Toyota Motor Corp Object recognizing method
JPH11282822A (en) * 1998-03-26 1999-10-15 Toshiba Corp Image processing program combination method and device and optimum solution searching method and device
JP2000057349A (en) * 1998-08-10 2000-02-25 Hitachi Ltd Method for sorting defect, device therefor and method for generating data for instruction
JP2006048370A (en) * 2004-08-04 2006-02-16 Kagawa Univ Method for recognizing pattern, method for generating teaching data to be used for the method and pattern recognition apparatus

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009294170A (en) * 2008-06-09 2009-12-17 Sharp Corp Apparatus, method, and program for defect detection and recording medium
JP2015069239A (en) * 2013-09-26 2015-04-13 株式会社Screenホールディングス Target image generation support device, target image generation support method, and program
JP2015069238A (en) * 2013-09-26 2015-04-13 株式会社Screenホールディングス Target image generation support device, target image generation support method, and program
US11232353B2 (en) 2014-09-30 2022-01-25 Sony Corporation Information processing apparatus and information processing method to generate image processing algorithm based on machine learning process
WO2016051640A1 (en) * 2014-09-30 2016-04-07 ソニー株式会社 Information processing device, information processing method, and program
US10360515B2 (en) 2014-09-30 2019-07-23 Sony Corporation Information processing apparatus and information processing method to generate image processing algorithm based on achine learning process
JPWO2017109854A1 (en) * 2015-12-22 2018-10-11 オリンパス株式会社 Learning image automatic selection device, learning image automatic selection method, and learning image automatic selection program
WO2017203600A1 (en) * 2016-05-24 2017-11-30 株式会社日立ハイテクノロジーズ Defect classification device and defect classification method
US10810733B2 (en) 2016-05-24 2020-10-20 Hitachi High-Tech Corporation Defect classification apparatus and defect classification method
JPWO2019167277A1 (en) * 2018-03-02 2021-02-12 日本電気株式会社 Image collection device, image collection system, image collection method, image generation device, image generation system, image generation method, and program
JP2020060879A (en) * 2018-10-05 2020-04-16 オムロン株式会社 Learning device, image generator, method for learning, and learning program
JP7059883B2 (en) 2018-10-05 2022-04-26 オムロン株式会社 Learning device, image generator, learning method, and learning program
JPWO2020262571A1 (en) * 2019-06-28 2020-12-30
WO2020262571A1 (en) * 2019-06-28 2020-12-30 富士フイルム株式会社 Learning image generation device, method and program , and learning method, device and program
JP7307166B2 (en) 2019-06-28 2023-07-11 富士フイルム株式会社 LEARNING IMAGE GENERATION DEVICE, METHOD AND PROGRAM, AND LEARNING METHOD, DEVICE AND PROGRAM
JP2021017296A (en) * 2019-07-17 2021-02-15 Jfeスチール株式会社 Method and apparatus for monitoring belt abnormality for belt conveyor
JP7052778B2 (en) 2019-07-17 2022-04-12 Jfeスチール株式会社 Belt conveyor belt abnormality monitoring method and belt abnormality monitoring device
JP7468088B2 (en) 2020-02-18 2024-04-16 東洋製罐グループホールディングス株式会社 Image processing system and image processing program
KR20210119883A (en) 2020-03-25 2021-10-06 도쿄엘렉트론가부시키가이샤 Abnormality detection apparatus and abnormality detection method
US11928810B2 (en) 2020-03-25 2024-03-12 Tokyo Electron Limited Abnormality detection apparatus and abnormality detection method

Similar Documents

Publication Publication Date Title
JP2006337152A (en) Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium
JP6573226B2 (en) DATA GENERATION DEVICE, DATA GENERATION METHOD, AND DATA GENERATION PROGRAM
US11176650B2 (en) Data generation apparatus, data generation method, and data generation program
WO2019183153A1 (en) Training a machine learning model with synthetic images
TWI670781B (en) Iterative defect filtering process
US7231079B2 (en) Method and system for inspecting electronic circuit pattern
JP2024509411A (en) Defect detection method, device and system
TW202012920A (en) Method and syetem for inspecting a wafer
JP2020027424A (en) Learning data generating device, discrimination model generating device, and program
CN110291621B (en) Method and system for identifying integrated circuit defects
JP4617970B2 (en) Defect inspection apparatus and defect inspection method
JP2010157154A (en) Image classification criterion update method, program and image classification device
JP2003059984A (en) Method for analyzing defect data, inspection equipment and review system
JP4521386B2 (en) Defect data analysis method and apparatus
JP2006293528A (en) Method and apparatus for selecting learning image, and method, apparatus, program and recording medium for creating image processing algorithm
WO2017109918A1 (en) Image processing device, image processing method, and image processing program
TW202209153A (en) Automatic optimization of an examination recipe
JP2014137284A (en) Teacher data creation support device, teacher data creation device, image classification device, teacher data creation support method, teacher data creation method and image classification method
CN113116377B (en) Ultrasonic imaging navigation method, ultrasonic equipment and storage medium
JP3756507B1 (en) Image processing algorithm evaluation method and apparatus, image processing algorithm generation method and apparatus, program, and program recording medium
CN112330594A (en) Paper tube defect detection method and device, electronic equipment and storage medium
US20200279359A1 (en) Inspection apparatus, inspection method, and non-volatile storage medium
JP2010071826A (en) Teacher data preparation method, and image sorting method and image sorter
JP2007198912A (en) Image inspection device, image inspection method, program for allowing computer to function as image inspection device and recording medium
JP2006292615A (en) Visual examination apparatus, visual inspection method, program for making computer function as visual inspection apparatus, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070822

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100601

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101019