JP4080897B2 - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JP4080897B2
JP4080897B2 JP2003007529A JP2003007529A JP4080897B2 JP 4080897 B2 JP4080897 B2 JP 4080897B2 JP 2003007529 A JP2003007529 A JP 2003007529A JP 2003007529 A JP2003007529 A JP 2003007529A JP 4080897 B2 JP4080897 B2 JP 4080897B2
Authority
JP
Japan
Prior art keywords
density
subject
image processing
image
value
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.)
Expired - Fee Related
Application number
JP2003007529A
Other languages
Japanese (ja)
Other versions
JP2004221987A (en
Inventor
宗利 今田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2003007529A priority Critical patent/JP4080897B2/en
Publication of JP2004221987A publication Critical patent/JP2004221987A/en
Application granted granted Critical
Publication of JP4080897B2 publication Critical patent/JP4080897B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理の対象とされる被写体を撮影する条件である光学系の環境設定を行なう画像処理方法および画像処理装置に関する。
【0002】
【従来の技術】
従来、工場の生産ラインでは、製品や部品等を対象に固体識別、検査、位置計測などを行なう場合、たとえばカメラなどの撮像手段を用いて前記製品や部品等の被写体の画像を入力し、入力された画像を処理することによって、前述の固体識別、検査、位置計測などの目的を達成する画像処理装置が用いられている。
【0003】
前述の被写体の固体識別、検査、位置計測などのために必要とされる被写体の画像を入力する際の撮影条件、すなわち画像処理装置に備わる光学系の環境設定の因子には、撮像手段であるカメラのレンズの焦点合わせ(以後、フォーカスと呼ぶ)および絞り、カメラのシャッタ速度、照明手段の照射光量がある。レンズのフォーカスや絞りの設定は、被写体の形状や被写体に対する照射光量によってそれぞれ異なる。カメラのシャッタ速度の設定は、被写体が移動しているか静止しているかによって異なり、移動している場合にはシャッタ速度を余り遅くすることができないという制約がある。照明手段の照射光量は、被写体の形状、材質および画像入力の対象とする部分によって適正量が異なる。
【0004】
従来、被写体の状態に応じて照射光量ならびにフォーカス、絞りおよびシャッタ速度を組合せるという複雑な光学系の環境設定は、操作者がモニタ画面を目視することによって行なわれている。前述のように光学系の環境は、被写体によって千差万別であり、また被写体の移動速度によっても異なる。したがって、被写体の状態に適応した光学系の環境設定は、熟練操作者でないと行なうことが難しく、また熟練操作者であっても、再現性に乏しいというのが実情である。また適切と判断される光学系の環境設定が操作者毎に異なるので、同一の被写体であっても、設定される光学系の環境が操作者毎に異なるという問題もある。さらにカメラのシャッタ速度は、数値化されて管理され、自動調整されることが多いけれども、カメラのレンズのフォーカスや絞りは、ねじロック機構によって固定されることが多く、照明手段の照射光量も手動調整の電源を使用することが多いので、自動調整が難しいという問題がある。
【0005】
このような問題を改善するために、従来技術では、カメラで今回撮像された画像の濃度平均値と前回撮像された画像の濃度平均値との差、すなわち濃度の変化量を求め、その変化量が予め設定されている閾値を超える場合、その変化量に基づいてシャッタ速度を決定するというカメラのシャッタ速度の自動設定方法が提案されている(特許文献1参照)。
【0006】
またもう一つの従来技術では、カメラで撮影された画像の濃度のヒストグラムを作成し、被写体から切り出すべき画像の形成画素数を基に得られる2値化閾値と、暗部の山と明部の山との間部分の度数分布が最も小さい部分の濃度値である2値化閾値とが一致するように、外部調光機能を有する照明装置の照射光量を自動調整する方法が提案されている(特許文献2参照)。
【0007】
【特許文献1】
特開2001−230967号公報
【特許文献2】
特開平6−139341号公報
【0008】
【発明が解決しようとする課題】
光学系の環境設定の自動化は、前述の従来技術に示すように、カメラのシャッタ速度と照明装置の照射光量とに留まることが多く、数値管理されて自動化が試みられているシャッタ速度と照射光量とであっても、たとえば検査ラインなどを実稼働させることによって自動調整が行なわれている。
【0009】
自動調整の方法を例示すると以下のようである。一旦光学系の環境設定を行ない、その後ラインを稼働させて、たとえば検査に応じた画像処理条件を設定し、その画像処理条件による検査のテストランを実行する。テストの実行結果が不良であり、検査条件に対応した検出結果が得られないとき、まず画像処理条件を検定および/または再調整し、画像処理条件に問題が無いと判断した場合、光学系の環境を再設定する。
【0010】
しかしながら、前述のようにシャッタ速度および照射光量を除いてほとんど自動設定の対象とされておらず、また光学系の環境設定手順が確立されていないので、元の設定を行なった操作者以外の操作者が再設定することは困難であり、元の設定を行なった操作者であっても初めから設定するのと同様の時間を要することがある。このようなことから、従来、光学系の環境設定は、熟練操作者の経験と勘とに頼らざるを得ず、経験の少ない操作者が行なうことは困難であり、また経験の少ない操作者が行なうと設定完了までに長時間を要するので、画像処理装置を備える生産ラインの立上げに長時間を要したり、また実稼働によるテストラン中の製品や部品の不充分な検出に伴う歩留損失を招来するという問題がある。
【0011】
本発明の目的は、光学系の環境設定項目を定量化し、環境設定手順を確立することによって、環境設定を容易に行なうことが可能であるとともに、設定の再現性にも優れた画像処理方法および画像処理装置を提供することである。
【0012】
【課題を解決するための手段】
本発明は、撮像されるべき被写体を撮影し、撮影された被写体の画像処理を行なうに際し、撮影条件である光学系の環境設定を行なう画像処理方法であって、前記被写体が静止状態であるとき、被写体を撮影する撮像手段のシャッタ速度として予め定める値を入力し、被写体が移動状態であるとき、被写体の移動速度を入力し、移動速度に基づいて予め定める演算式を用いてシャッタ速度を設定する第1のステップと、
前記被写体に光を照射する照明手段の照射光量を予め定める量に設定する第2のステップと、
前記撮像手段によって撮影される画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を求める画像処理を行ない、差分和が最大になるように前記撮像手段に備わるレンズのフォーカスを調整する第3のステップと、
前記画像の濃度分布を求め、さらに濃度分布に基づいて最大濃度と最小濃度との絶対値差分である濃度幅を求める画像処理を行ない、濃度幅が最大になるように前記撮像手段に備わる絞りを調整する第4のステップと、
前記画像の濃度分布を求める画像処理を行ない、得られた濃度分布と前記被写体の画像とに基づいて、前記照明手段による照射光量を所望の量に設定する第5のステップと、
前記被写体に対して照射する照射光量を変化させ、各光量と各光量を照射したときの画像濃度との関係から照射光量と画像濃度との線形変換式を作成し、前記線形変換式に基づいて、設定した光学系の環境が適正であるか否かを判断する第6のステップとを含むことを特徴とする画像処理方法である。
【0013】
また本発明は、前記第6のステップにおいて、設定した光学系の環境が不適と判断されるとき、前記第3のステップに戻り以降のステップを実行することを特徴とする。
【0014】
本発明に従えば、被写体が静止状態であるか移動状態であるかによって、撮像手段のシャッタ速度を定量的に決定し、被写体に光を照射する照明手段の照射光量を予め定める量に仮設定し、撮像手段によって撮影される画像濃度の1次微分によって得られる濃度の差分の和である差分和を求め、この定量化された値である差分和が最大になるように撮像手段のレンズのフォーカスを調整し、画像の濃度分布を求め、さらに濃度分布に基づいて最大濃度と最小濃度との絶対値差分である濃度幅を求め、この定量化された値である濃度幅が最大になるように撮像手段のレンズの絞りを調整し、被写体の画像とその濃度分布とに基づいて、照明手段による照射光量を所望の量に設定する。さらに被写体に対して照射する照射光量を変化させ、各光量と各光量を照射したときの画像濃度との関係から照射光量と画像濃度との線形変換式を作成し、線形変換式に基づいて、前述のようにして設定された光学系の環境が適正であるか否かを判断する。また設定された光学系の環境が、線形変換式に基づいて不適と判断されるとき、前述の手順を再度実行することによって光学系の環境を再設定することができる。
【0015】
このように、光学系の環境設定の手順を確立するとともに、光学系の環境である撮像手段のシャッタ速度、絞り、フォーカスを、定量化して設定または定量化された値に基づいて設定し、設定された撮像手段の環境に従って照明手段の照射光量を設定するので、光学系の環境設定が容易になる。また線形変換式によって設定された光学系の環境の適否を診断し、不適の場合には確立された手順に従って再設定するので、光学系の環境が線形変換式という定量化手段によって定量的に適正な値に定められる。したがって、操作者の技能に熟練を必要とせず、再現性よく光学系の環境設定を行なうことが可能になる。
【0016】
また本発明は、撮像されるべき被写体を撮影し、撮影された被写体の画像処理を行なうに際し、撮影条件である光学系の環境設定をすることのできる画像処理装置において、
前記被写体を光量可変に照射することのできる照明手段と、
被写体を撮影する撮像手段であって、シャッタ速度、絞りおよびフォーカス調整の可能な撮像手段と、
前記照明手段の照射光量が所望の量になるように設定入力するとともに、被写体が静止状態であるときは予め定めるシャッタ速度を入力し、被写体が移動状態であるときは被写体の移動速度を入力する入力手段と、
前記移動速度が入力されるとき、移動速度に基づいてシャッタ速度を演算するシャッタ速度演算手段と、
前記撮像手段によって撮影される画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を求めるとともに、前記画像の濃度分布を求め、さらに濃度分布に基づいて濃度の最大値と最小値との絶対値差分である濃度幅と、濃度平均値とを求める画像処理を行なう画像処理手段と、
前記被写体に対して照射する照射光量を変化させ、各光量を照射したときの画像濃度との関係から照射光量と画像濃度との線形変換式を作成する線形変換式作成手段と、
前記線形変換式作成手段によって作成される線形変換式に基づいて、光学系の環境が適正であるか否かを判断する判断手段とを含むことを特徴とする画像処理装置である。
【0017】
本発明に従えば、画像処理装置は、被写体を光量可変に照射することのできる照明手段と、被写体を撮影する撮像手段と、所望の照射光量と撮像手段のシャッタ速度または被写体の移動速度とを入力する入力手段と、被写体の移動速度に基づいてシャッタ速度を演算するシャッタ速度演算手段と、撮影された被写体の画像処理を行なう画像処理手段と、被写体に対する照射光量と画像濃度との線形変換式を作成する線形変換式作成手段と、線形変換式に基づいて光学系の環境が適正であるか否かを判断する判断手段とを含んで構成される。
【0018】
画像処理装置は、撮像手段のシャッタ速度を、被写体の静止または移動の状態に応じて定量化して設定し、また画像の濃度を1次微分することによって得られる濃度の差分の和である差分和と、画像の濃度分布における濃度の最大値と最小値との絶対値差分である濃度幅という画像処理手段によって定量化される値に基づいて、撮像手段の絞りおよびフォーカスを設定し、さらに設定された撮像手段の環境に従って照明手段の照射光量を設定する。
【0019】
このように本発明の画像処理装置では、光学系の環境である撮像手段のシャッタ速度、絞り、フォーカスを、定量化して設定または定量化された値に基づいて設定し、設定された撮像手段の環境に従って照明手段の照射光量を設定するというように、各手段を用いて光学系の環境設定の手順を確立することができるので、光学系の環境設定を行なうことが容易になる。さらに、判断手段は、線形変換式作成手段によって作成される線形変換式に基づいて、光学系の環境が適正であるか否かを判断することができるので、環境が不適と判断されるとき、前述の確立された手順に従って再設定動作を繰返し実行し、適正な環境に設定することが可能である。したがって、操作者の技能に熟練を必要とせず、再現性よく光学系の環境設定を行なうことが可能な画像処理装置が実現される。
【0020】
【発明の実施の形態】
図1は、本発明の実施の一形態である画像処理装置1の構成を簡略化して示すブロック図である。本実施の形態の画像処理装置1は、撮像されるべき被写体2を撮影し、撮影された被写体2の画像処理を行なうに際し、撮影条件である光学系の環境設定をすることが可能であり、工場の生産ラインなどに設けられて製品や部品等を対象に固体識別、検査、位置計測等に用いられる。
【0021】
画像処理装置1は、被写体2を光量可変に照射することのできる照明手段3と、被写体2を撮影する撮像手段4であって、シャッタ速度、絞りおよびフォーカス調整の可能な撮像手段4と、照明手段3の照射光量が所望の量になるように設定入力するとともに、被写体2が静止状態であるときは予め定めるシャッタ速度を入力し、被写体2が移動状態であるときは被写体2の移動速度を入力する入力手段5と、移動速度が入力されるとき、移動速度に基づいてシャッタ速度を演算するシャッタ速度演算手段6と、撮像手段4によって撮影される画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を求めるとともに、画像の濃度分布を求め、さらに濃度分布に基づいて濃度の最大値と最小値との絶対値差分である濃度幅と、濃度平均値とを求める画像処理を行なう画像処理手段7と、被写体2に対して照射する照射光量を変化させ、各光量を照射したときの画像濃度平均値との関係から照射光量と画像濃度との線形変換式を作成する線形変換式作成手段8と、線形変換式作成手段8によって作成される線形変換式に基づいて、光学系の環境が適正であるか否かを判断する判断手段9とを含む。
【0022】
被写体2は、前述のように固体識別、検査、位置計測などの対象とされる製品または部品等であり、半導体チップその他種々の物が挙げられる。照明手段3は、光の出射源である光源11と、光源11に対して電力量を可変に供給できる電源12とを含む。光源11には、たとえば発光ダイオード(略称LED)やタングステンランプが好適に用いられ、電源12から供給される電力量に応じて、被写体2を照射する光が光量可変に出射される。
【0023】
撮像手段4は、Charge Coupled Device(略称CCD)素子を備えるCCDカメラ13と、CCDカメラ13に対する入出力信号をアナログ/デジタルに相互変換するアナログ/デジタル(略称A/D)変換器14と、CCDカメラ13からの画像情報を信号処理して後述の処理回路19へ出力するとともに、処理回路19からの出力に応答してCCDカメラ13の動作制御を行なう信号を出力する撮像表示制御器15と、撮像表示制御器15に接続されてCCDカメラ13による画像情報の随時書込み/読出しが可能な記憶手段であるフレームメモリ16とを含む。
【0024】
CCDカメラ13には、図示を省くけれども、レンズが備えられ、レンズまわりには、レンズの焦点を調整するためのフォーカス機構、露出調整のための絞り機構および速度を可変に設定できるシャッタ機構が設けられる。これらの各機構は、撮像表示制御器15を介して処理回路19からの制御信号によって調整可能であり、また手動で調整することも可能である。また撮像手段4には、モニタ17が含まれてもよい。モニタ17は、液晶や陰極線管などによって構成され、本実施の形態では、デジタル/アナログ(略称D/A)変換器18を介して撮像表示制御器15に接続されて、CCDカメラ13による画像情報を可視像として表示する。
【0025】
処理回路19は、Central Processing Unit(略称CPU)を搭載するたとえばマイクロコンピュータなどによって実現される。この処理回路19が、前述のシャッタ速度演算手段6、画像処理手段7、線形変換式作成手段8および判断手段9を含む構成である。処理回路19は、Read Only Memory20(略称ROM)に予めストアされてあるプログラムに従って動作し、前述の各手段として機能するとともに画像処理装置1全体の動作を制御する。
【0026】
入力手段5は、リモート設定キーである。入力手段はキーボードなどであってもよく、キーボードから各種の設定値を入力するように構成されてもよい。しかしながら、キーボードから各種の設定値をすべて数値入力すると操作が繁雑になり入力所要時間も長くなるので、本実施の形態では、入力手段5をリモート設定キーとし、Random Access Memory21(略称RAM)に、たとえばテーブルデータとして予めストアされる各種の設定値を処理回路19によって読出し、読出された設定値をモニタ17に表示し、表示された設定値からキー操作により選択して入力する構成とした。入力手段5は、入出力(I/O)インターフェイス22を介して、処理回路19を初めとする装置の各手段に接続される。なお入出力インターフェイス22には、前述の照明手段3の電源12が接続される。
【0027】
以下画像処理装置1に備わる光学系である撮像手段4および照明手段3の環境設定について説明する。まずCCDカメラ13のシャッタ速度は、次のように設定される。操作者は、被写体2が静止の状態で撮像されるのか、移動状態で撮像されるのかを判別する。静止状態のとき、操作者は、入力手段5に備わるリモートキーを操作して、メニュー画面をモニタ17に表示し、メニューのうちからシャッタ速度を選択し、シャッタ速度のテーブルデータを表示する。モニタ17に表示されるシャッタ速度のうちから所望のシャッタ速度を選択する。選択されたシャッタ速度は処理回路19に与えられ、処理回路19から出力される制御信号に応じて、撮像表示制御器15がCCDカメラ13のシャッタ速度を設定する。被写体2が静止状態のとき、シャッタ速度は、60分の1(1/60)秒または100分の1(1/100)秒が好適に用いられる。
【0028】
被写体2が移動状態のとき、操作者は、入力手段5に備わるリモートキーを操作して、モニタ17に表示されるメニューのうちから移動速度を選択し、移動速度のテーブルデータを表示する。モニタ17に表示される移動速度のうちから生産ラインにおいて被写体2の移動速度として定められる移動速度を選択する。選択された移動速度は、処理回路19に与えられる。処理回路19に含まれるシャッタ速度演算手段6は、RAM21に予めストアされている画像処理装置1の仕様から、分解能とほぼ撮像手段4の撮像画面領域に相当する移動許容量とを読出し、次式(1)によって、シャッタ速度を演算する。
シャッタ速度=移動速度/(分解能×移動許容量) …(1)
【0029】
また照明手段3による被写体2の照射光量が、入力手段5によって所望の量に設定される。操作者は、入力手段5に備わるリモートキーを操作して、モニタ17に表示されるメニューのうちから照射光量を選択し、照射光量のたとえば設定ボリュームを表示する。モニタ17に表示される照射光量の設定ボリュームから所望の量を選択する。選択された設定値は、処理回路19に与えられる。選択された設定値に対応する制御信号が、処理回路19から入出力インターフェイス22を介して電源12に与えられ、与えられた制御信号に応じて電源12から電力が光源11に供給されるので、照射光量が所望の量に設定される。
【0030】
次に処理回路19に含まれる前述の画像処理手段7、線形変換式作成手段9および判断手段9の動作について説明する。
【0031】
画像処理手段7は、撮像手段4で撮影された画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を演算する画像処理をすることができる。画像濃度の1次微分による差分和は、CCDカメラ13に備わるレンズのフォーカスつまみを回して所定範囲内の各値に設定した状態で求められる。フォーカスつまみの各設定値毎に求められる差分和のうち、最大差分和を示したフォーカスつまみの位置をフォーカスの最適値として選択する。図2は、画像処理手段7によって画像濃度の1次微分を行ない濃度の差分和を求めた例を示す図である。図2では、撮像画面の左上から右下に向って画像濃度の1次微分を実行し、各フォーカスつまみ値に対して濃度の差分和を求め、差分和の最大値を順次置換えるようにして最大差分和(図中では最大濃度和として表記)が得られたことを示す。
【0032】
また画像処理手段7は、撮像手段4によって撮影された画像の濃度分布を求め、さらに濃度分布に基づいて濃度の最大値dmaxと最小値dminとの絶対値差分である濃度幅dw(=|dmax−dmin|)と、濃度平均値davとを求める画像処理を行なうことができる。なおこのとき濃度分散dσを同時に求めることもできる。図3は、画像処理手段7によって画像の濃度分布を求めた例を示す図である。図3では、濃度を横軸に、当該濃度の頻度を画素数で縦軸に示す。濃度幅dwは、濃度分布を示すライン31によって与えられる濃度最大値dmaxと濃度最小値dminとの絶対値差分(|dmax−dmin|)で与えられる。濃度平均値davは、各濃度と当該濃度を示す画素数との積の濃度範囲に亘る和を、全画素数で除した算術平均値で与えられる。画像濃度分布における濃度幅dwは、CCDカメラ13に備わるレンズの絞りつまみを回して所定範囲内の各値に設定した状態で求められる。絞りつまみの各設定値毎に求められる濃度幅dwのうち、最大濃度幅を示した絞りつまみの位置を絞りの最適値として選択することができる。このような濃度最大値dmax、濃度最小値dmin、最大濃度幅、濃度平均値davおよび濃度分散dσは、RAM21にストアされる。
【0033】
前述のように本実施の形態では、フォーカスつまみおよび絞りつまみを操作者が人手によって調整するけれども、フォーカスつまみおよび絞りつまみ値をテーブルデータとしてモニタ17に表示し、入力手段5でそれぞれの値を選択して入力することによって、処理回路19および撮像表示制御器15を介して調整するように構成されてもよい。
【0034】
線形変換式作成手段8は、前述のように照明手段3による照射光量と、その照射光量で撮影されて得られる画像の濃度との線形変換式を作成する。線形変換式は、撮像画面全域について作成してもよく、また撮像画面内において任意の面積に区分される領域を設定し、その領域について作成してもよい。この線形変換式を作成するために撮像画面内において区分される領域を、以後環境ウインドウと呼ぶ。
【0035】
図4は、環境ウインドウ設定の状態と線形変換式とを例示する図である。図4では、被写体に金属端子32の出ているコネクタ33をとりあげた場合について示す。本実施の形態では、線形変換式を作成するべき環境ウインドウが4つ設定される。第1環境ウインドウ34は、金属端子32を含んで設定され、第2および第3環境ウインドウ35,36は、コネクタ33の白色樹脂部分にそれぞれ設定され、第4環境ウインドウ37は、コネクタ33が載置される搬送台の表面に対して設定され、この搬送台の表面を背景と呼ぶことがある。
【0036】
それぞれ設定された各環境ウインドウに対し、照明手段3による照射光量を、入力手段5からの入力操作によって最小から最大まで(たとえば8ビット調光の場合零(0)から255まで)変化させる。変化の各段階における各照射光量に対する環境ウインドウの濃度平均値davを前述の画像処理手段7によって求める。線形変換式作成手段8は、入力手段5によって設定している照射光量のボリュウム値と濃度平均値davとの関係を、第1〜第4環境ウインドウ34,35,36,37のそれぞれについて求める。照射光量のボリュウム値と濃度平均値davとの関係は、ほぼ線形式として得られる。この線形式および線形式をグラフ化したものを含めて、ここでは線形変換式と呼ぶ。
【0037】
図4(b)に示すライン38が、第1環境ウインドウ34すなわち金属端子部の画像の線形変換式であり、ライン39およびライン40が、第2および第3環境ウインドウ35,36すなわち白色樹脂部の画像の線形変換式であり、ライン41が、第4環境ウインドウ37すなわち背景画像の線形変換式である。ライン39およびライン40には、高濃度側において、照射光量ボリュウム値が変化しているにも関らず濃度平均値davの変化しない部分があり、この部分を便宜上「平坦部」と呼ぶ。一方、ライン39およびライン40の前記「平坦部」を除く部分、ならびにライン38およびライン41は、1次の線形関係にあり、照射光量ボリュウム値と濃度平均値davとを互いに変換できるので、この部分を便宜上「変換部」と呼ぶ。線形変換式作成手段8によって、各環境ウインドウ34,35,36,37について得られる線形変換式は、RAM21にストアされる。
【0038】
判断手段9は、線形変換式作成手段8によって作成される線形変換式に基づいて、設定された光学系の環境が適正であるか否かを判断、すなわち光学系の環境の適否を診断する。図5は、線形変換式の典型を例示する図である。図5に示す線形変換式は、低光量/低濃度(L/Lと略称する)側に形成されるL/L平坦部43と、高光量/高濃度(H/Hと略称する)側に形成されるH/H平坦部44と、L/L平坦部43とH/H平坦部44との間に形成される変換部42とを含む。
【0039】
図5を参照して、判断手段9の判断動作を説明する。判断手段9は、図5に示されるような線形変換式の変換部42の傾き(勾配)または平坦部43,44の横軸長さに基づいて、光学系の環境が適正であるか否かを診断する。変換部42の傾きとは、濃度をY軸にとり、光量をX軸にとるとき、1次式(Y=aX+b)で表される傾き「a」のことである。L/L平坦部43の横軸長さLALとは、L/L平坦部43における光量最大値Lα(=Lα−0)である。またH/H平坦部44の横軸長さLAHとは、H/H平坦部44における光量最大値Lmaxと光量最小値Lβとの差(=Lmax−Lβ)である。
【0040】
判断手段9は、傾きaが、予め定められる基準値gよりも小さい(a<g)、L/L平坦部43の横軸長さLALが予め定められる基準値PLよりも大きい(LAL>PL)、H/H平坦部44の横軸長さLAHが予め定められる基準値PHよりも大きい(LAH>PH)、の3つの条件のうち少なくとも1つを満足するとき、設定されている光学系の環境が不適であると診断する。逆に、判断手段9は、前述の3つの条件すべてを満足しないとき、設定されている光学系の環境が適正であると判断する。
【0041】
基準値「g」「PL」および「PH」は、たとえば経験則によって得られた値が予め定められ、RAM21にストアされる。判断手段9は、線形変換式作成手段8によって作成された線形変換式を直接用いて、または線形変換式作成手段8によって作成されて一旦RAM21にストアされた線形変換式を読出して、前述の変換部42の傾きa、平坦部の横軸長さLAL,LAHを演算し、RAM21から読出した基準値「g」「PL」および「PH」と比較して前述の判断動作を実行する。
【0042】
図6は、本発明の実施の態様である画像処理方法を説明するフローチャートである。図6を参照し、図1に示す画像処理装置1を用いて行なわれる画像処理方法について説明する。
【0043】
ステップs0のスタートでは、図1に示す画像処理装置1と、被写体2とを準備し、被写体2の撮像を開始できる状態にある。ステップs1では、操作者は、被写体2が、静止状態で撮像されるのか、移動状態で撮像されるのかを判断し、静止状態であるとき、CCDカメラ13のシャッタ速度の初期値として1/60秒または1/100秒のいずれかを入力手段5から入力し、移動状態であるとき、被写体2の移動速度を入力手段5から入力する。シャッタ速度の初期値が入力された場合には、初期値がシャッタ速度として設定され、被写体2の移動速度が入力された場合には、前述の式(1)に従ってシャッタ速度演算手段6の演算結果がシャッタ速度として設定される。ステップs2では、入力手段5によって照明手段3による照射光量を予め定める量に仮設定する。このとき仮設定する照射光量の予め定める量には、照明手段3の有する能力の中間値を選択することが好ましい。
【0044】
ステップs3では、CCDカメラ13のレンズのフォーカスつまみを回しながら、焦点合わせ、いわゆるピント調整を行なう。
【0045】
図7は、ピント調整動作を説明するフローチャートである。図7を参照して先の図6に示すステップs3のピント調整動作を説明する。ステップs31では、レンズのフォーカスつまみを回して、変化させることを予定しているフォーカスつまみ値の範囲のうち、たとえば最小つまみ値に設定する。ステップs32では、画像処理手段7が、撮像手段4によって撮影される被写体2の画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を算出する。ステップs33では、差分和の算出が初回であるとき、差分和を初回値としてRAM21にストアし、差分和の算出が初回でないとき、RAM21にストアされている差分和と、今回のフォーカスつまみ値に対して得られた差分和とを比較し、大きい方の差分和を最大差分和としてRAM21に上書き、すなわち置換えてストアする。このとき大きい方の差分和に対応するフォーカスつまみ値も同時にRAM21に置換えストアする。
【0046】
ステップs34では、フォーカスつまみ値が判別限界値であるか否かが判断される。ここでフォーカスつまみ値の判別限界値には、変化させることを予定しているフォーカスつまみ値の範囲のうち、たとえば最小つまみ値からピント調整を開始した場合には、フォーカスつまみ値の最大値が設定される。逆に最大つまみ値からピント調整を開始した場合には、最小つまみ値に設定される。判断結果が否定で、判別限界値ではないとき、ステップs31へ戻り、フォーカスつまみ値を回して異なる値に設定し、以降の動作を行う。判断結果が肯定で、判別限界値であるとき、ステップs35に進む。ステップs35では、最大差分和に対応するフォーカスつまみ値を最適フォーカスとみなし、処理回路19は、RAM21から最大差分和に対応するフォーカスつまみ値を読出してモニタ17に表示する。操作者は、表示に従ってレンズのフォーカスを前記つまみ値に設定する。
【0047】
図6に戻ってステップs4では、CCDカメラ13のレンズの絞りつまみを回しながら絞り調整、すなわち画像の明るさおよびコントラストの調整を行なう。
【0048】
図8は、絞り調整動作を説明するフローチャートである。図8を参照して先の図6に示すステップs4の絞り調整動作を説明する。ステップs41では、レンズの絞りつまみを回して、変化させることを予定している絞りつまみ値の範囲のうち、たとえば最小つまみ値に設定する。ステップs42では、画像処理手段7が、撮像手段4によって撮影される画像の濃度分布を作成し、この濃度分布はモニタ17に表示される。ステップs43では、画像処理手段7が、濃度分布に基づいて、濃度最大値dmax、濃度最小値dmin、濃度幅dw、濃度平均値davおよび濃度分散dσを算出する。
【0049】
ステップs44では、画像処理手段7によって、濃度最大値dmaxが高濃度側で予め定められる高濃度限界値dHを超える(dmax>dH)、または濃度最小値dminが低濃度側で予め定められる低濃度限界値dL未満(dmin<dL)のいずれかを満足するか否かが判断される。判断結果が肯定であるとき、ステップs41に戻り、絞りつまみ値を異なる値に設定して以降のステップに進み、判断結果が否定であるときステップs45に進む。
【0050】
ステップs45では、濃度幅dwの算出が初回であるとき、濃度幅dwを初回値としてRAM21にストアし、濃度幅dwの算出が初回でないとき、RAM21にストアされている濃度幅dwと、今回の絞りつまみ値に対して得られた濃度幅dwとを比較し、大きい方の濃度幅dwを最大濃度幅としてRAM21に上書き、すなわち置換えてストアする。このとき大きい方の濃度幅dwに対応する絞りつまみ値も同時にRAM21に置換えストアする。
【0051】
ステップs46では、絞りつまみ値が判別限界値であるか否かが判断される。ここで絞りつまみ値の判別限界値には、変化させることを予定している絞りつまみ値の範囲のうち、たとえば最小つまみ値から調整を開始した場合には、絞りつまみ値の最大値が設定される。逆に最大つまみ値から調整を開始した場合には、最小つまみ値に設定される。判断結果が否定で、判別限界値ではないとき、ステップs41へ戻り、絞りつまみ値を回して異なる値に設定し、以降の動作を行う。判断結果が肯定で、判別限界値であるとき、ステップs47に進む。ステップs47では、最大濃度幅に対応する絞りつまみ値を最適絞りとみなし、処理回路19は、RAM21から最大濃度幅に対応する絞りつまみ値を読出してモニタ17に表示する。操作者は、表示に従ってレンズの絞りを前記つまみ値に設定する。
【0052】
再び図6に戻ってステップs5では、前述のように設定されたCCDカメラ13の環境設定下において、撮像手段4によって得られた画像の濃度分布が、高濃度限界値dHと低濃度限界値dLとの間に定められる範囲内になるように、またモニタ17に表示される被写体2画像の明るさおよびコントラストに基づいて、入力手段5によって照明手段3の照射光量を所望の量に設定する。
【0053】
ステップs6では、ステップs5までの動作によって設定された光学系の環境の適否を診断する。図9は、光学系の環境設定診断動作を説明するフローチャートである。図9を参照して図6に示すステップs6の光学系の環境設定診断動作を説明する。ステップs61では、撮像画面内に環境ウインドウを設定する。ステップs62では、照明手段3による照射光量を、入力手段5からの入力操作によって変化させ、変化の各段階における各照射光量に対応する環境ウインドウの濃度平均値davを画像処理手段7によって求める。ステップs63では、線形変換式作成手段8が、各照射光量と濃度平均値davとから線形変換式を生成する。
【0054】
ステップs64では、判断手段9が、生成された線形変換式に基づき、RAM21から読出した傾きの基準値gと、線形変換式における変換部の傾きaとを比較し、傾きaが基準値g以上であるとき、ステップs65へ進み、傾きaが基準値g未満であるとき、ステップs67へ進む。ステップs65では、判断手段9が、線形変換式における平坦部の横軸長さLAL,LAHを演算し、RAM21から読出した基準値「PL」および「PH」と比較し、LALおよびLAHがそれぞれ基準値PL,PH以下(LAL≦PLかつLAH≦PH)であるとき、ステップs66へ進み、LALまたはLAHが基準値PL,PHを超える(LAL>PLまたはLAH>PHのいずれかである)とき、ステップs67へ進む。
【0055】
ステップs66では、設定されている光学系の環境が適正であり、診断OKと判断されるので、図6に示すメインのステップs7のエンドへ進み、光学系の環境設定動作が終る。一方ステップs67では、設定されている光学系の環境が不適であり、診断NGと判断されるので、図6に示すメインのステップs3に戻り、以降のステップを実行することによって、診断OKと判断されるまで繰返し環境設定の調整を行なう。以上のようにして、光学系の環境設定に関する一連の動作が終了する。
【0056】
【発明の効果】
本発明の画像処理方法によれば、光学系の環境設定の手順を確立するとともに、光学系の環境である撮像手段のシャッタ速度、絞り、フォーカスを、定量化して設定または定量化された値に基づいて設定し、設定された撮像手段の環境に従って照明手段の照射光量を設定するので、光学系の環境設定が容易になる。また線形変換式によって設定された光学系の環境の適否を診断し、不適の場合には確立された手順に従って再設定するので、光学系の環境も線形変換式という定量化手段によって定量的に適正な値に定められる。したがって、操作者の技能に熟練を必要とせず、再現性よく光学系の環境設定を行なうことが可能になる。
【0057】
また本発明の画像処理装置によれば、光学系の環境である撮像手段のシャッタ速度、絞り、フォーカスを、定量化して設定または定量化された値に基づいて設定し、設定された撮像手段の環境に従って照明手段の照射光量を設定するというように、各手段を用いて光学系の環境設定の手順を確立することができるので、光学系の環境設定を行なうことが容易になる。さらに、判断手段は、線形変換式作成手段によって作成される線形変換式に基づいて、光学系の環境が適正であるか否かを判断することができるので、環境が不適と判断されるとき、前述の確立された手順に従って再設定動作を繰返し実行し、適正な光学系の環境に設定することが可能である。したがって、操作者の技能に熟練を必要とせず、再現性よく光学系の環境設定を行なうことが可能な画像処理装置が実現される。
【図面の簡単な説明】
【図1】本発明の実施の一形態である画像処理装置1の構成を簡略化して示すブロック図である。
【図2】画像処理手段7によって画像濃度の1次微分を行ない濃度の差分和を求めた例を示す図である。
【図3】画像処理手段7によって画像の濃度分布を求めた例を示す図である。
【図4】環境ウインドウ設定の状態と線形変換式とを例示する図である。
【図5】線形変換式の典型を例示する図である。
【図6】本発明の実施の態様である画像処理方法を説明するフローチャートである。
【図7】ピント調整動作を説明するフローチャートである。
【図8】絞り調整動作を説明するフローチャートである。
【図9】光学系の環境設定診断動作を説明するフローチャートである。
【符号の説明】
1 画像処理装置
2 被写体
3 照明手段
4 撮像手段
5 入力手段
6 シャッタ速度演算手段
7 画像処理手段
8 線形変換式作成手段
9 判断手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and an image processing apparatus for setting an environment of an optical system, which is a condition for photographing a subject to be subjected to image processing.
[0002]
[Prior art]
Conventionally, in a factory production line, when performing solid identification, inspection, position measurement, etc. for products or parts, for example, an image of a subject such as the product or parts is input and input using an imaging means such as a camera. An image processing apparatus that achieves the above-described objects such as solid identification, inspection, and position measurement by processing the processed image is used.
[0003]
An imaging condition is an imaging condition when inputting an image of a subject required for solid identification, inspection, position measurement, etc. of the subject, that is, an environment setting factor of an optical system provided in the image processing apparatus. There are camera lens focusing (hereinafter referred to as focus) and diaphragm, camera shutter speed, and illumination light quantity of the illumination means. Lens focus and aperture settings differ depending on the shape of the subject and the amount of light applied to the subject. The setting of the shutter speed of the camera differs depending on whether the subject is moving or stationary, and there is a restriction that the shutter speed cannot be reduced too much when moving. The appropriate amount of light emitted from the illuminating means varies depending on the shape and material of the subject and the portion that is the target of image input.
[0004]
Conventionally, a complicated optical system environment setting in which an irradiation light amount and a focus, an aperture, and a shutter speed are combined in accordance with the state of an object is performed by an operator viewing a monitor screen. As described above, the environment of the optical system varies depending on the subject, and also varies depending on the moving speed of the subject. Therefore, it is difficult to set the environment of the optical system adapted to the state of the subject unless it is a skilled operator, and even a skilled operator has poor reproducibility. Further, since the environment setting of the optical system determined to be appropriate differs for each operator, there is also a problem that the environment of the optical system to be set differs for each operator even for the same subject. Furthermore, the shutter speed of the camera is digitized and managed, and is often automatically adjusted. However, the focus and aperture of the camera lens are often fixed by a screw lock mechanism, and the light intensity of the illumination means is also manually adjusted. Since the power supply for adjustment is often used, there is a problem that automatic adjustment is difficult.
[0005]
In order to improve such a problem, the conventional technique obtains the difference between the average density value of the image captured this time by the camera and the average density value of the image captured last time, that is, the amount of change in density, and the amount of change. Has been proposed (refer to Patent Document 1), in which the shutter speed of the camera is determined on the basis of the amount of change.
[0006]
In another conventional technique, a density histogram of an image taken by a camera is created, a binarization threshold value obtained based on the number of pixels formed in an image to be cut out from a subject, and a dark peak and a bright peak. Has been proposed that automatically adjusts the amount of light emitted from a lighting device having an external dimming function so that the binarization threshold value, which is the density value of the portion with the smallest frequency distribution between the two, coincides (patent) Reference 2).
[0007]
[Patent Document 1]
JP 2001-230967 A
[Patent Document 2]
JP-A-6-139341
[0008]
[Problems to be solved by the invention]
As shown in the above-mentioned prior art, the automation of the environment setting of the optical system is often limited to the shutter speed of the camera and the irradiation light amount of the illumination device, and the shutter speed and the irradiation light amount that are numerically controlled and attempted to be automated. However, automatic adjustment is performed, for example, by actually operating an inspection line.
[0009]
An example of the automatic adjustment method is as follows. Once the environment of the optical system is set, the line is then operated, for example, image processing conditions corresponding to the inspection are set, and a test run of inspection based on the image processing conditions is executed. When the test execution result is bad and the detection result corresponding to the inspection condition cannot be obtained, the image processing condition is first verified and / or readjusted, and it is determined that there is no problem in the image processing condition. Reset the environment.
[0010]
However, as described above, except for the shutter speed and the amount of irradiation light, it is not subject to automatic setting, and the environment setting procedure for the optical system has not been established. It is difficult for the operator to set again, and even the operator who performed the original setting may require the same time as setting from the beginning. For this reason, conventionally, the environment setting of the optical system has to rely on the experience and intuition of a skilled operator, and it is difficult for an inexperienced operator to perform it. Since it takes a long time to complete the setting, it takes a long time to start up a production line equipped with an image processing device, and the yield due to insufficient detection of products and parts during a test run by actual operation. There is a problem of incurring losses.
[0011]
An object of the present invention is to quantitate the environment setting items of an optical system and establish an environment setting procedure, so that the environment setting can be easily performed, and an image processing method excellent in setting reproducibility and An image processing apparatus is provided.
[0012]
[Means for Solving the Problems]
The present invention is an image processing method for setting an environment of an optical system, which is a photographing condition, when photographing a subject to be imaged and performing image processing of the photographed subject, and when the subject is in a stationary state Input a predetermined value as the shutter speed of the imaging means for photographing the subject. When the subject is in a moving state, input the moving speed of the subject and set the shutter speed using a predetermined arithmetic expression based on the moving speed. A first step to:
A second step of setting the irradiation light amount of the illumination means for irradiating the subject with light to a predetermined amount;
Image processing is performed so that the density of an image photographed by the imaging unit is first-order differentiated and a difference sum that is the sum of the density differences obtained by the first-order differentiation is obtained, so that the difference sum is maximized. A third step of adjusting the focus of the lens provided;
Image processing is performed for obtaining a density distribution of the image, and further obtaining a density width which is an absolute value difference between the maximum density and the minimum density based on the density distribution, and a diaphragm provided in the imaging unit so as to maximize the density width. A fourth step to adjust;
A fifth step of performing image processing for obtaining a density distribution of the image, and setting a light amount irradiated by the illumination unit to a desired amount based on the obtained density distribution and the image of the subject;
By changing the amount of irradiation light applied to the subject and creating a linear conversion equation between the amount of irradiation light and the image density from the relationship between each light amount and the image density when each light amount is irradiated, based on the linear conversion equation And a sixth step of determining whether or not the set environment of the optical system is appropriate.
[0013]
In the sixth step, when it is determined that the set environment of the optical system is inappropriate, the process returns to the third step and the subsequent steps are executed.
[0014]
According to the present invention, the shutter speed of the imaging unit is quantitatively determined depending on whether the subject is stationary or moving, and the irradiation light amount of the illumination unit that irradiates the subject with light is temporarily set to a predetermined amount. Then, a difference sum which is a sum of density differences obtained by the first derivative of image density photographed by the imaging means is obtained, and the difference of the quantified values is maximized so that the difference sum is maximized. Adjust the focus, obtain the density distribution of the image, and further obtain the density width that is the absolute value difference between the maximum density and the minimum density based on the density distribution, so that the density width that is the quantified value becomes the maximum Then, the lens aperture of the imaging means is adjusted, and the amount of light emitted from the illumination means is set to a desired amount based on the image of the subject and its density distribution. Furthermore, change the irradiation light amount irradiated to the subject, create a linear conversion equation between the irradiation light amount and the image density from the relationship between each light amount and the image density when each light amount is irradiated, and based on the linear conversion equation, It is determined whether the environment of the optical system set as described above is appropriate. When it is determined that the set environment of the optical system is inappropriate based on the linear conversion formula, the environment of the optical system can be reset by executing the above-described procedure again.
[0015]
In this way, the procedure for setting the environment of the optical system is established, and the shutter speed, aperture, and focus of the imaging means that is the environment of the optical system are quantified and set or set based on the quantified values. Since the irradiation light quantity of the illuminating means is set according to the environment of the image pickup means, the environment setting of the optical system becomes easy. In addition, the suitability of the environment of the optical system set by the linear conversion formula is diagnosed, and if it is unsuitable, it is reset according to the established procedure. It is set to a value. Therefore, it is possible to set the environment of the optical system with high reproducibility without requiring skill in the operator's skill.
[0016]
The present invention also provides an image processing apparatus capable of setting an environment of an optical system, which is a shooting condition, when shooting a subject to be imaged and performing image processing of the shot subject.
Illumination means capable of irradiating the subject with a variable amount of light;
An imaging means for photographing a subject, the imaging means capable of shutter speed, aperture and focus adjustment;
A setting input is made so that the amount of light emitted from the illumination means becomes a desired amount, and a predetermined shutter speed is input when the subject is in a stationary state, and a moving speed of the subject is input when the subject is in a moving state. Input means;
Shutter speed calculating means for calculating a shutter speed based on the moving speed when the moving speed is input;
The density of the image photographed by the imaging means is first-order differentiated to obtain a difference sum that is the sum of the density differences obtained by the first-order differentiation, to obtain the density distribution of the image, and further based on the density distribution Image processing means for performing image processing to obtain a density width that is an absolute value difference between the maximum value and the minimum value of the image and a density average value;
A linear conversion formula creating means for creating a linear conversion formula between the irradiation light quantity and the image density from the relationship between the image density when the irradiation light quantity to be irradiated to the subject is changed and irradiating each light quantity;
An image processing apparatus comprising: a determination unit that determines whether the environment of the optical system is appropriate based on the linear conversion formula created by the linear transformation formula creation unit.
[0017]
According to the present invention, the image processing apparatus includes an illuminating unit that can irradiate a subject with a variable amount of light, an imaging unit that captures the subject, a desired irradiation light amount, a shutter speed of the imaging unit, or a moving speed of the subject. Input means for inputting, shutter speed calculating means for calculating the shutter speed based on the moving speed of the subject, image processing means for performing image processing of the photographed subject, and a linear conversion formula between the amount of light applied to the subject and the image density And a determination means for determining whether or not the environment of the optical system is appropriate based on the linear conversion expression.
[0018]
The image processing apparatus quantifies and sets the shutter speed of the imaging unit according to the stationary or moving state of the subject, and a difference sum that is a sum of density differences obtained by first-order differentiation of the image density. And the aperture and focus of the imaging means are set based on a value quantified by the image processing means, that is, a density width that is an absolute value difference between the maximum value and the minimum value of the density in the density distribution of the image. The irradiation light quantity of the illumination means is set according to the environment of the imaging means.
[0019]
As described above, in the image processing apparatus of the present invention, the shutter speed, the aperture, and the focus of the imaging unit that is the environment of the optical system are quantified and set or set based on the quantified value. Since the procedure for setting the environment of the optical system can be established using each means, such as setting the irradiation light amount of the illumination means according to the environment, it becomes easy to set the environment of the optical system. Furthermore, since the determination means can determine whether the environment of the optical system is appropriate based on the linear conversion formula created by the linear conversion formula creation means, when the environment is determined to be inappropriate, According to the established procedure described above, the resetting operation can be repeatedly executed to set an appropriate environment. Therefore, an image processing apparatus that does not require skill in the operator's skill and can set the environment of the optical system with high reproducibility is realized.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a simplified configuration of an image processing apparatus 1 according to an embodiment of the present invention. The image processing apparatus 1 according to the present embodiment can photograph the subject 2 to be imaged and set the environment of the optical system, which is a photographing condition, when performing image processing of the photographed subject 2. It is provided in a production line of a factory and used for solid identification, inspection, position measurement, etc. for products and parts.
[0021]
The image processing apparatus 1 includes an illumination unit 3 that can irradiate a subject 2 with a variable amount of light, an imaging unit 4 that captures an image of the subject 2, an imaging unit 4 that can adjust shutter speed, aperture, and focus, and illumination. A setting input is made so that the amount of irradiation light of the means 3 becomes a desired amount, and a predetermined shutter speed is input when the subject 2 is in a stationary state, and a moving speed of the subject 2 is set when the subject 2 is in a moving state. When the input means 5 for inputting, the shutter speed calculating means 6 for calculating the shutter speed based on the moving speed when the moving speed is input, and the density of the image taken by the imaging means 4 are first-order differentiated. A difference sum that is a sum of density differences obtained by differentiation is obtained, a density distribution of an image is obtained, and an absolute value difference between the maximum value and the minimum value of the density based on the density distribution. The image processing means 7 for performing image processing for obtaining the width and the average density value, and the irradiation light quantity from the relationship between the image density average value when the irradiation light quantity irradiated to the subject 2 is changed and each light quantity is irradiated. Based on the linear conversion formula creating unit 8 that creates a linear conversion formula between the image density and the image density and the linear conversion formula created by the linear conversion formula creating unit 8, it is determined whether or not the environment of the optical system is appropriate. Determination means 9.
[0022]
The subject 2 is a product or a part that is a target of solid identification, inspection, position measurement, etc. as described above, and includes a semiconductor chip and various other objects. The illumination means 3 includes a light source 11 that is a light emission source and a power source 12 that can variably supply power to the light source 11. For example, a light-emitting diode (abbreviated LED) or a tungsten lamp is preferably used as the light source 11, and the light that irradiates the subject 2 is emitted in a variable amount of light according to the amount of power supplied from the power supply 12.
[0023]
The image pickup means 4 includes a CCD camera 13 having a Charge Coupled Device (abbreviated as CCD) element, an analog / digital (abbreviated as A / D) converter 14 that converts an input / output signal to / from the CCD camera 13 into analog / digital, and a CCD. An image display controller 15 that processes image information from the camera 13 and outputs it to a processing circuit 19 described later, and outputs a signal for controlling the operation of the CCD camera 13 in response to an output from the processing circuit 19; And a frame memory 16 which is a storage means connected to the imaging display controller 15 and capable of writing / reading image information at any time by the CCD camera 13.
[0024]
Although not shown, the CCD camera 13 is provided with a lens, and a focus mechanism for adjusting the focus of the lens, a diaphragm mechanism for adjusting exposure, and a shutter mechanism capable of variably setting the speed are provided around the lens. It is done. Each of these mechanisms can be adjusted by a control signal from the processing circuit 19 via the imaging display controller 15, or can be manually adjusted. The imaging unit 4 may include a monitor 17. The monitor 17 is composed of a liquid crystal, a cathode ray tube, or the like. In this embodiment, the monitor 17 is connected to the imaging display controller 15 via a digital / analog (abbreviated D / A) converter 18, and image information from the CCD camera 13 is displayed. Is displayed as a visible image.
[0025]
The processing circuit 19 is realized by, for example, a microcomputer equipped with a Central Processing Unit (abbreviated as CPU). The processing circuit 19 includes the shutter speed calculation unit 6, the image processing unit 7, the linear conversion formula creation unit 8, and the determination unit 9. The processing circuit 19 operates in accordance with a program stored in advance in a Read Only Memory 20 (abbreviated as ROM), functions as the above-described means, and controls the operation of the entire image processing apparatus 1.
[0026]
The input means 5 is a remote setting key. The input means may be a keyboard or the like, and may be configured to input various setting values from the keyboard. However, if all the various setting values are numerically input from the keyboard, the operation becomes complicated and the time required for input becomes long. Therefore, in this embodiment, the input means 5 is used as a remote setting key, and the Random Access Memory 21 (abbreviated as RAM) For example, various setting values stored in advance as table data are read by the processing circuit 19, the read setting values are displayed on the monitor 17, and the selected setting values are selected and input by key operation. The input means 5 is connected to each means of the apparatus including the processing circuit 19 through an input / output (I / O) interface 22. The input / output interface 22 is connected to the power source 12 of the illumination means 3 described above.
[0027]
Hereinafter, the environment setting of the imaging unit 4 and the illumination unit 3 which are optical systems provided in the image processing apparatus 1 will be described. First, the shutter speed of the CCD camera 13 is set as follows. The operator determines whether the subject 2 is imaged in a stationary state or in a moving state. In the stationary state, the operator operates a remote key provided in the input unit 5 to display a menu screen on the monitor 17, selects a shutter speed from the menu, and displays shutter speed table data. A desired shutter speed is selected from the shutter speeds displayed on the monitor 17. The selected shutter speed is given to the processing circuit 19, and the imaging display controller 15 sets the shutter speed of the CCD camera 13 in accordance with a control signal output from the processing circuit 19. When the subject 2 is stationary, the shutter speed is preferably 1/60 (1/60) second or 1/100 (1/100) second.
[0028]
When the subject 2 is in the moving state, the operator operates the remote key provided in the input means 5 to select the moving speed from the menu displayed on the monitor 17 and displays the moving speed table data. A moving speed determined as the moving speed of the subject 2 on the production line is selected from the moving speeds displayed on the monitor 17. The selected moving speed is given to the processing circuit 19. The shutter speed calculation means 6 included in the processing circuit 19 reads the resolution and the allowable movement amount substantially corresponding to the imaging screen area of the imaging means 4 from the specifications of the image processing apparatus 1 stored in the RAM 21 in advance. The shutter speed is calculated by (1).
Shutter speed = movement speed / (resolution × allowable movement) (1)
[0029]
Further, the amount of light applied to the subject 2 by the illumination unit 3 is set to a desired amount by the input unit 5. The operator operates the remote key provided in the input means 5 to select the irradiation light amount from the menu displayed on the monitor 17 and displays, for example, a setting volume of the irradiation light amount. A desired amount is selected from the setting volume of the irradiation light amount displayed on the monitor 17. The selected set value is given to the processing circuit 19. A control signal corresponding to the selected set value is given from the processing circuit 19 to the power source 12 via the input / output interface 22, and power is supplied from the power source 12 to the light source 11 in accordance with the given control signal. The amount of irradiation light is set to a desired amount.
[0030]
Next, the operations of the above-described image processing means 7, linear transformation formula creation means 9 and determination means 9 included in the processing circuit 19 will be described.
[0031]
The image processing means 7 can perform image processing for first-order differentiation of the density of the image photographed by the imaging means 4 and calculating a difference sum that is a sum of density differences obtained by the first-order differentiation. The difference sum by the first derivative of the image density is obtained in a state where the focus knob of the lens provided in the CCD camera 13 is turned to set each value within a predetermined range. Of the difference sums obtained for each setting value of the focus knob, the position of the focus knob showing the maximum difference sum is selected as the optimum focus value. FIG. 2 is a diagram showing an example in which a first-order differentiation of the image density is performed by the image processing means 7 to obtain a density difference sum. In FIG. 2, the first-order differentiation of the image density is performed from the upper left to the lower right of the imaging screen, the difference sum of the density is obtained for each focus knob value, and the maximum value of the difference sum is sequentially replaced. It shows that the maximum difference sum (shown as the maximum concentration sum in the figure) was obtained.
[0032]
Further, the image processing means 7 obtains the density distribution of the image taken by the imaging means 4, and further, based on the density distribution, the density width dw (= | dmax) which is an absolute value difference between the maximum value dmax and the minimum value dmin. -Dmin |) and the image processing for obtaining the average density value dav can be performed. At this time, the density dispersion dσ can be obtained simultaneously. FIG. 3 is a diagram showing an example in which the image density distribution is obtained by the image processing means 7. In FIG. 3, the density is shown on the horizontal axis, and the frequency of the density is shown on the vertical axis in terms of the number of pixels. The density width dw is given by the absolute value difference (| dmax−dmin |) between the density maximum value dmax and the density minimum value dmin given by the line 31 indicating the density distribution. The density average value dav is given as an arithmetic average value obtained by dividing the sum over the density range of the product of each density and the number of pixels indicating the density by the total number of pixels. The density width dw in the image density distribution is obtained in a state where the lens aperture knob of the CCD camera 13 is turned and set to each value within a predetermined range. Of the density widths dw obtained for each setting value of the aperture knob, the position of the aperture knob showing the maximum density width can be selected as the optimum value of the aperture. Such maximum density value dmax, minimum density value dmin, maximum density range, average density value dav, and density variance dσ are stored in the RAM 21.
[0033]
As described above, in the present embodiment, the focus knob and the aperture knob are manually adjusted by the operator, but the focus knob and the aperture knob value are displayed on the monitor 17 as table data, and the input means 5 selects each value. Then, it may be configured to adjust via the processing circuit 19 and the imaging display controller 15.
[0034]
As described above, the linear conversion formula creating unit 8 creates a linear conversion formula between the amount of light emitted by the illumination unit 3 and the density of an image obtained by photographing with the amount of irradiated light. The linear conversion equation may be created for the entire imaging screen, or an area divided into an arbitrary area in the imaging screen may be set and created for that area. An area divided in the imaging screen to create this linear transformation formula is hereinafter referred to as an environment window.
[0035]
FIG. 4 is a diagram illustrating the state of the environment window setting and the linear conversion formula. FIG. 4 shows a case where the connector 33 with the metal terminal 32 protruding is taken up as a subject. In the present embodiment, four environment windows in which a linear conversion formula is to be created are set. The first environment window 34 is set to include the metal terminal 32, the second and third environment windows 35 and 36 are set to the white resin portion of the connector 33, and the fourth environment window 37 is mounted with the connector 33. It is set with respect to the surface of the transfer table to be placed, and the surface of the transfer table is sometimes called the background.
[0036]
With respect to each set environment window, the amount of light emitted by the illumination unit 3 is changed from the minimum to the maximum (for example, from 0 (0) to 255 in the case of 8-bit dimming) by the input operation from the input unit 5. The above-mentioned image processing means 7 obtains the average value dav of the environment window for each irradiation light quantity at each stage of change. The linear conversion formula creation means 8 obtains the relationship between the volume value of the irradiation light amount set by the input means 5 and the concentration average value dav for each of the first to fourth environment windows 34, 35, 36, and 37. The relationship between the volume value of the irradiation light quantity and the concentration average value dav is obtained in a substantially linear form. This linear format and a graph of the linear format are referred to herein as a linear conversion formula.
[0037]
The line 38 shown in FIG. 4B is a linear transformation formula of the image of the first environment window 34, that is, the metal terminal portion, and the line 39 and the line 40 are the second and third environment windows 35, 36, that is, the white resin portion. The line 41 is the fourth environment window 37, that is, the linear conversion formula of the background image. The line 39 and the line 40 include a portion on the high concentration side where the concentration average value dav does not change even though the irradiation light amount volume value changes, and this portion is referred to as a “flat portion” for convenience. On the other hand, the portions of the line 39 and the line 40 other than the “flat portion”, and the line 38 and the line 41 are in a linear relationship, and the irradiation light quantity volume value and the concentration average value dav can be converted to each other. The portion is called a “conversion unit” for convenience. The linear conversion formula obtained for each of the environment windows 34, 35, 36, and 37 by the linear conversion formula creation means 8 is stored in the RAM 21.
[0038]
The determination unit 9 determines whether or not the set environment of the optical system is appropriate based on the linear conversion formula created by the linear conversion formula creation unit 8, that is, diagnoses the suitability of the environment of the optical system. FIG. 5 is a diagram illustrating a typical linear transformation formula. The linear conversion equation shown in FIG. 5 has an L / L flat portion 43 formed on the low light quantity / low density (abbreviated as L / L) side and a high light quantity / high density (abbreviated as H / H) side. The H / H flat part 44 to be formed, and the conversion part 42 formed between the L / L flat part 43 and the H / H flat part 44 are included.
[0039]
With reference to FIG. 5, the determination operation of the determination means 9 will be described. The determination means 9 determines whether or not the environment of the optical system is appropriate based on the inclination (gradient) of the conversion unit 42 of the linear conversion type as shown in FIG. 5 or the horizontal axis lengths of the flat portions 43 and 44. Diagnose. The inclination of the conversion unit 42 is an inclination “a” expressed by a linear expression (Y = aX + b) when the density is on the Y axis and the light quantity is on the X axis. The horizontal axis length LAL of the L / L flat portion 43 is the maximum light amount Lα (= Lα-0) in the L / L flat portion 43. The horizontal axis length LAH of the H / H flat portion 44 is a difference (= Lmax−Lβ) between the maximum light amount value Lmax and the minimum light amount value Lβ in the H / H flat portion 44.
[0040]
The judging means 9 has a slope a smaller than a predetermined reference value g (a <g), and the horizontal axis length LAL of the L / L flat portion 43 is larger than a predetermined reference value PL (LAL> PL ), An optical system that is set when at least one of the three conditions that the horizontal axis length LAH of the H / H flat portion 44 is larger than a predetermined reference value PH (LAH> PH) is satisfied. Diagnose unsuitable environment. Conversely, the determination means 9 determines that the set environment of the optical system is appropriate when all the above three conditions are not satisfied.
[0041]
For reference values “g”, “PL”, and “PH”, values obtained by, for example, empirical rules are determined in advance and stored in RAM 21. The judging means 9 directly uses the linear transformation formula created by the linear transformation formula creation means 8 or reads out the linear transformation formula created by the linear transformation formula creation means 8 and temporarily stored in the RAM 21 to perform the above-mentioned conversion. The inclination a of the part 42 and the horizontal axis lengths LAL and LAH of the flat part are calculated and compared with the reference values “g”, “PL”, and “PH” read from the RAM 21 to execute the above-described determination operation.
[0042]
FIG. 6 is a flowchart for explaining an image processing method according to an embodiment of the present invention. An image processing method performed using the image processing apparatus 1 shown in FIG. 1 will be described with reference to FIG.
[0043]
At the start of step s0, the image processing apparatus 1 shown in FIG. 1 and the subject 2 are prepared, and the imaging of the subject 2 can be started. In step s1, the operator determines whether the subject 2 is imaged in a stationary state or a moving state, and when the subject 2 is in a stationary state, 1/60 is set as an initial value of the shutter speed of the CCD camera 13. Either the second or 1/100 second is input from the input unit 5, and the moving speed of the subject 2 is input from the input unit 5 in the moving state. When the initial value of the shutter speed is input, the initial value is set as the shutter speed. When the moving speed of the subject 2 is input, the calculation result of the shutter speed calculation unit 6 according to the above-described equation (1). Is set as the shutter speed. In step s2, the amount of light emitted by the illumination unit 3 is temporarily set to a predetermined amount by the input unit 5. At this time, it is preferable to select an intermediate value of the capability of the illumination unit 3 as the predetermined amount of the irradiation light amount to be temporarily set.
[0044]
In step s3, focusing, so-called focus adjustment, is performed while turning the focus knob of the lens of the CCD camera 13.
[0045]
FIG. 7 is a flowchart for explaining the focus adjustment operation. The focus adjustment operation in step s3 shown in FIG. 6 will be described with reference to FIG. In step s31, the focus knob of the lens is turned to set, for example, the minimum knob value in the range of focus knob values that are scheduled to be changed. In step s32, the image processing unit 7 performs first-order differentiation on the density of the image of the subject 2 photographed by the imaging unit 4, and calculates a difference sum that is a sum of density differences obtained by the first-order differentiation. In step s33, when the difference sum is calculated for the first time, the difference sum is stored in the RAM 21 as an initial value. When the difference sum is not calculated for the first time, the difference sum stored in the RAM 21 and the current focus knob value are stored. The difference sum obtained is compared, and the larger difference sum is overwritten in the RAM 21 as the maximum difference sum, that is, replaced and stored. At this time, the focus knob value corresponding to the larger difference sum is also replaced and stored in the RAM 21 at the same time.
[0046]
In step s34, it is determined whether or not the focus knob value is a determination limit value. Here, the focus knob value discrimination limit value is set to the maximum value of the focus knob value, for example, when focus adjustment is started from the minimum knob value within the range of the focus knob value that is planned to be changed. Is done. Conversely, when focus adjustment is started from the maximum knob value, the minimum knob value is set. When the determination result is negative and not the determination limit value, the process returns to step s31, the focus knob value is turned to a different value, and the subsequent operation is performed. When the determination result is affirmative and is a determination limit value, the process proceeds to step s35. In step s35, the focus knob value corresponding to the maximum difference sum is regarded as the optimum focus, and the processing circuit 19 reads the focus knob value corresponding to the maximum difference sum from the RAM 21 and displays it on the monitor 17. The operator sets the focus of the lens to the knob value according to the display.
[0047]
Returning to FIG. 6, in step s4, the aperture adjustment, that is, the brightness and contrast of the image is adjusted while turning the aperture knob of the lens of the CCD camera 13.
[0048]
FIG. 8 is a flowchart for explaining the aperture adjustment operation. The aperture adjustment operation in step s4 shown in FIG. 6 will be described with reference to FIG. In step s41, the aperture knob of the lens is turned to set, for example, the minimum knob value in the range of the aperture knob value that is scheduled to be changed. In step s 42, the image processing means 7 creates a density distribution of an image photographed by the imaging means 4, and this density distribution is displayed on the monitor 17. In step s43, the image processing means 7 calculates the maximum density value dmax, the minimum density value dmin, the density width dw, the density average value dav, and the density variance dσ based on the density distribution.
[0049]
In step s44, the image processing means 7 causes the maximum density value dmax to exceed a predetermined high density limit value dH on the high density side (dmax> dH), or the minimum density value dmin is predetermined to the low density side. It is determined whether or not any of less than the limit value dL (dmin <dL) is satisfied. When the determination result is affirmative, the process returns to step s41, the aperture knob value is set to a different value, and the process proceeds to the subsequent steps. When the determination result is negative, the process proceeds to step s45.
[0050]
In step s45, when the density width dw is calculated for the first time, the density width dw is stored in the RAM 21 as an initial value. When the density width dw is not calculated for the first time, the density width dw stored in the RAM 21 and the current time are calculated. The density width dw obtained for the aperture knob value is compared, and the larger density width dw is overwritten in the RAM 21 as the maximum density width, that is, replaced and stored. At this time, the aperture knob value corresponding to the larger density width dw is also replaced and stored in the RAM 21 at the same time.
[0051]
In step s46, it is determined whether or not the aperture knob value is a determination limit value. Here, the maximum value of the aperture knob value is set as the limit value of the aperture knob value when, for example, adjustment is started from the minimum knob value within the range of aperture knob values that are scheduled to be changed. The Conversely, when the adjustment is started from the maximum knob value, the minimum knob value is set. If the determination result is negative and not the determination limit value, the process returns to step s41, the aperture knob value is turned to a different value, and the subsequent operations are performed. When the determination result is affirmative and is a determination limit value, the process proceeds to step s47. In step s 47, the aperture knob value corresponding to the maximum density width is regarded as the optimum aperture, and the processing circuit 19 reads the aperture knob value corresponding to the maximum density width from the RAM 21 and displays it on the monitor 17. The operator sets the aperture of the lens to the knob value according to the display.
[0052]
Returning to FIG. 6 again, in step s5, the density distribution of the image obtained by the imaging means 4 under the environment setting of the CCD camera 13 set as described above is the high density limit value dH and the low density limit value dL. The light intensity of the illumination means 3 is set to a desired amount by the input means 5 based on the brightness and contrast of the subject 2 image displayed on the monitor 17 so as to be within a range determined between the two.
[0053]
In step s6, the suitability of the environment of the optical system set by the operation up to step s5 is diagnosed. FIG. 9 is a flowchart for explaining the environment setting diagnosis operation of the optical system. The environment setting diagnosis operation of the optical system in step s6 shown in FIG. 6 will be described with reference to FIG. In step s61, an environment window is set in the imaging screen. In step s62, the irradiation light quantity by the illumination means 3 is changed by an input operation from the input means 5, and the density average value dav of the environment window corresponding to each irradiation light quantity at each stage of change is obtained by the image processing means 7. In step s63, the linear conversion formula creating means 8 generates a linear conversion formula from each irradiation light quantity and the density average value dav.
[0054]
In step s64, the determination unit 9 compares the inclination reference value g read from the RAM 21 with the inclination a of the conversion unit in the linear conversion expression based on the generated linear conversion expression, and the inclination a is greater than or equal to the reference value g. When it is, the process proceeds to step s65, and when the slope a is less than the reference value g, the process proceeds to step s67. In step s65, the determination unit 9 calculates the horizontal axis lengths LAL and LAH of the flat portion in the linear transformation equation, compares them with the reference values “PL” and “PH” read from the RAM 21, and LAL and LAH are the reference values, respectively. When the value is not more than PL, PH (LAL ≦ PL and LAH ≦ PH), the process proceeds to step s66, and when LAL or LAH exceeds the reference value PL, PH (LAL> PL or LAH> PH), Proceed to step s67.
[0055]
In step s66, since the set environment of the optical system is appropriate and it is determined that the diagnosis is OK, the process proceeds to the end of the main step s7 shown in FIG. 6 and the environment setting operation of the optical system ends. On the other hand, in step s67, since the set environment of the optical system is inappropriate and it is determined that the diagnosis is NG, the process returns to the main step s3 shown in FIG. Adjust the environment settings repeatedly until As described above, a series of operations related to the environment setting of the optical system is completed.
[0056]
【The invention's effect】
According to the image processing method of the present invention, a procedure for setting the environment of the optical system is established, and the shutter speed, aperture, and focus of the imaging unit that is the environment of the optical system are quantified to set or quantified values. Based on the set environment of the imaging means, the irradiation light quantity of the illumination means is set, so that the environment setting of the optical system becomes easy. In addition, the suitability of the environment of the optical system set by the linear conversion formula is diagnosed, and if it is unsuitable, it is reset according to the established procedure. It is set to a value. Therefore, it is possible to set the environment of the optical system with high reproducibility without requiring skill in the operator's skill.
[0057]
Further, according to the image processing apparatus of the present invention, the shutter speed, aperture, and focus of the imaging unit that is the environment of the optical system are set based on the quantified setting or the quantified value. Since the procedure for setting the environment of the optical system can be established using each means, such as setting the irradiation light quantity of the illumination means according to the environment, it becomes easy to set the environment of the optical system. Furthermore, since the determination means can determine whether the environment of the optical system is appropriate based on the linear conversion expression created by the linear conversion expression creation means, when the environment is determined to be inappropriate, It is possible to repeatedly perform the resetting operation according to the established procedure described above to set an appropriate optical system environment. Therefore, an image processing apparatus that does not require skill in the operator's skill and can set the environment of the optical system with high reproducibility is realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a simplified configuration of an image processing apparatus 1 according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example in which a first-order differentiation of image density is performed by the image processing means 7 to obtain a density difference sum.
FIG. 3 is a diagram showing an example in which an image density distribution is obtained by the image processing means 7;
FIG. 4 is a diagram illustrating an environment window setting state and a linear conversion equation;
FIG. 5 is a diagram illustrating a typical linear transformation formula.
FIG. 6 is a flowchart illustrating an image processing method according to an embodiment of the present invention.
FIG. 7 is a flowchart illustrating a focus adjustment operation.
FIG. 8 is a flowchart illustrating an aperture adjustment operation.
FIG. 9 is a flowchart illustrating an environment setting diagnosis operation of the optical system.
[Explanation of symbols]
1 Image processing device
2 Subject
3 lighting means
4 Imaging means
5 input means
6 Shutter speed calculation means
7 Image processing means
8 Linear transformation formula creation means
9 Judgment means

Claims (3)

撮像されるべき被写体を撮影し、撮影された被写体の画像処理を行なうに際し、撮影条件である光学系の環境設定を行なう画像処理方法であって、
前記被写体が静止状態であるとき、被写体を撮影する撮像手段のシャッタ速度として予め定める値を入力し、被写体が移動状態であるとき、被写体の移動速度を入力し、移動速度に基づいて予め定める演算式を用いてシャッタ速度を設定する第1のステップと、
前記被写体に光を照射する照明手段の照射光量を予め定める量に設定する第2のステップと、
前記撮像手段によって撮影される画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を求める画像処理を行ない、差分和が最大になるように前記撮像手段に備わるレンズのフォーカスを調整する第3のステップと、
前記画像の濃度分布を求め、さらに濃度分布に基づいて最大濃度と最小濃度との絶対値差分である濃度幅を求める画像処理を行ない、濃度幅が最大になるように前記撮像手段に備わるレンズの絞りを調整する第4のステップと、
前記画像の濃度分布を求める画像処理を行ない、得られた濃度分布と前記被写体の画像とに基づいて、前記照明手段による照射光量を所望の量に設定する第5のステップと、
前記被写体に対して照射する照射光量を変化させ、各光量と各光量を照射したときの画像濃度との関係から照射光量と画像濃度との線形変換式を作成し、前記線形変換式に基づいて、設定した光学系の環境が適正であるか否かを判断する第6のステップとを含むことを特徴とする画像処理方法。
An image processing method for setting an environment of an optical system that is a shooting condition when shooting a subject to be imaged and performing image processing of the shot subject,
When the subject is in a stationary state, a predetermined value is input as the shutter speed of the imaging means for photographing the subject. When the subject is in a moving state, the moving speed of the subject is input, and a predetermined calculation based on the moving speed is performed. A first step of setting a shutter speed using an equation;
A second step of setting the irradiation light amount of the illumination means for irradiating the subject with light to a predetermined amount;
Image processing is performed so that the density of an image photographed by the imaging unit is first-order differentiated and a difference sum that is the sum of the density differences obtained by the first-order differentiation is obtained, so that the difference sum is maximized. A third step of adjusting the focus of the lens provided;
The image processing unit obtains a density distribution of the image, and further performs image processing for obtaining a density width that is an absolute value difference between the maximum density and the minimum density based on the density distribution, so that the density of the lens included in the imaging unit is maximized. A fourth step of adjusting the aperture;
A fifth step of performing image processing for obtaining a density distribution of the image, and setting a light amount irradiated by the illumination unit to a desired amount based on the obtained density distribution and the image of the subject;
By changing the amount of irradiation light applied to the subject and creating a linear conversion equation between the amount of irradiation light and the image density from the relationship between each light amount and the image density when each light amount is irradiated, based on the linear conversion equation A sixth step of determining whether or not the set environment of the optical system is appropriate.
前記第6のステップにおいて、設定した光学系の環境が不適と判断されるとき、前記第3のステップに戻り以降のステップを実行することを特徴とする請求項1記載の画像処理方法。The image processing method according to claim 1, wherein in the sixth step, when it is determined that the set environment of the optical system is inappropriate, the process returns to the third step and subsequent steps are executed. 撮像されるべき被写体を撮影し、撮影された被写体の画像処理を行なうに際し、撮影条件である光学系の環境設定をすることのできる画像処理装置において、
前記被写体を光量可変に照射することのできる照明手段と、
被写体を撮影する撮像手段であって、シャッタ速度、絞りおよびフォーカス調整の可能な撮像手段と、
前記照明手段の照射光量が所望の量になるように設定入力するとともに、被写体が静止状態であるときは予め定めるシャッタ速度を入力し、被写体が移動状態であるときは被写体の移動速度を入力する入力手段と、
前記移動速度が入力されるとき、移動速度に基づいてシャッタ速度を演算するシャッタ速度演算手段と、
前記撮像手段によって撮影される画像の濃度を1次微分し、1次微分によって得られる濃度の差分の和である差分和を求めるとともに、前記画像の濃度分布を求め、さらに濃度分布に基づいて濃度の最大値と最小値との絶対値差分である濃度幅と、濃度平均値とを求める画像処理を行なう画像処理手段と、
前記被写体に対して照射する照射光量を変化させ、各光量を照射したときの画像濃度との関係から照射光量と画像濃度との線形変換式を作成する線形変換式作成手段と、
前記線形変換式作成手段によって作成される線形変換式に基づいて、光学系の環境が適正であるか否かを判断する判断手段とを含むことを特徴とする画像処理装置。
In an image processing apparatus capable of setting an environment of an optical system, which is a photographing condition, when photographing a subject to be imaged and performing image processing of the photographed subject,
Illumination means capable of irradiating the subject with a variable amount of light;
An imaging means for photographing a subject, the imaging means capable of shutter speed, aperture and focus adjustment;
A setting input is made so that the amount of light emitted from the illumination means becomes a desired amount, and a predetermined shutter speed is input when the subject is in a stationary state, and a moving speed of the subject is input when the subject is in a moving state. Input means;
Shutter speed calculating means for calculating a shutter speed based on the moving speed when the moving speed is input;
The density of the image photographed by the imaging means is first-order differentiated to obtain a difference sum that is the sum of the density differences obtained by the first-order differentiation, to obtain the density distribution of the image, and further based on the density distribution Image processing means for performing image processing to obtain a density width that is an absolute value difference between the maximum value and the minimum value of the image and a density average value;
A linear conversion formula creating means for creating a linear conversion formula between the irradiation light quantity and the image density from the relationship between the image density when the irradiation light quantity to be irradiated to the subject is changed and irradiating each light quantity;
An image processing apparatus comprising: a determination unit that determines whether or not an environment of the optical system is appropriate based on the linear conversion formula created by the linear transformation formula creation unit.
JP2003007529A 2003-01-15 2003-01-15 Image processing method and image processing apparatus Expired - Fee Related JP4080897B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003007529A JP4080897B2 (en) 2003-01-15 2003-01-15 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003007529A JP4080897B2 (en) 2003-01-15 2003-01-15 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2004221987A JP2004221987A (en) 2004-08-05
JP4080897B2 true JP4080897B2 (en) 2008-04-23

Family

ID=32897599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003007529A Expired - Fee Related JP4080897B2 (en) 2003-01-15 2003-01-15 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4080897B2 (en)

Also Published As

Publication number Publication date
JP2004221987A (en) 2004-08-05

Similar Documents

Publication Publication Date Title
US7825955B2 (en) Image pickup apparatus, exposure control method, and computer program installed in the image pickup apparatus
JP4519708B2 (en) Imaging apparatus and method, and program
CN110196576B (en) Image processing system and setting method
US20050270397A1 (en) System and method for indicating settings
CN110300255A (en) Information processing unit, information processing method, program and vision measurement device
KR20030036714A (en) Exposure control method for digital camera
JP2006311108A (en) Image processor, image processing method, image processing program and camera
JP2000134610A (en) Endoscope device
US20050270398A1 (en) Electronic camera
JP2006338001A (en) Microscope system and image forming method
JP4080897B2 (en) Image processing method and image processing apparatus
EP1578110B1 (en) Image processing apparatus, image processing system and image processing method
JP4094435B2 (en) Image processing method and image processing apparatus characterized by automatically adjusting environment of optical system
JP3931130B2 (en) Measurement system, calculation method and calculation program
JP4563693B2 (en) Microscope photographing apparatus, brightness adjustment method, and brightness adjustment program
JPH09138353A (en) Laser microscope
JP5587083B2 (en) Imaging apparatus and control method thereof
US20030117659A1 (en) Image reading device and method
CN114450579A (en) Image processing system, setting method, and program
JPH1062134A (en) Illumination adjustment method for recognition inspection
JP2001230967A (en) Device and method for processing image
JP4684078B2 (en) Image processing apparatus and control method thereof
WO2022034840A1 (en) Image processing device and robot control device
JP2006235401A (en) Imaging system and controller
JP2005079683A (en) Imaging system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080129

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080207

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120215

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees