[go: up one dir, main page]

JP2004272039A - Automatic focusing device - Google Patents

Automatic focusing device Download PDF

Info

Publication number
JP2004272039A
JP2004272039A JP2003064516A JP2003064516A JP2004272039A JP 2004272039 A JP2004272039 A JP 2004272039A JP 2003064516 A JP2003064516 A JP 2003064516A JP 2003064516 A JP2003064516 A JP 2003064516A JP 2004272039 A JP2004272039 A JP 2004272039A
Authority
JP
Japan
Prior art keywords
evaluation value
data group
difference
mode
image data
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.)
Withdrawn
Application number
JP2003064516A
Other languages
Japanese (ja)
Inventor
Shigeru Wakashiro
滋 若代
Noriko Ota
紀子 太田
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.)
Pentax Corp
Original Assignee
Pentax 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 Pentax Corp filed Critical Pentax Corp
Priority to JP2003064516A priority Critical patent/JP2004272039A/en
Publication of JP2004272039A publication Critical patent/JP2004272039A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

【目的】被写体の色状態(着色、染色または変色状態)に適したモードで高精度に焦点調節可能な自動焦点調節装置を得る。
【構成】所定の演算により算出したAF評価値に基づいてフォーカスレンズをピント位置に移動させる自動焦点調節装置において、撮像手段の画素群から画像データ群を得る画像取得手段と、この画像データ群をHSIデータ群に変換し、このHSIデータ群を用いてAF評価値を算出する評価値算出手段と、着色及び変色していない被写体を焦点調節する通常モードと、着色又は変色させた被写体を焦点調節する色素モードとを手動で切替設定するためのモード手動切替手段とを備える。上記評価値算出手段は、モード手動切替手段で設定されたモードに応じてAF評価値の算出方法を切り替える。例えば、通常モードではHSIデータ群の明度データ群Iを用いてAF評価値を算出し、色素モードではHSIデータ群の色相データ群H及び彩度データ群Sの一方又は両方を用いてAF評価値を算出する。
【選択図】 図3
[Object] To provide an automatic focus adjustment device capable of adjusting the focus with high accuracy in a mode suitable for the color state (coloring, dyeing or discoloration state) of a subject.
In an automatic focus adjustment device for moving a focus lens to a focus position based on an AF evaluation value calculated by a predetermined calculation, an image acquisition unit for obtaining an image data group from a pixel group of an imaging unit, and the image data group Evaluation value calculation means for converting to an HSI data group and calculating an AF evaluation value using the HSI data group, a normal mode for adjusting the focus of a subject that has not been colored or discolored, and a focus adjustment for a subject that has been colored or discolored And manual mode switching means for manually switching and setting the dye mode to be performed. The evaluation value calculation means switches an AF evaluation value calculation method according to the mode set by the mode manual switching means. For example, in the normal mode, the AF evaluation value is calculated using the brightness data group I of the HSI data group, and in the dye mode, the AF evaluation value is calculated using one or both of the hue data group H and the saturation data group S of the HSI data group. Is calculated.
[Selection diagram] FIG.

Description

【0001】
【発明の技術分野】
本発明は、特に電子内視鏡に適した自動焦点調節装置に関する。
【0002】
【従来技術およびその問題点】
近年では、内視鏡の挿入部先端の位置に応じてフォーカスレンズの位置が自動調節されるオートフォーカス(AF)機能を備えた電子内視鏡が種々提案されている。このような電子内視鏡に備えられる自動焦点調節装置は、一般に、内視鏡の挿入部先端に設けられた撮像素子(CCD)からの画像データに基づき、フォーカスレンズの位置を調節する。具体的には、画像データの高周波成分(画像データの輝度情報)を用いて所定の演算を行ない、被写体の焦点状態を示す評価値を算出して、この評価値が最大となる位置にフォーカスレンズを移動させている(特許文献参照)。
【0003】
ところで、内視鏡検査の際には、通常観察よりもより詳細な所見を得ることあるいは通常観察では得られない所見を得ることを目的として、色素剤を用いて観察を行なうことがある。このような色素内視鏡検査(色素法)では、色素剤によって被写体が特定の色に変色、染色または着色されるため、色素剤を用いない通常観察時よりも輝度差(コントラスト)が少なくなる傾向にあることが知られている。
【0004】
しかしながら、上述したような従来の方法では画像データの輝度情報に基づいてAF評価値を算出しているため、色素観察時には正確なAF評価値が得られない虞があり、高精度な焦点調節を実現することが難しかった。
【0005】
【特許文献】
特開2001−154085号公報
【0006】
【発明の目的】
本発明は、被写体の色状態(着色、染色または変色状態)に適したモードで高精度に焦点調節可能な自動焦点調節装置を得ることを目的とする。
【0007】
【発明の概要】
本発明は、従来方法において色素観察時に正確なAF評価値が得られない要因が、被写体を着色又は変色させているか否かに拘わらず同一の算出方法でAF評価値を算出していたためであることに着眼したものである。
【0008】
すなわち、本発明は、所定の演算により算出したAF評価値に基づいてフォーカスレンズをピント位置に移動させる自動焦点調節装置において、撮像手段の画素群から画像データ群を得る画像取得手段と、この画像データ群を用いてAF評価値を算出する評価値算出手段と、着色及び変色させていない被写体を焦点調節する通常モードと、着色又は変色させた被写体を焦点調節する色素モードとを手動で切替設定するためのモード手動切替手段とを備え、前記評価値算出手段は、このモード手動切替手段によって設定されたモードに応じて、前記AF評価値の算出方法を切り替えることを特徴としている。
【0009】
評価値算出手段は、画像取得手段により得られた画像データ群をHSIデータ群に変換するデータ変換手段を備え、このHSIデータ群を用いてAF評価値を算出することが好ましい。HSIデータ群を用いれば、明度だけでなく色相及び彩度が演算パラメータとして加味されるので、着色又は変色等により被写体の輝度差が小さくなっている場合であっても正確なAF評価値が得られ、高精度なAF動作が実現可能である。
【0010】
通常モードが設定されている場合は、被写体を着色も変色もさせていない状態であるから、通常は被写体の輝度差を十分な精度で検出可能である。よって、AF評価値は、HSIデータ群の明度データ群Iを用いて算出することが好ましい。例えば、明度データ群Iの全画素に対して、各画素の明度データと該画素の垂直方向及び水平方向に隣り合う画素の明度データとの差分を算出し、さらに、この差分を積算して明度差分を算出し、この明度差分をAF評価値として得ることができる。
【0011】
色素モードが設定されている場合は、被写体を着色又は変色させているから、通常は、被写体の輝度差が小さくなっている。よって、AF評価値は、HSIデータ群の色相データ群H及び彩度データ群Sの少なくとも一方を用いて算出することが好ましい。例えば、色相データ群H及び彩度データ群Sの全画素に対して、各画素の色相データ及び彩度データと該画素の垂直方向及び水平方向に隣り合う画素の色相データ及び彩度データとの差分をそれぞれ算出した後、この差分をそれぞれ積算して色相差分及び彩度差分を算出し、この色相差分と彩度差分の合計値をAF評価値として得ることができる。あるいは、上記色相差分及び彩度差分のいずれか一方をAF評価値として得てもよい。
【0012】
またAF評価値は、HSIデータ群の全画素に対して、各画素の色相データ、彩度データ及び明度データと該画素の水平方向及び垂直方向に隣り合う画素の色相データ、彩度データ及び明度データとの差分をそれぞれ算出し、さらに、この差分を各データ毎に積算して色相差分、彩度差分及び明度差分をそれぞれ算出し、これら色相差分、彩度差分及び明度差分それぞれに重み付けを付与して積算した値としてもよい。この場合、評価値算出手段は、モード手動切替手段によって設定されたモードに応じて色相差分、彩度差分及び明度差分の重み付けを変更することが好ましい。具体的には、通常モードであるとき明度差分の重み付けを色相差分及び彩度差分の重み付けよりも大きくし、色素モードであるとき色相差分及び彩度差分のいずれか一方または両方の重み付けを明度差分の重み付けよりも大きくする。
【0013】
画像取得手段が撮像手段から得る画像データ群は、RGB画像データ群であっても補色画像データ群であってもよい。補色画像データ群である場合には、データ変換手段が該補色画像データ群を画素単位でRGB画像データ群に変換した後、さらにRGB画像データ群をHSIデータ群に変換するのが実際的である。
【0014】
本発明は、別の実施態様によれば、所定の演算により算出したAF評価値に基づいてフォーカスレンズをピント位置に移動させる自動焦点調節装置において、撮像手段の画素群からRGB画像データ群を得る画像取得手段と、このRGB画像データ群に基づきAF評価値を算出する評価値算出手段と、焦点調節モードを手動で切替設定するモード手動切替手段とを備え、この焦点調節モードには、赤褐色系に着色又は変色させた被写体を焦点調節する第1色素モードと、青色系に着色又は変色させた被写体を焦点調節する第2色素モードと、着色及び変色させていない被写体を焦点調節する通常モードとが含まれていて、前記AF評価値算出の際には、第1色素モードであるとき前記RGB画像データ群のRデータ群が用いられ、第2色素モードであるとき前記RGB画像データ群のBデータ群が用いられ、通常モードであるとき前記RGB画像データ群のGデータ群が用いられることを特徴としている。
【0015】
このように被写体が着色、染色又は変色させられる色素毎に焦点調節モードを設け、撮像手段からのRGB画像データ群のうち、被写体に多く含まれる色成分のデータを用いてAF評価値を算出すれば、高精度のAF評価値を得ることができる。
【0016】
上記自動焦点調節装置では、撮像手段による画像データ群を取得してから、AF評価値を算出して該評価値に基づきフォーカスレンズを移動させるまでの動作を繰り返し実行して最大AF評価値を検出し、この最大AF評価値が得られるレンズ位置にフォーカスレンズを移動させている。
【0017】
以上の自動焦点調節装置は、特に、観察対象を色素剤により着色又は変色させて観察する場合がある電子内視鏡に適している。
【0018】
【発明の実施の形態】
図1は、本発明の第1実施形態による自動焦点調節装置を備えた医療用内視鏡装置の主要構成を示すブロック図である。内視鏡装置100は、患者の体腔内を撮像する電子内視鏡10、電子内視鏡10の撮像画像を加工するプロセッサ30及びプロセッサ30から出力された映像信号を表示するTVモニタ60によって構成されている。
【0019】
電子内視鏡10は、患者の体腔内に挿入する柔軟な挿入部11と、この電子内視鏡10の操作者が把持する把持操作部12と、把持操作部12の側部に延設されたユニバーサルチューブ13と、このユニバーサルチューブ13の先端に設けたコネクタ部14とを有し、コネクタ部14を介してプロセッサ30に着脱可能である。
【0020】
挿入部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からの照明光が与えられる。
【0021】
把持操作部12には、AF動作を開始させるAF開始スイッチSWAFや使用者が焦点調節モードを手動で切替可能なモード手動切替スイッチSWMoを含む種々の操作スイッチが設けられていて、把持操作部12と挿入部11の間に位置する連結部には、処置具挿通チャンネル出口部18aに通じる処置具挿通口18が設けられている。本実施形態では、モード手動切替スイッチSWMoのスイッチ状態に応じて、色素剤により着色及び変色されていない被写体を焦点調節する通常モードと、色素剤により着色又は変色させた被写体を焦点検出する色素モードとが切り替わる構成にしてある。
【0022】
プロセッサ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に出力される。この第1実施形態では、上記CCDプロセス回路22、A/D変換回路23、色分離変換回路26及びRGBマトリックス回路27によって画像取得手段が構成される。
【0023】
マイコン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評価値が最大となるステップ位置(ピント位置)へ移動される。
【0024】
プロセッサ30には、さらに、ランプ光源33が備えられている。ランプ光源33から射出された照明光は、不図示の絞りによって最適光量に調整された後、集光レンズ34及びライトガイドLG2を介して照明レンズ16に供給される。
【0025】
以上の全体構成を有する内視鏡装置100では、使用者がモード手動切替スイッチSWMoを手動操作し、被写体の色状態(着色、染色または変色状態)に応じた焦点調節モードを設定する。すると、マイコン28は、モード手動切替スイッチSWMoのスイッチ状態を検出する。このとき通常モードが設定されていれば、被写体を着色、染色及び変色させていないため、HSIデータ群H[x][y]、S[x][y]、I[x][y]のうち、被写体の輝度に対応する明度データ群I[x][y]を用いてAF評価値が算出される。一方、色素モードが設定されていれば、被写体を着色、染色及び変色させているために輝度変化が少ないので、HSIデータ群H[x][y]、S[x][y]、I[x][y]のうち色相データ群H[x][y]及び彩度データ群S[x][y]のいずれか一方または両方を用いてAF評価値が算出される。このように本実施形態では、被写体を着色、染色または変色させたか否かに応じて(電子内視鏡10が通常観察時か色素観察時かに応じて)AF評価値算出に用いるデータを切り替え、電子内視鏡10がいずれの観察状態にあっても正確なAF評価値を算出する。
【0026】
次に、図3を参照し、内視鏡装置100のAF動作をより詳細に説明する。図3は、内視鏡装置100のAF動作に関するフローチャートである。このAF動作は、AF開始スイッチSWAFがオン操作されたときに開始され、マイコン28により制御される。
【0027】
AF動作に入ると先ず、最大AF評価値を示す変数Cmaxに0をセットし(S1)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させてフォーカスレンズLを無限遠端に移動させる(S3)。次に、フォーカスレンズLが至近端に達しているか否かをチェックする(S5)。フォーカスレンズLの位置は、例えば、AFモータ19の駆動量を換算して検出するか、あるいはフォーカスレンズLに位置検出手段(位置検出センサやコード板等)を設けて該位置検出手段からの出力信号に基づいて検出する。
【0028】
フォーカスレンズLが至近端に達していなければ(S5;N)、RGBマトリックス回路27からRGB画像データ群R[x][y]、G[x][y]、B[x][y]をそれぞれ独立に入力して(S7)、モード手動切替スイッチSWMoのスイッチ状態を検出する(S9)。本実施形態でマイコン28は、モード手動切替スイッチSWMoがオンしているとき焦点調節モードは色素モードであると認識し、オフしているとき焦点調節モードは通常モードであると認識する。
【0029】
モード手動切替スイッチSWMoがオンしていれば色素モード用のアルゴリズムに従ってAF評価値を算出し(S9;Y、S11)、オフしていれば通常モード用のアルゴリズムに従ってAF評価値を算出する(S9;N、S13)。算出されたAF評価値と該AF評価値を得たレンズ位置は、マイコン28内に保持される。
【0030】
AF評価値を算出したら、該AF評価値が変数Cmaxよりも大きいか否かをチェックする(S15)。変数Cmaxよりも大きい場合は(S15;Y)、該変数CmaxにS11またはS13で算出したAF評価値を上書メモリして(S17)、フォーカスレンズLを至近側へ1ステップ移動させ(S19)、S5へ戻る。一方、S11またはS13で算出したAF評価値が変数Cmaxよりも大きくなかった場合は(S15;N)、変数Cmaxを変更せずに、フォーカスレンズLを至近側へ1ステップ移動させ(S19)、S5へ戻る。
【0031】
上記S5〜S19の処理は、フォーカスレンズLが至近端に達するまで(至近端に達してそれ以上至近側に移動できなくなるまで)繰り返し実行される。つまり、フォーカスレンズLの全ステップ位置(無限遠端及び至近端を含む)においてそれぞれAF評価値が算出され、該AF評価値と変数Cmaxとが比較されて変数Cmaxはより大きい値に更新され、最終的に変数Cmaxにメモリされている値が最大AF評価値となる。そして、フォーカスレンズLが至近端に達していた場合は(S5;Y)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させ、変数CmaxにメモリされていたAF評価値が得られるレンズ位置にフォーカスレンズLを移動させる(S21)。
【0032】
次に、図4を参照し、図3のS11で実行される色素モード用のAF評価値算出処理について詳細に説明する。色素モード用のAF評価値算出処理では、入力したRGB画像データ群RGB[x][y]をHSIデータ群HSI[x][y]に変換し、このHSIデータ群の色相データ群H[x][y]及び彩度データ群S[x][y]を用いてAF評価値を算出する。
【0033】
この処理に入ると、先ず、AF評価値を格納する変数Cに0をセットし(S31)、RGB画像データ群RGB[x][y]の行(垂直方向位置)を指定する変数y(1≦y≦IH−2)に1をセットする(S33)。次に、変数yが(IH−1)未満か否かにより、規定の最大垂直位置IH−2を超えていないかどうかをチェックする(S35)。変数yが(IH−1)未満であったときは(S35;Y)、RGB画像データ群RGB[x][y]の列(水平方向位置)を指定する変数x(1≦x≦IW−2)に1をセットし(S37)、変数xが(IW−1)未満であるか否かにより規定の最大水平位置IW−2を超えていないかどうかをチェックする(S39)。変数xが(IW−1)未満であれば、上記変数x、yで指定される画素[x][y]に隣り合う画素のRGB画素データをHSIデータに変換する(S41)。すなわち、垂直方向で隣り合う画素[x][y+1]、[x][y−1]と、水平方向で隣り合う画素[x−1][y]、[x+1][y]との計4画素について、RGB画像データをHSIデータに変換する。
【0034】
そして、S41で変換した4画素分の色相データH[x][y+1]、H[x][y−1]、H[x−1][y]、H[x+1][y]を用いて、画素[x][y]に対する色相差分H’を算出する(S43)。色相差分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となるように換算する。
【0035】
色相差分H’を算出したら、S31で変換した4画素分の彩度データS[x][y+1]、S[x][y−1]、S[x−1][y]、S[x+1][y]を用いて、画素[x][y]の垂直方向の彩度差分S’を算出する(S45)。彩度差分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]|により算出する。
【0036】
続いて、S43及びS45で算出した色相差分H’及び彩度差分S’を変数Cに加算して上書きメモリする(S47)。変数Cを更新したら、変数xに1加算して上書きメモリし、S39へ戻る(S49)。S39へ戻ったら、変数xが(IW−1)になるまで上記S39からS49までの処理を繰り返す。このS39〜S49を1回実行することにより、RGB画像データ群RGB[x][y]の1行分(RGB[1][y]〜RGB[IW−2][y])に対して処理(HSIデータ変換及びAF評価値算出)が行われる。
【0037】
S39のチェックにて変数xが(IW−1)未満でなくなったら(S39;N)、すなわちRGB画像データ群RGB[x][y]の1行分の処理が終了したら、変数yに1加算して上書メモリし、S35へ戻る(S51)。S35へ戻ったら、変数yが(IH−1)になるまで、該S35からS51までの処理を繰り返し実行する。このS35〜51の繰り返しにより、RGB画像データ群の全画素分RGB[1][1]〜RGB[IW−2][IH−2]に対してHSIデータ変換及びAF評価値算出が行なわれ、フォーカスレンズLの現在位置におけるAF評価値が変数Cにメモリされる。そして、変数yが(IH−1)未満でなくなったら(S35;N)、この処理から抜けて図3のS15へ進む。
【0038】
図5は、図3のS13で実行される通常モード用のAF評価値算出処理に関するフローチャートである。通常モード用のAF評価値算出処理では、入力したRGB画像データ群RGB[x][y]をHSIデータ群HSI[x][y]に変換し、このHSIデータ群の明度データI[x][y]に基づいてAF評価値を算出する。別言すれば、図5のフローチャートは、図4のS43、S45及びS47の替わりにS44及びS46が備えられている以外は図4と同一である。すなわち、S44では、S41で変換した4画素分の色相データH[x][y+1]、H[x][y−1]、H[x−1][y]、H[x+1][y]を用いて、画素[x][y]に対する明度差分I’を算出する。そして、算出した明度差分I’を変数Cに加算して(S46)、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]|により算出する。
【0039】
以上の第1実施形態によれば、被写体の色状態(着色、染色または変色状態)に応じて焦点調節モードが使用者により設定され、この焦点調節モードにより、CCD20からのRGB画像データ群RGB[x][y]の中からAF評価値算出に用いる画像データ群が切り替えられる。すなわち、被写体の色状態に応じた最適な画像データ群を用いてAF評価が算出される。よって、電子内視鏡10のいずれの観察状態においても正確なAF評価値を得ることができ、高精度なAF動作を実現可能である。
【0040】
上記第1実施形態では、色素モードにおいて、色相データ群H[x][y]及び彩度データ群S[x][y]の両方を用いてAF評価値を算出しているが、色相データ群H[x][y]及び彩度データ群S[x][y]のいずれか一方のみを用いてAF評価値を算出してもよい。また、色相差分H’または彩度差分S’をそのままAF評価値として求めても、色素モードにおいて正確なAF評価値が得られる。
【0041】
上記AF評価値は、HSIデータ群HSI[x][y](色相データH[x][y]、彩度データS[x][y]、明度データI[x][y])をすべて用いて算出してもよい。具体的には、図4のS43、S45及び図5のS44で算出した色相差分H’、彩度差分S’及び明度差分I’のそれぞれに特定の重み付け(α、β、γ)を付与して積算し、この積算値(α×H’+β×S’+γ×I’)を変数Cに加算していくことで、AF評価値を得る。このとき、通常モードが設定されていれば、明度差分I’の重み付け係数γを色相差分H’の重み付け係数α及び彩度差分S’の重み付け係数βよりも大きく設定することが好ましい。一方、色素モードが設定されていれば、色相差分H’の重み付け係数α及び彩度差分S’の重み付け係数βを明度差分I’の重み付け係数γよりも大きく設定することが好ましい。
【0042】
図6〜図8は本発明の第2実施形態を示している。この第2実施形態では、焦点調節モードとして、色素剤により赤褐色系に着色、染色又は変色された被写体を焦点調節する第1色素モードと、色素剤により青色系に着色、染色又は変色された被写体を焦点調節する第2色素モードと、着色及び変色していない被写体を焦点調節する通常モードと設ける。そして、これら焦点調節モードを使用者が手動で切替設定するためのモード手動切替部50を備え、この設定された焦点調節モードに応じて、RGB画像データ群RGB[x][y]の中からAF評価値算出に用いるデータを切り替えている。
【0043】
図6は、本発明の第2実施形態による自動焦点調節装置を備えた医療用内視鏡装置の主要構成を示すブロック図である。第2実施形態による内視鏡装置200では、モード手動切替スイッチSWMoに替えて上記モード手動切替部50が設けられている点と、RGBマトリックス回路27とマイコン28の間にデータ切替スイッチ29が介在している点が第1実施形態(図1)と異なる。図6において、第1実施形態と実質的に同様の機能を有する構成要素には、図1と同一符号を付してある。
【0044】
モード手動切替部50は、1回押される毎に通常モード、第1色素モード、第2色素モード、通常モードと切り替えるスイッチ手段であって、上記3つの焦点調節モードのうちいずれか1つが常に設定されている。本第2実施形態では、上記第1色素モードとして、色素剤と反応して被写体が褐色に変色する又は変色した状態を観察するルゴール染色モードを設け、上記第2色素モードとして、被写体にインジゴカルミン(青色系色素剤)を散布した状態で観察するインジゴ染色モードを設けてある。
【0045】
データ切替スイッチ29は、モード手動切替部50のスイッチ状態に応じて開閉し、RGBマトリックス回路27の3つのRGB出力端27r、27g、27bのいずれかに接続される。RGBマトリックス回路27のRGB出力端27r、27g、27bは、Rデータ群R[x][y]、Gデータ群G[x][y]、Bデータ群B[x][y]をそれぞれ出力する端子である。つまり、色分離変換回路26から出力されるRGB画像データ群RGB[x][y]は、RGBマトリックス回路27を通ってRデータ群R[x][y]、Gデータ群G[x][y]及びBデータ群B[x][y]に分けられた後、スイッチ手段29を介してマイコン28に選択的に出力される。具体的には、通常モードであるときGデータ群G[x][y]が出力され、ルゴール染色モードであるときRデータ群R[x][y]が出力され、インジゴ染色モードであるときBデータ群B[x][y]が出力される。本第2実施形態では、上記CCDプロセス回路22、A/D変換回路23、色分離変換回路26、RGBマトリックス回路27及びスイッチ手段29によって画像取得手段が構成される。
【0046】
図7は、内視鏡装置200のAF動作に関するフローチャートである。このAF動作は、AF開始スイッチSWAFがオン操作されたときに開始され、マイコン28により制御される。図7において、S61、S63及びS65の処理は図3のS1、S3及びS5と同一であり、S75、S77、S79及びS81の処理は図3のS15、S17、S19及びS21と同一である。以下では、図3に示す第1実施形態と同一の処理については説明を省略し、第1実施形態と異なる処理(S67〜S73)について説明する。
【0047】
S65のチェックにてフォーカスレンズLが至近端に達していなかった場合、S67へ進む。S67では、モード手動切替部50のスイッチ状態により、焦点調節モードが通常モード、ルゴール染色モード、インジゴ染色モードのいずれに設定されているかを判断する。
【0048】
そして、設定されている焦点調節モードに応じてデータ切替スイッチ29により選択されたデータ群を入力してAF評価値を算出する(S69、またはS71、あるいはS73)。すなわち、ルゴール染色モードが設定されていれば、データ切替スイッチ29がRGBマトリックス回路27のR出力端27rに接続されており、このデータ切替スイッチ29を介してRGBマトリックス回路27からRデータ群R[x][y]を入力し、Rデータ群R[x][y]を用いてAF評価値を算出する(S69)。通常モードが設定されていれば、データ切替スイッチ29がRGBマトリックス回路27のG出力端27gに接続されており、このデータ切替スイッチ29を介してRGBマトリックス回路27からGデータ群G[x][y]を入力し、Gデータ群G[x][y]を用いてAF評価値を算出する(S71)。インジゴ染色モードが設定されていれば、データ切替スイッチ29がRGBマトリックス回路27のB出力端27bに接続されており、このデータ切替スイッチ29を介してRGBマトリックス回路27からBデータ群B[x][y]を入力し、Bデータ群B[x][y]を用いてAF評価値を算出する(S73)。
【0049】
上記S69、S71及びS73の処理は、入力するデータ群が異なるが、その他の処理は同一である。S69、S71、S73のいずれかによりAF評価値を算出したら、該算出したAF評価値が変数Cmaxよりも大きいか否かをチェックし(S75)、上述した第1実施形態と同様に以降の処理を行なう。
【0050】
図8は、図7のS69、S71及びS73で実行されるデータ入力及びAF評価値算出処理に関するフローチャートである。図8において、S91、S93、S95、S97及びS99の処理は図4のS31、S33、S35、S37及びS39と同一であり、S105及びS107の処理は図4のS49及びS51と同一である。以下では、図4に示す第1実施形態と同一の処理については説明省略し、第1実施形態と異なる処理(S101及びS103)について説明する。
【0051】
S101では、変数x、yで指定される画素[x][y]に隣り合う画素の画像データを入力する(S101)。すなわち、垂直方向で隣り合う画素[x][y+1]、[x][y−1]と、水平方向で隣り合う画素[x−1][y]、[x+1][y]との計4画素について、画像データを入力する。このとき、ルゴール染色モードが設定されていればRデータが、通常モードが設定されていればGデータが、インジゴ染色モードが設定されていればBデータが入力される。
【0052】
画像データを入力したら、画素[x][y]に隣り合う画素の水平方向及び垂直方向のデータ差分|Δx|、|Δy|を算出して変数Cに積算し、この積算値を変数Cに上書メモリする(S103)。ここで、水平方向のデータ差分|Δx|は式;|Δx|=|R[x+1][y]−R[x−1][y]|(または|G[x+1][y]−G[x−1][y]|、|B[x+1][y]−B[x−1][y]|)から算出し、垂直方向のデータ差分|Δy|は式;|Δy|=|R[x][y+1]−R[x][y−1]|(または|G[x][y+1]−G[x][y−1]|、|B[x][y+1]−B[x][y−1]|)により算出する。変数Cを更新したら、上述した第1実施形態と同様に、以降の処理を行なう。
【0053】
以上の第2実施形態によれば、被写体の色状態(着色、染色または変色状態)に応じて焦点調節モードが使用者により設定され、この焦点調節モードにより、CCD20からのRGB画像データ群RGB[x][y]の中からAF評価値算出に用いる画像データ群が切り替えられる。すなわち、色素剤を用いる色素モードでは、RGB画像データ群RGB[x][y]のうち被写体に多く含まれる色成分データを用いてAF評価値を算出し、全色成分の画像データを用いた場合よりもAF評価値(データ差分Δx、Δy)を高分解能で算出する。一方、色素剤を用いない通常モードでは、RGB画像データ群RGB[x][y]のうち輝度差を高精度に検出可能なGデータ群を用い、Rデータ群及びBデータ群を用いた場合よりも高精度にAF評価値を算出する。このように被写体の色状態に応じた最適な画像データを用いれば、電子内視鏡10のいずれの観察状態においても正確なAF評価値を得ることができる。
【0054】
本第2実施形態では、被写体が赤褐色系に着色、染色又は変色している第1色素モードの1例としてルゴール染色モードを設けたが、この第1色素モードはコンゴーレッド法(コンゴーレッド法において不変帯を観察する場合)にも適用可能である。また、被写体が青色系に着色、染色又は変色している第2色素モードの1例としてインジゴ染色モードを設けたが、この第2色素モードは、トルイジンブルー染色法、メチレンブルー染色法、アルシアンブルー染色法などにも適用可能である。また、上記第1及び第2色素モードに加えて、被写体が緑色系に着色、染色又は染色させて観察する第3色素モードを備えることも可能であり、この第3色素モードではRGB画像データ群RGB[x][y]のうちGデータ群を用いてAF評価値を算出することが好ましい。
【0055】
なお、本実施形態では、マイコン28が評価値算出手段及びデータ変換手段として機能しているが、マイコン28とは別に独立して上記各手段を設けることも可能である。また、上記各実施形態では、CCD20に原色CCDを用いているが、原色CCDに替えて、補色CCDを用いることも可能である。補色CCDを用いる場合には、該補色CCDから出力される補色画像データをRGB画像データに変換するRGB変換回路を備える。
【0056】
【発明の効果】
本発明によれば、被写体の色状態に応じて異なる焦点調節モードが備えられ、この焦点調節モードを使用者が手動で切替設定すると、該設定された焦点調節モードに応じた最適な画像データ群を用いてAF評価値が算出されるので、被写体を着色又は変色させた場合も着色及び変色させない場合でも正確なAF評価値を得ることができ、高精度なAF動作を実現可能である。
【図面の簡単な説明】
【図1】本発明の第1実施形態による自動焦点調節装置を備えた内視鏡装置の主要構成を示すブロック図である。
【図2】図1の電子内視鏡の挿入部先端を示す平面図である。
【図3】図1に示す内視鏡用装置のAF動作に関するフローチャートである。
【図4】図3のS11で実行される色素モード用AF評価値算出処理に関するフローチャートである。
【図5】図3のS13で実行される通常モード用AF評価値算出処理に関するフローチャートである。
【図6】本発明の第2実施形態による自動焦点調節装置を備えた内視鏡装置の主要構成を示すブロック図である。
【図7】図6に示す内視鏡装置のAF動作に関するフローチャートである。
【図8】図7のS69、S71及びS73で実行されるデータ入力及び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 マイコン
29 データ切替スイッチ
30 プロセッサ
31 モータ制御回路
32 モータ駆動回路
33 ランプ光源
34 集光レンズ
40 プロセッサ
50 モード手動切替部
60 TVモニタ
100 内視鏡装置
200 内視鏡装置
L フォーカスレンズ
LG1 ライトガイド(電子内視鏡側)
LG2 ライトガイド(プロセッサ側)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an automatic focusing 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 a focus lens is automatically adjusted according to the position of the distal end of an insertion portion of the endoscope have been proposed. An automatic focusing device provided in such an electronic endoscope generally adjusts the position of a focus lens based on image data from an imaging device (CCD) provided at the distal end of an insertion section of the endoscope. Specifically, a predetermined operation is performed using a high-frequency component (luminance information of the image data) of the image data to calculate an evaluation value indicating the focus state of the subject, and a focus lens is located at a position where the evaluation value is maximum. (See Patent Document).
[0003]
By the way, at the time of endoscopy, observation is sometimes performed using a dye 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 (dye method), since the subject is discolored, stained, or colored to a specific color by the dye, the difference in luminance (contrast) is smaller than that in the normal observation without the dye. It is known that there is a tendency.
[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 at the time of observing the pigment, and a high-precision focus adjustment is performed. It was difficult to realize.
[0005]
[Patent Document]
JP 2001-154085 A
[0006]
[Object of the invention]
SUMMARY OF THE INVENTION An object of the present invention is to provide an automatic focus adjustment device capable of adjusting the focus with high accuracy in a mode suitable for the color state (coloring, dyeing or discoloration state) of a subject.
[0007]
Summary of the Invention
In the present invention, the reason that an accurate AF evaluation value cannot be obtained at the time of dye observation in the conventional method is that the AF evaluation value is calculated by the same calculation method regardless of whether the subject is colored or discolored. It focuses on things.
[0008]
That is, according to the present invention, in an automatic focus adjustment device that moves a focus lens to a focus position based on an AF evaluation value calculated by a predetermined calculation, an image acquisition unit that obtains an image data group from a pixel group of an imaging unit; Evaluation value calculation means for calculating an AF evaluation value using a data group, a normal mode for adjusting the focus of a subject that has not been colored or discolored, and a dye mode for adjusting the focus of a subject that has been colored or discolored, are manually switched and set. And a manual mode switching unit for performing the operation. The evaluation value calculating unit switches the calculation method of the AF evaluation value according to the mode set by the mode manual switching unit.
[0009]
It is preferable that the evaluation value calculation unit includes a data conversion unit that converts the image data group obtained by the image acquisition unit into an HSI data group, and calculates the AF evaluation value using the HSI data group. If the HSI data group is used, not only brightness but also hue and saturation are taken into account as calculation parameters, so that accurate AF evaluation values can be obtained even when the luminance difference of the subject is small due to coloring or discoloration. Thus, a highly accurate AF operation can be realized.
[0010]
When the normal mode is set, the subject is not colored or discolored, so that the brightness difference of the subject can usually be detected with sufficient accuracy. Therefore, the AF evaluation value is preferably calculated using the brightness data group I of the HSI data group. For example, for all the pixels of the brightness data group I, a difference between the brightness data of each pixel and the brightness data of a pixel adjacent to the pixel in the vertical and horizontal directions is calculated, and the difference is integrated to calculate the brightness. A difference can be calculated, and this brightness difference can be obtained as an AF evaluation value.
[0011]
When the dye mode is set, the subject is colored or discolored, so that the brightness difference of the subject is usually small. Therefore, it is preferable to calculate the AF evaluation value using at least one of the hue data group H and the saturation data group S of the HSI data group. For example, for all the pixels of the hue data group H and the saturation data group S, the hue data and the saturation data of each pixel and the hue data and the saturation data of the adjacent pixels in the vertical and horizontal directions of the pixel are obtained. After each difference is calculated, the difference is integrated to calculate a hue difference and a saturation difference, and a total value of the hue difference and the saturation difference can be obtained as an AF evaluation value. Alternatively, one of the hue difference and the saturation difference may be obtained as an AF evaluation value.
[0012]
Also, the AF evaluation value is obtained by calculating the hue data, saturation data, and brightness data of each pixel and the hue data, saturation data, and brightness of pixels adjacent to the pixel in the horizontal and vertical directions for all pixels in the HSI data group. Calculate the difference from the data, calculate the hue difference, the saturation difference, and the brightness difference by adding the difference for each data, and assign a weight to each of the hue difference, the saturation difference, and the brightness difference. It may be a value obtained by integrating the values. In this case, it is preferable that the evaluation value calculation unit changes the weight of the hue difference, the saturation difference, and the brightness difference according to the mode set by the mode manual switching unit. Specifically, in the normal mode, the weight of the brightness difference is set to be larger than the weight of the hue difference and the saturation difference, and in the pigment mode, one or both of the hue difference and the saturation difference are weighted by the brightness difference. Greater than the weight of.
[0013]
The image data group obtained by the image acquisition unit from the imaging unit may be an RGB image data group or a complementary color image data group. In the case of a complementary color image data group, it is practical that the data conversion means converts the complementary color image data group into an RGB image data group in pixel units, and further converts the RGB image data group into an HSI data group. .
[0014]
According to another embodiment of the present invention, in an automatic focusing device that moves a focus lens to a focus position based on an AF evaluation value calculated by a predetermined calculation, an RGB image data group is obtained from a pixel group of an imaging unit. An image acquisition unit, an evaluation value calculation unit that calculates an AF evaluation value based on the RGB image data group, and a mode manual switching unit that manually switches and sets a focus adjustment mode. A first dye mode for adjusting the focus of a colored or discolored subject, a second dye mode for adjusting the focus of a blue colored or discolored subject, and a normal mode for adjusting the focus of a non-colored or discolored subject. When the AF evaluation value is calculated, the R data group of the RGB image data group is used in the first dye mode, and the second dye mode is used. Wherein when it is de-RGB image data group of B data group is used, it is characterized in that G data group of the RGB image data group is used when the normal mode.
[0015]
In this manner, a focus adjustment mode is provided for each pigment that causes the subject to be colored, stained, or discolored, and the AF evaluation value is calculated using the data of the color components included in the subject in the RGB image data group from the imaging unit. Thus, a highly accurate AF evaluation value can be obtained.
[0016]
In the above automatic focus adjustment device, the maximum AF evaluation value is detected by repeatedly executing the operations from acquiring the image data group by the imaging means, calculating the AF evaluation value, and moving the focus lens based on the evaluation value. Then, the focus lens is moved to the lens position where the maximum AF evaluation value is obtained.
[0017]
The above-described automatic focus adjustment device is particularly suitable for an electronic endoscope in which an observation target may be observed by being colored or discolored with a coloring agent.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram illustrating a main configuration of a medical endoscope apparatus including an automatic focusing apparatus according to a first embodiment of the present invention. The endoscope apparatus 100 includes an electronic endoscope 10 that captures an image of a body cavity of a patient, a processor 30 that processes an image captured by the electronic endoscope 10, and a TV monitor 60 that displays a video signal output from the processor 30. Have been.
[0019]
The electronic endoscope 10 extends to a flexible insertion portion 11 inserted into a body cavity of a patient, a gripping operation portion 12 gripped by an operator of the electronic endoscope 10, and a side portion of the gripping operation portion 12. A universal tube 13 and a connector portion 14 provided at the end of the universal tube 13 are detachable from the processor 30 via the connector portion 14.
[0020]
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 arranged at the distal end 11 a of the insertion section 11. Behind the objective lens 15, a focus lens L and a CCD 20 movable along the optical axis direction of the objective lens 15 are arranged. The focus lens L moves by receiving a driving force from an AF motor 19 provided on 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 closest end, and the focus lens L is moved in units of these step positions. 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 a TV monitor 60 via a processor 30. Illumination light from a lamp light source 33 provided in the processor 30 is given to the illumination lens 16 from the universal tube 13 via a light guide LG1 that passes through the grip operation unit 12 and the insertion unit 11.
[0021]
The grip operation unit 12 includes various operation switches including an AF start switch SWAF for starting an AF operation and a mode manual changeover switch SWMo that allows a user to manually switch a focus adjustment mode. The connecting portion located between the and the insertion portion 11 is provided with a treatment instrument insertion port 18 communicating with the treatment instrument insertion channel outlet 18a. In the present embodiment, a normal mode for adjusting the focus of a subject that has not been colored or discolored by a coloring agent according to the switch state of the mode manual changeover switch SWMo, and a dye mode for performing focus detection on a subject colored or discolored by the coloring agent. Is switched.
[0022]
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 an RGB image signal. The CCD process circuit 22 is a circuit that reads an RGB image signal of the CCD 20 in synchronization with a synchronization signal input from the CCD drive circuit 21 and preprocesses the read signal (signal amplification processing, noise removal processing, and the like). The signal output from the CCD process circuit 22 is converted into a digital signal by an A / D conversion circuit 23 and subjected to various image processing such as white balance and gamma correction by a video signal processing circuit 24. The signal is converted into an analog signal by the / A conversion circuit 25 and output to the TV monitor 60. The RGB image signals of the CCD 20 are 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 on the input RGB image signal for each pixel, and generates an RGB (red, green, blue) data array (RGB image data group). An RGB image data group RGB [x] [y] (x, y; a natural number) output from the color separation conversion circuit 26 passes through an RGB matrix circuit 27 to an R data group R [x] [y] and a G data group. G [x] [y] and B data group B [x] [y] are output to the microcomputer 28 independently. In the first 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.
[0023]
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, and lightness I). As is well known, a conversion formula of a hexagonal pyramid color model can be used for conversion from RGB to HSI. Further, the microcomputer 28 performs a predetermined calculation based on the HSI data group H [x] [y], S [x] [y], and I [x] [y] to obtain an AF evaluation value indicating the focus state of the subject. Is calculated. This AF evaluation value is output to the motor control circuit 31. The motor control circuit 31 calculates a 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 controls the motor driving circuit 32 by the calculated driving amount. Then, the AF motor 19 is driven to move the focus lens L. The above RGB image data input and 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) at which the AF evaluation value becomes maximum.
[0024]
The processor 30 further includes a lamp light source 33. The illumination light emitted from the lamp light source 33 is adjusted to an optimal light amount by a stop (not shown), and then supplied to the illumination lens 16 via the condenser lens 34 and the light guide LG2.
[0025]
In the endoscope apparatus 100 having the above-described overall configuration, the user manually operates the mode manual changeover switch SWMo to set the focus adjustment mode according to the color state (coloring, staining, or discoloration state) of the subject. Then, the microcomputer 28 detects the switch state of the mode manual changeover switch SWMo. At this time, if the normal mode is set, the subject is not colored, stained, or discolored, so that the HSI data groups H [x] [y], S [x] [y], and I [x] [y] 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, if the dye mode is set, the subject is colored, stained, and discolored, so that there is little change in luminance. Therefore, the HSI data groups H [x] [y], S [x] [y], and I [ An AF evaluation value is calculated using one or both of the hue data group H [x] [y] and the saturation data group S [x] [y] of x] [y]. As described above, in the present embodiment, the data used for calculating the AF evaluation value is switched according to whether the subject is colored, stained, or discolored (depending on whether the electronic endoscope 10 is in normal observation or in pigment observation). The accurate AF evaluation value is calculated regardless of the observation state of the electronic endoscope 10.
[0026]
Next, the AF operation of the endoscope apparatus 100 will be described in more detail with reference to FIG. FIG. 3 is a flowchart relating to 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.
[0027]
When the AF operation starts, first, a variable Cmax indicating the maximum AF evaluation value is set to 0 (S1), and the AF motor 19 is driven via the motor control circuit 31 and the motor drive circuit 32 to move the focus lens L 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 by, for example, converting the drive amount of the AF motor 19, or by providing a position detection unit (a position detection sensor or a code plate) in the focus lens L and outputting from the position detection unit. Detect based on signal.
[0028]
If the focus lens L has not reached the near end (S5; N), the RGB image data groups R [x] [y], G [x] [y], and B [x] [y] are sent from the RGB matrix circuit 27. Are input independently (S7), and the switch state of the mode manual changeover switch SWMo is detected (S9). In the present embodiment, the microcomputer 28 recognizes that the focus adjustment mode is the dye mode when the mode manual changeover switch SWMo is on, and recognizes that the focus adjustment mode is the normal mode when it is off.
[0029]
If the mode manual changeover switch SWMo is on, the AF evaluation value is calculated according to the algorithm for the dye mode (S9; Y, S11). If the switch is off, the AF evaluation value is calculated according to the algorithm for the normal mode (S9). N, S13). The calculated AF evaluation value and the lens position where the AF evaluation value is obtained are held in the microcomputer 28.
[0030]
After calculating the AF evaluation value, it is checked whether the AF evaluation value is larger than the variable Cmax (S15). If it is larger than the variable Cmax (S15; Y), the AF evaluation value calculated in S11 or S13 is overwritten in the variable Cmax (S17), and the focus lens L is moved one step to the closest side (S19). And returns to S5. On the other hand, if the AF evaluation value calculated in S11 or S13 is not larger than the variable Cmax (S15; N), the focus lens L is moved one step closer to the closest side without changing the variable Cmax (S19). Return to S5.
[0031]
The processing of S5 to S19 is repeatedly executed until the focus lens L reaches the close end (until the close end is reached and it is no longer possible to move to the close side). That is, AF evaluation values are calculated at all the step positions (including the infinity end and the closest end) of the focus lens L, the AF evaluation value is compared with the variable Cmax, and the variable Cmax is updated 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 obtained. The focus lens L is moved to a lens position at which is obtained (S21).
[0032]
Next, the AF evaluation value calculation process for the dye mode executed in S11 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 ] And the saturation data group S [x] [y] to calculate an AF evaluation value.
[0033]
In this process, first, a variable C for storing an AF evaluation value is set to 0 (S31), and a variable y (1) for specifying a row (vertical position) of the RGB image data group RGB [x] [y] is set. ≦ y ≦ IH-2) is set to 1 (S33). Next, whether or not the variable y is less than (IH-1) is checked whether or not it exceeds the specified maximum vertical position IH-2 (S35). When the variable y is smaller than (IH-1) (S35; Y), a variable x (1 ≦ x ≦ IW−) specifying a column (horizontal position) of the RGB image data group RGB [x] [y]. 2) is set to 1 (S37), and it is checked whether or not the variable x is less than the specified maximum horizontal position IW-2 based on whether or not it is less than (IW-1) (S39). 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 to HSI data (S41). That is, a total of four 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. The RGB image data is converted into HSI data for the pixel.
[0034]
Then, using the hue data H [x] [y + 1], H [x] [y-1], H [x-1] [y], and H [x + 1] [y] for the four pixels converted in S41. Then, the hue difference H ′ for the pixel [x] [y] is calculated (S43). The hue difference H ′ is an integrated value of the horizontal hue difference | ΔHx | for the pixel [x] [y] and the vertical hue difference | ΔHy | for the pixel [x] [y]. Here, the horizontal hue difference | ΔHx | is calculated from the formula: | ΔHx | = | H [x + 1] [y] −H [x−1] [y] |, and the vertical hue difference | ΔHy | | ΔHy | = | H [x] [y + 1] −H [x] [y−1] | When the hue difference H ′ calculated by the above equation is 360 or more, conversion is performed so that 0 ≦ H ′ <360.
[0035]
After calculating the hue difference H ', the saturation data S [x] [y + 1], S [x] [y-1], S [x-1] [y], S [x + 1] for the four pixels converted in S31. ] [Y] to calculate a vertical saturation difference S ′ between the pixels [x] and [y] (S45). The saturation difference S ′ is an integrated value of the saturation difference | ΔSx | in the horizontal direction for the pixel [x] [y] and the saturation difference | ΔSy | in the vertical direction for the pixel [x] [y]. Here, the horizontal saturation difference | ΔSx | is calculated from the formula: | ΔSx | = | S [x + 1] [y] −S [x−1] [y] |, and the vertical saturation difference | ΔSy Is calculated by the equation: | ΔSy | = | S [x] [y + 1] −S [x] [y−1] |
[0036]
Subsequently, the hue difference H ′ and the saturation difference S ′ calculated in S43 and S45 are added to the variable C and overwritten and stored (S47). After updating the variable C, 1 is added to the variable x to overwrite the memory, and the process returns to S39 (S49). Upon returning to S39, the processes from S39 to S49 are repeated until the variable x becomes (IW-1). By executing S39 to S49 once, processing is performed on 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.
[0037]
If the variable x is not less than (IW-1) in the check in S39 (S39; N), that is, if the processing for one row of the RGB image data group RGB [x] [y] is completed, 1 is added to the variable y. Then, it overwrites the memory and returns to S35 (S51). After returning to S35, the processes from S35 to S51 are repeatedly executed until the variable y becomes (IH-1). Through the repetition of S35 to S51, 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 a variable C. When the variable y is no longer less than (IH-1) (S35; N), the process exits from this process and proceeds to S15 in FIG.
[0038]
FIG. 5 is a flowchart relating to the AF evaluation value calculation process for the normal mode executed in S13 of FIG. In the AF evaluation value calculation process 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 the HSI data group An AF evaluation value is calculated based on [y]. In other words, the flowchart of FIG. 5 is the same as FIG. 4 except that S44 and S46 are provided instead of S43, S45 and S47 of FIG. That is, in S44, the hue data H [x] [y + 1], H [x] [y-1], H [x-1] [y], and H [x + 1] [y] for the four pixels converted in S41. 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 (S46), and the 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 formula: | ΔIx | = | I [x + 1] [y] −I [x−1] [y] |, and the brightness difference | ΔIy | in the vertical direction is given by the formula: | ΔIy | = | I [x] [y + 1] -I [x] [y-1] |
[0039]
According to the above-described first embodiment, the focus adjustment mode is set by the user according to the color state (coloring, dyeing, or discoloration state) of the subject, and the RGB image data group RGB [ The image data group used for calculating the AF evaluation value is switched from x] [y]. That is, the AF evaluation is calculated using the optimal image data group according to the color state of the subject. Therefore, an accurate AF evaluation value can be obtained in any observation state of the electronic endoscope 10, and a highly accurate AF operation can be realized.
[0040]
In the first embodiment, the AF evaluation value is calculated using both the hue data group H [x] [y] and the saturation data group S [x] [y] in the dye mode. The AF evaluation value may be calculated using only one of the group H [x] [y] and the saturation data group S [x] [y]. Even if the hue difference H ′ or the saturation difference S ′ is directly obtained as the AF evaluation value, an accurate AF evaluation value can be obtained in the dye mode.
[0041]
The AF evaluation values include all of the HSI data group HSI [x] [y] (hue data H [x] [y], saturation data S [x] [y], and brightness data I [x] [y]). It may be used to calculate. Specifically, a specific weight (α, β, γ) is given to each of the hue difference H ′, the saturation difference S ′, and the brightness difference I ′ calculated in S43 and S45 of FIG. 4 and S44 of FIG. The AF evaluation value is obtained by adding the integrated value (α × H ′ + β × S ′ + γ × I ′) to the variable C. At this time, if the normal mode is set, it is preferable to set the weighting coefficient γ of the lightness difference I ′ to be larger than the weighting coefficient α of the hue difference H ′ and the weighting coefficient β of the saturation difference S ′. On the other hand, if the pigment mode is set, it is preferable that the weighting coefficient α of the hue difference H ′ and the weighting coefficient β of the saturation difference S ′ be set larger than the weighting coefficient γ of the lightness difference I ′.
[0042]
6 to 8 show a second embodiment of the present invention. In the second embodiment, as a focus adjustment mode, a first dye mode for adjusting the focus of a subject colored, stained, or discolored in reddish brown by a pigment agent, and a subject colored, stained, or discolored in a blue system by a pigment agent And a normal mode for adjusting the focus of a subject that has not been colored or discolored. A mode manual switching unit 50 is provided for the user to manually switch and set these focus adjustment modes. According to the set focus adjustment mode, a mode is selected from the RGB image data group RGB [x] [y]. The data used for calculating the AF evaluation value is switched.
[0043]
FIG. 6 is a block diagram illustrating a main configuration of a medical endoscope apparatus including an automatic focusing apparatus according to a second embodiment of the present invention. In the endoscope apparatus 200 according to the second embodiment, the mode manual changeover switch 50 is provided instead of the mode manual changeover switch SWMo, and the data changeover switch 29 is interposed between the RGB matrix circuit 27 and the microcomputer 28. This is different from the first embodiment (FIG. 1). 6, components having functions substantially similar to those of the first embodiment are denoted by the same reference numerals as those in FIG.
[0044]
The mode manual switching unit 50 is switch means for switching between the normal mode, the first dye mode, the second dye mode, and the normal mode each time the switch is pressed once, and one of the three focus adjustment modes is always set. Have been. In the second embodiment, as the first dye mode, a Lugol staining mode is provided for observing a state in which the subject turns brown or changes color by reacting with a coloring agent. In the second dye mode, indigo carmine is applied to the subject. An indigo dyeing mode for observing (blue colorant) sprayed is provided.
[0045]
The data changeover switch 29 opens and closes according to the switch state of the mode manual changeover unit 50, and is connected to any of the three RGB output terminals 27r, 27g, and 27b of the RGB matrix circuit 27. The RGB output terminals 27r, 27g, and 27b of the RGB matrix circuit 27 output an R data group R [x] [y], a G data group G [x] [y], and a B data group B [x] [y], respectively. Terminal. That is, the RGB image data group RGB [x] [y] output from the color separation conversion circuit 26 passes through the RGB matrix circuit 27, and the R data group R [x] [y] and the G data group G [x] [ y] and the B data group B [x] [y], and are selectively output to the microcomputer 28 via the switch means 29. Specifically, the G data group G [x] [y] is output in the normal mode, the R data group R [x] [y] is output in the Lugol staining mode, and the indigo staining mode. The B data group B [x] [y] is output. In the second embodiment, an image acquisition unit is configured by the CCD process circuit 22, the A / D conversion circuit 23, the color separation conversion circuit 26, the RGB matrix circuit 27, and the switch unit 29.
[0046]
FIG. 7 is a flowchart relating to the AF operation of the endoscope apparatus 200. This AF operation is started when the AF start switch SWAF is turned on, and is controlled by the microcomputer 28. 7, the processes in S61, S63 and S65 are the same as S1, S3 and S5 in FIG. 3, and the processes in S75, S77, S79 and S81 are the same as S15, S17, S19 and S21 in FIG. In the following, description of the same processing as that of the first embodiment shown in FIG. 3 will be omitted, and processing different from the first embodiment (S67 to S73) will be described.
[0047]
If the focus lens L has not reached the closest end in the check at S65, the process proceeds to S67. In S67, it is determined whether the focus adjustment mode is set to the normal mode, the Lugol staining mode, or the indigo staining mode based on the switch state of the mode manual switching unit 50.
[0048]
Then, the data group selected by the data changeover switch 29 according to the set focus adjustment mode is input to calculate the AF evaluation value (S69, S71, or S73). That is, if the Lugol staining mode is set, the data switch 29 is connected to the R output terminal 27r of the RGB matrix circuit 27, and the RGB data circuit R [ x] [y] is input, and an AF evaluation value is calculated using the R data group R [x] [y] (S69). If the normal mode is set, the data changeover switch 29 is connected to the G output terminal 27g of the RGB matrix circuit 27, and the G matrix G [x] [ y], and an AF evaluation value is calculated using the G data group G [x] [y] (S71). If the indigo staining mode is set, the data switch 29 is connected to the B output terminal 27b of the RGB matrix circuit 27, and the B data group B [x] from the RGB matrix circuit 27 via the data switch 29. [Y] is input, and an AF evaluation value is calculated using the B data group B [x] [y] (S73).
[0049]
The processes of S69, S71 and S73 are different in the input data group, but the other processes are the same. After calculating the AF evaluation value in any of S69, S71, and S73, it is checked whether the calculated AF evaluation value is larger than the variable Cmax (S75), and the subsequent processing is performed in the same manner as in the first embodiment described above. Perform
[0050]
FIG. 8 is a flowchart relating to data input and AF evaluation value calculation processing executed in S69, S71 and S73 of FIG. 8, the processes in S91, S93, S95, S97 and S99 are the same as S31, S33, S35, S37 and S39 in FIG. 4, and the processes in S105 and S107 are the same as S49 and S51 in FIG. In the following, description of the same processing as in the first embodiment shown in FIG. 4 will be omitted, and processing (S101 and S103) different from the first embodiment will be described.
[0051]
In S101, image data of a pixel adjacent to the pixel [x] [y] specified by the variables x and y is input (S101). That is, a total of four 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. Image data is input for the pixel. At this time, R data is input if the Lugol staining mode is set, G data if the normal mode is set, and B data if the indigo staining mode is set.
[0052]
After inputting the image data, the horizontal and vertical data differences | Δx |, | Δy | of the pixels adjacent to the pixel [x] [y] are calculated and integrated into the variable C, and this integrated value is used as the variable C. Overwrite memory is performed (S103). Here, the horizontal data difference | Δx | is given by the following equation: | Δx | = | R [x + 1] [y] −R [x−1] [y] | (or | G [x + 1] [y] −G [ x−1] [y] |, | B [x + 1] [y] −B [x−1] [y] |), and the data difference | Δy | in the vertical direction is given by the following equation: | Δy | = | R [X] [y + 1] -R [x] [y-1] | (or | G [x] [y + 1] -G [x] [y-1] |, | B [x] [y + 1] -B [ x] [y-1] |). After updating the variable C, the subsequent processing is performed as in the first embodiment.
[0053]
According to the above-described second embodiment, the focus adjustment mode is set by the user according to the color state (coloring, dyeing, or discoloration state) of the subject, and the RGB image data group RGB [ The image data group used for calculating the AF evaluation value is switched from x] [y]. That is, in the dye mode using the dye, the AF evaluation value is calculated using the color component data included in the subject in the RGB image data group RGB [x] [y], and the image data of all the color components is used. The AF evaluation value (data difference Δx, Δy) is calculated with higher resolution than in the case. On the other hand, in the normal mode using no coloring agent, a G data group capable of detecting a luminance difference with high precision is used among the RGB image data groups RGB [x] [y], and an R data group and a B data group are used. The AF evaluation value is calculated with higher accuracy than that. By using the optimal image data according to the color state of the subject as described above, an accurate AF evaluation value can be obtained in any observation state of the electronic endoscope 10.
[0054]
In the second embodiment, the Lugol dyeing mode is provided as an example of the first dye mode in which the subject is colored, stained, or discolored in reddish-brown, but the first dye mode is a Congo red method (in the Congo red method). When observing the invariable zone). An indigo staining mode is provided as an example of the second dye mode in which the subject is colored, stained or discolored in a blue color. The second dye mode includes toluidine blue staining, methylene blue staining, and Alcian blue. It is also applicable to a staining method and the like. In addition to the first and second dye modes, it is also possible to provide a third dye mode in which the subject is colored, stained or stained with a greenish color and observed. In the third dye mode, an RGB image data group is provided. It is preferable to calculate the AF evaluation value using the G data group of RGB [x] [y].
[0055]
In the present embodiment, the microcomputer 28 functions as an evaluation value calculation unit and a data conversion unit. However, the above units may be provided independently of the microcomputer 28. In each of the above embodiments, 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 the complementary color image data output from the complementary color CCD into RGB image data is provided.
[0056]
【The invention's effect】
According to the present invention, different focus adjustment modes are provided according to the color state of a subject, and when the user manually switches and sets the focus adjustment mode, an optimal image data group according to the set focus adjustment mode is set. Is used to calculate an AF evaluation value, so that an accurate AF evaluation value can be obtained regardless of whether the subject is colored or discolored or not, and a highly accurate AF operation can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a main configuration of an endoscope apparatus including an automatic focusing device according to a first embodiment of the present invention.
FIG. 2 is a plan view showing a distal end of an insertion portion of the electronic endoscope in FIG.
FIG. 3 is a flowchart relating to an AF operation of the endoscope apparatus shown in FIG. 1;
FIG. 4 is a flowchart relating to a dye mode AF evaluation value calculation process executed in S11 of FIG. 3;
FIG. 5 is a flowchart relating to a normal mode AF evaluation value calculation process executed in S13 of FIG. 3;
FIG. 6 is a block diagram illustrating a main configuration of an endoscope apparatus including an automatic focusing device according to a second embodiment of the present invention.
FIG. 7 is a flowchart relating to an AF operation of the endoscope apparatus shown in FIG. 6;
8 is a flowchart relating to data input and AF evaluation value calculation processing executed in S69, S71 and S73 of FIG. 7;
[Explanation of symbols]
10 Electronic endoscope
11 Internal insertion part
12 Gripping operation unit
13 Universal tube
14 Connector part
15 Objective lens
16 Illumination lens
17 Air / water nozzle
18 Treatment instrument 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
29 Data switch
30 processor
31 Motor control circuit
32 Motor drive circuit
33 lamp light source
34 condenser lens
40 processor
50 Mode manual switching unit
60 TV monitor
100 Endoscope device
200 Endoscope device
L Focus lens
LG1 light guide (electronic endoscope side)
LG2 light guide (processor side)

Claims (16)

所定の演算により算出したAF評価値に基づいてフォーカスレンズをピント位置に移動させる自動焦点調節装置において、
撮像手段の画素群から画像データ群を得る画像取得手段と、
この画像データ群に基づきAF評価値を算出する評価値算出手段と、
着色及び変色させていない被写体を焦点調節する通常モードと、着色又は変色させた被写体を焦点調節する色素モードとを手動で切替設定するためのモード手動切替手段とを備え、
前記評価値算出手段は、このモード手動切替手段によって設定されたモードに応じて、前記AF評価値の算出方法を切り替えることを特徴とする自動焦点調節装置。
In an automatic focus adjustment device that moves a focus lens to a focus position 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;
Evaluation value calculation means for calculating an AF evaluation value based on the image data group;
A normal mode for adjusting the focus of a subject that has not been colored and discolored, and a mode manual switching unit for manually switching and setting a dye mode for adjusting the focus of a colored or discolored subject,
The automatic focus adjustment device, wherein the evaluation value calculation means switches the calculation method of the AF evaluation value according to a mode set by the mode manual switching means.
請求項1記載の自動焦点調節装置において、前記評価値算出手段は、前記画像データ群をHSIデータ群に変換するデータ変換手段を備え、このHSIデータ群を用いてAF評価値を算出する自動焦点調節装置。2. The automatic focusing apparatus according to claim 1, wherein said evaluation value calculation means includes data conversion means for converting said image data group into an HSI data group, and calculates an AF evaluation value using said HSI data group. Adjustment device. 請求項2記載の自動焦点調節装置において、前記評価値算出手段は、前記通常モードが設定されているとき、前記HSIデータ群の明度データ群Iを用いてAF評価値を算出する内視鏡の自動焦点調節装置。3. The automatic focusing apparatus according to claim 2, wherein the evaluation value calculation unit calculates an AF evaluation value using the brightness data group I of the HSI data group when the normal mode is set. Automatic focusing device. 請求項3記載の自動焦点調節装置において、前記評価値算出手段は、前記通常モードが設定されているとき、前記明度データ群Iの全画素に対して、各画素の明度データと該画素の垂直方向及び水平方向に隣り合う画素の明度データとの差分を算出し、さらに、この差分を積算して明度差分を算出し、この明度差分を前記AF評価値として得る自動焦点調節装置。4. The automatic focus adjustment apparatus according to claim 3, wherein the evaluation value calculating unit is configured to, when the normal mode is set, perform brightness data of each pixel and a vertical direction of the pixel for all pixels of the brightness data group I. An automatic focus adjustment device that calculates a difference between brightness data of pixels adjacent in a horizontal direction and a horizontal direction, further calculates the brightness difference by integrating the differences, and obtains the brightness difference as the AF evaluation value. 請求項2ないし4のいずれか一項に記載の自動焦点調節装置において、前記評価値算出手段は、前記色素モードが設定されているとき、前記HSIデータ群の色相データ群H及び彩度データ群Sの少なくとも一方を用いてAF評価値を算出する自動焦点調節装置。5. The automatic focus adjustment device according to claim 2, wherein the evaluation value calculation unit is configured to perform a hue data group H and a saturation data group of the HSI data group when the dye mode is set. 6. An automatic focus adjustment device that calculates an AF evaluation value using at least one of S. 請求項5記載の自動焦点調節装置において、前記評価値算出手段は、前記色素モードが設定されているとき、前記色相データ群H及び前記彩度データ群Sの全画素に対して、各画素の色相データ及び彩度データと該画素と垂直方向及び水平方向に隣り合う画素の色相データ及び彩度データとの差分をそれぞれ算出した後、この差分をそれぞれ積算して色相差分と彩度差分を算出し、この色相差分と彩度差分の合計値を前記AF評価値として得る自動焦点調節装置。6. The automatic focus adjustment device according to claim 5, wherein the evaluation value calculating unit is configured to determine, for each pixel of the hue data group H and the saturation data group S, each pixel when the dye mode is set. After calculating the difference between the hue data and the saturation data and the hue data and the saturation data of the pixel adjacent to the pixel in the vertical and horizontal directions, respectively, the differences are integrated to calculate the hue difference and the saturation difference. An automatic focus adjustment device for obtaining the sum of the hue difference and the saturation difference as the AF evaluation value. 請求項5記載の自動焦点調節装置において、前記評価値算出手段は、前記色素モードが設定されているとき、前記色相データ群Hの全画素に対して、各画素の色相データと該画素の垂直方向及び水平方向に隣り合う画素の色相データとの差分を算出し、さらに、この差分を積算して色相差分を算出し、この色相差分を前記AF評価値として得る自動焦点調節装置。6. The automatic focus adjustment device according to claim 5, wherein the evaluation value calculation unit is configured to determine, for the pixels in the hue data group H, the hue data of each pixel and the vertical direction of the pixel when the dye mode is set. An automatic focus adjustment device that calculates a difference between hue data of pixels adjacent in a horizontal direction and a horizontal direction, calculates a hue difference by integrating the differences, and obtains the hue difference as the AF evaluation value. 請求項5記載の自動焦点調節装置において、前記評価値算出手段は、前記色素モードが設定されているとき、前記彩度データ群Sの全画素に対して、各画素の彩度データと該画素の垂直方向及び水平方向に隣り合う画素の彩度データとの差分を算出し、さらに、この差分を積算して彩度差分を算出し、この彩度差分を前記AF評価値として得る自動焦点調節装置。6. The automatic focus adjustment device according to claim 5, wherein the evaluation value calculation unit is configured to calculate, for the pixels in the saturation data group S, the saturation data of each pixel and the pixels when the dye mode is set. Calculating the difference between the saturation data of the pixels adjacent in the vertical and horizontal directions, further calculating the saturation difference by integrating the difference, and obtaining the saturation difference as the AF evaluation value. apparatus. 請求項2記載の自動焦点調節装置において、前記評価算出手段は、前記HSIデータ群の全画素に対して、各画素の色相データ、彩度データ及び明度データと該画素の水平方向及び垂直方向に隣り合う画素の色相データ、彩度データ及び明度データとの差分をそれぞれ算出し、さらに、この差分を各データ毎に積算して色相差分、彩度差分及び明度差分を算出し、これら色相差分、彩度差分及び明度差分それぞれに重み付けを付与して積算した値を前記AF評価値としていて、
前記モード手動切替手段によって設定されたモードに応じて、前記色相差分、前記彩度差分及び前記明度差分の重み付けを変更する自動焦点調節装置。
3. The automatic focus adjustment device according to claim 2, wherein the evaluation calculation unit calculates hue data, saturation data, and brightness data of each pixel in all the pixels of the HSI data group, and outputs the evaluation data in the horizontal direction and the vertical direction of the pixel. Differences between hue data, saturation data, and brightness data of adjacent pixels are calculated, and the differences are integrated for each data to calculate a hue difference, a saturation difference, and a brightness difference, and these hue differences, A value obtained by adding a weight to each of the saturation difference and the brightness difference and integrating them is used as the AF evaluation value,
An automatic focus adjustment device that changes weights of the hue difference, the saturation difference, and the lightness difference according to a mode set by the mode manual switching unit.
請求項9記載の自動焦点調節装置において、前記評価値算出手段は、前記通常モードが設定されているとき、前記明度差分の重み付けを前記色相差分及び前記彩度差分の重み付けよりも大きくして前記AF評価値を算出し、前記色素モードが設定されているとき、前記色相差分及び前記彩度差分のいずれか一方または両方の重み付けを前記明度差分の重み付けよりも大きくして前記AF評価値を算出する自動焦点調節装置。10. The automatic focus adjustment device according to claim 9, wherein the evaluation value calculating unit sets the weight of the brightness difference to be larger than the weight of the hue difference and the saturation difference when the normal mode is set. An AF evaluation value is calculated, and when the dye mode is set, the weight of one or both of the hue difference and the saturation difference is made larger than the weight of the lightness difference to calculate the AF evaluation value. Automatic focus adjustment device. 請求項1ないし10のいずれか一項に記載の自動焦点調節装置において、前記画像取得手段が撮像手段の画素群から得る画像データ群はRGB画像データ群である自動焦点調節装置。11. The automatic focus adjustment device according to claim 1, wherein the image data group obtained from the pixel group of the imaging unit by the image acquisition unit is an RGB image data group. 請求項2ないし10のいずれか一項に記載の自動焦点調節装置において、前記画像取得手段が撮像手段の画素群から得る画像データ群は補色画像データ群であって、前記データ変換手段は、画素単位で前記補色画像データ群をRGB画像データに色分離変換した後、さらに、このRGB画像データ群をHSIデータ群に変換する自動焦点調節装置。The auto-focusing apparatus according to claim 2, wherein the image data group obtained by the image acquisition unit from the pixel group of the imaging unit is a complementary color image data group, and the data conversion unit includes a pixel unit. An automatic focus adjustment device that performs color separation conversion of the complementary color image data group into RGB image data in units, and further converts the RGB image data group into an HSI data group. 所定の演算により算出したAF評価値に基づいてフォーカスレンズをピント位置に移動させる自動焦点調節装置において、
撮像手段の画素群からRGB画像データ群を得る画像取得手段と、
このRGB画像データ群に基づきAF評価値を算出する評価値算出手段と、
焦点調節モードを手動で切替設定するモード手動切替手段とを備え、
この焦点調節モードには、赤褐色系に着色又は変色させた被写体を焦点調節する第1色素モードと、青色系に着色又は変色させた被写体を焦点調節する第2色素モードと、着色及び変色させていない被写体を焦点調節する通常モードとが含まれていて、
前記AF評価値算出の際には、第1色素モードであるとき前記RGB画像データ群のRデータ群が用いられ、第2色素モードであるとき前記RGB画像データ群のBデータ群が用いられ、通常モードであるとき前記RGB画像データ群のGデータ群が用いられることを特徴とする自動焦点調節装置。
In an automatic focus adjustment device that moves a focus lens to a focus position based on an AF evaluation value calculated by a predetermined calculation,
Image acquisition means for obtaining an RGB image data group from a pixel group of the imaging means;
Evaluation value calculation means for calculating an AF evaluation value based on the RGB image data group;
Mode manual switching means for manually switching and setting the focus adjustment mode,
The focus adjustment mode includes a first dye mode for adjusting the focus of a subject colored or discolored reddish brown, a second dye mode for adjusting the focus of a subject colored or discolored blue, and coloring and discoloring. Includes a normal mode to focus on non-subjects,
At the time of the AF evaluation value calculation, the R data group of the RGB image data group is used in the first dye mode, and the B data group of the RGB image data group is used in the second dye mode, An automatic focus adjustment apparatus, wherein a G data group of the RGB image data group is used in a normal mode.
請求項13記載の自動焦点調節装置において、前記画像取得手段は、撮像手段から補色画像データ群を入力し、この補色画像データ群を画素単位で色変換してRGB画像データ群を得る自動焦点調節装置。14. The automatic focusing apparatus according to claim 13, wherein said image acquisition unit inputs a group of complementary color image data from an imaging unit, and performs color conversion of the group of complementary color image data on a pixel basis to obtain a group of RGB image data. apparatus. 請求項1ないし14のいずれか一項に記載の自動焦点調節装置において、前記画像データ群を取得してから、AF評価値を算出して該評価値に基づき前記フォーカスレンズを移動させるまでの動作を繰り返し実行して最大AF評価値を検出し、この最大AF評価値が得られるレンズ位置に前記フォーカスレンズを移動させる自動焦点調節装置。15. The automatic focusing apparatus according to claim 1, wherein the operation from obtaining the image data group, calculating an AF evaluation value, and moving the focus lens based on the evaluation value. To repeatedly detect the maximum AF evaluation value, and move the focus lens to a lens position at which the maximum AF evaluation value is obtained. 請求項1ないし15のいずれか一項に記載の自動焦点調節装置は、電子内視鏡に搭載される自動焦点調節装置。The automatic focusing device according to claim 1, wherein the automatic focusing device is mounted on an electronic endoscope.
JP2003064516A 2003-03-11 2003-03-11 Automatic focusing device Withdrawn JP2004272039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003064516A JP2004272039A (en) 2003-03-11 2003-03-11 Automatic focusing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003064516A JP2004272039A (en) 2003-03-11 2003-03-11 Automatic focusing device

Publications (1)

Publication Number Publication Date
JP2004272039A true JP2004272039A (en) 2004-09-30

Family

ID=33125786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003064516A Withdrawn JP2004272039A (en) 2003-03-11 2003-03-11 Automatic focusing device

Country Status (1)

Country Link
JP (1) JP2004272039A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017010157A1 (en) * 2015-07-15 2017-01-19 ソニー株式会社 Medical observation device and medical observation method
WO2024111366A1 (en) * 2022-11-21 2024-05-30 キヤノン株式会社 Focusing device, observation device, inspection device, and focusing method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017010157A1 (en) * 2015-07-15 2017-01-19 ソニー株式会社 Medical observation device and medical observation method
CN107847107A (en) * 2015-07-15 2018-03-27 索尼公司 Medical observation device and medical observation method
JPWO2017010157A1 (en) * 2015-07-15 2018-05-24 ソニー株式会社 Medical observation apparatus and medical observation method
EP3300650A4 (en) * 2015-07-15 2019-02-06 Sony Corporation MEDICAL OBSERVATION DEVICE AND MEDICAL OBSERVATION METHOD
US10568492B2 (en) 2015-07-15 2020-02-25 Sony Corporation Medical observation device and medical observation method
CN107847107B (en) * 2015-07-15 2021-09-24 索尼公司 Medical observation device and medical observation method
WO2024111366A1 (en) * 2022-11-21 2024-05-30 キヤノン株式会社 Focusing device, observation device, inspection device, and focusing method

Similar Documents

Publication Publication Date Title
JP4732548B2 (en) Endoscope system and endoscope image processing apparatus
JP4996773B2 (en) Endoscope device
CN109419484B (en) Endoscope system
EP2368485B1 (en) Electronic endoscope system
EP2926718B1 (en) Endoscope system
CN107072509B (en) Endoscope system and evaluation value calculation device
JP2003000536A (en) Electronic endoscope device
CN106388756A (en) Image processing device, method for operating the same, and endoscope system
CN107529975A (en) Light source control device, light source control method and imaging system
WO2007116663A1 (en) Endoscope device
JPH0479245B2 (en)
US20160295085A1 (en) Endoscope system, processing apparatus and endoscope operating method
WO2017183339A1 (en) Endoscope system, processor device, and endoscope system operation method
JP4223778B2 (en) Automatic dimming device for endoscope and electronic endoscope device
WO2018142658A1 (en) Image processing device, operating method for image processing device, and operating program for image processing device
US10462440B2 (en) Image processing apparatus
JP2641654B2 (en) Endoscope device
US7898699B2 (en) Electronic endoscope apparatus
JP2004272039A (en) Automatic focusing device
JP4475874B2 (en) Processor for electronic endoscope device
JP4338416B2 (en) Automatic focus adjustment device
JP2004272037A (en) Automatic focus adjustment device and automatic focus adjustment method
JP2000209605A (en) Video signal processing unit
JP2004258361A (en) Automatic focusing device
JP2002263064A (en) Automatic light control device for endoscope and processor of electronic endoscope device including the same

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090630

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090902