JP4217501B2 - Automatic focus adjustment device - Google Patents

Automatic focus adjustment device Download PDF

Info

Publication number
JP4217501B2
JP4217501B2 JP2003049371A JP2003049371A JP4217501B2 JP 4217501 B2 JP4217501 B2 JP 4217501B2 JP 2003049371 A JP2003049371 A JP 2003049371A JP 2003049371 A JP2003049371 A JP 2003049371A JP 4217501 B2 JP4217501 B2 JP 4217501B2
Authority
JP
Japan
Prior art keywords
image data
data group
evaluation value
mask
image
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
JP2003049371A
Other languages
Japanese (ja)
Other versions
JP2004258360A (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 JP2003049371A priority Critical patent/JP4217501B2/en
Publication of JP2004258360A publication Critical patent/JP2004258360A/en
Application granted granted Critical
Publication of JP4217501B2 publication Critical patent/JP4217501B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Automatic Focus Adjustment (AREA)

Description

【0001】
【発明の技術分野】
本発明は、コントラスト焦点検出方式を用いた自動焦点調節装置に関する。
【0002】
【従来技術およびその問題点】
近年では、内視鏡の挿入部先端の位置に応じてフォーカスレンズの位置が自動調節されるオートフォーカス(AF)機能を備えた電子内視鏡が種々提案されている。このような電子内視鏡に備えられる自動焦点調節装置では、焦点検出方式としてコントラスト法が一般に用いられている。具体的には、電子内視鏡の撮像素子から出力された画像データの高周波成分(画像データの輝度情報)を用いて所定の演算を行ない、撮像素子上に結像された内視鏡画像のコントラスト状態を示す評価値を算出して、この評価値が最大となる位置にフォーカスレンズを移動させている(特許文献参照)。
【0003】
しかしながら、上記従来のコントラスト法では、内視鏡画像に影やハレーションが生じていると、画像データのばらつきが大きくなることから、得られる評価値の精度が悪くなってしまうことが判明した。この影やハレーションは、特に粘膜などを観察対象とした場合に起こりやすく、電子内視鏡の照明光を光量調節(絞り調節制御)するだけでは防ぐことが難しかった。
【0004】
【特許文献】
特開2001−154085号公報
【0005】
【発明の目的】
本発明は、ハレーションや影の影響を受けることなく、高精度に焦点調節可能な自動焦点調節装置を得ることを目的とする。
【0006】
【発明の概要】
本発明は、フォーカスレンズと;撮像手段の画素群から画像データ群を入力する画像取得手段と;画像データ群をグレースケール化して明度データ群を得るデータ変換手段と;前記明度データ群の分散値を算出するばらつき算出手段と;この算出された分散値が所定の閾値以上であるとき、入力した画像データ群から特定の輝度範囲に含まれる画像データのみを抽出してAF評価値を算出し、前記分散値が所定の閾値未満であるとき、入力した画像データ群をすべて用いてAF評価値を算出する評価値算出手段と;前記AF評価値が最大となる位置に前記フォーカスレンズを移動させるレンズ駆動手段と;を備えたことを特徴としている。明度データ群の分散値が小さければ、影やハレーション等が生じていないと考えられるので、入力した画像データ群を全て用いても正確なAF評価値を算出することができる。
【0007】
上記構成によれば、影やハレーションが生じていると考えられる低輝度側や高輝度側の画像データが除外され、特定の輝度範囲の画像データのみを用いてAF評価値が算出されるので、観察対象に影やハレーションが生じている場合であっても正確なAF評価値を得ることができ、このAF評価値に基づく高精度な焦点調節動作を実現可能である。
【0008】
低輝度側や高輝度側の画像データを除外し、特定の輝度範囲の画像データを抽出する際には、マスク画像を用いることができる。具体的には、明度データ郡の分散値が所定の閾値以上であるとき、明度データが特定の輝度範囲に含まれる画素に対してマスク画像を生成し、分散値が所定の閾値未満であるとき、入力した画像データ群のすべての画素に対してマスク画像を生成するマスク生成手段を備え、入力した画像データ群のうち、マスク画像が生成されている画素の画像データを用いてAF評価値を算出する。例えば、マスク画像の生成に使用されている各画素の画像データと、該画素に対して垂直方向及び水平方向に隣り合う画素の画像データとの差分をそれぞれ算出して積算し、この積算値をAF評価値とすることが好ましい。本発明は、画角に応じてピント位置が一義的に決定されるバリフォーカスタイプにも適用可能である。バリフォーカスタイプでは、画角に応じて観察範囲及び観察対象が変動してしまうため、1画素当たりの評価値(正規化された評価値)を算出することが好ましい。すなわち、マスク画像の生成に使用されている各画素の画像データと該画素に対して垂直方向及び水平方向に隣り合う画素の画像データとの差分をそれぞれ算出して積算した後、さらに、この積算値を上記マスク画像の生成に使用され た総画素数で除算して平均値を算出し、この平均値をAF評価値とすることが好ましい。
【0009】
マスク生成手段は、明度データを特定の輝度範囲と該範囲外とで二値化し、この二値化データによりマスク画像を生成することが好ましい。AF評価値算出に用いる画像データは、マスク画像の有無によって抽出される。
【0010】
ところで、画像データは、明度データが特定の輝度範囲内であっても、ハレーションや影の影響を受けている場合がある。このような場合、上記二値化処理だけでは、ハレーションや影の影響を受けた画像データを排除することが難しい。そこで、明度データ群に輪郭強調処理を施して輪郭強調明度データ群を得る輪郭強調手段をさらに備え、輪郭強調明度データ群を特定の輝度範囲と該範囲外とで二値化し、この二値化データによりマスク画像を生成することが好ましい。輪郭強調明度データ群では、ハレーションや影の影響を受けている画素部分がより高輝度または低輝度に強調されているので特定の輝度範囲から外れやすくなり、二値化処理により該ハレーションや影の影響を受けている画素の画像データを排除することができる。特にハレーションの影響を受けた画像データを正確に排除することができる。これにより、ハレーションや影の影響が少ない画像データを用いてAF評価値を正確に算出することでき、得られたAF評価値を用いて高精度な焦点調節動作が可能である。
【0011】
また、明度データ群を平滑化して平滑化明度データ群を得る平滑化手段をさらに備えることも可能である。この平滑化手段によれば、明度データ群に含まれたノイズを除去することができ、より高精度に輪郭強調処理を実行可能である。
【0012】
マスク画像を生成する際、より好ましくは二値化データに収縮処理を施す。
【0014】
上記マスク画像を用いてAF評価値算出に用いる画像データを抽出する場合には、マスク画像を生成した後に、画像データを入力してからAF評価値を算出し、該評価値に基づいてフォーカスレンズを移動させるまでの動作を繰り返し実行して最大AF評価値を検出し、この最大AF評価値が得られるレンズ位置にフォーカスレンズを移動させる。
【0015】
画像取得手段の入力する画像データ群は、RGB画像データ群であっても補色画像データ群であってもよい。ただし、補色画像データ群である場合には、RGB画像データに変換してAF評価値を算出する。
【0016】
【発明の実施の形態】
図1は、本発明の第1実施形態による自動焦点調節装置を備えた医療用内視鏡装置の主要構成を示すブロック図である。内視鏡装置100は、患者の体腔内を撮像する電子内視鏡10、電子内視鏡10の撮像画像を加工するプロセッサ30及びプロセッサ30から出力された映像信号を表示するTVモニタ60によって構成されている。
【0017】
電子内視鏡10は、患者の体腔内に挿入する柔軟な挿入部11と、この電子内視鏡10の操作者が把持する把持操作部12と、把持操作部12の側部に延設されたユニバーサルチューブ13と、このユニバーサルチューブ13の先端に設けたコネクタ部14とを有し、コネクタ部14を介してプロセッサ30に着脱可能である。
【0018】
挿入部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が設けられている。
【0019】
プロセッサ30には、CCD20及びCCDプロセス回路22に同期信号を出力し、この同期信号に基づいてCCD20を走査させるCCD駆動回路21が備えられている。CCD20は、いわゆる原色CCDであり、RGB画像信号を出力する。CCDプロセス回路22は、CCD駆動回路21から入力された同期信号に同期して、CCD20のRGB画像信号を読み込み、該読み込んだ信号を前処理(信号増幅処理やノイズ除去処理など)する回路である。このCCDプロセス回路22から出力された信号は、A/D変換回路23にてデジタル信号に変換され、画素単位のRGB画像データ群(RGB画像データ配列)i[x][y](x、y;自然数)となる。このRGB画像データ群i[x][y]は、γ補正回路24にてγ特性が補正され、映像信号処理回路25にてホワイトバランス等の各種画像処理が施された後、D/A変換回路26にてアナログ信号に変換されてTVモニタ60へ出力される。またA/D変換回路23から出力されたRGB画像データ群i[x][y]は、マイコン27にも入力される。
【0020】
マイコン27は、入力したRGB画像データ群i[x][y]を用いて所定の演算を行ない、観察対象のコントラスト状態を示すAF評価値を算出する。このAF評価値はモータ制御回路31へ出力される。モータ制御回路31は、マイコン27から入力したAF評価値に基づき、電子内視鏡10内に備えられたAFモータ19の駆動量を算出し、この算出した駆動量分だけ、モータ駆動回路32を介してAFモータ19を駆動させてフォーカスレンズLを移動させる。以上のRGB画像データ入力及びAF評価値算出は、フォーカスレンズLを移動させながらフォーカスレンズLの各ステップ位置で実行される。そして、フォーカスレンズLは最終的に、AF評価値が最大となるステップ位置(ピント位置)へ移動される。本実施形態では、モータ制御回路31、モータ駆動回路32及びAFモータ19によってレンズ駆動手段が構成されている。またマイコン27には、各種動作に必要な情報をメモリしておく外部メモリ28が接続されている。
【0021】
プロセッサ30には、さらに、ランプ光源33が備えられている。ランプ光源33から射出された照明光は、不図示の絞りによって最適光量に調整された後、集光レンズ34及びライトガイドLG2を介して照明レンズ16に供給される。
【0022】
上記全体構成を有する内視鏡装置100において、マイコン27は、入力したRGB画像データ群i[x][y]のうち、AF評価値算出に用いるRGB画像データを画素単位で選択している。別言すれば、影が生じていると考えられる低輝度側のRGB画像データ又は/及びハレーションが生じていると考えられる高輝度側のRGB画像データを除外し、特定の輝度範囲のRGB画像データのみを用いてAF評価値を算出する。
【0023】
具体的にマイコン27は、先ず、入力したRGB画像データ群i[x][y]をグレースケール化により明度データ群I[x][y]に変換する。次に、この明度データ群I[x][y]を、特定の輝度範囲(α≦I≦β)が“1”、特定の輝度範囲よりも低輝度側(I<α)及び高輝度側(I>β)が“0”となるように二値化してマスク画像M[x][y]を生成する。ここで、αは、低輝度側(影の部分)の閾値を表す最低輝度値以上(例えば、α≧0)の値であり、βは、高輝度側(ハレーションの部分)の閾値を表す最高輝度値以下(例えば、β≦255)の値である。そして、新たなRGB画像データ群i[x][y]を入力し、マスク画像M[x][y]が生成されている画素(M[x][y]=1である画素)のRGB画像データを用いてAF評価値を算出する。このように特定の輝度範囲のRGB画像データのみを用いれば、RGB画像データのばらつきが抑えられ、観察対象に影やハレーションが生じてしまっている場合にもAF評価値を高精度に算出することが可能となる。
【0024】
次に、図3〜図5を参照し、内視鏡装置100のAF動作をより詳細に説明する。図3は、内視鏡装置100のAF動作に関するフローチャートである。このAF動作は、AF開始スイッチSWAFがオン操作されたときに開始され、マイコン27により制御される。
【0025】
AF動作に入ると先ず、A/D変換回路23からRGB画像データ群i[x][y]を入力し(S1)、入力したRGB画像データ群i[x][y]を明度データ群I[x][y]に変換する(S3)。RGB画像データから明度データの変換には、例えばグレースケール処理を用いることができる。
【0026】
次に、明度データ群I[x][y]を用いてマスク画像M[x][y]を生成する(S5)。マスク画像M[x][y]は、RGB画像データ群i[x][y]に画素単位で対応していて、その明度データが特定の輝度範囲(α≦I≦β)内である画素部分に生成されている。このマスク画像M[x][y]は、AF評価値を演算する際に、どのRGB画像データを使用するかを画素単位で識別するためのものであり、AF動作開始時に生成された後は外部メモリ28内にメモリされる。
【0027】
マスク画像M[x][y]を生成したら、最大AF評価値を示す変数Cmaxに0をセットし(S7)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させ、フォーカスレンズLを無限遠端に移動させる(S9)。
【0028】
そして、フォーカスレンズLが至近端に達するまでS11〜S21の処理を繰り返し、最大AF評価値を検出する。すなわち、先ず、S11ではフォーカスレンズLが至近端に達しているか否かをチェックする。フォーカスレンズLの位置は、例えば、AFモータ19の駆動量を換算して検出するか、あるいはフォーカスレンズLに位置検出手段(位置検出センサやコード板等)を設けて該位置検出手段からの出力信号に基づいて検出する。
【0029】
フォーカスレンズLが至近端に達していなければ(S11;N)、A/D変換回路23から再度、新たなRGB画像データ群i[x][y]を入力して(S13)、AF評価値を算出する(S15)。S15のAF評価値算出処理では、入力した全RGB画像データの中から、S5でマスク画像が生成された画素のRGB画像データのみを抽出し、該抽出したRGB画像データからAF評価値を算出する。この算出したAF評価値と該AF評価値を得たレンズ位置は、マイコン27内にメモリされる。
【0030】
続いて、S15で算出したAF評価値が変数Cmaxよりも大きいか否かをチェックし(S17)、変数Cmaxよりも大きい場合は(S17;Y)、該変数CmaxにS15で算出したAF評価値を上書メモリして(S19)、フォーカスレンズLを至近側へ1ステップ移動させ(S21)、S11へ戻る。一方、S15で算出したAF評価値が変数Cmaxよりも大きくなかった場合は(S17;N)、変数Cmaxを変更せずに、フォーカスレンズLを至近側へ1ステップ移動させ(S21)、S11へ戻る。
【0031】
上記S11〜S21の処理は、フォーカスレンズLが至近端に達するまで(至近端に達してそれ以上至近側に移動できなくなるまで)繰り返し実行される。つまり、フォーカスレンズLの全ステップ位置(無限遠端及び至近端を含む)においてそれぞれAF評価値が算出され、該AF評価値と変数Cmaxとが比較されて変数Cmaxはより大きい値に更新され、最終的に変数Cmaxにメモリされている値が最大AF評価値となる。そして、フォーカスレンズLが至近端に達していた場合は(S11;Y)、モータ制御回路31及びモータ駆動回路32を介してAFモータ19を駆動させ、変数CmaxにメモリされていたAF評価値が得られるレンズ位置にフォーカスレンズLを移動させる(S23)。
【0032】
図4を参照し、図3のS5で実行されるマスク画像生成処理について、より詳細に説明する。このマスク画像生成処理では、先ず、図3のS3で得られた明度データ群I[x][y]の分散値を算出する(S31)。次に、算出した分散値が所定の閾値Aよりも大きいか否かをチェックする(S33)。この閾値Aは、要求されるAF評価値の算出精度に応じて適宜設定可能である。
【0033】
そして、明度データ群I[x][y]の分散値が上記閾値Aよりも大きかった場合は(S33;Y)、特定の輝度範囲(α≦I≦β)を指定する2つの異なる閾値α、βを用いて明度データ群I[x][y]を各画素毎に二値化する(S35)。具体的にS35の二値化処理では、特定の輝度範囲(α≦I≦β)に含まれる明度データを1にし、この特定の輝度範囲よりも低輝度側(I<α)及び高輝度側(I>β)の明度データを0にする。本実施形態では、検出可能な輝度範囲を0〜255階調に変換し、例えば、低輝度側の閾値αを50、高輝度側の閾値βを200に設定する。上記二値化処理を行なったら、該二値化処理で得た二値化データが1となる画素に対して収縮処理を施す(S37)。このS35及びS37により、特定の輝度範囲内の画素部分にマスク画像が生成される。
【0034】
一方、明度データ群I[x][y]の分散値が閾値Aよりも大きくなかった場合は(S33;N)、全明度データを1に設定する(S39)。このS39により、全ての画素部分にマスク画像が生成される。
【0035】
S37またはS39によりマスク画像が生成されたら、このマスク画像生成処理を抜け、図3のS7に進む。
【0036】
図5を参照し、図3のS15で実行される評価値算出処理について、より詳細に説明する。この処理に入ると、先ず、AF評価値を格納する変数Cに0をセットし(S41)、RGB画像データ群i[x][y]の行(垂直方向位置)を指定する変数y(1≦y≦IH-2)に1をセットする(S43)。次に、変数yが(IH-1)未満か否かをチェックする(S45)。
【0037】
変数yが(IH-1)未満であったときは(S45;Y)、RGB画像データ群i[x][y]の列(水平方向位置)を指定する変数x(1≦x≦IW-2)に1をセットする(S47)。続いて、変数xが(IW-1)未満であるか否かをチェックし(S49)、変数xが(IW-1)未満であれば、変数x及び変数yにより指定される画素のマスク画像M[x][y]が1であるか否かをチェックする(S49;Y、S51)。上述したようにマスク画像M[x][y]には、同一画素の明度データI[x][y]が特定の輝度範囲内であったとき、あるいは明度データ群I[x][y]の分散値が閾値A未満であったときに、1が設定されている。
【0038】
マスク画像M[x][y]が1であれば(S51;Y)、S13で入力したRGB画像データ群i[x][y]において、変数x及び変数yで指定される画素と隣り合う画素とのRGB画像データ差分|Δx|、|Δy|を変数Cに積算し、この積算値を変数Cに上書メモリしてS55へ進む(S53)。ここで、|Δx|は水平方向(x座標方向)に隣り合う画素のRGB画像データ差分(|Δx|=|I[x+1][y]−I[x-1][y]|)であり、|Δy|は垂直方向(y座標方向)に隣り合う画素のRGB画像データ差分(|Δy|=|I[x][y+1]−I[x][y-1]|)である。一方、マスク画像M[x][y]が1でなければ、S53をスキップしてS55へ進む(S51;N)。このようにS51ではマスク画像M[x][y]が1となる画素のRGB画像データが抽出され、抽出されたRGB画像データのみがS53にて評価値算出に用いられる。別言すれば、マスク画像M[x][y]が1ではない画素のRGB画像データは除外され、S53の評価値算出には用いられない。
【0039】
S55では、変数xに1加算して上書メモリし、S49へ戻る。そしてS49に戻ったら、変数xが(IW-1)になるまで該S49からS55までの処理を繰り返す。このS49〜S55を1回実行することにより、RGB画像データ群i[x][y]の1行分(i[1][y]〜i[IW-2][y])に対して評価値算出が行われる。
【0040】
そして、変数xが(IW-1)未満でなくなったら(S49;N)、すなわちRGB画像データ群i[x][y]の1行分の評価値算出が終了したら、変数yに1加算して上書メモリし、S45へ戻る(S57)。S45へ戻ったら、変数yが(IH-1)になるまで、該S45からS57までの処理を繰り返し実行する。このS45〜57の繰り返しにより、RGB画像データ群i[x][y]の全画素分(i[1][1]〜i[IW-2][IH-2])に対して評価値算出が行われ、フォーカスレンズLの現在位置におけるAF評価値が変数Cにメモリされる。そして変数yが(IH-1)未満でなくなったら(S45;N)、この処理から抜けて図3のS17へ進む。
【0041】
以上のように本実施形態では、入力したRGB画像データ群i[x][y]のうち、影やハレーションが生じていると考えられる低輝度側や高輝度側のRGB画像データを除外し、特定の輝度範囲のRGB画像データのみを用いてAF評価値を算出する。このように特定の輝度範囲のRGB画像データのみを用いれば、RGB画像データのばらつきが抑えられ、観察対象に影やハレーションが生じてしまっている場合にもAF評価値を高精度に算出することが可能となる。これにより、より高精度なAF動作を実現可能である。
【0042】
本実施形態では、RGB画像データ差分からAF評価値を算出しているが、RGB画像データ差分の替わりに、グレースレール画像におけるデータ差分または単色画像(R、G、Bのいずれか)におけるデータ差分を用いてもよい。
【0043】
本実施形態では、RGB画像データ群i[x][y]の明度データI[x][y]を二値化してマスク画像を生成し、このマスク画像に基づきRGB画像データを選別しているので、AF評価値算出に用いるRGB画像データの抽出処理が容易になる。生成したマスク画像は外部メモリ28にて保持されるが、マイコン27内のメモリに保持してもよい。また、マスク画像を用いずに、特定の輝度範囲のRGB画像データを個々に抽出してメモリしておく態様でもよいのは勿論である。
【0044】
また本実施形態では、マスク画像を生成する際に、明度データ群I[x][y]の分散値が閾値A以下であれば、観察対象に影やハレーションなどが生じていないと考えられるので、全画素に対してマスク画像を生成している。この態様によれば、明度データ群I[x][y]の二値化処理(S35)や収縮処理(S37)を行なわずに済み、処理を簡略化することができる。勿論、明度データ群I[x][y]の分散値に拘わらず、明度データ群I[x][y]を二値化及び収縮処理してマスク画像を生成してもよい。
【0045】
次に、本発明の第2実施形態による自動焦点調節装置を備えた医療用内視鏡装置について説明する。第2実施形態は、マスク画像生成処理(図6)において、明度データ群I[x][y]を二値化する前に、平滑化処理及び輪郭強調処理を行なう点が第1実施形態とは異なる。この第2実施形態による内視鏡装置の構成及びAF動作は、上述した第1実施形態(図1〜図5)と同一である。
【0046】
図6は、第2実施形態によるマスク画像生成処理に関するフローチャートである。このマスク画像生成処理では、先ず、図3のS3で得られた明度データ群I[x][y]の分散値を算出する(S61)。次に、算出した分散値が所定の閾値Aよりも大きいか否かをチェックする(S63)。この閾値Aは、要求されるAF評価値の算出精度に応じて適宜設定可能である。
【0047】
そして、明度データ群I[x][y]の分散値が上記閾値Aよりも大きかった場合は(S63;Y)、明度データ群I[x][y]に平滑化処理を実行する(S65)。平滑化処理では、画素[x][y]と該画素[x][y]に対して水平方向、垂直方向及び斜方向で隣り合う画素の合計9画素分の明度データIの平均値を算出し、該平均値を平滑化明度データI'[x][y]として得る。この平滑化により、明度データI[x][y]に含まれていたノイズ成分は除去される。平滑化明度データI'[x][y]は、式;I'[x][y]=(I[x-1][y-1]+I[x][y-1]+I[x+1][y-1]+I[x-1][y]+I[x][y]+I[x+1][y]+I[x-1][y+1]+I[x][y+1]+I[x+1][y+1])/9により算出される。
【0048】
続いて、平滑化明度データI'[x][y]に輪郭強調処理を実行する(S67)。輪郭強調処理では、画素[x][y]と該画素[x][y]に対して水平方向、垂直方向及び斜方向で隣り合う画素との合計9画素分の明度データIを用いて、輪郭強調明度データI''[x][y]を得る。輪郭強調データI''[x][y]は、式;I''[x][y]=9I[x][y]−(I[x-1][y-1]+I[x][y-1]+I[x+1][y-1]+I[x-1][y]+I[x+1][y]+I[x-1][y+1]+I[x][y+1]+I[x+1][y+1])により算出される。この輪郭強調によれば、画像内の輪郭が明瞭となり、ハレーションが生じている画素の輪郭強調明度データはより高輝度に、影が生じている画素の輪郭強調明度データはより低輝度となる。
【0049】
続いて、特定の輝度範囲(α≦I≦β)を指定する2つの異なる閾値α、βを用いて輪郭強調明度データ群I''[x][y]を各画素毎に二値化し、マスク画像M[x][y]を得る(S69)。具体的にS35の二値化処理では、特定の輝度範囲(α≦I≦β)に含まれる輪郭強調明度データを1にし、この特定の輝度範囲よりも低輝度側(I<α)及び高輝度側(I>β)の輪郭強調明度データを0にする。本実施形態では、検出可能な輝度範囲を0〜255階調に変換し、例えば、低輝度側の閾値αを50、高輝度側の閾値βを200に設定する。このS69により、特定の輝度範囲内の画素部分にマスク画像が生成される。
【0050】
二値化処理を行なったら、該二値化処理で得たマスク画像M[x][y]に対して収縮処理を施す(S71)。収縮処理では、先ず、画素[x][y]に対して水平方向、垂直方向及び斜方向に隣り合う画素(合計8画素分)のマスク画像M[x][y]をすべて掛け合わせ、その乗算値を変数numにメモリする。変数numには、画素[x][y]に隣り合う画素のマスク画像M[x][y]がすべて1であれば1がメモリされ、画素[x][y]に隣り合う画素のマスク画像M[x][y]が1つでも0であれば0がメモリされる。次に、変数numが0であるか否か及びM[x][y]=1であるか否かをチェックする。そして、変数numが0であってM[x][y]=1であった場合に、マスク画像M[x][y]に11をメモリする。ここまでの処理を各画素に対して実行し、全画素分終了したら、マスク画像M[x][y]=11である画素に対してマスク画像M[x][y]=0に置換する。
【0051】
一方、明度データ群I[x][y]の分散値が閾値Aよりも大きくなかった場合は(S63;N)、全明度データを1に設定する(S73)。このS73によれば、全ての画素部分にマスク画像が生成される。S69及びS71またはS73によりマスク画像が生成されたら、このマスク画像生成処理を抜けて図3のS7に進む。
【0052】
以上の第2実施形態では、画像内の輪郭を明瞭にした輪郭強調明度データ群I''[x][y]を二値化してマスク画像M[x][y]を生成している。この輪郭強調明度データ群I''[x][y]は、ハレーションの影響を受けている画素でより高輝度に、影の影響を受けている画素でより低輝度に強調されるので、該ハレーションや影の影響を受けている画素の輪郭強調明度データI''が特定の輝度範囲から外れやすくなる。別言すれば、輪郭強調処理及び二値化処理により、影やハレーションが生じていると考えられる低輝度側や高輝度側の画像データだけでなく、明度データIが特定の輝度範囲内にあっても影やハレーションの影響を受けている画素の画像データを除外することができる。これにより、ハレーションや影の影響が少ない画像データを用いてAF評価値を正確に算出することができ、このAF評価値に基づく高精度なAF動作を実現可能である。
【0053】
また第2実施形態では、輪郭強調処理の前に平滑化処理を実行している。この平滑化処理によれば、明度データ群Iからノイズを除去することができ、高精度な輪郭強調処理を実現可能である。この平滑化処理は省略し、明度データ群Iに対して直接輪郭強調処理を実行してもよい。
【0054】
上記第1及び第2実施形態は、ズーミング機能を有さない内視鏡装置(図1〜図6)に本自動焦点調節装置を適用してあるが、本自動焦点調節装置は、画角に応じてピント位置を変化させる拡大内視鏡装置(バリフォーカスタイプ)にも適用可能である。バリフォーカスタイプでは、画角に応じて観察範囲(観察対象)が変化することから、1画素当たりのAF評価値に基づいてAF動作することが好ましい。
【0055】
図7は、バリフォーカスタイプの自動焦点調節装置(本発明の第3実施形態)のAF評価値算出処理に関するフローチャートである。この処理に入ると先ず、AF評価値を格納する変数Cに0をセットし、マスク画像M[x][y]=1である画素数をカウントする変数pixnumに0をセットする(S81)。次に、RGB画像データ群i[x][y]の行(垂直方向位置)を指定する変数y(1≦y≦IH-2)に1をセットし(S83)、RGB画像データ群i[x][y]の列(水平方向位置)を指定する変数x(1≦x≦IW-2)に1をセットする(S85)。
【0056】
そして、変数x及び変数yにより指定される画素のマスク画像M[x][y]が1であるか否かをチェックする(S87)。マスク画像M[x][y]には、同一画素の明度データI[x][y](又は輪郭強調明度データI''[x][y])が特定の輝度範囲内であったとき、あるいは明度データ群I[x][y]の分散値が閾値A未満であったときに、1が設定されている。マスク画像M[x][y]が1であれば(S87;Y)、画素[x][y]と該画素[x][y]に対して水平方向及び垂直方向に隣り合う画素とのRGB画像データ差分|Δx|、|Δy|を変数Cに積算し、この積算値を変数Cに上書メモリし(S89)、変数pixnumに1加算する(S91)。ここで、|Δx|は水平方向に隣り合う画素のRGB画像データ差分(|Δx|=|I[x+1][y]−I[x-1][y]|)であり、|Δy|は垂直方向に隣り合う画素のRGB画像データ差分(|Δy|=|I[x][y+1]−I[x][y-1]|)である。一方、マスク画像M[x][y]が1でなければ、S89及びS91をスキップする(S87;Y)。
【0057】
続いて、変数xに1加算し(S93)、変数xが(IW-1)未満か否かをチェックする(S95)。変数xが(IW-1)未満であれば(S95;Y)、S87へ戻り、S87〜S95の処理を繰り返し実行する。S87〜S95を1回実行することにより、RGB画像データ群i[x][y]の1行分(i[1][y]〜i[IW-2][y])に対して評価値算出が行われる。
【0058】
そして、変数xが(IW-1)未満でなくなったら(S95;N)、すなわちRGB画像データ群i[x][y]の1行分の評価値算出が終了したら、変数yに1加算して(S97)、変数yが(IH−1)未満であるか否かをチェックする(S99)。変数yが(IH−1)未満であれば、S85へ戻り、S85〜S99の処理を繰り返し実行する(S99;Y)。S85〜S95の繰り返しにより、RGB画像データ群i[x][y]の全画素分(i[1][1]〜i[IW-2][IH-2])に対して評価値算出が行われる。変数yが(IH−1)未満でなくなったら(S99;N)、変数C(マスク画像M[x][y]=1である画素のRGB画像データ差分|Δx|、|Δy|の積算値)を変数pixnum(マスク画像M[x][y]=1である画素の総数)で除算して変数Cの平均値を算出し、該平均値を変数Cに上書きメモリしてAF評価値を得る(S101)。
【0059】
以上のようにバリフォーカスタイプでは、1画素当たりのAF評価値が算出され、該1画素当たりのAF評価値に基づいてAF動作が実行される。よって、画角によって観察対象が変化しても、良好にAF動作可能である。
【0060】
上記各実施形態では、CCD20に原色CCDを用いているが、原色CCDに替えて、補色CCDを用いることも可能である。補色CCDを用いる場合には、該補色CCDから出力される補色画像データをRGB画像データに変換するRGB変換回路を備える必要がある。
【0061】
また上記第1〜第3実施形態では、マイコン27が画像取得手段、評価値算出手段、データ変換手段、マスク生成手段、ばらつき算出手段(及び平滑化手段、輪郭強調手段)として機能しているが、マイコン27とは別に独立して上記各手段を設けることも可能である。
【0062】
以上では、本発明の自動焦点調節装置を内視鏡装置に適用した実施形態について説明したが、本発明は内視鏡装置に限らず、カメラや望遠鏡など種々の光学機器にも適用可能である。
【0063】
【発明の効果】
本発明の自動焦点調節装置によれば、特定の輝度範囲の画像データのみを用いてAF評価値を算出するので、ハレーションや影が生じていてもその影響を受けることなく正確なAF評価値が得られ、高精度に焦点調節可能である。
【図面の簡単な説明】
【図1】本発明による自動焦点調節装置を備えた内視鏡装置の主要構成を示すブロック図である。
【図2】図1の電子内視鏡の挿入部先端を示す平面図である。
【図3】図1に示す内視鏡用装置のAF動作に関するフローチャートである。
【図4】図3のS5で実行されるマスク画像生成処理に関するフローチャートである。
【図5】図3のS15で実行される評価値算出処理に関するフローチャートである。
【図6】第2実施形態によるマスク画像生成処理に関するフローチャートである。
【図7】第3実施形態による評価値算出処理に関するフローチャートである。
【符号の説明】
10 電子内視鏡
11 体内挿入部
12 把持操作部
13 ユニバーサルチューブ
14 コネクタ部
15 対物レンズ
16 照明レンズ
17 送気送水ノズル
18 処置具挿通口
19 AFモータ
20 CCD
21 CCD駆動回路
22 CCDプロセス回路
23 A/D変換回路
24 γ補正回路
25 映像信号処理回路
26 D/A変換回路
27 マイコン
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 apparatus using a contrast focus detection method.
[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. In an automatic focus adjustment apparatus provided in such an electronic endoscope, a contrast method is generally used as a focus detection method. Specifically, a predetermined calculation is performed using a high-frequency component (luminance information of the image data) of the image data output from the image sensor of the electronic endoscope, and the endoscopic image formed on the image sensor is detected. An evaluation value indicating the contrast state is calculated, and the focus lens is moved to a position where the evaluation value is maximized (see Patent Document).
[0003]
However, it has been found that, in the conventional contrast method, if the endoscope image has a shadow or halation, the variation in the image data increases, and the accuracy of the obtained evaluation value deteriorates. Such shadows and halation are likely to occur particularly when the mucous membrane or the like is the object of observation, and it has been difficult to prevent it simply by adjusting the illumination light of the electronic endoscope (aperture adjustment control).
[0004]
[Patent Literature]
Japanese Patent Laid-Open No. 2001-154085
[0005]
OBJECT OF THE INVENTION
SUMMARY OF THE INVENTION An object of the present invention is to provide an automatic focus adjustment device that can perform focus adjustment with high accuracy without being affected by halation or shadow.
[0006]
SUMMARY OF THE INVENTION
  The present invention relates to a focus lens; image acquisition means for inputting an image data group from a pixel group of the imaging means;A data conversion means for obtaining a lightness data group by converting the image data group to gray scale; a dispersion calculating means for calculating a dispersion value of the lightness data group; and an input when the calculated dispersion value is equal to or greater than a predetermined threshold value. Only the image data included in a specific luminance range is extracted from the image data group to calculate an AF evaluation value. When the variance value is less than a predetermined threshold value, the AF evaluation value is calculated using all the input image data group. Evaluation value calculating means for calculating andLens driving means for moving the focus lens to a position where the AF evaluation value is maximized.If the variance value of the brightness data group is small, it is considered that no shadow or halation has occurred, so that an accurate AF evaluation value can be calculated even if all the input image data groups are used.
[0007]
According to the above configuration, the image data on the low luminance side and the high luminance side considered to have shadows and halation are excluded, and the AF evaluation value is calculated using only the image data in a specific luminance range. An accurate AF evaluation value can be obtained even when a shadow or halation occurs in the observation target, and a highly accurate focus adjustment operation based on this AF evaluation value can be realized.
[0008]
  A mask image can be used when image data in a specific luminance range is extracted by excluding low-luminance side or high-luminance side image data.Specifically, when the variance value of the brightness data group is equal to or greater than a predetermined threshold value, a mask image is generated for pixels whose brightness data is included in a specific luminance range, and the variance value is less than the predetermined threshold value A mask generating means for generating a mask image for all the pixels of the input image data group, and using the image data of the pixel for which the mask image is generated in the input image data group, an AF evaluation value is obtained. calculate.For example, the difference between the image data of each pixel used for generating the mask image and the image data of the pixel adjacent to the pixel in the vertical direction and the horizontal direction is calculated and integrated, and the integrated value is calculated. An AF evaluation value is preferable. The present invention can also be applied to a varifocus type in which the focus position is uniquely determined according to the angle of view. In the varifocus type, it is preferable to calculate an evaluation value (normalized evaluation value) per pixel because the observation range and the observation target vary depending on the angle of view. That is, after calculating and integrating the difference between the image data of each pixel used for generating the mask image and the image data of the pixel adjacent to the pixel in the vertical and horizontal directions, this integration is further performed. It is preferable to calculate an average value by dividing the value by the total number of pixels used to generate the mask image, and use this average value as the AF evaluation value.
[0009]
Preferably, the mask generation means binarizes the brightness data between a specific luminance range and outside the range, and generates a mask image from the binarized data. Image data used for AF evaluation value calculation is extracted based on the presence or absence of a mask image.
[0010]
By the way, the image data may be affected by halation or shadow even if the brightness data is within a specific luminance range. In such a case, it is difficult to eliminate image data affected by halation or shadow only by the binarization process. Therefore, the image processing apparatus further includes a contour emphasizing unit that performs contour emphasis processing on the brightness data group to obtain the contour emphasis brightness data group, and binarizes the contour emphasis brightness data group between a specific luminance range and the outside of the range. It is preferable to generate a mask image from the data. In the contour-enhanced lightness data group, the pixel portion affected by halation or shadow is emphasized with higher or lower luminance, so that it easily falls out of a specific luminance range. The image data of the affected pixel can be excluded. In particular, image data affected by halation can be accurately excluded. As a result, the AF evaluation value can be accurately calculated using image data with little influence of halation and shadow, and a highly accurate focus adjustment operation can be performed using the obtained AF evaluation value.
[0011]
Further, it is possible to further comprise a smoothing means for smoothing the brightness data group to obtain a smoothed brightness data group. According to this smoothing means, noise included in the brightness data group can be removed, and the contour enhancement process can be executed with higher accuracy.
[0012]
When generating the mask image, more preferably, the binarized data is subjected to a contraction process.
[0014]
When extracting image data to be used for AF evaluation value calculation using the mask image, after generating the mask image, the AF evaluation value is calculated after inputting the image data, and the focus lens is based on the evaluation value. The maximum AF evaluation value is detected by repeatedly executing the operation until the focus lens is moved, and the focus lens is moved to a lens position where the maximum AF evaluation value is obtained.
[0015]
The image data group input by the image acquisition means may be an RGB image data group or a complementary color image data group. However, in the case of the complementary color image data group, the AF evaluation value is calculated by converting into RGB image data.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a main configuration of a medical endoscope apparatus provided with an automatic focus adjustment apparatus according to a first embodiment of 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.
[0017]
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.
[0018]
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.
[0019]
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 the RGB image data group (RGB image data array) i [x] [y] (x, y) in pixel units. ; Natural number). The RGB image data group i [x] [y] has its γ characteristic corrected by the γ correction circuit 24 and subjected to various image processing such as white balance by the video signal processing circuit 25, and then D / A conversion. The signal is converted into an analog signal by the circuit 26 and output to the TV monitor 60. The RGB image data group i [x] [y] output from the A / D conversion circuit 23 is also input to the microcomputer 27.
[0020]
The microcomputer 27 performs a predetermined calculation using the input RGB image data group i [x] [y], and calculates an AF evaluation value indicating the contrast state of the observation target. The AF evaluation value is output to the motor control circuit 31. The motor control circuit 31 calculates the drive amount of the AF motor 19 provided in the electronic endoscope 10 based on the AF evaluation value input from the microcomputer 27, and the motor drive circuit 32 is calculated by the calculated drive 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) where the AF evaluation value is maximized. In the present embodiment, the motor control circuit 31, the motor drive circuit 32, and the AF motor 19 constitute lens drive means. The microcomputer 27 is connected to an external memory 28 for storing information necessary for various operations.
[0021]
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.
[0022]
In the endoscope apparatus 100 having the above-described overall configuration, the microcomputer 27 selects RGB image data used for AF evaluation value calculation from the input RGB image data group i [x] [y] in units of pixels. In other words, RGB image data of a specific luminance range is excluded by excluding the RGB image data on the low luminance side considered to be causing shadows and / or the RGB image data on the high luminance side considered to be causing halation. AF evaluation value is calculated using only
[0023]
Specifically, the microcomputer 27 first converts the input RGB image data group i [x] [y] into a brightness data group I [x] [y] by gray scale conversion. Next, for this brightness data group I [x] [y], the specific luminance range (α ≦ I ≦ β) is “1”, and the lower luminance side (I <α) and the higher luminance side than the specific luminance range. Binarization is performed so that (I> β) becomes “0” to generate a mask image M [x] [y]. Here, α is a value equal to or higher than the lowest luminance value (for example, α ≧ 0) representing the threshold value on the low luminance side (shadow portion), and β is the highest value representing the threshold value on the high luminance side (halation portion). The value is equal to or less than the luminance value (for example, β ≦ 255). Then, a new RGB image data group i [x] [y] is input, and the RGB of the pixel for which the mask image M [x] [y] is generated (pixel where M [x] [y] = 1) is generated. An AF evaluation value is calculated using the image data. In this way, if only RGB image data in a specific luminance range is used, variations in RGB image data can be suppressed, and AF evaluation values can be calculated with high accuracy even when shadows or halation occur in the observation target. Is possible.
[0024]
Next, the AF operation of the endoscope apparatus 100 will be described in more detail with reference to FIGS. 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 27.
[0025]
When the AF operation is started, first, the RGB image data group i [x] [y] is input from the A / D conversion circuit 23 (S1), and the input RGB image data group i [x] [y] is used as the brightness data group I. [x] [y] is converted (S3). For example, gray scale processing can be used to convert lightness data from RGB image data.
[0026]
Next, a mask image M [x] [y] is generated using the brightness data group I [x] [y] (S5). The mask image M [x] [y] corresponds to the RGB image data group i [x] [y] in units of pixels, and pixels whose brightness data is within a specific luminance range (α ≦ I ≦ β). Has been generated in the part. The mask image M [x] [y] is used to identify which RGB image data is used for each pixel when calculating the AF evaluation value. After the mask image M [x] [y] is generated at the start of the AF operation, It is stored in the external memory 28.
[0027]
When the mask image M [x] [y] is generated, the variable Cmax indicating the maximum AF evaluation value is set to 0 (S7), the AF motor 19 is driven via the motor control circuit 31 and the motor drive circuit 32, and the focus is set. The lens L is moved to the infinity end (S9).
[0028]
Then, the processes of S11 to S21 are repeated until the focus lens L reaches the closest end, and the maximum AF evaluation value is detected. That is, first, in S11, it is checked whether or not the focus lens L has reached the closest end. 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.
[0029]
If the focus lens L has not reached the close end (S11; N), a new RGB image data group i [x] [y] is input again from the A / D conversion circuit 23 (S13), and AF evaluation is performed. A value is calculated (S15). In the AF evaluation value calculation process of S15, only the RGB image data of the pixel for which the mask image was generated in S5 is extracted from all the input RGB image data, and the AF evaluation value is calculated from the extracted RGB image data. . The calculated AF evaluation value and the lens position from which the AF evaluation value is obtained are stored in the microcomputer 27.
[0030]
Subsequently, it is checked whether or not the AF evaluation value calculated in S15 is larger than the variable Cmax (S17). If it is larger than the variable Cmax (S17; Y), the AF evaluation value calculated in S15 is set to the variable Cmax. Is overwritten (S19), the focus lens L is moved one step toward the closest side (S21), and the process returns to S11. On the other hand, when the AF evaluation value calculated in S15 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), and the process proceeds to S11. Return.
[0031]
The processes of S11 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 (S11; 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).
[0032]
With reference to FIG. 4, the mask image generation processing executed in S5 of FIG. 3 will be described in more detail. In this mask image generation process, first, a variance value of the brightness data group I [x] [y] obtained in S3 of FIG. 3 is calculated (S31). Next, it is checked whether or not the calculated variance value is larger than a predetermined threshold A (S33). This threshold A can be set as appropriate according to the required calculation accuracy of the AF evaluation value.
[0033]
When the variance value of the lightness data group I [x] [y] is larger than the threshold value A (S33; Y), two different threshold values α that specify a specific luminance range (α ≦ I ≦ β). , Β is used to binarize the lightness data group I [x] [y] for each pixel (S35). Specifically, in the binarization process of S35, the brightness data included in the specific luminance range (α ≦ I ≦ β) is set to 1, and the lower luminance side (I <α) and the higher luminance side than the specific luminance range. The brightness data of (I> β) is set to 0. In the present embodiment, the detectable luminance range is converted to 0 to 255 gradations, and for example, the threshold α on the low luminance side is set to 50 and the threshold β on the high luminance side is set to 200. When the binarization process is performed, a contraction process is performed on the pixels for which the binarized data obtained by the binarization process is 1 (S37). Through S35 and S37, a mask image is generated in a pixel portion within a specific luminance range.
[0034]
On the other hand, when the variance value of the brightness data group I [x] [y] is not larger than the threshold value A (S33; N), the entire brightness data is set to 1 (S39). By this S39, a mask image is generated for all the pixel portions.
[0035]
When a mask image is generated in S37 or S39, the mask image generation process is exited and the process proceeds to S7 in FIG.
[0036]
With reference to FIG. 5, the evaluation value calculation process executed in S15 of FIG. 3 will be described in more detail. In this process, first, 0 is set to the variable C for storing the AF evaluation value (S41), and the variable y (1) for designating the row (vertical direction position) of the RGB image data group i [x] [y]. 1 is set to ≦ y ≦ IH-2) (S43). Next, it is checked whether the variable y is less than (IH-1) (S45).
[0037]
When the variable y is less than (IH-1) (S45; Y), the variable x (1 ≦ x ≦ IW−) that designates the column (horizontal position) of the RGB image data group i [x] [y]. 1 is set in 2) (S47). Subsequently, it is checked whether or not the variable x is less than (IW-1) (S49). If the variable x is less than (IW-1), the mask image of the pixel specified by the variable x and the variable y is checked. It is checked whether M [x] [y] is 1 (S49; Y, S51). As described above, in the mask image M [x] [y], the lightness data I [x] [y] of the same pixel is within a specific luminance range, or the lightness data group I [x] [y] When the variance value is less than the threshold value A, 1 is set.
[0038]
If the mask image M [x] [y] is 1 (S51; Y), the RGB image data group i [x] [y] input in S13 is adjacent to the pixel specified by the variable x and the variable y. The RGB image data differences | Δx | and | Δy | with respect to the pixels are accumulated in the variable C, and the accumulated value is overwritten in the variable C, and the process proceeds to S55 (S53). Here, | Δx | is the RGB image data difference (| Δx | = | I [x + 1] [y] −I [x−1] [y] |) of pixels adjacent in the horizontal direction (x coordinate direction). And | Δy | is the RGB image data difference (| Δy | = | I [x] [y + 1] −I [x] [y−1] |) of pixels adjacent in the vertical direction (y-coordinate direction) It is. On the other hand, if the mask image M [x] [y] is not 1, the process skips S53 and proceeds to S55 (S51; N). As described above, in S51, RGB image data of a pixel whose mask image M [x] [y] is 1 is extracted, and only the extracted RGB image data is used for evaluation value calculation in S53. In other words, RGB image data of pixels whose mask image M [x] [y] is not 1 are excluded and are not used for evaluation value calculation in S53.
[0039]
In S55, 1 is added to the variable x, the overwrite memory is stored, and the process returns to S49. When the process returns to S49, the processes from S49 to S55 are repeated until the variable x becomes (IW-1). By executing S49 to S55 once, one row (i [1] [y] to i [IW-2] [y]) of the RGB image data group i [x] [y] is evaluated. Value calculation is performed.
[0040]
When the variable x is not less than (IW-1) (S49; N), that is, when the evaluation value calculation for one row of the RGB image data group i [x] [y] is completed, 1 is added to the variable y. Overwrite memory and return to S45 (S57). When returning to S45, the processes from S45 to S57 are repeatedly executed until the variable y becomes (IH-1). By repeating S45 to 57, evaluation values are calculated for all pixels (i [1] [1] to i [IW-2] [IH-2]) of the RGB image data group i [x] [y]. 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) (S45; N), the process is terminated and the process proceeds to S17 in FIG.
[0041]
As described above, in the present embodiment, the RGB image data on the low luminance side and the high luminance side considered to have shadows and halation in the input RGB image data group i [x] [y] are excluded, An AF evaluation value is calculated using only RGB image data in a specific luminance range. In this way, if only RGB image data in a specific luminance range is used, variations in RGB image data can be suppressed, and AF evaluation values can be calculated with high accuracy even when shadows or halation occur in the observation target. Is possible. As a result, a more accurate AF operation can be realized.
[0042]
In this embodiment, the AF evaluation value is calculated from the RGB image data difference, but instead of the RGB image data difference, the data difference in the grayscale image or the data difference in the single-color image (R, G, or B). May be used.
[0043]
In this embodiment, the brightness data I [x] [y] of the RGB image data group i [x] [y] is binarized to generate a mask image, and the RGB image data is selected based on the mask image. Therefore, the RGB image data used for AF evaluation value calculation can be easily extracted. The generated mask image is held in the external memory 28, but may be held in a memory in the microcomputer 27. Of course, it is possible to individually extract and store RGB image data in a specific luminance range without using a mask image.
[0044]
In this embodiment, when the mask image is generated, if the variance value of the brightness data group I [x] [y] is equal to or less than the threshold value A, it is considered that no shadow or halation occurs in the observation target. A mask image is generated for all pixels. According to this aspect, it is not necessary to perform the binarization process (S35) or the contraction process (S37) of the lightness data group I [x] [y], and the process can be simplified. Of course, the lightness data group I [x] [y] may be binarized and contracted to generate a mask image regardless of the variance value of the lightness data group I [x] [y].
[0045]
Next, a medical endoscope apparatus provided with an automatic focus adjustment apparatus according to a second embodiment of the present invention will be described. The second embodiment is different from the first embodiment in that in the mask image generation processing (FIG. 6), smoothing processing and contour enhancement processing are performed before the lightness data group I [x] [y] is binarized. Is different. The configuration and AF operation of the endoscope apparatus according to the second embodiment are the same as those in the first embodiment (FIGS. 1 to 5) described above.
[0046]
FIG. 6 is a flowchart regarding mask image generation processing according to the second embodiment. In this mask image generation process, first, a variance value of the brightness data group I [x] [y] obtained in S3 of FIG. 3 is calculated (S61). Next, it is checked whether or not the calculated variance value is larger than a predetermined threshold A (S63). This threshold A can be set as appropriate according to the required calculation accuracy of the AF evaluation value.
[0047]
When the variance value of the lightness data group I [x] [y] is larger than the threshold A (S63; Y), the smoothing process is performed on the lightness data group I [x] [y] (S65). ). In the smoothing process, the average value of the brightness data I for a total of nine pixels of the pixel [x] [y] and the pixels adjacent to the pixel [x] [y] in the horizontal direction, the vertical direction, and the oblique direction is calculated. Then, the average value is obtained as smoothed lightness data I ′ [x] [y]. By this smoothing, the noise component included in the brightness data I [x] [y] is removed. The smoothed lightness data I ′ [x] [y] is expressed by the equation: I ′ [x] [y] = (I [x−1] [y−1] + I [x] [y−1] + I [x + 1] [y-1] + I [x-1] [y] + I [x] [y] + I [x + 1] [y] + I [x-1] [y + 1] + I [x] [y + 1] + I [x + 1] [y + 1]) / 9.
[0048]
Subsequently, contour enhancement processing is executed on the smoothed lightness data I ′ [x] [y] (S67). In the edge emphasis process, the brightness data I for a total of nine pixels including the pixels [x] [y] and the pixels adjacent to the pixels [x] [y] in the horizontal direction, the vertical direction, and the oblique direction are used. Edge-enhanced brightness data I ″ [x] [y] is obtained. The contour emphasis data I ″ [x] [y] is expressed by the equation: I ″ [x] [y] = 9I [x] [y] − (I [x−1] [y−1] + I [x] [y-1] + I [x + 1] [y-1] + I [x-1] [y] + I [x + 1] [y] + I [x-1] [y + 1] + I [x] [ y + 1] + I [x + 1] [y + 1]). According to this contour enhancement, the contour in the image becomes clear, and the contour enhancement lightness data of the pixel in which the halation has occurred has higher luminance, and the contour enhancement lightness data of the pixel in which the shadow has occurred has lower luminance.
[0049]
Subsequently, the edge-enhanced brightness data group I ″ [x] [y] is binarized for each pixel using two different threshold values α and β that specify a specific luminance range (α ≦ I ≦ β), A mask image M [x] [y] is obtained (S69). Specifically, in the binarization process of S35, the edge enhancement brightness data included in the specific luminance range (α ≦ I ≦ β) is set to 1, and the lower luminance side (I <α) and higher than the specific luminance range. The brightness enhancement data on the luminance side (I> β) is set to zero. In the present embodiment, the detectable luminance range is converted to 0 to 255 gradations, and for example, the threshold α on the low luminance side is set to 50 and the threshold β on the high luminance side is set to 200. By this S69, a mask image is generated in the pixel portion within the specific luminance range.
[0050]
When the binarization process is performed, the contraction process is performed on the mask image M [x] [y] obtained by the binarization process (S71). In the shrinking process, first, the pixel [x] [y] is multiplied by all mask images M [x] [y] of pixels adjacent to the horizontal direction, the vertical direction, and the diagonal direction (for a total of 8 pixels). Store the multiplication value in the variable num. The variable num stores 1 if the mask images M [x] [y] of pixels adjacent to the pixel [x] [y] are all 1, and masks the pixels adjacent to the pixel [x] [y]. If even one image M [x] [y] is 0, 0 is stored. Next, it is checked whether the variable num is 0 and whether M [x] [y] = 1. When the variable num is 0 and M [x] [y] = 1, 11 is stored in the mask image M [x] [y]. When the processing up to this point is executed for each pixel and is completed for all pixels, the mask image M [x] [y] = 0 is replaced with the mask image M [x] [y] = 0 for the pixels with the mask image M [x] [y] = 11. .
[0051]
On the other hand, when the variance value of the brightness data group I [x] [y] is not larger than the threshold value A (S63; N), the entire brightness data is set to 1 (S73). According to S73, mask images are generated for all pixel portions. When a mask image is generated in S69 and S71 or S73, the process exits this mask image generation process and proceeds to S7 in FIG.
[0052]
In the second embodiment described above, the mask image M [x] [y] is generated by binarizing the contour-enhanced lightness data group I ″ [x] [y] in which the contour in the image is clarified. This outline-enhanced lightness data group I ″ [x] [y] is emphasized with higher luminance at pixels affected by halation and lower luminance at pixels affected by shadows. The edge-enhanced brightness data I ″ of a pixel affected by halation or shadow is likely to be out of a specific luminance range. In other words, not only the image data on the low luminance side and the high luminance side considered to have shadows and halation caused by the contour enhancement processing and binarization processing, but also the lightness data I is within a specific luminance range. However, it is possible to exclude image data of pixels that are affected by shadows or halation. As a result, the AF evaluation value can be accurately calculated using image data with little influence of halation and shadow, and a highly accurate AF operation based on the AF evaluation value can be realized.
[0053]
In the second embodiment, the smoothing process is executed before the edge enhancement process. According to this smoothing process, noise can be removed from the brightness data group I, and a highly accurate contour enhancement process can be realized. This smoothing process may be omitted, and the edge enhancement process may be directly performed on the brightness data group I.
[0054]
In the first and second embodiments, the automatic focusing apparatus is applied to an endoscope apparatus (FIGS. 1 to 6) that does not have a zooming function. The present invention can also be applied to a magnifying endoscope device (vari focus type) that changes the focus position accordingly. In the varifocus type, since the observation range (observation target) changes according to the angle of view, it is preferable to perform the AF operation based on the AF evaluation value per pixel.
[0055]
FIG. 7 is a flowchart relating to the AF evaluation value calculation processing of the varifocus automatic focusing apparatus (third embodiment of the present invention). In this process, first, 0 is set to the variable C for storing the AF evaluation value, and 0 is set to the variable pixnum for counting the number of pixels where the mask image M [x] [y] = 1 (S81). Next, 1 is set to a variable y (1 ≦ y ≦ IH−2) that designates a row (vertical direction position) of the RGB image data group i [x] [y] (S83), and the RGB image data group i [ 1 is set to a variable x (1 ≦ x ≦ IW−2) that designates a column (horizontal position) of x] [y] (S85).
[0056]
Then, it is checked whether or not the mask image M [x] [y] of the pixel specified by the variable x and the variable y is 1 (S87). In the mask image M [x] [y], when the brightness data I [x] [y] of the same pixel (or edge-enhanced brightness data I ″ [x] [y]) is within a specific luminance range Alternatively, 1 is set when the variance value of the lightness data group I [x] [y] is less than the threshold value A. If the mask image M [x] [y] is 1 (S87; Y), the pixel [x] [y] and the pixels adjacent to the pixel [x] [y] in the horizontal and vertical directions The RGB image data differences | Δx | and | Δy | are accumulated in the variable C, the accumulated value is overwritten in the variable C (S89), and 1 is added to the variable pixnum (S91). Here, | Δx | is the RGB image data difference (| Δx | = | I [x + 1] [y] −I [x−1] [y] |) of pixels adjacent in the horizontal direction, and | Δy | Is the RGB image data difference (| Δy | = | I [x] [y + 1] −I [x] [y−1] |) of pixels adjacent in the vertical direction. On the other hand, if the mask image M [x] [y] is not 1, S89 and S91 are skipped (S87; Y).
[0057]
Subsequently, 1 is added to the variable x (S93), and it is checked whether the variable x is less than (IW-1) (S95). If the variable x is less than (IW-1) (S95; Y), the process returns to S87, and the processes of S87 to S95 are repeated. By executing S87 to S95 once, evaluation values for one row (i [1] [y] to i [IW-2] [y]) of the RGB image data group i [x] [y] Calculation is performed.
[0058]
When the variable x is not less than (IW-1) (S95; N), that is, when the evaluation value calculation for one row of the RGB image data group i [x] [y] is completed, 1 is added to the variable y. (S97), it is checked whether or not the variable y is less than (IH-1) (S99). If the variable y is less than (IH-1), the process returns to S85, and the processes of S85 to S99 are repeatedly executed (S99; Y). By repeating S85 to S95, evaluation values are calculated for all pixels (i [1] [1] to i [IW-2] [IH-2]) of the RGB image data group i [x] [y]. Done. When the variable y is not less than (IH-1) (S99; N), the integrated value of the RGB image data differences | Δx | and | Δy | of the pixel with the variable C (mask image M [x] [y] = 1) ) Is divided by the variable pixnum (the total number of pixels with mask image M [x] [y] = 1), the average value of variable C is calculated, and the average value is overwritten on variable C to store the AF evaluation value. Obtain (S101).
[0059]
As described above, in the varifocus type, the AF evaluation value per pixel is calculated, and the AF operation is executed based on the AF evaluation value per pixel. Therefore, even if the observation object changes depending on the angle of view, the AF operation can be performed satisfactorily.
[0060]
In each of the embodiments described above, a 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, it is necessary to provide an RGB conversion circuit for converting complementary color image data output from the complementary color CCD into RGB image data.
[0061]
In the first to third embodiments, the microcomputer 27 functions as an image acquisition unit, an evaluation value calculation unit, a data conversion unit, a mask generation unit, a variation calculation unit (and a smoothing unit, an outline enhancement unit). The above means can be provided independently of the microcomputer 27.
[0062]
In the above, the embodiment in which the automatic focus adjustment apparatus of the present invention is applied to an endoscope apparatus has been described. However, the present invention is not limited to an endoscope apparatus but can be applied to various optical devices such as a camera and a telescope. .
[0063]
【The invention's effect】
According to the automatic focus adjustment apparatus of the present invention, since the AF evaluation value is calculated using only image data in a specific luminance range, an accurate AF evaluation value can be obtained without being affected by halation or shadows. It is possible to adjust the focus with high accuracy.
[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 the present invention.
2 is a plan view showing a distal end of an insertion portion of the electronic endoscope shown in 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 mask image generation processing executed in S5 of FIG. 3;
FIG. 5 is a flowchart regarding evaluation value calculation processing executed in S15 of FIG. 3;
FIG. 6 is a flowchart relating to mask image generation processing according to the second embodiment;
FIG. 7 is a flowchart relating to an evaluation value calculation process according to a third embodiment.
[Explanation of symbols]
10 Electronic endoscope
11 Body insertion part
12 Grip operation part
13 Universal tube
14 Connector part
15 Objective lens
16 Lighting lens
17 Air / water 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 γ correction circuit
25 Video signal processing circuit
26 D / A converter circuit
27 Microcomputer
28 External memory
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 (11)

フォーカスレンズと;
撮像手段の画素群から画像データ群を入力する画像取得手段と;
前記画像データ群をグレースケール化して明度データ群を得るデータ変換手段と;
前記明度データ群の分散値を算出するばらつき算出手段と;
この算出された分散値が所定の閾値以上であるとき、入力した画像データ群から特定の輝度範囲に含まれる画像データのみを抽出してAF評価値を算出し、前記分散値が所定の閾値未満であるとき、入力した画像データ群をすべて用いてAF評価値を算出する評価値算出手段と;
前記AF評価値が最大となる位置に前記フォーカスレンズを移動させるレンズ駆動手段と;
を備えたことを特徴とする自動焦点調節装置。
A focus lens;
Image acquisition means for inputting an image data group from a pixel group of the imaging means;
Data conversion means for obtaining a brightness data group by converting the image data group to gray scale;
Variation calculating means for calculating a variance value of the brightness data group;
When the calculated variance value is equal to or greater than a predetermined threshold value, only image data included in a specific luminance range is extracted from the input image data group to calculate an AF evaluation value, and the variance value is less than the predetermined threshold value An evaluation value calculating means for calculating an AF evaluation value using all the input image data groups;
Lens driving means for moving the focus lens to a position where the AF evaluation value is maximized;
An automatic focusing apparatus characterized by comprising:
請求項1記載の自動焦点調節装置において、前記分散値が所定の閾値以上であるとき、前記明度データが前記特定の輝度範囲に含まれる画素に対してマスク画像を生成し、前記分散値が所定の閾値未満であるとき、入力した画像データ群のすべての画素に対してマスク画像を生成するマスク生成手段を備え、
前記評価値算出手段は、入力した画像データ群のうち、前記マスク画像が生成されている画素の画像データを用いてAF評価値を算出する自動焦点調節装置。
2. The automatic focus adjustment apparatus according to claim 1 , wherein when the variance value is equal to or greater than a predetermined threshold value, a mask image is generated for pixels whose brightness data is included in the specific luminance range, and the variance value is predetermined. A mask generation means for generating a mask image for all the pixels of the input image data group when
The evaluation value calculation unit is an automatic focus adjustment device that calculates an AF evaluation value using image data of a pixel in which the mask image is generated in the input image data group.
請求項2記載の自動焦点調節装置において、前記マスク画像の生成に使用されている各画素の画像データと、該画素に対して垂直方向及び水平方向に隣り合う画素の画像データとの差分をそれぞれ算出し、この差分を積算して前記AF評価値とする自動焦点調節装置。3. The automatic focusing apparatus according to claim 2, wherein difference between image data of each pixel used for generation of the mask image and image data of pixels adjacent to the pixel in the vertical direction and the horizontal direction is respectively determined. An automatic focus adjustment device that calculates and integrates the differences to obtain the AF evaluation value. 請求項2記載の自動焦点調節装置において、前記マスク画像の生成に使用されている各画素の画像データと該画素に対して垂直方向及び水平方向に隣り合う画素の画像データとの差分をそれぞれ算出して積算し、この積算値を前記マスク画像の生成に使用された総画素数で除算して平均値を算出し、この平均値を前記AF評価値とする自動焦点調節装置。3. The automatic focus adjustment apparatus according to claim 2, wherein differences between image data of each pixel used for generating the mask image and image data of pixels adjacent to the pixel in a vertical direction and a horizontal direction are respectively calculated. An automatic focus adjustment device that calculates the average value by dividing the integrated value by the total number of pixels used to generate the mask image, and uses the average value as the AF evaluation value. 請求項2ないし4のいずれか一項に記載の自動焦点調節装置において、前記マスク生成手段は、前記明度データ群を前記特定の輝度範囲と該範囲外とで二値化し、この二値化データによりマスク画像を生成する自動焦点調節装置。5. The automatic focus adjustment apparatus according to claim 2, wherein the mask generation unit binarizes the brightness data group between the specific luminance range and outside the range, and the binarized data. An automatic focusing device that generates a mask image by means of the above. 請求項2ないし4のいずれか一項に記載の自動焦点調節装置において、さらに、前記明度データ群に輪郭強調処理を施して輪郭強調明度データ群を得る輪郭強調手段を備え、
前記マスク生成手段は、この輪郭強調明度データ群を前記特定の輝度範囲と該範囲外とで二値化し、この二値化データによりマスク画像を生成する自動焦点調節装置。
The automatic focus adjustment apparatus according to any one of claims 2 to 4, further comprising contour enhancement means for performing contour enhancement processing on the brightness data group to obtain a contour enhancement brightness data group,
The automatic focus adjustment device, wherein the mask generation means binarizes the edge-enhanced brightness data group between the specific luminance range and outside the specific luminance range, and generates a mask image based on the binarized data.
請求項2ないし4のいずれか一項に記載の自動焦点調節装置において、さらに、前記明度データ群を平滑化して平滑化明度データ群を得る平滑化手段と、この平滑化明度データ群に輪郭強調処理を施して輪郭強調明度データ群を得る輪郭強調手段とを備え、
前記マスク生成手段は、この輪郭強調明度データ群を前記特定の輝度範囲と該範囲外とで二値化し、この二値化データによりマスク画像を生成する自動焦点調節装置。
5. The automatic focusing apparatus according to claim 2, further comprising: smoothing means for smoothing the lightness data group to obtain a smoothed lightness data group; and contour emphasis on the smoothed lightness data group. Contour emphasizing means for performing processing to obtain a contour emphasis lightness data group,
The automatic focus adjustment device, wherein the mask generation means binarizes the edge-enhanced brightness data group between the specific luminance range and outside the specific luminance range, and generates a mask image based on the binarized data.
請求項5ないし7のいずれか一項に記載の自動焦点調節装置において、前記マスク画像は、前記二値化データにさらに収縮処理を施して生成される自動焦点調節装置。8. The automatic focusing apparatus according to claim 5, wherein the mask image is generated by further performing a contraction process on the binarized data. 請求項2ないしのいずれか一項に記載の自動焦点調節装置において、前記マスク画像を生成した後に、前記画像データを入力してから前記AF評価値を算出し、該評価値に基づいて前記フォーカスレンズを移動させるまでの動作を繰り返し実行して最大AF評価値を検出し、この最大AF評価値が得られるレンズ位置に前記フォーカスレンズを移動させる自動焦点調節装置。An automatic focusing device according to any one of claims 2 to 8, after generating the mask image, the image data to calculate the AF evaluation value from the input, and based on the evaluation value the An automatic focus adjustment apparatus that repeatedly executes an operation until the focus lens is moved, detects a maximum AF evaluation value, and moves the focus lens to a lens position where the maximum AF evaluation value is obtained. 請求項1ないしのいずれか一項に記載の自動焦点調節装置において、前記画像取得手段の入力する画像データ群がRGB画像データ群である自動焦点調節装置。An automatic focusing device according to any one of claims 1 to 9, an automatic focusing device input image data group of said image obtaining means is RGB image data group. 請求項1ないしのいずれか一項に記載の自動焦点調節装置において、前記画像取得手段の入力する画像データ群が補色画像データ群であって、該画像取得手段は、前記補色画像データ群をRGB画像データ群に変換する自動焦点調節装置。An automatic focusing device according to any one of claims 1 to 9, wherein the input image data group of the image acquisition means is a complementary color image data group, the image obtaining means, the complementary color image data group Automatic focus adjustment device that converts to RGB image data group.
JP2003049371A 2003-02-26 2003-02-26 Automatic focus adjustment device Expired - Fee Related JP4217501B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003049371A JP4217501B2 (en) 2003-02-26 2003-02-26 Automatic focus adjustment device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003049371A JP4217501B2 (en) 2003-02-26 2003-02-26 Automatic focus adjustment device

Publications (2)

Publication Number Publication Date
JP2004258360A JP2004258360A (en) 2004-09-16
JP4217501B2 true JP4217501B2 (en) 2009-02-04

Family

ID=33115105

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003049371A Expired - Fee Related JP4217501B2 (en) 2003-02-26 2003-02-26 Automatic focus adjustment device

Country Status (1)

Country Link
JP (1) JP4217501B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4663602B2 (en) * 2006-08-14 2011-04-06 オリンパス株式会社 Automatic focusing device, microscope and automatic focusing method
EP2570070B1 (en) * 2010-08-30 2016-10-05 Olympus Corporation Endoscope
JP5663331B2 (en) 2011-01-31 2015-02-04 オリンパス株式会社 Control apparatus, endoscope apparatus, diaphragm control method, and program
CN115835016B (en) * 2022-11-16 2024-04-23 中国科学院新疆理化技术研究所 Open-loop type automatic focusing method, device, equipment and medium for radiation-resistant camera

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3335572B2 (en) * 1997-11-28 2002-10-21 沖電気工業株式会社 Auto focus device
JP2002040321A (en) * 2000-07-24 2002-02-06 Olympus Optical Co Ltd Electronic camera
JP3721071B2 (en) * 2000-11-16 2005-11-30 日本無線株式会社 Intruder detection system

Also Published As

Publication number Publication date
JP2004258360A (en) 2004-09-16

Similar Documents

Publication Publication Date Title
WO2014155782A1 (en) Image processing device, endoscopic device, program and image processing method
EP2926718B1 (en) Endoscope system
JP5814698B2 (en) Automatic exposure control device, control device, endoscope device, and operation method of endoscope device
US9154745B2 (en) Endscope apparatus and program
WO2016136700A1 (en) Image processing device
JP5951211B2 (en) Focus control device and endoscope device
JP7010330B2 (en) Image processing system, image processing method, image processing device and program
US11503982B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium for detecting a defective pixel in an image frame
US20090123142A1 (en) Method for measuring subject distance
CN112788978A (en) Processor for endoscope, information processing device, endoscope system, program, and information processing method
JP6873740B2 (en) Endoscope device and edge detection method
US10835109B2 (en) Endoscope system
JP7171274B2 (en) Medical image processing device and medical observation device
JP4217501B2 (en) Automatic focus adjustment device
JP2013043007A (en) Focal position controller, endoscope, and focal position control method
JP7179837B2 (en) Endoscope device, endoscope image display method, and operation method of endoscope device
US10462440B2 (en) Image processing apparatus
JP6177387B2 (en) Endoscope device focus control device, endoscope device, and operation method of endoscope control device
JP4648576B2 (en) Electronic endoscope device
JP4338416B2 (en) Automatic focus adjustment device
JP2005043792A (en) Automatic focusing device for endoscope
US11771308B2 (en) Medical control device and medical observation system
JP2017217056A (en) Endoscope system
JP2004272037A (en) Device and method for automatic focusing
US20230041803A1 (en) Processor for endoscope and endoscopic system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051018

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070625

A711 Notification of change in applicant

Effective date: 20080501

Free format text: JAPANESE INTERMEDIATE CODE: A712

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080812

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081001

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

Effective date: 20081028

Free format text: JAPANESE INTERMEDIATE CODE: A01

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

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111114

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees