JP5206499B2 - Measuring method, measuring device, measurement control program - Google Patents

Measuring method, measuring device, measurement control program Download PDF

Info

Publication number
JP5206499B2
JP5206499B2 JP2009047684A JP2009047684A JP5206499B2 JP 5206499 B2 JP5206499 B2 JP 5206499B2 JP 2009047684 A JP2009047684 A JP 2009047684A JP 2009047684 A JP2009047684 A JP 2009047684A JP 5206499 B2 JP5206499 B2 JP 5206499B2
Authority
JP
Japan
Prior art keywords
image
plane direction
plane
target member
template
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.)
Expired - Fee Related
Application number
JP2009047684A
Other languages
Japanese (ja)
Other versions
JP2010203826A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009047684A priority Critical patent/JP5206499B2/en
Publication of JP2010203826A publication Critical patent/JP2010203826A/en
Application granted granted Critical
Publication of JP5206499B2 publication Critical patent/JP5206499B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Description

本発明は、対象物の3次元位置を測定する技術に関する。   The present invention relates to a technique for measuring a three-dimensional position of an object.

従来、部材の3次元位置を測定する技術として、光切断法などの高さセンサによる測定が知られている。この高さセンサによる測定は、図31に示すような対象部材に対して高さセンサにより得られた高さデータに基づいて、面内方向における面外方向の高さを示す高さ画像を生成する。具体的には、高さセンサは、図32に示すように、ラインレーザにより対象部材に照射したレーザ光を、対象物に対して視角の異なるカメラにより撮像することにより高さデータを得る。この際、図33に示すように、カメラにより撮像される画像におけるレーザ光は高さによってその位置が異なる。この位置の違いによって、対象部材の高さを測定することが可能となる。次に、例えば、高さ画像に対するテンプレートマッチングのような画像処理により面内方向の位置が検出され、この検出位置から着目する領域中の高さデータが抽出されることにより、面外方向の位置が検出される。   Conventionally, as a technique for measuring the three-dimensional position of a member, measurement using a height sensor such as an optical cutting method is known. The measurement by the height sensor generates a height image showing the height in the out-of-plane direction in the in-plane direction based on the height data obtained by the height sensor for the target member as shown in FIG. To do. Specifically, as shown in FIG. 32, the height sensor obtains height data by imaging laser light irradiated to the target member with a line laser with a camera having a different viewing angle with respect to the target. At this time, as shown in FIG. 33, the position of the laser light in the image picked up by the camera differs depending on the height. This height difference makes it possible to measure the height of the target member. Next, for example, the position in the in-plane direction is detected by image processing such as template matching for the height image, and the height data in the region of interest is extracted from the detected position, thereby the position in the out-of-plane direction. Is detected.

しかし、高さセンサによる測定は、対象部材に対する高さセンサの走査速度のムラや、数画素分の重心演算などにより、面内方向の位置精度が悪いという問題がある。これに対し、高さセンサによる部材の3次元位置の測定技術として、測定する部材に対して、さらに高さ画像用のテンプレートを用意し、高さ画像中から着目領域をサーチする技術が知られている(例えば、特許文献1参照)。   However, the measurement by the height sensor has a problem in that the positional accuracy in the in-plane direction is poor due to unevenness in the scanning speed of the height sensor with respect to the target member or the center of gravity calculation for several pixels. On the other hand, as a technique for measuring the three-dimensional position of a member by a height sensor, a technique for preparing a template for a height image for a member to be measured and searching for a region of interest from the height image is known. (For example, refer to Patent Document 1).

特開平02−150704号公報Japanese Patent Laid-Open No. 02-150704

しかしながら、特許文献1によれば、面内方向と面外方向との位置検出のそれぞれにテンプレートが必要となることにより、テンプレートを作成する負担が増加し、測定に係る処理が煩雑となるという問題がある。   However, according to Patent Document 1, since a template is required for each of the position detection in the in-plane direction and the out-of-plane direction, the burden of creating the template increases, and the processing related to measurement becomes complicated. There is.

本発明は上述した問題点を解決するためになされたものであり、部材の3次元位置の測定に係る煩雑さを軽減させることができる測定方法、測定装置及び測定制御プログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a measurement method, a measurement apparatus, and a measurement control program that can reduce the complexity of measuring the three-dimensional position of a member. And

上述した課題を解決するため、測定方法は、平面に載置された対象部材をカメラにより撮像し、撮像した撮像画像を取得し、取得した撮像画像において、対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存し、前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出し、センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得し、取得した面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成し、生成した面外方向画像の縦横比を所定の比率に基づいて補正し、補正した面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出する。   In order to solve the above-described problem, the measurement method includes imaging a target member placed on a plane with a camera, acquiring the captured image, and specifying the region including the target member in the acquired captured image. Is stored in a memory as a first template, and an in-plane direction position that is a position of the surface of the target member facing the camera is detected based on matching between the first template and the captured image, and a sensor To obtain out-of-plane direction position data in each of the two-dimensional arrays in the in-plane direction, and express the out-of-plane direction position data in each of the two-dimensional arrays by pixel values based on the obtained out-of-plane direction position data. An out-of-plane direction image is generated, the aspect ratio of the generated out-of-plane direction image is corrected based on a predetermined ratio, and the corrected out-of-plane direction image and the first template are corrected. Based on the matching of the detects the plane position of the target member.

また、測定装置は、平面上に載置された対象部材を撮像するカメラと、前記平面に対する高さを検出する面外方向センサと、前記カメラにより撮像された撮像画像を取得する第1取得部と、前記第1取得部により取得された撮像画像において前記対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存する保存部と、前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出する第1検出部と、前記面外方向センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得する第2取得部と、前記第2取得部により取得された面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成する画像生成部と、前記画像生成部により生成された面外方向画像の縦横比を所定の比率に基づいて補正する補正部と、前記補正部により補正された面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出する第2検出部とを備える。   In addition, the measuring apparatus includes a camera that captures an object member placed on a plane, an out-of-plane direction sensor that detects a height with respect to the plane, and a first acquisition unit that acquires a captured image captured by the camera. A storage unit that stores an image of a region specified as a region including the target member in the captured image acquired by the first acquisition unit in a memory as a first template, and the first template and the captured image A surface in each of the two-dimensional arrays in the in-plane direction by the first detection unit that detects an in-plane direction position that is a position of the surface facing the camera of the target member based on the matching and the out-of-plane direction sensor A second acquisition unit for acquiring outward direction position data, and an out-of-plane direction in each of the two-dimensional arrays based on the out-of-plane direction position data acquired by the second acquisition unit An image generation unit that generates an out-of-plane direction image that expresses position data with pixel values, a correction unit that corrects an aspect ratio of the out-of-plane direction image generated by the image generation unit based on a predetermined ratio, and the correction A second detection unit that detects a position of the target member in the out-of-plane direction based on matching between the out-of-plane direction image corrected by the unit and the first template.

また、測定制御プログラムは、平面上に載置された測定対象である対象部材を撮像するカメラと、前記対象部材の前記平面に対する高さである面外方向位置を検出する面外方向センサとを有する測定装置を制御する測定制御プログラムであって、前記カメラにより撮像された撮像画像を取得する第1取得ステップと、前記第1取得ステップにより取得された撮像画像において前記対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存する保存ステップと、前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出する第1検出ステップと、前記面外方向センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得する第2取得ステップと、前記第2取得ステップにより取得された面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成する画像生成ステップと、前記画像生成ステップにより生成された面外方向画像の縦横比を所定の比率に基づいて補正する補正ステップと、前記補正ステップにより補正された面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出する第2検出ステップとをコンピュータに実行させる   In addition, the measurement control program includes a camera that images a target member that is a measurement target placed on a plane, and an out-of-plane direction sensor that detects an out-of-plane direction position that is a height of the target member with respect to the plane. A measurement control program for controlling a measurement apparatus having a first acquisition step for acquiring a captured image captured by the camera, and a region including the target member in the captured image acquired by the first acquisition step An in-plane direction that is a position of a surface of the target member facing the camera based on a storage step of storing an image of the region that has been stored in a memory as a first template and matching between the first template and the captured image A first detection step for detecting a position, and an out-of-plane direction in each of the two-dimensional arrays in the in-plane direction by the out-of-plane direction sensor A second acquisition step of acquiring position data, and an out-of-plane direction expressing the out-of-plane direction position data in each of the two-dimensional arrays by pixel values based on the out-of-plane direction position data acquired by the second acquisition step An image generation step for generating an image; a correction step for correcting an aspect ratio of the out-of-plane direction image generated by the image generation step based on a predetermined ratio; the out-of-plane direction image corrected by the correction step; Based on matching with the first template, the computer executes a second detection step of detecting the position of the target member in the out-of-plane direction.

部材の3次元位置の測定に係る煩雑さを軽減させることができる。   The complexity of measuring the three-dimensional position of the member can be reduced.

本実施の形態に係る測定装置の構成を示す図である。It is a figure which shows the structure of the measuring apparatus which concerns on this Embodiment. 制御装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a control apparatus. 制御装置の機能構成を示す図である。It is a figure which shows the function structure of a control apparatus. 対象部材の3次元位置測定に係る制御装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the control apparatus which concerns on the three-dimensional position measurement of an object member. テンプレート画像作成処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a template image creation process. 画像センサによる撮像画像を示す図である。It is a figure which shows the picked-up image by an image sensor. 対象部材に対するROIを示す図である。It is a figure which shows ROI with respect to a target member. 対象部材のテンプレート画像を示す図である。It is a figure which shows the template image of an object member. 補正比率算出処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a correction ratio calculation process. 比率基準器に対するROIを示す図である。It is a figure which shows ROI with respect to a ratio reference | standard device. 比率基準画像を示す図である。It is a figure which shows a ratio reference | standard image. 高さデータを示す図である。It is a figure which shows height data. レーザ光のライン方向と、走査方向を示す図である。It is a figure which shows the line direction and scanning direction of a laser beam. 補正前の高さ画像を示す図である。It is a figure which shows the height image before correction | amendment. 推定比率による補正後の高さ画像を示す図である。It is a figure which shows the height image after correction | amendment by an estimated ratio. 高さ画像と比率基準画像のマッチングを示す図である。It is a figure which shows the matching of a height image and a ratio reference | standard image. 相関値を算出する式を示す図である。It is a figure which shows the type | formula which calculates a correlation value. 比率基準器の水平方向の距離を示す図である。It is a figure which shows the distance of the horizontal direction of a ratio reference | standard device. 水平方向の距離L1を算出する式を示す図である。It is a figure which shows the type | formula which calculates the distance L1 of a horizontal direction. 比率基準器の垂直方向の距離を示す図である。It is a figure which shows the distance of the perpendicular direction of a ratio reference | standard device. 垂直方向の距離L2を算出する式を示す図である。It is a figure which shows the type | formula which calculates the distance L2 of a perpendicular direction. 面内方向位置検出処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of an in-plane direction position detection process. 画像センサによる画像に対するテンプレート画像によるマッチング処理を示す図である。It is a figure which shows the matching process by the template image with respect to the image by an image sensor. 部材先端位置検出処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a member front-end | tip position detection process. 対象部材の先端に対するROIを示す図である。It is a figure which shows ROI with respect to the front-end | tip of a target member. Sobelフィルタに係る式を示す図である。It is a figure which shows the type | formula which concerns on a Sobel filter. 対象部材の先端の検出におけるエッジと垂直ラインを示す図である。It is a figure which shows the edge and vertical line in the detection of the front-end | tip of a target member. 面外方向位置検出処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of an out-of-plane direction position detection process. 高さ画像とテンプレート画像とのマッチングを示す図である。It is a figure which shows matching with a height image and a template image. コンピュータシステムを示す図である。It is a figure which shows a computer system. 対象部材を示す図である。It is a figure which shows an object member. 高さセンサの概要を示す図である。It is a figure which shows the outline | summary of a height sensor. 高さセンサの原理を示す図である。It is a figure which shows the principle of a height sensor.

以下、本発明の実施の形態について図面を参照しつつ説明する。   Embodiments of the present invention will be described below with reference to the drawings.

まず、本実施の形態に係る測定装置の構成について説明する。図1は、本実施の形態に係る測定装置の構成を示す図である。   First, the configuration of the measurement apparatus according to the present embodiment will be described. FIG. 1 is a diagram showing a configuration of a measuring apparatus according to the present embodiment.

図1に示すように、本実施の形態に係る測定装置1は、画像センサ10、高さセンサ11、直動ステージ12、制御装置13を備え、平面上に載置された部材の3次元位置を測定する。画像センサ10は、測定の対象である対象部材を、対象部材が載置された平面に対して垂直方向から撮像する。また、高さセンサ11は、ラインレーザとカメラを用いた光切断法により、載置された平面からの対象部材の高さ(面外方向位置)を測定する。なお、この高さセンサ11は、光切断法以外の方法により対象部材の高さを測定するものであっても良く、対象部材が載置される平面方向の走査により対象部材の高さを測定するものであれば構わない。また、直動ステージ12は、高さセンサ11による対象部材の高さ測定において、ラインレーザによる対象部材の走査を行うために、高さセンサ11を移動させる。また、制御装置13は、3次元位置の測定において、画像センサ10、高さセンサ11、直動ステージ12の制御と、3次元位置測定に係る処理を実行する。なお、本実施の形態に係る測定装置1は、3次元位置測定において、対象部材とともに比率基準器(直線パターン)を撮像及び走査する。この比率基準器は、後述する高さデータ(面外方向位置データ)に基づく高さ画像の縦横比の補正において、その比率の基準として用いられる。また、比率基準器は、水平方向及び垂直方向にその距離を算出可能に、特徴的な形状をもつ。本実施の形態においては、この特徴的な形状は十字形であり、この十字形において水平方向及び垂直方向の直線は互いに同距離である。また、この十字形は、画像センサ及び高さセンサによりその形状が読み取り可能なように、凹部、または凸部により表現される。   As shown in FIG. 1, a measuring apparatus 1 according to the present embodiment includes an image sensor 10, a height sensor 11, a linear motion stage 12, and a control device 13, and a three-dimensional position of a member placed on a plane. Measure. The image sensor 10 images a target member that is a measurement target from a direction perpendicular to a plane on which the target member is placed. In addition, the height sensor 11 measures the height (out-of-plane direction position) of the target member from the placed plane by an optical cutting method using a line laser and a camera. The height sensor 11 may measure the height of the target member by a method other than the light cutting method, and measures the height of the target member by scanning in the plane direction on which the target member is placed. It does n’t matter if you do. The linear motion stage 12 moves the height sensor 11 in order to scan the target member with a line laser in the height measurement of the target member by the height sensor 11. In addition, in the measurement of the three-dimensional position, the control device 13 executes control related to the control of the image sensor 10, the height sensor 11, and the linear motion stage 12, and the processing related to the three-dimensional position measurement. Note that the measuring apparatus 1 according to the present embodiment images and scans the ratio reference device (linear pattern) together with the target member in the three-dimensional position measurement. This ratio reference device is used as a reference for the ratio in the correction of the aspect ratio of the height image based on height data (out-of-plane direction position data) described later. Further, the ratio reference device has a characteristic shape so that the distance can be calculated in the horizontal direction and the vertical direction. In the present embodiment, this characteristic shape is a cross shape, and in this cross shape, straight lines in the horizontal direction and the vertical direction are the same distance from each other. The cross shape is expressed by a concave portion or a convex portion so that the shape can be read by the image sensor and the height sensor.

次に、制御装置のハードウェア構成及び機能構成について説明する。図2は、制御装置のハードウェア構成を示す図である。また、図3は、制御装置の機能構成を示す図である。   Next, the hardware configuration and functional configuration of the control device will be described. FIG. 2 is a diagram illustrating a hardware configuration of the control device. FIG. 3 is a diagram illustrating a functional configuration of the control device.

図2に示すように、制御装置13は、ハードウェアとして、CPU(Central Processing Unit)951、メモリ952を備える。また、図3に示すように制御装置13は、機能として、画像取得部(第1取得部)131、面内画像処理部(画像生成部、第1検出部)132、面内方向位置検出部(第1検出部)133、保存部134、高さデータ取得部(第2取得部)135、高さ画像生成部(画像生成部)136、面外画像処理部(補正部、第2検出部)137、面外方向位置検出部(第2検出部)138を備える。なお、これらの機能はCPU951により実現される。画像取得部131は、画像センサ10に対象部材及び比率基準器を撮像させ、撮像画像を取得する。また、面内画像処理部132は、撮像画像に基づいてテンプレート画像(第1テンプレート)を作成し、テンプレート画像によるマッチング処理を行う。また、面内方向位置検出部133は、面内画像処理部132によるマッチング処理により、対象部材の面内方向の位置を求める。また、高さデータ取得部135は、高さセンサ11に対象部材及び比率基準器の高さを測定させ、2次元上の高さを示す高さデータを取得する。また、高さ画像生成部136は、高さデータにおける2次元上の高さを輝度値に変換することで対象部材の高さが輝度により示される高さ画像を生成する。また、面外画像処理部137は、高さ画像の縦横比を補正するとともに、テンプレート画像によるマッチング処理を行う。また、面外方向位置検出部138は、補正された高さ画像に基づいて、対象部材の高さを検出する。   As illustrated in FIG. 2, the control device 13 includes a CPU (Central Processing Unit) 951 and a memory 952 as hardware. As shown in FIG. 3, the control device 13 functions as an image acquisition unit (first acquisition unit) 131, an in-plane image processing unit (image generation unit, first detection unit) 132, and an in-plane direction position detection unit. (First detection unit) 133, storage unit 134, height data acquisition unit (second acquisition unit) 135, height image generation unit (image generation unit) 136, out-of-plane image processing unit (correction unit, second detection unit) 137 and an out-of-plane direction position detection unit (second detection unit) 138. Note that these functions are realized by the CPU 951. The image acquisition unit 131 causes the image sensor 10 to image the target member and the ratio reference device, and acquires a captured image. The in-plane image processing unit 132 creates a template image (first template) based on the captured image, and performs matching processing using the template image. Further, the in-plane direction position detection unit 133 obtains the position of the target member in the in-plane direction by matching processing by the in-plane image processing unit 132. Further, the height data acquisition unit 135 causes the height sensor 11 to measure the height of the target member and the ratio reference device, and acquires height data indicating a two-dimensional height. In addition, the height image generation unit 136 generates a height image in which the height of the target member is indicated by luminance by converting the two-dimensional height in the height data into a luminance value. Further, the out-of-plane image processing unit 137 corrects the aspect ratio of the height image and performs matching processing using the template image. Further, the out-of-plane direction position detection unit 138 detects the height of the target member based on the corrected height image.

次に、本実施の形態に係る測定装置による対象部材の3次元位置測定の動作について説明する。図4は、対象部材の3次元位置測定に係る制御装置の動作を示すフローチャートである。なお、図4に示す各処理の動作の詳細については後述する。   Next, the operation of measuring the three-dimensional position of the target member by the measuring apparatus according to the present embodiment will be described. FIG. 4 is a flowchart illustrating the operation of the control device according to the three-dimensional position measurement of the target member. Details of the operation of each process shown in FIG. 4 will be described later.

図4に示すように、まず、制御装置13は、3次元位置測定に係るテンプレート画像を作成するテンプレート画像作成処理を実行し(S101)、次に、作成したテンプレート画像を用いて、高さ画像の縦横比を補正するための比率を算出する補正比率算出処理を実行する(S102)。次に、制御装置13は、対象部材の面内方向位置を検出する面内方向位置検出処理を実行し(S103)、対象部材の面外方向位置を検出する面外方向位置検出処理を実行し(S104)、対象部材に係る全測定が終了したかどうかを判断する(S105)。   As shown in FIG. 4, first, the control device 13 executes a template image creation process for creating a template image related to three-dimensional position measurement (S101), and then uses the created template image to create a height image. A correction ratio calculation process for calculating a ratio for correcting the aspect ratio is executed (S102). Next, the control device 13 executes in-plane direction position detection processing for detecting the in-plane direction position of the target member (S103), and executes out-of-plane direction position detection processing for detecting the out-of-plane direction position of the target member. (S104), it is determined whether or not all measurements related to the target member have been completed (S105).

対象部材に係る全測定が終了した場合(S105,YES)、制御装置13は、3次元位置測定を終了する。   When all the measurements related to the target member are completed (S105, YES), the control device 13 ends the three-dimensional position measurement.

一方、対象部材に係る全測定が終了していない場合、つまり、指定された他の測定が存在する場合(S105,NO)、制御装置13は、再度、面内方向位置検出処理を実行する(S103)。   On the other hand, when all the measurements related to the target member are not completed, that is, when there is another designated measurement (S105, NO), the control device 13 executes the in-plane direction position detection process again (S105). S103).

次に、テンプレート画像作成処理について説明する。図5は、テンプレート画像作成処理の動作を示すフローチャートである。また、図6は、画像センサによる撮像画像を示す図である。また、図7は、対象部材に対するROIを示す図である。また、図8は、対象部材のテンプレート画像を示す図である。以下、図5に示す動作を、図6〜8を参照しつつ説明する。   Next, template image creation processing will be described. FIG. 5 is a flowchart showing the operation of the template image creation process. FIG. 6 is a diagram illustrating an image captured by the image sensor. FIG. 7 is a diagram showing the ROI for the target member. FIG. 8 is a diagram showing a template image of the target member. Hereinafter, the operation shown in FIG. 5 will be described with reference to FIGS.

制御装置13の画像取得部131は、図6に示すように、画像センサ10に対象部材及び比率基準器を撮像させ、その撮像画像を取得する(S201、第1取得ステップ)。次に、面内画像処理部132は、撮像画像において、図7に示すように対象部材を囲むように設定されたROI(Region of Interest)内の画像を、図8に示すようなテンプレート画像としてメモリ952に保存し(S202、保存ステップ)、テンプレート画像作成処理を終了する。なお、撮像画像に設定されるROIは、手動により設定される。   As illustrated in FIG. 6, the image acquisition unit 131 of the control device 13 causes the image sensor 10 to image the target member and the ratio reference device, and acquires the captured image (S201, first acquisition step). Next, the in-plane image processing unit 132 converts the image in the ROI (Region of Interest) set so as to surround the target member as shown in FIG. 7 as a template image as shown in FIG. The data is stored in the memory 952 (S202, storage step), and the template image creation process is terminated. Note that the ROI set for the captured image is set manually.

次に、補正比率算出処理について説明する。図9は補正比率算出処理の動作を示すフローチャートである。また、図10は、比率基準器に対するROIを示す図である。また、図11は、比率基準画像を示す図である。また、図12は、高さデータを示す図である。また、図13は、レーザ光のライン方向と、走査方向を示す図である。また、図14は、補正前の高さ画像を示す図である。また、図15は、推定比率による補正後の高さ画像を示す図である。また、図16は、高さ画像と比率基準画像のマッチングを示す図である。また、図17は、相関値を算出する式を示す図である。また、図18は、比率基準器の水平方向の距離を示す図である。また、図19は、水平方向の距離L1を算出する式を示す図である。また、図20は、比率基準器の垂直方向の距離を示す図である。また、図21は、垂直方向の距離L2を算出する式を示す図である。以下、図9に示す動作を、図10〜21を参照しつつ説明する。   Next, the correction ratio calculation process will be described. FIG. 9 is a flowchart showing the operation of the correction ratio calculation process. FIG. 10 is a diagram showing an ROI for the ratio reference unit. FIG. 11 is a diagram showing a ratio reference image. FIG. 12 is a diagram showing height data. FIG. 13 is a diagram showing the line direction of the laser beam and the scanning direction. FIG. 14 is a diagram showing a height image before correction. FIG. 15 is a diagram illustrating a height image after correction based on the estimated ratio. FIG. 16 is a diagram showing matching between the height image and the ratio reference image. FIG. 17 is a diagram illustrating an equation for calculating a correlation value. Moreover, FIG. 18 is a figure which shows the distance of the horizontal direction of a ratio reference | standard device. FIG. 19 is a diagram illustrating an equation for calculating the horizontal distance L1. FIG. 20 is a diagram illustrating the distance in the vertical direction of the ratio reference device. FIG. 21 is a diagram showing an equation for calculating the distance L2 in the vertical direction. Hereinafter, the operation shown in FIG. 9 will be described with reference to FIGS.

まず、制御装置13の面内画像処理部132は、図10に示すように、撮像画像において、比率基準器を囲むように設定されたROI内の画像を、図11に示すような比率基準画像(第2テンプレート)としてメモリ952に保存する(S301、保存ステップ)。次に、高さデータ取得部135は、高さセンサ11に対象部材及び比率基準器の高さを測定させ、対象部材の面内方向に相当する2次元配列において、配列のそれぞれが対象部材の高さを示す高さデータを取得する(S302、第2取得ステップ)。この高さデータは、図12に示すように、対象部材が載置された平面を2次元配列とし、その配列のそれぞれにおける高さを示すデータである。   First, as shown in FIG. 10, the in-plane image processing unit 132 of the control device 13 converts an image in the ROI that is set to surround the ratio reference unit in the captured image into a ratio reference image as shown in FIG. 11. It is stored in the memory 952 as (second template) (S301, storage step). Next, the height data acquisition unit 135 causes the height sensor 11 to measure the height of the target member and the ratio reference device, and in the two-dimensional array corresponding to the in-plane direction of the target member, each of the arrays is the target member. Height data indicating the height is acquired (S302, second acquisition step). As shown in FIG. 12, this height data is data indicating the height in each of the two-dimensional arrays on the plane on which the target member is placed.

次に、高さ画像生成部136は、高さデータに基づいて、高さ画像を生成する(S303、画像生成ステップ)。ここで、高さ画像について説明する。この高さ画像は、図13に示すように、レーザ光のライン方向をm、走査方向をnとし、ある点における高さをH(m,n)とし、高さの最小値をHmin、高さの最大値をHmaxとした場合、ある点の画素値I(m,n)は、以下の式により求められる。
I(m,n)=255×(H(m,n)−Hmin)/(Hmax−Hmin)
Next, the height image generation unit 136 generates a height image based on the height data (S303, image generation step). Here, the height image will be described. As shown in FIG. 13, the height image has a laser beam line direction of m, a scanning direction of n, a height at a certain point of H (m, n), a minimum height value of Hmin, When the maximum value is Hmax, the pixel value I (m, n) at a certain point is obtained by the following equation.
I (m, n) = 255 × (H (m, n) −Hmin) / (Hmax−Hmin)

この式に示すように線形補間されることにより、高さデータから高さ画像が生成される。なお、この式によれば、高さデータは、256階調の白黒濃淡画像に変換される。つまり、高さデータは、面内方向の2次元配列における面外方向位置が0〜255で示される1つのパラメータ(画素値)により示される画像に変換される。   By performing linear interpolation as shown in this equation, a height image is generated from the height data. According to this equation, the height data is converted into a black and white image with 256 gradations. That is, the height data is converted into an image indicated by one parameter (pixel value) in which the out-of-plane direction position in the two-dimensional array in the in-plane direction is indicated by 0 to 255.

高さ画像生成部136により高さ画像が生成されると、面外画像処理部137は、推定比率cEST(所定の比率)を用いて、図14に示すような高さ画像の縦横比を補正する(S304、補正ステップ)。具体的には、縦の画素数をm、横の画素数をnとした場合、走査方向であるnに対して推定比率cESTを乗算する。   When the height image is generated by the height image generation unit 136, the out-of-plane image processing unit 137 corrects the aspect ratio of the height image as shown in FIG. 14 using the estimated ratio cEST (predetermined ratio). (S304, correction step). Specifically, assuming that the number of vertical pixels is m and the number of horizontal pixels is n, n that is the scanning direction is multiplied by the estimated ratio cEST.

次に、面外画像処理部137は、図15に示すような補正後の高さ画像上で、比率基準画像を走査させるマッチング処理により、比率基準器を検出する(S305、補正ステップ)。ここでマッチング処理について説明する。このマッチング処理は、図16に示すように、走査する画像(比率基準画像)をM、被検出対象である画像(高さ画像)をIとした場合、MとIを比較することによりIからMを検出する。具体的には、マッチング処理は、Iの画素をI(i,j)、Mの画素をM(i,j)とした場合、図17に示す式により相関値k(a,b)を求め、その相関値が画像Iにおいて最大になるようなMの位置を決定する。なお、ここでa,bは、画像Mの走査量を示しており、a,bが1画素ずつシフトされることにより、画像Iの各位置における画像Iに対するMの相関値が求められる。   Next, the out-of-plane image processing unit 137 detects the ratio reference device by matching processing for scanning the ratio reference image on the corrected height image as shown in FIG. 15 (S305, correction step). Here, the matching process will be described. As shown in FIG. 16, this matching processing is performed by comparing M with I and M from I when an image to be scanned (ratio reference image) is M and an image to be detected (height image) is I. M is detected. Specifically, in the matching process, when the I pixel is I (i, j) and the M pixel is M (i, j), the correlation value k (a, b) is obtained by the equation shown in FIG. The position of M is determined such that the correlation value becomes maximum in the image I. Here, a and b indicate the scanning amount of the image M, and a correlation value of M with respect to the image I at each position of the image I is obtained by shifting a and b by one pixel.

なお、面外画像処理部137は、画像Iに対するMの相関値が最も高くなるように、推定比率cESTを変えることも可能である。以下、推定比率の最適化について説明する。まず、面外画像処理部137は、推定比率を0.9,0.8,0.7,…というように複数段階に設定し、それぞれの推定比率により高さ画像を補正する。次に、面外画像処理部137は、それぞれの推定比率により補正された高さ画像に対して上述したマッチング処理を行い、最も相関値が高くなる高さ画像の推定比率を最適な推定比率とする。なお、ある推定比率(例えば0.6)が最適比率になった場合、その推定比率を0.51,0.52,0.53,…というようにさらに細かく複数段階に設定しても良い。この場合、面外画像処理部137は、相関値が高くなるように画像Iの比率の補正と、画像Mとのマッチング処理を繰り返す。このように、さらに最適な推定比率を求めることで、縦横比の精度がより高くなるように高さ画像を補正することが可能となる。   Note that the out-of-plane image processing unit 137 can also change the estimated ratio cEST so that the correlation value of M with respect to the image I becomes the highest. Hereinafter, optimization of the estimation ratio will be described. First, the out-of-plane image processing unit 137 sets the estimation ratio in a plurality of stages such as 0.9, 0.8, 0.7,... And corrects the height image with each estimation ratio. Next, the out-of-plane image processing unit 137 performs the above-described matching processing on the height images corrected by the respective estimation ratios, and sets the estimation ratio of the height image having the highest correlation value as the optimum estimation ratio. To do. When a certain estimated ratio (for example, 0.6) becomes the optimum ratio, the estimated ratio may be set in more detailed steps such as 0.51, 0.52, 0.53,. In this case, the out-of-plane image processing unit 137 repeats the correction of the ratio of the image I and the matching process with the image M so that the correlation value becomes high. In this way, by obtaining a further optimal estimation ratio, it is possible to correct the height image so that the accuracy of the aspect ratio becomes higher.

次に、面外画像処理部137は、図18に示すように、補正後の高さ画像上における比率基準器における十字形の水平方向の直線の左右の先端点C,Dを検出する(S306)。具体的には、面外画像処理部137は、十字形の水平方向の直線に沿って、隣接する2つの画素の輝度差を算出し、所定のしきい値Ithと比較することにより、十字形の左右の先端点の位置C(imaxC,jmaxC),D(imaxD,jmaxD)を検出する。ここで、面外画像処理部137は、十字形の水平方向と垂直方向の直線の交点の座標を(x,y)とし、直線の傾きをa1とした場合、点C,Dを結ぶ直線L1をy=a1・xと定義する。なお、ここでxは、高さセンサの走査方向、yはレーザのライン方向を示す。この場合、先端点は|I(x,a1・x)−I(x+1,a1・x+1)|>Ithとなる点である。次に、面外画像処理部137は、点C,D間の直線距離L1を算出する(S307)。具体的に、距離L1は、図19に示す式により求められる。   Next, as shown in FIG. 18, the out-of-plane image processing unit 137 detects the left and right tip points C and D of the cross-shaped horizontal straight line in the ratio reference device on the height image after correction (S306). ). Specifically, the out-of-plane image processing unit 137 calculates a luminance difference between two adjacent pixels along a horizontal line of the cross shape, and compares it with a predetermined threshold value Ith to thereby calculate a cross shape. The positions C (imaxC, jmaxC) and D (imaxD, jmaxD) of the left and right tip points are detected. Here, the out-of-plane image processing unit 137 has a line L1 connecting the points C and D when the coordinates of the intersection of the horizontal lines and the vertical lines of the cross shape are (x, y) and the inclination of the line is a1. Is defined as y = a1 · x. Here, x represents the scanning direction of the height sensor, and y represents the line direction of the laser. In this case, the tip point is a point where | I (x, a1 · x) −I (x + 1, a1 · x + 1) |> Ith. Next, the out-of-plane image processing unit 137 calculates a linear distance L1 between the points C and D (S307). Specifically, the distance L1 is obtained by the equation shown in FIG.

次に、面外画像処理部137は、図20に示すように、補正後の高さ画像上における比率基準器における十字形の垂直方向の直線の左右の先端点E,Fを検出する(S308)。具体的には、面外画像処理部137は、点C,Dと同様に、十字形の垂直方向の直線に沿って、隣接する2つの画素の輝度差を算出し、所定のしきい値Ithと比較することにより、十字形の左右の先端点の位置E(imaxE,jmaxE),F(imaxF,jmaxF)を検出する。ここで、面外画像処理部137は、点E,Fを結ぶ直線L2の傾きをa2とした場合、直線L2をy=a2・xと定義する。この場合、先端点は|I(x,a2・x)−I(x+1,a2・x+1)|>Ithとなる点である。次に、面外画像処理部137は、点E,F間の直線距離L2を算出する(S309)。具体的に、距離L2は、図21に示す式により求められる。   Next, as shown in FIG. 20, the out-of-plane image processing unit 137 detects the left and right tip points E and F of the cross-shaped vertical straight line in the ratio reference device on the height image after correction (S308). ). Specifically, the out-of-plane image processing unit 137 calculates the luminance difference between two adjacent pixels along the vertical line of the cross like the points C and D, and calculates a predetermined threshold value Ith. , The positions E (imaxE, jmaxE) and F (imaxF, jmaxF) of the left and right tip points of the cross shape are detected. Here, the out-of-plane image processing unit 137 defines the straight line L2 as y = a2 · x, where a2 is the slope of the straight line L2 connecting the points E and F. In this case, the tip point is a point where | I (x, a2 · x) −I (x + 1, a2 · x + 1) |> Ith. Next, the out-of-plane image processing unit 137 calculates a linear distance L2 between the points E and F (S309). Specifically, the distance L2 is obtained by the equation shown in FIG.

補正後の高さ画像上において、十字形の水平、垂直方向の距離を求めると、面外画像処理部137は、これらの距離に基づいて、補正比率cを算出する(S310)。この補正比率cは、L1とL2が一致すれば高さ画像の縦横比が画像センサ10により撮像された画像と同等となるため、c=cEST・L1/L2により求められる。   When the horizontal and vertical distances of the cross are obtained on the corrected height image, the out-of-plane image processing unit 137 calculates a correction ratio c based on these distances (S310). The correction ratio c is obtained by c = cEST · L1 / L2 since the aspect ratio of the height image is equivalent to the image captured by the image sensor 10 when L1 and L2 match.

次に、面内方向位置検出処理について説明する。図22は、面内方向位置検出処理の動作を示すフローチャートである。また、図23は、画像センサによる画像に対するテンプレート画像によるマッチング処理を示す図である。   Next, the in-plane direction position detection process will be described. FIG. 22 is a flowchart showing the operation of the in-plane direction position detection process. FIG. 23 is a diagram illustrating matching processing using a template image with respect to an image by the image sensor.

図22に示すように、まず、画像取得部131は、画像センサ10に対象部材及び比率基準器を撮像させ、その撮像画像を取得する(S401)。次に、面内画像処理部132は、テンプレート画像と撮像画像とのマッチング処理を行う(S402、第1検出ステップ)。   As shown in FIG. 22, first, the image acquisition unit 131 causes the image sensor 10 to image the target member and the ratio reference device, and acquires the captured image (S401). Next, the in-plane image processing unit 132 performs matching processing between the template image and the captured image (S402, first detection step).

次に、面内方向位置検出部133は、対象部材の先端位置を検出する部材先端位置検出処理を実行し(S403、第1検出ステップ)、3次元位置測定を行っている対象部材が、1個目の部材であるかどうかを判断する(S404)。なお、部材先端位置検出処理については後述する。   Next, the in-plane direction position detection unit 133 performs a member tip position detection process for detecting the tip position of the target member (S403, first detection step), and the target member performing the three-dimensional position measurement is 1 It is determined whether the member is a member (S404). The member tip position detection process will be described later.

対象部材が1個目の部材である場合(S404,YES)、面内方向位置検出部133は、部材先端位置検出処理により検出された対象部材の先端位置を基準位置として登録する(S405、第1検出ステップ)。なお、対象部材の先端位置を検出する必要がなく、部材先端位置検出処理が行われない場合、面内方向位置検出部133は、テンプレート画像と撮像画像とのマッチング処理において、その相関値が最も高いテンプレート画像の重心位置を、撮像画像における対象部材の位置とする。   When the target member is the first member (S404, YES), the in-plane direction position detection unit 133 registers the tip position of the target member detected by the member tip position detection process as the reference position (S405, No. 1). 1 detection step). When it is not necessary to detect the tip position of the target member and the member tip position detection process is not performed, the in-plane direction position detection unit 133 has the highest correlation value in the matching process between the template image and the captured image. The position of the center of gravity of the high template image is set as the position of the target member in the captured image.

一方、対象部材が1個目の部材ではない場合(S404,NO)、面内方向位置検出部133は、部材先端位置検出処理により検出された対象部材の先端位置の基準位置からの相対的な位置を算出する(S406)。このように、対象部材が複数ある場合、その相対的な位置関係を算出することにより、例えば、複数部材からなる部品の検査、調整を行うことができる。   On the other hand, when the target member is not the first member (NO in S404), the in-plane direction position detection unit 133 makes the relative position from the reference position of the tip position of the target member detected by the member tip position detection processing. The position is calculated (S406). In this way, when there are a plurality of target members, by calculating the relative positional relationship, for example, it is possible to inspect and adjust a component made up of a plurality of members.

次に、部材先端位置検出処理について説明する。図24は、部材先端位置検出処理の動作を示すフローチャートである。また、図25は、対象部材の先端に対するROIを示す図である。また、図26は、Sobelフィルタに係る式を示す図である。また、図27は、対象部材の先端の検出におけるエッジと垂直ラインを示す図である。以下、図24に示す動作を、図25〜27を参照しつつ説明する。   Next, the member tip position detection process will be described. FIG. 24 is a flowchart showing the operation of the member tip position detection process. FIG. 25 is a diagram showing an ROI with respect to the tip of the target member. FIG. 26 is a diagram illustrating an expression relating to the Sobel filter. FIG. 27 is a diagram showing edges and vertical lines in detection of the tip of the target member. The operation shown in FIG. 24 will be described below with reference to FIGS.

まず、面内方向位置検出部133は、対象部材の先端部を含む部分に設定されたROIであるRdst内の画像を抽出し(S501)、抽出した画像に対して、Sobelフィルタを用いて対象部材のエッジを抽出する(S502)。具体的には、面内方向位置検出部133は、着目する画素(i,j)の上下左右9画素からなる行列と、図26の式1に示す行列との積fA、式2に示す行列との積fBをそれぞれ算出する。さらに、面内方向位置検出部133は、式3に示すように、fAとfBとの二乗和の平方を画素値として用いることにより、画像におけるエッジが検出される。 First, the in-plane direction position detection unit 133 extracts an image in Rdst, which is an ROI set in a portion including the tip of the target member (S501), and uses the Sobel filter for the extracted image. The edge of the member is extracted (S502). Specifically, the in-plane direction position detection unit 133 represents the product f A of a matrix composed of nine pixels in the vertical and horizontal directions of the pixel of interest (i, j) and the matrix shown in Equation 1 in FIG. Each product f B with the matrix is calculated. Further, as shown in Expression 3, the in-plane direction position detection unit 133 uses the square of the square sum of f A and f B as a pixel value to detect an edge in the image.

次に、面内方向位置検出部133は、図27に示すように、垂直方向の直線により、検出されたエッジを走査し(S503)、この直線と上方のエッジとの交点の点列を取得する(S504)。次に、面内方向位置検出部133は、取得した点列に対して、最小二乗法を適用し、上辺の直線の式を算出する(S505)。さらに、面内方向位置検出部133は、上方のエッジと同様に、垂直方向の直線と下方のエッジとの交点の点列を取得し(S506)、取得した点列に対して、最小二乗法を適用し、下辺の直線の式を算出する(S507)。   Next, as shown in FIG. 27, the in-plane direction position detection unit 133 scans the detected edge with a straight line in the vertical direction (S503), and obtains a point sequence of the intersection of this straight line and the upper edge. (S504). Next, the in-plane direction position detection unit 133 applies the least square method to the acquired point sequence and calculates an upper straight line equation (S505). Further, the in-plane direction position detection unit 133 acquires a point sequence of intersection points between the straight line in the vertical direction and the lower edge in the same manner as the upper edge (S506), and the least square method is performed on the acquired point sequence. Is applied to calculate the equation of the lower straight line (S507).

次に、面内方向位置検出部133は、点列に基づいて算出した2本の直線の中央を通る直線を中央線として算出し(S508)、この中央線と対象部材のエッジとの交点を部材先端位置として検出する(S509)。   Next, the in-plane direction position detection unit 133 calculates a straight line passing through the center of the two straight lines calculated based on the point sequence as a central line (S508), and calculates the intersection of the central line and the edge of the target member. It detects as a member tip position (S509).

このように、対象部材の先端位置を検出することによって、例えば、この先端位置と高さ画像とを対応付けて、先端位置の高さを得ることができる。なお、先端位置の検出において、垂直方向の直線によりエッジを走査したが、例えば、エッジの方向が垂直方向に近い場合は、水平方向の直線によりエッジが検出される。つまり、先端位置の検出において、エッジの走査する直線は、エッジの方向に応じて、水平方向、または垂直方向となる。   Thus, by detecting the tip position of the target member, for example, the tip position can be associated with the height image to obtain the height of the tip position. In detecting the tip position, the edge is scanned with a straight line in the vertical direction. For example, when the edge direction is close to the vertical direction, the edge is detected with a straight line in the horizontal direction. That is, in detecting the tip position, the straight line scanned by the edge is the horizontal direction or the vertical direction depending on the direction of the edge.

次に、面外方向位置検出処理について説明する。図28は、面外方向位置検出処理の動作を示すフローチャートである。また、図29は、高さ画像とテンプレート画像とのマッチングを示す図である。   Next, the out-of-plane direction position detection process will be described. FIG. 28 is a flowchart showing the operation of the out-of-plane direction position detection process. FIG. 29 is a diagram showing matching between a height image and a template image.

まず、高さデータ取得部135は、高さセンサ11に対象部材及び比率基準器を走査させ、高さデータを取得する(S601、第2取得ステップ)。次に、高さ画像生成部136は、高さデータに基づいて高さ画像を生成する(S602、生成ステップ)。   First, the height data acquisition unit 135 causes the height sensor 11 to scan the target member and the ratio reference device to acquire height data (S601, second acquisition step). Next, the height image generation unit 136 generates a height image based on the height data (S602, generation step).

次に、面外画像処理部137は、補正比率cを用いて、高さ画像の縦横比を補正し(S603、補正ステップ)、補正した高さ画像に対して、図29に示すように、テンプレート画像を用いてマッチング処理を行い、高さ画像における対象部材の領域を検出する(S604、第2検出ステップ)。   Next, the out-of-plane image processing unit 137 corrects the aspect ratio of the height image using the correction ratio c (S603, correction step). As shown in FIG. Matching processing is performed using the template image, and the region of the target member in the height image is detected (S604, second detection step).

次に、面外方向位置検出部138は、高さ画像における対象部材に該当する高さデータから、面外方向の位置を検出する(S605、第2検出ステップ)。具体的には、面外方向位置検出部138は、テンプレート画像と相関値が最も高い領域のうち、その高さが所定以上の領域の高さのデータの平均値を算出し、この平均値を対象部材の面外方向の位置とする。   Next, the out-of-plane direction position detection unit 138 detects a position in the out-of-plane direction from the height data corresponding to the target member in the height image (S605, second detection step). Specifically, the out-of-plane direction position detection unit 138 calculates the average value of the data of the height of the region having the highest correlation value with the template image and calculates the average value. The position in the out-of-plane direction of the target member.

上述したように、本実施の形態に係る測定装置1は、対象部材に対し、面内方向位置を画像センサ10により撮像された撮像画像に基づいて検出し、面外方向位置を高さセンサ11により走査された高さデータに基づいて検出する。また、本実施の形態によれば、画像センサ10による画像と、高さセンサ11による高さ画像とに対して、同じテンプレート画像を用いてマッチング処理を行うため、3次元位置測定に係る煩雑さを低減することができる。また、対象部材とともに、縦横比の基準となる比率基準器を撮像及び走査対象とすることにより、高さ画像の縦横比の補正の精度を向上させることができる。   As described above, the measuring apparatus 1 according to the present embodiment detects the in-plane direction position of the target member based on the captured image captured by the image sensor 10 and the out-of-plane direction position as the height sensor 11. Is detected based on the height data scanned by. Further, according to the present embodiment, since the matching process is performed using the same template image for the image by the image sensor 10 and the height image by the height sensor 11, the complexity associated with the three-dimensional position measurement is complicated. Can be reduced. Moreover, the accuracy of the correction of the aspect ratio of the height image can be improved by using the ratio reference device as a reference of the aspect ratio as an imaging and scanning object together with the target member.

本発明は以下に示すようなコンピュータシステムにおいて適用可能である。図30は、本発明が適用されるコンピュータシステムの一例を示す図である。図30に示す制御装置としてのコンピュータシステム13は、CPUやディスクドライブ等を内蔵した本体部901、本体部901からの指示により画像を表示するディスプレイ902、コンピュータシステム13に種々の情報を入力するためのキーボード903、ディスプレイ902の表示画面902a上の任意の位置を指定するマウス904及び外部のデータベース等にアクセスして他のコンピュータシステムに記憶されているプログラム等をダウンロードする通信装置905を有する。通信装置905は、ネットワーク通信カード、モデムなどが考えられる。   The present invention can be applied to the following computer system. FIG. 30 is a diagram illustrating an example of a computer system to which the present invention is applied. A computer system 13 as a control device shown in FIG. 30 is used to input various information to a main body 901 incorporating a CPU, a disk drive, and the like, a display 902 that displays an image according to an instruction from the main body 901, and the computer system 13. A keyboard 903, a mouse 904 for designating an arbitrary position on the display screen 902a of the display 902, and a communication device 905 for accessing an external database or the like and downloading a program or the like stored in another computer system. The communication device 905 may be a network communication card, a modem, or the like.

また、上述したような、制御装置を構成するコンピュータシステムにおいて上述した各ステップを実行させるプログラムを、測定制御プログラムとして提供することができる。このプログラムは、コンピュータシステムにより読取り可能な記録媒体に記憶させることによって、制御装置を構成するコンピュータシステムに実行させることが可能となる。上述した各ステップを実行するプログラムは、ディスク910等の可搬型記録媒体に格納されるか、通信装置905により他のコンピュータシステムの記録媒体906からダウンロードされる。また、コンピュータシステム13に少なくとも測定機能を持たせる測定制御プログラム(測定ソフトウェア)は、コンピュータシステム13に入力されてコンパイルされる。このプログラムは、コンピュータシステム13を測定機能を有する制御装置として動作させる。また、このプログラムは、例えばディスク910等のコンピュータ読み取り可能な記録媒体に格納されていても良い。ここで、コンピュータシステム13により読取り可能な記録媒体としては、ROMやRAM等のコンピュータに内部実装される内部記憶装置、ディスク910やフレキシブルディスク、DVDディスク、光磁気ディスク、ICカード等の可搬型記憶媒体や、コンピュータプログラムを保持するデータベース、或いは、他のコンピュータシステム並びにそのデータベースや、通信装置905のような通信手段を介して接続されるコンピュータシステムでアクセス可能な各種記録媒体を含む。   Moreover, the program which performs each step mentioned above in the computer system which comprises a control apparatus as mentioned above can be provided as a measurement control program. By storing this program in a recording medium that can be read by the computer system, the program can be executed by the computer system constituting the control device. A program for executing the above steps is stored in a portable recording medium such as a disk 910 or downloaded from a recording medium 906 of another computer system by the communication device 905. Further, a measurement control program (measurement software) that causes the computer system 13 to have at least a measurement function is input to the computer system 13 and compiled. This program causes the computer system 13 to operate as a control device having a measurement function. Further, this program may be stored in a computer-readable recording medium such as a disk 910, for example. Here, as a recording medium readable by the computer system 13, portable storage such as an internal storage device such as a ROM or a RAM, a disk 910, a flexible disk, a DVD disk, a magneto-optical disk, an IC card, etc. It includes a medium, a database holding a computer program, or other computer systems and the database, and various recording media accessible by a computer system connected via communication means such as a communication device 905.

1 測定装置、10 画像センサ、11 高さセンサ、12 直動ステージ、13 制御装置、131 画像取得部、132 面内画像処理部、133 面内方向位置検出部、134 保存部、135 高さデータ取得部、136 高さ画像生成部、137 面外画像処理部、138 面外方向位置検出部、951 CPU、952 メモリ。   DESCRIPTION OF SYMBOLS 1 Measuring apparatus, 10 Image sensor, 11 Height sensor, 12 Linear motion stage, 13 Control apparatus, 131 Image acquisition part, 132 In-plane image processing part, 133 In-plane direction position detection part, 134 Storage part, 135 Height data Acquisition unit, 136 height image generation unit, 137 out-of-plane image processing unit, 138 out-of-plane direction position detection unit, 951 CPU, 952 memory.

Claims (5)

平面に載置された対象部材をカメラにより撮像し、
撮像した撮像画像を取得し、
取得した撮像画像において、対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存し、
前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出し、
センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得し、
取得した面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成し、
生成した面外方向画像の縦横比を所定の比率に基づいて補正し、
補正した面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出することを特徴とする測定方法。
The target member placed on the plane is imaged with a camera,
Acquire the captured image,
In the acquired captured image, an image of an area designated as an area including the target member is stored in a memory as a first template,
Based on the matching between the first template and the captured image, an in-plane direction position that is a position of the surface of the target member facing the camera is detected;
Out-of-plane direction position data in each of the two-dimensional arrays in the in-plane direction is acquired by a sensor,
Based on the acquired out-of-plane direction position data, generate an out-of-plane direction image that expresses out-of-plane direction position data in each of the two-dimensional arrays by pixel values,
Correct the aspect ratio of the generated out-of-plane image based on a predetermined ratio,
A measurement method comprising: detecting a position of the target member in an out-of-plane direction based on matching between the corrected out-of-plane image and the first template.
前記カメラにより前記平面方向における水平及び垂直方向の直線形状を持つ直線パターンを前記対象部材とともに撮像し、
前記面外方向センサにより前記直線パターンを前記対象部材とともに走査し、
前記撮像画像上の前記直線パターンを含む領域として指定された領域の画像を、第2テンプレートとして前記メモリに保存し、
前記所定の比率により縦横比を変更した面外方向画像と前記第2テンプレートとのマッチングに基づいて前記面外方向画像における前記直線パターンを検出し、該直線パターンの直線形状の距離に基づく比率により前記面外方向画像の縦横比を補正することを特徴とする請求項1に記載の測定方法。
The camera captures a linear pattern having a linear shape in the horizontal and vertical directions in the planar direction together with the target member,
The linear pattern is scanned together with the target member by the out-of-plane direction sensor,
An image of an area designated as an area including the linear pattern on the captured image is stored in the memory as a second template,
The straight line pattern in the out-of-plane direction image is detected based on matching between the out-of-plane direction image whose aspect ratio is changed by the predetermined ratio and the second template, and the ratio based on the distance of the straight line shape of the straight line pattern The measurement method according to claim 1, wherein an aspect ratio of the out-of-plane image is corrected.
前記面内方向位置の検出は、前記第1テンプレートとのマッチングにおける相関値が最も高い前記撮像画像上の領域内において、前記対象部材の先端を含む領域として指定された領域の撮像画像のエッジを検出し、検出したエッジのうち、並行するエッジを2つの直線として求め、2つの直線から同距離である中心線とエッジとの交差点を前記対象部材の面内方向位置として検出することを特徴とする請求項1または2に記載の測定方法。 The detection of the in-plane direction position is performed by detecting an edge of a captured image in a region designated as a region including the tip of the target member in a region on the captured image having the highest correlation value in matching with the first template. And detecting parallel edges among the detected edges as two straight lines, and detecting an intersection of the center line and the edge that are the same distance from the two straight lines as an in-plane direction position of the target member, The measuring method according to claim 1 or 2. 平面上に載置された対象部材を撮像するカメラと、
前記平面に対する高さを検出する面外方向センサと、
前記カメラにより撮像された撮像画像を取得する第1取得部と、
前記第1取得部により取得された撮像画像において前記対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存する保存部と、
前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出する第1検出部と、
前記面外方向センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得する第2取得部と、
前記第2取得部により取得された面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成する画像生成部と、
前記画像生成部により生成された面外方向画像の縦横比を所定の比率に基づいて補正する補正部と、
前記補正部により補正された面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出する第2検出部と
を備える測定装置。
A camera for imaging a target member placed on a plane;
An out-of-plane direction sensor that detects a height relative to the plane;
A first acquisition unit that acquires a captured image captured by the camera;
A storage unit that stores an image of a region designated as a region including the target member in the captured image acquired by the first acquisition unit in a memory as a first template;
A first detection unit that detects an in-plane direction position that is a position of a surface of the target member facing the camera based on matching between the first template and the captured image;
A second acquisition unit that acquires out-of-plane direction position data in each of the two-dimensional arrays in the in-plane direction by the out-of-plane direction sensor;
Based on the out-of-plane direction position data acquired by the second acquisition unit, an image generation unit that generates an out-of-plane direction image that expresses out-of-plane direction position data in each of the two-dimensional arrays by pixel values;
A correction unit that corrects the aspect ratio of the out-of-plane image generated by the image generation unit based on a predetermined ratio;
A measurement apparatus comprising: a second detection unit configured to detect an out-of-plane direction position of the target member based on matching between the out-of-plane image corrected by the correction unit and the first template.
平面上に載置された測定対象である対象部材を撮像するカメラと、前記対象部材の前記平面に対する高さである面外方向位置を検出する面外方向センサとを有する測定装置を制御する測定制御プログラムであって、
前記カメラにより撮像された撮像画像を取得する第1取得ステップと、
前記第1取得ステップにより取得された撮像画像において前記対象部材を含む領域として指定された領域の画像を第1テンプレートとしてメモリに保存する保存ステップと、
前記第1テンプレートと前記撮像画像とのマッチングに基づいて、前記対象部材の前記カメラと対向する面の位置である面内方向位置を検出する第1検出ステップと、
前記面外方向センサによって前記面内方向の2次元配列のそれぞれにおける面外方向位置データを取得する第2取得ステップと、
前記第2取得ステップにより取得された面外方向位置データに基づいて、前記2次元配列のそれぞれにおける面外方向位置データを画素値により表現する面外方向画像を生成する画像生成ステップと、
前記画像生成ステップにより生成された面外方向画像の縦横比を所定の比率に基づいて補正する補正ステップと、
前記補正ステップにより補正された面外方向画像と前記第1テンプレートとのマッチングに基づいて、前記対象部材の面外方向の位置を検出する第2検出ステップと
をコンピュータに実行させる測定制御プログラム。
Measurement for controlling a measurement apparatus having a camera that images a target member that is a measurement target placed on a plane, and an out-of-plane direction sensor that detects an out-of-plane direction position that is a height of the target member with respect to the plane. A control program,
A first acquisition step of acquiring a captured image captured by the camera;
A storage step of storing an image of a region designated as a region including the target member in the captured image acquired by the first acquisition step in a memory as a first template;
A first detection step of detecting an in-plane direction position that is a position of a surface of the target member facing the camera based on matching between the first template and the captured image;
A second acquisition step of acquiring out-of-plane direction position data in each of the two-dimensional arrays in the in-plane direction by the out-of-plane direction sensor;
Based on the out-of-plane direction position data acquired by the second acquisition step, an image generation step of generating an out-of-plane direction image that expresses out-of-plane direction position data in each of the two-dimensional arrays by pixel values;
A correction step of correcting the aspect ratio of the out-of-plane image generated by the image generation step based on a predetermined ratio;
A measurement control program that causes a computer to execute a second detection step of detecting a position of the target member in the out-of-plane direction based on matching between the out-of-plane image corrected in the correction step and the first template.
JP2009047684A 2009-03-02 2009-03-02 Measuring method, measuring device, measurement control program Expired - Fee Related JP5206499B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009047684A JP5206499B2 (en) 2009-03-02 2009-03-02 Measuring method, measuring device, measurement control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009047684A JP5206499B2 (en) 2009-03-02 2009-03-02 Measuring method, measuring device, measurement control program

Publications (2)

Publication Number Publication Date
JP2010203826A JP2010203826A (en) 2010-09-16
JP5206499B2 true JP5206499B2 (en) 2013-06-12

Family

ID=42965461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009047684A Expired - Fee Related JP5206499B2 (en) 2009-03-02 2009-03-02 Measuring method, measuring device, measurement control program

Country Status (1)

Country Link
JP (1) JP5206499B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5481883B2 (en) * 2009-03-05 2014-04-23 株式会社島津製作所 Sample analyzer using specific site detection method
JP6301627B2 (en) * 2013-10-18 2018-03-28 リコーエレメックス株式会社 Appearance inspection apparatus and appearance inspection method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02150704A (en) * 1988-12-01 1990-06-11 Fujitsu Ltd Object inspecting device
JP2841961B2 (en) * 1991-08-22 1998-12-24 オムロン株式会社 Visual recognition device
JP3426002B2 (en) * 1993-09-20 2003-07-14 三菱電機株式会社 Object recognition device
JPH11241911A (en) * 1998-02-25 1999-09-07 Sumitomo Metal Mining Co Ltd Method for detecting strip end position by image analysis
JP2002071309A (en) * 2000-08-24 2002-03-08 Asahi Optical Co Ltd Three-dimensional image-detecting device
JP2004191335A (en) * 2002-12-13 2004-07-08 Toyota Motor Corp Shape measuring device
US8050491B2 (en) * 2003-12-17 2011-11-01 United Technologies Corporation CAD modeling system and method
US7742634B2 (en) * 2005-03-15 2010-06-22 Omron Corporation Image processing method, three-dimensional position measuring method and image processing apparatus

Also Published As

Publication number Publication date
JP2010203826A (en) 2010-09-16

Similar Documents

Publication Publication Date Title
US8554012B2 (en) Image processing apparatus and image processing method for correcting distortion in photographed image
JP4917351B2 (en) Calibration method in three-dimensional shape measuring apparatus
US9759548B2 (en) Image processing apparatus, projector and projector system including image processing apparatus, image processing method
JP5587137B2 (en) Measuring apparatus and measuring method
US8970853B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and storage medium
JP6394081B2 (en) Image processing apparatus, image processing system, image processing method, and program
JP6363863B2 (en) Information processing apparatus and information processing method
JP4885584B2 (en) Rangefinder calibration method and apparatus
EP3915511A1 (en) Motion blur compensation
JP2014102246A (en) Position attitude detection system
JP5633058B1 (en) 3D measuring apparatus and 3D measuring method
US20150178910A1 (en) Method and system for calibrating laser measuring apparatus
JP2011118553A (en) Image processing apparatus, image processing method and computer program
JP2010041419A (en) Image processor, image processing program, image processing method, and electronic apparatus
JP5493105B2 (en) Object dimension measuring method and object dimension measuring apparatus using range image camera
JP2010091426A (en) Distance measuring device and program
WO2012029658A1 (en) Imaging device, image-processing device, image-processing method, and image-processing program
US20190392607A1 (en) Image processing apparatus, system, image processing method, article manufacturing method, and non-transitory computer-readable storage medium
JPWO2016135856A1 (en) Three-dimensional shape measurement system and measurement method thereof
JP2005283440A (en) Vibration measuring device and measuring method thereof
JP2011155412A (en) Projection system and distortion correction method in the same
JP7020240B2 (en) Recognition device, recognition system, program and position coordinate detection method
JP5206499B2 (en) Measuring method, measuring device, measurement control program
JP2008281481A (en) Apparatus and method for measuring resolution
JP2009146150A (en) Method and device for detecting feature position

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130110

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130204

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees