JP2021184180A - Image inspection system - Google Patents

Image inspection system Download PDF

Info

Publication number
JP2021184180A
JP2021184180A JP2020089468A JP2020089468A JP2021184180A JP 2021184180 A JP2021184180 A JP 2021184180A JP 2020089468 A JP2020089468 A JP 2020089468A JP 2020089468 A JP2020089468 A JP 2020089468A JP 2021184180 A JP2021184180 A JP 2021184180A
Authority
JP
Japan
Prior art keywords
image
height
setting
inspection system
target area
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.)
Granted
Application number
JP2020089468A
Other languages
Japanese (ja)
Other versions
JP7474636B2 (en
Inventor
典正 眞弓
Norimasa Mayumi
毅 山上
Takeshi Yamagami
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 JP2020089468A priority Critical patent/JP7474636B2/en
Publication of JP2021184180A publication Critical patent/JP2021184180A/en
Application granted granted Critical
Publication of JP7474636B2 publication Critical patent/JP7474636B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Generation (AREA)

Abstract

To improve convenience by making it possible to easily grasp an object area to be an object of image inspection.SOLUTION: An inspection setting part generates a three-dimensional object 200 that three-dimensionally represents an inspection object to display the three-dimensional object on a monitor, and receives designation of an object area to be an object of image inspection on the three-dimensional object 200 obtained by adjusting a posture. The inspection setting part sets the designated object area in height data.SELECTED DRAWING: Figure 14

Description

本発明は、例えば撮像したワーク等を検査する画像検査システムに関する。 The present invention relates to, for example, an image inspection system for inspecting an imaged work or the like.

従来から、例えば特許文献1に開示されているように、パターン投影法を用いてワーク等の検査対象物の高さ情報を取得する画像処理装置が知られている。この特許文献1に開示されている画像処理装置では、複数のパターン投影光を検査対象物に順次照射しながら、カメラで複数の輝度画像を取得し、カメラで取得した複数の輝度画像をコントローラに転送して当該コントローラにおいて高さデータを生成する。コントローラでは、生成した高さデータのうち、所定の高さ範囲内の高さデータを、高さデータよりも階調数の少ない高さ画像に変換する処理、即ち高さ抽出処理を実行する。高さ抽出処理後、コントローラでは、高さ画像を用いた画像処理を行って検査対象物の良否を判定し、判定信号をPLC等の外部機器に出力する。 Conventionally, as disclosed in Patent Document 1, for example, an image processing device that acquires height information of an inspection object such as a work by using a pattern projection method has been known. In the image processing apparatus disclosed in Patent Document 1, a plurality of luminance images are acquired by a camera while sequentially irradiating a plurality of pattern projection lights on an inspection object, and a plurality of luminance images acquired by the camera are used as a controller. Transfer to generate height data in the controller. The controller executes a process of converting the height data within a predetermined height range into a height image having a smaller number of gradations than the height data, that is, a height extraction process. After the height extraction processing, the controller performs image processing using the height image to determine the quality of the inspection target object, and outputs the determination signal to an external device such as a PLC.

特開2019−168285号公報Japanese Unexamined Patent Publication No. 2019-168285

ところで、コントローラに汎用パーソナルコンピュータ等で構成された設定装置を接続し、設定装置上で、コントローラから出力される高さデータに対して各種設定を行うことも可能である。この場合、まず、設定装置において、コントローラから出力された高さデータを、当該高さデータよりも階調数の少ない画像に変換する。画像検査時には、ユーザが高さ画像上に、画像検査の対象となる対象領域(線領域や面領域)を設定するのであるが、この設定時の高さ画像は、カメラの位置に視点を固定して検査対象物を真上から見たときの画像であるため、ユーザは、検査対象物の立体感や高低差を把握しにくいという、使い勝手の上で問題があった。 By the way, it is also possible to connect a setting device composed of a general-purpose personal computer or the like to the controller and make various settings for the height data output from the controller on the setting device. In this case, first, the setting device converts the height data output from the controller into an image having a smaller number of gradations than the height data. At the time of image inspection, the user sets a target area (line area or surface area) to be image-inspected on the height image, and the height image at the time of this setting fixes the viewpoint at the position of the camera. Since it is an image when the inspection object is viewed from directly above, it is difficult for the user to grasp the three-dimensional effect and the height difference of the inspection object, which is a problem in terms of usability.

さらに、モニタに表示される高さ画像においては、検査対象物の実際の表面色とは異なる人工的に生成された表面色を付すことよって検査対象物の高低差を表現することが一般的に行われている。このような表現形態を採用した場合、大きな高さ変化であれば色の変化で認識可能であるが、小さな段差のような部分では殆ど表面色の差がなく、高低差を把握しにくい。 Furthermore, in the height image displayed on the monitor, it is common to express the height difference of the inspection object by adding an artificially generated surface color different from the actual surface color of the inspection object. It is done. When such an expression form is adopted, if there is a large change in height, it can be recognized by the change in color, but there is almost no difference in surface color in a portion such as a small step, and it is difficult to grasp the difference in height.

また、高さ画像と同時に撮像された検査対象物の二次元画像と、上記人工的に着色された高さ画像とを合成して表示する場合がある。これにより、検査対象物の部位と高さとの関係を把握し易くなる反面、高低差を示す色と検査対象物の実際の表面色とが混ざってしまうので、高低差を把握しにくくなる。 In addition, the two-dimensional image of the inspection object captured at the same time as the height image and the artificially colored height image may be combined and displayed. This makes it easier to grasp the relationship between the portion of the inspection target and the height, but it becomes difficult to grasp the height difference because the color indicating the height difference and the actual surface color of the inspection target are mixed.

上述したように高さ画像上で高低差を把握しにくくなると、ユーザが画像検査の対象となる対象領域を設定する際、検査対象物に対してどのような対象領域が設定されることになるのか、高さ画像上で把握するのが難しかった。 As described above, when it becomes difficult to grasp the height difference on the height image, what kind of target area is set for the inspection target when the user sets the target area for image inspection. It was difficult to grasp on the height image.

本発明は、かかる点に鑑みてなされたものであり、その目的とするところは、画像検査の対象となる対象領域を容易に把握でき、ひいては使い勝手を向上させることにある。 The present invention has been made in view of this point, and an object of the present invention is to easily grasp a target area to be image-inspected and to improve usability.

上記目的を達成するために、第1の開示は、検査対象物の高さ情報が二次元座標上に配置された高さデータを取得する取得部を備える画像検査用撮像装置と、前記画像検査用撮像装置にネットワークを介して接続される設定装置にてユーザ操作に基づく各種検査設定を行う検査設定部と、を含む画像検査システムを前提とすることができる。 In order to achieve the above object, the first disclosure is an image inspection imaging device provided with an acquisition unit for acquiring height data in which height information of an inspection object is arranged on two-dimensional coordinates, and the image inspection. It is possible to assume an image inspection system including an inspection setting unit that performs various inspection settings based on user operations with a setting device connected to the image pickup device via a network.

前記検査設定部は、前記取得部により取得された高さデータに基づいて、検査対象物を立体的に表した三次元オブジェクトを生成するオブジェクト生成手段と、前記オブジェクト生成手段により生成された三次元オブジェクトを前記設定装置のモニタに表示する表示手段と、前記表示手段により表示された三次元オブジェクトの姿勢を調整する姿勢調整手段と、前記姿勢調整手段により姿勢が調整された三次元オブジェクト上で、画像検査の対象となる対象領域の指定を受け付ける領域指定受付手段と、前記領域指定受付手段により指定された対象領域を、前記取得部により取得された高さデータに対して設定する領域設定手段とを有していてもよい。 The inspection setting unit has an object generation means that generates a three-dimensional object that three-dimensionally represents an inspection object based on the height data acquired by the acquisition unit, and a three-dimensional object generation means that is generated by the object generation means. On the display means for displaying the object on the monitor of the setting device, the posture adjusting means for adjusting the posture of the three-dimensional object displayed by the display means, and the three-dimensional object whose posture is adjusted by the posture adjusting means. An area designation receiving means that accepts the designation of the target area to be the target of the image inspection, and an area setting means that sets the target area designated by the area designation receiving means with respect to the height data acquired by the acquisition unit. May have.

この構成によれば、取得部が、検査対象物の高さ情報が二次元座標上に配置された高さデータを取得すると、その高さデータに基づいてオブジェクト生成手段が三次元オブジェクトを生成する。三次元オブジェクトは、例えば三次元ポリゴン表示や三次元点群(ポイントクラウド)表示のような形態で設定装置のモニタに表示することが可能である。三次元オブジェクトは、モニタに表示した状態でその姿勢の調整が可能なので、検査対象物を所望の方向から見た三次元オブジェクトをモニタに表示できる。ユーザは、姿勢調整後の三次元オブジェクト上で対象領域の指定が可能になる。 According to this configuration, when the acquisition unit acquires the height data in which the height information of the inspection object is arranged on the two-dimensional coordinates, the object generation means generates a three-dimensional object based on the height data. .. The three-dimensional object can be displayed on the monitor of the setting device in the form of, for example, a three-dimensional polygon display or a three-dimensional point cloud display. Since the posture of the three-dimensional object can be adjusted while it is displayed on the monitor, the three-dimensional object viewed from a desired direction of the inspection object can be displayed on the monitor. The user can specify the target area on the three-dimensional object after adjusting the posture.

すなわち、ユーザは、検査対象物を立体的に表した三次元オブジェクトを所望の方向から見ることができるので、小さな段差のような部分であっても高低差を容易にかつ確実に把握できる。そして、検査対象物の高低差を把握しながら対象領域を指定できるので、対象領域を検査対象物上のどこに対してどのような大きさ乃至形状で指定したのか、ユーザが容易に把握できる。対象領域は、例えば線状の領域や図形で囲んだ領域等があり、ある範囲を持った領域であれば、その形状や大きさは自由に指定できる。 That is, since the user can see the three-dimensional object that three-dimensionally represents the inspection object from a desired direction, the height difference can be easily and surely grasped even in a portion such as a small step. Since the target area can be specified while grasping the height difference of the inspection object, the user can easily grasp where and what size or shape the target area is specified on the inspection object. The target area includes, for example, a linear area, an area surrounded by a figure, and the like, and the shape and size of the area can be freely specified as long as the area has a certain range.

対象領域が指定されると、その対象領域が取得部により取得された高さデータに対して設定される。つまり、三次元オブジェクト上で指定した対象領域の情報を、運用時に取得した高さデータに反映することができるので、所望の領域に対して画像検査を実行することができる。 When the target area is specified, the target area is set for the height data acquired by the acquisition unit. That is, since the information of the target area specified on the three-dimensional object can be reflected in the height data acquired at the time of operation, the image inspection can be performed on the desired area.

第2の開示では、前記取得部は、検査対象物を撮像する撮像素子を備えていてもよい。前記検査設定部は、前記領域指定受付手段により対象領域の指定を受け付けた場合に、前記撮像素子の位置にある視点を特定するための視点特定要素を生成する要素生成手段を備えていてもよい。前記表示手段は、前記要素生成手段により生成された視点特定要素を、前記三次元オブジェクト上に重ねて前記モニタに表示させることができる。 In the second disclosure, the acquisition unit may include an image pickup device that captures an image of an inspection object. The inspection setting unit may include an element generation means for generating a viewpoint specifying element for specifying a viewpoint at a position of the image pickup element when the designation of the target area is received by the area designation receiving means. .. The display means can display the viewpoint specifying element generated by the element generation means on the three-dimensional object and display it on the monitor.

この構成によれば、ユーザが画像検査の対象となる対象領域を指定すると、視点特定要素が三次元オブジェクト上に重ねて表示される。これにより、ユーザは、検査対象物を撮像した撮像素子の位置、即ち視点の位置を特定することができる。 According to this configuration, when the user specifies the target area to be the target of the image inspection, the viewpoint specifying element is displayed superimposed on the three-dimensional object. As a result, the user can specify the position of the image pickup device that images the inspection object, that is, the position of the viewpoint.

第3の開示では、前記視点特定要素は、前記領域指定受付手段により指定を受け付けた複数の点の各々から前記撮像素子の撮像軸に沿って所定長さ延びる複数の線分と、該複数の線分に基づき形成される平面又は曲面からなる図形要素とを含んでいてもよい。 In the third disclosure, the viewpoint specifying element includes a plurality of line segments extending by a predetermined length from each of the plurality of points designated by the region designation receiving means along the image pickup axis of the image pickup device, and the plurality of line segments. It may include a graphic element composed of a plane or a curved surface formed based on a line segment.

この構成によれば、ユーザが対象領域を指定する際に複数の点を指定すると、撮像軸に沿って延びる複数の線分で形成される面が三次元オブジェクト上に重なった状態で表示される。これにより、視点の位置の特定が容易になる。 According to this configuration, when the user specifies a plurality of points when specifying the target area, a surface formed by a plurality of line segments extending along the imaging axis is displayed as being overlapped on a three-dimensional object. .. This makes it easy to identify the position of the viewpoint.

第4の開示では、前記図形要素は、半透明であってもよい。この構成によれば、図形要素の向こう側にある三次元オブジェクトも視認することが可能になるので、対象領域の指定が容易になる。 In the fourth disclosure, the graphic element may be translucent. According to this configuration, the three-dimensional object on the other side of the graphic element can also be visually recognized, so that the target area can be easily specified.

第5の開示では、前記図形要素を形成する前記複数の線分の所定長さは、前記高さ画像における最大高さや最小高さに応じて決定することができる。 In the fifth disclosure, the predetermined lengths of the plurality of line segments forming the graphic element can be determined according to the maximum height and the minimum height in the height image.

すなわち、図形要素ないし線分の高さ方向の寸法が無用に長くなると高さ画像が見にくくなることが考えられ、また、図形要素ないし線分の高さ方向の寸法が短すぎると図形要素ないし線分を確認できなくなることが考えられる。本開示では、図形要素ないし線分の高さ方向の寸法が無用に長くなることや、短すぎることがなくなるので、視点の位置の特定が容易になる。 That is, if the dimension in the height direction of the graphic element or line segment becomes unnecessarily long, it may be difficult to see the height image, and if the dimension in the height direction of the graphic element or line segment is too short, the graphic element or line may be difficult to see. It is possible that the minute cannot be confirmed. In the present disclosure, the dimension in the height direction of the graphic element or the line segment is not unnecessarily long or too short, so that the position of the viewpoint can be easily specified.

第6の開示では、前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で位置調整可能とされていてもよい。 In the sixth disclosure, the viewpoint-specific element may be position-adjustable on the three-dimensional object after being generated by the element generation means.

この構成によれば、視点特定要素の生成後、位置を変更したい場合には、視点特定要素を移動させることで所望の位置に配置することができる。視点特定要素の移動に伴って対象領域も別の領域に移る。 According to this configuration, if it is desired to change the position after the viewpoint specifying element is generated, it can be arranged at a desired position by moving the viewpoint specifying element. As the viewpoint specific element moves, the target area also moves to another area.

第7の開示では、前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で形状の変更が可能とされている。 In the seventh disclosure, the viewpoint specifying element can be changed in shape on the three-dimensional object after being generated by the element generation means.

この構成によれば、視点特定要素の生成後、その形状を任意の形状に変更することができる。視点特定要素の形状の変更に伴って対象領域の形状も変更される。 According to this configuration, after the viewpoint specifying element is generated, the shape can be changed to an arbitrary shape. The shape of the target area is also changed as the shape of the viewpoint specific element is changed.

第8の開示では、前記視点特定要素は、前記三次元オブジェクトの高さ方向への移動が禁止されていてもよい。XYZ座標系で例えばZ方向を高さ方向とした場合、視点特定要素のZ座標を固定し、視点特定要素をXY方向へのみ移動可能にすることができる。 In the eighth disclosure, the viewpoint specifying element may be prohibited from moving in the height direction of the three-dimensional object. In the XYZ coordinate system, for example, when the Z direction is the height direction, the Z coordinate of the viewpoint specifying element can be fixed and the viewpoint specifying element can be moved only in the XY direction.

すなわち、視点特定要素は、画像検査の対象となる対象領域を、二次元座標上に配置された高さデータに設定する際に表示される要素であることから、三次元オブジェクトのX方向またはY方向に移動させればよく、視点が位置する方向(三次元オブジェクトの高さ方向)へ移動させる必要はなく、仮に視点特定要素を三次元オブジェクトの高さ方向に移動可能にすると、対象領域の設定操作が煩雑になることが考えられる。本開示では、視点特定要素を三次元オブジェクトのX方向またはY方向にのみ移動可能であるため、対象領域の設定操作が容易になる。 That is, since the viewpoint specifying element is an element displayed when the target area to be inspected is set to the height data arranged on the two-dimensional coordinates, the X direction or Y of the three-dimensional object is displayed. It suffices to move in the direction, and it is not necessary to move in the direction in which the viewpoint is located (the height direction of the 3D object). If the viewpoint specific element can be moved in the height direction of the 3D object, the target area It is possible that the setting operation becomes complicated. In the present disclosure, since the viewpoint specifying element can be moved only in the X direction or the Y direction of the three-dimensional object, the operation of setting the target area becomes easy.

第9の開示では、前記領域指定受付手段は、前記三次元オブジェクト上で始点と終点の指定を受け付けた場合、高さデータの二次元座標において、前記始点から前記終点まで延びる線分の位置に対応する座標に対象領域を設定することができる。 In the ninth disclosure, when the area designation receiving means receives the designation of the start point and the end point on the three-dimensional object, at the position of the line segment extending from the start point to the end point in the two-dimensional coordinates of the height data. The target area can be set to the corresponding coordinates.

この構成によれば、ユーザが三次元オブジェクト上で始点と終点を指定する操作を行うだけで、始点及び終点を含む対象領域を高さデータに自動的に設定することができる。 According to this configuration, the target area including the start point and the end point can be automatically set in the height data only by the user performing an operation of designating the start point and the end point on the three-dimensional object.

第10の開示では、前記取得部は、取得した高さデータに基づいて高さ画像を生成することができる。前記表示手段は、前記取得部により生成された高さ画像と、前記オブジェクト生成手段で生成された三次元オブジェクトとを前記モニタに切替表示可能に構成されている。前記領域指定受付手段は、前記取得部により生成された高さ画像上で、画像検査の対象となる対象領域の指定を受け付けることができる。 In the tenth disclosure, the acquisition unit can generate a height image based on the acquired height data. The display means is configured so that the height image generated by the acquisition unit and the three-dimensional object generated by the object generation means can be switched and displayed on the monitor. The area designation receiving means can receive the designation of the target area to be the target of the image inspection on the height image generated by the acquisition unit.

例えば、三次元オブジェクトよりも高さ画像の方が画像検査の対象となる対象領域が指定しやすい場合があり、この場合には、高さ画像をモニタに表示させて高さ画像上でも画像検査の対象となる対象領域の指定を受け付けることができる。 For example, it may be easier to specify the target area for image inspection in a height image than in a three-dimensional object. In this case, the height image is displayed on the monitor and the image is inspected on the height image. It is possible to accept the designation of the target area that is the target of.

第11の開示では、前記設定装置は、前記領域設定手段により高さデータに対して設定された対象領域に対して画像処理を行う画像処理部と、該画像処理部により画像処理された画像に基づいて外観検査を行う検査部とを備えている。これにより、段差計測や傷等、各種外観検査を行うことができる。 In the eleventh disclosure, the setting device includes an image processing unit that performs image processing on a target area set for height data by the area setting means, and an image processed by the image processing unit. It is equipped with an inspection unit that conducts visual inspections based on the above. This makes it possible to perform various visual inspections such as step measurement and scratches.

第12の開示では、前記設定装置は、前記領域指定受付手段で受け付けた対象領域からなる設定項目と、該設定項目の設定値が格納される場所を示すレジスタ情報とが記述されたファイルを外部から取得してユーザにより設定された該設定項目の設定値と、該ファイルに含まれる該設定項目に対応するレジスタ情報とを前記画像検査用撮像装置に送信可能に構成されている。前記画像検査用撮像装置は、前記設定装置から受信した前記設定項目の設定値を、該設定項目に対応するレジスタ情報が示す場所に格納することができる。 In the twelfth disclosure, the setting device externally creates a file in which a setting item consisting of a target area received by the area designation receiving means and register information indicating a place where a setting value of the setting item is stored are described. The setting value of the setting item acquired from the above and set by the user and the register information corresponding to the setting item included in the file can be transmitted to the image inspection image pickup apparatus. The image inspection imaging device can store the setting value of the setting item received from the setting device in a place indicated by the register information corresponding to the setting item.

この構成によれば、撮像装置と設定装置の両方が共通の標準化規格に適合している場合には、設定項目と、設定項目の設定値が格納される場所を示すレジスタ情報とが記述されたファイルを設定装置が取得する。このファイルは、例えば標準化規格がGenICam規格である場合には、Device XMLファイルなどである。このファイルは、設定装置が撮像装置から取得してもよいし、例えばウェブサイト等からダウンロードして別ファイルとしてGenApiに対して参照するファイルを指定するようにしてもよい。 According to this configuration, when both the image pickup device and the setting device conform to a common standard, the setting item and the register information indicating the location where the setting value of the setting item is stored are described. The setting device acquires the file. This file is, for example, a Device XML file when the standardization standard is the GenICam standard. This file may be acquired by the setting device from the image pickup device, or may be downloaded from, for example, a website or the like, and a file to be referred to to GenApi may be specified as a separate file.

ユーザが画像検査の対象となる対象領域を設定すると、画像検査の対象となる対象領域の座標や大きさが設定値になり、対象領域という設定項目と、その座標や大きさとがレジスタ情報とともに撮像装置に送信される。これにより、撮像装置における設定が行われるので、標準化規格に適合した撮像装置であれば設定装置で上記設定を自由に変更することができ、撮像装置の機種選定の自由度が向上する。 When the user sets the target area to be image-inspected, the coordinates and size of the target area to be image-inspected become the set values, and the setting item called the target area and the coordinates and size are imaged together with the register information. Sent to the device. As a result, the settings in the image pickup device are made, so that the above settings can be freely changed in the setting device as long as the image pickup device conforms to the standardization standard, and the degree of freedom in selecting the model of the image pickup device is improved.

以上説明したように、本開示によれば、検査対象物を立体的に表した三次元オブジェクトの姿勢を調整して検査対象物の高低差を把握しながら画像検査の対象となる対象領域を指定できるので、ユーザは対象領域を容易に把握でき、ひいては使い勝手を向上させることができる。 As described above, according to the present disclosure, the target area to be inspected is specified while adjusting the posture of the three-dimensional object representing the inspected object in three dimensions and grasping the height difference of the inspected object. Since it can be done, the user can easily grasp the target area, and by extension, the usability can be improved.

本発明の実施形態1に係る画像検査システムの概略構成及び運用状態を模式的に示す図である。It is a figure which shows typically the schematic structure and operation state of the image inspection system which concerns on Embodiment 1 of this invention. 実施形態2に係る図1相当図である。It is a figure corresponding to FIG. 1 which concerns on Embodiment 2. FIG. 実施形態3に係る図1相当図である。FIG. 1 is a view corresponding to FIG. 1 according to the third embodiment. 実施形態4に係る図1相当図である。FIG. 1 is a view corresponding to FIG. 1 according to the fourth embodiment. デフレクトメトリの原理に基づいて高さ画像を生成する手順を示すフローチャートである。It is a flowchart which shows the procedure which generates the height image based on the principle of a deflation metric. フォトメトリックステレオ法を利用して高さ画像を生成する実施形態5に係る図1相当図である。FIG. 1 is a diagram corresponding to FIG. 1 according to the fifth embodiment in which a height image is generated by using a photometric stereo method. 画像検査アプリケーションとカメラとの接続インターフェースを説明する図である。It is a figure explaining the connection interface between an image inspection application and a camera. 撮像装置の内部処理の一例を概念的に示すフローチャートである。It is a flowchart which conceptually shows an example of the internal processing of an image pickup apparatus. デフレクトメトリの原理を利用した検査画像の生成を行う場合のパラメータセットを示す図である。It is a figure which shows the parameter set in the case of generating the inspection image using the principle of deflationmetry. マルチスペクトルイメージングにより検査画像の生成を行う場合のパラメータセットを示す図である。It is a figure which shows the parameter set when the inspection image is generated by multi-spectral imaging. 検査設定部のブロック図である。It is a block diagram of an inspection setting part. 対象領域の新規作成手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of creating a new target area. 3Dヒット判定の概念図である。It is a conceptual diagram of 3D hit determination. 直線状の対象領域の新規作成を三次元表示または二次元表示上で行う場合を説明する図である。It is a figure explaining the case where the new creation of the linear target area is performed on the three-dimensional display or the two-dimensional display. 矩形状の対象領域の新規作成を三次元表示または二次元表示上で行う場合を説明する図である。It is a figure explaining the case where the new creation of the rectangular object area is performed on the three-dimensional display or the two-dimensional display. 対象領域の変更手順の第1段階を示すフローチャートである。It is a flowchart which shows the 1st stage of the procedure of changing a target area. 対象領域の変更手順の第2段階を示すフローチャートである。It is a flowchart which shows the 2nd stage of the procedure of changing a target area. 3Dヒット判定の概念図である。It is a conceptual diagram of 3D hit determination. 2Dヒット判定の概念図である。It is a conceptual diagram of 2D hit determination. 直線状の対象領域の位置調整を行う具体例1を示す図である。It is a figure which shows the specific example 1 which performs the position adjustment of a linear target area. 直線状の対象領域の位置調整を行う具体例2を示す図である。It is a figure which shows the specific example 2 which performs the position adjustment of a linear target area. 矩形状の対象領域の位置調整を行う具体例を示す図である。It is a figure which shows the specific example which performs the position adjustment of a rectangular object area. 運用時に直線状の対象領域で段差計測する手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of measuring a step in a linear target area at the time of operation. 運用時に矩形状の対象領域で傷検査する手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of inspecting a scratch in a rectangular target area at the time of operation. 運用時に矩形状の対象領域で高さ検査する手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of inspecting the height in a rectangular target area at the time of operation. 運用時に円弧状の対象領域で賞味期限検査する手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of inspecting the expiration date in the target area of an arc shape at the time of operation. 運用時に円弧状の対象領域で刻印判別する手順の例を示すフローチャートである。It is a flowchart which shows the example of the procedure of engraving discrimination in the target area of an arc shape at the time of operation.

以下、本発明の実施形態を図面に基づいて詳細に説明する。尚、以下の好ましい実施形態の説明は、本質的に例示に過ぎず、本発明、その適用物或いはその用途を制限することを意図するものではない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. It should be noted that the following description of the preferred embodiment is essentially merely an example and is not intended to limit the present invention, its application or its use.

(実施形態1)
図1は、本発明の実施形態に係る画像検査システム1の運用状態を模式的に示すものである。画像検査システム1は、検査対象物であるワークWを撮像した画像を用いてワークWの欠陥の有無を検査するように構成されており、ワークWを照明する照明装置2と、ワークWを撮像する撮像部3と、撮像部3の設定を行うパーソナルコンピュータ(PC)等で構成された設定装置4とを備えている。ワークWは、撮像部3で撮像される対象となるものであることから、撮像対象物と呼ぶこともできる。照明装置2と撮像部3とにより、高さデータを取得する取得部Aが構成されている。画像検査システム1の一部を構成している画像検査用撮像装置300は取得部Aを含む装置である。また、撮像装置300と設定装置4とは切り離されたものであってもよく、撮像装置300単体を本発明の実施形態とすることもできる。
(Embodiment 1)
FIG. 1 schematically shows an operating state of the image inspection system 1 according to the embodiment of the present invention. The image inspection system 1 is configured to inspect the presence or absence of defects in the work W by using an image of the work W as an inspection object, and images the lighting device 2 that illuminates the work W and the work W. The image pickup unit 3 is provided with a setting device 4 composed of a personal computer (PC) or the like for setting the image pickup unit 3. Since the work W is an object to be imaged by the image pickup unit 3, it can also be called an image pickup object. The lighting device 2 and the image pickup unit 3 constitute an acquisition unit A for acquiring height data. The image inspection image pickup device 300 constituting a part of the image inspection system 1 is an apparatus including the acquisition unit A. Further, the image pickup device 300 and the setting device 4 may be separated from each other, and the image pickup device 300 alone may be an embodiment of the present invention.

設定装置4は、表示部5と、キーボード6及びマウス7とを備えている。表示部5は、たとえば有機ELディスプレイや液晶ディスプレイ等からなるモニタを含むものであり、撮像装置300で撮像された画像、撮像装置300で撮像された画像を各種処理した処理後の画像、各種ユーザーインターフェース画像(GUI)等を表示することができる部分である。各種ユーザーインターフェース画像等は、設定装置4の本体部で生成される。表示部5の横方向を当該表示部5のX方向とし、表示部5の縦方向を当該表示部5のY方向とすることができる。 The setting device 4 includes a display unit 5, a keyboard 6, and a mouse 7. The display unit 5 includes a monitor including, for example, an organic EL display or a liquid crystal display, and includes an image captured by the image pickup device 300, an image after various processing of the image captured by the image pickup device 300, and various users. It is a part where an interface image (GUI) or the like can be displayed. Various user interface images and the like are generated in the main body of the setting device 4. The horizontal direction of the display unit 5 may be the X direction of the display unit 5, and the vertical direction of the display unit 5 may be the Y direction of the display unit 5.

また、キーボード6及びマウス7は、従来から周知のコンピュータ操作用の機器である。キーボード6またはマウス7の操作により、各種情報を設定装置4に入力したり、各種設定を行ったりすることができるとともに、表示部5に表示されている画像等を選択することができる。尚、キーボード6及びマウス7の代わり、またはキーボード6及びマウス7に加えて、たとえば、音声入力機器、感圧式タッチ操作パネル等のコンピュータ操作用の機器を使用することもできる。 Further, the keyboard 6 and the mouse 7 are conventionally known devices for operating a computer. By operating the keyboard 6 or the mouse 7, various information can be input to the setting device 4, various settings can be made, and an image or the like displayed on the display unit 5 can be selected. Instead of the keyboard 6 and the mouse 7, or in addition to the keyboard 6 and the mouse 7, a computer operation device such as a voice input device and a pressure-sensitive touch operation panel can also be used.

図1では、複数のワークWが搬送用ベルトコンベアBの上面に載置された状態で図1における白抜き矢印で示す方向へ搬送されている場合を示している。設定装置4には、搬送用ベルトコンベアB及び画像検査システム1をシーケンス制御するための機器として、プログラマブル・ロジック・コントローラ(PLC)等からなる外部制御機器8が接続されている。この外部制御機器8は、画像検査システム1の一部を構成するものとしてもよい。また、外部制御機器8は、画像検査システム1の構成要素としなくてもよい。 FIG. 1 shows a case where a plurality of work W are transported in the direction indicated by the white arrow in FIG. 1 in a state of being placed on the upper surface of the transport belt conveyor B. An external control device 8 including a programmable logic controller (PLC) or the like is connected to the setting device 4 as a device for sequence control of the conveyor belt B for transportation and the image inspection system 1. The external control device 8 may form a part of the image inspection system 1. Further, the external control device 8 does not have to be a component of the image inspection system 1.

尚、この実施形態の説明では、搬送用ベルトコンベアBによるワークWの搬送方向(ワークWの移動方向)をY方向とし、搬送用ベルトコンベアBの平面視でY方向に直交する方向をX方向とし、X方向及びY方向に直交する方向(搬送用ベルトコンベアBの上面に直交する方向)をZ方向と定義するが、これは説明の便宜を図るために定義するだけである。 In the description of this embodiment, the transport direction of the work W by the transport belt conveyor B (moving direction of the work W) is the Y direction, and the direction orthogonal to the Y direction in the plan view of the transport belt conveyor B is the X direction. The direction orthogonal to the X direction and the Y direction (the direction orthogonal to the upper surface of the conveyor belt B for transportation) is defined as the Z direction, but this is defined only for convenience of explanation.

画像検査システム1は、ワークWの外観検査、即ちワークWの表面の傷、汚れ、打痕等の欠陥の有無を検査する場合に使用することができるものであり、この検査結果からワークWの良否判定を行うこともできる。画像検査システム1は、その運用時において、外部制御機器8から信号線を介して、欠陥検査(良否判定検査)の開始タイミングを規定する検査開始トリガ信号を受信する。画像検査システム1は、この検査開始トリガ信号に基づいてワークWの撮像及び照明等を行って所定の処理後、検査用画像を得る。その後、検査用画像に基づいて外観検査し、その検査結果は、信号線を介して外部制御機器8へ送信される。このように、画像検査システム1の運用時には、画像検査システム1と外部制御機器8との間で、信号線を介して検査開始トリガ信号の入力と検査結果の出力が繰り返し行われる。なお、検査開始トリガ信号の入力や検査結果の出力は、上述したように、画像検査システム1と外部制御機器8との間の信号線を介して行ってもよいし、それ以外の図示しない信号線を介して行ってもよい。例えば、ワークWの到着を検知するためのセンサと画像検査システム1とを直接的に接続し、そのセンサから画像検査システム1へ検査開始トリガ信号を入力するようにしてもよい。また、画像検査システム1は、トリガ信号を内部で自動生成して検査を行うように構成してもよい。 The image inspection system 1 can be used for visual inspection of the work W, that is, for inspecting the presence or absence of defects such as scratches, stains, and dents on the surface of the work W, and the work W is based on the inspection results. It is also possible to make a pass / fail judgment. During its operation, the image inspection system 1 receives an inspection start trigger signal that defines the start timing of defect inspection (pass / fail determination inspection) from the external control device 8 via a signal line. The image inspection system 1 takes an image of the work W, illuminates, and the like based on the inspection start trigger signal, and obtains an inspection image after a predetermined process. After that, a visual inspection is performed based on the inspection image, and the inspection result is transmitted to the external control device 8 via the signal line. As described above, during the operation of the image inspection system 1, the inspection start trigger signal is repeatedly input and the inspection result is output between the image inspection system 1 and the external control device 8 via the signal line. As described above, the input of the inspection start trigger signal and the output of the inspection result may be performed via the signal line between the image inspection system 1 and the external control device 8, or other signals (not shown). It may be done via a line. For example, a sensor for detecting the arrival of the work W and the image inspection system 1 may be directly connected, and an inspection start trigger signal may be input from the sensor to the image inspection system 1. Further, the image inspection system 1 may be configured to automatically generate a trigger signal internally for inspection.

また、画像検査システム1は、専用のハードウェアで構成する他、汎用の機器にソフトウェアをインストールしたもの、たとえば汎用もしくは専用のコンピュータに画像検査プログラムをインストールした構成としてもよい。たとえば、グラフィックボードなどのハードウェアを画像検査処理に特化させた専用のコンピュータに、画像検査プログラムをインストールした構成とすることもできる。 In addition to being configured with dedicated hardware, the image inspection system 1 may be configured by installing software on a general-purpose device, for example, installing an image inspection program on a general-purpose or dedicated computer. For example, the image inspection program may be installed on a dedicated computer in which hardware such as a graphic board is specialized for image inspection processing.

(取得部Aの構成)
取得部Aは、ワークWからの反射光の受光量に応じた輝度画像を取得するとともに、ワークWの高さ情報が二次元座標上に配置された高さデータを取得可能に構成された部分である。輝度画像は、照明装置2により照明されたワークWを撮像部3により撮像することによって取得することができる。ワークWに対する照明が不要な場合には、照明装置2により照明することなく、ワークWを撮像部3により撮像することによって輝度画像を取得できる。
(Structure of acquisition unit A)
The acquisition unit A is configured to acquire a luminance image according to the amount of received light reflected from the work W, and to acquire height data in which the height information of the work W is arranged on two-dimensional coordinates. Is. The luminance image can be acquired by taking an image of the work W illuminated by the lighting device 2 by the image pickup unit 3. When the work W does not need to be illuminated, the luminance image can be acquired by capturing the work W with the image pickup unit 3 without illuminating the work W with the lighting device 2.

ワークWの高さ情報が二次元座標上に配置された高さデータを取得する手法は特に限定されるものではなく、どのような手法であってもよく、手法に応じたハードウェア及びソフトウェアを適宜選択できる。取得部Aは、高さデータを取得することで三次元画像を生成できる。 The method for acquiring the height data in which the height information of the work W is arranged on the two-dimensional coordinates is not particularly limited, and any method may be used, and the hardware and software corresponding to the method may be used. It can be selected as appropriate. The acquisition unit A can generate a three-dimensional image by acquiring height data.

すなわち、高さデータを取得する手法としては、大きく分けて2つの方式があり、一つは、通常の輝度画像を得るための照明条件で撮像した画像を用いて高さデータを取得するパッシブ方式(受動計測方式)、もう一つは、高さ方向の計測をするための光を能動的に照射して高さデータを取得するアクティブ方式(能動計測方式)である。パッシブ方式の代表的な手法は、ステレオ計測法である。これは、撮像部3を2台用意し、これら2台の撮像部3を所定の位置関係で配置してそれぞれ撮像を実行させ、生成された2枚の画像に基づいて周知の演算を行うことで高さデータを取得できる。 That is, there are roughly two methods for acquiring height data, and one is a passive method for acquiring height data using an image captured under lighting conditions for obtaining a normal brightness image. (Passive measurement method), the other is an active method (active measurement method) in which height data is acquired by actively irradiating light for measuring in the height direction. A typical method of the passive method is a stereo measurement method. This involves preparing two image pickup units 3, arranging these two image pickup units 3 in a predetermined positional relationship to execute imaging, and performing a well-known calculation based on the two generated images. You can get the height data with.

アクティブ方式の代表的な手法は、光切断法とパターン投影法である。光切断法は、上述したステレオ計測法において、一方の撮像部3をレーザ投光器に置き換えて、ワークWに対してライン状のレーザ光を投光し、ワークWの表面の形状に応じたライン光の像の歪み具合に基づいてワークWの三次元形状を復元する。光切断法は、対応点の決定が不要であるので安定した計測が可能である。 Typical methods of the active method are the optical cutting method and the pattern projection method. In the optical cutting method, in the stereo measurement method described above, one of the imaging units 3 is replaced with a laser floodlight, a line-shaped laser beam is projected onto the work W, and the line light according to the shape of the surface of the work W. The three-dimensional shape of the work W is restored based on the degree of distortion of the image of. The optical cutting method does not require determination of the corresponding point, so stable measurement is possible.

パターン投影法は、ワークWに投光された所定の投影パターンの形状や位相等をずらして複数枚の画像を撮像し、撮像した複数枚の画像を解析することでワークWの三次元形状を復元する方法である。パターン投影法には幾つか種類があり、正弦波縞模様パターンの位相をずらして複数枚(最低3枚以上)の画像を撮像し、複数枚の画像から画素ごとに正弦波の位相を求め、求めた位相を利用してワーク表面上の三次元座標を求める位相シフト法や、2つの規則的なパターンが合成されるときに生じる一種の空間周波数のうねり現象を利用して三次元形状を復元するモアレポトグラフィ法、ワークWに投影するパターン自体を撮影毎に異ならせ、例えば白黒デューティ比50%で縞幅が画面半分、4分の1、8分の1、、、と細くなっていく縞パターンを順次投影し、それぞれのパターンにてパターン投影画像の撮影を行い、ワークWの高さの絶対位相を求める空間コード化法、ワークに複数の細線状のパターン照明(マルチスリット)を投影し、スリット周期より狭いピッチでパターンを移動させ、複数回撮影を行うマルチスリット法等が代表的である。 The pattern projection method captures a plurality of images by shifting the shape, phase, etc. of a predetermined projection pattern projected on the work W, and analyzes the captured images to obtain a three-dimensional shape of the work W. How to restore. There are several types of pattern projection methods. The phase of the sine wave striped pattern is staggered to capture multiple images (at least 3 or more), and the phase of the sine wave is obtained for each pixel from the multiple images. The three-dimensional shape is restored by using the phase shift method to obtain the three-dimensional coordinates on the work surface using the obtained phase and the kind of spatial frequency swell phenomenon that occurs when two regular patterns are combined. More repotography method, the pattern itself projected on the work W is different for each shooting, for example, the stripe width becomes half the screen, 1/4, 1/8, etc. at a black and white duty ratio of 50%. A spatial coding method that sequentially projects striped patterns, captures a pattern projection image for each pattern, and obtains the absolute phase of the height of the work W, and projects multiple fine line-shaped pattern illuminations (multi-slits) on the work. A typical example is a multi-slit method in which the pattern is moved at a pitch narrower than the slit cycle and multiple shots are taken.

また、上述した位相シフト法と空間コード化法とを組み合わせて高さデータを取得することもできるが、これに限られるものではなく、他の方法によって高さデータを取得しても構わない。また、上述した方法以外の方法、例えば光レーダ法(タイムオブフライト)、合焦点法、共焦点法、白色光干渉法等、高さデータを取得するために考え得る如何なる手法を採用しても構わない。 Further, the height data can be acquired by combining the above-mentioned phase shift method and the spatial coding method, but the height data is not limited to this, and the height data may be acquired by another method. In addition, any method other than the above-mentioned method, such as optical radar method (time of flight), in-focus method, co-focus method, white light interferometry, etc., can be adopted to acquire height data. I do not care.

上記照明装置2及び撮像部3は、パターン投影法を実現可能に構成されている。以下、照明装置2及び撮像部3の具体的な構成について説明する。 The lighting device 2 and the imaging unit 3 are configured to realize a pattern projection method. Hereinafter, a specific configuration of the lighting device 2 and the image pickup unit 3 will be described.

(照明装置2の構成)
まず、照明装置2ついて説明する。照明装置2は、ワークWに対して所定の投影パターンを有する構造化照明を投光する投光部であり、発光部2aと、発光部2aを制御する照明制御部2bとを備えている。発光部2aと照明制御部2bとは、別体であってもよいし、一体化されたものであってもよい。また、照明制御部2bは、設定装置4に組み込まれていてもよい。発光部2aは、たとえば発光ダイオード、液晶パネルを用いたプロジェクタ、有機ELパネル、デジタルマイクロミラーデバイス(DMD)等で構成することができ、照明部と呼ぶこともできる。発光ダイオード、液晶パネル、有機ELパネル、DMDについては図示しないが、従来から周知の構造のものを用いることができる。照明装置2は、設定装置4に対して信号線100aを介して接続されており、撮像部3及び設定装置4から離して設置することができるようになっている。
(Structure of lighting device 2)
First, the lighting device 2 will be described. The lighting device 2 is a light emitting unit that projects structured lighting having a predetermined projection pattern on the work W, and includes a light emitting unit 2a and a lighting control unit 2b that controls the light emitting unit 2a. The light emitting unit 2a and the lighting control unit 2b may be separate or integrated. Further, the lighting control unit 2b may be incorporated in the setting device 4. The light emitting unit 2a can be composed of, for example, a light emitting diode, a projector using a liquid crystal panel, an organic EL panel, a digital micromirror device (DMD), or the like, and can also be called an illumination unit. Although the light emitting diode, the liquid crystal panel, the organic EL panel, and the DMD are not shown, those having a conventionally known structure can be used. The lighting device 2 is connected to the setting device 4 via a signal line 100a, and can be installed away from the image pickup unit 3 and the setting device 4.

実施形態1の照明装置2は、均一面発光を行うことができるように構成される。また、照明装置2は、所定の投影パターンを有する構造化照明の一例として、デフレクトメトリ処理を実現可能な照明を行うことができるように構成されており、従って、周期的な照度分布を有するパターン光をワークWに照射する発光部2aを有している。すなわち、照明装置2は、複数の異なるパターン光をワークWに対して順次照射するパターン光照明を実行するパターン光照明部とすることができる。以下、デフレクトメトリ処理を行うことによって高さデータを含む検査用画像を取得する場合に用いる照明装置2について説明する。 The lighting device 2 of the first embodiment is configured to be capable of performing uniform surface light emission. Further, the illuminating device 2 is configured to be capable of performing deflationary metric processing as an example of structured illuminating having a predetermined projection pattern, and therefore has a periodic illuminance distribution. It has a light emitting unit 2a that irradiates the work W with pattern light. That is, the lighting device 2 can be a pattern light illuminating unit that executes pattern light illumination that sequentially irradiates the work W with a plurality of different pattern lights. Hereinafter, the illuminating device 2 used when acquiring an inspection image including height data by performing a deflection metering process will be described.

複数の発光ダイオードを用いる場合には、複数の発光ダイオードをドットマトリクス状に配置して電流値制御によって周期的な照度分布を有するパターン光を生成することができる。たとえば、明暗がY方向に変化するY方向パターン光の場合、縞模様がY方向に繰り返されるパターン光という表現とすることもでき、このY方向パターン光を生成する際には、照度分布の位相をY方向にシフトさせることにより、照度分布の位相が異なった複数のY方向パターン光を生成することができる。Y方向パターン光の照度分布をsin波形に近似した波形で表すこともでき、この場合、たとえば位相を90゜ずつ変化させて、0゜の場合のY方向パターン光、90゜の場合のY方向パターン光、180゜の場合のY方向パターン光、270゜の場合のY方向パターン光を生成することができる。 When a plurality of light emitting diodes are used, the plurality of light emitting diodes can be arranged in a dot matrix to generate patterned light having a periodic illuminance distribution by controlling the current value. For example, in the case of Y-direction pattern light whose brightness changes in the Y direction, it can be expressed as pattern light in which a striped pattern is repeated in the Y direction, and when this Y-direction pattern light is generated, the phase of the illuminance distribution is generated. By shifting the light in the Y direction, it is possible to generate a plurality of Y-direction pattern lights having different phases of the illuminance distribution. The illuminance distribution of the Y-direction pattern light can also be represented by a waveform similar to the sin waveform. In this case, for example, the phase is changed by 90 °, and the Y-direction pattern light in the case of 0 ° and the Y-direction in the case of 90 °. It is possible to generate a pattern light, a Y-direction pattern light in the case of 180 °, and a Y-direction pattern light in the case of 270 °.

また、明暗がX方向に変化するX方向パターン光の場合、縞模様がX方向に繰り返されるパターン光という表現とすることもでき、このX方向パターン光を生成する際には、照度分布の位相をX方向にシフトさせることにより、照度分布の位相が異なった複数のX方向パターン光を生成することができる。X方向パターン光の照度分布をsin波形に近似した波形で表すこともでき、この場合、たとえば位相を90゜ずつ変化させて、0゜の場合のX方向パターン光、90゜の場合のX方向パターン光、180゜の場合のX方向パターン光、270゜の場合のX方向パターン光を生成することができる。つまり、照明装置2は、異なる照明態様でワークWを照明することができる。デフレクトメトリ処理を行う場合、ワークWに照射するパターン光はsin波形だけでなく、三角波等のパターン光でも可能である。 Further, in the case of the X-direction pattern light in which the brightness changes in the X-direction, it can be expressed as a pattern light in which the striped pattern is repeated in the X-direction, and when the X-direction pattern light is generated, the phase of the illuminance distribution is generated. By shifting the light in the X direction, it is possible to generate a plurality of X-direction pattern lights having different phases of the illuminance distribution. The illuminance distribution of the X-direction pattern light can also be represented by a waveform similar to the sin waveform. In this case, for example, the phase is changed by 90 °, and the X-direction pattern light in the case of 0 ° and the X-direction in the case of 90 °. It is possible to generate a pattern light, an X-direction pattern light in the case of 180 °, and an X-direction pattern light in the case of 270 °. That is, the lighting device 2 can illuminate the work W in different lighting modes. When the deflect metering process is performed, the pattern light irradiating the work W can be not only a sine waveform but also a pattern light such as a triangular wave.

尚、全ての発光ダイオードに同じ電流値の電流を流すことで照度分布が面内で均一な光を照射することもできる。全ての発光ダイオードに流す電流値を同じにして変化させていくと、暗い面発光状態から明るい面発光状態まで発光状態を変化させることができる。 By passing a current having the same current value through all the light emitting diodes, it is possible to irradiate light having a uniform illuminance distribution in the plane. By changing the current value flowing through all the light emitting diodes to be the same, the light emitting state can be changed from the dark surface emitting state to the bright surface emitting state.

また、液晶パネル及び有機ELパネルの場合は、各パネルを制御することで各パネルから照射される光が周期的な照度分布を有するパターン光となるようにすることができる。デジタルマイクロミラーデバイスの場合は、内蔵された微小鏡面を制御することで周期的な照度分布を有するパターン光を生成して照射することができる。尚、照明装置2の構成は上述したものに限られるものではなく、周期的な照度分布を有するパターン光を生成することができる機器や装置等であれば使用することができる。 Further, in the case of a liquid crystal panel and an organic EL panel, by controlling each panel, the light emitted from each panel can be made into a pattern light having a periodic illuminance distribution. In the case of a digital micromirror device, it is possible to generate and irradiate a pattern light having a periodic illuminance distribution by controlling the built-in micromirror surface. The configuration of the lighting device 2 is not limited to that described above, and any device or device capable of generating patterned light having a periodic illuminance distribution can be used.

また、後述するが、フォトメトリックステレオ法を利用して検査用画像を生成する場合に用いる照明装置2は、少なくとも3以上の異なる方向から照明を個別に照射可能な照明装置を用いることができる。また、照明装置2は、マルチスペクトル照明が可能に構成された照明装置であってもよく、照明装置2の構成は特に限定されるものではない。 Further, as will be described later, as the illuminating device 2 used when generating an inspection image by using the photometric stereo method, an illuminating device capable of individually irradiating illumination from at least three or more different directions can be used. Further, the lighting device 2 may be a lighting device configured to enable multispectral lighting, and the configuration of the lighting device 2 is not particularly limited.

(撮像部3の構成)
次に、撮像部3について説明する。撮像部3は、カメラ31と、集光系光学系32と、撮像制御部33とを有している。撮像部3は、設定装置4に対して信号線100bを介して接続されており、照明装置2及び設定装置4から離して設置することができるようになっている。
(Structure of Imaging Unit 3)
Next, the image pickup unit 3 will be described. The image pickup unit 3 includes a camera 31, a condensing system optical system 32, and an image pickup control unit 33. The image pickup unit 3 is connected to the setting device 4 via a signal line 100b, and can be installed away from the lighting device 2 and the setting device 4.

カメラ31は、集光系光学系32を通して得られた光の強度を電気信号に変換するCCDやCMOS等の撮像素子31dからなるイメージセンサを有している。カメラ31は、ワークWからの反射光の受光量に応じた輝度画像を取得するとともに、照明装置2により投光された構造化照明がワークWで反射した反射光を受光して、複数のパターン投影画像を生成する画像生成部である。また、撮像制御部33は、記憶装置や信号処理装置を有するとともに、カメラ31の露光開始及び終了の制御、露光時間の制御、アナログゲインの調整等を行う部分である。内部の論理回路によってイメージセンサの駆動や、画像データの転送を制御することができる。また、撮像制御部33によって各種画像処理、フィルター処理、画像生成等を行うことができるようになっており、撮像部3は、フィルター処理機能を保有した装置である。 The camera 31 has an image sensor including an image sensor 31d such as a CCD or CMOS that converts the intensity of light obtained through the condensing optical system 32 into an electric signal. The camera 31 acquires a luminance image according to the amount of light received from the work W, and the structured lighting projected by the lighting device 2 receives the reflected light reflected by the work W to receive a plurality of patterns. It is an image generation unit that generates a projected image. Further, the image pickup control unit 33 has a storage device and a signal processing device, and is a part that controls the exposure start and end of the camera 31, controls the exposure time, adjusts the analog gain, and the like. The drive of the image sensor and the transfer of image data can be controlled by the internal logic circuit. Further, the image pickup control unit 33 can perform various image processing, filter processing, image generation, and the like, and the image pickup unit 3 is a device having a filter processing function.

集光系光学系32は、外部から入射する光を集光するための光学系であり、典型的には一以上の光学レンズを有している。また、集光系光学系32は、オートフォーカスを実行可能に構成されている。照明装置2からワークWの表面に向けて照射された光が該ワークWの表面で反射して集光系光学系32に入射するように、撮像部3と照明装置2との位置関係を設定することができる。ワークWが透明フィルムやシートのように透光性を有する部材である場合、照明装置2からワークWの表面に向けて照射されたパターン光が該ワークWを透過して撮像部3の集光系光学系32に入射するように、撮像部3と照明装置2との位置関係を設定することができる。上記したいずれの場合も、ワークWの表面で反射した正反射成分及び拡散反射成分が撮像部3の集光系光学系32に入射するように、撮像部3と照明装置2とを配置する。また、撮像部3には、受光素子がY方向に直線状に配置されたラインカメラを用いることもできるが、ラインカメラではなく、エリアカメラ(受光素子がX方向とY方向に並ぶように配置されたカメラ)を用いることもでき、このエリアカメラの場合は、同軸照明という照明形態も可能である。 The condensing system optical system 32 is an optical system for condensing light incident from the outside, and typically has one or more optical lenses. Further, the condensing optical system 32 is configured to be capable of performing autofocus. The positional relationship between the image pickup unit 3 and the lighting device 2 is set so that the light emitted from the lighting device 2 toward the surface of the work W is reflected by the surface of the work W and incident on the condensing optical system 32. can do. When the work W is a transparent member such as a transparent film or a sheet, the pattern light emitted from the lighting device 2 toward the surface of the work W passes through the work W and is condensed by the image pickup unit 3. The positional relationship between the image pickup unit 3 and the lighting device 2 can be set so as to be incident on the system optical system 32. In any of the above cases, the image pickup unit 3 and the lighting device 2 are arranged so that the specular reflection component and the diffuse reflection component reflected on the surface of the work W are incident on the condensing system optical system 32 of the image pickup unit 3. Further, although a line camera in which the light receiving elements are arranged linearly in the Y direction can be used for the image pickup unit 3, an area camera (the light receiving elements are arranged so as to be arranged in the X direction and the Y direction) instead of the line camera. In the case of this area camera, a lighting form called coaxial lighting is also possible.

(実施形態2)
図2は、本発明の実施形態2に係る画像検査システム1の概略構成及び運用状態を模式的に示す図である。実施形態2では、撮像制御部33が撮像素子を有するカメラ31及び集光系光学系32から分離しており、この撮像制御部33に照明制御部2bが取り込まれて一体化されている。撮像制御部33は、設定装置4に対して信号線100bを介して接続されている。撮像制御部33と照明制御部2bとは別体とすることもできる。
(Embodiment 2)
FIG. 2 is a diagram schematically showing a schematic configuration and an operating state of the image inspection system 1 according to the second embodiment of the present invention. In the second embodiment, the image pickup control unit 33 is separated from the camera 31 having the image pickup element and the condensing system optical system 32, and the illumination control unit 2b is incorporated into the image pickup control unit 33 and integrated. The image pickup control unit 33 is connected to the setting device 4 via a signal line 100b. The image pickup control unit 33 and the illumination control unit 2b can be separated from each other.

(実施形態3)
図3は、本発明の実施形態3に係る画像検査システム1の概略構成及び運用状態を模式的に示す図である。実施形態3では、撮像制御部33に照明制御部2bが取り込まれて一体化されるとともに、撮像制御部33に表示部5及びマウス7が接続されている。設定装置4は、たとえばノートパソコン等で構成されており、撮像制御部33に接続されている。設定装置4は、キーボード6を有している。また、設定装置4には、マウスを接続してもよい。設定装置4が生成した各種ユーザーインターフェース等は、撮像制御部33を介して表示部5に表示することができる。
(Embodiment 3)
FIG. 3 is a diagram schematically showing a schematic configuration and an operating state of the image inspection system 1 according to the third embodiment of the present invention. In the third embodiment, the lighting control unit 2b is incorporated into the image pickup control unit 33 and integrated, and the display unit 5 and the mouse 7 are connected to the image pickup control unit 33. The setting device 4 is composed of, for example, a notebook computer or the like, and is connected to the image pickup control unit 33. The setting device 4 has a keyboard 6. Further, a mouse may be connected to the setting device 4. Various user interfaces and the like generated by the setting device 4 can be displayed on the display unit 5 via the image pickup control unit 33.

(実施形態4)
図4は、本発明の実施形態4に係る画像検査システム1の概略構成及び運用状態を模式的に示す図である。実施形態4では、照明装置2と撮像部3とが一体化されており、照明制御部2bと撮像制御部33とも一体化されている。尚、実施形態2〜4において、実施形態1と同じ部分には同じ符号を付して説明を省略している。
(Embodiment 4)
FIG. 4 is a diagram schematically showing a schematic configuration and an operating state of the image inspection system 1 according to the fourth embodiment of the present invention. In the fourth embodiment, the lighting device 2 and the image pickup unit 3 are integrated, and the lighting control unit 2b and the image pickup control unit 33 are also integrated. In the second to fourth embodiments, the same parts as those in the first embodiment are designated by the same reference numerals and the description thereof is omitted.

(デフレクトメトリ処理)
実施形態1〜4では、撮像部3により生成された複数のパターン投影画像に基づいて、高さデータを取得するように構成されている。具体的には、撮像部3が撮像した複数の輝度画像からデフレクトメトリの原理に基づいてワークWの表面の位相データを生成し、当該位相データに基づいて、ワークWの高さ情報が二次元座標上に配置された高さデータ、即ち、ワークWの形状を示す高さ画像を生成するデフレクトメトリ処理を行うように構成されている。
(Deflation metering)
In the first to fourth embodiments, height data is acquired based on a plurality of pattern projection images generated by the image pickup unit 3. Specifically, phase data on the surface of the work W is generated from a plurality of brightness images captured by the imaging unit 3 based on the principle of deflectometry, and the height information of the work W is two based on the phase data. It is configured to perform a deflection metering process to generate height data arranged on the dimensional coordinates, that is, a height image showing the shape of the work W.

図5に一例を示すように、照明装置2の発光部2aは、第1発光部21、第2発光部22、第3発光部23及び第4発光部24を備えており、これら第1〜第4発光部21〜24がそれぞれパターン投影可能になっている。 As an example shown in FIG. 5, the light emitting unit 2a of the lighting device 2 includes a first light emitting unit 21, a second light emitting unit 22, a third light emitting unit 23, and a fourth light emitting unit 24. Each of the fourth light emitting units 21 to 24 can project a pattern.

以下、図5に基づいて高さ画像の生成について詳細に説明する。照明装置2の第1発光部21が空間コード法にしたがう4つのパターン光をワークWに照射した場合には、撮像部3が4つの異なる画像からなるグレーコードパターン画像セットを生成する。また、照明装置2の第1発光部21が位相シフト法にしたがう8つのパターン光をワークWに照射した場合には、撮像部3が8つの異なる画像からなる位相シフトパターン画像セットを生成する。 Hereinafter, the generation of the height image will be described in detail with reference to FIG. When the first light emitting unit 21 of the lighting device 2 irradiates the work W with four pattern lights according to the spatial code method, the image pickup unit 3 generates a gray code pattern image set consisting of four different images. Further, when the first light emitting unit 21 of the lighting device 2 irradiates the work W with eight pattern lights according to the phase shift method, the image pickup unit 3 generates a phase shift pattern image set consisting of eight different images.

同様に、照明装置2の第2発光部22が空間コード法にしたがうパターン光をワークWに照射した場合には、グレーコードパターン画像セットが生成され、また、位相シフト法にしたがうパターン光をワークWに照射した場合には、位相シフトパターン画像セットが生成される。 Similarly, when the second light emitting unit 22 of the lighting device 2 irradiates the work W with the pattern light according to the spatial code method, a gray code pattern image set is generated, and the pattern light according to the phase shift method is generated. When W is irradiated, a phase shift pattern image set is generated.

同様に、照明装置2の第3発光部23が空間コード法にしたがうパターン光をワークWに照射した場合には、グレーコードパターン画像セットが生成され、また、位相シフト法にしたがうパターン光をワークWに照射した場合には、位相シフトパターン画像セットが生成される。 Similarly, when the third light emitting unit 23 of the lighting device 2 irradiates the work W with the pattern light according to the spatial code method, a gray code pattern image set is generated, and the pattern light according to the phase shift method is generated. When W is irradiated, a phase shift pattern image set is generated.

同様に、照明装置2の第4発光部24が空間コード法にしたがうパターン光をワークWに照射した場合には、グレーコードパターン画像セットが生成され、また、位相シフト法にしたがうパターン光をワークWに照射した場合には、位相シフトパターン画像セットが生成される。 Similarly, when the fourth light emitting unit 24 of the lighting device 2 irradiates the work W with the pattern light according to the spatial code method, a gray code pattern image set is generated, and the pattern light according to the phase shift method is generated. When W is irradiated, a phase shift pattern image set is generated.

位相シフトパターン画像セットを生成した後、位相シフトパターン画像セットの各画像データを取得し、位相シフト法を利用することにより、相対位相計算処理を行うことができる。これにより、位相画像を取得できる。この位相は相対位相(Unwrapping前位相)である。 After generating the phase shift pattern image set, each image data of the phase shift pattern image set is acquired, and the relative phase calculation process can be performed by using the phase shift method. This makes it possible to acquire a phase image. This phase is a relative phase (pre-Unwrapping phase).

また、グレーコードパターン画像セットを生成した後、グレーコードパターン画像セットの各画像データを取得し、空間コード法を利用することにより、空間コード算出処理を行い、縞番号画像を得る。縞番号画像は、光が照射される空間を多数の小空間に分けた場合に、小空間に一連の空間コード番号を付して識別可能にした画像である。 Further, after the gray code pattern image set is generated, each image data of the gray code pattern image set is acquired, and the spatial code calculation process is performed by using the spatial code method to obtain a striped number image. The stripe number image is an image in which a space to be irradiated with light is divided into a large number of small spaces, and a series of space code numbers are attached to the small spaces so that they can be identified.

その後、絶対位相位相化処理を行う。絶対位相位相化処理では、位相画像と、縞番号画像とを合成(Unwrapping)して絶対位相画像(中間画像)を生成する。つまり、空間コード法によって得た空間コード番号により、位相シフト法による位相ジャンプの補正(位相アンラップ)ができるので、高さのダイナミックレンジを広く確保しつつ、高分解能な測定結果を得ることができる。 After that, the absolute phase phase conversion process is performed. In the absolute phase phase conversion process, the phase image and the fringe number image are unwrapped to generate an absolute phase image (intermediate image). That is, since the phase jump can be corrected (phase unwrap) by the phase shift method by the spatial code number obtained by the spatial code method, it is possible to obtain a high-resolution measurement result while ensuring a wide dynamic range of the height. ..

なお、位相シフト法のみで高さ測定を行うようにしてもよい。この場合は、高さの測定ダイナミックレンジが狭くなるので、位相が1周期以上ずれてしまうような高さの相違が大きいワークWの場合は、高さの測定が正しく行えない。逆に、高さの変化が小さなワークWの場合は、空間コード法による縞画像の撮像や合成を行わないので、その分だけ処理を高速化することができるメリットがある。例えば、高さ方向の差異が少ないワークWを測定する際には、ダイナミックレンジを大きく取る必要がないため、位相シフト法のみでも高精度な高さ測定性能を維持しつつ、処理時間を短くすることができる。また、絶対高さは判るので空間コード法のみで高さ測定するように構成してもよい。この場合、コードを増やすことによって精度を高めることができる。 The height may be measured only by the phase shift method. In this case, since the height measurement dynamic range is narrowed, the height cannot be measured correctly in the case of the work W having a large difference in height such that the phase is shifted by one cycle or more. On the contrary, in the case of the work W having a small change in height, since the striped image is not captured or combined by the spatial coding method, there is an advantage that the processing can be speeded up by that amount. For example, when measuring a work W with a small difference in the height direction, it is not necessary to take a large dynamic range, so that the processing time is shortened while maintaining highly accurate height measurement performance even with the phase shift method alone. be able to. Further, since the absolute height is known, the height may be measured only by the space code method. In this case, the accuracy can be improved by increasing the code.

絶対位相画像は、各画素がワークWへのパターン光の照射角度情報を有する角度画像ということもできる。すなわち、第1パターン画像セット(位相シフトパターン画像セット)には、正弦波縞模様パターンの位相をずらして撮像した8枚の第1パターン画像が含まれているので、位相シフト法を利用することによってワークWへのパターン光の照射角度情報を各画素が有することになる。つまり、複数の第1パターン画像に基づいて、各画素がワークWへの第1測定用パターン光の照射角度情報を有する第1角度画像を生成することができる。第1角度画像は、第1発光部21からワークWへ照射される光の角度を画像化した画像である。 The absolute phase image can also be said to be an angle image in which each pixel has the irradiation angle information of the pattern light on the work W. That is, since the first pattern image set (phase shift pattern image set) includes eight first pattern images taken by shifting the phase of the sinusoidal stripe pattern, the phase shift method should be used. Therefore, each pixel has information on the irradiation angle of the pattern light on the work W. That is, based on the plurality of first pattern images, it is possible to generate a first angle image in which each pixel has irradiation angle information of the first measurement pattern light on the work W. The first angle image is an image that images the angle of the light emitted from the first light emitting unit 21 to the work W.

同様に、複数の第2パターン画像に基づいて各画素がワークWへの第2測定用パターン光の照射角度情報を有する第2角度画像と、複数の第3パターン画像に基づいて各画素がワークWへの第3測定用パターン光の照射角度情報を有する第3角度画像と、複数の第4パターン画像に基づいて各画素がワークWへの第4測定用パターン光の照射角度情報を有する第4角度画像とを生成することができる。 Similarly, a second angle image in which each pixel has irradiation angle information of the second measurement pattern light on the work W based on a plurality of second pattern images, and each pixel works based on a plurality of third pattern images. A third angle image having the irradiation angle information of the pattern light for the third measurement on the W, and a third angle image in which each pixel has the irradiation angle information of the pattern light for the fourth measurement on the work W based on the plurality of fourth pattern images. A four-angle image can be generated.

図5における中間画像の最も上の画像が第1角度画像であり、上から2番目の画像が第2角度画像であり、上から3番目の画像が第3角度画像であり、一番下の画像が第4角度画像である。各角度画像の真っ黒に塗りつぶされたように見える部分が照明の影になっている部分であり、角度情報の無い無効画素となる。 The top image of the intermediate image in FIG. 5 is the first angle image, the second image from the top is the second angle image, the third image from the top is the third angle image, and the bottom image. The image is a fourth angle image. The portion of each angle image that appears to be filled in black is the portion that is the shadow of the illumination, and is an invalid pixel without angle information.

第1角度画像と第2角度画像とによって第1高さ画像を生成でき、また、第3角度画像と第4角度画像とによって第2高さ画像を生成できる。その後、第1高さ画像と第2高さ画像とを合成して合成後高さ画像を生成できる。これにより、合成後高さ画像では無効画素の数を少なくすることができる。 The first angle image and the second angle image can generate a first height image, and the third angle image and the fourth angle image can generate a second height image. After that, the first height image and the second height image can be combined to generate a combined height image. As a result, the number of invalid pixels can be reduced in the height image after composition.

(実施形態5)
図6は、本発明の実施形態5に係る画像検査システム1の概略構成及び運用状態を模式的に示す図である。上記実施形態1〜4は、デフレクトメトリの原理に基づいて検査用画像を生成する形態であるのに対し、実施形態5では、フォトメトリックステレオ法を利用して検査用画像を生成するように構成されている。
(Embodiment 5)
FIG. 6 is a diagram schematically showing a schematic configuration and an operating state of the image inspection system 1 according to the fifth embodiment of the present invention. While the above-described first to fourth embodiments are in the form of generating an inspection image based on the principle of deflation, in the fifth embodiment, the inspection image is generated by using the photometric stereo method. It is configured.

以下、フォトメトリックステレオ法を利用して検査用画像を生成する具体的な方法について、図6を参照しながら、実施形態1と同じ部分には同じ符合を付して説明を省略し、異なる部分について詳細に説明する。 Hereinafter, a specific method for generating an inspection image by using the photometric stereo method will be described with reference to FIG. 6 with the same reference numerals to the same parts as those in the first embodiment, and the description thereof will be omitted. Will be described in detail.

実施形態5に係る画像検査システム1は、たとえば特開2015−232486号公報に開示されている画像検査システムと同様に構成することができる。すなわち、画像検査システム1は、ワークWを一定の方向から撮像する撮像部3と、ワークWを異なる三以上の照明方向から照明するための照明装置200とを備えるとともに、実施形態1と同様な表示部5、キーボード6及びマウス7を少なくとも備えている。撮像部3と照明装置200とにより取得部Aが構成されている。 The image inspection system 1 according to the fifth embodiment can be configured in the same manner as the image inspection system disclosed in, for example, Japanese Patent Application Laid-Open No. 2015-232486. That is, the image inspection system 1 includes an image pickup unit 3 that images the work W from a certain direction, and a lighting device 200 for illuminating the work W from three or more different lighting directions, and is similar to the first embodiment. It includes at least a display unit 5, a keyboard 6, and a mouse 7. The acquisition unit A is composed of the image pickup unit 3 and the lighting device 200.

照明装置200は、ワークWに対して、互いに異なる方向から光を照射するように構成されており、第1〜第4発光部201〜204と、第1〜第4発光部201〜204を制御する照明制御部205とを有している。この照明装置200は、ワークWに対して互いに異なる方向から光を照射する複数方向照明を実行する部分であり、所定の投影パターンを有する構造化照明を投光可能に構成されている。第1〜第4発光部201〜204は互いに間隔をあけてワークWを取り囲むように配置されている。第1〜第4発光部201〜204は、発光ダイオード、白熱球、蛍光灯等を利用することができる。また、第1〜第4発光部201〜204は別体であってもよいし、一体化されていてもよい。 The lighting device 200 is configured to irradiate the work W with light from different directions, and controls the first to fourth light emitting units 201 to 204 and the first to fourth light emitting units 201 to 204. It has a lighting control unit 205 and a lighting control unit 205. The lighting device 200 is a portion that executes multi-directional lighting that irradiates the work W with light from different directions, and is configured to be capable of projecting structured lighting having a predetermined projection pattern. The first to fourth light emitting units 201 to 204 are arranged so as to surround the work W at intervals from each other. Light emitting diodes, incandescent bulbs, fluorescent lamps, and the like can be used for the first to fourth light emitting units 201 to 204. Further, the first to fourth light emitting units 201 to 204 may be separate bodies or may be integrated.

この実施形態では、第1〜第4発光部201〜204を順次点灯させ、第1〜第4発光部201〜204のいずれかが点灯した時点で、撮像部3がワークWを撮像する。たとえば、照明装置200が1回目の照明トリガ信号を受信すると、照明制御部205が第1発光部201のみ点灯させる。このとき撮像部3は撮像トリガ信号を受信して光が照射されるタイミングでワークWを撮像する。照明装置200が2回目の照明トリガ信号を受信すると、照明制御部205が第2発光部202のみ点灯させ、このとき撮像部3はワークWを撮像する。このようにして4枚の輝度画像を得ることができる。なお、照明の数は4つに限られるものではなく、3つ以上で、かつ、互いに異なる方向からワークWを照明することができれば任意の数にすることができる。 In this embodiment, the first to fourth light emitting units 201 to 204 are sequentially turned on, and when any of the first to fourth light emitting units 201 to 204 is turned on, the image pickup unit 3 takes an image of the work W. For example, when the lighting device 200 receives the first lighting trigger signal, the lighting control unit 205 lights only the first light emitting unit 201. At this time, the image pickup unit 3 receives the image pickup trigger signal and images the work W at the timing when the light is irradiated. When the lighting device 200 receives the second lighting trigger signal, the lighting control unit 205 lights only the second light emitting unit 202, and at this time, the imaging unit 3 images the work W. In this way, four luminance images can be obtained. The number of illuminations is not limited to four, but can be any number as long as it is three or more and the work W can be illuminated from different directions.

そして、撮像部3によって撮像された複数の輝度画像同士で対応関係にある画素毎の画素値を用いて、各画素のワークWの表面に対する法線ベクトルを算出する。算出された各画素の法線ベクトルに対してX方向及びY方向に微分処理を施し、ワークWの表面の傾きの輪郭を示す輪郭画像を生成する。また、算出された各画素の法線ベクトルから、法線ベクトルと同個数の各画素のアルベドを算出し、アルベドから、ワークWの表面の傾き状態を除去した模様を示すテクスチャ描出画像を生成する。この手法は周知の手法であることから詳細な説明は省略する。複数の輝度画像をフォトメトリックステレオの原理に基づいて合成することで、ワークWの形状を示す形状画像(高さ画像)を生成することができる。 Then, the normal vector for the surface of the work W of each pixel is calculated by using the pixel value for each pixel which is in a corresponding relationship between the plurality of luminance images captured by the image pickup unit 3. The calculated normal vector of each pixel is subjected to differential processing in the X direction and the Y direction to generate a contour image showing the contour of the inclination of the surface of the work W. Further, the albedo of each pixel having the same number as the normal vector is calculated from the calculated normal vector of each pixel, and a texture drawing image showing a pattern in which the tilt state of the surface of the work W is removed is generated from the albedo. .. Since this method is a well-known method, detailed description thereof will be omitted. By synthesizing a plurality of luminance images based on the principle of photometric stereo, it is possible to generate a shape image (height image) showing the shape of the work W.

(マルチスペクトル照明)
他の実施形態として、所定の投影パターンを有する構造化照明としてマルチスペクトル照明が可能な照明装置2であってもよい。マルチスペクトル照明とは、波長が異なる光を、タイミングをずらしてワークWに照射することであり、印刷物(検査対象物)の色むらや汚れ等を検査するのに適している。たとえば、黄色、青色、赤色を順番にワークWに照射可能となるように、照明装置2を構成することができ、具体的には、多数色のLEDを有する照明装置2としてもよいし、液晶パネルや有機ELパネル等で照明装置2を構成してもよい。
(Multi-spectral lighting)
As another embodiment, the illuminating device 2 capable of multispectral illuminating as structured illuminating having a predetermined projection pattern may be used. The multispectral illumination is to irradiate the work W with light having different wavelengths at different timings, and is suitable for inspecting color unevenness, stains, and the like of a printed matter (inspection object). For example, the lighting device 2 can be configured so that the work W can be irradiated with yellow, blue, and red in order. Specifically, the lighting device 2 may have LEDs of a large number of colors, or may be a liquid crystal display. The lighting device 2 may be configured by a panel, an organic EL panel, or the like.

撮像部3は、光が照射されるタイミングでワークWを撮像して複数の輝度画像を得る。そして、複数の輝度画像を合成して検査用画像を得ることができる。これをマルチスペクトルイメージングと呼ぶ。尚、照射する光には紫外線や赤外線も含むことができる。 The image pickup unit 3 captures the work W at the timing of being irradiated with light to obtain a plurality of luminance images. Then, a plurality of luminance images can be combined to obtain an inspection image. This is called multispectral imaging. The light to be irradiated may include ultraviolet rays and infrared rays.

(カメラ31と画像検査アプリケーションとの接続インターフェース)
実施形態1〜5のカメラ31は、GenICam規格に対応したGenICam規格対応カメラである。GenICam規格は、PCアプリケーションとカメラ31との接続インターフェースを標準化する規格であり、図7に示すように、主に設定装置4の本体部となるパーソナルコンピュータ上に構築する画像検査アプリケーション40からカメラ31を制御したり、カメラ31で撮像された画像を設定装置4の画像検査アプリケーション40で取得するインターフェースを標準化したものである。撮像部3と設定装置4の画像検査アプリケーション40の双方がGenICam規格に対応していれば、カメラ31と、設定装置4の画像検査アプリケーション40とを接続することが可能になっている。画像検査アプリケーション40は、パーソナルコンピュータにインストールされたソフトウェアで構成される。尚、この実施形態では、カメラ31及び設定装置4が標準化規格としてGenICam規格に対応している場合について説明するが、標準化規格はGenICam規格に限られるものではなく、他の標準化規格であってもよい。
(Connection interface between camera 31 and image inspection application)
The cameras 31 of the first to fifth embodiments are cameras compatible with the GenICam standard. The GenICam standard is a standard that standardizes the connection interface between the PC application and the camera 31, and as shown in FIG. 7, the image inspection application 40 to the camera 31 built mainly on the personal computer which is the main body of the setting device 4 This is a standardized interface for controlling the image and acquiring the image captured by the camera 31 by the image inspection application 40 of the setting device 4. If both the image pickup unit 3 and the image inspection application 40 of the setting device 4 support the GenICam standard, it is possible to connect the camera 31 and the image inspection application 40 of the setting device 4. The image inspection application 40 is composed of software installed in a personal computer. In this embodiment, the case where the camera 31 and the setting device 4 correspond to the GenICam standard as a standardization standard will be described, but the standardization standard is not limited to the GenICam standard, and may be another standardization standard. good.

画像検査アプリケーション40を階層構造に分解した場合を想定すると、GenICam層41は、画像検査アプリケーション40における実際に画像検査や欠陥検査等を行う上位の階層(検査部4A、画像処理部4B)と、具体的なネットワーク通信規格に基づき制御を行う階層42との間に位置する中間層の位置付けとなる。GenICam層41は、大きく2つの部分、GenApi41a及びGenTL(TL:Transport Layer)41bに分類することができる。GenApi41aは、カメラ31の設定項目と、カメラ31内部のレジスタアドレスの変換を行う部分である。このGenApi41aにより、画像検査アプリケーション40からはカメラ31の具体的なアドレスを指定することなく、抽象的に、露光時間であれば、「ExposureTime」、アナログゲインであれば「AnalogGain」といった文字列を引数に設定項目を指定し、カメラ31と接続した際に、カメラ31から取得したDeviceXML(詳細は後述する)と呼ばれるファイルを解析することで、その文字列(Featureと呼ばれる)に対応したレジスタアドレスを割り出すことができる。 Assuming that the image inspection application 40 is decomposed into a hierarchical structure, the GenICam layer 41 includes a higher layer (inspection unit 4A, image processing unit 4B) that actually performs image inspection, defect inspection, etc. in the image inspection application 40. It is positioned as an intermediate layer located between the layer 42 and the layer 42 that controls based on a specific network communication standard. The GenICam layer 41 can be roughly classified into two parts, GenApi41a and GenTL (TL: Transport Layer) 41b. The GenApi41a is a part that converts the setting items of the camera 31 and the register address inside the camera 31. With this GenApi41a, the image inspection application 40 does not specify a specific address of the camera 31, but abstractly, if it is an exposure time, it is an argument such as "ExposureTime", and if it is an analog gain, it is an argument such as "AnalogGain". When the setting item is specified in and connected to the camera 31, the file called DeviceXML (details will be described later) acquired from the camera 31 is analyzed to obtain the register address corresponding to the character string (called Shutter). Can be indexed.

GenTL41bは、画像検査アプリケーション40とカメラ31との間のデータの転送を制御するインターフェース(API)を規定したものであり、具体的には、カメラ31のレジスタへの書き込み、読み出しAPIの仕様及びカメラ31から転送した画像データの画像検査アプリケーション40の上位の層への受け渡しを行うAPIの仕様を規定したものである。 GenTL41b defines an interface (API) that controls the transfer of data between the image inspection application 40 and the camera 31, and specifically, the specifications of the API for writing to and reading from the register of the camera 31 and the camera. It defines the specifications of the API for transferring the image data transferred from 31 to the upper layer of the image inspection application 40.

画像検査アプリケーション40とカメラ31を接続する物理的な規格は、高速ネットワークを使用した規格であればよく、例えば、Ethernetケーブル31aを利用したGigE Vision規格3Aと、USB3.0対応ケーブル31bを利用したUSB3Vision規格3Bとがある。よって、撮像部3と設定装置4とは、ネットワークを介して接続されることになるが、このネットワークは、高速ネットワークケーブルを利用した有線であってもよいし、無線であってもよい。また、ネットワークは、Ethernetケーブル31aやUSB3.0対応ケーブル31b以外のケーブルを用いたネットワークであってもよく、特に限定されるものではない。 The physical standard for connecting the image inspection application 40 and the camera 31 may be a standard using a high-speed network. For example, a GigE Vision standard 3A using an Ethernet cable 31a and a USB3.0 compatible cable 31b are used. There is USB3Vision standard 3B. Therefore, the image pickup unit 3 and the setting device 4 are connected via a network, and this network may be wired or wireless using a high-speed network cable. Further, the network may be a network using a cable other than the Ethernet cable 31a and the USB3.0 compatible cable 31b, and is not particularly limited.

GenICam規格は、物理的な通信規格として使用するものを具体的に特定しておらず、GenTL41bという形で抽象化した仕様を規定しているに留まっている。このGenTL41bの下位の階層42として、GigE Vision規格3AやUSB3Vision規格3Bといった、具体的な通信ネットワークを用いて通信規格が規定されている。具体的な通信規格は、GigE Vision規格3AやUSB3Vision規格3Bに限られるものではなく、GenICam規格に対応していればよい。図7では、GigE Vision規格3A及びUSB3Vision規格3Bの概念を説明するために、各規格に対応したカメラ31、31を設定装置4に接続した状態を示しているが、一方のカメラ31のみを設定装置4に接続して使用することができる。 The GenICam standard does not specifically specify what is used as a physical communication standard, but only defines an abstract specification in the form of GenTL41b. As the lower layer 42 of the GenTL41b, a communication standard is defined by using a specific communication network such as GigE Vision standard 3A or USB3 Vision standard 3B. The specific communication standard is not limited to the GigE Vision standard 3A and the USB3 Vision standard 3B, and may be compatible with the GenICam standard. FIG. 7 shows a state in which cameras 31 and 31 corresponding to each standard are connected to the setting device 4 in order to explain the concepts of the GigE Vision standard 3A and the USB3 Vision standard 3B, but only one camera 31 is set. It can be used by connecting to the device 4.

GenICam規格対応カメラ31には、DeviceXMLと呼ばれるファイル(DeviceXMLファイル)31cが記憶されている。DeviceXMLファイル31cは、カメラ31に内蔵された記憶装置(内部メモリ)に記憶されている。GenICam規格に対応した画像検査アプリケーション40では、画像検査アプリケーション40による設定対象であるカメラ31と接続する際に、そのカメラ31からDeviceXMLファイル31cを読み込む。DeviceXMLファイル31cの読み込みは、たとえば、カメラ31からDeviceXMLファイル31cをダウンロードする方法がある。ダウンロードされたDeviceXMLファイル31cはGenApi41aで保持される。DeviceXMLファイル31cのダウンロードは、画像検査アプリケーション40側からの要求によって行うことや、カメラ31との接続時に自動的に行うことができ、このDeviceXMLファイル31cのダウンロードにより、設定装置4はDeviceXMLファイル31cを取得できる。また、接続するカメラ31からダウンロードせずに、そのカメラ31に対応したDeviceXMLファイル31cを別の手段(例えばウェブサイトからのダウンロード)により入手して、接続時にGenApi41aに対して指定することも可能である。 A file (DeviceXML file) 31c called a DeviceXML is stored in the GenICam standard compatible camera 31. The DeviceXML file 31c is stored in a storage device (internal memory) built in the camera 31. The image inspection application 40 corresponding to the GenICam standard reads the DeviceXML file 31c from the camera 31 when connecting to the camera 31 to be set by the image inspection application 40. To read the DeviceXML file 31c, for example, there is a method of downloading the DeviceXML file 31c from the camera 31. The downloaded DeviceXML file 31c is retained by GenApi41a. The DeviceXML file 31c can be downloaded at the request of the image inspection application 40 or automatically when the camera 31 is connected. By downloading the DeviceXML file 31c, the setting device 4 downloads the DeviceXML file 31c. You can get it. It is also possible to obtain the DeviceXML file 31c corresponding to the camera 31 by another means (for example, download from a website) without downloading from the connected camera 31, and specify it for GenApi41a at the time of connection. be.

DeviceXMLファイル31cには、カメラ31の内部に保持する全ての設定項目と、各設定項目の設定値が格納されるレジスタアドレス(レジスタ情報)とが関連付けられて記述されている。設定項目はFeatureと呼ばれ、各Featureには、個々のFeatureを特定するための文字列が割り当てられている。各Featureのノードには、具体的なレジスタアドレスが記載されたノードへの参照が記載される。レジスタ情報には、レジスタアドレスや、レジスタを特定する文字列も含まれる。 In the DeviceXML file 31c, all the setting items held inside the camera 31 and the register address (register information) in which the setting value of each setting item is stored are described in association with each other. The setting item is called a feature, and a character string for specifying an individual feature is assigned to each feature. The node of each feature is described with a reference to the node in which the specific register address is described. The register information also includes the register address and a character string that identifies the register.

DeviceXMLファイル31cにおいて、たとえば、「ExposureTime」(露光時間設定)という名称のFeatureがあり、その属性が「ExposureTimeReg」というレジスタアドレスを参照するように指示されており、具体的なアドレスとして、ある値が記載されていたとする。カメラ31が異なれば、アドレスが異なる値になることがあるが、「ExposureTime」というFeatureの名称については共通である。このように、多くのカメラ31で共通した設定項目として存在するものを統一した名称で管理することで、画像検査アプリケーション40においてはカメラ31の機種の違いやメーカーの違いを意識することなく、カメラ31を設定、制御することが可能になる。 In the DeviceXML file 31c, for example, there is a Shutter named "ExposureTime" (exposure time setting), and its attribute is instructed to refer to the register address "ExposureTimeReg", and a certain value is specified as a specific address. It is assumed that it was described. If the cameras 31 are different, the addresses may have different values, but the name of the feature called "ExposureTime" is common. In this way, by managing the setting items that exist as common setting items in many cameras 31 with a unified name, the image inspection application 40 does not need to be aware of the difference in the model of the camera 31 or the difference in the manufacturer. 31 can be set and controlled.

上述したように、GenApi41aの階層では、DeviceXMLファイル31cの記載内容を解析することで、上位の階層である画像検査アプリケーション40から引数として渡されたFeature文字列をレジスタのアドレスに変換する。たとえば、「ExposureTime」というFeatureに対応したレジスタにある値(値:100.5)を書き込む場合、WriteRegister(アドレスの値,100.5)といったように、アドレスの値と、書き込む値との2つを引数とした関数を実行することで、GigE Vision規格3AまたはUSB3Vision規格3Bなど、物理通信規格を経由してカメラ31のレジスタの値を設定することができる。 As described above, in the layer of GenApi41a, by analyzing the description contents of the DeviceXML file 31c, the Feature character string passed as an argument from the image inspection application 40, which is a higher layer, is converted into the address of the register. For example, when writing a value (value: 100.5) in a register corresponding to a feature called "ExposureTime", there are two values, an address value and a write value, such as WriteRegister (address value, 100.5). By executing the function with the argument of, the value of the register of the camera 31 can be set via the physical communication standard such as GigE Vision standard 3A or USB3Vision standard 3B.

尚、DeviceXMLファイル31cには、各メーカーで共通のFeatureとして盛り込むべきものが規定されているが、それ以外にベンダー独自のFeatureを定義することも可能である。独自性の高い機能を有しているカメラ31の場合、専用のFeatureを通じてカメラ31にアクセスすることで、汎用的なカメラに存在しない特殊な機能を利用することも可能である。 In addition, although the DeviceXML file 31c defines what should be included as a common feature for each manufacturer, it is also possible to define a vendor's own feature. In the case of the camera 31 having a highly original function, it is possible to use a special function that does not exist in a general-purpose camera by accessing the camera 31 through a dedicated feature.

(撮像部3の内部処理ユニット)
図8は、撮像部3の内部処理の一例を概念的に示すフローチャートである。このフローチャートにおいて、位置補正1のグループは、当該グループに内包されるパターンサーチのユニットと位置補正のユニットとからなるように記載されているが、位置補正2〜5のグループは記載されていない。これは、図を簡略化するため、位置補正2〜5のグループを折り畳んであることによる。
(Internal processing unit of image pickup unit 3)
FIG. 8 is a flowchart conceptually showing an example of the internal processing of the image pickup unit 3. In this flowchart, the group of the position correction 1 is described so as to be composed of the pattern search unit included in the group and the position correction unit, but the group of the position corrections 2 to 5 is not described. This is because the groups of position corrections 2 to 5 are folded to simplify the figure.

このフローチャートに示すように、複数のユニットの組み合わせで構成されている。ユニットは、撮像や画像処理を制御する単位であり、ユニットをフローチャート上で組み合わせることで、撮像部3に所望の動作を実現させることができる。図8に示すフローチャートでは、ユニットを1つのステップとして記載している。 As shown in this flowchart, it is composed of a combination of a plurality of units. The unit is a unit for controlling image pickup and image processing, and by combining the units on a flowchart, the image pickup unit 3 can realize a desired operation. In the flowchart shown in FIG. 8, the unit is described as one step.

たとえば、ユーザの設定により、ある処理を行う機能を有効にした場合、その機能に対応したユニットを追加することで、処理を実行可能にすることができる。ユニットは、処理を実行するためのプログラムと、処理を実行するために必要なパラメータや、処理結果のデータを格納する記憶領域を一つにまとめたものと定義することができる。各処理は、図1に示す撮像制御部33で行うことができ、また、記憶領域は、撮像制御部33の記憶装置に確保することができる。尚、ユニットの概念自体は、GenICam規格に対応したカメラ31の外部仕様を実現する際に必須なものではない。 For example, if a function to perform a certain process is enabled by the user's setting, the process can be executed by adding a unit corresponding to the function. A unit can be defined as a set of a program for executing a process, parameters required for executing the process, and a storage area for storing the data of the process result. Each process can be performed by the image pickup control unit 33 shown in FIG. 1, and the storage area can be secured in the storage device of the image pickup control unit 33. The concept of the unit itself is not indispensable for realizing the external specifications of the camera 31 corresponding to the GenICam standard.

図8に示すフローチャートは、複数のユニットを縦方向及び横方向にフローチャート形式で並べたものであり、単にフローと呼ぶこともできる。複数のユニットを縦方向にのみ並べたフローチャートであってもよい。図8に示すフローチャートのスタートからエンドに向かって順に処理を実行していくが、途中に分岐ステップSB1を設けることで、分岐させることもできる。分岐した場合には、エンドまでの間に合流ステップSB2を設けることができ、これにより、合流させてからエンドに進むことができる。 The flowchart shown in FIG. 8 is a flow chart in which a plurality of units are arranged vertically and horizontally, and may be simply called a flow. It may be a flowchart in which a plurality of units are arranged only in the vertical direction. The processing is executed in order from the start to the end of the flowchart shown in FIG. 8, but it is also possible to branch by providing the branch step SB1 in the middle. In the case of branching, a merging step SB2 can be provided before the end, whereby the merging step SB2 can be provided before proceeding to the end.

(パラメータセット)
画像検査アプリケーション40を実際の検査環境において動作させる場合、ワークWが切り替わったり、明るさなど、周囲の環境の変化を検知した場合には、撮像部3の設定パラメータを動的に変更することがある。露光時間など、ごく限られたパラメータのみ変更する場合は、画像検査アプリケーション40から、それに対応したFeatureの値を直接書き込むことで対応することもできる。
(Parameter set)
When the image inspection application 40 is operated in an actual inspection environment, the setting parameters of the image pickup unit 3 may be dynamically changed when the work W is switched or a change in the surrounding environment such as brightness is detected. be. When changing only a very limited parameter such as an exposure time, it can be dealt with by directly writing the corresponding Faceure value from the image inspection application 40.

一方で、高機能な撮像部3の場合、設定可能な項目の数が増え、ワークWの切り替え時などに、一度に変更すべきパラメータの数も多くなる。この場合、設定変更に要する時間が、パラメータの数に相関して長くなっていく。実際の画像検査ラインにおいては、ワークWが切り替わり、新しいワークWが撮像部3の撮像視野範囲に到達してから当該視野範囲を外れるまでの時間が短いことが多く、一連の設定変更を高速に行いたいケースが出てくる。このようなときに、パラメータセットと呼ばれる機能を使用することがある。 On the other hand, in the case of the high-performance image pickup unit 3, the number of items that can be set increases, and the number of parameters that should be changed at one time also increases when the work W is switched. In this case, the time required to change the setting increases in correlation with the number of parameters. In an actual image inspection line, it is often the case that the work W is switched and the time from when the new work W reaches the imaging field of view of the image pickup unit 3 to when it goes out of the field of view is short, and a series of setting changes can be performed at high speed. There will be cases you want to do. At such times, a function called a parameter set may be used.

パラメータセットは、撮像部3で撮像する際の各種パラメータの組合せを事前に複数パターン保有しておき、それぞれのパターンをパラメータセット番号によって管理できるようにしたものである。例えば、ワークWの品種が3種類あり、それぞれに異なるパラメータで撮像とその後の処理を行いたい場合、パラメータセットを3個用意しておく。 The parameter set holds a plurality of patterns of combinations of various parameters for imaging by the imaging unit 3 in advance so that each pattern can be managed by the parameter set number. For example, if there are three types of work W and you want to perform imaging and subsequent processing with different parameters for each, prepare three parameter sets.

パラメータセットを利用すると、ワークWの撮像を行う前に、次に撮像するワークWの品種に対応したパラメータセット番号を指定するだけで、一連の設定変更を短時間で完了させることができる。画像検査アプリケーション40から見た場合、パラメータセット番号を指定するFeatureは、後述するセレクタの一種と考えることができる。 By using the parameter set, a series of setting changes can be completed in a short time only by specifying the parameter set number corresponding to the type of the work W to be imaged next before the image of the work W is performed. From the viewpoint of the image inspection application 40, the feature that specifies the parameter set number can be considered as a kind of selector described later.

画像検査アプリケーション40側から設定する対象を切り替えるセレクタと、動作時に撮像部3が内部的に参照するパラメータを切り替えるレジスタは、独立させることも、同一にすることも可能である。設定できるパラメータセットの数の上限は、撮像部3の内部に設けられた内部メモリのパラメータ保持空間に限定される。 The selector that switches the target to be set from the image inspection application 40 side and the register that switches the parameter that the image pickup unit 3 internally refers to during operation can be independent or the same. The upper limit of the number of parameter sets that can be set is limited to the parameter holding space of the internal memory provided inside the image pickup unit 3.

パラメータセットの概念は、フィルター処理機能を保有した撮像部3に展開することも可能である。たとえば、パラメータセットIndexが1の時は2値化フィルターを実行し、パラメータセットIndexが2の時は膨張フィルターを実行し、パラメータセットIndexが3の時はフィルターを非実行とするように、パラメータセットIndexに対応したパラメータを設定していたとする。このようにすることで、撮像と、フィルター処理として実行する内容を、パラメータセットIndexにより動的に切り替えることができる。 The concept of the parameter set can also be expanded to the imaging unit 3 having a filtering function. For example, when the parameter set Index is 1, the binarization filter is executed, when the parameter set Index is 2, the expansion filter is executed, and when the parameter set Index is 3, the filter is not executed. It is assumed that the parameters corresponding to the set Index have been set. By doing so, it is possible to dynamically switch between imaging and the content to be executed as the filtering process by the parameter set Index.

GenICam規格では、撮像パラメータを動的に切り替える機能をサポートしている。撮像部3は、GenICam規格に則り、全ての設定パラメータをFeatureによってアクセスできるようにしている。撮像機能としては、照明装置2と撮像部3とを同期させて複数パターンで撮像した画像を専用のアルゴリズムによって合成する機能(上述したデフレクトメトリの原理を利用した検査画像の生成)、波長が異なる光を照射して複数の画像を取得するマルチスペクトルイメージング機能など、複数の照明−撮像制御モードを有している。これらは、上記のパラメータセットごとに設定可能であり、条件に応じて動的に切り替えながら、撮像処理、フィルター処理、合成処理、画像出力を実行することが可能である。撮像機能によって生成される画像には、照明の点灯パターンを切り替えながら、イメージセンサで取得した画像そのものであってもよいし、上述した専用アルゴリズムによって合成された複数の画像が含まれていてもよい。 The GenICam standard supports the function of dynamically switching imaging parameters. The image pickup unit 3 makes it possible to access all the setting parameters by Featur according to the GenICam standard. The image pickup function includes a function of synchronizing the lighting device 2 and the image pickup unit 3 and synthesizing images captured in a plurality of patterns by a dedicated algorithm (generation of an inspection image using the above-mentioned principle of deflectometry), and a wavelength. It has multiple illumination-imaging control modes, such as a multispectral imaging function that irradiates different lights to acquire multiple images. These can be set for each of the above parameter sets, and it is possible to execute image processing, filter processing, composition processing, and image output while dynamically switching according to conditions. The image generated by the image pickup function may be the image itself acquired by the image sensor while switching the lighting pattern of the illumination, or may include a plurality of images synthesized by the above-mentioned dedicated algorithm. ..

フィルター処理は、同一パラメータセット内に、複数のパターンを設定することが可能である。例えば、上述の撮像機能では、一連の撮像実行により、複数パターンの画像が生成されることになるが、そこで生成された異なる複数の画像に対して、個別にフィルター処理を施すことが可能である。また、別のパターンでは、同一の画像に対して、特定の領域の範囲(ROI:Region Of Interest)を設定した上で、それぞれの領域内部のみをフィルター処理することも可能である。特定の領域の範囲の設定は、たとえばキーボード6やマウス7の操作によって行うことができる。特定の領域は、1つであってもよいし、複数であってもよい。特定の領域の大きさは任意に設定することができる。 In the filtering process, it is possible to set a plurality of patterns in the same parameter set. For example, in the above-mentioned imaging function, a plurality of patterns of images are generated by executing a series of imaging, and it is possible to individually filter a plurality of different images generated there. .. Further, in another pattern, it is also possible to set a range (ROI: Region Of Interest) of a specific region for the same image and then filter only the inside of each region. The range of a specific area can be set by, for example, operating the keyboard 6 or the mouse 7. The specific area may be one or a plurality. The size of a specific area can be set arbitrarily.

フィルター処理は、同一の画像に対して複数種類を多段階に繰り返し設定することができる多段階フィルターであってもよい。たとえば、ある画像に対して膨張フィルター処理を実行した後、その画像に対して2値化フィルター処理を実行することができる。フィルター処理は多段階フィルターに限られるものではなく、1つのフィルター処理であってもよい。 The filter processing may be a multi-step filter in which a plurality of types can be repeatedly set in multiple steps for the same image. For example, after performing expansion filtering on a certain image, binarization filtering can be performed on that image. The filtering process is not limited to the multi-step filter process, and may be a single filter process.

GenICam規格の撮像パラメータを動的に切り替える機能を利用し、図8に示すように複数のパラメータセットを1つのフローチャートにまとめることができる。撮像部3の内部処理フローチャート上で、分岐ステップSB1から合流ステップSB2までの間のフローチャートを形成するユニット群をまとめてパラメータセットと呼ぶ。図8に示す例では、4つのパラメータセット、即ち、第1〜第4パラメータセットを有している。つまり、ユーザにより設定された処理を実現するための複数のセレクタの値の組み合わせが複数パターン存在している。第1〜第4パラメータセットのいずれを選択するかは、ユーザが設定することができ、たとえば、パラメータセット番号1を選択すると第1パラメータセットが自動的に選択される。 By using the function of dynamically switching the imaging parameters of the GenICam standard, it is possible to combine a plurality of parameter sets into one flowchart as shown in FIG. On the internal processing flowchart of the image pickup unit 3, the unit group forming the flowchart from the branch step SB1 to the merging step SB2 is collectively called a parameter set. The example shown in FIG. 8 has four parameter sets, that is, first to fourth parameter sets. That is, there are a plurality of patterns of combinations of values of a plurality of selectors for realizing the process set by the user. The user can set which of the first to fourth parameter sets is selected. For example, when the parameter set number 1 is selected, the first parameter set is automatically selected.

図8に示すフローチャートのスタート後、分岐ステップSB1において第1〜第4パラメータセットのいずれかのパラメータセットを構成する各ユニットを経た後、合流ステップSB2で合流し、エンドに進むことができる。パラメータセット番号1が選択されていると、分岐ステップSB1において分岐番号が1になり、第1パラメータセットの各処理を実行する。パラメータセット番号2が選択されていると、分岐ステップSB1において分岐番号が2になり、第2パラメータセットの各処理を実行する。パラメータセット番号3が選択されていると、分岐ステップSB1において分岐番号が3になり、第3パラメータセットの各処理を実行する。パラメータセット番号4が選択されていると、分岐ステップSB1において分岐番号が4になり、第4パラメータセットの各処理を実行する。パラメータセットの数は4つに限られるものではなく、任意に設定することができる。 After the start of the flowchart shown in FIG. 8, in the branching step SB1, after passing through each unit constituting any of the first to fourth parameter sets, they can be merged in the merging step SB2 and proceed to the end. When the parameter set number 1 is selected, the branch number becomes 1 in the branch step SB1, and each process of the first parameter set is executed. When the parameter set number 2 is selected, the branch number becomes 2 in the branch step SB1, and each process of the second parameter set is executed. When the parameter set number 3 is selected, the branch number becomes 3 in the branch step SB1, and each process of the third parameter set is executed. When the parameter set number 4 is selected, the branch number becomes 4 in the branch step SB1, and each process of the fourth parameter set is executed. The number of parameter sets is not limited to four and can be set arbitrarily.

パラメータセットの具体例を図9及び図10に示す。図9は、デフレクトメトリの原理を利用した検査画像の生成を行う場合のパラメータセットである。ユニットUA1では、デフレクトメトリの原理を利用した検査画像の生成を行うべく、1回のトリガ信号で複数の撮像処理を実行し、ユニットUA2では膨張フィルター処理を実行し、ユニットUA3では平均化フィルター処理を実行し、ユニットUA4では濃淡反転処理を実行する。つまり、ユニットUA1で撮像された撮像画像に対して、フィルター処理を含むパラメータセットで定義された多段階の処理が逐次的に実行される。その後、ユニットUA5では、多段階の処理が逐次的に実行された画像データをPCへ転送、即ち外部機器である設定装置4等へ出力する。尚、画像データを転送することなく、内部に保持しておいてもよい。パラメータセットによっては、多段階の処理を行わないように設定することもできる。設定装置4に転送された場合、図7に示す画像検査アプリケーション40の検査部4Aにおいて欠陥検査、良否判定を行うことができる。欠陥検査及び良否判定のアルゴリズムは従来から周知のものを使用することができる。 Specific examples of the parameter set are shown in FIGS. 9 and 10. FIG. 9 is a parameter set for generating an inspection image using the principle of deflectometry. The unit UA1 executes a plurality of imaging processes with one trigger signal in order to generate an inspection image using the principle of deflection metric, the unit UA2 executes an expansion filter process, and the unit UA3 performs an averaging filter. The processing is executed, and the unit UA4 executes the shading inversion processing. That is, the multi-step processing defined by the parameter set including the filter processing is sequentially executed for the captured image captured by the unit UA1. After that, the unit UA5 transfers the image data in which the multi-step processing is sequentially executed to the PC, that is, outputs the image data to the setting device 4 or the like which is an external device. The image data may be retained internally without being transferred. Depending on the parameter set, it is possible to set not to perform multi-step processing. When transferred to the setting device 4, the inspection unit 4A of the image inspection application 40 shown in FIG. 7 can perform defect inspection and pass / fail determination. Conventionally known algorithms for defect inspection and pass / fail determination can be used.

一方、図10は、マルチスペクトルイメージングにより検査画像の生成を行う場合のパラメータセットである。ユニットUB1ではマルチスペクトルイメージングにより検査画像の生成を行うべく、1回のトリガ信号で複数の撮像処理を実行し、ユニットUB2では、ある領域(領域0)に対して二値化フィルター処理を実行し、ユニットUB3では、領域0とは別の領域(領域1)に対して膨張フィルター処理を実行する。つまり、この例でも、ユニットUB1で撮像された撮像画像に対して、フィルター処理を含むパラメータセットで定義された多段階の処理が逐次的に実行される。その後、ユニットUB4では処理を非実行とする。ユニットUB5では図9に示す場合と同様に画像データをPCへ転送する。この例のように、パラメータセット内には処理を行わないユニット、即ち無効化されたユニットが存在していてもよく、有効化されたユニットと無効化されたユニットとが混在したパラメータセットであってもよい。 On the other hand, FIG. 10 is a parameter set when an inspection image is generated by multispectral imaging. The unit UB1 executes a plurality of imaging processes with one trigger signal in order to generate an inspection image by multispectral imaging, and the unit UB2 executes a binarization filter process for a certain region (region 0). In the unit UB3, the expansion filter processing is executed for the region (region 1) different from the region 0. That is, also in this example, the multi-step processing defined by the parameter set including the filter processing is sequentially executed for the captured image captured by the unit UB1. After that, the unit UB4 does not execute the process. The unit UB5 transfers the image data to the PC in the same manner as shown in FIG. As in this example, there may be units that are not processed, that is, disabled units, in the parameter set, and it is a parameter set in which enabled units and disabled units are mixed. You may.

(移動体追従)
フォトメトリックステレオやマルチスペクトルの原理に基づいて検査用画像を生成する場合は、1回のトリガ信号で複数の撮像処理を実行し、得られた複数の画像を合成することになる。この場合、複数の撮像処理の間でワークWが移動していると、撮像後の合成処理が正しく行えないので、画像ごとのずれ量を検知する必要がある。このずれ量検知のためのサーチをサーチユニットで行うことができ、検知したずれ量に基づいてずれ量の補正を行ってから複数の画像の合成処理を実行する。
(Following moving objects)
When generating an inspection image based on the principle of photometric stereo or multispectral, a plurality of imaging processes are executed with one trigger signal, and the obtained plurality of images are combined. In this case, if the work W is moved between a plurality of imaging processes, the compositing process after imaging cannot be performed correctly, so it is necessary to detect the amount of deviation for each image. A search for detecting the amount of deviation can be performed by the search unit, and the amount of deviation is corrected based on the detected amount of deviation, and then a combination process of a plurality of images is executed.

合成処理は、画像演算ユニットで行うことができる。複数の撮像画像を合成するための合成設定が設定項目としてDeviceXMLファイルに含まれている。したがって、撮像部3が撮像した撮像画像を外部に出力する前に、当該撮像画像に対して適用される処理に関する設定項目として、複数の撮像画像を合成する合成設定がDeviceXMLファイルには含まれることになる。 The compositing process can be performed by the image calculation unit. A composite setting for synthesizing a plurality of captured images is included in the DeviceXML file as a setting item. Therefore, before outputting the captured image captured by the imaging unit 3 to the outside, the deviceXML file includes a composition setting for synthesizing a plurality of captured images as a setting item related to the processing applied to the captured image. become.

(ユニットの種類)
ユニットには複数の種類があり、たとえば、検査領域を決定するパターンサーチ処理を行うパターンサーチユニット、位置補正ユニット、内部で画像の位置補正や色抽出、フィルター処理などを行う画像演算ユニット、あるいは、これらの比較的単純な処理を行うユニットを複合させて高機能化させたものなどがある。各ユニットは、撮像部3が撮像した撮像画像を外部に出力する前に、当該撮像画像に対して適用される処理を実行するためのユニットである。
(Unit type)
There are multiple types of units, for example, a pattern search unit that performs pattern search processing to determine the inspection area, a position correction unit, an image calculation unit that internally performs image position correction, color extraction, filtering, etc., or Some of these units that perform relatively simple processing are combined to enhance their functionality. Each unit is a unit for executing a process applied to the captured image before outputting the captured image captured by the imaging unit 3 to the outside.

パターンサーチユニットは、撮像部3が撮像したワークWを含む画像のなかから、当該ワークWや、ワークWにおける検査対象部分をサーチし、撮像画像中のワークWの位置補正を行うためのユニットである。たとえば、画像検査システム1の設定時に、ワークWを撮像した画像上で、周知のエッジ検出手法によってエッジ検出を行い、検出したエッジにより特定される領域をワークW、またはワークWの検査対象部分のモデル(サーチ用モデル画像)として撮像部3の記憶装置に記憶させておくことができる。エッジ検出処理自体は従来から周知の手法を用いることができ、例えば、輝度画像上の各画素の画素値を取得し、輝度画像上の画素値の変化がエッジ検出用のしきい値以上となる領域が存在する場合に、その境界部分がエッジであるとして抽出する。エッジ抽出の閾値はユーザが任意に調整することができる。 The pattern search unit is a unit for searching the work W and the inspection target portion in the work W from the images including the work W captured by the image pickup unit 3 and correcting the position of the work W in the captured image. be. For example, when the image inspection system 1 is set, edge detection is performed on an image of the work W by a well-known edge detection method, and the area specified by the detected edge is the work W or the inspection target portion of the work W. It can be stored in the storage device of the image pickup unit 3 as a model (search model image). A conventionally well-known method can be used for the edge detection process itself. For example, the pixel value of each pixel on the luminance image is acquired, and the change in the pixel value on the luminance image becomes equal to or greater than the threshold value for edge detection. If the area exists, the boundary part is extracted as an edge. The threshold value of edge extraction can be arbitrarily adjusted by the user.

画像検査システム1の設定後、画像検査システム1の運用時には、順次搬送されてくるワークWを撮像して検査用画像を得て、パターンサーチユニットが、得られた検査用画像上でワークWまたはワークWの検査対象部分の有無を、上記記憶されているモデルに基づいてサーチ処理を行うとともに、サーチ処理によってワークWの位置と角度を計測する。ワークWの位置はX座標及びY座標で特定することができる。また、ワークWの角度は、撮像部3の撮像軸回りの角度とすることや、図1に示すZ軸周りの角度とすることができる。 After setting the image inspection system 1, when the image inspection system 1 is in operation, the work W that is sequentially conveyed is imaged to obtain an inspection image, and the pattern search unit can perform the work W or the work W on the obtained inspection image. The presence or absence of the inspection target portion of the work W is searched based on the stored model, and the position and angle of the work W are measured by the search process. The position of the work W can be specified by the X coordinate and the Y coordinate. Further, the angle of the work W can be an angle around the image pickup axis of the image pickup unit 3 or an angle around the Z axis shown in FIG.

位置補正ユニットは、撮像部3が撮像したワークWを含む画像のなかから、当該ワークWや、ワークWにおける検査対象部分をパターンサーチユニットでサーチし、ワークWの位置と角度を計測した後に、画像中のワークWの位置補正を行うためのユニットである。画像検査システム1の運用時には、複数のワークWが常に同じ位置及び姿勢で搬送されてくるとは限らず、様々な位置にあるワークWや様々な姿勢のワークWが搬送されてくることがある。パターンサーチユニットでワークWの基準となる部分をサーチしてから位置補正ユニットで位置補正することができるので、ワークWの基準となる部分が、常に一定の位置となり、かつ、ワークWが所定の姿勢となるように、画像を回転させたり、画像を縦方向や横方向に移動させることにより、位置補正を行う。位置補正を行うための位置補正ツールは、たとえばパターンサーチ等、複数の種類のツールを用意しておくことができる。 The position correction unit searches the image including the work W captured by the image pickup unit 3 with the pattern search unit for the work W and the inspection target portion in the work W, measures the position and angle of the work W, and then measures the position and angle of the work W. This is a unit for correcting the position of the work W in the image. When operating the image inspection system 1, a plurality of work Ws are not always transported in the same position and posture, and work Ws in various positions and work Ws in various postures may be transported. .. Since the pattern search unit can search for the reference part of the work W and then the position correction unit can correct the position, the reference part of the work W is always at a constant position and the work W is a predetermined position. Position correction is performed by rotating the image or moving the image in the vertical or horizontal direction so that it is in the posture. As a position correction tool for performing position correction, a plurality of types of tools such as a pattern search can be prepared.

画像演算ユニットは、複数の種類があり、たとえば、フィルター処理を行うユニット、撮像部3で撮像された複数の画像を合成する合成処理を行うユニット、デフレクトメトリ処理を行うユニット、フォトメトリックステレオ法を利用して検査用画像を生成するユニット、マルチスペクトルイメージングを行うユニット等がある。フィルター処理の種類は複数あるので、フィルター処理を行うユニットは、たとえば二値化フィルター、膨張フィルター等、複数の種類設けることができる。デフレクトメトリ処理による検査画像の生成は、上述したように複数の処理を経るので、処理毎にユニットを設けてもよく、正反射成分画像を生成するユニット、拡散反射成分画像を生成するユニット、参照位相差分画像を生成するユニット等を設けることができる。 There are a plurality of types of image calculation units, for example, a unit that performs filter processing, a unit that performs synthesis processing that synthesizes a plurality of images captured by the image pickup unit 3, a unit that performs deflection metering processing, and a photometric stereo method. There are units that generate inspection images, units that perform multispectral imaging, and the like. Since there are a plurality of types of filtering, a plurality of types of units for performing filtering can be provided, for example, a binarization filter and an expansion filter. Since the generation of the inspection image by the deflection metering process undergoes a plurality of processes as described above, a unit may be provided for each process, a unit for generating a specular reflection component image, a unit for generating a diffuse reflection component image, and a unit for generating a diffuse reflection component image. A unit or the like for generating a reference phase difference image can be provided.

(設定装置4の構成)
設定装置4は、ユーザにより設定された各設定項目の設定値と、DeviceXMLファイル31cに含まれる各設定項目に対応するレジスタ情報を示すデータを撮像部3に送信し、当該撮像部3の設定を行うための装置である。
(Configuration of setting device 4)
The setting device 4 transmits the setting value of each setting item set by the user and the data indicating the register information corresponding to each setting item included in the DeviceXML file 31c to the image pickup unit 3, and sets the image pickup unit 3. It is a device to do.

図7に示すように、設定装置4は、UI生成部4aを備えている。UI生成部4aは、各種ユーザーインターフェース画像を生成する部分である。UI生成部4aで生成された各種ユーザーインターフェース画像は表示部5に表示される。 As shown in FIG. 7, the setting device 4 includes a UI generation unit 4a. The UI generation unit 4a is a part that generates various user interface images. Various user interface images generated by the UI generation unit 4a are displayed on the display unit 5.

ユーザーインターフェース画像上で、編集対象の画像を切り替えることや、設定項目の表示及び変更を行うこと、編集対象である画像を表示することができる。設定項目としては、例えば、位置補正設定やフィルター処理設定等があり、位置補正設定に対応するFeatureとして、位置補正を有効にするか否かの選択を行う部分と、位置補正ツールの種別選択を行う部分とが割り当てられる。また、フィルター処理設定に対応するFeatureとして、選択されたフィルターの種類と、抽出サイズや抽出色といったフィルターの設定に関するパラメータを選択、調整する部分とが割り当てられる。 On the user interface image, it is possible to switch the image to be edited, display and change the setting items, and display the image to be edited. The setting items include, for example, position correction setting and filter processing setting, and as a feature corresponding to the position correction setting, a part for selecting whether to enable position correction and a type selection of the position correction tool are selected. The part to do is assigned. Further, as a feature corresponding to the filter processing setting, a selected filter type and a portion for selecting and adjusting parameters related to the filter setting such as the extraction size and the extraction color are assigned.

例えば、ユーザが任意の画像を選択すると、内部的には、その画像を生成するために使用する前処理モジュールに対応したインデックスの値に、設定対象を指定するセレクタの値が切り替わり、これにより、設定可能な内容が画像に応じて切り替わる。設定対象を指定するセレクタの値が指定されると、その値に対応したセレクタが指し示す前処理モジュールの一つ又は複数のFeatureを読み取り、設定項目を反映した画像を生成して表示させるとともに、位置補正やフィルター設定としてそれぞれのパラメータ値を表示する。位置補正やフィルター設定のパラメータ値をユーザが操作すると、その操作が受け付けられて、設定対象を指定するセレクタの値に対応した前処理モジュールに該当するユニットの設定項目が変更される。 For example, when the user selects an arbitrary image, internally, the value of the selector that specifies the setting target is switched to the index value corresponding to the preprocessing module used to generate that image, thereby. The contents that can be set are switched according to the image. When the value of the selector that specifies the setting target is specified, the feature of one or more preprocessing modules pointed to by the selector corresponding to that value is read, an image that reflects the setting item is generated and displayed, and the position is displayed. Display each parameter value as a correction or filter setting. When the user operates the parameter value of the position correction or filter setting, the operation is accepted and the setting item of the unit corresponding to the preprocessing module corresponding to the value of the selector that specifies the setting target is changed.

セレクタの値からアクセス対象のユニットを特定する方法は、以下の方法を使用することができる。すなわち、前処理モジュールは複数のユニットから構成されており、前処理モジュールのインデックスを切り替えるセレクタは、これらユニットで共通したものを使用することができ、前処理モジュールを構成する複数のユニットに対して、どのFeatureがどのユニットに属するかは、Feature名称によって一意に定まるように命名することが可能である。これにより、セレクタの値と、編集対象として選択されているFeatureの組合せからアクセス対象のユニットを特定することができる。 The following method can be used to specify the unit to be accessed from the value of the selector. That is, the preprocessing module is composed of a plurality of units, and the selector for switching the index of the preprocessing module can be the one common to these units, and for the plurality of units constituting the preprocessing module. , Which feature belongs to which unit can be named so as to be uniquely determined by the feature name. As a result, the unit to be accessed can be specified from the combination of the value of the selector and the feature selected as the editing target.

したがって、ユーザが撮像部3の設定項目に対して設定値の変更を行うと、ユーザにより設定された各設定項目の設定値と、DeviceXMLファイルに含まれる各設定項目に対応するレジスタ情報を示すデータが撮像部3に送信されて、撮像部3の設定を行うことができるので、標準化規格に適合した撮像部3であれば設定装置4側から設定値を変更することができ、撮像部3の機種選定の自由度が向上する。 Therefore, when the user changes the setting value for the setting item of the imaging unit 3, the data indicating the setting value of each setting item set by the user and the register information corresponding to each setting item included in the DeviceXML file. Is transmitted to the image pickup unit 3 to set the image pickup unit 3. Therefore, if the image pickup unit 3 conforms to the standardization standard, the set value can be changed from the setting device 4 side, and the image pickup unit 3 can change the set value. The degree of freedom in model selection is improved.

また、セレクタの値の組合せによって、逐次的に実行される多段階の処理の一部を一意に特定することができるので、標準化規格に適合した撮像部3で、例えば、フォトメトリックステレオやデフレクトメトリの原理を利用した検査画像の生成、マルチスペクトルイメージング、生成後の検査画像にフィルター処理を施すといった複数段階の処理が行えるようになる。 Further, since a part of the multi-step processing executed sequentially can be uniquely specified by the combination of the values of the selectors, the image pickup unit 3 conforming to the standardization standard can be used, for example, photometric stereo or deflect. It will be possible to perform multi-step processing such as generation of inspection images using the principle of metric, multispectral imaging, and filtering of the inspection images after generation.

(検査設定部400の具体的構成例)
以下に設定装置4の具体的構成例について説明する。図7に示すように、設定装置4は検査設定部400を備えている。検査設定部400は、設定装置4にてユーザ操作に基づく各種検査設定を行う部分であり、図11に示すように、オブジェクト生成手段401と、表示手段402と、姿勢調整手段403と、領域指定受付手段404と、要素生成手段405と、領域設定手段406とを備えている。検査設定部400は、設定装置4にインストールされたプログラムを実行することで設定装置4に構築され、当該プログラムを設定装置4上で実行することにより、図示するように各手段401〜406が機能する。図11では、便宜上、手段401〜406を分けて記載しているが、1つの手段が複数の機能を有していてもよく、図11は概念的なものである。また、各手段401〜406の一部がハードウェアで構成されていてもよい。
(Specific configuration example of inspection setting unit 400)
A specific configuration example of the setting device 4 will be described below. As shown in FIG. 7, the setting device 4 includes an inspection setting unit 400. The inspection setting unit 400 is a part for performing various inspection settings based on user operations in the setting device 4, and as shown in FIG. 11, the object generation means 401, the display means 402, the posture adjusting means 403, and the area designation. It includes a receiving means 404, an element generating means 405, and an area setting means 406. The inspection setting unit 400 is constructed in the setting device 4 by executing the program installed in the setting device 4, and by executing the program on the setting device 4, each means 401 to 406 functions as shown in the figure. do. In FIG. 11, the means 401 to 406 are described separately for convenience, but one means may have a plurality of functions, and FIG. 11 is conceptual. Further, a part of each means 401 to 406 may be configured by hardware.

(オブジェクト生成手段401の構成)
オブジェクト生成手段401は、取得部Aにより取得された高さデータに基づいて、ワークWを立体的に表した三次元オブジェクトを生成する手段である。三次元オブジェクトとしては、高さデータを三角形の平面で繋げて表示する三次元ポリゴン表示であってもよいし、各高さデータを1画素ごとに表示した三次元点群(ポイントクラウド)表示でもよい。
(Configuration of object generation means 401)
The object generation means 401 is a means for generating a three-dimensional object that three-dimensionally represents the work W based on the height data acquired by the acquisition unit A. The three-dimensional object may be a three-dimensional polygon display in which height data is connected by a triangular plane, or a three-dimensional point cloud display in which each height data is displayed for each pixel. good.

ここで、2.5D(2.5次元)データについて説明する。一般的に、立体物をモニタ等に表示する際には、3D(三次元)表示が用いられており、この三次元表示ではX,Y,Zの三次元座標を保持してデータを扱っている。これに対し、2.5Dは、3Dの中で、ある程度、2Dに近い制約があり、1画素に1つの高さデータが割り当てられている。2.5Dは、3Dに比べてデータの自由度は低い反面、計測処理が行い易いという特徴があり、本例でも計測処理には2.5Dデータを用いる場合がある。2.5Dでは、カメラから見える部分しか計測しないため、物体の裏側の座標データは存在しないが、上記三次元ポリゴン表示や三次元点群表示等によって立体的な表示可能である。 Here, 2.5D (2.5 dimensional) data will be described. Generally, when displaying a three-dimensional object on a monitor or the like, a 3D (three-dimensional) display is used, and in this three-dimensional display, the three-dimensional coordinates of X, Y, and Z are held and data is handled. There is. On the other hand, 2.5D has some restrictions close to 2D in 3D, and one height data is assigned to one pixel. Although 2.5D has a lower degree of freedom in data than 3D, it has a feature that measurement processing is easy, and even in this example, 2.5D data may be used for measurement processing. In 2.5D, since only the part visible from the camera is measured, the coordinate data on the back side of the object does not exist, but it can be displayed three-dimensionally by the above-mentioned three-dimensional polygon display, three-dimensional point cloud display, or the like.

2Dデータを使用することで、ワークWにおける画像検査の対象となる対象領域(検査領域)について、例えば濃淡検査、パターンサーチ、エッジ抽出、ブロブ、OCR等の計測が可能になる。また、2.5Dデータを使用することで、対象領域について、例えば高さ計測、3Dサーチ、プロファイル計測、3Dブロブ等の計測が可能になる。2Dデータと2.5Dデータとでデータの種別は異なっているが、カメラ31の画素単位でデータを取り扱う点では同じなため、対象領域データ自体は変わらない。 By using the 2D data, it is possible to measure, for example, shading inspection, pattern search, edge extraction, blob, OCR, etc. for the target area (inspection area) to be image-inspected in the work W. Further, by using the 2.5D data, it is possible to measure the target area, for example, height measurement, 3D search, profile measurement, 3D blob, and the like. Although the types of data differ between 2D data and 2.5D data, the target area data itself does not change because the data is handled in pixel units of the camera 31.

2Dデータや2.5Dデータに各種フィルター処理を実行してもよい。例えば、2Dデータに対してぼかし処理を実行したり、2.5Dデータにスムージングを実行したり、2.5Dデータに2D画像変換を実行して2Dデータに変換することもできる。フィルター処理は、実行する計測の種類に応じて変えればよい。 Various filtering processes may be executed on 2D data and 2.5D data. For example, it is possible to perform a blurring process on 2D data, perform smoothing on 2.5D data, or perform 2D image conversion on 2.5D data to convert it into 2D data. The filtering process may be changed according to the type of measurement to be performed.

(表示手段402の構成)
表示手段402は、設定装置4のモニタである表示部5を制御する手段であり、例えばオブジェクト生成手段401により生成された三次元オブジェクトを表示部5に表示させる。また、表示手段402は、後述する要素生成手段405により生成された様々な視点特定要素を、三次元オブジェクト上に重ねて表示部5に表示させることもできる。
(Structure of display means 402)
The display means 402 is a means for controlling the display unit 5 which is a monitor of the setting device 4, and causes the display unit 5 to display, for example, a three-dimensional object generated by the object generation means 401. Further, the display means 402 can also display various viewpoint-specific elements generated by the element generation means 405, which will be described later, on the three-dimensional object by superimposing them on the display unit 5.

(姿勢調整手段403の構成)
姿勢調整手段403は、表示手段402により表示部5に表示された三次元オブジェクトの姿勢を調整するための手段である。三次元オブジェクトの姿勢は、当該三次元オブジェクトをX軸、Y軸、Z軸の各軸周りに回転させたり、X方向、Y方向、Z方向の任意の方向へ移動させることによって調整できる。
(Structure of posture adjusting means 403)
The posture adjusting means 403 is a means for adjusting the posture of the three-dimensional object displayed on the display unit 5 by the display means 402. The posture of the three-dimensional object can be adjusted by rotating the three-dimensional object around each of the X-axis, Y-axis, and Z-axis, or by moving the three-dimensional object in any direction of the X-direction, Y-direction, and Z-direction.

具体的には、姿勢調整手段403は、例えば、キーボード6やマウス7の操作状態を検出することが可能になっており、表示部5に表示された三次元オブジェクト上でマウス7をクリック操作、ドラッグ操作等すると、三次元オブジェクトをX軸、Y軸、Z軸の任意の軸周りに、任意の角度だけ回転させることができる。また、三次元オブジェクト上のマウス7の操作により、三次元オブジェクトをX方向、Y方向、Z方向の任意の方向に、任意の移動量だけ移動させることができる。 Specifically, the posture adjusting means 403 can detect, for example, the operating state of the keyboard 6 and the mouse 7, and clicks the mouse 7 on the three-dimensional object displayed on the display unit 5. By dragging or the like, the three-dimensional object can be rotated by an arbitrary angle around an arbitrary axis of the X axis, the Y axis, and the Z axis. Further, by operating the mouse 7 on the three-dimensional object, the three-dimensional object can be moved in any direction in the X direction, the Y direction, and the Z direction by an arbitrary amount of movement.

また、キーボード6やマウス7の操作により、三次元オブジェクトの各軸周りの回転角度を数値で設定したり、任意の方向への移動量を数値で設定することもできる。設定された数値は姿勢調整手段403で受け付けられる。姿勢調整手段403は、受け付けた数値に対応するように三次元オブジェクトを回転させたり、移動させることにより、三次元オブジェクトの姿勢を調整する。上述した三次元オブジェクトの姿勢調整方法は、例であり、他の方法によって三次元オブジェクトの姿勢を調整してもよい。 Further, by operating the keyboard 6 and the mouse 7, the rotation angle around each axis of the three-dimensional object can be set numerically, and the amount of movement in an arbitrary direction can be set numerically. The set numerical value is accepted by the posture adjusting means 403. The posture adjusting means 403 adjusts the posture of the three-dimensional object by rotating or moving the three-dimensional object so as to correspond to the received numerical value. The above-mentioned method for adjusting the posture of the three-dimensional object is an example, and the posture of the three-dimensional object may be adjusted by another method.

三次元オブジェクトの姿勢を調整することで、ユーザは三次元オブジェクトを所望の方向から見た状態で表示部5に表示させることができる。これにより、後述の対象領域の指定操作が容易になる。 By adjusting the posture of the three-dimensional object, the user can display the three-dimensional object on the display unit 5 in a state of being viewed from a desired direction. This facilitates the operation of designating the target area, which will be described later.

(設定時における対象領域の指定)
領域指定受付手段404は、姿勢調整手段403により姿勢が調整された三次元オブジェクト上で、画像検査の対象となる対象領域の指定を受け付けるための手段である。対象領域は、後述するようにユーザの操作によって作成されるものであり、例えば線状の領域や図形で囲んだ領域等があり、ある範囲を持った領域であれば、その形状や大きさは自由である。線状の領域は、直線状の領域であってもよいし、曲線状の領域であってもよい。曲線状とは、例えば円または円弧状であってもよいし、自由曲線であってもよい。図形で囲んだ領域の例としては、例えば円、楕円、円弧、多角形等で囲んだ領域を挙げることができる。
(Specifying the target area at the time of setting)
The area designation receiving means 404 is a means for receiving the designation of the target area to be the target of the image inspection on the three-dimensional object whose posture is adjusted by the posture adjusting means 403. The target area is created by the user's operation as described later. For example, there is a linear area, an area surrounded by a figure, and the like, and if the area has a certain range, its shape and size are You are free. The linear region may be a linear region or a curved region. The curved shape may be, for example, a circle or an arc shape, or may be a free curve shape. As an example of the area surrounded by the figure, for example, the area surrounded by a circle, an ellipse, an arc, a polygon, or the like can be mentioned.

ユーザは、ワークWを立体的に表した三次元オブジェクトを所望の方向から見ることができるので、ワークWに存在する小さな段差のような部分であっても高低差を容易にかつ確実に把握できる。そして、ワークWの高低差を把握しながら対象領域を指定できるので、対象領域をワークW上のどこに対してどのような大きさ乃至形状で指定したのか、ユーザが容易に把握できる。 Since the user can see the three-dimensional object representing the work W in three dimensions from a desired direction, the height difference can be easily and surely grasped even in a small step-like portion existing in the work W. .. Since the target area can be specified while grasping the height difference of the work W, the user can easily grasp where and what size or shape the target area is specified on the work W.

対象領域の新規作成要領について、図12に示すフローチャートに基づいて説明する。このフローチャートは、ユーザが対象領域の新規作成を開始する操作を行うことでスタートする。対象領域の新規作成を開始する操作としては、例えば開始ボタン(図示せず)の押下等を挙げることができる。 The procedure for creating a new target area will be described with reference to the flowchart shown in FIG. This flowchart starts when the user performs an operation of starting a new creation of the target area. Examples of the operation for starting the new creation of the target area include pressing the start button (not shown).

スタート後のステップSC1では、ユーザによるマウス7のクリック操作を検出し、クリックされた点の座標を取得する。ステップSC1ではクリックされた点のXY座標を取得することになる。 In step SC1 after the start, the click operation of the mouse 7 by the user is detected, and the coordinates of the clicked point are acquired. In step SC1, the XY coordinates of the clicked point will be acquired.

その後、ステップSC2に進み、三次元オブジェクトを形成している三次元画像データとヒット判定する。ここでは、ステップSC1で取得したXY座標が、三次元画像データにヒットしているか否か、3Dヒット判定を行う。3Dヒット判定については、図13に基づいて説明する。表示部5上で点P1をクリックして点P1のXY座標を取得すると、三次元空間で点P1からZ方向に延長した延長線L1を仮想的に生成する。Z方向は、カメラ31の撮像軸方向と一致している。延長線L1がワークW1と交わればヒット点PHが存在するのでヒットしたと判定し、一方、延長線L1がワークW1と交わらなければヒットしないと判定する。 After that, the process proceeds to step SC2, and a hit determination is made with the three-dimensional image data forming the three-dimensional object. Here, a 3D hit determination is performed to determine whether or not the XY coordinates acquired in step SC1 hit the three-dimensional image data. The 3D hit determination will be described with reference to FIG. When the point P1 is clicked on the display unit 5 to acquire the XY coordinates of the point P1, an extension line L1 extending in the Z direction from the point P1 is virtually generated in the three-dimensional space. The Z direction coincides with the image pickup axis direction of the camera 31. If the extension line L1 intersects with the work W1, it is determined that the hit point PH exists, and therefore a hit is determined. On the other hand, if the extension line L1 does not intersect with the work W1, it is determined that the hit point does not hit.

図12のステップSC2を経た後、ステップSC3に進む。ステップSC3では、ステップSC2においてヒット点が存在したか否かを判定する。ヒット点が存在しなければエンドに進み、ユーザは別の箇所をクリック操作することになる。ステップSC3でYESと判定されてヒット点が存在した場合には、ステップSC4に進み、ヒット点PHのXY座標を取得し、二次元表示と同様に扱う。つまり、表示部5の表示領域におけるヒット点PHのXY座標に対応する箇所に点P1を表示する。 After going through step SC2 in FIG. 12, the process proceeds to step SC3. In step SC3, it is determined whether or not there is a hit point in step SC2. If there is no hit point, it goes to the end and the user clicks another place. If YES is determined in step SC3 and a hit point exists, the process proceeds to step SC4, the XY coordinates of the hit point PH are acquired, and the hit point is treated in the same manner as the two-dimensional display. That is, the point P1 is displayed at a position corresponding to the XY coordinates of the hit point PH in the display area of the display unit 5.

ステップSC4の後、ステップSC5に進み、点の数が所定以上であるか否かを判定する。例えば直線状の対象領域を作成する場合には、直線を決定するための点が少なくとも2つ必要であり、この場合には、ステップSC5において点の数が2点であるか否かを判定する。また、例えば三角形状の対象領域や円弧、円形状の対象領域を作成する場合に3点必要であれば、ステップSC5において点の数が3点であるか否かを判定する。どのような形状の対象領域を作成するかは、ステップSC1の前にユーザが選択できるようになっている。選択された対象領域の形状に応じてステップSC5の判定が変更される。 After step SC4, the process proceeds to step SC5, and it is determined whether or not the number of points is equal to or greater than a predetermined number. For example, when creating a linear target area, at least two points for determining a straight line are required, and in this case, it is determined in step SC5 whether or not the number of points is two. .. Further, for example, if three points are required when creating a triangular target area, an arc, or a circular target area, it is determined in step SC5 whether or not the number of points is three. The user can select the shape of the target area to be created before step SC1. The determination in step SC5 is changed according to the shape of the selected target area.

ステップSC5でNOと判定されて点の数が所定以上でない場合にはステップSC1に進んで次の点のクリック操作を受け付ける一方、ステップSC5でYESと判定されて点の数が所定以上である場合には対象領域を特定できるので、対象領域の作成を完了させる。作成された対象領域はユーザによって指定されたものとして、ステップSC6に進む。ステップSC6では、上述のようにしてユーザによって作成された対象領域が追加される。ステップSC7では、ステップSC6で追加された対象領域データを保存する。対象領域データとは、対象領域の形状、位置、大きさ等に関するデータである。 If NO is determined in step SC5 and the number of points is not more than the predetermined number, the process proceeds to step SC1 to accept the click operation of the next point, while YES is determined in step SC5 and the number of points is not more than the predetermined number. Since the target area can be specified in, the creation of the target area is completed. Assuming that the created target area is specified by the user, the process proceeds to step SC6. In step SC6, the target area created by the user as described above is added. In step SC7, the target area data added in step SC6 is saved. The target area data is data related to the shape, position, size, etc. of the target area.

(直線状の対象領域の作成)
次に、三次元オブジェクトの一例を用いて対象領域の作成の具体例について説明する。まず、直線状の対象領域の作成の具体例について、図14に基づいて説明する。図14の上側には、表示手段402によって表示部5に表示されるものとして、ワークWを示す三次元オブジェクト200を示しており、図14の下側には、表示手段402によって表示部5に表示されるものとしてワークWの二次元画像(高さ画像)201を示している。このような二次元画像201は、取得部Aによって生成することができる。
(Creation of a linear target area)
Next, a specific example of creating a target area will be described using an example of a three-dimensional object. First, a specific example of creating a linear target area will be described with reference to FIG. On the upper side of FIG. 14, a three-dimensional object 200 indicating the work W is shown as being displayed on the display unit 5 by the display means 402, and on the lower side of FIG. 14, the display unit 402 displays the work W. A two-dimensional image (height image) 201 of the work W is shown as what is displayed. Such a two-dimensional image 201 can be generated by the acquisition unit A.

表示手段402は、三次元オブジェクト200と二次元画像201とを表示部5に切替表示可能に構成されている。例えばユーザによる切替操作または選択操作により、三次元オブジェクト200のみを表示部5に表示させたり、二次元画像201のみを表示部5に表示させることができる。また、三次元オブジェクト200と二次元画像201との両方を表示部5に表示させることもできる。切替操作または選択操作は、例えば切替ボタンの操作や選択ボタンの操作等を挙げることができる。 The display means 402 is configured so that the three-dimensional object 200 and the two-dimensional image 201 can be switched and displayed on the display unit 5. For example, by a switching operation or a selection operation by the user, only the three-dimensional object 200 can be displayed on the display unit 5, or only the two-dimensional image 201 can be displayed on the display unit 5. Further, both the three-dimensional object 200 and the two-dimensional image 201 can be displayed on the display unit 5. Examples of the switching operation or the selection operation include the operation of the switching button and the operation of the selection button.

直線状の対象領域を作成する場合には、はじめに、ユーザが対象領域の形状の選択枝の中から「直線状」を選択する。その後、マウス7のポインタ7aを三次元オブジェクト200上に置くと、ポインタ7aの先端から上方向(Z方向)に延びる線分L2が描画される。ポインタ7aを移動させると、線分L2も同じように移動する。線分L2の延びる方向はカメラ31の撮像素子31dが位置する方向であり、撮像素子31dの撮像軸に沿って所定長さ延びている。 When creating a linear target area, the user first selects "straight" from the selection of the shape of the target area. After that, when the pointer 7a of the mouse 7 is placed on the three-dimensional object 200, a line segment L2 extending upward (Z direction) from the tip of the pointer 7a is drawn. When the pointer 7a is moved, the line segment L2 also moves in the same manner. The extending direction of the line segment L2 is the direction in which the image pickup element 31d of the camera 31 is located, and extends by a predetermined length along the image pickup axis of the image pickup element 31d.

マウス7をプレス操作すると、その時点のポインタ7aが示す点P1のXY座標に基づいて図12に示すステップSC2のヒット判定が行われる。その結果、点P1が三次元オブジェクト200にヒットしている場合には点P1が設定されるが、ヒットしていない場合には点P1は設定されない。この点P1が始点となる。また、マウス7をプレス操作すると、線分L2の色が変化して線分L2が点P1の位置に固定され、点P1が設定されたことが視覚的に分かるようになっている。なお、プレス操作とは、マウス7のボタンを押すことである。 When the mouse 7 is pressed, the hit determination in step SC2 shown in FIG. 12 is performed based on the XY coordinates of the point P1 indicated by the pointer 7a at that time. As a result, if the point P1 hits the three-dimensional object 200, the point P1 is set, but if it does not hit, the point P1 is not set. This point P1 is the starting point. Further, when the mouse 7 is pressed, the color of the line segment L2 changes and the line segment L2 is fixed at the position of the point P1 so that the point P1 can be visually recognized. The press operation is to press the button of the mouse 7.

ユーザがマウス7をプレス操作したまま、マウス7をドラッグ操作してポインタ7aを点P1から離れたところまで移動させる。ドラッグ操作する間、ポインタ7aの先端から上方向に延びる線分L4が線分L2とは別に描画される。その後、マウス7をリリース操作すると、リリース操作した時点のポインタ7aが示す点P3のXY座標に基づいて図12に示すステップSC2のヒット判定が行われる。点P3が三次元オブジェクト200にヒットしている場合には点P3が終点として設定されるとともに、線分L4の色が変わり、線分L4が点P3の位置に固定される。ヒットしていない場合には、点P3は設定されない。線分L4の上端と線分L2の上端とは同じ高さである。 While the user presses the mouse 7, the mouse 7 is dragged to move the pointer 7a away from the point P1. During the drag operation, the line segment L4 extending upward from the tip of the pointer 7a is drawn separately from the line segment L2. After that, when the mouse 7 is released, the hit determination in step SC2 shown in FIG. 12 is performed based on the XY coordinates of the point P3 indicated by the pointer 7a at the time of the release operation. When the point P3 hits the three-dimensional object 200, the point P3 is set as the end point, the color of the line segment L4 changes, and the line segment L4 is fixed at the position of the point P3. If there is no hit, the point P3 is not set. The upper end of the line segment L4 and the upper end of the line segment L2 are at the same height.

点P3が設定されると、線分L4の上端と線分L2の上端とを結ぶ線分(上側XY方向線)L5が描画される。三次元オブジェクト200上には、線分L5を高さ方向に投影した位置に点P1から点P3まで延びる投影線L6が描画される。投影線L6は、三次元オブジェクト200に重ねて表示され、三次元オブジェクト200に沿った形状になる。三次元オブジェクト200の表面における投影線L6が描画された部分が対象領域となる。 When the point P3 is set, a line segment (upper XY direction line) L5 connecting the upper end of the line segment L4 and the upper end of the line segment L2 is drawn. A projection line L6 extending from the point P1 to the point P3 is drawn on the three-dimensional object 200 at a position where the line segment L5 is projected in the height direction. The projection line L6 is superimposed on the three-dimensional object 200 and has a shape along the three-dimensional object 200. The portion on the surface of the three-dimensional object 200 on which the projection line L6 is drawn is the target area.

つまり、領域指定受付手段404は、三次元オブジェクト200上で始点(点P1)と終点(点P3)の指定を受け付けた場合、高さデータの二次元座標において、点P1から点P3まで延びる投影線L6の位置に対応する座標に対象領域を設定する。このように三次元オブジェクト200上で対象領域の指定操作を行うことで、二次元画像201上では指定しにくいワークWの壁の側面などを対象領域として容易に指定できる。 That is, when the area designation receiving means 404 receives the designation of the start point (point P1) and the end point (point P3) on the three-dimensional object 200, the projection extending from the point P1 to the point P3 in the two-dimensional coordinates of the height data. The target area is set at the coordinates corresponding to the position of the line L6. By performing the operation of designating the target area on the three-dimensional object 200 in this way, it is possible to easily specify the side surface of the wall of the work W, which is difficult to specify on the two-dimensional image 201, as the target area.

点P1を始点とする線分L2と、点P3を始点とする線分L4とは互いに平行であり、ともに撮像素子31dの撮像軸に沿って当該撮像素子31dへ向けて延びる線分である。ユーザは、線分L2及び線分L4を参照することで、撮像素子31dの位置にある視点を特定することができる。線分L2及び線分L4は、要素生成手段405が生成する視点特定要素に含まれる。要素生成手段405は、領域指定受付手段404により対象領域の指定を受け付けた場合に、撮像素子31dの位置にある視点を特定するための視点特定要素として線分L2及び線分L4を生成するための手段である。要素生成手段405で生成された視点特定要素は、表示手段402によって表示部5に表示されるので、ユーザは対象領域の作成中に撮像素子31dの方向を把握できる。 The line segment L2 starting from the point P1 and the line segment L4 starting from the point P3 are parallel to each other, and both are line segments extending toward the image pickup element 31d along the image pickup axis of the image pickup element 31d. The user can specify the viewpoint at the position of the image pickup device 31d by referring to the line segment L2 and the line segment L4. The line segment L2 and the line segment L4 are included in the viewpoint specifying element generated by the element generation means 405. The element generation means 405 generates a line segment L2 and a line segment L4 as a viewpoint specifying element for specifying a viewpoint at the position of the image pickup element 31d when the area designation receiving means 404 receives the designation of the target area. It is a means of. Since the viewpoint specifying element generated by the element generation means 405 is displayed on the display unit 5 by the display means 402, the user can grasp the direction of the image pickup element 31d while creating the target area.

点P3を設定すると、図形要素D1が三次元オブジェクト200に重ねて表示される。図形要素D1は、上記視点特定要素に含まれるものであり、この図形要素D1も領域指定受付手段404により生成されて表示手段402によって表示部5に表示される。図形要素D1は線よりも大きな面積を持っており、本例では、投影線L6から線分L2及び線分L4の延長方向と同方向に延びる平面、即ち撮像素子31dの撮像軸に沿って延びる平面で構成されている。線分L2と線分L4との間に図形要素D1が形成されていて図形要素D1の両縁部が線分L2及び線分L4によって定められているので、図形要素D1は線分L2と線分L4とに基づいて形成される要素である。また、図形要素D1は、必須ではないが、投影線L6から下方向にも描画される。 When the point P3 is set, the graphic element D1 is superimposed on the three-dimensional object 200 and displayed. The graphic element D1 is included in the viewpoint specifying element, and the graphic element D1 is also generated by the area designation receiving means 404 and displayed on the display unit 5 by the display means 402. The graphic element D1 has a larger area than the line, and in this example, it extends from the projection line L6 along a plane extending in the same direction as the extension direction of the line segment L2 and the line segment L4, that is, along the image pickup axis of the image pickup element 31d. It is composed of planes. Since the graphic element D1 is formed between the line segment L2 and the line segment L4 and both edges of the graphic element D1 are defined by the line segment L2 and the line segment L4, the graphic element D1 is a line segment L2 and a line. It is an element formed based on the line segment L4. Further, although the graphic element D1 is not essential, it is also drawn downward from the projection line L6.

図形要素D1の上端部の高さは、線分L2及び線分L4の上端部の高さと同じである。線分L2及び線分L4の長さは、高さ画像における最大高さや最小高さに応じて決定される。すなわち、要素生成手段405は、線分L2及び線分L4の長さを決定するに際し、まず、高さデータに基づいて高さ画像における最大高さや最小高さを取得する。次いで、要素生成手段405は、取得した最大高さと最小高さの差が大きければ大きいほど線分L2及び線分L4の長さを長くし、取得した最大高さと最小高さの差が小さければ小さいほど線分L2及び線分L4の長さを短くする。線分L2及び線分L4の長さは当該線分L2及び線分L4の上端部の高さによって変化するので、要素生成手段405は、高さ画像における最大高さに応じて線分L2及び線分L4の上端部の高さを決定するということもできる。同様に、要素生成手段405は、高さ画像における最大高さに応じて図形要素D1の上端部の高さを決定するということもできる。 The height of the upper end portion of the graphic element D1 is the same as the height of the upper end portion of the line segment L2 and the line segment L4. The lengths of the line segment L2 and the line segment L4 are determined according to the maximum height and the minimum height in the height image. That is, when determining the lengths of the line segment L2 and the line segment L4, the element generation means 405 first acquires the maximum height and the minimum height in the height image based on the height data. Next, the element generation means 405 increases the lengths of the line segment L2 and the line segment L4 as the difference between the acquired maximum height and the minimum height increases, and if the difference between the acquired maximum height and the minimum height is small, the element generation means 405 increases the length of the line segment L2 and the line segment L4. The smaller the length, the shorter the length of the line segment L2 and the line segment L4. Since the lengths of the line segment L2 and the line segment L4 vary depending on the height of the upper ends of the line segment L2 and the line segment L4, the element generation means 405 determines the line segment L2 and the line segment L2 according to the maximum height in the height image. It can also be said that the height of the upper end portion of the line segment L4 is determined. Similarly, the element generation means 405 can also determine the height of the upper end portion of the graphic element D1 according to the maximum height in the height image.

高さ画像における最大高さや最小高さに応じて線分L2及び線分L4の長さを決定できるので、ワークWの高さに対して線分L2及び線分L4が短すぎたり、長すぎたりすることが無くなり、線分L2及び線分L4が見やすくなる。同様に、図形要素D1の上下方向の寸法も決定されるので、図形要素D1も見やすくなる。また、線分L2及び線分L4の長さの上限や下限を予め設定しておいてもよい。 Since the lengths of the line segments L2 and L4 can be determined according to the maximum height and the minimum height in the height image, the line segments L2 and L4 are too short or too long with respect to the height of the work W. The line segment L2 and the line segment L4 are easy to see. Similarly, since the vertical dimension of the graphic element D1 is also determined, the graphic element D1 is also easy to see. Further, the upper limit and the lower limit of the lengths of the line segment L2 and the line segment L4 may be set in advance.

また、例えば円弧等の曲線状の対象領域を作成することもできる。この場合、図形要素D1は曲面で構成されることになる。また、図形要素D1は平面と曲面とで構成されていてもよい。 It is also possible to create a curved target area such as an arc. In this case, the graphic element D1 is composed of a curved surface. Further, the graphic element D1 may be composed of a plane and a curved surface.

図形要素D1は半透明にすることができる。半透明とは、図形要素D1の向こう側を、当該図形要素D1を透かして視認可能なことである。図形要素D1の透明度は低くてもよいし、高くてもよく、ユーザが表示部5に表示された図形要素D1の向こう側に位置するワークWの輪郭等を視認可能な程度の透過度であればよい。図形要素D1は、ワークWの色とは異なる色に着色されていてもよく、これにより、図形要素D1とワークWとの識別が容易になる。図形要素D1と、線分L2、L4、L5とは区別可能な表示形態とされている。本例では、図形要素D1が半透明で、線分L2、L4、L5が不透明であり、これにより両者の区別が容易になっている。尚、区別可能な表示形態とは、互いの色を変えたり、色の濃さを変えたりする形態であってもよい。 The graphic element D1 can be made translucent. Translucency means that the other side of the graphic element D1 can be visually recognized through the graphic element D1. The transparency of the graphic element D1 may be low or high, and the transparency may be such that the contour of the work W located on the other side of the graphic element D1 displayed on the display unit 5 can be visually recognized by the user. Just do it. The graphic element D1 may be colored in a color different from the color of the work W, which facilitates the distinction between the graphic element D1 and the work W. The display form is such that the graphic element D1 and the line segments L2, L4, and L5 can be distinguished from each other. In this example, the graphic element D1 is translucent and the line segments L2, L4, and L5 are opaque, which makes it easy to distinguish between the two. In addition, the distinguishable display form may be a form in which the colors of each other are changed or the color depth is changed.

視点特定要素は、カメラ31からワークWを見た視点を表示するものであればよく、例えば矢印、メッシュ状の図形要素等が含まれていてもよい。図形要素D1は、例えば透けた白い壁のような要素であってもよい。 The viewpoint specifying element may be any one that displays the viewpoint of the work W viewed from the camera 31, and may include, for example, an arrow, a mesh-shaped graphic element, or the like. The graphic element D1 may be an element such as a transparent white wall.

図形要素D1は半透明でなくてもよい。この場合、図形要素D1を透かして向こう側を視認することができなくなるが、図形要素D1をワークWの色と異なる色に着色しておけば、ワークWとの識別は可能である。 The graphic element D1 does not have to be translucent. In this case, the other side cannot be visually recognized through the graphic element D1, but if the graphic element D1 is colored in a color different from the color of the work W, it can be distinguished from the work W.

三次元オブジェクト200上で点P1及び点P3が指定されると、図14の下側に示すように、二次元画像201上で点P1及び点P3が表示されるとともに、点P1と点P3とを結ぶ線分L5が描画される。線分L5の真下に投影線L6が位置する。これにより、対象領域を三次元オブジェクト200上だけでなく、二次元画像201上でも把握できる。 When the points P1 and P3 are designated on the three-dimensional object 200, the points P1 and P3 are displayed on the two-dimensional image 201 and the points P1 and P3 are displayed as shown in the lower part of FIG. The line segment L5 connecting the above is drawn. The projection line L6 is located directly below the line segment L5. As a result, the target area can be grasped not only on the three-dimensional object 200 but also on the two-dimensional image 201.

また、二次元画像201上で対象領域の指定を受け付けるようにしてもよい。すなわち、二次元画像201上で点P1及び点P3を指定すると、二次元画像201上に線分L5が描画されるとともに、三次元オブジェクト200上で点P1及び点P3が表示され、投影線L6及び図形要素D1も描画される。このように二次元画像201上で対象領域を指定することで、三次元オブジェクト200上では指定しにくいワークWの穴の中央や段差の奥などを対象領域として容易に指定できる。 Further, the designation of the target area may be accepted on the two-dimensional image 201. That is, when the point P1 and the point P3 are specified on the two-dimensional image 201, the line segment L5 is drawn on the two-dimensional image 201, the points P1 and the point P3 are displayed on the three-dimensional object 200, and the projection line L6 is displayed. And the graphic element D1 are also drawn. By designating the target area on the two-dimensional image 201 in this way, it is possible to easily specify the center of the hole of the work W or the back of the step, which is difficult to specify on the three-dimensional object 200, as the target area.

(矩形状の対象領域の作成)
次に、矩形状の対象領域を作成する場合の具体例について、図15を参照しながら説明する。まず、ユーザが対象領域の形状の選択枝の中から「矩形状」を選択する。その後、マウス7のポインタ7aを三次元オブジェクト200上に置くと、直線状の場合と同様に、ポインタ7aの先端から上方向に延びる線分L2が描画される。
(Creating a rectangular target area)
Next, a specific example of creating a rectangular target area will be described with reference to FIG. First, the user selects "rectangular" from the selection of the shape of the target area. After that, when the pointer 7a of the mouse 7 is placed on the three-dimensional object 200, a line segment L2 extending upward from the tip of the pointer 7a is drawn as in the case of a straight line.

マウス7をプレス操作すると、その時点のポインタ7aが示す点P1のXY座標に基づいて図12に示すステップSC2のヒット判定が行われる。その結果、点P1が三次元オブジェクト200にヒットしている場合には点P1が設定される。 When the mouse 7 is pressed, the hit determination in step SC2 shown in FIG. 12 is performed based on the XY coordinates of the point P1 indicated by the pointer 7a at that time. As a result, when the point P1 hits the three-dimensional object 200, the point P1 is set.

マウス7をプレス操作したまま、マウス7をドラッグ操作してポインタ7aを点P1から離れたところまで移動させる。ドラッグ操作する間もポインタ7aの先端から上方向に延びる線分L4が描画される。その後、マウス7をリリース操作すると、リリース操作した時点のポインタ7aが示す点P3のXY座標に基づいて図12に示すステップSC2のヒット判定が行われる。点P3が三次元オブジェクト200にヒットしている場合には点P3が設定される。 While the mouse 7 is being pressed, the mouse 7 is dragged to move the pointer 7a away from the point P1. A line segment L4 extending upward from the tip of the pointer 7a is drawn even during the drag operation. After that, when the mouse 7 is released, the hit determination in step SC2 shown in FIG. 12 is performed based on the XY coordinates of the point P3 indicated by the pointer 7a at the time of the release operation. When the point P3 hits the three-dimensional object 200, the point P3 is set.

点P3が設定されると、点P1から点P3まで延びる仮想線(非表示)を対角線とした矩形枠L7が描画される。さらに、矩形枠L7の別の2つの頂点から延びる線分L10、L11を描画する。線分L10、L11は、線分L2、L4と平行であり、線分L2、L4、L10、L11がそれぞれ矩形枠L7の頂点に配置される。 When the point P3 is set, a rectangular frame L7 having a virtual line (hidden) extending from the point P1 to the point P3 as a diagonal line is drawn. Further, line segments L10 and L11 extending from two other vertices of the rectangular frame L7 are drawn. The line segments L10 and L11 are parallel to the line segments L2 and L4, and the line segments L2, L4, L10 and L11 are arranged at the vertices of the rectangular frame L7, respectively.

また、三次元オブジェクト200上には、矩形枠L7をZ方向(高さ方向)に投影した位置に投影線L8が描画される。投影線L8は、三次元オブジェクト200に重ねて表示され、三次元オブジェクト200に沿った形状になる。三次元オブジェクト200の表面における投影線L8で囲まれた部分が対象領域となる。 Further, a projection line L8 is drawn on the three-dimensional object 200 at a position where the rectangular frame L7 is projected in the Z direction (height direction). The projection line L8 is superimposed on the three-dimensional object 200 and has a shape along the three-dimensional object 200. The portion surrounded by the projection line L8 on the surface of the three-dimensional object 200 is the target area.

点P3を設定すると、図形要素D2が三次元オブジェクト200に重ねて表示される。図形要素D2は、上記視点特定要素に含まれるものである。図形要素D2は投影線L8から線分L2及び線分L4の延長方向と同方向に延びる4つの平面が組み合わされて構成されている。4つの平面は、線分L2と線分L10との間の平面、線分L2と線分L11との間の平面、線分L4と線分L10との間の平面、線分L4と線分L11との間の平面であり、図形要素D2は線分L2、L4、L10、L11に基づいて形成される要素である。また、図形要素D2は、必須ではないが、投影線L8から下方向にも描画される。 When the point P3 is set, the graphic element D2 is displayed superimposed on the three-dimensional object 200. The graphic element D2 is included in the viewpoint specifying element. The graphic element D2 is composed of a combination of four planes extending from the projection line L8 in the same direction as the extension direction of the line segment L2 and the line segment L4. The four planes are the plane between the line segment L2 and the line segment L10, the plane between the line segment L2 and the line segment L11, the plane between the line segment L4 and the line segment L10, and the line segment L4 and the line segment. It is a plane between L11 and the graphic element D2 is an element formed based on the line segments L2, L4, L10, and L11. Further, although the graphic element D2 is not essential, it is also drawn downward from the projection line L8.

対象領域は強調表示してもよい。例えば、対象領域に対して他の領域とは異なる色に着色したり、所定のパターンを付してもよい。 The target area may be highlighted. For example, the target area may be colored in a color different from that of other areas, or may be provided with a predetermined pattern.

(対象領域の変更)
次に、上述のようにして指定した対象領域の位置や大きさ、形状を変更する場合について、図16及び図17に基づいて説明する。図16は、対象領域の変更手順の第1段階を示しており、この第1段階を経て、図17に示す第2段階に進む。以下に説明する例では、ユーザがマウス7を使用して対象領域の変更を行う場合について説明するが、マウス7以外のタッチ操作パネル等の操作によっても対象領域の変更は可能である。
(Change of target area)
Next, a case of changing the position, size, and shape of the target area designated as described above will be described with reference to FIGS. 16 and 17. FIG. 16 shows the first stage of the procedure for changing the target area, and proceeds to the second stage shown in FIG. 17 through the first stage. In the example described below, a case where the user changes the target area by using the mouse 7 will be described, but the target area can also be changed by operating a touch operation panel or the like other than the mouse 7.

図16に示すフローチャートのステップSD1では、ユーザがマウス7をクリック操作した時点のポインタの座標(XY座標)を取得する。その後、ステップSD2では、ステップSD1で取得した座標で特定される点からXY座標を固定してZ方向に延びる線の3Dヒット判定を行う。3Dヒット判定の手法は、図12のフローチャートのステップSC2と同様であり、上記Z方向に延びる線が、三次元画像データにヒットしているか否かを判定する。 In step SD1 of the flowchart shown in FIG. 16, the coordinates (XY coordinates) of the pointer at the time when the user clicks the mouse 7 are acquired. After that, in step SD2, a 3D hit determination of a line extending in the Z direction is performed by fixing the XY coordinates from the point specified by the coordinates acquired in step SD1. The method of 3D hit determination is the same as step SC2 in the flowchart of FIG. 12, and it is determined whether or not the line extending in the Z direction hits the three-dimensional image data.

ステップSD2を経た後、ステップSD3に進む。ステップSD3では、ステップSD2においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所をクリック操作することになる。ステップSD3でYESと判定されてヒットした場合には、ステップSD4に進む。ステップSD4では、2段階ヒット判定、即ち3Dヒット判定後、2Dヒット判定を行う。 After going through step SD2, the process proceeds to step SD3. In step SD3, it is determined whether or not there is a hit in step SD2. If it doesn't hit, it goes to the end and the user clicks on another part. If YES is determined in step SD3 and a hit is made, the process proceeds to step SD4. In step SD4, a two-step hit determination, that is, a 3D hit determination and then a 2D hit determination is performed.

図18Aは、3Dヒット判定の概念図である。直線L20は、ステップSD1で取得した座標で特定される点からXY座標を固定してZ方向に延びる線であり、平面D3はZ方向面であり、平面D4は、XY方向面である。まず、平面D4の上端との3Dヒット判定を行う。すなわち、対象領域の線は様々な種類があり複雑であるが、XY方向線に限定されていて、描画されるX座標も決まっている。このことを利用して、各Z座標の平面D3との3Dヒット判定を行い、そのヒット判定で得られたヒット点のXY座標を取得する。その後、図18Bに示すように、3Dヒット判定で取得されたXY座標を用い、2Dヒット判定を行う。これにより、3Dヒット判定が容易に実装可能になる。 FIG. 18A is a conceptual diagram of 3D hit determination. The straight line L20 is a line extending in the Z direction with the XY coordinates fixed from the point specified by the coordinates acquired in step SD1, the plane D3 is the Z direction plane, and the plane D4 is the XY direction plane. First, a 3D hit determination with the upper end of the plane D4 is performed. That is, although there are various types of lines in the target area and they are complicated, they are limited to the XY direction lines, and the X coordinates to be drawn are also fixed. Utilizing this, a 3D hit determination with the plane D3 of each Z coordinate is performed, and the XY coordinates of the hit point obtained by the hit determination are acquired. After that, as shown in FIG. 18B, the 2D hit determination is performed using the XY coordinates acquired in the 3D hit determination. This makes it possible to easily implement 3D hit determination.

図16に示すステップSD4を経た後、ステップSD5に進む。ステップSD5では、ステップSD4においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所をクリック操作することになる。ステップSD5でYESと判定されてヒットした場合には、ステップSD6に進む。 After going through step SD4 shown in FIG. 16, the process proceeds to step SD5. In step SD5, it is determined whether or not there is a hit in step SD4. If it doesn't hit, it goes to the end and the user clicks on another part. If YES is determined in step SD5 and a hit is made, the process proceeds to step SD6.

ステップSD6では、XY方向面の下端について、ステップSD4と同様に3Dヒット判定を行い、その後、2Dヒット判定を行う。ステップSD6を経た後、ステップSD7に進む。ステップSD7では、ステップSD6においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所をクリック操作することになる。ステップSD6でYESと判定されてヒットした場合には、ステップSD8に進む。ステップSD8では、ヒット点のXYZ座標を保存する。以上のステップがユーザのクリック操作によって自動的に実行される。 In step SD6, a 3D hit determination is performed on the lower end of the XY direction plane in the same manner as in step SD4, and then a 2D hit determination is performed. After going through step SD6, the process proceeds to step SD7. In step SD7, it is determined whether or not there is a hit in step SD6. If it doesn't hit, it goes to the end and the user clicks on another part. If YES is determined in step SD6 and a hit is made, the process proceeds to step SD8. In step SD8, the XYZ coordinates of the hit point are saved. The above steps are automatically executed by the user's click operation.

ユーザが上記クリック操作を行ったままマウス7を移動(ドラッグ操作)することによって対象領域を移動させることができる。ドラッグ操作を行うと、図17に示すフローチャートのステップSE1に進む。ステップSE1では、ドラッグ操作によって移動したポインタの座標(XY座標)を取得する。その後、ステップSE2に進み、図16に示すフローチャートのステップSD8で保存したヒット点のXYZ座標のZ座標面との3Dヒット判定を行う。 The target area can be moved by moving (drag operation) the mouse 7 while the user performs the above-mentioned click operation. When the drag operation is performed, the process proceeds to step SE1 of the flowchart shown in FIG. In step SE1, the coordinates (XY coordinates) of the pointer moved by the drag operation are acquired. After that, the process proceeds to step SE2, and a 3D hit determination is performed with the Z coordinate plane of the XYZ coordinates of the hit point saved in step SD8 of the flowchart shown in FIG.

ステップSE2を経た後、ステップSE3に進む。ステップSE3では、ステップSE2においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所へドラッグ操作することになる。ステップSE2でYESと判定されてヒットした場合には、ステップSE4に進む。 After passing through step SE2, the process proceeds to step SE3. In step SE3, it is determined whether or not there is a hit in step SE2. If there is no hit, it goes to the end and the user drags to another place. If YES is determined in step SE2 and a hit is made, the process proceeds to step SE4.

ステップSE4では、視点特定要素及び対象領域をヒット座標までXY平行移動させる。つまり、ドラッグ操作後のポインタの座標でヒットすれば、その座標まで対象領域及び視点特定要素(図14における線分L2、L4、L10、L11、図形要素D1、D2)を平行移動させるので、対象領域及び視点特定要素はポインタに追従するようにほぼリアルタイムで移動する。これにより、ユーザは対象領域が所望の位置に配置されるように、対象領域を三次元オブジェクト上で位置調整できる。 In step SE4, the viewpoint specific element and the target area are XY translated to the hit coordinates. That is, if a hit is made at the coordinates of the pointer after the drag operation, the target area and the viewpoint specifying element (line segments L2, L4, L10, L11, graphic elements D1 and D2 in FIG. 14) are translated to that coordinate. Area and viewpoint specific elements move in near real time to follow the pointer. As a result, the user can adjust the position of the target area on the three-dimensional object so that the target area is arranged at a desired position.

また、ステップSE4では、視点特定要素をX方向またはY方向への平行移動のみ許容し、Z方向(高さ方向)への移動を禁止している。すなわち、視点特定要素のZ方向の位置が移動前後で変化しないようにしている。視点特定要素は、画像検査の対象となる対象領域を、二次元座標上に配置された高さデータに設定する際に表示される要素であることから、三次元オブジェクトのX方向またはY方向に移動させればよく、視点が位置する方向(三次元オブジェクトの高さ方向)へ移動させる必要はなく、仮に視点特定要素を三次元オブジェクトの高さ方向に移動可能にすると、対象領域の設定操作が煩雑になることが考えられる。本実施形態では、視点特定要素を三次元オブジェクトのX方向またはY方向にのみ移動可能であるため、対象領域の設定操作が容易になる。 Further, in step SE4, the viewpoint specifying element is allowed to move only in parallel in the X direction or the Y direction, and the movement in the Z direction (height direction) is prohibited. That is, the position of the viewpoint specific element in the Z direction does not change before and after the movement. Since the viewpoint specific element is an element displayed when the target area to be inspected is set to the height data arranged on the two-dimensional coordinates, it is in the X direction or the Y direction of the three-dimensional object. It is sufficient to move it, and it is not necessary to move it in the direction in which the viewpoint is located (the height direction of the 3D object). If the viewpoint specific element can be moved in the height direction of the 3D object, the setting operation of the target area is performed. May become complicated. In the present embodiment, since the viewpoint specifying element can be moved only in the X direction or the Y direction of the three-dimensional object, the setting operation of the target area becomes easy.

ステップSE4は、対象領域を平行移動させただけであり、対象領域の位置を確定させる確定はまだ行われていない状態である。ステップSE4の後、ステップSE5に進み、ユーザによる確定操作が行われたか否かを判定する。確定操作は、例えばマウス7のボタンを離す操作(リリース操作)等を挙げることができるが、他の操作であってもよい。 In step SE4, the target area is only translated, and the determination of the position of the target area has not been performed yet. After step SE4, the process proceeds to step SE5, and it is determined whether or not the confirmation operation has been performed by the user. The confirmation operation may be, for example, an operation of releasing the button of the mouse 7 (release operation) or the like, but may be another operation.

ステップSE5でNOと判定されて確定操作が行われていない場合には、ステップSE1に戻る一方、ステップSE5でYESと判定されて確定操作が行われた場合には、ステップSE6に進み、平行移動後の対象領域に変更する。ステップSE7では、ステップSE6で変更された対象領域データを保存する。 If NO is determined in step SE5 and the confirmation operation is not performed, the process returns to step SE1, while if YES is determined in step SE5 and the confirmation operation is performed, the process proceeds to step SE6 and translation is performed. Change to the target area later. In step SE7, the target area data changed in step SE6 is saved.

図19、図20は、直線状の対象領域の位置調整を行う場合の具体例1、2を示している。具体例1にかかる図19の左側の図は、対象領域の位置調整前を示しており、右側の図は、対象領域の位置調整後を示している。図19の左側の図では、マウス7のポインタ7aを線分L5上に移動させた後(マウスホバー後)、プレス操作している。これにより、線分L2及び線分L4の色が変わり、ユーザによって選択されたことが分かるようになっている。 19 and 20 show specific examples 1 and 2 in the case of adjusting the position of the linear target area. The figure on the left side of FIG. 19 according to the specific example 1 shows before the position adjustment of the target area, and the figure on the right side shows after the position adjustment of the target area. In the figure on the left side of FIG. 19, the pointer 7a of the mouse 7 is moved onto the line segment L5 (after the mouse hover), and then the press operation is performed. As a result, the colors of the line segment L2 and the line segment L4 are changed so that the user can know that the line segment L2 and the line segment L4 have been selected.

その後、マウス7をドラッグ操作すると、線分L2、線分L4、線分L5、図形要素D1、投影線L6が一体でポインタ7aの移動軌跡に沿って移動するが、その移動はZ方向に禁止されており、XY平行移動である。ユーザは、線分L2、線分L4、線分L5、図形要素D1、投影線L6のいずれにポインタ7aを置いてドラッグ操作してもよい。線分L5をドラッグ操作した場合、移動先においても、線分L5がポインタ7a上に位置するように、線分L2、線分L4、線分L5、図形要素D1、投影線L6をXY平行移動させる。また、投影線L6をドラッグ操作した場合、移動先においても、投影線L6がポインタ7a上に位置するように、線分L2、線分L4、線分L5、図形要素D1、投影線L6をXY平行移動させる。また、線分L2または線分L4をドラッグ操作した場合、移動先においても、線分L2または線分L4がポインタ7a上に位置するように、線分L2、線分L4、線分L5、図形要素D1、投影線L6をXY平行移動させる。また、図形要素D1のある点をドラッグ操作した場合、移動先においても、図形要素D1の同じ点がポインタ7a上に位置するように、線分L2、線分L4、線分L5、図形要素D1、投影線L6をXY平行移動させる。 After that, when the mouse 7 is dragged, the line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 move together along the movement locus of the pointer 7a, but the movement is prohibited in the Z direction. It is XY translation. The user may place the pointer 7a on any of the line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 and drag the operation. When the line segment L5 is dragged, the line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 are translated XY so that the line segment L5 is located on the pointer 7a even at the destination. Let me. Further, when the projection line L6 is dragged, the line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 are XY so that the projection line L6 is located on the pointer 7a even at the movement destination. Move in parallel. Further, when the line segment L2 or the line segment L4 is dragged, the line segment L2, the line segment L4, the line segment L5, and the figure are arranged so that the line segment L2 or the line segment L4 is located on the pointer 7a even at the destination. The element D1 and the projection line L6 are translated XY. Further, when a certain point of the graphic element D1 is dragged, the line segment L2, the line segment L4, the line segment L5, and the graphic element D1 so that the same point of the graphic element D1 is located on the pointer 7a even at the destination. , The projection line L6 is translated XY.

移動途中においても、線分L2、線分L4、線分L5、図形要素D1、投影線L6を描画することができる。次いで、ユーザがリリース操作を行うと、線分L2、線分L4、線分L5、図形要素D1、投影線L6がXY平行移動した後の状態で固定される。 The line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 can be drawn even during the movement. Next, when the user performs a release operation, the line segment L2, the line segment L4, the line segment L5, the graphic element D1, and the projection line L6 are fixed in a state after being translated XY.

具体例2にかかる図20の左側の図は、対象領域の位置調整前を示しており、右側の図は、対象領域の位置調整後を示している。図20の左側の図では、マウス7のポインタ7aを線分L4上に移動させた後(マウスホバー後)、プレス操作している。これにより、線分L2及び線分L4の色が変わり、ユーザによって選択されたことが分かるようになっている。 The figure on the left side of FIG. 20 according to the specific example 2 shows before the position adjustment of the target area, and the figure on the right side shows after the position adjustment of the target area. In the figure on the left side of FIG. 20, the pointer 7a of the mouse 7 is moved onto the line segment L4 (after the mouse hover), and then the press operation is performed. As a result, the colors of the line segment L2 and the line segment L4 are changed so that the user can know that the line segment L2 and the line segment L4 have been selected.

その後、マウス7をドラッグ操作すると、線分L2は固定された状態で、線分L4がXY平行移動する。線分L5、投影線L6は、線分L2から移動後の線分L4まで延びるように描画される。また、図形要素D1も線分L4の移動に応じて描画される。次いで、ユーザがリリース操作を行うと、線分L4がXY平行移動した後の状態で固定される。これにより、対象領域の位置を変更するだけでなく、対象領域の長さを変更することができる。 After that, when the mouse 7 is dragged, the line segment L2 moves in XY translation while the line segment L2 is fixed. The line segment L5 and the projection line L6 are drawn so as to extend from the line segment L2 to the moved line segment L4. Further, the graphic element D1 is also drawn according to the movement of the line segment L4. Next, when the user performs a release operation, the line segment L4 is fixed in the state after being translated XY. As a result, not only the position of the target area can be changed, but also the length of the target area can be changed.

図21は、矩形状の対象領域の位置調整を行う具体例を示す図である。図21の左側の図は、対象領域の位置調整前を示しており、右側の図は、対象領域の位置調整後を示している。図21の左側の図では、マウス7のポインタ7aを例えば矩形枠L7上に移動させた後(マウスホバー後)、プレス操作している。これにより、線分L2、線分L4、線分L10、線分L11の色が変わり、ユーザによって選択されたことが分かるようになっている。加えて、プレス操作によって中間線L9も描画される。中間線L9は、線分L2と線分L11との間、線分L2と線分L10との間、線分L4と線分L10との間、線分L4と線分L11との間にそれぞれ描画されており、Z方向に延びている。中間線L9のハンドル(中間点のハンドル)をマウス7でドラッグ操作することにより、矩形枠L7の幅と高さのどちらか一方のみ変更できる。矩形枠L7の頂点にもハンドルがあり、この頂点のハンドルをマウス7でドラッグ操作することにより、矩形枠L7の幅と高さの両方を同時に変更できる。ユーザがリリース操作を行うと、矩形枠L7の幅と高さが変更された状態で固定される。ハンドルの位置は任意に設定することができる。 FIG. 21 is a diagram showing a specific example of adjusting the position of the rectangular target area. The figure on the left side of FIG. 21 shows before the position adjustment of the target area, and the figure on the right side shows after the position adjustment of the target area. In the figure on the left side of FIG. 21, the pointer 7a of the mouse 7 is moved onto, for example, the rectangular frame L7 (after the mouse hover), and then the press operation is performed. As a result, the colors of the line segment L2, the line segment L4, the line segment L10, and the line segment L11 change, and it can be seen that the line segment L2 has been selected by the user. In addition, the intermediate line L9 is also drawn by the press operation. The intermediate line L9 is between the line segment L2 and the line segment L11, between the line segment L2 and the line segment L10, between the line segment L4 and the line segment L10, and between the line segment L4 and the line segment L11, respectively. It is drawn and extends in the Z direction. By dragging the handle of the intermediate line L9 (the handle of the intermediate point) with the mouse 7, only one of the width and the height of the rectangular frame L7 can be changed. The vertex of the rectangular frame L7 also has a handle, and by dragging the handle of this vertex with the mouse 7, both the width and the height of the rectangular frame L7 can be changed at the same time. When the user performs a release operation, the width and height of the rectangular frame L7 are fixed in a changed state. The position of the handle can be set arbitrarily.

(有効計測領域の描画)
ワークWの一部が計測したくない領域の場合がある。その領域を計測対象から外す処理をマスク処理と呼ぶことができ、マスク処理した領域をマスク領域と呼ぶことができる。マスク領域以外の領域を有効計測領域と呼ぶことができる。
(Drawing of effective measurement area)
A part of the work W may be an area that you do not want to measure. The process of removing the area from the measurement target can be called a mask process, and the masked area can be called a mask area. An area other than the mask area can be called an effective measurement area.

三次元オブジェクト上で有効計測領域を描画することでユーザがマスク領域と有効計測領域とを容易に判別できる。三次元オブジェクト上で有効計測領域を描画する場合には、以下の描画フローを適用することができる。まず、内部的に2値画像を作成し、通常領域内を「1」などで塗りつぶす。その後、マスク領域内を「0」で塗りつぶして、通常領域と被っている部分を消す。次いで、2値画像から境界画像を生成する。その境界画像で境界になっている部分に壁面を半透明で三次元描画する。これにより、描画した半透明オブジェクトが少なくなるとともに、単一の色で表現できるため、見やすくなる。 By drawing the effective measurement area on the three-dimensional object, the user can easily distinguish between the mask area and the effective measurement area. When drawing an effective measurement area on a three-dimensional object, the following drawing flow can be applied. First, a binary image is created internally, and the inside of the normal area is filled with "1" or the like. After that, the inside of the mask area is filled with "0" to erase the part covered with the normal area. Next, a boundary image is generated from the binary image. The wall surface is semi-transparently drawn three-dimensionally on the boundary part of the boundary image. This reduces the number of semi-transparent objects drawn and makes it easier to see because it can be expressed in a single color.

(運用時における段差計測手順)
図22は、画像検査システム1の運用時に直線状の対象領域で段差計測する手順の例を示すフローチャートである。段差計測の前には、ユーザが事前に段差高さの閾値を設定しておく。スタート後のステップSF1では、取得部Aにより新たに取得された高さデータに基づいてワークWの2.5Dデータを取得する。このとき、2Dデータを同時に取得してもよい。ステップSF2では、ステップSF1で取得した2.5Dデータに、図12に示すステップSC6や図7に示すステップSF7で保存した直線状の対象領域データを設定する。このステップSF2は、図11に示す領域設定手段406によって実行されるステップであり、このステップを経ることで、領域指定受付手段404により指定された対象領域を、取得部Aにより取得された高さデータに対して設定することができる。
(Step measurement procedure during operation)
FIG. 22 is a flowchart showing an example of a procedure for measuring a step in a linear target area during operation of the image inspection system 1. Before the step measurement, the user sets the threshold value of the step height in advance. In step SF1 after the start, 2.5D data of the work W is acquired based on the height data newly acquired by the acquisition unit A. At this time, 2D data may be acquired at the same time. In step SF2, the linear target area data saved in step SC6 shown in FIG. 12 and step SF7 shown in FIG. 7 is set in the 2.5D data acquired in step SF1. This step SF2 is a step executed by the area setting means 406 shown in FIG. 11, and by passing through this step, the height of the target area designated by the area designation receiving means 404 is acquired by the acquisition unit A. Can be set for data.

ステップSF3では、ステップSF2で領域設定手段406が設定した対象領域上の高さプロファイルを取得する。ステップSF4では、ステップSF3で取得した高さプロファイルの中で、段差の上側の高さと下側の高さを計測する。ステップSF5では、上側の高さと下側の高さの差により段差高さを算出する。ステップSF3〜SF5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。ステップSF6では、事前に設定した閾値範囲と、ステップSF5で算出した段差高さとを比較し、ステップSF5で算出した段差高さが閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSF6は、図7に示す検査部4Aが実行するステップである。 In step SF3, the height profile on the target area set by the area setting means 406 in step SF2 is acquired. In step SF4, the height on the upper side and the height on the lower side of the step are measured in the height profile acquired in step SF3. In step SF5, the step height is calculated from the difference between the height on the upper side and the height on the lower side. Steps SF3 to SF5 are steps in which the image processing unit 4B shown in FIG. 7 performs image processing on the target area set by the area setting means 406. In step SF6, the threshold range set in advance is compared with the step height calculated in step SF5, and if the step height calculated in step SF5 falls within the threshold range, it is determined as "good" and if it does not fit. Is judged to be "defective". This step SF6 is a step executed by the inspection unit 4A shown in FIG. 7.

ステップSF7では、ステップSF6の判定値を設定装置4が外部機器に出力する。外部機器が不良品の排出機構である場合には、ステップSF8において不良品が排出機構によって搬送用ベルトコンベアBから排出される。 In step SF7, the setting device 4 outputs the determination value of step SF6 to the external device. When the external device is a defective product discharging mechanism, the defective product is discharged from the transport belt conveyor B by the discharging mechanism in step SF8.

(運用時における傷検査手順)
図23は、画像検査システム1の運用時に矩形状の対象領域で傷検査する手順の例を示すフローチャートである。傷検査の前には、ユーザが事前に傷量の閾値を設定しておく。スタート後のステップSG1では、取得部Aにより新たに2Dデータを取得する。このとき、2.5Dデータを取得してもよい。ステップSG2では、ステップSG1で取得した2Dデータに矩形状の対象領域データを設定する。このステップSG2は、図11に示す領域設定手段406によって実行されるステップである。
(Scratch inspection procedure during operation)
FIG. 23 is a flowchart showing an example of a procedure for inspecting a scratch in a rectangular target area during operation of the image inspection system 1. Before the scratch inspection, the user sets a threshold value for the amount of scratches in advance. In step SG1 after the start, the acquisition unit A newly acquires 2D data. At this time, 2.5D data may be acquired. In step SG2, rectangular target area data is set in the 2D data acquired in step SG1. This step SG2 is a step executed by the area setting means 406 shown in FIG.

ステップSG3では、ステップSG2で領域設定手段406が設定した対象領域内の傷量を、傷計測アルゴリズムを使用して取得する。傷計測アルゴリズムは従来から用いられるものであってもよい。このステップSG3は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SG3, the scratch amount in the target area set by the area setting means 406 in step SG2 is acquired by using the scratch measurement algorithm. The scratch measurement algorithm may be a conventional one. This step SG3 is a step in which the image processing unit 4B shown in FIG. 7 performs image processing on the target area set by the area setting means 406.

ステップSG4では、事前に設定した閾値範囲と、ステップSG3で取得した傷量とを比較し、ステップSG3で取得した傷量が閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSG4は、図7に示す検査部4Aが実行するステップである。 In step SG4, the preset threshold range is compared with the scratch amount acquired in step SG3, and if the scratch amount acquired in step SG3 falls within the threshold range, it is determined as "good", and if it does not fit, it is determined. Is determined to be "defective". This step SG4 is a step executed by the inspection unit 4A shown in FIG. 7.

ステップSG5では、ステップSG4の判定値を設定装置4が外部機器に出力する。外部機器が不良品の排出機構である場合には、ステップSG6において不良品が排出機構によって搬送用ベルトコンベアBから排出される。 In step SG5, the setting device 4 outputs the determination value of step SG4 to the external device. When the external device is a defective product discharging mechanism, the defective product is discharged from the transport belt conveyor B by the discharging mechanism in step SG6.

(運用時における高さ検査手順)
図24は、画像検査システム1の運用時に矩形状の対象領域で高さ検査する手順の例を示すフローチャートである。高さ検査の前には、ユーザが事前に高さの閾値を設定しておく。スタート後のステップSH1では、図22のステップSF1と同様に2.5Dデータを取得する。ステップSH2では、ステップSH1で取得した2.5Dデータに矩形状の対象領域データを設定する。このステップSH2は、図11に示す領域設定手段406によって実行されるステップである。
(Height inspection procedure during operation)
FIG. 24 is a flowchart showing an example of a procedure for height inspection in a rectangular target area during operation of the image inspection system 1. Before the height inspection, the user sets a height threshold value in advance. In step SH1 after the start, 2.5D data is acquired in the same manner as in step SF1 of FIG. In step SH2, rectangular target area data is set in the 2.5D data acquired in step SH1. This step SH2 is a step executed by the area setting means 406 shown in FIG.

ステップSH3では、ステップSH2で領域設定手段406が設定した対象領域内の平均高さを算出する。このステップSH3は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。ステップSH4では、事前に設定した閾値範囲と、ステップSH3で取得した平均高さとを比較し、ステップSH3で取得した平均高さが閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSH4は、図7に示す検査部4Aが実行するステップである。 In step SH3, the average height in the target area set by the area setting means 406 in step SH2 is calculated. This step SH3 is a step in which the image processing unit 4B shown in FIG. 7 performs image processing on the target area set by the area setting means 406. In step SH4, the preset threshold range is compared with the average height acquired in step SH3, and if the average height acquired in step SH3 falls within the threshold range, it is determined as "good", and if it does not fit. Is judged to be "defective". This step SH4 is a step executed by the inspection unit 4A shown in FIG. 7.

ステップSH5では、ステップSH4の判定値を設定装置4が外部機器に出力する。外部機器が不良品の排出機構である場合には、ステップSH6において不良品が排出機構によって搬送用ベルトコンベアBから排出される。 In step SH5, the setting device 4 outputs the determination value of step SH4 to the external device. When the external device is a defective product discharging mechanism, the defective product is discharged from the transport belt conveyor B by the discharging mechanism in step SH6.

(運用時における賞味期限検査手順)
図25は、画像検査システム1の運用時に円弧状の対象領域で賞味期限検査する手順の例を示すフローチャートである。賞味期限検査の前には、ユーザが事前に日時の閾値を設定しておく。スタート後のステップSI1では、取得部Aにより2Dデータを取得する。このとき、2.5Dデータを取得してもよい。ステップSI2では、ステップSI1で取得した2Dデータに円弧状の対象領域データを設定する。このステップSI2は、図11に示す領域設定手段406によって実行されるステップである。
(Expiration date inspection procedure at the time of operation)
FIG. 25 is a flowchart showing an example of a procedure for inspecting the expiration date in an arcuate target area during operation of the image inspection system 1. Before the expiration date inspection, the user sets a threshold value for the date and time in advance. In step SI1 after the start, 2D data is acquired by the acquisition unit A. At this time, 2.5D data may be acquired. In step SI2, arcuate target area data is set in the 2D data acquired in step SI1. This step SI2 is a step executed by the area setting means 406 shown in FIG.

ステップSI3では、ステップSI2で領域設定手段406が設定した対象領域内の文字を切り出す。ステップSI4では、ステップSI3で切り出した文字を、光学的文字認識(OCR)アルゴリズムにより判定する。ステップSI5では文字から日時に変換する。このステップSI3〜SI5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SI3, characters in the target area set by the area setting means 406 in step SI2 are cut out. In step SI4, the character cut out in step SI3 is determined by an optical character recognition (OCR) algorithm. In step SI5, characters are converted into date and time. Steps SI3 to SI5 are steps in which the image processing unit 4B shown in FIG. 7 performs image processing on the target area set by the area setting means 406.

ステップSI6では、事前に設定した閾値範囲と、ステップSI5で変換した日時とを比較し、ステップSI5で変換した日時が閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSI6は、図7に示す検査部4Aが実行するステップである。 In step SI6, the preset threshold range is compared with the date and time converted in step SI5, and if the date and time converted in step SI5 falls within the threshold range, it is determined as "good", and if it does not fit, "good" is determined. It is judged as "defective". This step SI6 is a step executed by the inspection unit 4A shown in FIG. 7.

ステップSI7では、ステップSI6の判定値を設定装置4が外部機器に出力する。外部機器が不良品の排出機構である場合には、ステップSI8において不良品が排出機構によって搬送用ベルトコンベアBから排出される。 In step SI7, the setting device 4 outputs the determination value of step SI6 to the external device. When the external device is a defective product discharging mechanism, the defective product is discharged from the transport belt conveyor B by the discharging mechanism in step SI8.

尚、賞味期限は一例であり、例えば製造番号や製造日等も検査対象になり得る。 The expiration date is an example, and for example, the serial number, the date of manufacture, and the like can be inspected.

(運用時における刻印判別手順)
図26は、画像検査システム1の運用時に円弧状の対象領域で刻印判別する手順の例を示すフローチャートである。刻印判別の前には、ワークWに刻印される文字をユーザが事前に設定しておく。スタート後のステップSJ1では、図22のステップSF1と同様に2.5Dデータを取得する。ステップSJ2では、ステップSJ1で取得した2.5Dデータを高さ抽出アルゴリズムにより2Dデータに変換する。ステップSJ3では、ステップSJ2で生成した2Dに円弧状の対象領域データを設定する。このステップSJ3は、図11に示す領域設定手段406によって実行されるステップである。
(Procedure for discriminating stamps during operation)
FIG. 26 is a flowchart showing an example of a procedure for marking and discriminating in an arcuate target area during operation of the image inspection system 1. Before the marking determination, the user sets in advance the characters to be stamped on the work W. In step SJ1 after the start, 2.5D data is acquired in the same manner as in step SF1 of FIG. In step SJ2, the 2.5D data acquired in step SJ1 is converted into 2D data by the height extraction algorithm. In step SJ3, the arc-shaped target area data is set in the 2D generated in step SJ2. This step SJ3 is a step executed by the area setting means 406 shown in FIG.

ステップSJ4では、ステップSJ3で領域設定手段406が設定した対象領域内の文字を切り出す。ステップSJ5では、ステップSJ4で切り出した文字を、光学的文字認識(OCR)アルゴリズムにより判定する。このステップSJ4、SJ5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SJ4, characters in the target area set by the area setting means 406 in step SJ3 are cut out. In step SJ5, the character cut out in step SJ4 is determined by an optical character recognition (OCR) algorithm. The steps SJ4 and SJ5 are steps in which the image processing unit 4B shown in FIG. 7 performs image processing on the target area set by the area setting means 406.

ステップSJ6では、事前に設定した文字と、ステップSJ5で判定した文字とを比較し、ステップSJ5で変換した文字が計測した文字と同じ場合には「良」と判定し、異なる場合には「不良」と判定する。このステップSJ6は、図7に示す検査部4Aが実行するステップである。 In step SJ6, the preset characters are compared with the characters determined in step SJ5, and if the characters converted in step SJ5 are the same as the measured characters, it is determined as "good", and if they are different, it is determined as "bad". ". This step SJ6 is a step executed by the inspection unit 4A shown in FIG. 7.

ステップSJ7では、ステップSJ6の判定値を設定装置4が外部機器に出力する。外部機器が不良品の排出機構である場合には、ステップSJ8において不良品が排出機構によって搬送用ベルトコンベアBから排出される。
(実施形態の作用効果)
以上説明したように、この実施形態によれば、設定時に、ワークWの高さ情報が二次元座標上に配置された高さデータを取得部Aが取得すると、その高さデータに基づいてオブジェクト生成手段401が三次元オブジェクトを生成する。生成された三次元オブジェクトは、例えば三次元ポリゴン表示や三次元点群表示のような形態で設定装置4の表示部5に表示した状態でその姿勢の調整が可能なので、ワークWを所望の方向から見た三次元オブジェクトを表示部5に表示できる。ユーザは、姿勢調整後の三次元オブジェクト上で対象領域の指定を行うことができる。
In step SJ7, the setting device 4 outputs the determination value of step SJ6 to the external device. When the external device is a defective product discharging mechanism, the defective product is discharged from the transport belt conveyor B by the discharging mechanism in step SJ8.
(Action and effect of the embodiment)
As described above, according to this embodiment, when the acquisition unit A acquires the height data in which the height information of the work W is arranged on the two-dimensional coordinates at the time of setting, the object is based on the height data. The generation means 401 creates a three-dimensional object. Since the posture of the generated three-dimensional object can be adjusted while being displayed on the display unit 5 of the setting device 4 in a form such as a three-dimensional polygon display or a three-dimensional point cloud display, the work W can be moved in a desired direction. The three-dimensional object seen from the above can be displayed on the display unit 5. The user can specify the target area on the three-dimensional object after the posture adjustment.

このように、ユーザは、対象領域の指定時に、ワークWを立体的に表した三次元オブジェクトを所望の方向から見ることができるので、小さな段差のような部分であっても高低差を容易にかつ確実に把握できる。そして、ワークWの高低差を把握しながら対象領域を指定できるので、対象領域をワークW上のどこに対してどのような大きさ乃至形状で指定したのか、ユーザが容易に把握できる。 In this way, when the target area is specified, the user can see the three-dimensional object that represents the work W in three dimensions from a desired direction, so that the height difference can be easily obtained even in a small step-like portion. And you can surely grasp it. Since the target area can be specified while grasping the height difference of the work W, the user can easily grasp where and what size or shape the target area is specified on the work W.

対象領域が指定されると、運用時には、その対象領域が新たに取得された高さデータに対して設定される。つまり、三次元オブジェクト上で指定した対象領域の情報が運用時の高さデータに反映されるので、所望の領域に対して画像検査が実行される。 When the target area is specified, the target area is set for the newly acquired height data at the time of operation. That is, since the information of the target area designated on the three-dimensional object is reflected in the height data at the time of operation, the image inspection is executed for the desired area.

上述の実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内のものである。 The above embodiments are merely exemplary in all respects and should not be construed in a limited way. Further, all modifications and modifications belonging to the equivalent scope of the claims are within the scope of the present invention.

以上説明したように、本発明は、例えばワーク等を検査する場合に利用できる。 As described above, the present invention can be used, for example, when inspecting a work or the like.

1 画像検査システム
2 照明装置(投光部)
4A 検査部
4B 画像処理部
5 表示部(モニタ)
31 カメラ(画像生成部)
31d 撮像素子
300 撮像装置
400 検査設定部
401 オブジェクト生成手段
402 表示手段
403 姿勢調整手段
404 領域指定受付手段
405 要素生成手段
406 領域設定手段
A 取得部
D1 図形要素
L2、L4 線分(視点特定要素)
W ワーク(検査対象物)
1 Image inspection system 2 Lighting device (light projector)
4A Inspection unit 4B Image processing unit 5 Display unit (monitor)
31 Camera (image generator)
31d Image sensor 300 Image sensor 400 Inspection setting unit 401 Object generation means 402 Display means 403 Posture adjustment means 404 Area designation reception means 405 Element generation means 406 Area setting means A Acquisition unit D1 Graphic element L2, L4 Line segment (viewpoint identification element)
W work (object to be inspected)

Claims (12)

検査対象物の高さ情報が二次元座標上に配置された高さデータを取得する取得部を備える画像検査用撮像装置と、前記画像検査用撮像装置にネットワークを介して接続される設定装置にてユーザ操作に基づく各種検査設定を行う検査設定部と、を含む画像検査システムであって、
前記検査設定部は、
前記取得部により取得された高さデータに基づいて、検査対象物を立体的に表した三次元オブジェクトを生成するオブジェクト生成手段と、
前記オブジェクト生成手段により生成された三次元オブジェクトを前記設定装置のモニタに表示する表示手段と、
前記表示手段により表示された三次元オブジェクトの姿勢を調整する姿勢調整手段と、
前記姿勢調整手段により姿勢が調整された三次元オブジェクト上で、画像検査の対象となる対象領域の指定を受け付ける領域指定受付手段と、
前記領域指定受付手段により指定された対象領域を、前記取得部により取得された高さデータに対して設定する領域設定手段と、
を有する画像検査システム。
An image inspection imager provided with an acquisition unit for acquiring height data in which height information of an inspection object is arranged on two-dimensional coordinates, and a setting device connected to the image inspection imager via a network. An image inspection system that includes an inspection setting unit that sets various inspection settings based on user operations.
The inspection setting unit
An object generation means for generating a three-dimensional object that three-dimensionally represents an inspection object based on the height data acquired by the acquisition unit.
A display means for displaying a three-dimensional object generated by the object generation means on the monitor of the setting device, and a display means.
A posture adjusting means for adjusting the posture of a three-dimensional object displayed by the display means, and a posture adjusting means.
An area designation receiving means that accepts the designation of the target area to be the target of the image inspection on the three-dimensional object whose posture is adjusted by the posture adjusting means.
An area setting means for setting a target area designated by the area designation receiving means with respect to the height data acquired by the acquisition unit, and an area setting means.
Image inspection system with.
請求項1に記載の画像検査システムにおいて、
前記取得部は、検査対象物を撮像する撮像素子を備え、
前記検査設定部は、
前記領域指定受付手段により対象領域の指定を受け付けた場合に、前記撮像素子の位置にある視点を特定するための視点特定要素を生成する要素生成手段を備え、
前記表示手段は、前記要素生成手段により生成された視点特定要素を、前記三次元オブジェクト上に重ねて前記モニタに表示させる画像検査システム。
In the image inspection system according to claim 1,
The acquisition unit includes an image pickup element that captures an image of an inspection object.
The inspection setting unit
An element generation means for generating a viewpoint specifying element for specifying a viewpoint at a position of the image pickup element when the designation of a target area is received by the area designation receiving means is provided.
The display means is an image inspection system in which a viewpoint specifying element generated by the element generation means is superimposed on the three-dimensional object and displayed on the monitor.
請求項2に記載の画像検査システムにおいて、
前記視点特定要素は、前記領域指定受付手段により指定を受け付けた複数の点の各々から前記撮像素子の撮像軸に沿って所定長さ延びる複数の線分と、該複数の線分に基づき形成される平面又は曲面からなる図形要素とを含む画像検査システム。
In the image inspection system according to claim 2,
The viewpoint specifying element is formed based on a plurality of line segments extending by a predetermined length from each of the plurality of points designated by the area designation receiving means along the image pickup axis of the image pickup device, and the plurality of line segments. An image inspection system that includes a graphic element consisting of a flat surface or a curved surface.
請求項3に記載の画像検査システムにおいて、
前記図形要素は、半透明である画像検査システム。
In the image inspection system according to claim 3,
The graphic element is a translucent image inspection system.
請求項3または4に記載の画像検査システムにおいて、
前記図形要素を形成する前記複数の線分の所定長さは、前記高さ画像における最大高さまたは最小高さに応じて決定される画像検査システム。
In the image inspection system according to claim 3 or 4.
An image inspection system in which a predetermined length of the plurality of line segments forming the graphic element is determined according to a maximum height or a minimum height in the height image.
請求項2から5のいずれか1つに記載の画像検査システムにおいて、
前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で位置調整可能とされている画像検査システム。
In the image inspection system according to any one of claims 2 to 5.
The viewpoint specifying element is an image inspection system whose position can be adjusted on the three-dimensional object after being generated by the element generation means.
請求項2から6のいずれか1つに記載の画像検査システムにおいて、
前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で形状の変更が可能とされている画像検査システム。
In the image inspection system according to any one of claims 2 to 6.
The viewpoint specifying element is an image inspection system whose shape can be changed on the three-dimensional object after being generated by the element generation means.
請求項6に記載の画像検査システムにおいて、
前記視点特定要素は、前記三次元オブジェクトの高さ方向への移動が禁止されている画像検査システム。
In the image inspection system according to claim 6,
The viewpoint specifying element is an image inspection system in which movement of the three-dimensional object in the height direction is prohibited.
請求項1から8のいずれか1つに記載の画像検査システムにおいて、
前記領域指定受付手段は、前記三次元オブジェクト上で始点と終点の指定を受け付けた場合、高さデータの二次元座標において、前記始点から前記終点まで延びる線分の位置に対応する座標に対象領域を設定する画像検査システム。
In the image inspection system according to any one of claims 1 to 8.
When the area designation receiving means receives the designation of the start point and the end point on the three-dimensional object, the target area is the coordinate corresponding to the position of the line segment extending from the start point to the end point in the two-dimensional coordinates of the height data. Image inspection system to set.
請求項1から9のいずれか1つに記載の画像検査システムにおいて、
前記取得部は、取得した高さデータに基づいて高さ画像を生成し、
前記表示手段は、前記取得部により生成された高さ画像と、前記オブジェクト生成手段で生成された三次元オブジェクトとを前記モニタに切替表示可能に構成され、
前記領域指定受付手段は、前記取得部により生成された高さ画像上で、画像検査の対象となる対象領域の指定を受け付ける画像検査システム。
In the image inspection system according to any one of claims 1 to 9.
The acquisition unit generates a height image based on the acquired height data, and generates a height image.
The display means is configured so that the height image generated by the acquisition unit and the three-dimensional object generated by the object generation means can be switched and displayed on the monitor.
The area designation receiving means is an image inspection system that receives designation of a target area to be image-inspected on a height image generated by the acquisition unit.
請求項1から10のいずれか1つに記載の画像検査システムにおいて、
前記設定装置は、前記領域設定手段により高さデータに対して設定された対象領域に対して画像処理を行う画像処理部と、該画像処理部により画像処理された画像に基づいて外観検査を行う検査部とを備えている画像検査システム。
In the image inspection system according to any one of claims 1 to 10.
The setting device performs an visual inspection based on an image processing unit that performs image processing on a target area set for height data by the area setting means and an image that has been image-processed by the image processing unit. An image inspection system equipped with an inspection unit.
請求項1から11のいずれか1つに記載の画像検査システムにおいて、
前記設定装置は、前記領域指定受付手段で受け付けた対象領域からなる設定項目と、該設定項目の設定値が格納される場所を示すレジスタ情報とが記述されたファイルを外部から取得してユーザにより設定された該設定項目の設定値と、該ファイルに含まれる該設定項目に対応するレジスタ情報とを前記画像検査用撮像装置に送信可能に構成され、
前記画像検査用撮像装置は、前記設定装置から受信した前記設定項目の設定値を、該設定項目に対応するレジスタ情報が示す場所に格納する画像検査システム。
In the image inspection system according to any one of claims 1 to 11.
The setting device externally acquires a file in which a setting item consisting of a target area received by the area designation receiving means and register information indicating a place where a setting value of the setting item is stored are stored by a user. It is configured so that the set value of the set item and the register information corresponding to the set item included in the file can be transmitted to the image inspection imaging apparatus.
The image inspection imaging device is an image inspection system that stores the setting values of the setting items received from the setting device in a place indicated by register information corresponding to the setting items.
JP2020089468A 2020-05-22 2020-05-22 Image Inspection System Active JP7474636B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020089468A JP7474636B2 (en) 2020-05-22 2020-05-22 Image Inspection System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020089468A JP7474636B2 (en) 2020-05-22 2020-05-22 Image Inspection System

Publications (2)

Publication Number Publication Date
JP2021184180A true JP2021184180A (en) 2021-12-02
JP7474636B2 JP7474636B2 (en) 2024-04-25

Family

ID=78767418

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020089468A Active JP7474636B2 (en) 2020-05-22 2020-05-22 Image Inspection System

Country Status (1)

Country Link
JP (1) JP7474636B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005172805A (en) * 2003-11-21 2005-06-30 Olympus Corp Sample information measuring method and scanning type confocal microscope
JP2017227612A (en) * 2016-06-24 2017-12-28 株式会社キーエンス Three-dimensional measurement device
JP2018521370A (en) * 2015-03-17 2018-08-02 ゼネラル・エレクトリック・カンパニイ Method and apparatus for displaying a two-dimensional image of a viewing object simultaneously with an image for drawing a three-dimensional shape of the viewing object
JP2020035119A (en) * 2018-08-29 2020-03-05 ファナック株式会社 Distance image display device and distance image display method
JP2020046394A (en) * 2018-09-21 2020-03-26 株式会社キーエンス Three-dimensional shape measuring device and three-dimensional shape measuring program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005172805A (en) * 2003-11-21 2005-06-30 Olympus Corp Sample information measuring method and scanning type confocal microscope
JP2018521370A (en) * 2015-03-17 2018-08-02 ゼネラル・エレクトリック・カンパニイ Method and apparatus for displaying a two-dimensional image of a viewing object simultaneously with an image for drawing a three-dimensional shape of the viewing object
JP2017227612A (en) * 2016-06-24 2017-12-28 株式会社キーエンス Three-dimensional measurement device
JP2020035119A (en) * 2018-08-29 2020-03-05 ファナック株式会社 Distance image display device and distance image display method
JP2020046394A (en) * 2018-09-21 2020-03-26 株式会社キーエンス Three-dimensional shape measuring device and three-dimensional shape measuring program

Also Published As

Publication number Publication date
JP7474636B2 (en) 2024-04-25

Similar Documents

Publication Publication Date Title
JP7222796B2 (en) Image inspection system and image inspection method
JP2018205005A (en) Image inspection device
JP2021177186A (en) Three-dimensional image processing device and three-dimensional image processing method
JP7188870B2 (en) Image inspection equipment
JP2018204994A (en) Image inspection device
US11012612B2 (en) Image inspection system and image inspection method
JP6791631B2 (en) Image generation method and inspection equipment
JP2018205004A (en) Image inspection device
JP6571831B2 (en) Appearance inspection device
JP7402745B2 (en) Imaging device and image inspection system
JP7474636B2 (en) Image Inspection System
JP6571830B2 (en) Appearance inspection device
JP2020169950A (en) Image inspection system
JP6334861B2 (en) Appearance inspection apparatus, appearance inspection method, appearance inspection program, and computer-readable recording medium
JP7273659B2 (en) Image measurement system
JP7231461B2 (en) Image inspection system and image inspection method
JP7306857B2 (en) Image inspection system
JP2018205001A (en) Image inspection device
JP2018204995A (en) Image inspection device
JP7306858B2 (en) Image inspection system and image inspection method
JP7222795B2 (en) Image inspection system and image inspection method
JP2018205000A (en) Image inspection device
JP7311360B2 (en) Image measurement system
KR102171773B1 (en) Inspection area determination method and visual inspection apparatus using the same
CN110278384B (en) Image processing system, image processing apparatus, image processing method, and computer readable medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231031

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231222

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240415

R150 Certificate of patent or registration of utility model

Ref document number: 7474636

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150