明 細 書
■ 画像処理 シ ス テ ム に お い て, 好適 な 照明 条件, 撮影条件等を決定 も し く は設定す る た め の, ま た は決定 も し く は設定を支援す る た め の装置 お よ び方法 技術分野
こ の 発明 は, 照明装置 に よ る 照明下で撮像装置を用 い て 対 象 物 を 撮 像 し , こ の 撮像 に よ り 得 ら れ る 画 像 デ ー タ を処理す る 画像処理 シ ス テ ム に お い て, 目 的 に 適合 し た対象物の 照明 を行な い, 目 的 に適合 し た撮像 を行な う た め に, 適切 な も し く は最適な 照明装置の 種 類お よ び照明方法の選択な い し は決定, 照明装置 の設 置位置, 設置角 度, 光度等の 決定な い し は設定, な ら び に 撮像装置を構成す る カ メ ラ , レ ン ズ, 接写 リ ン グ の選択な い し は決定を行な う た め の, ま た は選択, 決 定 も し く は設定を支援す る た め の装置お よ び方法 に 関 す る 。 背景技術
工業製品な どの 目 視検査を 自 動化す る た め に, 自 動 検査装置が普及 し , こ の 自 動検査装置 に は 画像処理 シ ス テ ム が導入 さ れて い る 。 自 動検査装置 に よ っ て高精
度の検査を実現す る た め に は, 検査 目 的 に適 し た最適 な 画像 を 得 る 必要 が あ る 。 最適 な 画 像 を 得 る た め に は, 最適な 照明条件, 撮像条件等を設定す る こ と が重 要で の 。 。
一例 を挙げて具体的 に説明す る と , 外観検査装置や 位置決め装置で は, 照 明装置 に よ る 照明下で テ レ ビ · カ メ ラ に よ り 認識対象物が撮像 さ れ る 。 得 ら れ た 画像 デ ー タ は 画像処理装 置 に 取 り 込 ま れ 2 値化処理 さ れ る 。 2 値画像デー タ に基づい て対象物の面積や重心位 置な どの特徴量が計測 さ れ, 対象物の良否判別や位置 決め が行な わ れ る 。
特徴量を 高精度で計測す る た め に は, 良好な 2 値画 像デ ー タ を得 る 必要があ り , そ の た め に観測系の 照明 を最適状態に設定す る 必要があ る 。 こ こ で良好な 2 値 画像 と は, 2 値画像 に お け る 対象物の エ ッ ジが滑 ら か に 連続 し , し か も 孤立 ノ イ ズ (小 さ な 白 点 ま た は 黒 点) が少な い 画像を意味す る 。
し た力《 つ て そ の よ う な 2 値画像が得 ら れ た と き に, 観測系の 照明 は最適状態 に設定 さ れて い る も の と 判断 さ れ る 。 多少の 外乱光が加わ っ て ^-, 得 ら れ る 2 値画 像が変化 し な い こ と も 最適な 照明 の必要条件で あ る 。
照明装置の種類や照明方法 は, 検査な どの 目 的 に応 じ て選択 さ れ る 。 従来 は照明装置や照明方法の選択指 針が明確に整理 さ れて い な 力、 つ た た め に, ど の よ う な
照明装置や照明方法を採用 す る か に つ い て κよ 5¾ T s曰 的 に選択 さ れて い た。
た と え, 照明装置や照明方法が適切 に選択 さ れた と し て も , 照明装置を最適な 設置位置や設置角度 に設定 す る の は容易で な い。 従来 は モ ニ タ に 映 し 出 さ れ た画 像を見 な が ら 照明装置 の 位置や角 度を調整す る 作業が 行な わ れて い た。
し か し な 力 ら こ の よ う な 従来の方法 に よ る と , 照明 装置の 位置や 角 度を決定す る の に熟練を要 し , 経験の 浅 い 作業者 に は 最適状態 に 調整 す る の が困難 で あ つ た。 ま た作業者 に よ っ て照明装置の位置, 角 度 に ば ら つ き が生 じ や す く , 照明装置が常 に最良の 位置, 角 度 に設置 さ れ る と は 限 ら ず, 調整の 都度, 認識精度が変 化す る と い う 問題があ る 。
照明条件 に は照明装置の位置, 角度の み な ら ずそ の 光度 も 重要な ブ ァ ク タ と し て含ま れ る 。
照 明 条件 が 適切 か ど う か の 判 断 は , よ り 現実的 に は, 得 ら れた画像を評価す る こ と に よ り 行な う こ と が 好 ま し い。 た と え ば良品検査の た め の 最適な 照明 の 条 件 は, 良品 と 不良品 と を確実 に判别可能な こ と , す な わ ち 判 別精度 が高 く な る 照 明 条件 が最適 な も の で あ る
ま た計測の た め の最適 な照明の条件 は, 計測値の ば ら つ き が小 さ く な る よ う な照明, す な わ ち 計測精度が
高 く な る 照明条件が最適な も の と い え る 。
し か し な 力く ら 上述 し た従来の調整方法 に よ る と , 良 品 と 不良品 と が確実 に判別可能な照明条件や計測値の ば ら つ き が小 さ く な る よ う な照明条件が常に得 ら れ る と い う 保証 は な い。
適切な 撮影条件な い し は撮影環境の設定 も 重要な事 項で あ る 。 た と え ば, 検査 シ ス テ ム構成上好都合な 位 置 に カ メ ラ を設置 し , かつ検査 目 的 に適 し た視野を確 保で き る よ う に す る た め に最適な レ ン ズを選択す る 必 要があ る 。 ま た, 所望の設置距離 と 視野を実現す る た め に接写 リ ン グ の 使用 が必要 と な る 場合 も あ る 。 現在 あ る レ ン ズを使用 す る と い う 制約の下で, 希望の視野 を実現す る た め に は どの よ う に し て設置距離や接写 リ ン グを適切 に 設定すればよ い か と い う 問題の解決が要 求 さ れ る こ と も あ る 。 発明の 開示
こ の発明 は, 熟練を要す る こ と な く , 照明装置お よ び照 明 方 法 の 決定 な い し は 選択 , 照 明装置 の 設置位 置, 設 置 角 度, 光 度等 の 照 明 条件 の 決定 な い し は 設 定, レ ン ズ, 接写 リ ン グ, カ メ ラ の種類お よ び カ メ ラ の設定距離を含む撮像条件の決定な い し は選択を 自 動 的 ま た は半 自 動的 に行な え る よ う にす る こ と を 目 的 と す る 。
こ の 発 明 は ま た , 対象 物 を 実 際 に 撮 像 す る こ と に よ っ て得 ら れ る 画像デ ー タ に基づ い て照明条件, 撮像 条件の 評価 と 最適化を 図 る よ う にす る こ と を 目 的 と す よ り 具体的 に い え ば, 良品検査で あ れば, 良品 と 不 良品 と を い か に 確実 に判別で き る か, 計測で あ れば, い か に ば ら つ き の少な い計測値が得 ら れ る か と い う 観 点か ら 照明条件を設定す る こ と がで き る よ う に す る も の で あ る 。
こ の 発明 は照明装置 の適切 な設定位置を導 き 出す照 明条件決定支援装置お よ び方法を提供 し て い る 。
こ の 発明 に よ る 照明条件決定支援装置 は, 対象物の 形状的特徴 に 関す る 情報を入力す る た め の 入力装置, 照明装置 の特性 に 関す る 情報を記憶す る 記憶装置, 上 記入力装置か ら 入力 さ れた対象物の形状的特徴 と , 指 定 さ れた照明装置 に つ い て上記記憶装置 に記憶 さ れて い る 特性 と に基づ い て, 対象物の好適な 撮影の た め の 要求を満 たす上記照明装置 の設定位置を導 き 出す演算 装置, お よ び上記演算装置 に よ っ て導 出 さ れた設定位 置を 出力す る 出力装置を備え て い る 。
こ の 発明 に よ る 照明条件決定支援方法 は, 対象物を 照明す る 照明装置 と , こ の 照明装置に よ る 照明下で対 象物を撮影 し , 撮影 し た対象物を表わす映像信号を 出 力す る 撮像装置 と , こ の 撮像装置か ら 出力 さ れ る 映像
信号を用 い て対象物 に関す る 画像処理を実行す る 処理 装置 と を備え た画像処理 シ ス テ ム に お い て, 対象物の 形状的特徴に 関す る 情報を取込み, こ の取込ん だ対象 物の形状的特徴 に 関す る 情報 と , 指定 さ れ た照明装置 に つ い て あ ら か じ め 設定 さ れ て い る 特性 と に 基 づ い て, 対象物の好適な撮影の た め の要求を満たす上記照 明装置の設定位置を導 き 出 し, 導 き 出 さ れ た設定位置 を 出力す る も の で あ る 。
こ の 発明 に よ る と , 上述の よ う に必要な 情報 を入力 す る だ け で照明装置の 適切 な設定位置が出力 さ れ る 。 し たが っ て, 熟練を要す る こ と な く 照明装置を適切な 位置 に設定で き る 。
照明装置の位置決め は ユ ー ザが行な っ て も よ い し , 照明装置の 位置調整装置を利用 し て 自 動的 に行 な う こ と も で き る 。
こ の発明 は照明装置の適切 な設定角度を導 き 出す照 明条件決定支援装置お よ び方法を提供 し て い る 。
こ の 発明 に よ る 照明条件決定支援装置 は, 対象物の 形状的特徴 に 関す る 情報を入力す る た め の 入力装置, 上記入力装置か ら 入力 さ れた対象物の形状的特徴 に基 づい て, 対象物の好適な撮影の た め の要求を 満たす照 明装置の 設定角度を導 き 出す演算装置, お よ び上記演 算装置 に よ っ て導出 さ れた設定角 度を 出力す る 出力装 置を備えて い る 。
こ の発明 に よ る 照明条件決定支援方法 は, 対象物を 照明す る 照明装置 と , こ の 照明装置 に よ る 照明下で対 象物を撮影 し , 撮影 し た対象物を表わす映像信号を 出 力す る 撮像装置 と , こ の撮像装置か ら 出 力 さ れ る 映像 信号を用 い て対象物 に 関す る 画像処理を実行す る 処理 装 ^ と を備 え た 画像処理 シ ス テ ム に お い て, 対象物の 形状的特徵 に 関す る 情報を取込み, こ の取込ん だ対象 物の形状的特徴 に 関す る 情報 に基づ い て, 対象物の好 適な撮影の た め の要求を満たす上記照明装置 の 設定角 度を導 き 出 し , 導 き 出 さ れた設定角 度を 出力す る も の で め る 。
こ の発明 に よ る と , 上述の よ う に必要な情報を入力 す る だ け で照明装置の適切な設定角 度が 出 力 さ れ る 。 し た が つ て, 熟練を要す る こ と な く 照明装置を適切な 角度 に設定で き る o
照明装置の 角 度設定 はユ ー ザが行な っ て も よ い し , 照明装置の 角 度調整装置 を利用 し て 自 動的 に行な う こ と も で る
こ の 発明 は適切 な 照明装置の種類お よ び照明方法を 導 き 出す照明条件決定支援装置 お よ-び方法を提供 し て い る 。
こ の 発明 に よ る 照明条件決定支援装置 は, 照明 目 的 お よ び対象物の 着 目 部 と 背景部 と の光学的性質の差異 に 関す る 情報 に対応 し て, 適切 な 照明装置の種類お よ
び照明方法を あ ら か じ め記憶 し た記憶装置, 照明 目 的 お よ び対象物の着 目 部 と 背景部 と の 光学的性質の差異 に 関す る 情報を入力す る 入力装置, 上記入力装置か ら 入力 さ れた情報 に し たが っ て上記記憶装置 に記憶 さ れ て い る 適切 な照明装置の 種類お よ び照明方法を導 き 出 す処理装置, な ら び に上記処理装置 に よ っ て導 き 出 さ れた適切な照明装置の 種類お よ び照明方法を表示す る 表示装置を備え て い る 。
こ の 発明 に よ る 照明条件決定支援方法 は, 照明 目 的 お よ び対象物の着 目 部 と 背景部 と の光学的性質の差異 に 関す る 情報を取込み, 取込ん だ上記情報 に適合 し た 照明装置の種類お よ び照明方法を あ ら か じ め設定 さ れ た も の の 中か ら 選択 し , 選択 さ れ た照明装置お よ び照 明方法を視認可能な形態で 出力す る も の で あ る 。
こ の 発明 に よ る と , 検査 目 的, 着 目部 と 背景部 と の 光学的性質 と の差異, お よ び必要な ら ば視野の大 き さ を入力す る こ と に よ り , 適切な 照明装置の 種類お よ び 照明方法が導 き 出 さ れ る の で, 専門的経験や知識を要 す る こ と な く 適切 な 照 明 装 置 お よ び方法 を選択 で き る 。 ま た専門家の場合に は照明装置お よ び方法の 決定 に要す る 時間を短縮で き る 。
こ の 発明 は, 対象物を実際 に撮像 し て得 ら れ る 実画 像デー タ に基づい て照明条件を評価 し かつ最適化す る た め の , ま た は そ れを支援す る 装置お よ び方法を提供
し て い る 。 と く に こ の 発明 で は照明装置の 位置が調整 れ る 。
こ の発明 に よ る 照明条件設定支援装置 は, 対象物を 照明す る 照明装置, 上記照明装置を位置調整可能 に支 持す る 支持装置, 上記照明装置 に よ る 照明下で対象物 を撮像 し , 対象物の 画像を 表わす映像信号を 出 力す る 撮像装置, 上記撮像装置か ら 出力 さ れ る 映像信号 に基 づ い て, 明 る さ に 対す る 画質の良否の程度 を表わ す画 質 ヒ ス ト グ ラ ム を生成す る 画質 ヒ ス ト グ ラ ム生成回路 手段, 上記画質 ヒ ス ト グ ラ ム 生成回路手段 に よ っ て生 成 さ れ た画質 ヒ ス ト グ ラ ム に基づ い て照明 の評価値を 算出す る 評価値算出回路手段, 上記評価値算出 回路手 段 に よ っ て算出 さ れ た 今回の評価値を上記照明装置 の 位置変更前の 前回 の評価値 と 比較す る 比較回路手段, お よ び上記比較回路手段 に よ る 比較結果を 出力す る 出 力手段を備 え て い る 。
第 1 の 実施態様 に お い て は, 上記出力手段が上記比 較回路手段 に よ る 比較結果に応 じ て上記照明装置の 位 置調整方 向 を指示す る 表示装置で あ る 。
第 2 の 実施態様 に お い て は, 上記支持装置が上記照 明装置の 位置を変更 さ せ る 駆動装置を含む .。 上記 出力 手段は上記比較回路手段 に よ る 比較結果 に 応 じ て上記 照明装置の位置調整方向 を指示す る 表示装置で あ る 。 そ し て, 上記駆動装置を駆動す る た め の 指令を入力す
る 入力装置 と , こ の入力装置を通 し て入力 さ れた指令 に応答 し て上記駆動装置を制御す る 制御装置 と が さ ら に設 け ら れ る 。
第 3 の 実施態様 に お い て は, 上記支持装置が上記照 明装置の 位置を変更 さ せ る 駆動装置を含む。 そ し て, 上記比較回路手段 に よ る 比較結果 に応 じ て上記駆動装 置を制御 し, 上記照明装置の位置を最適位置 に調整す る 制御手段が さ ら に設 け ら れ る 。
こ の発明 に よ る 照明条件設定支援方法 は, 対象物を 照明す る 照明装置, 上記照明装置を位置調整可能 に支 持す る 支持装置, お よ び上記照明装置 に よ る 照明下で 対象物を撮像 し , 対象物の 画像を表わす映像信号を 出 力す る 撮像装置を備え た 画像処理 シ ス テ ム に お い て, 上記撮像装置か ら 出力 さ れ る 映像信号 に基づ い て, 明 る さ に対す る 画質の良否の程度を表わす画質 ヒ ス ト グ ラ ム を生成 し , 生成 さ れた画質 ヒ ス ト グ ラ ム に基づ い て照明の評価値を算出 し , 算出 さ れた今回 の評価値を 上記照明装置の 位置変更前の前回の評価値 と 比較 し, こ の比較結果を 出力す る も の で あ る 。
こ の 発明 に よ る と , 対象物を実際 に撮像 し て得 ら れ る 画像デー タ に基づい て良好な 画像が得 ら れ る よ う に 照明条件を最適化 し て い る の で, 熟練を要 さ ず, 作業 者が異な っ て も 常 に 同 じ よ う に良好な画像が得 ら れ る こ と に な る 。
第 1 の 実施態様で は作業員が表示 さ れた指示を見な が ら 手動で, 第 2 の実施態様で は半 自 動的 に, 照明装 置の高 さ の調整が行な わ れ る 。
第 3 の実施態様で は照明装置 の高 さ 設定が完全 に 自 動化 さ れて い る か ら , 照明装置の 位置設定が一層容易 で あ り , 作業の 効率化 と 合理化 と を実現で き る 。
上述 し た画質 ヒ ス ト グ ラ ム生成回路手段の主要部 は エ ツ ジ 画像生成装置 と し て利用 で き る 。
こ の 発明 は画質 ヒ ス ト グ ラ ム生成回路手段を利用 し た エ ツ ジ 画像生成装置を提供 し て い る 。
こ の発明 に よ る エ ッ ジ 画像生成装置 は, 対象物を撮 像 し , 撮 像 画 像 を 表 わ す 映像信号 を 出 力 す る 撮像装 置, 上記撮像装置か ら 出力 さ れ る 上記映像信号を デ ィ ジ タ ル画像デー タ に変換す る A Z D 変換手段, A Z D 変換 さ れた 1 画面分の デ ィ ジ タ ル画像デー タ を記憶す る 画像 メ モ リ , 上記 1 画面分の 画像デ ー タ に ウ ィ ン ド ゥ を設定 し て そ の ウ イ ン ド ウ 内 の複数の 画素 に つ い て の 画素デ ー タ を抽 出す る ウ ィ ン ド ウ 手段, 上記 ウ ィ ン ド ウ 内 の 画像 デ ー タ の傾 き に 関す る デ ー タ を生成す る 手段, 上記傾 き に 関 す る デ ー タ と 複数 の エ ッ ジ · パ タ ー ン と の 合致度を そ れぞれ演算す る 手段, 上記合致 度か ら エ ッ ジ ら し さ の評価値を演算す る 手段, お よ び 上記エ ツ ジ ら し さ の評価値の演算を 1 画面分の すべて の 画素 に つ い て行な う よ う に制御す る 手段を備 え て い
る o
こ の発明 に よ る と , 1 画面分の 画像デー タ に ウ ィ ン ド ウ を設定 し て そ の ウ イ ン ド ウ 内 の複数の 画素 につ い て の 画素 デ ー タ を 抽 出 し , 上記 ウ ィ ン ド ウ 内 の 画像 デー タ の 傾 き に 関す る デー タ を生成 し, 上記傾 き に 関 す る デー タ と 複数の エ ツ ジ · パ タ ー ン と の 合致度を そ れぞれ演算 し , 上記合致度か ら エ ッ ジ ら し さ の評価値 を演算 し , 上記エ ッ ジ ら し さ の評価値の演算を 1 画面 分の すべて の 画素 に つ い て行な い, 上記評価値か ら な る エ ッ ジ 画像デー タ を得 る よ う に し て い る の で, 良質 の エ ツ ジ が強調 さ れた良好な エ ツ ジ 画像を生成で き , ノ ィ ズな どの影響を 除去す る こ と が可能で あ る 。
こ の 発明 は, 照明装置 に よ る 照明下で検査ま た は認 識 (計測) 対象物の サ ン プ ルを実際 に撮像 し , こ の 撮 像 に よ り 得 ら れ る 画像デ ー タ に基づい て実際に サ ン プ ル の検査 ま た は認識 (計測) を行な い, こ の検査 ま た は認識結果を評価す る こ と に よ り 照明条件 (た と え ば 照明装置 の光度) を最適化す る 装置お よ び方法を提供 し て い る 。
ま ず, 良品 と 不良品 と を判別す る良品検査を行な う シ ス テ ム の た め の照明条件設定支援装置お よ び方法 に つ い て述べ る 。
こ の 発明 に よ る 照明条件設定支援装置 は, 良品 お よ び不良品 の複数の サ ン プルを所定の観測位置へ順次供
3
給す る サ ン プル供給装置, 上記観測位置の サ ン プルを 照 明 す る 照 明 条件可 変 な 照 明 装 置 , 上記供給装 置 に よ つ て上記観測位置 に も た ら さ れた良品 お よ び不良品 の各サ ン プルを上記照明装置 に よ る 照明下で撮像 し , 撮像 し た サ ン プ ルを表わ す映像信号を 出力す る 撮像装 置, 上記撮像装置か ら 出力 さ れ る 映像信号 に基づ い て 各サ ン プ ル の 特徴量を計測す る 特徴量計測手段, 上記 特徴量計測手段 に よ り 計測 さ れた特徴量 に基づ い て良 品 と 不良 品 の 判別精 度 に 関 す る 評 価値 を 算 出 す る 手 段, な ら び に上記照明装置 の 照明条件を変え な が ら 求 め ら れ た照明条件 ご と の評価値 に基づ い て, 評価値が 最良 と な る 照明条件を検索す る 手段を備 え て い る 。
こ の 発明 に よ る 照明条件設定支援方法 は, 所定の観 測位置 を 照明す る 照明条件可変な照明装置 を配置 し , 良品 お よ び不良品の 複数の サ ン プ ルを上記観測位置へ 順次供給 し, 上記観測位置 に供給 さ れた良品 お よ び不 良品の 各サ ン プルを上記照明装置 に よ る 照明下で撮像 し, 撮像 に よ り 得 ら れ る 映像信号 に基づ い て各サ ン プ ル の 特徴量を計測 し, 計測 さ れた特徴量 に基づ い て良 品 と 不良品の判別精度 に 関す る 評価値を算 出 し , 上記 照明装置の照明条件を変え な が ら , 照明条件 ご と の 評 価値を求め, 評価値が最良 と な る 照明条件を検索す る も の で あ る 。
こ の 発明 に よ る と , 実 際 の 良品 と 不良品 サ ン プ ル の
撮像画像か ら 照明条件の評価を行な い, 良品 と 不良品 の判別がで き る だ け確実 に行な え る 照明条件を検索 し て い る の で, 常 に判別精度の 高い良品検査が可能 と な る o
次に, 対象物の 特徴量を計測す る シ ス テ ム の た め の 照明条件設定支援装置お よ び方法 に つ い て説明す る 。
こ の発明 に よ る 照明条件設定支援装置 は, 複数の サ ン プルを所定の 観測位置へ順次供給す る サ ン プル供給 装置, 上記観測位置 の サ ン プ ルを照明す る 照明条件可 変な照明装置, 上記供給装置 に よ っ て上記観測位置 に も た ら さ れた各サ ン プルを上記照明装置 に よ る 照明下 で撮像 し , 撮像 し た サ ン プルを表わ す映像信号を 出力 す る 撮像装置, 上記撮像装置か ら 出力 さ れ る 映像信号 に基づ い て各サ ン プ ルの 特徴量を計測す る 特徵量計測 手段, 上記特徴量計測手段に よ り 計測 さ れ た特徵量の 分散を算出す る 手段, お よ び上記照明装置の 照明条件 を変え な が ら 求め ら れた照明条件 ご と の 分散 に基づ い て, 分散が最小 と な る 照明条件を検索す る 手段を備 え て い る 。
こ の 発明 に よ る 照明条件設定支援方法 は, 所定の 観 測位置を照明す る 照明条件可変な 照明装置'を配置 し , 複数の サ ン プルを上記観測位置へ順次供給 し , 上記観 測位置 に供給 さ れた各サ ン プルを上記照明装置 に よ る 照明下で撮像 し , 撮像 に よ り 得 ら れ る 映像信号 に基づ
い て各サ ン プル の 特徴量を計測 し , 計測 さ れた全サ ン プ ル の特徴量の 分散を 算 出 し , 上記照明装置の照明条 件を変え な が ら , 照明条件 ご と の 分散を求め, 分散が 最小 と な る 照明条件を検索す る も の であ る 。
こ の発明 に よ る と , 計測対象物の サ ン プルを実際 に 撮像 し , こ の撮像 に よ り 得 ら れ る 画像デ ー タ を用 い て サ ン プ ル の 特徴量を実際 に計測 し , 計測 し た特徵量の 分散が小 さ く な る 照明条件を検索 し て い る の で, 計測 値の ば ら つ き が小 さ く な り , 常 に精度の 高 い計測が可 能 と な る 。
上記サ ン プル供給装置を, 各サ ン プルを載置す る 回 転テ ー ブ ル と , こ の 回転テ ー ブ ル を 回転駆動す る 駆動 装置 と か ら 構成す る こ と に よ り , 構成の 簡素化 と 省 ス ペ ー スィ匕を 図 る こ と がで き る 。
最後 に こ の発明 は, レ ン ズ と 必要な接写 リ ン グが着 脱 自 在な カ メ ラ に よ る 適切な撮影条件を決定す る た め の 撮影条件決定支援装置を提供 し て い る 。
こ の 装置 は, カ メ ラ の 視野情報 と , 撮影対象 に対す る カ メ ラ の設置距離情報 と , レ ン ズ の情報 と , 接写 リ ン グの情報の う ち の少な く と も 2 つ の情報を入力す る た め の入力装置, 上記入力装置か ら 入力 さ れた少な ぐ と も 2 つ の 情報を用 い て残 り の情報を算出す る 演算装 置, お よ び上記演算装置 に よ る 演算結果 に よ っ て表わ さ れ る 上記残 り の情報を表示す る 表示装置 を備え て い
6
る O
こ の 発明 に よ れば, カ メ ラ の視野情報 と , 撮影対象 に対す る カ メ ラ の設置距離情報 と , レ ン ズ の情報 と , 接写 リ ン グ の情報 の う ち の少な く と も 2 つ の情報を入 力す る こ と に よ っ て, 残 り の情報が演算 さ れて表示 さ れ る の で, 対話形式で短時間で適切な レ ン ズ, 接写 リ ン グ, カ メ ラ 設置距離な どを選択 ま た は決定す る こ と がで き る 。
撮像条件 (撮像系) の評価 と 最適化につ い て も , 照 明条件の評価 と 最適化の場合 と 同 じ よ う に, 複数種類 の撮像条件の そ れぞれの下で対象物を実際 に撮像 し, 撮像 に よ り 得 ら れた画像デー タ に基づい て撮像条件の 評価.値を算出 し , こ の 評価値 に基づ い て行な う こ と が で き る の は い う ま で も な い 。 図面の 簡単な説明
第 1 図か ら 第 6 図 は照明装置の 例を 示す。
第 1 図 は リ ン グ蛍光灯を示す斜視図で あ る 。
第 2 図 は直管蛍光灯を示す斜視図であ る 。
第 3 図 は リ ン グ · ラ イ ト · ガ イ ド を示す斜視図で あ る O
第 4 図 は ス リ ツ ト · ラ イ ト · ガ イ ドを示す斜視図で め 。
第 5 図 は ス ト レ ー ト · ラ イ ト · ガ イ ドを示す斜視図
で あ る
6 図 は 二分 岐 ラ イ ト · ガ イ ド を 示 す 斜 視図 で あ る
7 図か ら 第 1 1図 は照明方法の例を示す。
7 図 は透過光照明 を 示 し て い る 。
8 図 は一様光照明 を示 し て い る 。
9 図 は 同軸落射照明 を示 し て い る 。
1 0図 は平行光照明 を 示 し て い る 。
1 1図 は 暗視野照明 を示 し て い る 。
1 2図 は 画像処理 シ ス テ ム の 全体構成を示す も の で あ る ο
1 3図 は画像処理 シ ス テ ム の他の例 を示す も の で あ る ο
1 4図 は照明装置 の最適高 さ 決定の支援 に適 し た照 明条件決定支援装置 の構成を示す プ ロ ッ ク 図で あ る 。
1 5図 は表示装置 に お け る 決定 さ れた最適高 さ の 表 示例を示す。
図お よ び第 Π図 は, 照明装置 の最適な 設置高 さ を決定す る 方法を説明す る た め の も の で あ る 。
1 8図 は照明装置 と そ の 照明光の等照度曲線を示す も の C、 あ る 。
1 9図 は等照度で照明 さ れ る 領域の半径 と 照明装置 の設置高 さ と の 関係を示す グ ラ フ であ る 。
2 0図 は 最適高 さ 決定処理 の 手順 を 示 す フ ロ ー ·
チ ヤ 一 ト で あ る 。
第 2 1図 は画像処理 シ ス テ ム の さ ら に他の 例を示す も の であ る 。
第 Π図 は, 対象物の形状, お よ び対象物 と 照明装置 と の位置関係を示す斜視図であ る 。
第 Π図 は最適角 度決定の支援 に適 し た照明条件決定 支援装置 の構成を示す プ ロ ッ ク 図で あ る 。
第 2 4図 は照明装置の最適な設置角 度を決定す る 方法 を説明す る も の で あ る 。
第 2 5図 は不完全拡散反射の状態を示す も の であ る 。 第 2 g図 は 最適角 度決定処理 の 手順 を 示 す フ ロ ー · チ ヤ 一 ト であ る 。
第 Π図 は照明装置 お よ び照明方法の決定の支援 に適 し た照明条件決定支援装置の構成を示す プ ロ ッ ク 図で あ る Q
第 Π図 は対象物の一例 と し て の コ ネ ク 夕 の外観を示 す斜視図で あ る 。
第 2 9図 は照明装置お よ び照明方法の決定処理の 全体 的な手順を示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 3 0図 は形状, 寸法の検査を 目 的 と す る 場合の照明 装 置 お よ び 照 明 方 法 を 決 定 す る 処 理 手 順 を 示 す フ ロ ー · チ ヤ 一 ト であ る 。
第 Π図 は部品の 有無や欠品の検査を 目 的 と す る 場合 の照明装置お よ び照明方法を決定す る 処理手順を示す
9
フ ロ ー · チ ヤ 一 ト で あ る 。
第 Π図 は傷の 検査を 目 的 と す る 場合の 照明 お よ び照明方法を決定す る 処理手順を示す フ 口 一 • チ ャ 一 ト で あ る 。
第 Π図 は色の検査を 目 的 と す る 場合の照明装置 ¾> よ び照明方法を決定す る 処理手順を示す フ ロ ー • チ ャ 一 ト で あ る 。
第 3 4 a 図お よ び第 3 4 b 図 は位置決 め を 目 的 と す る 場 合の 照明装置 お よ び照明方法を決定す る 処理手順を示 す フ ロ ー · チ ヤ 一 ト で あ る 。
第 3 5図 は, 異物の検査を 目 的 と す る 場合の HS Β月装置 お よ び照 明方 法 を 決 定 す る 処 理手 順 を 示す フ 口 チ ヤ 一 ト で あ る 。
第 図 は文字や マ ー ク の検査を 目 的 と す る 口 の 照 明 装 置 お よ び 照 明方 法 を 決定す る 処理手順 を 示す フ 口 — · チ ャ ー ト で あ る 。 第 Π図 は透過光照明用 画面の表示例 を示す
第 Π図 は一様光照明用 画面の 表示例 を示す
第 Π図 は凹凸突起照明用 画面の表示例 を示す。
第 4 β図 は 凹 凸穴照明用画面の表示例 を示す 0
第 4 1図 は 凹 凸エ ツ ジ照明用画面の表示例 ^示す 第 4 2図 は 凹凸線照明用 画面の表示例 を 示す ο
第 図 は正反射利用照明用 画面の表示例 を 示す 第 4 4図 は照明装置 お よ び照明方法の 決定, な ら び に
最適高 さ ま た は最適角度の 決定の支援に適 し た装置の 構成を示す プ ロ ッ ク 図であ る 。
第 4 5図 は照明装置お よ び照明方法, な ら び に最適高 さ ま た は 最適角 度 の 決定処理 の 全体 を 示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 4 6図 は複数の 照明装置があ る 場合の最適高 さ の決 定処理手順を示す フ ロ ー · チ ヤ 一 ト であ る 。
第 4 7図 は最適照明条件設定支援装置 に お け る 画像処 理装置の 回路構成を示す プ ロ ッ ク 図であ る 。
第 4 8図 は ヒ ス ト グ ラ ム生成回路の 回路構成を示す ブ ロ ッ ク 図で あ る 。
第 4 9図 は非適合度演算部の 回路構成を示す プ ロ ッ ク 図で あ る 。
第 5 0図 は画像上 に設定 さ れた ウ イ ン ド ウ を示す も の め る o
第 5 1図 は 明 る さ の デー タ を 明 る さ の差を表わすデ ー 夕 に変換す る 減算回路の動作を説明す る た め の も の で あ る 。
第 5 2 a 図力、 ら 第 5 2 h 図 は エ ツ ジ · パ タ ー ン を表わす フ ア ジ ィ · モ デルを示す も の であ る。
第 5 3図 は メ ン バ ー シ ッ プ関数を示す グ ラ フ で あ る 。 第 5 4図 は画質 ヒ ス ト グ ラ ム を示す グ ラ フ で あ る 。 第 5 5図 は照明装置の設置高 さ と 照明の評価値 と の 関 係を示す ダ ラ フ で あ る 。
第 5 6図お よ び第 5 7図 は照明装置の 高 さ 位置 の設定処 理手順を示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 5 8図か ら 第 6 0図 は高 さ 設定を指示す る 表示画面の 表示例を示す。
第 U図お よ び第 6 2図 は 照明装置の高 さ 位置設定処理 の 他の 例 を示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 図お よ び第 6 4図 は 照明装置の 高 さ 位置設定処理 の さ ら に他の 例 を 示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 6 5 a 図か ら 第 6 5 h 図 は エ ツ ジ · パ タ ー ン を表わ す 他の フ ァ ジ ィ · モ デルを 示す も の で あ る 。
第 6 6 a 図お よ び第 6 6 b 図 は グ レ イ 画像か ら エ ツ ジ 画 像が生成 さ れ る 様子を示す。
第 6 ?図 は 自 動 検査装 置 の 全体構成 を 示 す も の で あ る o
第 U図 は最適照明条件設定支援装置の 全体構成を示 す も の であ る 。
第 Π図は 回転テ ー ブル上の サ ン プルの配置状態を 示 す平面図で あ る 。
第 7 0図 は画像処理装置 の 回路構成例 を示す プ ロ ッ ク 図で あ る 。
第 Π図 は照明装置の最適な照明条件を決定す る た め の処理手順を示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 Π図 は最適照明条件設定支援装置の 全体構成を示 す も の で あ る 。
第 Π図 は回転テ ー ブル上の サ ン プ ル の配置状態を示 す平面図で あ る 。
第 Π図 は撮像条件決定支援装置の構成を示す プ ロ ッ ク 図であ る 。
第 7 5図 は カ メ ラ , レ ン ズ等の パ ラ メ 一 夕 を説明す る た め の も の であ る 。
第 図 は撮像条件の 決定を支援す る 処理手順を示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 Π図 は撮像条件の決定を支援す る 他の処理手順を 示す フ ロ ー · チ ヤ 一 ト で あ る 。
第 図 は選択 さ れた撮像条件を示す表示例で あ る 。 発明を実施す る た め の最良の形態
( 1 ) 照明装置 と 照明方法の種類
画像処理 シ ス テ ム に お い て用 い ら れ る 照明装置 (光 源) の主な も の に は蛍光灯 と ハ ロ ゲ ン · ラ ン プ と があ る ο
蛍光灯 は そ の形状か ら リ ン グ型 と 直管型 と に大別 さ れ, 種々 の寸法の も の が市販 さ れて い る 。 第 1 図 は リ ン グ型の 蛍光灯 1 1を 示す も の で あ る 。 第 2 図 は 直管型 の蛍光灯 1 2を示 し て い る 。
光源 にハ ロ ゲ ン · ラ ン プを用 い る 照明装置 に お い て は, ハ ロ ゲ ン · ラ ン プ力、 ら の光力 ラ イ ト · ガ イ ド と 呼 ばれ る 光 フ ァ イ バを用 い て光照射部 ま で導かれ る 。 リ
ン グ 型 , ス リ ッ ト 型 , ス ト レ — ト 型 , 二分岐型 な ど 種 々 の形状の光照射部を も つ も の が市販 さ れて お り , 寸法 に も バ リ エ ー シ ョ ン が あ る o
第 3 図 は リ ン グ型の光照射部を も つ, い わ ゆ る リ ン グ · ラ イ ト · ガ イ ド と 呼ばれ る 照明装置 1 3を示 し て い る 。 多数本の光 フ ァ イ バ 1 7が束 に な っ て お り , そ れ ら の先端が リ ン グ状 に配列 さ れて い る こ と に よ り 光照射 部が構成 さ れて い る 。
第 4 図 は, い わ ゆ る ス リ ッ ト • リ ン グ · ガ ィ ド と 呼 ばれ る 照明装置 1 4を示 し て い る 。 多数本の光 フ ァ ィ バ Πの先端が一直線状 に配列 さ れ る こ と に よ り 光照射部 が構成 さ れ, ス リ ッ ト 光を発生す る の に適 し て い る 。
第 5 図 は多数本の光 フ ァ イ バ 1 7を束ね た先端部か ら 円形断面を も つ光を投射す る 照明装置 1 5を 示 し, ス ト レ ー ト · ラ イ ト · ガ イ ド と 呼ばれて い る 。
第 6 図 に 示す照明装置 1 こ お い て は, 光 フ ァ ィ バ 1 7 の束力 2 つ に分 け ら れ, そ れぞれの先端部か ら 円形断 面を も つ光が投射 さ れ る 。 こ れ は二分岐 ラ イ ト • ガィ ド と 呼ばれ る 。
と く に , ス リ ッ ト · ラ イ ト ' ガ ィ ド 1 4, ス ト レ ー ト · ラ イ ト · ガ イ ド 1 5お よ び二分岐 ラ イ ト ガ ィ ド 1 J は照明領域が狭 い場合 に適 し て い る 。
以上を ま と め る と 次の よ う に な る 。
リ ン グ蛍光灯 1 1 (第 1 図)
直管蛍光灯 1 2 (第 2 図)
リ ン グ · ラ イ ト · ガ イ ド U (第 3 図)
ス リ ッ ト · ラ イ ト · ガ イ ド 1 4 (第 4 図
ス ト レ ー ト · ラ イ ト · ガイ ド 1 5 (第 5 図) 二分岐 ラ イ ト · ガ イ ド 1 6 (第 6 図)
第 7 図か ら 第 1 1図 は以下 に示す種 々 な 照明方法を示 し て い る 。
透過光照明 (第 7 図)
一様光照明 (第 8 図)
同軸落射照明 (第 9 図)
平行光照明 (第 U図)
暗視野照明 (第 1 1図)
透過光照明 (第 7 図) は, 対象物 ◦ B が載置 さ れた 拡散板 2 9の 下方 か ら 光 源 1 0の 光 を 照射す る も の で あ る 。 対象物 O B の上方 に撮像装置 (た と え ば C C D テ レ ビ , カ メ ラ ) 2 Gが配置 さ れ, こ の カ メ ラ 2 Gは対象物 0 B が 占 め る 部分以外の 箇所 に お い て拡散板 2 9を透過 し た光 に よ る 像を撮像す る 。
—様光照明 (第 8 図) は, カ メ ラ 2 0が配置 さ れ る 箇 所 と 同 じ対象物 ◦ B の上方か ら 一様な 強度分布を も つ 光を対象物 0 B に 照射す る も の で あ る 。 第' 8 図で は照 明光が平行光の よ う に描かれて い る が必ず し も 平行光 で は な く て も よ い。 一様光照明 は均一照明 と も い われ る
同 軸 落射照 明 (第 9 図 ) で は , カ メ ラ 2 0と 対象物 0 B と の 間 に ほ ぼ 4 5 ° で 傾 い た ノヽ 一 フ · ミ ラ ー Πが配 置 さ れ る 。 横方向 か ら 光がハ ー フ · ミ ラ ー 2 8に 照射 さ れ, こ の ノヽ ー フ ' ミ ラ ー 2 8に よ る 反射光が対象物 0 B に 照射 さ れ る 。 対 象 物 O B で 反射 し か つ ハ ー フ · ミ ラ ー Πを透過 し た光が カ メ ラ 2 0に入射す る 。 同軸落射 照明 と は, あ た か も 撮像装置 と し て の カ メ ラ 2 Gか ら 照 明光が発射 さ れて い る かの よ う な 照明 と い う 意味で あ o
平行光照明 (第 1 0図) は平行光を対象物 0 B に照射 す る 方法で あ る 。 第 1 G図で は斜め上方か ら 平行光が対 象物 O B に照射 さ れて い る 。 こ れを特 に平行射方照明 と い う 。 も ち ろ ん, 対象物 O B に対 し て垂直上方か ら 平行光を 照射 し て も よ い。 一般 に対象物 0 B が置かれ た背景 B G は乱反射を生 じ さ せ る 物質で構成 さ れ る 。 こ れ に よ り , 対象物 0 B お よ び背景 B G の 両方力《 カ メ ラ 2 0に と つ て 明 る く 見え る 。
暗視野照明 (第 1 1図) で は , 鏡面 ま た は そ れ に近 い 表面を も つ背景 B G が使用 さ れ る 。 照明光 は斜め上方 か ら 照射 さ れ る 。 対象物 0 B か ら の 反射光 (拡散反 射光) が カ メ ラ 2 0に 入射す る 。 背景 B G か ら の乱反射 光 は非常 に少な い の で, カ メ ラ 2 Qに と つ て背景 B G は 暗 ヽ 兄 o ο
( 2 ) 照明条件決定支援装置 ( そ の 1 : 最適高 さ の決定
支援)
対象物を照明装置 に よ り 照明 し , 照明 さ れた対象物 の 画像を撮像装置 に よ り 撮像 し, こ れ に よ り 得 ら れ た 画像デ ー タ を用 い て各種検査等の 画像処理を実行す る 画像処理 シ ス テ ム に お い て, 照明装置の対象物 に対す る 最適高 さ を決定す る た め の支援装置 に つ い て説明す る o
第 12図 は最適高 さ 決定支援装置を含む画像処理 シ ス テ ム の 全体的構成を示 し て い る 。
画像処理 シ ス テ ム は, 対象物 0 B を照明す る 照明装 置 11, 対象 物 O B を 撮像 す る 撮像装 置 と し て の テ レ ビ · カ メ ラ 20お よ び画像処理装置 40を含ん で い る 。
照明装置 11と し て は第 1 図 に示す リ ン グ蛍光灯が用 い ら れて お り , 対象物 0 B を そ の真上か ら 照明す る 。 蛍光灯 Πの リ ン グ中心が対象物 0 B の 真上 に位置 し て い る 。 照明装置 11と 対象物 0 B と の距離, すな わ ち 照 明装置 11の対象物 O B に対す る 高 さ を h と す る 。 照明 装置 11と し て, 第 3 図 に示す リ ン グ · ラ イ ト · ガ イ ド 13を用 い る こ と も で き る 。
照明装置 11は支柱 30と 支持装置 31と に よ つ て上下動 自 在 に支持 さ れて い る 。 支持装置 31は照明装置 11の 把 持部 Πと , 把持部 32と ア ー ム を介 し て固定的 に結 合 さ れ た 摺 動 部 33と を 備 え て い る 。 摺 動 部 33は 筒状体 で あ っ て, こ の 筒状体の孔内 を支柱 30が摺動 自 在 に 貫通
し て い る 。 し たが っ て, 摺動部 3 3は支柱 3 Qに上下動 自 在 に支持 さ れて い る 。 摺動部 3 3に は止め ね じ , 止め ボ ル ト 等の 止め具 3 4が設 け ら れ, 摺動部 Πは こ の 止め 具
3 4に よ つ て支柱 3 0に 固定 さ れ る 。 し た が っ て, 照明装 置 1 1は手動で任意の 高 さ 位置 に調整 さ れかつ 固定 さ れ る o
撮像装置 と し て の カ メ ラ 2 0は, 対象物 0 B の 真上の 位置 に , 撮像 中心を照明装置 1 1の リ ン グの 中心 に一致 さ せ て下方 に 向 け て配置 さ れ, 照明装置 1 1に よ る 照明 下で対象物 0 B を上方か ら 撮像す る 。 図面が繁雑 に な る の を避 け る た め に カ メ ラ 2 0の支持装置の 図示が省略 さ れて い る 。 カ メ ラ 2 0は支持装置 に よ っ て固定的 に支 持 さ れて い る 。 も っ と も カ メ ラ 2 0も 上下動 自 在 に支持 し て も よ い の は い う ま で も な い。
カ メ ラ 2 0に よ っ て撮影 さ れた対象物 0 B を表わ す映 像信号 (モ ノ ク ロ ー ム の 映像信号で充分で あ る が, 力 ラ ー 映像信号であ っ て も よ い) は 画像処理装置 4 0に与 え ら れ る 。 画像処理装 置 4 0は 好 ま し ぐ は コ ン ビ ユ ー 夕 , シ ス テ ム に よ り 構成 さ れ, 後述す る 照明条件決定 支援装置 と し て の機能を有 し て い る 。 画像処理装置 4 0 は C R T 表示装置 4 1を備 え て い る 。 こ の 表示装置 4 1に は, カ メ ラ 2 0が撮影 し た対象物 0 B の 画像が表示 さ れ る と と ち に , 画 像処理装 置 4 Qに よ っ て 決定 さ れ た 照 明装置 1 1の最適高 さ h p が第 1 5図 に 示す よ う に表示 さ
れ, ユ ー ザ に最適高 さ h p が報知 さ れ る 。
第 図 は画像処理 シ ス テ ム の 他の 例を示 し て い る 。 第 12図 に示す も の と 同一物 に は 同一符号を付 し , 重複 説明 を避 け る 。 こ の 画像処理 シ ス テ ム で は照明装置 11 が画像処理装置 4 Qか ら の 指令 に よ り 自 動的 に上下動 さ れ, かつ最適高 さ h p に 位置決め さ れ る 。
照明装置 11の昇降機構 Πは, 摺動部 Πに 固定 さ れ た ラ ッ ク 35と , こ の ラ ッ ク 35に 嚙み 合 う ピニォ ン 36と を 備え て い る 。 ピニオ ン 36は固定 さ れた軸受 (図示略) に よ り 回転 自 在 に支持 さ れて い る 。 ピニオ ン Πは ま た ル ス · モ ー タ Πに よ り 回転駆動 さ れ る 。
画像処理装置 が照明装置 11の最適高 さ h P を決定 す る と , 装置 4 (Iは照明装置 11が こ の高 さ h p に な る よ う に モ ー タ Πに正 ま た は逆方向 の 回転指令を与え る 。 モ ー タ 37は指令 さ れた 回転量回転す る の で, ピニ オ ン 36, ラ ッ ク 35を介 し て照明装置 11が上下動 さ れ, 最適 高 さ h p の 位置 に位置決め さ れ る 。 必要な ら ば昇降機 構 Πま た は モ ー タ Πに ロ ッ ク 機構を設 け, 照明装置 11 を最適高 さ 位置 に保持す る 。
第 H図 は照明装置 11の最適高 さ の決定を支援す る の に適 し た照明条件決定支援装置の構成を示 し て い る 。
照 明 条件決定支援装 置 50は ユ ー ザ · マ シ ン · イ ン タ ー フ ユ イ ス 53に お よ び最適高 さ 決定部 54を備 え て い る 。 こ れ ら の 各部 53, 54は 画像処理装置 40に 含 ま れて
い る
入力装置 Πは キ ー ボ ー ド, ラ イ ト ペ ン , マ ウ ス 等か 構成 さ れ る 。 出 力装置 52は上述 し た C R T表示装置 "やパ ノレ ス · モ 一 夕 πを 含む。 ユ ー ザ は, ユ ー ザ · マ シ ン • イ ン タ ー フ ェ イ ス 53の 働 き に よ り , 表示装置 41 に表示 さ れた メ ニ ュ ー , 指示, マ — ク , 力 一 ソ ル等 に し た が っ て入力装置 51を操作 し , 対話形式で各種デ— タ , 情報の入力 を行な う 。
最適高 さ 決定部 54が決定 し た最適高 さ h p は, 上述 し た よ う に, 表示装置 41 (出力装置 52) に表示 さ れた り , モ ー タ 37への 指令 と し て使用 さ れ る 。 こ の 最適高 さ 決定部 54は好 ま し く は プ ロ グ ラ ム に し た力 つ て動作 す る C P U , な ら び に後述す る デー 夕 · ベ ー ス お よ び 入力 さ れた各種デー タ を記憶す る メ モ リ か ら 構成 さ れ O
第 16図 か ら 第 19図 は , 表面 に 円 環状 の 溝 (刻 印部 分) g が形成 さ れ た対象物 0 B に対す る 円環状の 照明
13 (た と え ば リ ン グ ' ラ イ ト · ガ イ ド照明装置) の最適 な設置高 さ h p を決定す る 方法を示す も ので あ る o
最適 な設置高 ざ h p と は, 溝 g が暗 く , 対象物 0 B の 溝 g 以外の表面が均一 に 明 る く な る よ う な 照明 を得 る た め の 照 明 装 置 13の 対象 物 0 B に 対す る 高 さ を い ラ o
照明装置 1 3が, 第 1 6図 に 示す よ う に, か な り 高 い位 置 に設置 さ れて い る 場合に は, 照明装置 1 3か ら の光が 溝 g の底面 に 到達す る の で, 溝 g の底面の一部が照明 さ れ, 溝 g は暗 く は な ら な い。
こ れ に対 し て, 照明装置 Uを, あ る 上限値 h i 以下 の高 さ ま で下 げ る と , 第 Π図 に示す よ う に, 照明光 は 溝 g の 底面 に到達す る こ と は な く , 溝 g は 暗 く な る 。 し たが っ て, 溝 g が暗部 と な る よ う な照明状態を得 る た め の 照明装置 1 3の 高 さ h の条件 は h ^ h 1 で与え ら れ る 。
上限値 h 1 は次式で表わ さ れ る 。
R 1 _- R 2
h = d X ( 1 )
W こ こ で, d は溝 g の深 さ , W は溝 g の 幅, R 1 は視 野中心か ら 溝 g の該中心力、 ら 最 も 遠い縁 ま での距離, R 2 は照明装置 1 3の半径であ る 。
他方, 対象物 O B の溝 g 以外の表面を一様に 照明す る ため に は, 照明装置 1 3の 等照度曲線を考慮 し て, 対 象物 0 B の 表面 に 照明む ら が生 じ な い よ う な条件を満 たす必要があ る 。
第 1 8図 は リ ン グ · ラ イ ト · ガイ ド照明装置 1 3の 等照 度曲線を示 し て い る 。
等照度で照明 さ れ る 領域の半径 R は, 照明装置 1 3か ら の垂直方向 の距離, す な わ ち 照明装置 1 3の設置高 さ
3
h に応 じ て変化す る こ と 力く こ の 図か ら 分 る '。
第 1 9図 は, 等照度で照明 さ れ る 領域の半径 R と 照明 装置 1 3の 設置高 さ h と の 関係を示 し て い る 。 撮像装置
2 0の視野 (対象物を照明す る 範囲) の半径を R 0 と す る 。 第 1 9図 に お い て, 等照度で照明 さ れ る 領域の 半径
R が上記視野の半径 R 0 に等 し い と き の 照明装置 1 3の 設置高 さ h は h 0 で あ る 。 し た が っ て溝 g 以外の 部分 を 明 る く かつ 一様 に 照明す る た め に は, 照明装置 1 3の 設置高 さ h の下限値を h 0 に設定すれば よ い。 こ の 条 件 は h ≥ h 0 で め O o
上述 し た 2 つ の条件か ら 照明装置 Πの最適な設置高 さ h p は, h 0 ≤ p ≤ h l の範囲内 で定め る こ と が で き る 。 最適高 さ 決定部 5 4内 の メ モ リ に は, 照明装置 の 種類 ご と に そ の半径 R 2 と 等照度曲線 に 関す る 情報 がデー タ · ベ ー ス と し て ス ト ァ さ れて い る 。
第 2 G図 は, 上述 し た溝 g を も つ対象物 0 B の溝 g を 暗部 と し , 対象物 0 B の溝 g 以外の表面を均一な 明部 と し て撮影す る た め に, 最適高 さ 決定部 5 4に よ っ て実 行 さ れ る 照明装置 の最適高 さ 決定処理の手順を示す も の で あ る 。
ま ず, 対象物 0 B の形状的特徴 に 関す る 情報 と し て 溝 g の 深 さ d , 幅 Wお よ び視野中心か ら 溝 g の最 も 遠 い縁 ま で の距離 R 1 が入力装置 5 1か ら ユ ー ザ に よ っ て 人力 さ れ る o ま た撮像装置 1 3の 視野の 半径 R 0 が入カ
装置 を通 し てユ ー ザ に よ っ て入力 さ れ る (ス テ ッ プ 201 ) 。 も っ と も こ の視野半径 R 0 は対象物 O B の半 径ま た は そ の対角線の長 さ の 半分 に等 し ければ よ い か ら , 対象物 0 B の形状的特徵の一つ と し て入力す る こ と も で き る 。
照明装置の 種類 は既に入力 ま た は決定 さ れて い る も の と す る と , そ の 照明装置の 半径 R 2 がデ ー タ · ベ 一 ス か ら 読出 さ れ る 。 ま た, そ の 照明装置の 等照度曲線 に 関す る デー タ , ベ ー ス か ら , 既に入力 さ れ た視野半 径 R 0 を用 い て高 さ の下限値 h O が導 き 出 さ れ る (ス テ ツ プ 2 Q 2 ) o
次に, 第 U ) 式の 演算が実行 さ れて照明装置の 設置 高 さ の上限値 h i が算出 さ れ る (ス テ ッ プ 2 ) 。 算 出 さ れた上限値 h 1 が上記下限値 h 0 以上であ る か否 かが判定 さ れ る (ス テ ッ プ 2 Q 4 ) 。
h 0 ≤ h 1 であ れば最適高 さ の決定が可能で あ る 。 そ こ で下限値 h O と 上限値 h i と の平均値が第 (2) 式 を用 い て照明装置の最適な設置高 さ h p と し て算 出 さ れ る (ス テ ッ プ 205 ) 。 h_0 + h 1
h D = (2)
2 最適高 さ h p の 算 出 は 第 (2) 式 に 限 ら ず , h O h ≤ h を満たす高 さ h p を最適な も の と し て選ぶ こ と 力 で き る の は い う ま で も な い
こ の よ う に し て, 決定 さ れた最適高 さ h p は 出力装 置 5 2を 通 し て 出 力 さ れ る ( ス テ ッ プ 2 Q 6 ) 。 た と え ば, 照明装置の最適な 設置高 さ h p を ユ ー ザに知 ら せ る た め の 第 1 5図 に 示す よ う な メ ッ セ ー ジ 画像が表示装 置 4 1に表示 さ れ る 。 ま たは, こ の最適高 さ h p に基づ い て モ ー タ Πが駆動 さ れ, 照明装置が こ の高 さ h p の 位置 に 自 動的 に位置決め さ れ る 。
h 0 h 1 を満 た さ な い場合 に は, 表示装置 4 1に最 適な高 さ h p が.得 ら れな い 旨の メ ッ セ ー ジ が表示 さ れ る (ス テ ッ プ 2 ) 。
( 3 ) 照明条件決定支援装置 (そ の 2 : 最適角 度の 決定 の支援)
次に, 画像処理 シ ス テ ム に お い て, 照明装置の対象 物 に対す る 最適角 度を決定す る た め の 支援装置 に つ い て説明す る 。
第 2 1図 は最適角 度決定支援装置を含む画像処理 シ ス テ ム の 全体的構成を示 し て い る 。
照明装置 と し て第 4 図 に示す ス リ ッ ト · ラ イ ト · ガ ィ ド 1 4が用 い ら れて い る 。 こ の照明装置 1 4は そ の長手 方向に は水平な 姿勢で保持 さ れ, かつ対象物 ◦ B に対 し て斜め上方か ら 斜め に照明光を照射す る よ う に配置 さ れて い る 。 照明装置 と して は第 2 図 に 示す直管蛍光 灯 1 2を 使用 す る こ と も で き る o
第 2 1図 に お い て第 1 2図 に示す も の と 同一物 に は 同一
符号 を 付 し 重複 説 明 を 避 け る 。 照 明 装置 14の 把持部 32 A は摺動部 33に 傾動 自 在 に 保持 さ れて お り , 照明装 置 14の 向 き を任意の 角度 に手動で設定 し て固定す る こ と 力 で き る 。
第 図 に示す シ ス テ ム構成 と 同 じ よ う に, 摺動部 33 を 自 動的 に昇降す る 機構, お よ び把持部 Π Α を任意の 角 度に 自 動的 に 位置決めす る 機構を設 け, 画像処理装 置 40か ら の 指令 に 応 じ て高 さ お よ び角度を 自 動的 に設 定で き る よ う に す る こ と も で き る の は い う ま で も な い o
第 22図 は 対象物 O B の 一例 を 示 し て い る 。 対象物 0 B は板状体で あ っ て そ の表面 に長手方向 に の び る 直 線状の 溝 G が形成 さ れて い る 。
第 Π図 は照明装置 14の最適設置角度の決定を支援す る の に適 し た 照明条件決定支援装置の構成を示 し て い る 。 第 14図 に 示す構成 と 比較す る と , 最適高 さ 決定部 54に代えて最適角 度決定部 55が設け ら れて い る 。 他の 構成 は第 H図 に示す も の と 同 じ で あ る 。
第 24図お よ び第 25図 は, 溝 G を有す る 対象物 O B に 対す る 照明装置 14 ( ス リ ッ ト · ラ イ ト · ガ イ ド照明装 置) の設置角 度 を最適値 に設定す る 方法を示 し て い o
照明装置 14の 最適な設置角度 0 と は, 対象物 O B の 溝 G が暗部, そ れ以外の表面部分が明部 と な る よ う な
照明 を得 る た め の も の で あ る 。 こ れを実現す る た め に は, 溝 G の 幅を S , 溝 G の 深 さ を t と す る と , 第 (3 ) 式の 関係 を満た さ な け ればな ら な い。 角 度 6> は照明装 置 1 4か ら の 光線 (光軸 ) と 水平面 と の な す 角 度 で あ る O t a η Θ … (3 )
S と こ ろ で通常の 物体の表面で は , 第 2 5図 に 示すよ う に, 物体への入射光 は不完全拡散反射す る 。 す な わ ち 入射角 に 等 し い正反射光の 強度が最 も 強 く , 正汉射角 か ら ずれ る に し た が つ て反射光強度 は弱 く な る 。 対象 物 0 B の 溝 G 以外の表面 明部 と し て撮像 し , 暗部の 溝 G と t 明確な コ ン ト ラ ス ト を得 る た め に は, 撮像装 置 2 0に 入射す る 溝部 G 以外の部分か ら の反射光の 強度 を大 き く す る 必要がめ る 0 撮像装置 2 0は対象物 0 B の 真上, ま た は そ れ に近 い位置 に 設置 さ れて い る の で, 撮像装置 2 0に正反射光がで き る だ け多 く 入射す る よ う にす る た め に は, 照明装置 1 4の設置角 度^ は 9 0度 に で き る だ け近 い方が よ い。 こ の こ と か ら 照明装置 1 4の最 適な設置角 度 Θ は, 第 (4 ) 式で与ん れ る 。
( 4 ) θ p = t a n _ 1 第 2 6図 は, 溝 G を も つ 対象物 0 B に つ い て, 溝 G を 暗部, そ れ以外の部分を 明部 と し て撮像す る た め の 照
明条件を見つ け 出す た め に , 適角度決定部 5 5に よ っ て 実行 さ れ る 処理の手順を示す も の であ る 。
ま ず, ユ ー ザが入力装置 5 1か ら 対象物 O B の 溝 G の 幅 S お よ び深 さ t に つ い て の デ ー タ を 入力 す る ( ス テ ツ プ 2 1 1 ) 。 次 に 第 (4 ) 式 の 演算 が実行 さ れ, 照 明装置 1 4の最適設置角度 p が算出 さ れ る ( ス テ ッ プ 2 1 2 ) 。 こ の 算出 さ れた最適設置角度 S p は 出 力装置 5 2か ら 出力 さ れ る (ス テ ッ プ 2 U ) 。 た と え ば表示装 置 4 1の 画面 に , 照 明 装 置 1 4の 最適 な 設 置 角 度 S p を ユ ー ザへ知 ら せ る た め の メ ー セ ー ジ 画像 (図示略) が 表示 さ れ る 。
( 4 ) 照明条件決定支援装置 (そ の 3 : 照明装置お よ び 照明方法の決定の支援)
画像処理 シ ス テ ム に お い て, 検査 目 的 に適 し た 画像 を得 る た め に は, どの 照明装置を用 い て, どの よ う な 照明方法で照明す る の か, と い う こ と も き わ め て重要 な要因であ る 。
発明者 ら は, 何を どの よ う に検査す る た め に , どの よ う な 照明装置力 どの よ う な 照明方法で用 い ら れて い る かを詳細 に調べ, 次の 3 つ の要因 に基づ け ば適切 な 照明装置 と 照明方法を決定で き る と の知見を得た。 す な わ ち , ①検査 目 的, ②着 目 部 と 背景 と の光学的性質 の差異, お よ び③視野の大 き さ の 3 要因で あ る 。
照明装置 と 照明方法 は上記要因② と ③ に基づい て一
応決定 は で き る 。 よ り 厳密 に は要因②の着 目 部 と 背景 の光学的性質の差異 (透過率, 反射率, 反射方向, 色 な ど) の う ち , ど の 差異 に基づい て照明装置 お よ び照 明方法を決定す る の か と い う こ と も 重要で る 。 な ぜな ら ば, 一般 に検査すべ き 着 目 部 と 背景 は透過率, 反射 率, 反射方向, 色な どの う ち どれか 1 つ だ け が異な る わ けで は な い か ら で あ る 。
そ こ で, 要因①を基 に し て, 各検査 目 的 に適 し た要 因②を考慮す る 必要が あ る 。 こ の た め に は, 予 め獲得 し て お い た専門家の経験知識や光学的解析結果が利用 さ れ る 。
第 Π図 は照明装置 と 照明方法の決定を支援す る の に 適 し た照明条件決定支援装置の構成例を示 し て い る 。 第 1 4図 お よ び第 2 3図 と の比較で い う と , 決定部 5 4ま た は 5 5に代え て, 照明装置お よ び照明方法の 決定部 5 6が 設 け ら れて い る 。
第 2 8図 は検査対象物 ( ワ ー ク ) の一例 と し て 2 つ の コ ネ ク タ の外観を示 し て い る 。 こ の コ ネ ク タ に つ い て は後に具体的 に照明装置お よ び照明方法を決定す る 実 例で触れ る こ と に す る 。
第 2 9図 は照明条件決定支援装置 5 0に よ る'照明装置 と 照 明 方 法 の 決定処理 の 全体 的 な 手順 を 示 す も の で あ
«& o
ユ ー ザ に よ つ て, 表示装置 4 1の 表示画面 を利用 し た
対話を通 し て, 入力装置 5 1か ら ①検査 目 的が入力 さ れ る と , 入 力 さ れ た 検査 目 的 に し た が っ て第 3 0図 か ら 第 3 6図 の 処理 の い ず れ か に ジ ャ ン プ す る こ と に な る (ス テ ッ プ 2 2 1 ) 。 検査 目 的 と こ れ ら の処理 と の 関係 は次の通 り で あ る 。
形状, 寸法の検査 第 3 0図の処理
物品の 有無や欠品の検査 第 3 1図の 処理
傷の検査 第 Π図の処理
色 の 検査 第 Π図の処理
位置決め 第 3 4 a 図, 第 3 4 b 図 の処理
異物の検査 第 図の処理
文字, マ ー ク の 検査 第 Π図の 処理
③視野 の 大 き さ も 入 力 し て も よ い が , 第 Π図 か ら 第 図 に 示す表示画面の側か ら 分 る よ う に, 視野の大 き さ に適 し た照明装置が表示 さ れ る の で, ユ ー ザ は視 野の大 き さ を入力 し な く て も 照明装置を決定す る こ と がで き る 。 も ち ろ ん, 視野の大 き さ の入力 を待 っ て, 入力 さ れた視野の大 き さ に適 し た照明装置 の み を表示 す る よ う に し て も よ い。
後 に詳述す る よ う に, 第 3 D図か ら 第 図 に 示す検査 目 的 に 合致 し た具体的処理に お い て, 要因②の着 目 部 と 背景 と の光学的性質の 差異が表示装置 4 1の 画面上 に お い て順次質問 さ れ, ユ ー ザか ら そ れ に対す る 回答が
入力装置 5 1を通 し て入力 さ れ る と , 検査の た め に 着 目 すべ き 最適な 着 目 部 と 背景 と の光学的性質の差異が導 かれ (ス テ ッ プ 2 2 2 ) , そ の 結果 に応 じ て照明装置 お よ び照明方法が決定 さ れ る (ス テ ッ プ 2 2 3 ) 。 こ の 実 施例で は, 表示 さ れた画面 に表わ さ れた照明装置 と 照 明方法 と の い く つ かの組合わせ の 中か ら ユ ー ザが最終 的 に 照明装置お よ び照明方法を決定す る こ と に な る 。
第 3 0図 に 示す形状 と 寸法の 検査を 目 的 と し た決定処 理 に お い て は, ま ず シ ルエ ツ ト 検査が可能か ど う かが 質問 さ れ る ( ス テ ッ プ 2 3 1 ) 。 ユ ー ザが可能であ る 旨 の 回 答 を 入力 す る と , 検査 の た め に 着 目 す べ き 最適 な ②着 目 部 と 背景の光学的性質の差異 は透過率で あ る か ら , 第 Π図 に 示す透過光照明用 画面が表示装置 4 1に 表示 さ れ る (ス テ ッ プ 2 3 2 ) o
こ の透過光照明用 画面 は, シ ルエ ッ ト 検査が可能で あ れば第 7 図 に 示す透過光照明が適 し て い る こ と を表 わ し て い る 。 透過光照明 に は, 照明装置 と 対象物 と 力 メ ラ と を水平 に配置す る タ イ プ 1 と , こ れ ら を垂直 に 配置す る (第 7 図 に示す配置) タ イ プ 2 と 力 あ る 。 こ れ ら の両 タ イ プ に共通 し て, 視野の 大 き さ に対応 し て 適切な 照明装置が表示 さ れ る 。 ユ ー ザ は こ れ ら の 表示 さ れた照明装置の 中 か ら 視野の 大 き さ に 合 っ た も の を 選択す る こ と に な る 。 こ こ で ø は リ ン グ型の照明装置 の 径で あ り , Ά (第 3 8図参照) は直線状の 照明装置の
長 さ を示 し て い る 。
シ ルエ ツ ト 検査が不可能で あ る 旨がユ ー ザか ら 入力 さ れ る と , 次 に着 目 部 と 背景の 色が似て い る か ど う か の 質問が表示装置 4 1に現わ れ る (ス テ ッ プ 2 3 3 ) 。 着 目 部 と 背景の色が似て い な け れば着 目 すべ き 差異 は色 や反射率であ る 。 そ こ で, 第 Π図に示す一様光照明用 画面が表示 さ れ る (ス テ ッ プ Π 4 ) 。
一様光照明用 画面で は一様光照明 (第 8 図) が適切 であ る こ と , 一様光照明 に お い て各種の視野の大 き さ に適 し た照明装置 の 種類が表示 さ れ る 。
シ ルエ ツ ト 検査が不可能でかつ着 目 部 と 背景の 色が 似て い る 場合に は, 着 目 すべ き 差異は光の 反射方向 で あ る 。 そ こ で着 目 部 に突起があ る か, 穴があ る かが尋 ね ら れ る (ス テ ッ プ 2 3 5 , 2 3 7 ) 。
対象物の 着 目 部 に突起があ る 場合に は第 3 9図 に 示す 凹凸突起照明用 画面 (凹凸 の う ち突起 に着 目 し た照明 の た め の 画面) が表示 さ れ る ( ス テ ッ プ 2 3 6 ) 。 こ の 画面で は平行光照明 (第 1 ΰ図) が適切で あ る こ と , お よ び こ の平行光照明 に お い て用 い ら れ る 照明装置 の 種 類が視野の大 き さ ご と に表示 さ れ ^。
着 目 部 に穴があ る 場合に は第 4 0図 に示す凹 凸穴照明 用画面 (凹凸の う ち 穴に着 目 し た照明を行な う た め の も の ) が表示 さ れ る ( ス テ ッ プ 2 3 8 ) 。 こ の 画面で は, 検査の 目 的 ま た は場所 に応 じ て, 平行光照明 ま た
4
は 同軸落射照明 (第 9 図) が適切で あ る こ と , お よ び そ れ ら に適 し た視野の 大 き さ ご と の照明装置が表示 さ れ る
着 目 部 に突起 も 穴 も な い場合 に は第 4 1図 に 示す凹凸 ェ ッ ジ照明用 画面が表示 さ れ る (ス テ ッ プ 2 3 9 ) の 画面で は平行光照明が適切で あ る こ と , お よ び視野 の大 き さ に応 じ た照明装置の 種類が表示 さ れ る 。
第 3 1図 に 示す部品の 有無お よ び欠品の 有無を 目 的 と し た 検査 の た め に , , シ ル エ ッ ト 検 査が可能 か ど う か ( ス テ ツ プ 2 4 1 ) 部品の色 と ベ ー ス (部品が搭載 さ れて い る 本体) の 色 と 力《似て い る か ど う か ( ス テ ッ プ 2 4 3 ) が順次表示装置 4 1を通 し て質問 さ れ る 。
第 3 0図を参照 し て説明 し た照明用 画面以外の も の に つ い て特 に言及すれば, 部品 と ベ ー ス の色が似て い る に は, 第 図 に 示す正反射利用 照明用 画面が表示 さ れ る (ス テ ッ プ 2 4 5 ) 。 正反射利用照明 に は平行光 照明 (第 1 D図) お よ び暗視野照明 (第 1 1図) が含 ま れ ユ ー ザ は こ の 画面に表示 さ れた, 照明方法お よ び 視野の大 き さ に対応 し た照明装置 を選択す る こ と がで き る
第 3 2図か ら 第 3 6図 に 示 さ れた処理 も 上述 し た も の と ほ ぼ同 じ で あ り , そ の処理の 内容 は こ れ ら の 図面か ら 理解で き る であ ろ う 。 ま だ言及 し てい な い第 4 2図の 凹 凸線照明用 画面 に つ い て少 し説明す る と , こ の 画面 は
第 3 2図 に示す傷の検査を 目 的 と し た照明 に お い て, シ ルエ ツ ト 検査が不可能でかつ傷の方向が特定不可能で あ る 場合 ( ス テ ッ プ 2 5 1 , 2 5 3 の い ず れ に お い て も N O ) に表示 さ れ る 。 対象物の表面 に で き て い る 傷 (細 い線状の 凹凸) を適切 に撮像す る た め に平行光照明 を 用 い る の が適当 であ り , 視野の 大 き さ に応 じ て ス リ ツ ト · ラ イ ト · ガイ ド ま た は 直管蛍光灯を選択すべ き で あ る こ と が示 さ れて い る 。
以上の よ う に し て, 検査 目 的 に応 じ て表示装置 4 1お よ び入 力 装 置 5 1を 通 し て 所定 の 質 問 と そ れ に 対す る ユ ー ザの 回答 と が繰 り 返 さ れ, 目 的 と す る 検査の た め に着 目 すべ き 最適な着 目 部 と 背景 と の光学的性質の 差 異が何で あ る かが判断 さ れ, そ の判断結果 に基づ き 適 切な照明装置 お よ び照明方法が決定 さ れ る 。
具体例 と し て第 2 8図 に示す コ ネ ク タ · ピ ン の抜 け を 検査す る 場合につ い て説明す る 。 ①検査 目 的 は部品の 有無, 欠品検査に相当す る の で, 第 Π図 に 示す処理 に 進む。 検査 ラ イ ン で シ ルエ ツ ト 検査で き る よ う な構成 に な っ て い れば, 第 Π図 に示す透過光照明用 画面が表 示 さ れ る 。 視野 は 3 0画程度で あ る の で, リ ン グ型の蛍 光灯を用 い た水平型 ま た は垂直型の透過光照明が適切 と い う こ と に な る 。 シ ルエ ッ ト 検査がで き な い場合に は, 次の判断 に移 り , 部品 と ベ ー ス の色 は似て い な い の で 第 3 8図 に 示 さ れ る 一様光照 明 用 画面が表示 さ れ
る 。 こ の 例で は対象物 は横長で あ り ( タ イ プ 2 ) , 視 野 は 3 0腿程度で あ る の で, ス リ ッ 卜 · ラ イ 卜 · ガ ィ ド を用 い て斜め上方か ら 照明す る こ と が適当 と い つ $π δ冊 力 得 ら れ る 。
上記 の 例 で は , 表 示装 置 4 1 <ヒ 入 力 装 置 5 1を 通 し て ユ ー ザ と 決定部 5 6と が対話す る こ と に よ り 処理が進行 す る よ う に な っ て い る 。 上記要因①, ②, ③を選択す る 選択 フ ロ ー や ガ イ ド · ブ ッ ク に し た力 つ てュ一ザが 各種デ ー タ , 情報を入力す る こ と に よ り 処理を進行 さ せ て も よ い。 ま た, 要因①, ② , ③の順で選択が行な わ れて い る が, た と え ば 「③視野の大 き さ 」 を ま ず定 め る よ う な手順で あ っ て も よ い ο
( 5 ) 照明条件決定支援装置 (そ の 4 )
照明条件決定支援装置の最後の例 と し て, 上述 し た 照明装置 お よ び照明方法の 決定, な ら び に 照明装置の 最適高 さ ま た は最適角度を決定す る た め の 装置 に つ い て説明す る 。
第 4 4図 に 示す こ の よ う な 照明条件決定支援装置 5 0に は, 上述 し た最適高 さ 決定部 5 4 , 最適角度決定部 5 5な ら び に 照明装置お よ び照明方法の決定部 5 6が設 け ら れ て い る 。 他の構成 は, 第 1 4図, 第 Π図 お よ び第 2 7図 に 示す も の と 同 じ で あ る 。
こ の 装置 5 0に お い て実行 さ れ る 処理手順が第 4 5図 に 示 さ れて い る 。
ま ず, 上述 し た よ う に検査 目 的 に適 し た照明装置 お よ び照明方法がユ ー ザ と 決定部 56と の対話を通 し て決 定 さ れ る (ス テ ッ プ 311 ) 。 ユ ー ザ は表示装置 41に表 示 さ れた も の の 中か ら 最適な 照明装置お よ び照明方法 を選択 し て入力す る 。
こ の よ う に し て決定 さ れた照明装置 に つ い て, 最適 高 さ を決定すべ き か, 最適角度を決定すべ き かが判定 さ れ, そ れ に応 じ て決定部 , 55の い ずれかが選択 さ れ る (ス テ ッ プ 312 ) 。 一般的 に は リ ン グ状の 照明装 置 につ い て は最適高 さ の 決定が必要で あ り , 直線状の 照明装置 に つ い て は最適角度の決定が必要 と な ろ う 。 決定すべ き最適高 さ ま た は角度に応 じ て, 必要な情報 が入力 さ れ, 第 20図 に示す処理 ま た は第 26図 に示す処 理 に し た力 つ て, 最適高 さ h p ま た は最適角度 0 p が 決定 さ れ (ス テ ッ プ Π3 ) , そ の結果が表示装置 41に 表 示 さ れ る か, ま た は 高 さ も し く は 角 度 の 調整装置 (昇降機構等) に与え ら れ る (ス テ ッ プ Π4 ) 。
第 46図 は複数種類 ( n 種類) の 照明装置が選択 さ れ た場合 に, そ れ ら の そ れぞれ に つ い て最適高 さ を決定 す る た め の処理手順を示 し て い る 。 第 20図 に示す も の と 同一処理に つ い て は 同一ス テ ツ プ番号を付 し 説明を 省略す る 。
カ ウ ン タ i が設 け ら れて お り , こ の カ ウ ン タ i は ま ず i = l に初期設定 さ れ ( ス テ ッ プ Π1 ) , ス テ ッ プ
2 0 4 の 条件 h O ^ h l を 満た さ な い照明装置があ つ た 場合 に イ ン ク レ メ ン ト さ れて い く (ス テ ツ プ ) 。 各種条件の入力 ( ス テ ッ プ 2 Q 1 ) の の ち , i 番 目 の 照 明装置の 種類が入力 さ れ ( ス テ ツ プ ) , 入力 さ れ た照明装置 に つ い て最適高 さ h p か決定で き る か ど う かが判定 さ れ る ( ス テ ッ プ 2 0 4 ) 。 決定で き れば最適 高 さ h p が求め ら れ, 処理が終 る 。 すべて の種類 ( n 種類) の 照明装置 に つ い て最適高 さ が決定で き な い場 合 に は ( ス テ ッ プ 3 2 4 ) , そ の 旨 の メ ッ セ 一 ジ が表示 さ れて処理が終 る ( ス テ ツ プ 2 ) 。 照明装置 の 均一 照度を も つ視野の 半径 R 0 は ス テ ッ プ 2 に お い て照 明装置の 種類 ご と に 入力 さ れ る 場合 も あ ろ う o
( 6 ) 最適照明条件設定支援装置 (そ の 1 : 照明装置の 位置の 設定)
上述 し た照明条件決定支援装置 ( そ の 1 , そ の 2 ) で は照明装置 と 被検査対象物 と の 位置関係 に基づ い て 照 明 装 置 の 最適 高 さ , 最適 角 度 を 決定 し て い る 。 次 に, カ メ ラ に よ り 撮像 さ れた 画像の質の観点か ら 照明 装置の最適位置 を決定す る , ま た は そ の 決定を支援す る 装置 に つ い て説明す る o
こ の実施例 に お い て も 第 Π図 に示す画像処理 シ ス テ ム の構成が適用 さ れ る 。 画像処理装置 4 0は, テ レ ビ · カ メ ラ 2 0に よ っ て撮像 さ れ た対象物 0 B を表わす映像 信号を取込み, 照明装置 1 1の最適高 さ の設定を支援す
る た め の 後述す る 画像処理を実行す る 。 C R T 表示装 置 4 1は対象物 0 B の撮影画像を表示す る と と も に, 照 明装置 1 1の 位置設定を ア ドパイ ス す る た め の メ ッ セ 一 ジ を表示す る 。
第 4 7図 は画像処理装置 4 0の 回路構成 ¾r 不 し て い る 。 画像処理装置 4 Qは, 画像入力部 6 1 , 画像 メ モ リ 6 2, 画 像出力部 6 3 , マ イ ク 口 υ ン ピ ュ ー 夕 , 夕 ィ ミ ン グ制御 部 な ど に よ っ て構成 さ れて い る 。
画像入力部 6 1は, テ レ ビ • カ メ ラ 2 0力、 ら 出力 さ れ る ア ナ ロ グ映像信号を 丁 ィ ジ タ ル画像デー タ に変換す る A D 変換器を含み , こ の 丁 イ ジ 夕 ゾレ画像デ ー タ を画 像 メ モ リ 6 2に 与え る 。 ま た 画像入力部 6 1は , 入力す る ア ナ ロ グ映像信号 に基づ い て, 明 る さ を横軸 と し て画 質を表わす画質 ヒ ス ト グ ラ ム を実時間で生成す る ヒ ス ト グ ラ ム生成回路を備え て ■ O o の ヒ ス ト グ ラ ム生 成回路 の具体的回路構成お よ び動作に つ い て は後述す
Ό o
画 像 メ モ リ 6 2は 画 像入力 部 6 1か ら 与 え ら れ る 画像 デー タ 画素単位で記憶す る 。 画像出力部 6 3は画像 メ モ リ 6 2か ら 読出 さ れた画像デー タ を ア ナ 口 グ映像信号 に変換す る D Z A 変換器を含み, 変換 さ れた 1 画面分 の ア ナ 口 グ映像信号を C R T 表示装置 4 1に 与 L る こ れ に よ り , テ レ ビ · カ メ ラ 2 0に よ っ て撮影 さ れ た対象 物 0 B の 画像が表示装置 に も 表示 さ れ る
マ イ ク ロ コ ン ピ ュ ー タ は, 制御, 演算の 主体で あ る C P U 65を有 し , こ の C P U 65に シ ス テ ム バ ス を介 し て R 0 M 66, R A M Π, I / 0 制御部 な どが接続 さ れて い る 。 C P U 65は R 0 M 66に格納 さ れた プ ロ ダ ラ ム を解読, 実行 し , ま た R A M に対 し て各種デ ー タ の 読 み 書 き を 行 っ て , 所 定 の 画 像処理 を 実行す る 。 I Z 0 制御部 68に は キ ー ボ ー ド Πが接続 さ れて い る 。 キ ー ボ ー ド Πか ら の キ ー入力信号 は I 0 制御部 68を 経て C P U 65へ送 ら れ る 。
タ イ ミ ン グ制御部 64は, C P U 65の制御の下 に , 画 像入力部 61, 画像 メ モ リ 62, 画像 出力部 63に対 し て, 各種デ ー タ の 入出力動作を制御す る た め の タ イ ミ ン グ 信号を 出力す る 。
第 48図 は, 画像入力部 61に設 け ら れた ヒ ス ト グ ラ ム 生成回路 の具体例を示 し て い る 。
C P U 65は C P U ノ ス を 介 し て ァ ド レ ス • ジ ェ 不 レ ー 夕 80を制御す る 。 了 ド レ ス · ジ ヱ ネ レ 一 夕 80は必 要な ァ ド レ ス 信号, コ ン ト ロ ー ル信号お よ び タ イ ミ ン グ信号 を 生成 し , 構 成各部 へ与 え る 。 画像 メ モ リ 62 は, コ ン ト ロ ー ル ' バ ス を介 し て入力す る コ ン ト ロ ー ル信号 に よ っ て書込 と 読出 が制御 さ れ る 。 'ァ ド レ ス , バ ス を介 し て入力す る ァ ド レ ス 信号に し た が う 画像 メ モ リ の ア ド レ ス に , デ ー タ · バ ス か ら 供給 さ れ る 画 像デ ー タ が書込 ま れ, ま た, 読出 さ れ る 。 ァ ド レ ス ·
バ ス, コ ン ト ロ ー ル ' ノ ス お よ びデー タ · ノ"? ス は, 他 の 回路 に も 接続 さ れて い る の は い う ま で も な い。 画像 メ モ リ に は , 1 フ ィ ー ル ド分 ( ま た は 1 フ レ ー ム 分) の 画像デー タ が書込ま れ る 。
画像 メ モ リ 62に ス ト ア さ れた 1 フ ィ 一 ノレ ド分 (ま た は 1 フ レ ー ム 分) の 画像デ ー タ に, 第 50図 に 示す よ う に, こ の実施例で は 3 X 3 = 9 画素の ウ イ ン ド ウ が設 定 さ れ る 。 こ の ウ ィ ン ド ウ の 中心の 画素を P Q と し, こ の 中心画素 P Q の ま わ り の 画素に反時計回 り に P i 〜 P 8 の 符号を付す。 3 3 の ウ イ ン ド ウ は全画面の ェ リ ァ を水平お よ び垂直走査方向 に移動 し て い く 。
こ の よ う な ウ ィ ン ド ウ を設定す る た め に , ラ ッ チ 回 路 76, 75, 1 H 遅延 回 路 ( シ フ ト · レ ジ ス タ ) 78, ラ ッ チ 回路 7 7 , 1 H 遅延回路 71お よ び ラ ッ チ 回路 72, 73が設 け ら れてお り , 画像 メ モ リ 62か ら 水平, 垂 直走査の順序で読出 さ れた 画像デ ー タ は こ れ ら の ラ ッ チ 回路お よ び 1 H遅延回路 に上記の順序で順次転送 さ れ て い く 。 1 H 遅延 回 路 78, Πは 入 力 デ ー タ を 1 H ( 1 水平走査期間) 遅延 し て 出力 し , ラ ッ チ 回路 76, 75, 70, 74, 72 , 73は入力 デー タ を 1 画素 ク ロ ッ ク 周 期遅延 し て 出力す る 。
画 像 メ モ リ 62か ら 読 出 さ れ た 画 像 デ ー タ ( 画 素 P 7 ) , ラ ッ チ 回 路 76 , 75 , 70, 74, 72, 73の 出 力画像デ ー タ (画素 P 6 , P J , P 0 , P ^t , P 2 -
P 3 ) お よ び 1 H 遅 延 回 路 78, 71の 出 力 画 像 デ — 夕 (画素 P 8 , P ! ) は非適合度演算部 に与え ら れ る 。 ラ ッ チ 回路 ? 0の 出力画像デ ー タ (中心画素 P Q ) は ま た, 非適合度 ヒ ス ト グ ラ ム生成部 82お よ び明 る さ ヒ ス ト グ ラ ム生成部 Πに も 与え ら れ る 。
第 49図 は非適合度演算部 Πの構成例 を示す も の で あ る 。 こ の 非適合度演算部 Πは, 縦, 横, 斜 め に の び る 8 種類 ( 8 方向) の エ ッ ジ · パ タ ー ン の そ れぞれ に対 す る ウ ィ ン ド ウ 内 画 像 デ ー タ の 適 合度 ( エ ッ ジ適 合 度 ; エ ッ ジ ら し さ ) 〜 J" 8 を求め, こ れ ら の 適合 度 〃 i 〜 〃 8 の M A X 演算 (最大の も の を選択す る こ と ) を行 っ てエ ッ ジ適合度 ^ を求め, さ ら に ^ = 1 — // よ り 非適合度 (エ ッ ジ ら し く な さ ) を求 め る も の で あ O 0
8 個 の減算回路 91〜 98が設 け ら れて い る 。 こ れ ら の 減算 回 路 91〜 98に は そ れ ぞ れ, 上述 し た ウ ィ ン ド ウ 内 画素 P i 〜 P 8 の画像デ ー タ が与え ら れ る 。 ま た, すべて の 減算回路 91〜 98に は 中心画素 P 0 の 画像デー 夕 が与え ら れ る 。 減算回路 91は画素 P i の 画像デ ー タ と 中心画素 P () の 画像デー タ と の 差 ( こ れを と す る ) を算出す る 。 同 じ よ う に減算回路 92〜 98は, 画素 P 2 〜 P 8 の 画像 デー タ の そ れぞれ と 中心画素 P Q の 画像 デ ー タ と の差 ( こ れ ら を q 2 〜 Q 8 と す る ) を算 出す る 。 画像デ ー タ は上述 し た よ う に モ ノ ク ロ ー ム 画
像を表わす も の で あ る か ら (カ ラ ー 画像デ ー タ の場合 に は輝度デー タ を抽 出すれば よ い) , 各画素の 明 る さ を示 し て い る 。 し た力 つ て, 差デ ー タ 〜 q 。 は, 中心画素 Ρ θ と そ の 周 囲の 画素 P i P 8 と の 明 る さ の差を表わ し て い る 。 第 51図 に ウ ィ ン ド ウ 内 の 明 る さ タ ー ン P Q P 8 ( P o P g は こ こ で は画像デ ー 夕 を示す) 力、 ら ウ イ ン ド ウ 内 の 中心画素を基準 と し た 明 る さ タ ー ン (明 る さ の差の パ タ ー ン ) q β - q g が生成 さ れ る 様子が示 さ れて い る 。
こ の 実施 例 で は 8 種類 の エ ツ ジ · パ タ ー ン を メ ン 一 シ ッ プ関数を用 い て表現 さ れた フ ア ジ ィ · モ デル に よ っ て 表 わ し て い る 。 こ の フ ア ジ ィ ' モ デ ル が 第 52 a 図か ら 第 52 h 図 に示 さ れて い る 。 N は N e g a t i v e を, Z は z e r oを, P は Po s i t i v eを そ れぞれ表わ し て お り , こ れ ら の 符号 ( こ れを ラ ベル と い う ) で指定 さ れ る メ ンバ 一 シ ッ プ関数が第 53図に示 さ れて い る 。
メ ン バ 一 シ ッ プ関数 N は, 破線で示す よ う に , 明 る さ の差 q 力 あ る 負の値 一 q b よ り 小 さ い範囲で は, 関 数値が最大値 1 の値を と り , 0 よ り 大 き い範囲で は最 小値 0 の 値を と り , — Q b か ら 0 ま での範囲で は そ の 値に対応 し て直線的 に変化す る 1 か ら 0 ま での値を と る
メ ン バ 一 シ ッ プ関数 P は, 明 る さ の差 q 力 0 よ り 小 さ い 範 囲 で は 関数値 が最小値 0 を と り . あ る 正 の 値
q b よ り 大 き い範囲で は最大値を と り , 0 〜 q b の 範 囲で は そ の値 に対応 し て直線的 に変化す る 0 〜 1 の 間 の値を と る 。
メ ン バ ー シ ッ プ 関数 Z は , 明 る さ の 差 q の 絶対値 があ る 値 q a よ り 大 き い 範 囲 で は 関数値 が最 小値 と な り , 絶対値が Q b よ り 小 さ い範囲で は最大値 1 と な る 。 そ し て, 明 る さ の 差 q の絶対値が q b よ り 大 き く かつ q よ り 小 さ い範囲で は, そ の値 に対応 し て, 関 数値 は, 直線的 に変化す る 1 か ら 0 ま で の 中間の値 と な る 。
第 52 a 図 に示す フ ア ジ ィ · モ デル は, 右下方向 に 明 る く か つ 左上方 向 に 暗 く な り , 右上 り の 斜 め の エ ツ ジ · ノ、。 タ ー ン を表わ し て い る 。 第 52 b 図 は右方向 に 明 る く , 左方 向 に 暗 く , 垂 直方 向 に の び る エ ッ ジ · パ タ ー ン を表わ し て い る 。 第 52 c 図か ら 第 52 h 図 に 示す フ ア ジ ィ · モ デ ル も 他の 種類の エ ッ ジ · パ タ ー ン を表 わ し て い る こ と は容易 に理解で き ょ う 。 第 52 a 図か ら 第 52 h 図の エ ツ ジ · パ タ ー ン の方向を, 方向 1 〜方 向 8 と 定め る 。
第 49図 に 戻 っ て, 上述 し た 8 方向 の エ ッ ジ · パ タ ー ン に対応 し て 8 個 の エ ッ ジ適合度演算回路 111 〜 118 が設 け ら れて い る 。 こ れ ら の エ ッ ジ適 台度演算回路 は 設定 さ れた メ ン バ ー シ ッ プ関数を 除 いて 同一の構成を も つ の で, 回路 111 に つ い て説 明 す る 。
エ ッ ジ 適 合度演算 回 路 111 は , そ れ ぞ れ メ ン バ 一 シ ッ プ関数回路 (以下 M F C : Memb e r s h i p F un c t i o n C i r c u i t と い う ) 101 〜 108 と , そ れ ら の 出力 の 最小 値 を 選択す る M I N 回 路 109 と に よ り 構成 さ れ て い る 。 各減 算 回 路 91〜 98の 出 力 デ ー タ 〜 (! 8 は, M F C 101 〜 1 に そ れぞれ入力す る 。
M F C 101 〜 108 に は, 第 52 a 図 に示す右 45度上方 を指向す る 方向 1 の エ ツ ジ ' パ タ ー ン の フ ァ ジ シ · モ デル に対応 し て, メ ン バ ー シ ッ プ関数 Z , N ま た は P が設定 さ れて い る 。 詳述すれば, 画素 P i と P c (明 る さ の差 と Q 5 ) に対応す る M F C 1 G 1 と 105 に は メ ン バ ー シ ッ プ 関 数 Z が, 画 素 P 2 , P 3 , P 4 (明 る さ の差 q り , Q 3 ' Q 4 } に 対 応 す る M F C 102 , 103 , 1 M に は メ ンバ 一 シ ッ プ関数 N が, 画素 P g , P 7 , P 8 (明 る さ の差 q 6 , q 1 , q 8 ) に 対応す る M F C 1 , 107 , 108 に は メ ン バ 一 シ ッ プ 関数 P が, それぞれ設定 さ れて い る 。
M F C 101 は そ こ に設定 さ れて い る メ ン ノ 一 シ ッ プ 関数 Z に対す る 入力 デー タ Q t の適合度 uを算出 し て 出力す る 。 M F C 力《 メ ンバ ー シ ッ プ関数デ 一 夕 を記 憶 し た メ モ リ に よ り 構成 さ れ て い る と き' に は, 入力 デー タ に対応す る メ ン バ ー シ ッ プ関数デ一 夕 を読 出すだ けで足 り る 。 同 じ よ う に M F C 1 G 2 〜 1 Q 8 は, 設定 さ れて い る メ ン バ ー シ ッ プ関数 N , Z ま た は P に
対す る 入力 τ 夕 q 2 q g の適合度 i 2 β 8を演 算 し て 出 力す る 。
M I N 回 路 109 は , M F C 1 Q 1 1 か ら 出 力 さ れ る 遍合 度 11 β 18の う ち の最小の も の を選択 し , ェ ッ ジ適合度算 出 回路 111 の適合度 1 と し て 出 力す
-S) o の適合度 // 1 の値が大 き い ( 1 に近 い) 程, 画 素 P 0 の 明 る さ を基準 に し て こ の ウ ィ ン ド ウ 内 の他の 画素の デ ー タ の 2 値化を行 う と , よ り 適切 な 2 値化画 像が得 ら れ る こ と に な る 。
他の エ ッ ジ適合度演算回路 112 〜 118 の M F C に は 第 52 b 図〜第 52 h 図 に示 さ れ る エ ツ ジ · パ タ ー ン を表 わす メ ン ノ 一 シ ッ プ関数がそ れぞれ設定 さ れて い る 。 減算回路 91〜 98の 出力 デ 夕 q i q 。 の すベて は こ れ ら の エ ッ ジ適 合 度演算 回 路 112 〜 118 に そ れ ぞ れ 与え ら れ, こ れ ら の 回路 112 〜 U 8 か ら 適 合度 2 〜 8 を表わす デ ー タ が得 ら れ る 。
M A X 回路 85は, エ ッ ジ適合度演算回路 111 U 8 が 出力す る 適合度 〜 8 の う ち 最大の も の を選択 し , 適合度 と し て 出力す る 。 ウ ィ ン ド ウ 内 の ェ ッ ジ の方向 (画素パ タ ー ン) を, 方向 1 -方 向 8 (予 め設 定 し たパ タ ー ン) に対応 さ せた場合に得 ら れ る 適合度 の う ち 最 も 大 き い も の が選択 さ れ る の で, 適 台度 β は, 方向 1 〜方 向 8 の う ち 最 も 合致 し た方向 の適合度 を表わ し て い る こ と に な る 。
M A X 回路 85か ら 出力 さ れ る 適合度 // は, 減算回路 87に与え ら れ る 。 こ の減算回路 Πの の他方の 入力 と し て 1 発生回路 86か ら 出力 さ れ る 論理値 1 を表わすデ ー 夕 が与え ら れて い る 。 減算回路 Πは, 値 1 か ら 適合度 を減算 し た値 = 1 — ^ を 出力す る 。 こ の値 は最 も 適切 な エ ッ ジ · パ タ ー ン に対す る 非適合度 (エ ッ ジ ら し く な さ ) を表わ し て い る 。
以上 の 処理 は, 1 フ ィ ー ル ド ( ま た は 1 フ レ ー ム ) 分の 画像デ ー タ の 全画素に わ た っ て ウ イ ン ド ウ を走査 す る こ と に よ り 繰返 し行わ れ る 。 し た力《 つ て, 全画素 に つ い て (全画素を そ れぞれ中心画素 と し た ウ イ ン ド ゥ に つ い て) 非適合度 が求め ら れ る 。
非適合度演算部 81で得 ら れた非適合度 は非適合度 ヒ ス ト グ ラ ム生成部 82に与え ら れ る 。 非適合度 ヒ ス ト グ ラ ム 生 成部 82に は ま た , 上述 し た よ う に 中心画素 P 0 の 画像デ ー タ (中心画素 P n 0 の 明 る さ を表わ す) が与 え ら れ て い る 。 非適 合度 ヒ ス ト グ ラ ム 生成部 82 は, 与え ら れ る 非適合度 を, そ の 非適台度 を生 じ さ せ た 中心画素 P Q の 画像デー タ に よ っ て表わ さ れ る 明 る さ ご と に ( 8 ビ ッ ト 表現の場合 に は, 256 段階の 各段階 ご と に) 累積加算 し て非適合度 ヒ ス ト グ ラ ム を 生成す る 。 こ の非適合度 ヒ ス ト グ ラ ム は, 横軸が明 る さ で あ り , 縦軸が非適合度の加算値で あ る 。
明 る さ ヒ ス ト グ ラ ム 生成部 Πは, 与え ら れ る 基準画
素 P o の 画像デ — 夕 (明 る さ ) に基づい て, 明 る さ ご と に, そ の 明 る さ を も つ 基準画素 P 0 の数を累積加算 し て, 明 る さ ヒ ス ト グ ラ ム を生成す る o こ の 明 る さ ヒ ス ト グ ラ ム の横軸 は 明 る さ (た と え ば 2 5 6 段階) , 縦 軸 は そ の 明 る さ を も つ 画素数で め る o
非適合度 ヒ ス ト グ ラ ム生成部 8 2に い て生成 さ れた 非適合度 ヒ ス ト グ ラ ム お よ び明 る さ ヒ ス ト ダ ラ ム 生成 部 8 3に お い て生成 さ れ た 明 る さ ヒ ス ト グ ラ ム を そ れぞ れ表わ すデ ー タ は画質 ヒ ス ト グ ラ ム生成部 8 4に与え ら れ る 。 画質 ヒ ス ト グ ラ ム 生成部 8 4は, 明 る さ ご と に , 非適合度 ヒ ス ト グ ラ ム に お け る 非適 合度の 累積加算値 を, 明 る さ ヒ ス ト グ ラ ム に お け る 対応す る 画素数で除 算す る こ と に よ り , 正規化 し , 非適合度 の平均値を 算出す る 。 こ の非適合度 の平均値を縦軸 に, 明 る さ を横軸 に そ れぞれ と っ てで き る ヒ ス ト グ ラ ム が第 5 4図 に示す画質 ヒ ス ト グ ラ ム で あ る 。 縦軸 に お け る 非適合 度 の平均値 は画質の評価基準 と し て の 画質の悪 さ を 表わ し て い る 。
第 5 4図 の 画 質 ヒ ス ト グ ラ ム に お い て , 最 大 値 を ο ^ m a X ,' 最取小 J 値 'し ^ Q m i n と す る 。 最小値 Q m i n が得 ら れ る 明 る さ k 0 p t を し き い値 と し て画質デ ー タ を 2 値 化す る と , 画質の悪 さ が最 も 小 さ く な っ て最 も 良好な 2 値画像デ ー タ が得 ら れ る o
C P U 6 5は, 画質 ヒ ス ト グ ラ ム生成部 8 4に よ っ て生
成 さ れ た 画質 ヒ ス ト グ ラ ム か ら 画 質 の 悪 さ の 最大値
Q m a x と 最小値 Q m i n と を読取 る ' さ ら に C P U 65は 最小値 Q m i n に対応す る 明 る さ を読取 る こ の 後 C P U 65は画質 ヒ ス ト グ ラ ム に お い て明 る さ k Q p t を 中心 に横軸上を 明 る い方 と 暗 い方に そ れぞれ探索 し て い っ て, 縦軸の値が最初 に ( 1 a ) X Q —
^ m a。 T + a x
X Q m i n の値を超え る 明 る さ の 幅 W B を算出す る 。 こ こ で a は 1 よ り 小 さ い正の 係数であ り , 許容度を表わ す。
C P U 65は照明装置 11の設定高 さ h に お け る 照明の 評価値 V を第 (5) 式に し たが っ て計算 し, そ の 計算結 果を R A M に格納す る 。
Q m a x
V = • B … (5)
Q m l n
第 (5) 式 に お い て, Q m a x ' Q m 1 π は画質 ヒ ス ト グ ラ ム に お け る 谷の 深 さ を表現 し て お り , こ の値が大 き い ほ ど, エ ッ ジ ら し い部分 と エ ッ ジ ら し く な い部分が は っ き る 分れて い る の で画像の コ ン ト ラ ス ト 力く は っ き り し て い る と い う こ と に な る 。 ま た W B は上述の よ う に谷の 幅で あ る 力、 ら , こ の値が大 き い ほ ど照明装置の 照度が変動 し て も 画質が変わ ら な い, す な わ ち 対照度 変動性力 よ い と い う こ と に な る 。
上記評価値 V の 算出 は, 第 (5) 式 に 限 ら ず, 以下の 第 (6) 式〜第 (10)式を用 い て行 う こ と も で き る 。
Q m a x
V = … (6)
V W B … m
V =
Q …
m l n W B
V =
Q … (9) m l n
Q W B
m a x
V = x … (10)
Q m l n k o p t と く に第 ( 1 G )式 は光源の 照度変動の絶対値 と 安定 に 撮 で き る 明 る さ の 幅 を 考慮 し た 評 価値 を 与 え 。 一般 に光源の 劣ィ匕 に よ り 暗 く な る 度合 い は そ の と き の 照度 に 比例 し て い る の で, 照度の 低 い光源の方が劣化 に-よ る 照度 変動 の 絶対値 は 小 さ い 。 一方, 幅 W B は 一定で あ る 。 ( Q m a x ^ Q . i n ) W B が一定で あ る と 仮定す る と k 0 p t は小 さ い方力《 よ L が小 さ
k o p t
い ほ ど評価値 V は大 き い。
55図 は, 照明装置 11の設置高 さ h と 照明 の評価値
V と の 関係を示す。 あ る 設置高 さ h Q p t に お い て照明 の評価値 V が最大値 V m a χ を と り , そ の両側で は評価 値 V は単調 に減少 し て い る 。 すな わ ち , 評価値 V は 1 個 の ピ ー ク を も つ 凸関数で あ る 。
し た が っ て, 照明装置 11の 高 さ は評価値 V を考慮 し て次の よ う に し て最適な と こ ろ に 設定す る こ と がで き
る
あ る 設置高 さ h O で評価値 V Q が得 ら れ, 次 に 設置 高 さ h i ( h 1 > h 0 ) ま で高 く し た と き に よ り 大 き な評価値 V I ( V 1 > V 0 ) が得 ら れた場合 に は, 最 適 な設置高 さ h Q p t に設定す る た め に は, さ ら に 高 さ h を高 く す る 方向で照明装置 11の 高 さ 調整を行え ば よ い o
逆に あ る 設置高 さ h O で評価値 V 0 が得 ら れ, 次 に 設置高 さ を h i ( h 1 > h 0 ) ま で大 き く し た と き に よ り 小 さ な評価値 V I ( V 1 < V 0 ) が得 ら れた場合 は, 最適な設置高 さ h fl p t に設定す る た め に は, 設置 高 さ h を低 く す る 方向で照明装置 11の高 さ 調整を 行え ばよ い。
画像処理装置 40の C P U 65は, 対象物 O B を カ メ ラ 20に よ っ て撮像 し, カ メ ラ 20か ら 出力 さ れ る 映像信号 を A / D 変換 し て得 ら れ る 画像デー タ に基づい て撮像 画像の 画質を評価 し, 照明装置 11の 位置設定 に 関す る 指示を表示装置 41に表示す る こ と に よ り , ユ ー ザが照 明装置 11を適切な位置 に設定す る 操作を支援す る 。
第 56図お よ び第 57図 は こ の よ う な C P U 65に よ る 処 理手順を示す も の で あ る 。
C R T表示装置 41に, 第 58図に示す よ う な メ ッ セ 一 ジ を 含 む 初期 画面 が表示 さ れ る ( ス テ ッ プ 1 ) 。 ユ ーザ は こ の初期画面を見て, 止め具 を ゆ る め て照
明装置 11を適当 な 高 さ h 0 に位置決め し , 止め 具 34を 締め固定す る 。 ユ ー ザ は照明装置 11の設定が終了す る と キ ー ボー ド 69の設定キ ー を押すの で, ス テ ッ プ 332 で Y E S と な る 。
C P U 65は テ レ ビ · カ メ ラ 20に対象物の 像を撮像 さ せ , 得 ら れ る 映 像 信号 を 画 像 入 力 部 Uに 取込 ま せ る (ス テ ッ プ 3 Π ) 。 必要な ら ば, 撮像画像 は表示装置 41に表示 さ れ る 。
画像入力部 で は取込ん だ映像信号を A Z D 変換 し て画像デー タ に変換 し た の ち , 上述 し た手法 に よ り 画 質 ヒ ス ト グ ラ ム を生成す る 。 C P U 65は画質 ヒ ス ト グ ラ ム 生成部 84で生成 さ れ た 画 質 ヒ ス ト グ ラ ム か ら 画 質の悪 さ の最大値 Q m a χ と 最小値 Q m i η , お よ び最小 値 Q m i n に対応す る明 る さ k Q p t を読取 る ( ス テ ッ プ 334 ) 。 さ ら に C P U 65は画質 ヒ ス ト グ ラ ム か ら そ の 谷 に お け る 明 る さ の 幅 W B を決定 し , 第 ( 5 ) 式 ま た は 第 ( 6 ) 式〜第 ( 10 )式の い ずれかの演算を実行 し て照明 の評価値 V 0 を算出 し , そ の値を R A M 67に ス ト ア す る ( ス テ ッ プ 335 ) o
続い て C P U 65は表示装置 20に 第 59図 に示す よ う な メ ッ セ ー ジ を表示 さ せ る ( ス テ ッ プ Π 6 ) o ユ ー ザ は こ の表示を見て照明装置 11を手動で, 初期高 さ h 0 よ り も 高 い適当 な 高さ 位置 h i に移 し て固定す る 。 こ の 後 ユ ー ザ は 設定 キ ー を 操作 す る の で ス テ ッ プ 337 で
YES と な る 。
対象物の撮像, 画像デー タ の 入力, 入力画像デー タ に 基づ く 画 質 ヒ ス ト グ ラ ム の 作成 が再 び行 わ れ ( ス テ ツ プ 338 ) , こ の新た な 画質 ヒ ス ト グ ラ ム に基づい て高 さ h 1 に対応 し た照明の評価値 V I が算出 さ れ る (ス テ ッ プ Π 9 , 340 ) 。
C P U 65は前回 (初期状態) の 評価値 V 0 と 今回 の 評価値 V I と を 比較 し て ( ス テ ッ プ 341 ) , V I 〉 V 0 で あ れば前回の 評価値 V 0 を今回の 評価値 V 1 で 置 き かえ る た め に, 今回の評価値 V I を R A M に記 憶す る (ス テ ッ プ 342 ) 。 ま た, 照明装置 11の 高 さ を さ ら に高 く さ せ る た め に第 59図の メ ッ セ ー ジ が表示装 置 41に表示 さ れ る (ス テ ッ プ ) 。
の 場合 に は , C P U 65は 今 回 の 評価値 V I を R A M に記憶 し て評価値を更新 し (ス テ ッ プ 344 ) , 照明装置 11の高 さ を低 く さ せ る た め に第 60図 に示す メ ッ セ ー ジ を表示装置 41に表示 さ せ る (ス テ ツ プ 5 ) 。
第 59図の メ ッ セ ー ジ が表示 さ れた と き に は ユ ー ザ は 照明装置 11を前回 よ り 高い高 さ 位置 h 1 に変更す る 。 ま た第 6 Q図の メ ッ セ ー ジが表示 さ れた と き は, ユ ー ザ は 照 明 装置 11を 前 回 よ り 低 い 高 さ 位 置 h 1 に 変更す る 。 こ の 後, ユ ー ザ は キ ー ボー ド Πの設定キ 一 を操作 す る の で ス テ ッ プ 346 の判定が Y E S と な っ て ス テ ッ プ
3 3 8 に 戻 る 。 C P U 6 5は 再 び カ メ ラ 2 0に よ る 対象物 0 B の 撮像, 画質 ヒ ス ト グ ラ ム の作成, 評価値の算出 を繰返す。
こ の よ う に し て表示装置 4 1に表示 さ れた メ ッ セ ー ジ を見な が ら ユ ー ザ は照明装置 1 1の設置高 さ を上下 に調 整 し かつ移動量を次第 に 小 さ く し な が ら 上記の手順を 返す 。 遂 に 高 さ を わずか に調整す る だ け で第 5 9図 と 第 6 0図の メ ッ セ ー ジ が切換わ る 状態 と な る 。 そ の と き の設置高 さ の近傍が最適な 設置高 さ h Q p t であ る と い ラ こ と に な る 。 最後 に ユ ー ザ は キ ー ボ ー ド 6 9の 終了 キ ー を操作す る の で ( ス テ ッ プ 3 4? ) , 調整作業が終 了す る
( 7 ) 最適照明条件設定支援装置 (そ の 2 : 照明装置の 位置 の設定)
上述 し た最適位置設定の支援装置 は ユ ー ザが照明装 置 1 1の 位 置 を 手動 で 位 置決 め す る も ので あ る 。 次 に ユ ー ザが照明装置 1 1の移動方向 と 移動距離 ( ま た は位 置) を キ ー ボ ー ドか ら 入力す る こ と に よ り , 照明装置 1 1が指令 さ れ た 位置 に 自 動的 に位置決め さ れ る 実施例 に つ い て述ベ る 。
画像処理 シ ス テ ム と し て は第 U図 に 示す 自 動昇降機 構を備え た も の が用 い ら れ る 。 画像処理装置 4 0の構成 と し て は第 4 7図 に 示す も の が用 い ら れ る 。 鎖線で示す よ う に , パ ル ス · モ ー タ Πが I / 0 制御部 6 8に接続 さ
れ る 。 こ の モ ー タ Πは C P U 65か ら の 指令 に よ り ( ま た は I / O 制御部 δ8か ら の 指令に よ り ) 駆動制御 さ れ 第 48図お よ び第 図に示す各種回路の 構成 も そ の ま ま 用 い ら れ る 。
第 61図お よ び第 図 は C P U 65に よ る 処理手順を示 し て い る 。 こ の 図 に お い て も 第 56図お よ び第 57図 に 示 す も の と 同一物 に は 同 一 符号 を 付 し 重複説 明 を 避 け る o
第 61図 に お い て ス テ ッ プ Π1 〜 Π6 の処理は第 56図 に 示す も の と 同 じ で あ る 。
第 59図 に示 さ れた メ ッ セ ー ジ を見てユ ー ザ は, キ ー ボ一 ド 69か ら , 照明装置 Uの 移動方向 (上 ま た は下) と 移動距離 と を入力 し ( ス テ ッ プ 352 ) , 設定キ ー を 操作す る ( ス テ ッ プ Π 7 ) 。
す る と , キ ー ボー ド 69か ら 入力 さ れた移動方向 お よ び移動距離を表わすデ ー タ に基づい て, I Ζ◦ 制御部
68を介 し てパ ル ス , モ ー タ 37が駆動 さ れ る (ス テ ッ プ 353 :) 。 こ れ に よ り , 照明装置 11は指定 さ れた方向 に 指定 さ れた距離移動 し た の ち , そ こ に停止す る 。 こ の 後, 対象物 0 Β の 撮像, 画質 ヒ ス ト グ ラ ム の作成, 評 価値 V 1 の 算出が行わ れ る (ス テ ッ プ 338 〜 3 U ) 。
ュ一ザ は表示装置 41に表示 さ れた第 59図 ま た は第 60 図の メ ッ セ ー ジ を見て, メ ッ セ ー ジ に し た 力く つ て照明 11の移動方向 と 移動距離 と を キ 一 ボー ド Πを通 し
て入力す る の で ( ス テ ッ プ 3 5 4 , 3 5 5 ) , こ の後, 設 定キ 一入力があ れば ス テ ッ プ 3 5 3 に戻 っ て モ ー タ Πの 駆動制御 に よ り 照明装置 1 1の移動が行わ れ る 。
こ の よ う に し て表示装置 Uに表示 さ れた メ ッ セ ー ジ を見な が ら ユ ー ザ は照明装置 1 1の設置高 さ をキ ー ボ 一 ド 6 9か ら 指令を入力す る こ と に よ り 上下 に調整す る 。 調整が完了す る と , ユ ー ザがキ ー ボ ー ド 6 9の終了 キ ー を操作す る こ と に よ り 調整作業が終了す る (ス テ ッ プ 3 4 1 ) o
上述 し た 2 つ の実施例で は, 照明装置 1 1の 移動方 向 を表示装置を用 い た視覚表示 に よ り ユ ー ザ に 指示 し て い る が, 音声 に よ る 指示, 移動方向 に 応 じ た異な る 警 報音等を通 し て ユ ー ザ に 指示 し て も よ い。
( 8 ) 最適照明条件設定支援装置 ( そ の 3 : 照明装置の 位置の設定)
照明装置の高 さ 位置を 自 動的 に最適高 さ に設定す る 装置の実施例 に つ いて詳述す る 。
第 U図 に示す画像処理 シ ス テ ムが採用 さ れ る 。 第 4 7 図 か ら 第 4 9図 に 示 す 画 像 処理装 置 の 構成 が用 い ら れ る 。 第 4 7図 に お い てパ ルス · モ ー 夕 Πが I 0 制御部 6 8に接続 さ れ る 。
C P U 6 5に よ る 制御処理手順が第 6 3図お よ び第 6 4図 に 示 さ れて い る 。 こ こ で も , 第 5 6図, 第 5 7図 に 示す も の と 同一処理 に は 同一符号が付 さ れて い る 。
ま ず, パ ル ス · モ ー タ Πの 回転角度 S i と 回転方向 と がキ ー ボー ド Πか ら 入力 さ れ る (ス テ ッ プ 362 ) 。 回転角度 S に代え て, 移動距離を入力す る よ う に し て も よ い。 こ の 場合に は, C P U 65は照明装置 11を入 力 さ れた移動距離移動 さ せ る に必要な モ ー タ Πの 回転 角 度 0 を算出す る 。 回転方向 は一般 に は上方 と 設定 さ れ る であ ろ う が, 下方 と し て も よ い。
こ の後, キ ー ボー ド 69か ら ス 夕 一 ト · キ ー入力があ る と (ス テ ッ プ 3 ) , 初期高 さ h O に位置決め さ れ た照明装置 11に よ る 照明 の下で対象物 0 B の撮像が行 わ れ, 画質 ヒ ス ト グ ラ ム の作成, 評価値 V 0 の 算出が 実行 さ れ る (ス テ ッ プ 〜 Π 5 ) 。
次 に C P U 65は , ノ、0 ル ス · モ 一 夕 Πを , ス テ ッ プ 362 に お い て 入 力 さ れ た 方 向 へ 初 期設定 さ れ た 角 度 θ { 回転駆動 し て照明装置 11を対応す る 距離上昇 ま た は下降 さ せ る (ス テ ッ プ ) 。 照明装置 11の高 さ 位 置 は h i と な る 。 こ の 高 さ 位置 h i で撮像, 画質 ヒ ス ト グ ラ ム の 作成, 評 価値 V I の 算 出 が行わ れ る ( ス テ ツ プ 339 , 340 ) 。
C P U 65は, 前回の評価値 V 0 と 今回の 評価値 V I と の差の絶対値が所定の し き い値 T H以下で あ る か ど う かを判定す る (ス テ ッ プ 5 ) 。 こ の判定で N 0と な れば 1 に進む。
こ の 判定で Y E S の 場 合で あ っ て も , 角 度 Θ ( ス テ ツ
プ 3 6 7 で更新 さ れた 角 度) が所定の し き い値 0 t h以下 で あ る か ど う かが判定 さ れ, N 0で あ ればや は り ス テ ツ プ 3 4 1 に進む。
ス テ ッ プ 1 で は 評価値 V 0 と V 1 と が比較 さ れ o
V 1 〉 V 0 で あ れば, ス テ ッ プ に 戻 っ て, 前回 と 同 じ 角 度 0 i だ けパ ル ス · モ ー タ 3 7が前回 と 同 じ 方 向へ回転駆動 さ れ照明装置 1 1が同方向へ上昇 ま た は下 降 さ れ る 。 こ の 後, 再 び撮像, 評価値の 算出が行わ れ
O o
V I の 場 合 に は , ノ、0 ノレ ス · モ ー 夕 Πの 回転 角 度 0 が前回 の 角 度 の半分の値 に設定 さ れ る と と も に , 回 転 方 向 が 反 対 方 向 に 設 定 さ れ ( ス テ ッ プ
3 6 ? ) , ス テ ッ プ Π 4 に戻 る 。 新たに設定 さ れ た角 度 0 だ けパ ル ス · モ ー タ Πが前回 と 反対方 向 に 回転駆動 さ れ照明装置 1 1を反対方向へ移動 さ せ, 再び画像デ 一 夕 の取込み, 評価値の算出が行わ れ る 。
こ の よ う に V 1 ≤ V 0 と 判定 さ れ る ご と に ノ、 ° ル ス · モ ー 夕 Πの 回転角 度 0 が順次小 さ く 設定 さ れかつ 回転 方向が反転 さ れな が ら 同様の手順が繰返 さ れ る 。 そ の 結果, ス テ ッ プ 3 6 5 お よ び 3 の判定が Y E. S と な っ た と き に, 照明装置 1 1は最適な設置高 さ h Q M に設定 さ れた こ と に な る 。 こ れに よ り 照明装置の 高 さ 位置調整 動作が完了す る 。
(9) エ ッ ジ 画像生成装置
上述 し たエ ツ ジ ら し さ の適合度 を用 い てエ ツ ジ 画 像を生成す る こ と がで き る 。
第 図 に示す画像処理装置の構成がエ ツ ジ 画像生成 装置 と し て採用 さ れ る 。 好 ま し く は, 適合度 // を画素 ご と に 記 憶 す る 画像 メ モ リ 88力《 さ ら に 設 け ら れ る 。 第 49図 に示す非適合度演算部 も ま た そ の ま ま 利用 さ れ る 。 非適合度 は不要で, 適合度 ^ の み を 出力 さ せ れ ば よ い o
第 65 a 図か ら 第 65 h 図 は エ ツ ジ適合度算出 回路 11 1 - 118 に そ れぞれ設定 さ れ る エ ツ ジ · パ タ ー ン を表わ す フ ア ジ ィ · モ デルの他の 例 を示 し て い る 。 こ こ で は メ ン ノ 一 シ ッ プ関数 Z は用 い ら れて い な い。 メ ン ノく 一 シ ッ プ関数 P, N は第 53図 に示す形状を も つ 。
第 65 a 図 に 示 さ れ た フ ァ ジ ィ · モ デ ノレ に し た 力 う と , エ ッ ジ適合度算出回路 111 の M F C 101 , 102 , 103 に メ ン バ 一 シ ッ プ関数 P 力く, M F C 105 , 106 , 107 に メ ン バ ー シ ッ プ関数 N がそ れぞれ設定 さ れ る 。 他の M F C 1 お よ び 108 に は, 入力デー タ の 値 に か か わ ら ず, 常 に 最大 の 論理値 1 を 出 力 す る メ ン バ 一 シ ッ プ関数が設定 さ れ る 。
他の エ ッ ジ適合度算出回路 112 〜 118 に も 同 じ よ う に 第 65 b 図力、 ら 第 65 h 図に し た 力《 ぅ メ ン バ ー シ ッ プ関 数が設定 さ れ る 。
画像 メ モ リ 6 2に記憶 さ れて い る 1 フ ィ ー ノレ ド ( ま た は 1 フ レ ー ム ) を構成す る すべて の 画像デ ー タ に つ い て , 画素 ご と に適合度 が算出 さ れ, 画像 メ モ リ 8 8の 対応す る 場 【こ s己 11 さ れ る 。 こ れ に よ つ て, 第 6 6 a 図 に示す よ う な 画像の エ ツ ジ を表わす画像が第 6 6 b 図 に 示す よ う に生成 さ れ る 。 適合度 を適当 な し き い値を 用 い て 2 値つ— 夕 に変換 し た の ち に 画像 メ モ リ 8 8に記 憶 さ せ て も よ い
( 1 0 )最適照明条件設定支援装置 (そ の 4 : 主 に 照明装 置の光度設定)
再 び撮像 に よ り 得 ら れ た対象物の 画像デ ー タ に基づ い て最適照明条件を設定す る , ま た は設定を支援す る 装置の実施例 につ い て説明す る 。
後 に 詳述 る 最; i 照明条件設定支援装置 に よ っ て最 適照明条件が設定 さ れた照明系 を備え た 自 動検査装置 の 全体的 な構成が第 6 7図 に 示 さ れて い る 。 ごの 自 動検 査装置 は, 照明装置 1 0と 力 メ ラ 2 0と 画像処理装置 4 0と 搬送機構 4 5と か ら 構成 さ れて い る 。 搬送機構 は搬送 コ ンベ ア に よ っ て実現 さ れ , 多数の検査対象物 O B を 所定の検査位置へ順次搬送す る 。
照明装置 1 0お よ び カ メ ラ 2 0は検査位置の 上方 に配置 さ れて い る 。 カ メ ラ 2 0は検査位置の対象物 O B を真上 力、 ら 撮像 し , 撮像 に よ り 得 ら れた 画像デ ー タ を 画像 処理装置 4 0に 与え る
照明装置 1 Gは, た と えばハ ロ ゲ ン · ラ ン プ に よ っ て 実現 さ れ, 検査位置の検査対象物 O B を斜め上方か ら 照 明 す る 。 こ の 照 明 装 置 1 Qの 光度 は , 後述す る よ う に, 対象物 O B の最適な検査が保証 さ れ る よ う に最適 な値に設定 さ れて い る 。
画像処理装置 4 0に よ る 対象物 0 B の検査力 良品で あ る か, 欠 けやバ リ があ る 不良品で あ る かを判別す る サ ン プル検査の 場合 に は, 良品 と 不良品 と の判別精度 が最大 と な る よ う に照明装置 1 0の光度が設定 さ れて い る 。 こ れが最適照明条件であ る 。
照明条件 は光度に 限 ら れ る こ と な く , 照明装置 1 0の 設定位置や設定角 度な どで あ っ て も よ い。 ま た最適照 明条件 は画像処理装置 4 こ設定 さ れて も よ い し , 照明 装置 1 0に組み込 ま れた コ ン ト ロ ー ラ に設定 さ れて も よ い。 い ずれに し て も , 設定 さ れた最適照明条件を 満 た す照明が照明装置 1 0に よ っ て行な われ る よ う に, 画像 処理装置 4 Gま た は上記 コ ン ト ロ 一 ラ に よ っ て照明装置 1 0が制御 さ れ る 。
画像処理装置 4 0は, カ メ ラ 2 0か ら 与え ら れ る 対象物 O B を表わ す映像信号を 2 値化処理 し , そ の 2 値画像 デ ー タ を用 い て対象物の面積な どの特徴量を計測 し, そ の計測値を所定の基準値 と 比較す る 処理な ど に基づ い て, 対象物 0 B が良品で あ る の か, ま た は欠 け ゃバ リ な どがあ る 不良品で あ る の かを判断す る 。 判定の基
礎 と な る 特徵量 は面積に 限 ら ず, 周 囲長や重心な どで あ つ て も よ い。
第 6 8図お よ び第 Π図 は, 最適照明条件設定を支援す る 装置を示 し て い る 。 照明装置 1 0 , カ メ ラ 2 0 , 画像処 理装置 4 0 , 表示装置 な ど は簡便化の た め に第 図 に 示 す検 査装 置 に お け る も の と 同 一 符号 で示 さ れ て い o こ れ は検査装置 と 最適照明条件設定支援装置 と は 兼用す る こ と がで き る か ら で あ る 。 も ち ろ ん, こ れ ら の兩装置を別 々 に構成 し て も よ い。
力 メ ラ 2 0は観測位置 O V の 真上で あ っ て 自 動検査装 お け る も の と 同 じ 高 さ 位置 に配置 さ れ る 。 ま た照 明装置 1 0は観測位置 0 V の斜め上方で あ つ て 自 動検査 に お け る も の と 同 じ 高 さ 位置 に 同 じ 傾 き 角度で配 置 さ れる 。 カ メ ラ , 照明装置 と も , 好 ま し ぐ は, 自 動 検査装置 と 支援装 置 と に お い て 同 じ も の が用 い ら れ 0
支援装置 は サ ン プル供給機構を備え て い る 。 こ の サ ン プル供給機構 は, 回転テ ー ブル 1 20 と テ ー ブル駆動 機構 1 2 1 と 検 出器 1 2 3 と を含んで い る 。
回転テ ー ブ ル Π 0 は, 円板状で あ っ て, そ の上面周 縁部 に は良品サ ン プル 0 B a と , 欠 け があ る 不良品サ ン プル 0 B b と , ノ リ があ る 不良品 サ ン プ ル 0 B c と が, そ れぞれ複数個ずつ 等角度間隔で位置決 め固定 さ れて い る 。
回 転 テ 一 プ ル 12 fl 上 に お い て, 各 サ ン プ ル の 固定 位 置 の 外 側 に は 金 属 板 に よ り 成 る 識 別 体 122 a ,
122 b , 122 c 力 固 定 さ れ て い る 。 こ れ ら の 識 別 体 122 a , 122 b , 122 c は 各 サ ン プ ノレ O B a , 0 B b , 0 B c が観測位置 0 V に到達 し た こ と を検 出 器 123 に検出 さ せ る た め の も の で あ る 。 良品サ ン プル 0 B a に つ い て の識別体 122 a の設置高 さ と , 欠 けが あ る 不良品サ ン プル 0 B b に つ い て の識別体 122 b の 設置高 さ と , ノ リ カ あ る 不良品サ ン プル 0 B c に つ い て の識別体 122 c の設置高 さ と は, 相互 に異な っ て い
Ό o
テ ー ブル駆動機構 Π 1 は, 回転テ ー ブル 120 の 回転 中心 に連結 さ れた モ ー タ を含み, 画像処理装置 40か ら の 制御信号 に応答 し て回転テ ー ブル 12 Q を 間欠的 に 回 転 さ せ, 各サ ン プゾレ O B a , 0 B b , O B c を カ メ ラ 120 の 視野内 の観測位置 0 V へ順次導 く 。
検出器 123 は, 観測位置 0 V に到達 し た良品サ ン プ ル 0 B a と 欠けの あ る 不良品サ ン プル 0 B b と バ リ の あ る 不良品サ ン プル ◦ B c と を相互に 区別 し て検出す る た め の も の で, 回転テ ー ブル 120 の外側 に配置 さ れ て い る 。
こ の 検 出 器 123 は 3 個 の 近接 ス ィ ッ チ 123 a , 123 b , 123 c か ら 構成 さ れ て お り , 第 1 の 近接 ス ィ ツ チ 123 a は良品サ ン プ ゾレ 0 B a に つ い て の識別体
122 a を検出す る た め に識別体 122 a と 同 じ 高 さ 位置 に, ま た第 2 の近接ス ィ ッ チ 123 b は欠 け の あ る 不良 品サ ン プル 0 B b に つ い て の識別体 122 b を検 出す る た め に識別体 1 Π b と 同 じ高 さ 位置 に, さ ら に 第 3 の 近 接 ス ィ ッ チ 123 c は バ リ の あ る 不 良 品 サ ン プ ル 0 B c に つ い て の識別体 1 Π c を検出す る た め に識別 体 122 c と 同 じ 高 さ 位 置 に , そ れ ぞ れ設 置 さ れ て い る 。 各近接ス ィ ッ チ 123 a , 123 b , 123 c は識別体
122 a , 122 b , Π 2 c を そ れぞれ検出 し た と き に検 出信号を画像処理装置 40に与え る 。
第 7 G図 は 画像処理装置 40の 回路構成を示す も の で, A / D 変換器 U 1 , 2 値化処理部 1 Π , 表示装置 41. 同 期 信 号 発 生 部 U 3 ,. C P U 130 , R 0 M 135 , R A M 134 , 外部記憶装置 1 な ど に よ り 構成 さ れて い る 。
A Z D 変換器 131 は カ メ ラ 20か ら 出力 さ れ る ァ ナ 口 グ映像信号を デ ィ ジ タ ル画像デー タ に変換す る 。 2 値 化処理部 132 は A Z D 変換器 131 か ら 与え ら れ る デ ィ ジ タ ル画像デー タ を所定の し き い値で 2 値化す る 示装置 41は 2 値化処理 さ れた 画像デ ー タ に よ っ て表わ さ れ る 2 値化画像を表示す る 。 同期信号発生部 133 は 垂直同期信号, 水平同期信号, そ の他の タ イ ミ ン グ信 号を発生 し , こ れ ら の 信号を A Z D 変換器 U l , 2 値 化処理部 1 Π , C P U U 0 に与え る 。
C P U 130 は, 最適な照明条件を探索 し て決定す る た め の 制 御 お よ び 演算 の 実行主体 で あ っ て, 検 出 器 123 か ら の 検 出 信号 を 受入 れ る と と も に , 照明装置 10, テ ー ブ ル駆動機構 121 な ど の 動作 を 制御す る 。 R 0 M 135 に は プ ロ グ ラ ム が格納 さ れ, R A M U 4 に は各種デ ー タ が一時記憶 さ れ る 。 外部記憶装置 1 は フ ロ ッ ピ 一 デ ィ ス ク 装置 な ど に よ り 構成 さ れ, 決定 さ れた照明装置 10の最適照明条件な どを記憶す る 。
第 7 ί図 は, 照明装置 i 0の最適な照明条件を決定す る た め の C P U U G に よ る 処理手順を示す も の であ る 。
ま ず , 回 転 テ ー ブ ル 12 G 上 に 配 置 さ れ た 良 品 サ ン プル O B a の 個数 N 。 , 欠 け の あ る 不良品サ ン プル O B b の個数 N b リ の あ る 不良品サ ン プ ル O B c の個数 N p がそ れぞれキ ー ボ ー ドか ら 入力 さ れ る (ス テ ツ プ 371 ) 。 ス タ ー ト 指令が与え ら れ る と , 画像処 理装置 40が始動信号を テ ー ブル駆動機構 121 に与え る の で, 回転テ ー ブル 12 Q が回転す る (ス テ ッ プ Π 2 ) いずれかサ ン プルが観測位置 0 V に到達す る と , そ れが良品サ ン プル 0 B a で あ れば第 1 の近接ス ィ ツ チ 123 a 力 , 欠 け の あ る 不良品サ ン プル 0 B b で あ れば 第 2 の近接ス ィ ッ チ 1 Π b が, バ リ の あ る 不良品サ ン プル 0 B c で あ れば第 3 の近接ス ィ ッ チ 1 Π c が, そ れぞれ対応す る 識別体 122 a , 122 b , 122 c を検出 し て, 検出信号を 画像処理装置 40へ与え る (ス テ ッ プ
Π3 ) o
こ の検出信号が入力す る と , C P U 130 は停止信号 を 出 力 し て テ 一 プ ル駆動機構 121 を 停止 さ せ , 回転 テ ー ブル 120 の 回転を止め る (ス テ ッ プ 374 ) 0 こ れ に よ り サ ン プ ル は観測位置 0 V の カ メ ラ 20の視野内 に 位置決め さ れ る 。
こ の 実施例 で は照明装置 10の光度が最適化 さ れ る 。 照明装置 1 ϋに は画像処理装置 4 Qか ら 初期光度が与え ら れて お り , 照明装置 10は こ の 初期光度で発光 し , サ ン プルを照明 し て い る 。 照明装置 10に よ る 照明下で観測 位置 O V の サ ン プルが カ メ ラ 20に よ り 撮像 さ れ る (ス テ ツ プ 375 ) 。 カ メ ラ 20の 出力映像信号 は 画像処理装 置 4 βに入力す る 。
こ の 映 像 信号 は A Z D 変換 さ れ, か つ 2 値化 さ れ る 。 C P U UQ は こ の 2 値画像デ ー タ を用 い て観測位 置 O V の サ ン プ ル の 特 徴 量 を 計 測 す る ( ス テ ッ プ 376 ) 。 こ の 実施例で は特徴量 は撮像画像上 に お け る サ ン プ ル の 面積 で あ る 。 計 測 さ れ た 特 徴量 は R A Μ 134 に記憶 さ れ る 。
R A M 134 内 に は, 良品用, 欠 け の あ る 不良品用 お よ びバ リ の あ る 不良品用 の 特徴量を そ れぞれ別個 に記 憶す る エ リ ア が設 け ら れて い る 。 C P U 13Q は検出器 123 か ら 入力す る 検出信号 に基づ い て観測位置 0 V の サ ン プルが良品, 欠 け の あ る 不良品 ま た は バ リ の あ る
不良品 の い ずれの サ ン プルで あ る かを判定 し, 計測 し た特徵量を, 判定 し た種類の サ ン プ ル用 の記憶エ リ ア に S匚 Ί思 す る o
ス テ ッ プ 372 〜 376 の処理 は回転テ ー ブル 120 上の すべて の サ ン プル に つ い て順次, 行な わ れ る 。 処理の 回数が, 先 に入力 さ れた サ ン プ ル の個数の 総和 N a + N b + N „ に達すれば回転テ ー ブル G は 1 回転 し た こ と に な る (ス テ ッ プ Π 7 ) 。
回転テ ー ブル 120 上の すべて の サ ン プル に つ い て特 徵量 (面積) の計測が終了す る と , R A M 134 内 に記 憶 さ れた計測面積の サ ン プルの 種類 ご と の総和を, サ ン プル個数 N a , N b ま た は N „ でそ れぞれ除算す る こ と に よ り , 良 品 サ ン プ ノレ O B a の 面 積 の 平 均 値 S . , 欠 け の あ る 不良品サ ン プル O B b の面積の平均 値 S t , お よ びノ リ の あ る 不良品サ ン プ ル O B c の 面 積の平均値 s e が求め ら れ る (ス テ ッ プ ) 。
こ れ ら の平均値 s a , s b , s e を用 い て, 良品 と 不良品の判別精度の評価値 S が次式 に よ り 算出 さ れ る
( ス テ ッ プ 379 ) o
S = I S c - S a I + I S a - S b I … (11) こ の評価値 s が大 き い程良品 と 不良品 と を判別で き る 精度力 高い と い う こ と に な る 。
照明装置 10に設定す る 初期光度を変え なが ら 第 71図 に示す評価値算出処理を複数回繰返す。 初期光度を横
軸 に と り , 算 出 さ れた評価値 S を縦軸 に と る と , 第 5 5 図 に 示 す 評価値 V と 同 じ よ う に , 評価値 S は 1 つ の ピ ー ク を も つ 凸関数 と な る 。 そ こ で, 最大値 ま た は そ の 付近の評価値を与え る 初期光度が, 良品 と 不良品 と を 最 も 高精度 に 判 別 で き る 照 明 条件 を 示 す こ と に な る 。 こ の よ う な 初期光度力く C P U 1 3 Q に よ り , ま た は 操作者 に よ り 決定 さ れ る 。
こ の よ う に し て決定 さ れた最適照明条件 (最適初期 光度) は, そ の他の必要デ ー タ と と も に 外部記憶装置 1 3 6 に記憶 さ れ る 。 最適照明条件 は第 Π図 に 示す検査 装置で利用 さ れ る 。
( U )最適照明条件設定支援装置 ( そ の 5 : 主 に 照明装 置 の光度の設定)
上記実施例で は サ ン プ ルの面積 に基づ い て最適照明 条件が設定 さ れて い る 。 次 に, サ ン プルの 特徵量の 分 散が最小に な る 照明条件が最適な も の で あ る と い う 考 え方に基づ い て, 最適照明条件を設定す る , ま た は設 定を支援す る 装置 に つ い て述べ る 。
上記の考え方 に基づ い て最適化 さ れた照明系 は, 計 測対象物の撮像画像か ら 重心位置, 面積, 周 囲長な ど の特徴量を計測す る 自 動計測装置 に用 い ら れ る 。 こ の 自 動計 測 装 置 の 構成 は 第 6?図 に 示 す も の と 同 じ で あ る
第 Π図お よ び第 Π図 は最適照明条件設定支援装置の
構成を示 し て お り , 第 図お よ び第 69図 に示す も の と 同一物 に は 同一符号を付 し 重複説明を避 け る 。
円板状の 回転テ ー ブル 0 の上面の周縁部に は, 複 数の サ ン プル 0 B „ が等角度間隔で位置決め 固定 さ れ て い る 。 各サ ン プル 0 B S の 固定位置の 外側 に は金属 板よ り 成 る 識別体 122 が同 じ 高 さ で配置 さ れて い る 。 一方, 回転テ ー ブ ル 120 の外側 に は観測位置 0 V の近 傍 に お い て識別体 I Π と 同 じ 高 さ 位置 に近接ス ィ ッ チ よ り 成 る 検 出器 123 が配置 さ れて い る 。
画像処理装置 40の構成 は, 第 70図 に示す も の と 同 じ であ り , そ の 図示お よ び説明を省略す る 。
計測の た め の 最適な照明条件を決定す る た め の処理 手順 も 第 Π図 に 示 す も の と 基本 的 に は 同 じ 流れ で あ る 。 以下 に, 第 U図の処理 と 異な る 点 に つ い て主 に説 明す る 。 こ の 実施例で は, 最初の ス テ ッ プ Π 1 に お い て回転テ ー ブル 120 上 に固定 さ れた サ ン プル O B の 個数が入力 さ れ る 。
回転 テ ー ブ ル 12 G を 回転 さ せ, い ず れ か サ ン プル 0 B c が観測位置 0 V に達す る と 回転テ ー ブル ϋ が 停止 し, サ ン プ ル o s 。 の撮像が行な わ れ る 照明装 置 10に は画像処理装置 40に よ り 所定の 初期光度が設定 さ れて い る 。
画像処理装 置 40は , カ メ ラ 20か ら 取 り 込ん だ 画像 デー タ を処理 し て重心位置や面積な どの 特徴量を計測
し , そ の計測 し た特徴量を記 —9 る 。
上記の動作が回転テ ー プル 1 2 0 上の すべて の サ ン プ ル に つ い て実行 さ れ る 。
すべて の サ ン プ ル 0 B s に つ い て の 計測が完了 す る と , 計測 さ れ た すベ て の サ ン プノレ に つ い て の特徴量の 分散が求 め ら れ る 。 こ の分散が小 さ い程, 特徴量の ば ら つ き が小 さ く , 計測精度 は高い も の と な る 。
画像処理装置 4 0に よ っ て照明装置 1 0の光度が変更 さ れな カ ら , 同様の計測 と 分散の算 出が実行 さ れ る 。 求 め ら れ た分散が最小 と な る 光度が検索 さ れ, そ の 光度 が最適 な 照明条件 と し て決定 さ れ る 。
上述 し た 2 つ の実施例で は い ずれ も 回転テ ー ブルが 設 け ら れて い る が, サ ン プルを載置 し かつ搬送す る も の は第 6 7図 に示す よ う な ベ ル ト · コ ン ベ ア で も よ い 。
( 1 2 )撮像条件決定支援装置
最疫に , 像系 に 含 ま れ る レ ン ズの選択, 対象物 に 対す る カ メ ラ の設置距離の決定等を支援す る た め の装 置 につ い て説-明す る 。
第 Π図 は撮像条件決定支援装置 5 0の構成を示 し て い る 。 第 1 4図 に 示 す も の と 同 - -物 に は 同一符号 を 付す る 。 支援装置 5 0は第 1 4図 に示す支援装置 と 同 じ 画像処 理装置を用 い て も 実現可能な の で便宜的 に 同一符号 5 0 を付 し て お く
撮像条件決定支援装置 5 0に は レ ン ズ選択部 5 7が設 け
ら れて い る 。 こ の レ ン ズ選択部 57は ユ ー ザが入力装置 51か ら 入力す る 情報, た と え ば希望す る 視野の大 き さ や 希望 設 置距離, 何 を 優先 す る か な ど の 情報 に し た が っ て こ れに適す る レ ン ズ, 接写 リ ン グ, 設置距離な ど を 導 く 。
第 75図を参照 し て撮像系 の 各種パ ラ メ 一 夕 の 関係 に つ い て 説 明 し て お く 。
カ メ ラ 20の設置距離 (撮像対象 O B と カ メ ラ 20と の 間の距離 A は次式で与え ら れ る 。
A = ( L s ( F + B - h - A H + d ) / L c )
+ B - h + d - (12) こ こ で, L s : 視野の大 き さ
F : フ ラ ン ジ · ッ ク
B : レ ン ズ 22の 全長
h : レ ン ズ先端か ら 第 1 主点 ま での距離 △ H : 主点間隔
d : へ リ コ イ ド繰 出 し量
L c : 撮像素子の有効画面
ヘ リ コ ィ ド繰出 し量 d は レ ン ズ Π (組合せ レ ン ズ, ま た は レ ン ズ筒) の焦点距離 f 0 を用 い て次式で表わ さ れ る 。
d = ( L c x f o / L s ) — F — B + h + Δ Η
+ f o - (13) カ メ ラ の設置距離 A は第 (13)式力、 ら L s / L c を導
き , そ れを第 (12)式 に 代入す る と 次の よ う に も 表わ さ れ る 。
A = f 0 [ ( F + d + B h - Δ H ) /
( F + d + B - h Δ H - f o ) ]
+ d + B — h - (1 ) 視野 し s は第 ( 1 3 )式 お よ び第 ( 14 )式か ら 次の よ う に 導か «ίレ o
L s = L c ( A - d - B + h ) /
( F + d + B - h - Δ Η ) … (15) フ ラ ン ジ · ノ ッ ク F や撮像素子の有効画面 L c は 力 メ ラ 20に よ っ て決 ま る 定数であ る か ら 固定値 と 考え て よ い。 レ ン ズ全長 B , レ ン ス選択か ら 第 1 主点 ま での 距離 h , 主点間隔 厶 H お よ び実焦点距離 f o は レ ン ズ 22に よ っ て決ま る 定数で あ る の で, こ れ ら の 定数の 集 合を 1 en s と 表現す る こ と に す る 。 定数 l en s は レ ン ズの種類 に よ っ て一義的 に定 ま る 。
そ う す る と , 第 ( 12 )式, 第 ( U )式 は, 関数 f ( ) の 記号 を 甩 い て , そ れ ぞ れ次 の よ う 簡潔 に 表現 さ れ O
A = f ( L s , d , l e n s ) - (16) d = f ( L s , l en s ) … ( 17 )
( 14 )式か ら d を導 く と , へ リ コ イ ド繰 出 し 量 は次 の よ う に も 表わ さ れ る 。
d = f ( A , l e n s ) … (18)
さ ら に, 第 (15)式か ら 視野の大 き さ L s は次の よ う に も 表現 さ れ る 。
L s = f ( A , d , l en s ) … U 9) 第 (16)式か ら 第 (17)式 は, カ メ ラ 設置距離 A と , 視 野の大 き さ L s と , へ リ コ イ ド繰出 し量 d と レ ン ズ定 数 l en s と の 間の 関係を表わ し て い る 。 こ の よ う な 関 係式を も ち い て, 上記 4 つ の パ ラ メ ー タ の う ち の 少 く と も 2 つ を与え れば, 残 り の 2 つ が定ま る 。
第 (16)式か ら 第 (19)式の 関係を利用 し て, 希望す る 視野の 大 き さ L s Q と 希望す る 設置距離 A Q を与え た 場合に最適な レ ン ズの種類を選択す る 処理 に つ い て説 明す る 。 N 種類の レ ン ズ力 あ る も の と し , こ れ ら の レ ン ズにつ い て の 定数 l en s は あ ら 力、 じ め分 っ て い る も の と す る 。 好 ま し く は こ の レ ン ズ定数 l e n s は レ ン ズ の種類 ご と に メ モ リ に あ ら か じ め ス ト ア さ れて い る 。 ユ ー ザ が そ の 都度 レ ン ズ定数 l e n s を 入 力 し て も よ い o
第 図 は, 希望の視野 L s fl を優先す る 場合の処理 を示す も の で あ る 。
ま ず, ユ ー ザ は 入 力 装 置 51か ら 希望 の 視野 L s
0 と , 希 望 の 設 置 距 離 A fl を 入 力 す る ( ス テ ッ プ 380 ) o
第 1 番 目 ( n = l ) の レ ン ズの レ ン ズ定数 l en s が メ モ リ か ら 読出 さ れ, ま た は入力装置 51を通 し て入力
8
さ れ, 希望の 視野 L s Q と n 番 目 の レ ン ズ定数 l e n s と を用 い て, 第 ( 17 )式か ら へ リ コ イ ド繰 出 し 量 d が算 出 さ れ る (ス テ ッ プ 1 〜 3 Π ) 0
へ リ コ イ ド繰 出 し量 d はヘ リ コ ィ ド の最大繰 出 し 量 よ り も 小 さ く な け ればな ら な い の で, 算出 さ れ たへ リ コ イ ド繰 出 し量 d が最大繰 出 し 量 d m a x よ り も 大 き い か ど う かが判定 さ れ る ( ス テ ッ プ 384 ) 。
も し , 算出 さ れたヘ リ コ ィ ド繰 出 し 量 d が最大繰 出 し 量 d m a x よ °^ り J も 大 き い塲合 に は, 次の 第 ( 20 )式 に 示 す不等式 満足す る 厚 さ t の接写 リ ン グを使用 し な け ればな ら な い の で, 第 ( 20 )式を 満 た す厚 さ の接写 リ ン グが選択 さ れ る (ス テ ッ プ 385 ) 。 接写 リ ン グ に 関す る デー 夕 も 好 ま し く は あ ら か じ め メ モ リ に ス ト ア さ れ て い る
t < d < ( t + d m ) … (20) 次に , 算 出 さ れ た へ リ コ イ ド繰 出 し 量 d を用 い て, 第 (16)式 に し た 力 つ て, そ の レ ン ズ に つ い て カ メ ラ 設 置距離 A が算出 さ れ る (ス テ ッ プ Π 6 ) 。
以上の処理 は N種類の レ ン ズ に つ い て繰返 し 行な わ れ (ス テ ツ プ 3 Π , 388 ) , 各処理で得 ら れた レ ン ズ 番号 n , 接写 リ ン グ厚 t お よ び設置 Ϊ巨離 A が メ モ リ に ス ト ア さ れ る
N種類の レ ン ズ に つ い て の処理が終了す る と , こ れ ら の レ ン ズ の 中か ら , 希望 の設置距離 A ^ に最 も 近 い
設 置 距 離 A を も つ レ ン ズ番号 n G が選択 さ れ る ( ス テ ツ プ 289 ) 。 選択 さ れた レ ン ズ番号 n Q に つ い て接 写 リ ン グの厚 さ t に つ い て の デ 一 タ カ《あ ればそ れ も 選 択 さ れ る 。 算出 さ れた カ メ ラ 設置距離 A が実際 に カ メ ラ 20を設置すべ き 距離であ る 。 レ ンズ 22の 全長 B , へ リ コ イ ド繰出 し量 d , カ メ ラ 設置距離 A の 間 に は, 当 然の こ と な 力 ら B + d < A な る 関係が成 り 立た な けれ ばな ら な い の で, そ の よ う な レ ン ズを選ぶ必要が あ る の は い う ま で も な い。
こ の よ う に し て選択 さ れた レ ン ズ の 種類 と , 接写 リ ン グの厚 さ と , 設置距離 A が, 第 図 に示す よ う に , 標示装置 41に 表示 さ れ る 。
第 77図 は希望の設置距離を優先す る 処理を示 し て い る 。 第 76図 に示す処理 と 同 じ も の につ い て は 同一符号 を付 し, 重複説明を避 け る 。
希望の 設置距離 A Q と 第 n 番 目 の レ ン ズ の レ ン ズ定 数 1 e n s と を用 い て, 第 ( 18 )式に し たが っ てへ リ コ ィ ド 繰 出 し 量 d が算 出 さ れ る ( ス テ ッ プ 3 Π ) 。 d > d m, _ の 場合 に は接写 リ ン グ厚 さ t が算出 さ れ る ( ス テ ツ プ Π 5 ) 。
算出 さ れたへ リ コ イ ド繰 出 し量 d を用 い て, 第 (19) 式 に し た が っ て , 視野 L s が算 出 さ れ る ( ス テ ッ プ 391 ) o
以上の処理がすべての 種類の レ ン ズ につ い て繰返 し
行な わ れ る 。 そ の 後, 希望の視野 L s Q に最 も 近 い視 野 L s を も つ レ ン ズ力 選択 さ れ (ス テ ッ プ 392 ) , そ の 選択結果 が 第 78図 の よ う に 表示 さ れ る ( ス テ ッ プ 393 ) o"
最後 に, 希望 の視野を, 指定 さ れた レ ン ズ で実現す る た め の接写 リ ン グ と 設置距離を求め る 処理 に つ い て 説明す る 。 こ の 処理 に つ い て は特 に フ ロ ー ' チ ャ ー ト は示 さ れて い な い。
こ の 場 合 に は , レ ン ズ 22は 既 知 で あ る の で , 第 (17)式 に希望の 視野 L s Q と 指定 さ れた レ ン ズの 定 数 l e n s を代入 し て, へ リ コ イ ド繰 出 し 量 d が算出 さ れ る 。 ヘ リ コ ィ ド繰 出 し 量 d は レ ン ズの へ リ コ ィ ド最 大繰出 し量 d m a χ よ り も 小 さ く な け れ ば な ら な い の で, 算出 さ れた へ リ コ イ ド繰 出 し 量 d が最大繰 出 し 量 d m a„ よ り も 大 き い場合 に は, 第 (20)式の 不等式を満 足す る 厚 さ t の接写 リ ン グが用 い ら れ る 。
次に, 算出 さ れた へ リ コ イ ド繰出 し 量 d と 希望の視 野 L s Q と レ ン ズ 定数 l e n s と を 用 い て 第 (16) 式 に よ っ て設置距離 A が求 め ら れ る 。
こ の場合 に も , レ ン ズの 全長 B と へ リ コ イ ド繰 出 し 量 d , カ メ ラ 設置距離 A の 間 に は, 当然の こ と な が ら B + d < A な る 関 係 力 成 り 立 た な け れ ば な ら な い の で, B + d 〉 A と な る と き に は指定 さ れた レ ン ズで希 望の 視野 は実現で き な い と い う こ と な る 。
以 上 の よ う に し て , 入 力 装 置 5 1か ら 希 望 の 視 野 L s 0 と 希望の設置距離 A Q を入力す る と , 推奨値 と し て, レ ン ズ (焦点距離) , 接写 リ ン グ の 厚 さ , 設置 距離が C R T 表示装置 に表示 さ れ る 。 ま た, 希望の視 野 と レ ン ズ と を入力すれば, そ れ に適 し た設置距離 A が算出 さ れ, 表示 さ れ る 。 産業上の利用可能性
画像処理 シ ス テ ム は , 工場の コ ン ベ ア · ラ イ ン に お け る 製品の検査, ロ ボ ッ ト に よ る 物体の認識等に お い て有効 に利用 さ れ る 。 こ の発明 に よ る 照明条件決定, 最適照明条件設定, 撮像条件決定等の た め の支援装置 は, 検査 目 的 に 合致 し た対象物の適切 な 撮像, 物体の 高精度の認識の た め に, よ り 適切 な照明条件, 撮像条 件をユ ー ザが決定 し, 設定す る た め の ツ ー ル と し て利 用 さ れ る 。