JP2018072269A - Image measurement device - Google Patents

Image measurement device Download PDF

Info

Publication number
JP2018072269A
JP2018072269A JP2016215547A JP2016215547A JP2018072269A JP 2018072269 A JP2018072269 A JP 2018072269A JP 2016215547 A JP2016215547 A JP 2016215547A JP 2016215547 A JP2016215547 A JP 2016215547A JP 2018072269 A JP2018072269 A JP 2018072269A
Authority
JP
Japan
Prior art keywords
image
workpiece
measurement
unit
contact
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016215547A
Other languages
Japanese (ja)
Inventor
高橋 浩史
Hiroshi Takahashi
浩史 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Keyence Corp
Original Assignee
Keyence Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Keyence Corp filed Critical Keyence Corp
Priority to JP2016215547A priority Critical patent/JP2018072269A/en
Publication of JP2018072269A publication Critical patent/JP2018072269A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices With Unspecified Measuring Means (AREA)
  • A Measuring Device Byusing Mechanical Method (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image measurement device for improving usability, while suppressing reduction of a measurEment accuracy.SOLUTION: A movement detection part acquires a first image of a work W generated by an imaging part 201 before a contact part 261 and a side surface of the work W are brought into contact with each other in order to measure a position of the side surface of the work W. Further, the movement detection part acquires a second image of the work W generated by the imaging part 201 after the contact part 261 and the side surface of the work W are brought into contact with each other in order to measure the position of the side surface of the work W. The movement detection part detects a movement of the work W on the mounting surface of the stage 23 by the fact that the contact part 261 and the side surface of the work W are brought into contact with each other, using the first image and the second image. A result output part outputs a detection result of the movement detection part.SELECTED DRAWING: Figure 1

Description

本発明は、画像測定装置に係り、さらに詳しくは、プローブをステージ上のワークに接触させ、プローブの位置を画像で検出してワークの寸法を求める画像測定装置の改良に関する。   The present invention relates to an image measuring apparatus, and more particularly, to an improvement in an image measuring apparatus that obtains the dimensions of a workpiece by bringing a probe into contact with a workpiece on a stage and detecting the position of the probe with an image.

画像測定装置は、ステージ上に載置されたワークを撮影してワーク画像を取得し、ワーク画像からエッジを抽出してワークの寸法を求める寸法測定器である。ワーク画像は、カメラの高さ方向の位置に関わらず、ワークに対して極めて正確な相似形であり、ワーク画像上の距離や角度を判定することにより、ワーク上における実際の寸法や角度を検知することができる。エッジ抽出は、ワーク画像の輝度変化を解析してエッジ点を検出し、検出された複数のエッジ点に直線、円、円弧などの幾何学図形をフィッティングさせることにより行われ、ワークと背景との境界、ワーク上の凹部又は凸部の輪郭等がエッジとして求められる。ワークの寸法は、この様にして求められるエッジ間の距離や角度として求められる。また、求められた寸法値と設計値との差分(誤差)を公差と比較してワークの良否判定が行われる。   The image measuring device is a dimension measuring device that captures a workpiece placed on a stage to acquire a workpiece image, extracts an edge from the workpiece image, and obtains a workpiece dimension. Regardless of the position in the height direction of the camera, the workpiece image is a very accurate similar shape to the workpiece. By detecting the distance and angle on the workpiece image, the actual size and angle on the workpiece are detected. can do. Edge extraction is performed by analyzing the brightness change of the workpiece image, detecting edge points, and fitting a plurality of detected edge points with geometric figures such as straight lines, circles, arcs, etc. A boundary, a contour of a concave portion or a convex portion on the workpiece, and the like are obtained as edges. The dimension of the workpiece is obtained as the distance or angle between the edges obtained in this way. Further, the quality of the workpiece is determined by comparing the difference (error) between the obtained dimension value and the design value with a tolerance.

上述した様な画像測定装置には、プローブをステージ上に載置されたワークの側面に接触させてワークの寸法を求めるものがある(非特許文献1)。プローブは、カメラの撮像視野内に配置され、ワークとの接触位置は、ワークの側面に接触した状態のプローブが撮影された画像からプローブの位置を特定することによって求められる。   Some image measuring apparatuses as described above obtain the dimensions of a workpiece by bringing a probe into contact with the side surface of the workpiece placed on a stage (Non-Patent Document 1). The probe is disposed in the imaging field of view of the camera, and the contact position with the workpiece is obtained by specifying the position of the probe from an image obtained by photographing the probe in contact with the side surface of the workpiece.

Guijun Ji,ハインリッヒ シュベンケ(Heinrich Schwenke),オイゲン トラペート(Eugen Trapet),「アン オプトメカニカル マイクロプローブ システム フォー メジャリング ベリー スモール パーツ オン CMMs(An Opto−mechanical Microprobe System for Measuring Very Small Parts on CMMs)」,(アメリカ),国際光工学会(SPIE)ビジョンジオメトリーVII(Vision GeometryVII),1998年7月20日〜22日,第3454巻,p.348−353Guijun Ji, Heinrich Schwenke, Eugen Trapet, “An Opto-mechanical micro probe system for measuring berry small parts on CMMs (An Opto-mechanical MicroSrobeM) USA), International Society of Optical Engineering (SPIE) Vision Geometry VII (Vision Geometry VII), July 20-22, 1998, 3454, p. 348-353

図33及び図34は、画像測定装置の動作例を示した図である。図33の(a)には、測定対象のワークWが示され、(b)には、ワーク画像Iwが示されている。このワークWは、ベース部材wと、ベース部材w上に形成された2つの突出部wとからなる。2つの突出部wにおける内側の側面Sa間の距離Aと、外側の側面Sb間の距離Bと、ベース部材wの側面Sc間の距離Cとを測定する場合、突出部wの内側が曲面形状であることから、側面Sb及びScのエッジに比べ、側面Saのエッジをワーク画像Iwから正確に特定することは難しい。 33 and 34 are diagrams illustrating an example of the operation of the image measurement apparatus. 33A shows the workpiece W to be measured, and FIG. 33B shows the workpiece image Iw. The workpiece W includes a base member w 1 and two protrusions w 2 formed on the base member w 1 . The distance A between the inner side surface Sa of the two protrusions w 2, when measuring the distance B between the outer side surface Sb, and the distance C between the side surfaces Sc of the base member w 1, the interior sides of the protruding portion w 2 Is a curved surface shape, it is difficult to accurately specify the edge of the side surface Sa from the work image Iw as compared to the edges of the side surfaces Sb and Sc.

図34の(a)には、プローブPrを右側の突出部wの側面Saに接触させた状態で撮影されたワーク画像Iwが示され、(b)には、プローブPrを左側の突出部wの側面Saに接触させた状態で撮影されたワーク画像Iwが示されている。ワーク画像IwにおけるプローブPrの位置は、プローブPrの形状やサイズが既知であることから正確に特定することができる。また、側面Saの位置は、撮像視野内におけるプローブPrの変位量から接触位置を特定することによって求められる。従って、この種の画像測定装置を用いれば、ワーク画像Iwからエッジが正確に特定できない測定箇所であっても、寸法を正確に求めることができる。 The (a) of FIG. 34, indicated workpiece image Iw taken in a state in contact with the side surface Sa of the right protrusion w 2 the probe Pr is, the (b) is a probe Pr left projecting portions A work image Iw photographed while being in contact with the side surface Sa of w 2 is shown. The position of the probe Pr in the work image Iw can be accurately specified since the shape and size of the probe Pr are known. Further, the position of the side surface Sa is obtained by specifying the contact position from the displacement amount of the probe Pr within the imaging field of view. Therefore, if this type of image measuring apparatus is used, it is possible to accurately determine the dimensions even at a measurement location where the edge cannot be accurately specified from the work image Iw.

ところで、プローブPrを利用した画像測定装置ではプローブPrがワークWに接触したときにワークWが移動してしまうことがある。ワークWが移動したことを知らずにプローブPrで測定を継続すると、ワークWが移動した後に取得された測定結果は誤差を含んでしまう。ワークWの移動を防ぐために、特別の治具を作成して、治具にワークWを固定することが考えられる。しかし、この手法では治具へのワークWの固定作業と取り外し作業が必須となり、大量のワークWを効率よく測定することが困難となる。そこで、本発明は、測定精度の低下を抑制しつつ、ユーザビリティを向上することを目的とする。   By the way, in the image measuring apparatus using the probe Pr, the workpiece W may move when the probe Pr contacts the workpiece W. If measurement is continued with the probe Pr without knowing that the workpiece W has moved, the measurement result obtained after the workpiece W has moved will contain an error. In order to prevent the movement of the workpiece W, it is conceivable to create a special jig and fix the workpiece W to the jig. However, in this method, it is essential to fix and remove the workpiece W from the jig, and it is difficult to efficiently measure a large amount of workpieces W. Accordingly, an object of the present invention is to improve usability while suppressing a decrease in measurement accuracy.

本発明の第1の態様による画像測定装置は、
ワークが載置されるステージと、
前記ステージに載置された前記ワークを撮像して画像を生成する撮像部と、
前記撮像部の視野内において、前記ステージに載置された前記ワークの側面と接触可能なコンタクト部を有するプローブと、
前記ステージの載置面と略平行に前記ステージと前記プローブとのうち少なくとも一方を移動させる駆動部と、
前記コンタクト部と前記ワークの側面とが接触しているときに前記撮像部により生成された画像を用いて前記ワークの側面の位置を測定する測定部と
を有する画像測定装置であって、
前記ワークの側面の位置を測定するために前記コンタクト部と前記ワークの側面とが接触する前に前記撮像部により生成された前記ワークの第一画像と、前記ワークの側面の位置を測定するために前記コンタクト部と前記ワークの側面とが接触した後に前記撮像部により生成された前記ワークの第二画像とを用いて、前記コンタクト部と前記ワークの側面とが接触したことにより前記ステージの載置面上で前記ワークが移動したことを検知する移動検知部と、
前記移動検知部の検知結果を出力する出力部と
をさらに有することを特徴とする。
An image measuring apparatus according to the first aspect of the present invention includes:
A stage on which the workpiece is placed;
An imaging unit that images the workpiece placed on the stage and generates an image;
In the field of view of the imaging unit, a probe having a contact part that can come into contact with the side surface of the workpiece placed on the stage;
A drive unit that moves at least one of the stage and the probe substantially parallel to the mounting surface of the stage;
An image measuring apparatus comprising: a measuring unit that measures a position of the side surface of the workpiece using an image generated by the imaging unit when the contact unit and the side surface of the workpiece are in contact with each other;
In order to measure the position of the side surface of the workpiece and the first image of the workpiece generated by the imaging unit before the contact portion and the side surface of the workpiece contact to measure the position of the side surface of the workpiece The contact portion and the side surface of the work are brought into contact with each other by using the second image of the workpiece generated by the imaging unit after the contact portion and the side surface of the workpiece are in contact with each other. A movement detector for detecting that the workpiece has moved on the surface;
And an output unit that outputs a detection result of the movement detection unit.

本発明によれば、コンタクト部の形状が所定形状であるかを示す判定結果が出力されるため、ユーザはその判定結果に基づきコンタクト部のクリーニングを実施できるようになる。これにより、測定精度の低下を抑制しつつ、ユーザビリティを向上することが可能となる。   According to the present invention, since a determination result indicating whether the shape of the contact portion is a predetermined shape is output, the user can perform cleaning of the contact portion based on the determination result. Thus, usability can be improved while suppressing a decrease in measurement accuracy.

本発明の実施の形態による画像測定装置1の一構成例を示したシステム図である。1 is a system diagram illustrating a configuration example of an image measurement device 1 according to an embodiment of the present invention. 図1の画像測定装置1の動作の一例を模式的に示した説明図である。It is explanatory drawing which showed typically an example of operation | movement of the image measuring apparatus 1 of FIG. プローブ26をステージ23上のワークWに接触させる際の動作の一例を模式的に示した説明図である。It is explanatory drawing which showed typically an example of the operation | movement at the time of making the probe 26 contact the workpiece | work W on the stage 23. FIG. 図1の画像測定装置1の動作の一例を示した図であり、輪郭線14の位置を特定してワークWの側面間の距離Dを算出する場合が示されている。FIG. 2 is a diagram illustrating an example of the operation of the image measurement apparatus 1 in FIG. 1, in which the position D of the contour line 14 is specified and the distance D between the side surfaces of the workpiece W is calculated. 図1のコントローラ3の一構成例を示したブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a controller 3 in FIG. 1. 図5の入力受付部311の一構成例を示したブロック図である。FIG. 6 is a block diagram illustrating a configuration example of an input receiving unit 311 in FIG. 5. 図5の入力受付部311における接触位置指定時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the contact position designation | designated in the input reception part 311 of FIG. 図5の入力受付部311におけるパターン画像登録時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the pattern image registration in the input reception part 311 of FIG. 図5の入力受付部311における接触位置指定時の動作の一例を示した図であり、形状種別とスキャン経路の本数とを対応づけたテーブルが示されている。FIG. 6 is a diagram illustrating an example of an operation at the time of designating a contact position in the input reception unit 311 in FIG. 5, in which a table in which shape types are associated with the number of scan paths is illustrated. 図5の入力管理部311におけるスキャン位置指定時の動作の一例を示した図であり、輪郭線Lの長さに応じてスキャン経路の本数が異なる場合が示されている。FIG. 6 is a diagram illustrating an example of an operation at the time of designating a scan position in the input management unit 311 in FIG. 5, in which the number of scan paths varies depending on the length of the contour line L. 図5の測定制御部315の一構成例を示したブロック図である。FIG. 6 is a block diagram illustrating a configuration example of a measurement control unit 315 in FIG. 5. 図5のコントローラ3における測定設定時の動作の一例を示したフローチャートである。6 is a flowchart showing an example of an operation at the time of measurement setting in the controller 3 of FIG. 5. 図1の画像測定装置1における測定設定時の動作の一例を示した図であり、登録対象のワークWとパターン画像Ipとが示されている。It is the figure which showed an example of the operation | movement at the time of the measurement setting in the image measuring device 1 of FIG. 1, and the workpiece | work W and pattern image Ip of registration object are shown. 図1の画像測定装置1における測定設定時の動作の一例を示した図であり、表示部21に表示される設定画面100が示されている。FIG. 2 is a diagram showing an example of an operation at the time of measurement setting in the image measurement apparatus 1 of FIG. 1, and shows a setting screen 100 displayed on the display unit 21. 設計値及び公差の指定時における公差設定画面101を示した図である。It is the figure which showed the tolerance setting screen 101 at the time of designation | designated of a design value and tolerance. 特徴量情報の指定時における特徴量設定画面102を示した図である。It is the figure which showed the feature-value setting screen 102 at the time of designation | designated of feature-value information. 図12のステップS103(画像測定要素の設定)について、詳細動作の一例を示したフローチャートである。FIG. 13 is a flowchart showing an example of a detailed operation for step S103 (setting of an image measurement element) in FIG. 図1の画像測定装置1における画像測定要素の設定時の動作の一例を示した図である。FIG. 2 is a diagram illustrating an example of an operation when setting an image measurement element in the image measurement apparatus 1 of FIG. 1. 図12のステップS104(プローブ測定要素の設定)について、詳細動作の一例を示したフローチャートである。FIG. 13 is a flowchart showing an example of a detailed operation in step S104 (probe measurement element setting) in FIG. 図1の画像測定装置1におけるプローブ測定要素の設定時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the setting of the probe measurement element in the image measuring apparatus 1 of FIG. モデル画像Im上の接触目標位置を調整する場合の動作例を示した図である。It is the figure which showed the operation example in the case of adjusting the contact target position on the model image Im. スキャン動作の開始位置が他の部位と干渉する場合の動作例を示した図である。It is the figure which showed the operation example in case the start position of scanning operation | movement interferes with another site | part. モデル画像Im上でスキャン動作の高さ位置を調整する場合の動作例を示した図である。It is the figure which showed the operation example in the case of adjusting the height position of scanning operation | movement on the model image Im. プローブ26が接触目標位置間を移動する際の移動方法を指定する場合の動作例を示した図である。It is the figure which showed the operation example in the case of designating the movement method at the time of the probe 26 moving between contact target positions. 図12のステップS107(特徴量情報の登録)について、詳細動作の一例を示したフローチャートである。13 is a flowchart showing an example of detailed operation for step S107 (registration of feature amount information) in FIG. 図17のステップS201、図19のステップS301及び図25のステップS401(撮影条件の指定)の詳細動作の一例を示したフローチャートである。FIG. 26 is a flowchart showing an example of detailed operations in step S201 in FIG. 17, step S301 in FIG. 19, and step S401 in FIG. 25 (designation of shooting conditions). 図5のコントローラ3における連続測定時の動作の一例を示したフローチャートである。It is the flowchart which showed an example of the operation | movement at the time of the continuous measurement in the controller 3 of FIG. 図5のコントローラ3における連続測定時の動作の一例を示したフローチャートである。It is the flowchart which showed an example of the operation | movement at the time of the continuous measurement in the controller 3 of FIG. 図1の画像測定装置1における連続測定時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the continuous measurement in the image measuring apparatus 1 of FIG. 図1の画像測定装置1における連続測定時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the continuous measurement in the image measuring apparatus 1 of FIG. 図1の画像測定装置1における連続測定時の動作の一例を示した図である。It is the figure which showed an example of the operation | movement at the time of the continuous measurement in the image measuring apparatus 1 of FIG. 図28のステップS615(スキャン動作)について、詳細動作の一例を示したフローチャートである。FIG. 29 is a flowchart showing an example of detailed operation for step S615 (scan operation) in FIG. 28. FIG. 従来の画像測定装置の動作例を示した図である。It is the figure which showed the operation example of the conventional image measuring apparatus. 従来の画像測定装置の動作例を示した図である。It is the figure which showed the operation example of the conventional image measuring apparatus. 画像に基づく移動検知の概念を説明する図である。It is a figure explaining the concept of the movement detection based on an image. 特定形状への接触測定に基づく移動検知の概念を説明する図である。It is a figure explaining the concept of the movement detection based on the contact measurement to a specific shape. 特定領域の輝度に基づく移動検知の概念を説明する図である。It is a figure explaining the concept of the movement detection based on the brightness | luminance of a specific area | region. 移動検知設定部を説明するブロック図である。It is a block diagram explaining a movement detection setting part. 移動検知設定に関するUIを説明するブロック図である。It is a block diagram explaining UI regarding a movement detection setting. 移動検知設定を示すフローチャートである。It is a flowchart which shows a movement detection setting. 移動検知を実行する測定制御部の機能を示すブロック図である。It is a block diagram which shows the function of the measurement control part which performs a movement detection. 移動検知を実行する測定制御部の機能を示すブロック図である。It is a block diagram which shows the function of the measurement control part which performs a movement detection. 移動検知を実行する測定制御部の機能を示すブロック図である。It is a block diagram which shows the function of the measurement control part which performs a movement detection. ワークごとの移動検知を示すフローチャートである。It is a flowchart which shows the movement detection for every workpiece | work. プローブ測定ごとの移動検知を示すフローチャートである。It is a flowchart which shows the movement detection for every probe measurement. 接触点ごとの移動検知を示すフローチャートである。It is a flowchart which shows the movement detection for every contact point.

<画像測定装置1>
図1は、本発明の実施の形態による画像測定装置1の一構成例を示したシステム図である。この画像測定装置1は、ステージ23上のワークWが撮影されたワーク画像からエッジを抽出し、また、プローブ26をステージ23上のワークWに接触させて接触位置を特定することにより、ワークWの寸法を求める寸法測定器であり、本体2、コントローラ3、キーボード41及びマウス42により構成される。ワークWは、その形状や寸法が測定される測定対象物である。
<Image measuring device 1>
FIG. 1 is a system diagram showing a configuration example of an image measuring apparatus 1 according to an embodiment of the present invention. The image measuring apparatus 1 extracts an edge from a workpiece image obtained by photographing the workpiece W on the stage 23, and specifies the contact position by bringing the probe 26 into contact with the workpiece W on the stage 23. Is a dimension measuring instrument for determining the dimensions of the main body 2, and comprises the main body 2, the controller 3, the keyboard 41 and the mouse 42. The workpiece W is a measurement object whose shape and dimensions are measured.

本体2は、測定ユニット20、表示部21、垂直駆動部22、ステージ23、水平駆動部24及び透過照明ユニット25により構成され、ステージ23上のワークWに可視光からなる検出光を照射し、その透過光又は反射光を受光してワーク画像を生成する。表示部21の正面方向を前後方向と呼ぶことにすれば、表示部21は、測定ユニット20よりも前側に配置されている。   The main body 2 includes a measurement unit 20, a display unit 21, a vertical drive unit 22, a stage 23, a horizontal drive unit 24, and a transmission illumination unit 25, and irradiates the work W on the stage 23 with detection light made of visible light. The transmitted light or reflected light is received to generate a work image. If the front direction of the display unit 21 is referred to as the front-rear direction, the display unit 21 is arranged in front of the measurement unit 20.

ここでは、ワーク画像からエッジを抽出してワークWの寸法を求める処理を画像測定と呼び、プローブ26をワークWの側面に接触させた状態のワーク画像から、プローブ26の位置を検出し、プローブ26とワークWとの接触位置の座標を特定することにより、ワークWの寸法を求める処理をプローブ測定と呼ぶことにする。   Here, the process of extracting the edge from the workpiece image and obtaining the dimension of the workpiece W is called image measurement, and the position of the probe 26 is detected from the workpiece image in a state where the probe 26 is in contact with the side surface of the workpiece W. The process for obtaining the dimensions of the workpiece W by specifying the coordinates of the contact position between the workpiece 26 and the workpiece W will be referred to as probe measurement.

表示部21は、ワーク画像や測定結果を表示する表示装置である。垂直駆動部22は、ステージ23に対するフォーカス位置の高さやプローブ26の高さを調整するために、測定ユニット20及びステージ23を鉛直方向に相対的に移動させる。この垂直駆動部22は、測定ユニット20を鉛直方向に移動させることができる。なお、垂直駆動部22は、プローブ26を測定ユニット20に対して個別に高さ調整可能な構成としても良い。   The display unit 21 is a display device that displays work images and measurement results. The vertical driving unit 22 relatively moves the measurement unit 20 and the stage 23 in the vertical direction in order to adjust the height of the focus position with respect to the stage 23 and the height of the probe 26. The vertical drive unit 22 can move the measurement unit 20 in the vertical direction. Note that the vertical drive unit 22 may be configured such that the height of the probe 26 can be individually adjusted with respect to the measurement unit 20.

ステージ23は、ワークWを載置するための水平かつ平坦な載置面を有する作業台である。例えば、ステージ23は、検出光を透過させるガラス板からなる。水平駆動部24は、ステージ23に対する撮像視野の位置やプローブ26の位置を調整するために、測定ユニット20及びステージ23をステージ23の上面と平行な方向に相対的に移動させる。この水平駆動部24は、ステージ23を水平面内の任意の方向に移動させることができる。   The stage 23 is a work table having a horizontal and flat mounting surface for mounting the workpiece W. For example, the stage 23 is made of a glass plate that transmits detection light. The horizontal driving unit 24 relatively moves the measurement unit 20 and the stage 23 in a direction parallel to the upper surface of the stage 23 in order to adjust the position of the imaging field of view with respect to the stage 23 and the position of the probe 26. The horizontal drive unit 24 can move the stage 23 in an arbitrary direction within a horizontal plane.

透過照明ユニット25は、ステージ23上のワークWに検出光を下方から照射する投光装置であり、透過照明用光源251、ミラー252及び集光レンズ253により構成される。透過照明用光源251は、前方に向けて配置されている。透過照明用光源251から出射された検出光は、ミラー252により上方に向けて反射され、集光レンズ253を介して出射される。この検出光は、ステージ23を透過し、その透過光の一部は、ワークWにより遮断され、他の一部が測定ユニット20の対物レンズ205に入射する。   The transmitted illumination unit 25 is a light projecting device that irradiates the workpiece W on the stage 23 with detection light from below, and includes a transmitted illumination light source 251, a mirror 252, and a condenser lens 253. The transmitted illumination light source 251 is disposed facing forward. The detection light emitted from the transmitted illumination light source 251 is reflected upward by the mirror 252 and emitted through the condenser lens 253. This detection light passes through the stage 23, a part of the transmitted light is blocked by the work W, and the other part enters the objective lens 205 of the measurement unit 20.

<測定ユニット20>
測定ユニット20は、ステージ23上のワークWに検出光を照射し、ワークWからの検出光を受光する投受光ユニットであり、プローブ26、切替駆動部27、撮像部201,206、ハーフミラー204,210、対物レンズ205、同軸落射照明用光源209、リング照明ユニット211、リング照明用垂直駆動部212及びプローブ用光源263により構成される。
<Measurement unit 20>
The measurement unit 20 is a light projecting / receiving unit that irradiates the workpiece W on the stage 23 with detection light and receives detection light from the workpiece W, and includes a probe 26, a switching drive unit 27, imaging units 201 and 206, and a half mirror 204. 210, the objective lens 205, the coaxial epi-illumination light source 209, the ring illumination unit 211, the ring illumination vertical drive unit 212, and the probe light source 263.

対物レンズ205は、ワークWからの検出光を集光する受光レンズであり、ステージ23と対向するように配置されている。撮像部201及び206は、共通の対物レンズ205を介してステージ23上のワークWを撮影し、ワーク画像をそれぞれ生成するカメラである。   The objective lens 205 is a light receiving lens that condenses detection light from the workpiece W, and is disposed so as to face the stage 23. The imaging units 201 and 206 are cameras that capture the workpiece W on the stage 23 via the common objective lens 205 and generate workpiece images, respectively.

撮像部201は、撮影倍率の低い撮像装置であり、撮像素子202と、結像レンズ及び絞り板からなる低倍側結像レンズ部203とにより構成される。撮像素子202は、低倍側結像レンズ部203を介してワークWからの検出光を受光し、ワーク画像を生成する。この撮像素子202は、受光面を下方に向けた状態で配置されている。   The imaging unit 201 is an imaging device with a low imaging magnification, and includes an imaging element 202 and a low-magnification side imaging lens unit 203 including an imaging lens and a diaphragm plate. The image sensor 202 receives the detection light from the workpiece W via the low magnification side imaging lens unit 203 and generates a workpiece image. The image sensor 202 is arranged with the light receiving surface facing downward.

撮像部206は、撮影倍率の高い撮像装置であり、撮像素子207と、結像レンズ及び絞り板からなる高倍側結像レンズ部208とにより構成され、撮像部201の撮像視野と同軸の撮像視野をステージ23上に形成する。撮像素子207は、高倍側結像レンズ部208を介してワークWからの検出光を受光し、ワーク画像を生成する。この撮像素子207は、受光面を前方に向けた状態で配置されている。対物レンズ205を透過した検出光は、ハーフミラー204により後方に向けて反射され、高倍側結像レンズ部208を介して撮像素子207に結像する。   The imaging unit 206 is an imaging device having a high imaging magnification, and includes an imaging element 207 and a high-magnification imaging lens unit 208 including an imaging lens and a diaphragm plate. The imaging field of view is coaxial with the imaging field of the imaging unit 201. Is formed on the stage 23. The image sensor 207 receives detection light from the work W via the high magnification side imaging lens unit 208 and generates a work image. The image sensor 207 is arranged with the light receiving surface facing forward. The detection light transmitted through the objective lens 205 is reflected backward by the half mirror 204 and forms an image on the image sensor 207 via the high magnification side imaging lens unit 208.

撮像素子202及び207には、例えば、CCD(Charge Coupled Devices:電荷結合素子)、CMOS(Complementary Metal Oxide Semiconductor:相補型金属酸化物半導体)などのイメージセンサが用いられる。対物レンズ205には、鉛直方向、すなわち、対物レンズ205の光軸方向の位置が変化しても、像の大きさを変化させない性質を有するテレセントリックレンズが用いられる。   For the imaging elements 202 and 207, for example, an image sensor such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) is used. As the objective lens 205, a telecentric lens having a property that the size of the image is not changed even when the position in the optical axis direction of the objective lens 205 is changed is used.

同軸落射照明用光源209は、ステージ23上のワークWに検出光を鉛直上方から照射するための投光用光源装置であり、前方に向けて配置されている。同軸落射照明用光源209から出射された検出光は、ハーフミラー210により下方に向けて反射され、対物レンズ205を介して出射される。   The coaxial epi-illumination light source 209 is a light projecting light source device for irradiating the workpiece W on the stage 23 with detection light from vertically above, and is arranged facing forward. Detection light emitted from the coaxial epi-illumination light source 209 is reflected downward by the half mirror 210 and emitted through the objective lens 205.

リング照明ユニット211は、ステージ23上のワークWに検出光を上方又は側方から照射する投光装置であり、対物レンズ205を取り囲むリング形状からなる。リング照明用垂直駆動部212は、ステージ23に対する検出光の照射角度を調整するために、リング照明ユニット211を鉛直方向に移動させる。ワークWの照明方法としては、透過照明、リング照明又は同軸落射照明のいずれかを選択することができる。   The ring illumination unit 211 is a light projecting device that irradiates the workpiece W on the stage 23 with detection light from above or from the side, and has a ring shape surrounding the objective lens 205. The ring illumination vertical drive unit 212 moves the ring illumination unit 211 in the vertical direction in order to adjust the irradiation angle of the detection light with respect to the stage 23. As a method for illuminating the workpiece W, any one of transmitted illumination, ring illumination, and coaxial epi-illumination can be selected.

<プローブ26>
プローブ26は、ステージ23上に載置されたワークWの側面に接触させてワークWの寸法を測定するための接触子である。このプローブ26は、撮像部201の撮像視野内と退避位置とに移動可能に配置されている。また、プローブ26は、自発光型のプローブであり、ワークWに接触させる球状のコンタクト部261と、ガイド光を伝送する金属管262とにより構成される。
<Probe 26>
The probe 26 is a contact for contacting the side surface of the workpiece W placed on the stage 23 and measuring the dimension of the workpiece W. The probe 26 is disposed so as to be movable between an imaging field of the imaging unit 201 and a retracted position. The probe 26 is a self-luminous probe, and includes a spherical contact portion 261 that contacts the workpiece W and a metal tube 262 that transmits guide light.

金属管262の内部には、ガイド光を伝送するための光ファイバが内包されている。金属管262は、十分な強度を有するSUS管で構成されており、ワークWにコンタクト部261が接触しても金属管262の形状は変化しない。   An optical fiber for transmitting guide light is included inside the metal tube 262. The metal tube 262 is formed of a SUS tube having sufficient strength, and the shape of the metal tube 262 does not change even if the contact portion 261 contacts the workpiece W.

コンタクト部261は、プローブ用光源263から延出する金属管262の先端に配置され、ガイド光を拡散放射する。球状のコンタクト部261の水平方向における断面積は金属管262の水平方向における断面積よりも大きくなっていることから、撮像部201によりコンタクト部261を上方から撮像した場合であっても、コンタクト部261の輪郭を撮像することができる。プローブ用光源263は、可視光からなるガイド光を生成し、金属管262に入射させる光源装置である。   The contact portion 261 is disposed at the tip of a metal tube 262 extending from the probe light source 263, and diffuses and emits guide light. Since the cross-sectional area in the horizontal direction of the spherical contact portion 261 is larger than the cross-sectional area in the horizontal direction of the metal tube 262, even when the contact portion 261 is imaged from above by the imaging portion 201, the contact portion 261 contours can be imaged. The probe light source 263 is a light source device that generates guide light made of visible light and makes it incident on the metal tube 262.

切替駆動部27は、プローブ26が撮像視野内の測定位置に位置する状態と、プローブ26が撮像視野の中心から離れる方向に移動した退避位置に位置する状態とを相互に切り替える水平駆動部である。この切替駆動部27は、鉛直方向の回転軸を中心としてプローブ用光源263を回転させる回転駆動部であり、プローブ用光源263を回転させることにより、プローブ26を退避位置と測定位置との間で移動させる。例えば、退避位置は、撮像部201の撮像視野外であることが望ましいが、プローブ26がワーク画像に被写体として映し込まれなければ撮像視野の周縁部であっても良い。   The switching drive unit 27 is a horizontal drive unit that switches between a state in which the probe 26 is positioned at a measurement position in the imaging field of view and a state in which the probe 26 is positioned in a retracted position that is moved away from the center of the imaging field of view. . The switching drive unit 27 is a rotation drive unit that rotates the probe light source 263 around the rotation axis in the vertical direction. By rotating the probe light source 263, the probe 26 is moved between the retracted position and the measurement position. Move. For example, the retracted position is preferably outside the imaging field of the imaging unit 201, but may be the peripheral part of the imaging field if the probe 26 is not reflected as a subject in the work image.

コントローラ3は、本体2による撮影や画面表示を制御し、ワーク画像を解析してワークWの寸法を演算により求める制御ユニットであり、キーボード41及びマウス42が接続されている。キーボード41及びマウス42は、ユーザが操作入力を行う入力部4である。   The controller 3 is a control unit that controls photographing and screen display by the main body 2, analyzes the work image, and obtains the dimensions of the work W by calculation, and is connected to a keyboard 41 and a mouse 42. The keyboard 41 and the mouse 42 are the input unit 4 on which a user performs operation input.

図2〜図4は、図1の画像測定装置1の動作の一例を模式的に示した説明図である。図2には、取付アーム264から延びるプローブ26を鉛直上方から見た様子が示されている。図中の(a)には、プローブ26が測定位置にある場合が示され、(b)には、プローブ26が退避位置にある場合が示されている。   2-4 is explanatory drawing which showed typically an example of operation | movement of the image measuring apparatus 1 of FIG. FIG. 2 shows a state where the probe 26 extending from the mounting arm 264 is viewed from above. (A) in the figure shows the case where the probe 26 is in the measurement position, and (b) shows the case where the probe 26 is in the retracted position.

取付アーム264は、プローブ26を測定ユニット20の筐体に取り付けるための取付部材であり、L字形状からなる。取付アーム264の一端には、鉛直方向の回転軸265が配置され、他端面からプローブ26が突出している。取付アーム264は、金属管262をフローティング構造により支持している。コンタクト部261がワークWの側面に接触したときに、金属管262は接触により変形することなくX及びY方向にオフセットする。その結果、ワーク画像上でコンタクト部261の位置が変化する。   The attachment arm 264 is an attachment member for attaching the probe 26 to the housing of the measurement unit 20 and has an L shape. A vertical rotation shaft 265 is disposed at one end of the mounting arm 264, and the probe 26 projects from the other end surface. The mounting arm 264 supports the metal tube 262 with a floating structure. When the contact portion 261 contacts the side surface of the workpiece W, the metal tube 262 is offset in the X and Y directions without being deformed by the contact. As a result, the position of the contact portion 261 changes on the work image.

撮像エリア11は、撮像部201の撮像視野に対応するステージ23上の領域であり、矩形形状からなる。透光エリア12は、透過照明ユニット25から検出光が照射されるステージ23上の円形領域であり、撮像エリア11内に形成される。   The imaging area 11 is an area on the stage 23 corresponding to the imaging field of view of the imaging unit 201 and has a rectangular shape. The translucent area 12 is a circular area on the stage 23 that is irradiated with detection light from the transillumination unit 25, and is formed in the imaging area 11.

プローブ26が測定位置にある場合、コンタクト部261は、撮像エリア11及び透光エリア12の中心に配置される。この状態で撮影されたワーク画像には、コンタクト部261が被写体として映し込まれる。切替駆動部27を制御してプローブ26が測定位置にある状態から取付アーム264を180°程度回転させることにより、プローブ26は退避位置に移動する。   When the probe 26 is at the measurement position, the contact portion 261 is disposed at the center of the imaging area 11 and the light transmitting area 12. The contact part 261 is reflected as a subject on the work image photographed in this state. By controlling the switching drive unit 27 and rotating the mounting arm 264 about 180 ° from the state where the probe 26 is at the measurement position, the probe 26 is moved to the retracted position.

退避位置は、プローブ26がワーク画像に被写体として映し込まれないようにプローブ26を退避させるための位置であり、予め定められている。プローブ26が退避位置にある場合、コンタクト部261及び金属管262は、撮像エリア11の外側に配置される。   The retracted position is a position for retracting the probe 26 so that the probe 26 is not reflected as a subject in the work image. When the probe 26 is in the retracted position, the contact portion 261 and the metal tube 262 are disposed outside the imaging area 11.

図3には、プローブ26をステージ23上のワークWに接触させる際の動作の一例が示されている。図中の(a)には、基準高さにおいて、スキャン経路の開始位置に対応する位置まで、ステージ23に対し、プローブ26を相対的に移動させる場合が示され、(b)には、基準高さから測定高さまでプローブ26を鉛直下方に移動させる場合が示されている。図中の(c)には、測定高さにおいて、ステージ23に対し、プローブ26を相対的にスキャン経路に沿って移動させる場合が示されている。   FIG. 3 shows an example of the operation when the probe 26 is brought into contact with the workpiece W on the stage 23. (A) in the figure shows a case where the probe 26 is moved relative to the stage 23 to the position corresponding to the start position of the scan path at the reference height, and (b) shows the reference height. The case where the probe 26 is moved vertically downward from the height to the measurement height is shown. (C) in the drawing shows a case where the probe 26 is moved relative to the stage 23 along the scanning path at the measurement height.

プローブ26を用いた寸法測定では、プローブ26をワークWの側面に接触させる際の接触目標位置と、この接触目標位置を通るスキャン経路とが予め指定される。基準高さは、プローブ26がステージ23上のワークWと干渉しない高さである。水平駆動部24を制御することにより、基準高さにおいて、ステージ23に対し、プローブ26を相対的に水平方向に移動させることができる。なお、基準高さは、プローブ26の先端部が撮像部201又は206の被写界深度範囲の外側になるような高さに指定されるような構成であっても良い。   In dimension measurement using the probe 26, a contact target position when the probe 26 is brought into contact with the side surface of the workpiece W and a scan path passing through the contact target position are designated in advance. The reference height is a height at which the probe 26 does not interfere with the workpiece W on the stage 23. By controlling the horizontal drive unit 24, the probe 26 can be moved in the horizontal direction relative to the stage 23 at the reference height. The reference height may be configured to be specified such that the tip of the probe 26 is outside the depth of field range of the imaging unit 201 or 206.

測定高さは、プローブ26が接触すべきワーク側面の高さであり、鉛直方向の位置が基準高さよりも低い。垂直駆動部22は、ステージ23に対するプローブ26の高さを測定高さと、この測定高さよりも高い基準高さとに切り替える。ステージ23に対し、プローブ26を相対的にスキャン経路に沿って開始位置から終了位置に向かってスキャン方向に移動させれば、コンタクト部261をワークWの側面に接触させることができる。プローブ26がワークWの側面に接触したことが検知されれば、プローブ26はステージ23に対して直ちに停止する。   The measurement height is the height of the side surface of the workpiece that the probe 26 should contact, and the vertical position is lower than the reference height. The vertical drive unit 22 switches the height of the probe 26 with respect to the stage 23 between a measurement height and a reference height higher than the measurement height. If the probe 26 is moved relative to the stage 23 in the scanning direction from the start position to the end position along the scan path, the contact portion 261 can be brought into contact with the side surface of the workpiece W. If it is detected that the probe 26 contacts the side surface of the workpiece W, the probe 26 immediately stops with respect to the stage 23.

スキャン経路の開始位置は、上述したスキャン動作を開始させるための動作開始位置であり、終了位置は、スキャン動作を終了させるための動作終了位置である。終了位置を定めておくことにより、プローブ26が終了位置に到達した時点で接触エラーを検知することができる。スキャン経路の開始位置と終了位置は、接触目標位置を通り、かつ、ワークWの輪郭線の法線に沿ったスキャン経路上に設定される。   The start position of the scan path is an operation start position for starting the above-described scan operation, and the end position is an operation end position for ending the scan operation. By determining the end position, a contact error can be detected when the probe 26 reaches the end position. The start position and the end position of the scan path are set on a scan path that passes through the contact target position and extends along the normal line of the contour line of the workpiece W.

図4には、輪郭線14の位置を特定してワークWの側面間の距離Dを算出する場合が示されている。図中の(a)には、測定対象のワークWとこのワークWの右側面に接触させたプローブ26とが示されている。このワークWは、階段状の段差を有しており、上段の右側面と左側面との間の距離Dが測定される。   FIG. 4 shows a case where the distance D between the side surfaces of the workpiece W is calculated by specifying the position of the contour line 14. (A) in the drawing shows the workpiece W to be measured and the probe 26 brought into contact with the right side surface of the workpiece W. The workpiece W has a stepped step, and a distance D between the upper right side surface and the left side surface is measured.

図中の(b)には、透過照明により撮像された透過画像からなるワーク画像Iwが示されている。透過画像では、ワークWの外縁をエッジ抽出によって特定することは可能であるが、外縁よりも内側の輪郭線をエッジ抽出によって特定することは困難である。   (B) in the drawing shows a work image Iw composed of a transmission image captured by transmission illumination. In the transmission image, it is possible to specify the outer edge of the workpiece W by edge extraction, but it is difficult to specify the contour line inside the outer edge by edge extraction.

図中の(c)には、反射照明により撮像された反射画像からなるワーク画像Iwが示されている。反射照明は、同軸落射照明又はリング照明による照明方法であり、ワークWの外縁よりも内側の輪郭線であっても、エッジ抽出によって特定可能である。ところが、ワークWの上段部は、右側の上部が曲面形状であることから、左側面の輪郭線に比べ、右側面の輪郭線をエッジ抽出によって正確に特定することは難しい。この様な場合、プローブ26を接触させることにより、右側面の輪郭線14を正確に特定することができる。   (C) in the figure shows a work image Iw composed of a reflected image captured by reflected illumination. The reflected illumination is an illumination method using coaxial epi-illumination or ring illumination, and even a contour line inside the outer edge of the workpiece W can be specified by edge extraction. However, since the upper part of the workpiece W has a curved upper surface, it is difficult to accurately identify the right side contour line by edge extraction compared to the left side contour line. In such a case, the contour line 14 on the right side surface can be accurately specified by bringing the probe 26 into contact.

図中の(c)に示すワーク画像Iwには、プローブ26を接触させて特定した右側面の輪郭線14と、エッジ抽出領域15からエッジを抽出して特定した左側面の輪郭線14とが表示されている。   In the work image Iw shown in FIG. 5C, the right side outline 14 specified by contacting the probe 26 and the left side outline 14 specified by extracting an edge from the edge extraction region 15 are included. It is displayed.

プローブ26がワークWの側面に接触したことは、スキャン経路を移動中のコンタクト部261のワーク画像Iw上における位置が、所定時間内に所定の閾値以上変化したか否かによって検知することができる。コンタクト部261の位置は、例えば、コンタクト部261のエッジから円中心を求めることにより特定される。また、プローブ26がワークWの側面に接触した際のワーク画像Iw上において、撮像視野の中心に対するコンタクト部261の変位方向から、ワークWの側面の法線方向や接触位置13を特定することができる。   The contact of the probe 26 with the side surface of the workpiece W can be detected based on whether or not the position on the workpiece image Iw of the contact portion 261 moving along the scan path has changed by a predetermined threshold value or more within a predetermined time. . The position of the contact part 261 is specified by obtaining the center of the circle from the edge of the contact part 261, for example. Further, on the workpiece image Iw when the probe 26 contacts the side surface of the workpiece W, the normal direction of the side surface of the workpiece W and the contact position 13 can be specified from the displacement direction of the contact portion 261 with respect to the center of the imaging field of view. it can.

なお、プローブ26自体を水平に移動させるような構成の場合は、スキャン経路を移動中のコンタクト部261がワーク画像Iw上で停止したか否かにより、ワーク側面との接触が検知される。   In the case of a configuration in which the probe 26 itself is moved horizontally, contact with the workpiece side surface is detected depending on whether or not the contact portion 261 moving along the scan path has stopped on the workpiece image Iw.

コンタクト部261の形状は既知であるため、コンタクト部261の位置は公知のサーチ技術を使って高い精度で特定できる。従って、図4のワークWのように、エッジが丸みを帯びており2次元のワーク画像Iw上では精度良くエッジが検出できない場合であっても、コンタクト部261の位置からプローブ26とワークWの接触位置13の座標を特定することにより、画像上では検出が難しいエッジの寸法を高い精度で求めることができる。   Since the shape of the contact portion 261 is known, the position of the contact portion 261 can be specified with high accuracy using a known search technique. Therefore, even when the edge is rounded and the edge cannot be accurately detected on the two-dimensional workpiece image Iw as in the workpiece W in FIG. 4, the probe 26 and the workpiece W are positioned from the position of the contact portion 261. By specifying the coordinates of the contact position 13, the edge size that is difficult to detect on the image can be obtained with high accuracy.

接触位置13は、ワーク画像Iwからコンタクト部261の位置を特定し、コンタクト部261の半径に対応する距離だけ法線方向にオフセットさせることによって特定される。また、右側面の輪郭線14の位置は、複数の接触位置13に予め指定された幾何学図形をフィッティングさせることによって求められる。一方、左側面の輪郭線14の位置は、ワーク画像Iw上のエッジ抽出領域15からエッジ点を検出し、検出された複数のエッジ点に幾何学図形をフィッティングさせることによって求められる。この様にして特定された輪郭線14の位置に基づいて、右側面と左側面との距離Dが算出される。   The contact position 13 is specified by specifying the position of the contact portion 261 from the work image Iw and offsetting it in the normal direction by a distance corresponding to the radius of the contact portion 261. Further, the position of the contour line 14 on the right side surface is obtained by fitting a predetermined geometric figure to the plurality of contact positions 13. On the other hand, the position of the contour line 14 on the left side is obtained by detecting an edge point from the edge extraction region 15 on the work image Iw and fitting a geometric figure to the detected plurality of edge points. Based on the position of the contour line 14 specified in this way, the distance D between the right side surface and the left side surface is calculated.

<コントローラ3>
図5は、図1のコントローラ3の一構成例を示したブロック図である。このコントローラ3は、制御装置31及び記憶装置33により構成され、制御装置31と記憶装置33とがバス32を介して接続されている。制御装置31は、入力受付部311、表示制御部312、撮像制御部313、照明制御部314及び測定制御部315により構成される。本体2は、撮像部201,206及び垂直駆動部22からなるカメラ200と、水平駆動部24からなるステージ23と、切替駆動部27からなるプローブユニット260と、表示部21、透過照明ユニット25及び反射照明ユニット28とにより構成される。反射照明ユニット28は、同軸落射照明用光源209とリング照明ユニット211とにより構成される。
<Controller 3>
FIG. 5 is a block diagram showing a configuration example of the controller 3 of FIG. The controller 3 includes a control device 31 and a storage device 33, and the control device 31 and the storage device 33 are connected via a bus 32. The control device 31 includes an input receiving unit 311, a display control unit 312, an imaging control unit 313, an illumination control unit 314, and a measurement control unit 315. The main body 2 includes a camera 200 including imaging units 201 and 206 and a vertical driving unit 22, a stage 23 including a horizontal driving unit 24, a probe unit 260 including a switching driving unit 27, a display unit 21, a transmission illumination unit 25, and The reflection illumination unit 28 is used. The reflective illumination unit 28 includes a coaxial epi-illumination light source 209 and a ring illumination unit 211.

表示制御部312は、寸法測定のためのモデル画像や設定情報を表示部21に表示する。モデル画像は、例えば、マスターピースが撮影されたマスターピース画像であっても良いし、CAD(Computer Aided Design)により作成されたCADデータからなるCAD画像であっても良い。   The display control unit 312 displays a model image and setting information for dimension measurement on the display unit 21. The model image may be, for example, a master piece image obtained by photographing a master piece, or may be a CAD image made up of CAD data created by CAD (Computer Aided Design).

表示制御部312は、設計データから生成されたモデル画像を表示部21に表示する場合、ステージ23上に載置されたワークWを上方から撮像して得られた画像データを仮定して、設計データから生成されたモデル画像を表示する。この様にすれば、設計データから生成されたモデル画像であっても、撮像部201又は206により撮像されるワーク画像と同様のアングルで表示されるため、接触目標位置情報の指定を容易化することができる。   When displaying the model image generated from the design data on the display unit 21, the display control unit 312 assumes that the image data obtained by imaging the workpiece W placed on the stage 23 from above is designed. The model image generated from the data is displayed. In this way, even the model image generated from the design data is displayed at the same angle as the work image picked up by the image pickup unit 201 or 206, thereby facilitating specification of the contact target position information. be able to.

入力受付部311は、入力部4において受け付けられたユーザ操作に基づいて、撮像部201又は206からモデル画像を取得し、寸法測定を行うための各種の測定設定情報を記憶装置33に登録する処理を行う。   The input receiving unit 311 acquires a model image from the imaging unit 201 or 206 based on a user operation received by the input unit 4 and registers various measurement setting information for measuring dimensions in the storage device 33. I do.

撮像制御部313は、記憶装置33に登録された測定設定情報に基づいて、撮像部201及び206を制御し、撮影倍率の切替、撮像タイミングや露光時間の調整を行う。照明制御部314は、記憶装置33に登録された測定設定情報に基づいて、透過照明ユニット25、同軸落射照明用光源209、リング照明ユニット211及びプローブ用光源263の点灯制御を行う。例えば、画像測定からプローブ測定に切り替えられれば、照明制御部314は、プローブ用光源263を点灯させる一方、透過照明ユニット25、同軸落射照明用光源209及びリング照明ユニット211を消灯する。   The imaging control unit 313 controls the imaging units 201 and 206 based on the measurement setting information registered in the storage device 33, and performs switching of imaging magnification and adjustment of imaging timing and exposure time. The illumination control unit 314 performs lighting control of the transmitted illumination unit 25, the coaxial incident illumination light source 209, the ring illumination unit 211, and the probe light source 263 based on the measurement setting information registered in the storage device 33. For example, when switching from image measurement to probe measurement, the illumination control unit 314 turns on the probe light source 263 while turning off the transmitted illumination unit 25, the coaxial incident illumination light source 209, and the ring illumination unit 211.

測定制御部315は、記憶装置33に登録された測定設定情報に基づいて、垂直駆動部22、水平駆動部24及び切替駆動部27を制御し、撮像部201又は206からワーク画像Iwを取得して寸法測定を行う。   The measurement control unit 315 controls the vertical drive unit 22, the horizontal drive unit 24, and the switching drive unit 27 based on the measurement setting information registered in the storage device 33, and acquires the work image Iw from the imaging unit 201 or 206. Measure the dimensions.

<入力受付部311>
図6は、図5の入力受付部311の一構成例を示したブロック図である。この入力受付部311は、撮像及び照明条件指定部341、エッジ抽出領域指定部342、接触位置指定部343、測定設定部344、設計値及び公差指定部345及び特徴量情報設定部346により構成される。
<Input reception unit 311>
FIG. 6 is a block diagram illustrating a configuration example of the input receiving unit 311 in FIG. The input receiving unit 311 includes an imaging and illumination condition specifying unit 341, an edge extraction region specifying unit 342, a contact position specifying unit 343, a measurement setting unit 344, a design value and tolerance specifying unit 345, and a feature amount information setting unit 346. The

撮像及び照明条件指定部341は、ユーザの指示に基づいて、撮影倍率、露光時間、ゲイン等の撮像条件と、照明種別、明るさ、リング照明ユニットの高さ等の照明条件とを指定し、記憶装置33に測定設定情報として登録する。   The imaging and illumination condition designating unit 341 designates imaging conditions such as imaging magnification, exposure time, and gain, and illumination conditions such as illumination type, brightness, and height of the ring illumination unit based on a user instruction. Registered as measurement setting information in the storage device 33.

エッジ抽出領域指定部342は、ユーザの指示に基づいて、モデル画像上でエッジ抽出領域を特徴量情報、例えば、パターン画像に対する相対的な座標値として指定し、記憶装置33にエッジ抽出領域情報として登録する。   The edge extraction region designation unit 342 designates the edge extraction region on the model image as feature amount information, for example, a relative coordinate value with respect to the pattern image, based on the user's instruction, and stores it as edge extraction region information in the storage device 33. sign up.

接触位置指定部343は、表示部21に表示されたモデル画像上で、プローブ26が接触すべきワークWの側面の複数の接触目標位置を示す接触目標位置情報の指定を受け付ける。すなわち、接触位置指定部343は、プローブ26が接触すべき複数の接触目標位置にプローブ26を接触させるためのプローブ動作を決定する接触目標位置情報を特徴量情報(パターン画像)に対する相対的な座標値として指定し、記憶装置33内に登録する。接触目標位置情報は、接触目標位置、スキャン動作開始位置及びスキャン動作終了位置からなる。   The contact position designation unit 343 accepts designation of contact target position information indicating a plurality of contact target positions on the side surface of the work W to be contacted by the probe 26 on the model image displayed on the display unit 21. That is, the contact position designating unit 343 sets the contact target position information for determining the probe operation for bringing the probe 26 into contact with a plurality of contact target positions to be contacted by the probe 26 with relative coordinates with respect to the feature amount information (pattern image). It is designated as a value and registered in the storage device 33. The contact target position information includes a contact target position, a scan operation start position, and a scan operation end position.

接触目標位置には、モデル画像上で登録されたパターン画像(サーチ用データ)に対する相対的な位置座標と、プローブ26が接触すべきワーク側面の高さを示す測定高さとが含まれる。測定高さは、例えば、ユーザによって予め指定される。   The contact target position includes a relative position coordinate with respect to the pattern image (search data) registered on the model image, and a measurement height indicating the height of the side surface of the workpiece to which the probe 26 should contact. The measurement height is designated in advance by the user, for example.

測定設定部344は、エッジ抽出領域指定部342により指定されたエッジ抽出領域の中から、モデル画像上に存在するワークWのエッジを抽出し、また、プローブ26を接触目標位置に接触させて、プローブ26を撮像することにより、プローブ26とモデル画像上に存在するワークWとの接触位置を特定し、これらのエッジ又は接触位置に基づいて、モデル画像上から測定の基準とする輪郭線や、基準点を特定する。特定された輪郭線や基準点に基づいて、測定要素(たとえば、直線、円、円弧など)が特定される。なお、特徴量情報がCADデータである場合、輪郭線や基準点は、エッジ抽出によらず直接に特定される。   The measurement setting unit 344 extracts the edge of the workpiece W existing on the model image from the edge extraction region designated by the edge extraction region designation unit 342, and brings the probe 26 into contact with the contact target position, By imaging the probe 26, the contact position between the probe 26 and the workpiece W existing on the model image is specified, and based on these edges or contact positions, a contour line as a measurement reference from the model image, Identify the reference point. A measurement element (for example, a straight line, a circle, an arc, etc.) is specified based on the specified contour line or reference point. When the feature amount information is CAD data, the contour line and the reference point are specified directly without edge extraction.

測定設定部344は、ユーザの指示に基づいて、上述した処理により特定された測定要素の中から、測定の対象とする要素を選択し、記憶装置33に測定箇所情報として登録する。測定要素は、特定された輪郭線や基準点から新たに作成された補助線(点)に基づいて特定することもできる。補助線(点)としては、例えば、2つの輪郭線の交点や円中心などが挙げられる。測定設定部344は、さらに選択された測定要素が円や円弧の場合にその半径や直径、2つの直線が選択されている場合に直線間の距離などを測定対象として指定することができる。   The measurement setting unit 344 selects an element to be measured from the measurement elements specified by the above-described processing based on a user instruction, and registers the selected element in the storage device 33 as measurement location information. The measurement element can also be specified based on an auxiliary line (point) newly created from the specified contour line or reference point. Examples of the auxiliary line (point) include an intersection of two contour lines and a circle center. The measurement setting unit 344 can specify the radius and diameter when the selected measurement element is a circle or an arc, and the distance between the straight lines when the two straight lines are selected as the measurement target.

設計値及び公差指定部345は、ユーザの指示に基づいて、良否判定のための設計値及び公差を指定し、記憶装置33に測定設定情報として登録する。   The design value and tolerance designation unit 345 designates the design value and tolerance for pass / fail judgment based on the user's instruction, and registers the design value and tolerance in the storage device 33 as measurement setting information.

特徴量情報設定部346は、測定実行時に撮像部201又は206により撮像されたワーク画像からワークWの位置及び姿勢を特定するための特徴量情報を設定する。すなわち、特徴量情報設定部346は、ユーザの指示に基づいて、モデル画像に基づいてワークWの位置及び姿勢を特定するためのサーチ用データからなる特徴量情報を設定し、記憶装置33に測定設定情報として登録する。例えば、特徴量情報は、正規化相関サーチ用のパターン画像(データ)であり、マスターピースが撮影されたマスターピース画像に基づいて設定される。記憶装置33には、特徴量情報設定部346により設定されたパターン画像と接触位置指定部343により指定された接触目標位置情報とが同一の座標上で記憶される。   The feature amount information setting unit 346 sets feature amount information for specifying the position and orientation of the workpiece W from the workpiece image captured by the imaging unit 201 or 206 when performing measurement. That is, the feature amount information setting unit 346 sets feature amount information including search data for specifying the position and orientation of the workpiece W based on the model image based on the user's instruction, and measures the feature amount information in the storage device 33. Register as setting information. For example, the feature amount information is a pattern image (data) for normalized correlation search, and is set based on a master piece image obtained by photographing a master piece. The storage device 33 stores the pattern image set by the feature amount information setting unit 346 and the contact target position information specified by the contact position specifying unit 343 on the same coordinates.

モデル画像上で特徴が多い箇所をユーザが指定することによりパターン画像が登録されるようにしても良いし、画像全体が自動的にパターン画像として登録されるようにしても良い。また、モデル画像から特徴部分を抽出してパターン画像が自動的に登録されるようにしても良い。   The pattern image may be registered by the user specifying a portion having many features on the model image, or the entire image may be automatically registered as the pattern image. In addition, a pattern image may be automatically registered by extracting a feature portion from a model image.

登録されたパターン画像と検査対象ワークWを撮像したワーク画像をマッチングすることにより、ワーク画像内のワークWの位置及び姿勢(座標)を特定できる。マッチングには公知のマッチング技術、例えば、正規化相関サーチや幾何サーチ等が利用できる。なお、モデル画像がCAD画像であれば、CADデータに基づいて、特徴量情報を指定することもできる。   By matching the registered pattern image and the work image obtained by imaging the inspection target work W, the position and orientation (coordinates) of the work W in the work image can be specified. For matching, a known matching technique such as normalized correlation search or geometric search can be used. Note that if the model image is a CAD image, the feature amount information can be specified based on the CAD data.

上述したように、本実施の形態によれば、モデル画像上で登録されたパターン画像(サーチ用データ)に対する相対的な座標値として、プローブ26による接触目標位置情報とエッジ抽出領域が指定される。接触目標位置情報には、プローブ26を接触させる目標位置である接触目標位置、スキャン動作を開始させる位置であるスキャン動作開始位置、スキャン動作を終了させる位置であるスキャン動作終了位置、接触すべきワーク側面の高さを示す測定高さなどが含まれる。   As described above, according to the present embodiment, the contact target position information and the edge extraction region by the probe 26 are designated as relative coordinate values with respect to the pattern image (search data) registered on the model image. . The contact target position information includes a contact target position that is a target position for contacting the probe 26, a scan operation start position that is a position for starting a scan operation, a scan operation end position that is a position for ending the scan operation, and a work to be contacted Measurement height indicating the height of the side is included.

使用者が、検査対象のワークWをステージ23に載置してワーク画像を取得し、パターン画像(サーチ用データ)を用いたマッチング処理を実行することにより、プローブ26による接触目標位置と、エッジ抽出領域が自動的に特定できる。特定された接触目標位置に従って、プローブ26をワーク側面に順次接触させることにより、ワークWの輪郭線が特定される。なお、直線状の輪郭線を特定するためには、2点以上の接触位置の座標情報が必要となり、円状あるいは円弧状の輪郭線を特定するためには、3点以上の接触位置の座標情報が必要となる。また、必ずしも2点以上の接触位置が必要ではなく、ある特定の点の測定を行いたい場合は、1点の接触位置の座標情報を測定に用いることもできる。   A user obtains a workpiece image by placing the workpiece W to be inspected on the stage 23, and executes a matching process using a pattern image (search data). Extraction area can be specified automatically. The outline of the workpiece W is specified by sequentially bringing the probe 26 into contact with the side surface of the workpiece according to the specified contact target position. In addition, in order to specify a linear outline, coordinate information of two or more contact positions is required, and in order to specify a circular or arc-shaped outline, the coordinates of three or more contact positions are required. Information is needed. In addition, two or more contact positions are not necessarily required, and when it is desired to measure a specific point, the coordinate information of one contact position can be used for the measurement.

入力受付部311は、表示部21に表示されたモデル画像上で、プローブ26による測定を行う測定要素の指定を受け付ける。表示部21に表示中のモデル画像は、測定設定用のワークWが撮像されたワーク画像である。記憶装置33には、入力受付部311により指定可能な測定要素の形状種別又は大きさと、プローブ26の接触目標位置の配置位置との関係を規定した配置ルールが予め記憶される。配置ルールは、測定要素の形状種別又は大きさに応じて、接触目標位置を適切に指定するための情報である。配置ルールは、例えば、測定要素の形状種別や大きさと接触目標位置の数とを対応づけるテーブル、関数又は演算式からなる。   The input accepting unit 311 accepts designation of a measurement element to be measured by the probe 26 on the model image displayed on the display unit 21. The model image being displayed on the display unit 21 is a work image obtained by capturing the work W for measurement setting. The storage device 33 stores in advance an arrangement rule that defines the relationship between the shape type or size of the measurement element that can be designated by the input reception unit 311 and the arrangement position of the contact target position of the probe 26. The arrangement rule is information for appropriately specifying the contact target position according to the shape type or size of the measurement element. The arrangement rule includes, for example, a table, a function, or an arithmetic expression that associates the shape type and size of the measurement element with the number of contact target positions.

配置ルールは、例えば、測定要素の形状種別が円又は円弧である場合、当該円又は円弧の周方向に3以上の接触目標位置が等間隔に配置されるように定められている。また、配置ルールは、形状種別が直線である場合、当該直線の方向に2以上の接触目標位置が等間隔に配置されるように定められている。   For example, when the shape type of the measurement element is a circle or an arc, the arrangement rule is determined so that three or more contact target positions are arranged at equal intervals in the circumferential direction of the circle or arc. In addition, when the shape type is a straight line, the arrangement rule is determined so that two or more contact target positions are arranged at equal intervals in the direction of the straight line.

測定制御部315は、測定実行時に、上記入力受付部により指定された測定要素の位置と、測定要素の形状種別又は大きさと、上記記憶部に記憶された配置ルールとに従って、上記プローブの接触目標位置を特定し、特定された上記複数の接触目標位置に上記プローブが順次に移動するように上記水平駆動部を制御する。   The measurement control unit 315 performs the contact target of the probe according to the position of the measurement element designated by the input receiving unit, the shape type or size of the measurement element, and the arrangement rule stored in the storage unit when performing measurement. The position is specified, and the horizontal drive unit is controlled so that the probe sequentially moves to the specified plurality of contact target positions.

接触位置指定部343は、測定要素上にエッジ抽出領域が設定された場合に、表示中のモデル画像に対し、エッジ抽出領域からエッジを抽出して輪郭線を求め、輪郭線上の位置として複数の接触目標位置を指定するとともに、接触目標位置から輪郭線の法線方向に離間した位置として、プローブ26を接近させるスキャン動作の開始位置を指定する。   When an edge extraction region is set on the measurement element, the contact position designation unit 343 obtains a contour line by extracting an edge from the edge extraction region with respect to the model image being displayed, and obtains a plurality of positions as the positions on the contour line. A contact target position is designated, and a start position of a scanning operation for approaching the probe 26 is designated as a position separated from the contact target position in the normal direction of the contour line.

表示部21には、スキャン動作の開始位置を示すシンボルがモデル画像上に表示され、接触位置指定部343は、スキャン動作の開始位置、輪郭線上における接触目標位置の数、プローブ26を接近させるスキャン方向及び高さ情報を変更するためのユーザ操作を受け付ける。   The display unit 21 displays a symbol indicating the start position of the scan operation on the model image, and the contact position specifying unit 343 scans the probe 26 to approach the start position of the scan operation, the number of contact target positions on the contour line. A user operation for changing the direction and height information is received.

図7は、図5の入力受付部311における接触位置指定時の動作の一例を示した図である。図中の(a)には、パターン画像Ip及び接触目標位置情報を登録するためのワークWが示されている。このワークWは、ベース部材w上に形成された突出部wの両外側が曲面形状であり、突出部wの側面間の距離Dがプローブ26を用いて測定される。 FIG. 7 is a diagram illustrating an example of an operation at the time of designating a contact position in the input receiving unit 311 in FIG. (A) in the figure shows a work W for registering the pattern image Ip and the target contact position information. In this work W, both outer sides of the protruding part w 2 formed on the base member w 1 have a curved shape, and the distance D between the side surfaces of the protruding part w 2 is measured using the probe 26.

モデル画像Imは、反射照明により撮像された反射画像であり、ワークWを含む一部の領域がパターン画像Ipとして登録される。このパターン画像Ipと接触目標位置情報との関連づけには、例えば、以下の(b)〜(d)に示すように3通りの方法がある。   The model image Im is a reflected image captured by reflected illumination, and a partial area including the workpiece W is registered as the pattern image Ip. There are three methods for associating the pattern image Ip with the contact target position information, for example, as shown in the following (b) to (d).

図中の(b)には、パターン画像Ipと接触目標位置とを直接に関連づける場合が示されている。例えば、パターン画像Ipに対し、スキャン動作の開始位置と終了位置を指定することにより、接触目標位置が自動的に特定される。開始位置や終了位置は、プローブ26を示すシンボルSmやスキャン方向を示す矢印Yをマウス操作によって移動させることによって指定することができる。なお、接触目標位置を指定することにより、スキャン動作の開始位置と終了位置を自動的に決定しても良い。この様にパターン画像Ipと接触目標位置とを直接に関連づけることにより、パターン画像(サーチ用データ)に対して接触目標位置座標が相対的に記憶される。   (B) in the figure shows a case where the pattern image Ip and the contact target position are directly associated with each other. For example, by designating the start position and end position of the scanning operation for the pattern image Ip, the contact target position is automatically specified. The start position and the end position can be specified by moving the symbol Sm indicating the probe 26 and the arrow Y indicating the scanning direction by operating the mouse. Note that the start position and end position of the scanning operation may be automatically determined by designating the contact target position. In this way, the contact target position coordinates are stored relative to the pattern image (search data) by directly associating the pattern image Ip with the contact target position.

図中の(c)には、エッジ抽出領域Rからエッジを抽出して特定される輪郭線Lと接触目標位置とを関連づける場合が示されている。パターン画像Ip上で指定されたエッジ抽出領域Rからエッジ点を抽出し、抽出されたエッジ点列にフィッティングする輪郭線Lが特定される。この輪郭線Lに対して接触目標位置を指定することにより、パターン画像Ipと接触目標位置とが間接的に関連づけられる。検査時に入力されるワーク画像上のエッジ抽出領域Rの位置座標は、ワーク画像と、パターン画像(サーチ用データ)とをマッチングすることにより、自動的に特定される。位置が特定されたエッジ抽出領域R内のエッジ点列が抽出され、このエッジ点列から特定される輪郭線Lに対して予め定めた位置に接触目標位置が設定される。例えば、スキャン方向が輪郭線Lに対して法線方向に所定距離離れた位置から接近する方向に設定されている場合、輪郭線Lの法線に沿って安定的にアプローチできるため、測定が安定する。   (C) in the drawing shows a case where the contour line L specified by extracting an edge from the edge extraction region R and the contact target position are associated with each other. An edge point is extracted from the edge extraction region R designated on the pattern image Ip, and a contour line L to be fitted to the extracted edge point sequence is specified. By designating the contact target position with respect to the contour line L, the pattern image Ip and the contact target position are indirectly associated. The position coordinates of the edge extraction region R on the workpiece image input at the time of inspection are automatically specified by matching the workpiece image with the pattern image (search data). An edge point sequence in the edge extraction region R whose position has been specified is extracted, and a contact target position is set at a predetermined position with respect to the contour line L specified from the edge point sequence. For example, when the scanning direction is set to a direction approaching from a position that is a predetermined distance away from the contour line L in the normal direction, the approach can be stably approached along the normal line of the contour line L, so that the measurement is stable. To do.

図中の(d)には、エッジ抽出領域Rと接触目標位置とを関連づける場合が示されている。パターン画像Ip上で指定されたエッジ抽出領域Rに対して、接触目標位置を指定することにより、パターン画像Ipと接触目標位置とが間接的に関連づけられる。上述したマッチング処理によりエッジ抽出領域Rの位置座標が特定されると同時に、接触目標位置座標が特定される。   (D) in the figure shows a case where the edge extraction region R and the contact target position are associated with each other. By designating the contact target position for the edge extraction region R designated on the pattern image Ip, the pattern image Ip and the contact target position are indirectly associated. The position coordinates of the edge extraction region R are specified by the matching process described above, and at the same time, the target contact position coordinates are specified.

図8は、図5の入力受付部311におけるパターン画像登録時の動作の一例を示した図であり、図7の(a)に示したワークWを透過照明により撮像した場合のモデル画像Imが示されている。このモデル画像Imの一部がサーチ用のパターン画像Ipとして登録される。この様にサーチ用のパターン画像Ipには、透過照明で撮像された透過画像を用いる一方、接触目標位置の指定には、反射照明で撮像された反射画像を用いることができる。   FIG. 8 is a diagram illustrating an example of an operation at the time of pattern image registration in the input reception unit 311 in FIG. 5. A model image Im when the workpiece W illustrated in FIG. It is shown. A part of the model image Im is registered as a pattern image Ip for search. In this way, a transmitted image captured with transmitted illumination is used as the search pattern image Ip, while a reflected image captured with reflected illumination can be used to specify the contact target position.

一般に透過照明で撮像された透過画像ははっきりとしたエッジが得られる他、周囲環境の変化による画像の変化も小さい。従って、透過照明で撮像した透過画像に基づいて、パターン画像を登録する一方で、透過照明では取得できない非貫通のワーク形状に存在する内側の輪郭の寸法を測定するために、反射照明で撮像された反射画像に基づいてプローブ26による接触目標位置の指定を行うことができる。この様にパターン画像を登録する際の照明条件と、接触目標位置やエッジ抽出領域を登録する際の照明条件とは異ならせることができる。また、連続測定時の照明条件を設定時の照明条件と同じにするために、設定時の照明条件が測定設定情報として登録される。   In general, a transmitted image captured with transmitted illumination provides a clear edge, and changes in the image due to changes in the surrounding environment are small. Therefore, while registering a pattern image based on a transmission image captured with transmission illumination, it is captured with reflection illumination in order to measure the dimension of the inner contour existing in a non-penetrating workpiece shape that cannot be obtained with transmission illumination. The contact target position can be designated by the probe 26 based on the reflected image. In this way, the illumination condition for registering the pattern image can be different from the illumination condition for registering the contact target position and the edge extraction region. Further, in order to make the illumination condition at the time of continuous measurement the same as the illumination condition at the time of setting, the illumination condition at the time of setting is registered as measurement setting information.

上述したように設定時にモデル画像Im上で登録されたパターン画像(サーチ用データ)と、検査時に入力されたワーク画像とをマッチングすることにより、直接的、または間接的に接触目標位置が特定される。プローブ26によりスキャンすべき位置が特定されると、プローブ26の動作計画が決定し、測定制御部315がプローブ26の動作を制御する。   As described above, the target contact position is specified directly or indirectly by matching the pattern image (search data) registered on the model image Im at the time of setting with the work image input at the time of inspection. The When the position to be scanned is specified by the probe 26, the operation plan of the probe 26 is determined, and the measurement control unit 315 controls the operation of the probe 26.

図9は、図5の入力受付部311における接触位置指定時の動作の一例を示した図であり、形状種別とスキャン経路の本数とを対応づけたテーブルが示されている。図中の(a)には、分割数が固定である場合のテーブルが示されている。このテーブルは、測定対象の形状種別とスキャン経路の本数とを対応づけた配置基準であり、3つの形状種別(直線、円及び円弧)について、スキャン経路の本数及び分割数が規定されている。   FIG. 9 is a diagram showing an example of the operation at the time of designating the contact position in the input reception unit 311 in FIG. 5, and shows a table in which the shape type and the number of scan paths are associated with each other. (A) in the figure shows a table when the number of divisions is fixed. This table is an arrangement reference that associates the shape type of the measurement target with the number of scan paths, and the number of scan paths and the number of divisions are defined for three shape types (straight line, circle, and arc).

具体的には、形状種別が直線であれば、分割数=3であり、直線を3等分するように2本のスキャン経路が配置される。また、形状種別が円であれば、分割数=3であり、円周を3等分するように3本のスキャン経路が配置される。形状種別が円弧であれば、分割数=4であり、円弧を4等分するように3本のスキャン経路が配置される。   Specifically, if the shape type is a straight line, the number of divisions is 3, and two scan paths are arranged so as to divide the straight line into three equal parts. If the shape type is a circle, the number of divisions is 3, and three scan paths are arranged so that the circumference is equally divided into three. If the shape type is an arc, the number of divisions is 4, and three scan paths are arranged to divide the arc into four equal parts.

図中の(b)には、分割数が測定対象のサイズに応じて可変である場合のテーブルが示されている。このテーブルは、測定対象の形状種別及びサイズとスキャン経路の本数とを対応づけた配置基準であり、3つの形状種別(直線、円及び円弧)について、スキャン経路の本数が規定されている。   (B) in the figure shows a table when the number of divisions is variable according to the size of the measurement target. This table is an arrangement reference that associates the shape type and size of the measurement target with the number of scan paths, and the number of scan paths is defined for three shape types (straight line, circle, and arc).

具体的には、形状種別が直線である場合、輪郭線Lの長さが閾値TH未満であれば、分割数=3であり、直線を3等分するように2本のスキャン経路が配置される。一方、輪郭線Lの長さが閾値TH以上であれば、分割数=4であり、直線を4等分するように3本のスキャン経路が配置される。また、形状種別が円である場合、輪郭線Lの長さが閾値TH未満であれば、分割数=3であり、円周を3等分するように3本のスキャン経路が配置される。一方、輪郭線Lの長さが閾値TH以上であれば、分割数=4であり、円周を4等分するように4本のスキャン経路が配置される。形状種別が円弧である場合、輪郭線Lの長さが閾値TH未満であれば、分割数=4であり、円弧を4等分するように3本のスキャン経路が配置される。一方、輪郭線Lの長さが閾値TH以上であれば、分割数=5であり、円弧を5等分するように4本のスキャン経路が配置される。   Specifically, when the shape type is a straight line and the length of the contour line L is less than the threshold value TH, the number of divisions is 3, and two scan paths are arranged so as to divide the straight line into three equal parts. The On the other hand, if the length of the contour line L is equal to or greater than the threshold value TH, the number of divisions is 4, and three scan paths are arranged to divide the straight line into four equal parts. When the shape type is a circle and the length of the contour line L is less than the threshold value TH, the number of divisions is 3, and three scan paths are arranged so as to divide the circumference into three equal parts. On the other hand, if the length of the contour line L is equal to or greater than the threshold value TH, the number of divisions is 4, and four scan paths are arranged so as to divide the circumference into four equal parts. When the shape type is an arc, if the length of the contour line L is less than the threshold TH, the number of divisions is 4, and three scan paths are arranged so as to divide the arc into four equal parts. On the other hand, if the length of the contour line L is equal to or greater than the threshold value TH, the number of divisions is 5, and four scan paths are arranged so as to divide the arc into five equal parts.

図10は、図5の入力受付部311における接触位置指定時の動作の一例を示した図であり、輪郭線Lの長さに応じてスキャン経路の本数が異なる場合が示されている。図中の(a)には、形状種別が直線である場合が示され、(b)には、形状種別が円である場合が示されている。   FIG. 10 is a diagram illustrating an example of the operation at the time of designating the contact position in the input receiving unit 311 in FIG. 5, and shows a case where the number of scan paths differs according to the length of the contour line L. In the figure, (a) shows a case where the shape type is a straight line, and (b) shows a case where the shape type is a circle.

ユーザによりモデル画像Im上でエッジ抽出領域Rが測定対象領域として指定されれば、エッジ抽出領域Rからエッジを抽出して特定された輪郭線Lに対し、接触目標位置が指定される。例えば、接触目標位置は、輪郭線Lの端点から一定間隔ごとに指定される。輪郭線Lの形状種別が直線であれば、2箇所以上の接触目標位置が指定され、輪郭線Lの形状種別が円又は円弧であれば、3箇所以上の接触目標位置が指定される。この場合、輪郭線L上に指定される接触目標位置の数は、輪郭線Lの長さに応じて異なる。なお、輪郭線Lは、マウス操作などによって直接に指定されるようなものであっても良い。   If the edge extraction region R is specified as a measurement target region on the model image Im by the user, the contact target position is specified for the contour line L specified by extracting the edge from the edge extraction region R. For example, the contact target position is designated at regular intervals from the end point of the contour line L. If the shape type of the contour line L is a straight line, two or more contact target positions are specified, and if the shape type of the contour line L is a circle or an arc, three or more contact target positions are specified. In this case, the number of contact target positions designated on the contour line L varies depending on the length of the contour line L. Note that the contour line L may be specified directly by a mouse operation or the like.

また、図示したスキャン経路のように、3以上の分割数nを指定することにより、輪郭線Lを等分割するn本又は(n−1)本のスキャン経路が指定されるようにしても良い。具体的には、図10の(a)に示す通り、輪郭線Lの形状種別が直線であれば、輪郭線Lの長さが一定値未満である場合に分割数を3とし、輪郭線Lを等分割する2本のスキャン経路が指定される。一方、輪郭線Lの長さが一定値以上である場合には分割数を4とし、輪郭線Lを等分割する3本のスキャン経路が指定される。   Further, as shown in the illustrated scan path, n or (n-1) scan paths for equally dividing the contour line L may be specified by designating a division number n of 3 or more. . Specifically, as shown in FIG. 10A, if the shape type of the contour line L is a straight line, the number of divisions is set to 3 when the length of the contour line L is less than a certain value, and the contour line L Two scan paths that equally divide are designated. On the other hand, when the length of the contour line L is equal to or greater than a certain value, the number of divisions is set to 4, and three scan paths for equally dividing the contour line L are designated.

また、図10の(b)に示す通り、形状種別が円であれば、半径が一定値未満である場合に分割数を3とし、輪郭線Lを等分割する3本のスキャン経路が指定される。一方、半径が一定値以上である場合には分割数を4とし、輪郭線Lを等分割する4本のスキャン経路が指定される。   Further, as shown in FIG. 10B, if the shape type is a circle, the number of divisions is set to 3 when the radius is less than a certain value, and three scan paths for equally dividing the contour line L are designated. The On the other hand, when the radius is equal to or larger than a certain value, the number of divisions is set to 4, and four scan paths for equally dividing the contour line L are designated.

スキャン経路の開始位置は、接触目標位置から輪郭線Lに垂直な方向に一定距離だけ離間した位置として指定される。スキャン経路の終了位置は、輪郭線Lを挟んで開始位置とは反対側の位置として指定される。また、モデル画像Imから抽出されたエッジの両側の輝度差に基づいて、プローブ26をワークWの側面に近づける際のスキャン方向が決定される。なお、スキャン経路の開始位置と終了位置の決め方は上記の方法に限定されない。スキャン経路の開始位置と終了位置は、接触目標位置に対して相対的に定められていれば良い。   The start position of the scan path is designated as a position that is separated from the contact target position by a certain distance in the direction perpendicular to the contour line L. The end position of the scan path is designated as a position on the opposite side of the start position across the contour line L. Further, based on the luminance difference between both sides of the edge extracted from the model image Im, the scanning direction for bringing the probe 26 close to the side surface of the workpiece W is determined. The method for determining the start position and end position of the scan path is not limited to the above method. The start position and the end position of the scan path may be determined relative to the contact target position.

<測定制御部315>
図11は、図5の測定制御部315の一構成例を示したブロック図である。この測定制御部315は、サーチ処理部351、エッジ抽出領域特定部352、エッジ抽出処理部353、スキャン動作決定部354、スキャン動作制御部355、プローブ検出部356、接触位置特定部357、輪郭線算出部358及び寸法算出部359により構成される。
<Measurement control unit 315>
FIG. 11 is a block diagram illustrating a configuration example of the measurement control unit 315 in FIG. The measurement control unit 315 includes a search processing unit 351, an edge extraction region specifying unit 352, an edge extraction processing unit 353, a scan operation determining unit 354, a scan operation control unit 355, a probe detection unit 356, a contact position specifying unit 357, an outline The calculation unit 358 and the dimension calculation unit 359 are configured.

サーチ処理部351は、撮像部201又は206からワーク画像を取得し、記憶装置33内の特徴量情報に基づいて、ワークWの位置及び姿勢を特定する。位置及び姿勢の特定は、パターンサーチにより行われる。このサーチ処理部351は、プローブ26が撮像視野外の退避位置にある状態で生成されたワーク画像を取得し、当該ワーク画像からワークWの位置及び姿勢を特定する。   The search processing unit 351 acquires a work image from the imaging unit 201 or 206 and specifies the position and orientation of the work W based on the feature amount information in the storage device 33. The position and orientation are specified by pattern search. The search processing unit 351 acquires a workpiece image generated in a state where the probe 26 is at the retracted position outside the imaging field of view, and specifies the position and orientation of the workpiece W from the workpiece image.

エッジ抽出領域特定部352は、サーチ処理部351により特定されたワークWの位置及び姿勢とエッジ抽出領域情報とに基づいて、ワーク画像上のエッジ抽出領域を特定する。エッジ抽出処理部353は、エッジ抽出領域特定部352により特定されたエッジ抽出領域からエッジ点を抽出する。   The edge extraction region specifying unit 352 specifies an edge extraction region on the workpiece image based on the position and posture of the workpiece W specified by the search processing unit 351 and the edge extraction region information. The edge extraction processing unit 353 extracts edge points from the edge extraction region specified by the edge extraction region specifying unit 352.

スキャン動作決定部354は、エッジ抽出処理部353により抽出された複数のエッジ点に形状種別として予め指定された幾何学図形をフィッティングさせることにより、輪郭線の位置を特定し、接触目標位置情報に基づいて、開始位置やスキャン方向を特定することにより、スキャン動作を決定する。   The scanning operation determination unit 354 specifies the position of the contour line by fitting a geometric figure previously specified as a shape type to the plurality of edge points extracted by the edge extraction processing unit 353, and sets the position as the contact target position information. Based on this, the scan operation is determined by specifying the start position and the scan direction.

スキャン動作制御部355は、スキャン動作決定部354により決定されたスキャン動作に従って、本体2の垂直駆動部22、水平駆動部24及び切替駆動部27を制御する。スキャン動作制御部355は、例えば、切替駆動部27を制御してプローブ26を退避位置から測定位置に切り替えた後、複数の接触目標位置にプローブ26が順次に移動するように水平駆動部24を制御する。   The scan operation control unit 355 controls the vertical drive unit 22, the horizontal drive unit 24, and the switching drive unit 27 of the main body 2 according to the scan operation determined by the scan operation determination unit 354. For example, the scan operation control unit 355 controls the switching drive unit 27 to switch the probe 26 from the retracted position to the measurement position, and then moves the horizontal drive unit 24 so that the probe 26 sequentially moves to a plurality of contact target positions. Control.

プローブ検出部356は、プローブ26がワークWの側面に接触したことを検出する。例えば、撮像部201又は206からワーク画像を繰り返し取得し、スキャン経路を移動中のプローブ26のワーク画像上における位置が一定時間内に一定の閾値以上変化すれば、プローブ26がワークWの側面に接触したと判断される。なお、プローブ26に物理的な接触を検知するセンサを設けてもよい。   The probe detection unit 356 detects that the probe 26 has contacted the side surface of the workpiece W. For example, when a workpiece image is repeatedly acquired from the imaging unit 201 or 206 and the position of the probe 26 moving on the scan path on the workpiece image changes by a certain threshold value within a certain time, the probe 26 is placed on the side surface of the workpiece W. Judged to have touched. A sensor for detecting physical contact may be provided on the probe 26.

接触位置特定部357は、プローブ26がワークWの側面に接触したことが検出されれば、ワークWの側面に接触した状態のプローブ26が撮影されたワーク画像を取得し、当該ワーク画像上におけるプローブ26の位置から接触位置を特定する。ワーク画像上のプローブ26の位置と、ステージ23に対する撮像視野の相対位置とに基づいて、プローブ26がワークWに接触した複数の接触位置が特定される。   When it is detected that the probe 26 is in contact with the side surface of the workpiece W, the contact position specifying unit 357 acquires a workpiece image in which the probe 26 in contact with the side surface of the workpiece W is photographed, The contact position is specified from the position of the probe 26. Based on the position of the probe 26 on the workpiece image and the relative position of the imaging field of view with respect to the stage 23, a plurality of contact positions where the probe 26 has contacted the workpiece W are specified.

ステージ23に対する撮像視野の相対位置は、水平駆動部24から入力される。水平駆動部24から入力されたグローバル座標系内における撮像視野(カメラ200又はステージ23の相対位置)の位置座標と、撮像視野内のローカル座標系内における各接触位置の座標とから、各接触位置が求められる。   The relative position of the imaging field of view with respect to the stage 23 is input from the horizontal drive unit 24. From the position coordinates of the imaging field of view (relative position of the camera 200 or the stage 23) in the global coordinate system input from the horizontal drive unit 24 and the coordinates of each contact position in the local coordinate system within the imaging field of view, each contact position Is required.

なお、本実施の形態では、カメラ200とプローブ26はXY方向に動作せず、ステージ23がXY方向に移動することにより、プローブ26とワークWの側面とを接触させる構成としている。そのため、プローブ26がワークWと接触していない状態では、プローブ26は常に撮像視野内の中心に位置する。この実施例に限らず、カメラ側がプローブ26とともに動く構成としても良いし、撮像視野内をプローブ26が移動する構成としても良い。   In the present embodiment, the camera 200 and the probe 26 do not operate in the XY direction, and the stage 23 moves in the XY direction so that the probe 26 and the side surface of the workpiece W are brought into contact with each other. Therefore, in a state where the probe 26 is not in contact with the workpiece W, the probe 26 is always located at the center in the imaging field. The present invention is not limited to this embodiment, and the camera side may move with the probe 26, or the probe 26 may move within the imaging field of view.

輪郭線算出部358は、エッジ抽出処理部353によって抽出された複数のエッジ点、又は、接触位置特定部357によって特定された複数の接触位置に対し、幾何学図形をフィッティングさせることにより、輪郭線の位置を特定する。   The contour calculation unit 358 fits the geometric figure to the plurality of edge points extracted by the edge extraction processing unit 353 or the plurality of contact positions specified by the contact position specifying unit 357, thereby generating a contour line. Specify the position of.

寸法算出部359は、輪郭線算出部358により特定された輪郭線の位置に基づいて、ワークWの寸法を求め、測定結果を表示部21に表示する。寸法算出部359では、エッジ抽出領域からエッジを抽出して特定された輪郭線と、プローブ26が接触することによって特定された輪郭線とのいずれか一方又は両方を用いて、ワークWの寸法が求められる。   The dimension calculation unit 359 obtains the dimension of the workpiece W based on the position of the contour line specified by the contour line calculation unit 358 and displays the measurement result on the display unit 21. In the dimension calculation unit 359, the dimension of the workpiece W is determined using one or both of the contour line specified by extracting the edge from the edge extraction region and the contour line specified by the probe 26 contacting. Desired.

例えば、エッジ抽出によって特定された輪郭線と、プローブ26が接触することによって特定された輪郭線とを組み合わせて寸法を求めることができる。この様な構成を採用することにより、エッジが正確に抽出できない測定箇所の輪郭線はプローブ26を接触させて特定し、エッジが正確に抽出できる測定箇所の輪郭線はエッジ抽出によって特定して寸法測定を行うことができる。つまり、画像で測定できる部分は、画像で測定する方が寸法測定に要する時間を短縮することができる。   For example, the dimension can be obtained by combining the contour line specified by edge extraction and the contour line specified by contact of the probe 26. By adopting such a configuration, the contour line of the measurement point where the edge cannot be accurately extracted is specified by contacting the probe 26, and the contour line of the measurement point where the edge can be accurately extracted is specified and dimensioned by edge extraction. Measurements can be made. That is, it is possible to reduce the time required for measuring the dimension of the portion that can be measured with the image by measuring with the image.

図12のステップS101〜S107は、図5のコントローラ3における測定設定時の動作の一例を示したフローチャートである。まず、コントローラ3は、画像測定又はプローブ測定のいずれかの測定方法がユーザにより選択されれば(ステップS101)、選択された測定方法に応じた測定要素の設定を行う(ステップS102〜S104)。   Steps S101 to S107 in FIG. 12 are flowcharts showing an example of the operation at the time of measurement setting in the controller 3 in FIG. First, when one of the measurement methods of image measurement or probe measurement is selected by the user (step S101), the controller 3 sets measurement elements according to the selected measurement method (steps S102 to S104).

図13及び図14は、図1の画像測定装置1における測定設定時の動作の一例を示した図である。図13の(a)には、登録対象のワークWが示され、(b)には、パターン画像Ip上で指定されたエッジ抽出領域Rとスキャン動作の開始位置を示すシンボルSmが示されている。このワークWは、ベース部材w上に円筒状の突出部wが形成され、ベース部材wの周縁部に3つの貫通孔wが形成されている。 13 and 14 are diagrams showing an example of an operation at the time of measurement setting in the image measurement apparatus 1 of FIG. 13A shows the workpiece W to be registered, and FIG. 13B shows the edge extraction region R designated on the pattern image Ip and the symbol Sm indicating the start position of the scanning operation. Yes. The workpiece W includes a cylindrical projecting portion w 2 is formed on the base member w 1, the periphery into three holes w 3 of the base member w 1 is formed.

パターン画像Ipは、この様なワークWが被写体として撮像された撮影画像からなる。測定箇所は、ベース部材wの左右の側面間の距離と、前後の側面間の距離と、2つの貫通孔w間の距離と、突出部wの内径とが指定されている。ベース部材wの左右の側面間の距離と2つの貫通孔w間の距離とは、ワークWの輪郭線に対して指定されたエッジ抽出領域Rからエッジを抽出することによって測定される。一方、ベース部材wの前後の側面間の距離と突出部wの内径とは、プローブ26を接触させることによって測定される。 The pattern image Ip is composed of a captured image obtained by capturing such a workpiece W as a subject. As the measurement location, the distance between the left and right side surfaces of the base member w 1 , the distance between the front and rear side surfaces, the distance between the two through holes w 3 , and the inner diameter of the protruding portion w 2 are specified. The distance between the left and right side surfaces of the base member w 1 and the distance between the two through holes w 3 are measured by extracting an edge from the edge extraction region R specified for the contour line of the workpiece W. On the other hand, the distance between the front and back side surfaces of the base member w 1 and the inner diameter of the protrusion w 2 are measured by bringing the probe 26 into contact therewith.

図14には、測定設定情報の指定時に、表示部21に表示される設定画面100が示されている。設定画面100は、測定設定情報の編集画面であり、モデル画像を表示するための表示欄110と、寸法種別を選択するためのメニュー欄111が設けられている。   FIG. 14 shows a setting screen 100 displayed on the display unit 21 when the measurement setting information is designated. The setting screen 100 is an editing screen for measurement setting information, and includes a display column 110 for displaying a model image and a menu column 111 for selecting a dimension type.

表示欄110に表示中のモデル画像は、図12に示したワークWが被写体として撮像された撮影画像である。倍率ボタン131又は132を操作することにより、広視野測定用の低倍率と高精度測定用の高倍率とのいずれかを撮影倍率として指定することができる。また、ステージ調整ボタン133を操作すれば、ステージ23のX方向の位置及びY方向の位置を調整することができる。また、Z調整ボタン134を操作すれば、測定ユニット20のZ方向の位置を調整することができる。照明ボタン135を操作すれば、照明種別を指定することができる。照明種別には、透過照明、リング照明及び同軸落射照明などがある。   The model image being displayed in the display column 110 is a captured image obtained by capturing the work W illustrated in FIG. 12 as a subject. By operating the magnification button 131 or 132, either the low magnification for wide field measurement or the high magnification for high accuracy measurement can be designated as the imaging magnification. Further, if the stage adjustment button 133 is operated, the position in the X direction and the position in the Y direction of the stage 23 can be adjusted. Further, if the Z adjustment button 134 is operated, the position of the measurement unit 20 in the Z direction can be adjusted. By operating the illumination button 135, the illumination type can be designated. Illumination types include transmitted illumination, ring illumination, and coaxial epi-illumination.

メニュー欄111の寸法種別には、距離測定、角度測定などがある。距離測定には、2直線の間の距離測定、直線と点との間の距離測定、2点の間の距離測定、2円の間の距離測定、円と直線との間の距離測定、円と点との間の距離測定、円の直径測定及び円弧の半径測定がある。   The dimension types in the menu column 111 include distance measurement and angle measurement. Distance measurement includes distance measurement between two straight lines, distance measurement between straight lines and points, distance measurement between two points, distance measurement between two circles, distance measurement between circles and straight lines, circles There is a distance measurement between each point, a circle diameter measurement and an arc radius measurement.

ステップS103の画像測定要素の設定では、エッジ抽出により寸法測定を行うための測定要素について、測定設定情報の指定が行われる。一方、ステップS104のプローブ測定要素の設定では、プローブ26を接触させて寸法測定を行うための測定要素について、測定設定情報の指定が行われる。ステップS103及びS104の処理内容は、図17及び図19においてそれぞれ詳述する。コントローラ3は、モデル画像上の全ての測定要素について、設定が完了するまでステップS101からS104までの処理手順を繰り返す(ステップS105)。   In the setting of the image measurement element in step S103, the measurement setting information is specified for the measurement element for performing dimension measurement by edge extraction. On the other hand, in the setting of the probe measurement element in step S104, the measurement setting information is designated for the measurement element for measuring the dimension by bringing the probe 26 into contact. The processing contents of steps S103 and S104 will be described in detail with reference to FIGS. The controller 3 repeats the processing procedure from step S101 to S104 for all measurement elements on the model image until the setting is completed (step S105).

次に、コントローラ3は、設計値及び公差の指定を行う(ステップS106)。このステップでは、モデル画像から算出された寸法値が測定要素の輪郭線に対応づけて表示され、モデル画像上の寸法値がユーザにより選択されれば、設計値や公差を新たに指定し、或いは、変更することができる。   Next, the controller 3 designates design values and tolerances (step S106). In this step, the dimension value calculated from the model image is displayed in association with the outline of the measurement element, and if the dimension value on the model image is selected by the user, a design value or tolerance is newly designated, or Can be changed.

図15には、設計値及び公差の指定時における公差設定画面101が示されている。公差設定画面101は、設計値及び公差の編集画面であり、モデル画像を表示するための表示欄110と、設計値と公差の上限値及び下限値とを指定するための入力欄112が設けられている。表示欄110に表示中のモデル画像には、測定箇所に対応づけて寸法線や識別番号が表示されている。   FIG. 15 shows a tolerance setting screen 101 when design values and tolerances are designated. The tolerance setting screen 101 is a design value and tolerance editing screen, and is provided with a display column 110 for displaying a model image and an input column 112 for designating the design value and the upper limit value and the lower limit value of the tolerance. ing. In the model image being displayed in the display column 110, a dimension line and an identification number are displayed in association with the measurement location.

この入力欄112には、測定設定情報として登録された複数の測定箇所について、設計値と公差の上限値及び下限値とが表示され、測定箇所を選択すれば、設計値、公差の上限値又は下限値を新たに指定し、或いは、変更することができる。   In this input column 112, design values and upper and lower tolerance limits are displayed for a plurality of measurement locations registered as measurement setting information. If a measurement location is selected, the design value, the upper limit of tolerance or A lower limit value can be newly designated or changed.

次に、コントローラ3は、特徴量情報の登録を行う(ステップS107)。このステップでは、ワークWの位置及び姿勢を特定するためのパターン画像(サーチ用データ)が、パターン画像と各測定要素の設定で指定されるエッジ抽出領域との相対的な位置関係と共にモデル画像を用いて登録される。   Next, the controller 3 registers feature amount information (step S107). In this step, the pattern image (search data) for specifying the position and orientation of the workpiece W is converted into a model image together with the relative positional relationship between the pattern image and the edge extraction region specified by the setting of each measurement element. Registered.

図16には、特徴量情報の指定時における特徴量設定画面102が示されている。この特徴量設定画面102は、パターン画像を特徴量情報として登録するための編集画面であり、モデル画像を表示するための表示欄110と、登録対象領域及びサーチ条件を指定するための入力欄114が設けられている。表示欄110に表示中のモデル画像には、登録対象領域の外縁を示す枠113が表示されている。   FIG. 16 shows a feature amount setting screen 102 when designating feature amount information. The feature amount setting screen 102 is an edit screen for registering a pattern image as feature amount information, and includes a display column 110 for displaying a model image, and an input column 114 for specifying a registration target region and a search condition. Is provided. In the model image displayed in the display column 110, a frame 113 indicating the outer edge of the registration target area is displayed.

サーチ条件には、回転方向のスキャン範囲を制限するためのサーチ範囲と、パターン画像と一致するワークWの検出個数とを指定することができる。登録ボタン115を操作すれば、表示中のモデル画像がサーチ用のパターン画像として登録される。   As the search condition, a search range for limiting the scan range in the rotation direction and the number of workpieces W that match the pattern image can be specified. When the registration button 115 is operated, the model image being displayed is registered as a pattern image for search.

図17のステップS201〜S209は、図12のステップS103(画像測定要素の設定)について、詳細動作の一例を示したフローチャートであり、コントローラ3の動作が示されている。まず、コントローラ3は、後述する撮影条件を指定し(ステップS201)、ステージ23上に載置されたマスターピースが撮影された撮影画像を取得してモデル画像として表示する(ステップS202)。   Steps S201 to S209 in FIG. 17 are flowcharts showing an example of detailed operations for step S103 (setting of image measurement elements) in FIG. 12, and the operations of the controller 3 are shown. First, the controller 3 designates shooting conditions to be described later (step S201), acquires a shot image obtained by shooting a master piece placed on the stage 23, and displays it as a model image (step S202).

次に、測定要素の形状種別がユーザにより選択され(ステップS203)、形状種別に対応づけてエッジ抽出領域がユーザにより指定される(ステップS204)。コントローラ3は、指定されたエッジ抽出領域から複数のエッジ点を抽出し(ステップS205)、これらのエッジ点に対し、選択された形状種別に対応する幾何学図形をフィッティングさせることによって輪郭線の位置を決定する(ステップS206)。   Next, the shape type of the measurement element is selected by the user (step S203), and the edge extraction region is specified by the user in association with the shape type (step S204). The controller 3 extracts a plurality of edge points from the designated edge extraction region (step S205), and fits a geometric figure corresponding to the selected shape type to these edge points to thereby determine the position of the contour line. Is determined (step S206).

次に、コントローラ3は、輪郭線の位置に基づいて、測定箇所の寸法を算出し、測定要素に対応づけて測定結果の寸法値をモデル画像上に表示する(ステップS207,S208)。コントローラは、モデル画像上の全ての測定要素について、設定が完了するまでステップS203からS208までの処理手順を繰り返す(ステップS209)。   Next, the controller 3 calculates the dimension of the measurement location based on the position of the contour line, and displays the dimension value of the measurement result on the model image in association with the measurement element (steps S207 and S208). The controller repeats the processing procedure from steps S203 to S208 for all measurement elements on the model image until the setting is completed (step S209).

図18は、図1の画像測定装置1における画像測定要素の設定時の動作の一例を示した図である。図中の(a)には、モデル画像上で指定されたエッジ抽出領域116が示され、(b)には、エッジ抽出領域116からエッジを抽出して特定された輪郭線117が示されている。   FIG. 18 is a diagram illustrating an example of an operation when setting an image measurement element in the image measurement apparatus 1 of FIG. In the figure, (a) shows an edge extraction region 116 designated on the model image, and (b) shows an outline 117 specified by extracting an edge from the edge extraction region 116. Yes.

設定画面100の表示欄110に表示中のモデル画像に対し、測定要素の始点及び終点の位置を指定すれば、始点及び終点を結ぶ直線を含む矩形領域がエッジ抽出領域116として自動的に指定され、エッジ点のスキャン方向と共に測定要素に対応づけてモデル画像上に表示される。エッジ抽出領域116の登録が完了すれば、当該エッジ抽出領域116からエッジを抽出して特定された輪郭線117や寸法値がモデル画像上に表示される。   If the position of the start point and end point of the measurement element is specified for the model image displayed in the display field 110 of the setting screen 100, a rectangular area including a straight line connecting the start point and end point is automatically specified as the edge extraction area 116. The edge point scan direction is displayed on the model image in association with the measurement element. When the registration of the edge extraction region 116 is completed, the contour 117 and the dimension value specified by extracting the edge from the edge extraction region 116 are displayed on the model image.

図19のステップS301〜S315は、図12のステップS104(プローブ測定要素の設定)について、詳細動作の一例を示したフローチャートであり、コントローラ3の動作が示されている。ステップS301からステップS306までの処理手順は、図17のステップS201からステップS206までの処理手順と同様である。   Steps S301 to S315 in FIG. 19 are flowcharts showing an example of detailed operation for step S104 (setting of probe measurement elements) in FIG. 12, and the operation of the controller 3 is shown. The processing procedure from step S301 to step S306 is the same as the processing procedure from step S201 to step S206 in FIG.

次に、コントローラ3は、接触目標位置情報を指定する(ステップS307)。接触目標位置情報、すなわち、接触目標位置及びスキャン経路は、測定要素の形状種別及びサイズに基づいて自動的に指定される。また、指定されたスキャン経路は、モデル画像上に重畳して表示される(ステップS308)。   Next, the controller 3 designates contact target position information (step S307). The contact target position information, that is, the contact target position and the scan path are automatically specified based on the shape type and size of the measurement element. Also, the designated scan path is displayed superimposed on the model image (step S308).

図20は、図1の画像測定装置1におけるプローブ測定要素の設定時の動作の一例を示した図である。プローブ測定は、プローブ26をカメラ200により撮像して行うものであることから、プローブ26をワークWのどこに接触させれば良いのか、或いは、ワークWの側面に対し、どのようにアプローチすれば良いのかをユーザ自身で判断するのは難しい。本実施の形態による画像測定装置1では、モデル画像上でエッジ抽出領域を測定対象領域として指定するだけで、接触目標位置が自動的に決定される。   FIG. 20 is a diagram showing an example of the operation when setting the probe measurement element in the image measurement apparatus 1 of FIG. Since the probe measurement is performed by imaging the probe 26 with the camera 200, where the probe 26 should be brought into contact with the work W or how the approach is made to the side surface of the work W. It is difficult for the user to determine whether or not. In the image measurement apparatus 1 according to the present embodiment, the contact target position is automatically determined simply by designating the edge extraction region as the measurement target region on the model image.

図中の(a)には、モデル画像Im上で指定されたエッジ抽出領域118が示されている。設定画面100の表示欄110に表示中のモデル画像Imに対し、測定要素の円周上に3つの点を指定すれば、これらの点を含む円環状の領域がエッジ抽出領域118として自動的に指定され、モデル画像Im上に表示される。   (A) in the figure shows an edge extraction region 118 designated on the model image Im. If three points are specified on the circumference of the measurement element for the model image Im displayed in the display field 110 of the setting screen 100, an annular area including these points is automatically set as the edge extraction area 118. Designated and displayed on the model image Im.

図中の(b)には、エッジ抽出領域118からエッジを抽出して特定された輪郭線119とスキャン動作の開始位置を示すシンボル120とが示されている。エッジ抽出領域118の登録が完了すれば、当該エッジ抽出領域118からエッジを抽出して輪郭線119の位置が特定される。接触目標位置は、この輪郭線119に対して指定され、スキャン動作の開始位置を示すシンボル120が輪郭線119に対応づけて表示される。この例では、3つのスキャン経路が輪郭線119に沿って等間隔に配置されている。   (B) in the figure shows a contour line 119 identified by extracting an edge from the edge extraction region 118 and a symbol 120 indicating the start position of the scanning operation. When the registration of the edge extraction area 118 is completed, the edge is extracted from the edge extraction area 118 and the position of the contour line 119 is specified. The contact target position is specified for the contour line 119, and a symbol 120 indicating the start position of the scanning operation is displayed in association with the contour line 119. In this example, three scan paths are arranged along the contour line 119 at equal intervals.

設定画面100上でのシンボル120とワークWは、実際のコンタクト部261とワークWの相似形である。これにより、ユーザは、設定画面100上でコンタクト部261とワークWとの位置関係を正確に把握することができ、プローブ26を動作させた際にコンタクト部261がワークWと干渉するか否かを確認することができる。また、コンタクト部261とワークWが干渉する可能性が高い場合には、設定画面100上にエラーを表示するなどして、ユーザに報知しても良い。   The symbol 120 and the workpiece W on the setting screen 100 are similar to the actual contact portion 261 and the workpiece W. Accordingly, the user can accurately grasp the positional relationship between the contact portion 261 and the workpiece W on the setting screen 100, and whether or not the contact portion 261 interferes with the workpiece W when the probe 26 is operated. Can be confirmed. Further, when there is a high possibility that the contact portion 261 and the workpiece W interfere with each other, an error may be displayed on the setting screen 100 to notify the user.

図中の(c)には、プローブ26を接触させて特定された輪郭線121と輪郭線121に対応づけて表示された寸法値とが示されている。接触目標位置の登録が完了すれば、設定画面100内のモデル画像には、プローブ26をワークWの側面に接触させて特定された輪郭線121が表示されるとともに、当該輪郭線121から求められた寸法値が輪郭線121に対応づけて表示される。   (C) in the figure shows the contour line 121 specified by contacting the probe 26 and the dimension value displayed in association with the contour line 121. When the registration of the contact target position is completed, the model image in the setting screen 100 displays the contour line 121 specified by bringing the probe 26 into contact with the side surface of the workpiece W and is obtained from the contour line 121. Dimension values are displayed in association with the contour line 121.

次に、コントローラ3は、スキャン経路の調整を行うか否かをユーザに照会し(ステップS309)、スキャン経路の調整がユーザにより指示されれば、接触目標位置の調整を行う(ステップS310)。   Next, the controller 3 inquires of the user whether or not to adjust the scan path (step S309), and if the user instructs to adjust the scan path, the controller 3 adjusts the target contact position (step S310).

図21及び図22は、図1の画像測定装置1におけるプローブ測定要素の設定時の動作の一例を示した図である。図21の(a)には、モデル画像Im上の輪郭線119に対して指定された接触目標位置を調整する場合が示され、(b)には、スキャン方向を変更する場合が示され、(c)には、スキャン経路の本数を変更する場合が示されている。   21 and 22 are diagrams illustrating an example of the operation when setting the probe measurement element in the image measurement apparatus 1 of FIG. FIG. 21A shows a case where the contact target position designated with respect to the contour line 119 on the model image Im is adjusted, and FIG. 21B shows a case where the scan direction is changed. (C) shows a case where the number of scan paths is changed.

モデル画像Im上の輪郭線119に対して指定された接触目標位置は、マウス操作などによってスキャン動作の開始位置を示すシンボル120を移動させることにより、調整することができる。例えば、シンボル120を輪郭線119の径方向に移動させることにより、スキャン動作の開始位置を輪郭線119から内側へ遠ざけることができる。また、設定画面100を操作することにより、スキャン方向を反転させ、或いは、スキャン経路を追加することができる。   The contact target position designated for the contour line 119 on the model image Im can be adjusted by moving the symbol 120 indicating the start position of the scanning operation by a mouse operation or the like. For example, by moving the symbol 120 in the radial direction of the contour line 119, the start position of the scanning operation can be moved away from the contour line 119. Further, by operating the setting screen 100, the scan direction can be reversed or a scan path can be added.

図22の(a)には、登録対象のワークWが示され、(b)には、モデル画像Im上で指定された接触目標位置が示され、(c)には、エラー表示されたシンボル120が示されている。ワークWの右側面に対応する輪郭線119に対し、2つのスキャン経路が指定されている。スキャン動作の開始位置を示すシンボル120をマウス操作などによって移動させることにより、接触目標位置を変更することができる。   22A shows the workpiece W to be registered, FIG. 22B shows the contact target position designated on the model image Im, and FIG. 22C shows the symbol displayed as an error. 120 is shown. Two scan paths are designated for the contour line 119 corresponding to the right side surface of the workpiece W. The contact target position can be changed by moving the symbol 120 indicating the start position of the scanning operation by a mouse operation or the like.

スキャン動作の開始位置は、測定箇所の輪郭線119に近い方が測定時間を短縮することができる。しかしながら、スキャン動作の開始位置を測定箇所の輪郭線119に近づけ過ぎた場合、ワークWの寸法ばらつきにより、プローブ26を開始位置まで移動させる際にプローブ26がワークWと干渉するおそれがある。すなわち、右側の輪郭線119を測定対象とする場合、右側の輪郭線119にスキャン開始位置を近づけ過ぎると、連続測定時のワークWの寸法ばらつきにより、プローブ26がワークWに干渉してしまう。   As the start position of the scanning operation is closer to the outline 119 of the measurement location, the measurement time can be shortened. However, if the start position of the scanning operation is too close to the outline 119 of the measurement location, the probe 26 may interfere with the work W when the probe 26 is moved to the start position due to dimensional variations of the work W. That is, when the right outline 119 is a measurement target, if the scan start position is too close to the right outline 119, the probe 26 interferes with the workpiece W due to dimensional variations of the workpiece W during continuous measurement.

この様にモデル画像Im上で指定された接触目標位置が測定対象の輪郭線119に近い場合、当該輪郭線119から遠ざかるように接触目標位置を調整することができる。すなわち、右側の輪郭線119から離れるように、スキャン動作の開始位置を調整することができる。   As described above, when the contact target position designated on the model image Im is close to the contour line 119 to be measured, the contact target position can be adjusted so as to be away from the contour line 119. That is, the start position of the scanning operation can be adjusted so as to be away from the right outline 119.

一方、スキャン開始位置が左側の輪郭線119に近づけ過ぎると、プローブ26がワークWの左側面と干渉してしまう。この様に測定対象の輪郭線119とは異なる輪郭線と重複する位置にスキャン開始位置が指定されれば、シンボル120がエラー表示される。このため、ユーザは、モデル画像Imを確認することにより、接触目標位置を容易に調整することができる。   On the other hand, if the scan start position is too close to the left outline 119, the probe 26 interferes with the left side surface of the workpiece W. In this way, if the scan start position is designated at a position overlapping with a contour line different from the contour line 119 to be measured, the symbol 120 is displayed as an error. Therefore, the user can easily adjust the contact target position by confirming the model image Im.

図23は、図1の画像測定装置1におけるプローブ測定要素の設定時の動作の一例を示した図である。図中の(a)には、登録対象のワークWが示され、(b)には、モデル画像Im上でスキャン動作の高さ位置を調整する場合が示されている。このワークWは、高さ方向の段差を有し、下段の右側面と上段の右側面との間の水平方向の距離Dがプローブ26を用いて測定される。   FIG. 23 is a diagram showing an example of the operation when setting the probe measurement element in the image measurement apparatus 1 of FIG. (A) in the figure shows a workpiece W to be registered, and (b) shows a case where the height position of the scanning operation is adjusted on the model image Im. The workpiece W has a step in the height direction, and a horizontal distance D between the lower right side surface and the upper right side surface is measured using the probe 26.

ワークWの下段の右側面と上段の右側面とでは、鉛直方向の位置が異なるため、スキャン動作の測定高さを適切に指定する必要がある。すなわち、上段の右側面を測定するための測定高さhは、下段の右側面を測定するための測定高さhよりも高い位置として指定する必要がある。この様な高さ情報は、プローブ26を実際に移動させて指定しても良いし、数値で指定することもできる。 Since the lower right side surface and the upper right side surface of the work W have different vertical positions, it is necessary to appropriately specify the measurement height of the scanning operation. That is, the measurement height h 2 for measuring the right side surface of the upper, it is necessary to specify a position higher than the measured height h 1 for measuring the right side surface of the lower. Such height information may be specified by actually moving the probe 26 or numerically.

また、測定高さを変更すると、垂直駆動部22を制御してプローブ26を変更後の測定高さに移動させることができ、これによりワークWとコンタクト部261の高さ関係を実際に確認することができる。   When the measurement height is changed, the vertical drive unit 22 can be controlled to move the probe 26 to the changed measurement height, thereby actually confirming the height relationship between the workpiece W and the contact part 261. be able to.

次に、コントローラ3は、スキャン動作を開始し、マスターピースの側面に接触した状態のプローブ26が撮影された撮影画像を取得し、当該撮影画像に基づいて、接触点の位置を特定する(ステップS311)。そして、コントローラ3は、2以上の接触点の位置から輪郭線の位置を決定する(ステップS312)。   Next, the controller 3 starts a scanning operation, acquires a captured image obtained by capturing the probe 26 in contact with the side surface of the master piece, and specifies the position of the contact point based on the captured image (step S311). ). Then, the controller 3 determines the position of the contour line from the positions of two or more contact points (step S312).

コントローラ3は、輪郭線の位置に基づいて、測定箇所の寸法を算出し、測定要素に対応づけて測定結果の寸法値をモデル画像上に表示する(ステップS313,S314)。コントローラは、モデル画像上の全ての測定要素について、設定が完了するまでステップS303からS314までの処理手順を繰り返す(ステップS315)。   The controller 3 calculates the dimension of the measurement location based on the position of the contour line, and displays the dimension value of the measurement result on the model image in association with the measurement element (steps S313 and S314). The controller repeats the processing procedure from step S303 to S314 for all measurement elements on the model image until the setting is completed (step S315).

図24は、図1の画像測定装置1におけるプローブ測定要素の設定時の動作の一例を示した図である。図中の(a)には、第1スキャンモードの場合が示され、(b)には、第2スキャンモードが示されている。第1スキャンモード及び第2スキャンモードは、ステージ23に対し、プローブ26が相対的に接触目標位置間を移動する際の移動方法であり、第1スキャンモード又は第2スキャンモードのいずれかを指定することができる。   FIG. 24 is a diagram showing an example of the operation when setting the probe measurement element in the image measurement apparatus 1 of FIG. In the figure, (a) shows the case of the first scan mode, and (b) shows the second scan mode. The first scan mode and the second scan mode are moving methods when the probe 26 moves between the contact target positions relative to the stage 23, and designates either the first scan mode or the second scan mode. can do.

第1スキャンモードでは、接触目標位置間の移動ごとに、プローブ26が測定高さから基準高さに切り替えられる。隣接する2つの接触目標位置間に段差などの障害物がある場合には、第1スキャンモードを選択することにより、ワークWとの干渉を確実に防止することができる。   In the first scan mode, the probe 26 is switched from the measurement height to the reference height for each movement between the contact target positions. When there is an obstacle such as a step between two adjacent contact target positions, interference with the workpiece W can be reliably prevented by selecting the first scan mode.

一方、第2スキャンモードでは、基準高さに切り替えることなく、ステージ23に対し、プローブ26が相対的に接触目標位置間を移動する。具体的には、1つの測定要素に対して複数の接触目標位置が指定されている場合、基準高さに切り替えることなく、ステージ23に対し、プローブ26を相対的に当該接触目標位置間で移動させる。ただし、ステージ23に対し、異なる2つの測定要素間でプローブ26を相対的に移動させる際には、基準高さに切り替えることなくプローブ26を移動させても良いが、プローブ26を測定高さから基準高さに切り替えることが望ましい。ステージ23に対し、プローブ26を相対的に同じ高さで輪郭線に沿って移動させることにより、測定時間を短縮することができる。   On the other hand, in the second scan mode, the probe 26 moves between the contact target positions relative to the stage 23 without switching to the reference height. Specifically, when a plurality of contact target positions are specified for one measurement element, the probe 26 is moved between the contact target positions relative to the stage 23 without switching to the reference height. Let However, when the probe 26 is moved relative to the stage 23 between two different measurement elements, the probe 26 may be moved without switching to the reference height, but the probe 26 is moved from the measurement height. It is desirable to switch to the reference height. The measurement time can be shortened by moving the probe 26 along the contour line at the same height relative to the stage 23.

図25のステップS401〜S404は、図12のステップS107(特徴量情報の登録)について、詳細動作の一例を示したフローチャートであり、コントローラ3の動作が示されている。まず、コントローラ3は、撮影条件を指定した後(ステップS401)、マスターピースが撮影されたモデル画像を取得して登録対象領域を指定する(ステップS402)。   Steps S401 to S404 in FIG. 25 are flowcharts showing an example of detailed operations for step S107 (registration of feature amount information) in FIG. 12, and the operations of the controller 3 are shown. First, after designating shooting conditions (step S401), the controller 3 acquires a model image in which a master piece is shot and designates a registration target area (step S402).

次に、コントローラ3は、パターン画像を用いてパターンサーチする際のサーチ条件を指定する(ステップS403)。コントローラ3は、特徴量情報の登録に係る全ての設定が完了するまで、ステップS401からステップS403までの処理手順を繰り返し(ステップS404)、全ての設定が完了すれば、モデル画像から得られたパターン画像とサーチ条件とを特徴量情報として記憶する。   Next, the controller 3 designates a search condition for performing a pattern search using the pattern image (step S403). The controller 3 repeats the processing procedure from step S401 to step S403 until all the settings related to the registration of the feature amount information are completed (step S404). If all the settings are completed, the pattern obtained from the model image is obtained. Images and search conditions are stored as feature information.

図26のステップS501〜S508は、図17のステップS201、図19のステップS301及び図25のステップS401(撮影条件の指定)について、詳細動作の一例を示したフローチャートであり、コントローラ3の動作が示されている。まず、コントローラ3は、プローブ26の位置を確認し、退避位置でなければ、測定ユニット20の切替駆動部27を制御して退避位置に切り替える(ステップS501,S502)。   Steps S501 to S508 in FIG. 26 are flowcharts showing an example of detailed operations for step S201 in FIG. 17, step S301 in FIG. 19 and step S401 in FIG. 25 (designation of shooting conditions). It is shown. First, the controller 3 confirms the position of the probe 26, and if it is not the retracted position, it switches to the retracted position by controlling the switching drive unit 27 of the measurement unit 20 (steps S501 and S502).

次に、コントローラ3は、水平駆動部24を制御し、水平面内におけるステージ23のX方向の位置及びY方向の位置を調整する(ステップS503)。次に、コントローラ3は、フォーカス位置を調整するために、垂直駆動部22を制御して測定ユニット20のZ方向の位置を調整する(ステップS504)。   Next, the controller 3 controls the horizontal drive unit 24 to adjust the position in the X direction and the position in the Y direction of the stage 23 in the horizontal plane (step S503). Next, in order to adjust the focus position, the controller 3 controls the vertical drive unit 22 to adjust the position of the measurement unit 20 in the Z direction (step S504).

次に、コントローラ3は、照明条件、撮像条件及び撮影倍率を指定する(ステップS505〜S507)。照明条件には、照明種別、点灯状態、明るさ及びリング照明ユニット211のZ方向の位置がある。撮像条件には、露光時間、ゲイン及び撮影範囲がある。   Next, the controller 3 designates illumination conditions, imaging conditions, and imaging magnification (steps S505 to S507). Illumination conditions include illumination type, lighting state, brightness, and position of the ring illumination unit 211 in the Z direction. Imaging conditions include exposure time, gain, and imaging range.

コントローラ3は、撮影条件の指定に係る全ての設定が完了するまで、ステップS503からステップS507までの処理手順を繰り返し(ステップS508)、全ての設定が完了すれば、撮影条件を測定設定情報として記憶する。   The controller 3 repeats the processing procedure from step S503 to step S507 until all the settings relating to the specification of the imaging conditions are completed (step S508). If all the settings are completed, the imaging conditions are stored as measurement setting information. To do.

図27及び図28のステップS601〜S617は、図5のコントローラ3における連続測定時の動作の一例を示したフローチャートである。まず、コントローラ3は、測定設定情報を読み出し(ステップS601)、測定設定情報に基づいて、撮影条件を指定する(ステップS602)。次に、コントローラ3は、ステージ23上に載置されたワークWを上記撮影条件で撮影してワーク画像を取得し(ステップS603)、特徴量情報を用いたパターンサーチによりワークWの位置及び姿勢を特定する(ステップS604,S605)。   Steps S601 to S617 in FIG. 27 and FIG. 28 are flowcharts showing an example of the operation at the time of continuous measurement in the controller 3 in FIG. First, the controller 3 reads the measurement setting information (step S601), and designates the imaging condition based on the measurement setting information (step S602). Next, the controller 3 captures the workpiece W placed on the stage 23 under the above-described photographing conditions to obtain a workpiece image (step S603), and the position and orientation of the workpiece W by pattern search using feature amount information. Is specified (steps S604 and S605).

次に、コントローラ3は、パターンサーチによって特定されたワークWの位置及び姿勢に基づいて、ワーク画像上でエッジ抽出領域の位置を特定する(ステップS606)。コントローラ3は、特定されたエッジ抽出領域から複数のエッジ点を抽出し(ステップS607)、これらのエッジ点に幾何学図形をフィッティングさせることによって輪郭線の位置を特定する(ステップS608)。   Next, the controller 3 specifies the position of the edge extraction region on the work image based on the position and orientation of the work W specified by the pattern search (step S606). The controller 3 extracts a plurality of edge points from the specified edge extraction region (step S607), and specifies the position of the contour line by fitting a geometric figure to these edge points (step S608).

次に、コントローラ3は、画像測定要素が測定設定情報として登録されていれば(ステップS609)、特定された輪郭線の位置に基づいて、測定箇所の寸法を算出し(ステップS610)、測定要素に対応づけて測定結果の寸法値をワーク画像上に表示する(ステップS611)。   Next, if the image measurement element is registered as measurement setting information (step S609), the controller 3 calculates the dimension of the measurement location based on the position of the specified contour line (step S610), and the measurement element The dimension value of the measurement result is displayed on the work image in association with (Step S611).

次に、コントローラ3は、プローブ測定要素が測定設定情報として登録されていれば(ステップS612)、測定ユニット20の切替駆動部27を制御してプローブ26を退避位置から測定位置に切り替えた後、垂直駆動部22を制御して基準高さに切り替える(ステップS613)。コントローラ3は、エッジ抽出領域からエッジを抽出して特定した輪郭線の位置に基づいて、スキャン開始位置を特定し(ステップS614)、スキャン動作を行う(ステップS615)。   Next, if the probe measurement element is registered as measurement setting information (step S612), the controller 3 controls the switching drive unit 27 of the measurement unit 20 to switch the probe 26 from the retracted position to the measurement position. The vertical drive unit 22 is controlled to switch to the reference height (step S613). The controller 3 specifies the scan start position based on the position of the contour line extracted and specified from the edge extraction region (step S614), and performs the scan operation (step S615).

次に、コントローラ3は、ワークWの側面に接触した状態のプローブ26が撮影された撮影画像を取得し、当該撮影画像に基づいて接触点の位置を求めて輪郭線の位置を特定し、測定箇所の寸法を算出する(ステップS616)。そして、コントローラ3は、測定要素に対応づけて測定結果の寸法値をワーク画像上に表示する(ステップS617)。   Next, the controller 3 obtains a photographed image obtained by photographing the probe 26 in contact with the side surface of the workpiece W, obtains the position of the contact point based on the photographed image, identifies the position of the contour line, and measures The dimension of the location is calculated (step S616). Then, the controller 3 displays the dimension value of the measurement result in association with the measurement element on the work image (step S617).

なお、接触目標位置がパターン画像に直接に関連づけられている場合、パターンサーチによって特定されたワークWの位置及び姿勢から接触目標位置が直接に特定される。また、接触目標位置がエッジ抽出領域に関連づけられている場合には、パターンサーチによって特定されたワークWの位置及び姿勢に基づいてワーク画像上のエッジ抽出領域の位置を特定することにより、接触目標位置が特定される。   When the contact target position is directly associated with the pattern image, the contact target position is directly specified from the position and posture of the workpiece W specified by the pattern search. Further, when the contact target position is associated with the edge extraction area, the position of the edge extraction area on the work image is specified based on the position and posture of the work W specified by the pattern search, thereby A location is identified.

図29〜図31は、図1の画像測定装置1における連続測定時の動作の一例を示した図である。図29の(b)〜(d)、図30の(a)〜(d)及び図31には、ワークWの位置及び姿勢が互いに異なる2つのワーク画像Iwがそれぞれケース1及びケース2として示されている。図29の(a)には、サーチ用データとして登録されたパターン画像Ipが示され、(b)には、パターンサーチのために撮像されたワーク画像Iwが示されている。これらのパターン画像Ip及びワーク画像Iwは、いずれも透過照明による透過画像である。このワーク画像Iwをパターン画像Ipとマッチングすることにより、ワークWの位置及び姿勢が特定される。   FIGS. 29 to 31 are diagrams showing an example of the operation at the time of continuous measurement in the image measuring apparatus 1 of FIG. 29 (b) to (d), FIG. 30 (a) to (d), and FIG. 31, two work images Iw having different positions and postures of the work W are shown as case 1 and case 2, respectively. Has been. 29A shows a pattern image Ip registered as search data, and FIG. 29B shows a work image Iw captured for pattern search. Both the pattern image Ip and the work image Iw are transmitted images by transmitted illumination. By matching the workpiece image Iw with the pattern image Ip, the position and orientation of the workpiece W are specified.

図29の(c)には、エッジ抽出のために撮像されたワーク画像Iwが示されている。このワーク画像Iwは、反射照明による反射画像であり、パターンサーチによって特定されたワークWの位置及び姿勢に基づいて、エッジ抽出領域が特定される。   FIG. 29 (c) shows a work image Iw imaged for edge extraction. This work image Iw is a reflected image by reflected illumination, and an edge extraction region is specified based on the position and posture of the work W specified by the pattern search.

図29の(d)には、図29の(c)に示したワーク画像Iw上で特定された複数のエッジ抽出領域Rが示されている。エッジ抽出領域Rは、ワークWの位置及び姿勢と、エッジ抽出領域情報として登録された相対位置情報とに基づいて、位置座標が特定される。   FIG. 29D shows a plurality of edge extraction regions R specified on the work image Iw shown in FIG. The position coordinates of the edge extraction region R are specified based on the position and orientation of the workpiece W and the relative position information registered as the edge extraction region information.

図30の(a)には、エッジ抽出領域Rからエッジを抽出して特定された複数の輪郭線L及びLが示されている。輪郭線Lは、測定要素が画像測定要素として登録されている場合の輪郭線である。一方、輪郭線Lは、測定要素がプローブ測定要素として登録されている場合に、接触目標位置を特定するために用いる仮の輪郭線であり、位置精度は低い。 FIG. 30A shows a plurality of contour lines L 1 and L 2 specified by extracting an edge from the edge extraction region R. Contour line L 1, the measurement element is a contour line in a case that is registered as the image measuring elements. On the other hand, the contour line L 2, when the measuring element is registered as a probe measuring element, a provisional contour used to identify the contact target position, positional accuracy is low.

図30の(b)には、ワーク画像Iw上の輪郭線Lに対して特定された複数の接触目標位置が示されている。接触目標位置は、輪郭線Lの位置と接触目標位置情報として登録された相対位置情報とに基づいて、特定される。 In (b) of FIG. 30, a plurality of contact target position specified with respect to the contour line L 2 on the work image Iw is shown. Contact target position, based on the relative position information registered as the position and the contact target position information of contour L 2, are specified.

図30の(c)には、プローブ26を接触させて特定された複数の接触位置Pが示されている。接触位置Pは、プローブ26がワークWの側面に接触した状態で取得されたワーク画像Iwとステージ23の位置とに基づいて、特定される。図30の(d)には、複数の接触位置Pに幾何学図形をフィッティングさせて特定された輪郭線Lが示されている。 FIG. 30C shows a plurality of contact positions P identified by bringing the probe 26 into contact therewith. The contact position P is specified based on the workpiece image Iw acquired in a state where the probe 26 is in contact with the side surface of the workpiece W and the position of the stage 23. In (d) of FIG. 30 is a contour line L 3 identified by fitting a geometric figures into a plurality of the contact position P is shown.

図31には、ワークWの良否判定の結果が測定箇所に対応づけて表示されたワーク画像Iwが示されている。エッジ抽出により特定された輪郭線Lやプローブ動作によって特定された輪郭線Lに基づいて、測定箇所の寸法値が求められる。また、求められた寸法値を設計値と比較し、設計値に対する誤差を公差と比較することにより、ワークWの良否判定が行われる。この良否判定の結果は、測定箇所に対応づけてワーク画像Iw上に表示される。 FIG. 31 shows a workpiece image Iw in which the result of the quality determination of the workpiece W is displayed in association with the measurement location. Based on the contour line L 3 identified by the identifying contour line L 1 and the probe operation by the edge extraction, the dimension values of the measurement point is determined. Further, the quality of the workpiece W is determined by comparing the obtained dimension value with the design value and comparing the error with respect to the design value with the tolerance. The result of the pass / fail judgment is displayed on the work image Iw in association with the measurement location.

図31の左側に示したワーク画像Iwでは、全ての測定箇所がOK判定であり、ワークWは、良品であると判定される。一方、図31の右側に示したワーク画像Iwでは、画像測定要素として登録された測定箇所の1つがNG判定であり、ワークWは、不良品であると判定される。   In the work image Iw shown on the left side of FIG. 31, all measurement locations are OK, and the work W is determined to be a non-defective product. On the other hand, in the work image Iw shown on the right side of FIG. 31, one of the measurement points registered as the image measurement element is NG determination, and the work W is determined to be a defective product.

図32のステップS701〜S712は、図28のステップS615(スキャン動作)について、詳細動作の一例を示したフローチャートであり、コントローラ3の動作が示されている。まず、コントローラ3は、水平駆動部24を制御し、基準高さにおいて、ステージ23に対し、スキャン経路の開始位置に対応する位置にプローブ26を相対的に移動させた後(ステップS701)、垂直駆動部22を制御してプローブ26を測定高さに移動させる(ステップS702)。   Steps S701 to S712 in FIG. 32 are flowcharts showing an example of detailed operation for step S615 (scan operation) in FIG. 28, and show the operation of the controller 3. First, the controller 3 controls the horizontal drive unit 24 to move the probe 26 relative to the stage 23 at a reference height to a position corresponding to the start position of the scan path (step S701), and then vertically. The drive unit 22 is controlled to move the probe 26 to the measurement height (step S702).

次に、コントローラ3は、水平駆動部24を制御して、ステージ23に対し、プローブ26を相対的にスキャン方向に移動させ(ステップS703)、接触が検出されれば、ワーク画像上のプローブ26の位置及びステージ23の位置に基づいて、接触位置を算出する(ステップS704,S705)。プローブ26は、ワーク画像上の輪郭線の法線に沿って接近するように制御される。コントローラ3は、全ての接触目標位置について測定が完了するまで、ステップS701からステップS705までの処理手順を繰り返し、全ての接触目標位置について測定が完了すれば、プローブ26を基準高さに移動させてこの処理を終了する(ステップS706,S707)。   Next, the controller 3 controls the horizontal driving unit 24 to move the probe 26 relative to the stage 23 in the scanning direction (step S703). If contact is detected, the probe 26 on the workpiece image is detected. And the position of the stage 23, the contact position is calculated (steps S704 and S705). The probe 26 is controlled so as to approach along the normal line of the contour line on the workpiece image. The controller 3 repeats the processing procedure from step S701 to step S705 until the measurement is completed for all contact target positions. When the measurement is completed for all contact target positions, the probe 26 is moved to the reference height. This process ends (steps S706 and S707).

コントローラ3は、第1スキャンモードが指定されていれば、1つの接触目標位置について測定が完了するごとに、プローブ26を基準高さに移動させる(ステップS706,S711,S712)。   If the first scan mode is designated, the controller 3 moves the probe 26 to the reference height every time measurement is completed for one contact target position (steps S706, S711, S712).

また、コントローラ3は、接触が検出されることなく、プローブ26が終了位置に到達すれば、エラーが発生したと判断し、プローブを基準高さに移動させてエラー出力を行う(ステップS704,S708〜S710)。   The controller 3 determines that an error has occurred if the probe 26 reaches the end position without detecting contact, and moves the probe to the reference height to output an error (steps S704 and S708). ~ S710).

本実施の形態によれば、パターン画像に基づいてワーク画像からワークWの位置及び姿勢が特定されるため、ワークWをステージ23上に載置するだけで、プローブ26を用いた寸法測定を行うことができる。また、接触目標位置情報に基づいて、プローブ26が接触すべき接触目標位置が特定されるため、パターン画像に対して相対的な位置を最初に指定するだけで、ワークWに対する複数の接触目標位置を特定してプローブ26を順次に移動させることができる。   According to the present embodiment, since the position and orientation of the workpiece W are specified from the workpiece image based on the pattern image, the dimension measurement using the probe 26 is performed only by placing the workpiece W on the stage 23. be able to. In addition, since the contact target position to which the probe 26 should contact is specified based on the contact target position information, a plurality of contact target positions with respect to the workpiece W can be simply specified by first specifying a relative position with respect to the pattern image. And the probe 26 can be moved sequentially.

また、ワークWの位置及び姿勢を特定するためのワーク画像はプローブ26が退避位置にある状態で生成されるため、プローブ26がワークWと重複して撮像され、或いは、ワークWの近傍に撮像されるのを防止することができる。   Further, since the workpiece image for specifying the position and orientation of the workpiece W is generated in a state where the probe 26 is in the retracted position, the probe 26 is imaged in an overlapping manner with the workpiece W or is imaged in the vicinity of the workpiece W. Can be prevented.

また、本実施の形態によれば、測定要素の位置と測定要素の形状種別又は大きさと配置ルールとに従ってプローブ26が接触すべきワーク側面の複数の接触目標位置が特定されるため、モデル画像上で測定要素を指定するだけで、複数の接触目標位置を自動的に特定してプローブ26によるスキャン動作を決定することができる。   Further, according to the present embodiment, a plurality of contact target positions on the side surface of the workpiece to which the probe 26 should contact are specified according to the position of the measurement element, the shape type or size of the measurement element, and the arrangement rule. By simply designating the measurement element, the plurality of contact target positions can be automatically identified and the scanning operation by the probe 26 can be determined.

なお、本実施の形態では、水平駆動部24がステージ23をX方向及びY方向に移動させる場合の例について説明したが、本発明は、水平駆動部24の構成をこれに限定するものではない。例えば、水平駆動部24が、プローブ26又は測定ユニット20をX方向及びY方向に移動させるような構成であっても良い。或いは、水平駆動部24が、ステージ23をX方向に移動させ、プローブ26又は測定ユニット20をY方向に移動させるような構成であっても良い。   In the present embodiment, an example in which the horizontal driving unit 24 moves the stage 23 in the X direction and the Y direction has been described, but the present invention does not limit the configuration of the horizontal driving unit 24 to this. . For example, the horizontal drive unit 24 may be configured to move the probe 26 or the measurement unit 20 in the X direction and the Y direction. Alternatively, the horizontal driving unit 24 may move the stage 23 in the X direction and move the probe 26 or the measurement unit 20 in the Y direction.

また、本実施の形態では、垂直駆動部22が測定ユニット20をZ方向に移動させる場合の例について説明したが、本発明は、垂直駆動部22の構成をこれに限定するものではない。例えば、垂直駆動部22がステージ23をZ方向に移動させるような構成であっても良い。   In the present embodiment, an example in which the vertical drive unit 22 moves the measurement unit 20 in the Z direction has been described. However, the present invention does not limit the configuration of the vertical drive unit 22 to this. For example, the vertical drive unit 22 may be configured to move the stage 23 in the Z direction.

また、本実施の形態では、スキャン経路のスキャン方向がエッジの両側の輝度差に基づいて指定される場合の例について説明したが、本発明は、スキャン方向の指定方法をこれに限定するものではない。例えば、撮像部201又は206のフォーカス位置を利用して測定箇所の近傍の高さ情報を取得し、この高さ情報に基づいて、スキャン方向を指定するような構成であっても良い。また、スキャン方向には、予め定められた方向がデフォルト指定されるような構成であっても良い。   In the present embodiment, an example in which the scan direction of the scan path is designated based on the luminance difference between both sides of the edge has been described. However, the present invention does not limit the scan direction designation method to this. Absent. For example, the configuration may be such that height information in the vicinity of the measurement location is acquired using the focus position of the imaging unit 201 or 206, and the scan direction is designated based on this height information. The scan direction may be configured so that a predetermined direction is designated by default.

また、本実施の形態では、接触目標位置の測定高さがユーザによって指定される場合の例について説明したが、本発明は、測定高さを撮像部201又は206のフォーカス位置を利用して自動的に指定するような構成であっても良い。   In this embodiment, an example in which the measurement height of the contact target position is specified by the user has been described. However, the present invention automatically uses the focus position of the imaging unit 201 or 206 to measure the measurement height. The configuration may be specified as desired.

また、本実施の形態では、ワーク画像に基づいて、プローブ26がワークWの側面に接触したことが検出される場合の例について説明したが、本発明は、接触検出の方法をこれに限定するものではない。例えば、圧力又は振動を検知するセンサを用いて、プローブ26がワークWの側面に接触したことを検出するような構成であっても良い。   In the present embodiment, an example in which it is detected that the probe 26 has contacted the side surface of the workpiece W based on the workpiece image has been described. However, the present invention limits the contact detection method to this. It is not a thing. For example, it may be configured to detect that the probe 26 is in contact with the side surface of the workpiece W using a sensor that detects pressure or vibration.

また、本実施の形態では、プローブ26が測定ユニット20の筐体に取り付けられる場合の例について説明したが、本発明は、プローブ26が、撮像部201又は206の撮像視野内における測定領域内で水平方向に移動可能なものにも適用することができる。   Further, in the present embodiment, an example in which the probe 26 is attached to the housing of the measurement unit 20 has been described. However, in the present invention, the probe 26 is within a measurement region in the imaging field of the imaging unit 201 or 206. The present invention can also be applied to those that are movable in the horizontal direction.

また、本実施の形態では、プローブ用光源263から金属管262を介してガイド光が伝送される自発光型のプローブ26を備えた画像測定装置1について説明したが、本発明は、プローブ26の構成をこれに限定するものではない。例えば、プローブは、ガイド光を放射しないものであっても良い。   In the present embodiment, the image measuring apparatus 1 including the self-luminous probe 26 that transmits the guide light from the probe light source 263 through the metal tube 262 has been described. The configuration is not limited to this. For example, the probe may not emit guide light.

<移動検知>
プローブ26のコンタクト部261は金属管262など、非可撓性のロッドないしはチューブによって支持されている。そのため、コンタクト部261がワークWに接触すると、コンタクト部261とワークWとの間に押圧力が発生し、ワークWが移動してしまう。たとえば、ワークWの第一側面と第一側面に対向する第二側面との間の距離を測定する場合、コンタクト部261によって第一側面が押圧されてワークWが移動すると、移動した距離に応じた誤差が第一側面の位置の測定結果に含まれてしまう。そのため、第一側面と第二側面との間の距離にも誤差が反映されてしまう。そこで、測定制御部315は、ワークWの側面の位置を測定するためにコンタクト部261とワークWの側面とが接触する前に撮像部201により生成されたワークWの第一画像と、ワークWの側面の位置を測定するためにコンタクト部261とワークWの側面とが接触した後に撮像部201により生成されたワークWの第二画像とを用いて、コンタクト部261とワークWの側面とが接触したことによりステージ23の載置面上でワークWが移動したことを検知する。たとえば、制御装置31の入力受付部311はワークWの特徴を監視対象として設定しておく。測定制御部315は、第一画像における監視対象の位置と第二画像における監視対象との位置とを比較することで、ワークWが移動したことを検知する。たとえば、測定制御部315は、第一画像における監視対象の位置と第二画像における監視対象との位置との距離が閾値以上になると、ワークWが移動したと判定する。
<Movement detection>
The contact portion 261 of the probe 26 is supported by a non-flexible rod or tube such as a metal tube 262. Therefore, when the contact portion 261 contacts the workpiece W, a pressing force is generated between the contact portion 261 and the workpiece W, and the workpiece W moves. For example, when measuring the distance between the first side surface of the workpiece W and the second side surface facing the first side surface, when the first side surface is pressed by the contact portion 261 and the workpiece W moves, the distance depends on the distance moved. Error is included in the measurement result of the position of the first side surface. Therefore, the error is reflected in the distance between the first side surface and the second side surface. Therefore, the measurement control unit 315 includes a first image of the workpiece W generated by the imaging unit 201 before the contact portion 261 contacts the side surface of the workpiece W in order to measure the position of the side surface of the workpiece W, and the workpiece W In order to measure the position of the side surface of the workpiece W, the contact portion 261 and the side surface of the workpiece W are formed using the second image of the workpiece W generated by the imaging unit 201 after the contact portion 261 contacts the side surface of the workpiece W. It is detected that the workpiece W has moved on the placement surface of the stage 23 due to the contact. For example, the input receiving unit 311 of the control device 31 sets the feature of the workpiece W as a monitoring target. The measurement control unit 315 detects that the workpiece W has moved by comparing the position of the monitoring target in the first image with the position of the monitoring target in the second image. For example, the measurement control unit 315 determines that the workpiece W has moved when the distance between the position of the monitoring target in the first image and the position of the monitoring target in the second image is equal to or greater than a threshold value.

●画像(ワークの特定形状の位置を監視すること)に基づく移動検知
図35(a)はプローブ26のコンタクト部261がワークWの側面に接触する前に撮像部201によりワークWを撮影して生成された第一画像Im1を示している。この例で測定制御部315はコンタクト部261がワークWの側面に接触する前に撮影された第一画像Im1と、コンタクト部261がワークWの側面に接触した後に撮影された第二画像Im2とを用いてワークWの移動を検知する。たとえば、測定制御部315は、第一画像Im1におけるワークWの特徴の位置と第二画像Im2におけるワークWの特徴の位置とを比較することでワークWの移動を検知する。この例では、移動監視対象(検知対象)である特徴として、第一特徴領域(エッジ抽出領域3501)において抽出された複数のエッジ点から近似により求められた第一線(直線3502)と、第二特徴領域(エッジ抽出領域3502)において抽出された複数のエッジ点から近似により求められた第二線(直線3504)との交点3505が採用されている。
FIG. 35A shows an image of the workpiece W taken by the imaging unit 201 before the contact portion 261 of the probe 26 contacts the side surface of the workpiece W. FIG. The generated first image Im1 is shown. In this example, the measurement control unit 315 includes a first image Im1 photographed before the contact portion 261 contacts the side surface of the workpiece W, and a second image Im2 photographed after the contact portion 261 contacts the side surface of the workpiece W. Is used to detect the movement of the workpiece W. For example, the measurement control unit 315 detects the movement of the workpiece W by comparing the position of the feature of the workpiece W in the first image Im1 and the position of the feature of the workpiece W in the second image Im2. In this example, as a feature that is a movement monitoring target (detection target), a first line (straight line 3502) obtained by approximation from a plurality of edge points extracted in the first feature region (edge extraction region 3501), and the first An intersection point 3505 with a second line (straight line 3504) obtained by approximation from a plurality of edge points extracted in the two feature region (edge extraction region 3502) is employed.

図35(b)はコンタクト部261がプローブ測定のためにワークWの側面に接触したときに撮像部201によりワークWを撮影して生成されたワーク画像Im1'を示している。図35(b)が示すように、コンタクト部261がワークW(またはワークWがコンタクト部261)を押圧したことにより、ワークWが移動している。   FIG. 35B shows a workpiece image Im1 ′ generated by photographing the workpiece W by the imaging unit 201 when the contact portion 261 contacts the side surface of the workpiece W for probe measurement. As shown in FIG. 35B, the work W is moved by the contact portion 261 pressing the work W (or the work W is the contact portion 261).

図35(c)はプローブ26のコンタクト部261がワークWの側面に接触した後に撮像部201によりワークWを撮影して生成された第二画像Im2を示している。測定制御部315は、第一画像Im1と同様に第二画像Im2において第一線(直線3502)と第二線(直線3504)との交点3505の位置を求め、第一画像Im1における交点3505の位置と比較する。測定制御部315は、第二画像Im2における交点3505の位置と第一画像Im1における交点3505の位置との距離が閾値以上であれば、ワークWが移動したと判定し、ユーザに対して警告を行ったり、再測定を実行したりする。   FIG. 35C shows a second image Im <b> 2 generated by photographing the workpiece W by the imaging unit 201 after the contact portion 261 of the probe 26 contacts the side surface of the workpiece W. The measurement control unit 315 obtains the position of the intersection point 3505 of the first line (straight line 3502) and the second line (straight line 3504) in the second image Im2 in the same manner as the first image Im1, and the intersection point 3505 in the first image Im1. Compare with position. If the distance between the position of the intersection point 3505 in the second image Im2 and the position of the intersection point 3505 in the first image Im1 is equal to or greater than the threshold, the measurement control unit 315 determines that the workpiece W has moved and warns the user. Or perform a remeasurement.

●ワークの特定形状に接触したコンタクト部の位置を監視することに基づく移動検知
図36(a)はプローブ26のコンタクト部261がワークWの側面に接触する前に撮像部201によりワークWを撮影して生成された第一画像Im1を示している。ワークWは特定形状(特徴)である突起部3601を有している。測定制御部315は、ワークWの幅等を測定するためにコンタクト部261をワークWの側面に接触させる前に、コンタクト部261を突起部3601に接触させて突起部3601の位置としてコンタクト部261の中心位置P1を求める。矢印はコンタクト部261のスキャン経路を示している。
Movement detection based on monitoring the position of a contact portion that has contacted a specific shape of the workpiece FIG. 36A shows an image of the workpiece W taken by the imaging unit 201 before the contact portion 261 of the probe 26 contacts the side surface of the workpiece W. The first image Im1 generated in this way is shown. The workpiece W has a protrusion 3601 having a specific shape (feature). Before the contact control unit 315 contacts the side surface of the workpiece W to measure the width or the like of the workpiece W, the measurement control unit 315 contacts the projection unit 3601 with the contact unit 261 as the position of the projection unit 3601 and contacts the contact unit 261. The center position P1 is obtained. An arrow indicates a scan path of the contact portion 261.

図36(b)はコンタクト部261がプローブ測定のためにワークWの側面に接触したときに撮像部201によりワークWを撮影して生成されたワーク画像Im1' を示している。図36(b)が示すように、コンタクト部261がワークW(またはワークWがコンタクト部261)を押圧したことにより、ワークWが移動している。   FIG. 36B shows a workpiece image Im1 ′ generated by photographing the workpiece W by the imaging unit 201 when the contact portion 261 contacts the side surface of the workpiece W for probe measurement. As shown in FIG. 36B, the work W is moved by the contact portion 261 pressing the work W (or the work W is the contact portion 261).

図36(c)はコンタクト部261がワークWの側面に接触した後に撮像部201によりワークWを撮影して生成された第二画像Im2を示している。測定制御部315は、第一画像Im1と同様に、コンタクト部261を突起部3601に接触させて突起部3601の位置としてコンタクト部261の中心位置P2を求める。さらに、測定制御部315は、第一画像Im1から求められたコンタクト部261の中心位置P1と第二画像Im2から求められたコンタクト部261の中心位置P2とを比較することでワークWが移動したかどうかを判定する。たとえば、測定制御部315は、第二画像Im2における中心位置P1と第一画像Im1における中心位置P1との距離が閾値以上であれば、ワークWが移動したと判定し、ユーザに対して警告を行ったり、再測定を実行したりする。   FIG. 36C shows a second image Im2 generated by photographing the workpiece W by the imaging unit 201 after the contact portion 261 contacts the side surface of the workpiece W. Similar to the first image Im1, the measurement control unit 315 brings the contact portion 261 into contact with the protruding portion 3601, and obtains the center position P2 of the contact portion 261 as the position of the protruding portion 3601. Further, the measurement control unit 315 compares the center position P1 of the contact portion 261 obtained from the first image Im1 with the center position P2 of the contact portion 261 obtained from the second image Im2, and the workpiece W has moved. Determine whether or not. For example, if the distance between the center position P1 in the second image Im2 and the center position P1 in the first image Im1 is equal to or greater than the threshold value, the measurement control unit 315 determines that the workpiece W has moved and warns the user. Or perform a remeasurement.

●ワーク画像内の特定領域の輝度を監視することに基づく移動検知
図37(a)はプローブ26のコンタクト部261がワークWの側面に接触する前に撮像部201によりワークWを撮影して生成された第一画像Im1を示している。ワークWの表面には反射率に特徴がある特徴3701を有している。測定制御部315は、ワークWの幅等を測定するためにコンタクト部261をワークWの側面に接触させる前に取得した第一画像Im1に対して、輝度検知領域3702を配置し、輝度検知領域3702内の輝度(例:平均値)Iv1を算出する。輝度検知領域3702は、ワークWの位置とは無関係であり、ワーク画像における特定位置に紐付されている。
Movement detection based on monitoring luminance of specific area in work image FIG. 37A is generated by imaging the work W by the imaging unit 201 before the contact part 261 of the probe 26 contacts the side surface of the work W. The first image Im1 is shown. The surface of the workpiece W has a characteristic 3701 having a characteristic in reflectance. The measurement control unit 315 arranges the luminance detection region 3702 for the first image Im1 acquired before the contact portion 261 is brought into contact with the side surface of the workpiece W in order to measure the width of the workpiece W and the like. The luminance (eg, average value) Iv1 within 3702 is calculated. The brightness detection area 3702 is irrelevant to the position of the work W, and is associated with a specific position in the work image.

図37(b)はコンタクト部261がプローブ測定のためにワークWの側面に接触したときに撮像部201によりワークWを撮影して生成されたワーク画像Im1' を示している。図37(b)が示すように、コンタクト部261がワークW(またはワークWがコンタクト部261)を押圧したことにより、ワークWが移動している。   FIG. 37B shows a workpiece image Im1 ′ generated by photographing the workpiece W by the imaging unit 201 when the contact portion 261 contacts the side surface of the workpiece W for probe measurement. As shown in FIG. 37B, the work W is moved by the contact portion 261 pressing the work W (or the work W is the contact portion 261).

図37(c)はコンタクト部261がワークWの側面に接触した後に撮像部201によりワークWを撮影して生成された第二画像Im2を示している。測定制御部315は、第一画像Im1と同様に、第二画像Im2に対して、輝度検知領域3702を配置し、輝度検知領域3702内の輝度(例:平均値)Iv2を算出する。さらに、測定制御部315は、第一画像Im1から求められた輝度Iv1を第二画像Im2から求められた輝度Iv2と比較することでワークWが移動したかどうかを判定する。たとえば、測定制御部315は、第二画像Im2における輝度Iv2と第一画像Im1における輝度Iv1との差が閾値以上であれば、ワークWが移動したと判定し、ユーザに対して警告を行ったり、再測定を実行したりする。   FIG. 37 (c) shows a second image Im <b> 2 generated by photographing the workpiece W by the imaging unit 201 after the contact unit 261 contacts the side surface of the workpiece W. Similar to the first image Im1, the measurement control unit 315 arranges the luminance detection region 3702 for the second image Im2, and calculates the luminance (eg, average value) Iv2 in the luminance detection region 3702. Furthermore, the measurement control unit 315 determines whether or not the workpiece W has moved by comparing the luminance Iv1 obtained from the first image Im1 with the luminance Iv2 obtained from the second image Im2. For example, if the difference between the luminance Iv2 in the second image Im2 and the luminance Iv1 in the first image Im1 is greater than or equal to a threshold value, the measurement control unit 315 determines that the workpiece W has moved and issues a warning to the user. Or perform a re-measurement.

●移動検知設定
図38は移動検知設定に関与する主な機能を説明する図である。図39は移動検知に関する設定を受け付けるためのユーザインターフェース(UI)を説明する図である。図38が示すように入力受付部311は上述した機能に加え移動検知に関する設定を実行する移動検知設定部3801を有している。ユーザがS103の画像測定要素の設定やS104のプローブ測定要素の設定において特定の要素にマウス42のポインタ3905を合わせて右クリックすると、移動検知設定部3801は、図39に示したようなUI3900を表示部21に表示する。たとえば、図35(a)に示した交点3505、図36(a)に示した突起部3601のエッジ(接触点)、図37(a)に示した輝度検知領域3702が右クリックされたことを検知すると、移動検知設定部3801は、UI3900を表示部21に表示する。UI3900は、右クリックにより指定された要素を移動検知のための検知対象として設定するための設定UI3901を有している。設定UI3901は、たとえば、チェックボックスを有していてもよい。チェックボックスに対してマウス42によりチェックが付与されると、対象設定部3802は、検知対象として、指定された要素の位置や特徴量の情報を移動検知設定情報3805に書き込み、移動検知設定情報3805を記憶装置33に記憶させる。検知タイミングの設定UI3902は、移動検知を実行するタイミングを設定するUIである。この例では、ワークごと、測定ごとまたは接触点ごとに移動検知を実行することを選択できる。「ワークごと」とは、ワークWに対して実行される測定群(すべての画像測定とプローブ測定)に対して一度だけ移動検知を実行することを意味する。つまり、第一に第一画像Im1が取得され、第二に測定群に含まれるすべての測定が実行され、第三に第二画像Im2が取得されて移動検知の結果が出力される。「測定ごと」とは、一つのプローブ測定につき一回の移動検知が実行されることを意味する。プローブ測定では、エッジの位置を測定するためにN個の接触点にコンタクト部261が順次接触するが、N個の接触点にコンタクト部261が接触する前に第一画像Im1が取得され、N個の接触点のすべてにコンタクト部261が接触した後に第二画像Im2が取得され、移動検知の結果が出力される。「接触点ごと」とは、一つの接触点ごとに移動検知を実行することを意味する。ユーザはいずれかのチェックボックスにチェックを付与することで、移動検知を実行するタイミングを指定する。タイミング設定部3803は、設定UI3902により指定されたタイミングを移動検知設定情報3805に書き込む。設定UI3903は移動が検知されたときの処理(後処理)を設定するためのUIである。後処理としては、表示部21にワークWが移動したことを示す警告を表示したり、移動に伴う測定誤差を有する可能性がある測定結果を強調表示したり、測定誤差を有する可能性がある測定を再実行したりすることなどがある。ユーザはいずれかのチェックボックスにチェックを付与することで、ワークWの移動が検知されたときの後処理を指定する。後処理設定部3804は、設定UI3903を通じて選択された後処理を移動検知設定情報3805に書き込む。
Movement detection setting FIG. 38 is a diagram for explaining main functions involved in movement detection setting. FIG. 39 is a diagram illustrating a user interface (UI) for accepting settings relating to movement detection. As shown in FIG. 38, the input receiving unit 311 has a movement detection setting unit 3801 for executing settings related to movement detection in addition to the above-described functions. When the user puts the pointer 3905 of the mouse 42 on a specific element and right-clicks in the setting of the image measurement element in S103 or the probe measurement element in S104, the movement detection setting unit 3801 displays a UI 3900 as shown in FIG. Displayed on the display unit 21. For example, it is confirmed that the intersection 3505 shown in FIG. 35A, the edge (contact point) of the projection 3601 shown in FIG. 36A, and the luminance detection area 3702 shown in FIG. When detected, the movement detection setting unit 3801 displays the UI 3900 on the display unit 21. The UI 3900 has a setting UI 3901 for setting an element designated by right-clicking as a detection target for movement detection. The setting UI 3901 may have a check box, for example. When a check is given to the check box by the mouse 42, the target setting unit 3802 writes information on the position and feature amount of the designated element as the detection target in the movement detection setting information 3805, and the movement detection setting information 3805. Is stored in the storage device 33. The detection timing setting UI 3902 is a UI for setting the timing for executing movement detection. In this example, it can be selected to perform movement detection for each workpiece, for each measurement, or for each contact point. “For each work” means that the movement detection is executed only once for the measurement group (all image measurements and probe measurements) executed on the work W. That is, firstly, the first image Im1 is acquired, secondly, all the measurements included in the measurement group are executed, and thirdly, the second image Im2 is acquired, and the result of movement detection is output. “Every measurement” means that one movement detection is performed for one probe measurement. In the probe measurement, in order to measure the position of the edge, the contact portion 261 sequentially contacts the N contact points, but the first image Im1 is acquired before the contact portion 261 contacts the N contact points, and N After the contact part 261 contacts all of the contact points, the second image Im2 is acquired and the result of movement detection is output. “For each contact point” means that movement detection is performed for each contact point. The user designates the timing for executing the movement detection by adding a check to any check box. The timing setting unit 3803 writes the timing specified by the setting UI 3902 in the movement detection setting information 3805. A setting UI 3903 is a UI for setting processing (post-processing) when movement is detected. As post-processing, there is a possibility that a warning indicating that the workpiece W has moved is displayed on the display unit 21, a measurement result that may have a measurement error associated with the movement is highlighted, or that there is a measurement error. For example, the measurement may be re-executed. The user gives a check to any of the check boxes to designate post-processing when the movement of the workpiece W is detected. The post-processing setting unit 3804 writes the post-processing selected through the setting UI 3903 in the movement detection setting information 3805.

図40は移動検知設定を示すフローチャートである。ここでは移動検知設定を他の設定処理から独立して説明するが、移動検知設定は図17に示した画像測定要素の設定や図19に示したプローブ測定要素の設定に組み込まれてもよい。   FIG. 40 is a flowchart showing the movement detection setting. Here, the movement detection setting will be described independently of other setting processes, but the movement detection setting may be incorporated in the setting of the image measurement element shown in FIG. 17 or the setting of the probe measurement element shown in FIG.

S801で移動検知設定部3801はモデルとなるワークWをカメラ200に撮影させてモデル画像を生成し、表示部21に表示する。たとえば、表示欄110にモデル画像がレンダリングされる。   In step S <b> 801, the movement detection setting unit 3801 generates a model image by causing the camera 200 to photograph the model workpiece W and displays the model image on the display unit 21. For example, the model image is rendered in the display field 110.

S802で移動検知設定部3801はユーザの指示にしたがって検知手法を選択する。図35に示したような画像から抽出される特徴を監視して移動を検知する手法、図36に示したような特定の特徴にコンタクト部261を接触させて移動を検知する手法、図37に示したような特定の特徴の輝度を監視して移動を検知する手法などからいずれか一つの手法がユーザにより選択される。たとえば、交点3505が右クリックされると、移動検知設定部3801は画像から抽出される特徴を監視して移動を検知する手法が指定されたと認識してもよい。突起部3601のエッジが右クリックされると、移動検知設定部3801は特定の特徴にコンタクト部261を接触させて移動を検知する手法が指定されたと認識してもよい。輝度検知領域3702が右クリックされると、移動検知設定部3801は特定の特徴の輝度を監視して移動を検知する手法が指定されたと認識してもよい。移動検知設定部3801は選択した手法を移動検知設定情報3805に書き込む。   In step S802, the movement detection setting unit 3801 selects a detection method according to a user instruction. A method for detecting movement by monitoring features extracted from an image as shown in FIG. 35, a method for detecting movement by bringing the contact portion 261 into contact with a specific feature as shown in FIG. 36, and FIG. One method is selected by the user from the method of detecting the movement by monitoring the luminance of the specific feature as shown. For example, when the intersection 3505 is right-clicked, the movement detection setting unit 3801 may recognize that a method for detecting movement by monitoring features extracted from the image is designated. When the edge of the protrusion 3601 is right-clicked, the movement detection setting unit 3801 may recognize that a method for detecting movement by bringing the contact part 261 into contact with a specific feature is designated. When the luminance detection area 3702 is right-clicked, the movement detection setting unit 3801 may recognize that a method for detecting movement by monitoring the luminance of a specific feature is designated. The movement detection setting unit 3801 writes the selected method in the movement detection setting information 3805.

S803で移動検知設定部3801は検知対象を設定する。上述したように移動検知設定部3801の対象設定部3802は表示欄110に表示されたモデル画像に設定された要素が右クリックされ、かつ、検知対象の設定UI3901におけるチェックボックスがチェックされると、その要素を検知対象に設定し、その要素を検知するために必要となる情報を移動検知設定情報3805に書き込む。たとえば、交点3505を定義する直線3502を求めるためのエッジの抽出領域3501のワークWに対する位置と、直線3504を求めるためのエッジの抽出領域3503のワークWに対する位置などの情報が移動検知設定情報3805に書き込まれる。   In step S803, the movement detection setting unit 3801 sets a detection target. As described above, when the target setting unit 3802 of the movement detection setting unit 3801 is right-clicked on an element set in the model image displayed in the display field 110 and the check box in the detection target setting UI 3901 is checked, The element is set as a detection target, and information necessary for detecting the element is written in the movement detection setting information 3805. For example, information such as the position of the edge extraction region 3501 for obtaining the straight line 3502 defining the intersection 3505 with respect to the workpiece W and the position of the edge extraction region 3503 for obtaining the straight line 3504 with respect to the workpiece W are the movement detection setting information 3805. Is written to.

S804で移動検知設定部3801は検知タイミングを設定する。たとえば、移動検知設定部3801のタイミング設定部3803は設定UI3902を通じて指定されたタイミングを移動検知設定情報3805に書き込む。   In S804, the movement detection setting unit 3801 sets the detection timing. For example, the timing setting unit 3803 of the movement detection setting unit 3801 writes the timing designated through the setting UI 3902 in the movement detection setting information 3805.

S805で移動検知設定部3801はワークWの移動が検知されたときに実行される後処理を設定する。たとえば、移動検知設定部3801の後処理設定部3804は設定UI3903を通じて指定された後処理を移動検知設定情報3805に書き込む。   In step S805, the movement detection setting unit 3801 sets post-processing that is executed when movement of the workpiece W is detected. For example, the post-processing setting unit 3804 of the movement detection setting unit 3801 writes the post-processing specified through the setting UI 3903 in the movement detection setting information 3805.

●測定中の移動検知
図41は移動検知に関与する主な機能を示すブロック図である。画像から抽出される特徴を監視して移動を検知する手法が選択されている場合、サーチ処理部351が第一画像Im1におけるワークWの位置と姿勢を求める。エッジ抽出領域特定部352は、移動検知設定情報3805に保持されているエッジ抽出領域3501、3503とワークWとの位置関係に基づき、ワークWに対してエッジ抽出領域3501、3503を配置する。エッジ抽出処理部353はエッジ抽出領域3501、3503からエッジを抽出する。移動検知部4101は、抽出されたエッジから直線3502、3504を求め、さらに、直線3502、3504の交点3505を求める。同様に第二画像Im2からも交点3505が求められる。移動検知部4101は、第一画像Im1における交点3505と第二画像Im2における交点3505との距離が閾値以上であれば、ワークWが移動したと判定する。結果出力部4102は、ワークWが移動したことが検知(判定)されると、ワークWが移動したことを示す警告メッセージを、表示制御部312を介して表示部21に表示する。また、測定制御部315は、ワークWが移動したことが検知されると、ワークWの再測定を実行してもよい。
Movement detection during measurement FIG. 41 is a block diagram showing the main functions involved in movement detection. When the method of detecting the movement by monitoring the feature extracted from the image is selected, the search processing unit 351 obtains the position and orientation of the workpiece W in the first image Im1. The edge extraction area specifying unit 352 arranges the edge extraction areas 3501 and 3503 with respect to the workpiece W based on the positional relationship between the edge extraction areas 3501 and 3503 and the workpiece W held in the movement detection setting information 3805. The edge extraction processing unit 353 extracts edges from the edge extraction areas 3501 and 3503. The movement detection unit 4101 obtains straight lines 3502 and 3504 from the extracted edges, and further obtains an intersection 3505 of the straight lines 3502 and 3504. Similarly, an intersection point 3505 is obtained from the second image Im2. The movement detection unit 4101 determines that the workpiece W has moved if the distance between the intersection point 3505 in the first image Im1 and the intersection point 3505 in the second image Im2 is equal to or greater than a threshold value. When it is detected (determined) that the workpiece W has moved, the result output unit 4102 displays a warning message indicating that the workpiece W has moved on the display unit 21 via the display control unit 312. Moreover, the measurement control part 315 may perform re-measurement of the workpiece | work W, if it detects that the workpiece | work W moved.

図42は移動検知に関与する他の主な機能を示すブロック図である。特定の特徴にコンタクト部261を接触させて移動を検知する手法が選択されている場合、サーチ処理部351がワークWの画像におけるワークWの位置と姿勢を求める。エッジ抽出領域特定部352は、移動検知設定情報3805に保持されている突起部3601のエッジ抽出領域とワークWとの位置関係に基づき、ワークWに対してエッジ抽出領域を配置する。エッジ抽出処理部353はエッジ抽出領域から突起部3601のエッジを抽出する。スキャン動作決定部354は移動検知設定情報3805にしたがってコンタクト部261の接触目標位置を決定し、さらにコンタクト部261の移動開始位置とスキャン経路を決定する。スキャン動作決定部354は移動開始位置とスキャン経路にしたがってコンタクト部261を接触目標位置に接触させて第一画像Im1を取得し、コンタクト部261の中心位置P1を求める。なお、コンタクト部261が接触したことはプローブ検出部356により検知され、中心位置P1は接触位置特定部357によって求められる。同様に、第二画像Im2についてもコンタクト部261の中心位置P2が求められる。移動検知部4101は、中心位置P1と中心位置P2との距離が閾値以上であれば、ワークWが移動したと判定する。結果出力部4102は、ワークWが移動したことが検知(判定)されると、ワークWが移動したことを示す警告メッセージを、表示制御部312を介して表示部21に表示する。また、測定制御部315は、ワークWが移動したことが検知されると、ワークWの再測定を実行してもよい。   FIG. 42 is a block diagram showing other main functions involved in movement detection. When the method of detecting the movement by bringing the contact part 261 into contact with a specific feature is selected, the search processing part 351 obtains the position and orientation of the work W in the image of the work W. The edge extraction region specifying unit 352 arranges the edge extraction region with respect to the workpiece W based on the positional relationship between the edge extraction region of the protrusion 3601 and the workpiece W held in the movement detection setting information 3805. The edge extraction processing unit 353 extracts the edge of the protrusion 3601 from the edge extraction region. The scan operation determination unit 354 determines a contact target position of the contact unit 261 according to the movement detection setting information 3805, and further determines a movement start position and a scan path of the contact unit 261. The scan operation determination unit 354 brings the contact unit 261 into contact with the contact target position according to the movement start position and the scan path, acquires the first image Im1, and obtains the center position P1 of the contact unit 261. The contact of the contact part 261 is detected by the probe detection part 356, and the center position P1 is obtained by the contact position specifying part 357. Similarly, the center position P2 of the contact portion 261 is obtained for the second image Im2. The movement detection unit 4101 determines that the workpiece W has moved if the distance between the center position P1 and the center position P2 is equal to or greater than the threshold value. When it is detected (determined) that the workpiece W has moved, the result output unit 4102 displays a warning message indicating that the workpiece W has moved on the display unit 21 via the display control unit 312. Moreover, the measurement control part 315 may perform re-measurement of the workpiece | work W, if it detects that the workpiece | work W moved.

図43は移動検知に関与する他の主な機能を示すブロック図である。特定の特徴の輝度を監視して移動を検知する手法が選択されている場合、輝度検知領域特定部4301は、サーチ処理部351により求められた第一画像Im1におけるワークWの位置と姿勢と移動検知設定情報3805に応じて輝度検知領域3702をワークWに対して配置する。輝度測定部4302は、第一画像Im1における輝度検知領域3702の輝度Iv1を測定する。つまり、移動検知部4101は輝度測定部を有している。輝度検知領域特定部4301は、第二画像Im2についても移動検知設定情報3805に応じて輝度検知領域3702を配置する。ただし、輝度検知領域3702の位置と姿勢は、第二画像Im2におけるワークWの位置と姿勢とは無関係であり、移動検知設定情報3805に応じて決定される。輝度測定部4302は、第二画像Im2における輝度検知領域3702の輝度Iv2を測定する。移動検知部4101は、輝度Iv1と輝度Iv2との差分が閾値以上であれば、ワークWが移動したと判定する。移動検知部4101は輝度Iv1と輝度Iv2との差分を求める差分演算部と、差分と閾値とを比較する比較部とを有している。結果出力部4102は、ワークWが移動したことが検知(判定)されると、ワークWが移動したことを示す警告メッセージを、表示制御部312を介して表示部21に表示する。また、測定制御部315は、ワークWが移動したことが検知されると、ワークWの再測定を実行してもよい。   FIG. 43 is a block diagram showing other main functions involved in movement detection. When a method of detecting the movement by monitoring the luminance of the specific feature is selected, the luminance detection area specifying unit 4301 moves the position, posture, and movement of the workpiece W in the first image Im1 obtained by the search processing unit 351. A luminance detection area 3702 is arranged with respect to the work W in accordance with the detection setting information 3805. The luminance measurement unit 4302 measures the luminance Iv1 of the luminance detection region 3702 in the first image Im1. That is, the movement detection unit 4101 has a luminance measurement unit. The luminance detection area specifying unit 4301 also arranges the luminance detection area 3702 according to the movement detection setting information 3805 for the second image Im2. However, the position and orientation of the luminance detection area 3702 are independent of the position and orientation of the workpiece W in the second image Im2, and are determined according to the movement detection setting information 3805. The luminance measurement unit 4302 measures the luminance Iv2 of the luminance detection region 3702 in the second image Im2. The movement detection unit 4101 determines that the workpiece W has moved if the difference between the luminance Iv1 and the luminance Iv2 is equal to or greater than a threshold value. The movement detection unit 4101 includes a difference calculation unit that obtains a difference between the luminance Iv1 and the luminance Iv2, and a comparison unit that compares the difference with a threshold value. When it is detected (determined) that the workpiece W has moved, the result output unit 4102 displays a warning message indicating that the workpiece W has moved on the display unit 21 via the display control unit 312. Moreover, the measurement control part 315 may perform re-measurement of the workpiece | work W, if it detects that the workpiece | work W moved.

図44はワークごとに実行される移動検知を含むワークWの測定処理を示すフローチャートである。ここではワークWごとに移動検知が実行されるため、第一画像Im1が取得され、その後にすべての画像測定とすべてのプローブ測定が実行され、最後に第二画像Im2が取得されて移動検知が実行される。   FIG. 44 is a flowchart showing measurement processing of the workpiece W including movement detection executed for each workpiece. Here, since the movement detection is performed for each workpiece W, the first image Im1 is acquired, then all the image measurements and all the probe measurements are performed, and finally the second image Im2 is acquired to detect the movement. Executed.

S901で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第一画像Im1を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P1、輝度Iv1などが検知される。   In step S <b> 901, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and generates the first image generated by the camera 200 and the imaging control unit 313. Im1 is acquired. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P1, the luminance Iv1, and the like are detected.

S902で測定制御部315はワークWに設定された各種の測定を実行する。この測定はすべての画像測定だけでなく、すべてのプローブ測定が含まれる。   In step S <b> 902, the measurement control unit 315 performs various measurements set on the workpiece W. This measurement includes not only all image measurements, but also all probe measurements.

S903で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第二画像Im2を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P2、輝度Iv2などが検知される。   In step S <b> 903, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and generates the second image generated by the camera 200 and the imaging control unit 313. Get Im2. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P2, the luminance Iv2, and the like are detected.

S904で測定制御部315の移動検知部4101は第一画像Im1と第二画像Im2とにおける検知対象の検知結果に基づきワークWが移動したかどうかを判定する。たとえば、移動検知部4101は第一画像Im1における交点3505と第二画像Im2における交点3505との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、中心位置P1と中心位置P2との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、輝度Iv1と輝度Iv2との差分が閾値以上であれば、ワークWが移動したと判定してもよい。ワークWが移動していないと判定すると、測定制御部315は一つのワークWについての測定処理を終了する。一方、ワークWが移動したと判定すると、測定制御部315はS905に進む。   In step S904, the movement detection unit 4101 of the measurement control unit 315 determines whether the workpiece W has moved based on the detection results of the detection targets in the first image Im1 and the second image Im2. For example, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the intersection point 3505 in the first image Im1 and the intersection point 3505 in the second image Im2 is equal to or greater than a threshold value. Further, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the center position P1 and the center position P2 is equal to or greater than a threshold value. The movement detection unit 4101 may determine that the workpiece W has moved if the difference between the luminance Iv1 and the luminance Iv2 is equal to or greater than a threshold value. If it is determined that the workpiece W has not moved, the measurement control unit 315 ends the measurement process for one workpiece W. On the other hand, if it determines with the workpiece | work W having moved, the measurement control part 315 will progress to S905.

S905で測定制御部315は移動検知設定情報3805にしたがって後処理を実行する。たとえば、結果出力部4102は警告メッセージを表示部21に表示したり、プローブ測定の測定結果にワークWの移動に伴う誤差が含まれうること示すための強調表示を実行したりする。また、測定制御部315はワークWの移動に伴う誤差が含まれうるプローブ測定について再測定を実行する。   In step S905, the measurement control unit 315 performs post-processing according to the movement detection setting information 3805. For example, the result output unit 4102 displays a warning message on the display unit 21 or executes highlighting to indicate that an error associated with the movement of the workpiece W may be included in the measurement result of the probe measurement. In addition, the measurement control unit 315 performs remeasurement for probe measurement that may include an error associated with the movement of the workpiece W.

図45はプローブ測定ごとに実行される移動検知を含むワークWの測定処理を示すフローチャートである。ここではプローブ測定の前に第一画像Im1が取得され、プローブ測定が実行された後に第二画像Im2が取得されて移動検知が実行される。各プローブ測定について移動検知が実行されてもよいし、複数あるプローブ測定のうちユーザにより指定されたプローブ測定についてだけ移動検知が実行されてもよい。コンタクト部261が接触しうる複数の位置には、ワークWを移動させてしまいやすい位置と、ワークWを移動させにくい位置とが存在しうる。よって、ワークWを移動させやすい位置への接触を伴うプローブ測定についてのみ、移動検知が実行されてもよい。これにより効率よく移動検知が実行されるようになる。   FIG. 45 is a flowchart showing a workpiece W measurement process including movement detection executed for each probe measurement. Here, the first image Im1 is acquired before the probe measurement, and after the probe measurement is performed, the second image Im2 is acquired and the movement detection is performed. Movement detection may be executed for each probe measurement, or movement detection may be executed only for a probe measurement designated by the user among a plurality of probe measurements. At a plurality of positions where the contact portion 261 can contact, there may be a position where the workpiece W is likely to move and a position where the workpiece W is difficult to move. Therefore, the movement detection may be executed only for the probe measurement involving the contact with the position where the workpiece W is easily moved. Thereby, movement detection is efficiently performed.

S1001で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成されたワーク画像を用いて画像測定を実行する。画像測定ではコンタクト部261がワークWに接触しないため、原理的にワークWの移動が発生しない。そこで、測定制御部315はすべての画像測定をプローブ測定の前にまとめて実行する。   In step S <b> 1001, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to photograph the workpiece W, and displays the workpiece image generated by the camera 200 and the imaging control unit 313. To perform image measurement. In the image measurement, since the contact portion 261 does not contact the workpiece W, the movement of the workpiece W does not occur in principle. Therefore, the measurement control unit 315 performs all image measurements collectively before the probe measurement.

S1002で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第一画像Im1を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P1、輝度Iv1などが検知される。   In step S <b> 1002, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and generates the first image generated by the camera 200 and the imaging control unit 313. Im1 is acquired. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P1, the luminance Iv1, and the like are detected.

S1003で測定制御部315はワークWに設定されたプローブ測定を実行する。ここでは、ワークWに対して設定されている複数のプローブ測定のうちの一つが実行される。   In step S1003, the measurement control unit 315 performs the probe measurement set on the workpiece W. Here, one of a plurality of probe measurements set for the workpiece W is executed.

S1004で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第二画像Im2を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P2、輝度Iv2などが検知される。   In step S <b> 1004, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and generates the second image generated by the camera 200 and the imaging control unit 313. Get Im2. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P2, the luminance Iv2, and the like are detected.

S1005で測定制御部315の移動検知部4101は検知対象の検知結果に基づきワークWが移動したかどうかを判定する。たとえば、移動検知部4101は第一画像Im1における交点3505と第二画像Im2における交点3505との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、中心位置P1と中心位置P2との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、輝度Iv1と輝度Iv2との差分が閾値以上であれば、ワークWが移動したと判定してもよい。ワークWが移動していないと判定すると、測定制御部315はS1007に進む。一方、ワークWが移動したと判定すると、測定制御部315はS1006に進む。   In step S1005, the movement detection unit 4101 of the measurement control unit 315 determines whether the workpiece W has moved based on the detection result of the detection target. For example, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the intersection point 3505 in the first image Im1 and the intersection point 3505 in the second image Im2 is equal to or greater than a threshold value. Further, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the center position P1 and the center position P2 is equal to or greater than a threshold value. The movement detection unit 4101 may determine that the workpiece W has moved if the difference between the luminance Iv1 and the luminance Iv2 is equal to or greater than a threshold value. If it is determined that the workpiece W has not moved, the measurement control unit 315 proceeds to S1007. On the other hand, if it determines with the workpiece | work W having moved, the measurement control part 315 will progress to S1006.

S1006で測定制御部315は移動検知設定情報3805にしたがって後処理を実行する。たとえば、結果出力部4102は警告メッセージを表示部21に表示したり、プローブ測定の測定結果にワークWの移動に伴う誤差が含まれうること示すための強調表示を実行したりする。また、測定制御部315はワークWの移動に伴う誤差が含まれうるプローブ測定について再測定を実行する。   In step S1006, the measurement control unit 315 performs post-processing according to the movement detection setting information 3805. For example, the result output unit 4102 displays a warning message on the display unit 21 or executes highlighting to indicate that an error associated with the movement of the workpiece W may be included in the measurement result of the probe measurement. In addition, the measurement control unit 315 performs remeasurement for probe measurement that may include an error associated with the movement of the workpiece W.

S1007で測定制御部315の移動検知部4101はすべてのプローブ測定が完了したかどうかを判定する。すべてのプローブ測定が完了していれば、測定制御部315は一つのワークWについての測定を終了する。一方、一つ以上のプローブ測定が残っていれば、測定制御部315はS1002ないしS1007の各処理を再度実行する。   In step S1007, the movement detection unit 4101 of the measurement control unit 315 determines whether all probe measurements have been completed. If all the probe measurements are completed, the measurement control unit 315 ends the measurement for one workpiece W. On the other hand, if one or more probe measurements remain, the measurement control unit 315 executes each process of S1002 to S1007 again.

図46は接触点ごとに実行される移動検知を含むワークの測定処理を示すフローチャートである。ここではコンタクト部261が接触点に接触する前にプローブ測定の前に第一画像Im1が取得され、コンタクト部261が接触点に接触した後に第二画像Im2が取得されて移動検知が実行される。   FIG. 46 is a flowchart showing workpiece measurement processing including movement detection executed for each contact point. Here, the first image Im1 is acquired before the probe measurement before the contact part 261 contacts the contact point, and the second image Im2 is acquired after the contact part 261 contacts the contact point, and movement detection is performed. .

S1101で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成されたワーク画像を用いて画像測定を実行する。画像測定ではコンタクト部261がワークWに接触しないため、原理的にワークWの移動が発生しない。そこで、測定制御部315はすべての画像測定をプローブ測定の前にまとめて実行する。   In step S <b> 1101, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and displays the workpiece image generated by the camera 200 and the imaging control unit 313. To perform image measurement. In the image measurement, since the contact portion 261 does not contact the workpiece W, the movement of the workpiece W does not occur in principle. Therefore, the measurement control unit 315 performs all image measurements collectively before the probe measurement.

S1102で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第一画像Im1を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P1、輝度Iv1などが検知される。   In step S <b> 1102, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the work W, and the first image generated by the camera 200 and the imaging control unit 313. Im1 is acquired. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P1, the luminance Iv1, and the like are detected.

S1103で測定制御部315はワークWに設定されたプローブ測定のための接触点に対してコンタクト部261を接触させて接触位置を測定する。ここでは、一つのプローブ測定に設定されている各接触点について接触位置の測定が実行される。   In S1103, the measurement control unit 315 measures the contact position by bringing the contact unit 261 into contact with the contact point for probe measurement set on the workpiece W. Here, the measurement of the contact position is executed for each contact point set for one probe measurement.

S1104で測定制御部315の移動検知部4101は撮像制御部313を通じてカメラ200を制御し、カメラ200の撮像部201にワークWを撮影させ、カメラ200および撮像制御部313により生成された第二画像Im2を取得する。さらに、移動検知部4101は、移動検知設定情報3805にしたがって検知対象を検知する。たとえば、交点3505の位置、中心位置P2、輝度Iv2などが検知される。   In step S <b> 1104, the movement detection unit 4101 of the measurement control unit 315 controls the camera 200 through the imaging control unit 313, causes the imaging unit 201 of the camera 200 to capture the workpiece W, and generates the second image generated by the camera 200 and the imaging control unit 313. Get Im2. Further, the movement detection unit 4101 detects a detection target according to the movement detection setting information 3805. For example, the position of the intersection 3505, the center position P2, the luminance Iv2, and the like are detected.

S1105で測定制御部315の移動検知部4101は検知対象の検知結果に基づきワークWが移動したかどうかを判定する。たとえば、移動検知部4101は第一画像Im1における交点3505と第二画像Im2における交点3505との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、中心位置P1と中心位置P2との距離が閾値以上であれば、ワークWが移動したと判定してもよい。また、移動検知部4101は、輝度Iv1と輝度Iv2との差分が閾値以上であれば、ワークWが移動したと判定してもよい。ワークWが移動していないと判定すると、測定制御部315はS1007に進む。一方、ワークWが移動したと判定すると、測定制御部315はS1006に進む。   In step S1105, the movement detection unit 4101 of the measurement control unit 315 determines whether the workpiece W has moved based on the detection result of the detection target. For example, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the intersection point 3505 in the first image Im1 and the intersection point 3505 in the second image Im2 is equal to or greater than a threshold value. Further, the movement detection unit 4101 may determine that the workpiece W has moved if the distance between the center position P1 and the center position P2 is equal to or greater than a threshold value. The movement detection unit 4101 may determine that the workpiece W has moved if the difference between the luminance Iv1 and the luminance Iv2 is equal to or greater than a threshold value. If it is determined that the workpiece W has not moved, the measurement control unit 315 proceeds to S1007. On the other hand, if it determines with the workpiece | work W having moved, the measurement control part 315 will progress to S1006.

S1106で測定制御部315は移動検知設定情報3805にしたがって後処理を実行する。たとえば、結果出力部4102は警告メッセージを表示部21に表示したり、接触点の測定結果にワークWの移動に伴う誤差が含まれうること示すための強調表示を実行したりする。また、測定制御部315はワークWの移動に伴う誤差が含まれうる接触点の測定について再測定を実行する。   In step S1106, the measurement control unit 315 performs post-processing according to the movement detection setting information 3805. For example, the result output unit 4102 displays a warning message on the display unit 21 or executes highlighting to indicate that an error associated with the movement of the workpiece W may be included in the contact point measurement result. Further, the measurement control unit 315 performs re-measurement on the measurement of the contact point that may include an error accompanying the movement of the workpiece W.

S1107で測定制御部315の移動検知部4101はすべての接触点に対するコンタクト部261の接触とその測定が完了したかどうかを判定する。すべての接触点についての接触と測定が完了していれば、測定制御部315は一つのプローブ測定を終了し、S1108に進む。たとえば、輪郭線算出部358は、接触位置特定部357により求められたコンタクト部261の接触点の位置に基づき、直線や円などの輪郭線を算出する。また、寸法算出部359は、輪郭線に基づき長さなどを算出する。一方、一つ以上の接触点への接触が未実行であれば、測定制御部315はS1102ないしS1107の各処理を再度実行する。   In step S1107, the movement detection unit 4101 of the measurement control unit 315 determines whether or not the contact of the contact unit 261 with respect to all contact points and the measurement have been completed. If contact and measurement have been completed for all contact points, the measurement control unit 315 ends one probe measurement, and proceeds to S1108. For example, the contour calculation unit 358 calculates a contour line such as a straight line or a circle based on the position of the contact point of the contact unit 261 obtained by the contact position specifying unit 357. Further, the dimension calculation unit 359 calculates a length and the like based on the contour line. On the other hand, if the contact with one or more contact points has not been executed, the measurement control unit 315 executes the processes of S1102 to S1107 again.

S1108で測定制御部315の移動検知部4101はすべてのプローブ測定が完了したかどうかを判定する。すべてのプローブ測定が完了していれば、測定制御部315は一つのワークWについての測定を終了する。一方、一つ以上のプローブ測定が残っていれば、測定制御部315はS1102ないしS1108の各処理を再度実行する。   In step S1108, the movement detection unit 4101 of the measurement control unit 315 determines whether all probe measurements have been completed. If all the probe measurements are completed, the measurement control unit 315 ends the measurement for one workpiece W. On the other hand, if one or more probe measurements remain, the measurement control unit 315 executes each process of S1102 to S1108 again.

<まとめ>
図1に示したように、画像測定装置1は、ワークWが載置されるステージ23と、ステージ23に載置されたワークWを撮像して画像を生成する撮像部201と、撮像部201の視野内において、ステージ23に載置されたワークWの側面と接触可能なコンタクト部261を有するプローブ26とを有している。さらに、画像測定装置1は、ステージ23の載置面と略平行にステージ23とプローブ26とのうち少なくとも一方を移動させる水平駆動部24と、コンタクト部261とワークWの側面とが接触したときに撮像部201により生成された画像Ic1、Ic2を用いてワークWの側面の位置を測定する測定部(接触位置特定部357)とを有している。とりわけ、画像測定装置1は移動検知部4101を有している。移動検知部4101は、ワークWの側面の位置を測定するためにコンタクト部261とワークWの側面とが接触する前に撮像部201により生成されたワークWの第一画像Im1を取得する。さらに、移動検知部4101はワークWの側面の位置を測定するためにコンタクト部261とワークWの側面とが接触した後に撮像部201により生成されたワークWの第二画像Im2を取得する。移動検知部4101は、第一画像Im1と第二画像Im2とを用いて、コンタクト部261とワークWの側面とが接触したことによりステージ23の載置面上でワークWが移動したことを検知する。結果出力部4102は移動検知部4101の検知結果を出力する。ワークWが移動したことを知らずにプローブ26で測定を継続すると、ワークWが移動した後に取得された測定結果は誤差を含んでしまう。ワークWの移動を防ぐために、特別の治具を作成して、治具にワークWを固定することが考えられる。しかし、この手法では治具へのワークWの固定作業と取り外し作業が必須となり、大量のワークWを効率よく測定することが困難となる。本実施例によれば、ワークWの移動の検知結果が出力されるため、ユーザは、ワークWが移動したことを認識しやすくなる。その結果、ユーザは、ワークWの測定をやり直して誤差の少ない測定結果を取得しやすくなり、測定精度の低下が抑制される。また、治具へのワークWの固定作業と取り外し作業が必要ないため、ユーザビリティを向上する。
<Summary>
As illustrated in FIG. 1, the image measurement apparatus 1 includes a stage 23 on which a workpiece W is placed, an imaging unit 201 that captures an image of the workpiece W placed on the stage 23 and generates an image, and an imaging unit 201. The probe 26 having the contact portion 261 that can come into contact with the side surface of the workpiece W placed on the stage 23 is provided. Furthermore, when the image measuring apparatus 1 is in contact with the horizontal drive unit 24 that moves at least one of the stage 23 and the probe 26 substantially parallel to the mounting surface of the stage 23, and the contact unit 261 and the side surface of the workpiece W. And a measuring unit (contact position specifying unit 357) that measures the position of the side surface of the workpiece W using the images Ic1 and Ic2 generated by the imaging unit 201. In particular, the image measurement apparatus 1 includes a movement detection unit 4101. The movement detection unit 4101 acquires the first image Im1 of the workpiece W generated by the imaging unit 201 before the contact unit 261 contacts the side surface of the workpiece W in order to measure the position of the side surface of the workpiece W. Furthermore, the movement detection unit 4101 acquires the second image Im2 of the workpiece W generated by the imaging unit 201 after the contact unit 261 contacts the side surface of the workpiece W in order to measure the position of the side surface of the workpiece W. The movement detection unit 4101 uses the first image Im1 and the second image Im2 to detect that the workpiece W has moved on the placement surface of the stage 23 due to the contact between the contact unit 261 and the side surface of the workpiece W. To do. The result output unit 4102 outputs the detection result of the movement detection unit 4101. If measurement is continued with the probe 26 without knowing that the workpiece W has moved, the measurement result obtained after the workpiece W has moved will contain an error. In order to prevent the movement of the workpiece W, it is conceivable to create a special jig and fix the workpiece W to the jig. However, in this method, it is essential to fix and remove the workpiece W from the jig, and it is difficult to efficiently measure a large amount of workpieces W. According to the present embodiment, since the detection result of the movement of the workpiece W is output, the user can easily recognize that the workpiece W has moved. As a result, the user can easily measure the workpiece W again and obtain a measurement result with less error, and a decrease in measurement accuracy is suppressed. Moreover, since the work of fixing the workpiece W to the jig and the work of removing it are not necessary, usability is improved.

エッジ抽出処理部353や接触位置特定部357などは、第一画像Im1と第二画像Im2とのそれぞれに含まれるワークWの特徴を抽出する抽出部の一例である。移動検知部4101は、第一画像Im1から抽出された特徴の位置と第二画像Im2から抽出された特徴の位置とを比較することでワークWが移動したことを検知する。このようにワークWの特徴に着目することで画像処理によりワークWの移動を検知できるようになる。   The edge extraction processing unit 353, the contact position specifying unit 357, and the like are an example of an extraction unit that extracts features of the workpiece W included in each of the first image Im1 and the second image Im2. The movement detection unit 4101 detects that the workpiece W has moved by comparing the feature position extracted from the first image Im1 and the feature position extracted from the second image Im2. By paying attention to the feature of the workpiece W in this way, the movement of the workpiece W can be detected by image processing.

図35などに示したように、移動検知部4101は、第一画像Im1から抽出された特徴の位置と第二画像Im2から抽出された特徴の位置との距離が閾値以上かどうかに基づきステージ23の載置面上でワークWが移動したことを検知してもよい。
特徴は、たとえば、ワークWの画像から抽出された第一エッジと第二エッジとの交点3505であってもよい。
As illustrated in FIG. 35 and the like, the movement detection unit 4101 determines whether the distance between the feature position extracted from the first image Im1 and the feature position extracted from the second image Im2 is equal to or greater than a threshold value. It may be detected that the workpiece W has moved on the mounting surface.
The feature may be, for example, an intersection 3505 of the first edge and the second edge extracted from the image of the workpiece W.

図36などに示したように、第一画像Im1は、ワークWの第一側面の位置を測定する前にコンタクト部261とワークWの第二側面とを接触させて撮像部201により生成された画像であってもよい。第二画像Im2は、第一側面の位置を測定した後にコンタクト部261と第二側面とを接触させて撮像部201により生成された画像であってもよい。移動検知部4101は、第一画像Im1における所定の特徴の位置と第二画像Im2における所定の特徴の位置とを比較することでワークWが移動したことを検知してもよい。   As illustrated in FIG. 36 and the like, the first image Im1 is generated by the imaging unit 201 by bringing the contact unit 261 into contact with the second side surface of the workpiece W before measuring the position of the first side surface of the workpiece W. It may be an image. The second image Im2 may be an image generated by the imaging unit 201 by contacting the contact unit 261 and the second side surface after measuring the position of the first side surface. The movement detection unit 4101 may detect that the workpiece W has moved by comparing the position of the predetermined feature in the first image Im1 and the position of the predetermined feature in the second image Im2.

図37などに示したように、移動検知部4101は、第一画像Im1におけるワークWの所定領域の輝度と第二画像Im2における所定領域の輝度とを比較することでワークWが移動したことを検知してもよい。ワークWの表面の一部には周囲の反射率と顕著に異なる反射率を有する部分がありうる。そこで、この部分の輝度に着目することで、コンタクト部261を用いずに移動検知を実行することが可能となる。   As shown in FIG. 37 and the like, the movement detection unit 4101 compares the brightness of the predetermined area of the work W in the first image Im1 with the brightness of the predetermined area in the second image Im2, and indicates that the work W has moved. It may be detected. A part of the surface of the workpiece W may have a portion having a reflectance that is significantly different from the ambient reflectance. Therefore, by focusing attention on the luminance of this portion, it is possible to execute movement detection without using the contact portion 261.

測定制御部315がワークWの複数の側面の位置を測定することがある。この場合、結果出力部4102は、複数の側面の位置の測定結果のうちワークWが移動したことによりエラーを含みうる測定結果について警告表示を実行してもよい。これにより、どの測定結果に誤差が含まれているかをユーザは把握しやすくなろう。   The measurement control unit 315 may measure the positions of a plurality of side surfaces of the workpiece W. In this case, the result output unit 4102 may execute a warning display for a measurement result that may include an error due to movement of the workpiece W among the measurement results of the positions of the plurality of side surfaces. This makes it easier for the user to know which measurement result includes an error.

図46に示したように、移動検知部4101は、測定部がワークWの複数の側面の位置のそれぞれを測定するたびにワークWが移動したことを検知してもよい。これによりワークWの移動を精度よく検知できるようになろう。なお、移動しにくいワークWについては、図44に示したように一つのワークWについて一回の移動検知が実行されれば十分であろう。つまり、第一画像Im1は、測定部が複数の側面のうち最初の側面の位置を測定する前に生成された画像であり、第二画像Im2は、測定部が複数の側面のうち最後の側面の位置を測定した後に生成された画像である。また、図45に示したように一つのプローブ測定について一回の移動検知が実行されてもよい。この場合に、第一画像Im1は、複数の側面のうち予め指定された側面の位置を測定する前に生成された画像であり、第二画像Im2は、予め指定された側面の位置を測定した後に生成された画像である。また、複数のプローブ測定のうち指定されたプローブ測定についてだけ移動検知が実行されてもよい。また、複数の接触点のうち指定された接触点についてだけ移動検知が実行されてもよい。   As illustrated in FIG. 46, the movement detection unit 4101 may detect that the workpiece W has moved each time the measurement unit measures each of the positions of the plurality of side surfaces of the workpiece W. Thereby, the movement of the workpiece W can be accurately detected. For the workpiece W that is difficult to move, it is sufficient that one movement detection is executed for one workpiece W as shown in FIG. That is, the first image Im1 is an image generated before the measurement unit measures the position of the first side surface among the plurality of side surfaces, and the second image Im2 is the last side surface among the plurality of side surfaces. It is the image produced | generated after measuring the position of. In addition, as shown in FIG. 45, one movement detection may be performed for one probe measurement. In this case, the first image Im1 is an image generated before measuring the position of the side surface specified in advance among the plurality of side surfaces, and the second image Im2 is the position of the side surface specified in advance. It is an image generated later. Further, movement detection may be executed only for a specified probe measurement among a plurality of probe measurements. Further, movement detection may be executed only for a designated contact point among a plurality of contact points.

1 画像測定装置、201,206 撮像部、21 表示部、23 ステージ、24 水平駆動部、26 プローブ、261 コンタクト部、31 制御装置、311 入力受付部、315 測定制御部、33 記憶装置、4101 移動検知部、4102 結果出力部 DESCRIPTION OF SYMBOLS 1 Image measuring apparatus, 201,206 Imaging part, 21 Display part, 23 Stage, 24 Horizontal drive part, 26 Probe, 261 Contact part, 31 Control apparatus, 311 Input reception part, 315 Measurement control part, 33 Storage apparatus, 4101 Movement Detection unit, 4102 Result output unit

Claims (10)

ワークが載置されるステージと、
前記ステージに載置された前記ワークを撮像して画像を生成する撮像部と、
前記撮像部の視野内において、前記ステージに載置された前記ワークの側面と接触可能なコンタクト部を有するプローブと、
前記ステージの載置面と略平行に前記ステージと前記プローブとのうち少なくとも一方を移動させる駆動部と、
前記コンタクト部と前記ワークの側面とが接触しているときに前記撮像部により生成された画像を用いて前記ワークの側面の位置を測定する測定部と
を有する画像測定装置であって、
前記ワークの側面の位置を測定するために前記コンタクト部と前記ワークの側面とが接触する前に前記撮像部により生成された前記ワークの第一画像と、前記ワークの側面の位置を測定するために前記コンタクト部と前記ワークの側面とが接触した後に前記撮像部により生成された前記ワークの第二画像とを用いて、前記コンタクト部と前記ワークの側面とが接触したことにより前記ステージの載置面上で前記ワークが移動したことを検知する移動検知部と、
前記移動検知部の検知結果を出力する出力部と
をさらに有することを特徴とする画像測定装置。
A stage on which the workpiece is placed;
An imaging unit that images the workpiece placed on the stage and generates an image;
In the field of view of the imaging unit, a probe having a contact part that can come into contact with the side surface of the workpiece placed on the stage;
A drive unit that moves at least one of the stage and the probe substantially parallel to the mounting surface of the stage;
An image measuring apparatus comprising: a measuring unit that measures a position of the side surface of the workpiece using an image generated by the imaging unit when the contact unit and the side surface of the workpiece are in contact with each other;
In order to measure the position of the side surface of the workpiece and the first image of the workpiece generated by the imaging unit before the contact portion and the side surface of the workpiece contact to measure the position of the side surface of the workpiece The contact portion and the side surface of the work are brought into contact with each other by using the second image of the workpiece generated by the imaging unit after the contact portion and the side surface of the workpiece are in contact with each other. A movement detector for detecting that the workpiece has moved on the surface;
An image measurement apparatus further comprising: an output unit that outputs a detection result of the movement detection unit.
前記第一画像と前記第二画像とのそれぞれに含まれる前記ワークの特徴を抽出する抽出部をさらに有し、
前記移動検知部は、前記第一画像から抽出された前記特徴の位置と前記第二画像から抽出された前記特徴の位置とを比較することで前記ワークが移動したことを検知することを特徴とする請求項1に記載の画像測定装置。
An extractor for extracting features of the workpiece included in each of the first image and the second image;
The movement detection unit detects that the workpiece has moved by comparing the position of the feature extracted from the first image with the position of the feature extracted from the second image. The image measuring device according to claim 1.
前記移動検知部は、前記第一画像から抽出された前記特徴の位置と前記第二画像から抽出された前記特徴の位置との距離が閾値以上かどうかに基づき前記ステージの載置面上で前記ワークが移動したことを検知することを特徴とする請求項2に記載の画像測定装置。   The movement detector is configured to determine whether the distance between the feature position extracted from the first image and the feature position extracted from the second image is greater than or equal to a threshold value on the stage mounting surface. The image measuring apparatus according to claim 2, wherein the movement of the workpiece is detected. 前記特徴は、前記ワークの画像から抽出された第一エッジと第二エッジとの交点であることを特徴とする請求項2または3に記載の画像測定装置。   The image measuring apparatus according to claim 2, wherein the feature is an intersection of a first edge and a second edge extracted from the image of the workpiece. 前記第一画像は、前記ワークの第一側面の位置を測定する前に前記コンタクト部と前記ワークの第二側面とを接触させて前記撮像部により生成された画像であり、
前記第二画像は、前記第一側面の位置を測定した後に前記コンタクト部と前記第二側面とを接触させて前記撮像部により生成された画像であり、
前記移動検知部は、前記第一画像における所定の特徴の位置と前記第二画像における前記所定の特徴の位置とを比較することで前記ワークが移動したことを検知することを特徴とする請求項1に記載の画像測定装置。
The first image is an image generated by the imaging unit by contacting the second side surface of the workpiece with the contact unit before measuring the position of the first side surface of the workpiece,
The second image is an image generated by the imaging unit by contacting the contact portion and the second side surface after measuring the position of the first side surface,
The movement detection unit detects that the workpiece has moved by comparing a position of a predetermined feature in the first image with a position of the predetermined feature in the second image. 2. The image measuring device according to 1.
前記移動検知部は、前記第一画像における前記ワークの所定領域の輝度と前記第二画像における前記所定領域の輝度とを比較することで前記ワークが移動したことを検知することを特徴とする請求項1に記載の画像測定装置。   The said movement detection part detects that the said workpiece | work moved by comparing the brightness | luminance of the predetermined area | region of the said workpiece | work in said 1st image, and the brightness | luminance of the said predetermined area | region in said 2nd image. Item 2. The image measuring device according to Item 1. 前記測定部は前記ワークの複数の側面の位置を測定し、
前記出力部は、前記複数の側面の位置の測定結果のうち前記ワークが移動したことによりエラーを含みうる測定結果について警告表示を実行することを特徴とする請求項1ないし6のいずれか一項に記載の画像測定装置。
The measuring unit measures positions of a plurality of side surfaces of the workpiece;
The said output part performs a warning display about the measurement result which may contain an error because the said workpiece | work moved among the measurement results of the position of these side surfaces, The Claim 1 thru | or 6 characterized by the above-mentioned. The image measuring device described in 1.
前記移動検知部は、前記測定部が前記ワークの複数の側面の位置のそれぞれを測定するたびに前記ワークが移動したことを検知することを特徴とする請求項7に記載の画像測定装置。   The image measurement apparatus according to claim 7, wherein the movement detection unit detects that the workpiece has moved each time the measurement unit measures each of the positions of a plurality of side surfaces of the workpiece. 前記第一画像は、前記測定部が前記複数の側面のうち最初の側面の位置を測定する前に生成された画像であり、
前記第二画像は、前記測定部が前記複数の側面のうち最後の側面の位置を測定した後に生成された画像である
ことを特徴とする請求項7に記載の画像測定装置。
The first image is an image generated before the measurement unit measures the position of the first side surface among the plurality of side surfaces,
The image measurement apparatus according to claim 7, wherein the second image is an image generated after the measurement unit measures a position of a last side surface among the plurality of side surfaces.
前記第一画像は、前記複数の側面のうち予め指定された側面の位置を測定する前に生成された画像であり、
前記第二画像は、前記予め指定された側面の位置を測定した後に生成された画像である
ことを特徴とする請求項7に記載の画像測定装置。
The first image is an image generated before measuring a position of a predetermined side surface among the plurality of side surfaces,
The image measurement apparatus according to claim 7, wherein the second image is an image generated after measuring a position of the side surface designated in advance.
JP2016215547A 2016-11-02 2016-11-02 Image measurement device Pending JP2018072269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016215547A JP2018072269A (en) 2016-11-02 2016-11-02 Image measurement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016215547A JP2018072269A (en) 2016-11-02 2016-11-02 Image measurement device

Publications (1)

Publication Number Publication Date
JP2018072269A true JP2018072269A (en) 2018-05-10

Family

ID=62115222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016215547A Pending JP2018072269A (en) 2016-11-02 2016-11-02 Image measurement device

Country Status (1)

Country Link
JP (1) JP2018072269A (en)

Similar Documents

Publication Publication Date Title
JP6663808B2 (en) Image measuring device
JP5547105B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP6663807B2 (en) Image measuring device
JP5679560B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP5525953B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP6001305B2 (en) Inspection of potential interfering elements in machine vision systems
JP5467962B2 (en) Measurement setting data creation device, measurement setting data creation method, program for measurement setting data creation device, and dimension measurement device
US10186398B2 (en) Sample positioning method and charged particle beam apparatus
JP2014055864A (en) Image measurement device, manufacturing method of the same and program for image measurement device
JP2012037257A (en) Measurement setting data creation device, measurement setting data creation method, and program for measurement setting data creation device
JP6797638B2 (en) Image measuring device
JP6552074B2 (en) Image measuring instrument
US11776110B2 (en) Image measuring apparatus
JP6767843B2 (en) Image measuring device
JP2016048195A (en) Image measuring device
US10846881B2 (en) Image measuring apparatus
JP6360620B2 (en) Charged particle beam apparatus, charged particle beam apparatus alignment method, alignment program, and storage medium
JP2018072269A (en) Image measurement device
JPWO2016157403A6 (en) Charged particle beam apparatus, charged particle beam apparatus alignment method, alignment program, and storage medium
JP6797639B2 (en) Image measuring device
JP7161430B2 (en) Image measuring device
JP2012032323A (en) Picture measuring device, picture measuring method and program for picture measuring device
JP2009053162A (en) Non-contact device for measuring three-dimensional shape
JP2015081882A (en) Image measurement device and height measurement method