JP2017122682A - Visual inspection device, visual inspection method, and computer program executable by controller used in visual inspection device - Google Patents

Visual inspection device, visual inspection method, and computer program executable by controller used in visual inspection device Download PDF

Info

Publication number
JP2017122682A
JP2017122682A JP2016002458A JP2016002458A JP2017122682A JP 2017122682 A JP2017122682 A JP 2017122682A JP 2016002458 A JP2016002458 A JP 2016002458A JP 2016002458 A JP2016002458 A JP 2016002458A JP 2017122682 A JP2017122682 A JP 2017122682A
Authority
JP
Japan
Prior art keywords
imaging
measurement
image data
flow
module
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.)
Granted
Application number
JP2016002458A
Other languages
Japanese (ja)
Other versions
JP6608708B2 (en
Inventor
佐藤 秀明
Hideaki Sato
秀明 佐藤
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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2016002458A priority Critical patent/JP6608708B2/en
Publication of JP2017122682A publication Critical patent/JP2017122682A/en
Application granted granted Critical
Publication of JP6608708B2 publication Critical patent/JP6608708B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a visual inspection device, a visual inspection method, and a computer program with which it is possible to improve inspection tact as a whole, even for a complicated processing sequence in which imaging is performed a number of times with a plurality of different imaging parameters.SOLUTION: A controller according to the present invention generates an imaging flow by extracting a plurality of imaging modules included in a processing flow while maintaining their relative order, and a measurement flow for executing measurement processing by a measurement module on the basis of stored image data. An inspection object is imaged by each of the plurality of imaging modules in correlation to a parameter assigned to each of the plurality of imaging modules. Measurement processing is executed by the measurement module on image data, out of the image data imaged by the imaging modules correlated to parameters and stored and matched in the correlated parameter.SELECTED DRAWING: Figure 3

Description

本発明は、複数の異なる撮像パラメータで撮像が複数回行われる複雑な処理シーケンスであっても、全体として検査タクトを向上させることができる外観検査装置、外観検査方法及び該外観検査装置に用いるコントローラで実行することが可能なコンピュータプログラムに関する。   The present invention provides an appearance inspection apparatus, an appearance inspection method, and a controller used in the appearance inspection apparatus capable of improving the inspection tact as a whole even in a complicated processing sequence in which imaging is performed a plurality of times with a plurality of different imaging parameters. The present invention relates to a computer program that can be executed on the computer.

検査対象物の外観検査を実行する場合、生産ライン上を流れてくる検査対象物の表面を撮像し、撮像された画像に基づいて検査対象物の位置ずれの有無、欠陥の有無等の検査を行い、検査対象物の良否判定を行っている(特許文献1参照)。外観検査装置によっては、ユーザが作成した各画像処理の処理手順(以下、処理フロー)をカスタマイズすることで、ユーザのニーズに合わせた外観検査を行うことができる。   When performing an appearance inspection of an inspection object, the surface of the inspection object flowing on the production line is imaged, and the inspection object is inspected for the presence or absence of a displacement, the presence or absence of defects, etc. based on the captured image. And the quality of the inspection object is determined (see Patent Document 1). Depending on the appearance inspection apparatus, it is possible to perform an appearance inspection that meets the needs of the user by customizing the processing procedure (hereinafter, processing flow) of each image processing created by the user.

この場合、ユーザは、処理フローのカスタマイズ専用のソフトウェア上において、各画像処理に対応付けられた複数の処理ユニットを所望の処理シーケンスに合致するように配置することで所望の処理手順を作成する。その後、作成した処理手順をコントローラにおいて実行することが可能な制御プログラムを作成してコントローラに転送する。コントローラは、各画像処理を所望の処理手順と同期させて実行する。   In this case, the user creates a desired processing procedure by arranging a plurality of processing units associated with each image processing so as to match a desired processing sequence on software dedicated to customization of the processing flow. Thereafter, a control program capable of executing the created processing procedure in the controller is created and transferred to the controller. The controller executes each image processing in synchronization with a desired processing procedure.

特開2009−116381号公報JP 2009-116381 A

一周期分の処理シーケンスに要する時間を短縮することは、検査タクトのさらなる向上に寄与する。例えば処理シーケンスが、撮像ユニットと計測ユニットとを、この順番に1個ずつ配置している場合、計測ユニットにおける計測処理が完了する前に次の処理シーケンスにおける撮像ユニットにおける撮像処理を実行することで、一周期分の処理シーケンスに要する時間を短縮することができる。   Reducing the time required for the processing sequence for one cycle contributes to further improvement in inspection tact. For example, when the processing sequence includes an imaging unit and a measurement unit one by one in this order, the imaging process in the imaging unit in the next processing sequence is executed before the measurement process in the measurement unit is completed. The time required for the processing sequence for one cycle can be shortened.

そのため、計測ユニットにおける計測処理の実行中に、次の処理シーケンスのための撮像処理を実行し、取得した画像データをバッファに一時記憶する。しかし、一時記憶された画像データは、現在実行されている処理シーケンスの撮像ユニットにおいて設定されているシャッター速度、照明方法等の撮像パラメータにより撮像された画像データである。したがって、例えば次の処理シーケンスにおける撮像ユニットで設定されている撮像パラメータが相違する場合には、一時記憶する画像データ自体を次の処理シーケンスでは使用することができず、全体として処理時間を短縮することができないという問題点があった。特に、1つの処理シーケンスの中に複数の撮像ユニットが存在する場合には、それぞれの撮像ユニット間で正しいパラメータに切り替えることが困難になる。   Therefore, during the execution of the measurement process in the measurement unit, the imaging process for the next process sequence is executed, and the acquired image data is temporarily stored in the buffer. However, the temporarily stored image data is image data captured with imaging parameters such as a shutter speed and an illumination method set in the imaging unit of the currently executed processing sequence. Therefore, for example, when the imaging parameters set in the imaging unit in the next processing sequence are different, the temporarily stored image data itself cannot be used in the next processing sequence, and the processing time is shortened as a whole. There was a problem that it was not possible. In particular, when there are a plurality of imaging units in one processing sequence, it is difficult to switch to the correct parameters between the imaging units.

本発明は、上記事情に鑑みてなされたものであり、複数の異なる撮像パラメータで撮像が複数回行われる複雑な処理シーケンスであっても、全体として検査タクトを向上させることができる外観検査装置、外観検査方法及び該外観検査装置に用いるコントローラで実行することが可能なコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and an appearance inspection apparatus capable of improving inspection tact as a whole even in a complicated processing sequence in which imaging is performed a plurality of times with a plurality of different imaging parameters, It is an object of the present invention to provide an appearance inspection method and a computer program that can be executed by a controller used in the appearance inspection apparatus.

上記目的を達成するために第1発明に係る外観検査装置は、検査対象物を撮像して画像データを生成する撮像手段と、該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラとを有し、前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置において、前記処理モジュールは、少なくとも前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、記憶されている画像データに対して計測を実行する計測モジュールとを含み、前記コントローラは、処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するフロー生成手段と、生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像する撮像フロー実行手段と、前記フロー生成手段で生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段と、計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する良否判定手段とを備えることを特徴とする。   In order to achieve the above object, an appearance inspection apparatus according to a first aspect of the present invention performs imaging processing based on image data generated by an imaging unit that images an inspection object and generates image data. A visual inspection apparatus that executes a plurality of processing modules to which parameters are assigned in synchronization with a processing flow according to a control program. An imaging module that images at least the inspection object by the imaging means and stores the generated image data; and a measurement module that performs measurement on the stored image data, and the controller has a processing flow An imaging flow by storing a plurality of the imaging modules included in an image while maintaining a relative order; A flow generation unit that generates a measurement flow for executing measurement processing in the measurement module based on the image data that has been recorded, and the parameters assigned to each of the plurality of imaging modules according to the generated imaging flow In association with each other, an imaging flow execution unit that images each of the inspection objects with the plurality of imaging modules, and the imaging module that is associated with the parameter is captured and stored in accordance with the measurement flow generated by the flow generation unit. Based on the execution result of the measurement process in the measurement flow, the measurement flow execution means for executing the measurement process by the measurement module with respect to the image data in which the associated parameters match, A pass / fail judgment means for judging pass / fail of the inspection object. The features.

次に、上記目的を達成するために第2発明に係る外観検査装置は、検査対象物を撮像して画像データを生成する撮像手段と、該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラとを有し、前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置において、前記処理モジュールは、少なくとも前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、記憶されている画像データに対して計測を実行する計測モジュールとを含み、前記コントローラは、処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持しつつ、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像して記憶する撮像実行手段と、前記パラメータに対応付けられた、記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段と、計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する良否判定手段とを備えることを特徴とする。   Next, in order to achieve the above object, an appearance inspection apparatus according to a second aspect of the present invention includes an imaging unit that images an inspection object and generates image data, and image processing based on the image data generated by the imaging unit A visual inspection apparatus that executes a plurality of processing modules assigned parameters according to a control program in synchronization with a processing flow. The processing module includes at least an imaging module that images an inspection object by the imaging unit and stores the generated image data, and a measurement module that performs measurement on the stored image data, and the controller The plurality of the imaging modules included in the processing flow while maintaining the relative order. Among the stored image data associated with the parameters, imaging execution means for capturing and storing the inspection object by the plurality of imaging modules in association with the parameters allocated to each of the parameters The measurement flow execution means for executing the measurement process by the measurement module on the image data having the matched parameters, and the quality of the inspection object is determined based on the execution result of the measurement process in the measurement flow And a pass / fail judgment means.

また、第3発明に係る外観検査装置は、第1又は第2発明において、先行する処理モジュールの実行結果に依存するか否かに基づいて、前記撮像モジュールの処理の実行を待機するか否かを決定することが好ましい。   Further, in the first or second invention, the appearance inspection apparatus according to the third invention waits for execution of the processing of the imaging module based on whether or not it depends on the execution result of the preceding processing module. Is preferably determined.

また、第4発明に係る外観検査装置は、第3発明において、先行する処理モジュールが前記計測モジュールである場合、前記撮像モジュールの処理の実行を前記計測モジュールの処理の実行が終了するまで待機することが好ましい。   In the visual inspection apparatus according to the fourth aspect of the present invention, when the preceding processing module is the measurement module in the third aspect, the process of the imaging module waits until the execution of the process of the measurement module is completed. It is preferable.

また、第5発明に係る外観検査装置は、第3発明において、先行する処理モジュールが前記撮像モジュールである場合、先行する前記撮像モジュールの処理の実行が終了したときに、次の前記撮像モジュールの処理の実行を開始することが好ましい。   Further, in the appearance inspection apparatus according to the fifth invention, in the third invention, when the preceding processing module is the imaging module, the execution of the processing of the preceding imaging module is completed when the preceding imaging module is finished. It is preferable to start execution of the process.

次に、上記目的を達成するために第6発明に係る外観検査方法は、検査対象物を撮像して画像データを生成する撮像手段と、該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラとを有し、前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能な外観検査方法において、前記処理モジュールは、少なくとも前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、記憶されている画像データに対して計測を実行する計測モジュールとを含み、前記コントローラは、処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するステップと、生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像するステップと、生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行するステップと、計測フローにおける実行結果に基づいて、検査対象物の良否を判定するステップとを含むことを特徴とする。   Next, in order to achieve the above object, an appearance inspection method according to a sixth aspect of the invention includes an imaging unit that images an inspection target and generates image data, and image processing based on the image data generated by the imaging unit. And a controller that determines whether the inspection object is good or not, and the controller executes, in accordance with the control program, a plurality of processing modules assigned with parameters in synchronization with the processing flow. In the visual inspection method, the processing module images at least the inspection object by the imaging unit, stores the generated image data, and performs measurement on the stored image data A measurement module that performs a relative order of the plurality of imaging modules included in the processing flow. Generating an imaging flow and a measurement flow for performing measurement processing in the measurement module based on stored image data, and a plurality of the imaging according to the generated imaging flow In accordance with the parameter assigned to each module, the imaging module associated with the parameter is imaged in accordance with the step of imaging each inspection object by the plurality of imaging modules and the generated measurement flow. Among the stored image data, the step of executing the measurement process by the measurement module on the image data corresponding to the corresponding parameter and the execution result in the measurement flow, And a step of determining pass / fail.

次に、上記目的を達成するために第7発明に係る外観検査方法は、検査対象物を撮像して画像データを生成する撮像手段と、該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラとを有し、前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能な外観検査方法において、前記処理モジュールは、少なくとも前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、記憶されている画像データに対して計測を実行する計測モジュールとを含み、前記コントローラは、処理フローに含まれる複数の前記撮像モジュールの相対的な実行順序を維持しつつ、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像して記憶するステップと、前記パラメータに対応付けられた、記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行するステップと、計測フローにおける実行結果に基づいて、検査対象物の良否を判定するステップとを含むことを特徴とする。   Next, in order to achieve the above object, an appearance inspection method according to a seventh aspect of the invention includes an imaging unit that images an inspection object and generates image data, and image processing based on the image data generated by the imaging unit. And a controller that determines whether the inspection object is good or not, and the controller executes, in accordance with the control program, a plurality of processing modules assigned with parameters in synchronization with the processing flow. In the visual inspection method, the processing module images at least the inspection object by the imaging unit, stores the generated image data, and performs measurement on the stored image data A measurement module that performs a relative execution order of the plurality of imaging modules included in the processing flow. Maintaining each of the images, and in association with the parameters assigned to each of the plurality of imaging modules, respectively, imaging and storing the inspection object by the plurality of imaging modules, Based on the step of executing measurement processing by the measurement module on the image data in which the associated parameter matches among the stored image data, and the quality of the inspection object based on the execution result in the measurement flow And a step of determining.

また、第8発明に係る外観検査方法は、第6又は第7発明において、先行する処理モジュールの実行結果に依存するか否かに基づいて、前記撮像モジュールの処理の実行を待機するか否かを決定することが好ましい。   Further, in the sixth or seventh invention, the appearance inspection method according to the eighth invention is to wait for execution of the processing of the imaging module based on whether or not it depends on the execution result of the preceding processing module. Is preferably determined.

また、第9発明に係る外観検査方法は、第8発明において、先行する処理モジュールが前記計測モジュールである場合、前記撮像モジュールの処理の実行を前記計測モジュールの処理の実行が終了するまで待機することが好ましい。   In the visual inspection method according to the ninth invention, in the eighth invention, when the preceding processing module is the measurement module, the process of the imaging module is waited until the execution of the process of the measurement module is completed. It is preferable.

また、第10発明に係る外観検査方法は、第8発明において、先行する処理モジュールが前記撮像モジュールである場合、先行する前記撮像モジュールの処理の実行が終了したときに、次の前記撮像モジュールの処理の実行を開始することが好ましい。   The visual inspection method according to a tenth aspect of the present invention is the visual inspection method according to the eighth aspect, wherein when the preceding processing module is the imaging module, the execution of the processing of the preceding imaging module is terminated. It is preferable to start execution of the process.

次に、上記目的を達成するために第11発明に係るコンピュータプログラムは、検査対象物を撮像して画像データを生成する撮像手段と、該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラとを有し、前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能なコンピュータプログラムにおいて、前記処理モジュールは、少なくとも前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、記憶されている画像データに対して計測を実行する計測モジュールとを含み、前記コントローラを、処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するフロー生成手段、生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像する撮像フロー実行手段、前記フロー生成手段で生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段、及び計測フローにおける実行結果に基づいて、検査対象物の良否を判定する良否判定手段として機能させることを特徴とする。   Next, in order to achieve the above object, a computer program according to an eleventh aspect of the present invention provides an image pickup unit that picks up an image of an inspection object and generates image data, and performs image processing based on the image data generated by the image pickup unit. A controller that executes and determines whether the inspection object is good or not, and the controller executes the plurality of processing modules to which the parameters are assigned according to the control program in synchronization with the processing flow. In the computer program capable of processing, the processing module images at least the inspection object by the imaging unit, stores the generated image data, and performs measurement on the stored image data. A plurality of the imaging modules included in the processing flow. A flow generation unit that generates an imaging flow and a measurement flow for executing a measurement process in the measurement module based on stored image data In accordance with the imaging flow, in association with the parameters assigned to each of the plurality of imaging modules, imaging flow execution means for imaging the inspection object by the plurality of imaging modules, and measurement generated by the flow generation means According to the flow, out of image data captured and stored by the imaging module associated with the parameter, the measurement module executes measurement processing on image data that matches the associated parameter. Based on the measurement flow execution means and the execution result in the measurement flow, Characterized in that to function as quality determining means for determining the quality of 査 object.

第1発明、第6発明及び第11発明では、コントローラは、処理フローに含まれる複数の撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて計測モジュールで計測処理を実行する計測フローとを生成する。生成された撮像フローに従って、複数の撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の撮像モジュールにより検査対象物をそれぞれ撮像する。生成された計測フローに従って、パラメータに対応付けられた撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられているパラメータが一致する画像データに対して計測モジュールにより計測処理を実行する。計測フローにおける実行結果に基づいて、検査対象物の良否を判定する。これにより、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでと、それ以降とに分割し、画像データごとに撮像時のパラメータ(撮像手段の設定パラメータ)を対応付けているので、計測フローにおいてパラメータが正しくない画像データを用いて計測処理を実行することがない。また、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができる。したがって、全体として検査タクトを縮小することが可能となる。なお、処理フローとは、ユーザが検査対象物の外観検査のために作成した処理フローを意味している。   In the first invention, the sixth invention, and the eleventh invention, the controller extracts a plurality of imaging modules included in the processing flow while maintaining a relative order, and based on the imaging flow and stored image data. And a measurement flow for executing a measurement process in the measurement module. According to the generated imaging flow, the inspection object is imaged by each of the plurality of imaging modules in association with the parameter assigned to each of the plurality of imaging modules. In accordance with the generated measurement flow, measurement processing is executed by the measurement module on image data that matches the associated parameter among the image data captured and stored by the imaging module associated with the parameter. . The quality of the inspection object is determined based on the execution result in the measurement flow. As a result, the function of the imaging module is divided into until the image of the inspection object is captured and the image data is stored, and thereafter, and the parameters at the time of imaging (setting parameters of the imaging means) are associated with each image data. Therefore, measurement processing is not executed using image data with incorrect parameters in the measurement flow. In addition, since it is possible to move to the next imaging flow when the image data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. Therefore, the inspection tact can be reduced as a whole. The process flow means a process flow created by the user for the appearance inspection of the inspection object.

第2発明及び第7発明では、コントローラは、処理フローに含まれる複数の撮像モジュールの相対的な実行順序を維持しつつ、複数の撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の撮像モジュールにより検査対象物をそれぞれ撮像して記憶する。パラメータに対応付けられた、記憶されている画像データのうち、対応付けられているパラメータが一致する画像データに対して計測モジュールにより計測処理を実行する。計測フローにおける実行結果に基づいて、検査対象物の良否を判定する。これにより、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでと、それ以降とに分割して実行し、画像データごとに撮像時のパラメータ(撮像手段の設定パラメータ)を対応付けているので、計測フローにおいてパラメータが正しくない画像データを用いて計測処理を実行することがない。また、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができる。したがって、全体として検査タクトを縮小することが可能となる。   In the second and seventh aspects of the invention, the controller maintains a relative execution order of the plurality of imaging modules included in the processing flow, and associates a plurality of parameters with each of the parameters assigned to each of the plurality of imaging modules. Each imaging object is imaged and stored by each imaging module. Of the stored image data associated with the parameter, the measurement module performs measurement processing on the image data with which the associated parameter matches. The quality of the inspection object is determined based on the execution result in the measurement flow. Thereby, the function of the imaging module is executed by dividing the function of the imaging module until the imaging of the inspection object and storing the image data, and thereafter, and the parameters at the time of imaging (setting parameters of the imaging means) for each image data. Since they are associated, measurement processing is not executed using image data with incorrect parameters in the measurement flow. In addition, since it is possible to move to the next imaging flow when the image data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. Therefore, the inspection tact can be reduced as a whole.

第3発明及び第8発明では、先行する処理モジュールの実行結果に依存するか否かに基づいて、撮像モジュールの処理の実行を待機するか否かを決定するので、条件次第で分岐するフローであっても、並行して撮像フローにおける処理を実行することができる場合には計測フローにおける処理と並行して実行することができるので、全体として検査タクトを縮小することが可能となる。   In the third and eighth inventions, whether to wait for the execution of the processing of the imaging module is determined based on whether or not it depends on the execution result of the preceding processing module. Even in such a case, if the process in the imaging flow can be executed in parallel, the process can be executed in parallel with the process in the measurement flow, so that the inspection tact can be reduced as a whole.

第4発明及び第9発明では、先行する処理モジュールが計測モジュールである場合、撮像モジュールの処理の実行を計測モジュールの処理の実行が終了するまで待機するので、正しくないパラメータで検査対象物を撮像することを未然に防止することができ、計測フローにおける処理を正しく実行することが可能となる。   In the fourth and ninth inventions, when the preceding processing module is a measurement module, the process of the imaging module waits until the execution of the process of the measurement module is completed, so that the inspection object is imaged with incorrect parameters. This can be prevented in advance, and the processing in the measurement flow can be executed correctly.

第5発明及び第10発明では、先行する処理モジュールが撮像モジュールである場合、先行する撮像モジュールの処理の実行が終了したときに、次の撮像モジュールの処理の実行を開始するので、撮像モジュールのパラメータを変更した状態で次の撮像モジュールの処理を実行することができ、全体として検査タクトを縮小することが可能となる。   In the fifth and tenth inventions, when the preceding processing module is an imaging module, the execution of the processing of the next imaging module is started when the execution of the processing of the preceding imaging module is completed. The process of the next imaging module can be executed with the parameters changed, and the inspection tact can be reduced as a whole.

本発明では、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでと、それ以降とに分割し、画像データごとに撮像時のパラメータ(撮像手段の設定パラメータ)を対応付けているので、計測フローにおいてパラメータが正しくない画像データを用いて計測処理を実行することがない。また、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができる。したがって、全体として検査タクトを縮小することが可能となる。   In the present invention, the function of the imaging module is divided into the period from imaging the inspection object to storing the image data and the subsequent, and associating the parameters at the time of imaging (setting parameters of the imaging means) for each image data Therefore, measurement processing is not performed using image data with incorrect parameters in the measurement flow. In addition, since it is possible to move to the next imaging flow when the image data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. Therefore, the inspection tact can be reduced as a whole.

従来の外観検査装置の処理フローの説明図である。It is explanatory drawing of the processing flow of the conventional external appearance inspection apparatus. 本発明の実施の形態1に係る外観検査装置のハードウェアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware of the external appearance inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る外観検査装置の機能ブロック図である。It is a functional block diagram of the appearance inspection apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1に係る外観検査装置の処理フローの分解図である。It is an exploded view of the processing flow of the visual inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る外観検査装置の撮像フローを示すフローチャートである。It is a flowchart which shows the imaging flow of the external appearance inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る外観検査装置の計測フローを示すフローチャートである。It is a flowchart which shows the measurement flow of the external appearance inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る外観検査装置の主制御部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the main control part of the external appearance inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係る外観検査装置の処理フローの分解図である。It is an exploded view of the processing flow of the visual inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る撮像フロー及び計測フローのタイムチャートの例示図である。It is an illustration figure of the time chart of the imaging flow and measurement flow which concern on Embodiment 2 of this invention. 本発明の実施の形態2に係る外観検査装置の処理フローの他の例示図である。It is another example figure of the processing flow of the external appearance inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る撮像フロー及び計測フローのタイムチャートの他の例示図である。It is another example figure of the time chart of the imaging flow and measurement flow concerning Embodiment 2 of the present invention. 本発明の実施の形態3に係る外観検査装置の機能ブロック図である。It is a functional block diagram of the external appearance inspection apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る外観検査装置の処理フローの例示図である。It is an illustration figure of the processing flow of the external appearance inspection apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る外観検査装置の撮像フローを示すフローチャートである。It is a flowchart which shows the imaging flow of the external appearance inspection apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る外観検査装置の計測フローを示すフローチャートである。It is a flowchart which shows the measurement flow of the external appearance inspection apparatus which concerns on Embodiment 3 of this invention.

以下、本発明の実施の形態に係る外観検査装置について、図面を参照して説明する。なお、本実施の形態の説明で参照する図面を通じて、同一又は同様の構成又は機能を有する要素については、同一又は同様の符号を付して、詳細な説明を省略する。   Hereinafter, an appearance inspection apparatus according to an embodiment of the present invention will be described with reference to the drawings. Note that elements having the same or similar configuration or function are denoted by the same or similar reference numerals throughout the drawings referred to in the description of this embodiment, and detailed description thereof is omitted.

図1は、従来の外観検査装置の処理フローの説明図である。図1に示す処理フローは、2個の撮像モジュールと2個の計測モジュールとを含み、撮像モジュールAを実行した後に計測モジュールAを実行し、次に撮像モジュールBを実行した後に計測モジュールBを実行する処理フローとなっている。そして、撮像モジュールAと撮像モジュールBとでは、撮像デバイスに設定するべき撮像パラメータ(パラメータ)が異なる。   FIG. 1 is an explanatory diagram of a processing flow of a conventional visual inspection apparatus. The processing flow shown in FIG. 1 includes two imaging modules and two measurement modules. After the imaging module A is executed, the measurement module A is executed, and then the imaging module B is executed before the measurement module B is executed. It is a processing flow to be executed. The imaging module A and the imaging module B have different imaging parameters (parameters) to be set in the imaging device.

図1に示すように、撮像モジュールAは、撮像パラメータAの設定信号を撮像デバイスへと送信する。撮像機構は、撮像パラメータAの設定信号の受信後、トリガ信号受付の許可信号を外部入出力端子へ送信する。撮像デバイスは、外部入出力端子に接続されているPC、PLCからトリガ信号の入力を受け付け、撮像した画像データを画像メモリ(バッファメモリ)へ記憶する。   As illustrated in FIG. 1, the imaging module A transmits an imaging parameter A setting signal to the imaging device. After receiving the imaging parameter A setting signal, the imaging mechanism transmits a trigger signal acceptance permission signal to the external input / output terminal. The imaging device receives an input of a trigger signal from a PC or PLC connected to an external input / output terminal, and stores captured image data in an image memory (buffer memory).

撮像モジュールAは、画像メモリから画像データを取得し、取得した画像データに基づいて計測モジュールAが実行される。すなわち、撮像パラメータAで撮像された画像データに基づいて計測処理を実行する。   The imaging module A acquires image data from the image memory, and the measurement module A is executed based on the acquired image data. That is, the measurement process is executed based on the image data imaged with the imaging parameter A.

画像メモリに余裕がある限り、計測モジュールAの実行中に以下の処理を繰り返し行うことができる。すなわち、撮像機構は、撮像パラメータAの設定信号の受信後、トリガ信号受付の許可信号を外部入出力端子へ送信する。撮像デバイスは、外部入出力端子に接続されているPC、PLCからトリガ信号の入力を受け付け、撮像した画像データを画像メモリ(バッファメモリ)へ記憶する。   As long as there is room in the image memory, the following processing can be repeated during execution of the measurement module A. That is, after receiving the setting signal for the imaging parameter A, the imaging mechanism transmits a trigger signal acceptance permission signal to the external input / output terminal. The imaging device receives an input of a trigger signal from a PC or PLC connected to an external input / output terminal, and stores captured image data in an image memory (buffer memory).

そして、計測モジュールAの実行が終了した時点で撮像モジュールBの実行を開始する。撮像モジュールBは、撮像パラメータBの設定信号を撮像機構へと送信する。しかし、この時点で画像メモリに画像データが蓄積されているので、撮像モジュールBは、画像メモリから画像データを取得して、計測モジュールBを実行する。   Then, the execution of the imaging module B is started when the execution of the measurement module A is completed. The imaging module B transmits a setting signal for the imaging parameter B to the imaging mechanism. However, since the image data is stored in the image memory at this time, the imaging module B acquires the image data from the image memory and executes the measurement module B.

この時点で画像メモリに蓄積されているのは撮像パラメータAで撮像された画像データであり、計測モジュールBを実行するための画像データではない。つまり、計測モジュールBでは撮像パラメータBで撮像された画像データに基づいて計測処理を実行しなければならないところ、撮像パラメータAで撮像された画像データに基づいて計測処理を実行してしまうことになる。したがって、正しい計測処理を実行することができないという問題点があった。   At this time, the image data stored in the image memory is the image data captured with the imaging parameter A, not the image data for executing the measurement module B. That is, in the measurement module B, the measurement process must be performed based on the image data captured with the imaging parameter B. However, the measurement process is performed based on the image data captured with the imaging parameter A. . Therefore, there is a problem that correct measurement processing cannot be executed.

そこで、本発明では、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでの機能と、それ以降の機能(記憶された画像データを取得する機能)とに分割し、画像データごとに撮像時のパラメータ(カメラに設定する撮像パラメータ)を対応付けることにより、計測フローにおいて正しくないパラメータで撮像された画像データを用いて計測処理を実行することが生じないようにするとともに、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができるようにしている。以下、具体的に説明する。   Therefore, in the present invention, the function of the imaging module is divided into a function for imaging the inspection object and storing the image data, and a function after that (a function for acquiring the stored image data). By associating parameters at the time of imaging (imaging parameters set in the camera) for each data, it is possible to prevent the execution of measurement processing using image data captured with incorrect parameters in the measurement flow, and Since it is possible to shift to the next imaging flow when the data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. This will be specifically described below.

(実施の形態1)
図2は、本発明の実施の形態1に係る外観検査装置のハードウェアの構成例を示すブロック図である。図2に示すように、本実施の形態1に係る外観検査装置は、撮像手段としてのカメラ30、及びカメラ30が接続され、カメラ30で生成された画像データに基づいて計測処理を実行し、検査対象物の良否を判定するコントローラ10で構成されている。コントローラ10は、各種プログラムに基づき数値計算や情報処理を行うとともに、ハードウェア各部の制御を行う主制御部11を有している。
(Embodiment 1)
FIG. 2 is a block diagram illustrating a hardware configuration example of the appearance inspection apparatus according to the first embodiment of the present invention. As shown in FIG. 2, the appearance inspection apparatus according to the first embodiment is connected to a camera 30 as an imaging unit and the camera 30, and executes measurement processing based on image data generated by the camera 30. The controller 10 determines whether the inspection object is good or bad. The controller 10 has a main control unit 11 that performs numerical calculation and information processing based on various programs and controls each part of the hardware.

主制御部11は、例えば、中央演算処理装置としてのCPU11aと、主制御部11が各種プログラムを実行する場合にワークエリアとして機能するRAM等のワークメモリ11bと、起動プログラムや初期化プログラム等が格納されたROM、フラッシュROM、EEPROM等のプログラムメモリ11cとを有している。   The main control unit 11 includes, for example, a CPU 11a as a central processing unit, a work memory 11b such as a RAM that functions as a work area when the main control unit 11 executes various programs, a startup program, an initialization program, and the like. And a program memory 11c such as a ROM, a flash ROM, and an EEPROM stored therein.

本実施の形態1に係る外観検査装置のコントローラ10は、カメラ(撮像手段)30に対して検査対象物を撮像する撮像信号を送信し、カメラ30は画像データを生成してコントローラ10へ返す。コントローラ10は、ワーク(検査対象物)に対する明るさを調整できるよう照明60の点灯を制御する照明制御部12と、カメラ30で撮像することにより得られた画像データを取り込むASIC(Application Specific Integrated Circuit)等で構成される画像入力部13と、コンソール50からの操作信号の入力を受け付ける操作入力部14と、液晶パネル等のモニタ40において画像を表示する表示用DSP等から構成される表示制御部15と、外部のPLC70、PC80等とデータ通信することが可能に接続される通信部16と、エッジ検出、面積計算等の計測処理を実行する演算用DSP等で構成される画像処理部17とを有している。画像処理部17には、計測処理用に画像データを記憶する画像メモリ17aが含まれている。   The controller 10 of the appearance inspection apparatus according to the first embodiment transmits an imaging signal for imaging the inspection object to the camera (imaging means) 30, and the camera 30 generates image data and returns it to the controller 10. The controller 10 includes an illumination control unit 12 that controls lighting of the illumination 60 so that the brightness of the workpiece (inspection object) can be adjusted, and an ASIC (Application Specific Integrated Circuit) that captures image data obtained by capturing with the camera 30. ) And the like, an operation input unit 14 that receives input of an operation signal from the console 50, and a display control unit that includes a display DSP that displays an image on a monitor 40 such as a liquid crystal panel. 15, a communication unit 16 connected so as to be able to perform data communication with an external PLC 70, PC 80, and the like, and an image processing unit 17 configured by a calculation DSP or the like that performs measurement processing such as edge detection and area calculation have. The image processing unit 17 includes an image memory 17a that stores image data for measurement processing.

なお、画像入力部13に、画像データをバッファリングするためのフレームバッファが含まれていても良い。また、表示制御部15に、画像を表示させる場合に画像データを一時記憶するVRAM等のビデオメモリが含まれていても良い。これらの各ハードウェアは、バス等の電気的な通信路(配線)を介し、データ通信することが可能に接続されている。   The image input unit 13 may include a frame buffer for buffering image data. Further, the display control unit 15 may include a video memory such as a VRAM that temporarily stores image data when displaying an image. Each piece of hardware is connected to be able to perform data communication via an electrical communication path (wiring) such as a bus.

主制御部11内のプログラムメモリ11cには、照明制御部12、画像入力部13、操作入力部14、表示制御部15、通信部16、及び画像処理部17の各部を、CPU11aにより制御するための制御プログラムが記憶されている。また、上述した処理フローに従った各処理の順序を定めた処理順序プログラム、すなわちPC80において生成され、PC80から転送されてきた処理順序プログラムは、プログラムメモリ11cに記憶されている。   In the program memory 11c in the main controller 11, the CPU 11a controls each part of the illumination controller 12, the image input unit 13, the operation input unit 14, the display control unit 15, the communication unit 16, and the image processing unit 17. The control program is stored. Further, a processing order program that defines the order of each processing according to the processing flow described above, that is, a processing order program that is generated in the PC 80 and transferred from the PC 80 is stored in the program memory 11c.

より具体的に説明すると、PC80は、ユーザ操作に基づいて、一又は複数の撮像モジュールと一又は複数の計測モジュールとが所望の順序(直列又は並列)に並べられた処理フローを設定するとともに、各モジュールに対するパラメータも設定する。撮像モジュールに対応付けられた撮像パラメータには、少なくともトリガ条件が含まれる。トリガ条件には、PLC70等の外部機器からの外部信号に基づいて撮像を行う外部トリガと、一定周期で撮像を繰り返し行う内部トリガとが含まれる。トリガ条件として外部トリガが設定されている場合におけるコントローラ10の処理動作の詳細については、図5を用いて後述する。   More specifically, the PC 80 sets a processing flow in which one or a plurality of imaging modules and one or a plurality of measurement modules are arranged in a desired order (series or parallel) based on a user operation, Also set parameters for each module. The imaging parameter associated with the imaging module includes at least a trigger condition. The trigger condition includes an external trigger that performs imaging based on an external signal from an external device such as the PLC 70, and an internal trigger that repeatedly performs imaging at a constant period. Details of the processing operation of the controller 10 when an external trigger is set as the trigger condition will be described later with reference to FIG.

一方で、計測モジュールに対応付けられた計測パラメータには、少なくとも、当該計測モジュールによる検査対象物の良否を判定するための閾値が含まれる。撮像パラメータが対応付けられた撮像モジュールや計測パラメータが対応付けられた計測モジュールを含む処理順序プログラムは、プログラムメモリ11cに記憶されている。なお、本実施の形態では、撮像パラメータ及び計測パラメータもプログラムメモリ11cに記憶するようにしているが、ワークメモリ11b等の別メモリに記憶するようにし、書き換えをしやすいようにしても良い。   On the other hand, the measurement parameter associated with the measurement module includes at least a threshold value for determining the quality of the inspection object by the measurement module. A processing order program including an imaging module associated with an imaging parameter and a measurement module associated with a measurement parameter is stored in the program memory 11c. In the present embodiment, the imaging parameter and the measurement parameter are also stored in the program memory 11c. However, the imaging parameter and the measurement parameter may be stored in another memory such as the work memory 11b so as to be easily rewritten.

通信部16は、外部のPLC70に接続されたセンサ(光電センサ等)でトリガ信号の入力を受け付けた場合に、入力されたトリガ信号を撮像トリガ信号として受信するインタフェースとして機能する。また、PC80から転送されてくる画像処理プログラム(処理順序プログラム)、モニタ40の表示態様を規定するレイアウト情報等を受信するインタフェースとしても機能する。   The communication unit 16 functions as an interface that receives an input trigger signal as an imaging trigger signal when an input of a trigger signal is received by a sensor (photoelectric sensor or the like) connected to an external PLC 70. It also functions as an interface that receives an image processing program (processing order program) transferred from the PC 80, layout information that defines the display mode of the monitor 40, and the like.

主制御部11のCPU11aは、通信部16を介してPLC70等の外部機器(センサであっても良い)からトリガ信号(撮像トリガ信号)の入力を受け付けた場合、画像入力部13に対して撮像指令(コマンド)を送信する。同時に、処理順序プログラムに基づいて、画像処理部17に対して、実行すべき計測処理を指示するコマンドを送信する。なお、トリガ信号(撮像トリガ信号)を生成する装置として、PLC70ではなく、光電センサ等のトリガ信号入力用のセンサを、通信部16に直接接続しておいても良い。   When the CPU 11 a of the main control unit 11 receives an input of a trigger signal (imaging trigger signal) from an external device (which may be a sensor) such as the PLC 70 via the communication unit 16, the image is input to the image input unit 13. Send a command. At the same time, a command for instructing a measurement process to be executed is transmitted to the image processing unit 17 based on the processing order program. As a device for generating a trigger signal (imaging trigger signal), a trigger signal input sensor such as a photoelectric sensor may be directly connected to the communication unit 16 instead of the PLC 70.

操作入力部14は、ユーザの操作に基づくコンソール50からの操作信号を受信するインタフェースとして機能する。モニタ40は、コンソール50を用いたユーザの操作内容を表示する。具体的に説明すると、コンソール50には、モニタ40上に表示されるカーソルを上下左右に移動させる十字キー、決定ボタン、キャンセルボタン等の各部品が配置されており、これらの各部品を操作することによって、ユーザはモニタ40上で、計測処理の処理順序を規定するフローチャートを作成したり、各計測処理のパラメータ値を編集したり、基準検査領域の設定をしたり、特定パターンの検出条件の設定をしたりする。例えば、PC80においてユーザにより作成された処理フロー及び各モジュールのパラメータ変更は、操作入力部14及びモニタ40を介して編集される。   The operation input unit 14 functions as an interface that receives an operation signal from the console 50 based on a user operation. The monitor 40 displays the user's operation content using the console 50. More specifically, the console 50 is provided with various components such as a cross key, a determination button, and a cancel button for moving the cursor displayed on the monitor 40 up, down, left and right, and operating these components. Thus, on the monitor 40, the user creates a flowchart for defining the processing order of the measurement processing, edits the parameter value of each measurement processing, sets the reference inspection area, and sets the detection conditions for the specific pattern. Make settings. For example, the processing flow created by the user in the PC 80 and the parameter change of each module are edited via the operation input unit 14 and the monitor 40.

画像入力部13は、画像データの取り込みを行う。具体的には、例えばCPU11aからカメラ30の撮像指令を受信した場合、カメラ30に対して画像データ取り込み信号を送信する。そして、カメラ30で撮像が行われた後、撮像して得られた画像データを画像メモリ17aに記憶する。   The image input unit 13 takes in image data. Specifically, for example, when an imaging command for the camera 30 is received from the CPU 11 a, an image data capture signal is transmitted to the camera 30. Then, after the image is taken by the camera 30, the image data obtained by taking the image is stored in the image memory 17a.

CPU11aは、記憶されている制御プログラムに従って、撮像パラメータ(パラメータ)が割り付けられた撮像モジュールと計測モジュールとを処理フローに同期させて実行する。以下、本実施の形態1では、処理モジュールとして、カメラ30により検査対象物を撮像し、生成された画像データを画像メモリ17aに記憶する撮像モジュールと、画像メモリ17aから記憶されている画像データを取得して計測処理を実行する計測モジュールとで構成された例について説明する。   In accordance with the stored control program, the CPU 11a executes the imaging module to which the imaging parameter (parameter) is assigned and the measurement module in synchronization with the processing flow. Hereinafter, in the first embodiment, as a processing module, an imaging module that captures an image of an inspection object with the camera 30 and stores the generated image data in the image memory 17a, and image data stored in the image memory 17a. An example configured with a measurement module that acquires and executes measurement processing will be described.

図3は、本発明の実施の形態1に係る外観検査装置の機能ブロック図である。図3に示すように、本実施の形態1に係る外観検査装置は、上述したCPU11a、プログラムメモリ11cに格納された各種プログラム等により、ソフトウェア的にフロー生成部301、撮像フロー実行部302、計測フロー実行部303及び良否判定部304を実現する。   FIG. 3 is a functional block diagram of the appearance inspection apparatus according to Embodiment 1 of the present invention. As shown in FIG. 3, the appearance inspection apparatus according to the first embodiment is software-driven by the flow generation unit 301, the imaging flow execution unit 302, and the measurement by the various programs stored in the CPU 11 a and the program memory 11 c described above. A flow execution unit 303 and a pass / fail determination unit 304 are realized.

図3において、フロー生成部301は、処理フローに含まれる複数の撮像モジュールを相対的な順序を維持して抽出することで撮像フロー、及び記憶されている画像データに基づいて計測モジュールで計測処理を実行する計測フローを生成する。   In FIG. 3, the flow generation unit 301 performs measurement processing by the measurement module based on the imaging flow and the stored image data by extracting a plurality of imaging modules included in the processing flow while maintaining the relative order. Generate a measurement flow to execute

図4は、本発明の実施の形態1に係る外観検査装置の処理フローの分解図である。図4に示すように、従来の処理フロー401を、左側の撮像フロー402と右側の計測フロー403とに分割している。すなわち、図4において、撮像フロー402は、撮像モジュールの機能のうち、検査対象物を撮像して生成された画像データを画像メモリに記憶するまでの機能を有する撮像パラメータ設定モジュールとして構成されており、残りの機能は、画像メモリから画像データを取得する画像取得モジュールとして、右側の計測フロー403に含ませている。このように、本実施の形態1では、上述したように、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでの機能(撮像パラメータ設定モジュールA等)と、それ以降の機能(画像取得モジュールA)とに分割している。   FIG. 4 is an exploded view of the processing flow of the appearance inspection apparatus according to Embodiment 1 of the present invention. As shown in FIG. 4, the conventional processing flow 401 is divided into a left imaging flow 402 and a right measurement flow 403. That is, in FIG. 4, the imaging flow 402 is configured as an imaging parameter setting module having a function to store image data generated by imaging an inspection target in an image memory among the functions of the imaging module. The remaining functions are included in the measurement flow 403 on the right side as an image acquisition module that acquires image data from the image memory. As described above, in the first embodiment, as described above, the functions of the imaging module are the functions from imaging the inspection object and storing the image data (imaging parameter setting module A and the like), and subsequent functions. It is divided into functions (image acquisition module A).

図3に戻って、撮像フロー実行部302は、生成された撮像フロー402に従って、複数の撮像モジュールそれぞれに割り付けられている撮像パラメータ(パラメータ)に対応付けて、複数の撮像モジュールにより検査対象物をそれぞれ撮像する。撮像された画像データは、画像メモリ17aに記憶される。撮像フロー402は、計測フロー403とは非同期で繰り返し実行される。   Returning to FIG. 3, the imaging flow execution unit 302 associates the imaging object (parameter) assigned to each of the plurality of imaging modules in accordance with the generated imaging flow 402 and uses the plurality of imaging modules to inspect the inspection target. Image each one. The captured image data is stored in the image memory 17a. The imaging flow 402 is repeatedly executed asynchronously with the measurement flow 403.

このように、処理フローに応じて、対応する撮像パラメータで撮像された画像データを事前に準備することができるので、記憶されている画像データの撮像パラメータに応じて計測フローにおける計測処理を実行することができ、正しくない撮像パラメータで撮像された画像データで計測フローにおける計測処理を実行することを未然に回避することができる。   In this way, since image data captured with the corresponding imaging parameter can be prepared in advance according to the processing flow, the measurement process in the measurement flow is executed according to the imaging parameter of the stored image data. Therefore, it is possible to avoid the execution of the measurement process in the measurement flow with image data captured with an incorrect imaging parameter.

計測フロー実行部303は、生成された取得フローに従って、撮像パラメータに対応付けられた撮像モジュールで撮像されて記憶されている画像データのうち、生成された計測フローに従って、対応付けられている撮像パラメータが一致する画像データに対して計測モジュールにより計測処理を実行する。具体的には、画像メモリ17aに記憶されている画像データから、計測処理の対象である撮像パラメータに対応付けられている画像データを読み出し、計測処理を実行することになる。すなわち、図4において、画像取得モジュールAが実行される場合には、撮像パラメータ設定モジュールAにて撮像された画像データが用いられる。   The measurement flow execution unit 303, according to the generated acquisition flow, out of the image data captured and stored by the imaging module associated with the imaging parameter, the imaging parameter associated with the generated measurement flow. Measurement processing is executed by the measurement module on the image data that match. Specifically, the image data associated with the imaging parameter that is the target of the measurement process is read from the image data stored in the image memory 17a, and the measurement process is executed. That is, in FIG. 4, when the image acquisition module A is executed, the image data captured by the imaging parameter setting module A is used.

良否判定部304は、計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する。これにより、撮像パラメータが正しくない画像データによる計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否の判定を行うことがないので、高い精度で検査対象物の良否を判定することができる。   The pass / fail determination unit 304 determines pass / fail of the inspection object based on the execution result of the measurement process in the measurement flow. Thereby, the quality of the inspection object is not determined based on the execution result of the measurement process in the measurement flow based on the image data with incorrect imaging parameters. Therefore, the quality of the inspection object can be determined with high accuracy. it can.

なお、上述したように、計測モジュールA及び計測モジュールBには、それぞれ閾値が対応付けられている。各モジュールにおいて、計測処理結果を閾値と比較することで、検査対象物の良否の判定を行う。   As described above, thresholds are associated with the measurement module A and the measurement module B, respectively. In each module, the quality of the inspection object is determined by comparing the measurement processing result with a threshold value.

また、両モジュールの良否判定結果に基づいて、処理フロー401(計測フロー403)の総合判定が行われる。具体的には、計測モジュールAがOK判定、計測モジュールBもOK判定の場合に、総合判定としてOK判定がなされる。一方、計測モジュールA又は計測モジュールBのいずれかがNG判定の場合には、総合判定としてNG判定がなされる。   Further, based on the pass / fail judgment results of both modules, a comprehensive judgment of the processing flow 401 (measurement flow 403) is performed. Specifically, when the measurement module A is OK and the measurement module B is OK, an OK determination is made as a comprehensive determination. On the other hand, when either the measurement module A or the measurement module B is NG determination, NG determination is made as a comprehensive determination.

良否判定部304による総合判定結果は、総合判定信号として例えば通信部16を介してPLC70等の外部機器へ送信される。なお、各モジュールの判定結果については、外部へ送信しても良いし、外部へ送信しなくても良い。   The comprehensive determination result by the pass / fail determination unit 304 is transmitted to an external device such as the PLC 70 via the communication unit 16 as a comprehensive determination signal. Note that the determination result of each module may be transmitted to the outside or may not be transmitted to the outside.

図5は、本発明の実施の形態1に係る外観検査装置の撮像フローを示すフローチャートである。図5に示すように、本実施の形態1に係る外観検査装置の主制御部11は、撮像パラメータAを撮像機構へ送信する(ステップS501)。送信された撮像パラメータAは、カメラ30の撮像デバイスに設定され、撮像機構は、撮像パラメータAを設定後、トリガ信号受付の許可信号を外部入出力端子へ送信する。   FIG. 5 is a flowchart showing an imaging flow of the appearance inspection apparatus according to the first embodiment of the present invention. As shown in FIG. 5, the main control unit 11 of the appearance inspection apparatus according to the first embodiment transmits the imaging parameter A to the imaging mechanism (step S501). The transmitted imaging parameter A is set in the imaging device of the camera 30. After setting the imaging parameter A, the imaging mechanism transmits a trigger signal acceptance permission signal to the external input / output terminal.

なお、本実施の形態1では、図5に示す撮像機構は、CPU11aの機能によりソフトウェア的に実現している。撮像機構へ送信される撮像パラメータAは、プログラムで利用可能なデータ形式からなり、撮像機構からカメラ30に送信される撮像パラメータAは、カメラ30の設定を書き換えるために適した(ハードウェア的な)データ形式からなる。したがって、CPU11aは、撮像パラメータAをソフトウェア的なデータ形式からハードウェア的なデータ形式へとデータ変換する機能を有している。なお、図5に示す機構を、ソフトウェア的に実現するのではなく、例えば画像入力部13によって、ハードウェア的に実現しても良い。また、CPU11aが有するデータ変換機能をカメラ30に持たせることにより、撮像機構を介さずに撮像デバイスへ撮像パラメータAが転送されるようにしても良い。   In the first embodiment, the imaging mechanism shown in FIG. 5 is realized in software by the function of the CPU 11a. The imaging parameter A transmitted to the imaging mechanism has a data format that can be used by the program. The imaging parameter A transmitted from the imaging mechanism to the camera 30 is suitable for rewriting the settings of the camera 30 (hardware-like). ) Consists of data format. Therefore, the CPU 11a has a function of data conversion of the imaging parameter A from a software data format to a hardware data format. Note that the mechanism shown in FIG. 5 may not be realized by software, but may be realized by hardware, for example, by the image input unit 13. Further, by providing the camera 30 with a data conversion function of the CPU 11a, the imaging parameter A may be transferred to the imaging device without using the imaging mechanism.

撮像デバイスは、外部入出力端子に接続されているPC80、PLC70からトリガ信号の入力を受け付け、撮像した画像データを画像メモリ17aへ記憶し、その旨をコントローラ10へ通知する。主制御部11は、記憶通知を受信し(ステップS502)、次の画像の撮像を開始する。   The imaging device receives an input of a trigger signal from the PC 80 and the PLC 70 connected to the external input / output terminal, stores the captured image data in the image memory 17a, and notifies the controller 10 to that effect. The main control unit 11 receives the storage notification (step S502), and starts capturing the next image.

主制御部11は、撮像パラメータBを送信する(ステップS503)。送信された撮像パラメータBは、カメラ30の撮像デバイスに設定され(パラメータ設定が書き換えられ)、撮像機構は、撮像パラメータBを設定後、トリガ信号受付の許可信号を外部入出力端子へ送信する。   The main control unit 11 transmits the imaging parameter B (step S503). The transmitted imaging parameter B is set in the imaging device of the camera 30 (parameter setting is rewritten), and the imaging mechanism transmits the trigger signal acceptance permission signal to the external input / output terminal after setting the imaging parameter B.

撮像デバイスは、外部入出力端子に接続されているPC80、PLC70からトリガ信号の入力を受け付け、撮像した画像データを画像メモリ17aへ記憶し、その旨をコントローラ10へ通知する。主制御部11は、記憶通知を受信し(ステップS504)、次の画像の撮像を開始する。以下、処理フローに従って、撮像パラメータを変化させて、繰り返し画像データを記憶することができる。   The imaging device receives an input of a trigger signal from the PC 80 and the PLC 70 connected to the external input / output terminal, stores the captured image data in the image memory 17a, and notifies the controller 10 to that effect. The main control unit 11 receives the storage notification (step S504) and starts capturing the next image. Hereinafter, according to the processing flow, it is possible to repeatedly store image data by changing imaging parameters.

換言すれば、現在の処理フローにおいて、撮像モジュールAに係る撮像パラメータで撮像した画像データを記憶し、撮像モジュールBに係る撮像パラメータで撮像した画像データを記憶し、次の処理フローにおいて、撮像モジュールAに係る撮像パラメータで画像データを記憶し、撮像モジュールBに係る撮像パラメータで撮像した画像データを記憶し、・・・と、処理フロー内の撮像モジュールの相対的位置関係に対応付けて、撮像処理及び記憶処理を繰り返すことができる。   In other words, in the current processing flow, image data captured with the imaging parameters related to the imaging module A is stored, image data captured using the imaging parameters related to the imaging module B is stored, and in the next processing flow, the imaging modules are stored. The image data is stored with the imaging parameters according to A, the image data captured with the imaging parameters according to the imaging module B is stored, and the image data is captured in association with the relative positional relationship of the imaging modules in the processing flow. Processing and storage processing can be repeated.

図6は、本発明の実施の形態1に係る外観検査装置の計測フローを示すフローチャートである。図6に示すように、本実施の形態1に係る外観検査装置の主制御部11は、少なくとも撮像パラメータAを含む画像データの要求信号をコントローラ10の撮像機構へ送信する(ステップS601)。撮像機構は、画像メモリ17aに記憶されている画像データの中から、受信した撮像パラメータAに対応する画像データをコントローラ10へ送信する。主制御部11は、画像データを受信し(ステップS602)、受信した画像データに基づいて計測処理を実行する(ステップS603)。   FIG. 6 is a flowchart showing a measurement flow of the appearance inspection apparatus according to the first embodiment of the present invention. As shown in FIG. 6, the main control unit 11 of the visual inspection apparatus according to the first embodiment transmits a request signal for image data including at least the imaging parameter A to the imaging mechanism of the controller 10 (step S601). The imaging mechanism transmits image data corresponding to the received imaging parameter A to the controller 10 from the image data stored in the image memory 17a. The main control unit 11 receives the image data (step S602), and executes a measurement process based on the received image data (step S603).

なお、本実施の形態1では、画像メモリ17aの一部はFIFO構成となっており、最も先に記憶された画像データから順に読み出され、コントローラ10へ転送されるようになっているが、特にこれに限定されるものではない。例えば、画像データを画像メモリ17aに記憶する場合、何回目の処理フローにおける、どの撮像パラメータ設定モジュールであるかを示す識別子と対応付けて記憶しておくことによって、読み出すべき画像データを認識することができる。要するに、撮像モジュールに対応付けられたパラメータが一致する画像データをコントローラ10へ送信すれば良い。   In the first embodiment, a part of the image memory 17a has a FIFO configuration, and the image data stored in the earliest order is sequentially read and transferred to the controller 10. The invention is not particularly limited to this. For example, when image data is stored in the image memory 17a, the image data to be read is recognized by storing the image data in association with an identifier indicating which imaging parameter setting module in which processing flow. Can do. In short, it is only necessary to transmit to the controller 10 image data that matches the parameters associated with the imaging module.

次に、主制御部11は、少なくとも撮像パラメータBを含む画像データの要求信号をコントローラ10の撮像機構へ送信する(ステップS604)。撮像機構は、画像メモリ17aに記憶されている画像データの中から、受信した撮像パラメータBに対応する画像データをコントローラ10へ送信する。主制御部11は、画像データを受信し(ステップS605)、受信した画像データに基づいて計測処理を実行する(ステップS606)。以下、画像メモリ17aに記憶されている画像データについて同様の処理を繰り返す。   Next, the main control unit 11 transmits a request signal for image data including at least the imaging parameter B to the imaging mechanism of the controller 10 (step S604). The imaging mechanism transmits image data corresponding to the received imaging parameter B to the controller 10 from the image data stored in the image memory 17a. The main control unit 11 receives the image data (step S605), and executes measurement processing based on the received image data (step S606). Thereafter, the same processing is repeated for the image data stored in the image memory 17a.

図7は、本発明の実施の形態1に係る外観検査装置の主制御部11の処理手順を示すフローチャートである。図7に示すように、本実施の形態1に係る外観検査装置の主制御部11は、処理フローに含まれる複数の撮像モジュールを相対的な順序を維持して抽出することで撮像フローを生成する(ステップS701)。また、主制御部11は、記憶されている画像データに基づいて計測モジュールで計測処理を実行する計測フローを生成する(ステップS702)。   FIG. 7 is a flowchart showing a processing procedure of the main control unit 11 of the appearance inspection apparatus according to the first embodiment of the present invention. As shown in FIG. 7, the main control unit 11 of the visual inspection apparatus according to the first embodiment generates an imaging flow by extracting a plurality of imaging modules included in the processing flow while maintaining a relative order. (Step S701). Further, the main control unit 11 generates a measurement flow for executing measurement processing by the measurement module based on the stored image data (step S702).

主制御部11は、生成された撮像フローに従って、複数の撮像モジュールそれぞれに割り付けられている撮像パラメータ(パラメータ)に対応付けて、複数の撮像モジュールにより検査対象物をそれぞれ撮像し(ステップS703)、撮像された画像データを画像メモリ17aに記憶する(ステップS704)。なお、ステップS701及びステップS702が実行されるタイミングの如何は問わない。少なくとも、図4に示す撮像フロー402及び計測フロー403が繰り返し実行される前に実行されていれば良い。   In accordance with the generated imaging flow, the main control unit 11 images the inspection object with the plurality of imaging modules in association with the imaging parameters (parameters) assigned to the plurality of imaging modules (step S703). The captured image data is stored in the image memory 17a (step S704). It should be noted that the timing at which step S701 and step S702 are executed does not matter. At least the imaging flow 402 and the measurement flow 403 shown in FIG. 4 need only be executed before being repeatedly executed.

主制御部11は、生成された取得フローに従って、画像メモリ17aに記憶されている画像データの中から、撮像パラメータに対応付けられた撮像モジュールで撮像されて記憶されている画像データを取得し(ステップS705)、生成された計測フローに従って、対応付けられている撮像パラメータが一致する画像データに対して計測モジュールにより計測処理を実行する(ステップS706)。具体的には、画像メモリ17aに記憶されている画像データから、計測処理を実行する対象である撮像パラメータに対応付けられている画像データを読み出し、計測処理を実行することになる。   The main control unit 11 acquires, from the image data stored in the image memory 17a, the image data captured and stored by the imaging module associated with the imaging parameter in accordance with the generated acquisition flow ( In step S705, according to the generated measurement flow, measurement processing is performed by the measurement module on the image data with which the associated imaging parameters match (step S706). Specifically, from the image data stored in the image memory 17a, the image data associated with the imaging parameter that is the target for executing the measurement process is read, and the measurement process is executed.

主制御部11は、計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する(ステップS707)。   The main control unit 11 determines pass / fail of the inspection object based on the execution result of the measurement process in the measurement flow (step S707).

以上のように本実施の形態1によれば、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでと、それ以降との2つのフローに分割し、画像データごとに撮像時のパラメータ(撮像手段の設定パラメータ)を対応付けているので、計測フローにおいてパラメータが正しくない画像データを用いて計測処理を実行することがない。また、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができる。したがって、全体として検査タクトを縮小することが可能となる。   As described above, according to the first embodiment, the function of the imaging module is divided into two flows, that is, until the inspection object is imaged and the image data is stored, and thereafter, and the image is captured for each image data. Since the time parameter (setting parameter of the image pickup unit) is associated, the measurement process is not executed using image data whose parameter is not correct in the measurement flow. In addition, since it is possible to move to the next imaging flow when the image data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. Therefore, the inspection tact can be reduced as a whole.

(実施の形態2)
本発明の実施の形態2に係る外観検査装置のハードウェアの構成は、実施の形態1と同様であることから、同一の符号を付することにより詳細な説明を省略する。本実施の形態2に係る外観検査装置は、複数の撮像モジュールの選択が、先行する処理モジュールの実行結果に依存するか否かに基づいて、撮像モジュールの処理の実行を待機するか否かを決定する点で、実施の形態1とは相違する。
(Embodiment 2)
Since the hardware configuration of the visual inspection apparatus according to the second embodiment of the present invention is the same as that of the first embodiment, detailed description thereof will be omitted by attaching the same reference numerals. The appearance inspection apparatus according to the second embodiment determines whether to wait for execution of the processing of the imaging module based on whether selection of the plurality of imaging modules depends on the execution result of the preceding processing module. The point of determination is different from that of the first embodiment.

図8は、本発明の実施の形態2に係る外観検査装置の処理フローの分解図である。図8(a)に示す、従来の処理フロー801を、図8(b)に示す撮像フロー802と図8(c)に示す計測フロー803とに分割している。すなわち、図8において、撮像フロー802は、撮像モジュールの機能のうち、検査対象物を撮像して画像データを画像メモリに記憶するまでの機能を有する撮像パラメータ設定モジュールとして構成されており、残りの機能は、画像メモリから画像データを取得する画像取得モジュールとして、計測フロー803に含ませている。   FIG. 8 is an exploded view of the processing flow of the visual inspection apparatus according to Embodiment 2 of the present invention. The conventional processing flow 801 shown in FIG. 8A is divided into an imaging flow 802 shown in FIG. 8B and a measurement flow 803 shown in FIG. That is, in FIG. 8, the imaging flow 802 is configured as an imaging parameter setting module having a function for imaging an inspection object and storing image data in an image memory among the functions of the imaging module. The function is included in the measurement flow 803 as an image acquisition module that acquires image data from the image memory.

具体的には、撮像モジュールAが撮像パラメータ設定モジュールAと画像取得モジュールAとに、条件分岐後の撮像モジュールBが撮像パラメータ設定モジュールBと画像取得モジュールBとに、撮像モジュールCが撮像パラメータ設定モジュールCと画像取得モジュールCとに、それぞれ分割されている。この場合、条件分岐前の先行モジュールは計測モジュールAであるので、条件分岐後の撮像モジュールB、Cの処理の実行は、計測モジュールAの処理の実行が終了するまで待機しておかなければ誤った撮像パラメータで検査対象物を撮像するおそれがある。   Specifically, the imaging module A sets the imaging parameter setting module A and the image acquisition module A, the imaging module B after conditional branching sets the imaging parameter setting module B and the image acquisition module B, and the imaging module C sets the imaging parameter. It is divided into a module C and an image acquisition module C. In this case, since the preceding module before the conditional branch is the measurement module A, the execution of the processing of the imaging modules B and C after the conditional branch is erroneous unless it waits until the execution of the processing of the measurement module A is completed. There is a possibility that the inspection object is imaged with the obtained imaging parameters.

図9は、本発明の実施の形態2に係る撮像フロー及び計測フローのタイムチャートの例示図である。撮像フローは撮像パラメータ設定モジュールAが、計測フローは画像取得モジュールAがそれぞれ起動する。撮像パラメータ設定モジュールAは、撮像パラメータAを撮像機構に設定し、画像取得モジュールAは撮像機構へ画像データの取得を要求する。撮像機構は、撮像パラメータAで撮像された画像データが記憶された旨を示す記憶通知を撮像パラメータ設定モジュールAへ、画像データを画像取得モジュールAへ、それぞれ送信する。   FIG. 9 is an exemplary view of time charts of the imaging flow and the measurement flow according to the second embodiment of the present invention. The imaging parameter setting module A is activated for the imaging flow, and the image acquisition module A is activated for the measurement flow. The imaging parameter setting module A sets the imaging parameter A in the imaging mechanism, and the image acquisition module A requests the imaging mechanism to acquire image data. The imaging mechanism transmits a storage notification indicating that the image data captured with the imaging parameter A has been stored to the imaging parameter setting module A and the image data to the image acquisition module A.

計測モジュールAは、取得した画像データに基づいて計測処理を実行し、その間撮像フローは条件分岐で待ち状態となる。   The measurement module A executes measurement processing based on the acquired image data, and during that time, the imaging flow enters a waiting state at a conditional branch.

そして、計測モジュールAの計測処理の実行が終了し、条件分岐を実行すると同時に、分岐条件に応じた撮像モジュールの処理の実行を開始する。要は、待ち状態の解除信号を送信すれば良い。図9の例では、撮像パラメータ設定モジュールBが起動される場合を図示している。   Then, the execution of the measurement process of the measurement module A is completed, and the conditional branch is executed. In short, it is only necessary to transmit a waiting state cancellation signal. In the example of FIG. 9, a case where the imaging parameter setting module B is activated is illustrated.

撮像パラメータ設定モジュールBは、撮像パラメータBを撮像機構に設定し、画像取得モジュールBは撮像機構へ画像データの取得を要求する。撮像機構は、撮像パラメータBで撮像された画像データが記憶された旨を示す記憶通知を撮像パラメータ設定モジュールBへ、画像データを画像取得モジュールBへ、それぞれ送信する。この時点で撮像フローは終了するので、次の撮像フローを開始しても良いし、全体の処理が終了するまで待ち状態であっても良い。   The imaging parameter setting module B sets the imaging parameter B in the imaging mechanism, and the image acquisition module B requests the imaging mechanism to acquire image data. The imaging mechanism transmits a storage notification indicating that the image data captured with the imaging parameter B has been stored to the imaging parameter setting module B and the image data to the image acquisition module B. Since the imaging flow ends at this point, the next imaging flow may be started or may be in a waiting state until the entire processing is completed.

計測モジュールBは、取得した画像データに基づいて計測処理を実行し、計測モジュールBの計測処理の実行が終了した時点で計測フローは終了する。   The measurement module B executes a measurement process based on the acquired image data, and the measurement flow ends when the measurement process of the measurement module B ends.

また、条件分岐において、分岐先をより高速に決定することもできる。例えば先行する処理モジュールが撮像モジュールである場合、先行する撮像モジュールの処理の実行が終了したときに、次の撮像モジュールの処理の実行を開始することができるので、計測モジュールの処理の実行の終了を待たずに処理を継続することができ、全体として検査タクトを縮小することができる。   Further, in the conditional branch, the branch destination can be determined at a higher speed. For example, when the preceding processing module is an imaging module, the execution of the processing of the next imaging module can be started when the execution of the processing of the preceding imaging module is completed. The processing can be continued without waiting for the inspection tact, and the inspection tact can be reduced as a whole.

例えば、2種類の異なる検査対象物を、2基のカメラ30でそれぞれ撮影し、最初に取得した画像データと次に取得した画像データとで、撮像パラメータを変更して異なる画像データを取得する場合に適用する。より具体的な例では、シャッタースピード、照明の種類、照明の照度等を切り替えることにより、(1)検査対象物の姿勢がわかる特徴量を強調、(2)検査対象物の寸法がわかる特徴量を強調、(3)検査対象物表面の凹凸を強調、(4)検査対象物表面のテクスチャを強調した画像データをそれぞれ取得する。   For example, when two different types of inspection objects are photographed by the two cameras 30, and different image data are acquired by changing imaging parameters between the first acquired image data and the next acquired image data Applies to In a more specific example, by switching the shutter speed, illumination type, illumination illuminance, etc., (1) the feature amount that indicates the posture of the inspection object is emphasized, and (2) the feature amount that indicates the dimension of the inspection object. (3) Emphasize the unevenness of the surface of the inspection object, and (4) acquire image data in which the texture of the surface of the inspection object is emphasized.

そして、計測モジュールとして、(1)と(2)とを撮像した場合にはパターンマッチング処理、位置補正処理、エッジ抽出処理を実行する。また、(3)と(4)とを撮像した場合には傷検出処理、OCR処理を実行する。このように、条件分岐により計測モジュールを変更できるようにすることで、計測モジュールの処理の実行中に撮像モジュールを起動させることができ、検査タクトを縮小することができる。   When (1) and (2) are imaged as measurement modules, pattern matching processing, position correction processing, and edge extraction processing are executed. When (3) and (4) are imaged, a flaw detection process and an OCR process are executed. In this way, by enabling the measurement module to be changed by conditional branching, the imaging module can be activated during the execution of the processing of the measurement module, and the inspection tact can be reduced.

図10は、本発明の実施の形態2に係る外観検査装置の処理フローの他の例示図である。図10に示すように、まず撮像モジュールA1又は撮像モジュールB1を用いて、撮像パラメータA又はBに基づいて検査対象物を撮像し、画像データを画像メモリ17aに記憶する。この場合、実行結果の依存先となる先行モジュールは撮像モジュールA1又は撮像モジュールB1となるので、条件分岐後の撮像モジュールA2、B2の処理の実行は、計測フロー側における条件分岐先が確定するまで待機する必要がない。つまり、撮像パラメータAに基づいて撮像した場合は撮像モジュールA1、A2を、撮像パラメータBに基づいて撮像した場合は撮像モジュールB1、B2を連続して起動することができるので、計測モジュールA又は計測モジュールBに対応した画像データを用いて計測処理を実行することができる。   FIG. 10 is another exemplary view of the processing flow of the appearance inspection apparatus according to the second embodiment of the present invention. As shown in FIG. 10, first, using the imaging module A1 or the imaging module B1, the inspection object is imaged based on the imaging parameter A or B, and the image data is stored in the image memory 17a. In this case, since the preceding module on which the execution result depends is the imaging module A1 or the imaging module B1, the execution of the processing of the imaging modules A2 and B2 after the conditional branching is performed until the conditional branching destination on the measurement flow side is determined. There is no need to wait. That is, the imaging modules A1 and A2 can be activated continuously when imaging is performed based on the imaging parameter A, and the imaging modules B1 and B2 can be continuously activated when imaging is performed based on the imaging parameter B. Measurement processing can be executed using image data corresponding to module B.

なお、図10に示す処理フロー中「撮像モジュールA1orB1」について補足して説明する。「撮像モジュールA1orB1」のプロパティ設定では、複数のカメラ30(例えば2台)に対する撮像設定を行うことができる。例えば2基のカメラ30(カメラ1とカメラ2)を使う場合には、カメラ1、カメラ2のそれぞれに対してトリガ条件や撮像パラメータを設定することができる。   Note that “imaging module A1orB1” in the processing flow shown in FIG. 10 will be supplementarily described. In the property setting of “imaging module A1 or B1”, it is possible to perform imaging settings for a plurality of cameras 30 (for example, two). For example, when two cameras 30 (camera 1 and camera 2) are used, trigger conditions and imaging parameters can be set for each of camera 1 and camera 2.

また、撮像モジュールを完了する条件(次のモジュールに遷移するための条件)として、一又は複数のカメラを指定することができる。例えば、カメラ1とカメラ2とをAND条件で指定している場合には、カメラ1及びカメラ2の両方の撮像が完了したときに、処理が次のモジュールに遷移する。また、カメラ1とカメラ2とをOR条件で指定している場合には、カメラ1又はカメラ2のいずれかの撮像が完了したときに、処理が次のモジュールに遷移する。本実施の形態2では、「撮像モジュールA1orB1」で示されるように、OR条件で指定している。   In addition, one or a plurality of cameras can be specified as a condition for completing the imaging module (a condition for transitioning to the next module). For example, when the camera 1 and the camera 2 are designated by the AND condition, the processing shifts to the next module when the imaging of both the camera 1 and the camera 2 is completed. Further, when the camera 1 and the camera 2 are designated by the OR condition, the process transitions to the next module when the imaging of either the camera 1 or the camera 2 is completed. In the second embodiment, as indicated by “imaging module A1 or B1”, it is designated by the OR condition.

図11は、本発明の実施の形態2に係る撮像フロー及び計測フローのタイムチャートの他の例示図である。図11では、撮像モジュールA1、A2が起動して計測モジュールAで計測処理を実行する場合について説明する。具体的には、例えば2基のカメラ30のうちの一方の撮像が完了し、撮像モジュールA1が起動し、条件分岐後、撮像モジュールA2が起動する、という場合である。   FIG. 11 is another exemplary view of time charts of an imaging flow and a measurement flow according to Embodiment 2 of the present invention. In FIG. 11, the case where the imaging modules A1 and A2 are activated and the measurement process is executed by the measurement module A will be described. Specifically, for example, imaging of one of the two cameras 30 is completed, the imaging module A1 is activated, and the imaging module A2 is activated after the conditional branching.

図11において、撮像フローは撮像パラメータ設定モジュールA1が、計測フローは画像取得モジュールA1がそれぞれ起動する。撮像パラメータ設定モジュールA1は、撮像パラメータA1を撮像機構に設定し、画像取得モジュールA1は撮像機構へ画像データの取得を要求する。撮像機構は、撮像パラメータA1で撮像された画像データが記憶された旨を示す記憶通知を撮像パラメータ設定モジュールA1へ、画像データを画像取得モジュールA1へ、それぞれ送信する。計測フローでは、撮像パラメータA1で撮像された画像データに基づいて計測モジュールAにより計測処理が実行される。   In FIG. 11, the imaging parameter setting module A1 is activated for the imaging flow, and the image acquisition module A1 is activated for the measurement flow. The imaging parameter setting module A1 sets the imaging parameter A1 in the imaging mechanism, and the image acquisition module A1 requests the imaging mechanism to acquire image data. The imaging mechanism transmits a storage notification indicating that the image data captured with the imaging parameter A1 is stored to the imaging parameter setting module A1, and the image data to the image acquisition module A1. In the measurement flow, measurement processing is executed by the measurement module A based on image data captured with the imaging parameter A1.

その間、計測モジュールAによる計測処理の実行が完了するのを待つことなく、撮像フローは条件分岐により、撮像モジュールA2が選択された場合の処理を継続して実行する。すなわち、撮像パラメータ設定モジュールA2が起動して、撮像パラメータA2を撮像機構に設定する。これにより、撮像パラメータとして、例えばシャッタースピード、照明等を切り替えることにより異なる画像データを取得し、それに応じた計測処理を実行することができる。撮像機構は、撮像された画像データが画像メモリ17aに記憶された時点で記憶通知を撮像パラメータ設定モジュールA2へ送信する。   In the meantime, without waiting for the execution of the measurement process by the measurement module A to be completed, the imaging flow continues to execute the process when the imaging module A2 is selected by conditional branching. That is, the imaging parameter setting module A2 is activated to set the imaging parameter A2 in the imaging mechanism. Thereby, different image data can be acquired as an imaging parameter by switching, for example, shutter speed, illumination, and the like, and a measurement process corresponding to the acquired image data can be executed. The imaging mechanism transmits a storage notification to the imaging parameter setting module A2 when the captured image data is stored in the image memory 17a.

画像取得モジュールA2は、計測モジュールAによる計測処理の実行が完了したのち、撮像機構に画像データの取得を要求する。撮像機構は、撮像パラメータA2で撮像された画像データを画像取得モジュールA2へ送信する。この時点で撮像フローは終了するので、次の撮像フローを開始しても良いし、全体の処理が終了するまで待ち状態であっても良い。   The image acquisition module A2 requests the imaging mechanism to acquire image data after the execution of the measurement process by the measurement module A is completed. The imaging mechanism transmits the image data captured with the imaging parameter A2 to the image acquisition module A2. Since the imaging flow ends at this point, the next imaging flow may be started or may be in a waiting state until the entire processing is completed.

計測モジュールAは、取得した画像データに基づいて計測処理を実行し、計測モジュールAの実行が終了した時点で計測フローは終了する。   The measurement module A executes measurement processing based on the acquired image data, and the measurement flow ends when the execution of the measurement module A ends.

このようにすることで、撮像フローに用いるカメラ30と、計測フローで用いるDSPとが、ほぼ同じタイミングで起動されており、全体として検査タクトを縮小することが可能となる。すなわち、撮像フローと計測フローとが非同期で実行されるので、検査タクトを縮小することができる。   By doing so, the camera 30 used in the imaging flow and the DSP used in the measurement flow are activated at substantially the same timing, and the inspection tact can be reduced as a whole. That is, since the imaging flow and the measurement flow are executed asynchronously, the inspection tact can be reduced.

以上のように本実施の形態2によれば、次の処理が、先行する処理モジュールの実行結果に依存するか否かに基づいて、撮像モジュールの処理の実行を待機するか否かを決定するので、条件次第で分岐するフローであっても、並行して撮像フローにおける処理を実行することができる場合には計測フローにおける処理と並行して実行することができるので、全体として検査タクトを縮小することが可能となる。   As described above, according to the second embodiment, whether to wait for the execution of the process of the imaging module is determined based on whether the next process depends on the execution result of the preceding process module. Therefore, even if the flow branches depending on the conditions, if the processing in the imaging flow can be executed in parallel, it can be executed in parallel with the processing in the measurement flow, so the inspection tact is reduced as a whole. It becomes possible to do.

(実施の形態3)
本発明の実施の形態3に係る外観検査装置のハードウェアの構成は、実施の形態1及び2と同様であることから、同一の符号を付することにより詳細な説明を省略する。本実施の形態3に係る外観検査装置は、撮像フロー、取得フロー、計測フローを新たに生成することなく、フローの実行順序の制御のみで処理を実行する点で、実施の形態1とは相違する。
(Embodiment 3)
Since the hardware configuration of the visual inspection apparatus according to the third embodiment of the present invention is the same as that of the first and second embodiments, detailed description thereof will be omitted by attaching the same reference numerals. The appearance inspection apparatus according to the third embodiment is different from the first embodiment in that the process is performed only by controlling the execution order of the flow without newly generating an imaging flow, an acquisition flow, and a measurement flow. To do.

図12は、本発明の実施の形態3に係る外観検査装置の機能ブロック図である。図12に示すように、本実施の形態3に係る外観検査装置は、上述したCPU11a、プログラムメモリ11cに格納された各種プログラム等により、ソフトウェア的に撮像実行部1201、計測フロー実行部1202及び良否判定部1203を実現する。   FIG. 12 is a functional block diagram of an appearance inspection apparatus according to Embodiment 3 of the present invention. As shown in FIG. 12, the visual inspection apparatus according to the third embodiment has an imaging execution unit 1201, a measurement flow execution unit 1202, and pass / fail in terms of software using various programs stored in the CPU 11 a and the program memory 11 c described above. The determination unit 1203 is realized.

図12において、本実施の形態3に係る外観検査装置は、フロー生成部を備えていない。図13は、本発明の実施の形態3に係る外観検査装置の処理フローの例示図である。   In FIG. 12, the appearance inspection apparatus according to the third embodiment does not include a flow generation unit. FIG. 13 is an exemplary diagram of a processing flow of the appearance inspection apparatus according to the third embodiment of the present invention.

図13に示すように、処理フロー自体は実施の形態2の図8の処理フローと同じである。実施の形態2では、処理フローを分割しているのに対して、本実施の形態3では、主制御部11はマルチコアで構成されており、2つのコアが別個に処理を実行することで同時に2つの処理を並行して実行するようにしてある。   As shown in FIG. 13, the processing flow itself is the same as the processing flow of FIG. 8 of the second embodiment. In the second embodiment, the processing flow is divided, whereas in the third embodiment, the main control unit 11 is composed of multi-cores, and the two cores execute processing separately, thereby simultaneously. Two processes are executed in parallel.

つまり、処理フローはそのままに、一のコアは、撮像モジュールの機能のうち検査対象物を撮像して画像メモリ17aに記憶するまでの機能を実行し、他のコアは、残りの画像メモリ17aから画像データを取得する機能及び計測処理を実行する。   That is, with the processing flow as it is, one core executes a function from the imaging module function until the inspection object is imaged and stored in the image memory 17a, and the other cores execute from the remaining image memory 17a. A function for acquiring image data and a measurement process are executed.

図12に戻って、撮像実行部1201は、処理フローに含まれる複数の撮像モジュールの相対的な実行順序を維持しつつ、複数の撮像モジュールそれぞれに割り付けられている撮像パラメータ(パラメータ)に対応付けて、複数の撮像モジュールにより検査対象物をそれぞれ撮像して画像メモリ17aに記憶する。   Returning to FIG. 12, the imaging execution unit 1201 maintains the relative execution order of the plurality of imaging modules included in the processing flow, and associates them with imaging parameters (parameters) allocated to the plurality of imaging modules. Then, each inspection object is imaged by a plurality of imaging modules and stored in the image memory 17a.

計測フロー実行部1202は、撮像実行部1201を実行したコアとは別個のコアにより、撮像パラメータに対応付けられた、記憶されている画像データのうち、対応付けられている撮像パラメータが一致する画像データに対して計測モジュールにより計測処理を実行する。良否判定部1203は、計測処理の実行結果に基づいて、検査対象物の良否を判定する。   The measurement flow execution unit 1202 is an image in which the associated imaging parameters match among the stored image data associated with the imaging parameters by a core different from the core that executed the imaging execution unit 1201. A measurement process is executed on the data by the measurement module. The quality determination unit 1203 determines the quality of the inspection object based on the execution result of the measurement process.

このように、処理フローに応じて、対応する撮像パラメータで撮像された画像データを準備することができるので、記憶されている画像データの撮像パラメータに応じて計測処理を実行することができ、正しくない撮像パラメータで撮像された画像データで計測処理を実行することを未然に回避することができる。   In this way, since the image data captured with the corresponding imaging parameter can be prepared according to the processing flow, the measurement process can be executed according to the imaging parameter of the stored image data. It is possible to avoid executing the measurement process with image data captured with no imaging parameters.

図14は、本発明の実施の形態3に係る外観検査装置の撮像フローを示すフローチャートである。図14の例では、条件分岐で撮像モジュールBへ処理が移行した場合を示している。図14に示すように、本実施の形態3に係る外観検査装置の主制御部11の一のコアは、撮像パラメータAを撮像機構へ送信する(ステップS1401)。送信された撮像パラメータAは、カメラ30の撮像デバイスに設定され、撮像機構は、撮像パラメータAを設定後、トリガ信号受付の許可信号を外部入出力端子へ送信する。   FIG. 14 is a flowchart showing an imaging flow of the appearance inspection apparatus according to the third embodiment of the present invention. In the example of FIG. 14, a case is shown in which processing shifts to the imaging module B due to conditional branching. As shown in FIG. 14, one core of the main controller 11 of the appearance inspection apparatus according to the third embodiment transmits the imaging parameter A to the imaging mechanism (step S1401). The transmitted imaging parameter A is set in the imaging device of the camera 30. After setting the imaging parameter A, the imaging mechanism transmits a trigger signal acceptance permission signal to the external input / output terminal.

撮像デバイスは、外部入出力端子に接続されているPC80、PLC70からトリガ信号の入力を受け付け、撮像した画像データを画像メモリ17aへ記憶し、その旨をコントローラ10へ通知する。主制御部11の一のコアは、記憶通知を受信する(ステップS1402)。   The imaging device receives an input of a trigger signal from the PC 80 and the PLC 70 connected to the external input / output terminal, stores the captured image data in the image memory 17a, and notifies the controller 10 to that effect. One core of the main control unit 11 receives the storage notification (step S1402).

ここで、実際には主制御部11の一のコアは、次の処理が計測フローにおける計測処理の実行結果に依存するか否かを判断する。主制御部11の一のコアが、次の処理が計測フローにおける計測処理の実行結果に依存すると判断した場合、主制御部11の一のコアは、計測フローにおける計測処理の完了待ち状態となる。図14の例では、主制御部11の一のコアが、次の処理が計測フローにおける計測処理の実行結果に依存しないと判断したとして、主制御部11の一のコアは、撮像パラメータBを撮像機構へ送信する(ステップS1403)。送信された撮像パラメータBは、カメラ30の撮像デバイスに設定され、撮像機構は、撮像パラメータBを設定後、トリガ信号受付の許可信号を外部入出力端子へ送信する。   Here, actually, one core of the main control unit 11 determines whether or not the next process depends on the execution result of the measurement process in the measurement flow. When one core of the main control unit 11 determines that the next process depends on the execution result of the measurement process in the measurement flow, the one core of the main control unit 11 enters a waiting state for completion of the measurement process in the measurement flow. . In the example of FIG. 14, if one core of the main control unit 11 determines that the next process does not depend on the execution result of the measurement process in the measurement flow, the one core of the main control unit 11 sets the imaging parameter B. The image is transmitted to the imaging mechanism (step S1403). The transmitted imaging parameter B is set in the imaging device of the camera 30. After setting the imaging parameter B, the imaging mechanism transmits a trigger signal acceptance permission signal to the external input / output terminal.

撮像デバイスは、外部入出力端子に接続されているPC80、PLC70からトリガ信号の入力を受け付け、撮像した画像データを画像メモリ17aへ記憶し、その旨をコントローラ10へ通知する。主制御部11の一のコアは、記憶通知を受信する(ステップS1404)。   The imaging device receives an input of a trigger signal from the PC 80 and the PLC 70 connected to the external input / output terminal, stores the captured image data in the image memory 17a, and notifies the controller 10 to that effect. One core of the main control unit 11 receives the storage notification (step S1404).

図15は、本発明の実施の形態3に係る外観検査装置の計測フローを示すフローチャートである。図15に示すように、本実施の形態3に係る外観検査装置の主制御部11の他のコアは、少なくとも撮像パラメータAを含む画像データの要求信号をコントローラ10の撮像機構へ送信する(ステップS1501)。撮像機構は、画像メモリ17aに記憶されている画像データの中から、受信した撮像パラメータAに対応する画像データをコントローラ10へ送信する。主制御部11の他のコアは、画像データを受信し(ステップS1502)、受信した画像データに基づいて計測処理を実行する(ステップS1503)。   FIG. 15 is a flowchart showing a measurement flow of the appearance inspection apparatus according to the third embodiment of the present invention. As shown in FIG. 15, the other core of the main control unit 11 of the visual inspection apparatus according to the third embodiment transmits a request signal for image data including at least the imaging parameter A to the imaging mechanism of the controller 10 (step). S1501). The imaging mechanism transmits image data corresponding to the received imaging parameter A to the controller 10 from the image data stored in the image memory 17a. The other core of the main control unit 11 receives the image data (step S1502), and executes measurement processing based on the received image data (step S1503).

次に、主制御部11の他のコアは、少なくとも撮像パラメータBを含む画像データの要求信号をコントローラ10の撮像機構へ送信する(ステップS1504)。撮像機構は、受信した撮像パラメータBに対応する画像データをコントローラ10へ送信する。主制御部11の他のコアは、画像データを受信し(ステップS1505)、受信した画像データに基づいて計測処理を実行する(ステップS1506)。以下、画像メモリ17aに記憶されている画像データについて同様の処理を繰り返す。   Next, the other core of the main control unit 11 transmits a request signal for image data including at least the imaging parameter B to the imaging mechanism of the controller 10 (step S1504). The imaging mechanism transmits image data corresponding to the received imaging parameter B to the controller 10. The other core of the main control unit 11 receives the image data (step S1505), and executes measurement processing based on the received image data (step S1506). Thereafter, the same processing is repeated for the image data stored in the image memory 17a.

以上のように本実施の形態3によれば、撮像モジュールの機能を、検査対象物を撮像して画像データを記憶するまでと、それ以降との2つの処理を別のコアで実行し、画像データごとに撮像時のパラメータ(撮像手段の設定パラメータ)を対応付けているので、計測フローにおいてパラメータが正しくない画像データを用いて計測処理を実行することがない。また、画像データを記憶した時点で次の撮像フローへ移行することができるので、計測フローの終了を待たずに検査対象物を撮像することができる。したがって、全体として検査タクトを縮小することが可能となる。   As described above, according to the third embodiment, the function of the imaging module performs two processes, that is, until the inspection object is imaged and the image data is stored, and thereafter, in another core. Since the parameters at the time of imaging (setting parameters of the imaging means) are associated with each piece of data, measurement processing is not performed using image data with incorrect parameters in the measurement flow. In addition, since it is possible to move to the next imaging flow when the image data is stored, it is possible to image the inspection object without waiting for the end of the measurement flow. Therefore, the inspection tact can be reduced as a whole.

なお、本発明は上記実施例に限定されるものではなく、本発明の趣旨の範囲内であれば多種の変更、改良等が可能である。例えば主制御部11であるCPU11aは、シングルコアであってもマルチコアであっても良い。シングルコアである場合には、時分割制御により複数のフローを実行させれば良いし、マルチコアの場合には、コア単位で撮像フロー、計測フローを実行させれば良い。   The present invention is not limited to the above-described embodiments, and various changes and improvements can be made within the scope of the present invention. For example, the CPU 11a that is the main control unit 11 may be a single core or a multi-core. In the case of a single core, a plurality of flows may be executed by time division control, and in the case of a multi-core, an imaging flow and a measurement flow may be executed in units of cores.

10 コントローラ
11 主制御部
11a CPU
17a 画像メモリ
30 カメラ(撮像手段)
60 照明
70 PLC
80 PC
401 処理フロー
402 撮像フロー
403 計測フロー
10 Controller 11 Main Control Unit 11a CPU
17a Image memory 30 Camera (imaging means)
60 Lighting 70 PLC
80 PC
401 Processing Flow 402 Imaging Flow 403 Measurement Flow

Claims (11)

検査対象物を撮像して画像データを生成する撮像手段と、
該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラと
を有し、
前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置において、
前記処理モジュールは、少なくとも
前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、
記憶されている画像データに対して計測を実行する計測モジュールと
を含み、
前記コントローラは、
処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するフロー生成手段と、
生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像する撮像フロー実行手段と、
前記フロー生成手段で生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段と、
計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する良否判定手段と
を備えることを特徴とする外観検査装置。
Imaging means for imaging the inspection object and generating image data;
A controller that executes image processing based on the image data generated by the imaging means and determines whether the inspection object is good,
In the appearance inspection apparatus in which the controller executes a plurality of processing modules assigned parameters according to a control program in synchronization with a processing flow.
The processing module captures an inspection object by at least the imaging means and stores the generated image data;
A measurement module that performs measurement on stored image data,
The controller is
By extracting a plurality of the imaging modules included in the processing flow while maintaining a relative order, an imaging flow and a measurement flow for executing a measurement process in the measurement module based on stored image data are generated. Flow generating means for
In accordance with the generated imaging flow, imaging flow execution means for imaging each inspection object by the plurality of imaging modules in association with the parameters allocated to each of the plurality of imaging modules;
According to the measurement flow generated by the flow generation unit, among the image data captured and stored by the imaging module associated with the parameter, the image data corresponding to the associated parameter is matched. Measurement flow execution means for executing measurement processing by the measurement module;
An appearance inspection apparatus comprising: a quality determination unit that determines quality of an inspection object based on an execution result of a measurement process in a measurement flow.
検査対象物を撮像して画像データを生成する撮像手段と、
該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラと
を有し、
前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置において、
前記処理モジュールは、少なくとも
前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、
記憶されている画像データに対して計測を実行する計測モジュールと
を含み、
前記コントローラは、
処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持しつつ、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像して記憶する撮像実行手段と、
前記パラメータに対応付けられた、記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段と、
計測フローにおける計測処理の実行結果に基づいて、検査対象物の良否を判定する良否判定手段と
を備えることを特徴とする外観検査装置。
Imaging means for imaging the inspection object and generating image data;
A controller that executes image processing based on the image data generated by the imaging means and determines whether the inspection object is good,
In the appearance inspection apparatus in which the controller executes a plurality of processing modules assigned parameters according to a control program in synchronization with a processing flow.
The processing module captures an inspection object by at least the imaging means and stores the generated image data;
A measurement module that performs measurement on stored image data,
The controller is
While maintaining the relative order of the plurality of imaging modules included in the processing flow, each of the imaging modules is imaged in association with the parameter assigned to each of the plurality of imaging modules. Imaging execution means for storing
A measurement flow execution means for executing measurement processing by the measurement module on image data corresponding to the associated parameter among stored image data associated with the parameter;
An appearance inspection apparatus comprising: a quality determination unit that determines quality of an inspection object based on an execution result of a measurement process in a measurement flow.
先行する処理モジュールの実行結果に依存するか否かに基づいて、前記撮像モジュールの処理の実行を待機するか否かを決定することを特徴とする請求項1又は2に記載の外観検査装置。   The appearance inspection apparatus according to claim 1, wherein whether to wait for execution of the processing of the imaging module is determined based on whether or not the execution result of the preceding processing module depends. 先行する処理モジュールが前記計測モジュールである場合、前記撮像モジュールの処理の実行を前記計測モジュールの処理の実行が終了するまで待機することを特徴とする請求項3に記載の外観検査装置。   The appearance inspection apparatus according to claim 3, wherein when the preceding processing module is the measurement module, the process waits until the execution of the process of the imaging module is completed. 先行する処理モジュールが前記撮像モジュールである場合、先行する前記撮像モジュールの処理の実行が終了したときに、次の前記撮像モジュールの処理の実行を開始することを特徴とする請求項3に記載の外観検査装置。   The execution of the process of the next imaging module is started when the execution of the process of the preceding imaging module is completed when the preceding processing module is the imaging module. Appearance inspection device. 検査対象物を撮像して画像データを生成する撮像手段と、
該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラと
を有し、
前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能な外観検査方法において、
前記処理モジュールは、少なくとも
前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、
記憶されている画像データに対して計測を実行する計測モジュールと
を含み、
前記コントローラは、
処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するステップと、
生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像するステップと、
生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行するステップと、
計測フローにおける実行結果に基づいて、検査対象物の良否を判定するステップと
を含むことを特徴とする外観検査方法。
Imaging means for imaging the inspection object and generating image data;
A controller that executes image processing based on the image data generated by the imaging means and determines whether the inspection object is good,
In the visual inspection method that can be executed by the visual inspection device that executes the plurality of processing modules to which the parameters are assigned in synchronization with the processing flow according to the control program,
The processing module captures an inspection object by at least the imaging means and stores the generated image data;
A measurement module that performs measurement on stored image data,
The controller is
By extracting a plurality of the imaging modules included in the processing flow while maintaining a relative order, an imaging flow and a measurement flow for executing a measurement process in the measurement module based on stored image data are generated. And steps to
In accordance with the generated imaging flow, in association with the parameters assigned to each of the plurality of imaging modules, respectively, imaging each inspection object with the plurality of imaging modules;
In accordance with the generated measurement flow, measurement data is measured by the measurement module for image data that matches the associated parameter among the image data captured and stored by the imaging module associated with the parameter. Executing the process;
And a step of determining pass / fail of the inspection object based on an execution result in the measurement flow.
検査対象物を撮像して画像データを生成する撮像手段と、
該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラと
を有し、
前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能な外観検査方法において、
前記処理モジュールは、少なくとも
前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、
記憶されている画像データに対して計測を実行する計測モジュールと
を含み、
前記コントローラは、
処理フローに含まれる複数の前記撮像モジュールの相対的な実行順序を維持しつつ、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像して記憶するステップと、
前記パラメータに対応付けられた、記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行するステップと、
計測フローにおける実行結果に基づいて、検査対象物の良否を判定するステップと
を含むことを特徴とする外観検査方法。
Imaging means for imaging the inspection object and generating image data;
A controller that executes image processing based on the image data generated by the imaging means and determines whether the inspection object is good,
In the visual inspection method that can be executed by the visual inspection device that executes the plurality of processing modules to which the parameters are assigned in synchronization with the processing flow according to the control program,
The processing module captures an inspection object by at least the imaging means and stores the generated image data;
A measurement module that performs measurement on stored image data,
The controller is
While maintaining the relative execution order of the plurality of imaging modules included in the processing flow, the plurality of imaging modules respectively inspect the inspection target in association with the parameters assigned to the plurality of imaging modules. Imaging and storing, and
Executing measurement processing by the measurement module on image data that matches the associated parameter among the stored image data associated with the parameter;
And a step of determining pass / fail of the inspection object based on an execution result in the measurement flow.
先行する処理モジュールの実行結果に依存するか否かに基づいて、前記撮像モジュールの処理の実行を待機するか否かを決定することを特徴とする請求項6又は7に記載の外観検査方法。   8. The appearance inspection method according to claim 6, wherein whether or not to wait for execution of the processing of the imaging module is determined based on whether or not it depends on an execution result of a preceding processing module. 先行する処理モジュールが前記計測モジュールである場合、前記撮像モジュールの処理の実行を前記計測モジュールの処理の実行が終了するまで待機することを特徴とする請求項8に記載の外観検査方法。   The visual inspection method according to claim 8, wherein when the preceding processing module is the measurement module, the process waits for the execution of the process of the imaging module until the execution of the process of the measurement module is completed. 先行する処理モジュールが前記撮像モジュールである場合、先行する前記撮像モジュールの処理の実行が終了したときに、次の前記撮像モジュールの処理の実行を開始することを特徴とする請求項8に記載の外観検査方法。   The execution of the next process of the imaging module is started when the execution of the process of the preceding imaging module is completed when the preceding processing module is the imaging module. Appearance inspection method. 検査対象物を撮像して画像データを生成する撮像手段と、
該撮像手段で生成された画像データに基づいて画像処理を実行し、検査対象物の良否を判定するコントローラと
を有し、
前記コントローラが、制御プログラムに従って、パラメータが割り付けられた複数の処理モジュールを処理フローと同期させて実行する外観検査装置で実行することが可能なコンピュータプログラムにおいて、
前記処理モジュールは、少なくとも
前記撮像手段により検査対象物を撮像し、生成された画像データを記憶する撮像モジュールと、
記憶されている画像データに対して計測を実行する計測モジュールと
を含み、
前記コントローラを、
処理フローに含まれる複数の前記撮像モジュールを相対的な順序を維持して抽出することで撮像フローと、記憶されている画像データに基づいて前記計測モジュールで計測処理を実行する計測フローとを生成するフロー生成手段、
生成された前記撮像フローに従って、複数の前記撮像モジュールそれぞれに割り付けられている前記パラメータに対応付けて、複数の前記撮像モジュールにより検査対象物をそれぞれ撮像する撮像フロー実行手段、
前記フロー生成手段で生成された計測フローに従って、前記パラメータに対応付けられた前記撮像モジュールで撮像されて記憶されている画像データのうち、対応付けられている前記パラメータが一致する画像データに対して前記計測モジュールにより計測処理を実行する計測フロー実行手段、及び
計測フローにおける実行結果に基づいて、検査対象物の良否を判定する良否判定手段
として機能させることを特徴とするコンピュータプログラム。
Imaging means for imaging the inspection object and generating image data;
A controller that executes image processing based on the image data generated by the imaging means and determines whether the inspection object is good,
In the computer program that can be executed by the appearance inspection apparatus that the controller executes a plurality of processing modules assigned parameters according to a control program in synchronization with the processing flow,
The processing module captures an inspection object by at least the imaging means and stores the generated image data;
A measurement module that performs measurement on stored image data,
The controller,
By extracting a plurality of the imaging modules included in the processing flow while maintaining a relative order, an imaging flow and a measurement flow for executing a measurement process in the measurement module based on stored image data are generated. Flow generation means
In accordance with the generated imaging flow, imaging flow execution means for imaging the inspection object by the plurality of imaging modules in association with the parameters allocated to the plurality of imaging modules,
According to the measurement flow generated by the flow generation unit, among the image data captured and stored by the imaging module associated with the parameter, the image data corresponding to the associated parameter is matched. A computer program which functions as measurement flow execution means for executing measurement processing by the measurement module, and pass / fail determination means for determining pass / fail of an inspection object based on an execution result in the measurement flow.
JP2016002458A 2016-01-08 2016-01-08 Appearance inspection apparatus, appearance inspection method, and computer program executable by controller used in appearance inspection apparatus Active JP6608708B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016002458A JP6608708B2 (en) 2016-01-08 2016-01-08 Appearance inspection apparatus, appearance inspection method, and computer program executable by controller used in appearance inspection apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016002458A JP6608708B2 (en) 2016-01-08 2016-01-08 Appearance inspection apparatus, appearance inspection method, and computer program executable by controller used in appearance inspection apparatus

Publications (2)

Publication Number Publication Date
JP2017122682A true JP2017122682A (en) 2017-07-13
JP6608708B2 JP6608708B2 (en) 2019-11-20

Family

ID=59305417

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016002458A Active JP6608708B2 (en) 2016-01-08 2016-01-08 Appearance inspection apparatus, appearance inspection method, and computer program executable by controller used in appearance inspection apparatus

Country Status (1)

Country Link
JP (1) JP6608708B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020169949A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and method for inspecting image
JP2020169963A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and image inspection method
CN114554088A (en) * 2022-02-16 2022-05-27 广州市斯睿特智能科技有限公司 High-speed beat detection system and detection method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1032810A (en) * 1996-07-15 1998-02-03 Matsushita Electric Works Ltd Image-processing inspecting device
JPH10300444A (en) * 1997-04-24 1998-11-13 Apic Yamada Kk Lead frame inspection device
US20020186878A1 (en) * 2001-06-07 2002-12-12 Hoon Tan Seow System and method for multiple image analysis
JP2010210373A (en) * 2009-03-10 2010-09-24 Kyushu Nogeden:Kk Visual inspection apparatus
JP2011043363A (en) * 2009-08-19 2011-03-03 Keyence Corp Image processor and image processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1032810A (en) * 1996-07-15 1998-02-03 Matsushita Electric Works Ltd Image-processing inspecting device
JPH10300444A (en) * 1997-04-24 1998-11-13 Apic Yamada Kk Lead frame inspection device
US20020186878A1 (en) * 2001-06-07 2002-12-12 Hoon Tan Seow System and method for multiple image analysis
JP2010210373A (en) * 2009-03-10 2010-09-24 Kyushu Nogeden:Kk Visual inspection apparatus
JP2011043363A (en) * 2009-08-19 2011-03-03 Keyence Corp Image processor and image processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020169949A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and method for inspecting image
JP2020169963A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and image inspection method
JP7222795B2 (en) 2019-04-05 2023-02-15 株式会社キーエンス Image inspection system and image inspection method
JP7306858B2 (en) 2019-04-05 2023-07-11 株式会社キーエンス Image inspection system and image inspection method
CN114554088A (en) * 2022-02-16 2022-05-27 广州市斯睿特智能科技有限公司 High-speed beat detection system and detection method thereof

Also Published As

Publication number Publication date
JP6608708B2 (en) 2019-11-20

Similar Documents

Publication Publication Date Title
JP6494313B2 (en) Image processing method, apparatus system, program, and storage medium
JP6608708B2 (en) Appearance inspection apparatus, appearance inspection method, and computer program executable by controller used in appearance inspection apparatus
JP5096301B2 (en) Imaging device
US20110043621A1 (en) Image Processing Device And Image Processing Method
TW201209532A (en) Interaction control system, method for detecting motion of object, host apparatus and control method thereof
JP2011134221A (en) Image pickup device, 3d modeling data generating method, and program
JP5270971B2 (en) Image measuring apparatus, image measuring method, and computer program
JP5917116B2 (en) Information processing apparatus, information processing apparatus control method, and program
CN113516612B (en) Data processing method, device, equipment and storage medium
JP2011211678A (en) Image processing apparatus and program
US7973826B2 (en) Program creating and editing apparatus for image processing controller, and apparatus for editing image processing program executed in image processing controller
CN113452991B (en) Lens focusing state determining method, device, equipment and storage medium
JP2010061411A (en) Image projector, image synthesizer, image projection method and image projection program
CN112165577A (en) Light source control method and device of multi-light source camera equipment, medium and terminal
JP2021108022A5 (en)
JP2005227931A (en) Image processing apparatus
KR20190108044A (en) Defect checking apparatus, defect checking method and computer readable recording medium
JP5342977B2 (en) Image processing method
JP2014203164A (en) Information processing device, information processing method, and program
JP4944737B2 (en) Program creation device for image processing controller
JP2009188480A (en) Subject tracing program, subject tracing device, and camera
WO2019239940A1 (en) Display control apparatus, display control apparatus control method, and program
JP2017126819A (en) Imaging apparatus and imaging apparatus control method
US20130129183A1 (en) Image Processing Apparatus And Image Processing Method
US11671565B2 (en) Image processing system, image processing device, image processing method, and non-transitory computer readable medium storing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190827

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191008

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191024

R150 Certificate of patent or registration of utility model

Ref document number: 6608708

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250