JPH07220058A - Method and device for supporting illumination condition setting - Google Patents

Method and device for supporting illumination condition setting

Info

Publication number
JPH07220058A
JPH07220058A JP6329213A JP32921394A JPH07220058A JP H07220058 A JPH07220058 A JP H07220058A JP 6329213 A JP6329213 A JP 6329213A JP 32921394 A JP32921394 A JP 32921394A JP H07220058 A JPH07220058 A JP H07220058A
Authority
JP
Japan
Prior art keywords
image
illumination
evaluation value
lighting
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP6329213A
Other languages
Japanese (ja)
Other versions
JP3235387B2 (en
Inventor
Fumio Shibata
文男 柴田
Hiroshi Teramoto
浩志 寺本
Toshihiko Matsumoto
俊彦 松本
Shiro Fujieda
紫朗 藤枝
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP32921394A priority Critical patent/JP3235387B2/en
Publication of JPH07220058A publication Critical patent/JPH07220058A/en
Application granted granted Critical
Publication of JP3235387B2 publication Critical patent/JP3235387B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To optimize the illumination condition and the image pickup condition by evaluating the illumination condition and the image pickup condition based on image data obtained by actually picking up the image of an object. CONSTITUTION:An image input part 61 includes an A/D converter which converts the analog video signal outputted from a television camera 20 to digital picture data, and this data is given to a picture memory 62. The image input part 61 generates a picture quality histogram, which shows the picture quality with the brightness on the axis of abscissas, in real time based on the inputted analog video signal. A CPU 65 reads a maximum value and a minimum value of the generated picture quality histogram and calculates an evaluation value V of illumination at a set height (h) of an illuminator in accordance with a specific formula and stores the calculation result in a RAM 67. The illuminator is properly moved to another position in the vertical direction and is fixed to repeat generation of the picture quality histogram and calculation of the evaluation value. A message informing whether a larger evaluation value is obtained or not is displayed on a display device 41 to approximate the illuminator to the optimum set height.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【技術分野】この発明は,照明装置による照明下で撮像
装置を用いて対象物を撮像し,この撮像により得られる
画像データを処理する画像処理システムにおいて,目的
に適合した対象物の照明を行ない,目的に適合した撮像
を行なうために,照明装置の設置位置,設置角度,光度
等の決定ないしは設定,ならびに撮像装置を構成するカ
メラ,レンズ,接写リングの選択ないしは決定を行なう
ための,または選択,決定もしくは設定を支援するため
の装置および方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing system for imaging an object using an imaging device under illumination by an illuminating device and processing image data obtained by the imaging, and illuminating the object suitable for the purpose. , To determine or set the installation position, installation angle, luminous intensity, etc. of the lighting device to perform imaging suitable for the purpose, and to select or select the camera, lens, and close-up ring that make up the imaging device , Apparatus and method for assisting decision or setting.

【0002】[0002]

【背景技術】工業製品などの目視検査を自動化するため
に,自動検査装置が普及し,この自動検査装置には画像
処理システムが導入されている。自動検査装置によって
高精度の検査を実現するためには,検査目的に適した最
適な画像を得る必要がある。最適な画像を得るために
は,最適な照明条件,撮像条件等を設定することが重要
である。
BACKGROUND ART In order to automate visual inspection of industrial products and the like, automatic inspection devices have become popular, and image processing systems have been introduced into these automatic inspection devices. In order to realize highly accurate inspection with an automatic inspection device, it is necessary to obtain the optimum image suitable for the inspection purpose. In order to obtain the optimum image, it is important to set the optimum lighting conditions and imaging conditions.

【0003】一例を挙げて具体的に説明すると,外観検
査装置や位置決め装置では,照明装置による照明下でテ
レビ・カメラにより認識対象物が撮像される。得られた
画像データは画像処理装置に取り込まれ2値化処理され
る。2値画像データに基づいて対象物の面積や重心位置
などの特徴量が計測され,対象物の良否判別や位置決め
が行なわれる。
Explaining it concretely by taking an example, in a visual inspection device and a positioning device, a recognition object is imaged by a television camera under illumination by an illumination device. The obtained image data is taken into the image processing device and binarized. Based on the binary image data, the characteristic amount such as the area of the target object and the position of the center of gravity is measured, and the quality of the target object is determined and the positioning is performed.

【0004】特徴量を高精度で計測するためには,良好
な2値画像データを得る必要があり,そのために観測系
の照明を最適状態に設定する必要がある。ここで良好な
2値画像とは,2値画像における対象物のエッジが滑ら
かに連続し,しかも孤立ノイズ(小さな白点または黒
点)が少ない画像を意味する。
In order to measure the feature quantity with high accuracy, it is necessary to obtain good binary image data, and therefore it is necessary to set the illumination of the observation system to the optimum state. Here, a good binary image means an image in which the edges of the object in the binary image are smoothly continuous and have few isolated noises (small white dots or black dots).

【0005】したがってそのような2値画像が得られた
ときに,観測系の照明は最適状態に設定されているもの
と判断される。多少の外乱光が加わっても,得られる2
値画像が変化しないことも最適な照明の必要条件であ
る。
Therefore, when such a binary image is obtained, it is judged that the illumination of the observation system is set to the optimum state. 2 even if some ambient light is added
The fact that the value image does not change is also a requirement for optimal illumination.

【0006】照明装置の種類や照明方法は,検査などの
目的に応じて選択される。従来は照明装置や照明方法の
選択指針が明確に整理されていなかったために,どのよ
うな照明装置や照明方法を採用するかについては試行錯
誤的に選択されていた。
The type of illumination device and the illumination method are selected according to the purpose such as inspection. In the past, the guideline for selecting the lighting device and lighting method was not clearly organized, so what kind of lighting device and lighting method to use was selected by trial and error.

【0007】たとえ,照明装置や照明方法が適切に選択
されたとしても,照明装置を最適な設置位置や設置角度
に設定するのは容易でない。従来はモニタに映し出され
た画像を見ながら照明装置の位置や角度を調整する作業
が行なわれていた。
Even if the lighting device and the lighting method are appropriately selected, it is not easy to set the lighting device to the optimum installation position and installation angle. Conventionally, the work of adjusting the position and angle of the illumination device has been performed while looking at the image displayed on the monitor.

【0008】しかしながらこのような従来の方法による
と,照明装置の位置や角度を決定するのに熟練を要し,
経験の浅い作業者には最適状態に調整するのが困難であ
った。また作業者によって照明装置の位置,角度にばら
つきが生じやすく,照明装置が常に最良の位置,角度に
設置されるとは限らず,調整の都度,認識精度が変化す
るという問題がある。
[0008] However, according to such a conventional method, it takes skill to determine the position and angle of the lighting device,
It was difficult for an inexperienced worker to adjust to the optimum state. Further, there is a problem that the position and the angle of the lighting device are likely to vary depending on the operator, and the lighting device is not always installed at the best position and angle, and the recognition accuracy changes each time the adjustment is performed.

【0009】照明条件には照明装置の位置,角度のみな
らずその光度も重要なファクタとして含まれる。
The illumination condition includes not only the position and angle of the illumination device but also its luminous intensity as an important factor.

【0010】照明条件が適切かどうかの判断は,より現
実的には,得られた画像を評価することにより行なうこ
とが好ましい。たとえば良品検査のための最適な照明の
条件は,良品と不良品とを確実に判別可能なこと,すな
わち判別精度が高くなる照明条件が最適なものである。
More practically, it is preferable to judge whether the illumination condition is appropriate by evaluating the obtained image. For example, the optimum illumination condition for the inspection of non-defective products is that the non-defective products can be reliably discriminated from each other, that is, the illumination condition that the discrimination accuracy is high.

【0011】また計測のための最適な照明の条件は,計
測値のばらつきが小さくなるような照明,すなわち計測
精度が高くなる照明条件が最適なものといえる。
It can be said that the optimum illumination condition for measurement is such that the variation in measured values is small, that is, the illumination condition in which the measurement accuracy is high.

【0012】しかしながら上述した従来の調整方法によ
ると,良品と不良品とが確実に判別可能な照明条件や計
測値のばらつきが小さくなるような照明条件が常に得ら
れるという保証はない。
However, according to the above-mentioned conventional adjustment method, there is no guarantee that the illumination condition that can reliably distinguish the good product from the defective product and the illumination condition that the variation of the measured value becomes small are always obtained.

【0013】適切な撮影条件ないしは撮影環境の設定も
重要な事項である。たとえば,検査システム構成上好都
合な位置にカメラを設置し,かつ検査目的に適した視野
を確保できるようにするために最適なレンズを選択する
必要がある。また,所望の設置距離と視野を実現するた
めに接写リングの使用が必要となる場合もある。現在あ
るレンズを使用するという制約の下で,希望の視野を実
現するためにはどのようにして設置距離や接写リングを
適切に設定すればよいかという問題の解決が要求される
こともある。
Setting appropriate shooting conditions or shooting environment is also an important matter. For example, it is necessary to install a camera at a position convenient for the inspection system configuration and select an optimum lens in order to ensure a visual field suitable for the inspection purpose. It may also be necessary to use a close-up ring to achieve the desired installation distance and field of view. Given the constraints of using existing lenses, it may be necessary to solve the problem of how to properly set the installation distance and the close-up ring in order to achieve the desired field of view.

【0014】[0014]

【発明の開示】この発明は,熟練を要することなく,照
明装置の設置位置,設置角度,光度等の照明条件の決定
ないしは設定,レンズ,接写リング,カメラの種類およ
びカメラの設定距離を含む撮像条件の決定ないしは選択
を自動的または半自動的に行なえるようにすることを目
的とする。
DISCLOSURE OF THE INVENTION The present invention, without requiring skill, determines or sets illumination conditions such as the installation position, installation angle, and luminous intensity of an illuminating device, a lens, a close-up ring, a type of camera, and an imaging including a set distance of the camera. The purpose is to enable automatic or semi-automatic determination or selection of conditions.

【0015】この発明はまた,対象物を実際に撮像する
ことによって得られる画像データに基づいて照明条件,
撮像条件の評価と最適化を図るようにすることを目的と
する。
The present invention also provides an illumination condition based on image data obtained by actually photographing an object,
The objective is to evaluate and optimize imaging conditions.

【0016】より具体的にいえば,良品検査であれば,
良品と不良品とをいかに確実に判別できるか,計測であ
れば,いかにばらつきの少ない計測値が得られるかとい
う観点から照明条件を設定することができるようにする
ものである。
More specifically, if it is a non-defective product inspection,
The illumination condition can be set from the viewpoint of how to reliably distinguish a non-defective product from a defective product and how to obtain a measured value with little variation in measurement.

【0017】この発明は,対象物を実際に撮像して得ら
れる実画像データに基づいて照明条件を評価しかつ最適
化するための,またはそれを支援する装置および方法を
提供している。とくにこの発明では照明装置の位置が調
整される。
The present invention provides an apparatus and method for evaluating or optimizing an illumination condition based on real image data obtained by actually capturing an image of an object, or supporting the same. Particularly, in the present invention, the position of the lighting device is adjusted.

【0018】この発明による照明条件設定支援装置は,
対象物を照明する照明装置,上記照明装置を位置調整可
能に支持する支持装置,上記照明装置による照明下で対
象物を撮像し,対象物の画像を表わす映像信号を出力す
る撮像装置,上記撮像装置から出力される映像信号に基
づいて,明るさに対する画質の良否の程度を表わす画質
ヒストグラムを生成する画質ヒストグラム生成回路手
段,上記画質ヒストグラム生成回路手段によって生成さ
れた画質ヒストグラムに基づいて照明の評価値を算出す
る評価値算出回路手段,上記評価値算出回路手段によっ
て算出された今回の評価値を上記照明装置の位置変更前
の前回の評価値と比較する比較回路手段,および上記比
較回路手段による比較結果を出力する出力手段を備えて
いる。
A lighting condition setting support device according to the present invention comprises:
Illumination device for illuminating an object, support device for supporting the illumination device in a positionally adjustable manner, imaging device for imaging an object under illumination by the illumination device and outputting a video signal representing an image of the object, imaging Image quality histogram generating circuit means for generating an image quality histogram representing the quality of image quality with respect to brightness based on a video signal output from the device, and illumination evaluation based on the image quality histogram generated by the image quality histogram generating circuit means. Evaluation value calculation circuit means for calculating a value, comparison circuit means for comparing the current evaluation value calculated by the evaluation value calculation circuit means with the previous evaluation value before the position change of the lighting device, and the comparison circuit means An output means for outputting the comparison result is provided.

【0019】第1の実施態様においては,上記出力手段
が上記比較回路手段による比較結果に応じて上記照明装
置の位置調整方向を指示する表示装置である。
In the first embodiment, the output means is a display device for instructing the position adjustment direction of the illuminating device according to the comparison result by the comparison circuit means.

【0020】第2の実施態様においては,上記支持装置
が上記照明装置の位置を変更させる駆動装置を含む。上
記出力手段は上記比較回路手段による比較結果に応じて
上記照明装置の位置調整方向を指示する表示装置であ
る。そして,上記駆動装置を駆動するための指令を入力
する入力装置と,この入力装置を通して入力された指令
に応答して上記駆動装置を制御する制御装置とがさらに
設けられる。
In a second embodiment, the support device includes a drive device for changing the position of the lighting device. The output means is a display device for instructing the position adjustment direction of the illumination device according to the comparison result by the comparison circuit means. An input device for inputting a command for driving the drive device and a control device for controlling the drive device in response to the command input through the input device are further provided.

【0021】第3の実施態様においては,上記支持装置
が上記照明装置の位置を変更させる駆動装置を含む。そ
して,上記比較回路手段による比較結果に応じて上記駆
動装置を制御し,上記照明装置の位置を最適位置に調整
する制御手段がさらに設けられる。
In a third embodiment, the support device includes a drive device for changing the position of the lighting device. Further, there is further provided control means for controlling the drive device according to the comparison result by the comparison circuit means and adjusting the position of the illumination device to the optimum position.

【0022】この発明による照明条件設定支援方法は,
対象物を照明する照明装置,上記照明装置を位置調整可
能に支持する支持装置,および上記照明装置による照明
下で対象物を撮像し,対象物の画像を表わす映像信号を
出力する撮像装置を備えた画像処理システムにおいて,
上記撮像装置から出力される映像信号に基づいて,明る
さに対する画質の良否の程度を表わす画質ヒストグラム
を生成し,生成された画質ヒストグラムに基づいて照明
の評価値を算出し,算出された今回の評価値を上記照明
装置の位置変更前の前回の評価値と比較し,この比較結
果を出力するものである。
A lighting condition setting support method according to the present invention comprises:
An illumination device that illuminates an object, a support device that supports the illumination device in a positionally adjustable manner, and an imaging device that images the object under illumination by the illumination device and outputs a video signal representing an image of the object In the image processing system,
An image quality histogram representing the degree of quality of image quality with respect to brightness is generated based on the video signal output from the image pickup device, and an illumination evaluation value is calculated based on the generated image quality histogram. The evaluation value is compared with the previous evaluation value before the position change of the lighting device, and the comparison result is output.

【0023】この発明によると,対象物を実際に撮像し
て得られる画像データに基づいて良好な画像が得られる
ように照明条件を最適化しているので,熟練を要さず,
作業者が異なっても常に同じように良好な画像が得られ
ることになる。
According to the present invention, since the illumination conditions are optimized so that a good image can be obtained based on the image data obtained by actually capturing the object, no skill is required,
Even if the workers are different, the same good image is always obtained.

【0024】第1の実施態様では作業員が表示された指
示を見ながら手動で,第2の実施態様では半自動的に,
照明装置の高さの調整が行なわれる。
In the first embodiment, the operator manually sees the displayed instructions, and in the second embodiment semi-automatically,
The height of the lighting device is adjusted.

【0025】第3の実施態様では照明装置の高さ設定が
完全に自動化されているから,照明装置の位置設定が一
層容易であり,作業の効率化と合理化とを実現できる。
In the third embodiment, since the height setting of the lighting device is completely automated, it is easier to set the position of the lighting device, and the efficiency and rationalization of the work can be realized.

【0026】上述した画質ヒストグラム生成回路手段の
主要部はエッジ画像生成装置として利用できる。
The main part of the image quality histogram generation circuit means described above can be used as an edge image generation device.

【0027】この発明は画質ヒストグラム生成回路手段
を利用したエッジ画像生成装置を提供している。
The present invention provides an edge image generating apparatus using the image quality histogram generating circuit means.

【0028】この発明によるエッジ画像生成装置は,対
象物を撮像し,撮像画像を表わす映像信号を出力する撮
像装置,上記撮像装置から出力される上記映像信号をデ
ィジタル画像データに変換するA/D変換手段,A/D
変換された1画面分のディジタル画像データを記憶する
画像メモリ,上記1画面分の画像データにウインドウを
設定してそのウインドウ内の複数の画素についての画素
データを抽出するウインドウ手段,上記ウインドウ内の
画像データの傾きに関するデータを生成する手段,上記
傾きに関するデータと複数のエッジ・パターンとの合致
度をそれぞれ演算する手段,上記合致度からエッジらし
さの評価値を演算する手段,および上記エッジらしさの
評価値の演算を1画面分のすべての画素について行なう
ように制御する手段を備えている。
An edge image generating apparatus according to the present invention is an image pickup apparatus for picking up an image of an object and outputting a video signal representing the picked-up image, and an A / D for converting the video signal output from the image pickup apparatus into digital image data. Conversion means, A / D
An image memory for storing the converted digital image data for one screen, window means for setting a window on the image data for one screen and extracting pixel data for a plurality of pixels in the window, A means for generating data on the inclination of the image data, a means for calculating the degree of coincidence between the inclination data and a plurality of edge patterns, a means for calculating an edge-likeness evaluation value from the degree of coincidence, and the edge-likeness It is provided with a means for controlling the calculation of the evaluation value for all pixels of one screen.

【0029】この発明によると,1画面分の画像データ
にウインドウを設定してそのウインドウ内の複数の画素
についての画素データを抽出し,上記ウインドウ内の画
像データの傾きに関するデータを生成し,上記傾きに関
するデータと複数のエッジ・パターンとの合致度をそれ
ぞれ演算し,上記合致度からエッジらしさの評価値を演
算し,上記エッジらしさの評価値の演算を1画面分のす
べての画素について行ない,上記評価値からなるエッジ
画像データを得るようにしているので,良質のエッジが
強調された良好なエッジ画像を生成でき,ノイズなどの
影響を除去することが可能である。
According to the present invention, a window is set for image data for one screen, pixel data for a plurality of pixels in the window is extracted, data relating to the inclination of the image data in the window is generated, and The degree of coincidence between the inclination data and the plurality of edge patterns is calculated, the edge-likeness evaluation value is calculated from the coincidence degree, and the edge-likeness evaluation value is calculated for all pixels of one screen. Since the edge image data composed of the above evaluation values is obtained, it is possible to generate a good edge image in which good quality edges are emphasized, and it is possible to remove the influence of noise and the like.

【0030】この発明は,照明装置による照明下で検査
または認識(計測)対象物のサンプルを実際に撮像し,
この撮像により得られる画像データに基づいて実際にサ
ンプルの検査または認識(計測)を行ない,この検査ま
たは認識結果を評価することにより照明条件(たとえば
照明装置の光度)を最適化する装置および方法を提供し
ている。
The present invention actually images a sample of an object to be inspected or recognized (measured) under illumination by an illumination device,
A device and method for actually inspecting or recognizing (measuring) a sample based on image data obtained by this imaging, and evaluating the inspection or recognition result to optimize the illumination condition (for example, the luminous intensity of the illuminating device). providing.

【0031】まず,良品と不良品とを判別する良品検査
を行なうシステムのための照明条件設定支援装置および
方法について述べる。
First, an illumination condition setting support device and method for a system for inspecting non-defective products and non-defective products will be described.

【0032】この発明による照明条件設定支援装置は,
良品および不良品の複数のサンプルを所定の観測位置へ
順次供給するサンプル供給装置,上記観測位置のサンプ
ルを照明する照明条件可変な照明装置,上記供給装置に
よって上記観測位置にもたらされた良品および不良品の
各サンプルを上記照明装置による照明下で撮像し,撮像
したサンプルを表わす映像信号を出力する撮像装置,上
記撮像装置から出力される映像信号に基づいて各サンプ
ルの特徴量を計測する特徴量計測手段,上記特徴量計測
手段により計測された特徴量に基づいて良品と不良品の
判別精度に関する評価値を算出する手段,ならびに上記
照明装置の照明条件を変えながら求められた照明条件ご
との評価値に基づいて,評価値が最良となる照明条件を
検索する手段を備えている。
The lighting condition setting support device according to the present invention is
A sample supply device for sequentially supplying a plurality of samples of non-defective products and defective products to a predetermined observation position, an illumination device with variable illumination conditions for illuminating the sample at the observation position, and a non-defective product brought to the observation position by the supply device, An imaging device that images each defective sample under illumination by the illumination device and outputs a video signal representing the captured sample, and a feature that measures the feature amount of each sample based on the video signal output from the imaging device Quantity measuring means, means for calculating an evaluation value relating to the accuracy of discrimination between non-defective products and defective products based on the characteristic amount measured by the characteristic amount measuring means, and for each illumination condition obtained while changing the illumination condition of the illumination device. Based on the evaluation value, a means for searching for an illumination condition having the best evaluation value is provided.

【0033】この発明による照明条件設定支援方法は,
所定の観測位置を照明する照明条件可変な照明装置を配
置し,良品および不良品の複数のサンプルを上記観測位
置へ順次供給し,上記観測位置に供給された良品および
不良品の各サンプルを上記照明装置による照明下で撮像
し,撮像により得られる映像信号に基づいて各サンプル
の特徴量を計測し,計測された特徴量に基づいて良品と
不良品の判別精度に関する評価値を算出し,上記照明装
置の照明条件を変えながら,照明条件ごとの評価値を求
め,評価値が最良となる照明条件を検索するものであ
る。
A lighting condition setting support method according to the present invention comprises:
An illuminating device with variable lighting conditions for illuminating a predetermined observation position is arranged, a plurality of samples of good products and defective products are sequentially supplied to the observation position, and each sample of good products and defective products supplied to the observation position is described above. An image is taken under illumination by an illuminating device, the characteristic amount of each sample is measured based on the image signal obtained by the imaging, and an evaluation value regarding the accuracy of discriminating between a good product and a defective product is calculated based on the measured characteristic amount. While changing the lighting condition of the lighting device, the evaluation value is obtained for each lighting condition, and the lighting condition with the best evaluation value is searched.

【0034】この発明によると,実際の良品と不良品サ
ンプルの撮像画像から照明条件の評価を行ない,良品と
不良品の判別ができるだけ確実に行なえる照明条件を検
索しているので,常に判別精度の高い良品検査が可能と
なる。
According to the present invention, the illumination condition is evaluated from the picked-up images of the actual non-defective product sample and the defective product sample, and the illumination condition that can discriminate the non-defective product from the defective product is searched as reliably as possible. High quality inspection is possible.

【0035】次に,対象物の特徴量を計測するシステム
のための照明条件設定支援装置および方法について説明
する。
Next, a lighting condition setting support device and method for a system for measuring the feature amount of an object will be described.

【0036】この発明による照明条件設定支援装置は,
複数のサンプルを所定の観測位置へ順次供給するサンプ
ル供給装置,上記観測位置のサンプルを照明する照明条
件可変な照明装置,上記供給装置によって上記観測位置
にもたらされた各サンプルを上記照明装置による照明下
で撮像し,撮像したサンプルを表わす映像信号を出力す
る撮像装置,上記撮像装置から出力される映像信号に基
づいて各サンプルの特徴量を計測する特徴量計測手段,
上記特徴量計測手段により計測された特徴量の分散を算
出する手段,および上記照明装置の照明条件を変えなが
ら求められた照明条件ごとの分散に基づいて,分散が最
小となる照明条件を検索する手段を備えている。
The lighting condition setting support device according to the present invention is
A sample supply device that sequentially supplies a plurality of samples to a predetermined observation position, an illumination device that illuminates the sample at the observation position and has a variable illumination condition, and each sample brought to the observation position by the supply device is provided by the illumination device. An image pickup device that picks up an image under illumination and outputs a video signal representing the picked-up sample, a feature amount measuring unit that measures the feature amount of each sample based on the video signal output from the image pickup device,
A means for calculating the variance of the feature quantity measured by the feature quantity measuring means, and a variance for each illumination condition obtained by changing the illumination condition of the illumination device are searched for the illumination condition with the minimum variance. Equipped with means.

【0037】この発明による照明条件設定支援方法は,
所定の観測位置を照明する照明条件可変な照明装置を配
置し,複数のサンプルを上記観測位置へ順次供給し,上
記観測位置に供給された各サンプルを上記照明装置によ
る照明下で撮像し,撮像により得られる映像信号に基づ
いて各サンプルの特徴量を計測し,計測された全サンプ
ルの特徴量の分散を算出し,上記照明装置の照明条件を
変えながら,照明条件ごとの分散を求め,分散が最小と
なる照明条件を検索するものである。
A lighting condition setting support method according to the present invention comprises:
An illuminator with variable illumination conditions that illuminates a predetermined observation position is arranged, a plurality of samples are sequentially supplied to the observation position, and each sample supplied to the observation position is imaged under the illumination of the illuminating device and imaged. The feature amount of each sample is measured based on the video signal obtained by, the variance of the feature amount of all the measured samples is calculated, and the variance for each illumination condition is obtained by changing the illumination condition of the above lighting device, and the variance is calculated. Is to search for a lighting condition that minimizes.

【0038】この発明によると,計測対象物のサンプル
を実際に撮像し,この撮像により得られる画像データを
用いてサンプルの特徴量を実際に計測し,計測した特徴
量の分散が小さくなる照明条件を検索しているので,計
測値のばらつきが小さくなり,常に精度の高い計測が可
能となる。
According to the present invention, a sample of an object to be measured is actually imaged, the feature amount of the sample is actually measured using the image data obtained by this image pickup, and the illumination condition in which the variance of the measured feature amount is small. Since the search is performed, the dispersion of the measured values becomes small, and the measurement can always be performed with high accuracy.

【0039】上記サンプル供給装置を,各サンプルを載
置する回転テーブルと,この回転テーブルを回転駆動す
る駆動装置とから構成することにより,構成の簡素化と
省スペース化を図ることができる。
By configuring the sample supply device with a rotary table on which each sample is placed and a drive device for rotationally driving the rotary table, it is possible to simplify the configuration and save space.

【0040】最後にこの発明は,レンズと必要な接写リ
ングが着脱自在なカメラによる適切な撮影条件を決定す
るための撮影条件決定支援装置を提供している。
Finally, the present invention provides a photographing condition determination support device for determining an appropriate photographing condition by a camera in which a lens and a necessary close-up ring are detachable.

【0041】この装置は,カメラの視野情報と,撮影対
象に対するカメラの設置距離情報と,レンズの情報と,
接写リングの情報のうちの少なくとも2つの情報を入力
するための入力装置,上記入力装置から入力された少な
くとも2つの情報を用いて残りの情報を算出する演算装
置,および上記演算装置による演算結果によって表わさ
れる上記残りの情報を表示する表示装置を備えている。
This apparatus includes information on the field of view of the camera, information on the installation distance of the camera with respect to the object to be photographed, information on the lens,
An input device for inputting at least two pieces of information of the close-up ring, an arithmetic device for calculating the remaining information using at least two pieces of information input from the input device, and an arithmetic result by the arithmetic device. A display device is provided for displaying the remaining information represented.

【0042】この発明によれば,カメラの視野情報と,
撮影対象に対するカメラの設置距離情報と,レンズの情
報と,接写リングの情報のうちの少なくとも2つの情報
を入力することによって,残りの情報が演算されて表示
されるので,対話形式で短時間で適切なレンズ,接写リ
ング,カメラ設置距離などを選択または決定することが
できる。
According to the present invention, the visual field information of the camera,
The remaining information is calculated and displayed by inputting at least two pieces of information on the installation distance of the camera to the object to be photographed, information on the lens, and information on the close-up ring. You can select or determine the appropriate lens, close-up ring, camera installation distance, etc.

【0043】撮像条件(撮像系)の評価と最適化につい
ても,照明条件の評価と最適化の場合と同じように,複
数種類の撮像条件のそれぞれの下で対象物を実際に撮像
し,撮像により得られた画像データに基づいて撮像条件
の評価値を算出し,この評価値に基づいて行なうことが
できるのはいうまでもない。
As for the evaluation and optimization of the imaging conditions (imaging system), as in the case of the evaluation and optimization of the illumination conditions, the object is actually imaged under each of a plurality of kinds of imaging conditions and the imaging is performed. It goes without saying that the evaluation value of the imaging condition can be calculated based on the image data obtained by, and the evaluation value can be calculated based on this evaluation value.

【0044】[0044]

【実施例】【Example】

(1) 照明装置と照明方法の種類 画像処理システムにおいて用いられる照明装置(光源)
の主なものには蛍光灯とハロゲン・ランプとがある。
(1) Types of lighting devices and lighting methods Lighting devices (light sources) used in image processing systems
The main ones are fluorescent lamps and halogen lamps.

【0045】蛍光灯はその形状からリング型と直管型と
に大別され,種々の寸法のものが市販されている。図1
はリング型の蛍光灯11を示すものである。図2は直管型
の蛍光灯12を示している。
Fluorescent lamps are roughly classified into a ring type and a straight tube type according to their shapes, and various sizes are commercially available. Figure 1
Shows a ring type fluorescent lamp 11. FIG. 2 shows a straight tube type fluorescent lamp 12.

【0046】光源にハロゲン・ランプを用いる照明装置
においては,ハロゲン・ランプからの光がライト・ガイ
ドと呼ばれる光ファイバを用いて光照射部まで導かれ
る。リング型,スリット型,ストレート型,二分岐型な
ど種々の形状の光照射部をもつものが市販されており,
寸法にもバリエーションがある。
In an illuminating device using a halogen lamp as a light source, the light from the halogen lamp is guided to a light irradiating section using an optical fiber called a light guide. A ring type, a slit type, a straight type, a bifurcated type, etc. having various types of light irradiation parts are commercially available.
There are variations in dimensions.

【0047】図3はリング型の光照射部をもつ,いわゆ
るリング・ライト・ガイドと呼ばれる照明装置13を示し
ている。多数本の光ファイバ17が束になっており,それ
らの先端がリング状に配列されていることにより光照射
部が構成されている。
FIG. 3 shows an illuminating device 13 which is a so-called ring light guide and which has a ring-shaped light irradiation section. A large number of optical fibers 17 are bundled, and the light irradiation section is configured by arranging their tips in a ring shape.

【0048】図4は,いわゆるスリット・リング・ガイ
ドと呼ばれる照明装置14を示している。多数本の光ファ
イバ17の先端が一直線状に配列されることにより光照射
部が構成され,スリット光を発生するのに適している。
FIG. 4 shows an illuminating device 14 which is a so-called slit ring guide. The light irradiation unit is configured by arranging the tips of a large number of optical fibers 17 in a straight line, and is suitable for generating slit light.

【0049】図5は多数本の光ファイバ17を束ねた先端
部から円形断面をもつ光を投射する照明装置15を示し,
ストレート・ライト・ガイドと呼ばれている。
FIG. 5 shows an illuminating device 15 for projecting light having a circular cross section from the end of a bundle of a large number of optical fibers 17.
It is called a straight light guide.

【0050】図6に示す照明装置16においては,光ファ
イバ17の束が2つに分けられ,それぞれの先端部から円
形断面をもつ光が投射される。これは二分岐ライト・ガ
イドと呼ばれる。
In the illuminating device 16 shown in FIG. 6, the bundle of optical fibers 17 is divided into two, and light having a circular cross section is projected from the respective tip portions. This is called a bifurcated light guide.

【0051】とくに,スリット・ライト・ガイド14,ス
トレート・ライト・ガイド15および二分岐ライト・ガイ
ド16は照明領域が狭い場合に適している。
Particularly, the slit light guide 14, the straight light guide 15 and the bifurcated light guide 16 are suitable when the illumination area is narrow.

【0052】以上をまとめると次のようになる。 リング蛍光灯11(図1) 直管蛍光灯12(図2) リング・ライト・ガイド13(図3) スリット・ライト・ガイド14(図4) ストレート・ライト・ガイド15(図5) 二分岐ライト・ガイド16(図6)The above is summarized as follows. Ring fluorescent lamp 11 (Fig. 1) Straight tube fluorescent lamp 12 (Fig. 2) Ring light guide 13 (Fig. 3) Slit light guide 14 (Fig. 4) Straight light guide 15 (Fig. 5) Bifurcated light・ Guide 16 (Fig. 6)

【0053】図7から図11は以下に示す種々な照明方法
を示している。 透過光照明(図7) 一様光照明(図8) 同軸落射照明(図9) 平行光照明(図10) 暗視野照明(図11)
7 to 11 show various illumination methods described below. Transmitted light illumination (Fig. 7) Uniform light illumination (Fig. 8) Coaxial epi-illumination (Fig. 9) Parallel light illumination (Fig. 10) Dark field illumination (Fig. 11)

【0054】透過光照明(図7)は,対象物OBが載置
された拡散板29の下方から光源10の光を照射するもので
ある。対象物OBの上方に撮像装置(たとえばCCDテ
レビ・カメラ)20が配置され,このカメラ20は対象物O
Bが占める部分以外の箇所において拡散板29を透過した
光による像を撮像する。
The transmitted light illumination (FIG. 7) illuminates the light of the light source 10 from below the diffusion plate 29 on which the object OB is placed. An image pickup device (for example, a CCD television camera) 20 is arranged above the object OB, and this camera 20 is used for the object O.
An image of the light transmitted through the diffuser plate 29 is picked up at a portion other than the portion occupied by B.

【0055】一様光照明(図8)は,カメラ20が配置さ
れる箇所と同じ対象物OBの上方から一様な強度分布を
もつ光を対象物OBに照射するものである。図8では照
明光が平行光のように描かれているが必ずしも平行光で
はなくてもよい。一様光照明は均一照明ともいわれる。
The uniform light illumination (FIG. 8) irradiates the object OB with light having a uniform intensity distribution from above the same object OB where the camera 20 is arranged. In FIG. 8, the illumination light is drawn as parallel light, but it need not be parallel light. Uniform light illumination is also called uniform illumination.

【0056】同軸落射照明(図9)では,カメラ20と対
象物OBとの間にほぼ45°で傾いたハーフ・ミラー28が
配置される。横方向から光がハーフ・ミラー28に照射さ
れ,このハーフ・ミラー28による反射光が対象物OBに
照射される。対象物OBで反射しかつハーフ・ミラー28
を透過した光がカメラ20に入射する。同軸落射照明と
は,あたかも撮像装置としてのカメラ20から照明光が発
射されているかのような照明という意味である。
In the coaxial epi-illumination (FIG. 9), a half mirror 28 tilted at about 45 ° is arranged between the camera 20 and the object OB. Light is applied to the half mirror 28 from the lateral direction, and the light reflected by the half mirror 28 is applied to the object OB. Half mirror 28 that reflects on the object OB
The light that has passed through is incident on the camera 20. The coaxial epi-illumination means an illumination as if the illumination light is emitted from the camera 20 as an image pickup device.

【0057】平行光照明(図10)は平行光を対象物OB
に照射する方法である。図10では斜め上方から平行光が
対象物OBに照射されている。これを特に平行射方照明
という。もちろん,対象物OBに対して垂直上方から平
行光を照射してもよい。一般に対象物OBが置かれた背
景BGは乱反射を生じさせる物質で構成される。これに
より,対象物OBおよび背景BGの両方がカメラ20にと
って明るく見える。
The collimated light (FIG. 10) illuminates collimated light on the object OB
It is a method of irradiating to In FIG. 10, parallel light is applied to the object OB from diagonally above. This is called parallel illumination. Of course, parallel light may be irradiated onto the object OB from vertically above. Generally, the background BG on which the object OB is placed is composed of a substance that causes diffuse reflection. As a result, both the object OB and the background BG appear bright to the camera 20.

【0058】暗視野照明(図11)では,鏡面またはそれ
に近い表面をもつ背景BGが使用される。照明光は斜め
上方から照射される。対象物OBからの乱反射光(拡散
反射光)がカメラ20に入射する。背景BGからの乱反射
光は非常に少ないので,カメラ20にとって背景BGは暗
く見える。
For dark field illumination (FIG. 11), a background BG with a mirror surface or a surface close to it is used. The illumination light is emitted obliquely from above. Diffuse reflected light (diffuse reflected light) from the object OB enters the camera 20. Since the diffused reflection light from the background BG is very small, the background BG looks dark to the camera 20.

【0059】(2) 照明条件決定支援装置(その1:最適
高さの決定支援) 対象物を照明装置により照明し,照明された対象物の画
像を撮像装置により撮像し,これにより得られた画像デ
ータを用いて各種検査等の画像処理を実行する画像処理
システムにおいて,照明装置の対象物に対する最適高さ
を決定するための支援装置について説明する。
(2) Illumination condition decision support device (part 1: Optimum height decision support) The object is illuminated by the illumination device, and the image of the illuminated object is imaged by the image pickup device. In the image processing system that executes image processing such as various inspections using image data, a support device for determining the optimum height of the illumination device with respect to the object will be described.

【0060】図12は最適高さ決定支援装置を含む画像処
理システムの全体的構成を示している。
FIG. 12 shows the overall configuration of an image processing system including an optimum height determination support device.

【0061】画像処理システムは,対象物OBを照明す
る照明装置11,対象物OBを撮像する撮像装置としての
テレビ・カメラ20および画像処理装置40を含んでいる。
The image processing system includes a lighting device 11 for illuminating the object OB, a television camera 20 as an imaging device for imaging the object OB, and an image processing device 40.

【0062】照明装置11としては図1に示すリング蛍光
灯が用いられており,対象物OBをその真上から照明す
る。蛍光灯11のリング中心が対象物OBの真上に位置し
ている。照明装置11と対象物OBとの距離,すなわち照
明装置11の対象物OBに対する高さをhとする。照明装
置11として,図3に示すリング・ライト・ガイド13を用
いることもできる。
The ring fluorescent lamp shown in FIG. 1 is used as the illuminating device 11, and the object OB is illuminated from directly above it. The ring center of the fluorescent lamp 11 is located directly above the object OB. The distance between the illumination device 11 and the object OB, that is, the height of the illumination device 11 with respect to the object OB is h. As the illuminating device 11, the ring light guide 13 shown in FIG. 3 can be used.

【0063】照明装置11は支柱30と支持装置31とによっ
て上下動自在に支持されている。支持装置31は照明装置
11の把持部32と,把持部32とアームを介して固定的に結
合された摺動部33とを備えている。摺動部33は筒状体で
あって,この筒状体の孔内を支柱30が摺動自在に貫通し
ている。したがって,摺動部33は支柱30に上下動自在に
支持されている。摺動部33には止めねじ,止めボルト等
の止め具34が設けられ,摺動部33はこの止め具34によっ
て支柱30に固定される。したがって,照明装置11は手動
で任意の高さ位置に調整されかつ固定される。
The lighting device 11 is supported by a column 30 and a supporting device 31 so as to be vertically movable. The support device 31 is a lighting device.
11 gripping parts 32 and a sliding part 33 fixedly connected to the gripping part 32 via an arm. The sliding portion 33 is a tubular body, and the support column 30 slidably penetrates through the hole of the tubular body. Therefore, the sliding portion 33 is supported by the column 30 so as to be vertically movable. A stopper 34 such as a set screw or a set bolt is provided on the sliding portion 33, and the sliding portion 33 is fixed to the column 30 by the stopper 34. Therefore, the lighting device 11 is manually adjusted to an arbitrary height position and fixed.

【0064】撮像装置としてのカメラ20は,対象物OB
の真上の位置に,撮像中心を照明装置11のリングの中心
に一致させて下方に向けて配置され,照明装置11による
照明下で対象物OBを上方から撮像する。図面が繁雑に
なるのを避けるためにカメラ20の支持装置の図示が省略
されている。カメラ20は支持装置によって固定的に支持
されている。もっともカメラ20も上下動自在に支持して
もよいのはいうまでもない。
The camera 20 as an image pickup device is provided with an object OB.
The image pickup center is aligned with the center of the ring of the illuminating device 11 at a position directly above, and the object OB is imaged from above under illumination by the illuminating device 11. The supporting device for the camera 20 is not shown to avoid cluttering the drawing. The camera 20 is fixedly supported by a supporting device. Needless to say, the camera 20 may also be supported so as to be vertically movable.

【0065】カメラ20によって撮影された対象物OBを
表わす映像信号(モノクロームの映像信号で充分である
が,カラー映像信号であってもよい)は画像処理装置40
に与えられる。画像処理装置40は好ましくはコンピュー
タ・システムにより構成され,後述する照明条件決定支
援装置としての機能を有している。画像処理装置40はC
RT表示装置41を備えている。この表示装置41には,カ
メラ20が撮影した対象物OBの画像が表示されるととも
に,画像処理装置40によって決定された照明装置11の最
適高さhP が図15に示すように表示され,ユーザに最適
高さhP が報知される。
The image signal representing the object OB photographed by the camera 20 (a monochrome image signal is sufficient, but a color image signal may be used) is the image processing device 40.
Given to. The image processing device 40 is preferably composed of a computer system and has a function as an illumination condition determination support device described later. The image processing device 40 is C
An RT display device 41 is provided. An image of the object OB taken by the camera 20 is displayed on the display device 41, and the optimum height h P of the lighting device 11 determined by the image processing device 40 is displayed as shown in FIG. The user is notified of the optimum height h P.

【0066】図13は画像処理システムの他の例を示して
いる。図12に示すものと同一物には同一符号を付し,重
複説明を避ける。この画像処理システムでは照明装置11
が画像処理装置40からの指令により自動的に上下動さ
れ,かつ最適高さhP に位置決めされる。
FIG. 13 shows another example of the image processing system. The same components as those shown in FIG. 12 are designated by the same reference numerals to avoid redundant description. In this image processing system, the lighting device 11
Is automatically moved up and down according to a command from the image processing device 40, and is positioned at the optimum height h P.

【0067】照明装置11の昇降機構38は,摺動部33に固
定されたラック35と,このラック35に噛み合うピニオン
36とを備えている。ピニオン36は固定された軸受(図示
略)により回転自在に支持されている。ピニオン36はま
たパルス・モータ37により回転駆動される。
The raising / lowering mechanism 38 of the lighting device 11 includes a rack 35 fixed to the sliding portion 33 and a pinion that meshes with the rack 35.
It has 36 and. The pinion 36 is rotatably supported by a fixed bearing (not shown). The pinion 36 is also rotationally driven by a pulse motor 37.

【0068】画像処理装置40が照明装置11の最適高さh
P を決定すると,装置40は照明装置11がこの高さhP
なるようにモータ37に正または逆方向の回転指令を与え
る。モータ37は指令された回転量回転するので,ピニオ
ン36,ラック35を介して照明装置11が上下動され,最適
高さhP の位置に位置決めされる。必要ならば昇降機構
38またはモータ37にロック機構を設け,照明装置11を最
適高さ位置に保持する。
The optimum height h of the illumination device 11 is the image processing device 40.
When P is determined, the device 40 gives a forward or reverse rotation command to the motor 37 so that the lighting device 11 has this height h P. Since the motor 37 rotates by the commanded rotation amount, the lighting device 11 is moved up and down via the pinion 36 and the rack 35, and is positioned at the position of the optimum height h P. Lifting mechanism if necessary
38 or the motor 37 is provided with a lock mechanism to hold the lighting device 11 at the optimum height position.

【0069】図14は照明装置11の最適高さの決定を支援
するのに適した照明条件決定支援装置の構成を示してい
る。
FIG. 14 shows the configuration of an illumination condition determination support device suitable for supporting the determination of the optimum height of the illumination device 11.

【0070】照明条件決定支援装置50はユーザ・マシン
・インターフェイス53におよび最適高さ決定部54を備え
ている。これらの各部53,54は画像処理装置40に含まれ
ている。
The illumination condition determination support device 50 includes a user machine interface 53 and an optimum height determination unit 54. The respective units 53 and 54 are included in the image processing device 40.

【0071】入力装置51はキーボード,ライトペン,マ
ウス等から構成される。出力装置52は上述したCRT表
示装置41やパルス・モータ37を含む。ユーザは,ユーザ
・マシン・インターフェイス53の働きにより,表示装置
41に表示されたメニュー,指示,マーク,カーソル等に
したがって入力装置51を操作し,対話形式で各種デー
タ,情報の入力を行なう。
The input device 51 is composed of a keyboard, a light pen, a mouse and the like. The output device 52 includes the CRT display device 41 and the pulse motor 37 described above. The user can operate the user machine interface 53 to display the display device.
The input device 51 is operated in accordance with the menus, instructions, marks, cursors, etc. displayed on 41 to interactively input various data and information.

【0072】最適高さ決定部54が決定した最適高さhP
は,上述したように,表示装置41(出力装置52)に表示
されたり,モータ37への指令として使用される。この最
適高さ決定部54は好ましくはプログラムにしたがって動
作するCPU,ならびに後述するデータ・ベースおよび
入力された各種データを記憶するメモリから構成され
る。
The optimum height h P determined by the optimum height determination unit 54
Is displayed on the display device 41 (output device 52) or used as a command to the motor 37, as described above. The optimum height determining unit 54 is preferably composed of a CPU that operates according to a program, and a database that will be described later and a memory that stores various input data.

【0073】図16から図19は,表面に円環状の溝(刻印
部分)gが形成された対象物OBに対する円環状の照明
装置13(たとえばリング・ライト・ガイド照明装置)の
最適な設置高さhP を決定する方法を示すものである。
16 to 19 show the optimum installation height of the annular illumination device 13 (for example, a ring light guide illumination device) for the object OB having an annular groove (engraved portion) g formed on the surface. It shows how to determine h p .

【0074】最適な設置高さhP とは,溝gが暗く,対
象物OBの溝g以外の表面が均一に明るくなるような照
明を得るための照明装置13の対象物OBに対する高さを
いう。
The optimum installation height h P is the height of the illuminating device 13 with respect to the object OB for obtaining illumination in which the groove g is dark and the surface of the object OB other than the groove g is uniformly bright. Say.

【0075】照明装置13が,図16に示すように,かなり
高い位置に設置されている場合には,照明装置13からの
光が溝gの底面に到達するので,溝gの底面の一部が照
明され,溝gは暗くはならない。
When the illuminating device 13 is installed at a considerably high position as shown in FIG. 16, the light from the illuminating device 13 reaches the bottom surface of the groove g. Is illuminated, and the groove g does not become dark.

【0076】これに対して,照明装置13を,ある上限値
h1以下の高さまで下げると,図17に示すように,照明
光は溝gの底面に到達することはなく,溝gは暗くな
る。したがって,溝gが暗部となるような照明状態を得
るための照明装置13の高さhの条件はh≦h1で与えら
れる。
On the other hand, when the illuminating device 13 is lowered to a height equal to or less than the upper limit value h1, the illumination light does not reach the bottom surface of the groove g and the groove g becomes dark as shown in FIG. . Therefore, the condition of the height h of the illuminating device 13 for obtaining the illumination state in which the groove g becomes a dark part is given by h ≦ h1.

【0077】上限値h1は次式で表わされる。The upper limit value h1 is expressed by the following equation.

【0078】[0078]

【数1】 h1=d×{(R1−R2)/W} 式1## EQU00001 ## h1 = d.times. {(R1-R2) / W} Equation 1

【0079】ここで,dは溝gの深さ,Wは溝gの幅,
R1は視野中心から溝gの該中心から最も遠い縁までの
距離,R2は照明装置13の半径である。
Where d is the depth of the groove g, W is the width of the groove g,
R1 is the distance from the center of the field of view to the furthest edge of the groove g, and R2 is the radius of the illumination device 13.

【0080】他方,対象物OBの溝g以外の表面を一様
に照明するためには,照明装置13の等照度曲線を考慮し
て,対象物OBの表面に照明むらが生じないような条件
を満たす必要がある。
On the other hand, in order to uniformly illuminate the surface of the object OB other than the groove g, it is necessary to consider the isoilluminance curve of the illuminating device 13 so that the surface of the object OB is not unevenly illuminated. Need to meet.

【0081】図18はリング・ライト・ガイド照明装置13
の等照度曲線を示している。
FIG. 18 shows a ring light guide lighting device 13
Shows the isolux curve of

【0082】等照度で照明される領域の半径Rは,照明
装置13からの垂直方向の距離,すなわち照明装置13の設
置高さhに応じて変化することがこの図から分る。
It can be seen from this figure that the radius R of the area illuminated with equal illuminance changes according to the vertical distance from the illuminating device 13, that is, the installation height h of the illuminating device 13.

【0083】図19は,等照度で照明される領域の半径R
と照明装置13の設置高さhとの関係を示している。撮像
装置20の視野(対象物を照明する範囲)の半径をR0と
する。図19において,等照度で照明される領域の半径R
が上記視野の半径R0に等しいときの照明装置13の設置
高さhはh0である。したがって溝g以外の部分を明る
くかつ一様に照明するためには,照明装置13の設置高さ
hの下限値をh0に設定すればよい。この条件はh≧h
0である。
FIG. 19 shows the radius R of the area illuminated with equal illuminance.
And the installation height h of the lighting device 13 are shown. The radius of the visual field of the imaging device 20 (the range for illuminating the object) is R0. In Fig. 19, the radius R of the area illuminated with equal illuminance
Is equal to the radius R0 of the visual field, the installation height h of the illuminating device 13 is h0. Therefore, in order to illuminate a portion other than the groove g brightly and uniformly, the lower limit value of the installation height h of the illumination device 13 may be set to h0. This condition is h ≧ h
It is 0.

【0084】上述した2つの条件から照明装置13の最適
な設置高さhP は,h0≦hP ≦h1の範囲内で定める
ことができる。最適高さ決定部54内のメモリには,照明
装置の種類ごとにその半径R2と等照度曲線に関する情
報がデータ・ベースとしてストアされている。
From the above two conditions, the optimum installation height h P of the lighting device 13 can be determined within the range of h0 ≦ h P ≦ h1. Information regarding the radius R2 and the isolux curve for each type of lighting device is stored in the memory in the optimum height determination unit 54 as a data base.

【0085】図20は,上述した溝gをもつ対象物OBの
溝gを暗部とし,対象物OBの溝g以外の表面を均一な
明部として撮影するために,最適高さ決定部54によって
実行される照明装置の最適高さ決定処理の手順を示すも
のである。
In FIG. 20, the optimum height determining unit 54 is used for photographing the groove g of the object OB having the groove g described above as a dark portion and the surface of the object OB other than the groove g as a uniform bright portion. It shows the procedure of the optimum height determination process of the lighting device to be executed.

【0086】まず,対象物OBの形状的特徴に関する情
報として溝gの深さd,幅Wおよび視野中心から溝gの
最も遠い縁までの距離R1が入力装置51からユーザによ
って入力される。また撮像装置13の視野の半径R0が入
力装置51を通してユーザによって入力される(ステップ
201 )。もっともこの視野半径R0は対象物OBの半径
またはその対角線の長さの半分に等しければよいから,
対象物OBの形状的特徴の一つとして入力することもで
きる。
First, the depth d of the groove g, the width W, and the distance R1 from the center of the visual field to the furthest edge of the groove g are input by the user from the input device 51 as information regarding the geometrical characteristics of the object OB. Further, the radius R0 of the visual field of the image pickup device 13 is input by the user through the input device 51 (step
201). However, this field-of-view radius R0 may be equal to the radius of the object OB or half the length of its diagonal,
It can also be input as one of the geometrical characteristics of the object OB.

【0087】照明装置の種類は既に入力または決定され
ているものとすると,その照明装置の半径R2がデータ
・ベースから読出される。また,その照明装置の等照度
曲線に関するデータ・ベースから,既に入力された視野
半径R0を用いて高さの下限値h0が導き出される(ス
テップ202 )。
Assuming that the luminaire type has already been entered or determined, the radius R2 of the luminaire is read from the database. Further, the lower limit value h0 of the height is derived from the data base relating to the isoilluminance curve of the illuminating device by using the already input field radius R0 (step 202).

【0088】次に,第(1) 式の演算が実行されて照明装
置の設置高さの上限値h1が算出される(ステップ203
)。算出された上限値h1が上記下限値h0以上であ
るか否かが判定される(ステップ204 )。
Next, the calculation of the equation (1) is executed to calculate the upper limit value h1 of the installation height of the lighting device (step 203).
). It is determined whether the calculated upper limit value h1 is greater than or equal to the lower limit value h0 (step 204).

【0089】h0≦h1であれば最適高さの決定が可能
である。そこで下限値h0と上限値h1との平均値が式
2を用いて照明装置の最適な設置高さhP として算出さ
れる(ステップ205 )。
If h0 ≦ h1, the optimum height can be determined. Therefore, the average value of the lower limit value h0 and the upper limit value h1 is calculated as the optimum installation height h P of the lighting device by using the equation 2 (step 205).

【0090】[0090]

【数2】 hP =(h0+h1)/2 式2## EQU00002 ## h P = (h0 + h1) / 2 Equation 2

【0091】最適高さhP の算出は式2に限らず,h0
≦hP ≦h1を満たす高さhP を最適なものとして選ぶ
ことができるのはいうまでもない。
The calculation of the optimum height h P is not limited to the equation 2, but h0
It goes without saying that the height h P that satisfies ≦ h P ≦ h1 can be selected as the optimum height.

【0092】このようにして,決定された最適高さhP
は出力装置52を通して出力される(ステップ206 )。た
とえば,照明装置の最適な設置高さhP をユーザに知ら
せるための図15に示すようなメッセージ画像が表示装置
41に表示される。または,この最適高さhP に基づいて
モータ37が駆動され,照明装置がこの高さhP の位置に
自動的に位置決めされる。
In this way, the optimum height h P determined
Is output through the output device 52 (step 206). For example, a message image as shown in FIG. 15 is displayed on the display device to inform the user of the optimum installation height h P of the lighting device.
Displayed at 41. Alternatively, the motor 37 is driven based on this optimum height h P , and the lighting device is automatically positioned at the position of this height h P.

【0093】h0≦h1を満たさない場合には,表示装
置41に最適な高さhP が得られない旨のメッセージが表
示される(ステップ207 )。
If h0≤h1 is not satisfied, a message is displayed on the display device 41 indicating that the optimum height h P cannot be obtained (step 207).

【0094】(3) 照明条件決定支援装置(その2:最適
角度の決定の支援) 次に,画像処理システムにおいて,照明装置の対象物に
対する最適角度を決定するための支援装置について説明
する。
(3) Illumination condition determination support device (part 2: support for determination of optimum angle) Next, the support device for determining the optimum angle of the illumination device with respect to the object in the image processing system will be described.

【0095】図21は最適角度決定支援装置を含む画像処
理システムの全体的構成を示している。
FIG. 21 shows the overall structure of an image processing system including an optimum angle determination support device.

【0096】照明装置として図4に示すスリット・ライ
ト・ガイド14が用いられている。この照明装置14はその
長手方向には水平な姿勢で保持され,かつ対象物OBに
対して斜め上方から斜めに照明光を照射するように配置
されている。照明装置としては図2に示す直管蛍光灯12
を使用することもできる。
A slit light guide 14 shown in FIG. 4 is used as an illuminating device. This illuminating device 14 is held in a horizontal posture in its longitudinal direction, and is arranged so as to illuminate the object OB obliquely from above. As a lighting device, a straight tube fluorescent lamp 12 shown in FIG.
Can also be used.

【0097】図21において図12に示すものと同一物には
同一符号を付し重複説明を避ける。照明装置14の把持部
32Aは摺動部33に傾動自在に保持されており,照明装置
14の向きを任意の角度に手動で設定して固定することが
できる。
In FIG. 21, the same parts as those shown in FIG. 12 are designated by the same reference numerals to avoid redundant description. Holding part of the lighting device 14
32A is tiltably held by the sliding portion 33,
14 orientations can be manually set and fixed at any angle.

【0098】図13に示すシステム構成と同じように,摺
動部33を自動的に昇降する機構,および把持部32Aを任
意の角度に自動的に位置決めする機構を設け,画像処理
装置40からの指令に応じて高さおよび角度を自動的に設
定できるようにすることもできるのはいうまでもない。
As in the system configuration shown in FIG. 13, a mechanism for automatically raising and lowering the sliding portion 33 and a mechanism for automatically positioning the gripping portion 32A at an arbitrary angle are provided. It goes without saying that the height and the angle can be automatically set according to the command.

【0099】図22は対象物OBの一例を示している。対
象物OBは板状体であってその表面に長手方向にのびる
直線状の溝Gが形成されている。
FIG. 22 shows an example of the object OB. The object OB is a plate-like body, and a linear groove G extending in the longitudinal direction is formed on the surface thereof.

【0100】図23は照明装置14の最適設置角度の決定を
支援するのに適した照明条件決定支援装置の構成を示し
ている。図14に示す構成と比較すると,最適高さ決定部
54に代えて最適角度決定部55が設けられている。他の構
成は図14に示すものと同じである。
FIG. 23 shows the configuration of an illumination condition determination support device suitable for supporting the determination of the optimum installation angle of the illumination device 14. Compared with the configuration shown in Fig. 14, the optimum height determination unit
An optimum angle determination unit 55 is provided instead of 54. Other configurations are the same as those shown in FIG.

【0101】図24および図25は,溝Gを有する対象物O
Bに対する照明装置14(スリット・ライト・ガイド照明
装置)の設置角度θを最適値に設定する方法を示してい
る。
24 and 25 show an object O having a groove G.
The method of setting the installation angle θ of the illumination device 14 (slit light guide illumination device) with respect to B to an optimum value is shown.

【0102】照明装置14の最適な設置角度θとは,対象
物OBの溝Gが暗部,それ以外の表面部分が明部となる
ような照明を得るためのものである。これを実現するた
めには,溝Gの幅をS,溝Gの深さをtとすると,式3
の関係を満たさなければならない。角度θは照明装置14
からの光線(光軸)と水平面とのなす角度である。
The optimum installation angle θ of the illuminating device 14 is for obtaining illumination in which the groove G of the object OB is a dark part and the other surface part is a bright part. In order to realize this, when the width of the groove G is S and the depth of the groove G is t, Equation 3
Must meet the relationship. Angle θ is for lighting device 14
It is the angle between the ray (optical axis) from and the horizontal plane.

【0103】[0103]

【数3】 tanθ≦t/S 式3Equation 3 tan θ ≦ t / S Equation 3

【0104】ところで通常の物体の表面では,図25に示
すように,物体への入射光は不完全拡散反射する。すな
わち入射角に等しい正反射光の強度が最も強く,正反射
角からずれるにしたがって反射光強度は弱くなる。対象
物OBの溝G以外の表面を明部として撮像し,暗部の溝
Gとの明確なコントラストを得るためには,撮像装置20
に入射する溝部G以外の部分からの反射光の強度を大き
くする必要がある。撮像装置20は対象物OBの真上,ま
たはそれに近い位置に設置されているので,撮像装置20
に正反射光ができるだけ多く入射するようにするために
は,照明装置14の設置角度θは90度にできるだけ近い方
がよい。このことから照明装置14の最適な設置角度θ
は,式4で与えられる。
On the surface of an ordinary object, incident light on the object is incompletely diffused and reflected as shown in FIG. That is, the intensity of the specular reflection light equal to the incident angle is the strongest, and the intensity of the reflection light decreases as the specular reflection angle deviates. In order to image the surface of the object OB other than the groove G as a bright portion and obtain a clear contrast with the groove G in the dark portion, the image pickup device 20
It is necessary to increase the intensity of the reflected light from the portion other than the groove portion G incident on the. Since the imaging device 20 is installed right above the object OB or at a position close to it, the imaging device 20
In order to allow as many specularly reflected lights to enter as possible, the installation angle θ of the lighting device 14 should be as close as possible to 90 degrees. From this, the optimal installation angle θ of the lighting device 14
Is given by Equation 4.

【0105】[0105]

【数4】 θP = tan-1(t/S) 式4## EQU4 ## θ P = tan -1 (t / S) Equation 4

【0106】図26は,溝Gをもつ対象物OBについて,
溝Gを暗部,それ以外の部分を明部として撮像するため
の照明条件を見つけ出すために,適角度決定部55によっ
て実行される処理の手順を示すものである。
FIG. 26 shows an object OB having a groove G,
The procedure of the process executed by the appropriate angle determination unit 55 in order to find the illumination condition for imaging the groove G as a dark portion and the other portion as a bright portion is shown.

【0107】まず,ユーザが入力装置51から対象物OB
の溝Gの幅Sおよび深さtについてのデータを入力する
(ステップ211 )。次に式4の演算が実行され,照明装
置14の最適設置角度θP が算出される(ステップ212
)。この算出された最適設置角度θP は出力装置52か
ら出力される(ステップ213 )。たとえば表示装置41の
画面に,照明装置14の最適な設置角度θP をユーザへ知
らせるためのメーセージ画像(図示略)が表示される。
First, the user inputs the object OB from the input device 51.
Data about the width S and the depth t of the groove G is input (step 211). Next, the calculation of Expression 4 is executed to calculate the optimum installation angle θ P of the lighting device 14 (step 212).
). The calculated optimum installation angle θ P is output from the output device 52 (step 213). For example, a message image (not shown) for notifying the user of the optimum installation angle θ P of the lighting device 14 is displayed on the screen of the display device 41.

【0108】(4) 照明条件決定支援装置(その3:照明
装置および照明方法の決定の支援) 画像処理システムにおいて,検査目的に適した画像を得
るためには,どの照明装置を用いて,どのような照明方
法で照明するのか,ということもきわめて重要な要因で
ある。
(4) Illumination condition determination support device (3: Support for determination of illumination device and illumination method) In an image processing system, in order to obtain an image suitable for an inspection purpose, which illumination device is used Whether to illuminate with such a lighting method is also a very important factor.

【0109】発明者らは,何をどのように検査するため
に,どのような照明装置がどのような照明方法で用いら
れているかを詳細に調べ,次の3つの要因に基づけば適
切な照明装置と照明方法を決定できるとの知見を得た。
すなわち,検査目的,着目部と背景との光学的性質
の差異,および視野の大きさの3要因である。
The inventors examined in detail what kind of lighting device was used in what kind of lighting method to inspect what and how, and appropriate lighting based on the following three factors. We obtained the knowledge that the device and lighting method can be determined.
That is, there are three factors: the purpose of inspection, the difference in optical properties between the part of interest and the background, and the size of the field of view.

【0110】照明装置と照明方法は上記要因とに基
づいて一応決定はできる。より厳密には要因の着目部
と背景の光学的性質の差異(透過率,反射率,反射方
向,色など)のうち,どの差異に基づいて照明装置およ
び照明方法を決定するのかということも重要である。な
ぜならば,一般に検査すべき着目部と背景は透過率,反
射率,反射方向,色などのうちどれか1つだけが異なる
わけではないからである。
The lighting device and the lighting method can be temporarily determined based on the above factors. Strictly speaking, it is also important to determine which of the differences (transmittance, reflectance, reflection direction, color, etc.) in the optical properties of the part of interest and the background determines the lighting device and lighting method. Is. This is because, in general, the part of interest to be inspected and the background do not differ in any one of transmittance, reflectance, reflection direction, color, and the like.

【0111】そこで,要因を基にして,各検査目的に
適した要因を考慮する必要がある。このためには,予
め獲得しておいた専門家の経験知識や光学的解析結果が
利用される。
Therefore, it is necessary to consider factors suitable for each inspection purpose based on the factors. For this purpose, the expert's empirical knowledge and optical analysis results acquired in advance are used.

【0112】図27は照明装置と照明方法の決定を支援す
るのに適した照明条件決定支援装置の構成例を示してい
る。図14および図23との比較でいうと,決定部54または
55に代えて,照明装置および照明方法の決定部56が設け
られている。
FIG. 27 shows a configuration example of a lighting condition determination support device suitable for supporting the determination of the lighting device and the lighting method. Compared to FIG. 14 and FIG. 23, the decision unit 54 or
Instead of 55, a lighting device and lighting method determination unit 56 is provided.

【0113】図28は検査対象物(ワーク)の一例として
2つのコネクタの外観を示している。このコネクタにつ
いては後に具体的に照明装置および照明方法を決定する
実例で触れることにする。
FIG. 28 shows the appearance of two connectors as an example of the inspection object (work). This connector will be described later in an example of determining a lighting device and a lighting method.

【0114】図29は照明条件決定支援装置50による照明
装置と照明方法の決定処理の全体的な手順を示すもので
ある。
FIG. 29 shows the overall procedure of the illumination condition determination support device 50 for determining the illumination device and illumination method.

【0115】ユーザによって,表示装置41の表示画面を
利用した対話を通して,入力装置51から検査目的が入
力されると,入力された検査目的にしたがって図30から
図36の処理のいずれかにジャンプすることになる(ステ
ップ221 )。検査目的とこれらの処理との関係は次の通
りである。
When the user inputs the inspection purpose from the input device 51 through the dialogue using the display screen of the display device 41, the process jumps to any of the processes shown in FIGS. 30 to 36 according to the input inspection purpose. This will be the case (step 221). The relationship between the inspection purpose and these processes is as follows.

【0116】形状,寸法の検査 図30の処理 物品の有無や欠品の検査 図31の処理 傷の検査 図32の処理 色の検査 図33の処理 位置決め 図34(A) ,(B) の処理 異物の検査 図35の処理 文字,マークの検査 図36の処理Inspection of shape and dimensions Processing of FIG. 30 Inspection of presence / absence of article and processing of FIG. 31 Inspection of scratches Processing of FIG. 32 Color inspection of FIG. 33 Positioning processing of FIG. 34 (A) and (B) Inspection of foreign matter Processing of Figure 35 Processing of character and mark Processing of Figure 36

【0117】視野の大きさも入力してもよいが,図37
から図43に示す表示画面の側から分るように,視野の大
きさに適した照明装置が表示されるので,ユーザは視野
の大きさを入力しなくても照明装置を決定することがで
きる。もちろん,視野の大きさの入力を待って,入力さ
れた視野の大きさに適した照明装置のみを表示するよう
にしてもよい。
The size of the field of view may also be entered, as shown in FIG.
As can be seen from the side of the display screen shown in FIG. 43, the illuminating device suitable for the size of the visual field is displayed, so that the user can determine the illuminating device without inputting the size of the visual field. . Of course, after inputting the size of the visual field, only the illumination device suitable for the input size of the visual field may be displayed.

【0118】後に詳述するように,図30から図36に示す
検査目的に合致した具体的処理において,要因の着目
部と背景との光学的性質の差異が表示装置41の画面上に
おいて順次質問され,ユーザからそれに対する回答が入
力装置51を通して入力されると,検査のために着目すべ
き最適な着目部と背景との光学的性質の差異が導かれ
(ステップ222 ),その結果に応じて照明装置および照
明方法が決定される(ステップ223 )。この実施例で
は,表示された画面に表わされた照明装置と照明方法と
のいくつかの組合わせの中からユーザが最終的に照明装
置および照明方法を決定することになる。
As will be described in detail later, in the concrete processing matching the inspection purpose shown in FIGS. 30 to 36, the difference in the optical properties between the attention area of the factor and the background is sequentially asked on the screen of the display device 41. Then, when the user inputs an answer to the answer through the input device 51, the difference in the optical properties between the optimal attention portion to be noticed for the inspection and the background is derived (step 222), and according to the result. A lighting device and a lighting method are determined (step 223). In this embodiment, the user finally decides the lighting device and the lighting method from some combinations of the lighting device and the lighting method displayed on the displayed screen.

【0119】図30に示す形状と寸法の検査を目的とした
決定処理においては,まずシルエット検査が可能かどう
かが質問される(ステップ231 )。ユーザが可能である
旨の回答を入力すると,検査のために着目すべき最適な
着目部と背景の光学的性質の差異は透過率であるか
ら,図37に示す透過光照明用画面が表示装置41に表示さ
れる(ステップ232 )。
In the determination process for the purpose of inspecting the shape and dimensions shown in FIG. 30, first, it is inquired whether or not silhouette inspection is possible (step 231). When the user inputs an answer that it is possible, since the difference between the optimum optical parts to be inspected for inspection and the optical properties of the background is the transmittance, the transmitted light illumination screen shown in FIG. 37 is displayed on the display device. Displayed at 41 (step 232).

【0120】この透過光照明用画面は,シルエット検査
が可能であれば図7に示す透過光照明が適していること
を表わしている。透過光照明には,照明装置と対象物と
カメラとを水平に配置するタイプ1と,これらを垂直に
配置する(図7に示す配置)タイプ2とがある。これら
の両タイプに共通して,視野の大きさに対応して適切な
照明装置が表示される。ユーザはこれらの表示された照
明装置の中から視野の大きさに合ったものを選択するこ
とになる。ここでφはリング型の照明装置の径であり,
l(Lの小文字)(図38参照)は直線状の照明装置の長
さを示している。
This transmitted light illumination screen shows that the transmitted light illumination shown in FIG. 7 is suitable if the silhouette inspection is possible. There are two types of transmitted light illumination: a type 1 in which an illumination device, an object, and a camera are horizontally arranged, and a type 2 in which these are vertically arranged (arrangement shown in FIG. 7). Common to both of these types, an appropriate lighting device is displayed according to the size of the field of view. The user will select one of these displayed lighting devices that matches the size of the field of view. Where φ is the diameter of the ring type lighting device,
l (lowercase letter L) (see FIG. 38) indicates the length of the linear illumination device.

【0121】シルエット検査が不可能である旨がユーザ
から入力されると,次に着目部と背景の色が似ているか
どうかの質問が表示装置41に現われる(ステップ233
)。着目部と背景の色が似ていなければ着目すべき差
異は色や反射率である。そこで,図38に示す一様光照明
用画面が表示される(ステップ234 )。
When the user inputs that the silhouette inspection is not possible, the display device 41 then asks whether or not the color of the target portion is similar to the background color (step 233).
). If the color of the part of interest and the color of the background are not similar, the differences to be noted are the color and reflectance. Then, the screen for uniform light illumination shown in FIG. 38 is displayed (step 234).

【0122】一様光照明用画面では一様光照明(図8)
が適切であること,一様光照明において各種の視野の大
きさに適した照明装置の種類が表示される。
On the screen for uniform light illumination, uniform light illumination (FIG. 8)
Is appropriate, and the type of illuminator suitable for various field sizes in uniform light illumination is displayed.

【0123】シルエット検査が不可能でかつ着目部と背
景の色が似ている場合には,着目すべき差異は光の反射
方向である。そこで着目部に突起があるか,穴があるか
が尋ねられる(ステップ235 ,237 )。
When silhouette inspection cannot be performed and the color of the target portion and the background are similar, the notable difference is the light reflection direction. Then, it is asked whether there is a protrusion or a hole in the part of interest (steps 235 and 237).

【0124】対象物の着目部に突起がある場合には図39
に示す凹凸突起照明用画面(凹凸のうち突起に着目した
照明のための画面)が表示される(ステップ236 )。こ
の画面では平行光照明(図10)が適切であること,およ
びこの平行光照明において用いられる照明装置の種類が
視野の大きさごとに表示される。
If there is a protrusion on the target portion of the target object, FIG.
The uneven projection illumination screen (screen for illumination focusing on the projection of the unevenness) shown in is displayed (step 236). This screen shows that parallel light illumination (Fig. 10) is appropriate and the type of illumination device used in this parallel light illumination is displayed for each size of the field of view.

【0125】着目部に穴がある場合には図40に示す凹凸
穴照明用画面(凹凸のうち穴に着目した照明を行なうた
めのもの)が表示される(ステップ238 )。この画面で
は,検査の目的または場所に応じて,平行光照明または
同軸落射照明(図9)が適切であること,およびそれら
に適した視野の大きさごとの照明装置が表示される。
If there is a hole in the focused portion, the uneven hole illumination screen (for illumination of focusing on the hole among the unevenness) shown in FIG. 40 is displayed (step 238). On this screen, parallel light illumination or coaxial epi-illumination (FIG. 9) is appropriate, and an illuminating device for each size of the visual field suitable for them is displayed according to the purpose or location of the inspection.

【0126】着目部に突起も穴もない場合には図41に示
す凹凸エッジ照明用画面が表示される(ステップ239
)。この画面では平行光照明が適切であること,およ
び視野の大きさに応じた照明装置の種類が表示される。
When there is no protrusion or hole in the target portion, the uneven edge illumination screen shown in FIG. 41 is displayed (step 239).
). This screen shows that parallel light illumination is appropriate and the type of illumination device according to the size of the field of view.

【0127】図31に示す部品の有無および欠品の有無を
目的とした検査のために,シルエット検査が可能かどう
か(ステップ241 ),部品の色とベース(部品が搭載さ
れている本体)の色とが似ているかどうか(ステップ24
3 )が順次表示装置41を通して質問される。
For the purpose of the inspection shown in FIG. 31 for the presence / absence of parts and the absence of parts, whether or not silhouette inspection is possible (step 241), the color of the parts and the base (main body on which the parts are mounted) Whether the colors are similar (step 24
3) are sequentially queried through the display device 41.

【0128】図30を参照して説明した照明用画面以外の
ものについて特に言及すれば,部品とベースの色が似て
いる場合には,図43に示す正反射利用照明用画面が表示
される(ステップ245 )。正反射利用照明には平行光照
明(図10)および暗視野照明(図11)が含まれる。ユー
ザはこの画面に表示された,照明方法および視野の大き
さに対応した照明装置を選択することができる。
With special reference to other than the illumination screen described with reference to FIG. 30, when the parts and the base have similar colors, the regular reflection illumination screen shown in FIG. 43 is displayed. (Step 245). Illumination using specular reflection includes collimated illumination (FIG. 10) and dark field illumination (FIG. 11). The user can select an illuminating device displayed on this screen in accordance with the illuminating method and the size of the visual field.

【0129】図32から図36に示された処理も上述したも
のとほぼ同じであり,その処理の内容はこれらの図面か
ら理解できるであろう。まだ言及していない図42の凹凸
線照明用画面について少し説明すると,この画面は図32
に示す傷の検査を目的とした照明において,シルエット
検査が不可能でかつ傷の方向が特定不可能である場合
(ステップ251 ,253 のいずれにおいてもNO)に表示さ
れる。対象物の表面にできている傷(細い線状の凹凸)
を適切に撮像するために平行光照明を用いるのが適当で
あり,視野の大きさに応じてスリット・ライト・ガイド
または直管蛍光灯を選択すべきであることが示されてい
る。
The processing shown in FIGS. 32 to 36 is almost the same as that described above, and the contents of the processing can be understood from these drawings. To explain a little about the uneven lighting screen of Fig. 42, which has not been mentioned yet, this screen is shown in Fig. 32.
This is displayed when the silhouette inspection is not possible and the direction of the damage cannot be specified in the illumination shown in (1) for the purpose of inspection of the damage (NO in both steps 251 and 253). Scratches on the surface of the object (thin linear irregularities)
It has been shown that it is appropriate to use collimated illumination to properly image the, and slit light guides or straight tube fluorescent lamps should be selected depending on the size of the field of view.

【0130】以上のようにして,検査目的に応じて表示
装置41および入力装置51を通して所定の質問とそれに対
するユーザの回答とが繰り返され,目的とする検査のた
めに着目すべき最適な着目部と背景との光学的性質の差
異が何であるかが判断され,その判断結果に基づき適切
な照明装置および照明方法が決定される。
As described above, the predetermined question and the user's answer to the question are repeated through the display device 41 and the input device 51 according to the inspection purpose, and the optimum attention portion to be noticed for the intended inspection. What is the difference in optical properties between the background and the background is determined, and an appropriate illumination device and illumination method are determined based on the determination result.

【0131】具体例として図28に示すコネクタ・ピンの
抜けを検査する場合について説明する。検査目的は部
品の有無,欠品検査に相当するので,図31に示す処理に
進む。検査ラインでシルエット検査できるような構成に
なっていれば,図37に示す透過光照明用画面が表示され
る。視野は30mm程度であるので,リング型の蛍光灯を用
いた水平型または垂直型の透過光照明が適切ということ
になる。シルエット検査ができない場合には,次の判断
に移り,部品とベースの色は似ていないので図38に示さ
れる一様光照明用画面が表示される。この例では対象物
は横長であり(タイプ2),視野は30mm程度であるの
で,スリット・ライト・ガイドを用いて斜め上方から照
明することが適当という結論が得られる。
As a specific example, the case of inspecting the connector pins for disconnection shown in FIG. 28 will be described. Since the inspection purpose corresponds to the presence / absence of parts and the inspection of missing parts, the process proceeds to the process shown in FIG. If the silhouette line can be inspected on the inspection line, the transmitted light illumination screen shown in FIG. 37 is displayed. Since the field of view is about 30 mm, horizontal or vertical transmitted light illumination using a ring type fluorescent lamp is appropriate. If the silhouette inspection cannot be performed, the process moves to the next determination, and since the colors of the parts and the base are not similar, the uniform light illumination screen shown in FIG. 38 is displayed. In this example, the object is horizontally long (type 2) and the field of view is about 30 mm, so it can be concluded that it is appropriate to illuminate from a diagonally upper position using a slit light guide.

【0132】上記の例では,表示装置41と入力装置51を
通してユーザと決定部56とが対話することにより処理が
進行するようになっている。上記要因,,を選択
する選択フローやガイド・ブックにしたがってユーザが
各種データ,情報を入力することにより処理を進行させ
てもよい。また,要因,,の順で選択が行なわれ
ているが,たとえば「視野の大きさ」をまず定めるよ
うな手順であってもよい。
In the above example, the process proceeds by the user interacting with the determination unit 56 through the display device 41 and the input device 51. The processing may be advanced by the user inputting various data and information according to a selection flow for selecting the above factors, and a guidebook. Further, although the selection is made in the order of the factor, the procedure may be such that the "size of the visual field" is first determined.

【0133】(5) 照明条件決定支援装置(その4) 照明条件決定支援装置の最後の例として,上述した照明
装置および照明方法の決定,ならびに照明装置の最適高
さまたは最適角度を決定するための装置について説明す
る。
(5) Illumination condition determination support device (4) As a final example of the illumination condition determination support device, for determining the above-described illumination device and illumination method, and determining the optimal height or optimal angle of the illumination device. The device will be described.

【0134】図44に示すこのような照明条件決定支援装
置50には,上述した最適高さ決定部54,最適角度決定部
55ならびに照明装置および照明方法の決定部56が設けら
れている。他の構成は,図14,図23および図27に示すも
のと同じである。
The illumination condition determination support device 50 as shown in FIG. 44 includes the above-described optimum height determination unit 54 and optimum angle determination unit.
55 and a lighting device and lighting method determination unit 56 are provided. Other configurations are the same as those shown in FIGS. 14, 23 and 27.

【0135】この装置50において実行される処理手順が
図45に示されている。
The processing procedure executed in this device 50 is shown in FIG.

【0136】まず,上述したように検査目的に適した照
明装置および照明方法がユーザと決定部56との対話を通
して決定される(ステップ311 )。ユーザは表示装置41
に表示されたものの中から最適な照明装置および照明方
法を選択して入力する。
First, as described above, the illumination device and the illumination method suitable for the inspection purpose are determined through the dialogue between the user and the determination unit 56 (step 311). User display device 41
The optimum illuminating device and illuminating method are selected from among those displayed in FIG.

【0137】このようにして決定された照明装置につい
て,最適高さを決定すべきか,最適角度を決定すべきか
が判定され,それに応じて決定部54,55のいずれかが選
択される(ステップ312 )。一般的にはリング状の照明
装置については最適高さの決定が必要であり,直線状の
照明装置については最適角度の決定が必要となろう。決
定すべき最適高さまたは角度に応じて,必要な情報が入
力され,図20に示す処理または図26に示す処理にしたが
って,最適高さhP または最適角度θP が決定され(ス
テップ313 ),その結果が表示装置41に表示されるか,
または高さもしくは角度の調整装置(昇降機構等)に与
えられる(ステップ314 )。
With respect to the illumination device thus determined, it is determined whether the optimum height or the optimum angle should be determined, and one of the determining units 54 and 55 is selected accordingly (step 312). ). In general, it will be necessary to determine the optimum height for a ring-shaped lighting device, and it will be necessary to determine the optimum angle for a linear lighting device. Required information is input according to the optimum height or angle to be determined, and the optimum height h P or the optimum angle θ P is determined according to the process shown in FIG. 20 or the process shown in FIG. 26 (step 313). , Whether the result is displayed on the display device 41,
Alternatively, it is given to a height or angle adjusting device (a lifting mechanism or the like) (step 314).

【0138】図46は複数種類(n種類)の照明装置が選
択された場合に,それらのそれぞれについて最適高さを
決定するための処理手順を示している。図20に示すもの
と同一処理については同一ステップ番号を付し説明を省
略する。
FIG. 46 shows a processing procedure for determining an optimum height for each of a plurality of types (n types) of lighting devices when they are selected. The same steps as those shown in FIG. 20 are designated by the same step numbers and the description thereof is omitted.

【0139】カウンタiが設けられており,このカウン
タiはまずi=1に初期設定され(ステップ321 ),ス
テップ204 の条件h0≦h1を満たさない照明装置があ
った場合にインクレメントされていく(ステップ323
)。各種条件の入力(ステップ201 )ののち,i番目
の照明装置の種類が入力され(ステップ322 ),入力さ
れた照明装置について最適高さhP か決定できるかどう
かが判定される(ステップ204 )。決定できれば最適高
さhP が求められ,処理が終る。すべての種類(n種
類)の照明装置について最適高さが決定できない場合に
は(ステップ324 ),その旨のメッセージが表示されて
処理が終る(ステップ207 )。照明装置の均一照度をも
つ視野の半径R0はステップ322 において照明装置の種
類ごとに入力される場合もあろう。
A counter i is provided. This counter i is initially set to i = 1 (step 321) and incremented when there is an illumination device that does not satisfy the condition h0 ≦ h1 of step 204. (Step 323
). After inputting various conditions (step 201), the type of the i-th lighting device is input (step 322), and it is determined whether or not the optimum height h P can be determined for the input lighting device (step 204). . If it can be determined, the optimum height h P is obtained, and the processing ends. When the optimum heights cannot be determined for all types (n types) of lighting devices (step 324), a message to that effect is displayed and the process ends (step 207). The radius R0 of the uniform illumination field of view of the illuminator may be entered in step 322 for each illuminator type.

【0140】(6) 最適照明条件設定支援装置(その1:
照明装置の位置の設定) 上述した照明条件決定支援装置(その1,その2)では
照明装置と被検査対象物との位置関係に基づいて照明装
置の最適高さ,最適角度を決定している。次に,カメラ
により撮像された画像の質の観点から照明装置の最適位
置を決定する,またはその決定を支援する装置について
説明する。
(6) Optimal lighting condition setting support device (part 1:
Setting of Position of Lighting Device) In the above-mentioned lighting condition determination support device (No. 1 and No. 2), the optimum height and the optimum angle of the lighting device are determined based on the positional relationship between the lighting device and the inspection object. . Next, a device that determines or assists the determination of the optimum position of the lighting device from the viewpoint of the quality of the image captured by the camera will be described.

【0141】この実施例においても図12に示す画像処理
システムの構成が適用される。画像処理装置40は,テレ
ビ・カメラ20によって撮像された対象物OBを表わす映
像信号を取込み,照明装置11の最適高さの設定を支援す
るための後述する画像処理を実行する。CRT表示装置
41は対象物OBの撮影画像を表示するとともに,照明装
置11の位置設定をアドバイスするためのメッセージを表
示する。
Also in this embodiment, the configuration of the image processing system shown in FIG. 12 is applied. The image processing device 40 takes in a video signal representing the object OB picked up by the television / camera 20 and executes image processing described later for supporting the setting of the optimum height of the lighting device 11. CRT display device
41 displays a photographed image of the object OB and also displays a message for advising the position setting of the lighting device 11.

【0142】図47は画像処理装置40の回路構成を示して
いる。画像処理装置40は,画像入力部61,画像メモリ6
2,画像出力部63,マイクロコンピュータ,タイミング
制御部64などによって構成されている。
FIG. 47 shows a circuit configuration of the image processing device 40. The image processing device 40 includes an image input unit 61 and an image memory 6
2. The image output unit 63, the microcomputer, the timing control unit 64, etc.

【0143】画像入力部61は,テレビ・カメラ20から出
力されるアナログ映像信号をディジタル画像データに変
換するA/D変換器を含み,このディジタル画像データ
を画像メモリ62に与える。また画像入力部61は,入力す
るアナログ映像信号に基づいて,明るさを横軸として画
質を表わす画質ヒストグラムを実時間で生成するヒスト
グラム生成回路を備えている。このヒストグラム生成回
路の具体的回路構成および動作については後述する。
The image input section 61 includes an A / D converter for converting the analog video signal output from the television camera 20 into digital image data, and supplies this digital image data to the image memory 62. The image input unit 61 also includes a histogram generation circuit that generates an image quality histogram representing the image quality in real time with brightness as the horizontal axis based on the input analog video signal. The specific circuit configuration and operation of this histogram generation circuit will be described later.

【0144】画像メモリ62は画像入力部61から与えられ
る画像データを画素単位で記憶する。画像出力部63は画
像メモリ62から読出された画像データをアナログ映像信
号に変換するD/A変換器を含み,変換された1画面分
のアナログ映像信号をCRT表示装置41に与える。これ
により,テレビ・カメラ20によって撮影された対象物O
Bの画像が表示装置41にも表示される。
The image memory 62 stores the image data supplied from the image input section 61 in pixel units. The image output unit 63 includes a D / A converter for converting the image data read from the image memory 62 into an analog video signal, and supplies the converted analog video signal for one screen to the CRT display device 41. As a result, the object O captured by the TV camera 20
The image of B is also displayed on the display device 41.

【0145】マイクロコンピュータは,制御,演算の主
体であるCPU65を有し,このCPU65にシステムバス
を介してROM66,RAM67,I/O制御部68などが接
続されている。CPU65はROM66に格納されたプログ
ラムを解読,実行し,またRAM67に対して各種データ
の読み書きを行って,所定の画像処理を実行する。I/
O制御部68にはキーボード69が接続されている。キーボ
ード69からのキー入力信号はI/O制御部68を経てCP
U65へ送られる。
The microcomputer has a CPU 65 which is a main body of control and calculation, and a ROM 66, a RAM 67, an I / O control unit 68 and the like are connected to the CPU 65 via a system bus. The CPU 65 decodes and executes the program stored in the ROM 66, reads and writes various data from and in the RAM 67, and executes predetermined image processing. I /
A keyboard 69 is connected to the O control unit 68. The key input signal from the keyboard 69 is sent to the CP via the I / O control unit 68.
It is sent to U65.

【0146】タイミング制御部64は,CPU65の制御の
下に,画像入力部61,画像メモリ62,画像出力部63に対
して,各種データの入出力動作を制御するためのタイミ
ング信号を出力する。
Under the control of the CPU 65, the timing control section 64 outputs timing signals for controlling the input / output operation of various data to the image input section 61, the image memory 62, and the image output section 63.

【0147】図48は,画像入力部61に設けられたヒスト
グラム生成回路の具体例を示している。
FIG. 48 shows a concrete example of the histogram generation circuit provided in the image input section 61.

【0148】CPU65はCPUバスを介してアドレス・
ジェネレータ80を制御する。アドレス・ジェネレータ80
は必要なアドレス信号,コントロール信号およびタイミ
ング信号を生成し,構成各部へ与える。画像メモリ62
は,コントロール・バスを介して入力するコントロール
信号によって書込と読出が制御される。アドレス・バス
を介して入力するアドレス信号にしたがう画像メモリ62
のアドレスに,データ・バスから供給される画像データ
が書込まれ,また,読出される。アドレス・バス,コン
トロール・バスおよびデータ・バスは,他の回路にも接
続されているのはいうまでもない。画像メモリ62には,
1フィールド分(または1フレーム分)の画像データが
書込まれる。
The CPU 65 sends an address via the CPU bus.
Control the generator 80. Address generator 80
Generates the necessary address signal, control signal and timing signal, and supplies them to each component. Image memory 62
The writing and reading are controlled by a control signal input via the control bus. Image memory 62 according to the address signal input via the address bus
The image data supplied from the data bus is written in and read out from the address. It goes without saying that the address bus, control bus and data bus are also connected to other circuits. In the image memory 62,
Image data for one field (or one frame) is written.

【0149】画像メモリ62にストアされた1フィールド
分(または1フレーム分)の画像データに,図50に示す
ように,この実施例では3×3=9画素のウインドウが
設定される。このウインドウの中心の画素をP0 とし,
この中心画素P0 のまわりの画素に反時計回りにP1
8 の符号を付す。3×3のウインドウは全画面のエリ
アを水平および垂直走査方向に移動していく。
As shown in FIG. 50, a window of 3 × 3 = 9 pixels is set in the image data for one field (or one frame) stored in the image memory 62, as shown in FIG. The pixel at the center of this window is P 0 ,
The pixels around this central pixel P 0 are rotated counterclockwise from P 1 ~
Given the sign of the P 8. The 3 × 3 window moves in the horizontal and vertical scanning directions in the entire screen area.

【0150】このようなウインドウを設定するために,
ラッチ回路76,75,1H遅延回路(シフト・レジスタ)
78,ラッチ回路70,74,1H遅延回路71およびラッチ回
路72,73が設けられており,画像メモリ62から水平,垂
直走査の順序で読出された画像データはこれらのラッチ
回路および1H遅延回路に上記の順序で順次転送されて
いく。1H遅延回路78,71は入力データを1H(1水平
走査期間)遅延して出力し,ラッチ回路76,75,70,7
4,72,73は入力データを1画素クロック周期遅延して
出力する。
To set such a window,
Latch circuit 76, 75, 1H delay circuit (shift register)
78, latch circuits 70, 74, 1H delay circuit 71 and latch circuits 72, 73 are provided, and the image data read from the image memory 62 in the order of horizontal and vertical scanning is supplied to these latch circuits and 1H delay circuits. The data is sequentially transferred in the above order. The 1H delay circuits 78, 71 delay the input data by 1H (1 horizontal scanning period) and output the delayed data, and the latch circuits 76, 75, 70, 7
Reference numerals 4, 72 and 73 delay the input data by one pixel clock cycle and output it.

【0151】画像メモリ62から読出された画像データ
(画素P7 ),ラッチ回路76,75,70,74,72,73の出
力画像データ(画素P6 ,P5 ,P0 ,P4 ,P2 ,P
3 )および1H遅延回路78,71の出力画像データ(画素
8 ,P1 )は非適合度演算部81に与えられる。ラッチ
回路70の出力画像データ(中心画素P0 )はまた,非適
合度ヒストグラム生成部82および明るさヒストグラム生
成部83にも与えられる。
The image data (pixel P 7 ) read from the image memory 62 and the output image data (pixels P 6 , P 5 , P 0 , P 4 , P of the latch circuits 76, 75, 70, 74, 72, 73). 2 , P
3 ) and the output image data (pixels P 8 and P 1 ) of the 1H delay circuits 78 and 71 are given to the incompatibility calculating unit 81. The output image data (center pixel P 0 ) of the latch circuit 70 is also given to the non-matching degree histogram generating section 82 and the brightness histogram generating section 83.

【0152】図49は非適合度演算部81の構成例を示すも
のである。この非適合度演算部81は,縦,横,斜めにの
びる8種類(8方向)のエッジ・パターンのそれぞれに
対するウインドウ内画像データの適合度(エッジ適合
度;エッジらしさ)μ1 〜μ8を求め,これらの適合度
μ1 〜μ8 のMAX演算(最大のものを選択すること)
を行ってエッジ適合度μを求め,さらに*μ(非適合度
は図面ではμの上にバーを記入して表わされているが、
明細書では*μと表わすことにする。)=1−μより非
適合度(エッジらしくなさ)を求めるものである。
FIG. 49 shows a configuration example of the incompatibility calculating section 81. The incompatibility calculating unit 81 calculates the conformity (edge conformity; edge-likeness) μ 1 to μ 8 of the image data in the window for each of eight types (8 directions) of edge patterns extending vertically, horizontally, and diagonally. MAX calculation of these goodness-of-fit μ 1 to μ 8 (select the maximum one)
To obtain the edge conformance μ, and then * μ (the non-conformance is indicated by writing a bar above μ in the drawing,
In the specification, it will be expressed as * μ. ) = 1−μ, the degree of non-conformity (unlike edge) is obtained.

【0153】8個の減算回路91〜98が設けられている。
これらの減算回路91〜98にはそれぞれ,上述したウイン
ドウ内画素P1 〜P8 の画像データが与えられる。ま
た,すべての減算回路91〜98には中心画素P0 の画像デ
ータが与えられる。減算回路91は画素P1 の画像データ
と中心画素P0 の画像データとの差(これをq1 とす
る)を算出する。同じように減算回路92〜98は,画素P
2 〜P8 の画像データのそれぞれと中心画素P0 の画像
データとの差(これらをq2 〜q8 とする)を算出す
る。画像データは上述したようにモノクローム画像を表
わすものであるから(カラー画像データの場合には輝度
データを抽出すればよい),各画素の明るさを示してい
る。したがって,差データq1 〜q8 は,中心画素P0
とその周囲の画素P1 〜P8 との明るさの差を表わして
いる。図51にウインドウ内の明るさパターンP0 〜P8
(P0 〜P8 はここでは画像データを示す)からウイン
ドウ内の中心画素を基準とした明るさパターン(明るさ
の差のパターン)q0 〜q8 が生成される様子が示され
ている。
Eight subtraction circuits 91 to 98 are provided.
The subtraction circuits 91 to 98 are respectively supplied with the image data of the in-window pixels P 1 to P 8 described above. Further, the image data of the central pixel P 0 is given to all the subtraction circuits 91 to 98. The subtraction circuit 91 calculates the difference between the image data of the pixel P 1 and the image data of the central pixel P 0 (this is q 1 ). Similarly, the subtraction circuits 92 to 98 operate on the pixel P
The difference between each of the image data of 2 to P 8 and the image data of the central pixel P 0 (these are defined as q 2 to q 8 ) is calculated. Since the image data represents a monochrome image as described above (in the case of color image data, the brightness data may be extracted), the brightness of each pixel is shown. Therefore, the difference data q 1 to q 8 are the center pixel P 0.
And the brightness difference between the pixels P 1 to P 8 around it. FIG. 51 shows the brightness patterns P 0 to P 8 in the window.
It is shown that brightness patterns (brightness difference patterns) q 0 to q 8 based on the central pixel in the window are generated from (P 0 to P 8 indicate image data here). .

【0154】この実施例では8種類のエッジ・パターン
をメンバーシップ関数を用いて表現されたファジィ・モ
デルによって表わしている。このファジィ・モデルが図
52(A) 〜(H) に示されている。NはNegativeを,Zはze
roを,PはPositiveをそれぞれ表わしており,これらの
符号(これをラベルという)で指定されるメンバーシッ
プ関数が図53に示されている。
In this embodiment, eight kinds of edge patterns are represented by a fuzzy model represented by using a membership function. This fuzzy model is a diagram
52 (A)-(H). N is Negative, Z is ze
53. ro and P respectively represent Positive, and the membership function designated by these codes (this is called a label) is shown in FIG.

【0155】メンバーシップ関数Nは,破線で示すよう
に,明るさの差qがある負の値−qb より小さい範囲で
は,関数値が最大値1の値をとり,0より大きい範囲で
は最小値0の値をとり,−qb から0までの範囲ではそ
の値に対応して直線的に変化する1から0までの値をと
る。
As shown by the broken line, the membership function N takes a maximum value of 1 when the brightness difference q is smaller than a negative value -q b and has a minimum value when the brightness value is larger than 0. It takes a value of 0 and takes a value from 1 to 0 which changes linearly in the range from -q b to 0.

【0156】メンバーシップ関数Pは,明るさの差qが
0より小さい範囲では関数値が最小値0をとり,ある正
の値qb より大きい範囲では最大値をとり,0〜qb
範囲ではその値に対応して直線的に変化する0〜1の間
の値をとる。
[0156] membership function P, the difference q of brightness takes a minimum value of 0 is the function value is less than zero range, takes a maximum value at a certain positive value q b greater than the range, the range of 0~q b Then, it takes a value between 0 and 1 which linearly changes corresponding to the value.

【0157】メンバーシップ関数Zは,明るさの差qの
絶対値がある値qa より大きい範囲では関数値が最小値
となり,絶対値がqb より小さい範囲では最大値1とな
る。そして,明るさの差qの絶対値がqb より大きくか
つqa より小さい範囲では,その値に対応して,関数値
は,直線的に変化する1から0までの中間の値となる。
The membership function Z has a minimum function value when the absolute value of the brightness difference q is larger than a certain value q a , and has a maximum value of 1 when the absolute value is smaller than q b . Then, in the range where the absolute value of the brightness difference q is larger than q b and smaller than q a , the function value is an intermediate value between 1 and 0 that linearly changes corresponding to the value.

【0158】図52(A) に示すファジィ・モデルは,右下
方向に明るくかつ左上方向に暗くなり,右上りの斜めの
エッジ・パターンを表わしている。図52(B) は右方向に
明るく,左方向に暗く,垂直方向にのびるエッジ・パタ
ーンを表わしている。図52(C) から図52(H) に示すファ
ジィ・モデルも他の種類のエッジ・パターンを表わして
いることは容易に理解できよう。図52(A) から図52(H)
のエッジ・パターンの方向を,方向1〜方向8と定め
る。
The fuzzy model shown in FIG. 52 (A) is bright in the lower right direction and dark in the upper left direction, and represents an oblique edge pattern in the upper right direction. Figure 52 (B) shows an edge pattern that is bright to the right, dark to the left, and extends vertically. It can be easily understood that the fuzzy models shown in FIGS. 52 (C) to 52 (H) also represent other kinds of edge patterns. Figure 52 (A) to Figure 52 (H)
The direction of the edge pattern is defined as direction 1 to direction 8.

【0159】図49に戻って,上述した8方向のエッジ・
パターンに対応して8個のエッジ適合度演算回路111 〜
118 が設けられている。これらのエッジ適合度演算回路
は設定されたメンバーシップ関数を除いて同一の構成を
もつので,回路111 について説明する。
Returning to FIG. 49, the above-mentioned eight-direction edge
Eight edge conformance calculation circuits 111-
118 are provided. Since these edge conformance calculation circuits have the same configuration except the set membership function, the circuit 111 will be described.

【0160】エッジ適合度演算回路111 は,それぞれメ
ンバーシップ関数回路(以下MFC:Membership Funct
ion Circuit という)101 〜108 と,それらの出力の最
小値を選択するMIN回路109 とにより構成されてい
る。各減算回路91〜98の出力データq1 〜q8 は,MF
C101 〜108 にそれぞれ入力する。
The edge conformity calculation circuit 111 is a membership function circuit (hereinafter referred to as MFC: Membership Funct).
ion circuits) 101 to 108 and a MIN circuit 109 for selecting the minimum value of their outputs. The output data q 1 to q 8 of the subtraction circuits 91 to 98 are MF
Input into C101-108 respectively.

【0161】MFC101 〜108 には,図52(A) に示す右
45度上方を指向する方向1のエッジ・パターンのファジ
ィ・モデルに対応して,メンバーシップ関数Z,Nまた
はPが設定されている。詳述すれば,画素P1 とP
5 (明るさの差q1 とq5 )に対応するMFC101 と10
5 にはメンバーシップ関数Zが,画素P2 ,P3 ,P4
(明るさの差q2 ,q3 ,q4 )に対応するMFC102
,103 ,104 にはメンバーシップ関数Nが,画素
6 ,P7 ,P8 (明るさの差q6 ,q7 ,q8 )に対
応するMFC106 ,107 ,108 にはメンバーシップ関数
Pが,それぞれ設定されている。
The MFCs 101 to 108 have the right side shown in FIG. 52 (A).
Membership functions Z, N or P are set corresponding to the fuzzy model of the edge pattern of direction 1 pointing 45 degrees upward. More specifically, the pixels P 1 and P
5 MFC101 and 10 corresponding to the (brightness difference q 1 of a q 5)
5, the membership function Z has pixels P 2 , P 3 , P 4
(Brightness difference q 2 of, q 3, q 4) corresponding to the MFC102
, 103, 104 have a membership function N, and MFCs 106, 107, 108 corresponding to pixels P 6 , P 7 , P 8 (brightness differences q 6 , q 7 , q 8 ) have a membership function P. , Each is set.

【0162】MFC101 はそこに設定されているメンバ
ーシップ関数Zに対する入力データq1 の適合度μ11
算出して出力する。MFCがメンバーシップ関数データ
を記憶したメモリにより構成されているときには,入力
データq1 に対応するメンバーシップ関数データを読出
すだけで足りる。同じようにMFC102 〜108 は,設定
されているメンバーシップ関数N,ZまたはPに対する
入力データq2 〜q8の適合度μ12〜μ18を演算して出
力する。
The MFC 101 calculates and outputs the goodness of fit μ 11 of the input data q 1 with respect to the membership function Z set therein. When the MFC is composed of a memory storing membership function data, it suffices to read the membership function data corresponding to the input data q 1 . Similarly, the MFCs 102 to 108 calculate and output the fitness levels μ 12 to μ 18 of the input data q 2 to q 8 with respect to the set membership function N, Z or P.

【0163】MIN回路109 は,MFC101 〜108 から
出力される適合度μ11〜μ18のうちの最小のものを選択
し,エッジ適合度算出回路111 の適合度μ1 として出力
する。この適合度μ1 の値が大きい(1に近い)程,画
素P0 の明るさを基準にしてこのウインドウ内の他の画
素のデータの2値化を行うと,より適切な2値化画像が
得られることになる。
The MIN circuit 109 selects the smallest one of the matching degrees μ 11 to μ 18 output from the MFCs 101 to 108 and outputs it as the matching degree μ 1 of the edge matching degree calculation circuit 111. The larger the value of the goodness of fit μ 1 (closer to 1), the more appropriate the binarized image is when the binarization of the data of the other pixels in this window is performed with reference to the brightness of the pixel P 0. Will be obtained.

【0164】他のエッジ適合度演算回路112 〜118 のM
FCには図52(B) 〜図52(H) に示されるエッジ・パター
ンを表わすメンバーシップ関数がそれぞれ設定されてい
る。減算回路91〜98の出力データq1 〜q8 のすべては
これらのエッジ適合度演算回路112 〜118 にそれぞれ与
えられ,これらの回路112 〜118 から適合度μ2 〜μ8
を表わすデータが得られる。
M of the other edge fitness calculation circuits 112 to 118
Membership functions representing the edge patterns shown in FIGS. 52B to 52H are set in the FC. All of the output data q 1 to q 8 of the subtraction circuits 91 to 98 are given to the edge fitness calculation circuits 112 to 118, respectively, and the fitness levels μ 2 to μ 8 are output from these circuits 112 to 118.
Is obtained.

【0165】MAX回路85は,エッジ適合度演算回路11
1 〜118 が出力する適合度μ1 〜μ8 のうち最大のもの
を選択し,適合度μとして出力する。ウインドウ内のエ
ッジの方向(画素パターン)を,方向1〜方向8(予め
設定したパターン)に対応させた場合に得られる適合度
のうち最も大きいものが選択されるので,適合度μは,
方向1〜方向8のうち最も合致した方向の適合度を表わ
していることになる。
The MAX circuit 85 includes the edge conformance calculation circuit 11
Select the maximum conformance μ 1 to μ 8 output by 1 to 118 and output it as the conformance μ. Since the largest matching degree obtained when the direction (pixel pattern) of the edge in the window is made to correspond to the direction 1 to the direction 8 (preset pattern), the matching degree μ is
This means that the matching degree of the most matched direction among the directions 1 to 8 is represented.

【0166】MAX回路85から出力される適合度μは,
減算回路87に与えられる。この減算回路87のの他方の入
力として1発生回路86から出力される論理値1を表わす
データが与えられている。減算回路87は,値1から適合
度μを減算した値*μ=1−μを出力する。この値*μ
は最も適切なエッジ・パターンに対する非適合度(エッ
ジらしくなさ)を表わしている。
The fitness μ output from the MAX circuit 85 is
It is given to the subtraction circuit 87. As the other input of the subtraction circuit 87, data representing the logical value 1 output from the 1 generation circuit 86 is applied. The subtraction circuit 87 outputs a value * μ = 1-μ obtained by subtracting the fitness μ from the value 1. This value * μ
Represents the degree of non-conformity (unlike edge) to the most appropriate edge pattern.

【0167】以上の処理は,1フィールド(または1フ
レーム)分の画像データの全画素にわたってウインドウ
を走査することにより繰返し行われる。したがって,全
画素について(全画素をそれぞれ中心画素としたウイン
ドウについて)非適合度*μが求められる。
The above processing is repeated by scanning the window over all the pixels of the image data for one field (or one frame). Therefore, the degree of non-conformity * μ is obtained for all pixels (for windows in which all pixels are central pixels).

【0168】非適合度演算部81で得られた非適合度*μ
は非適合度ヒストグラム生成部82に与えられる。非適合
度ヒストグラム生成部82にはまた,上述したように中心
画素P0 の画像データ(中心画素P0 の明るさを表わ
す)が与えられている。非適合度ヒストグラム生成部82
は,与えられる非適合度*μを,その非適合度*μを生
じさせた中心画素P0 の画像データによって表わされる
明るさごとに(8ビット表現の場合には,256 段階の各
段階ごとに)累積加算して非適合度ヒストグラムを生成
する。この非適合度ヒストグラムは,横軸が明るさであ
り,縦軸が非適合度の加算値である。
Incompatibility Degree * μ Obtained by Incompatibility Calculation Unit 81
Is provided to the non-fitting degree histogram generating unit 82. Also the non-conforming histogram generator 82, image data of the central pixel P 0 (representing the brightness of the central pixel P 0) is given as described above. Non-Fitness Histogram Generator 82
For each brightness represented by the image data of the central pixel P 0 that generated the non-fitness * μ (in the case of 8-bit representation, for each step of 256 steps). And) cumulative addition to generate a non-fitting histogram. In this non-conforming degree histogram, the horizontal axis represents the brightness and the vertical axis represents the added value of the non-conforming degree.

【0169】明るさヒストグラム生成部83は,与えられ
る基準画素P0 の画像データ(明るさ)に基づいて,明
るさごとに,その明るさをもつ基準画素P0 の数を累積
加算して,明るさヒストグラムを生成する。この明るさ
ヒストグラムの横軸は明るさ(たとえば256 段階),縦
軸はその明るさをもつ画素数である。
The brightness histogram generator 83 cumulatively adds, for each brightness, the number of reference pixels P 0 having that brightness based on the image data (brightness) of the given reference pixel P 0 , Generate a brightness histogram. The horizontal axis of this brightness histogram is brightness (for example, 256 levels), and the vertical axis is the number of pixels with that brightness.

【0170】非適合度ヒストグラム生成部82において生
成された非適合度ヒストグラムおよび明るさヒストグラ
ム生成部83において生成された明るさヒストグラムをそ
れぞれ表わすデータは画質ヒストグラム生成部84に与え
られる。画質ヒストグラム生成部84は,明るさごとに,
非適合度ヒストグラムにおける非適合度の累積加算値
を,明るさヒストグラムにおける対応する画素数で除算
することにより,正規化し,非適合度*μの平均値を算
出する。この非適合度*μの平均値を縦軸に,明るさを
横軸にそれぞれとってできるヒストグラムが図54に示す
画質ヒストグラムである。縦軸における非適合度*μの
平均値は画質の評価基準としての画質の悪さを表わして
いる。
Data representing the non-matching degree histogram generated by the non-conforming degree histogram generating section 82 and the brightness histogram generated by the brightness histogram generating section 83 are given to the image quality histogram generating section 84. The image quality histogram generation unit 84
The cumulative addition value of the non-fitting degree in the non-fitting degree histogram is normalized by dividing by the corresponding number of pixels in the brightness histogram, and the average value of the non-fitting degree * μ is calculated. The image quality histogram shown in FIG. 54 is a histogram formed by plotting the average value of the nonconformity * μ on the vertical axis and the brightness on the horizontal axis. The average value of the non-conformity * μ on the vertical axis represents the poor image quality as the image quality evaluation standard.

【0171】図54の画質ヒストグラムにおいて,最大値
をQmax ,最小値をQmin とする。最小値Qmin が得ら
れる明るさkopt をしきい値として画質データを2値化
すると,画質の悪さが最も小さくなって最も良好な2値
画像データが得られる。
In the image quality histogram of FIG. 54, the maximum value is Q max and the minimum value is Q min . When the image quality data is binarized with the brightness k opt that gives the minimum value Q min as the threshold value, the poor image quality is minimized and the best binary image data is obtained.

【0172】CPU65は,画質ヒストグラム生成部84に
よって生成された画質ヒストグラムから画質の悪さの最
大値Qmax と最小値Qmin とを読取る。さらにCPU65
は最小値Qmin に対応する明るさkopt を読取る。この
後CPU65は画質ヒストグラムにおいて明るさkopt
中心に横軸上を明るい方と暗い方にそれぞれ探索してい
って,縦軸の値が最初に(1−a)×Qmax +a×Q
min の値を超える明るさの幅WBを算出する。ここでa
は1より小さい正の係数であり,許容度を表わす。
The CPU 65 reads the maximum value Q max and the minimum value Q min of the poor image quality from the image quality histogram generated by the image quality histogram generating section 84. Further CPU65
Reads the brightness k opt corresponding to the minimum value Q min . Thereafter, the CPU 65 searches the image quality histogram centering on the brightness k opt for the brighter side and the darker side on the horizontal axis, and the value on the vertical axis is first (1-a) × Q max + a × Q.
The brightness width WB that exceeds the value of min is calculated. Where a
Is a positive coefficient smaller than 1 and represents tolerance.

【0173】CPU65は照明装置11の設定高さhにおけ
る照明の評価値Vを式5にしたがって計算し,その計算
結果をRAM67に格納する。
The CPU 65 calculates the evaluation value V of the illumination at the set height h of the illumination device 11 according to the equation 5, and stores the calculation result in the RAM 67.

【0174】[0174]

【数5】 V=(Qmax /Qmin )WB 式5## EQU00005 ## V = (Q max / Q min ) WB Equation 5

【0175】式5において,Qmax /Qmin は画質ヒス
トグラムにおける谷の深さを表現しており,この値が大
きいほど,エッジらしい部分とエッジらしくない部分が
はっきる分れているので画像のコントラストがはっきり
しているということになる。またWBは上述のように谷
の幅であるから,この値が大きいほど照明装置の照度が
変動しても画質が変わらない,すなわち対照度変動性が
よいということになる。
In Expression 5, Q max / Q min represents the depth of the valley in the image quality histogram. The larger this value, the more clearly the edge-like portion and the edge-less portion are separated. The contrast is clear. Since WB is the width of the valley as described above, the larger this value is, the more the illuminance of the illuminator changes and the image quality does not change, that is, the contrast variability is good.

【0176】上記評価値Vの算出は,式5に限らず,以
下の式6〜式10を用いて行うこともできる。
The calculation of the evaluation value V is not limited to the equation 5, but the following equations 6 to 10 can be used.

【0177】[0177]

【数6】 V=Qmax /Qmin 式6## EQU6 ## V = Q max / Q min Equation 6

【0178】[0178]

【数7】 V=WB 式7## EQU00007 ## V = WB Equation 7

【0179】[0179]

【数8】 V=1/Qmin 式8Equation 8 V = 1 / Q min Equation 8

【0180】[0180]

【数9】 V=WB/Qmin 式9(9) V = WB / Q min Formula 9

【0181】[0181]

【数10】 V=(Qmax /Qmin )×(WB/kopt ) 式10V = (Q max / Q min ) × (WB / k opt ) Formula 10

【0182】とくに式10は光源の照度変動の絶対値と安
定に撮影できる明るさの幅を考慮した評価値を与える。
一般に光源の劣化により暗くなる度合いはそのときの照
度に比例しているので,照度の低い光源の方が劣化によ
る照度変動の絶対値は小さい。一方,幅WBは一定であ
る。(Qmax /Qmin )WBが一定であると仮定する
と,kopt は小さい方がよい。kopt が小さいほど評価
値Vは大きい。
In particular, Expression 10 gives an evaluation value in consideration of the absolute value of the illuminance fluctuation of the light source and the range of brightness that allows stable image capturing.
In general, the degree of darkening due to deterioration of the light source is proportional to the illuminance at that time, so the absolute value of the illuminance fluctuation due to deterioration is smaller for light sources with lower illuminance. On the other hand, the width WB is constant. Assuming that (Q max / Q min ) WB is constant, k opt should be small. The smaller k opt is, the larger the evaluation value V is.

【0183】図55は,照明装置11の設置高さhと照明の
評価値Vとの関係を示す。ある設置高さhopt において
照明の評価値Vが最大値Vmax をとり,その両側では評
価値Vは単調に減少している。すなわち,評価値Vは1
個のピークをもつ凸関数である。
FIG. 55 shows the relationship between the installation height h of the illumination device 11 and the illumination evaluation value V. The illumination evaluation value V has a maximum value V max at a certain installation height h opt , and the evaluation value V monotonically decreases on both sides thereof. That is, the evaluation value V is 1
It is a convex function with peaks.

【0184】したがって,照明装置11の高さは評価値V
を考慮して次のようにして最適なところに設定すること
ができる。
Therefore, the height of the lighting device 11 is evaluated by the evaluation value V.
In consideration of the above, the optimum place can be set as follows.

【0185】ある設置高さh0で評価値V0 が得られ,
次に設置高さh1(h1>h0)まで高くしたときによ
り大きな評価値V1(V1>V0)が得られた場合に
は,最適な設置高さhopt に設定するためには,さらに
高さhを高くする方向で照明装置11の高さ調整を行えば
よい。
An evaluation value V 0 is obtained at a certain installation height h0,
Next, when a larger evaluation value V1 (V1> V0) is obtained when the installation height h1 (h1> h0) is increased, in order to set the optimum installation height h opt , the height is further increased. The height of the illumination device 11 may be adjusted in the direction of increasing h.

【0186】逆にある設置高さh0で評価値V0が得ら
れ,次に設置高さをh1(h1>h0)まで大きくした
ときにより小さな評価値V1(V1<V0)が得られた
場合は,最適な設置高さhopt に設定するためには,設
置高さhを低くする方向で照明装置11の高さ調整を行え
ばよい。
On the contrary, when the evaluation value V0 is obtained at a certain installation height h0 and the smaller evaluation value V1 (V1 <V0) is obtained when the installation height is increased to h1 (h1> h0) next time, In order to set the optimum installation height h opt , the height of the lighting device 11 may be adjusted in the direction of decreasing the installation height h.

【0187】画像処理装置40のCPU65は,対象物OB
をカメラ20によって撮像し,カメラ20から出力される映
像信号をA/D変換して得られる画像データに基づいて
撮像画像の画質を評価し,照明装置11の位置設定に関す
る指示を表示装置41に表示することにより,ユーザが照
明装置11を適切な位置に設定する操作を支援する。
The CPU 65 of the image processing device 40 is the object OB.
Is captured by the camera 20, the image quality of the captured image is evaluated based on the image data obtained by A / D converting the video signal output from the camera 20, and an instruction regarding the position setting of the illumination device 11 is displayed on the display device 41. The display assists the user in setting the lighting device 11 at an appropriate position.

【0188】図56および図57はこのようなCPU65によ
る処理手順を示すものである。
56 and 57 show the processing procedure by the CPU 65 as described above.

【0189】CRT表示装置41に,図58に示すようなメ
ッセージを含む初期画面が表示される(ステップ331
)。ユーザはこの初期画面を見て,止め具34をゆるめ
て照明装置11を適当な高さh0に位置決めし,止め具34
を締め固定する。ユーザは照明装置11の設定が終了する
とキーボード69の設定キーを押すので,ステップ332 で
YES となる。
An initial screen including a message as shown in FIG. 58 is displayed on the CRT display device 41 (step 331).
). The user looks at this initial screen, loosens the stopper 34, positions the lighting device 11 at an appropriate height h0, and stops the stopper 34.
Tighten and fix. The user presses the setting key on the keyboard 69 when the setting of the lighting device 11 is completed.
It will be YES.

【0190】CPU65はテレビ・カメラ20に対象物の像
を撮像させ,得られる映像信号を画像入力部61に取込ま
せる(ステップ333 )。必要ならば,撮像画像は表示装
置41に表示される。
The CPU 65 causes the television / camera 20 to pick up an image of the object, and causes the obtained video signal to be taken into the image input section 61 (step 333). If necessary, the captured image is displayed on the display device 41.

【0191】画像入力部61では取込んだ映像信号をA/
D変換して画像データに変換したのち,上述した手法に
より画質ヒストグラムを生成する。CPU65は画質ヒス
トグラム生成部84で生成された画質ヒストグラムから画
質の悪さの最大値Qmax と最小値Qmin ,および最小値
min に対応する明るさkopt を読取る(ステップ334
)。さらにCPU65は画質ヒストグラムからその谷に
おける明るさの幅WBを決定し,式5または式6〜式10
のいずれかの演算を実行して照明の評価値V0を算出
し,その値をRAM67にストアする(ステップ335 )。
In the image input section 61, the captured video signal is A /
After D conversion and conversion into image data, an image quality histogram is generated by the above-mentioned method. The CPU 65 reads the brightness k opt corresponding to the maximum value Q max , the minimum value Q min , and the minimum value Q min of the poor image quality from the image quality histogram generated by the image quality histogram generation unit 84 (step 334).
). Further, the CPU 65 determines the width WB of the brightness in the valley from the image quality histogram, and the formula 5 or formula 6 to formula 10
Is calculated to calculate the illumination evaluation value V0 and the value is stored in the RAM 67 (step 335).

【0192】続いてCPU65は表示装置20に図59に示す
ようなメッセージを表示させる(ステップ336 )。ユー
ザはこの表示を見て照明装置11を手動で,初期高さh0
よりも高い適当な高さ位置h1に移して固定する。この
後ユーザは設定キーを操作するのでステップ337 でYES
となる。
Subsequently, the CPU 65 causes the display device 20 to display a message as shown in FIG. 59 (step 336). The user looks at this display and manually operates the lighting device 11 to set the initial height h0.
It is moved to an appropriate height position h1 higher than that and fixed. After this, the user operates the setting key, so YES in step 337.
Becomes

【0193】対象物の撮像,画像データの入力,入力画
像データに基づく画質ヒストグラムの作成が再び行われ
(ステップ338 ),この新たな画質ヒストグラムに基づ
いて高さh1に対応した照明の評価値V1が算出される
(ステップ339 ,340 )。
The object is imaged, the image data is input, and the image quality histogram is created again based on the input image data (step 338). Based on this new image quality histogram, the illumination evaluation value V1 corresponding to the height h1 is obtained. Is calculated (steps 339 and 340).

【0194】CPU65は前回(初期状態)の評価値V0
と今回の評価値V1とを比較して(ステップ341 ),V
1>V0であれば前回の評価値V0を今回の評価値V1
で置きかえるために,今回の評価値V1をRAM67に記
憶する(ステップ342 )。また,照明装置11の高さをさ
らに高くさせるために図59のメッセージが表示装置41に
表示される(ステップ343 )。
The CPU 65 determines the previous (initial state) evaluation value V0.
And this evaluation value V1 are compared (step 341), V
If 1> V0, the previous evaluation value V0 is replaced with the current evaluation value V1.
The current evaluation value V1 is stored in the RAM 67 in order to replace it with (step 342). Further, the message of FIG. 59 is displayed on the display device 41 in order to further increase the height of the lighting device 11 (step 343).

【0195】V1≦V0の場合には,CPU65は今回の
評価値V1をRAM67に記憶して評価値を更新し(ステ
ップ344 ),照明装置11の高さを低くさせるために図60
に示すメッセージを表示装置41に表示させる(ステップ
345 )。
If V1≤V0, the CPU 65 stores the present evaluation value V1 in the RAM 67 and updates the evaluation value (step 344), and in order to lower the height of the illuminating device 11, as shown in FIG.
The message shown in is displayed on the display device 41 (step
345).

【0196】図59のメッセージが表示されたときにはユ
ーザは照明装置11を前回より高い高さ位置h1に変更す
る。また図60のメッセージが表示されたときは,ユーザ
は照明装置11を前回より低い高さ位置h1に変更する。
この後,ユーザはキーボード69の設定キーを操作するの
でステップ346 の判定がYES となってステップ338 に戻
る。CPU65は再びカメラ20による対象物OBの撮像,
画質ヒストグラムの作成,評価値の算出を繰返す。
When the message of FIG. 59 is displayed, the user changes the lighting device 11 to the height position h1 higher than the previous time. When the message of FIG. 60 is displayed, the user changes the lighting device 11 to the height position h1 lower than the previous time.
After that, the user operates the setting key of the keyboard 69, so that the determination in step 346 is YES and the process returns to step 338. The CPU 65 again takes an image of the object OB with the camera 20,
Repeat the creation of image quality histogram and calculation of evaluation value.

【0197】このようにして表示装置41に表示されたメ
ッセージを見ながらユーザは照明装置11の設置高さを上
下に調整しかつ移動量を次第に小さくしながら上記の手
順を繰返す。遂に高さをわずかに調整するだけで図59と
図60のメッセージが切換わる状態となる。そのときの設
置高さの近傍が最適な設置高さhopt であるということ
になる。最後にユーザはキーボード69の終了キーを操作
するので(ステップ347 ),調整作業が終了する。
While watching the message displayed on the display device 41 in this way, the user repeats the above procedure while adjusting the installation height of the lighting device 11 up and down and gradually reducing the movement amount. Finally, the message in FIGS. 59 and 60 is switched by just adjusting the height slightly. It means that the vicinity of the installation height at that time is the optimum installation height h opt . Finally, the user operates the end key of the keyboard 69 (step 347), and the adjustment work is completed.

【0198】(7) 最適照明条件設定支援装置(その2:
照明装置の位置の設定) 上述した最適位置設定の支援装置はユーザが照明装置11
の位置を手動で位置決めするものである。次にユーザが
照明装置11の移動方向と移動距離(または位置)をキー
ボードから入力することにより,照明装置11が指令され
た位置に自動的に位置決めされる実施例について述べ
る。
(7) Optimal lighting condition setting support device (Part 2:
Setting of Position of Lighting Device) The above-described support device for optimum position setting is performed by the user with the lighting device 11
The position of is manually positioned. Next, an embodiment in which the user inputs the moving direction and moving distance (or position) of the lighting device 11 from the keyboard to automatically position the lighting device 11 at the commanded position will be described.

【0199】画像処理システムとしては図13に示す自動
昇降機構を備えたものが用いられる。画像処理装置40の
構成としては図47に示すものが用いられる。鎖線で示す
ように,パルス・モータ37がI/O制御部68に接続され
る。このモータ37はCPU65からの指令により(または
I/O制御部68からの指令により)駆動制御される。図
48および図49に示す各種回路の構成もそのまま用いられ
る。
As the image processing system, the one provided with the automatic lifting mechanism shown in FIG. 13 is used. As the configuration of the image processing device 40, the one shown in FIG. 47 is used. The pulse motor 37 is connected to the I / O controller 68 as shown by the chain line. The drive of the motor 37 is controlled by a command from the CPU 65 (or a command from the I / O control unit 68). Figure
The configurations of various circuits shown in FIG. 48 and FIG. 49 are also used as they are.

【0200】図61および図62はCPU65による処理手順
を示している。この図においても図56および図57に示す
ものと同一物には同一符号を付し重複説明を避ける。
61 and 62 show the processing procedure by the CPU 65. Also in this figure, the same components as those shown in FIGS. 56 and 57 are designated by the same reference numerals to avoid redundant description.

【0201】図61においてステップ331 〜336 の処理は
図56に示すものと同じである。
The processing of steps 331 to 336 in FIG. 61 is the same as that shown in FIG.

【0202】図59に示されたメッセージを見てユーザ
は,キーボード69から,照明装置11の移動方向(上また
は下)と移動距離とを入力し(ステップ352 ),設定キ
ーを操作する(ステップ337 )。
Seeing the message shown in FIG. 59, the user inputs the moving direction (up or down) and the moving distance of the lighting device 11 from the keyboard 69 (step 352) and operates the setting key (step 352). 337).

【0203】すると,キーボード69から入力された移動
方向および移動距離を表わすデータに基づいて,I/O
制御部68を介してパルス・モータ37が駆動される(ステ
ップ353 )。これにより,照明装置11は指定された方向
に指定された距離移動したのち,そこに停止する。この
後,対象物OBの撮像,画質ヒストグラムの作成,評価
値V1の算出が行われる(ステップ338 〜341 )。
Then, based on the data representing the moving direction and the moving distance input from the keyboard 69, the I / O
The pulse motor 37 is driven via the control unit 68 (step 353). As a result, the lighting device 11 moves in the specified direction for the specified distance and then stops there. After that, the object OB is imaged, the image quality histogram is created, and the evaluation value V1 is calculated (steps 338 to 341).

【0204】ユーザは表示装置41に表示された図59また
は図60のメッセージを見て,メッセージにしたがって照
明装置11の移動方向と移動距離とをキーボード69を通し
て入力するので(ステップ354 ,355 ),この後,設定
キー入力があればステップ353 に戻ってモータ37の駆動
制御により照明装置11の移動が行われる。
The user sees the message of FIG. 59 or 60 displayed on the display device 41 and inputs the moving direction and moving distance of the lighting device 11 through the keyboard 69 according to the message (steps 354 and 355). After that, if there is a setting key input, the process returns to step 353 and the drive of the motor 37 is controlled to move the lighting device 11.

【0205】このようにして表示装置41に表示されたメ
ッセージを見ながらユーザは照明装置11の設置高さをキ
ーボード69から指令を入力することにより上下に調整す
る。調整が完了すると,ユーザがキーボード69の終了キ
ーを操作することにより調整作業が終了する(ステップ
347 )。
While watching the message thus displayed on the display device 41, the user adjusts the installation height of the lighting device 11 up and down by inputting a command from the keyboard 69. When the adjustment is completed, the user operates the end key of the keyboard 69 to end the adjustment work (step
347).

【0206】上述した2つの実施例では,照明装置11の
移動方向を表示装置を用いた視覚表示によりユーザに指
示しているが,音声による指示,移動方向に応じた異な
る警報音等を通してユーザに指示してもよい。
In the two embodiments described above, the moving direction of the lighting device 11 is instructed to the user by visual display using a display device. However, the user is instructed by voice, a different alarm sound depending on the moving direction, and the like. You may instruct.

【0207】(8) 最適照明条件設定支援装置(その3:
照明装置の位置の設定) 照明装置の高さ位置を自動的に最適高さに設定する装置
の実施例について詳述する。
(8) Optimal lighting condition setting support device (Part 3:
Setting of Position of Lighting Device) An embodiment of a device for automatically setting the height position of the lighting device to the optimum height will be described in detail.

【0208】図13に示す画像処理システムが採用され
る。図47から図49に示す画像処理装置の構成が用いられ
る。図47においてパルス・モータ37がI/O制御部68に
接続される。
The image processing system shown in FIG. 13 is adopted. The configuration of the image processing device shown in FIGS. 47 to 49 is used. In FIG. 47, the pulse motor 37 is connected to the I / O controller 68.

【0209】CPU65による制御処理手順が図63および
図64に示されている。ここでも,図56,図57に示すもの
と同一処理には同一符号が付されている。
The control processing procedure by the CPU 65 is shown in FIGS. 63 and 64. Also here, the same processes as those shown in FIGS. 56 and 57 are denoted by the same reference numerals.

【0210】まず,パルス・モータ37の回転角度θ1
回転方向とがキーボード69から入力される(ステップ36
2 )。回転角度θ1 に代えて,移動距離を入力するよう
にしてもよい。この場合には,CPU65は照明装置11を
入力された移動距離移動させるに必要なモータ37の回転
角度θ1 を算出する。回転方向は一般には上方と設定さ
れるであろうが,下方としてもよい。
First, the rotation angle θ 1 and the rotation direction of the pulse motor 37 are input from the keyboard 69 (step 36).
2). The moving distance may be input instead of the rotation angle θ 1 . In this case, the CPU 65 calculates the rotation angle θ 1 of the motor 37 required to move the lighting device 11 by the input moving distance. The direction of rotation will generally be set up, but may be down.

【0211】この後,キーボード69からスタート・キー
入力があると(ステップ363 ),初期高さh0に位置決
めされた照明装置11による照明の下で対象物OBの撮像
が行われ,画質ヒストグラムの作成,評価値V0の算出
が実行される(ステップ333〜335 )。
Thereafter, when the start key is input from the keyboard 69 (step 363), the object OB is imaged under the illumination of the illumination device 11 positioned at the initial height h0, and the image quality histogram is created. The evaluation value V0 is calculated (steps 333 to 335).

【0212】次にCPU65は,パルス・モータ37を,ス
テップ362 において入力された方向へ初期設定された角
度θ1 回転駆動して照明装置11を対応する距離上昇また
は下降させる(ステップ364 )。照明装置11の高さ位置
はh1となる。この高さ位置h1で撮像,画質ヒストグ
ラムの作成,評価値V1の算出が行われる(ステップ33
9 ,340 )。
Next, the CPU 65 drives the pulse motor 37 to rotate by the angle θ 1 initially set in the direction input in step 362 to raise or lower the lighting device 11 by a corresponding distance (step 364). The height position of the lighting device 11 is h1. Imaging is performed at this height position h1, an image quality histogram is created, and an evaluation value V1 is calculated (step 33).
9, 340).

【0213】CPU65は,前回の評価値V0と今回の評
価値V1との差の絶対値が所定のしきい値TH以下であ
るかどうかを判定する(ステップ365 )。この判定でNO
となれば341 に進む。
The CPU 65 determines whether the absolute value of the difference between the previous evaluation value V0 and the current evaluation value V1 is less than or equal to a predetermined threshold value TH (step 365). NO in this judgment
If so, proceed to 341.

【0214】この判定でYES の場合であっても,角度θ
(ステップ367 で更新された角度)が所定のしきい値θ
th以下であるかどうかが判定され,NOであればやはりス
テップ341 に進む。
Even if this determination is YES, the angle θ
(The angle updated in step 367) is a predetermined threshold θ
It is determined whether or not th is less than th , and if NO, the process also proceeds to step 341.

【0215】ステップ341 では評価値V0とV1とが比
較される。
At step 341, the evaluation values V0 and V1 are compared.

【0216】V1>V0であれば,ステップ364 に戻っ
て,前回と同じ角度θ1 だけパルス・モータ37が前回と
同じ方向へ回転駆動され照明装置11が同方向へ上昇また
は下降される。この後,再び撮像,評価値の算出が行わ
れる。
If V1> V0, the process returns to step 364, and the pulse motor 37 is rotationally driven in the same direction as the previous time by the same angle θ 1 as before, and the illuminating device 11 is raised or lowered in the same direction. After that, imaging is performed again and evaluation values are calculated.

【0217】V1≦V0の場合には,パルス・モータ37
の回転角度θが前回の角度θ1 の半分の値に設定される
とともに,回転方向が反対方向に設定され(ステップ36
7 ),ステップ364 に戻る。新たに設定された角度θだ
けパルス・モータ37が前回と反対方向に回転駆動され照
明装置11を反対方向へ移動させ,再び画像データの取込
み,評価値の算出が行われる。
If V1≤V0, pulse motor 37
The rotation angle θ of is set to half the value of the previous angle θ 1 and the rotation direction is set to the opposite direction (step 36
7) Return to step 364. The pulse motor 37 is rotationally driven in the direction opposite to the previous time by the newly set angle θ to move the illuminating device 11 in the opposite direction, the image data is taken in again, and the evaluation value is calculated.

【0218】このようにV1≦V0と判定されるごとに
パルス・モータ37の回転角度θが順次小さく設定されか
つ回転方向が反転されながら同様の手順が繰返される。
その結果,ステップ365 および366 の判定がYES となっ
たときに,照明装置11は最適な設置高さhopt に設定さ
れたことになる。これにより照明装置の高さ位置調整動
作が完了する。
As described above, each time V1≤V0 is determined, the rotation angle θ of the pulse motor 37 is sequentially set smaller and the rotation direction is reversed, and the same procedure is repeated.
As a result, when the determinations in steps 365 and 366 are YES, the lighting device 11 is set to the optimum installation height h opt . This completes the height position adjusting operation of the lighting device.

【0219】(9) エッジ画像生成装置 上述したエッジらしさの適合度μを用いてエッジ画像を
生成することができる。
(9) Edge Image Generating Device An edge image can be generated using the above-described edge matching fitness μ.

【0220】図48に示す画像処理装置の構成がエッジ画
像生成装置として採用される。好ましくは,適合度μを
画素ごとに記憶する画像メモリ88がさらに設けられる。
図49に示す非適合度演算部もまたそのまま利用される。
非適合度*μは不要で,適合度μのみを出力させればよ
い。
The structure of the image processing apparatus shown in FIG. 48 is adopted as the edge image generating apparatus. Preferably, an image memory 88 is further provided for storing the fitness μ for each pixel.
The incompatibility calculation unit shown in FIG. 49 is also used as it is.
The incompatibility * μ is unnecessary, and only the compatibility μ should be output.

【0221】図65(A) から図65(H) はエッジ適合度算出
回路111 〜118 にそれぞれ設定されるエッジ・パターン
を表わすファジィ・モデルの他の例を示している。ここ
ではメンバーシップ関数Zは用いられていない。メンバ
ーシップ関数P,Nは図53に示す形状をもつ。
FIGS. 65 (A) to 65 (H) show other examples of fuzzy models representing the edge patterns set in the edge conformance calculation circuits 111 to 118, respectively. The membership function Z is not used here. The membership functions P and N have the shape shown in FIG.

【0222】図65(A) に示されたファジィ・モデルにし
たがうと,エッジ適合度算出回路111 のMFC101 ,10
2 ,103 にメンバーシップ関数Pが,MFC105 ,106
,107 にメンバーシップ関数Nがそれぞれ設定され
る。他のMFC104 および108 には,入力データの値に
かかわらず,常に最大の論理値1を出力するメンバーシ
ップ関数が設定される。
According to the fuzzy model shown in FIG. 65 (A), the MFC 101, 10 of the edge conformance calculation circuit 111 is calculated.
2, the membership function P is MFC105,106
, 107 are set to membership functions N, respectively. A membership function that always outputs the maximum logical value of 1 is set to the other MFCs 104 and 108 regardless of the value of the input data.

【0223】他のエッジ適合度算出回路112 〜118 にも
同じように図65(B) から図65(H) にしたがうメンバーシ
ップ関数が設定される。
Membership functions according to FIG. 65 (B) to FIG. 65 (H) are similarly set in the other edge fitness calculation circuits 112 to 118.

【0224】画像メモリ62に記憶されている1フィール
ド(または1フレーム)を構成するすべての画像データ
について,画素ごとに適合度μが算出され,画像メモリ
88の対応する場所に記憶される。これによって,図66
(A) に示すような画像のエッジを表わす画像が図66(B)
に示すように生成される。適合度μを適当なしきい値を
用いて2値データに変換したのちに画像メモリ88に記憶
させてもよい。
The suitability μ is calculated for each pixel for all the image data constituting one field (or one frame) stored in the image memory 62.
Stored in 88 corresponding locations. As a result, Fig. 66
The image showing the edges of the image as shown in (A) is shown in Fig. 66 (B).
It is generated as shown in. The goodness of fit μ may be converted into binary data by using an appropriate threshold value and then stored in the image memory 88.

【0225】(10)最適照明条件設定支援装置(その4:
主に照明装置の光度設定) 再び撮像により得られた対象物の画像データに基づいて
最適照明条件を設定する,または設定を支援する装置の
実施例について説明する。
(10) Optimal lighting condition setting support device (Part 4:
Mainly Setting Luminous Intensity of Illumination Device) An embodiment of the device that sets or supports the optimal illumination condition based on the image data of the object obtained by imaging again will be described.

【0226】後に詳述する最適照明条件設定支援装置に
よって最適照明条件が設定された照明系を備えた自動検
査装置の全体的な構成が図67に示されている。この自動
検査装置は,照明装置10とカメラ20と画像処理装置40と
搬送機構45とから構成されている。搬送機構45は搬送コ
ンベアによって実現され,多数の検査対象物OBを所定
の検査位置へ順次搬送する。
FIG. 67 shows the overall structure of an automatic inspection device equipped with an illumination system in which the optimum illumination conditions are set by the optimum illumination condition setting support device, which will be described later in detail. This automatic inspection device includes an illumination device 10, a camera 20, an image processing device 40, and a transport mechanism 45. The transfer mechanism 45 is realized by a transfer conveyor and sequentially transfers a large number of inspection objects OB to predetermined inspection positions.

【0227】照明装置10およびカメラ20は検査位置の上
方に配置されている。カメラ20は検査位置の対象物OB
を真上から撮像して,撮像により得られた画像データを
画像処理装置40に与える。
The illuminating device 10 and the camera 20 are arranged above the inspection position. The camera 20 is the object OB at the inspection position.
Is imaged from directly above, and the image data obtained by the imaging is given to the image processing device 40.

【0228】照明装置10は,たとえばハロゲン・ランプ
によって実現され,検査位置の検査対象物OBを斜め上
方から照明する。この照明装置10の光度は,後述するよ
うに,対象物OBの最適な検査が保証されるように最適
な値に設定されている。
The illumination device 10 is realized by a halogen lamp, for example, and illuminates the inspection object OB at the inspection position from diagonally above. The luminosity of the illumination device 10 is set to an optimum value so as to guarantee the optimum inspection of the object OB, as described later.

【0229】画像処理装置40による対象物OBの検査
が,良品であるか,欠けやバリがある不良品であるかを
判別するサンプル検査の場合には,良品と不良品との判
別精度が最大となるように照明装置10の光度が設定され
ている。これが最適照明条件である。
In the case of the sample inspection in which the inspection of the object OB by the image processing device 40 is a non-defective product or a defective product having a chip or a burr, the discriminating accuracy between the non-defective product and the defective product is maximum. The luminosity of the lighting device 10 is set so that This is the optimum lighting condition.

【0230】照明条件は光度に限られることなく,照明
装置10の設定位置や設定角度などであってもよい。また
最適照明条件は画像処理装置40に設定されてもよいし,
照明装置10に組み込まれたコントローラに設定されても
よい。いずれにしても,設定された最適照明条件を満た
す照明が照明装置10によって行なわれるように,画像処
理装置40または上記コントローラによって照明装置10が
制御される。
The illumination condition is not limited to the light intensity, and may be the set position or the set angle of the illumination device 10. Further, the optimum illumination condition may be set in the image processing device 40,
It may be set in a controller incorporated in the lighting device 10. In any case, the illuminating device 10 is controlled by the image processing device 40 or the controller so that the illuminating device 10 performs the illumination that satisfies the set optimal illumination condition.

【0231】画像処理装置40は,カメラ20から与えられ
る対象物OBを表わす映像信号を2値化処理し,その2
値画像データを用いて対象物の面積などの特徴量を計測
し,その計測値を所定の基準値と比較する処理などに基
づいて,対象物OBが良品であるのか,または欠けやバ
リなどがある不良品であるのかを判断する。判定の基礎
となる特徴量は面積に限らず,周囲長や重心などであっ
てもよい。
The image processing device 40 binarizes the video signal representing the object OB given from the camera 20, and
Based on the process of measuring the feature amount such as the area of the target object using the value image data and comparing the measured value with a predetermined reference value, whether the target object OB is a non-defective product, chipping, burr, etc. Determine if it is a defective product. The feature amount that is the basis of the determination is not limited to the area, and may be the perimeter or the center of gravity.

【0232】図68および図69は,最適照明条件設定を支
援する装置を示している。照明装置10,カメラ20,画像
処理装置40,表示装置41などは簡便化のために図67に示
す検査装置におけるものと同一符号で示されている。こ
れは検査装置と最適照明条件設定支援装置とは兼用する
ことができるからである。もちろん,これらの両装置を
別々に構成してもよい。
68 and 69 show an apparatus for assisting in setting the optimum illumination condition. The illumination device 10, the camera 20, the image processing device 40, the display device 41 and the like are shown by the same reference numerals as those in the inspection device shown in FIG. 67 for simplification. This is because the inspection device and the optimum illumination condition setting support device can be used together. Of course, both of these devices may be configured separately.

【0233】カメラ20は観測位置OVの真上であって自
動検査装置におけるものと同じ高さ位置に配置される。
また照明装置10は観測位置OVの斜め上方であって自動
検査装置におけるものと同じ高さ位置に同じ傾き角度で
配置される。カメラ,照明装置とも,好ましくは,自動
検査装置と支援装置とにおいて同じものが用いられる。
The camera 20 is arranged directly above the observation position OV and at the same height as that in the automatic inspection apparatus.
Further, the illumination device 10 is arranged diagonally above the observation position OV and at the same height position as in the automatic inspection device and at the same inclination angle. The same camera and lighting device are preferably used for the automatic inspection device and the support device.

【0234】支援装置はサンプル供給機構を備えてい
る。このサンプル供給機構は,回転テーブル120 とテー
ブル駆動機構121 と検出器123 とを含んでいる。
The support device is equipped with a sample supply mechanism. This sample supply mechanism includes a rotary table 120, a table drive mechanism 121, and a detector 123.

【0235】回転テーブル120 は,円板状であって,そ
の上面周縁部には良品サンプルOBaと,欠けがある不
良品サンプルOBbと,バリがある不良品サンプルOB
cとが,それぞれ複数個ずつ等角度間隔で位置決め固定
されている。
The rotary table 120 is in the shape of a disk and has a non-defective sample OBa, a defective defective sample OBb having a chip, and a defective defective sample OB having a burr on the peripheral portion of the upper surface thereof.
A plurality of c and a plurality of c are positioned and fixed at equal angular intervals.

【0236】回転テーブル120 上において,各サンプル
の固定位置の外側には金属板により成る識別体 122a,
122b, 122cが固定されている。これらの識別体 122
a,122b, 122cは各サンプルOBa,OBb,OB
cが観測位置OVに到達したことを検出器123 に検出さ
せるためのものである。良品サンプルOBaについての
識別体 122aの設置高さと,欠けがある不良品サンプル
OBbについての識別体 122bの設置高さと,バリがあ
る不良品サンプルOBcについての識別体 122cの設置
高さとは,相互に異なっている。
On the rotary table 120, on the outside of the fixed position of each sample, an identification member 122a made of a metal plate,
122b and 122c are fixed. These identifiers 122
a, 122b, 122c are samples OBa, OBb, OB
This is for causing the detector 123 to detect that c has reached the observation position OV. The installation height of the identifier 122a for the non-defective sample OBa, the installation height of the identifier 122b for the defective defective sample OBb, and the installation height of the identifier 122c for the defective defective sample OBc with burrs are mutually Is different.

【0237】テーブル駆動機構121 は,回転テーブル12
0 の回転中心に連結されたモータを含み,画像処理装置
40からの制御信号に応答して回転テーブル120 を間欠的
に回転させ,各サンプルOBa,OBb,OBcをカメ
ラ120 の視野内の観測位置OVへ順次導く。
The table drive mechanism 121 includes the rotary table 12
An image processing apparatus including a motor connected to the center of rotation of 0
In response to the control signal from 40, the rotary table 120 is intermittently rotated to sequentially guide the samples OBa, OBb, OBc to the observation position OV within the visual field of the camera 120.

【0238】検出器123 は,観測位置OVに到達した良
品サンプルOBaと欠けのある不良品サンプルOBbと
バリのある不良品サンプルOBcとを相互に区別して検
出するためのもので,回転テーブル120 の外側に配置さ
れている。
The detector 123 is for detecting the non-defective sample OBa that has reached the observation position OV, the defective defective sample OBb having a chip, and the defective defective sample OBc having a burr by distinguishing them from each other. It is located outside.

【0239】この検出器123 は3個の近接スイッチ 123
a, 123b, 123cから構成されており,第1の近接ス
イッチ 123aは良品サンプルOBaについての識別体 1
22aを検出するために識別体 122aと同じ高さ位置に,
また第2の近接スイッチ 123bは欠けのある不良品サン
プルOBbについての識別体 122bを検出するために識
別体 122bと同じ高さ位置に,さらに第3の近接スイッ
チ 123cはバリのある不良品サンプルOBcについての
識別体 122cを検出するために識別体 122cと同じ高さ
位置に,それぞれ設置されている。各近接スイッチ 123
a, 123b, 123cは識別体 122a, 122b, 122cを
それぞれ検出したときに検出信号を画像処理装置40に与
える。
This detector 123 has three proximity switches 123.
a, 123b, 123c, and the first proximity switch 123a is an identifier for a non-defective sample OBa 1
In order to detect 22a, at the same height position as the identification body 122a,
The second proximity switch 123b is located at the same height as the identifier 122b for detecting the identifier 122b of the defective defective sample OBb, and the third proximity switch 123c is a defective defective sample OBc with burrs. In order to detect the discriminator 122c of the above, the discs are installed at the same height as the discriminator 122c. Each proximity switch 123
Reference numerals a, 123b, and 123c give detection signals to the image processing apparatus 40 when detecting the identification objects 122a, 122b, and 122c, respectively.

【0240】図70は画像処理装置40の回路構成を示すも
ので,A/D変換器131 ,2値化処理部132 ,表示装置
41.同期信号発生部133 ,CPU130 ,ROM135 ,R
AM134 ,外部記憶装置136 などにより構成されてい
る。
FIG. 70 shows the circuit configuration of the image processing device 40. The A / D converter 131, the binarization processing part 132 and the display device are shown in FIG.
41. Sync signal generator 133, CPU 130, ROM 135, R
It is composed of an AM 134, an external storage device 136, and the like.

【0241】A/D変換器131 はカメラ20から出力され
るアナログ映像信号をディジタル画像データに変換す
る。2値化処理部132 はA/D変換器131 から与えられ
るディジタル画像データを所定のしきい値で2値化す
る。表示装置41は2値化処理された画像データによって
表わされる2値化画像を表示する。同期信号発生部133
は垂直同期信号,水平同期信号,その他のタイミング信
号を発生し,これらの信号をA/D変換器131 ,2値化
処理部132 ,CPU130 に与える。
The A / D converter 131 converts the analog video signal output from the camera 20 into digital image data. The binarization processing unit 132 binarizes the digital image data supplied from the A / D converter 131 with a predetermined threshold value. The display device 41 displays a binarized image represented by the binarized image data. Sync signal generator 133
Generates a vertical synchronizing signal, a horizontal synchronizing signal, and other timing signals, and supplies these signals to the A / D converter 131, the binarization processing unit 132, and the CPU 130.

【0242】CPU130 は,最適な照明条件を探索して
決定するための制御および演算の実行主体であって,検
出器123 からの検出信号を受入れるとともに,照明装置
10,テーブル駆動機構121 などの動作を制御する。RO
M135 にはプログラムが格納され,RAM134 には各種
データが一時記憶される。外部記憶装置136 はフロッピ
ーディスク装置などにより構成され,決定された照明装
置10の最適照明条件などを記憶する。
The CPU 130 is a main body for executing control and calculation for searching and determining the optimum illumination condition, receives the detection signal from the detector 123, and
10. Controls the operation of the table drive mechanism 121 and the like. RO
A program is stored in M135, and various data is temporarily stored in RAM134. The external storage device 136 is configured by a floppy disk device or the like, and stores the determined optimum lighting condition of the lighting device 10 and the like.

【0243】図71は,照明装置10の最適な照明条件を決
定するためのCPU130 による処理手順を示すものであ
る。
FIG. 71 shows a processing procedure by the CPU 130 for determining the optimum illumination condition of the illumination device 10.

【0244】まず,回転テーブル120 上に配置された良
品サンプルOBaの個数Na ,欠けのある不良品サンプ
ルOBbの個数Nb ,バリのある不良品サンプルOBc
の個数Nc がそれぞれキーボードから入力される(ステ
ップ371 )。スタート指令が与えられると,画像処理装
置40が始動信号をテーブル駆動機構121 に与えるので,
回転テーブル120 が回転する(ステップ372 )。
First, the number N a of non-defective samples OBa arranged on the rotary table 120, the number N b of defective defective samples OBb, and the defective sample OBc with burrs.
The number N c of each is input from the keyboard (step 371). When the start command is given, the image processing device 40 gives a start signal to the table drive mechanism 121.
The rotary table 120 rotates (step 372).

【0245】いずれかサンプルが観測位置OVに到達す
ると,それが良品サンプルOBaであれば第1の近接ス
イッチ 123aが,欠けのある不良品サンプルOBbであ
れば第2の近接スイッチ 123bが,バリのある不良品サ
ンプルOBcであれば第3の近接スイッチ 123cが,そ
れぞれ対応する識別体 122a, 122b, 122cを検出し
て,検出信号を画像処理装置40へ与える(ステップ173
)。
When any of the samples reaches the observation position OV, the first proximity switch 123a if the sample is a good sample OBa, the second proximity switch 123b if the defective sample OBb is defective, If it is a certain defective sample OBc, the third proximity switch 123c detects the corresponding identifiers 122a, 122b, 122c and gives a detection signal to the image processing device 40 (step 173).
).

【0246】この検出信号が入力すると,CPU130 は
停止信号を出力してテーブル駆動機構121 を停止させ,
回転テーブル120 の回転を止める(ステップ374 )。こ
れによりサンプルは観測位置OVのカメラ20の視野内に
位置決めされる。
When this detection signal is input, the CPU 130 outputs a stop signal to stop the table drive mechanism 121,
Stop rotation of the turntable 120 (step 374). As a result, the sample is positioned within the field of view of the camera 20 at the observation position OV.

【0247】この実施例では照明装置10の光度が最適化
される。照明装置10には画像処理装置40から初期光度が
与えられており,照明装置10はこの初期光度で発光し,
サンプルを照明している。照明装置10による照明下で観
測位置OVのサンプルがカメラ20により撮像される(ス
テップ375 )。カメラ20の出力映像信号は画像処理装置
40に入力する。
In this embodiment, the luminous intensity of the lighting device 10 is optimized. The illumination device 10 is given an initial light intensity from the image processing device 40, and the illumination device 10 emits light at this initial light intensity,
Illuminating the sample. The sample of the observation position OV is imaged by the camera 20 under the illumination of the illumination device 10 (step 375). The image signal output from the camera 20 is an image processing device.
Enter 40.

【0248】この映像信号はA/D変換され,かつ2値
化される。CPU130 はこの2値画像データを用いて観
測位置OVのサンプルの特徴量を計測する(ステップ37
6 )。この実施例では特徴量は撮像画像上におけるサン
プルの面積である。計測された特徴量はRAM134 に記
憶される。
This video signal is A / D converted and binarized. The CPU 130 measures the characteristic amount of the sample at the observation position OV using this binary image data (step 37).
6). In this embodiment, the feature amount is the area of the sample on the captured image. The measured feature amount is stored in the RAM 134.

【0249】RAM134 内には,良品用,欠けのある不
良品用およびバリのある不良品用の特徴量をそれぞれ別
個に記憶するエリアが設けられている。CPU130 は検
出器123 から入力する検出信号に基づいて観測位置OV
のサンプルが良品,欠けのある不良品またはバリのある
不良品のいずれのサンプルであるかを判定し,計測した
特徴量を,判定した種類のサンプル用の記憶エリアに記
憶する。
The RAM 134 is provided with areas for separately storing characteristic quantities for non-defective products, defective products with defects, and defective products with burrs. The CPU 130 determines the observation position OV based on the detection signal input from the detector 123.
It is determined whether the sample is a non-defective sample, a defective defective product having a chip, or a defective defective product having burrs, and the measured feature amount is stored in the storage area for the determined type of sample.

【0250】ステップ372 〜376 の処理は回転テーブル
120 上のすべてのサンプルについて順次,行なわれる。
処理の回数が,先に入力されたサンプルの個数の総和N
a +Nb +Nc に達すれば回転テーブル120 は1回転し
たことになる(ステップ377)。
The processing of steps 372 to 376 is a rotary table.
This is done sequentially for all 120 samples.
The number of times the processing is performed is the total number N of the previously input samples.
a + N b + N reaches if the turntable to c 120 will be one rotation (step 377).

【0251】回転テーブル120 上のすべてのサンプルに
ついて特徴量(面積)の計測が終了すると,RAM134
内に記憶された計測面積のサンプルの種類ごとの総和
を,サンプル個数Na ,Nb またはNc でそれぞれ除算
することにより,良品サンプルOBaの面積の平均値S
a ,欠けのある不良品サンプルOBbの面積の平均値S
b ,およびバリのある不良品サンプルOBcの面積の平
均値Sc が求められる(ステップ378 )。
When the measurement of the characteristic amount (area) is completed for all the samples on the rotary table 120, the RAM 134
The sum of each type of sample of the stored measured area within the sample number N a, by dividing each by N b or N c, the average value S of area of good sample OBa
a , the average value S of the areas of defective defective samples OBb
b and the average value S c of the area of the defective sample OBc with burrs are obtained (step 378).

【0252】これらの平均値Sa ,Sb ,Sc を用い
て,良品と不良品の判別精度の評価値Sが次式により算
出される(ステップ379 )。
Using these average values S a , S b and S c , the evaluation value S of the accuracy of discriminating between the good product and the defective product is calculated by the following equation (step 379).

【0253】[0253]

【数11】 S=|Sc −Sa |+|Sa −Sb | 式11[Equation 11] S = | S c −S a | + | S a −S b |

【0254】この評価値Sが大きい程良品と不良品とを
判別できる精度が高いということになる。
The larger the evaluation value S, the higher the accuracy with which a good product and a defective product can be discriminated.

【0255】照明装置10に設定する初期光度を変えなが
ら図71に示す評価値算出処理を複数回繰返す。初期光度
を横軸にとり,算出された評価値Sを縦軸にとると,図
55に示す評価値Vと同じように,評価値Sは1つのピー
クをもつ凸関数となる。そこで,最大値またはその付近
の評価値を与える初期光度が,良品と不良品とを最も高
精度に判別できる照明条件を示すことになる。このよう
な初期光度がCPU130 により,または操作者により決
定される。
The evaluation value calculation process shown in FIG. 71 is repeated a plurality of times while changing the initial luminous intensity set in the illumination device 10. The horizontal axis represents the initial luminous intensity and the vertical axis represents the calculated evaluation value S.
Similar to the evaluation value V shown in 55, the evaluation value S is a convex function having one peak. Therefore, the initial luminous intensity that gives the evaluation value at or near the maximum value indicates the illumination condition that allows the good product and the defective product to be distinguished with the highest accuracy. Such initial luminous intensity is determined by the CPU 130 or the operator.

【0256】このようにして決定された最適照明条件
(最適初期光度)は,その他の必要データとともに外部
記憶装置136 に記憶される。最適照明条件は図67に示す
検査装置で利用される。
The optimum illumination condition (optimum initial luminous intensity) thus determined is stored in the external storage device 136 together with other necessary data. The optimum illumination condition is used in the inspection device shown in FIG.

【0257】(11)最適照明条件設定支援装置(その5:
主に照明装置の光度の設定) 上記実施例ではサンプルの面積に基づいて最適照明条件
が設定されている。次に,サンプルの特徴量の分散が最
小になる照明条件が最適なものであるという考え方に基
づいて,最適照明条件を設定する,または設定を支援す
る装置について述べる。
(11) Optimal lighting condition setting support device (Part 5:
Mainly Setting Luminous Intensity of Illumination Device) In the above embodiment, the optimal illumination condition is set based on the area of the sample. Next, based on the idea that the illumination condition that minimizes the variance of the sample feature amount is optimal, an apparatus that sets or supports the optimal illumination condition will be described.

【0258】上記の考え方に基づいて最適化された照明
系は,計測対象物の撮像画像から重心位置,面積,周囲
長などの特徴量を計測する自動計測装置に用いられる。
この自動計測装置の構成は図67に示すものと同じであ
る。
The illumination system optimized based on the above idea is used in an automatic measuring device for measuring the feature amount such as the position of the center of gravity, the area and the perimeter from the imaged image of the object to be measured.
The configuration of this automatic measuring device is the same as that shown in FIG.

【0259】図72および図73は最適照明条件設定支援装
置の構成を示しており,図68および図69に示すものと同
一物には同一符号を付し重複説明を避ける。
72 and 73 show the configuration of the optimum illumination condition setting support device. The same parts as those shown in FIGS. 68 and 69 are designated by the same reference numerals to avoid redundant description.

【0260】円板状の回転テーブル120 の上面の周縁部
には,複数のサンプルOBs が等角度間隔で位置決め固
定されている。各サンプルOBs の固定位置の外側には
金属板より成る識別体122 が同じ高さで配置されてい
る。一方,回転テーブル120 の外側には観測位置OVの
近傍において識別体122 と同じ高さ位置に近接スイッチ
より成る検出器123 が配置されている。
A plurality of samples OB s are positioned and fixed at equiangular intervals on the peripheral portion of the upper surface of the disk-shaped rotary table 120. On the outside of the fixed position of each sample OB s, an identification body 122 made of a metal plate is arranged at the same height. On the other hand, on the outside of the rotary table 120, a detector 123 composed of a proximity switch is arranged in the vicinity of the observation position OV at the same height as the identification body 122.

【0261】画像処理装置40の構成は,図70に示すもの
と同じであり,その図示および説明を省略する。
The configuration of the image processing device 40 is the same as that shown in FIG. 70, and its illustration and description are omitted.

【0262】計測のための最適な照明条件を決定するた
めの処理手順も図71に示すものと基本的には同じ流れで
ある。以下に,図71の処理と異なる点について主に説明
する。この実施例では,最初のステップ371 において回
転テーブル120 上に固定されたサンプルOBs の個数が
入力される。
The processing procedure for determining the optimum illumination condition for measurement is basically the same as that shown in FIG. The differences from the processing in FIG. 71 will be mainly described below. In this embodiment, the number of samples OB s fixed on the rotary table 120 is input in the first step 371.

【0263】回転テーブル120 を回転させ,いずれかサ
ンプルOBs が観測位置OVに達すると回転テーブル12
0 が停止し,サンプルOSs の撮像が行なわれる。照明
装置10には画像処理装置40により所定の初期光度が設定
されている。
The rotary table 120 is rotated, and when any of the samples OB s reaches the observation position OV, the rotary table 12 is rotated.
0 is stopped and the sample OS s is imaged. The image processing device 40 sets a predetermined initial luminous intensity in the lighting device 10.

【0264】画像処理装置40は,カメラ20から取り込ん
だ画像データを処理して重心位置や面積などの特徴量を
計測し,その計測した特徴量を記憶する。
The image processing device 40 processes the image data taken in from the camera 20 to measure the characteristic amount such as the position of the center of gravity and the area, and stores the measured characteristic amount.

【0265】上記の動作が回転テーブル120 上のすべて
のサンプルについて実行される。
The above operation is executed for all samples on the turntable 120.

【0266】すべてのサンプルOBs についての計測が
完了すると,計測されたすべてのサンプルについての特
徴量の分散が求められる。この分散が小さい程,特徴量
のばらつきが小さく,計測精度は高いものとなる。
When the measurement for all the samples OB s is completed, the variance of the feature amount for all the measured samples is obtained. The smaller the variance is, the smaller the variation of the feature amount is, and the higher the measurement accuracy is.

【0267】画像処理装置40によって照明装置10の光度
が変更されながら,同様の計測と分散の算出が実行され
る。求められた分散が最小となる光度が検索され,その
光度が最適な照明条件として決定される。
Similar measurement and calculation of variance are executed while the light intensity of the illuminating device 10 is changed by the image processing device 40. The luminosity that minimizes the obtained dispersion is searched, and the luminosity is determined as the optimum illumination condition.

【0268】上述した2つの実施例ではいずれも回転テ
ーブルが設けられているが,サンプルを載置しかつ搬送
するものは図67に示すようなベルト・コンベアでもよ
い。
Although a rotary table is provided in both of the above-mentioned two embodiments, a belt conveyer as shown in FIG. 67 may be used to place and carry the sample.

【0269】(12)撮像条件決定支援装置 最後に,撮像系に含まれるレンズの選択,対象物に対す
るカメラの設置距離の決定等を支援するための装置につ
いて説明する。
(12) Imaging Condition Determination Supporting Device Finally, a device for supporting the selection of the lens included in the imaging system, the determination of the installation distance of the camera with respect to the object, and the like will be described.

【0270】図74は撮像条件決定支援装置50の構成を示
している。図14に示すものと同一物には同一符号を付す
る。支援装置50は図14に示す支援装置と同じ画像処理装
置を用いても実現可能なので便宜的に同一符号50を付し
ておく。
FIG. 74 shows the structure of the imaging condition determination support device 50. The same parts as those shown in FIG. 14 are designated by the same reference numerals. Since the support device 50 can be realized by using the same image processing device as the support device shown in FIG. 14, the same reference numeral 50 is attached for convenience.

【0271】撮像条件決定支援装置50にはレンズ選択部
57が設けられている。このレンズ選択部57はユーザが入
力装置51から入力する情報,たとえば希望する視野の大
きさや希望設置距離,何を優先するかなどの情報にした
がってこれに適するレンズ,接写リング,設置距離など
を導く。
The lens selection unit is included in the imaging condition determination support device 50.
57 are provided. The lens selection unit 57 guides a lens, a close-up ring, an installation distance, etc. suitable for this according to information input by the user from the input device 51, for example, a desired size of the field of view, a desired installation distance, and what is prioritized. .

【0272】図75を参照して撮像系の各種パラメータの
関係について説明しておく。
The relationship between various parameters of the image pickup system will be described with reference to FIG.

【0273】カメラ20の設置距離(撮像対象OBとカメ
ラ20との間の距離Aは次式で与えられる。
Installation distance of the camera 20 (The distance A between the image pickup object OB and the camera 20 is given by the following equation.

【0274】[0274]

【数12】 A=(Ls(F+B−h−ΔH+d)/Lc)+B−h+d 式12 ここで,Ls:視野の大きさ F:フランジ・バック B:レンズ22の全長 h:レンズ先端から第1主点までの距離 ΔH:主点間隔 d:ヘリコイド繰出し量 Lc:撮像素子の有効画面[Equation 12] A = (Ls (F + B−h−ΔH + d) / Lc) + B−h + d Formula 12 Here, Ls: size of visual field F: flange back B: total length of lens 22 h: first from lens tip Distance to principal point ΔH: principal point distance d: helicoid feeding amount Lc: effective screen of image sensor

【0275】ヘリコイド繰出し量dはレンズ22(組合せ
レンズ,またはレンズ筒)の焦点距離foを用いて次式
で表わされる。
The helicoid extension amount d is expressed by the following equation using the focal length fo of the lens 22 (combined lens or lens barrel).

【0276】[0276]

【数13】 d=(Lc×fo/Ls)−F−B+h+ΔH+fo 式13D = (Lc × fo / Ls) −FB−h + ΔH + fo Equation 13

【0277】カメラの設置距離Aは式13からLs/Lc
を導き,それを式12に代入すると次のようにも表わされ
る。
The installation distance A of the camera is calculated from Equation 13 as Ls / Lc.
By deriving and substituting it into Eq. 12, it is also expressed as follows.

【0278】[0278]

【数14】 A=fo[(F+d+B−h−ΔH)/(F+d+B−h−ΔH−fo)] +d+B−h 式14A = fo [(F + d + B−h−ΔH) / (F + d + B−h−ΔH−fo)] + d + B−h Equation 14

【0279】視野Lsは式13および式14から次のように
導かれる。
The visual field Ls is derived from the equations 13 and 14 as follows.

【0280】[0280]

【数15】 Ls=Lc(A−d−B+h)/(F+d+B−h−ΔH) 式15Ls = Lc (A−d−B + h) / (F + d + B−h−ΔH) Equation 15

【0281】フランジ・バックFや撮像素子の有効画面
Lcはカメラ20によって決まる定数であるから固定値と
考えてよい。レンズ全長B,レンス選択から第1主点ま
での距離h,主点間隔ΔHおよび実焦点距離foはレン
ズ22によって決まる定数であるので,これらの定数の集
合をlensと表現することにする。定数lensはレ
ンズの種類によって一義的に定まる。
Since the flange back F and the effective screen Lc of the image pickup device are constants determined by the camera 20, they may be considered as fixed values. Since the total lens length B, the distance h from the lens selection to the first principal point, the principal point interval ΔH, and the actual focal length fo are constants determined by the lens 22, the set of these constants will be expressed as lens. The constant length is uniquely determined by the type of lens.

【0282】そうすると,式12,式13は,関数f( )
の記号を用いて,それぞれ次のよう簡潔に表現される。
Then, the equations 12 and 13 are given by the function f ().
The following symbols are simply expressed as follows.

【0283】[0283]

【数16】 A=f(Ls,d,lens) 式16## EQU16 ## A = f (Ls, d, lens) Expression 16

【0284】[0284]

【数17】 d=f(Ls,lens) 式17D = f (Ls, lens) Expression 17

【0285】式14からdを導くと,ヘリコイド繰出し量
は次のようにも表わされる。
Derivation of d from Equation 14 gives the helicoid feed amount as follows.

【0286】[0286]

【数18】 d=f(A,lens) 式18D = f (A, lens) Equation 18

【0287】さらに,式15から視野の大きさLsは次の
ようにも表現される。
Further, from Expression 15, the size Ls of the visual field is also expressed as follows.

【0288】[0288]

【数19】 Ls=f(A,d,lens) 式19Ls = f (A, d, lens) Equation 19

【0289】式16から式17は,カメラ設置距離Aと,視
野の大きさLsと,ヘリコイド繰出し量dとレンズ定数
lensとの間の関係を表わしている。このような関係
式をもちいて,上記4つのパラメータのうちの少くとも
2つを与えれば,残りの2つが定まる。
Expressions 16 to 17 represent the relationship among the camera installation distance A, the size Ls of the visual field, the helicoid extension amount d, and the lens constant length. If at least two of the above four parameters are given by using such a relational expression, the remaining two are determined.

【0290】式16から式19の関係を利用して,希望する
視野の大きさLs0 と希望する設置距離A0 を与えた場
合に最適なレンズの種類を選択する処理について説明す
る。N種類のレンズがあるものとし,これらのレンズに
ついての定数lensはあらかじめ分っているものとす
る。好ましくはこのレンズ定数lensはレンズの種類
ごとにメモリにあらかじめストアされている。ユーザが
その都度レンズ定数lensを入力してもよい。
A process of selecting the optimum lens type when the desired size Ls 0 of the visual field and the desired installation distance A 0 are given will be described by using the relationships of the expressions 16 to 19. It is assumed that there are N types of lenses, and the constant length of these lenses is known in advance. Preferably, this lens constant lens is stored in advance in a memory for each type of lens. The user may input the lens constant lens each time.

【0291】図76は,希望の視野Ls0 を優先する場合
の処理を示すものである。
FIG. 76 shows the processing for prioritizing the desired visual field Ls 0 .

【0292】まず,ユーザは入力装置51から希望の視野
Ls0 と,希望の設置距離A0 を入力する(ステップ38
0 )。
First, the user inputs the desired field of view Ls 0 and the desired installation distance A 0 from the input device 51 (step 38).
0).

【0293】第1番目(n=1)のレンズのレンズ定数
lensがメモリから読出され,または入力装置51を通
して入力され,希望の視野Ls0 とn番目のレンズ定数
lensとを用いて,式17からヘリコイド繰出し量dが
算出される(ステップ381 〜383 )。
The lens constant lens of the first lens (n = 1) is read from the memory or input through the input device 51, and using the desired field of view Ls 0 and the nth lens constant lens, the expression 17 The helicoid feed amount d is calculated from (steps 381 to 383).

【0294】ヘリコイド繰出し量dはヘリコイドの最大
繰出し量dmax よりも小さくなければならないので,算
出されたヘリコイド繰出し量dが最大繰出し量dmax
りも大きいかどうかが判定される(ステッブ384 )。
Since the helicoid feed amount d must be smaller than the maximum helicoid feed amount d max, it is judged whether or not the calculated helicoid feed amount d is larger than the maximum feed amount d max (step 384).

【0295】もし,算出されたヘリコイド繰出し量dが
最大繰出し量dmax よりも大きい場合には,次の式20に
示す不等式を満足する厚さtの接写リングを使用しなけ
ればならないので,式20を満たす厚さの接写リングが選
択される(ステップ385 )。接写リングに関するデータ
も好ましくはあらかじめメモリにストアされている。
If the calculated payout amount d of the helicoid is larger than the maximum payout amount d max , a close-up ring having a thickness t that satisfies the inequality shown in the following equation 20 must be used. A close-up ring with a thickness of 20 is selected (step 385). The data regarding the close-up ring is also preferably stored in advance in the memory.

【0296】[0296]

【数20】 t<d<(t+dmax ) 式20[Equation 20] t <d <(t + d max ) Expression 20

【0297】次に,算出されたヘリコイド繰出し量dを
用いて,式16にしたがって,そのレンズについてカメラ
設置距離Aが算出される(ステップ386 )。
Next, using the calculated helicoid feeding amount d, the camera installation distance A for the lens is calculated according to the equation 16 (step 386).

【0298】以上の処理はN種類のレンズについて繰返
し行なわれ(ステップ387 ,388 ),各処理で得られた
レンズ番号n,接写リング厚tおよび設置距離Aがメモ
リにストアされる。
The above processing is repeated for N kinds of lenses (steps 387 and 388) and the lens number n, the close-up ring thickness t and the installation distance A obtained in each processing are stored in the memory.

【0299】N種類のレンズについての処理が終了する
と,これらのレンズの中から,希望の設置距離A0 に最
も近い設置距離Aをもつレンズ番号n0 が選択される
(ステップ289 )。選択されたレンズ番号n0 について
接写リングの厚さtについてのデータがあればそれも選
択される。算出されたカメラ設置距離Aが実際にカメラ
20を設置すべき距離である。レンズ22の全長B,ヘリコ
イド繰出し量d,カメラ設置距離Aの間には,当然のこ
とながらB+d<Aなる関係が成り立たなければならな
いので,そのようなレンズを選ぶ必要があるのはいうま
でもない。
[0299] When the processing of the N types of lenses is completed, from among these lenses, lens number n 0 with the closest installation distance A to the installation distance A 0 of the desired is selected (step 289). If there is data on the close-up ring thickness t for the selected lens number n 0 , it is also selected. The calculated camera installation distance A is the actual camera
20 is the distance to install. It is needless to say that such a lens needs to be selected because the relationship B + d <A must be naturally established among the total length B of the lens 22, the helicoid feeding amount d, and the camera installation distance A. Absent.

【0300】このようにして選択されたレンズの種類
と,接写リングの厚さと,設置距離Aが,図78に示すよ
うに,標示装置41に表示される。
The type of lens thus selected, the thickness of the close-up ring, and the installation distance A are displayed on the marking device 41 as shown in FIG.

【0301】図77は希望の設置距離を優先する処理を示
している。図76に示す処理と同じものについては同一符
号を付し,重複説明を避ける。
FIG. 77 shows a process for prioritizing a desired installation distance. The same processes as those shown in FIG. 76 are designated by the same reference numerals to avoid redundant description.

【0302】希望の設置距離A0 と第n番目のレンズの
レンズ定数lensとを用いて,式18にしたがってヘリ
コイド繰出し量dが算出される(ステップ383 )。d>
ma x の場合には接写リング厚さtが算出される(ステ
ップ385 )。
Using the desired installation distance A 0 and the lens constant length of the nth lens, the helicoid feed amount d is calculated according to the equation 18 (step 383). d>
close-up ring thickness t is calculated in the case of d ma x (step 385).

【0303】算出されたヘリコイド繰出し量dを用い
て,式19にしたがって,視野Lsが算出される(ステッ
プ391 )。
The field of view Ls is calculated according to equation 19 using the calculated helicoid feed amount d (step 391).

【0304】以上の処理がすべての種類のレンズについ
て繰返し行なわれる。その後,希望の視野Ls0 に最も
近い視野Lsをもつレンズが選択され(ステップ392
),その選択結果が図78のように表示される(ステッ
プ393 )。
The above processing is repeated for all types of lenses. Then, the lens having the field of view Ls closest to the desired field of view Ls 0 is selected (step 392).
), The selection result is displayed as shown in FIG. 78 (step 393).

【0305】最後に,希望の視野を,指定されたレンズ
で実現するための接写リングと設置距離を求める処理に
ついて説明する。この処理については特にフロー・チャ
ートは示されていない。
Finally, the process of obtaining the close-up ring and the installation distance for realizing the desired field of view with the designated lens will be described. No particular flow chart is shown for this process.

【0306】この場合には,レンズ22は既知であるの
で,式17に希望の視野Ls0 と指定されたレンズの定数
lensを代入して,ヘリコイド繰出し量dが算出され
る。ヘリコイド繰出し量dはレンズのヘリコイド最大繰
出し量dmax よりも小さくなければならないので,算出
されたヘリコイド繰出し量dが最大繰出し量dmax より
も大きい場合には,式20の不等式を満足する厚さtの接
写リングが用いられる。
In this case, since the lens 22 is known, the desired field of view Ls 0 and the lens constant lens designated are substituted into equation 17 to calculate the helicoid feed amount d. The helicoid extension amount d must be smaller than the maximum helicoid extension amount d max of the lens. Therefore, when the calculated helicoid extension amount d is larger than the maximum extension amount d max , the thickness that satisfies the inequality of Eq. A close-up ring of t is used.

【0307】次に,算出されたヘリコイド繰出し量dと
希望の視野Ls0 とレンズ定数lensとを用いて式16
によって設置距離Aが求められる。
Next, using the calculated helicoid feed amount d, the desired visual field Ls 0 and the lens constant lens, the expression 16 is obtained.
Thus, the installation distance A is obtained.

【0308】この場合にも,レンズの全長Bとヘリコイ
ド繰出し量d,カメラ設置距離Aの間には,当然のこと
ながらB+d<Aなる関係が成り立たなければならない
ので,B+d>Aとなるときには指定されたレンズで希
望の視野は実現できないということなる。
Also in this case, naturally, the relation B + d <A must be established between the total length B of the lens, the helicoid feed amount d, and the camera installation distance A. Therefore, when B+d> A, it is specified. It means that the desired field of view cannot be realized with the given lens.

【0309】以上のようにして,入力装置51から希望の
視野Ls0 と希望の設置距離A0 を入力すると,推奨値
として,レンズ(焦点距離),接写リングの厚さ,設置
距離がCRT表示装置に表示される。また,希望の視野
とレンズとを入力すれば,それに適した設置距離Aが算
出され,表示される。
As described above, when the desired field of view Ls 0 and the desired installation distance A 0 are input from the input device 51, the recommended values are the lens (focal length), the thickness of the close-up ring, and the installation distance displayed on the CRT. Displayed on the device. Further, if the desired field of view and the lens are input, the installation distance A suitable for them is calculated and displayed.

【図面の簡単な説明】[Brief description of drawings]

【図1】リング蛍光灯を示す斜視図である。FIG. 1 is a perspective view showing a ring fluorescent lamp.

【図2】直管蛍光灯を示す斜視図である。FIG. 2 is a perspective view showing a straight tube fluorescent lamp.

【図3】リング・ライト・ガイドを示す斜視図である。FIG. 3 is a perspective view showing a ring light guide.

【図4】スリット・ライト・ガイドを示す斜視図であ
る。
FIG. 4 is a perspective view showing a slit light guide.

【図5】ストレート・ライト・ガイドを示す斜視図であ
る。
FIG. 5 is a perspective view showing a straight light guide.

【図6】二分岐ライト・ガイドを示す斜視図である。FIG. 6 is a perspective view showing a bifurcated light guide.

【図7】透過光照明を示している。FIG. 7 shows transmitted light illumination.

【図8】一様光照明を示している。FIG. 8 shows uniform light illumination.

【図9】同軸落射照明を示している。FIG. 9 shows coaxial epi-illumination.

【図10】平行光照明を示している。FIG. 10 shows collimated illumination.

【図11】暗視野照明を示している。FIG. 11 shows dark field illumination.

【図12】画像処理システムの全体構成を示すものであ
る。
FIG. 12 shows the overall configuration of an image processing system.

【図13】画像処理システムの他の例を示すものであ
る。
FIG. 13 shows another example of the image processing system.

【図14】照明装置の最適高さ決定の支援に適した照明
条件決定支援装置の構成を示すブロック図である。
FIG. 14 is a block diagram showing a configuration of an illumination condition determination support device suitable for supporting determination of an optimum height of the illumination device.

【図15】表示装置における決定された最適高さの表示
例を示す。
FIG. 15 shows a display example of the determined optimum height on the display device.

【図16】照明装置の最適な設置高さを決定する方法を
説明するためのものである。
FIG. 16 is a view for explaining a method of determining an optimum installation height of a lighting device.

【図17】照明装置の最適な設置高さを決定する方法を
説明するためのものである。
FIG. 17 is a view for explaining a method of determining an optimum installation height of a lighting device.

【図18】照明装置とその照明光の等照度曲線を示すも
のである。
FIG. 18 shows an illuminating device and an isolux curve of its illuminating light.

【図19】等照度で照明される領域の半径と照明装置の
設置高さとの関係を示すグラフである。
FIG. 19 is a graph showing the relationship between the radius of a region illuminated with equal illuminance and the installation height of the illumination device.

【図20】最適高さ決定処理の手順を示すフロー・チャ
ートである。
FIG. 20 is a flow chart showing a procedure of optimum height determination processing.

【図21】画像処理システムのさらに他の例を示すもの
である。
FIG. 21 shows still another example of the image processing system.

【図22】対象物の形状,および対象物と照明装置との
位置関係を示す斜視図である。
FIG. 22 is a perspective view showing the shape of an object and the positional relationship between the object and the lighting device.

【図23】最適角度決定の支援に適した照明条件決定支
援装置の構成を示すブロック図である。
FIG. 23 is a block diagram showing a configuration of an illumination condition determination support device suitable for supporting optimum angle determination.

【図24】照明装置の最適な設置角度を決定する方法を
説明するものである。
FIG. 24 illustrates a method for determining an optimum installation angle of a lighting device.

【図25】不完全拡散反射の状態を示すものである。FIG. 25 shows a state of incomplete diffuse reflection.

【図26】最適角度決定処理の手順を示すフロー・チャ
ートである。
FIG. 26 is a flow chart showing a procedure of optimum angle determination processing.

【図27】照明装置および照明方法の決定の支援に適し
た照明条件決定支援装置の構成を示すブロック図であ
る。
FIG. 27 is a block diagram showing a configuration of an illumination condition determination support device suitable for supporting determination of an illumination device and an illumination method.

【図28】対象物の一例としてのコネクタの外観を示す
斜視図である。
FIG. 28 is a perspective view showing the appearance of a connector as an example of an object.

【図29】照明装置および照明方法の決定処理の全体的
な手順を示すフロー・チャートである。
FIG. 29 is a flow chart showing an overall procedure of a process of determining a lighting device and a lighting method.

【図30】形状,寸法の検査を目的とする場合の照明装
置および照明方法を決定する処理手順を示すフロー・チ
ャートである。
FIG. 30 is a flow chart showing a processing procedure for determining an illumination device and an illumination method for the purpose of inspecting a shape and dimensions.

【図31】部品の有無や欠品の検査を目的とする場合の
照明装置および照明方法を決定する処理手順を示すフロ
ー・チャートである。
FIG. 31 is a flow chart showing a processing procedure for determining an illumination device and an illumination method for the purpose of inspecting the presence / absence of a component or a missing item.

【図32】傷の検査を目的とする場合の照明装置および
照明方法を決定する処理手順を示すフロー・チャートで
ある。
FIG. 32 is a flow chart showing a processing procedure for determining an illumination device and an illumination method for the purpose of inspecting a flaw.

【図33】色の検査を目的とする場合の照明装置および
照明方法を決定する処理手順を示すフロー・チャートで
ある。
FIG. 33 is a flow chart showing a processing procedure for determining an illumination device and an illumination method for the purpose of color inspection.

【図34】(A) および(B) は位置決めを目的とする場合
の照明装置および照明方法を決定する処理手順を示すフ
ロー・チャートである。
34 (A) and (B) are flow charts showing a processing procedure for determining an illumination device and an illumination method for the purpose of positioning.

【図35】異物の検査を目的とする場合の照明装置およ
び照明方法を決定する処理手順を示すフロー・チャート
である。
FIG. 35 is a flow chart showing a processing procedure for determining an illumination device and an illumination method for the purpose of inspecting a foreign substance.

【図36】文字やマークの検査を目的とする場合の照明
装置および照明方法を決定する処理手順を示すフロー・
チャートである。
FIG. 36 is a flowchart showing a processing procedure for determining a lighting device and a lighting method for the purpose of inspecting characters and marks.
It is a chart.

【図37】透過光照明用画面の表示例を示す。FIG. 37 shows a display example of a screen for transmitted light illumination.

【図38】一様光照明用画面の表示例を示す。FIG. 38 shows a display example of a screen for uniform light illumination.

【図39】凹凸突起照明用画面の表示例を示す。FIG. 39 shows a display example of an uneven projection illumination screen.

【図40】凹凸穴照明用画面の表示例を示す。FIG. 40 shows a display example of an uneven hole illumination screen.

【図41】凹凸エッジ照明用画面の表示例を示す。FIG. 41 shows a display example of an uneven edge illumination screen.

【図42】凹凸線照明用画面の表示例を示す。FIG. 42 shows a display example of a screen for uneven line illumination.

【図43】正反射利用照明用画面の表示例を示す。FIG. 43 shows a display example of a screen for illumination using regular reflection.

【図44】照明装置および照明方法の決定,ならびに最
適高さまたは最適角度の決定の支援に適した装置の構成
を示すブロック図である。
FIG. 44 is a block diagram showing a configuration of an apparatus suitable for supporting determination of an illumination device and an illumination method, and determination of an optimum height or an optimum angle.

【図45】照明装置および照明方法,ならびに最適高さ
または最適角度の決定処理の全体を示すフロー・チャー
トである。
FIG. 45 is a flow chart showing an entire illumination device and illumination method, and an optimum height or optimum angle determination process.

【図46】複数の照明装置がある場合の最適高さの決定
処理手順を示すフロー・チャートである。
FIG. 46 is a flow chart showing a procedure for determining an optimum height when there are a plurality of lighting devices.

【図47】最適照明条件設定支援装置における画像処理
装置の回路構成を示すブロック図である。
FIG. 47 is a block diagram showing a circuit configuration of an image processing device in the optimum illumination condition setting support device.

【図48】ヒストグラム生成回路の回路構成を示すブロ
ック図である。
FIG. 48 is a block diagram showing a circuit configuration of a histogram generation circuit.

【図49】非適合度演算部の回路構成を示すブロック図
である。
FIG. 49 is a block diagram showing a circuit configuration of an incompatibility calculation unit.

【図50】画像上に設定されたウインドウを示すもので
ある。
FIG. 50 shows a window set on an image.

【図51】明るさのデータを明るさの差を表わすデータ
に変換する減算回路の動作を説明するためのものであ
る。
FIG. 51 is a diagram for explaining the operation of a subtraction circuit that converts brightness data into data representing a difference in brightness.

【図52】(A) から(H) はエッジ・パターンを表わすフ
ァジィ・モデルを示すものである。
52 (A) to (H) show fuzzy models representing edge patterns.

【図53】メンバーシップ関数を示すグラフである。FIG. 53 is a graph showing a membership function.

【図54】画質ヒストグラムを示すグラフである。FIG. 54 is a graph showing an image quality histogram.

【図55】照明装置の設置高さと照明の評価値との関係
を示すグラフである。
FIG. 55 is a graph showing the relationship between the installation height of a lighting device and the evaluation value of lighting.

【図56】照明装置の高さ位置の設定処理手順を示すフ
ロー・チャートである。
FIG. 56 is a flow chart showing a procedure for setting the height position of the lighting device.

【図57】照明装置の高さ位置の設定処理手順を示すフ
ロー・チャートである。
FIG. 57 is a flowchart showing a procedure for setting the height position of the lighting device.

【図58】高さ設定を指示する表示画面の表示例を示
す。
FIG. 58 shows a display example of a display screen for instructing height setting.

【図59】高さ設定を指示する表示画面の表示例を示
す。
FIG. 59 shows a display example of a display screen for instructing height setting.

【図60】高さ設定を指示する表示画面の表示例を示
す。
FIG. 60 shows a display example of a display screen for instructing height setting.

【図61】照明装置の高さ位置設定処理の他の例を示す
フロー・チャートである。
FIG. 61 is a flowchart showing another example of the height position setting process of the lighting device.

【図62】照明装置の高さ位置設定処理の他の例を示す
フロー・チャートである。
FIG. 62 is a flowchart showing another example of the height position setting process of the lighting device.

【図63】照明装置の高さ位置設定処理のさらに他の例
を示すフロー・チャートである。
FIG. 63 is a flow chart showing still another example of the height position setting process of the illumination device.

【図64】照明装置の高さ位置設定処理のさらに他の例
を示すフロー・チャートである。
FIG. 64 is a flow chart showing still another example of the height position setting process of the lighting device.

【図65】(A) から(H) はエッジ・パターンを表わす他
のファジィ・モデルを示すものである。
65A to 65H show another fuzzy model representing an edge pattern.

【図66】(A) および(B) はグレイ画像からエッジ画像
が生成される様子を示す。
66A and 66B show how an edge image is generated from a gray image.

【図67】自動検査装置の全体構成を示すものである。FIG. 67 shows the overall structure of an automatic inspection device.

【図68】最適照明条件設定支援装置の全体構成を示す
ものである。
[Fig. 68] Fig. 68 shows an overall configuration of an optimum illumination condition setting support device.

【図69】回転テーブル上のサンプルの配置状態を示す
平面図である。
FIG. 69 is a plan view showing an arrangement state of samples on the rotary table.

【図70】画像処理装置の回路構成例を示すブロック図
である。
FIG. 70 is a block diagram illustrating a circuit configuration example of an image processing device.

【図71】照明装置の最適な照明条件を決定するための
処理手順を示すフロー・チャートである。
71 is a flow chart showing a processing procedure for determining the optimum illumination condition of the illumination device. FIG.

【図72】最適照明条件設定支援装置の全体構成を示す
ものである。
FIG. 72 is a diagram showing an overall configuration of an optimum illumination condition setting support device.

【図73】回転テーブル上のサンプルの配置状態を示す
平面図である。
FIG. 73 is a plan view showing the arrangement of samples on the turntable.

【図74】撮像条件決定支援装置の構成を示すブロック
図である。
FIG. 74 is a block diagram showing a configuration of an imaging condition determination support device.

【図75】カメラ,レンズ等のパラメータを説明するた
めのものである。
FIG. 75 is for explaining parameters of a camera, a lens and the like.

【図76】撮像条件の決定を支援する処理手順を示すフ
ロー・チャートである。
FIG. 76 is a flow chart showing a processing procedure for supporting determination of imaging conditions.

【図77】撮像条件の決定を支援する他の処理手順を示
すフロー・チャートである。
FIG. 77 is a flow chart showing another processing procedure for supporting determination of imaging conditions.

【図78】選択された撮像条件を示す表示例である。[Fig. 78] Fig. 78 is a display example showing selected imaging conditions.

【符号の説明】[Explanation of symbols]

11 照明装置 20 テレビ・カメラ 30 支柱 31 支持装置 38 昇降機構 41 表示装置 61 画像入力部 65 CPU 68 I/O制御部 82 非適合度ヒストグラム生成部 83 明るさヒストグラム生成部 84 画質ヒストグラム生成部 11 Lighting device 20 Television / camera 30 Support 31 Support device 38 Lifting mechanism 41 Display device 61 Image input unit 65 CPU 68 I / O control unit 82 Incompatibility histogram generation unit 83 Brightness histogram generation unit 84 Image quality histogram generation unit

フロントページの続き (31)優先権主張番号 特願平4−171613 (32)優先日 平4(1992)6月4日 (33)優先権主張国 日本(JP) (72)発明者 藤枝 紫朗 京都府京都市右京区花園土堂町10番地 オ ムロン株式会社内Continuation of front page (31) Priority claim number Japanese Patent Application No. 4-171613 (32) Priority Day 4 (1992) June 4 (33) Country of priority claim Japan (JP) (72) Inventor Shiro Fujieda Omron Co., Ltd. 10 Hanazono Dodo-cho, Ukyo-ku, Kyoto City, Kyoto Prefecture

Claims (19)

【特許請求の範囲】[Claims] 【請求項1】 対象物を照明する照明装置(11),上記
照明装置を位置調整可能に支持する支持装置(30,31,
38),上記照明装置による照明下で対象物を撮像し,対
象物の画像を表わす映像信号を出力する撮像装置(2
0),上記撮像装置から出力される映像信号に基づい
て,明るさに対する画質の良否の程度を表わす画質ヒス
トグラムを生成する画質ヒストグラム生成回路手段(6
1,82,83,84),上記画質ヒストグラム生成回路手段
によって生成された画質ヒストグラムに基づいて照明の
評価値を算出する評価値算出回路手段(65),上記評価
値算出回路手段によって算出された今回の評価値を上記
照明装置の位置変更前の前回の評価値と比較する比較回
路手段(65),および上記比較回路手段による比較結果
を出力する出力手段(41,68),を備えた照明条件設定
支援装置。
1. A lighting device (11) for illuminating an object, and a supporting device (30, 31, for supporting the lighting device in a positionally adjustable manner).
38), an image pickup device for picking up an image of an object under illumination by the above illumination device and outputting a video signal representing an image of the object (2
0), an image quality histogram generation circuit means (6) for generating an image quality histogram representing the degree of quality of image quality with respect to brightness based on the video signal output from the image pickup device.
1, 82, 83, 84), an evaluation value calculation circuit means (65) for calculating an evaluation value of illumination based on the image quality histogram generated by the image quality histogram generation circuit means, and the evaluation value calculation circuit means Illumination including comparison circuit means (65) for comparing the current evaluation value with the previous evaluation value before the position change of the lighting device, and output means (41, 68) for outputting the comparison result by the comparison circuit means. Condition setting support device.
【請求項2】 上記出力手段が上記比較回路手段による
比較結果に応じて上記照明装置の位置調整方向を指示す
る表示装置(41)である,請求項1に記載の装置。
2. The device according to claim 1, wherein said output means is a display device (41) for instructing a position adjustment direction of said lighting device according to a comparison result by said comparison circuit means.
【請求項3】 上記支持装置が上記照明装置の位置を変
更させる駆動装置(37)を含み,上記出力手段が上記比
較回路手段による比較結果に応じて上記照明装置の位置
調整方向を指示する表示装置(41)であり,上記駆動装
置を駆動するための指令を入力する入力装置(69)と,
この入力装置を通して入力された指令に応答して上記駆
動装置を制御する制御装置(65,68)とをさらに備えて
いる,請求項1に記載の装置。
3. A display for indicating the position adjusting direction of the illuminating device according to the comparison result by the comparing circuit means, wherein the supporting device includes a driving device (37) for changing the position of the illuminating device. An input device (69) which is a device (41) and which inputs a command for driving the drive device;
The device according to claim 1, further comprising: a control device (65, 68) for controlling the drive device in response to a command input through the input device.
【請求項4】 上記支持装置が上記照明装置の位置を変
更させる駆動装置(37)を含み,上記比較回路手段によ
る比較結果に応じて上記駆動装置(37)を制御し,上記
照明装置の位置を最適位置に調整する制御手段(65,6
8)をさらに備えている請求項1に記載の装置。
4. The position of the illuminating device includes a driving device (37) for changing the position of the illuminating device, which controls the driving device (37) according to a comparison result by the comparison circuit means. Control means (65, 6
The device of claim 1, further comprising 8).
【請求項5】 上記画質ヒストグラム生成回路手段が,
上記映像信号をディジタル画像データに変換するA/D
変換手段(61),A/D変換された1画面分のディジタ
ル画像データを記憶する画像メモリ(62),上記1画面
分の画像データにウインドウを設定してそのウインドウ
内の複数の画素についての画素データを抽出するウイン
ドウ手段(70〜76,78),上記ウインドウ内の画像デー
タの傾きに関するデータを生成する手段(91〜98),上
記傾きに関するデータと複数のエッジ・パターンとの合
致度をそれぞれ演算する手段(101 〜109 ,111 〜118
),上記合致度から画質の評価値を演算する手段(8
5,86,87),および上記画質の評価値の演算を1画面
分のすべての画素について行なうように制御し,各画素
の画像データによって表わされる明るさごとに上記評価
値の平均値を算出する手段(65,80,82,83,84),か
ら構成される請求項1に記載の装置。
5. The image quality histogram generation circuit means includes:
A / D for converting the video signal into digital image data
A conversion means (61), an image memory (62) for storing A / D-converted digital image data for one screen, a window is set for the image data for one screen, and a plurality of pixels in the window are set. Window means (70 to 76, 78) for extracting pixel data, means (91 to 98) for generating data relating to the inclination of the image data in the window, and a degree of matching between the inclination data and a plurality of edge patterns. Means for calculating (101 to 109, 111 to 118)
), Means for calculating the evaluation value of image quality from the degree of matching (8
5, 86, 87), and control the calculation of the image quality evaluation value to be performed for all pixels of one screen, and calculate the average value of the evaluation values for each brightness represented by the image data of each pixel. Device according to claim 1, comprising means (65, 80, 82, 83, 84) for
【請求項6】 対象物を照明する照明装置(11),上記
照明装置を位置調整可能に支持する支持装置(30,31,
38),および上記照明装置による照明下で対象物を撮像
し,対象物の画像を表わす映像信号を出力する撮像装置
(20)を備えた画像処理システムにおいて,上記撮像装
置から出力される映像信号に基づいて,明るさに対する
画質の良否の程度を表わす画質ヒストグラムを生成し,
生成された画質ヒストグラムに基づいて照明の評価値を
算出し,算出された今回の評価値を上記照明装置の位置
変更前の前回の評価値と比較し,この比較結果を出力す
る,画像システムにおける照明条件設定支援方法。
6. A lighting device (11) for illuminating an object, and a supporting device (30, 31, for supporting the lighting device in a positionally adjustable manner).
38), and an image processing system including an image pickup device (20) for picking up an image of an object under illumination by the illumination device and outputting an image signal representing the image of the object, the image signal output from the image pickup device. Based on, generate an image quality histogram showing the quality of image quality with respect to brightness,
In the image system, an evaluation value of illumination is calculated based on the generated image quality histogram, the calculated evaluation value this time is compared with the previous evaluation value before the position change of the lighting device, and the comparison result is output. Lighting condition setting support method.
【請求項7】 対象物を撮像し,撮像画像を表わす映像
信号を出力する撮像装置(20),上記撮像装置から出力
される上記映像信号をディジタル画像データに変換する
A/D変換手段(61),A/D変換された1画面分のデ
ィジタル画像データを記憶する画像メモリ(62),上記
1画面分の画像データにウインドウを設定してそのウイ
ンドウ内の複数の画素についての画素データを抽出する
ウインドウ手段(70〜76,78),上記ウインドウ内の画
像データの傾きに関するデータを生成する手段(91〜9
8),上記傾きに関するデータと複数のエッジ・パター
ンとの合致度をそれぞれ演算する手段(101 〜109 ,11
1 〜118 ),上記合致度からエッジらしさの評価値を演
算する手段(85),および上記エッジらしさの評価値の
演算を1画面分のすべての画素について行なうように制
御する手段(65,80),を備えたエッジ画像生成装置。
7. An image pickup device (20) for picking up an image of an object and outputting a video signal representing a picked-up image, and an A / D conversion means (61) for converting the video signal output from the image pickup device into digital image data. ), An image memory (62) for storing A / D-converted digital image data for one screen, a window is set for the image data for one screen, and pixel data for a plurality of pixels in the window are extracted. Window means (70 to 76, 78) for generating, data generating means (91 to 9) relating to the inclination of the image data in the window
8) Means (101 to 109, 11) for calculating the degree of coincidence between the data relating to the inclination and a plurality of edge patterns, respectively.
1 to 118), means for calculating an edge-likeness evaluation value from the matching degree (85), and means for controlling the edge-likeness evaluation value to be calculated for all pixels of one screen (65, 80). ), And an edge image generating device.
【請求項8】 上記エッジらしさの評価値を記憶するエ
ッジ画像メモリ(88)をさらに備えた請求項7に記載の
装置。
8. The apparatus according to claim 7, further comprising an edge image memory (88) for storing the edge-likeness evaluation value.
【請求項9】 上記エッジらしさの評価値を所定のしき
い値でレベル弁別して2値化する手段をさらに備えた請
求項7に記載の装置。
9. The apparatus according to claim 7, further comprising means for level-discriminating the edge-likeness evaluation value by a predetermined threshold value and binarizing it.
【請求項10】 対象物を撮像装置(20)により撮像
し,これにより得られる撮像画像を表わす映像信号に基
づいて撮像画像のエッジ画像を表わすデータを生成する
方法であり,1画面分の映像信号をディジタル画像デー
タにA/D変換し,上記1画面分の画像データにウイン
ドウを設定してそのウインドウ内の複数の画素について
の画素データを抽出し,上記ウインドウ内の画像データ
の傾きに関するデータを生成し,上記傾きに関するデー
タと複数のエッジ・パターンとの合致度をそれぞれ演算
し,上記合致度からエッジらしさの評価値を演算し,上
記エッジらしさの評価値の演算を1画面分のすべての画
素について行ない,上記評価値からなるエッジ画像デー
タを得る,エッジ画像生成方法。
10. A method for imaging an object by an imaging device (20) and generating data representing an edge image of the captured image based on a video signal representing the captured image obtained by the imaging device (20). The signal is A / D converted into digital image data, a window is set for the image data for one screen, pixel data for a plurality of pixels in the window is extracted, and data regarding the inclination of the image data in the window is extracted. To calculate the degree of coincidence between the data relating to the inclination and a plurality of edge patterns, calculate the edge-likeness evaluation value from the degree of coincidence, and perform the calculation of the edge-likeness evaluation value for one screen. An edge image generation method in which the edge image data consisting of the above evaluation values is obtained for each pixel.
【請求項11】 良品および不良品の複数のサンプルを
所定の観測位置へ順次供給するサンプル供給装置(120
,121 ),上記観測位置のサンプルを照明する照明条
件可変な照明装置(10),上記供給装置によって上記観
測位置にもたらされた良品および不良品の各サンプルを
上記照明装置による照明下で撮像し,撮像したサンプル
を表わす映像信号を出力する撮像装置(20),上記撮像
装置から出力される映像信号に基づいて各サンプルの特
徴量を計測する特徴量計測手段(130 ),上記特徴量計
測手段により計測された特徴量に基づいて良品と不良品
の判別精度に関する評価値を算出する手段(130 ),な
らびに上記照明装置の照明条件を変えながら求められた
照明条件ごとの評価値に基づいて,評価値が最良となる
照明条件を検索する手段(130 ),を備えた照明条件設
定支援装置。
11. A sample supply device (120) for sequentially supplying a plurality of samples of good products and defective products to a predetermined observation position.
, 121), an illumination device (10) with variable illumination conditions for illuminating the sample at the observation position, and images of non-defective and defective samples brought to the observation position by the supply device under illumination by the illumination device. Then, an image pickup device (20) for outputting a video signal representing the sampled image, a feature amount measuring means (130) for measuring the feature amount of each sample based on the video signal output from the image pickup device, and the feature amount measurement. Based on the evaluation value for each lighting condition obtained by changing the lighting condition of the lighting device (130), which calculates an evaluation value related to the accuracy of discrimination between the non-defective product and the defective product based on the characteristic amount measured by the means. A lighting condition setting support device comprising means (130) for searching for a lighting condition having the best evaluation value.
【請求項12】 上記観測位置に供給されるサンプルの
有無と,良品か不良品かの区別とを検出する検出装置
(123 , 123a, 123b, 123c)をさらに備えてい
る,請求項11に記載の装置。
12. The detection device (123, 123a, 123b, 123c) for detecting the presence / absence of a sample supplied to the observation position and the distinction between a non-defective product and a defective product, according to claim 11. Equipment.
【請求項13】 上記サンプル供給装置が,各サンプル
を載置する回転テーブル(120 )と,この回転テーブル
(120 )を回転駆動する駆動装置(121 )とから構成さ
れている,請求項11に記載の装置。
13. The sample supply device comprises a rotary table (120) on which each sample is placed, and a drive device (121) for rotationally driving the rotary table (120). The described device.
【請求項14】 所定の観測位置を照明する照明条件可
変な照明装置(10)を配置し,良品および不良品の複数
のサンプルを上記観測位置へ順次供給し,上記観測位置
に供給された良品および不良品の各サンプルを上記照明
装置による照明下で撮像し,撮像により得られる映像信
号に基づいて各サンプルの特徴量を計測し,計測された
特徴量に基づいて良品と不良品の判別精度に関する評価
値を算出し,上記照明装置の照明条件を変えながら,照
明条件ごとの評価値を求め,評価値が最良となる照明条
件を検索する,照明条件設定支援方法。
14. An illumination device (10) for illuminating a predetermined observation position and having variable illumination conditions is arranged, and a plurality of samples of non-defective products and defective products are sequentially supplied to the observation position, and the non-defective product supplied to the observation position. And each defective sample is imaged under the illumination of the above illumination device, the characteristic amount of each sample is measured based on the video signal obtained by the imaging, and the accuracy of discrimination between the non-defective product and the defective product is based on the measured characteristic amount. A lighting condition setting support method for calculating an evaluation value for each lighting condition while changing the lighting condition of the lighting device and searching for a lighting condition having the best evaluation value.
【請求項15】 複数のサンプルを所定の観測位置へ順
次供給するサンプル供給装置(120 ,121 ),上記観測
位置のサンプルを照明する照明条件可変な照明装置(1
0),上記供給装置によって上記観測位置にもたらされ
た各サンプルを上記照明装置による照明下で撮像し,撮
像したサンプルを表わす映像信号を出力する撮像装置
(20),上記撮像装置から出力される映像信号に基づい
て各サンプルの特徴量を計測する特徴量計測手段(130
),上記特徴量計測手段により計測された特徴量の分
散を算出する手段(130 ),および上記照明装置の照明
条件を変えながら求められた照明条件ごとの分散に基づ
いて,分散が最小となる照明条件を検索する手段(130
),を備えた照明条件設定支援装置。
15. A sample supply device (120, 121) for sequentially supplying a plurality of samples to a predetermined observation position, and an illuminating device (1) having variable illumination conditions for illuminating the sample at the observation position.
0), an image pickup device (20) for picking up an image of each sample brought to the observation position by the supply device under illumination of the lighting device, and outputting a video signal representing the sampled image, output from the image pickup device Feature amount measuring means (130) for measuring the feature amount of each sample based on the video signal
), A means (130) for calculating the variance of the feature quantity measured by the feature quantity measuring means, and the variance is minimized based on the variance for each illumination condition obtained while changing the illumination condition of the illumination device. Means for searching lighting conditions (130
), A lighting condition setting support device.
【請求項16】 上記観測位置に供給されるサンプルを
検出する検出装置(123 )をさらに備えている,請求項
15に記載の装置。
16. The detection device (123) for detecting a sample supplied to the observation position, further comprising:
The device according to 15.
【請求項17】 上記サンプル供給装置が,各サンプル
を載置する回転テーブル(120 )と,この回転テーブル
(120 )を回転駆動する駆動装置(121 )とから構成さ
れている,請求項15に記載の装置。
17. The sample supply device comprises a rotary table (120) on which each sample is placed, and a drive device (121) for rotationally driving the rotary table (120). The described device.
【請求項18】 所定の観測位置を照明する照明条件可
変な照明装置(10)を配置し,複数のサンプルを上記観
測位置へ順次供給し,上記観測位置に供給された各サン
プルを上記照明装置による照明下で撮像し,撮像により
得られる映像信号に基づいて各サンプルの特徴量を計測
し,計測された全サンプルの特徴量の分散を算出し,上
記照明装置の照明条件を変えながら,照明条件ごとの分
散を求め,分散が最小となる照明条件を検索する,照明
条件設定支援方法。
18. An illuminating device (10) having variable illumination conditions for illuminating a predetermined observation position is arranged, a plurality of samples are sequentially supplied to the observation position, and each sample supplied to the observation position is supplied to the illuminating device. Image under the illumination by, the feature amount of each sample is measured based on the image signal obtained by the image pickup, the variance of the feature amount of all the measured samples is calculated, and the illumination condition of the illumination device is changed while the illumination is performed. A lighting condition setting support method that calculates the variance for each condition and searches for the lighting condition with the minimum variance.
【請求項19】 レンズと必要な接写リングが着脱自在
なカメラによる撮影条件を決定するために,カメラの視
野情報と,撮影対象に対するカメラの設置距離情報と,
レンズの情報と,接写リングの情報のうちの少なくとも
2つの情報を入力するための入力装置,上記入力装置か
ら入力された少なくとも2つの情報を用いて残りの情報
を算出する演算装置,および上記演算装置による演算結
果によって表わされる上記残りの情報を表示する表示装
置,を備えた撮影条件決定支援装置。
19. A camera field-of-view information and camera installation distance information with respect to an object to be photographed in order to determine a photographing condition of a camera in which a lens and a necessary close-up ring are detachable.
An input device for inputting at least two pieces of information of the lens information and the close-up ring information, an arithmetic device for calculating the remaining information using at least two pieces of information input from the input device, and the above arithmetic operation An imaging condition determination assisting device, comprising: a display device for displaying the above remaining information represented by a calculation result by the device.
JP32921394A 1991-07-12 1994-12-05 Lighting condition setting support apparatus and method Expired - Fee Related JP3235387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32921394A JP3235387B2 (en) 1991-07-12 1994-12-05 Lighting condition setting support apparatus and method

Applications Claiming Priority (9)

Application Number Priority Date Filing Date Title
JP19869491 1991-07-12
JP30704691 1991-10-25
JP16699792 1992-06-01
JP4-171613 1992-06-04
JP3-198694 1992-06-04
JP3-307046 1992-06-04
JP17161392 1992-06-04
JP4-166997 1992-06-04
JP32921394A JP3235387B2 (en) 1991-07-12 1994-12-05 Lighting condition setting support apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP5501237A Division JPH07113968B1 (en) 1991-07-12 1992-07-13

Publications (2)

Publication Number Publication Date
JPH07220058A true JPH07220058A (en) 1995-08-18
JP3235387B2 JP3235387B2 (en) 2001-12-04

Family

ID=27528411

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32921394A Expired - Fee Related JP3235387B2 (en) 1991-07-12 1994-12-05 Lighting condition setting support apparatus and method

Country Status (1)

Country Link
JP (1) JP3235387B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09304034A (en) * 1996-05-15 1997-11-28 Mitsutoyo Corp Lighting control system
JPH1062134A (en) * 1996-08-22 1998-03-06 Matsushita Electric Ind Co Ltd Illumination adjustment method for recognition inspection
JP2000047296A (en) * 1998-07-31 2000-02-18 Matsushita Electric Ind Co Ltd Picture recognizing device and its method
JPWO2006082639A1 (en) * 2005-02-03 2008-06-26 富士通株式会社 Mark image processing method, program, and apparatus
JP2017046021A (en) * 2015-08-24 2017-03-02 株式会社Jvcケンウッド Underwater photography device, underwater photography device control method, and underwater photography device control program
JP2017156161A (en) * 2016-02-29 2017-09-07 富士通株式会社 Illumination condition setting device, illumination condition setting method, and computer for illumination condition setting
JP2019158602A (en) * 2018-03-13 2019-09-19 オムロン株式会社 Visual inspection device, visual inspection method, and program
JP2020027435A (en) * 2018-08-10 2020-02-20 株式会社デンソーウェーブ Simulating device and computer program
WO2020137488A1 (en) * 2018-12-26 2020-07-02 オムロン株式会社 Image inspection system design device, image inspection system design method, and image inspection system design program
JP2021071310A (en) * 2019-10-29 2021-05-06 オムロン株式会社 Image processing system, setting method and program
JP2021127991A (en) * 2020-02-10 2021-09-02 オムロン株式会社 Image inspection device, image inspection program, and lighting setting device
WO2023162142A1 (en) * 2022-02-25 2023-08-31 株式会社Fuji Image confirmation device and image confirmation method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011027848A1 (en) * 2009-09-03 2011-03-10 シーシーエス株式会社 Illumination/image-pickup system for surface inspection and data structure

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6228882A (en) * 1985-07-31 1987-02-06 Fujitsu Ltd Method for correcting angular deviation of image
JPS62194589A (en) * 1986-02-21 1987-08-27 Fujitsu Ltd Image input device control system
JPH01168169A (en) * 1987-12-23 1989-07-03 Fuji Electric Co Ltd Aid device for deciding lighting system
JPH0269080A (en) * 1988-09-03 1990-03-08 Fuji Electric Co Ltd Device for supporting lighting technology
JPH0322181A (en) * 1989-06-20 1991-01-30 Fujitsu Ltd Contour extracting method with variable threshold value

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6228882A (en) * 1985-07-31 1987-02-06 Fujitsu Ltd Method for correcting angular deviation of image
JPS62194589A (en) * 1986-02-21 1987-08-27 Fujitsu Ltd Image input device control system
JPH01168169A (en) * 1987-12-23 1989-07-03 Fuji Electric Co Ltd Aid device for deciding lighting system
JPH0269080A (en) * 1988-09-03 1990-03-08 Fuji Electric Co Ltd Device for supporting lighting technology
JPH0322181A (en) * 1989-06-20 1991-01-30 Fujitsu Ltd Contour extracting method with variable threshold value

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09304034A (en) * 1996-05-15 1997-11-28 Mitsutoyo Corp Lighting control system
JPH1062134A (en) * 1996-08-22 1998-03-06 Matsushita Electric Ind Co Ltd Illumination adjustment method for recognition inspection
JP2000047296A (en) * 1998-07-31 2000-02-18 Matsushita Electric Ind Co Ltd Picture recognizing device and its method
JPWO2006082639A1 (en) * 2005-02-03 2008-06-26 富士通株式会社 Mark image processing method, program, and apparatus
JP4618691B2 (en) * 2005-02-03 2011-01-26 富士通株式会社 Mark image processing method, program, and apparatus
US10594947B2 (en) 2015-08-24 2020-03-17 JVC Kenwood Corporation Underwater imaging apparatus, method for controlling an underwater imaging apparatus, and program for controlling an underwater imaging apparatus
JP2017046021A (en) * 2015-08-24 2017-03-02 株式会社Jvcケンウッド Underwater photography device, underwater photography device control method, and underwater photography device control program
WO2017033498A1 (en) * 2015-08-24 2017-03-02 株式会社Jvcケンウッド Underwater photographing device, control method for underwater photographing device, and control program for underwater photographing device
JP2017156161A (en) * 2016-02-29 2017-09-07 富士通株式会社 Illumination condition setting device, illumination condition setting method, and computer for illumination condition setting
JP2019158602A (en) * 2018-03-13 2019-09-19 オムロン株式会社 Visual inspection device, visual inspection method, and program
JP2020027435A (en) * 2018-08-10 2020-02-20 株式会社デンソーウェーブ Simulating device and computer program
WO2020137488A1 (en) * 2018-12-26 2020-07-02 オムロン株式会社 Image inspection system design device, image inspection system design method, and image inspection system design program
JP2020106936A (en) * 2018-12-26 2020-07-09 オムロン株式会社 Image inspection system design device, image inspection system design method, and image inspection system design program
CN112655017A (en) * 2018-12-26 2021-04-13 欧姆龙株式会社 Image inspection system design device, image inspection system design method, and image inspection system design program
JP2021071310A (en) * 2019-10-29 2021-05-06 オムロン株式会社 Image processing system, setting method and program
WO2021084773A1 (en) * 2019-10-29 2021-05-06 オムロン株式会社 Image processing system, setting method, and program
DE112020005230T5 (en) 2019-10-29 2022-08-25 OMRON Corporation Image processing system, adjustment method and program
JP2021127991A (en) * 2020-02-10 2021-09-02 オムロン株式会社 Image inspection device, image inspection program, and lighting setting device
WO2023162142A1 (en) * 2022-02-25 2023-08-31 株式会社Fuji Image confirmation device and image confirmation method

Also Published As

Publication number Publication date
JP3235387B2 (en) 2001-12-04

Similar Documents

Publication Publication Date Title
EP0706027B1 (en) Visual inspection apparatus for printed circuit boards and use thereof for solder control and correction
KR100777547B1 (en) Defect inspection method and defect inspection apparatus using the same
JP5239314B2 (en) Object recognition method and board visual inspection apparatus using this method
JPH0599861A (en) Method and device for inspecting transparent vessel
US7149341B2 (en) Wafer inspection apparatus
US5963328A (en) Surface inspecting apparatus
KR101102627B1 (en) Systems and methods for identifying foreign objects and debrisfod and defects during fabrication of a composite structure
JP3235387B2 (en) Lighting condition setting support apparatus and method
JP6889572B2 (en) Visual inspection equipment and lighting equipment for visual inspection
JP4655644B2 (en) Periodic pattern unevenness inspection system
KR970003328B1 (en) Apparatus and method for determining or setting adequate illuminating and photographing condition
JPH06160066A (en) Apparatus for visual inspection
JP2020016471A (en) Image inspection device
JP2006313147A (en) Defect inspection method, and defect inspection device using same
KR101153246B1 (en) Substrate inspection method
JPH0436644A (en) Inspecting method for defect in internal wall surface of cylinder
JPH11118730A (en) Method and apparatus for inspecting defect on surface to be inspected
JP7080123B2 (en) Image inspection equipment
JPH0783638A (en) Detecting apparatus for gate position of lens
JP3534817B2 (en) Automatic lighting setting method and device
JPH05322543A (en) Surface defect inspection device
JP3559391B2 (en) Optical member inspection device
JP2005257389A (en) Inspection recording device for die and inspection recording method of die
JPH0545143A (en) Surface state inspection device
JP2001256478A (en) Method and device for inspecting foreign matter and recording medium for recording its program

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080928

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees