Nothing Special   »   [go: up one dir, main page]

JP7624314B2 - Image Processing Device - Google Patents

Image Processing Device Download PDF

Info

Publication number
JP7624314B2
JP7624314B2 JP2021003067A JP2021003067A JP7624314B2 JP 7624314 B2 JP7624314 B2 JP 7624314B2 JP 2021003067 A JP2021003067 A JP 2021003067A JP 2021003067 A JP2021003067 A JP 2021003067A JP 7624314 B2 JP7624314 B2 JP 7624314B2
Authority
JP
Japan
Prior art keywords
image data
pixel
height
unit
pattern
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
Application number
JP2021003067A
Other languages
Japanese (ja)
Other versions
JP2022108177A (en
Inventor
剛 丸山
仁 吉富
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.)
Saki Corp
Original Assignee
Saki 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 Saki Corp filed Critical Saki Corp
Priority to JP2021003067A priority Critical patent/JP7624314B2/en
Publication of JP2022108177A publication Critical patent/JP2022108177A/en
Application granted granted Critical
Publication of JP7624314B2 publication Critical patent/JP7624314B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像データの合成方法を用いた画像処理装置に関する。 The present invention relates to an image processing device that uses a method for synthesizing image data.

近年では、様々な機器に電子回路基板が実装されるようになってきているが、この種の電子回路基板が実装される機器においては、小型化、薄型化等が常に課題になっており、この点から、電子回路基板の実装の高密度化を図ることが要求されている。このような電子回路基板のハンダの塗布状態、電子部品の実装状態等を検査する検査装置においては、周期が異なる複数の光パターンを利用して計測レンジの拡大を図るとともに、計測時間の短縮化を図る位相シフト法を基にした三次元計測装置が提案されている(例えば、特許文献1参照)。 In recent years, electronic circuit boards have come to be mounted on a variety of devices, but for devices on which these types of electronic circuit boards are mounted, miniaturization and thinning are always issues, and from this point of view, there is a demand for higher density mounting of electronic circuit boards. In inspection devices that inspect the solder application state and electronic component mounting state of such electronic circuit boards, a three-dimensional measurement device based on the phase shift method has been proposed that uses multiple light patterns with different periods to expand the measurement range and shorten the measurement time (see, for example, Patent Document 1).

特開2017-003513号公報JP 2017-003513 A

上記手法では、撮像部の被写界深度のため、計測レンジの拡大に限界がある。一方、複数の撮像位置から計測し、その位置関係に従い座標変換を行うことで、複数の計測データを貼り合わせることができることが知られている。しかし、複数の撮像位置から算出された計測結果を単純に合成しただけでは、特に合成の継ぎ目付近で誤計測が多く含まれることになるという課題があった。 In the above method, there is a limit to how much the measurement range can be expanded due to the depth of field of the imaging unit. On the other hand, it is known that multiple measurement data can be stitched together by taking measurements from multiple imaging positions and performing coordinate transformation according to the positional relationships. However, there is an issue that simply combining the measurement results calculated from multiple imaging positions will often contain erroneous measurements, especially near the seams of the combination.

本発明はこのような課題に鑑みてなされたものであり、撮像方向(Z方向)の異なる位置にある撮像部により取得された複数の画像データを、精度良く、かつ、短い時間で合成することができる画像データの合成方法を用いた画像処理装置を提供することを目的とする。 The present invention has been made in consideration of these problems, and aims to provide an image processing device that uses an image data synthesis method that can synthesize multiple image data acquired by imaging units located at different positions in the imaging direction (Z direction) with high accuracy and in a short time.

前記課題を解決するために、本発明に係る画像処理装置は、被検査体との撮像方向の相対位置を変化可能な撮像部と、制御部と、を有し、前記制御部は、前記被検査体上の所定の基準面に合焦しているときの位置にある前記撮像部で撮像して基準位置画像データを取得し、当該基準位置画像データの画素毎に前記被検査体の高さ情報を取得する高さ基本処理を実行する第1のステップと、前記所定の基準面に合焦しているときの位置とは異なる撮像方向の位置であって予め決められた位置のうち、前記被検査体から最も遠い位置を現在の位置として設定する第2のステップと、前記現在の位置にある前記撮像部で撮像して現在位置画像データを取得し、当該現在位置画像データの画素毎に前記高さ基本処理を実行して前記被検査体の高さ情報を取得する第3のステップと、前記高さ情報に含まれる、前記基準位置画像データ及び前記現在位置画像データの画素毎の輝度の情報、並びに、前記現在位置画像データの画素毎の前記被検査体と前記撮像部の最合焦位置との距離の情報に基づいて、前記現在位置画像データの画素毎に、焦点が合っている画素の条件を満たしているか否かを判断し、前記条件を満たしている画素だと判断したときは前記現在位置画像データの当該画素の値を合成画像データの該当する画素の値として選択する合成画像更新処理を実行する第4のステップと、前記予め決められた位置のうち、前記現在の位置から前記所定の基準面に近づく方向の次の位置を現在の位置として前記第3のステップ及び前記第4のステップを繰り返し実行する第5のステップと、前記第5のステップで前記予め決められた位置の全てで前記第3のステップ及び前記第4のステップが実行されたと判断したときに、前記所定の基準面に合焦しているときの位置を現在の位置として設定し、前記基準位置画像データの画素毎に前記合成画像更新処理を実行して当該画素が前記条件を満たしていると判断したときに前記基準位置画像データの当該画素の値を前記合成画像データの該当する画素の値として選択する第6のステップと、を実行する。なお、撮像部の焦点距離は固定とする。 In order to achieve the above object, an image processing device according to the present invention has an imaging section capable of changing a relative position in an imaging direction with respect to an object under inspection, and a control section, wherein the control section performs a first step of performing height basic processing to acquire reference position image data by imaging with the imaging section at a position when focused on a predetermined reference plane on the object under inspection, and acquire height information of the object under inspection for each pixel of the reference position image data, a second step of setting a position in the imaging direction different from the position when focused on the predetermined reference plane and among predetermined positions which are the furthest from the object under inspection as a current position, a third step of performing imaging with the imaging section at the current position to acquire current position image data, and acquire height information of the object under inspection by performing the height basic processing for each pixel of the current position image data, which are included in the height information, and a fourth step of executing a composite image update process for determining whether or not each pixel of the current position image data satisfies the condition of a focused pixel based on the information of the fourth step, and selecting the value of the pixel in the current position image data as the value of the corresponding pixel in the composite image data when it is determined that the pixel satisfies the condition, a fifth step of repeatedly executing the third step and the fourth step with the next position in the direction approaching the specified reference plane from the current position among the predetermined positions as the current position, and a sixth step of setting the position when the pixel is focused on the specified reference plane as the current position when it is determined in the fifth step that the third step and the fourth step have been executed at all of the predetermined positions, and executing the composite image update process for each pixel of the reference position image data and selecting the value of the pixel in the reference position image data as the value of the corresponding pixel in the composite image data when it is determined that the pixel satisfies the condition . Note that the focal length of the imaging unit is fixed.

また、本発明に係る画像処理装置は、前記被検査体に対し、位相が単調増加または単調減少するように変化するパターンが繰り返し形成された縞パターンを投射する投射部を有し、前記制御部は、前記投射部により前記縞パターンが投射されて取得された前記基準位置画像データまたは前記現在位置画像データを取得して前記高さ基本処理により前記高さ情報を取得するように構成されていることが好ましい。 Furthermore, it is preferable that the image processing device according to the present invention has a projection unit that projects a stripe pattern onto the object to be inspected, the stripe pattern being formed by repeatedly changing a phase so as to monotonically increase or decrease, and the control unit is configured to acquire the reference position image data or the current position image data acquired by projecting the stripe pattern by the projection unit, and acquire the height information by the basic height processing .

また、本発明に係る画像処理装置において、前記制御部は、前記合成画像更新処理において、前記現在位置画像データの画素の前記輝度の情報に含まれる振幅に関する情報と、前記基準位置画像データの画素の前記輝度の情報に含まれる振幅に関する情報とを比較して前記条件を満たしている画素か否かを判断することが好ましい。 In addition, in the image processing device of the present invention, it is preferable that, in the composite image update process, the control unit compares information regarding amplitude contained in the luminance information of the pixel of the current position image data with information regarding amplitude contained in the luminance information of the pixel of the reference position image data to determine whether or not the pixel satisfies the condition.

また、本発明に係る画像処理装置において、前記制御部は、前記高さ基本処理において、前記基準位置画像データに対しては、計測点数が最大化するように前記高さ情報を取得し、前記現在位置画像データに対しては、計測誤差の疑いの高い画素は除外するように前記高さ情報を取得することが好ましい。 In addition, in the image processing device of the present invention, it is preferable that, in the basic height processing, the control unit acquires the height information for the reference position image data so as to maximize the number of measurement points, and acquires the height information for the current position image data so as to exclude pixels that are highly suspected of having measurement errors.

また、本発明に係る画像処理装置は、前記被検査体に対し、照明光を投射する照明部を更に有し、前記基準位置画像データ及び前記現在位置画像データの各々には、前記投射部により前記縞パターンが投射されて前記撮像部により取得されたパターン画像データと、前記照明部により前記照明光が投射されて前記撮像部により取得された2次元画像データと、を含み、前記制御部は、前記高さ基本処理において、前記パターン画像データから前記高さ情報を取得し、前記合成画像更新処理において、前記条件を満たしている画素だと判断したときは、前記パターン画像データの当該画素の高さ情報を高さマップの合成画像データの該当する画素の値として選択し、前記2次元画像データの当該画素の値を2次元画像データの合成画像データの該当する画素の値として選択することが好ましい。 Furthermore, the image processing device of the present invention further has an illumination unit that projects illumination light onto the object under inspection, and each of the reference position image data and the current position image data includes pattern image data acquired by the imaging unit when the stripe pattern is projected by the projection unit, and two-dimensional image data acquired by the imaging unit when the illumination light is projected by the illumination unit, and it is preferable that the control unit acquires the height information from the pattern image data in the basic height processing, and when it is determined in the composite image update processing that a pixel satisfies the condition, selects the height information of the pixel in the pattern image data as the value of the corresponding pixel in the composite image data of the height map, and selects the value of the pixel in the two-dimensional image data as the value of the corresponding pixel in the composite image data of the two-dimensional image data.

また、本発明に係る画像処理装置において、前記制御部は、前記合成画像更新処理により合成された高さマップの合成画像データに対し、不計測画素補間処理や歪み補正処理等の高さ後処理を実行することが好ましい。 In addition, in the image processing device according to the present invention, it is preferable that the control unit performs height post-processing, such as unmeasured pixel interpolation processing and distortion correction processing, on the composite image data of the height map synthesized by the composite image update processing.

また、本発明に係る画像処理装置において、前記制御部は、前記合成画像更新処理において、同一の画素で、前記撮像部が撮像方向の異なる位置にあるときの2以上の前記基準位置画像データまたは前記現在位置画像データで、前記条件を満たしている画素だと判断したときは、当該画像データのうち、前記撮像部が前記被検査体から最も遠い位置にある画像データの当該画素の値を合成画像データの該当する画素の値として選択することが好ましい。 Furthermore, in the image processing device of the present invention, when the control unit determines in the composite image update process that the same pixel satisfies the condition in two or more of the reference position image data or the current position image data when the imaging unit is in different positions in the imaging direction, it is preferable that the control unit selects the value of the pixel in the image data in which the imaging unit is located farthest from the subject as the value of the corresponding pixel in the composite image data.

本発明によれば、撮像方向(Z方向)の異なる位置にある撮像部により取得された複数の画像データを、精度良く、かつ、短い時間で合成することができる画像データの合成方法を用いた画像処理装置を提供することができる。 According to the present invention, it is possible to provide an image processing device that uses an image data synthesis method that can synthesize multiple image data acquired by imaging units located at different positions in the imaging direction (Z direction) with high accuracy and in a short time.

画像処理装置を含む検査装置の構成を説明するための説明図である。FIG. 1 is an explanatory diagram for explaining a configuration of an inspection device including an image processing device. 基準平面の位相と測定した位相との関係を説明する説明図である。FIG. 11 is an explanatory diagram illustrating the relationship between the phase of a reference plane and a measured phase. カメラユニットの撮像位置を説明するための説明図である。FIG. 4 is an explanatory diagram for explaining an imaging position of a camera unit. 画像データの合成方法の流れを示すフローチャートである。10 is a flowchart showing the flow of a method for combining image data. 各撮像位置における条件(1)の範囲と合成画像データとの対応関係を説明するための説明図である。FIG. 11 is an explanatory diagram for explaining the correspondence between the range of condition (1) at each imaging position and composite image data.

以下、本発明の好ましい実施形態について図面を参照して説明する。まず、図1を用いて本実施形態に係る検査装置10の構成について説明する。この検査装置10は、被検査体12を撮像して得られる被検査体12の画像データ(2次元画像データ又はパターン画像データ)を使用して被検査体12を検査する装置である。したがって、この検査装置10は画像処理装置としての機能も有している。被検査体12は、例えば、部品が搭載され、ハンダが塗布されている電子回路基板である。 A preferred embodiment of the present invention will now be described with reference to the drawings. First, the configuration of an inspection device 10 according to this embodiment will be described with reference to FIG. 1. This inspection device 10 is a device that inspects an object 12 using image data (two-dimensional image data or pattern image data) of the object 12 obtained by imaging the object 12. Therefore, this inspection device 10 also functions as an image processing device. The object 12 is, for example, an electronic circuit board on which components are mounted and solder is applied.

検査装置10は、被検査体12を保持するための検査テーブル14と、被検査体12を照明し撮像する撮像ユニット20と、検査テーブル14に対し撮像ユニット20を相対移動させるXYステージ16と、撮像ユニット20及びXYステージ16の作動を制御し、被検査体12の検査を実行するための制御ユニット30と、を含んで構成される。なお説明の便宜上、図1に示すように、検査テーブル14の被検査体配置面をXY平面とし、その配置面に垂直な方向(すなわち撮像ユニット20を構成するカメラユニット21による撮像方向(カメラユニット21の光学系の光軸方向))をZ方向とする。 The inspection device 10 includes an inspection table 14 for holding the object under inspection 12, an imaging unit 20 for illuminating and imaging the object under inspection 12, an XY stage 16 for moving the imaging unit 20 relative to the inspection table 14, and a control unit 30 for controlling the operation of the imaging unit 20 and the XY stage 16 and inspecting the object under inspection 12. For ease of explanation, as shown in FIG. 1, the surface of the inspection table 14 on which the object under inspection is placed is defined as the XY plane, and the direction perpendicular to the surface (i.e., the imaging direction of the camera unit 21 constituting the imaging unit 20 (the optical axis direction of the optical system of the camera unit 21)) is defined as the Z direction.

撮像ユニット20は、XYステージ16の移動テーブル(図示せず)に取り付けられており、XYステージ16によりX方向及びY方向のそれぞれに移動可能である。XYステージ16は例えばいわゆるH型のXYステージである。よってXYステージ16は、Y方向に延びるY方向ガイドに沿って移動テーブルをY方向に移動させるY駆動部と、Y方向ガイドをその両端で支持しかつ移動テーブルとY方向ガイドとをX方向に移動可能に構成されている2本のX方向ガイド及びX駆動部と、を備える。なおXYステージ16は、撮像ユニット20をZ方向に移動させるZ移動機構をさらに備えている。また、撮像ユニット20を回転させる回転機構をさらに備えてもよい。検査装置10は、検査テーブル14を移動可能とするXYステージをさらに備えてもよく、この場合、撮像ユニット20を移動させるXYステージ16は省略されてもよい。また、X駆動部及びY駆動部には、リニアモータやボールねじを用いることができる。また、撮像ユニット20をZ方向に移動させる代わりに、XYステージ16をZ方向に移動させるように構成してもよい。 The imaging unit 20 is attached to a moving table (not shown) of the XY stage 16, and can be moved in the X and Y directions by the XY stage 16. The XY stage 16 is, for example, a so-called H-shaped XY stage. Therefore, the XY stage 16 includes a Y drive unit that moves the moving table in the Y direction along a Y direction guide extending in the Y direction, and two X direction guides and an X drive unit that support the Y direction guide at both ends and are configured to move the moving table and the Y direction guide in the X direction. The XY stage 16 further includes a Z movement mechanism that moves the imaging unit 20 in the Z direction. It may also include a rotation mechanism that rotates the imaging unit 20. The inspection device 10 may further include an XY stage that can move the inspection table 14, and in this case, the XY stage 16 that moves the imaging unit 20 may be omitted. In addition, a linear motor or a ball screw can be used for the X drive unit and the Y drive unit. Also, instead of moving the imaging unit 20 in the Z direction, the XY stage 16 may be configured to move in the Z direction.

撮像ユニット20は、被検査体12の検査面(基板面)に対して垂直方向(Z方向)から撮像するカメラユニット21と、照明ユニット22と、投射ユニット23と、を含んで構成される。本実施形態に係る検査装置10においては、カメラユニット21、照明ユニット22、及び投射ユニット23は一体の撮像ユニット20として構成されていてもよい。この一体の撮像ユニット20において、カメラユニット21、照明ユニット22、及び投射ユニット23の相対位置は固定されていてもよいし、各ユニットが相対移動可能に構成されていてもよい。また、カメラユニット21、照明ユニット22、及び投射ユニット23は別体とされ、別々に移動可能に構成されていてもよい。 The imaging unit 20 includes a camera unit 21 that captures an image from a direction perpendicular (Z direction) to the inspection surface (substrate surface) of the inspected object 12, an illumination unit 22, and a projection unit 23. In the inspection device 10 according to this embodiment, the camera unit 21, the illumination unit 22, and the projection unit 23 may be configured as an integrated imaging unit 20. In this integrated imaging unit 20, the relative positions of the camera unit 21, the illumination unit 22, and the projection unit 23 may be fixed, or each unit may be configured to be movable relative to the others. In addition, the camera unit 21, the illumination unit 22, and the projection unit 23 may be separate and configured to be movable separately.

カメラユニット21は、対象物の2次元画像を生成する撮像素子と、その撮像素子に画像を結像させるための光学系(例えばレンズ)とを含む。このカメラユニット21は例えばCCDカメラである。カメラユニット21の最大視野は、検査テーブル14の被検査体載置区域よりも小さくてもよい。この場合、カメラユニット21は、複数の部分画像に分割して被検査体12の全体を撮像する。制御ユニット30は、カメラユニット21が部分画像を撮像するたびに次の撮像位置へとカメラユニット21が移動されるようXYステージ16を制御する。制御ユニット30は、部分画像を合成して被検査体12の全体画像を生成する。 The camera unit 21 includes an image sensor that generates a two-dimensional image of the object, and an optical system (e.g., a lens) for focusing the image on the image sensor. The camera unit 21 is, for example, a CCD camera. The maximum field of view of the camera unit 21 may be smaller than the area of the inspection table 14 where the object to be inspected is placed. In this case, the camera unit 21 captures the entire object to be inspected 12 by dividing it into multiple partial images. The control unit 30 controls the XY stage 16 so that the camera unit 21 is moved to the next imaging position each time the camera unit 21 captures a partial image. The control unit 30 synthesizes the partial images to generate an entire image of the object to be inspected 12.

なお、カメラユニット21は、2次元の撮像素子に代えて、1次元画像を生成する撮像素子を備えてもよい。この場合、カメラユニット21により被検査体12を走査することにより、被検査体12の全体画像を取得することができる。 In addition, the camera unit 21 may be equipped with an image sensor that generates a one-dimensional image instead of a two-dimensional image sensor. In this case, the entire image of the test object 12 can be obtained by scanning the test object 12 with the camera unit 21.

照明ユニット22は、カメラユニット21による撮像のための照明光を被検査体12の表面に投射するよう構成されている。照明ユニット22は、カメラユニット21の撮像素子により検出可能である波長域から選択された波長または波長域の光を発する1つまたは複数の光源を備える。照明光は可視光には限られず、紫外光やX線等を用いてもよい。光源が複数設けられている場合には、各光源は異なる波長の光(例えば、赤色、青色、及び緑色)を異なる投光角度で被検査体12の表面に投光するよう構成される。 The illumination unit 22 is configured to project illumination light for imaging by the camera unit 21 onto the surface of the inspected object 12. The illumination unit 22 includes one or more light sources that emit light of a wavelength or wavelength range selected from the wavelength range detectable by the imaging element of the camera unit 21. The illumination light is not limited to visible light, and ultraviolet light, X-rays, etc. may also be used. When multiple light sources are provided, each light source is configured to project light of a different wavelength (e.g., red, blue, and green) onto the surface of the inspected object 12 at a different projection angle.

照明ユニット22により照明された被検査体12は、カメラユニット21により撮像される。検査装置10は、照明ユニット22により照明されて撮像された被検査体12の画像データ(この画像データを「2次元画像データ」と呼ぶ)と、後述する高さマップとに基づいて、被検査体12における基板上の欠陥の有無(例えば、部品の有無や配置が適切か、また、ハンダの塗布状態の良否)を判定する。 The object under inspection 12 illuminated by the lighting unit 22 is imaged by the camera unit 21. The inspection device 10 judges the presence or absence of defects on the board of the object under inspection 12 (for example, whether there are components and whether their arrangement is appropriate, and whether the solder application condition is good or bad) based on image data of the object under inspection 12 illuminated and imaged by the lighting unit 22 (this image data is called "two-dimensional image data") and a height map described below.

本実施形態に係る検査装置10において、照明ユニット22は、被検査体12の検査面に対し斜め方向から照明光を投射する側方照明源であって、本実施形態では、上位光源22a、中位光源22b及び下位光源22cを備えている。なお、本実施形態に係る検査装置10においては、側方照明源22a、22b、22cはそれぞれリング照明源であり、カメラユニット21の光軸を包囲し、被検査体12の検査面に対し斜めに照明光を投射するように構成されている。これらの側方照明源22a,22b,22cの各々は、複数の光源が円環状に配置されて構成されていてもよい。また、側方照明源である上位光源22a、中位光源22b及び下位光源22cは、それぞれ、検査面に対して異なる角度で照明光を投射するように構成されている。 In the inspection device 10 according to this embodiment, the illumination unit 22 is a side illumination source that projects illumination light from an oblique direction onto the inspection surface of the inspected object 12, and in this embodiment, includes an upper light source 22a, a middle light source 22b, and a lower light source 22c. In the inspection device 10 according to this embodiment, the side illumination sources 22a, 22b, and 22c are each a ring illumination source that surrounds the optical axis of the camera unit 21 and is configured to project illumination light obliquely onto the inspection surface of the inspected object 12. Each of these side illumination sources 22a, 22b, and 22c may be configured with multiple light sources arranged in a circular ring shape. In addition, the upper light source 22a, the middle light source 22b, and the lower light source 22c, which are side illumination sources, are each configured to project illumination light at different angles onto the inspection surface.

投射ユニット23は、被検査体12の検査面にパターンを投射する。パターンが投射された被検査体12は、カメラユニット21により撮像される。検査装置10は、撮像された被検査体12の画像データ(この画像データを「パターン画像データ」と呼ぶ)に基づいて被検査体の検査面の高さマップを作成する。ここで、高さマップとは、パターン画像データの画素毎に、被検査体の高さ情報を有するデータである。制御ユニット30は、投射パターンに対するパターン画像データの局所的な不一致を検出し、その局所的な不一致に基づいてその部位の高さ情報を取得する。つまり、投射パターンに対する撮像パターンの変化が、検査面上の高さの変化に対応する。 The projection unit 23 projects a pattern onto the inspection surface of the object under inspection 12. The object under inspection 12 onto which the pattern is projected is imaged by the camera unit 21. The inspection device 10 creates a height map of the inspection surface of the object under inspection based on image data of the imaged object under inspection 12 (this image data is called "pattern image data"). Here, the height map is data that has height information of the object under inspection for each pixel of the pattern image data. The control unit 30 detects local mismatches between the projected pattern and the pattern image data, and obtains height information of that portion based on the local mismatches. In other words, changes in the imaged pattern relative to the projected pattern correspond to changes in height on the inspection surface.

投射パターンは、明線と暗線とが交互に周期的に繰り返される1次元の縞パターンであることが好ましい。投射ユニット23は、被検査体12の検査面に対し斜め方向から縞パターンを投射するよう配置されている。被検査体12の検査面における高さの非連続は、縞パターン画像においてパターンのずれとして表れる。よって、パターンのずれ量から高さ差を求めることができる。例えば、サインカーブに従って明るさが変化する縞パターンを用いるPMP(Phase Measurement Profilometry)法により制御ユニット30は高さマップを作成する。PMP法においては縞パターンのずれ量がサインカーブの位相差に相当する。 The projection pattern is preferably a one-dimensional stripe pattern in which light and dark lines are alternately repeated periodically. The projection unit 23 is arranged to project the stripe pattern from an oblique direction onto the inspection surface of the object 12 under test. Any discontinuity in height on the inspection surface of the object 12 under test appears as a shift in the stripe pattern image. Therefore, the height difference can be obtained from the amount of shift in the pattern. For example, the control unit 30 creates a height map using the PMP (Phase Measurement Profilometry) method, which uses a stripe pattern whose brightness changes according to a sine curve. In the PMP method, the amount of shift in the stripe pattern corresponds to the phase difference of the sine curve.

投射ユニット23は、パターン形成装置と、パターン形成装置を照明するための光源装置と、パターンを被検査体12の検査面に投射するための光学系と、を含んで構成される。パターン形成装置は例えば、液晶ディスプレイ等のように所望のパターンを動的に生成しうる可変パターニング装置であってもよいし、ガラスプレート等の基板上にパターンが固定的に形成されている固定パターニング装置であってもよい。パターン形成装置が固定パターニング装置である場合には、固定パターニング装置を移動させる移動機構を設けるか、あるいはパターン投射用の光学系に調整機構を設けることにより、パターンの投射位置を可変とすることが好ましい。また、投射ユニット23は、異なるパターンをもつ複数の固定パターニング装置を切替可能に構成されていてもよい。 The projection unit 23 includes a pattern forming device, a light source device for illuminating the pattern forming device, and an optical system for projecting a pattern onto the inspection surface of the inspected object 12. The pattern forming device may be, for example, a variable patterning device capable of dynamically generating a desired pattern, such as a liquid crystal display, or a fixed patterning device in which a pattern is fixedly formed on a substrate, such as a glass plate. When the pattern forming device is a fixed patterning device, it is preferable to provide a moving mechanism for moving the fixed patterning device, or to provide an adjustment mechanism in the optical system for pattern projection, thereby making it possible to vary the projection position of the pattern. The projection unit 23 may also be configured to be able to switch between a plurality of fixed patterning devices having different patterns.

投射ユニット23は、カメラユニット21の周囲に複数設けられていてもよい。複数の投射ユニット23は、それぞれ異なる投射方向から被検査体12にパターンを投射するよう配置されている。このようにすれば、検査面における高さ差によって影となりパターンが投射されない領域を小さくすることができる。 A plurality of projection units 23 may be provided around the camera unit 21. The plurality of projection units 23 are arranged to project the pattern onto the inspection object 12 from different projection directions. In this way, it is possible to reduce the area on the inspection surface that is shaded due to height differences and onto which the pattern is not projected.

図1に示す制御ユニット30は、本装置全体を統括的に制御するもので、ハードウエアとしては、任意のコンピュータのCPU、メモリ、その他のLSIで実現され、ソフトウエアとしてはメモリにロードされたプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者には理解されるところである。 The control unit 30 shown in FIG. 1 provides overall control of the entire device, and is realized as hardware using the CPU, memory, and other LSIs of any computer, and as software using programs loaded into memory, but the diagram shows functional blocks realized by the cooperation of these. Therefore, it will be understood by those skilled in the art that these functional blocks can be realized in various ways using only hardware, only software, or a combination of both.

図1には、制御ユニット30の構成の一例が示されている。制御ユニット30は、検査制御部31と記憶部であるメモリ35とを含んで構成される。検査制御部31は、画像処理部32と検査データ処理部33と検査部34とを含んで構成される。更に、画像処理部32は、撮像処理部32aと高さ測定部32bと画像合成部32cとを含んで構成される。また、検査装置10は、ユーザまたは他の装置からの入力を受け付けるための入力部36と、検査に関連する情報を出力するための出力部37とを備えており、入力部36及び出力部37はそれぞれ制御ユニット30に接続されている。入力部36は例えば、ユーザからの入力を受け付けるためのマウスやキーボード等の入力手段や、他の装置との通信をするための通信手段を含む。出力部37は、ディスプレイやプリンタ等の公知の出力手段を含む。 FIG. 1 shows an example of the configuration of the control unit 30. The control unit 30 includes an inspection control unit 31 and a memory 35, which is a storage unit. The inspection control unit 31 includes an image processing unit 32, an inspection data processing unit 33, and an inspection unit 34. The image processing unit 32 includes an image capture processing unit 32a, a height measurement unit 32b, and an image synthesis unit 32c. The inspection device 10 also includes an input unit 36 for receiving input from a user or other devices, and an output unit 37 for outputting information related to the inspection, and the input unit 36 and the output unit 37 are each connected to the control unit 30. The input unit 36 includes, for example, input means such as a mouse or keyboard for receiving input from a user, and communication means for communicating with other devices. The output unit 37 includes known output means such as a display or printer.

検査制御部31は、入力部36からの入力及びメモリ35に記憶されている検査関連情報に基づいて、検査のための各種制御処理を実行するよう構成されている。検査関連情報には、被検査体12の2次元画像データ、被検査体12の高さマップ(パターン画像データから算出される)、及び基板検査データが含まれる。検査に先立って、検査データ処理部33は、すべての検査項目に合格することが保証されている被検査体12の2次元画像データ及び高さマップを使用して基板検査データを作成する。検査部34は、作成済みの基板検査データと、検査されるべき被検査体12の2次元画像データ及び高さマップとに基づいて検査を実行する。 The inspection control unit 31 is configured to execute various control processes for inspection based on input from the input unit 36 and inspection-related information stored in the memory 35. The inspection-related information includes two-dimensional image data of the inspected object 12, a height map of the inspected object 12 (calculated from the pattern image data), and board inspection data. Prior to inspection, the inspection data processing unit 33 creates board inspection data using the two-dimensional image data and height map of the inspected object 12 that is guaranteed to pass all inspection items. The inspection unit 34 executes the inspection based on the created board inspection data and the two-dimensional image data and height map of the inspected object 12 to be inspected.

基板検査データは基板の品種ごとに作成される検査データである。基板検査データは、基板に配置された部品やその位置、また、その基板に塗布されたハンダごとの検査データの集合体である。各部品やハンダの検査データは、その部品やハンダに必要な検査項目、各検査項目についての画像上の検査区域である検査ウインドウ、及び各検査項目について配置や良否判定の基準となる検査基準を含む。検査ウインドウは各検査項目について1つまたは複数設定される。例えばハンダの塗布状態の良否を判定する検査項目においては通常、その部品のハンダ塗布領域の数と同数の検査ウインドウがハンダ塗布領域の配置に対応する配置で設定される。また、被検査体画像に所定の画像処理をした画像を使用する検査項目については、その画像処理の内容も検査データに含まれる。 Board inspection data is inspection data created for each type of board. Board inspection data is a collection of inspection data for the components placed on the board and their positions, as well as for each solder applied to the board. Inspection data for each component or solder includes the inspection items required for that component or solder, the inspection window which is the inspection area on the image for each inspection item, and the inspection criteria that serve as the basis for judging the placement and pass/fail for each inspection item. One or more inspection windows are set for each inspection item. For example, in an inspection item that judges the pass/fail status of the solder application state, typically inspection windows in the same number as the number of solder application areas for that component are set in a placement that corresponds to the placement of the solder application areas. In addition, for inspection items that use images that have been subjected to a specified image processing on the image of the object to be inspected, the contents of that image processing are also included in the inspection data.

検査データ処理部33は、基板検査データ作成処理として、その基板に合わせて検査データの各項目を設定する。例えば検査データ処理部33は、その基板のハンダレイアウトに適合するように各検査ウインドウの位置及び大きさを各検査項目について自動的に設定する。検査データ処理部33は、検査データのうち一部の項目についてユーザの入力を受け付けるようにしてもよい。例えば、検査データ処理部33は、ユーザによる検査基準のチューニングを受け入れるようにしてもよい。検査基準は高さ情報を用いて設定されてもよい。 The inspection data processing unit 33 sets each item of the inspection data to suit the board as part of the board inspection data creation process. For example, the inspection data processing unit 33 automatically sets the position and size of each inspection window for each inspection item so as to match the solder layout of the board. The inspection data processing unit 33 may be configured to accept user input for some items of the inspection data. For example, the inspection data processing unit 33 may be configured to accept tuning of the inspection criteria by the user. The inspection criteria may be set using height information.

検査制御部31は、基板検査データ作成の前処理として、画像処理部32により被検査体12の撮像処理を実行する。この被検査体12はすべての検査項目に合格しているものが用いられる。撮像処理は上述のように、照明ユニット22により被検査体12を照明しつつ撮像ユニット20と検査テーブル14との相対移動を制御し、被検査体12の部分画像を順次撮像することにより行われる。被検査体12の全体がカバーされるように複数の部分画像が撮像される。検査制御部31は、これら複数の部分画像を合成し、被検査体12の検査面全体を含む基板全面画像データ(2次元画像データ)を生成する。検査制御部31は、メモリ35に基板全面画像データを記憶する。 The inspection control unit 31 performs imaging processing of the inspected object 12 by the image processing unit 32 as a preprocessing for creating the board inspection data. The inspected object 12 used is one that passes all inspection items. As described above, the imaging processing is performed by controlling the relative movement of the imaging unit 20 and the inspection table 14 while illuminating the inspected object 12 by the illumination unit 22, and sequentially capturing partial images of the inspected object 12. Multiple partial images are captured so that the entire inspected object 12 is covered. The inspection control unit 31 combines these multiple partial images to generate full board image data (two-dimensional image data) including the entire inspection surface of the inspected object 12. The inspection control unit 31 stores the full board image data in the memory 35.

また、検査制御部31は、高さマップ作成のための前処理として、画像処理部32の撮像処理部32aにより、投射ユニット23により被検査体12にパターンを投射しつつ撮像ユニット20と検査テーブル14との相対移動を制御し、被検査体12のパターン画像を分割して順次撮像する。投射されるパターンは、好ましくはPMP法に基づきサインカーブに従って明るさが変化する縞パターンである。検査制御部31は、撮像した分割画像を合成し、被検査体12の検査面全体のパターン画像データを生成する。検査制御部31は、メモリ35にパターン画像データを記憶する。なお、全体ではなく検査面の一部についてパターン画像データを生成するようにしてもよい。また、後述するように、撮像処理部32aで撮像された画像データは、高さ測定部32b及び画像合成部32cにより合成処理が実行される。 As a pre-processing step for creating a height map, the inspection control unit 31 controls the relative movement of the imaging unit 20 and the inspection table 14 while projecting a pattern onto the inspection object 12 by the projection unit 23 using the imaging processing unit 32a of the image processing unit 32, and divides and sequentially captures the pattern image of the inspection object 12. The projected pattern is preferably a stripe pattern whose brightness changes according to a sine curve based on the PMP method. The inspection control unit 31 combines the captured divided images to generate pattern image data for the entire inspection surface of the inspection object 12. The inspection control unit 31 stores the pattern image data in the memory 35. Note that pattern image data may be generated for a part of the inspection surface rather than the entire surface. As described later, the image data captured by the imaging processing unit 32a is subjected to a combination process by the height measurement unit 32b and the image combination unit 32c.

高さ測定部32bは、パターン画像データにおけるパターンの像に基づいて被検査体12の検査面全体の高さマップを作成する。高さ測定部32bはまず、パターン画像データと基準パターン画像データとの局所的な位相差を画像データ全体について求めることにより、被検査体12の検査面の位相差マップを求める。ここで、「基準パターン画像データ」とは、投射ユニット23により基準平面にパターンが投射された画像データ(つまり投射ユニット23に内蔵されているパターン形成装置が生成したパターンが基準平面に投射された画像データ)である。高さ測定部32bは、高さ測定の基準となる基準平面と位相差マップとに基づいて被検査体12の高さマップを作成する。基準平面は例えば、検査される電子回路基板の基板表面である。基準平面は必ずしも平面ではなくてもよく、基板の反り等の変形が反映された曲面であってもよい。 The height measurement unit 32b creates a height map of the entire inspection surface of the inspected object 12 based on the image of the pattern in the pattern image data. The height measurement unit 32b first obtains a phase difference map of the inspection surface of the inspected object 12 by determining the local phase difference between the pattern image data and the reference pattern image data for the entire image data. Here, the "reference pattern image data" is image data in which a pattern is projected onto a reference plane by the projection unit 23 (i.e., image data in which a pattern generated by a pattern forming device built into the projection unit 23 is projected onto the reference plane). The height measurement unit 32b creates a height map of the inspected object 12 based on a reference plane that serves as a reference for height measurement and the phase difference map. The reference plane is, for example, the board surface of the electronic circuit board to be inspected. The reference plane does not necessarily have to be a flat plane, and may be a curved surface that reflects deformation such as warping of the board.

高さ測定部32bは、具体的には、パターン画像データの各画素と、当該画素に対応する基準パターン画像データの画素とで縞パターンの位相差を求める。高さ測定部32bは、位相差を高さ情報に換算する。検査面上での位置により投射ユニット23からの距離が異なるために、基準パターンの縞幅が一定であっても、検査面のパターン投射領域の一端から他端へと縞幅が変化してしまうからである。高さ測定部32bは、換算された高さ情報と基準平面とに基づいて基準平面からの高さ情報を取得し、被検査体12の高さマップを作成する。 Specifically, the height measurement unit 32b determines the phase difference of the stripe pattern between each pixel of the pattern image data and the pixel of the reference pattern image data that corresponds to that pixel. The height measurement unit 32b converts the phase difference into height information. This is because the distance from the projection unit 23 varies depending on the position on the inspection surface, and therefore the stripe width changes from one end of the pattern projection area on the inspection surface to the other end, even if the stripe width of the reference pattern is constant. The height measurement unit 32b obtains height information from the reference plane based on the converted height information and the reference plane, and creates a height map of the inspected object 12.

検査制御部31の画像処理部32は、被検査体12の高さマップが有する高さ情報を被検査体12の2次元画像データの各画素に対応付けることにより、高さ分布を有する被検査体画像を作成してもよい。また、画像処理部32は、高さ分布付き被検査体画像データに基づいて被検査体12の3次元モデリング表示を行うようにしてもよい。また、画像処理部32は、2次元の被検査体画像データに高さ分布を重ね合わせて出力部37に表示してもよい。例えば、被検査体画像データを高さ分布により色分け表示するようにしてもよい。 The image processing unit 32 of the inspection control unit 31 may create an inspected object image having a height distribution by associating the height information of the height map of the inspected object 12 with each pixel of the two-dimensional image data of the inspected object 12. The image processing unit 32 may also perform a three-dimensional modeling display of the inspected object 12 based on the inspected object image data with height distribution. The image processing unit 32 may also superimpose the height distribution on the two-dimensional inspected object image data and display it on the output unit 37. For example, the inspected object image data may be displayed in a color-coded manner according to the height distribution.

以下に、このような検査装置10において、投射ユニット23によりパターンを投射して高さ情報を取得する方法について説明する。 Below, we will explain how such an inspection device 10 projects a pattern using the projection unit 23 to obtain height information.

まず、縞パターンを用いたPMP法による高さ情報の取得方法について説明する。縞パターン投射領域の1つの計測点(画素)に着目すると、空間的に位相をずらしながら縞パターンを投射したときに(言い換えれば、縞の反復する方向に縞パターンを走査したときに)、その計測点(画素)の明るさは周期的に変動する。色や反射率等の計測点(画素)の表面特性に応じて計測点(画素)毎に平均の明るさは異なるものの、どの計測点(画素)においても縞パターンに対応する周期的な明るさ変動が生じる。よって、周期的な明るさ変動から位相を算出し、初期位相からの位相差が高さ情報を与える。 First, a method for acquiring height information using the PMP method with a stripe pattern will be described. Focusing on one measurement point (pixel) in the stripe pattern projection area, when the stripe pattern is projected while shifting the phase spatially (in other words, when the stripe pattern is scanned in the direction in which the stripes repeat), the brightness of that measurement point (pixel) fluctuates periodically. Although the average brightness differs for each measurement point (pixel) depending on the surface characteristics of the measurement point (pixel), such as color and reflectance, a periodic brightness fluctuation corresponding to the stripe pattern occurs at every measurement point (pixel). Therefore, the phase is calculated from the periodic brightness fluctuation, and the phase difference from the initial phase provides height information.

このような縞パターンによる特性を用いて、PMP法による高さ情報を取得する場合、原理的に縞パターンについて位相をシフトさせて少なくとも3回、典型的には4回の撮像が必要とされている。縞パターンが正弦波であることに対応して各計測点(画素)の明るさ変動も正弦波となる。縞のピッチは既知であるから、輝度(明るさ)の平均値、振幅、及び初期位相が明らかとなれば明るさ変動を表す正弦波が特定される。 When obtaining height information using the PMP method using the characteristics of such a stripe pattern, in principle it is necessary to shift the phase of the stripe pattern and capture the image at least three times, typically four times. Since the stripe pattern is a sine wave, the brightness fluctuation of each measurement point (pixel) is also a sine wave. Since the pitch of the stripes is known, the sine wave representing the brightness fluctuation can be identified once the average luminance (brightness), amplitude, and initial phase are known.

縞パターンの位相の開始位置をずらして撮像された少なくとも3枚のパターン画像データから計測点(画素)の輝度(明るさ)の測定値を得ることにより、輝度(明るさ)の平均値、振幅、及び初期位相の3つの変数を決定することができる。ここで、1つの縞パターンを、位相の開始位置を90度(π/2ラジアン)ずつずらして4回撮像したときのある画素の輝度をそれぞれI0、I1、I2、I3とすると、縞パターンが正弦波の場合の輝度Inは、次式(a)で表される。なお、この式(a)において、Aは被検査体12の明るさに依存した振幅を示し、Bはカメラユニット21や環境輝度に依存した明るさのオフセットを示し、φは求めたい位相を示し、π/2は位相のシフト量(ずらし量)を示す。なお、n=0,1,2,3である。但し、一般的にはセンサノイズ等の要因で誤差が含まれるので、位相φ、振幅A及びオフセットBを算出する際には、最小二乗法が求められることが多い。また、最小二乗法で得られる誤差をEとする。 By obtaining the measured values of the luminance (brightness) of the measurement points (pixels) from at least three pieces of pattern image data captured by shifting the start position of the phase of the stripe pattern, three variables, the average luminance (brightness), amplitude, and initial phase, can be determined. Here, if the luminance of a pixel when one stripe pattern is captured four times by shifting the start position of the phase by 90 degrees (π/2 radians) each is I0, I1, I2, and I3, respectively, the luminance In when the stripe pattern is a sine wave is expressed by the following formula (a). In this formula (a), A indicates the amplitude depending on the brightness of the inspected object 12, B indicates the brightness offset depending on the camera unit 21 and the environmental brightness, φ indicates the phase to be obtained, and π/2 indicates the phase shift amount (shift amount). Note that n = 0, 1, 2, 3. However, since errors are generally included due to factors such as sensor noise, the least squares method is often required when calculating the phase φ, the amplitude A, and the offset B. Also, let E be the error obtained using the least squares method.

In = A×sin(φ+n×π/2)+B (a) In = A×sin(φ+n×π/2)+B (a)

高さ情報の算出は、パターン画像データから、各画素(ピクセル)の位相φ、振幅A及びオフセットBを求めることである。例えば、1つの縞パターンを、位相の開始位置を90度(π/2ラジアン)ずつずらして4回撮像したときの、各画素にあたる計測点の位相φは次式(b)として表されることが知られている。 Height information is calculated by finding the phase φ, amplitude A, and offset B of each pixel from the pattern image data. For example, when one stripe pattern is imaged four times with the starting position of the phase shifted by 90 degrees (π/2 radians), it is known that the phase φ of the measurement point corresponding to each pixel can be expressed as the following equation (b).

tan(φ) = (I3-I1)/(I2-I0) (b) tan(φ) = (I3-I1)/(I2-I0) (b)

縞パターンのピッチ(1周期の長さ)をPとし、初期位相を0とすると縞パターンのずれ量はP×(φ/2π)で求められる。パターンの投射角度を用いてパターンずれ量からその位置の高さ情報を取得することができる。 If the pitch of the stripe pattern (the length of one period) is P and the initial phase is 0, the amount of shift in the stripe pattern can be calculated as P x (φ/2π). Using the projection angle of the pattern, height information at that position can be obtained from the amount of pattern shift.

図2において、(a)に示すように、基準平面Sに対して投射ユニット23により縞パターンを投射してカメラユニット21で撮像したパターン画像データから得られる位相を(c)に示し、(b)に示すように、この基準平面S上に物体Oを載置した状態で同じ縞パターンを投射して撮像したパターン画像データから得られる位相を(d)に示すと、物体Oの高さ情報はこれらの位相のずれ量(位相差=測定した位相-基準平面の位相)から算出することができる。この位相差はカメラユニット21で撮像した画像の画素ごとに算出することができ、画素ごとに求められた位相差に係数を乗算することで、その画素に対応した位置の高さ情報が算出される。この係数は、例えば、簡易的にはtan(投射角度)×縞ピッチ/2πで求められる。 In FIG. 2, (a) shows the phase obtained from the pattern image data captured by the camera unit 21 after projecting a stripe pattern onto the reference plane S using the projection unit 23, and (c) shows the phase obtained from the pattern image data captured by the camera unit 21 after projecting the same stripe pattern onto the reference plane S with an object O placed on it, as shown in (b), and (d) shows the phase obtained from the pattern image data captured by projecting the same stripe pattern onto the reference plane S. The height information of the object O can be calculated from the shift in phase (phase difference = measured phase - phase of the reference plane). This phase difference can be calculated for each pixel of the image captured by the camera unit 21, and the height information of the position corresponding to that pixel is calculated by multiplying the phase difference calculated for each pixel by a coefficient. This coefficient can be calculated simply as tan (projection angle) x stripe pitch/2π, for example.

ここで、縞パターンは、その明るさが正弦波状であって、且つ、単調に変化する(単調増加又は単調減少する)パターンが繰り返し形成されている。なお、1つの周期(ピッチ)において、位相が0から2π(ラジアン)まで変化するときに、輝度が最も暗い状態(例えば輝度I=0)から最も明るい状態(例えば輝度I=255)に単調増加する場合を示している(パターンにおける位相と輝度の関係は逆、すなわち単調減少でもよい)。 The stripe pattern here is formed by repeating a pattern in which the brightness is sinusoidal and changes monotonically (monotonically increases or decreases). Note that in one period (pitch), as the phase changes from 0 to 2π (radians), the brightness increases monotonically from the darkest state (e.g., brightness I = 0) to the brightest state (e.g., brightness I = 255) (the relationship between phase and brightness in the pattern may be reversed, i.e., monotonically decreasing).

図2を用いて説明したように、縞パターンを用いて基準平面Sを撮像し、また、縞パターンを用いてその基準平面Sに載置された物体O(被検査体12に相当)を撮像した場合、式(b)に基づいて得られた基準平面Sの位相φ0と物体Oを載置した状態で取得された位相φとの位相差Δφは、次式(c)で求められる。 As explained with reference to FIG. 2, when a reference plane S is imaged using a stripe pattern and an object O (corresponding to the object under test 12) placed on the reference plane S is also imaged using the stripe pattern, the phase difference Δφ between the phase φ0 of the reference plane S obtained based on equation (b) and the phase φ acquired with the object O placed thereon can be calculated using the following equation (c).

Δφ = φ - φ0 (c) Δφ = φ − φ0 (c)

以上より、基準平面及びこの基準平面に物体O(被検査体12)を載置して縞パターンを位相の開始位置をずらして投射して撮像された少なくとも3枚のパターン画像データから得られた位相φ0,φ(90°ずつずらして4枚撮像したときは式(b)により算出される)から、式(c)により算出された位相差Δφに基づいて、高さ情報Hを、次式(d)で求めることができる。 From the above, height information H can be calculated from the phase difference Δφ calculated using formula (c) from the phases φ0, φ (calculated using formula (b) when four images are captured with a 90° shift) obtained from a reference plane and at least three pieces of pattern image data captured by placing an object O (inspection object 12) on this reference plane and projecting a stripe pattern with shifted phase start positions, based on the phase difference Δφ calculated using formula (c) and the following formula (d).

H = P×(Δφ/2π) (d) H = P×(Δφ/2π) (d)

上述したように、本実施形態に係る検査装置10は、2次元画像データ及びパターン画像データから算出される高さマップを使用して被検査体12を検査するように構成されているが、カメラユニット21のカメラには、所定の被写界深度(焦点深度)があるため、例えば、カメラユニット21が被検査体12である基板の表面付近に合焦している場合、背の高い部品の上面は焦点の合っていない画像データが撮像される可能性がある。そのため、このような画像データを用いて検査すると、2次元画像データにおいて、背の高い部品(例えばコンデンサなど)の上面に記載された文字を読み取ることができない場合が発生し、また、パターン画像データにおいて、背の高い部品の上面の縞パターンの画像がぼけてしまい、正確な高さ情報を算出することができない場合が発生する。 As described above, the inspection device 10 according to this embodiment is configured to inspect the object 12 using a height map calculated from the two-dimensional image data and the pattern image data. However, since the camera of the camera unit 21 has a predetermined depth of field, for example, when the camera unit 21 is focused on the vicinity of the surface of the substrate, which is the object 12, image data of the top surface of a tall component may be captured in out-of-focus image data. Therefore, when such image data is used for inspection, there are cases where the characters written on the top surface of a tall component (such as a capacitor) cannot be read in the two-dimensional image data, and also where the image of the stripe pattern on the top surface of the tall component is blurred in the pattern image data, making it impossible to calculate accurate height information.

そこで、本実施形態に係る検査装置10においては、Z方向(撮像方向)の異なる位置でカメラユニット21により撮像された少なくとも2枚の画像データを取得し、それぞれの画像データから相対的に合焦している画素を抽出して合成することにより、異なる高さの部品が配置されていたとしても、視野全体で合焦している画像データを得るように構成されている。ここでは、カメラユニット21が基準平面(上述したように、高さ情報を算出する際の基準となる面)に合焦しているときに取得された画像データと、カメラユニット21をZ方向に移動させて、Z方向の異なる位置にあるカメラユニット21により取得された画像データとを用いて合成を行う場合について説明する。以下、本実施形態に係る画像処理装置である検査装置10における画像データの合成方法について説明する。なお、ここではカメラユニット21の位置をZ方向に移動させる場合について説明するが、カメラユニット21と被検査体12とのZ方向の相対位置が変化すればよく、被検査体12の方をZ方向に移動させてもよい。なお、図3(a)に示すように、被検査体12の所定の面(例えば、電子回路基板の場合は、基板の上面)を「基準面」とする。ここで、図3(a)は、被検査体12の基準面と基準平面とが一致している場合を示している。 Therefore, in the inspection device 10 according to this embodiment, at least two pieces of image data captured by the camera unit 21 at different positions in the Z direction (imaging direction) are acquired, and relatively focused pixels are extracted from each image data and synthesized to obtain image data that is in focus over the entire field of view, even if components at different heights are arranged. Here, a case where image data acquired when the camera unit 21 is focused on the reference plane (a surface that serves as a reference for calculating height information as described above) and image data acquired by the camera unit 21 at different positions in the Z direction by moving the camera unit 21 in the Z direction are used for synthesis is described. Below, a method of synthesizing image data in the inspection device 10, which is an image processing device according to this embodiment, is described. Note that here, a case where the position of the camera unit 21 is moved in the Z direction is described, but it is sufficient that the relative positions of the camera unit 21 and the inspected object 12 in the Z direction change, and the inspected object 12 may be moved in the Z direction. Note that, as shown in FIG. 3(a), a predetermined surface of the inspected object 12 (for example, in the case of an electronic circuit board, the top surface of the board) is the "reference surface". Here, FIG. 3(a) shows a case where the reference surface of the test object 12 coincides with the reference plane.

また、以降の説明において、カメラユニット21のZ方向の位置は、図3(a)に示すように、基準平面に合焦しているときのカメラユニット21の位置を、Z=0を基準とする座標系で表す。具体的には、カメラユニット21のZ方向の位置を示すP(i)は、カメラユニット21が基準面に合焦しているときをi=0とし、カメラユニット21が基準平面から遠ざかる順でi=1,2,3・・・として表す。以降の説明においては、Z方向の異なる位置で4枚の画像データを取得する場合を例とする。例えば、カメラユニット21の被写界深度を4mmと想定し、基準面に合焦しているときのカメラユニット21の位置「P(0)=0」で画像データを取得し、さらに、P(0)=0の位置から4mmずつ上方(Z方向)にずれた位置で3枚の画像データを取得する場合について説明する。それぞれの位置を、「P(1)=4」、「P(2)=8]、「P(3)=12」として表す(単位のmmは省略する)。また、カメラユニット21が基準平面に合焦しているとき、すなわち、Z=0にカメラユニット21があるときのこのカメラユニット21の先端から基準平面までの距離を合焦距離とする。さらに、カメラユニット21の先端から被検査体12の方向に合焦距離離れた位置を最合焦位置FPとする。 In the following description, the position of the camera unit 21 in the Z direction is expressed in a coordinate system with Z=0 as the reference, as shown in FIG. 3(a). Specifically, P(i) indicating the position of the camera unit 21 in the Z direction is expressed as i=0 when the camera unit 21 is focused on the reference plane, and i=1, 2, 3, etc. in the order in which the camera unit 21 moves away from the reference plane. In the following description, an example will be taken of a case in which four pieces of image data are acquired at different positions in the Z direction. For example, assuming that the depth of field of the camera unit 21 is 4 mm, image data is acquired at the position "P(0)=0" of the camera unit 21 when it is focused on the reference plane, and three pieces of image data are acquired at positions shifted upward (in the Z direction) by 4 mm from the position of P(0)=0. The respective positions are represented as "P(1) = 4", "P(2) = 8", and "P(3) = 12" (the unit of mm is omitted). In addition, when the camera unit 21 is focused on the reference plane, that is, when the camera unit 21 is located at Z = 0, the distance from the tip of the camera unit 21 to the reference plane is defined as the focal distance. Furthermore, the position away from the tip of the camera unit 21 in the direction of the object under test 12 is defined as the most focused position FP.

なお、カメラユニット21の位置がZ方向にずれた画像データは4枚に限定されることはなく、2枚以上であればよい。また、カメラユニット21をZ方向にずらす幅は4mmに限定されることはなく、例えば、被検査体12に搭載されている部品の高さやカメラユニット21の被写界深度等を考慮して、任意の値に設定することができる。さらに、カメラユニット21のZ方向の位置を等間隔で変化させるだけでなく、それぞれの画像データを取得する間隔を任意に選択してもよい。 The number of image data in which the position of the camera unit 21 is shifted in the Z direction is not limited to four, but may be two or more. The width by which the camera unit 21 is shifted in the Z direction is not limited to 4 mm, but may be set to any value, for example, taking into consideration the height of the components mounted on the inspected object 12 and the depth of field of the camera unit 21. Furthermore, instead of changing the position of the camera unit 21 in the Z direction at equal intervals, the interval at which each image data is acquired may be selected arbitrarily.

また、Z方向のどの位置でカメラユニット21が画像データを取得するかについては、予め入力部36等から制御ユニット30に設定されているものとする。例えば、基準面の位置や検査対象の高さ(基板上に搭載された部品の高さ)を入力しておき、画像データを取得するZ方向の位置や間隔を設定しておく。また、カメラユニット21は、焦点距離が固定されているものとする。 The position in the Z direction at which the camera unit 21 acquires image data is set in advance in the control unit 30 via the input unit 36, etc. For example, the position of the reference plane and the height of the inspection target (the height of the components mounted on the board) are input, and the position and interval in the Z direction at which image data is acquired are set. The focal length of the camera unit 21 is also fixed.

図4を用いて、本実施形態に係る画像処理装置である検査装置10における画像データの合成方法について説明する。この画像データの合成方法においては、Z方向の異なる位置で取得された画像データのうち、被検査体12(基準面)から最も遠い位置で取得された画像データから合成処理を行うように構成されている。 A method for synthesizing image data in the inspection device 10, which is an image processing device according to this embodiment, will be described with reference to FIG. 4. This image data synthesis method is configured to perform synthesis processing using image data acquired at a position farthest from the inspected object 12 (reference surface) among image data acquired at different positions in the Z direction.

図4(a)に示すように、制御ユニット30は、被検査体12の画像データを取得する処理が開始されたと判断すると、撮像処理部32aによりカメラユニット21を被検査体12の上方の所定の位置(XY方向の位置)に移動させ、さらに、カメラユニット21をi=0の位置、すなわち、カメラユニット21がP(0)に位置するように、カメラユニット21のZ方向の位置を調整し、被検査体12の画像データを取得する(ステップS100)。カメラユニット21をP(0)の位置に移動させると、カメラユニット21は、被検査体12の基準面付近に合焦することとなる。なお、このステップS100においては、上述したように、被検査体12の高さマップを取得するために、投射ユニット23により被検査体12に縞パターンを投射してカメラユニット21でパターン画像データを取得するが、このとき、縞パターンの位相をずらして少なくとも3枚(できれば4枚)のパターン画像データを取得する。また、投射ユニット23を複数有している場合には、それぞれの投射ユニット23から上述したように位相をずらしながら縞パターンを被検査体12に投射してパターン画像データを取得する。さらに、2次元画像データを取得するときは、照明ユニット22の側方照明源22a,22b,22cを順次点灯して被検査体12を照明し、カメラユニット21で撮像を行う。 4(a), when the control unit 30 determines that the process of acquiring image data of the object to be inspected 12 has started, the control unit 30 moves the camera unit 21 to a predetermined position (position in the XY direction) above the object to be inspected 12 by the imaging processing unit 32a, and further adjusts the position of the camera unit 21 in the Z direction so that the camera unit 21 is positioned at position i=0, i.e., P(0), and acquires image data of the object to be inspected 12 (step S100). When the camera unit 21 is moved to the position of P(0), the camera unit 21 focuses on the vicinity of the reference surface of the object to be inspected 12. In this step S100, as described above, in order to acquire a height map of the object to be inspected 12, the projection unit 23 projects a stripe pattern onto the object to be inspected 12 and the camera unit 21 acquires pattern image data, but at this time, the phase of the stripe pattern is shifted to acquire at least three (preferably four) pieces of pattern image data. Furthermore, when there are multiple projection units 23, the stripe patterns are projected onto the inspection object 12 from each projection unit 23 while shifting the phase as described above to obtain pattern image data. Furthermore, when obtaining two-dimensional image data, the side illumination sources 22a, 22b, and 22c of the illumination unit 22 are sequentially turned on to illuminate the inspection object 12, and an image is taken by the camera unit 21.

制御ユニット30は、被検査体12の撮像が終了すると、カメラユニット21がi=0の位置にあるとき、すなわちP(0)の位置にあるときに撮像したパターン画像データ(「P(0)のパターン画像データ」と呼ぶ)に基づいて算出される高さ情報から誤計測値を取り除くためのパラメータを設定する(ステップS102)。後述するように、カメラユニット21がi=0の位置にあるとき(P(0)のとき)の画像データの合成処理は最後に実行される。この最後の合成処理において、P(0)のときの画像データの画素は可能な限り合成画像データの画素として選択されるようにするため、上記パラメータは計測点数が最大化されるような値とされる。そして、このパラメータを用いて高さ基本処理S200が実行される(ステップS104)。 When the control unit 30 has finished capturing the image of the object under test 12, it sets parameters for removing erroneous measurement values from the height information calculated based on the pattern image data captured when the camera unit 21 is at position i=0, i.e., at position P(0) (referred to as "pattern image data of P(0)") (step S102). As described below, the synthesis process of the image data when the camera unit 21 is at position i=0 (at P(0)) is executed last. In this final synthesis process, the above parameters are set to values that maximize the number of measurement points so that pixels of the image data at P(0) are selected as pixels of the synthesized image data as much as possible. Then, the basic height process S200 is executed using these parameters (step S104).

制御ユニット30は、図4(b)に示す高さ基本処理S200を開始すると、高さ測定部32bにより、縞パターンの位相をずらして撮像した3枚又は4枚のパターン画像データから、上述した式(a)~(d)に基づいて、パターン画像データ内の(視野内の)画素毎に位相計算処理を行う(ステップ202)。なお、複数の投射ユニット23を有している場合は、投射ユニット23毎に(投射別に)位相計算処理が実行される。次に、制御ユニット30は、複数の投射ユニット23を有している場合は、ぞれぞれの位相計算結果を合成する投射合成処理を実行し、画素毎の高さ情報を算出する(ステップS204)。最後に、画素毎の高さ情報に対して、メディアンフィルタ等によるノイズフィルタ処理を実行し(ステップS206)、P(0)のパターン画像に対する高さ基本処理S200の実行を終了する。 When the control unit 30 starts the basic height processing S200 shown in FIG. 4(b), the height measurement unit 32b performs phase calculation processing for each pixel (within the field of view) in the pattern image data from three or four pattern image data captured with the phase of the stripe pattern shifted, based on the above-mentioned formulas (a) to (d) (step 202). If there are multiple projection units 23, the phase calculation processing is performed for each projection unit 23 (for each projection). Next, if there are multiple projection units 23, the control unit 30 performs a projection synthesis process to synthesize the respective phase calculation results, and calculates height information for each pixel (step S204). Finally, a noise filter process using a median filter or the like is performed on the height information for each pixel (step S206), and the execution of the basic height processing S200 for the pattern image of P(0) is terminated.

このように、最初にカメラユニット21がP(0)の位置にあるときに(基準面付近にカメラユニット21が合焦しているときに)画像データを取得してパターン画像データから高さ情報を算出する理由は、以降で説明するように、合成処理の判断に用いる条件(2)で、P(0)のときの振幅や高さ情報などを利用するためである。 The reason for first acquiring image data when the camera unit 21 is at position P(0) (when the camera unit 21 is focused near the reference plane) and calculating height information from the pattern image data is that, as will be explained below, the amplitude and height information at P(0) are used in condition (2) used to determine the synthesis process.

図4(a)に戻り、ステップS104において、高さ基本処理S200の実行が終了すると、制御ユニット30は、撮像処理部32aにより、カメラユニット21のZ方向の位置を、次の撮像位置として、設定されている撮像位置のうち被検査体12から最も遠い位置に移動させる(ステップS106)。ここでは、i=3のときのP(3)=12の位置にカメラユニット21を移動させる。 Returning to FIG. 4(a), when the execution of the basic height process S200 is completed in step S104, the control unit 30 causes the imaging processing unit 32a to move the Z-direction position of the camera unit 21 to the position farthest from the object under test 12 among the set imaging positions as the next imaging position (step S106). Here, the camera unit 21 is moved to the position P(3)=12 when i=3.

制御ユニット30は、カメラユニット21をZ方向の次の撮像位置に移動させると、P(0)のときと同様に、撮像処理部32aにより、その撮像位置でパターン画像データ及び2次元画像データを取得し、さらに、パターン画像データから算出される高さ情報から誤計測値を取り除くためのパラメータを設定する(ステップS108)。さらに制御ユニット30は、高さ測定部32bにより、ステップS108で撮像されたパターン画像データに対して高さ基本処理S200を実行する(ステップS110)。ここでは、カメラユニット21がi=0以外の位置(中空)にあるため、高さ情報から誤計測値を取り除くためのパラメータは、計測誤差の疑いの高い点を除外する(中空での誤計測点を除外する)ように設定される。 When the control unit 30 moves the camera unit 21 to the next imaging position in the Z direction, the imaging processing unit 32a acquires pattern image data and two-dimensional image data at that imaging position, as in the case of P(0), and further sets parameters for removing erroneous measurement values from the height information calculated from the pattern image data (step S108). Furthermore, the control unit 30 executes the basic height processing S200 on the pattern image data captured in step S108 by the height measurement unit 32b (step S110). Here, since the camera unit 21 is at a position other than i=0 (in midair), the parameters for removing erroneous measurement values from the height information are set to exclude points that are highly suspected of being measurement errors (exclude erroneous measurement points in midair).

現在の撮像位置(ここでは、P(3)の位置)で撮像されたパターン画像データによる高さ情報が算出されると、制御ユニット30は、画像合成部32cにより、現在の撮像位置の画像データを用いた合成画像更新処理を実行する(ステップS112)。ここでは、現在の撮像位置の画像データの画素のうち、合焦している画像(合焦画素)を選択して合成画像データの画素の値とする。具体的には、画素毎に、以下に示す2つの式による条件(条件(1)及び(2))により、その画素の現在の撮像位置での高さ情報に基づいて、現在の撮像位置の画像データの画素を合成画像データとして選択するか否かを決定する。 When the height information is calculated based on the pattern image data captured at the current imaging position (here, position P(3)), the control unit 30 executes a composite image update process using the image data of the current imaging position by the image synthesis unit 32c (step S112). Here, from among the pixels of the image data of the current imaging position, an image that is in focus (in-focus pixel) is selected and set as the pixel value of the composite image data. Specifically, for each pixel, it is determined whether or not to select a pixel of the image data of the current imaging position as composite image data based on the height information of that pixel at the current imaging position, according to the conditions of the two equations shown below (conditions (1) and (2)).

P(i)-DL≦H(X,Y,i)+P(i)≦P(i+1)―DH (1)
A(X,Y,i) ≧ A(X,Y,0)×WA (2)
但し、
P(i):現在の撮像位置
P(i+1):現在の撮像位置よりも基準面から離れる隣の撮像位置
H(X,Y,i):判定対象の画素の位置が(X,Y)のときの現在の撮像位置での算出距離
DL、DH:定数
A(X,Y,i):判定対象の画素の位置が(X,Y)のときの現在の撮像位置での振幅
A(X,Y,0):判定対象の画素の位置が(X,Y)のときの撮像位置がi=0での振幅
WA:重み計数
P(i)-DL≦H(X,Y,i)+P(i)≦P(i+1)-DH (1)
A(X, Y, i) ≧ A(X, Y, 0)×WA (2)
however,
P(i): Current imaging position P(i+1): Next imaging position farther away from the reference plane than the current imaging position H(X, Y, i): The position of the pixel to be judged is (X, Y). DL, DH: constants A(X, Y, i): amplitude at the current imaging position when the pixel to be determined is located at (X, Y) A(X, Y, 0): Amplitude at the imaging position i = 0 when the position of the pixel to be judged is (X, Y) WA: Weight coefficient

条件(1)は、判定対象の画素に対応する被検査体12の位置(算出距離)が、現在の撮像位置におけるカメラユニット21の合焦付近にあるか否かを判断するものである。ここで、算出距離H(X,Y,i)は、判定対象の画素における、P(i)での最合焦位置FPから被検査体12までのZ方向の距離であり、基本高さ処理S200により得られる、位置(X,Y)の画素の高さ情報であって、上述したカメラユニット21の座標系で表される。例えば、P(0)=0の場合、判定対象の画素に対応する被検査体12が基準平面上にあるときはH(X,Y,i)=0となる。なお、図3(a)に示すように、カメラユニット21がZ方向に移動すると、最合焦位置FPもZ方向に移動する。また、図3(b)に示すように、DL、DHは、カメラユニット21の現在の撮像位置P(i)と、現在の撮像位置よりも基準面から離れる隣の撮像位置P(i+1)とにより、カメラユニット21により合焦した画像データが得られる範囲を決定するための定数であり、例えば、カメラユニット21の位置を4mm間隔で設定した場合は、DL=1.5mm、DH=1.0mmとすることができる。もちろん、この定数DL,DHは、カメラユニット21の仕様(被写界深度等)や、カメラユニット21をZ方向にずらす間隔により決定することができる。なお、一般にはDL>DHであることが望ましい。また、被検査体12(基準面)から最も遠い撮像位置(ここでは、P(3)=12)のときは、P(i+1)(ここではP(4))の値を予め設定しておき、この値を使って条件(1)を判断する(例えば、P(4)=16としておく)。以上より、条件(1)を満足する画素は、その位置(P(i))にあるカメラユニット21で焦点が合った画像データ(鮮明な画像データ)が得られる範囲に被検査体12があることを意味している。 Condition (1) is to determine whether the position (calculated distance) of the test object 12 corresponding to the pixel to be judged is near the focal point of the camera unit 21 at the current imaging position. Here, the calculated distance H(X, Y, i) is the Z-direction distance from the most focused position FP at P(i) to the test object 12 at the pixel to be judged, and is the height information of the pixel at the position (X, Y) obtained by the basic height processing S200, and is expressed in the coordinate system of the camera unit 21 described above. For example, when P(0)=0, if the test object 12 corresponding to the pixel to be judged is on the reference plane, H(X, Y, i)=0. Note that, as shown in FIG. 3(a), when the camera unit 21 moves in the Z direction, the most focused position FP also moves in the Z direction. Also, as shown in FIG. 3B, DL and DH are constants for determining the range in which focused image data can be obtained by the camera unit 21, based on the current imaging position P(i) of the camera unit 21 and the adjacent imaging position P(i+1) that is farther away from the reference surface than the current imaging position. For example, when the positions of the camera unit 21 are set at 4 mm intervals, DL=1.5 mm and DH=1.0 mm can be set. Of course, these constants DL and DH can be determined based on the specifications of the camera unit 21 (depth of field, etc.) and the interval at which the camera unit 21 is shifted in the Z direction. In addition, it is generally desirable that DL>DH. Also, when the imaging position is the farthest from the inspected object 12 (reference surface) (here, P(3)=12), the value of P(i+1) (here, P(4)) is set in advance, and this value is used to judge the condition (1) (for example, P(4)=16). From the above, a pixel that satisfies condition (1) means that the object 12 is within a range where focused image data (clear image data) can be obtained by the camera unit 21 at that position (P(i)).

ここで、条件(1)のDL,DHを定数にする代わりに、下記に示すような変数とすることもできる。なお、FUNCは所定の関数を示し、DL(i)は、撮像位置P(i)における変数であって、次の撮像位置P(i-1)と現在の撮像位置P(i)とをパラメータする関数FUNCにより決定され、また、DH(i)は、撮像位置iにおける変数であって、現在の撮像位置P(i)と前の撮像位置P(i+1)とをパラメータとする関数FUNCによって決定される。 Here, instead of making DL and DH in condition (1) constants, they can be variables as shown below. Note that FUNC indicates a predetermined function, DL(i) is a variable at imaging position P(i) and is determined by a function FUNC that has the next imaging position P(i-1) and the current imaging position P(i) as parameters, and DH(i) is a variable at imaging position i and is determined by a function FUNC that has the current imaging position P(i) and the previous imaging position P(i+1) as parameters.

DL(i)=FUNC(P(i-1),P(i))
DH(i)=FUNC(P(i),P(i+1))
DL(i)=FUNC(P(i-1), P(i))
DH(i)=FUNC(P(i), P(i+1))

また、条件(2)は、パターン画像データを用いて位相計算するときに、上述した式(a)で得られる振幅A(X,Y,i)、A(X,Y,0)により合焦度が大きい画素か否かを判定するものである。この条件(2)は、合焦度を比較してより合焦度が大きい画素を抽出し、当該画素の評価値が閾値以上であるときに合焦と判断するものである。具体的には、振幅の値が大きい方が合焦度が大きいため、P(0)のとき(i=0のとき)の振幅を基準として閾値を決定し、判定対象の画素(位置(X,Y)の画素)において、i=0のときの振幅A(X,Y,0)に比べて、現在の撮像位置における振幅A(X,Y,i)が十分大きいときに、判定対象の画素が合焦画素であると判断することができる。なお、重みWAの値は、カメラユニット21の被写界深度に基づいて決定することが望ましい。 Condition (2) is used to determine whether a pixel is in focus or not based on the amplitudes A(X,Y,i) and A(X,Y,0) obtained by the above formula (a) when calculating the phase using pattern image data. This condition (2) is used to compare the focus degrees to extract pixels with higher focus degrees, and determine that the pixel is in focus when the evaluation value of the pixel is equal to or greater than the threshold value. Specifically, since the greater the amplitude value, the greater the focus degree, the threshold value is determined based on the amplitude at P(0) (i=0), and when the amplitude A(X,Y,i) at the current imaging position is sufficiently greater than the amplitude A(X,Y,0) at i=0 for the pixel to be determined (pixel at position (X,Y)), the pixel to be determined can be determined to be in focus. Note that it is preferable to determine the value of the weight WA based on the depth of field of the camera unit 21.

以上より、撮像位置P(i)において、画素毎に条件(1)及び条件(2)を判断し、条件(1)及び条件(2)を同時に満足している画素については、現在の撮像位置における画素の値を合成画像の画素として選択する。具体的には、位置(X,Y)の画素が条件(1)及び条件(2)を満足しているときは、当該画素のP(i)のパターン画像データから算出された高さ情報(H(X,Y,i)+P(i))を高さマップの合成画像データの同じ位置の画素の値として設定し、P(i)の位置で撮像された2次元画像データの当該画素の値(輝度等)を2次元画像データの合成画像データの同じ位置の画素の値として設定する。このような条件(1)及び条件(2)を用いて判断することにより、特に合成の継ぎ目付近での誤計測を防止することができる。 As described above, at the imaging position P(i), conditions (1) and (2) are judged for each pixel, and for pixels that simultaneously satisfy conditions (1) and (2), the value of the pixel at the current imaging position is selected as the pixel of the composite image. Specifically, when a pixel at position (X, Y) satisfies conditions (1) and (2), the height information (H(X, Y, i) + P(i)) calculated from the pattern image data of the pixel P(i) is set as the value of the pixel at the same position in the composite image data of the height map, and the value (brightness, etc.) of the pixel in the two-dimensional image data captured at the position P(i) is set as the value of the pixel at the same position in the composite image data of the two-dimensional image data. By making such judgments using conditions (1) and (2), it is possible to prevent erroneous measurements, especially near the seams of the composite.

制御ユニット30は、撮像処理部32aにより、全ての画素について上記合成処理を行った場合は、予め決められたZ方向の撮像位置の全てで撮像処理が終了したか否かを判断する(ステップS114)。全ての撮像位置での撮像処理が終了していないと判断した場合(ステップS114:No)、制御ユニット30は、撮像処理部32aにより、基準面に近づく次の撮像位置にカメラユニット21の位置を設定し(ステップS116)、その撮像位置において、上述したステップS108~S114の処理を繰り返す。例えば、現在の撮像位置がP(3)=12の場合は、次の撮像位置であるP(2)=8にカメラユニット21を設定し、現在の撮像位置がP(2)=8の場合は、次の撮像位置であるP(1)=4にカメラユニット21を設定する。 When the image capturing processing section 32a has performed the above-mentioned synthesis processing for all pixels, the control unit 30 judges whether the image capturing processing has been completed at all of the predetermined image capturing positions in the Z direction (step S114). When it is judged that the image capturing processing has not been completed at all of the image capturing positions (step S114: No), the control unit 30 sets the position of the camera unit 21 to the next image capturing position approaching the reference plane (step S116) by the image capturing processing section 32a, and repeats the above-mentioned processing of steps S108 to S114 at that image capturing position. For example, if the current image capturing position is P(3)=12, the camera unit 21 is set to the next image capturing position, P(2)=8, and if the current image capturing position is P(2)=8, the camera unit 21 is set to the next image capturing position, P(1)=4.

一方、全ての撮像位置での撮像処理が終了していると判断した場合(ステップS114:Yes)、制御ユニット30は、画像合成部32cにより、ステップS100で取得した、基準面付近にカメラユニット21が合焦しているときの画像データ(P(0)=0の画像データ)の合成画像更新処理を行う(ステップS118)。ここで、P(0)の画像データにおいては、条件(2)は常に満足するので、条件(1)を満足しているか否かで判断を行う。すなわち、ステップS118において、未だ合成画像データの値が選択されていない画素であって、条件(1)を満足する画素は、P(0)の撮像位置の画像データの画素の値(高さマップにおける高さ情報及び2次元画像データの画素の値)を合成画像データの画素の値として選択する。 On the other hand, if it is determined that the imaging process has been completed at all imaging positions (step S114: Yes), the control unit 30 performs a composite image update process (step S118) on the image data (image data of P(0)=0) acquired in step S100 when the camera unit 21 is focused near the reference plane, using the image synthesis unit 32c. In this case, since condition (2) is always satisfied for the image data of P(0), a determination is made based on whether or not condition (1) is satisfied. That is, in step S118, for pixels for which a value for the composite image data has not yet been selected and which satisfy condition (1), the pixel value of the image data at the imaging position of P(0) (height information in the height map and pixel value of the two-dimensional image data) is selected as the pixel value of the composite image data.

なお、ステップS108~S114の繰り返しの処理において、ある画素が条件(1)及び条件(2)を満足していたとしても、既にその撮像位置より被検査体12から遠い撮像位置において条件(1)及び条件(2)を満足していて当該画素の値が合成画像データの値として選択されている場合は、既に選択されている値を優先する。すなわち、Z方向の複数の撮像位置で条件(1)及び条件(2)を満足する画素については、それらの撮像位置のうち、被検査体12から最も遠い撮像位置の画素の値を選択する。投射ユニット23により照射された光は、被検査体12に反射した後に撮像される。カメラユニット21が基板面から遠くなるにつれ、被検査体12からの反射光量は減少する。これにより、特に合焦していない画素での不要光によるノイズが減少することにつながり、その結果、高さ情報に含まれる誤計測値が削減される。そのため、Z方向の複数の撮像位置で条件(1)及び条件(2)を満足する画素については、それらの撮像位置のうち、被検査体12から最も遠い撮像位置の画素の値を選択する。 In addition, in the repeated processing of steps S108 to S114, even if a certain pixel satisfies conditions (1) and (2), if the pixel satisfies conditions (1) and (2) at an imaging position farther from the object to be inspected 12 than the imaging position and the value of the pixel is selected as the value of the composite image data, the value already selected is prioritized. In other words, for a pixel that satisfies conditions (1) and (2) at multiple imaging positions in the Z direction, the pixel value of the imaging position farthest from the object to be inspected 12 among those imaging positions is selected. The light irradiated by the projection unit 23 is imaged after being reflected by the object to be inspected 12. As the camera unit 21 becomes farther from the substrate surface, the amount of reflected light from the object to be inspected 12 decreases. This leads to a reduction in noise due to unnecessary light, especially at pixels that are not in focus, and as a result, the erroneous measurement value included in the height information is reduced. Therefore, for pixels that satisfy conditions (1) and (2) at multiple imaging positions in the Z direction, the pixel value of the imaging position farthest from the test object 12 among those imaging positions is selected.

図5は、ある視野において、被検査体12が、基板12dの上に、部品12a,12b,12cが搭載されている部分であるときの、カメラユニット21の最合焦位置FP及びその位置で撮像される画像データと、合成画像データとの関係を示している。具体的には、図5(a)~(d)の上段は、カメラユニット21の最合焦位置FPと部品12a~12dとの関係を示し、下段は、合成画像データとして選択される可能性のある部分(画素)を網掛けで示している。図5(a)は、カメラユニット21がP(3)=12にあるときを示しており、部品12aの上面が条件(1)を満足するため、同時に条件(2)を満足してれば、図5(e)に示すように、P(3)における画像データの部品12aの上面が合成画像データとして選択される。一方、部品12bの上面は、図5(b)に示すように、カメラユニット21がP(2)=8にあるときも、図5(c)に示すように、カメラユニット21がP(1)=4にあるときも、条件(1)を満足している(条件(2)も満足しているとする)。この場合、図5(e)に示すように、被検査体12から遠い方のP(2)の画像データにおける部品12bの上面が合成画像データとして選択される。また、部品12cの上面は、図5(c)に示すように、カメラユニット21がP(1)=4にあるときに、条件(1)を満足しているため、同時に条件(2)を満足していれば、図5(e)に示すように、P(1)の画像データにおける部品12cの上面が合成画像データとして選択される。同様に、基板12dの上面(基準面)は、図5(d)に示すように、カメラユニット21がP(0)=0にあるときに、条件(1)を満足しているため、同時に条件(2)を満足していれば、図5(e)に示すように、P(0)の画像データにおける基板12dの上面が合成画像データとして選択される(図5(e)参照)。 Figure 5 shows the relationship between the most focused position FP of the camera unit 21, the image data captured at that position, and the composite image data when the inspected object 12 is a portion in a certain field of view where the components 12a, 12b, and 12c are mounted on the board 12d. Specifically, the upper part of Figures 5(a) to (d) shows the relationship between the most focused position FP of the camera unit 21 and the components 12a to 12d, and the lower part shows the portions (pixels) that may be selected as the composite image data in a shaded manner. Figure 5(a) shows the case where the camera unit 21 is at P(3)=12, and since the top surface of the component 12a satisfies condition (1), if it also satisfies condition (2), then as shown in Figure 5(e), the top surface of the component 12a in the image data at P(3) is selected as the composite image data. On the other hand, the upper surface of the part 12b satisfies the condition (1) when the camera unit 21 is at P(2)=8 as shown in Fig. 5(b) and when the camera unit 21 is at P(1)=4 as shown in Fig. 5(c) (assuming that the condition (2) is also satisfied). In this case, as shown in Fig. 5(e), the upper surface of the part 12b in the image data of P(2) farther from the inspected object 12 is selected as the composite image data. In addition, the upper surface of the part 12c satisfies the condition (1) when the camera unit 21 is at P(1)=4 as shown in Fig. 5(c), and therefore, if the upper surface satisfies the condition (2) at the same time, the upper surface of the part 12c in the image data of P(1) is selected as the composite image data as shown in Fig. 5(e). Similarly, as shown in FIG. 5(d), the top surface (reference surface) of substrate 12d satisfies condition (1) when camera unit 21 is at P(0)=0, and therefore if condition (2) is also satisfied at the same time, the top surface of substrate 12d in the image data of P(0) is selected as the composite image data, as shown in FIG. 5(e) (see FIG. 5(e)).

図4に戻り、最後に、制御ユニット30は、高さ測定部32bにより、高さ後処理S300を実行する(ステップS120)。制御ユニット30の高さ測定部32bは、図4(c)に示す高さ後処理S300を開始すると、合成画像データにおいて、上述した合成画像更新処理で値が選択されなかった画素等の不計測画素を補間する処理を実行し(ステップS302)、さらに、合成画像データの歪みを補正する処理を行い(ステップS304)、高さ後処理S300を終了し、さらに、合成処理を終了する。合成前の画像データ(各撮像位置で取得されたパターン画像データから算出される高さマップ)に高さ後処理を実行してしまうと、補間された値や補正された画素まで合成画像データの画素の値として選択されてしまう可能性があり、画像データの精度が悪くなる可能性がある。したがって、不計測画素補間処理や歪み補正処理等の高さ後処理は、全ての撮像位置の画像データの合成処理が終了した後に、合成画像データに対して実行されることが望ましい。 Returning to FIG. 4, finally, the control unit 30 executes height post-processing S300 by the height measurement unit 32b (step S120). When the height measurement unit 32b of the control unit 30 starts the height post-processing S300 shown in FIG. 4(c), it executes a process of interpolating non-measured pixels such as pixels whose values were not selected in the above-mentioned composite image update process in the composite image data (step S302), and further executes a process of correcting distortion of the composite image data (step S304), terminating the height post-processing S300, and further terminating the synthesis process. If height post-processing is executed on the image data before synthesis (height map calculated from the pattern image data acquired at each imaging position), there is a possibility that even the interpolated value or the corrected pixel will be selected as the pixel value of the composite image data, and the accuracy of the image data may be deteriorated. Therefore, it is desirable to execute height post-processing such as non-measured pixel interpolation processing and distortion correction processing on the composite image data after the synthesis processing of the image data of all imaging positions is completed.

図4に示すように、本実施形態に係る画像データの合成方法では、カメラユニット21が基準面付近に合焦しているときに(i=0の位置P(0)で)撮像された画像データを除いて、カメラユニット21のZ方向の位置を移動させて画像データを取得する毎に、高さ基本処理及び合成画像更新処理を実行している。このとき、図4では、撮像処理と、その撮像処理で取得された画像データの合成処理(高さ基本処理及び合成画像更新処理)とを一連の流れとして説明しているが、次の撮像位置での撮像処理を実行しているときに、並行して前の撮像位置で取得された画像データに対する高さ基本処理及び合成画像更新処理を実行することができる。上述したように、撮像処理においては、縞パターンの位相をずらした複数のパターン画像データの取得を複数の投射ユニット23毎に実行し、さらに、照明ユニット22の側方照明源22a,22b,22cを順次点灯して複数の2次元画像データを取得しなければならないため、次の撮像位置でこれらの撮像処理をしている間に、前の撮像位置の高さ基本処理及び合成画像更新処理を並行して実行することにより、全体の処理時間を短くし、結果として検査時間を短くすることができる。このとき、図4では、P(0)の位置で撮像処理及び高さ基本処理を実行した後は、カメラユニット21を被検査体12から最も遠いP(3)に移動させ、この撮像位置から被検査体12に近づく方向にカメラユニット21を移動させて撮像処理並びに高さ基本処理及び合成画像更新処理を実行し、最後にP(0)の画像データの合成画像更新処理を実行している。この順で撮像処理並びに高さ基本処理及び合成画像更新処理を実行することにより、現在高さ基本処理及び合成画像更新処理を実行している撮像位置よりも前の撮像位置での高さ基本処理及び合成画像更新処理において、既に合成画像データの画素の値が選択されているときは、現在高さ基本処理及び合成画像更新処理を行っている撮像位置の画像データが条件(1)及び条件(2)を満足してもその画素の値は合成画像データの対応する画素の値として選択しないという処理をすることにより、上述した「2以上の撮像位置の画像データにおける同一の位置の画素が条件(1)及び条件(2)を満足しているときは、これらの画像データのうち、被検査体12から最も遠い撮像位置の画像データの画素の値を合成画像データの画素の値として選択する」という判断基準に適合させることができる。 As shown in FIG. 4, in the image data synthesis method according to this embodiment, the height basic processing and the composite image update processing are performed each time the position of the camera unit 21 in the Z direction is moved to acquire image data, except for image data captured when the camera unit 21 is focused near the reference plane (at position P(0) where i=0). At this time, in FIG. 4, the imaging processing and the synthesis processing of the image data acquired in the imaging processing (height basic processing and composite image update processing) are described as a series of flows, but while the imaging processing at the next imaging position is being performed, the height basic processing and the composite image update processing for the image data acquired at the previous imaging position can be performed in parallel. As described above, in the imaging processing, the acquisition of multiple pattern image data with the phase of the stripe pattern shifted is performed for each of the multiple projection units 23, and further, the side illumination sources 22a, 22b, and 22c of the illumination unit 22 must be sequentially turned on to acquire multiple two-dimensional image data. Therefore, while performing these imaging processing at the next imaging position, the height basic processing and the composite image update processing at the previous imaging position are performed in parallel, thereby shortening the overall processing time and, as a result, the inspection time. At this time, in Figure 4, after performing the imaging process and basic height process at position P(0), the camera unit 21 is moved to P(3), which is the farthest from the object under test 12, and the camera unit 21 is moved from this imaging position in a direction approaching the object under test 12 to perform the imaging process, basic height process, and composite image update process, and finally the composite image update process of the image data of P(0) is performed. By performing the imaging process, height basic process, and composite image update process in this order, if a pixel value of the composite image data has already been selected in the height basic process and composite image update process at an imaging position prior to the imaging position at which the height basic process and composite image update process are currently being performed, even if the image data at the imaging position at which the height basic process and composite image update process are currently being performed satisfies conditions (1) and (2), the pixel value is not selected as the value of the corresponding pixel of the composite image data. This makes it possible to comply with the above-mentioned judgment criterion that "if pixels at the same position in image data at two or more imaging positions satisfy conditions (1) and (2), the pixel value of the image data at the imaging position farthest from the subject 12 is selected as the pixel value of the composite image data."

なお、上述した処理は、1つの視野に対して実行されるものであり、被検査体12を複数の視野に分割して撮像する(検査する)場合には、カメラユニット21をXY方向に移動させて、それぞれの視野において上記処理が実行されることになる。 The above-mentioned processing is performed for one field of view. If the inspected object 12 is divided into multiple fields of view and imaged (inspected), the camera unit 21 is moved in the XY direction and the above-mentioned processing is performed for each field of view.

本実施形態に係る検査装置10は、制御ユニット30の検査制御部31が有する画像処理部32で取得された合成画像データ(高さマップ及び2次元画像データ)に基づいて、上述したような検査を実行する。 The inspection device 10 according to this embodiment performs the above-described inspection based on the composite image data (height map and two-dimensional image data) acquired by the image processing unit 32 of the inspection control unit 31 of the control unit 30.

(画素を選択するための条件の第1の変形例)
上述した合成画像更新処理では、条件(2)において、対象画素の振幅に基づいて判断しているが、この条件(2)に代えて、以下に示す条件(3)で判断してもよい。すなわち、上述した条件(1)及び条件(3)により、その画素の現在の撮像位置での高さ情報に基づいて、現在の撮像位置の画像データの画素を合成画像データとして選択するか否かを決定するように構成してもよい。なお、コントラストCは、上述した式(a)から求められる振幅A及びオフセットBを用いてC=A/Bで算出される。
(First Modification of the Condition for Selecting Pixels)
In the above-mentioned composite image update process, the determination is made based on the amplitude of the target pixel in condition (2), but the following condition (3) may be used instead of condition (2). That is, the above-mentioned conditions (1) and (3) may be used to determine whether or not to select a pixel of the image data at the current imaging position as composite image data based on the height information of the pixel at the current imaging position. The contrast C is calculated by C=A/B using the amplitude A and offset B obtained from the above-mentioned formula (a).

C(X,Y,i) ≧ C(X,Y,0)×WC (3)
但し、
C(X,Y,i):判定対象の画素の位置が(X,Y)のときの現在の撮像位置でのコントラスト
C(X,Y,0):判定対象の画素の位置が(X,Y)のときのi=0でのコントラスト
WC:重み計数
C(X, Y, i) ≧ C(X, Y, 0)×WC (3)
however,
C(X,Y,i): Contrast at the current imaging position when the position of the pixel to be determined is (X,Y) C(X,Y,0): Contrast at the current imaging position when the position of the pixel to be determined is (X, Y) contrast at i = 0 WC: weight coefficient

条件(3)は、パターン画像データを用いて位相計算するときに、上述した式(a)に基づいて得られるコントラストC(X,Y,i)、C(X,Y,0)により合焦度が大きい画素か否かを判定するものである。この条件(3)は、合焦度を比較してより合焦度が大きい画素を抽出し、当該画素の評価値が閾値以上であるときに合焦と判断するものである。具体的には、コントラストの値が大きい方が合焦度が大きいため、判定対象の画素(位置(X,Y)の画素)において、i=0のときのコントラストC(X,Y,0)に比べて、現在の撮像位置におけるコントラストC(X,Y,i)が十分大きいときに、判定対象の画素が合焦画素であると判断することができる。なお、重みWCの値は、カメラユニット21の被写界深度に基づいて決定することが望ましい。 Condition (3) is to determine whether a pixel has a high degree of focus based on the contrasts C(X,Y,i) and C(X,Y,0) obtained based on the above formula (a) when calculating the phase using pattern image data. This condition (3) is to compare the degrees of focus to extract pixels with a higher degree of focus, and determine that the pixel is in focus when the evaluation value of the pixel is equal to or greater than a threshold value. Specifically, since the degree of focus is higher when the contrast value is higher, the pixel to be determined (pixel at position (X,Y)) can be determined to be a focused pixel when the contrast C(X,Y,i) at the current imaging position is sufficiently higher than the contrast C(X,Y,0) when i=0. Note that the value of the weight WC is preferably determined based on the depth of field of the camera unit 21.

(高さ測定方法の変形例)
上述した説明では、投射ユニット23から、1つの縞パターンを、位相を変えて投射することにより得られた3枚または4枚のパターン画像データから高さ情報を算出する場合について説明したが、高さ情報の精度を向上させるために、周期の異なる少なくとも2種の縞パターンを使用して高さ情報を取得するように構成することもできる。例えば、上述したステップS100及びS108の撮像処理において、投射ユニット23により長周期の第1パターンを、位相を変えながら投射して3枚または4枚のパターン画像データを取得し、また、短周期の第2パターンを、位相を変えながら投射して3枚または4枚のパターン画像データを取得する。投射ユニット23が複数ある場合は、それぞれの投射ユニット23により第1パターン及び第2パターンの位相を変えたパターン画像データを取得する。そして、長周期(つまり太い縞)の第1パターンにより大まかな高さ情報(ラフ高さ)を取得し、短周期(細い縞)の第2パターンで精密な高さ情報を取得する。上述したようにPMP法は位相に基づき高さ情報を取得するので、高さギャップ(高さ差)が大きく縞が1周期以上ずれてしまうと高さ情報を一意に特定することができない。第1パターンを併用して高さ情報を取得しておくことにより、第2パターンを投射したときに縞が1周期以上ずれている場合にも高さ情報を一意に特定することが可能となる。
(Modification of height measurement method)
In the above description, the height information is calculated from three or four pieces of pattern image data obtained by projecting one stripe pattern from the projection unit 23 with different phases. However, in order to improve the accuracy of the height information, the height information can be obtained by using at least two types of stripe patterns with different periods. For example, in the imaging process of the above steps S100 and S108, the projection unit 23 projects a first pattern with a long period while changing the phase to obtain three or four pieces of pattern image data, and projects a second pattern with a short period while changing the phase to obtain three or four pieces of pattern image data. When there are multiple projection units 23, each projection unit 23 obtains pattern image data in which the phases of the first and second patterns are changed. Then, rough height information (rough height) is obtained by the first pattern with a long period (i.e., thick stripes), and precise height information is obtained by the second pattern with a short period (thin stripes). As described above, the PMP method obtains height information based on the phase, so if the height gap (height difference) is large and the stripes are shifted by one period or more, the height information cannot be uniquely identified. By acquiring height information by using the first pattern in combination, it becomes possible to uniquely identify the height information even if the stripes are shifted by one period or more when the second pattern is projected.

投射ユニット23により第1パターンの位相を変えて投射することにより得られた3枚または4枚のパターン画像データから得られる輝度Inも、第2パターンの位相を変えて投射することにより得られた3枚または4枚のパターン画像データから得られる輝度Inも、上述した式(a)の関係を有している。また、これらの輝度Inと位相φとの関係は上述した式(b)の関係を有している。 The luminance In obtained from the three or four pattern image data obtained by projecting the first pattern with the projection unit 23 while changing the phase, and the luminance In obtained from the three or four pattern image data obtained by projecting the second pattern with the phase changed, have the relationship of the above-mentioned formula (a). Moreover, the relationship between these luminances In and the phase φ has the relationship of the above-mentioned formula (b).

ここで、長周期の第1パターンによる位相をφwとし、基準平面の位相をφw0としたときの位相差Δφwは、上述した式(c)より、次式(c1)の関係を有している。 Here, when the phase of the long-period first pattern is φw and the phase of the reference plane is φw0, the phase difference Δφw has the relationship of the following equation (c1) according to the above equation (c).

Δφw = φw - φw0 (c1) Δφw = φw - φw0 (c1)

また同様に、短周期の第2パターンによる位相をφfとし、基準平面の位相をφf0としたときの位相差Δφfは、上述した式(c)より、次式(c2)の関係を有している。 Similarly, when the phase of the short-period second pattern is φf and the phase of the reference plane is φf0, the phase difference Δφf has the relationship of the following equation (c2) based on the above equation (c).

Δφf = φf - φf0 (c2) Δφf = φf - φf0 (c2)

これらの位相差Δφw、Δφfより、詳細な高さ情報Hは、次式(d′)で求めることができる。ここで、Mは、長周期の第1パターンの1周期に対する短周期の第2パターンの周期数であり、また、Round()は、小数点以下を四捨五入する関数である。 From these phase differences Δφw and Δφf, detailed height information H can be obtained by the following formula (d'). Here, M is the number of periods of the short-period second pattern relative to one period of the long-period first pattern, and Round() is a function that rounds off the decimal point.

H = Round((M×Δφw-Δφf)/2π)×2π+Δφf (d′) H = Round ((M×Δφw−Δφf)/2π)×2π+Δφf (d′)

なお、長周期と短周期の2つの縞パターンを用いて高さ情報を算出する構成の場合、上述した条件(2)に示す振幅による判断に代えて、以下の条件(2′)に示すように振幅比による判断を行うことが望ましい。すなわち、上述した条件(1)及び条件(2′)により、現在の撮像位置の画像データの画素を合成画像データとして選択するか否かを決定することが望ましい。 In the case of a configuration in which height information is calculated using two stripe patterns, one with a long period and one with a short period, it is desirable to make a judgment based on the amplitude ratio as shown in the following condition (2') instead of the judgment based on the amplitude as shown in the above-mentioned condition (2). In other words, it is desirable to determine whether or not to select a pixel of the image data at the current imaging position as composite image data based on the above-mentioned conditions (1) and (2').

AR(X,Y,i) ≦ AR(X,Y,0)×WAR (2′)
但し、
AR(X,Y,i):判定対象の画素の位置が(X,Y)のときの現在の撮像位置での振幅比
AR(X,Y,0):判定対象の画素の位置が(X,Y)のときのi=0での振幅比
WAR:重み計数
AR (X, Y, i) ≦ AR (X, Y, 0) × WAR (2')
however,
AR(X,Y,i): Amplitude ratio at the current imaging position when the position of the pixel to be determined is (X,Y) AR(X,Y,0): Amplitude ratio at the current imaging position when the position of the pixel to be determined is (X , Y) at i = 0 WAR: weight coefficient

なお、撮像位置P(i)において位置(X,Y)にある画素のコントラスト比AR(パラメータの(X,Y,i)は省略する)は、以下に示す式(e)に基づいて算出される。ここで、Awは、長周期の第1パターンを投射して得られた3枚または4枚のパターン画像データから式(a)により得られた振幅であり、Afは、短周期の第2パターンを投射して得られた3枚または4枚のパターン画像から式(a)により得られた振幅である。 The contrast ratio AR (parameters (X, Y, i) are omitted) of a pixel at position (X, Y) at imaging position P(i) is calculated based on the following formula (e). Here, Aw is the amplitude obtained by formula (a) from three or four pattern image data obtained by projecting a first pattern with a long period, and Af is the amplitude obtained by formula (a) from three or four pattern images obtained by projecting a second pattern with a short period.

AR =(Aw-Af)/Af (e) AR = (Aw-Af)/Af (e)

条件(2)のときと同様に、この条件(2′)は、合焦度を比較してより合焦度が大きい画素を抽出し、当該画素の評価値が閾値以下であるときに合焦と判断するものである。具体的には、振幅比の値が小さい方が合焦度が大きいため、判定対象の画素(位置(X,Y)の画素)において、基準面付近にカメラユニット21が合焦しているとき(i=0のとき)の振幅比AR(X,Y,0)に比べて、現在の撮像位置における振幅比AR(X,Y,i)が十分小さいときに、判定対象の画素が合焦画素であると判断することができる。なお、重みWARの値は、カメラユニット21の被写界深度に基づいて決定することが望ましい。 As with condition (2), condition (2') compares the focus degrees to extract pixels with higher focus degrees, and determines that the pixel is in focus when the evaluation value of the pixel is equal to or less than a threshold value. Specifically, since the smaller the amplitude ratio value, the greater the focus degree, the pixel to be determined (pixel at position (X, Y)) can be determined to be in focus when the amplitude ratio AR(X, Y, i) at the current imaging position is sufficiently smaller than the amplitude ratio AR(X, Y, 0) when the camera unit 21 is focused near the reference plane (i=0). Note that the value of the weight WAR is desirably determined based on the depth of field of the camera unit 21.

あるいは、条件(2′)に代えて、以下に示す条件(3′)で判断してもよい。すなわち、上述した条件(1)及び条件(3′)により、現在の撮像位置の画像データの画素を合成画像データとして選択するか否かを決定してもよい。 Alternatively, instead of condition (2'), the following condition (3') may be used for the judgment. In other words, the above-mentioned conditions (1) and (3') may be used to determine whether or not to select a pixel of the image data at the current imaging position as the composite image data.

CR(X,Y,i) ≦ CR(X,Y,0)×WCR (3′)
但し、
CR(X,Y,i):判定対象の画素の位置が(X,Y)のときの現在の撮像位置でのコントラスト比
CR(X,Y,0):判定対象の画素の位置が(X,Y)のときのi=0でのコントラスト比
WCR:重み計数
CR (X, Y, i) ≦ CR (X, Y, 0) × WCR (3')
however,
CR(X,Y,i): contrast ratio at the current imaging position when the position of the pixel to be determined is (X,Y) CR(X,Y,0): contrast ratio at the current imaging position when the position of the pixel to be determined is (X , Y) at i=0 WCR: Weight coefficient

条件(3′)は、パターン画像データを用いて位相計算するときに、上述した式(a)に基づいて得られるコントラスト比により合焦している画素か否かを判定するものである。この条件(3′)は、合焦度を比較してより合焦度が大きい画素を抽出し、当該画素の評価値が閾値以下であるときに合焦と判断するものである。具体的には、コントラスト比の値が小さい方が合焦度が大きいため、判定対象の画素において、基準面付近にカメラユニット21が合焦しているとき(i=0のとき)のコントラスト比CR(X,Y,0)に比べて、現在の撮像位置におけるコントラスト比CR(X,Y,i)が十分小さいときに、判定対象の画素において焦点が合っていると判断することができる。 Condition (3') is used to determine whether a pixel is in focus or not based on the contrast ratio obtained based on the above formula (a) when calculating the phase using pattern image data. This condition (3') compares the focus degrees to extract pixels with higher focus degrees, and determines that the pixel is in focus when the evaluation value of the pixel is equal to or less than a threshold value. Specifically, since the smaller the contrast ratio value, the greater the focus degree, the pixel to be determined can be determined to be in focus when the contrast ratio CR(X,Y,i) at the current imaging position is sufficiently smaller than the contrast ratio CR(X,Y,0) when the camera unit 21 is focused near the reference plane (when i=0).

なお、コントラスト比CR(パラメータの(X,Y,i)は省略する)は、長周期の第1パターンを投射して得られた3枚または4枚のパターン画像データから得られたコントラストCwと、短周期の第2パターンを投射して得られた3枚または4枚のパターン画像から得られたコントラストCfとから次式(f)により得られる。なお、Awは、第1パターンにより得られる振幅、Afは、第2パターンにより得られる振幅、Bwは、第1パターンにより得られるオフセット、Bfは、第2パターンにより得られるオフセットであって、これらの値は上述した式(a)から求められる。 The contrast ratio CR (parameters (X, Y, i) are omitted) is obtained from the contrast Cw obtained from the three or four pattern image data obtained by projecting the first pattern with a long period, and the contrast Cf obtained from the three or four pattern images obtained by projecting the second pattern with a short period, using the following formula (f). Note that Aw is the amplitude obtained from the first pattern, Af is the amplitude obtained from the second pattern, Bw is the offset obtained from the first pattern, and Bf is the offset obtained from the second pattern, and these values are obtained from the above formula (a).

CR = (Cw-Cf)/Cf (f)
但し、
Cw = Aw/Bw (g)
Cf = Af/Bf (h)
CR = (Cw-Cf)/Cf (f)
however,
Cw = Aw/Bw (g)
Cf = Af/Bf (h)

このように、上述した合成画像更新処理S112においては、条件(1)及び条件(3′)を同時に満足する画素を選択しても、焦点の合った画素を合成画像データの画素の値とすることができる。 In this way, in the above-mentioned composite image update process S112, even if a pixel that simultaneously satisfies conditions (1) and (3') is selected, the in-focus pixel can be set as the pixel value of the composite image data.

(画素を選択するための条件の第2の変形例)
上述した画像データの合成方法において、合成画像更新処理S112では、高さ情報を取得するための縞パターンが1種類の場合は、現在の撮像位置で撮像された画像データの画素を合成画像データの画素として選択するか否かの判断として、条件(1)及び条件(2)、又は条件(1)及び条件(3)を同時に満足する画素を選択するように構成し、縞パターンが長周期と短周期の2種類の場合は、条件(1)及び条件(2′)又は条件(1)及び条件(3′)を同時に満足するように構成したが、条件(2)、条件(2′)又は条件(3)、条件(3′)は判断せず、現在の撮像位置で撮像された画像データにおいて、条件(1)を満足するときに合成画像データの画素として選択するように構成してもよい。条件(1)だけでも、現在の撮像位置の画像データの画素が、合焦画素であるか否かを判断できるからであり、処理時間を更に短くすることができる。なお、このように構成した場合は、基準面付近に合焦しているときの撮像位置P(0)での撮像処理は最後に行ってもよい(言い換えると、被検査体12から遠い撮像位置から撮像処理、高さ基本処理及び合成画像更新処理を実行するように構成してもよい)。
(Second Modification of the Condition for Selecting Pixels)
In the above-mentioned image data synthesis method, in the synthetic image update process S112, when there is one type of stripe pattern for acquiring height information, a pixel of the image data captured at the current imaging position is selected as a pixel of the synthetic image data by simultaneously selecting a pixel that satisfies the conditions (1) and (2), or the conditions (1) and (3), and when there are two types of stripe patterns, a long period and a short period, a pixel is selected as a pixel of the synthetic image data by simultaneously satisfying the conditions (1) and (2'), or the conditions (1) and (3'). However, it is also possible to select a pixel of the synthetic image data when the condition (1) is satisfied in the image data captured at the current imaging position without judging the conditions (2), (2'), (3), and (3'). This is because it is possible to judge whether the pixel of the image data at the current imaging position is a focused pixel based on only the condition (1), and the processing time can be further shortened. In addition, when configured in this manner, the imaging process at the imaging position P(0) when focused near the reference surface may be performed last (in other words, the imaging process, basic height process, and composite image update process may be performed from an imaging position far from the object under test 12).

また、被検査体12から遠い撮像位置から撮像処理、高さ基本処理及び合成画像更新処理を実行する場合、基準面付近にカメラユニット21が合焦しているとき(P(0))の画像データは最後に取得されるため、上述した条件(2)に代えて、以下に示す条件(2a)で判断してもよい。 In addition, when the imaging process, basic height process, and composite image update process are performed from an imaging position far from the subject 12, the image data when the camera unit 21 is focused near the reference plane (P(0)) is acquired last, so instead of the above-mentioned condition (2), the judgment may be made based on the following condition (2a).

A(X,Y,i) ≧ TH (2a)
但し、
TH:振幅Aから予め決定された閾値
A(X, Y, i) ≧ TH (2a)
however,
TH: A threshold value determined in advance from the amplitude A

また、上述した条件(2′)を用いて判定する場合には、この条件(2′)に代えて、以下に示す条件(2a′)で判断してもよい。 When the above-mentioned condition (2') is used for the judgment, the following condition (2a') may be used instead of this condition (2').

AR(X,Y,i) ≦ TH (2a′)
但し、
TH:振幅比ARから予め決定された閾値
AR (X, Y, i) ≦ TH (2a')
however,
TH: A threshold value determined in advance from the amplitude ratio AR

また、上述した条件(3)を用いて判定する場合には、この条件(3)に代えて、以下に示す条件(3a)で判断してもよい。 When the above-mentioned condition (3) is used for the judgment, the judgment may be made based on the following condition (3a) instead of this condition (3).

C(X,Y,i) ≧ TH (3a)
但し、
TH:コントラストCから予め決定された閾値
C(X, Y, i) ≧ TH (3a)
however,
TH: A threshold value determined in advance from contrast C

また、上述した条件(3′)を用いて判定する場合には、この条件(3′)に代えて、以下に示す条件(3a′)で判断してもよい。 When the above-mentioned condition (3') is used for the judgment, the following condition (3a') may be used instead of this condition (3').

CR(X,Y,i) ≦ TH (3a′)
但し、
TH:コントラスト比CRから予め決定された閾値
CR (X, Y, i) ≦ TH (3a')
however,
TH: A threshold value determined in advance from the contrast ratio CR

条件(2)、(2′)又は条件(3)、(3′)に代えて、条件(2a)、(2a′)、(3a)、(3a′)を用いて判断しても、条件(1)を満足している画素において、より合焦度が大きい画素を抽出することができる。 Even if conditions (2a), (2a'), (3a), and (3a') are used in place of conditions (2) and (2') or conditions (3) and (3'), pixels with a higher degree of focus can be extracted from among pixels that satisfy condition (1).

(主な特徴と効果)
本実施形態における画像データの合成方法の主な特徴及びその効果を以下にまとめる。
(Main features and effects)
The main features and effects of the image data synthesis method according to this embodiment are summarized below.

第1に、本実施形態に係る画像データの合成方法では、一つの視野に対して、カメラユニット21をZ方向(撮像方向)の異なる位置に移動させて撮像した複数の画像データを合成した合成画像データを取得するが、カメラユニット21の撮像位置が被検査体12から(基準面から)遠い画像データから合成処理を実行するように構成されている。このように構成すると、カメラユニット21が被検査体12から遠くなるにつれ、被検査体12からの反射光量が減少し、特に合焦していない画素での不要光などによるノイズが減少するため、高さ情報に含まれる誤計測値が削減される。 First, in the image data synthesis method according to this embodiment, for one field of view, the camera unit 21 is moved to different positions in the Z direction (imaging direction) to capture multiple pieces of image data to obtain synthetic image data, but the imaging position of the camera unit 21 is configured to perform synthesis processing from image data that is far from the inspected object 12 (from the reference surface). With this configuration, as the camera unit 21 becomes farther away from the inspected object 12, the amount of reflected light from the inspected object 12 decreases, and noise due to unnecessary light in unfocused pixels in particular decreases, thereby reducing erroneous measurement values included in the height information.

第2に、本実施形態に係る画像データの合成方法では、それぞれの撮像位置の画像データにおいて、合焦している画素を選択して合成画像データの画素の値としている。合焦している画素の判断基準としては、PMP法により測定された各画素の高さ情報や、PMP法における振幅やオフセットを用いており、上述した条件(1)及び条件(2)を同時に満足する画素、又は、条件(1)及び条件(3)を同時に満足する画素を選択する方法、条件(1)のみを満足する画素を選択する方法、条件(1)及び条件(2′)又は条件(1)及び条件(3′)を同時に満足する画素を選択する方法、また、条件(1)と条件(2a)、(2a′)、(3a)、(3a′)の何れかとを同時に満足する画素を選択する方法がある。このように構成すると、簡単な演算処理で精度良く合焦している画素を選択することができる。なお、異なる撮像位置の画像データにおいて合焦している条件を満足する画素においては、第1の特徴で述べたように、被検査体12から(基準面から)最も遠い撮像位置の値が選択される。 Secondly, in the image data synthesis method according to this embodiment, in-focus pixels are selected from the image data at each imaging position and used as the pixel value of the synthesized image data. The height information of each pixel measured by the PMP method, and the amplitude and offset in the PMP method are used as criteria for determining in-focus pixels. There are a method of selecting pixels that simultaneously satisfy the above-mentioned conditions (1) and (2), or pixels that simultaneously satisfy conditions (1) and (3), a method of selecting pixels that only satisfy condition (1), a method of selecting pixels that simultaneously satisfy conditions (1) and (2'), or conditions (1) and (3'), and a method of selecting pixels that simultaneously satisfy condition (1) and any of conditions (2a), (2a'), (3a), and (3a'). With this configuration, in-focus pixels can be selected with high accuracy by simple calculation processing. Note that, for pixels that satisfy the in-focus condition in the image data at different imaging positions, as described in the first feature, the value of the imaging position farthest from the test object 12 (from the reference surface) is selected.

第3に、本実施形態に係る画像データの合成方法では、PMP法によりパターン画像データから高さ情報を取得するときは、パターン画像データに対して上述した合成処理を実行し、合成された画像データに対して不計測画素の補間処理や歪みの補正処理(高さ後処理)を実行するように構成されている。各撮像位置で撮像されたパターン画像データから算出される高さマップに対して補間処理や補正処理を行うと、補間や補正された画素の値(信頼できないデータ)まで合成画像データの画素の値として選択されてしまい、画像データの精度が悪くなる可能性があるが、合成された画像データ(高さマップ)に対して補間処理及び補正処理をすることにより、焦点の合った画像データに対して補間や補正が行われるので、精度の高い高さ情報を取得することができる。 Thirdly, in the image data synthesis method according to this embodiment, when height information is obtained from pattern image data by the PMP method, the above-mentioned synthesis process is performed on the pattern image data, and the synthesized image data is subjected to interpolation of unmeasured pixels and distortion correction (height post-processing). If interpolation or correction is performed on a height map calculated from pattern image data captured at each imaging position, even the interpolated or corrected pixel values (unreliable data) may be selected as pixel values of the synthesized image data, which may result in poor accuracy of the image data. However, by performing interpolation and correction on the synthesized image data (height map), interpolation and correction are performed on focused image data, so highly accurate height information can be obtained.

第4に、本実施形態に係る画像データの合成方法では、誤計測値を取り除くためのパラメータは、基準面付近にカメラユニット21が合焦しているとき(P(0)のとき)は、基準面(基板面)での計測点数を最大化する値に設定され、基準面付近にカメラユニット21が合焦していないとき(P(1)~P(3)のとき)は、計測誤差の疑いの高い点は除去する値に設定される。このように構成すると、焦点の合った合成画像データを取得することができ、高さ情報の精度を向上させることができる。 Fourth, in the image data synthesis method according to this embodiment, the parameters for removing erroneous measurement values are set to values that maximize the number of measurement points on the reference surface (substrate surface) when the camera unit 21 is focused near the reference surface (when P(0)), and are set to values that remove points that are highly suspected of being measurement errors when the camera unit 21 is not focused near the reference surface (when P(1) to P(3)). When configured in this manner, in-focus synthetic image data can be obtained, improving the accuracy of the height information.

第5に、本実施形態に係る画像データの合成方法では、カメラユニット21のZ方向の位置が被検査体12から遠い順で画像データの撮像処理を行い、撮像毎に高さ基本処理及び合成画像更新処理を実行するように構成されている。このように構成すると、次の撮像位置で撮像処理を実行しているときに、並行して前の撮像位置で撮像した画像データを用いて高さ基本処理及び合成画像更新処理を実行することができ、処理時間を短くすることができる。 Fifth, in the image data synthesis method according to this embodiment, the image data is processed in the order of the Z direction position of the camera unit 21 from furthest from the object under test 12, and the basic height processing and composite image update processing are executed for each image capture. With this configuration, while the image capture processing is being executed at the next imaging position, the basic height processing and composite image update processing can be executed in parallel using the image data captured at the previous imaging position, thereby shortening the processing time.

以上のような構成によると、基板上に高さのある部品が搭載された被検査体12であっても、焦点のあった画像データを取得することができるので、パターン画像データから算出される高さマップの高さ情報の精度が向上し、また、鮮明な2次元画像データが得られる。 With the above configuration, even for an inspected object 12 that has tall components mounted on a board, focused image data can be acquired, improving the accuracy of the height information of the height map calculated from the pattern image data and providing clear two-dimensional image data.

なお、以上の実施の形態は、特許請求の範囲に記載された発明を限定するものではなく、実施の形態の中で説明されている特徴的事項の組み合わせの全てが解決手段の必須事項であるとは限らないことは言うまでもない。 It goes without saying that the above embodiments do not limit the invention described in the claims, and that not all combinations of the characteristic features described in the embodiments are necessarily essential to the solution.

10 検査装置(画像処理装置)
12 被検査体
21 カメラユニット(撮像部)
22 照明ユニット(照明部)
23 投射ユニット(投射部)
30 制御ユニット(制御部)
10 Inspection device (image processing device)
12 Object to be inspected 21 Camera unit (imaging section)
22 Lighting unit (lighting section)
23 Projection unit (projection section)
30 Control unit (control section)

Claims (7)

被検査体との撮像方向の相対位置を変化可能な撮像部と、
制御部と、を有し、
前記制御部は、
前記被検査体上の所定の基準面に合焦しているときの位置にある前記撮像部で撮像して基準位置画像データを取得し、当該基準位置画像データの画素毎に前記被検査体の高さ情報を取得する高さ基本処理を実行する第1のステップと、
前記所定の基準面に合焦しているときの位置とは異なる撮像方向の位置であって予め決められた位置のうち、前記被検査体から最も遠い位置を現在の位置として設定する第2のステップと、
前記現在の位置にある前記撮像部で撮像して現在位置画像データを取得し、当該現在位置画像データの画素毎に前記高さ基本処理を実行して前記被検査体の高さ情報を取得する第3のステップと、
前記高さ情報に含まれる、前記基準位置画像データ及び前記現在位置画像データの画素毎の輝度の情報、並びに、前記現在位置画像データの画素毎の前記被検査体と前記撮像部の最合焦位置との距離の情報に基づいて、前記現在位置画像データの画素毎に、焦点が合っている画素の条件を満たしているか否かを判断し、前記条件を満たしている画素だと判断したときは前記現在位置画像データの当該画素の値を合成画像データの該当する画素の値として選択する合成画像更新処理を実行する第4のステップと、
前記予め決められた位置のうち、前記現在の位置から前記所定の基準面に近づく方向の次の位置を現在の位置として前記第3のステップ及び前記第4のステップを繰り返し実行する第5のステップと、
前記第5のステップで前記予め決められた位置の全てで前記第3のステップ及び前記第4のステップが実行されたと判断したときに、前記所定の基準面に合焦しているときの位置を現在の位置として設定し、前記基準位置画像データの画素毎に前記合成画像更新処理を実行して当該画素が前記条件を満たしていると判断したときに前記基準位置画像データの当該画素の値を前記合成画像データの該当する画素の値として選択する第6のステップと、を実行する
画像処理装置。
an imaging unit capable of changing a relative position in an imaging direction with respect to the object under inspection;
A control unit,
The control unit is
a first step of performing a basic height process of acquiring reference position image data by capturing an image with the imaging unit at a position when the imaging unit is focused on a predetermined reference plane on the object to be inspected, and acquiring height information of the object to be inspected for each pixel of the reference position image data;
a second step of setting, as a current position, a position in an imaging direction different from a position when the focus is on the predetermined reference plane and among predetermined positions, the farthest position from the object to be inspected;
a third step of acquiring current position image data by capturing an image with the imaging unit at the current position, and executing the height basic processing for each pixel of the current position image data to acquire height information of the test object;
a fourth step of executing a composite image update process for determining whether or not a condition for a pixel being in focus is satisfied for each pixel of the current position image data based on luminance information for each pixel of the reference position image data and the current position image data, which are included in the height information, and information on the distance between the test object and the most focused position of the imaging unit for each pixel of the current position image data, and selecting a value of the pixel in the current position image data as a value of a corresponding pixel in the composite image data when it is determined that the pixel satisfies the condition ;
a fifth step of repeatedly executing the third step and the fourth step, with a next position in a direction approaching the predetermined reference plane from the current position as a current position, among the predetermined positions;
a sixth step of setting a position when the predetermined position is focused on the predetermined reference plane as a current position when it is determined in the fifth step that the third step and the fourth step have been performed at all of the predetermined positions, and of executing the composite image update process for each pixel of the reference position image data, and selecting the value of the pixel of the reference position image data as the value of the corresponding pixel of the composite image data when it is determined that the pixel satisfies the condition.
Image processing device.
前記被検査体に対し、位相が単調増加または単調減少するように変化するパターンが繰り返し形成された縞パターンを投射する投射部を有し、
前記制御部は、
前記投射部により前記縞パターンが投射されて取得された前記基準位置画像データまたは前記現在位置画像データを取得して前記高さ基本処理により前記高さ情報を取得するように構成されている
請求項に記載の画像処理装置。
a projection unit that projects a stripe pattern, in which a pattern whose phase changes so as to monotonically increase or decrease is repeatedly formed, onto the object under inspection;
The control unit is
The reference position image data or the current position image data acquired by projecting the stripe pattern by the projection unit is acquired, and the height information is acquired by the height basic processing.
The image processing device according to claim 1 .
前記制御部は、
前記合成画像更新処理において、前記現在位置画像データの画素の前記輝度の情報に含まれる振幅に関する情報と前記基準位置画像データの画素の前記輝度の情報に含まれる振幅に関する情報とを比較して前記条件を満たしている画素か否かを判断する
請求項に記載の画像処理装置。
The control unit is
3. The image processing device according to claim 2, wherein in the composite image update process, information regarding amplitude contained in the luminance information of the pixel of the current position image data is compared with information regarding amplitude contained in the luminance information of the pixel of the reference position image data to determine whether or not the pixel satisfies the condition.
前記制御部は、
前記高さ基本処理において、
前記基準位置画像データに対しては、計測点数が最大化するように前記高さ情報を取得し、
前記現在位置画像データに対しては、計測誤差の疑いの高い画素は除外するように前記高さ情報を取得する
請求項に記載の画像処理装置。
The control unit is
In the height basic processing,
The height information is acquired for the reference position image data so as to maximize the number of measurement points;
The image processing device according to claim 3 , wherein the height information is acquired from the current position image data so as to exclude pixels that are highly suspected of having a measurement error.
前記被検査体に対し、照明光を投射する照明部を更に有し、
前記基準位置画像データ及び前記現在位置画像データの各々には、前記投射部により前記縞パターンが投射されて前記撮像部により取得されたパターン画像データと、前記照明部により前記照明光が投射されて前記撮像部により取得された2次元画像データと、を含み、
前記制御部は、
前記高さ基本処理において、前記パターン画像データから前記高さ情報を取得し、
前記合成画像更新処理において、前記条件を満たしている画素だと判断したときは、前記パターン画像データの当該画素の高さ情報を高さマップの合成画像データの該当する画素の値として選択し、前記2次元画像データの当該画素の値を2次元画像データの合成画像データの該当する画素の値として選択する
請求項2~4のいずれか一項に記載の画像処理装置。
The inspection apparatus further includes an illumination unit that projects illumination light onto the inspection object,
each of the reference position image data and the current position image data includes pattern image data acquired by the imaging unit after the stripe pattern is projected by the projection unit, and two-dimensional image data acquired by the imaging unit after the illumination light is projected by the illumination unit;
The control unit is
In the basic height processing, the height information is obtained from the pattern image data;
An image processing device as claimed in any one of claims 2 to 4, wherein, in the composite image update process, when it is determined that a pixel satisfies the condition, height information of the pixel in the pattern image data is selected as the value of the corresponding pixel in the composite image data of the height map, and a value of the pixel in the two-dimensional image data is selected as the value of the corresponding pixel in the composite image data of the two-dimensional image data.
前記制御部は、
前記合成画像更新処理により合成された高さマップの合成画像データに対し、不計測画素補間処理や歪み補正処理等の高さ後処理を実行する
請求項に記載の画像処理装置。
The control unit is
The image processing device according to claim 5 , further comprising: performing height post-processing such as non-measured pixel interpolation processing and distortion correction processing on the composite image data of the height map synthesized by the composite image update processing.
前記制御部は、
前記合成画像更新処理において、同一の画素で、前記撮像部が撮像方向の異なる位置にあるときの2以上の前記基準位置画像データまたは前記現在位置画像データで、前記条件を満たしている画素だと判断したときは、当該画像データのうち、前記撮像部が前記被検査体から最も遠い位置にある画像データの当該画素の値を合成画像データの該当する画素の値として選択する
請求項1~6のいずれか一項に記載の画像処理装置。
The control unit is
The image processing device according to any one of claims 1 to 6, wherein, in the composite image update process, when it is determined that the same pixel satisfies the condition in two or more of the reference position image data or the current position image data when the imaging unit is in different positions in the imaging direction, the value of the pixel in the image data in which the imaging unit is located farthest from the subject is selected as the value of the corresponding pixel in the composite image data.
JP2021003067A 2021-01-12 2021-01-12 Image Processing Device Active JP7624314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021003067A JP7624314B2 (en) 2021-01-12 2021-01-12 Image Processing Device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021003067A JP7624314B2 (en) 2021-01-12 2021-01-12 Image Processing Device

Publications (2)

Publication Number Publication Date
JP2022108177A JP2022108177A (en) 2022-07-25
JP7624314B2 true JP7624314B2 (en) 2025-01-30

Family

ID=82556361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021003067A Active JP7624314B2 (en) 2021-01-12 2021-01-12 Image Processing Device

Country Status (1)

Country Link
JP (1) JP7624314B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001298755A (en) 2000-04-11 2001-10-26 Denso Corp Full focus image pickup method and stereoscopic display method
JP2006300681A (en) 2005-04-20 2006-11-02 Sysmex Corp Image creation device
JP2010164369A (en) 2009-01-14 2010-07-29 Tateyama Machine Kk Method and device for synthesizing depth shape of bar-like rotating tool
JP2014010803A (en) 2012-07-03 2014-01-20 Acutelogic Corp All-in-focus image generation method, all-in-focus image generation device, all-in-focus image generation program, object height information acquisition method, object height information acquisition device and object height information acquisition program
JP2018066966A (en) 2016-10-21 2018-04-26 株式会社キーエンス Magnifying observation device
JP2019190921A (en) 2018-04-20 2019-10-31 株式会社キーエンス Shape measuring apparatus, shape measuring method and shape measuring program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001298755A (en) 2000-04-11 2001-10-26 Denso Corp Full focus image pickup method and stereoscopic display method
JP2006300681A (en) 2005-04-20 2006-11-02 Sysmex Corp Image creation device
JP2010164369A (en) 2009-01-14 2010-07-29 Tateyama Machine Kk Method and device for synthesizing depth shape of bar-like rotating tool
JP2014010803A (en) 2012-07-03 2014-01-20 Acutelogic Corp All-in-focus image generation method, all-in-focus image generation device, all-in-focus image generation program, object height information acquisition method, object height information acquisition device and object height information acquisition program
JP2018066966A (en) 2016-10-21 2018-04-26 株式会社キーエンス Magnifying observation device
JP2019190921A (en) 2018-04-20 2019-10-31 株式会社キーエンス Shape measuring apparatus, shape measuring method and shape measuring program

Also Published As

Publication number Publication date
JP2022108177A (en) 2022-07-25

Similar Documents

Publication Publication Date Title
KR101257188B1 (en) Three-dimensional shape measuring device, three-dimensional shape measuring method, and computer readable recording medium for three-dimessional shape measuring program
JP5443303B2 (en) Appearance inspection apparatus and appearance inspection method
JP4924042B2 (en) Three-dimensional shape measuring apparatus, calibration method thereof, program, and computer-readable recording medium
US20050254066A1 (en) Three-dimensional measuring instrument
JP2006003212A (en) Phase measurement system
JPH0921620A (en) 3D shape measurement method for objects
JP6791631B2 (en) Image generation method and inspection equipment
JP5612969B2 (en) Appearance inspection apparatus and appearance inspection method
JP2008157797A (en) Three-dimensional measuring method and three-dimensional shape measuring device using it
JP2009036589A (en) Target for calibration and device, method and program for supporting calibration
JP5385703B2 (en) Inspection device, inspection method, and inspection program
JP2009204343A (en) Three-dimensional shape measurement method and device
JP5566707B2 (en) Appearance inspection apparatus and appearance inspection method
JP2019158351A (en) Object recognition method, height measurement method, and three-dimensional measurement method
JP6894280B2 (en) Inspection method and inspection equipment
US8615128B2 (en) Method for 3D, measurement of the surface of an object, in particular for dental purposes
KR101311215B1 (en) Method for inspecting substrate
JP7624314B2 (en) Image Processing Device
JPH1096606A (en) Shape measuring method and device
JP2006084286A (en) Three-dimensional measuring method and its measuring device
JP2011021970A (en) Three-dimensional shape measuring device and three-dimensional shape measuring method
JP2022108176A (en) Image processing device
JP2016008837A (en) Shape measuring method, shape measuring device, structure manufacturing system, structure manufacturing method, and shape measuring program
JP3723139B2 (en) 3D measuring device
JP2022138862A (en) Three-dimensional shape measuring method and three-dimensional shape measuring device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240509

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20240702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240906

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250120

R150 Certificate of patent or registration of utility model

Ref document number: 7624314

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150