JP6184345B2 - Image measuring instrument - Google Patents

Image measuring instrument Download PDF

Info

Publication number
JP6184345B2
JP6184345B2 JP2014039702A JP2014039702A JP6184345B2 JP 6184345 B2 JP6184345 B2 JP 6184345B2 JP 2014039702 A JP2014039702 A JP 2014039702A JP 2014039702 A JP2014039702 A JP 2014039702A JP 6184345 B2 JP6184345 B2 JP 6184345B2
Authority
JP
Japan
Prior art keywords
edge
edge extraction
measurement target
measurement
target region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014039702A
Other languages
Japanese (ja)
Other versions
JP2015163860A (en
Inventor
崇志 成瀬
崇志 成瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2014039702A priority Critical patent/JP6184345B2/en
Publication of JP2015163860A publication Critical patent/JP2015163860A/en
Application granted granted Critical
Publication of JP6184345B2 publication Critical patent/JP6184345B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Instruments For Measurement Of Length By Optical Means (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Description

本発明は、画像測定器に係り、さらに詳しくは、ワークを撮影したワーク画像内のエッジを抽出してワークの寸法や形状を測定する画像測定器の改良に関する。   The present invention relates to an image measuring instrument, and more particularly, to an improvement of an image measuring instrument that extracts an edge in a workpiece image obtained by photographing a workpiece and measures the size and shape of the workpiece.

画像測定器は、ワークを撮影してワーク画像を取得し、ワーク画像内のエッジを抽出してワークの寸法や形状を測定する装置である(例えば、特許文献1〜5)。通常、ワークは、X,Y及びZ軸方向に移動可能な可動ステージ上に載置される。可動ステージをZ軸方向に移動させることにより、ワーク画像のピント合わせが行われ、X又はY軸方向に移動させることにより、ワークの視野内への位置調整が行われる。   An image measuring device is a device that captures a workpiece, acquires the workpiece image, extracts an edge in the workpiece image, and measures the size and shape of the workpiece (for example, Patent Documents 1 to 5). Usually, the workpiece is placed on a movable stage movable in the X, Y and Z axis directions. The workpiece image is focused by moving the movable stage in the Z-axis direction, and the position of the workpiece in the visual field is adjusted by moving in the X- or Y-axis direction.

ワーク画像は、可動ステージのZ軸方向の位置に関わらず、ワークに対して極めて正確な相似形であることから、ワーク画像上の距離や角度を判定することにより、ワーク上における実際の寸法を検知することができる。エッジ抽出は、ワーク画像に対し、予め指定される測定対象領域について、輝度変化を解析してエッジ点を抽出し、抽出した複数のエッジ点に直線、円、円弧などの幾何学図形をフィッティングさせることにより行われる。ワークの寸法は、この様にして求められるエッジ間の距離や角度、円形状のエッジの中心位置や直径として測定される。また、測定した寸法値と設計値との差分(誤差)を公差と比較して良否判定が行われる。   Since the workpiece image is a very accurate similar shape to the workpiece regardless of the position of the movable stage in the Z-axis direction, the actual dimensions on the workpiece can be determined by determining the distance and angle on the workpiece image. Can be detected. Edge extraction is a method of analyzing the brightness change of a workpiece image area specified in advance to extract edge points and fitting a plurality of extracted edge points with geometric figures such as straight lines, circles, and arcs. Is done. The dimensions of the workpiece are measured as the distance and angle between the edges determined in this way, and the center position and diameter of the circular edge. In addition, a quality determination is performed by comparing a difference (error) between the measured dimension value and the design value with a tolerance.

この様な画像測定器を用いてワークの外形を測定する場合、カメラとは反対側からステージ上のワークに照明光を照射する透過照明を利用することが多い。一方、ワーク上の非貫通孔、段差、凹凸を測定する場合には、カメラと同じ側からステージ上のワークに照明光を照射する落射照明が利用される。   When measuring the external shape of a workpiece using such an image measuring device, transmitted illumination that irradiates illumination light to the workpiece on the stage from the opposite side of the camera is often used. On the other hand, when measuring a non-through hole, a step, and an unevenness on a workpiece, epi-illumination that illuminates the workpiece on the stage from the same side as the camera is used.

特開2012−32224号公報JP 2012-32224 A 特開2012−32341号公報JP 2012-32341 A 特開2012−32344号公報JP 2012-32344 A 特開2012−159409号公報JP 2012-159409 A 特開2012−159410号公報JP 2012-159410 A

従来の画像測定器では、所望のエッジを正しく抽出するために、ワーク画像に対して測定対象領域を適切に指定する必要があった。しかしながら、測定対象領域の位置や形状を適切に指定することは、ユーザにとって手間がかかる作業であることに加え、抽出しようとするエッジが含まれるように測定対象領域の位置を定めることが容易ではないという問題があった。特に、落射照明を利用して撮影されたワーク画像では、ワーク表面のテクスチャ、すなわち、加工跡、模様、微細な凹凸、段差などをエッジであると誤認し易く、所望のエッジを正確に見極めることが難しいという問題があった。   In a conventional image measuring device, it is necessary to appropriately specify a measurement target region for a work image in order to correctly extract a desired edge. However, it is not easy to specify the position and shape of the measurement target region in addition to the time-consuming work for the user, and it is easy to determine the position of the measurement target region so that the edge to be extracted is included. There was no problem. In particular, in workpiece images shot using epi-illumination, it is easy to misidentify textures on the workpiece surface, that is, processing traces, patterns, fine irregularities, steps, etc., as edges and accurately identify the desired edge. There was a problem that was difficult.

本発明は、上記の事情に鑑みてなされたものであり、ユーザの作業負荷を増大させることなく、所望のエッジを正しく抽出することができる画像測定器を提供することを目的とする。特に、ユーザにより指定される測定対象領域に位置のばらつきがある場合、測定対象領域を間違って指定した場合、或いは、複数のエッジが測定対象領域に含まれている場合であっても、所望のエッジを正しく抽出することができる画像測定器を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to provide an image measuring instrument that can correctly extract a desired edge without increasing a user's work load. In particular, even if there is a variation in position in the measurement target region specified by the user, the measurement target region is specified incorrectly, or even if a plurality of edges are included in the measurement target region, the desired region An object of the present invention is to provide an image measuring device capable of correctly extracting edges.

第1の本発明による画像測定器は、ワークを撮影し、ワーク画像を生成するカメラと、ユーザ操作に基づいて、上記ワーク画像に対し、測定対象領域を指定する測定領域指定手段と、上記測定対象領域内のエッジを抽出するエッジ抽出手段と、同一の測定対象領域に対する2以上のエッジ抽出結果を表示するエッジ抽出結果表示手段と、ユーザ操作に基づいて、上記エッジ抽出結果のいずれか一つを選択するエッジ抽出結果選択手段と、選択された上記エッジ抽出結果を他の上記エッジ抽出結果よりも優先的に抽出するためのエッジ抽出パラメータを決定するエッジ抽出パラメータ決定手段とを備えて構成される。   An image measuring instrument according to a first aspect of the present invention includes a camera that captures a workpiece and generates a workpiece image, a measurement region designation unit that designates a measurement target region for the workpiece image based on a user operation, and the measurement Any one of the edge extraction results based on a user operation, an edge extraction means for extracting edges in the target area, an edge extraction result display means for displaying two or more edge extraction results for the same measurement target area Edge extraction result selection means for selecting the edge extraction parameter determination means for determining an edge extraction parameter for preferentially extracting the selected edge extraction result over the other edge extraction results. The

この画像測定器では、同一の測定対象領域から抽出した2以上のエッジ抽出結果が表示される。このため、ユーザは、表示されたエッジ抽出結果のいずれか一つを選択するだけで、所望のエッジを抽出するのに適したエッジ抽出パラメータを決定することができる。また、エッジ抽出は、この様にして決定されたエッジ抽出パラメータに基づいて行われるので、測定対象領域に位置のばらつきがある場合、測定対象領域を間違って指定した場合、或いは、複数のエッジが測定対象領域に含まれている場合であっても、所望のエッジを正しく抽出することができる。   In this image measuring device, two or more edge extraction results extracted from the same measurement target region are displayed. For this reason, the user can determine an edge extraction parameter suitable for extracting a desired edge only by selecting one of the displayed edge extraction results. Further, since the edge extraction is performed based on the edge extraction parameters determined in this way, when there is a variation in position in the measurement target region, when the measurement target region is specified incorrectly, or when a plurality of edges are detected. Even if it is included in the measurement target region, a desired edge can be correctly extracted.

第2の本発明による画像測定器は、上記構成に加え、上記エッジ抽出結果表示手段が、上記エッジ抽出結果を、上記ワーク画像上に重ねて表示するように構成される。この様な構成によれば、エッジ抽出結果とワーク画像との相対的な位置関係を容易に識別することができる。   In addition to the above-described configuration, the image measuring device according to the second aspect of the present invention is configured such that the edge extraction result display means displays the edge extraction result superimposed on the work image. According to such a configuration, the relative positional relationship between the edge extraction result and the work image can be easily identified.

第3の本発明による画像測定器は、上記構成に加え、上記エッジ抽出パラメータ決定手段により決定された上記エッジ抽出パラメータと、上記測定領域指定手段により指定された上記測定対象領域とを測定設定データとして保持する測定設定記憶手段を備え、上記測定設定記憶手段には、上記エッジ抽出パラメータが上記測定対象領域に関連づけて保持され、上記エッジ抽出手段が、上記測定設定データが指定された連続測定において、上記測定設定データとして保持された上記エッジ抽出パラメータに基づいて、エッジ抽出を行うように構成される。   In addition to the above configuration, the image measuring instrument according to the third aspect of the present invention is configured to measure the edge extraction parameter determined by the edge extraction parameter determination unit and the measurement target region specified by the measurement region specification unit. Measurement setting storage means that holds the edge extraction parameters in association with the measurement target region, and the edge extraction means performs continuous measurement in which the measurement setting data is designated. The edge extraction is performed based on the edge extraction parameters held as the measurement setting data.

この様な構成によれば、測定設定記憶手段にはエッジ抽出パラメータが測定対象領域に関連づけて保持されるので、測定設定データを指定することにより、測定対象領域を測定するのに適したエッジ抽出パラメータを識別することができる。また、測定設定データが指定された連続測定では、測定対象領域を測定するのに適したエッジ抽出パラメータでエッジ抽出が行われる。このため、ワークの形状や材質が変わっても、測定設定データを指定するだけで、安定した寸法測定を行うことができる。   According to such a configuration, since the edge extraction parameter is stored in the measurement setting storage unit in association with the measurement target region, the edge extraction suitable for measuring the measurement target region can be performed by specifying the measurement setting data. Parameters can be identified. In continuous measurement in which measurement setting data is designated, edge extraction is performed with an edge extraction parameter suitable for measuring the measurement target region. Therefore, even if the shape or material of the workpiece changes, stable dimension measurement can be performed simply by specifying measurement setting data.

第4の本発明による画像測定器は、上記構成に加え、上記測定設定記憶手段には、上記測定領域指定手段により同一のワーク画像に対して指定された2以上の上記測定対象領域と、これらの測定対象領域ごとに上記エッジ抽出パラメータ決定手段により決定された上記エッジ抽出パラメータとが測定設定データとして保持され、上記エッジ抽出手段が、上記連続測定において、上記測定設定データとして保持された上記エッジ抽出パラメータを用いて対応する上記測定対象領域からエッジを抽出することを、上記測定対象領域を変更しながら繰り返すように構成される。この様な構成によれば、測定設定データを指定するだけで、複数の測定対象領域について、安定した寸法測定を行うことができる。   In addition to the above-described configuration, the image measuring device according to the fourth aspect of the present invention includes, in the measurement setting storage unit, two or more measurement target regions designated for the same workpiece image by the measurement region designation unit, and these The edge extraction parameter determined by the edge extraction parameter determination unit for each measurement target area is stored as measurement setting data, and the edge extraction unit is configured to store the edge held as the measurement setting data in the continuous measurement. Extracting an edge from the corresponding measurement target region using the extraction parameter is configured to be repeated while changing the measurement target region. According to such a configuration, it is possible to perform stable dimension measurement for a plurality of measurement target regions simply by specifying measurement setting data.

第5の本発明による画像測定器は、上記構成に加え、上記エッジ抽出結果表示手段が、同一の測定対象領域から抽出された2以上のエッジのいずれか一つを選択的に表示するように構成される。この様な構成によれば、同一の測定対象領域から抽出されたエッジを個別に確認することができる。   In addition to the above-described configuration, the image measuring instrument according to the fifth aspect of the invention is configured such that the edge extraction result display means selectively displays any one of two or more edges extracted from the same measurement target region. Composed. According to such a configuration, the edges extracted from the same measurement target region can be individually confirmed.

第6の本発明による画像測定器は、上記構成に加え、抽出された上記エッジに基づいて、ワークの寸法値を求める寸法値算出手段と、抽出された上記エッジに基づいて、幾何学的特徴量を求める幾何学的特徴量算出手段とを備え、上記エッジ抽出結果表示手段が、上記エッジに対応づけて、上記寸法値、上記エッジを構成するエッジ点列又は上記幾何学的特徴量を表示するように構成される。この様な構成によれば、エッジの形状や位置を確認することができるとともに、エッジを構成するエッジ点列、エッジから求められたワークの寸法値又は幾何学的特徴量を確認して適切なエッジを選択することができる。   In addition to the above-described configuration, the image measuring instrument according to the sixth aspect of the present invention includes a dimension value calculating means for obtaining a dimension value of a workpiece based on the extracted edge, and a geometric feature based on the extracted edge. A geometric feature amount calculating means for obtaining a quantity, and the edge extraction result display means displays the dimension value, the edge point sequence constituting the edge, or the geometric feature quantity in association with the edge. Configured to do. According to such a configuration, the shape and position of the edge can be confirmed, and the edge point sequence constituting the edge, the dimensional value of the workpiece obtained from the edge, or the geometric feature amount can be confirmed appropriately. Edges can be selected.

第7の本発明による画像測定器は、上記構成に加え、ユーザ操作に基づいて、エッジ形状を指定するエッジ形状指定手段を備え、上記エッジ抽出手段が、指定された上記エッジ形状に基づいて、上記測定対象領域内のエッジを抽出するように構成される。この様な構成によれば、ユーザにより指定されたエッジ形状以外の形状のエッジは抽出されないので、エッジ抽出の精度を向上させることができる。   An image measuring device according to a seventh aspect of the present invention includes, in addition to the above configuration, an edge shape designating unit that designates an edge shape based on a user operation, and the edge extracting unit is based on the designated edge shape, An edge in the measurement target region is extracted. According to such a configuration, since an edge having a shape other than the edge shape designated by the user is not extracted, the accuracy of edge extraction can be improved.

第8の本発明による画像測定器は、上記構成に加え、上記エッジ形状指定手段が、ユーザが上記測定対象領域を指定する際の領域指定情報に基づいて、エッジ点列にフィッティングさせる幾何学的形状を自動的に決定するように構成される。この様な構成によれば、測定対象領域を指定するだけで、エッジ形状を指定することができる。   In addition to the above-described configuration, the image measuring device according to the eighth aspect of the present invention is a geometrical structure in which the edge shape designating means fits an edge point sequence based on region designation information when the user designates the measurement target region. It is configured to automatically determine the shape. According to such a configuration, the edge shape can be designated simply by designating the measurement target region.

第9の本発明による画像測定器は、上記構成に加え、同一の測定対象領域から抽出された2以上の上記エッジについて、エッジ抽出の安定度を求める安定度算出手段を備え、上記エッジ抽出結果表示手段が、上記安定度に基づいて、同一の測定対象領域から抽出された2以上のエッジを選択的に表示するように構成される。この様な構成によれば、安定度の低いエッジは表示されないので、安定度の低いエッジによってエッジ抽出パラメータが誤って定められるのを防止することができる。   An image measuring device according to a ninth aspect of the present invention comprises, in addition to the above-described configuration, a stability calculation unit that obtains the stability of edge extraction for two or more edges extracted from the same measurement target region, and the edge extraction result The display means is configured to selectively display two or more edges extracted from the same measurement target region based on the stability. According to such a configuration, since the edge with low stability is not displayed, it is possible to prevent the edge extraction parameter from being erroneously determined by the edge with low stability.

第10の本発明による画像測定器は、上記構成に加え、上記エッジ抽出手段が、同一の測定対象領域に対し、1つのエッジだけが抽出される上記エッジ抽出パラメータを変更しながらエッジ抽出を繰り返すことにより、複数のエッジを抽出するように構成される。この様な構成によれば、エッジ抽出パラメータを異ならせるだけで、同一の測定対象領域から複数のエッジを抽出することができる。   An image measuring instrument according to a tenth aspect of the present invention, in addition to the above configuration, the edge extraction means repeats edge extraction while changing the edge extraction parameter for extracting only one edge for the same measurement target region. Thus, a plurality of edges are extracted. According to such a configuration, it is possible to extract a plurality of edges from the same measurement target region only by changing the edge extraction parameters.

第11の本発明による画像測定器は、上記構成に加え、上記エッジ抽出手段が、上記エッジ抽出パラメータを変更しながらエッジ抽出を繰り返して複数のエッジを抽出する際に、上記エッジ抽出パラメータ決定手段が、上記エッジ抽出パラメータを同時に決定するように構成される。この様な構成によれば、同一の測定対象領域から複数のエッジを抽出した時点で、それぞれのエッジを抽出するのに適したエッジ抽出パラメータが自動的に決定されるので、ユーザがエッジを選択した時点では、演算によってエッジ抽出パラメータを求める必要がない。   An image measuring instrument according to an eleventh aspect of the present invention, in addition to the above-described configuration, includes the edge extraction parameter determination means when the edge extraction means repeats edge extraction while changing the edge extraction parameters to extract a plurality of edges. Are configured to simultaneously determine the edge extraction parameters. According to such a configuration, when a plurality of edges are extracted from the same measurement target region, an edge extraction parameter suitable for extracting each edge is automatically determined, and the user selects an edge. At this point, it is not necessary to obtain edge extraction parameters by calculation.

第12の本発明による画像測定器は、上記構成に加え、上記エッジ抽出手段が、上記測定対象領域から抽出した多数のエッジ点を、フィットする幾何学図形に応じて2以上の形状グループにグループ分けし、上記形状グループごとにエッジを特定するように構成される。この様な構成によれば、多数のエッジ点を複数の形状グループにグループ分けすることにより、同一の測定対象領域から複数のエッジを抽出することができる。   An image measuring device according to a twelfth aspect of the present invention is the image measuring device according to the present invention, wherein the edge extracting means groups a plurality of edge points extracted from the measurement target region into two or more shape groups according to the geometric figure to be fitted. The edge is divided and specified for each shape group. According to such a configuration, it is possible to extract a plurality of edges from the same measurement target region by grouping a large number of edge points into a plurality of shape groups.

第13の本発明による画像測定器は、上記構成に加え、同一の測定対象領域から2以上の上記エッジが抽出されたことをユーザに通知するユーザ通知手段を備え、上記エッジ抽出結果表示手段が、ユーザ操作に基づいて、同一の測定対象領域から抽出された2以上のエッジをワーク画像上に表示するように構成される。この様な構成によれば、同一の測定対象領域から複数のエッジが抽出されたことを確認してから、これらのエッジをワーク画像上に表示させることができる。   An image measuring device according to a thirteenth aspect of the present invention includes, in addition to the above configuration, user notification means for notifying a user that two or more of the edges have been extracted from the same measurement target region, and the edge extraction result display means includes Based on the user operation, two or more edges extracted from the same measurement target region are displayed on the work image. According to such a configuration, after confirming that a plurality of edges are extracted from the same measurement target region, these edges can be displayed on the work image.

本発明によれば、ユーザの作業負荷を増大させることなく、所望のエッジを正しく抽出することができる画像測定器を提供することができる。特に、同一の測定対象領域から複数のエッジ抽出結果を抽出してエッジ抽出パラメータを決定するので、ユーザにより指定される測定対象領域に位置のばらつきがあっても、所望のエッジを正しく抽出することができる画像測定器を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the image measuring device which can extract a desired edge correctly can be provided, without increasing a user's workload. In particular, since multiple edge extraction results are extracted from the same measurement target area and the edge extraction parameters are determined, even if there is a variation in position in the measurement target area specified by the user, the desired edge can be correctly extracted. It is possible to provide an image measuring device that can

本発明の実施の形態1による画像測定器1の一構成例を示した斜視図である。It is the perspective view which showed one structural example of the image measuring device 1 by Embodiment 1 of this invention. 図1の測定ユニット10の構成例を模式的に示した説明図であり、測定ユニット10を撮影軸と平行な垂直面により切断した場合の切断面が示されている。It is explanatory drawing which showed typically the structural example of the measurement unit 10 of FIG. 1, and the cut surface at the time of cut | disconnecting the measurement unit 10 by the perpendicular | vertical surface parallel to an imaging | photography axis | shaft is shown. 図1の制御ユニット20内の機能構成の一例を示したブロック図である。It is the block diagram which showed an example of the function structure in the control unit 20 of FIG. 図1の画像測定器1の動作の一例を示した図であり、測定ユニット10のディスプレイ装置11に表示される測定設定画面50が示されている。FIG. 2 is a diagram showing an example of the operation of the image measuring device 1 in FIG. 1, and shows a measurement setting screen 50 displayed on the display device 11 of the measurement unit 10. 図1の画像測定器1の動作の一例を示した図であり、プレビュー領域51内のワーク画像2に対して測定対象領域3を指定した後の状態が示されている。FIG. 2 is a diagram showing an example of the operation of the image measuring device 1 in FIG. 1, and shows a state after a measurement target region 3 is designated for a work image 2 in a preview region 51. 図1の画像測定器1の動作の一例を示した図であり、測定対象領域3から抽出されたエッジ4の一つを選択した場合が示されている。FIG. 2 is a diagram showing an example of the operation of the image measuring device 1 in FIG. 1, and shows a case where one of the edges 4 extracted from the measurement target region 3 is selected. 図1の画像測定器1の動作の一例を示した図であり、エッジ選択ボタン56を操作して他のエッジ4を選択した場合が示されている。FIG. 8 is a diagram showing an example of the operation of the image measuring device 1 in FIG. 1, and shows a case where another edge 4 is selected by operating the edge selection button 56. 図1の画像測定器1におけるエッジ抽出時の動作の一例を模式的に示した説明図である。It is explanatory drawing which showed typically an example of the operation | movement at the time of edge extraction in the image measuring device 1 of FIG. 図1の画像測定器1におけるエッジ抽出時の動作の一例を示した図であり、エッジ抽出パラメータを互いに異ならせて抽出されたエッジ点5が示されている。It is the figure which showed an example of the operation | movement at the time of the edge extraction in the image measuring device 1 of FIG. 1, and the edge point 5 extracted by changing edge extraction parameters mutually is shown. 図1の画像測定器1における測定設定時の動作の一例を示したフローチャートである。3 is a flowchart showing an example of an operation at the time of measurement setting in the image measuring device 1 of FIG. 1. 図1の画像測定器1における寸法測定時の動作の一例を示したフローチャートである。3 is a flowchart showing an example of an operation at the time of dimension measurement in the image measuring device 1 of FIG. 1. 本発明の実施の形態2による画像測定器1の一構成例を示したブロック図であり、制御ユニット20内の機能構成の一例が示されている。FIG. 5 is a block diagram showing an example of the configuration of an image measuring device 1 according to Embodiment 2 of the present invention, in which an example of a functional configuration in the control unit 20 is shown.

実施の形態1.
<画像測定器1>
図1は、本発明の実施の形態1による画像測定器1の一構成例を示した斜視図である。この画像測定器1は、ワークを撮影したワーク画像内のエッジを抽出してワークの寸法を測定する寸法測定装置であり、測定ユニット10、制御ユニット20、キーボード31及びマウス32により構成される。ワークは、その形状や寸法が測定される測定対象物である。
Embodiment 1 FIG.
<Image measuring device 1>
FIG. 1 is a perspective view showing a configuration example of an image measuring device 1 according to Embodiment 1 of the present invention. The image measuring instrument 1 is a dimension measuring apparatus that extracts an edge in a workpiece image obtained by photographing a workpiece and measures the dimension of the workpiece, and includes a measuring unit 10, a control unit 20, a keyboard 31, and a mouse 32. The workpiece is a measurement object whose shape and dimensions are measured.

測定ユニット10は、ディスプレイ装置11、可動ステージ12、XY調整つまみ14a、Z調整つまみ14b、電源スイッチ15及び実行ボタン16を備え、可動ステージ12上のワークに可視光からなる検出光を照射し、その透過光又は反射光を受光してワーク画像を生成する。ワークは、可動ステージ12の検出エリア13内に載置される。また、測定ユニット10は、ワーク画像をディスプレイ装置11の表示画面11aに表示する。   The measurement unit 10 includes a display device 11, a movable stage 12, an XY adjustment knob 14 a, a Z adjustment knob 14 b, a power switch 15, and an execution button 16, and irradiates the work on the movable stage 12 with detection light composed of visible light, The transmitted light or reflected light is received to generate a work image. The workpiece is placed in the detection area 13 of the movable stage 12. Further, the measurement unit 10 displays the work image on the display screen 11 a of the display device 11.

ディスプレイ装置11は、ワーク画像や測定結果を表示画面11a上に表示する表示装置である。可動ステージ12は、ワークを載置するための載置台であり、検出光を透過させる検出エリア13が設けられている。検出エリア13は、透明ガラスからなる円形状の領域である。この可動ステージ12は、カメラの撮影軸に平行なZ軸方向と、撮影軸に垂直なX軸方向及びY軸方向に移動させることができる。   The display device 11 is a display device that displays work images and measurement results on the display screen 11a. The movable stage 12 is a mounting table for mounting a work, and is provided with a detection area 13 through which detection light is transmitted. The detection area 13 is a circular area made of transparent glass. The movable stage 12 can be moved in the Z-axis direction parallel to the shooting axis of the camera and in the X-axis direction and the Y-axis direction perpendicular to the shooting axis.

XY調整つまみ14aは、可動ステージ12をX軸方向又はY軸方向に移動させることにより、X軸方向及びY軸方向の位置を調整するための操作部である。Z調整つまみ14bは、可動ステージ12をZ軸方向に移動させることにより、Z軸方向の位置を調整するための操作部である。電源スイッチ15は、測定ユニット10及び制御ユニット20の主電源をオン状態及びオフ状態間で切り替えるための操作部である。実行ボタン16は、寸法測定を開始させるための操作部である。   The XY adjustment knob 14a is an operation unit for adjusting the position in the X-axis direction and the Y-axis direction by moving the movable stage 12 in the X-axis direction or the Y-axis direction. The Z adjustment knob 14b is an operation unit for adjusting the position in the Z-axis direction by moving the movable stage 12 in the Z-axis direction. The power switch 15 is an operation unit for switching the main power supply of the measurement unit 10 and the control unit 20 between an on state and an off state. The execution button 16 is an operation unit for starting dimension measurement.

制御ユニット20は、測定ユニット10による撮影や画面表示を制御し、ワーク画像を解析してワークの寸法を測定するコントローラ部であり、キーボード31及びマウス32が接続されている。電源投入後、検出エリア13内にワークを配置して実行ボタン16を操作すれば、ワークの寸法が自動的に測定される。   The control unit 20 is a controller unit that controls photographing and screen display by the measurement unit 10, analyzes a work image, and measures the dimensions of the work, and is connected to a keyboard 31 and a mouse 32. After the power is turned on, if the work is placed in the detection area 13 and the execution button 16 is operated, the dimensions of the work are automatically measured.

<測定ユニット10>
図2は、図1の測定ユニット10の構成例を模式的に示した説明図であり、測定ユニット10を撮影軸と平行な垂直面により切断した場合の切断面が示されている。この測定ユニット10は、ディスプレイ装置11、可動ステージ12、筐体100、ステージ調整部101、鏡筒部102、照明位置調整部103、カメラ110,120、同軸落射照明ユニット130、リング照明ユニット140及び透過照明ユニット150により構成される。
<Measurement unit 10>
FIG. 2 is an explanatory view schematically showing a configuration example of the measurement unit 10 of FIG. 1, and shows a cut surface when the measurement unit 10 is cut by a vertical plane parallel to the imaging axis. The measurement unit 10 includes a display device 11, a movable stage 12, a housing 100, a stage adjustment unit 101, a lens barrel unit 102, an illumination position adjustment unit 103, cameras 110 and 120, a coaxial incident illumination unit 130, a ring illumination unit 140, and The transmitted illumination unit 150 is used.

ステージ調整部101、鏡筒部102、カメラ110,120、同軸落射照明ユニット130及び透過照明ユニット150は、筐体100内に配置されている。ステージ調整部101は、制御ユニット20からの駆動信号に基づいて、可動ステージ12をX,Y又はZ軸方向に移動させ、ワークのX,Y及びZ軸方向の位置を調整する。   The stage adjustment unit 101, the lens barrel unit 102, the cameras 110 and 120, the coaxial incident illumination unit 130, and the transmission illumination unit 150 are disposed in the housing 100. The stage adjustment unit 101 moves the movable stage 12 in the X, Y, or Z axis direction based on the drive signal from the control unit 20 to adjust the position of the workpiece in the X, Y, and Z axis directions.

カメラ110は、撮影倍率の低い撮像装置であり、撮像素子111、結像レンズ112、絞り板113及び受光レンズ114により構成される。撮像素子111は、検出光を受光してワーク画像を生成する。この撮像素子111は、受光面を下方に向けて配置されている。結像レンズ112は、検出光を撮像素子111上に結像させる光学部材である。絞り板113は、検出光の透過光量を制限する光学絞りであり、結像レンズ112及び受光レンズ114間に配置されている。受光レンズ114は、ワークからの検出光を集光する光学部材であり、可動ステージ12に対向させて配置されている。結像レンズ112、絞り板113及び受光レンズ114は、上下方向に延びる中心軸を中心として配置されている。   The camera 110 is an imaging device with a low imaging magnification, and includes an imaging element 111, an imaging lens 112, a diaphragm plate 113, and a light receiving lens 114. The image sensor 111 receives the detection light and generates a work image. The image sensor 111 is disposed with the light receiving surface facing downward. The imaging lens 112 is an optical member that images the detection light on the image sensor 111. The diaphragm plate 113 is an optical diaphragm that limits the amount of transmitted detection light, and is disposed between the imaging lens 112 and the light receiving lens 114. The light receiving lens 114 is an optical member that condenses the detection light from the workpiece, and is disposed to face the movable stage 12. The imaging lens 112, the diaphragm plate 113, and the light receiving lens 114 are arranged around a central axis extending in the vertical direction.

カメラ120は、撮影倍率の高い撮像装置であり、撮像素子121、結像レンズ122、絞り板123、ハーフミラー124及び受光レンズ114により構成される。撮像素子121は、検出光を受光してワーク画像を生成する。この撮像素子121は、受光面を水平方向に向けて配置されている。結像レンズ122は、検出光を撮像素子121上に結像させる光学部材である。絞り板123は、検出光の透過光量を制限する光学絞りであり、結像レンズ122及びハーフミラー124間に配置されている。受光レンズ114は、カメラ110と共通である。受光レンズ114を透過した検出光は、ハーフミラー124により水平方向に折り曲げられ、絞り板123及び結像レンズ122を介して撮像素子121に結像する。   The camera 120 is an imaging device having a high shooting magnification, and includes an imaging device 121, an imaging lens 122, a diaphragm plate 123, a half mirror 124, and a light receiving lens 114. The image sensor 121 receives the detection light and generates a work image. The image sensor 121 is disposed with the light receiving surface facing in the horizontal direction. The imaging lens 122 is an optical member that images the detection light on the image sensor 121. The diaphragm plate 123 is an optical diaphragm that limits the amount of detection light transmitted, and is disposed between the imaging lens 122 and the half mirror 124. The light receiving lens 114 is common to the camera 110. The detection light transmitted through the light receiving lens 114 is bent in the horizontal direction by the half mirror 124 and forms an image on the image sensor 121 through the diaphragm plate 123 and the imaging lens 122.

撮像素子111及び121には、CCD(Charge Coupled Devices:電荷結合素子)、CMOS(Complementary Metal Oxide Semiconductor:相補型金属酸化物半導体)などのイメージセンサが用いられる。受光レンズ114には、上下方向、すなわち、撮影軸方向の位置が変化しても、像の大きさを変化させない性質を有するテレセントリックレンズが用いられる。   For the imaging elements 111 and 121, an image sensor such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor) is used. As the light receiving lens 114, a telecentric lens having a property that the size of the image is not changed even if the position in the vertical direction, that is, the photographing axis direction is changed, is used.

同軸落射照明ユニット130は、可動ステージ12上のワークに照明光を上方から照射する落射照明装置であり、照射光の光軸を撮影軸に一致させている。この同軸落射照明ユニット130は、水平方向に向けて配置された光源131と、光源131から出射された照明光を下方に折り曲げるハーフミラー132とにより構成される。   The coaxial epi-illumination unit 130 is an epi-illumination device that irradiates the workpiece on the movable stage 12 with illumination light from above, and makes the optical axis of the illumination light coincide with the imaging axis. The coaxial incident illumination unit 130 includes a light source 131 arranged in the horizontal direction and a half mirror 132 that bends the illumination light emitted from the light source 131 downward.

結像レンズ112,122、絞り板113,123、ハーフミラー124,132及び受光レンズ114は、鏡筒部102内に配置されている。   The imaging lenses 112 and 122, the diaphragm plates 113 and 123, the half mirrors 124 and 132, and the light receiving lens 114 are disposed in the lens barrel portion 102.

透過照明ユニット150は、可動ステージ12上のワークに照明光を下方から照射する透過照明装置であり、光源151、ミラー152及び集光レンズ153により構成される。光源151は、水平方向に向けて配置されている。光源151から出射された照明光は、ミラー152により反射され、集光レンズ153を介して出射される。この照明光は、可動ステージ12を透過し、その透過光の一部は、ワークにより遮断され、他の一部が受光レンズ114に入射する。   The transmission illumination unit 150 is a transmission illumination device that irradiates the work on the movable stage 12 with illumination light from below, and includes a light source 151, a mirror 152, and a condenser lens 153. The light source 151 is arranged in the horizontal direction. The illumination light emitted from the light source 151 is reflected by the mirror 152 and emitted through the condenser lens 153. The illumination light is transmitted through the movable stage 12, a part of the transmitted light is blocked by the work, and the other part is incident on the light receiving lens 114.

リング照明ユニット140は、可動ステージ12上のワークに照明光を上方又は側方から照射する落射照明装置であり、カメラ110及び120の撮影軸を取り囲むリング形状からなる。このリング照明ユニット140は、可動ステージ12上のワークに拡散光を上方或いは側方から照射する拡散照明装置141と、可動ステージ12上のワークに照明光を側方から照射する側射照明装置142とを同軸に配置した照明装置である。   The ring illumination unit 140 is an epi-illumination device that irradiates the workpiece on the movable stage 12 with illumination light from above or from the side, and has a ring shape that surrounds the imaging axes of the cameras 110 and 120. The ring illumination unit 140 includes a diffuse illumination device 141 that irradiates the workpiece on the movable stage 12 from above or from the side, and a side illumination device 142 that illuminates the workpiece on the movable stage 12 from the side. Is an illuminating device arranged coaxially.

拡散照明装置141は、カメラ110及び120の撮影軸を取り囲むリング状の光源を有する。この光源は、周方向を分割した2以上のブロックごとに点灯可能である。側射照明装置142は、平行光又は平行光に近い拡がり角からなる照明光を照射し、ワークの周囲を側方から照明することができる。   The diffuse illumination device 141 includes a ring-shaped light source that surrounds the imaging axes of the cameras 110 and 120. This light source can be turned on every two or more blocks divided in the circumferential direction. The side illuminating device 142 can irradiate parallel light or illumination light having a divergence angle close to parallel light to illuminate the periphery of the workpiece from the side.

照明ユニット130〜150の光源には、LED(発光ダイオード)やハロゲンランプが用いられる。照明位置調整部103は、リング照明ユニット140を撮影軸方向に移動させることにより、可動ステージ12に対するリング照明ユニット140の相対位置を調整する相対位置調整手段である。ワークの照明方法としては、透過照明、リング照明又は同軸落射照明のいずれかを選択することができる。   An LED (light emitting diode) or a halogen lamp is used as a light source of the illumination units 130 to 150. The illumination position adjustment unit 103 is a relative position adjustment unit that adjusts the relative position of the ring illumination unit 140 with respect to the movable stage 12 by moving the ring illumination unit 140 in the imaging axis direction. As a method for illuminating the workpiece, one of transmission illumination, ring illumination, and coaxial epi-illumination can be selected.

<制御ユニット20>
図3は、図1の制御ユニット20内の機能構成の一例を示したブロック図である。この制御ユニット20は、撮像制御部21、ワーク画像記憶部22、測定領域指定部23、測定設定記憶部24、幾何学的特徴量算出部25、エッジ抽出部26、寸法値算出部27、エッジ形状指定部28、エッジ抽出結果表示部29、エッジ抽出結果選択部30及びエッジ抽出パラメータ決定部41により構成される。
<Control unit 20>
FIG. 3 is a block diagram showing an example of a functional configuration in the control unit 20 of FIG. The control unit 20 includes an imaging control unit 21, a work image storage unit 22, a measurement area designation unit 23, a measurement setting storage unit 24, a geometric feature amount calculation unit 25, an edge extraction unit 26, a dimension value calculation unit 27, an edge The shape specifying unit 28, the edge extraction result display unit 29, the edge extraction result selection unit 30, and the edge extraction parameter determination unit 41 are configured.

撮像制御部21は、ユーザ操作に基づいて、カメラ110,120、照明位置調整部103及び照明ユニット130〜150を制御し、カメラ110又は120からワーク画像を取得してワーク画像記憶部22内に格納する。   The imaging control unit 21 controls the cameras 110 and 120, the illumination position adjustment unit 103, and the illumination units 130 to 150 based on a user operation, acquires a work image from the camera 110 or 120, and stores it in the work image storage unit 22. Store.

測定領域指定部23は、ユーザ操作に基づいて、ワーク画像記憶部22からワーク画像を読み出し、ワーク画像に対し、測定対象領域を指定する。測定対象領域は、寸法測定のためにエッジ抽出処理を行わせる画像領域であり、矩形、円形、円環、円弧などの様々な形状を指定することができる。例えば、測定領域指定部23は、拡散照明装置141の拡散光を照射して撮影されたワーク画像を用いて、測定対象領域を指定する。拡散光を照射して撮影されたワーク画像を用いることにより、ワークの全体像を確認しながら測定対象領域を指定することができる。測定設定記憶部24には、測定対象領域を示す位置情報や測定種別が測定設定データとして保持される。   The measurement area designating unit 23 reads a work image from the work image storage unit 22 based on a user operation, and designates a measurement target area for the work image. The measurement target area is an image area on which edge extraction processing is performed for dimension measurement, and various shapes such as a rectangle, a circle, a ring, and an arc can be designated. For example, the measurement area designating unit 23 designates a measurement target area using a work image photographed by irradiating the diffused light from the diffuse illumination device 141. By using a work image photographed by irradiating diffused light, it is possible to designate a measurement target region while confirming the entire image of the work. The measurement setting storage unit 24 stores position information indicating the measurement target area and measurement type as measurement setting data.

測定対象領域を指定する具体的な方法には、各種の方法がある。例えば、矩形領域を指定する場合、画像上の1点を指定するだけで矩形領域が選択される方法と、始点、終点、領域幅又は2以上の頂点を指定する方法がある。また、円形領域を指定する場合には、1点を指定する方法と、1点及び半径を指定する方法がある。また、円環領域を指定する場合には、1点、半径及び領域幅を指定する方法がある。また、円弧領域を指定する場合には、始点、中間点及び終点を指定する方法がある。これらの方法は、ユーザが任意に選択することができる。   There are various methods for specifying the measurement target region. For example, when specifying a rectangular area, there are a method in which a rectangular area is selected only by specifying one point on the image, and a method in which a start point, an end point, an area width, or two or more vertices are specified. When a circular area is designated, there are a method for designating one point and a method for designating one point and a radius. In addition, when designating an annular region, there is a method of designating one point, a radius and a region width. In addition, when specifying an arc region, there is a method of specifying a start point, an intermediate point, and an end point. These methods can be arbitrarily selected by the user.

点の位置を指定する具体的な方法には、マウス32を操作して表示画面11a内でマウスカーソルを移動させ、クリック操作を行う方法と、ディスプレイ装置11が表示画面11aに対するタッチ操作を検出するタッチパネル機能を有する場合に、表示画面11aをなぞる方法やタップする方法がある。これらの方法は、ユーザが任意に選択することができる。   As a specific method of specifying the position of the point, a method of operating the mouse 32 to move the mouse cursor within the display screen 11a and performing a click operation, and a display device 11 detects a touch operation on the display screen 11a. In the case of having a touch panel function, there are a method of tracing the display screen 11a and a method of tapping. These methods can be arbitrarily selected by the user.

なお、測定対象領域から可能な限り多くのエッジを抽出するために、ユーザが表示画面11a上で指示した画像領域を外側へ一定距離だけ拡大させた領域を測定対象領域として指定するような構成であっても良い。   In addition, in order to extract as many edges as possible from the measurement target region, the configuration is such that a region obtained by enlarging the image region designated by the user on the display screen 11a outward by a certain distance is designated as the measurement target region. There may be.

エッジ抽出部26は、測定対象領域内のエッジを抽出する。エッジ抽出処理は、測定対象領域内の画素について、輝度変化を解析することにより、エッジ点を抽出し、抽出した複数のエッジ点に直線、円、円弧などの幾何学図形をフィッティングさせることにより行われる。   The edge extraction unit 26 extracts an edge in the measurement target region. The edge extraction processing is performed by analyzing the luminance change of the pixels in the measurement target area to extract edge points and fitting geometric shapes such as lines, circles, and arcs to the extracted edge points. Is called.

寸法値算出部27は、エッジ抽出部26により抽出されたエッジに基づいて、ワークの寸法値を求め、測定結果として出力する。幾何学的特徴量算出部25は、エッジ抽出部26により抽出されたエッジに基づいて、幾何学的特徴量を求める。幾何学的特徴量は、エッジを構成するエッジ点列にフィッティングさせた幾何学図形の特徴量であり、真直度、真円度、基準座標からの位置などが幾何学的特徴量として算出される。   The dimension value calculation unit 27 obtains the dimension value of the workpiece based on the edge extracted by the edge extraction unit 26 and outputs it as a measurement result. The geometric feature amount calculation unit 25 obtains a geometric feature amount based on the edge extracted by the edge extraction unit 26. The geometric feature amount is a feature amount of a geometric figure fitted to an edge point sequence constituting an edge, and straightness, roundness, position from a reference coordinate, etc. are calculated as a geometric feature amount. .

エッジ抽出結果表示部29は、同一の測定対象領域に対する2以上のエッジ抽出結果をディスプレイ装置11に表示する。エッジ抽出結果には、エッジ抽出部26により抽出されたエッジの他、エッジを構成するエッジ点列、フィッティング線、エッジから求められた寸法値及び幾何学的特徴量がある。例えば、エッジ抽出結果表示部29は、ワーク画像記憶部22からワーク画像を読み出して表示するとともに、同一の測定対象領域から抽出された2以上のエッジ抽出結果を、ワーク画像上に重ねて表示する。   The edge extraction result display unit 29 displays two or more edge extraction results for the same measurement target region on the display device 11. In addition to the edge extracted by the edge extraction unit 26, the edge extraction result includes an edge point sequence, a fitting line, a dimension value obtained from the edge, and a geometric feature amount. For example, the edge extraction result display unit 29 reads out and displays the work image from the work image storage unit 22 and displays two or more edge extraction results extracted from the same measurement target region on the work image. .

同一の測定対象領域から抽出された複数のエッジをワーク画像上に表示する方法には、複数のエッジを一覧表示する方法と、複数のエッジのいずれか一つを選択的に表示する方法があり、ユーザが任意に指定することができる。複数のエッジを一覧表示すれば、各エッジの相対的な位置関係を容易に識別することができる。一方、複数のエッジのいずれか一つを選択的に表示すれば、同一の測定対象領域から抽出されたエッジを個別に確認することができる。   There are two methods for displaying multiple edges extracted from the same measurement target area on the work image: a method that displays a list of multiple edges, and a method that selectively displays one of the multiple edges. The user can arbitrarily specify. If a plurality of edges are displayed in a list, the relative positional relationship of each edge can be easily identified. On the other hand, if any one of a plurality of edges is selectively displayed, the edges extracted from the same measurement target region can be individually confirmed.

また、エッジ抽出結果表示部29は、エッジに対応づけて、寸法値、エッジを構成するエッジ点列又は幾何学的特徴量を表示する。この様に構成することにより、エッジの形状や位置を確認することができるとともに、エッジを構成するエッジ点列、エッジから求められたワークの寸法値又は幾何学的特徴量を確認して適切なエッジを選択することができる。エッジ抽出結果選択部30は、ユーザ操作に基づいて、エッジ抽出結果表示部29により表示されたエッジ抽出結果のいずれか一つを選択する。   Further, the edge extraction result display unit 29 displays the dimension value, the edge point sequence constituting the edge, or the geometric feature amount in association with the edge. By configuring in this way, the shape and position of the edge can be confirmed, and the edge point sequence constituting the edge, the dimensional value of the workpiece obtained from the edge, or the geometric feature amount can be confirmed appropriately. Edges can be selected. The edge extraction result selection unit 30 selects any one of the edge extraction results displayed by the edge extraction result display unit 29 based on a user operation.

エッジ抽出パラメータ決定部41は、エッジ抽出結果選択部30により選択されたエッジ抽出結果を他のエッジ抽出結果よりも優先的に抽出するためのエッジ抽出パラメータを決定する。測定設定記憶部24は、エッジ抽出パラメータ決定部41により決定されたエッジ抽出パラメータと、測定領域指定部23により指定された測定対象領域とを測定設定データとして保持する。また、測定設定記憶部24には、エッジ抽出パラメータが測定対象領域に関連づけて保持される。   The edge extraction parameter determination unit 41 determines an edge extraction parameter for preferentially extracting the edge extraction result selected by the edge extraction result selection unit 30 over other edge extraction results. The measurement setting storage unit 24 holds the edge extraction parameter determined by the edge extraction parameter determination unit 41 and the measurement target region specified by the measurement region specifying unit 23 as measurement setting data. The measurement setting storage unit 24 stores edge extraction parameters in association with measurement target regions.

エッジ抽出パラメータは、測定対象領域内から1つのエッジを抽出するための2以上の抽出条件からなる変数である。このエッジ抽出パラメータを構成する抽出条件には、エッジ強度、スキャン方向、エッジ方向及び優先指定がある。   The edge extraction parameter is a variable including two or more extraction conditions for extracting one edge from the measurement target region. The extraction conditions constituting the edge extraction parameters include edge strength, scan direction, edge direction, and priority designation.

エッジ強度は、直線方向の画素の位置と各画素の輝度値とからなる輝度分布における輝度の微分値である。エッジ強度の上限値又は下限値をエッジ抽出パラメータとして指定することができる。エッジ強度は、輝度が急激に変化する画素位置ほど、高い。また、エッジ強度が低い画素位置では、ノイズ成分をエッジとして誤抽出してしまうことがあるが、上限値や下限値により指定された範囲内のエッジ点のみを抽出することにより、安定したエッジ抽出が可能となる。   The edge strength is a differential value of the luminance in the luminance distribution composed of the pixel position in the linear direction and the luminance value of each pixel. The upper limit value or lower limit value of the edge strength can be designated as the edge extraction parameter. The edge strength is higher as the pixel position changes rapidly. In addition, at pixel positions with low edge strength, noise components may be erroneously extracted as edges, but stable edge extraction is possible by extracting only edge points within the range specified by the upper and lower limits. Is possible.

スキャン方向は、エッジを探索する際の探索方向であり、測定対象領域に対し、ユーザから見て、左方向又は右方向のいずれか、或いは、上方向又は下方向のいずれかをエッジ抽出パラメータとして指定することができる。エッジ方向は、エッジ点として抽出する輝度変化の方向であり、輝度分布をスキャン方向に走査する場合に、輝度値が低輝度側から高輝度側へ変化するのか、或いは、輝度値が高輝度側から低輝度側へ変化するのかをエッジ抽出パラメータとして指定することができる。通常、特定のエッジを構成するエッジ点は、同一方向であるため、エッジ方向を指定することにより、逆方向のエッジを誤抽出するのを抑制することができる。   The scan direction is a search direction when searching for an edge, and when viewed from the user, either the left direction or the right direction, or the upward direction or the downward direction is used as an edge extraction parameter with respect to the measurement target region. Can be specified. The edge direction is the direction of luminance change extracted as an edge point. When the luminance distribution is scanned in the scan direction, the luminance value changes from the low luminance side to the high luminance side, or the luminance value is on the high luminance side. It can be specified as an edge extraction parameter whether it changes from low to low luminance side. Usually, since the edge points constituting a specific edge are in the same direction, it is possible to suppress erroneous extraction of edges in the reverse direction by designating the edge direction.

優先指定は、エッジ強度、スキャン方向及びエッジ方向の各パラメータにより指定された抽出条件を満たす2以上のエッジ点が同一直線上に検出された場合に、いずれのエッジ点を採用するのかの指定である。例えば、輝度分布をスキャン方向に走査する場合に、最初に検出されたエッジ点を採用するのか、或いは、測定対象領域の中心又は中心線に最も近いエッジ点を採用するのかをエッジ抽出パラメータとして選択することができる。また、ノイズ成分が少ない側から輝度分布を走査し、最初に検出されたエッジ点を採用することを優先指定により選択することができる。この様な優先指定により、エッジ抽出の安定性を向上させることができる。   The priority designation is a designation of which edge point is adopted when two or more edge points satisfying the extraction conditions designated by the parameters of the edge strength, the scanning direction and the edge direction are detected on the same straight line. is there. For example, when scanning the luminance distribution in the scan direction, select whether to use the edge point detected first or the edge point closest to the center or center line of the measurement target area as the edge extraction parameter can do. Further, it is possible to select by priority designation that the luminance distribution is scanned from the side with less noise component and the edge point detected first is adopted. Such priority designation can improve the stability of edge extraction.

エッジ抽出の具体的な方法には、測定対象領域内に含まれるエッジのみを抽出する方法と、測定対象領域の境界を横切るエッジのみを抽出する方法と、測定対象領域内に含まれるエッジと測定対象領域の境界を横切るエッジとの両方を抽出する方法がある。これらの方法は、ユーザが任意に選択することができる。   Specific methods of edge extraction include a method for extracting only edges included in the measurement target region, a method for extracting only edges that cross the boundary of the measurement target region, and an edge included in the measurement target region and measurement. There is a method of extracting both the edge crossing the boundary of the target area. These methods can be arbitrarily selected by the user.

通常、エッジ抽出パラメータには、所望のエッジが一意に抽出されるようにするため、エッジ強度やスキャン方向を示す複数のパラメータの組合せが指定される。一方、同一の測定対象領域から2以上のエッジを抽出する際には、通常時に使用するエッジ抽出パラメータの一部又は全部のパラメータを変更する方法と、通常時に使用するエッジ抽出パラメータの一部又は全部のパラメータを無視する方法と、測定対象領域から抽出された2以上のエッジ点を2以上のグループにグループ分けする方法がある。   Usually, a combination of a plurality of parameters indicating edge strength and scan direction is designated as the edge extraction parameter so that a desired edge is uniquely extracted. On the other hand, when two or more edges are extracted from the same measurement target region, a method of changing some or all of the edge extraction parameters used at normal time and a part of the edge extraction parameters used at normal time or There are a method of ignoring all parameters and a method of grouping two or more edge points extracted from the measurement target region into two or more groups.

また、エッジ抽出パラメータを変更しながらエッジ抽出を繰り返す方法がある。この場合、エッジ抽出パラメータ決定部41は、エッジ抽出部26が、エッジ抽出パラメータを変更しながらエッジ抽出を繰り返して複数のエッジを抽出する際に、エッジ抽出パラメータを同時に決定する。上述した各種の方法は、ユーザが任意に選択することができる。   There is also a method of repeating edge extraction while changing edge extraction parameters. In this case, the edge extraction parameter determination unit 41 determines the edge extraction parameter simultaneously when the edge extraction unit 26 extracts a plurality of edges by repeating edge extraction while changing the edge extraction parameter. The various methods described above can be arbitrarily selected by the user.

測定対象領域から抽出されたエッジ点を複数のグループにグループ分けする方法には、各種の方法がある。例えば、エッジ点の位置情報を用いて、互いに近接しているエッジ点を同じグループに分類する方法と、エッジ特性、すなわち、エッジ方向又はエッジ強度に基づいて、エッジ点をグループ分けする方法がある。また、スキャン方向から見た場合のスキャンライン上における順位に基づいて、エッジ点をグループ分けする方法がある。また、測定対象領域から抽出された多数のエッジ点を、フィットする幾何学図形に応じて2以上の形状グループにグループ分けする方法がある。この方法では、形状グループごとに、エッジが特定される。これらの方法は、ユーザが任意に選択することができる。   There are various methods for grouping the edge points extracted from the measurement target region into a plurality of groups. For example, there are a method of classifying edge points close to each other into the same group using position information of edge points, and a method of grouping edge points based on edge characteristics, that is, edge direction or edge strength. . There is also a method of grouping edge points based on the order on the scan line when viewed from the scan direction. Further, there is a method of grouping a large number of edge points extracted from the measurement target region into two or more shape groups according to the geometric figure to be fitted. In this method, an edge is specified for each shape group. These methods can be arbitrarily selected by the user.

エッジ形状指定部28は、ユーザ操作に基づいて、エッジ形状を指定する。エッジ形状は、エッジ点列にフィッティングさせる幾何学的形状であり、直線、円、円弧又は任意の曲線をエッジ形状として指定することができる。具体的には、ユーザが測定対象領域を指定する際の領域指定情報に基づいて、エッジ形状が自動的に決定される。例えば、ドラッグ操作により、測定対象領域を指定した場合に、ドラッグ操作時のマウスカーソルの軌跡に基づいて、エッジ形状が決定される。或いは、クリック操作により、3以上の点の位置を指定した場合に、これらの点からなる点列に基づいて、エッジ形状が決定される。   The edge shape designation unit 28 designates an edge shape based on a user operation. The edge shape is a geometric shape to be fitted to the edge point sequence, and a straight line, a circle, an arc, or an arbitrary curve can be designated as the edge shape. Specifically, the edge shape is automatically determined based on the area designation information when the user designates the measurement target area. For example, when a measurement target region is specified by a drag operation, the edge shape is determined based on the locus of the mouse cursor at the time of the drag operation. Alternatively, when the positions of three or more points are designated by a click operation, the edge shape is determined based on a point sequence including these points.

エッジ抽出部26は、エッジ形状指定部28により指定されたエッジ形状に基づいて、測定対象領域内のエッジを抽出する。この様に構成することにより、ユーザにより指定されたエッジ形状以外の形状のエッジは抽出されないので、エッジ抽出の精度を向上させることができる。   The edge extraction unit 26 extracts an edge in the measurement target region based on the edge shape designated by the edge shape designation unit 28. By configuring in this way, edges having shapes other than the edge shape designated by the user are not extracted, so that the accuracy of edge extraction can be improved.

寸法値などの測定結果は、ディスプレイ装置11に表示される。また、制御ユニット20は、ワークを連続して測定する連続測定のための測定設定データを作成する。この測定設定データは、位置決め情報、測定対象領域、測定対象領域ごとの設計値や公差を示す情報からなる。位置決め情報は、ワーク画像を解析してワークの位置や姿勢を検出するための情報である。   Measurement results such as dimension values are displayed on the display device 11. Further, the control unit 20 creates measurement setting data for continuous measurement for continuously measuring the workpiece. The measurement setting data includes positioning information, a measurement target region, and information indicating a design value and tolerance for each measurement target region. The positioning information is information for analyzing the workpiece image and detecting the position and posture of the workpiece.

エッジ抽出部26は、測定設定データが指定された連続測定において、測定設定データとして保持されたエッジ抽出パラメータに基づいて、エッジ抽出を行う。また、測定設定記憶部24には、測定領域指定部23により同一のワーク画像に対して指定された2以上の測定対象領域と、これらの測定対象領域ごとにエッジ抽出パラメータ決定部41により決定されたエッジ抽出パラメータとが測定設定データとして保持される。エッジ抽出部26は、連続測定において、測定設定データとして保持されたエッジ抽出パラメータを用いて対応する測定対象領域からエッジを抽出することを、測定対象領域を変更しながら繰り返す。   The edge extraction unit 26 performs edge extraction based on an edge extraction parameter held as measurement setting data in continuous measurement in which measurement setting data is specified. Further, in the measurement setting storage unit 24, two or more measurement target regions specified for the same work image by the measurement region specifying unit 23, and the edge extraction parameter determination unit 41 determines each of these measurement target regions. The edge extraction parameters are stored as measurement setting data. In the continuous measurement, the edge extraction unit 26 repeats extracting the edge from the corresponding measurement target region using the edge extraction parameter held as the measurement setting data while changing the measurement target region.

測定設定データが指定された連続測定では、測定対象領域を測定するのに適したエッジ抽出パラメータでエッジ抽出が行われるので、ワークの形状や材質が変わっても、測定設定データを指定するだけで、複数の測定対象領域について、安定した寸法測定を行うことができる。   In continuous measurement with measurement setting data specified, edge extraction is performed with edge extraction parameters suitable for measuring the measurement target area, so even if the shape or material of the workpiece changes, only measurement setting data can be specified. Stable dimension measurement can be performed for a plurality of measurement target regions.

<測定設定画面50>
図4は、図1の画像測定器1の動作の一例を示した図であり、測定ユニット10のディスプレイ装置11に表示される測定設定画面50が示されている。この測定設定画面50は、エッジ抽出パラメータを設定するための編集画面であり、プレビュー領域51、設定手順表示領域52、エッジ形状選択ボタン53、確定ボタン54及びOKボタン55により構成される。
<Measurement setting screen 50>
FIG. 4 is a diagram illustrating an example of the operation of the image measuring device 1 of FIG. 1, and shows a measurement setting screen 50 displayed on the display device 11 of the measurement unit 10. The measurement setting screen 50 is an editing screen for setting edge extraction parameters, and includes a preview area 51, a setting procedure display area 52, an edge shape selection button 53, a confirmation button 54, and an OK button 55.

プレビュー領域51には、撮影されたワーク画像2が表示される。この例では、透過照明を利用して撮影されたワーク画像2がプレビュー領域51内に表示されている。設定手順表示領域52には、測定対象領域の指定からエッジ選択の確定までの操作手順が表示されている。エッジ形状選択ボタン53は、エッジ形状及び寸法種別を選択するための操作アイコンである。確定ボタン54は、設定内容を確定して次の操作手順へ移行させるための操作アイコンである。OKボタン55は、選択されたエッジに基づいて、エッジ抽出パラメータを決定させるための操作アイコンである。   In the preview area 51, the photographed work image 2 is displayed. In this example, a work image 2 photographed using transmitted illumination is displayed in the preview area 51. The setting procedure display area 52 displays an operation procedure from the specification of the measurement target area to the determination of edge selection. The edge shape selection button 53 is an operation icon for selecting an edge shape and a dimension type. The confirm button 54 is an operation icon for confirming the setting contents and shifting to the next operation procedure. The OK button 55 is an operation icon for determining an edge extraction parameter based on the selected edge.

図5は、図1の画像測定器1の動作の一例を示した図であり、プレビュー領域51内のワーク画像2に対して測定対象領域3を指定した後の状態が示されている。円を抽出対象のエッジ形状として選択した場合、ワーク画像2における円形状の輪郭線上で3つの点を指定すれば、円環状の領域を測定対象領域3として指定することができる。この例では、ワークの中央部に形成された貫通孔に沿って測定対象領域3が指定されている。   FIG. 5 is a diagram showing an example of the operation of the image measuring device 1 of FIG. 1, and shows a state after the measurement target region 3 is designated for the work image 2 in the preview region 51. When a circle is selected as the edge shape to be extracted, an annular region can be designated as the measurement target region 3 by designating three points on the circular contour line in the work image 2. In this example, the measurement target region 3 is specified along a through hole formed in the center of the workpiece.

図6は、図1の画像測定器1の動作の一例を示した図であり、測定対象領域3から抽出されたエッジ4の一つを選択した場合が示されている。図7は、図1の画像測定器1の動作の一例を示した図であり、エッジ選択ボタン56を操作して他のエッジ4を選択した場合が示されている。   FIG. 6 is a diagram showing an example of the operation of the image measuring device 1 of FIG. 1, and shows a case where one of the edges 4 extracted from the measurement target region 3 is selected. FIG. 7 is a diagram showing an example of the operation of the image measuring device 1 in FIG. 1, and shows a case where the other edge 4 is selected by operating the edge selection button 56.

同一の測定対象領域3から複数のエッジ4が抽出された場合、抽出されたエッジ4のいずれか一つがプレビュー領域51内のワーク画像2上に表示される。また、ワーク画像2には、表示中のエッジに対応づけて寸法値が表示されている。エッジ選択ボタン56は、プレビュー領域51に表示させるエッジ4を選択するための操作アイコンである。   When a plurality of edges 4 are extracted from the same measurement target area 3, any one of the extracted edges 4 is displayed on the work image 2 in the preview area 51. In the work image 2, dimension values are displayed in association with the edge being displayed. The edge selection button 56 is an operation icon for selecting the edge 4 to be displayed in the preview area 51.

エッジ選択ボタン56を操作してエッジ選択を変更するごとに、プレビュー領域51内のワーク画像2上に表示されるエッジ4及び寸法値が切り替えられる。ユーザは、ワーク画像2上に表示されたエッジ4及び寸法値を確認することにより、所望のエッジを容易に識別することができる。   Each time the edge selection button 56 is operated to change the edge selection, the edge 4 and the dimension value displayed on the work image 2 in the preview area 51 are switched. The user can easily identify a desired edge by confirming the edge 4 and the dimension value displayed on the work image 2.

図8は、図1の画像測定器1におけるエッジ抽出時の動作の一例を模式的に示した説明図である。図中の(a)には、ワーク画像2上に定められた矩形状の測定対象領域3と、測定対象領域3内に定められた直線状のスキャンラインSL1及びSL2とが示されている。   FIG. 8 is an explanatory view schematically showing an example of an operation at the time of edge extraction in the image measuring instrument 1 of FIG. In (a) of the figure, a rectangular measurement target region 3 defined on the work image 2 and linear scan lines SL1 and SL2 defined in the measurement target region 3 are shown.

エッジ抽出は、スキャンラインSL1又はSL2に沿って輝度の変化を解析することにより行われ、輝度が急激に変化するところがエッジ点として抽出される。具体的には、輝度の変化率、すなわち、微分値がエッジ強度であり、エッジ強度の極大点がエッジ点として抽出される。   Edge extraction is performed by analyzing a change in luminance along the scan line SL1 or SL2, and a point where the luminance changes abruptly is extracted as an edge point. Specifically, the luminance change rate, that is, the differential value is the edge strength, and the maximum point of the edge strength is extracted as the edge point.

図中の(b)には、スキャンラインSL1上の位置xごとのエッジ強度からなるエッジ強度分布が示され、図中の(c)には、スキャンラインSL2上の位置xごとのエッジ強度からなるエッジ強度分布が示されている。   (B) in the figure shows an edge intensity distribution composed of edge intensities for each position x on the scan line SL1, and (c) in the figure shows from the edge intensity for each position x on the scan line SL2. An edge intensity distribution is shown.

スキャンラインSL1上では、輝度が大きく変化する変化点が4箇所あるのに対し、スキャンラインSL2上では、輝度が大きく変化する変化点が2箇所である。この様に、ワーク表面の凹凸又は段差に対するスキャンラインSLの位置によって、エッジ強度分布が大きく異なる。   On the scan line SL1, there are four change points where the luminance changes greatly, whereas on the scan line SL2, there are two change points where the luminance changes greatly. In this way, the edge intensity distribution varies greatly depending on the position of the scan line SL with respect to the unevenness or level difference on the workpiece surface.

図9は、図1の画像測定器1におけるエッジ抽出時の動作の一例を示した図であり、エッジ抽出パラメータを互いに異ならせて抽出されたエッジ点5が示されている。この図には、図8に示したワーク画像2上の測定対象領域3から抽出されたエッジ点5が示されている。   FIG. 9 is a diagram showing an example of the operation at the time of edge extraction in the image measuring device 1 of FIG. 1, and shows edge points 5 extracted with different edge extraction parameters. In this figure, edge points 5 extracted from the measurement target region 3 on the work image 2 shown in FIG. 8 are shown.

図中の(a)には、エッジ強度の極大点をエッジ点5として抽出するように、エッジ抽出パラメータを指定した場合が示されている。この場合、スキャンラインSL1から4つのエッジ点5が抽出され、スキャンラインSL2から2つのエッジ点5が抽出されている。なお、(a)では、右方向がスキャン方向として指定されている。   (A) in the figure shows a case where the edge extraction parameter is specified so that the edge strength maximum point is extracted as the edge point 5. In this case, four edge points 5 are extracted from the scan line SL1, and two edge points 5 are extracted from the scan line SL2. In (a), the right direction is designated as the scan direction.

図中の(b)には、エッジ強度の極大点のうち、スキャン方向から見て順位が第1番目の極大点をエッジ点5として抽出するように、エッジ抽出パラメータを指定した場合が示されている。この場合、各スキャンラインSL1及びSL2から抽出されるエッジ点5は、スキャン方向によって異なっている。すなわち、右方向がスキャン方向として指定されている場合、スキャンラインSL1及びSL2からそれぞれ1つのエッジ点5が抽出され、ワーク表面上の左端の段差に相当する位置に表示されている。   (B) in the figure shows the case where the edge extraction parameter is specified so that the first local maximum point in the scanning direction is extracted as the edge point 5 among the local maximum points of the edge intensity. ing. In this case, the edge points 5 extracted from the scan lines SL1 and SL2 differ depending on the scan direction. That is, when the right direction is designated as the scan direction, one edge point 5 is extracted from each of the scan lines SL1 and SL2, and is displayed at a position corresponding to the step at the left end on the workpiece surface.

一方、左方向がスキャン方向として指定されている場合には、スキャンラインSL1から抽出されたエッジ点5がワーク表面上の右端の段差に相当する位置に表示され、スキャンラインSL2から抽出されたエッジ点5がワーク表面上の左端から2つ目の段差に相当する位置に表示されている。   On the other hand, when the left direction is designated as the scan direction, the edge point 5 extracted from the scan line SL1 is displayed at a position corresponding to the step on the right end on the workpiece surface, and the edge extracted from the scan line SL2 A point 5 is displayed at a position corresponding to the second step from the left end on the workpiece surface.

図中の(c)には、エッジ強度が閾値Ethよりも大きい極大点のうち、スキャン方向から見て順位が第1番目の極大点をエッジ点5として抽出するように、エッジ抽出パラメータを指定した場合が示されている。この場合にも、各スキャンラインSL1及びSL2から抽出されるエッジ点5は、スキャン方向によって異なっている。すなわち、右方向がスキャン方向として指定されている場合、スキャンラインSL1及びSL2からそれぞれ1つのエッジ点5が抽出され、ワーク表面上の左端の段差に相当する位置に表示されている。   In (c) in the figure, the edge extraction parameter is specified so that the first maximum point in the rank as viewed from the scan direction is extracted as the edge point 5 among the maximum points whose edge strength is greater than the threshold Eth. The case is shown. Also in this case, the edge points 5 extracted from the scan lines SL1 and SL2 differ depending on the scan direction. That is, when the right direction is designated as the scan direction, one edge point 5 is extracted from each of the scan lines SL1 and SL2, and is displayed at a position corresponding to the step at the left end on the workpiece surface.

一方、左方向がスキャン方向として指定されている場合には、スキャンラインSL1及びSL2からそれぞれ1つのエッジ点5が抽出され、ワーク表面上の左端から2つ目の段差に相当する位置に表示されている。   On the other hand, when the left direction is designated as the scan direction, one edge point 5 is extracted from each of the scan lines SL1 and SL2 and displayed at a position corresponding to the second step from the left end on the workpiece surface. ing.

図中の(d)には、エッジ強度が閾値Ethよりも大きく、かつ、エッジ方向が暗(低輝度側)から明(高輝度側)である極大点のうち、スキャン方向から見て順位が第1番目の極大点をエッジ点5として抽出するように、エッジ抽出パラメータを指定した場合が示されている。この場合にも、各スキャンラインSL1及びSL2から抽出されるエッジ点5は、スキャン方向によって異なっている。すなわち、右方向がスキャン方向として指定されている場合、スキャンラインSL1及びSL2からそれぞれ1つのエッジ点5が抽出され、ワーク表面上の左端から2つ目の段差に相当する位置に表示されている。   In (d) in the figure, among the maximal points where the edge intensity is larger than the threshold Eth and the edge direction is dark (low luminance side) to bright (high luminance side), the rank is viewed from the scanning direction. The case where the edge extraction parameter is designated so that the first maximum point is extracted as the edge point 5 is shown. Also in this case, the edge points 5 extracted from the scan lines SL1 and SL2 differ depending on the scan direction. That is, when the right direction is designated as the scan direction, one edge point 5 is extracted from each of the scan lines SL1 and SL2, and is displayed at a position corresponding to the second step from the left end on the work surface. .

一方、左方向がスキャン方向として指定されている場合には、スキャンラインSL1及びSL2からそれぞれ1つのエッジ点5が抽出され、ワーク表面上の左端の段差に相当する位置に表示されている。この様に、エッジ抽出パラメータを調整することにより、測定対象領域3から抽出されるエッジ点5を制御することができる。   On the other hand, when the left direction is designated as the scan direction, one edge point 5 is extracted from each of the scan lines SL1 and SL2, and is displayed at a position corresponding to the left end step on the workpiece surface. In this way, the edge point 5 extracted from the measurement target region 3 can be controlled by adjusting the edge extraction parameter.

図10のステップS101〜S110は、図1の画像測定器1における測定設定時の動作の一例を示したフローチャートである。まず、制御ユニット20は、ユーザ操作を受け付け、ワーク画像に対し、測定対象領域が指定されれば(ステップS101)、測定対象領域内の輝度変化を解析してエッジを抽出し、抽出したエッジに基づいて、寸法値を算出する(ステップS102)。   Steps S101 to S110 in FIG. 10 are flowcharts showing an example of an operation at the time of measurement setting in the image measuring device 1 in FIG. First, the control unit 20 receives a user operation, and if a measurement target area is specified for the work image (step S101), the control unit 20 analyzes the luminance change in the measurement target area, extracts an edge, and extracts the extracted edge. Based on this, a dimension value is calculated (step S102).

次に、制御ユニット20は、同一の測定対象領域から2以上のエッジ抽出結果が抽出されれば、これらのエッジ抽出結果のいずれか一つを選択的に表示し(ステップS103,S104)、ユーザによりエッジ抽出結果が選択されれば、選択されたエッジ抽出結果に基づいて、エッジ抽出パラメータを決定し、測定設定データとして記憶する(ステップS105,S106)。   Next, when two or more edge extraction results are extracted from the same measurement target region, the control unit 20 selectively displays any one of these edge extraction results (steps S103 and S104). If an edge extraction result is selected by the above, an edge extraction parameter is determined based on the selected edge extraction result and stored as measurement setting data (steps S105 and S106).

一方、制御ユニット20は、測定対象領域から1つのエッジ抽出結果しか抽出されなければ、当該エッジ抽出結果をワーク画像上に表示し、当該エッジ抽出結果に基づいてエッジ抽出パラメータを決定し、測定設定データとして記憶する(ステップS103,S109,S110)。   On the other hand, if only one edge extraction result is extracted from the measurement target area, the control unit 20 displays the edge extraction result on the work image, determines the edge extraction parameter based on the edge extraction result, and sets the measurement setting. Store as data (steps S103, S109, S110).

次に、制御ユニット20は、他に測定対象領域の指定があれば、ステップS101以降の処理手順を繰り返し(ステップS107)、他に測定対象領域の指定がなければ、測定設定データを作成してこの処理を終了する(ステップS108)。   Next, the control unit 20 repeats the processing procedure after step S101 if there is any other measurement target area designation (step S107), and if there is no other measurement target area designation, creates control setting data. This process ends (step S108).

図11のステップS201〜S210は、図1の画像測定器1における寸法測定時の動作の一例を示したフローチャートである。まず、制御ユニット20は、ユーザ操作を受け付け、連続測定対象のワークに応じた測定設定データを選択する(ステップS201)。   Steps S201 to S210 in FIG. 11 are flowcharts showing an example of the operation at the time of dimension measurement in the image measuring device 1 in FIG. First, the control unit 20 receives a user operation and selects measurement setting data corresponding to a workpiece to be continuously measured (step S201).

次に、制御ユニット20は、測定ユニット10の実行ボタン16が操作されれば(ステップS202)、測定設定データとして保持された測定対象領域を読み出し(ステップS203)、可動ステージ12上のワークを撮影し、ワーク画像を取得する(ステップS204)。   Next, when the execution button 16 of the measurement unit 10 is operated (step S202), the control unit 20 reads the measurement target area held as measurement setting data (step S203), and photographs the workpiece on the movable stage 12. Then, a work image is acquired (step S204).

制御ユニット20は、取得したワーク画像に基づいて、測定対象領域のエッジを抽出し(ステップS205)、抽出したエッジに基づいて、寸法値を算出する(ステップS206)。制御ユニット20は、他に測定対象領域があれば、ステップS203からステップS206までの処理手順を繰り返し(ステップS207)、全ての測定対象領域について、寸法測定が完了すれば、エッジや寸法値を測定結果としてディスプレイ装置11に表示し(ステップS208)、測定結果を保存する(ステップS209)。   The control unit 20 extracts an edge of the measurement target area based on the acquired work image (step S205), and calculates a dimension value based on the extracted edge (step S206). If there are other measurement target areas, the control unit 20 repeats the processing procedure from step S203 to step S206 (step S207), and if all the measurement target areas are completed, the edge and dimension values are measured. The result is displayed on the display device 11 (step S208), and the measurement result is stored (step S209).

制御ユニット20は、他に連続測定対象のワークがあれば、ステップS202以降の処理手順を繰り返し、他に連続測定対象のワークがなければ、この処理を終了する(ステップ210)。   If there are other workpieces to be continuously measured, the control unit 20 repeats the processing procedure after step S202, and if there are no other workpieces to be continuously measured, this control process is terminated (step 210).

本実施の形態によれば、同一の測定対象領域から抽出した2以上のエッジ抽出結果がワーク画像上に表示されるので、ユーザは、ワーク画像上に表示されたエッジ抽出結果のいずれか一つを選択するだけで、所望のエッジを抽出するのに適したエッジ抽出パラメータを決定することができる。また、エッジ抽出は、この様にして決定されたエッジ抽出パラメータに基づいて行われるので、測定対象領域に位置のばらつきがある場合、測定対象領域を間違って指定した場合、或いは、複数のエッジが測定対象領域に含まれている場合であっても、所望のエッジを正しく抽出することができる。   According to the present embodiment, since two or more edge extraction results extracted from the same measurement target region are displayed on the work image, the user can select any one of the edge extraction results displayed on the work image. It is possible to determine an edge extraction parameter suitable for extracting a desired edge simply by selecting. Further, since the edge extraction is performed based on the edge extraction parameters determined in this way, when there is a variation in position in the measurement target region, when the measurement target region is specified incorrectly, or when a plurality of edges are detected. Even if it is included in the measurement target region, a desired edge can be correctly extracted.

実施の形態2.
実施の形態1では、同一の測定対象領域から複数のエッジが抽出されれば、これらのエッジがワーク画像上に表示される場合の例について説明した。これに対し、本実施の形態では、同一の測定対象領域から複数のエッジが抽出されれば、複数のエッジが抽出されたことをユーザに通知する場合について説明する。
Embodiment 2. FIG.
In the first embodiment, an example has been described in which, if a plurality of edges are extracted from the same measurement target region, these edges are displayed on the work image. In contrast, in the present embodiment, a case will be described in which when a plurality of edges are extracted from the same measurement target region, the user is notified that a plurality of edges have been extracted.

図12は、本発明の実施の形態2による画像測定器1の一構成例を示したブロック図であり、制御ユニット20内の機能構成の一例が示されている。この制御ユニット20は、図3の制御ユニット20と比較すれば、安定度算出部42及びユーザ通知部43を備える一方、幾何学的特徴量算出部25を備えていない点で異なる。   FIG. 12 is a block diagram showing a configuration example of the image measuring instrument 1 according to the second embodiment of the present invention, and shows an example of a functional configuration in the control unit 20. The control unit 20 is different from the control unit 20 of FIG. 3 in that it includes a stability calculation unit 42 and a user notification unit 43, but does not include a geometric feature amount calculation unit 25.

安定度算出部42は、同一の測定対象領域から抽出された2以上のエッジについて、エッジ抽出の安定度を求める。例えば、エッジ抽出パラメータを変化させても、同じエッジが抽出されるか否かによって、安定度が評価される。   The stability calculation unit 42 obtains the edge extraction stability for two or more edges extracted from the same measurement target region. For example, even if the edge extraction parameter is changed, the stability is evaluated depending on whether or not the same edge is extracted.

エッジ抽出結果表示部29は、安定度算出部42により求められた安定度に基づいて、同一の測定対象領域から抽出された2以上のエッジを選択的に表示する。例えば、安定度の高いエッジのみが表示され、安定度の低いエッジは表示されない。この様に構成することにより、安定度の低いエッジは表示されないので、安定度の低いエッジによってエッジ抽出パラメータが誤って定められるのを防止することができる。   The edge extraction result display unit 29 selectively displays two or more edges extracted from the same measurement target region based on the stability obtained by the stability calculation unit 42. For example, only edges with high stability are displayed, and edges with low stability are not displayed. By configuring in this way, since the edge with low stability is not displayed, it is possible to prevent the edge extraction parameter from being erroneously determined by the edge with low stability.

ユーザ通知部43は、同一の測定対象領域から2以上のエッジが抽出されたことをユーザに通知する。例えば、ディスプレイ装置11の表示画面11a上にメッセージが表示される。エッジ抽出結果表示部29は、ユーザ操作に基づいて、同一の測定対象領域から抽出された2以上のエッジをワーク画像上に表示する。つまり、同一の測定対象領域から複数のエッジが抽出された場合、まず、複数のエッジが抽出されたことがメッセージなどによってユーザに通知される。そして、ユーザが確認の操作を行った後に、抽出されたエッジが表示される。この様に構成することにより、同一の測定対象領域から複数のエッジが抽出されたことを確認してから、これらのエッジをワーク画像上に表示させることができる。   The user notification unit 43 notifies the user that two or more edges have been extracted from the same measurement target region. For example, a message is displayed on the display screen 11 a of the display device 11. The edge extraction result display unit 29 displays two or more edges extracted from the same measurement target region on the work image based on a user operation. That is, when a plurality of edges are extracted from the same measurement target region, first, the user is notified by a message or the like that a plurality of edges are extracted. Then, after the user performs a confirmation operation, the extracted edge is displayed. With this configuration, it is possible to display these edges on the work image after confirming that a plurality of edges have been extracted from the same measurement target region.

1 画像測定器
10 測定ユニット
11 ディスプレイ装置
11a 表示画面
12 可動ステージ
14a XY調整つまみ
14b Z調整つまみ
15 電源スイッチ
16 実行ボタン
100 筐体
101 ステージ調整部
102 鏡筒部
103 照明位置調整部
110,120 カメラ
130 同軸落射照明ユニット
140 リング照明ユニット
141 拡散照明装置
142 側射照明装置
150 透過照明ユニット
20 制御ユニット
21 撮像制御部
22 ワーク画像記憶部
23 測定領域指定部
24 測定設定記憶部
25 幾何学的特徴量算出部
26 エッジ抽出部
27 寸法値算出部
28 エッジ形状指定部
29 エッジ抽出結果表示部
30 エッジ抽出結果選択部
31 キーボード
32 マウス
41 エッジ抽出パラメータ決定部
42 安定度算出部
43 ユーザ通知部
50 測定設定画面
2 ワーク画像
3 測定対象領域
4 エッジ
5 エッジ点
DESCRIPTION OF SYMBOLS 1 Image measuring device 10 Measurement unit 11 Display apparatus 11a Display screen 12 Movable stage 14a XY adjustment knob 14b Z adjustment knob 15 Power switch 16 Execution button 100 Case 101 Stage adjustment part 102 Lens barrel part 103 Illumination position adjustment part 110, 120 Camera 130 Coaxial incident illumination unit 140 Ring illumination unit 141 Diffuse illumination device 142 Side illumination device 150 Transmission illumination unit 20 Control unit 21 Imaging control unit 22 Work image storage unit 23 Measurement region designation unit 24 Measurement setting storage unit 25 Geometric features Calculation unit 26 Edge extraction unit 27 Dimension value calculation unit 28 Edge shape designation unit 29 Edge extraction result display unit 30 Edge extraction result selection unit 31 Keyboard 32 Mouse 41 Edge extraction parameter determination unit 42 Stability calculation unit 43 User notification unit 50 Measurement setting Screen 2 workpiece image 3 measurement area 4 edge 5 an edge point

Claims (13)

ワークを撮影し、ワーク画像を生成するカメラと、
ユーザ操作に基づいて、上記ワーク画像に対し、測定対象領域を指定する測定領域指定手段と、
上記測定対象領域内のエッジを抽出するエッジ抽出手段と、
同一の測定対象領域に対する2以上のエッジ抽出結果を表示するエッジ抽出結果表示手段と、
ユーザ操作に基づいて、上記エッジ抽出結果のいずれか一つを選択するエッジ抽出結果選択手段と、
選択された上記エッジ抽出結果を他の上記エッジ抽出結果よりも優先的に抽出するためのエッジ抽出パラメータを決定するエッジ抽出パラメータ決定手段とを備えたことを特徴とする画像測定器。
A camera that shoots a workpiece and generates a workpiece image;
A measurement area designating means for designating a measurement target area for the work image based on a user operation;
Edge extraction means for extracting an edge in the measurement target region;
Edge extraction result display means for displaying two or more edge extraction results for the same measurement target region;
An edge extraction result selection means for selecting any one of the edge extraction results based on a user operation;
An image measuring instrument, comprising: an edge extraction parameter determining means for determining an edge extraction parameter for extracting the selected edge extraction result preferentially over the other edge extraction results.
上記エッジ抽出結果表示手段は、上記エッジ抽出結果を、上記ワーク画像上に重ねて表示することを特徴とする請求項1に記載の画像測定器。   The image measuring device according to claim 1, wherein the edge extraction result display unit displays the edge extraction result so as to overlap the work image. 上記エッジ抽出パラメータ決定手段により決定された上記エッジ抽出パラメータと、上記測定領域指定手段により指定された上記測定対象領域とを測定設定データとして保持する測定設定記憶手段を備え、
上記測定設定記憶手段には、上記エッジ抽出パラメータが上記測定対象領域に関連づけて保持され、
上記エッジ抽出手段は、上記測定設定データが指定された連続測定において、上記測定設定データとして保持された上記エッジ抽出パラメータに基づいて、エッジ抽出を行うことを特徴とする請求項1又は2に記載の画像測定器。
Measurement setting storage means for holding the edge extraction parameter determined by the edge extraction parameter determination means and the measurement target area specified by the measurement area specifying means as measurement setting data;
In the measurement setting storage means, the edge extraction parameter is held in association with the measurement target region,
3. The edge extracting unit performs edge extraction based on the edge extraction parameter held as the measurement setting data in continuous measurement in which the measurement setting data is designated. Image measuring instrument.
上記測定設定記憶手段には、上記測定領域指定手段により同一のワーク画像に対して指定された2以上の上記測定対象領域と、これらの測定対象領域ごとに上記エッジ抽出パラメータ決定手段により決定された上記エッジ抽出パラメータとが測定設定データとして保持され、
上記エッジ抽出手段は、上記連続測定において、上記測定設定データとして保持された上記エッジ抽出パラメータを用いて対応する上記測定対象領域からエッジを抽出することを、上記測定対象領域を変更しながら繰り返すことを特徴とする請求項3に記載の画像測定器。
In the measurement setting storage means, two or more measurement target areas designated for the same work image by the measurement area designation means, and the edge extraction parameter determination means determined for each of these measurement target areas. The above edge extraction parameters are stored as measurement setting data,
In the continuous measurement, the edge extraction means repeats extracting the edge from the corresponding measurement target area using the edge extraction parameter held as the measurement setting data while changing the measurement target area. The image measuring device according to claim 3.
上記エッジ抽出結果表示手段は、同一の測定対象領域から抽出された2以上のエッジのいずれか一つを選択的に表示することを特徴とする請求項1〜4のいずれかに記載の画像測定器。   5. The image measurement according to claim 1, wherein the edge extraction result display means selectively displays any one of two or more edges extracted from the same measurement target region. vessel. 抽出された上記エッジに基づいて、ワークの寸法値を求める寸法値算出手段と、
抽出された上記エッジに基づいて、幾何学的特徴量を求める幾何学的特徴量算出手段とを備え、
上記エッジ抽出結果表示手段は、上記エッジに対応づけて、上記寸法値、上記エッジを構成するエッジ点列又は上記幾何学的特徴量を表示することを特徴とする請求項5に記載の画像測定器。
Dimension value calculating means for obtaining a dimensional value of the workpiece based on the extracted edge;
A geometric feature amount calculating means for obtaining a geometric feature amount based on the extracted edge;
6. The image measurement according to claim 5, wherein the edge extraction result display means displays the dimension value, the edge point sequence constituting the edge, or the geometric feature amount in association with the edge. vessel.
ユーザ操作に基づいて、エッジ形状を指定するエッジ形状指定手段を備え、
上記エッジ抽出手段は、指定された上記エッジ形状に基づいて、上記測定対象領域内のエッジを抽出することを特徴とする請求項1〜6のいずれかに記載の画像測定器。
Provided with an edge shape designation means for designating an edge shape based on a user operation,
The image measuring device according to claim 1, wherein the edge extracting unit extracts an edge in the measurement target region based on the specified edge shape.
上記エッジ形状指定手段は、ユーザが上記測定対象領域を指定する際の領域指定情報に基づいて、エッジ点列にフィッティングさせる幾何学的形状を自動的に決定することを特徴とする請求項7に記載の画像測定器。   8. The edge shape designating unit automatically determines a geometric shape to be fitted to an edge point sequence based on region designation information when a user designates the measurement target region. The image measuring instrument described. 同一の測定対象領域から抽出された2以上の上記エッジについて、エッジ抽出の安定度を求める安定度算出手段を備え、
上記エッジ抽出結果表示手段は、上記安定度に基づいて、同一の測定対象領域から抽出された2以上のエッジを選択的に表示することを特徴とする請求項1〜8のいずれかに記載の画像測定器。
Stability calculation means for obtaining the stability of edge extraction for two or more of the edges extracted from the same measurement target region,
9. The edge extraction result display means selectively displays two or more edges extracted from the same measurement target region based on the stability. Image measuring instrument.
上記エッジ抽出手段は、同一の測定対象領域に対し、1つのエッジだけが抽出される上記エッジ抽出パラメータを変更しながらエッジ抽出を繰り返すことにより、複数のエッジを抽出することを特徴とする請求項1〜9のいずれかに記載の画像測定器。   The edge extraction means extracts a plurality of edges by repeating edge extraction while changing the edge extraction parameter from which only one edge is extracted for the same measurement target region. The image measuring device according to any one of 1 to 9. 上記エッジ抽出パラメータ決定手段は、上記エッジ抽出手段が、上記エッジ抽出パラメータを変更しながらエッジ抽出を繰り返して複数のエッジを抽出する際に、上記エッジ抽出パラメータを同時に決定することを特徴とする請求項10に記載の画像測定器。   The edge extraction parameter determination means determines the edge extraction parameters simultaneously when the edge extraction means repeats edge extraction while changing the edge extraction parameters to extract a plurality of edges. Item 13. The image measuring device according to Item 10. 上記エッジ抽出手段は、上記測定対象領域から抽出した多数のエッジ点を、フィットする幾何学図形に応じて2以上の形状グループにグループ分けし、上記形状グループごとにエッジを特定することを特徴とする請求項1〜9のいずれかに記載の画像測定器。   The edge extracting means groups a large number of edge points extracted from the measurement target region into two or more shape groups according to a geometric figure to be fitted, and specifies an edge for each shape group. The image measuring device according to claim 1. 同一の測定対象領域から2以上の上記エッジが抽出されたことをユーザに通知するユーザ通知手段を備え、
上記エッジ抽出結果表示手段は、ユーザ操作に基づいて、同一の測定対象領域から抽出された2以上のエッジをワーク画像上に表示することを特徴とする請求項1〜12のいずれかに記載の画像測定器。
User notification means for notifying the user that two or more edges have been extracted from the same measurement target region,
The said edge extraction result display means displays two or more edges extracted from the same measurement object area | region on a workpiece | work image based on user operation, The one of Claims 1-12 characterized by the above-mentioned. Image measuring instrument.
JP2014039702A 2014-02-28 2014-02-28 Image measuring instrument Active JP6184345B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014039702A JP6184345B2 (en) 2014-02-28 2014-02-28 Image measuring instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014039702A JP6184345B2 (en) 2014-02-28 2014-02-28 Image measuring instrument

Publications (2)

Publication Number Publication Date
JP2015163860A JP2015163860A (en) 2015-09-10
JP6184345B2 true JP6184345B2 (en) 2017-08-23

Family

ID=54186844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014039702A Active JP6184345B2 (en) 2014-02-28 2014-02-28 Image measuring instrument

Country Status (1)

Country Link
JP (1) JP6184345B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6590631B2 (en) * 2015-10-16 2019-10-16 株式会社キーエンス Image inspection device
JP6663808B2 (en) * 2016-07-04 2020-03-13 株式会社キーエンス Image measuring device
JP6663807B2 (en) * 2016-07-04 2020-03-13 株式会社キーエンス Image measuring device
JP2019174288A (en) * 2018-03-28 2019-10-10 リコーエレメックス株式会社 Inspection system
CN113159112B (en) * 2021-03-09 2023-04-07 西南石油大学 Automatic labeling method for ancient biological fossil image

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000241117A (en) * 1999-02-22 2000-09-08 Keyence Corp Edge detection method of image, inspecting device, and storage medium
DE10000491B4 (en) * 2000-01-08 2004-09-23 Kelch Gmbh + Co Werkzeugmaschinenfabrik Method and measuring device for measuring a rotary tool
JP4074202B2 (en) * 2003-02-06 2008-04-09 株式会社ミツトヨ Image measuring apparatus and program for generating edge tracking measurement program
JP4454428B2 (en) * 2004-07-30 2010-04-21 富士通株式会社 Component edge detection method, component edge detection program, and inspection apparatus
JP5547105B2 (en) * 2011-02-01 2014-07-09 株式会社キーエンス Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP5953842B2 (en) * 2012-03-14 2016-07-20 オムロン株式会社 Image inspection method and inspection area setting method

Also Published As

Publication number Publication date
JP2015163860A (en) 2015-09-10

Similar Documents

Publication Publication Date Title
JP5547105B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP6278741B2 (en) Image measuring instrument
US10508902B2 (en) Three-dimensional measurement device
JP6663808B2 (en) Image measuring device
JP6184345B2 (en) Image measuring instrument
JP5679560B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JP5597056B2 (en) Image measuring apparatus, image measuring method, and program for image measuring apparatus
JP5525953B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
US9866747B2 (en) Optical displacement measurement system, imaging condition optimization method, and imaging condition optimization program
JP6663807B2 (en) Image measuring device
JP6522181B2 (en) Image measuring instrument
US9122048B2 (en) Image processing apparatus and image processing program
JP5467962B2 (en) Measurement setting data creation device, measurement setting data creation method, program for measurement setting data creation device, and dimension measurement device
JP2012037257A (en) Measurement setting data creation device, measurement setting data creation method, and program for measurement setting data creation device
JP6290651B2 (en) Image measuring instrument
JP6552074B2 (en) Image measuring instrument
JP2016048195A (en) Image measuring device
JP6442627B2 (en) Image measuring instrument
JP6797638B2 (en) Image measuring device
JP2018031748A (en) Three-dimensional measurement device
US20220269061A1 (en) Magnified observation apparatus, magnified observation method, and non-transitory computer-readable storage medium or storage device
JP2012032323A (en) Picture measuring device, picture measuring method and program for picture measuring device
JP2018072269A (en) Image measurement device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160909

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170616

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170711

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170725

R150 Certificate of patent or registration of utility model

Ref document number: 6184345

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250