JP7474636B2 - Image Inspection System - Google Patents

Image Inspection System Download PDF

Info

Publication number
JP7474636B2
JP7474636B2 JP2020089468A JP2020089468A JP7474636B2 JP 7474636 B2 JP7474636 B2 JP 7474636B2 JP 2020089468 A JP2020089468 A JP 2020089468A JP 2020089468 A JP2020089468 A JP 2020089468A JP 7474636 B2 JP7474636 B2 JP 7474636B2
Authority
JP
Japan
Prior art keywords
image
height
setting
image inspection
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020089468A
Other languages
Japanese (ja)
Other versions
JP2021184180A (en
Inventor
典正 眞弓
毅 山上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Keyence Corp
Original Assignee
Keyence Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Keyence Corp filed Critical Keyence Corp
Priority to 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

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

Description

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

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

特開2019-168285号公報JP 2019-168285 A

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

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

また、高さ画像と同時に撮像された検査対象物の二次元画像と、上記人工的に着色された高さ画像とを合成して表示する場合がある。これにより、検査対象物の部位と高さとの関係を把握し易くなる反面、高低差を示す色と検査対象物の実際の表面色とが混ざってしまうので、高低差を把握しにくくなる。 In some cases, a two-dimensional image of the object being inspected, captured simultaneously with the height image, is synthesized and displayed with the artificially colored height image. While this makes it easier to grasp the relationship between the parts of the object being inspected and their height, it also makes it more difficult to grasp the height difference, since the color indicating the height difference is mixed with the actual surface color of the object being inspected.

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

本発明は、かかる点に鑑みてなされたものであり、その目的とするところは、画像検査の対象となる対象領域を容易に把握でき、ひいては使い勝手を向上させることにある。 The present invention was made in consideration of these points, and its purpose is to make it easier to grasp the target area that is the subject of image inspection, thereby improving usability.

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

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

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

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

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

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

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

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

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

第4の開示では、前記図形要素は、半透明であってもよい。この構成によれば、図形要素の向こう側にある三次元オブジェクトも視認することが可能になるので、対象領域の指定が容易になる。 In the fourth disclosure, the graphic element may be semi-transparent. This configuration makes it possible to visually recognize three-dimensional objects behind the graphic element, making it easier to specify a target area.

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

すなわち、図形要素ないし線分の高さ方向の寸法が無用に長くなると高さ画像が見にくくなることが考えられ、また、図形要素ないし線分の高さ方向の寸法が短すぎると図形要素ないし線分を確認できなくなることが考えられる。本開示では、図形要素ないし線分の高さ方向の寸法が無用に長くなることや、短すぎることがなくなるので、視点の位置の特定が容易になる。 In other words, if the height dimension of a graphic element or line segment is unnecessarily long, it may be difficult to see the height image, and if the height dimension of a graphic element or line segment is too short, it may be impossible to confirm the graphic element or line segment. With this disclosure, the height dimension of a graphic element or line segment will not be unnecessarily long or too short, making it easier to identify the position of the viewpoint.

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

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

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

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

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

すなわち、視点特定要素は、画像検査の対象となる対象領域を、二次元座標上に配置された高さデータに設定する際に表示される要素であることから、三次元オブジェクトのX方向またはY方向に移動させればよく、視点が位置する方向(三次元オブジェクトの高さ方向)へ移動させる必要はなく、仮に視点特定要素を三次元オブジェクトの高さ方向に移動可能にすると、対象領域の設定操作が煩雑になることが考えられる。本開示では、視点特定要素を三次元オブジェクトのX方向またはY方向にのみ移動可能であるため、対象領域の設定操作が容易になる。 In other words, because the viewpoint identification element is an element that is displayed when setting the target area to be subject to image inspection to height data arranged on two-dimensional coordinates, it only needs to be moved in the X or Y direction of the three-dimensional object, and there is no need to move it in the direction in which the viewpoint is located (the height direction of the three-dimensional object); if the viewpoint identification element were movable in the height direction of the three-dimensional object, it is thought that the operation of setting the target area would become cumbersome. In the present disclosure, the viewpoint identification element can be moved only in the X or Y direction of the three-dimensional object, making the operation of setting the target area easier.

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

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

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

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

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

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

ユーザが画像検査の対象となる対象領域を設定すると、画像検査の対象となる対象領域の座標や大きさが設定値になり、対象領域という設定項目と、その座標や大きさとがレジスタ情報とともに撮像装置に送信される。これにより、撮像装置における設定が行われるので、標準化規格に適合した撮像装置であれば設定装置で上記設定を自由に変更することができ、撮像装置の機種選定の自由度が向上する。 When a user sets a target area for image inspection, the coordinates and size of the target area for image inspection become the setting values, and the setting item of the target area, its coordinates and size, together with register information, are sent to the imaging device. This allows the settings to be made in the imaging device, so that if the imaging device complies with standardization specifications, the above settings can be freely changed in the setting device, improving the freedom of selection of imaging device models.

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

本発明の実施形態1に係る画像検査システムの概略構成及び運用状態を模式的に示す図である。1 is a diagram illustrating a schematic configuration and an operational state of an image inspection system according to a first embodiment of the present invention; 実施形態2に係る図1相当図である。FIG. 10 is a view corresponding to FIG. 1 according to a second embodiment. 実施形態3に係る図1相当図である。FIG. 10 is a view corresponding to FIG. 1 according to a third embodiment. 実施形態4に係る図1相当図である。FIG. 10 is a view corresponding to FIG. 1 according to a fourth embodiment. デフレクトメトリの原理に基づいて高さ画像を生成する手順を示すフローチャートである。1 is a flowchart showing a procedure for generating a height image based on the principle of deflectometry. フォトメトリックステレオ法を利用して高さ画像を生成する実施形態5に係る図1相当図である。FIG. 11 is a view corresponding to FIG. 1 according to a fifth embodiment in which a height image is generated using a photometric stereo method. 画像検査アプリケーションとカメラとの接続インターフェースを説明する図である。FIG. 2 is a diagram illustrating a connection interface between an image inspection application and a camera. 撮像装置の内部処理の一例を概念的に示すフローチャートである。10 is a flowchart conceptually illustrating an example of internal processing of the imaging device. デフレクトメトリの原理を利用した検査画像の生成を行う場合のパラメータセットを示す図である。FIG. 13 is a diagram showing a parameter set for generating an inspection image using the principle of deflectometry. マルチスペクトルイメージングにより検査画像の生成を行う場合のパラメータセットを示す図である。FIG. 13 is a diagram showing a parameter set when generating an inspection image by multispectral imaging. 検査設定部のブロック図である。FIG. 4 is a block diagram of an inspection setting unit. 対象領域の新規作成手順の例を示すフローチャートである。13 is a flowchart illustrating an example of a procedure for creating a new target region. 3Dヒット判定の概念図である。FIG. 13 is a conceptual diagram of a 3D hit determination. 直線状の対象領域の新規作成を三次元表示または二次元表示上で行う場合を説明する図である。13A and 13B are diagrams illustrating a case where a new linear target region is created on a three-dimensional display or a two-dimensional display. 矩形状の対象領域の新規作成を三次元表示または二次元表示上で行う場合を説明する図である。13A and 13B are diagrams illustrating a case where a new rectangular target region is created on a three-dimensional display or a two-dimensional display. 対象領域の変更手順の第1段階を示すフローチャートである。13 is a flow chart showing a first stage of a procedure for modifying a region of interest. 対象領域の変更手順の第2段階を示すフローチャートである。13 is a flow chart showing a second stage of the target region modification procedure. 3Dヒット判定の概念図である。FIG. 13 is a conceptual diagram of a 3D hit determination. 2Dヒット判定の概念図である。FIG. 13 is a conceptual diagram of 2D hit determination. 直線状の対象領域の位置調整を行う具体例1を示す図である。FIG. 13 is a diagram showing a specific example 1 of adjusting the position of a linear target region. 直線状の対象領域の位置調整を行う具体例2を示す図である。FIG. 11 is a diagram showing a specific example 2 of adjusting the position of a linear target region. 矩形状の対象領域の位置調整を行う具体例を示す図である。13A and 13B are diagrams showing a specific example of adjusting the position of a rectangular target area. 運用時に直線状の対象領域で段差計測する手順の例を示すフローチャートである。13 is a flowchart showing an example of a procedure for measuring a step in a linear target area during operation. 運用時に矩形状の対象領域で傷検査する手順の例を示すフローチャートである。13 is a flowchart showing an example of a procedure for inspecting a rectangular target area for flaws during operation. 運用時に矩形状の対象領域で高さ検査する手順の例を示すフローチャートである。13 is a flowchart illustrating an example of a procedure for inspecting height in a rectangular target area during operation. 運用時に円弧状の対象領域で賞味期限検査する手順の例を示すフローチャートである。13 is a flowchart illustrating an example of a procedure for inspecting an expiration date in an arc-shaped target area during operation. 運用時に円弧状の対象領域で刻印判別する手順の例を示すフローチャートである。13 is a flowchart showing an example of a procedure for determining engraving in an arc-shaped target area during operation.

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

(実施形態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 is a schematic diagram showing an operation state of an image inspection system 1 according to an embodiment of the present invention. The image inspection system 1 is configured to inspect the presence or absence of defects in a workpiece W, which is an inspection object, using an image of the workpiece W captured, and includes an illumination device 2 for illuminating the workpiece W, an imaging unit 3 for capturing an image of the workpiece W, and a setting device 4 configured by a personal computer (PC) or the like for setting the imaging unit 3. The workpiece W can also be called an imaging object, since it is an object to be captured by the imaging unit 3. The illumination device 2 and the imaging unit 3 constitute an acquisition unit A for acquiring height data. The imaging device 300 for image inspection, which constitutes a part of the image inspection system 1, is a device including the acquisition unit A. The imaging device 300 and the setting device 4 may be separate, and the imaging 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 such as an organic EL display or a liquid crystal display, and is a portion capable of displaying images captured by the imaging device 300, images after various processing of the images captured by the imaging device 300, various user interface images (GUI), etc. The various user interface images, etc. are generated in the main body of the setting device 4. The horizontal direction of the display unit 5 can be the X direction of the display unit 5, and the vertical direction of the display unit 5 can be the Y direction of the display unit 5.

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

図1では、複数のワークWが搬送用ベルトコンベアBの上面に載置された状態で図1における白抜き矢印で示す方向へ搬送されている場合を示している。設定装置4には、搬送用ベルトコンベアB及び画像検査システム1をシーケンス制御するための機器として、プログラマブル・ロジック・コントローラ(PLC)等からなる外部制御機器8が接続されている。この外部制御機器8は、画像検査システム1の一部を構成するものとしてもよい。また、外部制御機器8は、画像検査システム1の構成要素としなくてもよい。 Figure 1 shows a case where multiple workpieces W are placed on the upper surface of the transport belt conveyor B and transported in the direction indicated by the white arrow in Figure 1. An external control device 8 consisting of a programmable logic controller (PLC) or the like is connected to the setting device 4 as a device for sequence control of the transport belt conveyor B and the image inspection system 1. This external control device 8 may be configured as part of the image inspection system 1. In addition, 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 direction in which the workpiece W is transported by the transport belt conveyor B (the direction in which the workpiece W moves) is defined as the Y direction, the direction perpendicular to the Y direction in a plan view of the transport belt conveyor B is defined as the X direction, and the direction perpendicular to the X direction and the Y direction (the direction perpendicular to the upper surface of the transport belt conveyor B) is defined as the Z direction, but this definition is provided merely for the convenience of description.

画像検査システム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 workpiece W, that is, for inspecting the surface of the workpiece W for defects such as scratches, dirt, and dents, and can also determine the quality of the workpiece W from the inspection results. During operation, the image inspection system 1 receives an inspection start trigger signal that specifies the start timing of a defect inspection (quality determination inspection) from the external control device 8 via a signal line. The image inspection system 1 performs imaging and illumination of the workpiece W based on this inspection start trigger signal, and obtains an inspection image after predetermined processing. Then, an appearance inspection is performed based on the inspection image, and the inspection result is transmitted to the external control device 8 via a signal line. In this way, during operation of the image inspection system 1, the input of the inspection start trigger signal and the output of the inspection result are repeatedly performed between the image inspection system 1 and the external control device 8 via a signal line. Note that the input of the inspection start trigger signal and the output of the inspection result may be performed via a signal line between the image inspection system 1 and the external control device 8 as described above, or may be performed via other signal lines not shown. For example, a sensor for detecting the arrival of the workpiece W may be directly connected to the image inspection system 1, and an inspection start trigger signal may be input from the sensor to the image inspection system 1. The image inspection system 1 may also be configured to automatically generate a trigger signal internally to perform the inspection.

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

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

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

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

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

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

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

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

(照明装置2の構成)
まず、照明装置2ついて説明する。照明装置2は、ワークWに対して所定の投影パターンを有する構造化照明を投光する投光部であり、発光部2aと、発光部2aを制御する照明制御部2bとを備えている。発光部2aと照明制御部2bとは、別体であってもよいし、一体化されたものであってもよい。また、照明制御部2bは、設定装置4に組み込まれていてもよい。発光部2aは、たとえば発光ダイオード、液晶パネルを用いたプロジェクタ、有機ELパネル、デジタルマイクロミラーデバイス(DMD)等で構成することができ、照明部と呼ぶこともできる。発光ダイオード、液晶パネル、有機ELパネル、DMDについては図示しないが、従来から周知の構造のものを用いることができる。照明装置2は、設定装置4に対して信号線100aを介して接続されており、撮像部3及び設定装置4から離して設置することができるようになっている。
(Configuration of Illumination Device 2)
First, the illumination device 2 will be described. The illumination device 2 is a light projection unit that projects structured illumination having a predetermined projection pattern onto the workpiece W, and includes a light emitting unit 2a and an illumination control unit 2b that controls the light emitting unit 2a. The light emitting unit 2a and the illumination control unit 2b may be separate or integrated. The illumination control unit 2b may be incorporated into the setting device 4. The light emitting unit 2a may be configured, for example, with a light emitting diode, a projector using a liquid crystal panel, an organic EL panel, a digital micromirror device (DMD), or the like, and may 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 may be used. The illumination device 2 is connected to the setting device 4 via a signal line 100a, and can be installed away from the imaging 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 uniform surface emission. The lighting device 2 is also configured to be capable of performing illumination capable of performing deflectometry processing, as an example of structured illumination having a predetermined projection pattern, and therefore has a light-emitting unit 2a that irradiates the workpiece W with pattern light having a periodic illuminance distribution. In other words, the lighting device 2 can be a pattern light illumination unit that performs pattern light illumination that sequentially irradiates the workpiece W with a plurality of different pattern lights. Below, we will explain the lighting device 2 used when acquiring an inspection image including height data by performing deflectometry processing.

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

また、明暗がX方向に変化するX方向パターン光の場合、縞模様がX方向に繰り返されるパターン光という表現とすることもでき、このX方向パターン光を生成する際には、照度分布の位相をX方向にシフトさせることにより、照度分布の位相が異なった複数のX方向パターン光を生成することができる。X方向パターン光の照度分布をsin波形に近似した波形で表すこともでき、この場合、たとえば位相を90゜ずつ変化させて、0゜の場合のX方向パターン光、90゜の場合のX方向パターン光、180゜の場合のX方向パターン光、270゜の場合のX方向パターン光を生成することができる。つまり、照明装置2は、異なる照明態様でワークWを照明することができる。デフレクトメトリ処理を行う場合、ワークWに照射するパターン光はsin波形だけでなく、三角波等のパターン光でも可能である。 In addition, in the case of X-direction pattern light in which light and darkness change in the X direction, it can also be expressed as a pattern light in which stripes are repeated in the X direction, and when generating this X-direction pattern light, the phase of the illuminance distribution can be shifted in the X direction to generate multiple X-direction pattern lights with different phases of illuminance distribution. The illuminance distribution of the X-direction pattern light can also be expressed as a waveform that approximates a sine wave, and in this case, for example, by changing the phase by 90 degrees, it is possible to generate X-direction pattern light for 0 degrees, X-direction pattern light for 90 degrees, X-direction pattern light for 180 degrees, and X-direction pattern light for 270 degrees. In other words, the lighting device 2 can illuminate the workpiece W in different lighting modes. When performing deflectometry processing, the pattern light irradiated to the workpiece W can be not only a sine wave but also a triangular wave pattern light or the like.

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

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

また、後述するが、フォトメトリックステレオ法を利用して検査用画像を生成する場合に用いる照明装置2は、少なくとも3以上の異なる方向から照明を個別に照射可能な照明装置を用いることができる。また、照明装置2は、マルチスペクトル照明が可能に構成された照明装置であってもよく、照明装置2の構成は特に限定されるものではない。 As will be described later, the lighting device 2 used when generating an inspection image using the photometric stereo method can be a lighting device capable of individually irradiating light from at least three different directions. The lighting device 2 may also be a lighting device configured to be capable of 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から離して設置することができるようになっている。
(Configuration of imaging unit 3)
Next, the imaging unit 3 will be described. The imaging unit 3 has a camera 31, a light collecting optical system 32, and an imaging control unit 33. The imaging 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 consisting of an image sensor 31d such as a CCD or CMOS that converts the intensity of light obtained through the light collecting optical system 32 into an electrical signal. The camera 31 is an image generating unit that obtains a luminance image according to the amount of reflected light received from the workpiece W, and receives the light reflected by the workpiece W from the structured illumination projected by the illumination device 2 to generate multiple pattern projection images. The imaging control unit 33 has a storage device and a signal processing device, and is a part that controls the start and end of exposure of the camera 31, controls the exposure time, adjusts the analog gain, etc. An internal logic circuit can control the driving of the image sensor and the transfer of image data. The imaging control unit 33 can also perform various image processing, filter processing, image generation, etc., and the imaging unit 3 is a device that has 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 focusing optical system 32 is an optical system for focusing light incident from the outside, and typically has one or more optical lenses. The focusing optical system 32 is configured to be capable of performing autofocus. The positional relationship between the imaging unit 3 and the illumination device 2 can be set so that the light irradiated from the illumination device 2 toward the surface of the workpiece W is reflected on the surface of the workpiece W and enters the focusing optical system 32. When the workpiece W is a member having translucency such as a transparent film or sheet, the positional relationship between the imaging unit 3 and the illumination device 2 can be set so that the pattern light irradiated from the illumination device 2 toward the surface of the workpiece W passes through the workpiece W and enters the focusing optical system 32 of the imaging unit 3. In any of the above cases, the imaging unit 3 and the illumination device 2 are arranged so that the specular reflection component and the diffuse reflection component reflected on the surface of the workpiece W enter the focusing optical system 32 of the imaging unit 3. Additionally, the imaging unit 3 can use a line camera in which light receiving elements are arranged in a straight line in the Y direction, but instead of a line camera, an area camera (a camera in which light receiving elements are arranged in a line in the X and Y directions) can also be used, and in the case of this area camera, a lighting form known as coaxial lighting is also possible.

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

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

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

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

図5に一例を示すように、照明装置2の発光部2aは、第1発光部21、第2発光部22、第3発光部23及び第4発光部24を備えており、これら第1~第4発光部21~24がそれぞれパターン投影可能になっている。 As shown in an example 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, and each of the first to fourth light-emitting units 21 to 24 is capable of projecting 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. 5. When the first light-emitting unit 21 of the lighting device 2 irradiates the workpiece W with four pattern lights according to the spatial code method, the imaging unit 3 generates a gray code pattern image set consisting of four different images. When the first light-emitting unit 21 of the lighting device 2 irradiates the workpiece W with eight pattern lights according to the phase shift method, the imaging 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 workpiece W with pattern light according to the spatial code method, a Gray code pattern image set is generated, and when the workpiece W is irradiated with pattern light according to the phase shift method, 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 workpiece W with pattern light according to the spatial code method, a gray code pattern image set is generated, and when the workpiece W is irradiated with pattern light according to the phase shift method, 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 workpiece W with pattern light according to the spatial code method, a gray code pattern image set is generated, and when the workpiece W is irradiated with pattern light according to the phase shift method, a phase shift pattern image set is generated.

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

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

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

なお、位相シフト法のみで高さ測定を行うようにしてもよい。この場合は、高さの測定ダイナミックレンジが狭くなるので、位相が1周期以上ずれてしまうような高さの相違が大きいワークWの場合は、高さの測定が正しく行えない。逆に、高さの変化が小さなワークWの場合は、空間コード法による縞画像の撮像や合成を行わないので、その分だけ処理を高速化することができるメリットがある。例えば、高さ方向の差異が少ないワークWを測定する際には、ダイナミックレンジを大きく取る必要がないため、位相シフト法のみでも高精度な高さ測定性能を維持しつつ、処理時間を短くすることができる。また、絶対高さは判るので空間コード法のみで高さ測定するように構成してもよい。この場合、コードを増やすことによって精度を高めることができる。 Height measurement may be performed using only the phase shift method. In this case, the dynamic range of height measurement is narrowed, so in the case of a workpiece W with a large difference in height that causes the phase to shift by one period or more, the height cannot be measured correctly. Conversely, in the case of a workpiece W with a small change in height, the fringe images are not captured or synthesized using the spatial code method, which has the advantage of speeding up processing accordingly. For example, when measuring a workpiece W with a small difference in height, there is no need to take a large dynamic range, so the processing time can be shortened while maintaining high-precision height measurement performance using only the phase shift method. Also, since the absolute height can be determined, the height may be measured using only the spatial code method. In this case, the accuracy can be improved by increasing the number of codes.

絶対位相画像は、各画素がワーク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 irradiation angle information of the pattern light on the workpiece W. That is, since the first pattern image set (phase shift pattern image set) includes eight first pattern images captured by shifting the phase of the sine wave stripe pattern, by using the phase shift method, each pixel has irradiation angle information of the pattern light on the workpiece W. In other words, based on multiple first pattern images, a first angle image can be generated in which each pixel has irradiation angle information of the first measurement pattern light on the workpiece W. The first angle image is an image that visualizes the angle of light irradiated from the first light-emitting unit 21 to the workpiece W.

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

図5における中間画像の最も上の画像が第1角度画像であり、上から2番目の画像が第2角度画像であり、上から3番目の画像が第3角度画像であり、一番下の画像が第4角度画像である。各角度画像の真っ黒に塗りつぶされたように見える部分が照明の影になっている部分であり、角度情報の無い無効画素となる。 The top intermediate image in Figure 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 is the fourth angle image. The areas that appear to be painted completely black in each angle image are areas that are in the shadow of the lighting, and are invalid pixels with no angle information.

第1角度画像と第2角度画像とによって第1高さ画像を生成でき、また、第3角度画像と第4角度画像とによって第2高さ画像を生成できる。その後、第1高さ画像と第2高さ画像とを合成して合成後高さ画像を生成できる。これにより、合成後高さ画像では無効画素の数を少なくすることができる。 The first height image can be generated from the first angle image and the second angle image, and the second height image can be generated from the third angle image and the fourth angle image. The first height image and the second height image can then be synthesized to generate a synthesized height image. This makes it possible to reduce the number of invalid pixels in the synthesized height image.

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

以下、フォトメトリックステレオ法を利用して検査用画像を生成する具体的な方法について、図6を参照しながら、実施形態1と同じ部分には同じ符合を付して説明を省略し、異なる部分について詳細に説明する。 The specific method for generating an inspection image using the photometric stereo method will be described below with reference to FIG. 6. The same parts as in embodiment 1 are designated by the same reference numerals and their explanations are omitted, and the differences 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 similarly to the image inspection system disclosed in, for example, JP 2015-232486 A. That is, the image inspection system 1 includes an imaging unit 3 that images the workpiece W from a certain direction, and an illumination device 200 that illuminates the workpiece W from three or more different illumination directions, and also includes at least a display unit 5, keyboard 6, and mouse 7 similar to those of the first embodiment. The imaging unit 3 and illumination device 200 constitute an acquisition unit A.

照明装置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 workpiece W with light from different directions, and has first to fourth light-emitting units 201 to 204, and a lighting control unit 205 that controls the first to fourth light-emitting units 201 to 204. This lighting device 200 is a part that performs multi-directional lighting that irradiates the workpiece W with light from different directions, and is configured to be able to project structured lighting having a predetermined projection pattern. The first to fourth light-emitting units 201 to 204 are arranged to surround the workpiece W with a gap between them. The first to fourth light-emitting units 201 to 204 can be light-emitting diodes, incandescent bulbs, fluorescent lamps, etc. Also, the first to fourth light-emitting units 201 to 204 may be separate or 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 the imaging unit 3 captures the workpiece W when any of the first to fourth light-emitting units 201 to 204 is turned on. For example, when the lighting device 200 receives the first lighting trigger signal, the lighting control unit 205 turns on only the first light-emitting unit 201. At this time, the imaging unit 3 captures the workpiece W at the timing when the imaging trigger signal is received and light is irradiated. When the lighting device 200 receives the second lighting trigger signal, the lighting control unit 205 turns on only the second light-emitting unit 202, and at this time the imaging unit 3 captures the workpiece W. In this way, four luminance images can be obtained. Note that the number of lights is not limited to four, and can be any number as long as it is three or more and can illuminate the workpiece W from different directions.

そして、撮像部3によって撮像された複数の輝度画像同士で対応関係にある画素毎の画素値を用いて、各画素のワークWの表面に対する法線ベクトルを算出する。算出された各画素の法線ベクトルに対してX方向及びY方向に微分処理を施し、ワークWの表面の傾きの輪郭を示す輪郭画像を生成する。また、算出された各画素の法線ベクトルから、法線ベクトルと同個数の各画素のアルベドを算出し、アルベドから、ワークWの表面の傾き状態を除去した模様を示すテクスチャ描出画像を生成する。この手法は周知の手法であることから詳細な説明は省略する。複数の輝度画像をフォトメトリックステレオの原理に基づいて合成することで、ワークWの形状を示す形状画像(高さ画像)を生成することができる。 Then, the normal vector of each pixel relative to the surface of the workpiece W is calculated using the pixel values of each pixel that correspond to each other in the multiple luminance images captured by the imaging unit 3. Differentiation processing is performed in the X and Y directions on the calculated normal vector of each pixel to generate a contour image that shows the contour of the inclination of the surface of the workpiece W. In addition, the albedo of each pixel, the same number of pixels as the normal vector, is calculated from the calculated normal vector of each pixel, and a texture rendering image is generated from the albedo to show a pattern with the inclination of the surface of the workpiece W removed. Since this method is well known, a detailed description is omitted. A shape image (height image) showing the shape of the workpiece W can be generated by synthesizing multiple luminance images based on the principle of photometric stereo.

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

撮像部3は、光が照射されるタイミングでワークWを撮像して複数の輝度画像を得る。そして、複数の輝度画像を合成して検査用画像を得ることができる。これをマルチスペクトルイメージングと呼ぶ。尚、照射する光には紫外線や赤外線も含むことができる。 The imaging unit 3 captures images of the workpiece W at the timing when light is irradiated, obtaining multiple brightness images. The multiple brightness images can then be synthesized to obtain an image for inspection. This is called multispectral imaging. The irradiated light can also include ultraviolet 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 camera 31 in the first to fifth embodiments is a GenIcam-compliant camera that complies with the GenIcam standard. The GenIcam standard is a standard that standardizes the connection interface between a PC application and the camera 31, and as shown in FIG. 7, it is a standard that mainly controls the camera 31 from an image inspection application 40 constructed on a personal computer that is the main body of the setting device 4, and standardizes an interface that acquires an image captured by the camera 31 with the image inspection application 40 of the setting device 4. If both the imaging unit 3 and the image inspection application 40 of the setting device 4 are compatible with 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 on a personal computer. In this embodiment, a case will be described in which the camera 31 and the setting device 4 are compatible with the GenIcam standard as a standardized standard, but the standardized standard is not limited to the GenIcam standard and may be another standardized standard.

画像検査アプリケーション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と呼ばれる)に対応したレジスタアドレスを割り出すことができる。 If we consider the case where the image inspection application 40 is decomposed into a hierarchical structure, the GenIcam layer 41 is positioned as an intermediate layer located between the upper layer (inspection unit 4A, image processing unit 4B) that actually performs image inspection, defect inspection, etc. in the image inspection application 40, and layer 42 that performs control based on a specific network communication standard. The GenIcam layer 41 can be roughly classified into two parts, GenApi 41a and GenTL (TL: Transport Layer) 41b. GenApi 41a is a part that converts the setting items of the camera 31 and the register addresses inside the camera 31. With this GenApi 41a, the image inspection application 40 can abstractly specify a setting item as an argument, such as "ExposureTime" for exposure time or "AnalogGain" for analog gain, without specifying a specific address of the camera 31, and when connected to the camera 31, it can derive the register address corresponding to that string (called Feature) by analyzing a file called DeviceXML (details of which will be described later) obtained from the camera 31.

GenTL41bは、画像検査アプリケーション40とカメラ31との間のデータの転送を制御するインターフェース(API)を規定したものであり、具体的には、カメラ31のレジスタへの書き込み、読み出しAPIの仕様及びカメラ31から転送した画像データの画像検査アプリケーション40の上位の層への受け渡しを行うAPIの仕様を規定したものである。 GenTL41b specifies the interface (API) that controls the transfer of data between the image inspection application 40 and the camera 31. Specifically, it specifies the API specifications for writing to and reading from the registers of the camera 31, and the API specifications for passing image data transferred from the camera 31 to a higher 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 any standard that uses a high-speed network, such as the GigE Vision standard 3A that uses an Ethernet cable 31a and the USB3Vision standard 3B that uses a USB3.0-compatible cable 31b. Thus, the imaging unit 3 and the setting device 4 are connected via a network, which may be a wired network using a high-speed network cable or a wireless network. The network may also be a network using a cable other than the Ethernet cable 31a or 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 specify a specific standard to be used as a physical communication standard, but merely specifies an abstract specification in the form of GenTL 41b. As a lower layer 42 of this GenTL 41b, communication standards are specified using specific communication networks, such as the GigE Vision standard 3A and the USB3Vision standard 3B. The specific communication standard is not limited to the GigE Vision standard 3A and the USB3Vision standard 3B, but it is sufficient that it is compatible with the GenIcam standard. In order to explain the concepts of the GigE Vision standard 3A and the USB3Vision standard 3B, FIG. 7 shows a state in which cameras 31 and 31 compatible with each standard are connected to the setting device 4, but only one of the cameras 31 can be connected to the setting device 4 and used.

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 called DeviceXML (DeviceXML file) 31c is stored in the GenIcam-compliant camera 31. The DeviceXML file 31c is stored in a storage device (internal memory) built into the camera 31. When an image inspection application 40 that complies with the GenIcam standard connects to a camera 31 that is to be configured by the image inspection application 40, the DeviceXML file 31c is read from the camera 31. The DeviceXML file 31c can be read, for example, by downloading the DeviceXML file 31c from the camera 31. The downloaded DeviceXML file 31c is held in GenApi 41a. The DeviceXML file 31c can be downloaded in response to a request from the image inspection application 40 or automatically when connected to the camera 31. The DeviceXML file 31c can be downloaded to the setting device 4, allowing the setting device 4 to acquire the DeviceXML file 31c. It is also possible to obtain the DeviceXML file 31c corresponding to the camera 31 by other means (e.g., downloading from a website) without downloading it from the camera 31 to be connected, and specify this to the GenApi 41a when connecting.

DeviceXMLファイル31cには、カメラ31の内部に保持する全ての設定項目と、各設定項目の設定値が格納されるレジスタアドレス(レジスタ情報)とが関連付けられて記述されている。設定項目はFeatureと呼ばれ、各Featureには、個々のFeatureを特定するための文字列が割り当てられている。各Featureのノードには、具体的なレジスタアドレスが記載されたノードへの参照が記載される。レジスタ情報には、レジスタアドレスや、レジスタを特定する文字列も含まれる。 The DeviceXML file 31c describes all of the setting items stored inside the camera 31 in association with the register addresses (register information) where the setting values of each setting item are stored. The setting items are called Features, and each Feature is assigned a character string to identify the individual Feature. The node for each Feature contains a reference to a node that describes a specific register address. 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 Feature named "ExposureTime" (exposure time setting), whose attribute is instructed to refer to a register address called "ExposureTimeReg", and a certain value is entered as the specific address. Different cameras 31 may have different address values, but the name of the Feature called "ExposureTime" is the same for all cameras 31. In this way, by managing setting items that are common to many cameras 31 under a unified name, it becomes possible for the image inspection application 40 to set and control the cameras 31 without being aware of differences in the models or manufacturers of the cameras 31.

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

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

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

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

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

図8に示すフローチャートは、複数のユニットを縦方向及び横方向にフローチャート形式で並べたものであり、単にフローと呼ぶこともできる。複数のユニットを縦方向にのみ並べたフローチャートであってもよい。図8に示すフローチャートのスタートからエンドに向かって順に処理を実行していくが、途中に分岐ステップSB1を設けることで、分岐させることもできる。分岐した場合には、エンドまでの間に合流ステップSB2を設けることができ、これにより、合流させてからエンドに進むことができる。 The flowchart shown in FIG. 8 has multiple units arranged vertically and horizontally in a flowchart format, and can simply be called a flow. It may also be a flowchart with multiple units arranged only vertically. Processing is executed in order from the start to the end of the flowchart shown in FIG. 8, but branching is also possible by providing a branching step SB1 along the way. If branching occurs, a merging step SB2 can be provided on the way to the end, which allows merging 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 imaging unit 3 may be dynamically changed when the workpiece W is switched or a change in the surrounding environment, such as brightness, is detected. When only a very limited number of parameters, such as the exposure time, are changed, the image inspection application 40 can directly write the corresponding Feature value.

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

パラメータセットは、撮像部3で撮像する際の各種パラメータの組合せを事前に複数パターン保有しておき、それぞれのパターンをパラメータセット番号によって管理できるようにしたものである。例えば、ワークWの品種が3種類あり、それぞれに異なるパラメータで撮像とその後の処理を行いたい場合、パラメータセットを3個用意しておく。 A parameter set is a set of multiple combinations of parameters to be used when capturing images with the imaging unit 3, each of which is stored in advance and can be managed by a parameter set number. For example, if there are three types of workpieces W and it is desired to capture images and process each of them using different parameters, three parameter sets are prepared.

パラメータセットを利用すると、ワークWの撮像を行う前に、次に撮像するワークWの品種に対応したパラメータセット番号を指定するだけで、一連の設定変更を短時間で完了させることができる。画像検査アプリケーション40から見た場合、パラメータセット番号を指定するFeatureは、後述するセレクタの一種と考えることができる。 By using a parameter set, a series of setting changes can be completed in a short time by simply specifying the parameter set number corresponding to the type of workpiece W to be imaged next before imaging the workpiece W. From the perspective of the image inspection application 40, the Feature that specifies the parameter set number can be considered a type of selector, which will be 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 parameters that the imaging unit 3 internally references during operation can be independent or the same. The upper limit on the number of parameter sets that can be set is limited by the parameter storage space in the internal memory provided inside the imaging unit 3.

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

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

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

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

GenICam規格の撮像パラメータを動的に切り替える機能を利用し、図8に示すように複数のパラメータセットを1つのフローチャートにまとめることができる。撮像部3の内部処理フローチャート上で、分岐ステップSB1から合流ステップSB2までの間のフローチャートを形成するユニット群をまとめてパラメータセットと呼ぶ。図8に示す例では、4つのパラメータセット、即ち、第1~第4パラメータセットを有している。つまり、ユーザにより設定された処理を実現するための複数のセレクタの値の組み合わせが複数パターン存在している。第1~第4パラメータセットのいずれを選択するかは、ユーザが設定することができ、たとえば、パラメータセット番号1を選択すると第1パラメータセットが自動的に選択される。 By utilizing the function of dynamically switching imaging parameters of the GenICam standard, multiple parameter sets can be combined into one flowchart as shown in FIG. 8. In the internal processing flowchart of the imaging unit 3, a group of units forming the flowchart from branching step SB1 to merging step SB2 are collectively called a parameter set. In the example shown in FIG. 8, there are four parameter sets, namely, the first to fourth parameter sets. In other words, there are multiple patterns of combinations of values of multiple selectors to realize the processing set by the user. The user can set which of the first to fourth parameter sets to select; for example, when 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 starting the flow chart shown in FIG. 8, in branching step SB1, the process passes through each unit constituting one of the first to fourth parameter sets, then merges at merge step SB2, and can proceed to the end. If parameter set number 1 is selected, the branch number becomes 1 in branching step SB1, and each process of the first parameter set is executed. If parameter set number 2 is selected, the branch number becomes 2 in branching step SB1, and each process of the second parameter set is executed. If parameter set number 3 is selected, the branch number becomes 3 in branching step SB1, and each process of the third parameter set is executed. If parameter set number 4 is selected, the branch number becomes 4 in branching 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 parameter sets are shown in FIG. 9 and FIG. 10. FIG. 9 shows a parameter set for generating an inspection image using the principle of deflectometry. In order to generate an inspection image using the principle of deflectometry, the unit UA1 executes multiple imaging processes with one trigger signal, the unit UA2 executes expansion filter processing, the unit UA3 executes averaging filter processing, and the unit UA4 executes gray-scale inversion processing. In other words, the multi-stage processing defined by the parameter set including filter processing is sequentially executed on the image captured by the unit UA1. Thereafter, the unit UA5 transfers the image data on which the multi-stage processing has been sequentially executed to the PC, that is, outputs it to the setting device 4, which is an external device. The image data may be stored internally without being transferred. Depending on the parameter set, it may be set so that the multi-stage processing is not performed. 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 judgment. The algorithm for defect inspection and pass/fail judgment can be a conventionally known one.

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

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

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

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

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

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

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

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

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

図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. The 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. Setting items include, for example, position correction settings and filter processing settings, and as Features corresponding to position correction settings, a section for selecting whether or not to enable position correction and a section for selecting the type of position correction tool are assigned. In addition, as Features corresponding to filter processing settings, a section for selecting and adjusting the type of selected filter and parameters related to filter settings such as extraction size and extraction color are assigned.

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

セレクタの値からアクセス対象のユニットを特定する方法は、以下の方法を使用することができる。すなわち、前処理モジュールは複数のユニットから構成されており、前処理モジュールのインデックスを切り替えるセレクタは、これらユニットで共通したものを使用することができ、前処理モジュールを構成する複数のユニットに対して、どのFeatureがどのユニットに属するかは、Feature名称によって一意に定まるように命名することが可能である。これにより、セレクタの値と、編集対象として選択されているFeatureの組合せからアクセス対象のユニットを特定することができる。 The following method can be used to identify the unit to be accessed from the selector value. That is, a pre-processing module is made up of multiple units, and a selector that switches the index of the pre-processing module can be used that is common to these units, and it is possible to name the multiple units that make up the pre-processing module so that which Feature belongs to which unit is uniquely determined by the Feature name. This makes it possible to identify the unit to be accessed from the combination of the selector value and the Feature selected to be edited.

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

また、セレクタの値の組合せによって、逐次的に実行される多段階の処理の一部を一意に特定することができるので、標準化規格に適合した撮像部3で、例えば、フォトメトリックステレオやデフレクトメトリの原理を利用した検査画像の生成、マルチスペクトルイメージング、生成後の検査画像にフィルター処理を施すといった複数段階の処理が行えるようになる。 In addition, a combination of selector values can uniquely identify a part of the multi-stage processing that is executed sequentially, so that an imaging unit 3 that complies with standardization standards can perform multi-stage processing such as generating inspection images using the principles of photometric stereo or deflectometry, multispectral imaging, and applying filter processing to the generated inspection images.

(検査設定部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 the test 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 that performs various inspection settings based on user operations in the setting device 4, and includes an object generating means 401, a displaying means 402, a posture adjusting means 403, an area designation receiving means 404, an element generating means 405, and an area setting means 406, as shown in FIG. 11. The inspection setting unit 400 is constructed in the setting device 4 by executing a program installed in the setting device 4, and each of the means 401 to 406 functions as shown in the figure by executing the program on the setting device 4. In FIG. 11, the means 401 to 406 are described separately for convenience, but one means may have multiple functions, and FIG. 11 is conceptual. Also, a part of each of the means 401 to 406 may be configured by hardware.

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

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

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

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

(表示手段402の構成)
表示手段402は、設定装置4のモニタである表示部5を制御する手段であり、例えばオブジェクト生成手段401により生成された三次元オブジェクトを表示部5に表示させる。また、表示手段402は、後述する要素生成手段405により生成された様々な視点特定要素を、三次元オブジェクト上に重ねて表示部5に表示させることもできる。
(Configuration 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 for example, causes the display unit 5 to display a three-dimensional object generated by the object generating means 401. The display means 402 can also cause the display unit 5 to display various viewpoint specifying elements generated by the element generating means 405 described later, superimposed on the three-dimensional object.

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

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

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

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

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

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

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

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

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

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

ステップSC4の後、ステップSC5に進み、点の数が所定以上であるか否かを判定する。例えば直線状の対象領域を作成する場合には、直線を決定するための点が少なくとも2つ必要であり、この場合には、ステップSC5において点の数が2点であるか否かを判定する。また、例えば三角形状の対象領域や円弧、円形状の対象領域を作成する場合に3点必要であれば、ステップSC5において点の数が3点であるか否かを判定する。どのような形状の対象領域を作成するかは、ステップSC1の前にユーザが選択できるようになっている。選択された対象領域の形状に応じてステップSC5の判定が変更される。 After step SC4, proceed to step SC5 to determine whether the number of points is greater than or equal to a predetermined number. For example, when creating a linear target area, at least two points are required to determine the line, in which case step SC5 determines whether the number of points is two. Also, for example, when creating a triangular target area, an arc, or a circular target area, if three points are required, step SC5 determines whether 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 changes depending on the shape of the selected target area.

ステップSC5でNOと判定されて点の数が所定以上でない場合にはステップSC1に進んで次の点のクリック操作を受け付ける一方、ステップSC5でYESと判定されて点の数が所定以上である場合には対象領域を特定できるので、対象領域の作成を完了させる。作成された対象領域はユーザによって指定されたものとして、ステップSC6に進む。ステップSC6では、上述のようにしてユーザによって作成された対象領域が追加される。ステップSC7では、ステップSC6で追加された対象領域データを保存する。対象領域データとは、対象領域の形状、位置、大きさ等に関するデータである。 If step SC5 returns NO and the number of points is not the predetermined number or more, the process proceeds to step SC1 to accept a click operation for the next point, whereas if step SC5 returns YES and the number of points is the predetermined number or more, the target area can be identified and the creation of the target area is completed. The created target area is assumed to have been specified by the user and 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. Target area data is data regarding the shape, position, size, etc. of the target area.

(直線状の対象領域の作成)
次に、三次元オブジェクトの一例を用いて対象領域の作成の具体例について説明する。まず、直線状の対象領域の作成の具体例について、図14に基づいて説明する。図14の上側には、表示手段402によって表示部5に表示されるものとして、ワークWを示す三次元オブジェクト200を示しており、図14の下側には、表示手段402によって表示部5に表示されるものとしてワークWの二次元画像(高さ画像)201を示している。このような二次元画像201は、取得部Aによって生成することができる。
(Creating a Linear Region of Interest)
Next, a specific example of creating a target region will be described using an example of a three-dimensional object. First, a specific example of creating a linear target region will be described based on Fig. 14. The upper side of Fig. 14 shows a three-dimensional object 200 representing a workpiece W as displayed on the display unit 5 by the display means 402, and the lower side of Fig. 14 shows a two-dimensional image (height image) 201 of the workpiece W as displayed on the display unit 5 by the display means 402. 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 to be able to switch between displaying the three-dimensional object 200 and the two-dimensional image 201 on the display unit 5. For example, a switching operation or a selection operation by the user can cause only the three-dimensional object 200 to be displayed on the display unit 5, or only the two-dimensional image 201 to be displayed on the display unit 5. It is also possible to display both the three-dimensional object 200 and the two-dimensional image 201 on the display unit 5. Examples of the switching operation or selection operation include operation of a switching button or selection button.

直線状の対象領域を作成する場合には、はじめに、ユーザが対象領域の形状の選択枝の中から「直線状」を選択する。その後、マウス7のポインタ7aを三次元オブジェクト200上に置くと、ポインタ7aの先端から上方向(Z方向)に延びる線分L2が描画される。ポインタ7aを移動させると、線分L2も同じように移動する。線分L2の延びる方向はカメラ31の撮像素子31dが位置する方向であり、撮像素子31dの撮像軸に沿って所定長さ延びている。 When creating a linear target area, the user first selects "linear" from the options for the shape of the target area. Then, when the pointer 7a of the mouse 7 is placed on the three-dimensional object 200, a line segment L2 is drawn extending upward (in the Z direction) from the tip of the pointer 7a. When the pointer 7a is moved, the line segment L2 moves in the same manner. The extension direction of the line segment L2 is the direction in which the imaging element 31d of the camera 31 is located, and it extends a predetermined length along the imaging axis of the imaging 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, a hit determination is made in step SC2 shown in FIG. 12 based on the XY coordinates of point P1 indicated by the pointer 7a at that time. As a result, if point P1 hits the three-dimensional object 200, point P1 is set, but if it does not hit, point P1 is not set. This point P1 becomes the starting point. In addition, when the mouse 7 is pressed, the color of line segment L2 changes and line segment L2 is fixed at the position of point P1, so that it can be visually understood that point P1 has been set. Note that a press operation means pressing the button on 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 user drags the mouse 7 to move the pointer 7a away from point P1. While the user is dragging, a line segment L4 extending upward from the tip of the pointer 7a is drawn separately from the line segment L2. When the user then releases the mouse 7, a hit determination is made in step SC2 shown in FIG. 12 based on the XY coordinates of point P3 indicated by the pointer 7a at the time of the release. If point P3 hits the three-dimensional object 200, 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 point P3. If the line segment does not hit, point P3 is not set. The top end of the line segment L4 and the top 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 point P3 is set, a line segment (upper XY direction line) L5 is drawn connecting the upper end of line segment L4 and the upper end of line segment L2. A projection line L6 extending from point P1 to point P3 is drawn on the three-dimensional object 200 at the position where line segment L5 is projected in the height direction. The projection line L6 is displayed superimposed on the three-dimensional object 200, and has a shape that follows the three-dimensional object 200. The portion of the surface of the three-dimensional object 200 where the projection line L6 is drawn becomes the target area.

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

点P1を始点とする線分L2と、点P3を始点とする線分L4とは互いに平行であり、ともに撮像素子31dの撮像軸に沿って当該撮像素子31dへ向けて延びる線分である。ユーザは、線分L2及び線分L4を参照することで、撮像素子31dの位置にある視点を特定することができる。線分L2及び線分L4は、要素生成手段405が生成する視点特定要素に含まれる。要素生成手段405は、領域指定受付手段404により対象領域の指定を受け付けた場合に、撮像素子31dの位置にある視点を特定するための視点特定要素として線分L2及び線分L4を生成するための手段である。要素生成手段405で生成された視点特定要素は、表示手段402によって表示部5に表示されるので、ユーザは対象領域の作成中に撮像素子31dの方向を把握できる。 Line segment L2 starting from point P1 and line segment L4 starting from point P3 are parallel to each other and extend along the imaging axis of image sensor 31d toward image sensor 31d. By referring to line segment L2 and line segment L4, the user can identify the viewpoint at the position of image sensor 31d. Line segment L2 and line segment L4 are included in the viewpoint identification element generated by element generation means 405. Element generation means 405 is a means for generating line segment L2 and line segment L4 as viewpoint identification elements for identifying the viewpoint at the position of image sensor 31d when the designation of the target area is accepted by area designation acceptance means 404. The viewpoint identification element generated by element generation means 405 is displayed on display unit 5 by display means 402, so that the user can grasp the direction of image sensor 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 point P3 is set, graphic element D1 is displayed superimposed on the three-dimensional object 200. Graphic element D1 is included in the viewpoint identification element, and this graphic element D1 is also generated by area designation receiving means 404 and displayed on the display unit 5 by display means 402. Graphic element D1 has a larger area than a line, and in this example, it is configured as a plane extending from projection line L6 in the same direction as line segments L2 and L4, that is, a plane extending along the imaging axis of the imaging element 31d. Graphic element D1 is formed between line segments L2 and L4, and both edges of graphic element D1 are determined by line segments L2 and L4, so graphic element D1 is an element formed based on line segments L2 and L4. Graphic element D1 is also drawn downward from projection line L6, although this is not essential.

図形要素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 of the graphic element D1 is the same as the height of the upper ends of the line segments L2 and L4. The lengths of the line segments L2 and L4 are determined according to the maximum height and minimum height in the height image. That is, when determining the length of the line segments L2 and L4, the element generating means 405 first acquires the maximum height and minimum height in the height image based on the height data. Next, the element generating means 405 increases the length of the line segments L2 and L4 the greater the difference between the acquired maximum height and minimum height, and decreases the length of the line segments L2 and L4 the smaller the difference between the acquired maximum height and minimum height. Since the length of the line segments L2 and L4 varies depending on the height of the upper ends of the line segments L2 and L4, it can also be said that the element generating means 405 determines the height of the upper ends of the line segments L2 and L4 according to the maximum height in the height image. Similarly, it can also be said that the element generating means 405 determines the height of the upper end 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の長さの上限や下限を予め設定しておいてもよい。 The lengths of line segments L2 and L4 can be determined according to the maximum and minimum heights in the height image, so that line segments L2 and L4 are not too short or too long relative to the height of the workpiece W, making line segments L2 and L4 easier to see. Similarly, the vertical dimension of graphic element D1 is also determined, making graphic element D1 easier to see. In addition, the upper and lower limits of the lengths of line segments L2 and L4 may be set in advance.

また、例えば円弧等の曲線状の対象領域を作成することもできる。この場合、図形要素D1は曲面で構成されることになる。また、図形要素D1は平面と曲面とで構成されていてもよい。 It is also possible to create a curved target area, such as a circular arc. In this case, the graphic element D1 will be composed of a curved surface. The graphic element D1 may also be composed of a flat surface 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 semi-transparent. Semi-transparent means that the other side of the graphic element D1 can be seen through the graphic element D1. The transparency of the graphic element D1 can be low or high, as long as the user can see the outline of the workpiece W located on the other side of the graphic element D1 displayed on the display unit 5. The graphic element D1 can be colored in a color different from the color of the workpiece W, which makes it easy to distinguish between the graphic element D1 and the workpiece W. The graphic element D1 and the line segments L2, L4, and L5 are displayed in a distinguishable manner. In this example, the graphic element D1 is semi-transparent, and the line segments L2, L4, and L5 are opaque, which makes it easy to distinguish between the two. The distinguishable display manner may be a form in which the colors of the two are changed or the color intensity is changed.

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

図形要素D1は半透明でなくてもよい。この場合、図形要素D1を透かして向こう側を視認することができなくなるが、図形要素D1をワークWの色と異なる色に着色しておけば、ワークWとの識別は可能である。 Graphic element D1 does not have to be translucent. In this case, it will be impossible to see through graphic element D1, but if graphic element D1 is colored a different color from workpiece W, it will be possible to distinguish it from workpiece W.

三次元オブジェクト200上で点P1及び点P3が指定されると、図14の下側に示すように、二次元画像201上で点P1及び点P3が表示されるとともに、点P1と点P3とを結ぶ線分L5が描画される。線分L5の真下に投影線L6が位置する。これにより、対象領域を三次元オブジェクト200上だけでなく、二次元画像201上でも把握できる。 When points P1 and P3 are specified on the three-dimensional object 200, points P1 and P3 are displayed on the two-dimensional image 201, and a line segment L5 connecting points P1 and P3 is drawn, as shown in the lower part of Figure 14. A projection line L6 is positioned directly below line segment L5. This allows the target area to 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の穴の中央や段差の奥などを対象領域として容易に指定できる。 The system may also be configured to accept the specification of a target area on the two-dimensional image 201. That is, when points P1 and P3 are specified on the two-dimensional image 201, a line segment L5 is drawn on the two-dimensional image 201, and points P1 and P3 are displayed on the three-dimensional object 200, and a projection line L6 and a graphic element D1 are also drawn. By specifying a target area on the two-dimensional image 201 in this way, it is possible to easily specify as a target area the center of a hole in the workpiece W or the back of a step, which are difficult to specify on the three-dimensional object 200.

(矩形状の対象領域の作成)
次に、矩形状の対象領域を作成する場合の具体例について、図15を参照しながら説明する。まず、ユーザが対象領域の形状の選択枝の中から「矩形状」を選択する。その後、マウス7のポインタ7aを三次元オブジェクト200上に置くと、直線状の場合と同様に、ポインタ7aの先端から上方向に延びる線分L2が描画される。
(Creating a rectangular target area)
Next, a specific example of creating a rectangular target region will be described with reference to Fig. 15. First, the user selects "rectangle" from among the options for the shape of the target region. 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, similar to the case of a straight line.

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

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

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

また、三次元オブジェクト200上には、矩形枠L7をZ方向(高さ方向)に投影した位置に投影線L8が描画される。投影線L8は、三次元オブジェクト200に重ねて表示され、三次元オブジェクト200に沿った形状になる。三次元オブジェクト200の表面における投影線L8で囲まれた部分が対象領域となる。 In addition, 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 displayed superimposed on the three-dimensional object 200, and has a shape that follows the three-dimensional object 200. The part on the surface of the three-dimensional object 200 that is surrounded by the projection line L8 becomes 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 point P3 is set, graphic element D2 is displayed superimposed on the three-dimensional object 200. Graphic element D2 is included in the viewpoint identification element. Graphic element D2 is composed of four planes that extend from projection line L8 in the same direction as line segments L2 and L4. The four planes are a plane between line segments L2 and L10, a plane between line segments L2 and L11, a plane between line segments L4 and L10, and a plane between line segments L4 and L11, and graphic element D2 is an element formed based on line segments L2, L4, L10, and L11. Graphic element D2 is also drawn downward from projection line L8, although this is not essential.

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

(対象領域の変更)
次に、上述のようにして指定した対象領域の位置や大きさ、形状を変更する場合について、図16及び図17に基づいて説明する。図16は、対象領域の変更手順の第1段階を示しており、この第1段階を経て、図17に示す第2段階に進む。以下に説明する例では、ユーザがマウス7を使用して対象領域の変更を行う場合について説明するが、マウス7以外のタッチ操作パネル等の操作によっても対象領域の変更は可能である。
(Change of target area)
Next, a case where the position, size, and shape of the target area specified as described above are changed will be described with reference to Fig. 16 and Fig. 17. Fig. 16 shows the first stage of the procedure for changing the target area, and after this first stage, the procedure proceeds to the second stage shown in Fig. 17. In the example described below, a case where the user changes the target area using the mouse 7 will be described, but the target area can also be changed by operating a touch operation panel 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 obtained. Then, in step SD2, a 3D hit determination is performed for a line extending in the Z direction from the point specified by the coordinates obtained in step SD1, with the XY coordinates fixed. The 3D hit determination method is the same as step SC2 of the flowchart in 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 step SD2, the process proceeds to step SD3. In step SD3, it is determined whether or not a hit occurred in step SD2. If there is no hit, the process proceeds to the end and the user clicks on another location. If the determination in step SD3 is YES and there is a hit, the process proceeds to step SD4. In step SD4, a two-stage hit determination is performed, that is, a 3D hit determination is followed by a 2D hit determination.

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

図16に示すステップSD4を経た後、ステップSD5に進む。ステップSD5では、ステップSD4においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所をクリック操作することになる。ステップSD5でYESと判定されてヒットした場合には、ステップSD6に進む。 After step SD4 shown in FIG. 16, the process proceeds to step SD5. In step SD5, it is determined whether or not a hit was made in step SD4. If there was no hit, the process proceeds to the end and the user clicks on another location. If the determination in step SD5 is YES and there was a hit, 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 bottom end of the XY plane in the same manner as in step SD4, and then a 2D hit determination is performed. After step SD6, the process proceeds to step SD7. In step SD7, it is determined whether or not a hit occurred in step SD6. If there is no hit, the process proceeds to the end and the user clicks on another location. If the determination in step SD6 is YES and there is a hit, the process proceeds to step SD8. In step SD8, the XYZ coordinates of the hit point are saved. The above steps are executed automatically in response to a click by the user.

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

ステップSE2を経た後、ステップSE3に進む。ステップSE3では、ステップSE2においてヒットしたか否かを判定する。ヒットしなければエンドに進み、ユーザは別の箇所へドラッグ操作することになる。ステップSE2でYESと判定されてヒットした場合には、ステップSE4に進む。 After step SE2, the process proceeds to step SE3. In step SE3, it is determined whether or not a hit was made in step SE2. If there was no hit, the process proceeds to the end, and the user performs a drag operation to another location. If the determination in step SE2 is YES and there was a hit, 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 translated in the XY directions to the hit coordinates. In other words, if a hit occurs at the coordinates of the pointer after the drag operation, the target area and viewpoint-specific element (line segments L2, L4, L10, L11, and graphic elements D1, D2 in FIG. 14) are translated to those coordinates, so that the target area and viewpoint-specific element move in almost real time to follow the pointer. This allows the user to adjust the position of the target area on the three-dimensional object so that it is placed in the desired position.

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

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

ステップSE5でNOと判定されて確定操作が行われていない場合には、ステップSE1に戻る一方、ステップSE5でYESと判定されて確定操作が行われた場合には、ステップSE6に進み、平行移動後の対象領域に変更する。ステップSE7では、ステップSE6で変更された対象領域データを保存する。 If step SE5 returns NO and the confirmation operation has not been performed, the process returns to step SE1. If step SE5 returns YES and the confirmation operation has been performed, the process proceeds to step SE6, where the target area is changed to the one after translation. 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の色が変わり、ユーザによって選択されたことが分かるようになっている。 Figures 19 and 20 show specific examples 1 and 2 when adjusting the position of a linear target area. The left image in Figure 19 for specific example 1 shows the target area before the position is adjusted, and the right image shows the target area after the position is adjusted. In the left image in Figure 19, the pointer 7a of the mouse 7 is moved onto line segment L5 (after mouse hover) and then pressed. This causes line segments L2 and L4 to change color, indicating that they have been selected by the user.

その後、マウス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 segments L2, L4, L5, graphic element D1, and projection line L6 move together along the movement path of the pointer 7a, but this movement is prohibited in the Z direction and is an XY parallel movement. The user may place the pointer 7a on any of the line segments L2, L4, L5, graphic element D1, and projection line L6 and drag them. When the line segment L5 is dragged, the line segments L2, L4, L5, graphic element D1, and projection line L6 are moved in the XY parallel direction so that the line segment L5 is located on the pointer 7a at the destination. When the projection line L6 is dragged, the line segments L2, L4, L5, graphic element D1, and projection line L6 are moved in the XY parallel direction so that the projection line L6 is located on the pointer 7a at the destination. Furthermore, when line segment L2 or line segment L4 is dragged, line segment L2, line segment L4, line segment L5, graphic element D1, and projection line L6 are translated in the XY direction so that line segment L2 or line segment L4 is positioned on pointer 7a at the destination. Furthermore, when a point on graphic element D1 is dragged, line segment L2, line segment L4, line segment L5, graphic element D1, and projection line L6 are translated in the XY direction so that the same point on graphic element D1 is positioned on pointer 7a at the destination.

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

具体例2にかかる図20の左側の図は、対象領域の位置調整前を示しており、右側の図は、対象領域の位置調整後を示している。図20の左側の図では、マウス7のポインタ7aを線分L4上に移動させた後(マウスホバー後)、プレス操作している。これにより、線分L2及び線分L4の色が変わり、ユーザによって選択されたことが分かるようになっている。 The left image in Fig. 20 for specific example 2 shows the target area before the position is adjusted, and the right image shows the target area after the position is adjusted. In the left image in Fig. 20, the pointer 7a of the mouse 7 is moved onto line segment L4 (after mouse hover) and then pressed. This causes the color of line segments L2 and L4 to change, making it clear that they have been selected by the user.

その後、マウス7をドラッグ操作すると、線分L2は固定された状態で、線分L4がXY平行移動する。線分L5、投影線L6は、線分L2から移動後の線分L4まで延びるように描画される。また、図形要素D1も線分L4の移動に応じて描画される。次いで、ユーザがリリース操作を行うと、線分L4がXY平行移動した後の状態で固定される。これにより、対象領域の位置を変更するだけでなく、対象領域の長さを変更することができる。 When the mouse 7 is then dragged, line segment L4 moves parallel in the XY direction while line segment L2 remains fixed. Line segment L5 and projection line L6 are drawn extending from line segment L2 to the moved line segment L4. Graphic element D1 is also drawn in accordance with the movement of line segment L4. Next, when the user performs a release operation, line segment L4 is fixed in the state after it has moved parallel in the XY direction. This makes it possible to change not only the position of the target area but also the length of the target area.

図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の幅と高さが変更された状態で固定される。ハンドルの位置は任意に設定することができる。 Figure 21 is a diagram showing a specific example of adjusting the position of a rectangular target area. The diagram on the left side of Figure 21 shows the target area before the position adjustment, and the diagram on the right side shows the target area after the position adjustment. In the diagram on the left side of Figure 21, the pointer 7a of the mouse 7 is moved onto the rectangular frame L7 (after mouse hover), and then pressed. As a result, the colors of the lines L2, L4, L10, and L11 change, making it clear that they have been selected by the user. In addition, the press operation also draws the middle line L9. The middle line L9 is drawn between the lines L2 and L11, between the lines L2 and L10, between the lines L4 and L10, and between the lines L4 and L11, and extends in the Z direction. By dragging the handle (middle point handle) of the middle line L9 with the mouse 7, only one of the width and height of the rectangular frame L7 can be changed. There are also handles at the vertices of rectangular frame L7, and by dragging these vertex handles with mouse 7, both the width and height of rectangular frame L7 can be changed simultaneously. When the user performs a release operation, the width and height of rectangular frame L7 are fixed in the changed state. The handle positions can be set as desired.

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

三次元オブジェクト上で有効計測領域を描画することでユーザがマスク領域と有効計測領域とを容易に判別できる。三次元オブジェクト上で有効計測領域を描画する場合には、以下の描画フローを適用することができる。まず、内部的に2値画像を作成し、通常領域内を「1」などで塗りつぶす。その後、マスク領域内を「0」で塗りつぶして、通常領域と被っている部分を消す。次いで、2値画像から境界画像を生成する。その境界画像で境界になっている部分に壁面を半透明で三次元描画する。これにより、描画した半透明オブジェクトが少なくなるとともに、単一の色で表現できるため、見やすくなる。 By drawing the effective measurement area on a three-dimensional object, the user can easily distinguish between the mask area and the effective measurement area. When drawing the effective measurement area on a three-dimensional object, the following drawing flow can be applied. First, a binary image is created internally and the normal area is filled with "1" or the like. After that, the mask area is filled with "0" to erase the parts that overlap with the normal area. Next, a boundary image is generated from the binary image. The wall surface is drawn semi-transparently in three dimensions in the boundary part of the boundary image. This reduces the number of semi-transparent objects drawn and makes it easier to see as 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により取得された高さデータに対して設定することができる。
(Procedure for measuring steps 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 step measurement, the user sets a threshold value for the step height in advance. In step SF1 after starting, 2.5D data of the workpiece W is acquired based on the height data newly acquired by the acquisition unit A. At this time, 2D data may be acquired simultaneously. In step SF2, linear target area data saved in step SC6 shown in FIG. 12 or step SF7 shown in FIG. 7 is set to 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 going through this step, the target area specified by the area designation receiving means 404 can be set for the height data acquired by the acquisition unit A.

ステップSF3では、ステップSF2で領域設定手段406が設定した対象領域上の高さプロファイルを取得する。ステップSF4では、ステップSF3で取得した高さプロファイルの中で、段差の上側の高さと下側の高さを計測する。ステップSF5では、上側の高さと下側の高さの差により段差高さを算出する。ステップSF3~SF5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。ステップSF6では、事前に設定した閾値範囲と、ステップSF5で算出した段差高さとを比較し、ステップSF5で算出した段差高さが閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSF6は、図7に示す検査部4Aが実行するステップである。 In step SF3, a height profile on the target area set by the area setting means 406 in step SF2 is obtained. In step SF4, the height of the upper side and the lower side of the step are measured in the height profile obtained in step SF3. In step SF5, the step height is calculated from the difference between the upper side height and the lower side height. 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 step height calculated in step SF5 is compared with a threshold range set in advance, and if the step height calculated in step SF5 falls within the threshold range, it is judged as "good", and if it does not fall within the threshold range, it is judged as "no good". 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 judgment value of step SF6 to the external device. If the external device is a defective product ejection mechanism, in step SF8, the defective product is ejected from the conveyor belt B by the ejection mechanism.

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

ステップSG3では、ステップSG2で領域設定手段406が設定した対象領域内の傷量を、傷計測アルゴリズムを使用して取得する。傷計測アルゴリズムは従来から用いられるものであってもよい。このステップSG3は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SG3, the amount of damage within the target area set by the area setting means 406 in step SG2 is obtained using a damage measurement algorithm. The damage 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 amount of damage acquired in step SG3 is compared with a preset threshold range, and if the amount of damage acquired in step SG3 falls within the threshold range, it is judged as "good", and if it does not fall within the threshold range, it is judged as "bad". 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 judgment value of step SG4 to an external device. If the external device is a defective product ejection mechanism, in step SG6, the defective product is ejected from the conveyor belt B by the ejection mechanism.

(運用時における高さ検査手順)
図24は、画像検査システム1の運用時に矩形状の対象領域で高さ検査する手順の例を示すフローチャートである。高さ検査の前には、ユーザが事前に高さの閾値を設定しておく。スタート後のステップSH1では、図22のステップSF1と同様に2.5Dデータを取得する。ステップSH2では、ステップSH1で取得した2.5Dデータに矩形状の対象領域データを設定する。このステップSH2は、図11に示す領域設定手段406によって実行されるステップである。
(Height inspection procedure during operation)
Fig. 24 is a flow chart showing an example of a procedure for inspecting height in a rectangular target area during operation of the image inspection system 1. Prior to height inspection, the user sets a height threshold in advance. In step SH1 after starting, 2.5D data is acquired similarly to step SF1 in Fig. 22. 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. 11.

ステップSH3では、ステップSH2で領域設定手段406が設定した対象領域内の平均高さを算出する。このステップSH3は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。ステップSH4では、事前に設定した閾値範囲と、ステップSH3で取得した平均高さとを比較し、ステップSH3で取得した平均高さが閾値範囲に収まる場合には「良」と判定し、収まらない場合には「不良」と判定する。このステップSH4は、図7に示す検査部4Aが実行するステップである。 In step SH3, the average height within 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 average height acquired in step SH3 is compared with a threshold range set in advance, and if the average height acquired in step SH3 falls within the threshold range, it is judged as "good", and if it does not fall within the threshold range, it is judged as "bad". 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 judgment value of step SH4 to the external device. If the external device is a defective product ejection mechanism, in step SH6, the defective product is ejected from the conveyor belt B by the ejection mechanism.

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

ステップSI3では、ステップSI2で領域設定手段406が設定した対象領域内の文字を切り出す。ステップSI4では、ステップSI3で切り出した文字を、光学的文字認識(OCR)アルゴリズムにより判定する。ステップSI5では文字から日時に変換する。このステップSI3~SI5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SI3, the characters within the target area set by the area setting means 406 in step SI2 are extracted. In step SI4, the characters extracted in step SI3 are identified using an optical character recognition (OCR) algorithm. In step SI5, the characters are converted into a date and time. These 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 date and time converted in step SI5 is compared with a preset threshold range, and if the date and time converted in step SI5 falls within the threshold range, it is judged as "good", and if it does not fall within the threshold range, it is judged as "bad". 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 judgment value of step SI6 to an external device. If the external device is a defective product ejection mechanism, in step SI8, the defective product is ejected from the conveyor belt B by the ejection mechanism.

尚、賞味期限は一例であり、例えば製造番号や製造日等も検査対象になり得る。 Note that the expiration date is just one example, and other items such as the serial number and manufacturing date may also be subject to inspection.

(運用時における刻印判別手順)
図26は、画像検査システム1の運用時に円弧状の対象領域で刻印判別する手順の例を示すフローチャートである。刻印判別の前には、ワークWに刻印される文字をユーザが事前に設定しておく。スタート後のステップSJ1では、図22のステップSF1と同様に2.5Dデータを取得する。ステップSJ2では、ステップSJ1で取得した2.5Dデータを高さ抽出アルゴリズムにより2Dデータに変換する。ステップSJ3では、ステップSJ2で生成した2Dに円弧状の対象領域データを設定する。このステップSJ3は、図11に示す領域設定手段406によって実行されるステップである。
(Procedure for identifying engravings during operation)
Fig. 26 is a flow chart showing an example of the procedure for identifying markings in an arc-shaped target area when the image inspection system 1 is in operation. Before identifying the markings, the user sets the characters to be engraved on the workpiece W in advance. In step SJ1 after starting, 2.5D data is acquired as in step SF1 in Fig. 22. In step SJ2, the 2.5D data acquired in step SJ1 is converted into 2D data using a height extraction algorithm. In step SJ3, 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. 11.

ステップSJ4では、ステップSJ3で領域設定手段406が設定した対象領域内の文字を切り出す。ステップSJ5では、ステップSJ4で切り出した文字を、光学的文字認識(OCR)アルゴリズムにより判定する。このステップSJ4、SJ5は、領域設定手段406により設定された対象領域に対して図7に示す画像処理部4Bが画像処理を行うステップである。 In step SJ4, the characters are extracted from within the target area set by the area setting means 406 in step SJ3. In step SJ5, the characters extracted in step SJ4 are determined using an optical character recognition (OCR) algorithm. These 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 character determined in step SJ5 is compared with the character set in advance, and if the character converted in step SJ5 is the same as the measured character, it is determined to be "good", and if they are different, it is determined to be "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. If the external device is a discharge mechanism for defective products, the discharge mechanism discharges the defective products from the transport belt conveyor B in step SJ8.
(Effects of the embodiment)
As described above, according to this embodiment, when the acquisition unit A acquires height data in which the height information of the workpiece W is arranged on a two-dimensional coordinate system during setting, the object generation means 401 generates a three-dimensional object based on the height data. The generated three-dimensional object can have its posture adjusted while 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, so that a three-dimensional object in which the workpiece W is viewed from a desired direction can be displayed on the display unit 5. The user can specify a target area on the three-dimensional object after the posture adjustment.

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

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

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

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

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 (projector)
4A Inspection unit 4B Image processing unit 5 Display unit (monitor)
31 Camera (image generating unit)
31d Imaging element 300 Imaging device 400 Inspection setting unit 401 Object generating means 402 Display means 403 Attitude adjustment means 404 Area designation receiving means 405 Element generating means 406 Area setting means A Acquisition unit D1 Graphic elements L2, L4 Line segment (viewpoint identification element)
W Work (inspection object)

Claims (11)

検査対象物を撮像する撮像素子を有し、検査対象物の高さ情報が二次元座標上に配置された高さデータを該撮像素子を用いて取得する取得部を備える画像検査用撮像装置と、前記画像検査用撮像装置にネットワークを介して接続される設定装置にてユーザ操作に基づく各種検査設定を行う検査設定部と、を含む画像検査システムであって、
前記検査設定部は、
前記取得部により取得された高さデータに基づいて、検査対象物を立体的に表した三次元オブジェクトを生成するオブジェクト生成手段と、
前記オブジェクト生成手段により生成された三次元オブジェクトを前記設定装置のモニタに表示する表示手段と、
前記表示手段により表示された三次元オブジェクトの姿勢を調整する姿勢調整手段と、
前記姿勢調整手段により姿勢が調整された三次元オブジェクト上で、該三次元オブジェクトの表面に沿って形成され、画像検査の対象となる対象領域の指定を受け付ける領域指定受付手段と、
前記領域指定受付手段により表面上に対象領域が指定された三次元オブジェクトに対する前記撮像素子の位置にある視点を特定する視点特定要素を生成する要素生成手段と、
前記領域指定受付手段により指定された対象領域を、前記取得部により取得された高さデータに対して設定する領域設定手段と、
を有し、
前記表示手段は、前記要素生成手段により生成された視点特定要素を前記モニタに表示させることを特徴とする画像検査システム。
An image inspection system including: an image pickup device for image inspection, which has an image pickup element for picking up an image of an object to be inspected, and an acquisition unit for acquiring height data of the object to be inspected, the height data being arranged on a two-dimensional coordinate system using the image pickup element ; and an inspection setting unit for setting various inspection settings based on user operations in a setting device connected to the image pickup device for image inspection via a network,
The test setting unit includes:
an object generating means for generating a three-dimensional object that stereoscopically represents an object to be inspected based on the height data acquired by the acquiring unit;
a display means for displaying the three-dimensional object generated by the object generating means on a monitor of the setting device;
an attitude adjustment means for adjusting an attitude of the three-dimensional object displayed by the display means;
an area designation receiving means for receiving designation of a target area to be subjected to image inspection , the target area being formed along a surface of the three-dimensional object whose orientation has been adjusted by the orientation adjusting means;
an element generating means for generating a viewpoint specifying element for specifying a viewpoint at a position of the imaging device with respect to a three-dimensional object whose surface has a target area specified by the area specification receiving means;
a region setting means for setting the target region designated by the region designation receiving means for the height data acquired by the acquisition unit;
having
The image inspection system according to the present invention, wherein the display means displays the viewpoint-specific elements generated by the element generating means on the monitor .
請求項に記載の画像検査システムにおいて、
前記視点特定要素は、前記領域指定受付手段により指定を受け付けた複数の点の各々から前記撮像素子の撮像軸に沿って所定長さ延びる複数の線分と、該複数の線分に基づき形成される平面又は曲面からなる図形要素とを含む画像検査システム。
2. The image inspection system according to claim 1 ,
An image inspection system in which the viewpoint identification element includes a plurality of line segments extending a predetermined length along the imaging axis of the imaging element from each of a plurality of points whose designation is accepted by the area designation accepting means, and a graphical element consisting of a plane or curved surface formed based on the plurality of line segments.
請求項に記載の画像検査システムにおいて、
前記図形要素は、半透明である画像検査システム。
3. The image inspection system according to claim 2 ,
The graphics element is semi-transparent.
請求項またはに記載の画像検査システムにおいて、
前記図形要素を形成する前記複数の線分の所定長さは、前記高さ画像における最大高さまたは最小高さに応じて決定される画像検査システム。
4. The image inspection system according to claim 2 ,
An image inspection system, wherein the 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.
請求項からのいずれか1つに記載の画像検査システムにおいて、
前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で位置調整可能とされている画像検査システム。
5. The image inspection system according to claim 1 ,
An image inspection system, wherein the viewpoint identification element is capable of being adjusted in position on the three-dimensional object after being generated by the element generation means.
請求項からのいずれか1つに記載の画像検査システムにおいて、
前記視点特定要素は、前記要素生成手段による生成後に前記三次元オブジェクト上で形状の変更が可能とされている画像検査システム。
6. The image inspection system according to claim 1 ,
An image inspection system, wherein the viewpoint identifying element is capable of changing its shape on the three-dimensional object after being generated by the element generating means.
請求項に記載の画像検査システムにおいて、
前記視点特定要素は、前記三次元オブジェクトの高さ方向への移動が禁止されている画像検査システム。
6. The image inspection system according to claim 5 ,
An image inspection system in which the viewpoint identification element is prohibited from moving in the height direction of the three-dimensional object.
請求項1からのいずれか1つに記載の画像検査システムにおいて、
前記領域指定受付手段は、前記三次元オブジェクト上で始点と終点の指定を受け付けた場合、高さデータの二次元座標において、前記始点から前記終点まで延びる線分の位置に対応する座標に対象領域を設定する画像検査システム。
8. The image inspection system according to claim 1,
The area designation receiving means of the image inspection system, when it receives a designation of a start point and an end point on the three-dimensional object, sets a target area at coordinates in the two-dimensional coordinates of the height data that correspond to the position of a line segment extending from the start point to the end point.
請求項1からのいずれか1つに記載の画像検査システムにおいて、
前記取得部は、取得した高さデータに基づいて高さ画像を生成し、
前記表示手段は、前記取得部により生成された高さ画像と、前記オブジェクト生成手段で生成された三次元オブジェクトとを前記モニタに切替表示可能に構成され、
前記領域指定受付手段は、前記取得部により生成された高さ画像上で、画像検査の対象となる対象領域の指定を受け付ける画像検査システム。
9. The image inspection system according to claim 1,
The acquisition unit generates a height image based on the acquired height data,
the display means is configured to be able to switch between displaying the height image generated by the acquisition unit and the three-dimensional object generated by the object generation means on the monitor;
The area designation receiving means is an image inspection system that receives a designation of a target area to be subjected to image inspection on the height image generated by the acquisition unit.
請求項1からのいずれか1つに記載の画像検査システムにおいて、
前記設定装置は、前記領域設定手段により高さデータに対して設定された対象領域に対して画像処理を行う画像処理部と、該画像処理部により画像処理された画像に基づいて外観検査を行う検査部とを備えている画像検査システム。
10. The image inspection system according to claim 1 ,
The setting device is an image inspection system that includes an image processing unit that performs image processing on the target area set for height data by the area setting means, and an inspection unit that performs appearance inspection based on the image processed by the image processing unit.
請求項1から1のいずれか1つに記載の画像検査システムにおいて、
前記設定装置は、前記領域指定受付手段で受け付けた対象領域からなる設定項目と、該設定項目の設定値が格納される場所を示すレジスタ情報とが記述されたファイルを外部から取得してユーザにより設定された該設定項目の設定値と、該ファイルに含まれる該設定項目に対応するレジスタ情報とを前記画像検査用撮像装置に送信可能に構成され、
前記画像検査用撮像装置は、前記設定装置から受信した前記設定項目の設定値を、該設定項目に対応するレジスタ情報が示す場所に格納する画像検査システム。
The image inspection system according to any one of claims 1 to 10 ,
the setting device is configured to acquire from an external device a file in which a setting item consisting of a target area accepted by the area designation accepting means and register information indicating a location where a setting value of the setting item is stored, and transmit to the image inspection imaging device the setting value of the setting item set by a user and the register information corresponding to the setting item included in the file;
The image inspection system, wherein the imaging device for image inspection stores the setting value of the setting item received from the setting device in a location indicated by register information corresponding to the setting item.
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 JP2021184180A (en) 2021-12-02
JP7474636B2 true 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
JP2021184180A (en) 2021-12-02

Similar Documents

Publication Publication Date Title
JP7222796B2 (en) Image inspection system and image inspection method
JP6913705B2 (en) 3D image processing equipment, 3D image processing methods and 3D image processing programs, computer-readable recording media and recording equipment
JP6917781B2 (en) Image inspection equipment
US9423245B2 (en) Arrangement for optical measurements and related method
JP7188870B2 (en) Image inspection equipment
JP2018204994A (en) Image inspection device
CN108323179B (en) Inspection system and inspection method
JP2017122614A (en) Image generation method and inspection device
JP2018205004A (en) Image inspection device
US20200322525A1 (en) Image Inspection System And Image Inspection Method
JP6571831B2 (en) Appearance inspection device
JP7474636B2 (en) Image Inspection System
JP7402745B2 (en) Imaging device and image inspection system
US20200258246A1 (en) Inspection Device
JP6571830B2 (en) Appearance inspection device
JP6334861B2 (en) Appearance inspection apparatus, appearance inspection method, appearance inspection program, and computer-readable recording medium
JP2018205001A (en) Image inspection device
JP2018204995A (en) Image inspection device
JP2018205000A (en) Image inspection device
JP2020169950A (en) Image inspection system
JP7231461B2 (en) Image inspection system and image inspection method
JP7306857B2 (en) Image inspection system
JP7273659B2 (en) Image measurement system
KR102171773B1 (en) Inspection area determination method and visual inspection apparatus using the same
JP7222795B2 (en) Image inspection system and image inspection method

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