JP7135586B2 - Image processing system, image processing method and program - Google Patents
Image processing system, image processing method and program Download PDFInfo
- Publication number
- JP7135586B2 JP7135586B2 JP2018156215A JP2018156215A JP7135586B2 JP 7135586 B2 JP7135586 B2 JP 7135586B2 JP 2018156215 A JP2018156215 A JP 2018156215A JP 2018156215 A JP2018156215 A JP 2018156215A JP 7135586 B2 JP7135586 B2 JP 7135586B2
- Authority
- JP
- Japan
- Prior art keywords
- focus position
- image
- image processing
- area
- mode
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/24—Base structure
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B7/00—Mountings, adjusting means, or light-tight connections, for optical elements
- G02B7/28—Systems for automatic generation of focusing signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Description
本発明は、画像処理システム、画像処理方法およびプログラムに関する。 The present invention relates to an image processing system, an image processing method and a program.
一般にカメラの分野では、合焦状態を判定し、被写体に合焦するようにレンズユニットのフォーカスレンズを移動させるオートフォーカス機能が知られている。たとえば特開2018-84701号公報(特許文献1)は、コントラスト検出方式または位相差検出方式を用いて、制限された範囲内で合焦を判断する焦点調節装置を開示する。 Generally, in the field of cameras, an autofocus function is known that determines the in-focus state and moves the focus lens of the lens unit so as to bring the subject into focus. For example, Japanese Patent Application Laid-Open No. 2018-84701 (Patent Document 1) discloses a focus adjustment device that uses a contrast detection method or a phase difference detection method to determine focus within a limited range.
たとえば製品の検査を行う産業用機器においては、正確な検査のために製品にフォーカスの合った画像が得られることが望まれる。製造ラインを流れる製品を撮像する場合、製品ごとに、カメラからの距離が変動し得る。したがってカメラは、製品を撮像するたびにフォーカスを調整する必要がある。上記の産業用機器に限られないが、フォーカス位置を変更可能な撮像系を用いて対象物を撮像し、かつ、その対象物の画像を処理するシステムでは、正確かつ高速にフォーカスを調整することが望まれる。 For example, in industrial equipment for inspecting products, it is desirable to obtain an image in which the product is in focus for accurate inspection. When imaging products flowing through a manufacturing line, the distance from the camera may vary from product to product. The camera therefore needs to adjust its focus each time it images a product. In a system that captures an image of an object using an imaging system that can change the focus position and processes the image of the object, the focus is adjusted accurately and at high speed. is desired.
本発明の目的は、フォーカス位置を変更可能な撮像系を用いて対象物を撮像して、その対象物の画像を処理するシステムにおいて、正確および/または高速に対象物にフォーカスを合わせることを可能にすることである。 An object of the present invention is to enable accurate and/or high-speed focusing on an object in a system that images an object using an imaging system that can change the focus position and processes the image of the object. is to be
本開示の一例によれば、画像処理システムは、対象物を撮像して、対象物を含む画像を生成する撮像部と、撮像部から対象物の画像を取得して、画像に対して所定の処理を実行する画像処理部とを備える。撮像部は、フォーカス位置を変化させることが可能である。対象物のフォーカス位置を予め設定する第1のモードにおいて、画像処理部は、対象物の画像の中にフォーカス位置の基準となる基準領域と、画像処理部による所定の処理の対象となる対象領域とを設定して、基準領域および対象領域の各々のフォーカス位置を登録する。所定の処理を実行する第2のモードにおいて、画像処理部は、撮像部が取得した画像における基準領域のフォーカス位置、および基準領域および対象領域の各々の登録されたフォーカス位置に基づいて、対象領域のフォーカス位置を決定する。第2のモードにおいて、撮像部は、決定されたフォーカス位置で対象領域を撮像する。 According to an example of the present disclosure, an image processing system includes an imaging unit that captures an image of an object and generates an image that includes the object; and an image processing unit that executes processing. The imaging unit can change the focus position. In the first mode in which the focus position of the object is set in advance, the image processing unit divides the image of the object into a reference area serving as a reference for the focus position and a target area to be subjected to predetermined processing by the image processing unit. to register the focus position of each of the reference area and the target area. In the second mode of executing the predetermined process, the image processing unit extracts the target region based on the focus position of the reference region in the image acquired by the imaging unit and the registered focus positions of the reference region and the target region. determines the focus position of the In the second mode, the imaging section images the target area at the determined focus position.
この開示によれば、画像処理部は、第1のモードにおいて、基準領域と、対象領域とを設定して、基準領域および対象領域の各々のフォーカス位置を登録する。基準領域は、フォーカス位置の基準となる領域である。第2のモードにおいて、画像処理部は、その登録されたフォーカス位置、および、第2のモードにおいて撮像部が取得した画像における基準領域のフォーカス位置に基づいて、対象領域を撮像するためのフォーカス位置を求める。第1のモードおよび第2のモードでの基準領域のフォーカス位置の関係と、第1のモードにおける対象領域のフォーカス位置から、第2のモードでの対象領域のフォーカス位置を決定することができる。したがって撮像部は、正確および/または高速に対象領域にフォーカスを合わせることが可能である。 According to this disclosure, in the first mode, the image processing unit sets a reference area and a target area, and registers focus positions of each of the reference area and the target area. The reference area is an area that serves as a reference for the focus position. In the second mode, the image processing unit determines a focus position for imaging the target region based on the registered focus position and the focus position of the reference region in the image acquired by the imaging unit in the second mode. Ask for The focus position of the target area in the second mode can be determined from the relationship between the focus positions of the reference area in the first mode and the second mode and the focus position of the target area in the first mode. Therefore, the imaging unit can focus on the target area accurately and/or quickly.
上述の開示において、基準領域と対象領域とは、少なくとも一部が互いに重なり合うように各々定められる。 In the above disclosure, the reference area and the target area are each defined so as to at least partially overlap each other.
この開示によれば、基準領域と対象領域とが共通の領域を含むことができる。これにより、第2のモードにおいて対象領域のフォーカス位置を決定する際に、正確および/または高速に対象領域にフォーカスを合わせることが可能である。 According to this disclosure, the reference region and the target region may include common regions. Thereby, when determining the focus position of the target area in the second mode, it is possible to focus on the target area accurately and/or at high speed.
上述の開示において、画像処理部は、第2のモードにおいて、撮像部により撮像された画像内の基準領域の位置を、第1のモードにおいて登録された基準領域の位置と比較して、その比較の結果に基づいて、画像内の対象物の位置を修正する。 In the above disclosure, the image processing unit, in the second mode, compares the position of the reference area in the image captured by the imaging unit with the position of the reference area registered in the first mode, and Correct the position of the object in the image based on the result of
この開示によれば、基準領域を、位置ずれ修正用のモデルに兼用することができる。したがって、対象物にフォーカスの合った画像を得られるだけでなく、画像内における対象領域の位置のずれを修正することもできる。 According to this disclosure, the reference area can also be used as a model for misregistration correction. Therefore, it is possible not only to obtain an image in which the object is in focus, but also to correct the displacement of the object area in the image.
上述の開示において、画像処理部は、第2のモードにおいて、登録された基準領域のフォーカス位置と、第2のモードにおいて取得された基準領域のフォーカス位置との差を用いて、登録された対象領域のフォーカス位置を補正して、対象領域のフォーカス位置を決定する。 In the above disclosure, the image processing unit uses the difference between the focus position of the registered reference region in the second mode and the focus position of the reference region acquired in the second mode to obtain the registered target The focus position of the target region is determined by correcting the focus position of the region.
この開示によれば、第2のモードにおいて、対象領域のフォーカス位置を比較的単純な計算によって、決定することができる。 According to this disclosure, in the second mode, the focus position of the region of interest can be determined by relatively simple calculations.
上述の開示において、対象領域は無地の領域を含む。
この開示によれば、対象領域が無地の領域(すなわち明確なパターンを有さない領域)であっても、その対象領域のフォーカス位置を決定することができる。無地の領域とは、コントラストの低い領域である。このため、無地の領域の撮像において、フォーカスを合わせることが容易ではない場合がある。一方、この開示によれば、明確なパターンを有する基準領域でのフォーカス位置を用いて対象領域のフォーカス位置を決定することができる。したがって、無地の領域を含む対象領域を、フォーカスの合った状態で撮像することができる。
In the above disclosure, the target area includes plain areas.
According to this disclosure, the focus position of a target area can be determined even if the target area is a plain area (ie, an area without a distinct pattern). Solid areas are areas of low contrast. For this reason, it may not be easy to focus when imaging a plain area. On the other hand, according to this disclosure, the focus position in a reference region with a well-defined pattern can be used to determine the focus position in the target region. Therefore, the target area including the plain area can be imaged in focus.
上述の開示において、画像処理部は、第1のモードにおいて、対象領域に一時的に形成されたパターンを撮像部が撮像することにより得られた画像に基づいて、対象領域のフォーカス位置を決定する。 In the above disclosure, in the first mode, the image processing unit determines the focus position of the target region based on the image obtained by the imaging unit capturing the pattern temporarily formed in the target region. .
この開示によれば、フォーカス位置の決定に有利なパターンを対象領域に形成することができる。たとえば対象領域自体が明確なパターンを有さない領域であっても、一時的に対象領域に形成されたパターンにより、対象領域のフォーカス位置を決定することができる。したがって、第2のモードにおいて、対象領域のフォーカス位置をより正確に決定することができる。 According to this disclosure, a pattern can be formed in the region of interest that is advantageous for determining the focus position. For example, even if the target region itself does not have a clear pattern, the pattern temporarily formed in the target region can determine the focus position of the target region. Therefore, in the second mode, the focus position of the target area can be determined more accurately.
上述の開示において、画像処理部は、第1のモードにおいて、対象物の三次元形状の情報から基準領域と対象領域との間の高さの差分を取得して、高さの差分と、基準領域のフォーカス位置とを用いて、対象領域のフォーカス位置を決定する。 In the above disclosure, in the first mode, the image processing unit obtains a height difference between the reference region and the target region from information on the three-dimensional shape of the target, and calculates the height difference and the reference The focus position of the region is used to determine the focus position of the region of interest.
この開示によれば、基準領域のフォーカス位置と高さ情報とから、対象領域のフォーカス位置を決定することができる。したがって対象領域のフォーカス位置を比較的単純な計算によって、決定することができる。 According to this disclosure, the focus position of the target area can be determined from the focus position and height information of the reference area. Therefore, the focus position of the region of interest can be determined by relatively simple calculations.
本開示の一例によれば、画像処理方法は、対象物を撮像して、対象物を含む画像を生成する撮像部と、撮像部から対象物の画像を取得して、画像に対して所定の処理を実行する画像処理部とを備えた画像処理システムによる画像処理方法である。撮像部は、フォーカス位置を変化させることが可能である。画像処理方法は、対象物のフォーカス位置を予め設定する第1のモードにおいて、画像処理部が、対象物の画像の中にフォーカス位置の基準となる基準領域と、画像処理部による所定の処理の対象となる対象領域とを設定して、基準領域および対象領域の各々のフォーカス位置を登録するステップと、所定の処理を実行する第2のモードにおいて、画像処理部が、撮像部が取得した画像における基準領域のフォーカス位置、および基準領域および対象領域の各々の登録されたフォーカス位置に基づいて、対象領域のフォーカス位置を決定するステップと、第2のモードにおいて、撮像部が、決定されたフォーカス位置で対象領域を撮像するステップと、画像処理部が、決定されたフォーカス位置で撮像された対象物の前記画像を用いて前記所定の処理を実行するステップとを備える。 According to an example of the present disclosure, an image processing method includes an image capturing unit that captures an image of a target object and generates an image including the target object; An image processing method using an image processing system including an image processing unit that executes processing. The imaging unit can change the focus position. In the image processing method, in a first mode in which the focus position of the object is set in advance, the image processing unit creates a reference area serving as a reference for the focus position in the image of the object and a predetermined process performed by the image processing unit. In a step of setting a target region to be targeted and registering the focus position of each of the reference region and the target region, and in a second mode of executing a predetermined process, the image processing unit processes the image acquired by the imaging unit determining the focus position of the target area based on the focus position of the reference area and the registered focus positions of each of the reference area and the target area; capturing an image of the target area at the position; and performing the predetermined process using the image of the target captured at the determined focus position.
この開示によれば、第1のモードおよび第2のモードでの基準領域のフォーカス位置の関係と、第1のモードにおける対象領域のフォーカス位置から、第2のモードでの対象領域のフォーカス位置を決定することができる。したがって撮像部は、正確および/または高速に対象領域にフォーカスを合わせることが可能である。 According to this disclosure, the focus position of the target area in the second mode is determined from the relationship between the focus positions of the reference area in the first mode and the second mode and the focus position of the target area in the first mode. can decide. Therefore, the imaging unit can focus on the target area accurately and/or quickly.
本開示の一例によれば、プログラムは、撮像装置によって対象物を撮像することにより得られた画像を用いて所定の処理を実行するためのプログラムである。撮像装置は、フォーカス位置を変化させることが可能である。プログラムは、コンピュータに、対象物のフォーカス位置を予め設定する第1のモードにおいて、対象物の画像の中にフォーカス位置の基準となる基準領域と、所定の処理の対象となる対象領域とを設定して、基準領域および対象領域の各々のフォーカス位置を登録するステップと、所定の処理を実行する第2のモードにおいて、撮像装置が取得した画像における基準領域のフォーカス位置、および基準領域および対象領域の各々の登録されたフォーカス位置に基づいて、対象領域のフォーカス位置を決定するステップと、決定されたフォーカス位置で撮像された対象物の画像を用いて所定の処理を実行するステップとを実行させる。 According to an example of the present disclosure, the program is a program for executing predetermined processing using an image obtained by imaging an object with an imaging device. The imaging device can change the focus position. The program sets a reference area serving as a reference for the focus position and a target area to be subjected to predetermined processing in the image of the object in a first mode in which the focus position of the object is preset in the computer. and registering the focus position of each of the reference region and the target region; determining the focus position of the target region based on each registered focus position; and executing a predetermined process using the image of the target object captured at the determined focus position. .
この開示によれば、第1のモードおよび第2のモードでの基準領域のフォーカス位置の関係と、第1のモードにおける対象領域のフォーカス位置から、第2のモードでの対象領域のフォーカス位置を決定することができる。したがって画像処理部は、フォーカスの合った対象領域の画像を取得することができる。これにより画像処理部による処理の精度(たとえば画像の認識の正確度)を高めることができる。 According to this disclosure, the focus position of the target area in the second mode is determined from the relationship between the focus positions of the reference area in the first mode and the second mode and the focus position of the target area in the first mode. can decide. Therefore, the image processing section can acquire an image of the target region in focus. As a result, the accuracy of processing by the image processing unit (for example, the accuracy of image recognition) can be improved.
本発明によれば、フォーカス位置を変更可能な撮像系を用いて対象物を撮像して、その対象物の画像を処理するシステムにおいて、正確および/または高速に対象物にフォーカスを合わせることが可能になる。 According to the present invention, in a system for capturing an image of an object using an imaging system capable of changing the focus position and processing the image of the object, it is possible to focus on the object accurately and/or at high speed. become.
§1 適用例
まず、図1を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係る画像処理システムの1つの適用例を示す模式図である。
§1 Application Example First, an example of a scene to which the present invention is applied will be described with reference to FIG. FIG. 1 is a schematic diagram showing one application example of the image processing system according to the present embodiment.
図1に示すように、本実施の形態に係る画像処理システム1は、たとえば外観検査システムとして実現される。外観検査システムは、たとえば工業製品の生産ラインなどにおいて、ステージ90上に載置されたワークW上の複数の検査対象位置を撮像し、得られた画像を用いて、ワークWの外観検査を行う。外観検査では、ワークWの傷、汚れ、異物の有無、寸法などが検査される。
As shown in FIG. 1, an
ステージ90上に載置されたワークWの外観検査が完了すると、次のワーク(図示せず)がステージ90上に搬送される。ワークWの撮像の際、ワークWは、ステージ90上の予め定められた位置に予め定められた姿勢で静止してもよい。あるいは、ワークWがステージ90上を移動しながら、ワークWが撮像されてもよい。
After completing the visual inspection of the work W placed on the
図1に示すように、画像処理システム1は、基本的な構成要素として、撮像装置10と、画像処理装置20とを備える。この実施の形態では、画像処理システム1は、さらに、PLC(Programmable Logic Controller)50と、入力/表示装置60とを備える。
As shown in FIG. 1, the
撮像装置10は、画像処理装置20に接続される。撮像装置10は、画像処理装置20からの指令に従って、撮像視野に存在する被写体(ワークW)を撮像して、ワークWの像を含む画像データを生成する。本実施の形態では、撮像装置10は、フォーカス位置を変化させることが可能な撮像系である。撮像装置10と画像処理装置20とは一体化されていてもよい。
The
撮像装置10は、フォーカス位置が可変のレンズモジュールを含む。フォーカス位置とは、ワークWの像が形成される位置を意味する。撮像装置10とワークWとの間の距離に応じてレンズモジュールのフォーカス位置が変更される。これにより、ワークWにフォーカスの合った画像を撮像することができる。なお、撮像装置10はオートフォーカス機能を有し、ワークWに自動的にフォーカスを合わせることができる。
The
画像処理装置20は、撮像装置10からワークWの画像を取得する。画像処理装置20は、その画像に対して所定の処理を実行する。画像処理装置20は、判定部21と、出力部22と、記憶部23と、指令生成部24とを含む。
The
判定部21は、撮像装置10によって生成された画像データに対して予め定められた処理を実行することにより、ワークWの外観の良否を判定する。出力部22は、判定部21による判定結果を出力する。たとえば、出力部22は、入力/表示装置60に判定結果を表示させる。
The
記憶部23は、各種のデータ、プログラム等を記憶する。たとえば記憶部23は、撮像装置10から取得された画像データ、および所定の処理が施された画像データを保存する。記憶部23は、判定部21による判定結果を保存してもよい。さらに、記憶部23は、各種の処理を画像処理装置20に実行させるためのプログラムを記憶する。
The
指令生成部24は、PLC50からの制御指令を受けて、撮像装置10に撮像指令(撮像トリガ)を出力する。
The
画像処理装置20はPLC50に接続される。PLC50は画像処理装置20を制御する。たとえばPLC50は、画像処理装置20が撮像指令(撮像トリガ)を撮像装置10に出力するためのタイミングを制御する。
The
入力/表示装置60は、画像処理装置20に接続される。入力/表示装置60は、画像処理システム1の各種の設定に関するユーザの入力を受け付ける。さらに、入力/表示装置60は、画像処理システム1の設定に関する情報、画像処理装置20によるワークWの画像処理の結果(たとえば製品の外観の良否を判定した結果)などの情報を表示する。
An input/
本実施の形態では、ワークWのフォーカス位置を予め設定する第1のモードにおいて、画像処理装置20は、ワークWの画像の中にフォーカス位置の基準となる基準領域と、画像処理装置20による所定の処理の対象となる対象領域とを設定して、基準領域および対象領域の各々のフォーカス位置を登録する。所定の処理を実行する第2のモードにおいて、画像処理装置20は、撮像装置10が取得した画像における基準領域のフォーカス位置、および、基準領域および対象領域の各々の登録されたフォーカス位置に基づいて、対象領域のフォーカス位置を決定する。第2のモードにおいて、撮像装置10は、決定されたフォーカス位置で対象領域を撮像する。
In the present embodiment, in the first mode in which the focus position of the work W is set in advance, the
基準領域は、フォーカス位置の基準となる領域である。第1のモードおよび第2のモードでの基準領域のフォーカス位置の関係と、第1のモードにおける対象領域のフォーカス位置から、第2のモードでの対象領域のフォーカス位置を決定することができる。これにより撮像装置10は、対象領域に正確にフォーカスを合わせることが可能である。また、撮像装置10は、第2のモードにおいて、対象領域に高速にフォーカスを合わせることができる。
The reference area is an area that serves as a reference for the focus position. The focus position of the target area in the second mode can be determined from the relationship between the focus positions of the reference area in the first mode and the second mode and the focus position of the target area in the first mode. This allows the
図2は、撮像装置10の内部構成の一例を示す図である。図2に示されるように、撮像装置10は、照明部11と、レンズモジュール12と、撮像素子13と、撮像素子制御部14と、レンズ制御部16と、レジスタ15,17と、通信I/F部18とを含む。
FIG. 2 is a diagram showing an example of the internal configuration of the
照明部11は、ワークWに対して光を照射する。照明部11から照射された光は、ワークWの表面で反射し、レンズモジュール12に入射する。照明部11は省略されてもよい。
The
レンズモジュール12は、ワークWからの反射光を撮像素子13の撮像面13a上に結像させる。レンズモジュール12は、レンズ12aと、レンズ群12bと、レンズ12cと、可動部12dと、フォーカス調整部12eとを有する。レンズ12aは、主としてフォーカス位置を変更するためのレンズである。フォーカス調整部12eは、レンズ12aを制御して、フォーカス位置を変更する。
The
レンズ群12bは、焦点距離を変更するためのレンズ群である。焦点距離が変更されることにより、ズーム倍率が制御される。レンズ群12bは、可動部12dに設置され、光軸方向に沿って可動する。レンズ12cは、撮像装置10内の予め定められた位置に固定されるレンズである。
The
撮像素子13は、たとえばCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの光電変換素子であり、撮像視野からの光を画像信号に変換する。
The
撮像素子制御部14は、通信I/F部18を介して画像処理装置20から撮像指令を受けると、図示しないシャッターを開いて露光し、撮像素子13からの画像信号に基づいて画像データを生成する。このとき、撮像素子制御部14は、撮像位置に対応するシャッター速度(露光時間)となるようにシャッターを開閉し、予め設定された解像度の画像データを生成する。撮像位置に対応するシャッター速度および解像度を示す情報は、予めレジスタ15に記憶されている。撮像素子制御部14は、生成した画像データを通信I/F部18を介して画像処理装置20に出力する。
When the imaging
レンズ制御部16は、レジスタ17が記憶する命令に従って、撮像装置10のフォーカスを調整する。具体的には、レンズ制御部16は、ワークWの撮像される領域に応じてフォーカス位置が変化するように、フォーカス調整部12eを制御する。フォーカス調整部12eは、レンズ制御部16の制御により、レンズ12aの位置を調整する。つまり、レンズ制御部16は、ワークWの撮像対象領域にフォーカスが合うように、レンズ12aを制御する。「フォーカスが合う」とは、ワークWの撮像対象領域の像が撮像素子13の撮像面13aに形成されることを意味する。レンズ12aについては、後で詳細に説明する。
The
レンズ制御部16は、ワークWのうち撮像視野内に含まれる領域の大きさが略一定になるように、可動部12dを制御して、レンズ群12bの位置を調整してもよい。言い換えると、レンズ制御部16は、ワークWのうち撮像視野内に含まれる領域の大きさが予め定められた範囲内になるように、可動部12dを制御することができる。レンズ制御部16は、撮像位置とワークWとの距離に応じてレンズ群12bの位置を調整すればよい。なお、この実施の形態では、ズームの調整は必須ではない。
The
§2 具体例
<A.フォーカス調整のための構成例>
図3は、フォーカス位置の調整を説明するための模式図である。説明を簡単にするため、図3には、1枚のレンズ(レンズ12a)のみを示している。
§2 Concrete example <A. Configuration Example for Focus Adjustment>
FIG. 3 is a schematic diagram for explaining focus position adjustment. For simplicity of explanation, FIG. 3 shows only one lens (
図3に示すように、レンズ12aの主点Oから対象面(ワークWの表面)までの距離をaとし、レンズ12aの主点Oから撮像面13aまでの距離をbとし、レンズ12aの主点Oからレンズ12aの焦点Fまでの距離(焦点距離)をfとする。ワークWの像の位置が撮像面13aの位置に等しい場合、以下の式(1)が成立する。
As shown in FIG. 3, let a be the distance from the principal point O of the
1/a+1/b=1/f・・・(1)
ワークWの表面の高さに応じて、ワーキングディスタンス(WD)が変化し得る。ワーキングディスタンスは、レンズ12aのワークW側の面から、ワークWまでの距離であると定義される。式(1)が成り立つときに、ワークWの表面にフォーカスが合った状態の画像を撮像することができる。たとえば距離bを変化させることによって、フォーカスの調整が可能である。
1/a+1/b=1/f (1)
The working distance (WD) can change according to the height of the surface of the work W. FIG. The working distance is defined as the distance from the work W side surface of the
距離bの変化量は、基準となる距離からのオフセットとして表すことができる。本実施の形態では、このオフセットを「レンズの繰り出し量」と呼ぶ。レンズ12aのワークW側の面からワークWの表面までの距離をレンズ操出し量に関連づけることによって、ワークWの表面にフォーカスの合った画像を得るためのレンズ操出し量を決定することができる。なお、距離bの基準値は任意に定めることができる。たとえば距離bの基準値を焦点距離fの値としてもよい。
The amount of change in the distance b can be represented as an offset from the reference distance. In the present embodiment, this offset is referred to as "lens extension amount". By associating the distance from the surface of the
上述のように、撮像装置10は、オートフォーカス機能を有する。したがって、撮像装置10が、ワークWの画像から合焦の度合いを判断して、フォーカス位置を調整する。フォーカス位置を調整するためのレンズ12aの構成は特に限定されない。以下に、レンズ12aの構成の例を説明する。
As described above, the
図4は、レンズ12aの構成の一例を示す図である。図4に示した構成では、フォーカス調整部12eは、レンズ12aを、光軸方向に沿って移動させる。レンズ12aの位置を変更することによって、レンズ12aの繰り出し量が変化する。したがって、ワーキングディスタンスWDの変化に応じて、ワークWの像が撮像面13aに形成されるように、レンズ12aが移動する。
FIG. 4 is a diagram showing an example of the configuration of the
なお、図3および図4では、1枚のレンズの例が示されている。通常では、FA用のレンズは複数枚の組レンズで構成されることが多い。しかしながら、組レンズにおいても、各レンズの焦点距離fと、レンズ間の位置関係を用いて、合成された焦点距離fおよびレンズ主点の位置を求めることができる。その特性値を用いることでWDを計算することができる。 3 and 4 show an example of one lens. Normally, FA lenses are often composed of a combination of a plurality of lenses. However, even in the combined lens, the combined focal length f and the position of the lens principal point can be obtained using the focal length f of each lens and the positional relationship between the lenses. WD can be calculated by using the characteristic value.
図4では、機械的な方式によりフォーカス位置が調整される例が示される。しかし、フォーカス位置の調整の方式は機械的な方式に限定されない。図5は、フォーカス位置調整用レンズの他の一例を示す図である。 FIG. 4 shows an example in which the focus position is adjusted by a mechanical method. However, the method of adjusting the focus position is not limited to the mechanical method. FIG. 5 is a diagram showing another example of the focus position adjusting lens.
図5に例示されているのは、液体レンズである。レンズ12aは、透光性容器70と、電極73a,73b,74a,74bと、絶縁体75a,75bと、絶縁層76a,76bとを含む。
Illustrated in FIG. 5 is a liquid lens. The
透光性容器70内の密閉空間には、水などの導電性液体71と、油などの絶縁性液体72とが充填される。導電性液体71と絶縁性液体72とは混合せず、互いに屈折率が異なる。
A closed space in the
電極73a,73bは、絶縁体75a,75bと透光性容器70との間にそれぞれ固定され、導電性液体71中に位置する。
Electrodes 73 a and 73 b are fixed between
電極74a,74bは、導電性液体71と絶縁性液体72との界面の端部付近に配置される。電極74aと導電性液体71および絶縁性液体72との間には絶縁層76aが介在する。電極74bと導電性液体71および絶縁性液体72との間には絶縁層76bが介在する。電極74aと電極74bとは、レンズ12aの光軸に対して対称な位置に配置される。
図5に示す構成において、フォーカス調整部12eは、電圧源12e1と、電圧源12e2とを含む。電圧源12e1は、電極74aと電極73aとの間に電圧Vaを印加する。電圧源12e2は、電極74bと電極73bとの間に電圧Vbを印加する。
In the configuration shown in FIG. 5, the
電極74aと電極73aとの間に電圧Vaを印加すると、導電性液体71は、電極74aに引っ張られる。同様に、電極74bと電極73bとの間に電圧Vbを印加すると、導電性液体71は、電極74bに引っ張られる。これにより、導電性液体71と絶縁性液体72との界面の曲率が変化する。導電性液体71と絶縁性液体72との屈折率が異なるため、導電性液体71と絶縁性液体72との界面の曲率が変化することにより、レンズ12aの焦点距離(図3に示す焦点距離fに相当)が変化する。当該界面の曲率は、電圧Va,Vbの大きさに依存する。そのため、電圧Va,Vbの大きさを変えることにより、ワーキングディスタンスWDが変化しても撮像面13aに像が形成されるように、レンズ12aのフォーカス位置を調整することができる。
When a voltage Va is applied between the
通常は、電圧Vaと電圧Vbとは同値に制御される。これにより、導電性液体71と絶縁性液体72との界面は、光軸に対して対称に変化する。ただし、電圧Vaと電圧Vbとが異なる値に制御されてもよい。これにより、導電性液体71と絶縁性液体72との界面が光軸に対して非対称となり、撮像装置10の撮像視野の向きを変更することができる。
Normally, voltage Va and voltage Vb are controlled to have the same value. As a result, the interface between the
さらに液体レンズと固体レンズとを組み合わせてもよい。この場合、焦点距離fに加えてレンズの主点の位置が変化する。したがって距離bが変化するため、その変化分を考慮したフォーカス調整を行えばよい。 Furthermore, a liquid lens and a solid lens may be combined. In this case, the position of the principal point of the lens changes in addition to the focal length f. Therefore, since the distance b changes, the focus adjustment should be performed in consideration of the change.
<B.画像処理装置>
画像処理装置20は、CPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read Only Memory)、補助記憶装置、通信I/F等を含み、情報処理を行なう。補助記憶装置は、たとえば、ハードディスクドライブ、ソリッドステートドライブ等で構成され、CPUが実行するプログラム等を記憶する。
<B. Image processing device>
The
画像処理装置20の判定部21は、たとえば、記憶部23に予め記憶しておいた良品ワークの画像との間の差分画像を2値化し、しきい値を超えた画素数と基準値とを照合することにより、検査対象位置の良否を判定してもよい。画像処理装置20の出力部22は、判定結果を入力/表示装置60に表示してもよい。
The
<C.ワークの例およびフォーカス調整の課題>
図6は、撮像装置によるワークWの撮像を模式的に示した図である。図7は、ワークWにおける撮像対象の領域を示した図である。図6および図7に示した例において、ワークWは、領域W1と領域W2とを有する。領域W1は、たとえば透明体(ガラスなど)の表面である。領域W2は領域W1を囲む領域であり、たとえば電子機器の筐体の表面である。このようなワークWの例として、ディスプレイを有する電子機器(一例では、スマートフォンあるいはタブレットなど)を挙げることができる。すなわち領域W1は、表示画面でありえる。また、領域W1は、明確なパターンを有していない。すなわち領域W1は無地の領域である。
<C. Examples of workpieces and focus adjustment issues>
FIG. 6 is a diagram schematically showing imaging of the workpiece W by the imaging device. FIG. 7 is a diagram showing a region of the workpiece W to be imaged. In the examples shown in FIGS. 6 and 7, the work W has a region W1 and a region W2. Region W1 is, for example, the surface of a transparent body (such as glass). A region W2 is a region surrounding the region W1, and is, for example, the surface of the housing of the electronic device. An example of such a work W is an electronic device having a display (one example is a smart phone or a tablet). That is, the area W1 can be the display screen. Also, the region W1 does not have a distinct pattern. That is, the area W1 is a blank area.
領域W1内に、検査領域A1が設定される。検査領域A1は、撮像装置10によって撮像される。外観検査では、検査領域A1を含む領域が撮像装置10により撮像されて、検査領域A1の画像が画像処理装置20(図示せず)による所定の処理の対象となる。画像処理装置20は、検査領域A1の画像を用いて、検査領域A1内に傷、汚れ、あるいは異物が有るかどうかを検査する。
An inspection area A1 is set within the area W1. The inspection area A1 is imaged by the
検査領域A1にフォーカスが合っていない状態で検査領域A1を撮像した場合、取得された画像から、検査領域A1内の傷などを検出できない可能性がある。精度の高い外観検査を行うためには、撮像装置10のフォーカスを検査領域A1に合わせることが求められる。しかし上述の例のように、検査領域A1が無地の領域の一部である場合、検査領域A1には明確なパターンが形成されていない。このような場合、検査領域A1内でのコントラストの差が小さいため、撮像装置10がフォーカスの合った検査領域A1の画像を撮像するのが難しいという課題がある。
If an image of the inspection area A1 is captured while the inspection area A1 is out of focus, there is a possibility that a flaw or the like in the inspection area A1 cannot be detected from the acquired image. In order to perform a highly accurate appearance inspection, it is required that the
<D.本実施の形態によるフォーカス調整>
本実施の形態によれば、フォーカス調整は、2つのモードを有する。第1のモードは、指定された領域におけるフォーカス位置を予め決定するモードである。指定された領域は、フォーカス位置の基準となる基準領域、および画像処理部による所定の処理の対象となる対象領域である。第2のモードは実際の検査において、フォーカス位置を決定するモードである。
<D. Focus Adjustment According to the Present Embodiment>
According to this embodiment, focus adjustment has two modes. A first mode is a mode in which a focus position in a designated area is determined in advance. The designated areas are a reference area that serves as a reference for the focus position, and a target area that is subject to predetermined processing by the image processing unit. The second mode is the mode for determining the focus position in the actual inspection.
図8は、本実施の形態によるフォーカス調整のための領域を示した図である。本実施の形態では、検査領域A1とは別に、フォーカスの基準となる領域(基準領域B1)を設定する。 FIG. 8 is a diagram showing areas for focus adjustment according to this embodiment. In the present embodiment, an area (reference area B1) serving as a focus reference is set apart from the inspection area A1.
図8に示す例によれば、基準領域B1は、領域W2の一部を含む。たとえば基準領域は、領域W2の端部を含む領域であり、ワークWの外郭線を含む。したがって基準領域B1は、ワークWと、ワークWの周囲との境界を含む。これにより、基準領域B1は、明確なパターンを含むことができる。このように、基準領域B1の画像は、合焦度を判定可能な程度のコントラストを有している。 According to the example shown in FIG. 8, the reference area B1 includes part of the area W2. For example, the reference area is an area that includes the edge of area W2 and includes the outline of workpiece W. FIG. Therefore, the reference area B1 includes the boundary between the work W and its surroundings. This allows the reference area B1 to contain a distinct pattern. In this way, the image of the reference area B1 has a contrast that allows determination of the degree of focus.
図8に示すように、一つの実施例では、基準領域B1と検査領域A1とは、少なくとも一部が互いに重なり合うように各々定められる。これにより基準領域B1と検査領域A1とが共通の領域を含むことができる。したがって、第2のモードにおいて検査領域A1のフォーカス位置を決定する際に、正確および/または高速に検査領域A1にフォーカスを合わせることが可能である。なお、「基準領域B1と検査領域A1との少なくとも一部が互いに重なり合う」とは、上述の例に限定されない。基準領域B1が検査領域A1に含まれていてもよい。逆に、検査領域A1が基準領域B1に含まれていてもよい。また、本実施の形態では、必ずしも、基準領域B1と検査領域A1との少なくとも一部が互いに重なり合っていなくてもよい。すなわち基準領域B1と検査領域A1とが全く重なり合っていなくてもよい。 As shown in FIG. 8, in one embodiment, the reference area B1 and the inspection area A1 are each defined so as to at least partially overlap each other. This allows the reference area B1 and the inspection area A1 to include a common area. Therefore, when determining the focus position of the inspection area A1 in the second mode, it is possible to focus on the inspection area A1 accurately and/or at high speed. Note that "at least a part of the reference area B1 and the inspection area A1 overlap each other" is not limited to the above example. The reference area B1 may be included in the inspection area A1. Conversely, the inspection area A1 may be included in the reference area B1. Further, in the present embodiment, at least a portion of the reference area B1 and the inspection area A1 do not necessarily have to overlap each other. That is, the reference area B1 and the inspection area A1 may not overlap at all.
また、図8の例では、基準領域B1および検査領域A1は、いずれも矩形であるが、基準領域B1および検査領域A1の各々の形状は、矩形であると限定されない。たとえば基準領域B1および検査領域A1の少なくとも一方の形状が、円形、あるいは領域を形成することが可能な任意の自由な形状であってもよい。また、基準領域B1および検査領域A1の少なくとも一方は、1つにまとまった領域であると限定される必要はない。たとえば、基準領域B1および検査領域A1の少なくとも一方は、分散して存在する複数の領域であってもよい。 In the example of FIG. 8, both the reference area B1 and the inspection area A1 are rectangular, but the shape of each of the reference area B1 and the inspection area A1 is not limited to being rectangular. For example, the shape of at least one of the reference area B1 and the inspection area A1 may be circular or any free shape that can form the area. Also, at least one of the reference area B1 and the inspection area A1 need not be limited to being a unified area. For example, at least one of the reference area B1 and the inspection area A1 may be a plurality of dispersed areas.
本実施の形態では、実際の検査に先立って、基準領域および検査領域を設定するとともに、それらの領域のフォーカス位置を画像処理装置20に登録する。図9は、フォーカス位置の登録を説明するための図である。図9を参照して、サンプルのワークWを撮像装置10により撮像して、ワークWの画像を取得する。ワークWの画像から基準領域B1および検査領域A1がそれぞれ指定されて、基準領域B1および検査領域A1の画像が画像処理装置20に登録される。
In this embodiment, prior to actual inspection, a reference area and an inspection area are set, and the focus positions of these areas are registered in the
さらに、基準領域B1にフォーカスが合うときのフォーカス位置、および検査領域A1にフォーカスが合うときのフォーカス位置がそれぞれ画像処理装置20に登録される。基準領域B1および検査領域A1のそれぞれのフォーカス位置がf0,f1であるとする。画像処理装置20は、フォーカス位置の値(f0,f1)を画像処理装置20の内部に登録する。あるいは、画像処理装置20は、フォーカス位置の値をレンズの繰り出し量に変換して、その繰り出し量の値を記憶するのでもよい。
Furthermore, the focus position when the reference region B1 is in focus and the focus position when the inspection region A1 is in focus are registered in the
図10は、検査時のフォーカス位置の調整を説明するための図である。図10を参照して、検査対象のワークWが撮像装置10により撮像される。画像処理装置20は、ワークWの画像から基準領域B1を検索して、その基準領域B1のフォーカス位置を求める。そのフォーカス位置をf2とする。
FIG. 10 is a diagram for explaining focus position adjustment during inspection. Referring to FIG. 10, an image of workpiece W to be inspected is captured by imaging
次に、そのフォーカス位置に基づいて、検査領域A1のフォーカス位置を算出する。このときの検査領域A1のフォーカス位置であるf3は、f3=f1+(f2-f0)と表される。上記のようにして、検査領域A1のフォーカス位置f3が決定されると、そのフォーカス位置f3に従って、撮像装置10はワークWを撮像する。画像処理装置20は、その画像を用いて、検査領域A1を検査する。
Next, the focus position of the inspection area A1 is calculated based on the focus position. The focus position f3 of the inspection area A1 at this time is expressed as f3=f1+(f2-f0). When the focus position f3 of the inspection area A1 is determined as described above, the
図11は、基準領域の指定の例を説明するための図である。図12は、検査領域の指定の例を説明するための図である。図11および図12に示すように、入力/表示装置60は、ディスプレイを有する。ディスプレイは、撮像装置10によって撮像されたワークWの画像を表示する。ユーザは、ワークWの画像を見ながら、基準領域B1を指定する(図11を参照)。次に、ユーザは、同じ画像を参照しながら、検査領域A1を指定する。たとえばユーザは、マウス等のポインティングデバイスを用いて、基準領域B1および検査領域A1の各々を指定する。このとき、ユーザの指定する領域を示す枠線が入力/表示装置60のディスプレイに表示される。なお、検査領域A1を指定する際に、基準領域B1を示す枠線が同時に表示されていてもよい。
FIG. 11 is a diagram for explaining an example of designation of a reference area. FIG. 12 is a diagram for explaining an example of specifying an inspection area. As shown in FIGS. 11 and 12, input/
図13は、フォーカス位置の設定方法のフローを示したフローチャートである。なお、図13に示す処理は、上述の「第1のモード」における撮像装置10および画像処理装置20の処理に対応する。また、以下に説明するフローチャートの処理は、画像処理装置20の判定部21が、記憶部23に記憶されたプログラムを読み出すことにより実行される。後述する図16に示す処理も同様である。
FIG. 13 is a flow chart showing the flow of the focus position setting method. Note that the processing shown in FIG. 13 corresponds to the processing of the
図13を参照して、ステップS11において、撮像装置10は、検査対象物のサンプル(以下、「ワークサンプル」)を撮像する。画像処理装置20は、撮像装置10からワークサンプルの画像データを取得する。
Referring to FIG. 13, in step S11,
ステップS12において、基準領域B1が設定される。上述のように、たとえば入力/表示装置60のディスプレイにワークサンプルの画像が表示される。ユーザが、ポインティングデバイス等の入力デバイスを操作することにより、画像の一部の領域が基準領域として設定される。画像処理装置20は、基準領域B1の画像データを記憶部23に格納する。
In step S12, a reference area B1 is set. An image of the work sample is displayed, for example, on the display of the input/
ステップS13において、基準領域B1のフォーカス位置が設定される。たとえば撮像装置10は、レンズ12aのフォーカス位置を変化させながらワークサンプルを撮像する。これにより、基準領域B1の複数の画像が得られる。複数の画像の各々を判定して、中から最もフォーカスが合った画像が選択される。その画像に対応したフォーカス位置が、基準領域B1のフォーカス位置f0として決定される。f0の値は、画像処理装置20の記憶部23に格納される。
In step S13, the focus position of the reference area B1 is set. For example, the
複数の画像の中から最もフォーカスが合った画像を選択するための方法は限定されない。ユーザが複数の画像の中から1つの画像を選択してもよい。画像処理装置20が、複数の画像の中から最もフォーカスが合った画像を判定してもよい。たとえば画像処理装置20は、複数の画像のうち、ワークWのエッジでの色あるいは明るさ等の変化が最も大きい画像を選択してもよい。
The method for selecting the most focused image from multiple images is not limited. A user may select one image from a plurality of images. The
ステップS14において、検査領域A1が設定される。ステップS12の処理と同様に、入力/表示装置60のディスプレイに、ステップS11の処理により取得されたワークサンプルの画像が表示される。ユーザが、ポインティングデバイス等の入力デバイスを操作することにより、画像の一部の領域が検査領域A1として設定される。画像処理装置20は、検査領域A1の画像データを記憶部23に格納する。
In step S14, an inspection area A1 is set. As in the process of step S12, the display of the input/
ステップS15において、検査領域A1のフォーカス位置f1が設定される。フォーカス位置f1を求める方法として、たとえば以下の方法を例示することができる。 In step S15, the focus position f1 of the inspection area A1 is set. As a method of obtaining the focus position f1, for example, the following method can be exemplified.
第1の方法は、治具を用いてフォーカス位置f1を求める方法である。図14は、検査領域A1のフォーカス位置f1を求めるための治具の例である。図15は、図14に示す治具を用いて検査領域A1のフォーカス位置f1を求める方法を示した図である。図14および図15に示すように、治具100は、白黒のパターン102が印刷された印刷面101を有する透明ガラス平板である。治具100のパターン102がワークサンプルの領域W1に接するように、治具100が設置される。これにより、撮像装置10から見て、ワークサンプルの領域W1上に一時的なパターン102が形成される。一時的に形成されたパターンにより、検査領域A1のフォーカス位置を精度よく決定することができる。このフォーカス位置を用いて、実際の検査(第2のモード)において、検査領域A1のフォーカス位置を決定する。第2のモードにおいては検査領域A1には明確なパターンが存在しない。しかしながら、検査領域A1のより正確なフォーカス位置を決定することができる。
A first method is to obtain the focus position f1 using a jig. FIG. 14 shows an example of a jig for obtaining the focus position f1 of the inspection area A1. FIG. 15 is a diagram showing a method of obtaining the focus position f1 of the inspection area A1 using the jig shown in FIG. As shown in FIGS. 14 and 15, the
治具100の印刷面101の高さと、ワークサンプルの領域W1の高さとは、ほぼ同じである。したがって、パターン102を手掛かりとして、撮像装置10のオートフォーカスにより、フォーカス位置f1を求めることができる。図14では、治具100のパターン102を明示するために、治具100が誇張して描かれていることに留意されたい。
The height of the
なお、一時的なパターン102を検査領域A1に形成するための方法は、治具100を用いる方法に限定されない。たとえば、投影機を用いて、特定のパターンを検査領域A1に所定の時間のみ投影するのでもよい。
Note that the method for forming the temporary pattern 102 in the inspection area A1 is not limited to the method using the
第2の方法は、ユーザの目視により撮像装置10のフォーカスを調整する方法である。撮像装置10のフォーカスを変化させながら、撮像装置10により検査領域A1を撮像する。これにより、複数の画像が得られる。ユーザは、複数の画像から、最もフォーカスの合った画像を選択する。その画像に対応するフォーカス位置が検査領域A1のフォーカス位置f1に設定される。検査領域A1内に、かすかなパターン、傷などといった、焦点合わせのきっかけとなるものが存在する場合、第2の方法を用いて検査領域A1のフォーカス位置f1を設定することができる。なお、撮像装置10のオートフォーカスにより複数の候補画像を予め選んでおき、ユーザが、それら候補画像の中から適切な画像を選択してもよい。
A second method is a method of adjusting the focus of the
第3の方法は、ワークの三次元形状に関する情報を用いてフォーカス位置f1を設定する方法である。ワークの三次元形状が予め分かっている場合、その三次元形状の情報から、基準領域B1と検査領域A1との間の高さの差分を取得することができる。基準領域B1のフォーカス位置f0を、ワーキングディスタンス(WD)に変換する。その変換されたワーキングディスタンスに高さの差分を加算して、検査領域A1のワーキングディスタンスを算出する。そのワーキングディスタンスをフォーカス位置に変換することによりフォーカス位置f1を設定する。フォーカス位置からワーキングディスタンスへの変換、ワーキングディスタンスからフォーカス位置への変換は、たとえば画像処理装置20によって実行される。この方法では、基準領域B1のフォーカス位置と高さ情報とから、検査領域A1のフォーカス位置を決定することができる。したがって検査領域A1のフォーカス位置を比較的単純な計算によって、決定することができる。
A third method is to set the focus position f1 using information about the three-dimensional shape of the workpiece. When the three-dimensional shape of the workpiece is known in advance, the height difference between the reference area B1 and the inspection area A1 can be obtained from the three-dimensional shape information. A focus position f0 of the reference area B1 is converted into a working distance (WD). The working distance of the inspection area A1 is calculated by adding the height difference to the converted working distance. A focus position f1 is set by converting the working distance into a focus position. Conversion from the focus position to the working distance and conversion from the working distance to the focus position are performed by the
図16は、検査方法のフローを示したフローチャートである。図16に示す処理は、上述の「第2のモード」における撮像装置10および画像処理装置20の処理に対応する。図16に示すように処理が開始されると、ステップS21において、画像処理システム1(たとえば画像処理装置20)は、基準領域B1を探索する。ステップS21において、ワークWを撮像するときのフォーカス位置、およびワークWの画像により決定される探索空間内で基準領域B1が探索される。
FIG. 16 is a flow chart showing the flow of the inspection method. The processing shown in FIG. 16 corresponds to the processing of the
ステップS22において、画像処理装置20は、ステップS21での探索により得られた基準領域B1を含む画像を撮像したときのフォーカス位置を求める。これにより、基準領域B1のフォーカス位置f2が求められる。
In step S22, the
ステップS23において、画像処理装置20は、基準領域B1のXY位置ずれを求める。「XY位置ずれ」とは、ステップS12(図12を参照)で取得された基準領域の画像に対する、ステップS21の処理により取得された基準領域の画像の相対的な位置ずれを意味する。この位置ずれは、平面内の直交する2軸(X軸、Y軸)の各々の軸の方向にそったずれの量、および、その平面内での回転角度を含む。画像処理装置20は、2つの基準領域の画像を比較することによりXY位置ずれを求める。基準領域B1を、位置ずれ修正用のモデルに兼用することができる。したがって、ワークWにフォーカスの合った画像を得られるだけでなく、画像内における検査領域A1の位置のずれを修正することもできる。なお、ステップS23の処理は、オプションであり、必須ではない。
In step S23, the
ステップS24において、画像処理装置20は、検査領域A1のフォーカス位置f3を求める。上述したf3=f1+(f2-f0)の式に従ってフォーカス位置f3が求められる。このように、検査領域A1のフォーカス位置f3は、登録されたフォーカス位置f0,f1と、ステップS22において求められたフォーカス位置f2から、比較的単純な計算によって求められる。したがって、フォーカス位置f3を短時間で決定することができる。
In step S24, the
ステップS25において、撮像装置10は、フォーカス位置f3に従ってフォーカスを調整して、ワークWの検査領域A1を撮像する。画像処理装置20は、撮像装置10から、検査領域A1の画像を取得する。この画像は、検査領域A1にフォーカスが合った状態の検査領域A1の画像である。
In step S25, the
ステップS26において、画像処理装置20の判定部21は、撮像装置10によって撮像された画像を処理する。
In step S<b>26 , the
ステップS27において、判定部21は、処理された画像に基づいて、ワークWの外観の良否を判定する。ステップS28において、画像処理装置20の出力部22は、検査の結果(判定結果)を出力する。ステップS28の処理が終了すると、次のワークの検査のため、処理はステップS21に戻される。
In step S27, the
本実施の形態によれば、フォーカス位置の設定の際に、基準領域および検査領域のフォーカス位置を求める。基準領域は明確なパターンを有する領域であるので、フォーカスの合った画像を取得しやすい。したがって、フォーカス位置を高い精度で得ることができる。検査の際には、基準領域のフォーカス位置のずれを用いて検査領域のフォーカス位置を補正する。検査領域が明確なパターン(フォーカスを合わせやすいパターン)を有していない場合であっても、フォーカスの合った検査領域の画像を得ることができる。したがって、検査結果の正確性を高めることができる。 According to this embodiment, the focus positions of the reference area and the inspection area are obtained when setting the focus position. Since the reference area is an area with a distinct pattern, it is easy to acquire a focused image. Therefore, the focus position can be obtained with high accuracy. During inspection, the focus position of the inspection area is corrected using the deviation of the focus position of the reference area. Even if the inspection area does not have a clear pattern (a pattern that is easy to focus), a focused image of the inspection area can be obtained. Therefore, the accuracy of inspection results can be enhanced.
<E.付記>
以上のように、本実施の形態は以下のような開示を含む。
<E. Note>
As described above, the present embodiment includes the following disclosures.
(構成1)
対象物(W)を撮像して、前記対象物(W)を含む画像を生成する撮像部(10)と、
前記撮像部(10)から前記対象物(W)の画像を取得して、前記画像に対して所定の処理を実行する画像処理部(20)とを備え、
前記撮像部(10)は、フォーカス位置を変化させることが可能であり、
前記対象物(W)の前記フォーカス位置を予め設定する第1のモードにおいて、前記画像処理部(20)は、前記対象物(W)の前記画像の中に前記フォーカス位置の基準となる基準領域(B1)と、前記画像処理部(20)による前記所定の処理の対象となる対象領域(A1)とを設定して、前記基準領域(B1)および前記対象領域(A1)の各々の前記フォーカス位置を登録し、
前記所定の処理を実行する第2のモードにおいて、前記画像処理部(20)は、前記撮像部(10)が取得した画像における前記基準領域(B1)のフォーカス位置、および前記基準領域(B1)および前記対象領域(A1)の各々の登録されたフォーカス位置に基づいて、前記対象領域(A1)の前記フォーカス位置を決定し、
前記第2のモードにおいて、前記撮像部(10)は、決定されたフォーカス位置で前記対象領域(A1)を撮像する、画像処理システム(1)。
(Configuration 1)
an imaging unit (10) that captures an image of an object (W) and generates an image containing the object (W);
An image processing unit (20) that acquires an image of the object (W) from the imaging unit (10) and performs predetermined processing on the image,
The imaging unit (10) is capable of changing a focus position,
In the first mode in which the focus position of the object (W) is set in advance, the image processing section (20) includes a reference area serving as a reference for the focus position in the image of the object (W). (B1) and a target area (A1) to be subjected to the predetermined processing by the image processing unit (20) are set, and the focus of each of the reference area (B1) and the target area (A1) is set. Register your location and
In the second mode of executing the predetermined process, the image processing section (20) determines the focal position of the reference area (B1) in the image acquired by the imaging section (10) and the reference area (B1). and determining the focus position of the target area (A1) based on the registered focus position of each of the target area (A1);
An image processing system (1), wherein in the second mode, the imaging unit (10) images the target area (A1) at a determined focus position.
(構成2)
前記基準領域(B1)と前記対象領域(A1)とは、少なくとも一部が互いに重なり合うように各々定められる、構成1に記載の画像処理システム(1)。
(Configuration 2)
The image processing system (1) according to
(構成3)
前記第2のモードにおいて、前記画像処理部(20)は、前記撮像部(10)により撮像された前記画像内の前記基準領域(B1)の位置を、前記第1のモードにおいて登録された前記基準領域(B1)の位置と比較して、その比較の結果に基づいて、前記画像内の前記対象物(W)の位置を修正する、構成1に記載の画像処理システム(1)。
(Composition 3)
In the second mode, the image processing section (20) converts the position of the reference area (B1) in the image captured by the imaging section (10) to the position of the reference area (B1) registered in the first mode. An image processing system (1) according to
(構成4)
前記第2のモードにおいて、前記画像処理部(20)は、登録された前記基準領域(B1)の前記フォーカス位置と、前記第2のモードにおいて取得された前記基準領域(B1)の前記フォーカス位置との差を用いて、登録された前記対象領域(A1)の前記フォーカス位置を補正して、前記対象領域(A1)の前記フォーカス位置を決定する、構成1から構成3のいずれかに記載の画像処理システム(1)。
(Composition 4)
In the second mode, the image processing section (20) processes the registered focus position of the reference area (B1) and the focus position of the reference area (B1) acquired in the second mode. The focus position of the registered target area (A1) is corrected using the difference from the target area (A1) to determine the focus position of the target area (A1). An image processing system (1).
(構成5)
前記対象領域(A1)は無地の領域を含む、構成1から構成4のいずれかに記載の画像処理システム(1)。
(Composition 5)
An image processing system (1) according to any of
(構成6)
前記第1のモードにおいて、前記画像処理部(20)は、前記対象領域(A1)に一時的に形成されたパターンを前記撮像部(10)が撮像することにより得られた前記画像に基づいて、前記対象領域(A1)の前記フォーカス位置を決定する、構成5に記載の画像処理システム(1)。
(Composition 6)
In the first mode, the image processing section (20), based on the image obtained by the imaging section (10) capturing the pattern temporarily formed in the target area (A1), 6. An image processing system (1) according to configuration 5, wherein said focus position of said target area (A1) is determined.
(構成7)
前記第1のモードにおいて、前記画像処理部(20)は、前記対象物(W)の三次元形状の情報から前記基準領域(B1)と前記対象領域(A1)との間の高さの差分を取得して、前記高さの差分と、前記基準領域(B1)の前記フォーカス位置とを用いて、前記対象領域(A1)の前記フォーカス位置を決定する、構成5に記載の画像処理システム(1)。
(Composition 7)
In the first mode, the image processing unit (20) calculates the height difference between the reference area (B1) and the target area (A1) from the three-dimensional shape information of the target object (W). and determining the focus position of the target area (A1) using the height difference and the focus position of the reference area (B1). The image processing system according to configuration 5 ( 1).
(構成8)
対象物(W)を撮像して、前記対象物(W)を含む画像を生成する撮像部(10)と、前記撮像部(10)から前記対象物(W)の画像を取得して、前記画像に対して所定の処理を実行する画像処理部(20)とを備えた画像処理システム(1)による画像処理方法であって、
前記撮像部(10)は、フォーカス位置を変化させることが可能であり、
前記画像処理方法は、
前記対象物(W)の前記フォーカス位置を予め設定する第1のモードにおいて、前記画像処理部(20)が、前記対象物(W)の前記画像の中に前記フォーカス位置の基準となる基準領域(B1)と、前記画像処理部(20)による前記所定の処理の対象となる対象領域(A1)とを設定して、前記基準領域(B1)および前記対象領域(A1)の各々の前記フォーカス位置を登録するステップと、
前記所定の処理を実行する第2のモードにおいて、前記画像処理部(20)が、前記撮像部(10)が取得した画像における前記基準領域(B1)のフォーカス位置、および前記基準領域(B1)および前記対象領域(A1)の各々の登録されたフォーカス位置に基づいて、前記対象領域(A1)の前記フォーカス位置を決定するステップと、
前記第2のモードにおいて、前記撮像部(10)が、決定されたフォーカス位置で前記対象領域(A1)を撮像するステップと、
前記画像処理部(20)が、前記決定されたフォーカス位置で撮像された前記対象物(W)の前記画像を用いて前記所定の処理を実行するステップとを備える、画像処理方法。
(Composition 8)
an imaging unit (10) for imaging an object (W) and generating an image including the object (W); obtaining an image of the object (W) from the imaging unit (10); An image processing method by an image processing system (1) comprising an image processing unit (20) for executing predetermined processing on an image,
The imaging unit (10) is capable of changing a focus position,
The image processing method includes
In a first mode for presetting the focus position of the object (W), the image processing unit (20) includes a reference area serving as a reference for the focus position in the image of the object (W). (B1) and a target area (A1) to be subjected to the predetermined processing by the image processing unit (20) are set, and the focus of each of the reference area (B1) and the target area (A1) is set. registering a location;
In the second mode for executing the predetermined process, the image processing section (20) determines the focus position of the reference area (B1) in the image acquired by the imaging section (10) and the reference area (B1). and determining the focus position of the target area (A1) based on the registered focus position of each of the target area (A1);
in the second mode, the imaging unit (10) imaging the target area (A1) at the determined focus position;
An image processing method, comprising: performing the predetermined processing by using the image of the object (W) imaged at the determined focus position by the image processing unit (20).
(構成9)
撮像装置(10)によって対象物(W)を撮像することにより得られた画像を用いて所定の処理を実行するためのプログラムであって、
前記撮像装置(10)は、フォーカス位置を変化させることが可能であり、
前記プログラムは、コンピュータ(20)に、
前記対象物(W)の前記フォーカス位置を予め設定する第1のモードにおいて、前記対象物(W)の前記画像の中に前記フォーカス位置の基準となる基準領域(B1)と、前記所定の処理の対象となる対象領域(A1)とを設定して、前記基準領域(B1)および前記対象領域(A1)の各々の前記フォーカス位置を登録するステップと、
前記所定の処理を実行する第2のモードにおいて、前記撮像装置(10)が取得した画像における前記基準領域(B1)のフォーカス位置、および前記基準領域(B1)および前記対象領域(A1)の各々の登録されたフォーカス位置に基づいて、前記対象領域(A1)の前記フォーカス位置を決定するステップと、
前記決定されたフォーカス位置で撮像された前記対象物(W)の前記画像を用いて前記所定の処理を実行するステップとを実行させる、プログラム。
(Composition 9)
A program for executing a predetermined process using an image obtained by imaging an object (W) with an imaging device (10),
The imaging device (10) is capable of changing a focus position,
The program, in a computer (20),
In a first mode for presetting the focus position of the object (W), the image of the object (W) includes a reference area (B1) serving as a reference for the focus position and the predetermined process. A step of setting a target area (A1) to be the target of and registering the focus position of each of the reference area (B1) and the target area (A1);
In the second mode of executing the predetermined process, the focus position of the reference area (B1) in the image acquired by the imaging device (10), and each of the reference area (B1) and the target area (A1) determining the focus position of the target area (A1) based on the registered focus position of
and executing the predetermined process using the image of the object (W) captured at the determined focus position.
本発明の実施の形態について説明したが、今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 Although the embodiments of the present invention have been described, the embodiments disclosed this time should be considered as illustrative in all respects and not restrictive. The scope of the present invention is indicated by the scope of claims, and is intended to include all modifications within the meaning and scope of equivalence to the scope of claims.
1 画像処理システム、10 撮像装置、11 照明部、12 レンズモジュール、12a,12c レンズ、12b レンズ群、12d 可動部、12e1,12e2 電圧源、12e フォーカス調整部、13 撮像素子、13a 撮像面、14 撮像素子制御部、15,17 レジスタ、16 レンズ制御部、18 通信I/F部、20 画像処理装置、21 判定部、22 出力部、23 記憶部、24 指令生成部、60 表示装置、70 透光性容器、71 導電性液体、72 絶縁性液体、73a,73b,74a,74b 電極、75a,75b 絶縁体、76a,76b 絶縁層、90 ステージ、100 治具、101 印刷面、102 パターン、A1 検査領域、B1 基準領域、F 焦点、O 主点、S11~S15,S21~S28 ステップ、W ワーク、W1,W2 領域、f0~f3 フォーカス位置。
Claims (9)
前記撮像部から前記対象物の画像を取得して、前記画像に対して所定の処理を実行する画像処理部とを備え、
前記撮像部は、フォーカス位置を変化させることが可能であり、
前記対象物の前記フォーカス位置を予め設定する第1のモードにおいて、前記画像処理部は、前記対象物の前記画像の中に前記フォーカス位置の基準となる基準領域と、前記画像処理部による前記所定の処理の対象となる対象領域とを設定して、前記基準領域および前記対象領域の各々の前記フォーカス位置を登録し、
前記所定の処理を実行する第2のモードにおいて、前記画像処理部は、前記撮像部が取得した画像における前記基準領域のフォーカス位置、および前記基準領域および前記対象領域の各々の登録されたフォーカス位置に基づいて、前記対象領域の前記フォーカス位置を決定し、
前記第2のモードにおいて、前記撮像部は、決定されたフォーカス位置で前記対象領域を撮像する、画像処理システム。 an imaging unit that captures an image of an object and generates an image that includes the object;
an image processing unit that acquires an image of the object from the imaging unit and performs predetermined processing on the image;
The imaging unit is capable of changing a focus position,
In a first mode in which the focus position of the object is set in advance, the image processing unit includes a reference area serving as a reference for the focus position in the image of the object, and the predetermined focus position by the image processing unit. setting a target area to be processed in and registering the focus position of each of the reference area and the target area;
In the second mode of executing the predetermined process, the image processing unit controls the focus position of the reference area in the image acquired by the imaging unit, and the registered focus positions of each of the reference area and the target area. determining the focus position of the region of interest based on
The image processing system, wherein in the second mode, the imaging unit images the target area at a determined focus position.
前記撮像部は、フォーカス位置を変化させることが可能であり、
前記画像処理方法は、
前記対象物の前記フォーカス位置を予め設定する第1のモードにおいて、前記画像処理部が、前記対象物の前記画像の中に前記フォーカス位置の基準となる基準領域と、前記画像処理部による前記所定の処理の対象となる対象領域とを設定して、前記基準領域および前記対象領域の各々の前記フォーカス位置を登録するステップと、
前記所定の処理を実行する第2のモードにおいて、前記画像処理部が、前記撮像部が取得した画像における前記基準領域のフォーカス位置、および前記基準領域および前記対象領域の各々の登録されたフォーカス位置に基づいて、前記対象領域の前記フォーカス位置を決定するステップと、
前記第2のモードにおいて、前記撮像部が、決定されたフォーカス位置で前記対象領域を撮像するステップと、
前記画像処理部が、前記決定されたフォーカス位置で撮像された前記対象物の前記画像を用いて前記所定の処理を実行するステップとを備える、画像処理方法。 an imaging unit that captures an image of an object and generates an image including the object; and an image processing unit that acquires the image of the object from the imaging unit and performs predetermined processing on the image. An image processing method by an image processing system comprising
The imaging unit is capable of changing a focus position,
The image processing method includes
In a first mode in which the focus position of the object is set in advance, the image processing unit includes a reference area serving as a reference for the focus position in the image of the object, and the predetermined focus position by the image processing unit. a step of setting a target region to be processed in and registering the focus position of each of the reference region and the target region;
In the second mode of executing the predetermined process, the image processing unit performs the focus position of the reference area in the image acquired by the imaging unit, and the registered focus positions of each of the reference area and the target area. determining the focus position of the region of interest based on
In the second mode, the imaging unit imaging the target area at the determined focus position;
An image processing method, wherein the image processing unit performs the predetermined processing using the image of the object imaged at the determined focus position.
前記撮像装置は、フォーカス位置を変化させることが可能であり、
前記プログラムは、コンピュータに、
前記対象物の前記フォーカス位置を予め設定する第1のモードにおいて、前記対象物の前記画像の中に前記フォーカス位置の基準となる基準領域と、前記所定の処理の対象となる対象領域とを設定して、前記基準領域および前記対象領域の各々の前記フォーカス位置を登録するステップと、
前記所定の処理を実行する第2のモードにおいて、前記撮像装置が取得した画像における前記基準領域のフォーカス位置、および前記基準領域および前記対象領域の各々の登録されたフォーカス位置に基づいて、前記対象領域の前記フォーカス位置を決定するステップと、
前記決定されたフォーカス位置で撮像された前記対象物の前記画像を用いて前記所定の処理を実行するステップとを実行させる、プログラム。 A program for executing a predetermined process using an image obtained by imaging an object with an imaging device,
The imaging device is capable of changing the focus position,
The program, in a computer,
In a first mode in which the focus position of the object is preset, a reference area serving as a reference for the focus position and a target area to be subjected to the predetermined processing are set in the image of the object. and registering the focus position of each of the reference area and the target area;
In the second mode of executing the predetermined process, based on the focus position of the reference area in the image acquired by the imaging device and the registered focus positions of each of the reference area and the target area, determining the focus position of a region of interest;
and executing the predetermined process using the image of the object captured at the determined focus position.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018156215A JP7135586B2 (en) | 2018-08-23 | 2018-08-23 | Image processing system, image processing method and program |
PCT/JP2019/031040 WO2020039920A1 (en) | 2018-08-23 | 2019-08-07 | Image processing system, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018156215A JP7135586B2 (en) | 2018-08-23 | 2018-08-23 | Image processing system, image processing method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020030338A JP2020030338A (en) | 2020-02-27 |
JP7135586B2 true JP7135586B2 (en) | 2022-09-13 |
Family
ID=69593021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018156215A Active JP7135586B2 (en) | 2018-08-23 | 2018-08-23 | Image processing system, image processing method and program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7135586B2 (en) |
WO (1) | WO2020039920A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001296478A (en) | 2000-04-12 | 2001-10-26 | Matsushita Electric Ind Co Ltd | Device and method for observing biochemical substance |
JP2013109271A (en) | 2011-11-24 | 2013-06-06 | Keyence Corp | Image processor, focus adjustment method, and computer program |
-
2018
- 2018-08-23 JP JP2018156215A patent/JP7135586B2/en active Active
-
2019
- 2019-08-07 WO PCT/JP2019/031040 patent/WO2020039920A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001296478A (en) | 2000-04-12 | 2001-10-26 | Matsushita Electric Ind Co Ltd | Device and method for observing biochemical substance |
JP2013109271A (en) | 2011-11-24 | 2013-06-06 | Keyence Corp | Image processor, focus adjustment method, and computer program |
Also Published As
Publication number | Publication date |
---|---|
WO2020039920A1 (en) | 2020-02-27 |
JP2020030338A (en) | 2020-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6299111B2 (en) | Laser processing equipment | |
US8614415B2 (en) | Defect inspection method of fine structure object and defect inspection apparatus | |
US20140253719A1 (en) | Galvanometer scanned camera with variable focus and method | |
US10120163B2 (en) | Auto-focus method for a coordinate-measuring apparatus | |
CN110261385B (en) | Appearance inspection system, image processing apparatus, imaging apparatus, and inspection method | |
JP2016170122A (en) | Measurement device | |
KR20180015139A (en) | Optical device for detecting internal defects of transparent substrate and method therefor | |
JP2016071010A (en) | Autofocus device, autofocus method, and program | |
JP2012002676A (en) | Mask defect checking device and mask defect checking method | |
KR101652356B1 (en) | optical apparatus for examining pattern image of semiconductor device | |
KR101863752B1 (en) | method of enhancing resolution for optical apparatus for inspecting pattern image of semiconductor wafer and method of acquiring TSOM image using the same | |
TWI245556B (en) | Autofocus control method, autofocus controller, and image processor | |
US20120050518A1 (en) | Inspecting apparatus and inspection method | |
US10827114B2 (en) | Imaging system and setting device | |
JP6961846B1 (en) | EUV mask inspection device, EUV mask inspection method, EUV mask inspection program and EUV mask inspection system | |
KR101826127B1 (en) | optical apparatus for inspecting pattern image of semiconductor wafer | |
JP7135586B2 (en) | Image processing system, image processing method and program | |
JP7047725B2 (en) | Inspection system, inspection method and program | |
JP5281815B2 (en) | Optical device defect inspection method and optical device defect inspection apparatus | |
JP5544894B2 (en) | Wafer inspection apparatus and wafer inspection method | |
JP7287533B2 (en) | Inspection system, inspection method and program | |
JP2016070683A (en) | Image processing device, image measurement device, image processing method, image processing program, and method for manufacturing structure | |
JP2022161475A (en) | Defect detection device, defect detection method, image processing device and image processing program | |
JP7087823B2 (en) | Image processing system, image processing method and program | |
JP7079569B2 (en) | Inspection methods |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201214 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220111 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220308 |
|
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: 20220802 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220815 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7135586 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |