Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4338416B2 - Automatic focus adjustment device - Google Patents
[go: Go Back, main page]

JP4338416B2 - Automatic focus adjustment device - Google Patents

Automatic focus adjustment device Download PDF

Info

Publication number
JP4338416B2
JP4338416B2 JP2003064515A JP2003064515A JP4338416B2 JP 4338416 B2 JP4338416 B2 JP 4338416B2 JP 2003064515 A JP2003064515 A JP 2003064515A JP 2003064515 A JP2003064515 A JP 2003064515A JP 4338416 B2 JP4338416 B2 JP 4338416B2
Authority
JP
Japan
Prior art keywords
hue
data
evaluation value
data group
variation
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
JP2003064515A
Other languages
Japanese (ja)
Other versions
JP2004272038A (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.)
Hoya Corp
Original Assignee
Hoya 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 Hoya Corp filed Critical Hoya Corp
Priority to JP2003064515A priority Critical patent/JP4338416B2/en
Publication of JP2004272038A publication Critical patent/JP2004272038A/en
Application granted granted Critical
Publication of JP4338416B2 publication Critical patent/JP4338416B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Instruments For Viewing The Inside Of Hollow Bodies (AREA)
  • Automatic Focus Adjustment (AREA)
  • Endoscopes (AREA)

Description

【0001】
【発明の技術分野】
本発明は、特に電子内視鏡に適した自動焦点調節装置に関する。
【0002】
【従来技術およびその問題点】
近年では、内視鏡の挿入部先端の位置に応じてフォーカスレンズの位置が自動調節されるオートフォーカス(AF)機能を備えた電子内視鏡が種々提案されている。このような電子内視鏡に備えられる自動焦点調節装置は、一般に、内視鏡の挿入部先端に設けられた撮像素子(CCD)からの画像データに基づき、フォーカスレンズの位置を調節する。具体的には、画像データの高周波成分(画像データの輝度情報)を用いて所定の演算を行ない、被写体の焦点状態を示す評価値を算出して、この評価値が最大となる位置にフォーカスレンズを移動させている(特許文献参照)。
【0003】
ところで、内視鏡検査の際には、通常観察よりもより詳細な所見を得ることあるいは通常観察では得られない所見を得ることを目的として、色素剤を用いて観察を行なうことがある。このような色素内視鏡検査(色素法)では、色素剤によって被写体が特定の色に染色または着色されるため、色素剤を用いない通常観察時よりも輝度変化が少なくなる傾向にあることが知られている。
【0004】
しかしながら、上述したような従来方法では画像データの輝度情報に基づいてAF評価値を算出しているため、色素観察時には正確なAF評価値が得られない虞があり、高精度な焦点調節を実現することが難しかった。
【0005】
【特許文献】
特開2001−154085号公報
【0006】
【発明の目的】
本発明は、被写体の色状態(着色、染色または変色状態)に適したモードで高精度に焦点調節可能な自動焦点調節装置を得ることを目的とする。
【0007】
【発明の概要】
本発明は、従来方法において色素観察時に正確なAF評価値が得られない要因が、被写体を着色又は変色させているか否かに拘わらず同一の算出方法でAF評価値を算出していたためであることに着眼したものである。
【0008】
すなわち、本発明は、所定の演算により算出されたAF評価値に基づいてフォーカスレンズを移動させる自動焦点調節装置において、撮像手段の画素群から画像データ群を得る画像取得手段と、この画像データ群をHSIデータ群に変換するデータ変換手段と、画像データ群の平均値をHSI変換して色相基準値を算出し、この色相基準値と色相データHとの色相差分を色相データHのばらつきとして算出するばらつき算出手段と、色相データHのばらつきが所定の閾値未満であるときはHSIデータ群の明度データIを用いてAF評価値を算出し、所定の閾値以上であるときは色相データH及び彩度データSの一方または両方を用いてAF評価値を算出する評価値算出手段と、を備え、閾値には、色素剤を用いない通常観察モードと色素剤を用いた色素観察モードのいずれであるかを判別する値が設定されていることを特徴としている。
【0010】
評価値算出手段は、色相データHのばらつきが所定の閾値以上であるとき、色相データH及び彩度データSの両方をAF評価値算出に用い、色相データHと彩度データSに所定の重み付けをして積算し、この積算値をAF評価値とすることができる。
【0011】
以上の自動焦点調節装置は、特に電子内視鏡装置に適している。電子内視鏡装置に搭載される場合、被写体を色素剤によって着色、染色及び変色させていない通常観察モードと、被写体を色素剤によって着色、染色及び変色させた色素観察モードとにおいて、AF評価値の算出方法が切り替わる。
【0012】
【発明の実施の形態】
図1は、本発明による自動焦点調節装置を備えた医療用内視鏡装置の主要構成を示すブロック図である。内視鏡装置100は、患者の体腔内を撮像する電子内視鏡10、電子内視鏡10の撮像画像を加工するプロセッサ30及びプロセッサ30から出力された映像信号を表示するTVモニタ60によって構成されている。
【0013】
電子内視鏡10は、患者の体腔内に挿入する柔軟な挿入部11と、この電子内視鏡10の操作者が把持する把持操作部12と、把持操作部12の側部に延設されたユニバーサルチューブ13と、このユニバーサルチューブ13の先端に設けたコネクタ部14とを有し、コネクタ部14を介してプロセッサ30に着脱可能である。
【0014】
挿入部11の先端11aには、図2に示すように、対物レンズ15、一対の照明レンズ16、送気送水ノズル17、処置具挿通チャンネル出口部18aが配置されている。対物レンズ15の後方には、該対物レンズ15の光軸方向に沿って可動可能なフォーカスレンズL及びCCD20が配置されている。フォーカスレンズLは、コネクタ部14に設けたAFモータ19からの駆動力を受けて移動する。本実施形態では、無限遠端から至近端までの可動領域に複数のステップ位置を設け、このステップ位置単位でフォーカスレンズLを移動させる。対物レンズ15及びフォーカスレンズLによって結像された像は、CCD(撮像素子)20で撮像され、プロセッサ30を介してTVモニタ60上で観察することができる。照明レンズ16には、ユニバーサルチューブ13から把持操作部12及び挿入部11内を通るライトガイドLG1を介して、プロセッサ30に備えられたランプ光源33からの照明光が与えられる。把持操作部12には、AF動作を開始させるAF開始スイッチSWAFを含む種々の操作スイッチが設けられていて、把持操作部12と挿入部11の間に位置する連結部には、処置具挿通チャンネル出口部18aに通じる処置具挿通口18が設けられている。
【0015】
プロセッサ30には、CCD20及びCCDプロセス回路22に同期信号を出力し、この同期信号に基づいてCCD20を走査させるCCD駆動回路21が備えられている。CCD20は、いわゆる原色CCDであり、RGB画像信号を出力する。CCDプロセス回路22は、CCD駆動回路21から入力した同期信号に同期して、CCD20のRGB画像信号を読み込み、該読み込んだ信号を前処理(信号増幅処理やノイズ除去処理など)する回路である。このCCDプロセス回路22から出力された信号は、A/D変換回路23にてデジタル信号に変換され、映像信号処理回路24にてホワイトバランスやガンマ補正などの各種画像処理が施された後、D/A変換回路25にてアナログ信号に変換されてTVモニタ60へ出力される。またCCD20のRGB画像信号は、上記CCDプロセス回路22及びA/D変換回路23を介して、色分離変換回路26にも入力される。色分離変換回路26は、入力したRGB画像信号に対して各画素毎に色分離を行ない、RGB(赤、緑、青)のデータ配列(RGB画像データ群)を生成する。色分離変換回路26から出力されるRGB画像データ群RGB[x][y](x、y;自然数)は、RGBマトリックス回路27を通ってRデータ群R[x][y]、Gデータ群G[x][y]、Bデータ群B[x][y]に分けられ、それぞれが独立してマイコン28に出力される。本実施形態では、上記CCDプロセス回路22、A/D変換回路23、色分離変換回路26及びRGBマトリックス回路27によって画像取得手段が構成される。
【0016】
マイコン28は、入力したRデータ群R[x][y]、Gデータ群G[x][y]、Bデータ群B[x][y]をHSIデータ群HSI[x][y](色相H、彩度S、明度I)に変換する。RGBからHSIの変換には、周知のように、6角錐カラーモデルの変換式を用いることができる。さらにマイコン28は、このHSIデータ群H[x][y]、S[x][y]、I[x][y]に基づいて所定の演算を行ない、被写体の焦点状態を示すAF評価値を算出する。このAF評価値はモータ制御回路31へ出力される。モータ制御回路31は、マイコン28から入力したAF評価値に基づき、電子内視鏡10内に備えられたAFモータ19の駆動量を算出し、この算出した駆動量分だけ、モータ駆動回路32を介してAFモータ19を駆動させてフォーカスレンズLを移動させる。上記RGB画像データ群入力及びAF評価値算出は、フォーカスレンズLを移動させながらフォーカスレンズLの各ステップ位置で実行される。そして、フォーカスレンズLは最終的に、AF評価値が最大となるステップ位置(ピント位置)へ移動される。
【0017】
プロセッサ30には、さらに、ランプ光源33が備えられている。ランプ光源33から射出された照明光は、不図示の絞りによって最適光量に調整された後、集光レンズ34及びライトガイドLG2を介して照明レンズ16に供給される。
【0018】
以上の全体構成を有する内視鏡装置100では、マイコン29が、電子内視鏡10から入力した画像状態に応じてAF評価値の算出方法を切り替えながら焦点調節動作を行なう。別言すれば、電子内視鏡10から入力した画像データ群に基づいて被写体が色素剤によって着色、染色又は変色しているか否かを判断し、色素剤を用いないで観察する(被写体が着色、染色及び変色されていない)通常モード(第1モード)と、色素剤を用いて観察する(被写体が着色、染色または変色されている)色素モード(第2モード)とにAF評価値の算出方法が切り替わる。
【0019】
具体的にマイコン29は、色相データ群H[x][y]のばらつきを算出し、この算出結果が所定の閾値未満であるとき通常モードに切り替え、所定の閾値以上であるときに色素モードに切り替える。そして、通常モードであれば、被写体の輝度差を十分に検出可能であるから、被写体の輝度に対応する明度データ群I[x][y]を用いてAF評価値を算出する。一方、色素モードであれば、被写体が色素剤により着色、染色または変色されているために輝度差が少ないので、色相データ群H[x][y]及び彩度データ群S[x][y]を用いてAF評価値を算出する。このように電子内視鏡10の画像状態に応じてAF評価値の算出方法を切り替えれば、色素剤を用いるか否かに拘わらず正確なAF評価値を算出することができ、該AF評価値に基づいて高精度なAF動作を実現可能である。
【0020】
次に、図3を参照し、内視鏡装置100のAF動作をより詳細に説明する。図3は、内視鏡装置100のAF動作に関するフローチャートである。このAF動作は、AF開始スイッチSWAFがオン操作されたときに開始され、マイコン28により制御される。
【0021】
AF動作に入ると先ず、最大AF評価値を示す変数Cmaxに0をセットし(S1)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させてフォーカスレンズLを無限遠端に移動させる(S3)。次に、フォーカスレンズLが至近端に達しているか否かをチェックする(S5)。フォーカスレンズLの位置は、例えば、AFモータ19の駆動量を換算して検出するか、あるいはフォーカスレンズLに位置検出手段(位置検出センサやコード板等)を設けて該位置検出手段からの出力信号に基づいて検出する。
【0022】
フォーカスレンズLが至近端に達していなければ(S5;N)、RGBマトリックス回路27からRGB画像データ群R[x][y]、G[x][y]、B[x][y]をそれぞれ独立に入力して(S7)、モード認識処理を実行する(S9)。モード認識処理では、S7で入力したRGB画像データ群R[x][y]、G[x][y]、B[x][y]に基づいて色相ばらつきの有無をチェックし、ばらつきがなければAF評価値の算出方法を通常モードに切り替え、ばらつきがあればAF評価値の算出方法を色素モードに切り替える。
【0023】
続いて、S9にて色素モードであるか否かをチェックし(S11)、色素モードであれば、色素モード用のアルゴリズムに従ってAF評価値を算出する(S11;Y、S13)。一方、色素モードでなければ、通常モード用のアルゴリズムに従ってAF評価値を算出する(S11;N、S15)。算出されたAF評価値と該AF評価値を得たレンズ位置は、マイコン28内に保持される。
【0024】
AF評価値を算出したら、該AF評価値が変数Cmaxよりも大きいか否かをチェックする(S17)。変数Cmaxよりも大きい場合は(S17;Y)、該変数CmaxにS13またはS15で算出したAF評価値を上書メモリして(S19)、フォーカスレンズLを至近側へ1ステップ移動させ(S21)、S5へ戻る。一方、S11またはS13で算出したAF評価値が変数Cmaxよりも大きくなかった場合は(S17;N)、変数Cmaxを変更せずに、フォーカスレンズLを至近側へ1ステップ移動させ(S21)、S5へ戻る。
【0025】
上記S5〜S21の処理は、フォーカスレンズLが至近端に達するまで(至近端に達してそれ以上至近側に移動できなくなるまで)繰り返し実行される。つまり、フォーカスレンズLの全ステップ位置(無限遠端及び至近端を含む)においてそれぞれAF評価値が算出され、該AF評価値と変数Cmaxとが比較されて変数Cmaxはより大きい値に更新され、最終的に変数Cmaxにメモリされている値が最大AF評価値となる。そして、フォーカスレンズLが至近端に達していた場合は(S5;Y)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させ、変数CmaxにメモリされていたAF評価値が得られるレンズ位置にフォーカスレンズLを移動させる(S23)。
【0026】
次に、図4を参照し、図3のS9で実行されるモード認識処理について詳細に説明する。この処理に入ると先ず、色相ばらつき判定を行なう(S31)。色相ばらつき判定では、図3のS7で入力したRGB画像データ群R[x][y]、G[x][y]、B[x][y]を色相データ群H[x][y]に変換し、この色相データ群H[x][y]のばらつきを算出して、該分散値が所定の閾値を超える場合に色相ばらつき有りと判定する。そして、色相ばらつきがあれば色素モードに切り替え(S33;Y、S35)、色相ばらつきがなければ通常モードに切り替える(S33;N、S37)。
【0027】
次に、図5を参照し、図4のS31で実行される色相ばらつき判定処理について詳細に説明する。この処理に入ると先ず、図3のS7で入力したRGB画像データ群R[x][y]、G[x][y]、B[x][y]の全画素の平均値Rm、Gm、Bmをそれぞれ算出し(S41)、これら平均値Rm、Gm、BmをHSI変換して色相基準Hmを求め(S43)、判定結果を“ばらつき無し”にリセットする(S45)。色相基準Hmは、色相ばらつきを比較するための基準値である。
【0028】
続いて、図3のS7で入力したRGB画像データ群R[x][y]、G[x][y]、B[x][y]に対し、画素単位でS49及びS51の処理を行なう(S47〜S51)。S47では、S49及びS51の処理がRGB画像データ群R[x][y]、G[x][y]、B[x][y]の全画素に対して終了したか否かをチェックする。終了していなければ(S47;N)、変数x、yで指定される画素[x][y]の該RGB画像データR[x][y]、G[x][y]、B[x][y]をHSI変換して色相データH[x][y]を算出して(S49)、該算出した色相データH[x][y]と色相基準Hmとの差分が所定の閾値を超えているか否かをチェックし(S51)、色相データH[x][y]と色相基準Hmとの差分が所定の閾値を超えていなければS47へ戻る(S51;N)。そして、S49及びS51の処理を全画素に対して終了したら(S47;Y)、この処理を抜けて図4のS33へ進む。このようにS47でNoと判断される場合は、色相データH[x][y]と色相基準Hmとの差分が上記閾値を超える画素がなかった場合であって、判定結果はS45でセットされた“ばらつき無し”のままリターンする。一方、色相データH[x][y]と色相基準Hmとの差分が所定の閾値を超えていれば(S51;Y)、判定結果を“ばらつき有り”にセットし(S53)、この処理をぬけて図4のS33へ進む。
【0029】
上記色相ばらつき判定では、色相データH[x][y]の分散値と所定の閾値を比較し、この比較結果により色相ばらつきの有無を判定することが理想的である。しかしながら、実際には、色相データH[x][y]の平均値を算出するには複雑な演算が必要であるため、色相データH[x][y]の分散値を数値で算出することは容易でない。そこで本実施形態では、上述したように、平均値である色相基準Hmと個々の色相データH[x][y]との差分を算出し、この差分に基づいて色相ばらつきを判定している。
【0030】
次に、図6を参照し、図3のS13で実行される色素モード用AF評価値算出処理について詳細に説明する。色素モード用のAF評価値算出処理では、入力したRGB画像データ群RGB[x][y]をHSIデータ群HSI[x][y]に変換し、このHSIデータ群の色相データ群H[x][y]及び彩度データ群S[x][y]を用いてAF評価値を算出する。
【0031】
この処理に入ると、先ず、AF評価値を格納する変数Cに0をセットし(S61)、RGB画像データ群RGB[x][y]の行(垂直方向位置)を指定する変数y(1≦y≦IH-2)に1をセットする(S63)。次に、変数yが(IH-1)未満か否かにより、規定の最大垂直位置IH-2を超えていないかどうかをチェックする(S65)。変数yが(IH-1)未満であったときは(S65;Y)、RGB画像データ群RGB[x][y]の列(水平方向位置)を指定する変数x(1≦x≦IW-2)に1をセットし(S67)、変数xが(IW-1)未満であるか否かにより規定の最大水平位置IW-2を超えていないかどうかをチェックする(S69)。変数xが(IW-1)未満であれば、上記変数x、yで指定される画素[x][y]に隣り合う画素のRGB画素データをHSIデータに変換する(S71)。すなわち、垂直方向で隣り合う画素[x][y+1]、[x][y-1]と、水平方向で隣り合う画素[x-1][y]、[x+1][y]との計4画素について、RGB画像データをHSIデータに変換する。
【0032】
そして、S71で変換した4画素分の色相データH[x][y+1]、H[x][y-1]、H[x-1][y]、H[x+1][y]を用いて、画素[x][y]に対する色相差分H’を算出する(S73)。色相差分H’は、画素[x][y]に対する水平方向の色相差分|ΔHx|と画素[x][y]に対する垂直方向の色相差分|ΔHy|の積算値である。ここで、水平方向の色相差分|ΔHx|は式;|ΔHx|=|H[x+1][y]−H[x-1][y]|から算出し、垂直方向の色相差分|ΔHy|は式;|ΔHy|=|H[x][y+1]−H[x][y-1]|により算出する。なお、上記式により算出した色相差分H’が360以上である場合には、0≦H’<360となるように換算する。
【0033】
色相差分H’を算出したら、S71で変換した4画素分の彩度データS[x][y+1]、S[x][y-1]、S[x-1][y]、S[x+1][y]を用いて、画素[x][y]の垂直方向の彩度差分S’を算出する(S75)。彩度差分S’は、画素[x][y]に対する水平方向の彩度差分|ΔSx|と画素[x][y]に対する垂直方向の彩度差分|ΔSy|の積算値である。ここで、水平方向の彩度差分|ΔSx|は式;|ΔSx|=|S[x+1][y]−S[x-1][y]|から算出し、垂直方向の彩度差分|ΔSy|は式;|ΔSy|=|S[x][y+1]−S[x][y-1]|により算出する。
【0034】
続いて、S73及びS75で算出した色相差分H’及び彩度差分S’を変数Cに加算して上書きメモリする(S77)。変数Cを更新したら、変数xに1加算して上書きメモリし、S69へ戻る(S79)。S69へ戻ったら、変数xが(IW-1)になるまで上記S69からS79までの処理を繰り返す。このS69〜S79を1回実行することにより、RGB画像データ群RGB[x][y]の1行分(RGB[1][y]〜RGB[IW-2][y])に対して処理(HSIデータ変換及びAF評価値算出)が行われる。
【0035】
S69のチェックにて変数xが(IW-1)未満でなくなったら(S69;N)、すなわちRGB画像データ群RGB[x][y]の1行分の処理が終了したら、変数yに1加算して上書メモリし、S65へ戻る(S81)。S65へ戻ったら、変数yが(IH-1)になるまで、該S65からS81までの処理を繰り返し実行する。このS65〜S81の繰り返しにより、RGB画像データ群の全画素分RGB[1][1]〜RGB[IW-2][IH-2]に対してHSIデータ変換及びAF評価値算出が行なわれ、フォーカスレンズLの現在位置におけるAF評価値が変数Cにメモリされる。そして、変数yが(IH-1)未満でなくなったら(S65;N)、この処理から抜けて図3のS17へ進む。
【0036】
図7は、図3のS15で実行される通常モード用のAF評価値算出処理に関するフローチャートである。通常モード用のAF評価値算出処理では、入力したRGB画像データ群RGB[x][y]をHSIデータ群HSI[x][y]に変換し、このHSIデータ群の明度データI[x][y]に基づいてAF評価値を算出する。別言すれば、図7のフローチャートは、図6のS73、S75及びS77の替わりにS74及びS76が備えられている以外は図6と同一である。すなわち、S74では、S71で変換した4画素分の色相データH[x][y+1]、H[x][y-1]、H[x-1][y]、H[x+1][y]を用いて、画素[x][y]に対する明度差分I’を算出する。そして、算出した明度差分I’を変数Cに加算して(S76)、AF評価値を算出する。明度差分I’は、画素[x][y]に対する水平方向の明度差分|ΔIx|と画素[x][y]に対する垂直方向の明度差分|ΔIy|の積算値であって、水平方向の明度差分|ΔIx|は式;|ΔIx|=|I[x+1][y]−I[x-1][y]|から算出し、垂直方向の明度差分|ΔIy|は式;|ΔIy|=|I[x][y+1]−I[x][y-1]|により算出する。
【0037】
以上の本実施形態によれば、CCD20からのRGB画像データ群RGB[x][y]がHSIデータ群HSI[x][y]に変換され、このHSIデータ群HSI[x][y]の色相データ群H[x][y]のばらつきに応じて、通常モードと色素モードとにAF評価値算出方法が切り替えられる。そして通常モードであれば、被写体の輝度差を十分検出可能であるため、明度データ群I[x][y]を用いてAF評価値が算出される。一方、色素モードであれば、色素剤により被写体の輝度差が少なくなっているため、色相データ群H[x][y]及び彩度データ群S[x][y]を用いてAF評価値が算出される。このように電子内視鏡10からの画像データ群に応じた最適な算出方法でAF評価値が算出されれば、正確なAF評価値が得られ、該AF評価値に基づいて高精度なAF動作を実現可能である。
【0038】
本実施形態では、色相データ群H[x][y]のばらつきに応じてAF評価値の算出方法を切り替えているが、彩度データ群S[x][y]のばらつきに応じて切り替えてもよく、また色相データ群H[x][y]及び彩度データ群S[x][y]の両ばらつきに応じて切り替えてもよい。
【0039】
また本実施形態では、色素モードであるとき色相データ群H[x][y]及び彩度データ群S[x][y]を用いてAF評価値を算出し、通常モードであるとき明度データ群I[x][y]を用いてAF評価値を算出しているが、AF評価値は色相データH[x][y]、彩度データS[x][y]及び明度データI[x][y]のすべてを用いて算出してもよい。具体的には、図6のS73、S75及び図7のS74で算出した色相差分H’、彩度差分S’及び明度差分I’のそれぞれに特定の重み付け(α、β、γ)を付与して積算し、この積算値(α×H’+β×S’+γ×I’)を変数Cに加算していくことで、AF評価値を得る。このとき、通常モードであれば、明度差分I’の重み付け係数γを色相差分H’の重み付け係数α及び彩度差分S’の重み付け係数βよりも大きく設定することが好ましい。一方、色素モードであれば、色相差分H’の重み付け係数α及び彩度差分S’の重み付け係数βを明度差分I’の重み付け係数γよりも大きく設定することが好ましい。
【0040】
なお、本実施形態では、マイコン28がデータ変換手段、評価値算出手段、ばらつき算出手段、色相算出手段、彩度算出手段及び明度算出手段として機能しているが、マイコン28とは別に独立して上記各手段を設けることも可能である。また、上記実施形態では、CCD20に原色CCDを用いているが、原色CCDに替えて、補色CCDを用いることも可能である。補色CCDを用いる場合には、該補色CCDから出力される補色画像データをRGB画像データに変換するRGB変換回路を備える。
【0041】
【発明の効果】
本発明によれば、内視鏡の撮像手段からの画像データ群がHSI変換されて色相データ群H及び彩度データ群Sを取得し、これら色相データ群H及び彩度データ群Sの少なくとも一方のばらつきに応じた最適な方法でAF評価値が算出されるので、色素剤を用いない通常観察時にも色素剤を用いる色素観察時にも正確なAF評価値を得ることができ、高精度なAF動作を実現可能である。
【図面の簡単な説明】
【図1】本発明の第1実施形態による自動焦点調節装置を備えた内視鏡装置の主要構成を示すブロック図である。
【図2】図1の電子内視鏡の挿入部先端を示す平面図である。
【図3】図1に示す内視鏡用装置のAF動作に関するフローチャートである。
【図4】図3のS9で実行されるモード認識処理に関するフローチャートである。
【図5】図4のS31で実行される色相ばらつき判定処理に関するフローチャートである。
【図6】図3のS13で実行される色素モード用AF評価値算出処理に関するフローチャートである。
【図7】図3のS15で実行される通常モード用AF評価値算出処理に関するフローチャートである。
【符号の説明】
10 電子内視鏡
11 体内挿入部
12 把持操作部
13 ユニバーサルチューブ
14 コネクタ部
15 対物レンズ
16 照明レンズ
17 送気送水ノズル
18 処置具挿通口
19 AFモータ
20 CCD
21 CCD駆動回路
22 CCDプロセス回路
23 A/D変換回路
24 映像信号処理回路
25 D/A変換回路
26 色分離変換回路
27 RGBマトリックス回路
28 マイコン
30 プロセッサ
31 モータ制御回路
32 モータ駆動回路
33 ランプ光源
34 集光レンズ
60 TVモニタ
100 内視鏡装置
L フォーカスレンズ
LG1 ライトガイド(電子内視鏡側)
LG2 ライトガイド(プロセッサ側)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an automatic focus adjustment device particularly suitable for an electronic endoscope.
[0002]
[Prior art and its problems]
In recent years, various electronic endoscopes having an autofocus (AF) function in which the position of the focus lens is automatically adjusted according to the position of the distal end of the insertion portion of the endoscope have been proposed. Such an automatic focus adjustment apparatus provided in an electronic endoscope generally adjusts the position of a focus lens based on image data from an image sensor (CCD) provided at the distal end of an insertion portion of the endoscope. Specifically, a predetermined calculation is performed using the high-frequency component of the image data (luminance information of the image data), an evaluation value indicating the focus state of the subject is calculated, and the focus lens is positioned at the position where the evaluation value is maximum. Is moved (see Patent Document).
[0003]
By the way, in endoscopy, observation may be performed using a coloring agent for the purpose of obtaining more detailed findings than normal observation or obtaining findings that cannot be obtained by normal observation. In such a dye endoscopy (pigment method), the subject is dyed or colored in a specific color by the coloring agent, so that the luminance change tends to be smaller than in normal observation without the coloring agent. Are known.
[0004]
However, in the conventional method as described above, since the AF evaluation value is calculated based on the luminance information of the image data, there is a possibility that an accurate AF evaluation value may not be obtained during dye observation, and high-precision focus adjustment is realized. It was difficult to do.
[0005]
[Patent Literature]
Japanese Patent Laid-Open No. 2001-154085
OBJECT OF THE INVENTION
An object of the present invention is to obtain an automatic focus adjustment device capable of high-precision focus adjustment in a mode suitable for the color state (colored, dyed or discolored state) of a subject.
[0007]
Summary of the Invention
The reason for the present invention is that the AF evaluation value is calculated by the same calculation method regardless of whether or not the subject is colored or discolored as a factor that the accurate AF evaluation value cannot be obtained during dye observation in the conventional method. In particular, it focuses on it.
[0008]
That is, the present invention provides an image acquisition unit for obtaining an image data group from a pixel group of an imaging unit, and an image data group in an automatic focus adjustment apparatus that moves a focus lens based on an AF evaluation value calculated by a predetermined calculation. A data conversion means for converting the image data group into an HSI data group, an HSI conversion of the average value of the image data group to calculate a hue reference value, and a hue difference between the hue reference value and the hue data H is calculated as a variation in the hue data H When the variation in the hue data H is less than a predetermined threshold, the AF evaluation value is calculated using the brightness data I of the HSI data group, and when the hue data H is greater than the predetermined threshold, It includes an evaluation value calculation means for using one or both of the degrees data S calculates an AF evaluation value, and the threshold value, normal observation mode and a dye agent without using a dye agent Value to determine which of dye observation mode using is characterized in that it is set.
[0010]
The evaluation value calculation means uses both the hue data H and the saturation data S for AF evaluation value calculation when the variation of the hue data H is equal to or greater than a predetermined threshold, and the hue data H and the saturation data S are weighted with a predetermined weight. The accumulated value can be used as an AF evaluation value.
[0011]
The above automatic focusing device is particularly suitable for an electronic endoscope device. When mounted on an electronic endoscope apparatus , AF evaluation values in the normal observation mode in which the subject is not colored, stained, or discolored with the coloring agent and in the dye observation mode in which the subject is colored, stained, or discolored with the coloring agent The calculation method of is switched.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a main configuration of a medical endoscope apparatus provided with an automatic focusing apparatus according to the present invention. The endoscope apparatus 100 includes an electronic endoscope 10 that images a patient's body cavity, a processor 30 that processes a captured image of the electronic endoscope 10, and a TV monitor 60 that displays a video signal output from the processor 30. Has been.
[0013]
The electronic endoscope 10 is extended to a flexible insertion portion 11 that is inserted into a body cavity of a patient, a grip operation portion 12 that is held by an operator of the electronic endoscope 10, and a side portion of the grip operation portion 12. The universal tube 13 and a connector portion 14 provided at the tip of the universal tube 13 are detachable from the processor 30 via the connector portion 14.
[0014]
As shown in FIG. 2, an objective lens 15, a pair of illumination lenses 16, an air / water supply nozzle 17, and a treatment instrument insertion channel outlet 18 a are disposed at the distal end 11 a of the insertion portion 11. A focus lens L and a CCD 20 that are movable along the optical axis direction of the objective lens 15 are disposed behind the objective lens 15. The focus lens L moves upon receiving a driving force from the AF motor 19 provided in the connector unit 14. In the present embodiment, a plurality of step positions are provided in the movable region from the infinity end to the close end, and the focus lens L is moved in units of this step position. An image formed by the objective lens 15 and the focus lens L is picked up by a CCD (image pickup device) 20 and can be observed on the TV monitor 60 via the processor 30. Illumination light from a lamp light source 33 provided in the processor 30 is given to the illumination lens 16 via the light guide LG1 passing from the universal tube 13 through the grip operation unit 12 and the insertion unit 11. The grip operation unit 12 is provided with various operation switches including an AF start switch SWAF for starting an AF operation, and a treatment instrument insertion channel is provided at a connecting portion positioned between the grip operation unit 12 and the insertion unit 11. A treatment instrument insertion port 18 leading to the outlet portion 18a is provided.
[0015]
The processor 30 includes a CCD drive circuit 21 that outputs a synchronization signal to the CCD 20 and the CCD process circuit 22 and scans the CCD 20 based on the synchronization signal. The CCD 20 is a so-called primary color CCD and outputs RGB image signals. The CCD process circuit 22 is a circuit that reads the RGB image signal of the CCD 20 in synchronization with the synchronization signal input from the CCD drive circuit 21 and preprocesses the read signal (signal amplification processing, noise removal processing, etc.). The signal output from the CCD process circuit 22 is converted into a digital signal by the A / D conversion circuit 23, and after various image processing such as white balance and gamma correction is performed by the video signal processing circuit 24, The analog signal is converted by the / A conversion circuit 25 and output to the TV monitor 60. The RGB image signal of the CCD 20 is also input to the color separation conversion circuit 26 via the CCD process circuit 22 and the A / D conversion circuit 23. The color separation conversion circuit 26 performs color separation for each pixel on the input RGB image signal to generate an RGB (red, green, blue) data array (RGB image data group). The RGB image data group RGB [x] [y] (x, y; natural numbers) output from the color separation conversion circuit 26 passes through the RGB matrix circuit 27, and the R data group R [x] [y], G data group. G [x] [y] and B data group B [x] [y] are divided and output to the microcomputer 28 independently. In the present embodiment, the CCD process circuit 22, the A / D conversion circuit 23, the color separation conversion circuit 26, and the RGB matrix circuit 27 constitute an image acquisition unit.
[0016]
The microcomputer 28 converts the input R data group R [x] [y], G data group G [x] [y], and B data group B [x] [y] into the HSI data group HSI [x] [y] ( Hue H, Saturation S, Lightness I). For conversion from RGB to HSI, a conversion formula of a hexagonal pyramid color model can be used as is well known. Further, the microcomputer 28 performs a predetermined calculation based on the HSI data group H [x] [y], S [x] [y], I [x] [y], and indicates an AF evaluation value indicating the focus state of the subject. Is calculated. The AF evaluation value is output to the motor control circuit 31. The motor control circuit 31 calculates the driving amount of the AF motor 19 provided in the electronic endoscope 10 based on the AF evaluation value input from the microcomputer 28, and the motor driving circuit 32 is calculated by the calculated driving amount. Then, the AF motor 19 is driven to move the focus lens L. The RGB image data group input and the AF evaluation value calculation are executed at each step position of the focus lens L while moving the focus lens L. Then, the focus lens L is finally moved to the step position (focus position) where the AF evaluation value is maximized.
[0017]
The processor 30 further includes a lamp light source 33. The illumination light emitted from the lamp light source 33 is adjusted to an optimum light amount by a diaphragm (not shown), and then supplied to the illumination lens 16 via the condenser lens 34 and the light guide LG2.
[0018]
In the endoscope apparatus 100 having the overall configuration described above, the microcomputer 29 performs the focus adjustment operation while switching the AF evaluation value calculation method according to the image state input from the electronic endoscope 10. In other words, based on the image data group input from the electronic endoscope 10, it is determined whether or not the subject is colored, stained or discolored by the coloring agent, and observation is performed without using the coloring agent (the subject is colored). AF evaluation values are calculated for a normal mode (first mode) that is not dyed or discolored) and a dye mode (second mode) in which observation is performed using a coloring agent (subject is colored, stained, or discolored). The method switches.
[0019]
Specifically, the microcomputer 29 calculates the variation of the hue data group H [x] [y], and switches to the normal mode when the calculation result is less than a predetermined threshold, and switches to the dye mode when the calculation result is equal to or greater than the predetermined threshold. Switch. In the normal mode, since the luminance difference of the subject can be sufficiently detected, the AF evaluation value is calculated using the brightness data group I [x] [y] corresponding to the luminance of the subject. On the other hand, in the dye mode, since the subject is colored, dyed, or discolored by the coloring agent, there is little difference in luminance. Therefore, the hue data group H [x] [y] and the saturation data group S [x] [y ] Is used to calculate the AF evaluation value. By switching the AF evaluation value calculation method in accordance with the image state of the electronic endoscope 10 in this way, an accurate AF evaluation value can be calculated regardless of whether or not a coloring agent is used. Based on this, it is possible to realize a highly accurate AF operation.
[0020]
Next, the AF operation of the endoscope apparatus 100 will be described in more detail with reference to FIG. FIG. 3 is a flowchart regarding the AF operation of the endoscope apparatus 100. This AF operation is started when the AF start switch SWAF is turned on and is controlled by the microcomputer 28.
[0021]
When the AF operation is started, first, a variable Cmax indicating the maximum AF evaluation value is set to 0 (S1), the AF motor 19 is driven via the motor control circuit 31 and the motor drive circuit 32, and the focus lens L is moved to the infinity end. (S3). Next, it is checked whether or not the focus lens L has reached the closest end (S5). The position of the focus lens L is detected, for example, by converting the driving amount of the AF motor 19, or the focus lens L is provided with position detection means (position detection sensor, code plate, etc.) and output from the position detection means. Detect based on signal.
[0022]
If the focus lens L has not reached the closest end (S5; N), the RGB matrix data 27 from the RGB matrix circuit 27 R [x] [y], G [x] [y], B [x] [y] Are input independently (S7), and mode recognition processing is executed (S9). In the mode recognition process, the presence / absence of hue variation is checked based on the RGB image data groups R [x] [y], G [x] [y], and B [x] [y] input in S7. For example, the AF evaluation value calculation method is switched to the normal mode, and if there is variation, the AF evaluation value calculation method is switched to the dye mode.
[0023]
Subsequently, in S9, it is checked whether or not it is the dye mode (S11). If it is the dye mode, an AF evaluation value is calculated according to the algorithm for the dye mode (S11; Y, S13). On the other hand, if it is not the dye mode, the AF evaluation value is calculated according to the algorithm for the normal mode (S11; N, S15). The calculated AF evaluation value and the lens position where the AF evaluation value is obtained are held in the microcomputer 28.
[0024]
After calculating the AF evaluation value, it is checked whether the AF evaluation value is larger than the variable Cmax (S17). If it is larger than the variable Cmax (S17; Y), the AF evaluation value calculated in S13 or S15 is overwritten in the variable Cmax (S19), and the focus lens L is moved one step toward the closest side (S21). Return to S5. On the other hand, when the AF evaluation value calculated in S11 or S13 is not larger than the variable Cmax (S17; N), the focus lens L is moved one step toward the closest side without changing the variable Cmax (S21). Return to S5.
[0025]
The processes of S5 to S21 are repeatedly executed until the focus lens L reaches the close end (until it reaches the close end and can no longer move to the close side). That is, the AF evaluation values are calculated at all step positions (including the infinity end and the close end) of the focus lens L, and the AF evaluation value is compared with the variable Cmax to update the variable Cmax to a larger value. Finally, the value stored in the variable Cmax becomes the maximum AF evaluation value. If the focus lens L has reached the closest end (S5; Y), the AF motor 19 is driven via the motor control circuit 31 and the motor drive circuit 32, and the AF evaluation value stored in the variable Cmax is stored. The focus lens L is moved to the lens position where the lens is obtained (S23).
[0026]
Next, the mode recognition process executed in S9 of FIG. 3 will be described in detail with reference to FIG. When entering this process, first, hue variation determination is performed (S31). In the hue variation determination, the RGB image data groups R [x] [y], G [x] [y], and B [x] [y] input in S7 of FIG. 3 are used as the hue data group H [x] [y]. And the variation of the hue data group H [x] [y] is calculated. When the variance value exceeds a predetermined threshold, it is determined that there is a variation in hue. If there is a hue variation, the mode is switched to the dye mode (S33; Y, S35), and if there is no hue variation, the mode is switched to the normal mode (S33; N, S37).
[0027]
Next, the hue variation determination process executed in S31 of FIG. 4 will be described in detail with reference to FIG. When entering this process, first, the average values Rm, Gm of all the pixels of the RGB image data groups R [x] [y], G [x] [y], B [x] [y] inputted in S7 of FIG. , Bm are respectively calculated (S41), and the average values Rm, Gm, Bm are subjected to HSI conversion to obtain a hue reference Hm (S43), and the determination result is reset to “no variation” (S45). The hue reference Hm is a reference value for comparing hue variations.
[0028]
Subsequently, the processing of S49 and S51 is performed for each pixel on the RGB image data group R [x] [y], G [x] [y], and B [x] [y] input in S7 of FIG. (S47 to S51). In S47, it is checked whether or not the processing in S49 and S51 has been completed for all the pixels of the RGB image data groups R [x] [y], G [x] [y], and B [x] [y]. . If not completed (S47; N), the RGB image data R [x] [y], G [x] [y], B [x] of the pixel [x] [y] specified by the variables x and y ] [y] is subjected to HSI conversion to calculate hue data H [x] [y] (S49), and the difference between the calculated hue data H [x] [y] and the hue reference Hm has a predetermined threshold value. It is checked whether or not it exceeds (S51), and if the difference between the hue data H [x] [y] and the hue reference Hm does not exceed a predetermined threshold, the process returns to S47 (S51; N). Then, when the processing of S49 and S51 is completed for all the pixels (S47; Y), the processing exits from this processing and proceeds to S33 in FIG. As described above, when it is determined No in S47, there is no pixel in which the difference between the hue data H [x] [y] and the hue reference Hm exceeds the threshold value, and the determination result is set in S45. Return with no variation. On the other hand, if the difference between the hue data H [x] [y] and the hue reference Hm exceeds a predetermined threshold (S51; Y), the determination result is set to “with variation” (S53), and this process is performed. The process proceeds to S33 in FIG.
[0029]
In the hue variation determination, it is ideal to compare the dispersion value of the hue data H [x] [y] with a predetermined threshold and determine the presence or absence of hue variation based on the comparison result. However, in actuality, since a complex operation is required to calculate the average value of the hue data H [x] [y], the variance value of the hue data H [x] [y] should be calculated numerically. Is not easy. Therefore, in the present embodiment, as described above, the difference between the hue reference Hm that is an average value and the individual hue data H [x] [y] is calculated, and the hue variation is determined based on this difference.
[0030]
Next, the dye mode AF evaluation value calculation process executed in S13 of FIG. 3 will be described in detail with reference to FIG. In the AF evaluation value calculation process for the dye mode, the input RGB image data group RGB [x] [y] is converted into the HSI data group HSI [x] [y], and the hue data group H [x of this HSI data group is converted. ] [y] and saturation data group S [x] [y] are used to calculate an AF evaluation value.
[0031]
In this process, first, a variable C for storing the AF evaluation value is set to 0 (S61), and a variable y (1) for designating a row (vertical direction position) of the RGB image data group RGB [x] [y]. 1 is set to ≦ y ≦ IH-2) (S63). Next, whether or not the variable y exceeds the specified maximum vertical position IH-2 is checked based on whether or not the variable y is less than (IH-1) (S65). When the variable y is less than (IH-1) (S65; Y), the variable x (1 ≦ x ≦ IW−) that designates a column (horizontal position) of the RGB image data group RGB [x] [y]. 2 is set to 1 (S67), and it is checked whether or not the specified maximum horizontal position IW-2 has been exceeded (S69) depending on whether or not the variable x is less than (IW-1). If the variable x is less than (IW-1), the RGB pixel data of the pixel adjacent to the pixel [x] [y] specified by the variables x and y is converted into HSI data (S71). That is, pixels [x] [y + 1] and [x] [y-1] adjacent in the vertical direction and pixels [x-1] [y] and [x + 1] [y] adjacent in the horizontal direction RGB image data is converted into HSI data for a total of four pixels.
[0032]
Then, hue data H [x] [y + 1], H [x] [y-1], H [x-1] [y], H [x + 1] [y for four pixels converted in S71. ], A hue difference H ′ for the pixel [x] [y] is calculated (S73). The hue difference H ′ is an integrated value of the hue difference | ΔHx | in the horizontal direction with respect to the pixel [x] [y] and the hue difference | ΔHy | in the vertical direction with respect to the pixel [x] [y]. Here, the hue difference | ΔHx | in the horizontal direction is calculated from the equation; | ΔHx | = | H [x + 1] [y] −H [x−1] [y] |, and the hue difference in the vertical direction | ΔHy | Is calculated by the equation: | ΔHy | = | H [x] [y + 1] −H [x] [y−1] | When the hue difference H ′ calculated by the above formula is 360 or more, conversion is performed so that 0 ≦ H ′ <360.
[0033]
When the hue difference H ′ is calculated, the saturation data S [x] [y + 1], S [x] [y−1], S [x−1] [y], S for four pixels converted in S71. Using [x + 1] [y], the saturation difference S ′ in the vertical direction of the pixel [x] [y] is calculated (S75). The saturation difference S ′ is an integrated value of the horizontal saturation difference | ΔSx | for the pixel [x] [y] and the vertical saturation difference | ΔSy | for the pixel [x] [y]. Here, the saturation difference | ΔSx | in the horizontal direction is calculated from the equation; | ΔSx | = | S [x + 1] [y] −S [x−1] [y] | | ΔSy | is calculated by the equation: | ΔSy | = | S [x] [y + 1] −S [x] [y−1] |
[0034]
Subsequently, the hue difference H ′ and the saturation difference S ′ calculated in S73 and S75 are added to the variable C to be overwritten (S77). If the variable C is updated, 1 is added to the variable x to overwrite the memory, and the process returns to S69 (S79). After returning to S69, the processes from S69 to S79 are repeated until the variable x becomes (IW-1). By executing S69 to S79 once, processing is performed for one row (RGB [1] [y] to RGB [IW-2] [y]) of the RGB image data group RGB [x] [y]. (HSI data conversion and AF evaluation value calculation) are performed.
[0035]
When the variable x is not less than (IW-1) in the check of S69 (S69; N), that is, when the processing of one row of the RGB image data group RGB [x] [y] is completed, 1 is added to the variable y. The overwrite memory is then stored, and the process returns to S65 (S81). When returning to S65, the processes from S65 to S81 are repeatedly executed until the variable y becomes (IH-1). By repeating S65 to S81, HSI data conversion and AF evaluation value calculation are performed on RGB [1] [1] to RGB [IW-2] [IH-2] for all pixels of the RGB image data group. The AF evaluation value at the current position of the focus lens L is stored in the variable C. When the variable y is not less than (IH-1) (S65; N), the process exits from this process and proceeds to S17 in FIG.
[0036]
FIG. 7 is a flowchart relating to the AF evaluation value calculation processing for the normal mode executed in S15 of FIG. In the AF evaluation value calculation processing for the normal mode, the input RGB image data group RGB [x] [y] is converted into the HSI data group HSI [x] [y], and the brightness data I [x] of this HSI data group An AF evaluation value is calculated based on [y]. In other words, the flowchart of FIG. 7 is the same as FIG. 6 except that S74 and S76 are provided instead of S73, S75, and S77 of FIG. That is, in S74, the hue data H [x] [y + 1], H [x] [y-1], H [x-1] [y], H [x + 1] for four pixels converted in S71. ] [y] is used to calculate the brightness difference I ′ for the pixel [x] [y]. Then, the calculated brightness difference I ′ is added to the variable C (S76), and an AF evaluation value is calculated. The brightness difference I ′ is an integrated value of the brightness difference | ΔIx | in the horizontal direction with respect to the pixel [x] [y] and the brightness difference | ΔIy | in the vertical direction with respect to the pixel [x] [y]. The difference | ΔIx | is calculated from the equation; | ΔIx | = | I [x + 1] [y] −I [x−1] [y] |, and the vertical lightness difference | ΔIy | is the equation; = | I [x] [y + 1] -I [x] [y-1] |
[0037]
According to the present embodiment described above, the RGB image data group RGB [x] [y] from the CCD 20 is converted into the HSI data group HSI [x] [y], and the HSI data group HSI [x] [y] The AF evaluation value calculation method is switched between the normal mode and the dye mode according to the variation of the hue data group H [x] [y]. In the normal mode, since the luminance difference of the subject can be sufficiently detected, the AF evaluation value is calculated using the brightness data group I [x] [y]. On the other hand, in the case of the pigment mode, since the luminance difference of the subject is reduced by the pigment, the AF evaluation value using the hue data group H [x] [y] and the saturation data group S [x] [y]. Is calculated. In this way, if the AF evaluation value is calculated by an optimal calculation method corresponding to the image data group from the electronic endoscope 10, an accurate AF evaluation value is obtained, and high-precision AF is obtained based on the AF evaluation value. Operation is feasible.
[0038]
In the present embodiment, the AF evaluation value calculation method is switched according to the variation of the hue data group H [x] [y], but is switched according to the variation of the saturation data group S [x] [y]. Alternatively, switching may be performed according to both variations of the hue data group H [x] [y] and the saturation data group S [x] [y].
[0039]
In the present embodiment, the AF evaluation value is calculated using the hue data group H [x] [y] and the saturation data group S [x] [y] when in the pigment mode, and the brightness data when in the normal mode. The AF evaluation value is calculated using the group I [x] [y], and the AF evaluation value includes the hue data H [x] [y], the saturation data S [x] [y], and the lightness data I [ You may calculate using all of x] [y]. Specifically, specific weights (α, β, γ) are assigned to the hue difference H ′, the saturation difference S ′, and the brightness difference I ′ calculated in S73 and S75 in FIG. 6 and S74 in FIG. The integrated value (α × H ′ + β × S ′ + γ × I ′) is added to the variable C to obtain an AF evaluation value. At this time, in the normal mode, it is preferable to set the weighting coefficient γ of the lightness difference I ′ larger than the weighting coefficient α of the hue difference H ′ and the weighting coefficient β of the saturation difference S ′. On the other hand, in the pigment mode, it is preferable to set the weighting coefficient α of the hue difference H ′ and the weighting coefficient β of the saturation difference S ′ to be larger than the weighting coefficient γ of the brightness difference I ′.
[0040]
In the present embodiment, the microcomputer 28 functions as a data conversion unit, an evaluation value calculation unit, a variation calculation unit, a hue calculation unit, a saturation calculation unit, and a brightness calculation unit. It is also possible to provide the above means. In the above-described embodiment, the primary color CCD is used as the CCD 20, but a complementary color CCD can be used instead of the primary color CCD. When a complementary color CCD is used, an RGB conversion circuit for converting complementary color image data output from the complementary color CCD into RGB image data is provided.
[0041]
【The invention's effect】
According to the present invention, the image data group from the imaging means of the endoscope is subjected to HSI conversion to acquire the hue data group H and the saturation data group S, and at least one of the hue data group H and the saturation data group S. The AF evaluation value is calculated by an optimum method according to the variation of the color, so that it is possible to obtain an accurate AF evaluation value during normal observation without using a coloring agent and during dye observation using a coloring agent, and high-precision AF Operation is feasible.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a main configuration of an endoscope apparatus provided with an automatic focusing apparatus according to a first embodiment of the present invention.
2 is a plan view showing a distal end of an insertion part of the electronic endoscope of FIG. 1. FIG.
FIG. 3 is a flowchart relating to an AF operation of the endoscope apparatus shown in FIG. 1;
FIG. 4 is a flowchart regarding a mode recognition process executed in S9 of FIG.
FIG. 5 is a flowchart regarding hue variation determination processing executed in S31 of FIG.
6 is a flowchart relating to a dye mode AF evaluation value calculation process executed in S13 of FIG. 3;
FIG. 7 is a flowchart related to a normal mode AF evaluation value calculation process executed in S15 of FIG. 3;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Electronic endoscope 11 In-vivo insertion part 12 Grasping operation part 13 Universal tube 14 Connector part 15 Objective lens 16 Illumination lens 17 Air supply / water supply nozzle 18 Treatment tool insertion port 19 AF motor 20 CCD
21 CCD drive circuit 22 CCD process circuit 23 A / D conversion circuit 24 Video signal processing circuit 25 D / A conversion circuit 26 Color separation conversion circuit 27 RGB matrix circuit 28 Microcomputer 30 Processor 31 Motor control circuit 32 Motor drive circuit 33 Lamp light source 34 Condensing lens 60 TV monitor 100 Endoscope device L Focus lens LG1 Light guide (electronic endoscope side)
LG2 Light guide (processor side)

Claims (3)

所定の演算により算出されたAF評価値に基づいてフォーカスレンズを移動させる自動焦点調節装置において、
撮像手段の画素群から画像データ群を得る画像取得手段と、
この画像データ群をHSIデータ群に変換するデータ変換手段と、
前記画像データ群の平均値をHSI変換して色相基準値を算出し、この色相基準値と前記色相データHとの色相差分を前記色相データHのばらつきとして算出するばらつき算出手段と、
前記色相データHのばらつきが所定の閾値未満であるときは前記HSIデータ群の明度データIを用いてAF評価値を算出し、所定の閾値以上であるときは色相データH及び彩度データSの一方または両方を用いてAF評価値を算出する評価値算出手段と、を備え、
前記閾値には、色素剤を用いない通常観察モードと色素剤を用いた色素観察モードのいずれであるかを判別する値が設定されていることを特徴とする自動焦点調節装置。
In an automatic focus adjustment apparatus that moves a focus lens based on an AF evaluation value calculated by a predetermined calculation,
Image acquisition means for obtaining an image data group from a pixel group of the imaging means;
Data conversion means for converting the image data group into an HSI data group;
Variation calculating means for calculating a hue reference value by performing HSI conversion on an average value of the image data group, and calculating a hue difference between the hue reference value and the hue data H as a variation of the hue data H ;
When the variation of the hue data H is less than a predetermined threshold value, an AF evaluation value is calculated using the brightness data I of the HSI data group, and when the variation is greater than the predetermined threshold value, the hue data H and the saturation data S An evaluation value calculation means for calculating an AF evaluation value using one or both ,
An automatic focusing apparatus according to claim 1, wherein the threshold value is set to a value for discriminating between a normal observation mode in which no coloring agent is used and a dye observation mode in which a coloring agent is used .
請求項1記載の自動焦点調節装置において、前記評価値算出手段は、前記色相データHのばらつきが所定の閾値以上であるとき、色相データH及び彩度データSの両方をAF評価値算出に用い、色相データHと彩度データSに所定の重み付けをして積算し、この積算値を前記AF評価値とする自動焦点調節装置。2. The automatic focus adjustment apparatus according to claim 1, wherein the evaluation value calculation means uses both the hue data H and the saturation data S for calculating the AF evaluation value when the variation of the hue data H is equal to or greater than a predetermined threshold. An automatic focus adjustment device that adds a predetermined weight to the hue data H and the saturation data S, and uses the integrated value as the AF evaluation value. 請求項1または2記載の自動焦点調節装置は、電子内視鏡に搭載される自動焦点調節装置。The automatic focusing apparatus according to claim 1 or 2, wherein the automatic focusing apparatus is mounted on an electronic endoscope.
JP2003064515A 2003-03-11 2003-03-11 Automatic focus adjustment device Expired - Fee Related JP4338416B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003064515A JP4338416B2 (en) 2003-03-11 2003-03-11 Automatic focus adjustment device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003064515A JP4338416B2 (en) 2003-03-11 2003-03-11 Automatic focus adjustment device

Publications (2)

Publication Number Publication Date
JP2004272038A JP2004272038A (en) 2004-09-30
JP4338416B2 true JP4338416B2 (en) 2009-10-07

Family

ID=33125785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003064515A Expired - Fee Related JP4338416B2 (en) 2003-03-11 2003-03-11 Automatic focus adjustment device

Country Status (1)

Country Link
JP (1) JP4338416B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3123919B1 (en) * 2014-03-28 2019-07-10 FUJIFILM Corporation Endoscope apparatus

Also Published As

Publication number Publication date
JP2004272038A (en) 2004-09-30

Similar Documents

Publication Publication Date Title
JP4996773B2 (en) Endoscope device
JP4502577B2 (en) Electronic endoscope device
US5515449A (en) Endoscope image processing apparatus
EP2926718B1 (en) Endoscope system
JP2003000536A (en) Electronic endoscope device
JP6067264B2 (en) Image processing apparatus and endoscope apparatus
JP7135082B2 (en) Endoscope device, method of operating endoscope device, and program
EP2366327A2 (en) An electronic endoscope system, an electronic endoscope processor, and a method of acquiring blood vessel information
WO2007116663A1 (en) Endoscope device
CN109310301A (en) Electronic endoscope processor and electronic endoscope system
CN106999019B (en) Image processing device, image processing method, recording medium, and endoscope device
CN107113405B (en) Image processing apparatus, operating method of image processing apparatus, recording medium, and endoscope apparatus
CN107072509A (en) Endoscopic system and evaluation value calculation apparatus
US10163196B2 (en) Image processing device and imaging system
JP4223778B2 (en) Automatic dimming device for endoscope and electronic endoscope device
JP6270967B2 (en) Image processing apparatus and endoscope apparatus
US10462440B2 (en) Image processing apparatus
JP4338416B2 (en) Automatic focus adjustment device
JP2010279526A (en) Endoscopic image processing apparatus and method, and program
JP4217501B2 (en) Automatic focus adjustment device
JP3958761B2 (en) Dimming signal generator for endoscope
JP2004272037A (en) Automatic focus adjustment device and automatic focus adjustment method
JP4459506B2 (en) Automatic dimming device for endoscope and electronic endoscope device
JP4475874B2 (en) Processor for electronic endoscope device
JP2004272039A (en) Automatic focusing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060207

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070625

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080501

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090511

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090630

R150 Certificate of patent or registration of utility model

Ref document number: 4338416

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120710

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120710

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130710

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees