JP4246320B2 - Electronic endoscope - Google Patents

Electronic endoscope Download PDF

Info

Publication number
JP4246320B2
JP4246320B2 JP17420399A JP17420399A JP4246320B2 JP 4246320 B2 JP4246320 B2 JP 4246320B2 JP 17420399 A JP17420399 A JP 17420399A JP 17420399 A JP17420399 A JP 17420399A JP 4246320 B2 JP4246320 B2 JP 4246320B2
Authority
JP
Japan
Prior art keywords
histogram
data
electronic endoscope
scope
luminance level
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
JP17420399A
Other languages
Japanese (ja)
Other versions
JP2000083190A (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 JP17420399A priority Critical patent/JP4246320B2/en
Publication of JP2000083190A publication Critical patent/JP2000083190A/en
Application granted granted Critical
Publication of JP4246320B2 publication Critical patent/JP4246320B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は可撓性導管からなるスコープと、このスコープを着脱自在に接続する画像信号処理ユニットとから成る電子内視鏡に関する。
【0002】
【従来の技術】
上述したようなタイプの電子内視鏡にあっては、スコープの先端部には固体撮像素子例えばCCD(charge coupled device)イメージセンサが設けられ、このCCDイメージセンサは対物レンズ系と組み合わされる。また、かかるスコープ内には光ファイバー束からなる照明用光ガイドが挿通させられ、その遠位端の端面は照明用レンズと組み合わされる。
【0003】
画像信号処理ユニット内には照明用光源例えばハロゲンランプやキセノンランプが設けられ、スコープと画像信号処理ユニットとの接続時に照明用光ガイドの近位端は照明用光源に光学的に接続される。かくして、患者の体腔内へのスコープの挿入時、その遠位端の対物レンズ系の前方が該スコープの照明用光ガイドの先端部端面から射出させられる照明光で照明され、これにより光学的被写体像はCCDイメージセンサの受光面に結像させられてそこで画素信号として光電変換される。CCDイメージセンサで得られた画素信号は画像信号処理ユニットに送られ、そこでビデオ信号がかかる画素信号に基づいて作成される。次いで、ビデオ信号は画像信号処理ユニットからTVモニタ装置に対して出力され、そこで光学的被写体像がTVモニタ装置上で再現される。
【0004】
ところで、一般的に、電子内視鏡のスコープの対物レンズ系の焦点深度は比較的深くされる。というのは、スコープの遠位端を病巣等の患部に接近させて観察するだけでなく、病巣等の患部を見つけ出す際には該患部を含む広い領域全体を観察することが必要であるからである。この場合、光学的被写体像を適当な輝度で常に再現するためには、照明用光ガイドの遠位端から射出される光の光量を適宜調整することが必要となる。即ち、スコープの遠位端を病巣等の患部に最接近させて観察する際には光量を最低レベルまで低下させ、該患部からスコープの遠位端が次第に遠ざかるつれて光量を次第に増大させることが必要である。
【0005】
上述したような光量調節は自動調光と呼ばれ、この自動調光については一般的には光源に組み込まれた絞りの開度を一フレーム分の画素信号の平均輝度レベルに基づいて制御することにより行われる。詳述すると、一フレーム分の画素信号についてヒストグラム抽出回路でヒストグラムを展開し、このヒストグラムから一フレーム分の画素信号の平均輝度レベルが演算され、その演算結果に基づいて絞り開度を制御することにより、再現画像の輝度が適正に維持され得る。
【0006】
【発明が解決しようとする課題】
ところで、TV映像再現方式としてPAL方式が採用されている場合には、一フレーム分の画素信号の平均輝度レベルの演算については1/25sec 毎に繰り返さなければならず、またTV映像再現方式としてNTSC方式が採用されれいる場合には、一フレーム分の画素信号の平均輝度レベルの演算については1/30sec 毎に繰り返さなければならない。
【0007】
従って、一フレーム分の画素信号の平均輝度レベルに対する絞り開度の制御の応答性をできるだけ高めるためには、即ち再現画像の全体の輝度レベルの適正化を迅速に行うためには、かかる平均輝度レベルの演算をできるだけ速やかに行うことが必要がある。しかしながら、従来にあっては、平均輝度レベルの演算については、ヒストグラムの全画素信号、即ち一フレーム分の画素信号の全てを対象としているために、その演算に比較的長い時間が掛かり、再現画像の輝度の適正化を迅速に行い得ないということが問題点として指摘されている。
【0008】
従って、本発明の目的は、一フレーム分の画素信号についてヒストグラム抽出回路で展開されたヒストグラムに基づいて絞り開度を制御する際にその応答性をできるだけ高めて再現画像の輝度の適正化を迅速に行い得るようになった電子内視鏡を提供することである。
【0009】
一方、上述したような従来の電子内視鏡システムにあっては、特にホワイトバランス処理が適正に行い得ないという問題も指摘されている。詳述すると、個々のスコープが工場から出荷されるとき、各スコープはマスタ画像信号処理ユニットと呼ばれる基準画像信号処理ユニットに接続され、そこでホワイトバランス処理用の補正係数の設定が行われ、その補正係数データがスコープに内蔵された不揮発性メモリに書き込まれる。スコープがユーザ側の画像信号処理ユニットに接続されると、該補正係数データが画像信号処理ユニット側に読み出され、そこでスコープの撮像センサから得られた画素信号がかかる補正係数データに基づいてホワイトバランス処理されることになる。ところが、ユーザ側の画像信号処理ユニットと基準画像信号処理ユニットとの間で光学的特性等は必ずしも一致するわけではなく、個々のスコープの補正係数データに基づいてユーザ側の画像信号処理ユニットでホワイトバランス処理を行ったとしても、そのホワイトバランス処理が最適なものとは限らない。
【0010】
また、ホワイトバランス処理用の補正係数は特に個々の画像信号処理ユニットの光源ランプの色温度特性に深く関係するものであるが、しかし該光源ランプの色温度特性自体はその劣化に伴って経時的に変化するという問題もある。
【0011】
要するに、適正なホワイトバランス処理が常に適正に行われるためには、ホワイトバランス処理用の補正係数設定をユーザ側の個々の画像信号処理ユニットについて定期的に行って更新することが必要となる。
【0012】
従って、本発明の別の目的は、上述したようなタイプの電子内視鏡であって、絞り開度の制御に用いられるヒストグラム抽出回路を利用してホワイトバランス設定を必要に応じて行い得るようになった電子内視鏡を提供することである。
【0013】
【課題を解決するための手段】
本発明による電子内視鏡はスコープと、このスコープを着脱自在に接続させるようになった画像信号処理ユニットとから成るものであって、該画像信号処理ユニット内に設けられた光源を具備し、この光源からの射出光がスコープに導かれてその前方を照明するようになっている。本発明による電子内視鏡は、更に、スコープの先端側に設けられた固体撮像手段と、この固体撮像手段から得られる一フレーム分もしくは一フィールド分の輝度画素信号に基づいてヒストグラムを展開するヒストグラム抽出手段と、このヒストグラム抽出手段で展開されたヒストグラムに基づいて光源からスコープに導かれる光の光量を調節する光量調節手段とを具備して成る。本発明による電子内視鏡においては、ヒストグラム抽出手段で展開されたヒストグラムの全データからの間引きデータに基づいて平均輝度値が求められ、この平均輝度値に応じて光量調節手段による光量調節が行われることが特徴とされる。
【0014】
本発明の好ましい実施形態にあっては、ヒストグラム抽出手段で展開されたヒストグラムの全データからの間引きデータは該全データからm(整数)個置きの輝度レベルに含まれる輝度画素信号から成る。
【0015】
また、本発明の好ましい実施形態にあっては、ヒストグラム抽出手段で展開された前回のヒストグラムの最小輝度レベル及び最大輝度レベルが記憶され、次回のヒストグラムに基づいて平均輝度値を求める際に最小輝度レベル及び最大輝度レベルを含む拡張範囲の全データからの間引きデータが利用される。
【0016】
更に、本発明の好ましい実施形態にあっては、ヒストグラム抽出手段で展開されたヒストグラムの全データに基づいて平均輝度値とそのときの最小輝度レベル及び最大輝度レベルとが定期的に求められ、このヒストグラムの全データに基づく平均輝度値に応じて光量調節手段による光量調節が行われる。
【0017】
更にまた、本発明の好ましい実施形態にあっては、固体撮像手段は三原色の画素信号を出力し、かつスコープはそれ自身に特有なホワイトバランス処理用の三原色の各色の補正係数データを格納する格納手段を有し、ホワイトバランス設定時に三原色のそれぞれの色の一フレーム分もしくは一フィールド分の画素信号に基づくヒストグラムがヒストグラム抽出手段に展開され、各色のヒストグラムの全データから該当色の平均値が求められ、これら三原色のいずれか1つの平均値を基準にしてその他の2つの色の補正係数データが再設定される。
【0018】
【発明の実施の形態】
次に、本発明による電子内視鏡の一実施形態について添付図面を参照して説明する。
【0019】
図1を参照すると、本発明による電子内視鏡の一実施形態がブロック図として示される。電子内視鏡は可撓性導管からなるスコープ10を具備し、このスコープ10はプロセッサと呼ばれる画像信号処理ユニット12に着脱自在に連結されるようになっている。スコープ10の先端即ち遠位端には固体撮像素子例えばCCD(charge-coupled device) 撮像素子から成る撮像センサ14が設けられ、この撮像センサ14にはそのCCD撮像素子と組み合わされた対物レンズ系が包含される。
【0020】
また、スコープ10内には光ファイバー束からなる光ガイド16が挿通させられ、この光ガイド16の遠位端はスコープ10の遠位端まで延び、該光ガイド16の遠位端の端面には照明用レンズが(図示されない)が組み合わされる。光ガイド16の近位端は画像信号処理ユニット12へのスコープ10の連結時に該画像信号処理ユニット12内に設けられたキセノンランプ或いはハロゲンランプ等の白色光源18に光学的に接続される。白色光源18の光射出側には絞り20及び集光レンズ22が順次設けられ、絞り20は白色光源18からの光量を適宜調節するための光量調節手段として用いられ、また集光レンズ22は絞り20を経た光を光ガイド16の近位端の端面に集光させるために用いられる。
【0021】
本実施形態では、カラー映像を再現するために面順次方式が採用されるので、光ガイド16の近位端の端面と集光レンズ22との間に回転式三原色カラーフィルタとして回転式RGBカラーフィルタ24が介在させられる。図2に示すように、回転式RGBカラーフィルタ24は円板要素から成り、この円板要素には赤色フィルタ24R、緑色フィルタ24G及び青色フィルタ24Bが設けられ、これら色フィルタはそれぞれセクタ状の形態とされる。カラーフィルタ24R、24G及び24Bはそれぞの半径方向の中心が120 °の角度間隔となるように円板要素の円周方向に沿って配置され、互いに隣接する色フィルタ間の領域は遮光領域とされる。
【0022】
図3に図示するように、回転式三原色カラーフィルタ24はサーボモータ或いはステップモータのような駆動モータ26によって回転させられる。回転式RGBカラーフィルタ24の回転周波数は電子内視鏡で採用されるTV映像再現方式に応じて決められる。例えば、PAL方式が採用されている場合には、回転式RGBカラーフィルタ24の回転周波数は25Hzであり、NTSC方式が採用されれいる場合には、その回転周波数は30Hzとなる。
【0023】
例えば、回転式RGBカラーフィルタ24が回転周波数30Hzで回転させられるとすると(NTSC方式)、その1回転に要する時間は約33ms(1/30sec) となり、各色フィルタによる照明時間はほぼ33/6msとなる。光ガイド16の遠位端の端面からは赤色光、緑色光及び青色光が毎33ms(1/30sec) 間にほぼ33/6msだけ順次射出させられて、被写体は赤色光、緑色光及び青色光でもって順次照明され、その各色の光学的被写体像が撮像センサ14の対物レンズ系によってそのCCD撮像素子の受光面に順次結像させられる。撮像センサ14はそのCCD撮像素子の受光面に結像された各色の光学的被写体像を一フレーム分のアナログ画素信号に光電変換し、その各色の一フレーム分のアナログ画素信号は各色の照明時間(33/6ms)に続く次の遮光時間(33/6ms)に亘って撮像センサ14から順次読み出され、このような撮像センサ14からのアナログ画素信号の読出しについてはスコープ10内に設けられたCCDドライバ28によって行われる。
【0024】
なお、厳密に言うと、カラーフィルタ24R、24G及び24Bからのそれぞれの色の出力パワー及びCCDイメージセンサ14の分光感度特性が異なるために、赤色光、緑色光及び青色光による照明時間はそれぞれ多少異なったものとされるが、しかしCCDイメージセンサ14からのそれぞれの色の一フレーム分のアナログ画素信号の読出しは同じ態様で遮光時間内で行われる。
【0025】
図1から明らかように、画像信号処理ユニット12にはシステムコントローラ30が設けられ、このシステムコントローラはマイクロコンピュータから構成される。即ち、システムコントローラ30は中央処理ユニット(CPU)、種々のルーチンを実行するためのプログラム、常数等を格納する読出し専用メモリ(ROM)、データ等を一時的に格納する書込み/読出し自在なメモリ(RAM)から成り、電子内視鏡の作動全般を制御する。
【0026】
スコープ10が画像信号処理ユニット12に接続されると、撮像センサ14はCCDドライバ28を介して画像信号処理ユニット12内のCCDプロセス回路32に接続される。CCDドライバ28によって撮像センサ14から読み出された各色の一フレーム分のアナログ画素信号はCCDプロセス回路32に送られ、そこで所定の画像処理例えばホワイトバランス補正処理、ガンマ補正処理、輪郭強調処理等を受ける。なお、図1では、CCDドライバ28及びCCDプロセス回路32とシステムコントローラ30との接続関係についてはその複雑化を避けるために特に図示されていないが、CCDドライバ28での画素信号の読出し及びCCDプロセス回路32での画像処理についてはシステムコントローラ30の制御下で行われる。
【0027】
CCDプロセス回路32で処理された各色の一フレーム分のアナログ画素信号は順次アナログ/デジタル変換器34に送られ、そこでデジタル画素信号に変換され、次いで各色の一フレーム分のデジタル画素信号はフレームメモリ36に一旦書き込まれて格納される。フレームメモリ36には各色の一フレーム分のデジタル画素信号を格納するための3つの格納領域が設けられる。フレームメモリ36からは一フレーム分の三原色のデジタル画像信号が同時に順次読み出され、このとき各色の読出しデジタル画像信号には水平同期信号及び垂直同期信号等が付加される。即ち、一フレーム分の三原色のデジタル画像信号はフレームメモリ36からカラーデジタルビデオ信号(R、G、B)として順次出力されてビデオプロセス回路38に送られる。
【0028】
ビデオプロセス回路38には、各色のカラーデジタルビデオ信号に対応したデジタル/アナログ(D/A)及びローパスフィルタ等が設けられ、各色の一フレーム分のカラーデジタルビデオ信号は一フレーム分のカラーアナログビデオ信号に変換され、次いでローパスフィルタを経た後に適宜増幅されてカラーTVモニタ装置40に送られ、そこで光学的被写体像がカラー画像として再現される。また、ビデオプロセス回路38では、カラーデジタルビデオ信号(R、G、B)に基づいて、コンポーネントビデオ信号が作成され、そのコンポーネントビデオ信号は別のTVモニタ装置、ビデオテープレコーダ、画像処理用コンピュータ等の周辺機器に対してビデオプロセス回路38から外部に出力されるようになっている。
【0029】
図4を参照すると、絞り20がその駆動機構と共に図示される。絞り20は一対のブレード要素42及び44から成り、各ブレード要素42、44からはアーム部42A、44Aが一体的に延びる。ブレード要素42及び44は互いに交差するような態様で枢着ピン46によって枢動自在に軸支され、ブレード要素42及び44の開度に応じて白色光源18から射出される白色光の光量が適宜調節される。絞り20の駆動機構はアーム部42A及び44Aの先端の間に作用させられた引張りコイルばね48を包含し、このコイルばね48のためにブレード要素42及び44はその開度を狭めるような弾性的偏倚力を常に受ける。なお、枢動ピン46は画像信号処理ユニット12の筐体に対して適宜保持される。
【0030】
絞り20の駆動機構は更に一対のブレード要素42及び44の開度を調節するためにアーム部42A及び44A間に係合させられたカムピン50を包含し、このカムピン50は駆動板52の下端部に固着保持される。駆動板52の一方の側辺にはラック54が形成され、このラック54にはピニオン56が係合させられる。ピニオン56はサーボモータ或いはステップモータ等の適当な駆動モータ58の出力シャフト58A上に固着される。なお、駆動モータ58は画像信号処理ユニット12の筐体に対して適宜保持され、またラック54は適当なガイド手段(図示されない)によって適宜摺動自在に保持される。駆動モータ58が回転されると、駆動板52と共にカムピン50が上下動し、これによりブレード要素42及び44の開度が調節される。図1に示すように、駆動モータ58は駆動回路60によって駆動され、駆動回路60はシステムコントローラ30によって制御される。
【0031】
図1に示すように、画像信号処理ユニット12にはランプ電源回路62が設けられ、このランプ電源回路62によって白色光源18への給電が行われる。なお、ランプ電源回路62は図示されないプラグを介して商用電源に接続され、かつシステムコントローラ30によって適宜制御される。
【0032】
また、図1に示すように、画像信号処理ユニット12にはヒストグラム抽出回路64が設けられ、このヒストグラム抽出回路64はスイッチ(SW)回路66を介してフレームメモリ36及びビデオプロセス回路38のいずれかに選択的に接続されるようになっている。スイッチ回路66の切換はシステムコントローラ30によって制御され、ヒストグラム抽出回路64は通常はビデオプロセス回路38に接続され、そこからコンポーネントビデオ信号のうち輝度画素信号がヒストグラム抽出回路64に対して出力されるようになっている。ヒストグラム抽出回路64がスイッチ回路66によってフレームメモリ36に接続されると、一フレーム分の三原色のデジタル画素信号がヒストグラム抽出回路64に入力される。
【0033】
図1に示すように、画像信号処理ユニット12には更にキャラクタ処理回路68が設けられ、このキャラクタ処理回路68にはビデオRAMが内蔵される。システムコントローラ30のROMから読み出される固定文字コード情報データやキーボード(図示されない)から入力される可変文字コード情報データはキャラクタ処理回路68のビデオRAMの所定アドレスに一旦書き込まれる。キャラクタ処理回路68では、そのビデオRAMに書き込まれた文字コード情報データに基づいて文字パターン信号が生成され、この文字パターン信号はビデオプロセス回路に出力されてカラービデオ信号に付加され、これによりTVモニタ装置40上には光学的被写体像の再現画像と共に文字情報が表示される。
【0034】
以上述べたような文字情報は患者名、診察日時、診察寸評等の可変文字情報や再現カラー映像に関する固定文字情報が含まれるが、本発明に特に関連した文字情報としては、2つの固定文字情報、例えば「ホワイトバランスの設定が可能です」及び「ホワイトバランスの設定が完了しました」というような2つのメッセージが挙げられる。これらメッセージ即ち固定文字情報は上述したようにコードデータとして予めシステムコントローラ30のROM内に格納され、それらコードデータは必要に応じてシステムコントローラ30のROMから読み出されてキャラクタ処理回路68のビデオRAMに書き込まれる。なお、上述した2つのメッセージの意味については後述の記載で明らかにされる。
【0035】
図1に示すように、スコープ10側には適当な不揮発性メモリ例えば再書込み可能な読出し専用メモリ(EEPROM)70が設けられ、このEEPROM70にはそのスコープ10自体の種々の情報が書き込まれる。例えば、EEPROM70には、そのCCDイメージセンサ14の画素数データ、CCDドライバ28によって読み出されたアナログ画像信号を処理する際のクロックパルスの周波数情報等が格納され、更に本発明に特に関連する情報データとしては、三原色のアナログ画素信号に対してホワイトバランス処理を施す際に用いられる補正係数データGGAIN、BGAIN及びRGAINが挙げられる。スコープ10が画像信号処理ユニット12に連結されると、EEPROM70はシステムコントローラ30に接続され、このときシステムコントローラ30はEEPROM70内の情報データを読み出し、その情報データはシステムコントローラ30内のRAM内に格納保持される。
【0036】
なお、CCDプロセス回路32で行われるホワイトバランス補正処理は上述の補正係数データGGAIN、BGAIN及びRGAINに基づいて行われるが、しかしながらそれら補正係数データGGAIN、BGAIN及びRGAINが先に述べたように常に最適なものとは言えない。
【0037】
画像信号処理ユニット12には操作パネル72が設けられ、この操作パネル72には種々の表示灯や種々のスイッチが設けられる。図1では、本発明に特に関連するスイッチとして、画像信号処理ユニット12の主電源(図示されない)のオン/オフを切り替える電源スイッチ(SW)、光源ランプ18の点灯を制御する点灯スイッチ(SW)、電子内視鏡の通常の作動モードとホワイトバランス設定モードとを切り換えるモード切換スイッチ(SW)及びホワイトバランス補正係数を設定する際のホワイトバランス設定スイッチ(SW)がそれぞれ参照符号74、76、78及び80で示されている。
【0038】
なお、上述したスイッチ回路66はモード切換スイッチ78によるモード選択によって切り換えられ、モード切換スイッチ78によって通常の作動モードが選択されているときには、ヒストグラム抽出回路64はスイッチ回路66によってビデオプロセス回路38に接続され、モード切換スイッチ78によってホワイトバランス設定モードが選択されているときには、ヒストグラム抽出回路64はスイッチ回路66によりフレームメモリ36に接続される。
【0039】
図5を参照すると、そこにはビデオプロセス回路38から得られる一フレーム分のデジタル輝度画素信号に基づいてヒストグラム抽出回路64で作成されたヒストグラムが例示されている。図5に示すように、本実施形態にあっては、ヒストグラム抽出回路64では、一フレーム分のデジタル輝度画素信号が256 通りの輝度レベルに振り分けられる。要するに、図5に示すヒストグラムにおいて、その横軸Xに沿って256 通りの輝度レベルが示され、その縦軸Yには各輝度レベルに対応したデジタル輝度画素信号の個数即ち度数が示される。輝度レベル0はペデスタルレベルに対応するものであり、また輝度レベル255 は最大輝度レベルに対応する。なお、図5に示す例では、ビデオプロセス回路38から得られた一フレーム分の輝度画素信号には、輝度レベル0ないし4及び輝度レベル252 ないし255 に相当する輝度を持つ輝度画素信号は含まれない。
【0040】
図6及び図7を参照すると、システムコントローラ30で実行される自動調光ルーチンのフローチャートが示される。この自動調光ルーチンは電子内視鏡のメイン作動ルーチンのサブルーチンとして機能するものであって、例えば電子内視鏡で映像再現方式としてNTSC方式が採用されている場合には、1/30sec 毎に実行される割込みルーチンとされる。なお、自動調光ルーチンの実行は操作パネル72上の電源スイッチ74のオンによって開始される。
【0041】
ステップ601では、カウンタNがカウンタ数が“0”であるか否かが判断される。初期段階では、N=0であるので、ステップ602に進み、ヒストグラム抽出回路64で展開された第1番目のヒストグラムの全データ(0≦X≦255)に基づいて平均輝度値AIが算出される。即ち、輝度レベル0ないし255 のそれぞれに対応した輝度値をL0 ないしL255 とし、かつ各輝度レベル0ないし255 のそれぞれに振り分けられた輝度画素信号の度数(個数)をS0 ないしS255 としたとき、平均輝度値AIは以下の式によって算出される。
【0042】
【数1】

Figure 0004246320
即ち、TPは一フレーム分の輝度画素信号の総数である。
【0043】
ステップ603では、算出された平均輝度値AIに対応した絞り開度を絞り20に与えるべく駆動モータ58が駆動回路60によって回転駆動させられる。次いで、ステップ604では、第1番目のヒストグラムから最小輝度レベルLMIN 及び最大輝度レベルLMAX が求められてシステムコントローラ30のRAMに格納される。なお、図8には第1番目のヒストグラムの一例が示され、この例から明らかなように、最小輝度レベルLMIN よりも小さい輝度レベルに対応する輝度画素信号は存在せず、また最大輝度レベルLMAX を越える輝度レベルに対応する輝度画素信号は存在しない。
【0044】
ステップ605では、カウンタNのカウント数が“1”だけカウントアップされ、次いでステップ606ではカウンタNのカウント数が7に等しいか否かが判断される。現段階では、Nは7以下、即ちN=1であるので、本ルーチンは一旦終了する。
【0045】
1/30sec 経過後、本ルーチンは再び実行されるが、このときヒストグラム抽出回路64には図9に示すような第2番目のヒストグラムが展開されているものとする。現段階では、N=1であるので、ステップ601からステップ607に進み、そこで第1番目の最小輝度レベルLMIN が輝度レベル8以上であるか否かが判断される。もしLMIN ≧8であれば、ステップ608に進み、そこで第1番目の最大輝度レベルLMAX が輝度レベル247 以下であるか否かが判断される。もしLMAX ≦247 であれば、ステップ609に進む。
【0046】
ステップ609では、第2番目のヒストグラムの特定の範囲、即ち第1番目のヒストグラムの最小輝度レベルLMIN と最大輝度レベルLMAX との間の範囲よりもその両側で8輝度レベル分だけ拡張された範囲(図9で破線矢印で示す範囲)の全データのうちから一つ置きに間引いたデータに基づいて平均輝度レベルAIが算出される。即ち、平均輝度レベルAIは以下の式によって算出される。
【0047】
【数2】
Figure 0004246320
なお、[x]はガウス記号であり、xを越えない最大整数を表す。
【0048】
要するに、2つの連続したフレームの輝度画素信号のヒストグラム、即ち第1番目のヒストグラム(図8)及び第2番目のヒストグラム(図9)については一般的には互いに似たものとなる可能性が高いので(というのは、スコープ10による患部の観察時でのスコープの動きは少ないからである)、前回の最小輝度レベルLMIN と最大輝度レベルLMAX との間の範囲をそれぞれの境界側でヒストグラム定義域(0≦X≦255)の例えば3ないし5%分だけ拡張すれば(本実施形態では8輝度レベル分)、その拡大範囲内に第2番目のヒストグラムの実体部分が含まれ得ると仮定することができる。従って、第2番目のヒストグラムについての平均輝度レベルAIを算出する際の演算範囲はLMIN −8≦X≦LMAX +8と狭まり、しかもその演算は一つ置きの間引きデータに基づくものとなるので、平均輝度レベルAIの算出時間は大幅に短縮され得る。
【0049】
ステップ609で第2番目のヒストグラムの平均輝度レベルAIが算出されると、ステップ609からステップ603に進み、そこで該平均輝度値AIに対応した絞り開度を絞り20に与えるべく駆動モータ58が駆動回路60によって回転駆動させられる。次いで、ステップ604では、第2番目のヒストグラムから最小輝度レベルLMIN 及び最大輝度レベルLMAX が求められてシステムコントローラ30のRAMに格納される。
【0050】
ステップ605では、カウンタNのカウント数が“1”だけカウントアップされ、次いでステップ606ではカウンタNのカウント数が7に等しいか否かが判断される。現段階でも、Nは7以下、即ちN=2であるので、本ルーチンは一旦終了する。
【0051】
ステップ607でもしLMIN <8であれば、即ち第1番目のヒストグラムが図10に示すようなものであれば、ステップ607からステップ610に進み、そこで第1番目の最大輝度レベルLMAX が輝度レベル247 以下であるか否かが判断される。もしLMAX ≦247 であれば、ステップ611に進む。なお、上述した場合と同様な理由により、第1番目のヒストグラムが図10に示すようなものであれば、第2番目のヒストグラムはそれと類似したもの、即ち図11に示すようなものと仮定し得る。
【0052】
ステップ611では、図11に示す第2番目のヒストグラムの特定の範囲、即ち第1番目のヒストグラムの最小輝度レベルLMIN と最大輝度レベルLMAX との間の範囲よりも最小輝度レベルLMIN 側で輝度レベル0まで拡張されかつ最大輝度レベルLMAX 側で8輝度レベル分だけ拡張された範囲(図11で破線矢印で示す範囲)の全データのうちから一つ置きに間引いたデータに基づいて平均輝度レベルAIが算出される。即ち、平均輝度レベルAIは以下の式によって算出される。
【0053】
【数3】
Figure 0004246320
【0054】
上述の場合と同様に、第2番目のヒストグラムについての平均輝度レベルAIを算出する際の演算範囲は0≦X≦LMAX +8と狭まり、しかもその演算は一つ置きの間引きデータに基づくものとなるので、平均輝度レベルAIの算出時間は大幅に短縮され得る。
【0055】
ステップ611で第2番目のヒストグラムの平均輝度レベルAIが算出されると、ステップ611からステップ603に進み、そこで該平均輝度値AIに対応した絞り開度を絞り20に与えるべく駆動モータ58が駆動回路60によって回転駆動させられる。次いで、ステップ604では、第2番目のヒストグラムから最小輝度レベルLMIN 及び最大輝度レベルLMAX が求められてシステムコントローラ30のRAMに格納される。
【0056】
ステップ605では、カウンタNのカウント数が“1”だけカウントアップされ、次いでステップ606ではカウンタNのカウント数が7に等しいか否かが判断される。現段階では、N=2であるので、本ルーチンは一旦終了する。
【0057】
ステップ608でもしLMAX >247 であれば、即ち第1番目のヒストグラムが図12に示すようなものであれば、ステップ608からステップ612に進む。なお、上述した場合と同様な理由により、第1番目のヒストグラムが図12に示すようなものであれば、第2番目のヒストグラムはそれと類似したもの、即ち図13に示すようなものと仮定し得る。
【0058】
ステップ612では、図13に示す第2番目のヒストグラムの特定の範囲、即ち第1番目のヒストグラムの最小輝度レベルLMIN と最大輝度レベルLMAX との間の範囲よりも最小輝度レベルLMIN 側で8輝度レベル分だけ拡張されかつ最大輝度レベルLMAX 側で輝度レベル255 まで拡張された範囲(図13で破線矢印で示す範囲)の全データのうちから一つ置きに間引いたデータに基づいて平均輝度レベルAIが算出される。即ち、平均輝度レベルAIは以下の式によって算出される。
【0059】
【数4】
Figure 0004246320
【0060】
上述の場合と同様に、第2番目のヒストグラムについての平均輝度レベルAIを算出する際の演算範囲はLMIN −8≦X≦255 と狭まり、しかもその演算は一つ置きの間引きデータに基づくものとなるので、平均輝度レベルAIの算出時間は大幅に短縮され得る。
【0061】
ステップ612で第2番目のヒストグラムの平均輝度レベルAIが算出されると、ステップ612からステップ603に進み、そこで該平均輝度値AIに対応した絞り開度を絞り20に与えるべく駆動モータ58が駆動回路60によって回転駆動させられる。次いで、ステップ604では、第2番目のヒストグラムから最小輝度レベルLMIN 及び最大輝度レベルLMAX が求められてシステムコントローラ30のRAMに格納される。
【0062】
ステップ605では、カウンタNのカウント数が“1”だけカウントアップされ、次いでステップ606ではカウンタNのカウント数が7に等しいか否かが判断される。現段階では、N=2であるので、本ルーチンは一旦終了する。
【0063】
ステップ610でもしLMAX >247 であれば、即ち第1番目のヒストグラムが図14に示すようなものであれば、ステップ610からステップ613に進む。なお、上述した場合と同様な理由により、第1番目のヒストグラムが図14に示すようなものであれば、第2番目のヒストグラムはそれと類似したもの、即ち図15に示すようなものと仮定し得る。
【0064】
ステップ613では、図15に示す第2番目のヒストグラムの全定義域の範囲(図15で破線矢印で示す範囲、即ち0≦X≦255 )の全データのうちから一つ置きに間引いたデータに基づいて平均輝度レベルAIが算出される。即ち、平均輝度レベルAIは以下の式によって算出される。
【0065】
【数5】
Figure 0004246320
【0066】
この場合には、第2番目のヒストグラムについての平均輝度レベルAIを算出する際の演算範囲は全定義域(0≦X≦255 )となるが、しかしその演算は一つ置きの間引きデータに基づくものとなるので、平均輝度レベルAIの算出時間は大幅に短縮され得る。
【0067】
ステップ613で第2番目のヒストグラムの平均輝度レベルAIが算出されると、ステップ613からステップ603に進み、そこで該平均輝度値AIに対応した絞り開度を絞り20に与えるべく駆動モータ58が駆動回路60によって回転駆動させられる。次いで、ステップ604では、第2番目のヒストグラムから最小輝度レベルLMIN 及び最大輝度レベルLMAX が求められてシステムコントローラ30のRAMに格納される。
【0068】
ステップ605では、カウンタNのカウント数が“1”だけカウントアップされ、次いでステップ606ではカウンタNのカウント数が7に等しいか否かが判断される。現段階では、N=2であるので、本ルーチンは一旦終了する。
【0069】
続いて、第3番目ないし第8番目のヒストグラムについても以上で述べたいずれかの態様(ステップ609、611、612、613)でその平均輝度AIが算出され、それに応じて絞り20の開度が適宜調整される。第8番目のヒストグラムから得られた平均輝度AIに基づく絞り20の開度の調整後、カウンタNのカウント数は7に到達する(ステップ605)。従って、ステップ606からステップ614に進み、そこでカウンタNはリセットされ、本ルーチンは一旦終了する。
【0070】
1/30sec 経過後、本ルーチンは再び実行されるが、このときN=0となっているので、ステップ602に進み、ヒストグラム抽出回路64で展開された第9番目のヒストグラムの全データ(0≦X≦255)に基づいて平均輝度値AIが算出され、このとき用いられる演算式は上述の数式1となる。
【0071】
このとき、ヒストグラムの全データを読み出した上での、最小輝度レベルと最大輝度レベルが求められることになる。従って、例えば、スコープ10の動きにより内視鏡像の明るさが急激に変化して画像データの存在する範囲が急に異なった場合、或いは画像データの存在する範囲が広がったり狭まったりした場合でも、八回目毎に平均輝度値AIの算出にはヒストグラムの全データ(0≦X≦255)が用いられるので、適正な平均輝度値が得られ、かくして絞り20の開度も適正に調整され得る。
【0072】
図16ないし図18を参照すると、システムコントローラ30で実行されるホワイトバランス設定ルーチンのフローチャートが示される。このホワイトバランス設定ルーチンも電子内視鏡のメイン作動ルーチンのサブルーチンとして機能するものであって、例えば電子内視鏡で映像再現方式としてNTSC方式が採用されている場合には、1/30sec 毎に実行される割込みルーチンとされる。また、ホワイトバランス設定ルーチンの実行開始は電源スイッチ74をオンした後にモード切換スイッチ78でホワイトバランス設定モードを選択することによって行われる。
【0073】
なお、ホワイトバランスの設定については、例えば本発明による電子内視鏡が複数のスコープ(10)と共に病院等の医療機関等に新規に納入されたような場合、本発明による電子内視鏡の納入後に新たなスコープが追加されたような場合、更には既に使用されているスコープについてホワイトバランスの補正係数データを再設定するような場合に行われる。
【0074】
ステップ1601ないしステップ1604では、フラグF1、F2、F3及びF4が“0”であるか否かが順次判断される。初期段階では、F1、F2、F3及びF4=0であるので、ステップ1605に進み、そこでスイッチ回路66の接続がフレームメモリ36側に切り換えられる。従って、ヒストグラム抽出回路64はスイッチ回路66を介してフレームメモリ36に接続される。
【0075】
ステップ1606では、点灯スイッチ76のオンにより光源ランプ18が点灯されたか否かが判断される。光源ランプ18が点灯されていないとき、本ルーチンは一旦終了する。1/30sec 経過後、本ルーチンは再び実行されるが、しかし光源ランプ18が点灯されない限り、何等の進展もない。
【0076】
ステップ1606で光源ランプ18の点灯が確認されると、ステップ1607に進み、そこで光源ランプ18を点灯した後に所定の時間が経過したか否かが判断される。本ルーチンの実行は1/30sec 毎に繰り返されるが、しかし所定時間が経過するまでは、何等の進展もない。即ち、光源ランプ18の発光状態が安定するまで待機状態となる。所定時間が経過して光源ランプ18の発光状態が安定すると、ステップ1608に進み、そこでホワイトバランスの設定が可能である旨のメッセージ、例えば「ホワイトバランスの設定が可能です」というようなメッセージがTVモニタ装置40に表示される。なお、かかるメッセージの表示がシステムコントローラ30のROM内に予め格納された固定文字情報コードデータを読み出してキャラクタ処理回路68のビデオRAMに書き込んで文字パターン信号としてビデオプロセス回路38に出力することにより行われることは先に述べた通りである。
【0077】
ステップ1609では、ホワイトバランス設定の対象となるスコープ(10)が画像信号処理ユニット12に接続されたか否かが判断される。スコープが接続されていないときは、ステップ1610に進み、そこでフラグF4が“0”から“1”に書き替えられた後、本ルーチンは一旦終了する。1/30sec 経過後、本ルーチンは再び実行されるが、このときF4=1であるので、ステップ1605ないしステップ1608はスキップされる。その後、本ルーチンの実行は1/30sec 毎に繰り返されるが、スコープが画像信号処理ユニット12に接続されない限り、何等の進展もない。
【0078】
ステップ1609でスコープの接続が確認されると、ステップ1609からステップ1611に進み、そこで該スコープのEEPROM70から補正係数データGGAIN、BGAIN及びRGAINが読み出され、これら補正係数データはシステムコントローラ30のRAMに格納される。次いで、ステップ1612では、フラグF3が“0”から“1”に書き替えられ、続いてステップ1613でホワイトバランス設定スイッチ80がオンされたか否かが判断される。ホワイトバランス設定スイッチ80はホワイトバランスの設定準備の完了後にオペレータの手動操作によってオンされる。
【0079】
ここで、ホワイトバランスの設定準備について簡単に説明すると、ホワイトバランス設定時には基準白色を持つ包囲体が用いられる。即ち、該包囲体の内側壁には所定の基準白色が塗布されており、その包囲体内にスコープ(10)の先端を挿入することにより、ホワイトバランスの設定準備が完了することになる。なお、電子内視鏡でのホワイトバランスの設定自体は周知のことである。
【0080】
ステップ1613でホワイトバランス設定スイッチ80のオンが確認されると、ステップ1614に進み、そこで撮像センサ14から読み出された一フレーム分の緑色画素信号に基づいてヒストグラム抽出回路64で展開されている緑色ヒストグラム(G)の全データから緑色画素信号の平均値AGが以下の数式に基づいて算出される。
【0081】
【数6】
Figure 0004246320
ここで、GLn は一フレーム分の緑色画素信号についての256 通りの緑色レベルを示し、GSn は各緑色レベルに対応した値を持つ緑色画素信号の度数即ち個数を示し、TPは上述した数式1の場合と同様に一フレーム分の緑色画素信号の総数を示す。なお、かかる一フレーム分の緑色画素信号はスコープのEEPROM70から得られた補正係数データGGAINによってホワイトバランス処理されたものとなっている。
【0082】
ステップ1615では、撮像センサ14から読み出された一フレーム分の青色画素信号に基づいてヒストグラム抽出回路64で展開されている青色ヒストグラム(B)の全データから青色画素信号の平均値ABが以下の数式に基づいて算出される。
【0083】
【数7】
Figure 0004246320
ここで、BLn は一フレーム分の青色画素信号についての256 通りの青色レベルを示し、BSn は各青色レベルに対応した値を持つ青色画素信号の度数即ち個数を示し、TPは上述の場合と同様に一フレーム分の青色画素信号の総数を示す。なお、かかる一フレーム分の青色画素信号はスコープのEEPROM70から得られた補正係数データBGAINによってホワイトバランス処理されたものとなっている。
【0084】
ステップ1616では、平均値AGと平均値ABとの差ΔGBが演算される。次いで、ステップ1617では、差ΔGBが所定の許容値PVを越えているか否かが判断される。差ΔGBが許容値PVを越えているとき、ステップ1618に進み、そこで平均値ABが平均値AGよりも大きいか否かが判断される。もしAB>AGであるならば、ステップ1619に進み、そこで補正係数データBGAINが所定値だけ減少させられ、本ルーチンは一旦終了する。一方、AB<AGであるならば、ステップ1620に進み、そこで補正係数データBGAINが所定値だけ増大させられ、本ルーチンは一旦終了させられる。
【0085】
次の割込み処理で再び本ルーチンが実行されたとき、ステップ1601及び1602を経た後ステップ1603からステップ1613まで直ちにスキップすることになるが(F3=1)、このときホワイトバランス設定スイッチ80は既にオンとなっているので、ステップ1614に進み、そこで再びヒストグラム抽出回路64で展開されている緑色ヒストグラム(G)から緑色画素信号の平均値AGが上述の数式6に基づいて算出される。なお、このとき緑色ヒストグラムは撮像センサ14から読み出された前回の一フレーム分の緑色画素信号の次に読み出された一フレーム分の緑画素信号に基づくものであり、しかもその後者の一フレーム分の緑色画素信号はスコープのEEPROM70から得られた補正係数データGGAINによってホワイトバランス処理されたものとなっている。
【0086】
続いて、ステップ1615でも、再びヒストグラム抽出回路64で展開されている青色ヒストグラム(B)から青色画素信号の平均値ABが上述の数式7に基づいて算出される。なお、このとき青色ヒストグラムは撮像センサ14から読み出された前回の一フレーム分の青色画素信号の次に読み出された一フレーム分の青画素信号に基づくものであり、しかもその後者の一フレーム分の青色画素信号は前回の本ルーチン実行時にステップ1619或いはステップ1620で所定値だけ減少或いは増大させられた補正係数データBGAINによってホワイトバランス処理されたものとなっている。
【0087】
ステップ1616では、平均値AGと平均値ABとの差ΔGBが再び演算されるが、その差ΔGBは前回よりも小さなものとなる。というのは、今回の一フレーム分の青色画素信号のホワイトバランス処理が前回の本ルーチン実行時にステップ1619或いはステップ1620で所定値だけ減少或いは増大させられた補正係数データBGAINに基づいて行われているからである。次いで、ステップ1617では、差ΔGBが所定の許容値PVを越えているか否かが再び判断される。差ΔGBが許容値PVを未だ越えているとき、ステップ1618に進み、そこで平均値ABが平均値AGよりも大きいか否かが再び判断されるが、このときAB>AGであれば、ステップ1619に進み、そこで補正係数データBGAINが所定値だけ更に減少させられ、またAB<AGであれば、ステップ1620に進み、そこで補正係数データBGAINが所定値だけ更に増大させられる。要するに、補正係数データGGAINを基準にして、差ΔGBが所定の許容値PV内に納まるまで、以上で述べたルーチンが繰り返される。
【0088】
ステップ1617で差ΔGBが所定の許容値PV内に納まったとき、ステップ1617からステップ1621に進み、そこでフラグF2が“0”から“1”に書き替えられる。次いで、ステップ1622では、撮像センサ14から読み出された一フレーム分の緑色画素信号に基づいてヒストグラム抽出回路64で展開されている緑色ヒストグラム(G)の全データから緑色画素信号の平均値AGが上述の数式6に基づいて算出される。なお、上述の場合と同様に、かかる一フレーム分の緑色画素信号はスコープのEEPROM70から得られた補正係数データGGAINによってホワイトバランス処理されたものとなっている。
【0089】
ステップ1623では、撮像センサ14から読み出された一フレーム分の赤色画素信号に基づいてヒストグラム抽出回路64で展開されている赤色ヒストグラム(R)の全データから赤色画素信号の平均値ARが以下の数式に基づいて算出される。
【0090】
【数8】
Figure 0004246320
ここで、RLn は一フレーム分の赤色画素信号についての256 通りの赤色輝度レベルを示し、RSn は各赤色レベルに対応した値を持つ赤色画素信号の度数即ち個数を示し、TPは先に述べた場合と同様に一フレーム分の赤色画素信号の総数を示す。なお、かかる一フレーム分の赤色画素信号はスコープのEEPROM70から得られた補正係数データRGAINによってホワイトバランス処理されたものとなっている。
【0091】
ステップ1624では、平均値AGと平均値ARとの差ΔGRが演算される。次いで、ステップ1625では、差ΔGRが所定の許容値PVを越えているか否かが判断される。差ΔGRが許容値PVを越えているとき、ステップ1626に進み、そこで平均値ARが平均値AGよりも大きいか否かが判断される。もしAR>AGであるならば、ステップ1627に進み、そこで補正係数データRGAINが所定値だけ減少させられ、本ルーチンは一旦終了する。一方、AR<AGであるならば、ステップ1628に進み、そこで補正係数データRGAINが所定値だけ増大させられ、本ルーチンは一旦終了させられる。
【0092】
次の割込み処理で再び本ルーチンが実行されたとき、ステップ1601を経た後ステップ1602からステップ1622まで直ちにスキップし(F2=1)、そこで再びヒストグラム抽出回路64で展開されている緑色ヒストグラム(G)から緑色画素信号の平均値AGが上述の数式6に基づいて算出される。なお、このとき緑色ヒストグラムは撮像センサ14から読み出された前回の一フレーム分の緑色画素信号の次に読み出された一フレーム分の緑画素信号に基づくものであり、しかもその後者の一フレーム分の緑色画素信号はスコープのEEPROM70から得られた補正係数データGGAINによってホワイトバランス処理されたものとなっている。
【0093】
続いて、ステップ1623でも、再びヒストグラム抽出回路64で展開されている赤色ヒストグラム(R)から赤色画素信号の平均値ARが上述の数式8に基づいて算出される。なお、このとき赤色ヒストグラムは撮像センサ14から読み出された前回の一フレーム分の赤色画素信号の次に読み出された一フレーム分の赤画素信号に基づくものであり、しかもその後者の一フレーム分の赤色画素信号は前回の本ルーチン実行時にステップ1627或いはステップ1628で所定値だけ減少或いは増大させられた補正係数データRGAINによってホワイトバランス処理されたものとなっている。
【0094】
ステップ1624では、平均値AGと平均値ARとの差ΔGRが再び演算されるが、その差ΔGRは前回よりも小さなものとなる。というのは、今回の一フレーム分の赤色画素信号のホワイトバランス処理が前回の本ルーチン実行時にステップ1627或いはステップ1628で所定値だけ減少或いは増大させられた補正係数データRGAINに基づいて行われているからである。次いで、ステップ1625では、差ΔGRが所定の許容値PVを越えているか否かが再び判断される。差ΔGRが許容値PVを未だ越えているとき、ステップ1626に進み、そこで平均値ARが平均値AGよりも大きいか否かが再び判断されるが、このときAR>AGであれば、ステップ1627に進み、そこで補正係数データRGAINが所定値だけ更に減少させられ、またAR<AGであれば、ステップ1628に進み、そこで補正係数データRGAINが所定値だけ更に増大させられる。要するに、補正係数データGGAINを基準にして、差ΔGRが所定の許容値PV内に納まるまで、以上で述べたルーチンが繰り返される。
【0095】
ステップ1625で差ΔGRが所定の許容値PV内に納まったとき、ステップ1625からステップ1629に進み、そこでホワイトバランス設定が完了した旨のメッセージ、例えば「ホワイトバランス設定が完了しました」というようなメッセージがTVモニタ装置40に表示される。なお、かかるメッセージの表示がシステムコントローラ30のROM内に予め格納された固定文字情報コードデータを読み出してキャラクタ処理回路68のビデオRAMに書き込んで文字パターン信号としてビデオプロセス回路38に出力することにより行われることは先に述べた通りである。
【0096】
ステップ1630では、補正係数データGGAIN、BGAIN及びRGAINがスコープ(10)のEEPROM70に書き込まれる。なお、このとき補正係数データGGAINについては変えられていないので、補正係数データBGAIN及びRGAINだけがEEPROM70に書き込まれてもよい。次いで、ステップ1631では、当該スコープ(10)、即ちホワイトバランスの設定或いは再設定が完了したスコープが画像信号処理ユニット12から離脱させられたか否かが判断される。当該スコープ(10)の離脱が行われていないとき、ステップ1632に進み、そこでフラグF1が“0”から“1”に書き替えられる。その後、1/30sec 経過毎に本ルーチンは実行されるが、当該スコープ(10)が離脱されるまで、何等の進展もない。ステップ1631で当該スコープ(10)の離脱が確認されると、ステップ1633に進み、そこでフラグF1、フラグF2及びフラグF3がそれぞれ“1”から“0”に書き直され、本ルーチンは一旦完了する。
【0097】
その後、ステップ1609において、別のスコープ、即ちホワイトバランスの設定或いは再設定されるべきスコープが画像信号処理ユニット12に接続されたか否かが監視され、もしそのようなスコープが接続されると、以上で述べたルーチンが再び繰り返される。なお、モード切換スイッチ78が通常の作動モードを選択するように切り換えられると、本ルーチンは終了する。
【0098】
以上で説明した実施形態では、電子内視鏡は面順次カラー方式を採用したものとされているが、しかしカラー同時方式を採用した電子内視鏡、即ち微細な三原色フィルタ要素をモザイク状に配列したカラーフィルタアレイを固体撮像素子の受光面に適用した電子内視鏡についても同様な自動調光及びホワイトバランス設定を行い得ることが理解されるべきである。更に、以上の説明では、ホワイトバランス処理について、三原色(R、G、B)のそれぞれの色のデータから、三原色の色の補正係数データを設定するようにしているが、三原色の色の補正係数データを求めるために色のデータではなく色差信号データを用いてもよい。
【0099】
また、上述の実施形態では、ヒストグラムの作成については一フレーム分の画素信号に基づいているが、一フィールド分の画素信号に基づいてヒストグラムの作成を行うようにしてもよい。
【0100】
【発明の効果】
以上の記載から明らかなように、本発明による電子内視鏡にあっては、一フレーム分の輝度画素信号についてヒストグラム抽出回路で展開されたヒストグラムに基づいて絞り開度を制御する際に該ヒストグラムからの間引きデータから平均輝度値を算出し、その平均輝度値に基づいて絞り開度を制御して自動調光を行うので、その自動調光制御の応答性を高めて再現画像の輝度の適正化を迅速に行うことが可能となる。また、本発明による電子内視鏡にあっては、かかる絞り開度の制御に用いられるヒストグラム抽出回路を利用してホワイトバランス設定を適宜行うことができ、この場合はヒストグラムデータを間引かず全データを用いるので、個々のスコープから得られる画素信号に対して常に適正なホワイトバランス処理を施すことが可能であり、電子内視鏡による内視鏡像の色再現性を高品位に維持することができる。
【図面の簡単な説明】
【図1】本発明による電子内視鏡の概略ブロック図である。
【図2】図1に示す回転式RGBカラーフィルタの正面図である。
【図3】図1に示す回転式RGBカラーフィルタをその駆動モータと共に示す側面図である。
【図4】図1に示す絞りをその駆動機構と共に示す概略正面図である。
【図5】図1に示すヒストグラム抽出回路で展開されるヒストグラムの一例を概念的に示すグラフである。
【図6】図1のシステムコントローラで実行される自動調光ルーチンを説明するためのフローチャートの一部分である。
【図7】図1のシステムコントローラで実行される自動調光ルーチンを説明するためのフローチャートの残りの部分である。
【図8】一フレーム分の輝度画素信号から得られるヒストグラムの一例を概念的に示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図9】図8のヒストグラムに関連したヒストグラムを示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図10】一フレーム分の輝度画素信号から得られるヒストグラムの別の例を概念的に示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図11】図10のヒストグラムに関連したヒストグラムを示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図12】一フレーム分の輝度画素信号から得られるヒストグラムの更に別の例を概念的に示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図13】図12のヒストグラムに関連したヒストグラムを示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図14】一フレーム分の輝度画素信号から得られるヒストグラムの更に別の例を概念的に示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図15】図14のヒストグラムに関連したヒストグラムを示すグラフであって、図6及び図7の自動調光ルーチンを説明するための説明図である。
【図16】図1のシステムコントローラで実行されるホワイトバランス設定ルーチンを説明するためのフローチャートの一部分である。
【図17】図1のシステムコントローラで実行されるホワイトバランス設定ルーチンを説明するためのフローチャートのその他の部分である。
【図18】図1のシステムコントローラで実行されるホワイトバランス設定ルーチンを説明するためのフローチャートの残りの部分である。
【符号の説明】
10 スコープ
12 画像信号処理ユニット
14 撮像センサ
16 光ガイド
18 白色光源
20 絞り
22 集光レンズ
24 回転式RGBカラーフィルタ
28 CCDドライバ
30 システムコントローラ
32 CCDプロセス回路
34 アナログ/デジタル(A/D)変換器
36 フレームメモリ
38 ビデオプロセス回路
40 TVモニタ装置
64 ヒストグラム抽出回路
66 スイッチ回路
70 EEPROM
74 電源スイッチ
76 点灯スイッチ
78 モード切換スイッチ
80 ホワイトバランス設定スイッチ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an electronic endoscope including a scope made of a flexible conduit and an image signal processing unit for detachably connecting the scope.
[0002]
[Prior art]
In an electronic endoscope of the type described above, a solid-state imaging device, for example, a CCD (charge coupled device) image sensor is provided at the distal end of the scope, and this CCD image sensor is combined with an objective lens system. In addition, an illumination light guide composed of an optical fiber bundle is inserted into the scope, and the end surface of the distal end thereof is combined with the illumination lens.
[0003]
An illumination light source such as a halogen lamp or a xenon lamp is provided in the image signal processing unit, and the proximal end of the illumination light guide is optically connected to the illumination light source when the scope and the image signal processing unit are connected. Thus, when the scope is inserted into the body cavity of the patient, the front of the objective lens system at the distal end is illuminated with the illumination light emitted from the end face of the distal end of the illumination light guide of the scope, thereby the optical subject. The image is formed on the light receiving surface of the CCD image sensor, where it is photoelectrically converted as a pixel signal. The pixel signal obtained by the CCD image sensor is sent to an image signal processing unit, where a video signal is created based on the pixel signal. The video signal is then output from the image signal processing unit to the TV monitor device, where an optical subject image is reproduced on the TV monitor device.
[0004]
By the way, generally, the depth of focus of the objective lens system of the scope of the electronic endoscope is relatively deep. This is because it is necessary not only to observe the distal end of the scope close to the affected area such as a lesion, but also to find the affected area such as a lesion, to observe the entire wide area including the affected area. is there. In this case, in order to always reproduce the optical subject image with appropriate luminance, it is necessary to appropriately adjust the amount of light emitted from the distal end of the illumination light guide. That is, when observing with the distal end of the scope closest to the affected part such as a lesion, the amount of light is reduced to the lowest level, and the distal end of the scope gradually moves away from the affected part to gradually increase the amount of light. is necessary.
[0005]
The light amount adjustment as described above is called automatic dimming. In general, for this automatic dimming, the aperture of the diaphragm incorporated in the light source is controlled based on the average luminance level of the pixel signal for one frame. Is done. More specifically, the histogram extraction circuit develops a histogram for the pixel signal for one frame, the average luminance level of the pixel signal for one frame is calculated from this histogram, and the aperture opening is controlled based on the calculation result. Thus, the brightness of the reproduced image can be properly maintained.
[0006]
[Problems to be solved by the invention]
By the way, when the PAL system is adopted as the TV video reproduction system, the calculation of the average luminance level of the pixel signal for one frame must be repeated every 1/25 sec. When the method is adopted, the calculation of the average luminance level of the pixel signal for one frame must be repeated every 1/30 sec.
[0007]
Therefore, in order to improve the responsiveness of the aperture opening control to the average luminance level of the pixel signal for one frame as much as possible, that is, to quickly optimize the overall luminance level of the reproduced image, the average luminance is required. It is necessary to perform level calculation as quickly as possible. However, conventionally, since the calculation of the average luminance level is intended for all the pixel signals of the histogram, that is, all the pixel signals for one frame, the calculation takes a relatively long time, and the reproduced image It has been pointed out as a problem that it is not possible to quickly optimize the brightness of the screen.
[0008]
Accordingly, an object of the present invention is to quickly optimize the brightness of a reproduced image by increasing the responsiveness as much as possible when controlling the aperture opening based on the histogram developed by the histogram extraction circuit for the pixel signal for one frame. It is an object of the present invention to provide an electronic endoscope that can be performed at the same time.
[0009]
On the other hand, in the conventional electronic endoscope system as described above, a problem that white balance processing cannot be performed properly has been pointed out. In detail, when each scope is shipped from the factory, each scope is connected to a reference image signal processing unit called a master image signal processing unit, in which correction coefficients for white balance processing are set, and the correction is performed. The coefficient data is written in a nonvolatile memory built in the scope. When the scope is connected to the image signal processing unit on the user side, the correction coefficient data is read out to the image signal processing unit side, where the pixel signal obtained from the imaging sensor of the scope is white based on the correction coefficient data. It will be balanced. However, the optical characteristics and the like do not always match between the user-side image signal processing unit and the reference image signal processing unit, and the user-side image signal processing unit uses the white-side image signal processing unit based on the correction coefficient data of each scope. Even if the balance process is performed, the white balance process is not always optimal.
[0010]
Further, the correction coefficient for white balance processing is particularly deeply related to the color temperature characteristics of the light source lamps of the individual image signal processing units. However, the color temperature characteristics of the light source lamps themselves are deteriorated over time. There is also a problem that it changes.
[0011]
In short, in order for proper white balance processing to be performed properly at all times, it is necessary to periodically perform and update correction coefficient settings for white balance processing for individual image signal processing units on the user side.
[0012]
Therefore, another object of the present invention is an electronic endoscope of the type as described above, and it is possible to perform white balance setting as necessary using a histogram extraction circuit used for controlling the aperture opening degree. It is providing the electronic endoscope which became.
[0013]
[Means for Solving the Problems]
An electronic endoscope according to the present invention comprises a scope and an image signal processing unit adapted to be detachably connected to the scope, and includes a light source provided in the image signal processing unit, Light emitted from the light source is guided to the scope to illuminate the front. The electronic endoscope according to the present invention further includes a solid-state imaging unit provided on the distal end side of the scope and a histogram that develops a histogram based on luminance pixel signals for one frame or one field obtained from the solid-state imaging unit. Extraction means and light quantity adjustment means for adjusting the light quantity of light guided from the light source to the scope based on the histogram developed by the histogram extraction means. In the electronic endoscope according to the present invention, the average luminance value is obtained based on the thinned data from all the data of the histogram developed by the histogram extracting means, and the light quantity adjustment by the light quantity adjusting means is performed according to the average luminance value. It is characterized by being.
[0014]
In the preferred embodiment of the present invention, the thinned-out data from all the data of the histogram developed by the histogram extracting means is composed of luminance pixel signals included in every m (integer) luminance levels from the total data.
[0015]
In the preferred embodiment of the present invention, the minimum luminance level and the maximum luminance level of the previous histogram developed by the histogram extraction means are stored, and the minimum luminance is obtained when obtaining the average luminance value based on the next histogram. Decimated data from all data in the extended range including the level and the maximum luminance level is used.
[0016]
Further, in a preferred embodiment of the present invention, the average luminance value and the minimum luminance level and the maximum luminance level at that time are periodically obtained based on all the data of the histogram developed by the histogram extracting means. The light amount adjustment by the light amount adjusting means is performed according to the average luminance value based on all the data of the histogram.
[0017]
Furthermore, in a preferred embodiment of the present invention, the solid-state imaging means outputs a pixel signal of the three primary colors, and the scope stores correction coefficient data for each of the three primary colors specific to itself for white balance processing. A histogram based on the pixel signals for one frame or one field of each of the three primary colors when white balance is set, is developed in the histogram extraction means, and the average value of the corresponding color is obtained from all the histogram data for each color. Then, the correction coefficient data of the other two colors are reset based on the average value of any one of these three primary colors.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Next, an embodiment of an electronic endoscope according to the present invention will be described with reference to the accompanying drawings.
[0019]
Referring to FIG. 1, an embodiment of an electronic endoscope according to the present invention is shown as a block diagram. The electronic endoscope includes a scope 10 made of a flexible conduit, and the scope 10 is detachably connected to an image signal processing unit 12 called a processor. An imaging sensor 14 composed of a solid-state imaging device, for example, a CCD (charge-coupled device) imaging device, is provided at the distal end or distal end of the scope 10. The imaging sensor 14 has an objective lens system combined with the CCD imaging device. Is included.
[0020]
A light guide 16 comprising an optical fiber bundle is inserted into the scope 10, the distal end of the light guide 16 extends to the distal end of the scope 10, and the end surface of the distal end of the light guide 16 is illuminated. Lenses (not shown) are combined. The proximal end of the light guide 16 is optically connected to a white light source 18 such as a xenon lamp or a halogen lamp provided in the image signal processing unit 12 when the scope 10 is connected to the image signal processing unit 12. A diaphragm 20 and a condenser lens 22 are sequentially provided on the light emission side of the white light source 18, and the diaphragm 20 is used as a light amount adjusting means for appropriately adjusting a light amount from the white light source 18, and the condenser lens 22 is a diaphragm. It is used to collect the light having passed through 20 on the end face of the proximal end of the light guide 16.
[0021]
In the present embodiment, since a frame sequential method is employed to reproduce a color image, a rotary RGB color filter is used as a rotary tri-primary color filter between the proximal end face of the light guide 16 and the condenser lens 22. 24 is interposed. As shown in FIG. 2, the rotary RGB color filter 24 is composed of a disk element, and the disk element is provided with a red filter 24R, a green filter 24G, and a blue filter 24B. It is said. The color filters 24R, 24G, and 24B are arranged along the circumferential direction of the disk element so that the respective radial centers are at an angular interval of 120 °, and an area between adjacent color filters is a light shielding area. Is done.
[0022]
As shown in FIG. 3, the rotary three primary color filter 24 is rotated by a drive motor 26 such as a servo motor or a step motor. The rotation frequency of the rotary RGB color filter 24 is determined according to the TV image reproduction method adopted in the electronic endoscope. For example, when the PAL method is adopted, the rotation frequency of the rotary RGB color filter 24 is 25 Hz, and when the NTSC method is adopted, the rotation frequency is 30 Hz.
[0023]
For example, if the rotary RGB color filter 24 is rotated at a rotation frequency of 30 Hz (NTSC method), the time required for one rotation is approximately 33 ms (1/30 sec), and the illumination time by each color filter is approximately 33/6 ms. Become. From the end face of the distal end of the light guide 16, red light, green light and blue light are emitted in sequence for approximately 33 / 6ms every 33ms (1 / 30sec), and the subject is red light, green light and blue light. Thus, illumination is sequentially performed, and optical subject images of the respective colors are sequentially formed on the light receiving surface of the CCD image sensor by the objective lens system of the image sensor 14. The image sensor 14 photoelectrically converts each color optical subject image formed on the light receiving surface of the CCD image sensor into an analog pixel signal for one frame, and the analog pixel signal for one frame of each color is an illumination time of each color. The readout is sequentially performed from the imaging sensor 14 over the next shading time (33/6 ms) following (33/6 ms), and the readout of the analog pixel signal from the imaging sensor 14 is provided in the scope 10. This is performed by the CCD driver 28.
[0024]
Strictly speaking, since the output power of each color from the color filters 24R, 24G, and 24B and the spectral sensitivity characteristics of the CCD image sensor 14 are different, the illumination times of the red light, the green light, and the blue light are slightly different. Although different, the readout of the analog pixel signal for one frame of each color from the CCD image sensor 14 is performed within the light shielding time in the same manner.
[0025]
As can be seen from FIG. 1, the image signal processing unit 12 is provided with a system controller 30, which is constituted by a microcomputer. That is, the system controller 30 is a central processing unit (CPU), a program for executing various routines, a read only memory (ROM) for storing constants, and a write / readable memory (temporarily storing data). RAM) and controls the overall operation of the electronic endoscope.
[0026]
When the scope 10 is connected to the image signal processing unit 12, the imaging sensor 14 is connected to the CCD process circuit 32 in the image signal processing unit 12 via the CCD driver 28. The analog pixel signal for one frame of each color read from the image sensor 14 by the CCD driver 28 is sent to the CCD process circuit 32, where predetermined image processing such as white balance correction processing, gamma correction processing, contour enhancement processing, etc. is performed. receive. In FIG. 1, the connection relationship between the CCD driver 28 and the CCD process circuit 32 and the system controller 30 is not particularly shown in order to avoid complication, but the pixel signal readout by the CCD driver 28 and the CCD process are not shown. Image processing in the circuit 32 is performed under the control of the system controller 30.
[0027]
The analog pixel signal for one frame of each color processed by the CCD process circuit 32 is sequentially sent to an analog / digital converter 34 where it is converted into a digital pixel signal, and then the digital pixel signal for one frame of each color is converted into a frame memory. 36 is temporarily written and stored. The frame memory 36 is provided with three storage areas for storing digital pixel signals for one frame of each color. From the frame memory 36, digital image signals of three primary colors for one frame are sequentially read out simultaneously. At this time, a horizontal synchronization signal, a vertical synchronization signal, and the like are added to the read digital image signal of each color. That is, digital image signals of three primary colors for one frame are sequentially output from the frame memory 36 as color digital video signals (R, G, B) and sent to the video process circuit 38.
[0028]
The video process circuit 38 is provided with a digital / analog (D / A) and low-pass filter corresponding to the color digital video signal of each color, and the color digital video signal for one frame of each color is color analog video for one frame. The signal is converted into a signal, and then, after passing through a low-pass filter, is appropriately amplified and sent to the color TV monitor device 40, where an optical subject image is reproduced as a color image. The video process circuit 38 generates a component video signal based on the color digital video signals (R, G, B), and the component video signal is a separate TV monitor device, video tape recorder, image processing computer, or the like. Are output from the video process circuit 38 to the outside.
[0029]
Referring to FIG. 4, the diaphragm 20 is illustrated along with its drive mechanism. The diaphragm 20 includes a pair of blade elements 42 and 44, and arm portions 42 </ b> A and 44 </ b> A extend integrally from the blade elements 42 and 44. The blade elements 42 and 44 are pivotally supported by a pivot pin 46 in such a manner that they intersect with each other, and the amount of white light emitted from the white light source 18 is appropriately determined according to the opening degree of the blade elements 42 and 44. Adjusted. The drive mechanism of the diaphragm 20 includes a tension coil spring 48 that is acted between the tips of the arm portions 42A and 44A. The coil spring 48 allows the blade elements 42 and 44 to be elastic so as to reduce the opening thereof. Always receive bias. The pivot pin 46 is appropriately held with respect to the housing of the image signal processing unit 12.
[0030]
The drive mechanism of the diaphragm 20 further includes a cam pin 50 engaged between the arm portions 42A and 44A in order to adjust the opening degree of the pair of blade elements 42 and 44. The cam pin 50 is a lower end portion of the drive plate 52. It is fixed and held on. A rack 54 is formed on one side of the drive plate 52, and a pinion 56 is engaged with the rack 54. The pinion 56 is fixed on an output shaft 58A of an appropriate drive motor 58 such as a servo motor or a step motor. The drive motor 58 is appropriately held with respect to the casing of the image signal processing unit 12, and the rack 54 is appropriately slidably held by appropriate guide means (not shown). When the drive motor 58 is rotated, the cam pin 50 moves up and down together with the drive plate 52, thereby adjusting the opening degree of the blade elements 42 and 44. As shown in FIG. 1, the drive motor 58 is driven by a drive circuit 60, and the drive circuit 60 is controlled by the system controller 30.
[0031]
As shown in FIG. 1, the image signal processing unit 12 is provided with a lamp power circuit 62, and power is supplied to the white light source 18 by the lamp power circuit 62. The lamp power supply circuit 62 is connected to a commercial power supply via a plug (not shown) and is appropriately controlled by the system controller 30.
[0032]
As shown in FIG. 1, the image signal processing unit 12 is provided with a histogram extraction circuit 64. The histogram extraction circuit 64 is one of the frame memory 36 and the video process circuit 38 via a switch (SW) circuit 66. To be selectively connected. The switching of the switch circuit 66 is controlled by the system controller 30, and the histogram extraction circuit 64 is normally connected to the video process circuit 38, so that the luminance pixel signal among the component video signals is output to the histogram extraction circuit 64. It has become. When the histogram extraction circuit 64 is connected to the frame memory 36 by the switch circuit 66, digital image signals of three primary colors for one frame are input to the histogram extraction circuit 64.
[0033]
As shown in FIG. 1, the image signal processing unit 12 is further provided with a character processing circuit 68. The character processing circuit 68 includes a video RAM. Fixed character code information data read from the ROM of the system controller 30 and variable character code information data input from a keyboard (not shown) are temporarily written in predetermined addresses of the video RAM of the character processing circuit 68. The character processing circuit 68 generates a character pattern signal based on the character code information data written in the video RAM, and the character pattern signal is output to the video process circuit and added to the color video signal. Character information is displayed on the device 40 together with a reproduction image of the optical subject image.
[0034]
The character information as described above includes variable character information such as a patient name, examination date and time, medical examination reviews, and fixed character information related to a reproduction color image. Character information particularly related to the present invention includes two fixed character information. For example, there are two messages such as “white balance can be set” and “white balance has been set”. These messages, i.e., fixed character information, are stored in advance in the ROM of the system controller 30 as code data, as described above, and the code data is read from the ROM of the system controller 30 as necessary, and the video RAM of the character processing circuit 68. Is written to. The meaning of the two messages described above will be clarified in the description below.
[0035]
As shown in FIG. 1, a suitable nonvolatile memory such as a rewritable read only memory (EEPROM) 70 is provided on the scope 10 side, and various information of the scope 10 itself is written in the EEPROM 70. For example, the EEPROM 70 stores pixel number data of the CCD image sensor 14, frequency information of a clock pulse when processing an analog image signal read out by the CCD driver 28, and the like, and information particularly related to the present invention. As the data, correction coefficient data G used when white balance processing is performed on the analog pixel signals of the three primary colors. GAIN , B GAIN And R GAIN Is mentioned. When the scope 10 is connected to the image signal processing unit 12, the EEPROM 70 is connected to the system controller 30. At this time, the system controller 30 reads information data in the EEPROM 70 and stores the information data in the RAM in the system controller 30. Retained.
[0036]
The white balance correction process performed by the CCD process circuit 32 is performed by the correction coefficient data G described above. GAIN , B GAIN And R GAIN However, the correction coefficient data G GAIN , B GAIN And R GAIN As mentioned earlier, it is not always optimal.
[0037]
The image signal processing unit 12 is provided with an operation panel 72. The operation panel 72 is provided with various indicator lamps and various switches. In FIG. 1, as switches particularly relevant to the present invention, a power switch (SW) for switching on / off a main power source (not shown) of the image signal processing unit 12 and a lighting switch (SW) for controlling lighting of the light source lamp 18. Reference numerals 74, 76, and 78 denote a mode selector switch (SW) for switching between a normal operation mode and a white balance setting mode of the electronic endoscope and a white balance setting switch (SW) for setting a white balance correction coefficient, respectively. And 80.
[0038]
The switch circuit 66 described above is switched by mode selection by the mode switch 78, and when the normal operation mode is selected by the mode switch 78, the histogram extraction circuit 64 is connected to the video process circuit 38 by the switch circuit 66. When the white balance setting mode is selected by the mode switch 78, the histogram extraction circuit 64 is connected to the frame memory 36 by the switch circuit 66.
[0039]
Referring to FIG. 5, there is illustrated a histogram created by the histogram extraction circuit 64 based on a digital luminance pixel signal for one frame obtained from the video process circuit 38. As shown in FIG. 5, in this embodiment, the histogram extraction circuit 64 distributes the digital luminance pixel signal for one frame into 256 luminance levels. In short, in the histogram shown in FIG. 5, 256 luminance levels are shown along the horizontal axis X, and the vertical axis Y shows the number of digital luminance pixel signals corresponding to each luminance level, that is, the frequency. The luminance level 0 corresponds to the pedestal level, and the luminance level 255 corresponds to the maximum luminance level. In the example shown in FIG. 5, the luminance pixel signal for one frame obtained from the video process circuit 38 includes luminance pixel signals having luminances corresponding to luminance levels 0 to 4 and luminance levels 252 to 255. Absent.
[0040]
Referring to FIGS. 6 and 7, a flowchart of an automatic dimming routine executed by the system controller 30 is shown. This automatic light control routine functions as a subroutine of the main operation routine of the electronic endoscope. For example, when the NTSC system is adopted as the video reproduction system in the electronic endoscope, every 1/30 sec. The interrupt routine to be executed. The execution of the automatic light control routine is started when the power switch 74 on the operation panel 72 is turned on.
[0041]
In step 601, it is determined whether or not the counter N is “0”. Since N = 0 at the initial stage, the process proceeds to step 602, where the average luminance value AI is calculated based on all the data (0 ≦ X ≦ 255) of the first histogram developed by the histogram extraction circuit 64. . That is, the luminance value corresponding to each of the luminance levels 0 to 255 is set to L. 0 Or L 255 And the frequency (number) of luminance pixel signals assigned to each of the luminance levels 0 to 255 is S 0 Or S 255 The average luminance value AI is calculated by the following equation.
[0042]
[Expression 1]
Figure 0004246320
That is, TP is the total number of luminance pixel signals for one frame.
[0043]
In step 603, the drive motor 58 is driven to rotate by the drive circuit 60 in order to give the diaphragm 20 the diaphragm opening corresponding to the calculated average luminance value AI. Next, in step 604, the minimum luminance level L is calculated from the first histogram. MIN And the maximum luminance level L MAX Is obtained and stored in the RAM of the system controller 30. FIG. 8 shows an example of the first histogram. As is clear from this example, the minimum luminance level L MIN There is no luminance pixel signal corresponding to a lower luminance level and the maximum luminance level L MAX There is no luminance pixel signal corresponding to a luminance level exceeding.
[0044]
In step 605, the count number of the counter N is incremented by “1”, and then in step 606, it is determined whether or not the count number of the counter N is equal to 7. At this stage, since N is 7 or less, that is, N = 1, this routine is temporarily terminated.
[0045]
This routine is executed again after 1/30 sec. At this time, it is assumed that the second histogram as shown in FIG. At this stage, since N = 1, the process proceeds from step 601 to step 607, where the first minimum luminance level L MIN Is determined as to whether the brightness level is 8 or more. If L MIN If ≧ 8, proceed to step 608 where the first maximum luminance level L MAX Is determined to be less than or equal to the luminance level 247. If L MAX If ≦ 247, the process proceeds to step 609.
[0046]
In step 609, a specific range of the second histogram, that is, the minimum luminance level L of the first histogram. MIN And maximum brightness level L MAX The average luminance level AI is determined based on the data thinned out from every other data in the range extended by 8 luminance levels on both sides of the range between the two (the range indicated by the dashed arrow in FIG. 9). Calculated. That is, the average luminance level AI is calculated by the following formula.
[0047]
[Expression 2]
Figure 0004246320
[X] is a Gaussian symbol and represents the maximum integer not exceeding x.
[0048]
In short, the histograms of the luminance pixel signals of two consecutive frames, ie, the first histogram (FIG. 8) and the second histogram (FIG. 9) are generally likely to be similar to each other. (Because there is little movement of the scope when observing the affected area with the scope 10), the previous minimum luminance level L MIN And maximum brightness level L MAX Is expanded by 3 to 5% of the histogram definition area (0 ≦ X ≦ 255) on each boundary side (8 luminance levels in this embodiment), the second range is included in the expanded range. It can be assumed that the entity part of the th histogram can be included. Therefore, the calculation range when calculating the average luminance level AI for the second histogram is L MIN −8 ≦ X ≦ L MAX Since the calculation is based on thinned data every other time, the calculation time of the average luminance level AI can be greatly shortened.
[0049]
When the average luminance level AI of the second histogram is calculated in step 609, the process proceeds from step 609 to step 603, where the drive motor 58 is driven so as to give the diaphragm 20 the aperture opening corresponding to the average luminance value AI. The circuit 60 is rotationally driven. Next, in step 604, the minimum luminance level L is calculated from the second histogram. MIN And the maximum luminance level L MAX Is obtained and stored in the RAM of the system controller 30.
[0050]
In step 605, the count number of the counter N is incremented by “1”, and then in step 606, it is determined whether or not the count number of the counter N is equal to 7. Even at the present stage, since N is 7 or less, that is, N = 2, this routine is temporarily terminated.
[0051]
Step 607 if L MIN If <8, that is, if the first histogram is as shown in FIG. 10, the process proceeds from step 607 to step 610, where the first maximum luminance level L MAX Is determined to be less than or equal to the luminance level 247. If L MAX If ≦ 247, the process proceeds to step 611. For the same reason as described above, if the first histogram is as shown in FIG. 10, it is assumed that the second histogram is similar to that shown in FIG. obtain.
[0052]
In step 611, a specific range of the second histogram shown in FIG. 11, that is, the minimum luminance level L of the first histogram. MIN And maximum brightness level L MAX Minimum brightness level L than the range between MIN Extended to the brightness level 0 and the maximum brightness level L MAX On the other hand, the average luminance level AI is calculated based on data thinned out from every other data in a range expanded by eight luminance levels (range indicated by broken line arrows in FIG. 11). That is, the average luminance level AI is calculated by the following formula.
[0053]
[Equation 3]
Figure 0004246320
[0054]
As in the case described above, the calculation range when calculating the average luminance level AI for the second histogram is 0 ≦ X ≦ L MAX Since the calculation is based on thinned data every other time, the calculation time of the average luminance level AI can be greatly shortened.
[0055]
When the average luminance level AI of the second histogram is calculated in step 611, the process proceeds from step 611 to step 603, where the drive motor 58 is driven so as to give the diaphragm 20 the aperture opening corresponding to the average luminance value AI. The circuit 60 is rotationally driven. Next, in step 604, the minimum luminance level L is calculated from the second histogram. MIN And the maximum luminance level L MAX Is obtained and stored in the RAM of the system controller 30.
[0056]
In step 605, the count number of the counter N is incremented by “1”, and then in step 606, it is determined whether or not the count number of the counter N is equal to 7. At this stage, since N = 2, this routine is temporarily terminated.
[0057]
Step 608 if L MAX If> 247, that is, if the first histogram is as shown in FIG. 12, the process proceeds from step 608 to step 612. For the same reason as described above, if the first histogram is as shown in FIG. 12, it is assumed that the second histogram is similar to that, that is, as shown in FIG. obtain.
[0058]
In step 612, a specific range of the second histogram shown in FIG. 13, that is, the minimum luminance level L of the first histogram. MIN And maximum brightness level L MAX Minimum brightness level L than the range between MIN Is expanded by 8 brightness levels on the side and the maximum brightness level L MAX On the other hand, the average luminance level AI is calculated based on data thinned out from every other data in the range extended to the luminance level 255 (the range indicated by the dashed arrow in FIG. 13). That is, the average luminance level AI is calculated by the following formula.
[0059]
[Expression 4]
Figure 0004246320
[0060]
As in the case described above, the calculation range when calculating the average luminance level AI for the second histogram is L MIN Since the calculation is narrowed to −8 ≦ X ≦ 255 and the calculation is based on every other thinning data, the calculation time of the average luminance level AI can be greatly shortened.
[0061]
When the average luminance level AI of the second histogram is calculated in step 612, the process proceeds from step 612 to step 603, where the drive motor 58 is driven so as to give the aperture 20 the aperture opening corresponding to the average luminance value AI. The circuit 60 is rotationally driven. Next, in step 604, the minimum luminance level L is calculated from the second histogram. MIN And the maximum luminance level L MAX Is obtained and stored in the RAM of the system controller 30.
[0062]
In step 605, the count number of the counter N is incremented by “1”, and then in step 606, it is determined whether or not the count number of the counter N is equal to 7. At this stage, since N = 2, this routine is temporarily terminated.
[0063]
Step 610 If L MAX If> 247, that is, if the first histogram is as shown in FIG. 14, the process proceeds from step 610 to step 613. For the same reason as described above, if the first histogram is as shown in FIG. 14, it is assumed that the second histogram is similar to that shown in FIG. obtain.
[0064]
In step 613, every other data is thinned out from all the data in the entire domain of the second histogram shown in FIG. 15 (the range indicated by the broken arrow in FIG. 15, ie, 0 ≦ X ≦ 255). Based on this, an average luminance level AI is calculated. That is, the average luminance level AI is calculated by the following formula.
[0065]
[Equation 5]
Figure 0004246320
[0066]
In this case, the calculation range for calculating the average luminance level AI for the second histogram is the entire definition area (0 ≦ X ≦ 255), but the calculation is based on thinned data every other one. Therefore, the calculation time of the average luminance level AI can be greatly shortened.
[0067]
When the average brightness level AI of the second histogram is calculated in step 613, the process proceeds from step 613 to step 603, where the drive motor 58 is driven so as to give the aperture 20 the aperture corresponding to the average brightness value AI. The circuit 60 is rotationally driven. Next, in step 604, the minimum luminance level L is calculated from the second histogram. MIN And the maximum luminance level L MAX Is obtained and stored in the RAM of the system controller 30.
[0068]
In step 605, the count number of the counter N is incremented by “1”, and then in step 606, it is determined whether or not the count number of the counter N is equal to 7. At this stage, since N = 2, this routine is temporarily terminated.
[0069]
Subsequently, the average luminance AI of the third to eighth histograms is calculated in any of the above-described manners (steps 609, 611, 612, and 613), and the opening degree of the diaphragm 20 is accordingly changed. Adjust as appropriate. After adjusting the opening degree of the diaphragm 20 based on the average luminance AI obtained from the eighth histogram, the count number of the counter N reaches 7 (step 605). Accordingly, the process proceeds from step 606 to step 614, where the counter N is reset, and this routine is temporarily terminated.
[0070]
This routine is executed again after 1/30 sec. However, since N = 0 at this time, the routine proceeds to step 602 and all the data (0 ≦ 0) of the ninth histogram developed by the histogram extraction circuit 64 is reached. The average luminance value AI is calculated based on X ≦ 255), and the arithmetic expression used at this time is the above-described Expression 1.
[0071]
At this time, the minimum luminance level and the maximum luminance level after reading all the data of the histogram are obtained. Therefore, for example, even when the brightness of the endoscopic image suddenly changes due to the movement of the scope 10 and the range where the image data exists is suddenly different, or when the range where the image data exists is widened or narrowed, Since all data of the histogram (0 ≦ X ≦ 255) is used for calculating the average luminance value AI every eighth time, an appropriate average luminance value can be obtained, and thus the opening of the diaphragm 20 can be adjusted appropriately.
[0072]
Referring to FIGS. 16 to 18, a flowchart of a white balance setting routine executed by the system controller 30 is shown. This white balance setting routine also functions as a subroutine of the main operation routine of the electronic endoscope. For example, when the NTSC system is adopted as the video reproduction system in the electronic endoscope, every 1/30 sec. The interrupt routine to be executed. The execution of the white balance setting routine is performed by selecting the white balance setting mode with the mode switch 78 after the power switch 74 is turned on.
[0073]
Regarding the setting of white balance, for example, when the electronic endoscope according to the present invention is newly delivered to a medical institution such as a hospital together with a plurality of scopes (10), the electronic endoscope according to the present invention is delivered. This is performed when a new scope is added later, or when white balance correction coefficient data is reset for a scope that has already been used.
[0074]
In steps 1601 to 1604, it is sequentially determined whether or not the flags F1, F2, F3, and F4 are “0”. Since F1, F2, F3, and F4 = 0 in the initial stage, the process proceeds to step 1605, where the connection of the switch circuit 66 is switched to the frame memory 36 side. Accordingly, the histogram extraction circuit 64 is connected to the frame memory 36 via the switch circuit 66.
[0075]
In step 1606, it is determined whether or not the light source lamp 18 is turned on by turning on the lighting switch 76. When the light source lamp 18 is not lit, this routine is temporarily terminated. After 1/30 sec, this routine is executed again, but there is no progress unless the light source lamp 18 is turned on.
[0076]
When the lighting of the light source lamp 18 is confirmed in step 1606, the process proceeds to step 1607, where it is determined whether or not a predetermined time has elapsed after the light source lamp 18 is turned on. Execution of this routine is repeated every 1/30 sec, but no progress is made until a predetermined time has elapsed. In other words, the light source lamp 18 is in a standby state until the light emission state is stabilized. When the light emission state of the light source lamp 18 is stabilized after a predetermined time has passed, the process proceeds to step 1608, where a message indicating that white balance can be set, for example, a message such as “white balance can be set” is displayed on the TV. It is displayed on the monitor device 40. The message is displayed by reading out the fixed character information code data stored in advance in the ROM of the system controller 30, writing it into the video RAM of the character processing circuit 68, and outputting it to the video process circuit 38 as a character pattern signal. As mentioned above.
[0077]
In step 1609, it is determined whether or not the scope (10) targeted for white balance setting is connected to the image signal processing unit 12. When the scope is not connected, the routine proceeds to step 1610, where the flag F4 is rewritten from “0” to “1”, and then this routine is once ended. This routine is executed again after 1/30 sec. However, since F4 = 1 at this time, steps 1605 to 1608 are skipped. Thereafter, the execution of this routine is repeated every 1/30 sec. However, there is no progress unless the scope is connected to the image signal processing unit 12.
[0078]
If the connection of the scope is confirmed in step 1609, the process proceeds from step 1609 to step 1611, where the correction coefficient data G is read from the EEPROM 70 of the scope. GAIN , B GAIN And R GAIN Are read and these correction coefficient data are stored in the RAM of the system controller 30. Next, in step 1612, the flag F3 is rewritten from “0” to “1”, and then in step 1613, it is determined whether or not the white balance setting switch 80 is turned on. The white balance setting switch 80 is turned on by manual operation of the operator after completion of white balance setting preparation.
[0079]
Here, the white balance setting preparation will be briefly described. When white balance is set, an enclosure having a reference white color is used. That is, a predetermined reference white color is applied to the inner side wall of the enclosure, and the preparation of white balance is completed by inserting the tip of the scope (10) into the enclosure. Note that white balance setting itself in an electronic endoscope is well known.
[0080]
If it is confirmed in step 1613 that the white balance setting switch 80 is turned on, the process proceeds to step 1614, where the green color developed by the histogram extraction circuit 64 based on the green pixel signal for one frame read from the image sensor 14. The average value AG of the green pixel signal is calculated from all the data of the histogram (G) based on the following formula.
[0081]
[Formula 6]
Figure 0004246320
Where GL n Indicates 256 green levels for the green pixel signal for one frame, and GS n Indicates the number of green pixel signals having a value corresponding to each green level, that is, the number of green pixel signals, and TP indicates the total number of green pixel signals for one frame as in the case of Equation 1 described above. The green pixel signal for one frame is the correction coefficient data G obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0082]
In step 1615, the average value AB of the blue pixel signals is calculated from the total data of the blue histogram (B) developed by the histogram extraction circuit 64 based on the blue pixel signal for one frame read from the image sensor 14 as follows. Calculated based on mathematical formula.
[0083]
[Expression 7]
Figure 0004246320
Where BL n Indicates 256 blue levels for one frame of blue pixel signal, and BS n Indicates the frequency, that is, the number of blue pixel signals having a value corresponding to each blue level, and TP indicates the total number of blue pixel signals for one frame in the same manner as described above. The blue pixel signal for one frame is the correction coefficient data B obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0084]
In step 1616, a difference ΔGB between the average value AG and the average value AB is calculated. Next, at step 1617, it is determined whether or not the difference ΔGB exceeds a predetermined allowable value PV. When the difference ΔGB exceeds the allowable value PV, the routine proceeds to step 1618, where it is determined whether or not the average value AB is larger than the average value AG. If AB> AG, the process proceeds to step 1619, where correction coefficient data B GAIN Is decreased by a predetermined value, and this routine is terminated once. On the other hand, if AB <AG, the process proceeds to step 1620, where correction coefficient data B GAIN Is increased by a predetermined value, and this routine is once terminated.
[0085]
When this routine is executed again in the next interrupt process, after steps 1601 and 1602, the steps 1603 to 1613 are immediately skipped (F3 = 1). At this time, the white balance setting switch 80 is already turned on. Therefore, the process proceeds to step 1614, where the average value AG of the green pixel signal is calculated from the green histogram (G) developed by the histogram extraction circuit 64 again based on the above-described equation (6). At this time, the green histogram is based on the green pixel signal for one frame read next to the green pixel signal for the previous frame read from the image sensor 14, and the latter one frame. Minute green pixel signal is the correction coefficient data G obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0086]
Subsequently, also in step 1615, the average value AB of the blue pixel signal is calculated based on the above-described equation 7 from the blue histogram (B) developed again by the histogram extraction circuit 64. At this time, the blue histogram is based on the blue pixel signal for one frame read next to the blue pixel signal for the previous frame read from the image sensor 14, and the latter one frame. The blue pixel signal of the minute is corrected coefficient data B which has been decreased or increased by a predetermined value in step 1619 or step 1620 at the previous execution of this routine. GAIN Is white balance processed.
[0087]
In step 1616, the difference ΔGB between the average value AG and the average value AB is calculated again, but the difference ΔGB is smaller than the previous time. This is because the correction coefficient data B in which the white balance processing of the blue pixel signal for one frame this time is decreased or increased by a predetermined value in step 1619 or step 1620 at the previous execution of this routine. GAIN It is because it is performed based on. Next, in step 1617, it is determined again whether or not the difference ΔGB exceeds a predetermined allowable value PV. When the difference ΔGB still exceeds the allowable value PV, the routine proceeds to step 1618, where it is determined again whether or not the average value AB is larger than the average value AG. If AB> AG at this time, step 1619 is reached. Then, correction coefficient data B GAIN Is further decreased by a predetermined value, and if AB <AG, the process proceeds to step 1620, where correction coefficient data B GAIN Is further increased by a predetermined value. In short, correction coefficient data G GAIN As a reference, the routine described above is repeated until the difference ΔGB falls within the predetermined allowable value PV.
[0088]
When the difference ΔGB falls within the predetermined allowable value PV in step 1617, the process proceeds from step 1617 to step 1621, where the flag F2 is rewritten from “0” to “1”. Next, in step 1622, the average value AG of the green pixel signals is obtained from all the data of the green histogram (G) developed by the histogram extraction circuit 64 based on the green pixel signal for one frame read from the image sensor 14. It is calculated based on the above formula 6. As in the case described above, the green pixel signal for one frame is the correction coefficient data G obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0089]
In step 1623, the average value AR of the red pixel signal is calculated from all the data of the red histogram (R) developed by the histogram extraction circuit 64 based on the red pixel signal for one frame read from the image sensor 14 as follows. Calculated based on mathematical formula.
[0090]
[Equation 8]
Figure 0004246320
Where RL n Indicates 256 red luminance levels for one frame of red pixel signal, and RS n Indicates the frequency or number of red pixel signals having a value corresponding to each red level, and TP indicates the total number of red pixel signals for one frame as in the case described above. The red pixel signal for one frame is the correction coefficient data R obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0091]
In step 1624, a difference ΔGR between the average value AG and the average value AR is calculated. Next, at step 1625, it is determined whether or not the difference ΔGR exceeds a predetermined allowable value PV. When the difference ΔGR exceeds the allowable value PV, the routine proceeds to step 1626, where it is determined whether or not the average value AR is larger than the average value AG. If AR> AG, the process proceeds to step 1627, where the correction coefficient data R GAIN Is decreased by a predetermined value, and this routine is terminated once. On the other hand, if AR <AG, the process proceeds to step 1628 where the correction coefficient data R GAIN Is increased by a predetermined value, and this routine is once terminated.
[0092]
When this routine is executed again in the next interrupt process, after step 1601, step 1602 to step 1622 are immediately skipped (F2 = 1), and the green histogram (G) developed by the histogram extraction circuit 64 there again. From the above, the average value AG of the green pixel signal is calculated based on Equation 6 described above. At this time, the green histogram is based on the green pixel signal for one frame read next to the green pixel signal for the previous frame read from the image sensor 14, and the latter one frame. Minute green pixel signal is the correction coefficient data G obtained from the EEPROM 70 of the scope. GAIN Is white balance processed.
[0093]
Subsequently, also in step 1623, the average value AR of the red pixel signal is calculated from the red histogram (R) developed again by the histogram extraction circuit 64 based on the above-described Expression 8. At this time, the red histogram is based on the red pixel signal for one frame read out next to the red pixel signal for one frame read out from the imaging sensor 14, and the latter one frame. Minute red pixel signal is corrected coefficient data R decreased or increased by a predetermined value in step 1627 or step 1628 at the previous execution of this routine. GAIN Is white balance processed.
[0094]
In step 1624, the difference ΔGR between the average value AG and the average value AR is calculated again, but the difference ΔGR is smaller than the previous time. This is because the correction coefficient data R in which the white balance processing of the red pixel signal for one frame this time is decreased or increased by a predetermined value in step 1627 or step 1628 during the previous execution of this routine. GAIN It is because it is performed based on. Next, in step 1625, it is determined again whether or not the difference ΔGR exceeds a predetermined allowable value PV. When the difference ΔGR still exceeds the allowable value PV, the routine proceeds to step 1626, where it is determined again whether or not the average value AR is larger than the average value AG. If AR> AG at this time, step 1627 is reached. To the correction coefficient data R GAIN Is further reduced by a predetermined value, and if AR <AG, the process proceeds to step 1628 where the correction coefficient data R GAIN Is further increased by a predetermined value. In short, correction coefficient data G GAIN As a reference, the routine described above is repeated until the difference ΔGR falls within the predetermined allowable value PV.
[0095]
When the difference ΔGR falls within the predetermined allowable value PV in step 1625, the process proceeds from step 1625 to step 1629, where a message indicating that the white balance setting is completed, for example, a message such as “white balance setting is complete”. Is displayed on the TV monitor device 40. The message is displayed by reading out fixed character information code data stored in advance in the ROM of the system controller 30, writing it in the video RAM of the character processing circuit 68, and outputting it to the video process circuit 38 as a character pattern signal. As mentioned above.
[0096]
In step 1630, correction coefficient data G GAIN , B GAIN And R GAIN Is written in the EEPROM 70 of the scope (10). At this time, the correction coefficient data G GAIN Is not changed, correction coefficient data B GAIN And R GAIN Only the EEPROM 70 may be written. Next, in step 1631, it is determined whether or not the scope (10), that is, the scope for which the white balance has been set or reset, has been detached from the image signal processing unit 12. When the scope (10) is not detached, the process proceeds to step 1632 where the flag F1 is rewritten from “0” to “1”. Thereafter, this routine is executed every 1/30 sec. However, there is no progress until the scope (10) is detached. When it is confirmed in step 1631 that the scope (10) has been detached, the process proceeds to step 1633, where the flag F1, the flag F2, and the flag F3 are each rewritten from “1” to “0”, and this routine is once completed.
[0097]
Thereafter, in step 1609, it is monitored whether another scope, that is, a scope to be set or reset, is connected to the image signal processing unit 12, and if such a scope is connected, The routine described in is repeated again. Note that when the mode changeover switch 78 is changed over to select the normal operation mode, this routine ends.
[0098]
In the embodiment described above, the electronic endoscope is assumed to adopt the frame sequential color method, but the electronic endoscope adopting the color simultaneous method, that is, the fine three primary color filter elements are arranged in a mosaic pattern. It should be understood that the same automatic light control and white balance setting can be performed for an electronic endoscope in which the color filter array is applied to the light receiving surface of the solid-state imaging device. Further, in the above description, for the white balance processing, correction coefficient data for the three primary colors is set from the data of each of the three primary colors (R, G, B). In order to obtain data, color difference signal data may be used instead of color data.
[0099]
In the above-described embodiment, the creation of the histogram is based on the pixel signal for one frame. However, the histogram may be created based on the pixel signal for one field.
[0100]
【The invention's effect】
As is apparent from the above description, in the electronic endoscope according to the present invention, when controlling the aperture opening degree based on the histogram developed by the histogram extraction circuit for the luminance pixel signal for one frame, the histogram Since the average brightness value is calculated from the thinned-out data, and the aperture is controlled based on the average brightness value to perform automatic dimming, the responsiveness of the automatic dimming control is improved and the brightness of the reproduced image is optimized. It becomes possible to perform the conversion quickly. In the electronic endoscope according to the present invention, the white balance can be appropriately set by using a histogram extraction circuit used for controlling the aperture opening. In this case, all the histogram data is not thinned out. Since data is used, it is possible to always perform appropriate white balance processing on pixel signals obtained from individual scopes, and to maintain the color reproducibility of endoscopic images by electronic endoscopes with high quality. it can.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram of an electronic endoscope according to the present invention.
FIG. 2 is a front view of the rotary RGB color filter shown in FIG.
FIG. 3 is a side view showing the rotary RGB color filter shown in FIG. 1 together with its drive motor.
4 is a schematic front view showing the diaphragm shown in FIG. 1 together with its drive mechanism. FIG.
FIG. 5 is a graph conceptually showing an example of a histogram developed by the histogram extraction circuit shown in FIG. 1;
6 is a part of a flowchart for explaining an automatic light control routine executed by the system controller of FIG. 1; FIG.
7 is a remaining portion of a flowchart for explaining an automatic light control routine executed by the system controller of FIG. 1; FIG.
8 is a graph conceptually showing an example of a histogram obtained from a luminance pixel signal for one frame, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
9 is a graph showing a histogram related to the histogram of FIG. 8, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
10 is a graph conceptually showing another example of a histogram obtained from a luminance pixel signal for one frame, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
11 is a graph showing a histogram related to the histogram of FIG. 10, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
12 is a graph conceptually showing still another example of a histogram obtained from a luminance pixel signal for one frame, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
13 is a graph showing a histogram related to the histogram of FIG. 12, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
14 is a graph conceptually showing still another example of a histogram obtained from a luminance pixel signal for one frame, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
15 is a graph showing a histogram related to the histogram of FIG. 14, and is an explanatory diagram for explaining the automatic light control routine of FIGS. 6 and 7. FIG.
FIG. 16 is a part of a flowchart for explaining a white balance setting routine executed by the system controller of FIG. 1;
FIG. 17 is another part of the flowchart for explaining the white balance setting routine executed by the system controller of FIG. 1;
FIG. 18 is the remaining part of the flowchart for explaining the white balance setting routine executed by the system controller of FIG. 1;
[Explanation of symbols]
10 Scope
12 Image signal processing unit
14 Imaging sensor
16 Light guide
18 White light source
20 aperture
22 Condensing lens
24 Rotating RGB color filter
28 CCD driver
30 System controller
32 CCD process circuit
34 Analog / digital (A / D) converter
36 frame memory
38 Video process circuit
40 TV monitor device
64 Histogram extraction circuit
66 Switch circuit
70 EEPROM
74 Power switch
76 Light switch
78 Mode selector switch
80 White balance setting switch

Claims (4)

スコープと、このスコープを着脱自在に接続させるようになった画像信号処理ユニットとから成る電子内視鏡であって、
前記画像信号処理ユニット内に設けられた光源を具備し、この光源からの射出光が前記スコープに導かれてその前方を照明するようになっており、更に、前記スコープの先端側に設けられた固体撮像手段と、この固体撮像手段から得られる一フレーム分もしくは一フィールド分の輝度画素信号に基づいてヒストグラムを展開するヒストグラム抽出手段と、このヒストグラム抽出手段で展開されたヒストグラムに基づいて前記光源から前記スコープに導かれる光の光量を調節する光量調節手段とを具備して成る電子内視鏡において、
前記ヒストグラム抽出手段で展開されたヒストグラムの全データからの間引きデータに基づいて平均輝度値が求められ、この平均輝度値に応じて前記光量調節手段による光量調節が行われ
前記ヒストグラム抽出手段で展開された前回のヒストグラムの最小輝度レベル及び最大輝度レベルを記憶し、前記最小輝度レベル及び最大輝度レベルをヒストグラム定義域の3から5%各々拡張して得られる拡張範囲の全データからの間引きデータが次回のヒストグラムに基づいて平均輝度値を求める際に利用されることを特徴とする電子内視鏡。
An electronic endoscope comprising a scope and an image signal processing unit adapted to be detachably connected to the scope,
A light source provided in the image signal processing unit is provided, and light emitted from the light source is guided to the scope to illuminate the front thereof, and further provided on the distal end side of the scope. Solid-state imaging means, histogram extraction means for developing a histogram based on luminance pixel signals for one frame or one field obtained from the solid-state imaging means, and from the light source based on the histogram developed by the histogram extraction means In an electronic endoscope comprising a light amount adjusting means for adjusting the amount of light guided to the scope,
An average luminance value is obtained based on thinned data from all the data of the histogram developed by the histogram extracting means, and the light quantity adjustment by the light quantity adjusting means is performed according to the average luminance value ,
The minimum luminance level and the maximum luminance level of the previous histogram developed by the histogram extraction means are stored, and all the extended ranges obtained by extending the minimum luminance level and the maximum luminance level by 3 to 5% of the histogram definition area, respectively. electronic endoscope thinned-out data from the data and wherein Rukoto be utilized in determining the average luminance value based on the next histogram.
請求項1に記載の電子内視鏡において、前記ヒストグラム抽出手段で展開されたヒストグラムの全データからの間引きデータが該全データからm(整数)個置きの輝度レベルに含まれる輝度画素信号から成ることを特徴とする電子内視鏡。  2. The electronic endoscope according to claim 1, wherein the thinned-out data from all the data of the histogram developed by the histogram extracting means is composed of luminance pixel signals included in every m (integer) luminance levels. An electronic endoscope characterized by that. 請求項1又は2に記載の電子内視鏡において、前記ヒストグラム抽出手段で展開されたヒストグラムの全データに基づいて平均輝度値とそのときの最小輝度レベル及び最大輝度レベルとが定期的に求められ、このヒストグラムの全データに基づく平均輝度値に応じて前記光量調節手段による光量調節が行われることを特徴とする電子内視鏡。 3. The electronic endoscope according to claim 1, wherein an average luminance value and a minimum luminance level and a maximum luminance level at that time are periodically obtained based on all data of the histogram developed by the histogram extracting means. The electronic endoscope is characterized in that the light amount is adjusted by the light amount adjusting means in accordance with an average luminance value based on all the data of the histogram. 請求項1からまでのいずれか1項に記載の電子内視鏡において、前記固体撮像手段が三原色の画素信号を出力し、かつ前記スコープはそれ自身に特有なホワイトバランス処理用の三原色の各色の補正係数データを格納する格納手段を有し、ホワイトバランス設定時に前記三原色のそれぞれの色の一フレーム分もしくは一フィールド分の画素信号に基づくヒストグラムが前記ヒストグラム抽出手段に展開され、各色のヒストグラムの全データから該当色の平均値が求められ、これら三原色のいずれか1つの平均値を基準にしてその他の2つの色の補正係数データが再設定されることを特徴とする電子内視鏡。4. The electronic endoscope according to claim 1, wherein the solid-state imaging unit outputs pixel signals of three primary colors, and the scope has each of the three primary colors for white balance processing unique to itself. 5. And a histogram based on pixel signals for one frame or one field of each of the three primary colors at the time of white balance setting is developed in the histogram extraction means, and the histogram of each color is stored. An electronic endoscope, wherein an average value of a corresponding color is obtained from all data, and correction coefficient data of the other two colors are reset based on an average value of any one of these three primary colors.
JP17420399A 1998-06-22 1999-06-21 Electronic endoscope Expired - Fee Related JP4246320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17420399A JP4246320B2 (en) 1998-06-22 1999-06-21 Electronic endoscope

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP17441798 1998-06-22
JP10-174417 1998-06-22
JP17420399A JP4246320B2 (en) 1998-06-22 1999-06-21 Electronic endoscope

Publications (2)

Publication Number Publication Date
JP2000083190A JP2000083190A (en) 2000-03-21
JP4246320B2 true JP4246320B2 (en) 2009-04-02

Family

ID=26495905

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17420399A Expired - Fee Related JP4246320B2 (en) 1998-06-22 1999-06-21 Electronic endoscope

Country Status (1)

Country Link
JP (1) JP4246320B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4761651B2 (en) * 2000-06-06 2011-08-31 Hoya株式会社 Electronic endoscope device with automatic dimming function to prevent halation
JP2002084441A (en) * 2000-09-06 2002-03-22 Olympus Optical Co Ltd Digital camera, image processing method and recording medium
JP4786813B2 (en) * 2001-04-02 2011-10-05 Hoya株式会社 Electronic endoscope apparatus and electronic endoscope system
JP4648593B2 (en) * 2001-08-29 2011-03-09 Hoya株式会社 Processor for electronic endoscope system
JP4622510B2 (en) * 2004-12-27 2011-02-02 カシオ計算機株式会社 Imaging apparatus, image processing method, and program
JP5132335B2 (en) * 2008-01-29 2013-01-30 富士フイルム株式会社 Capsule endoscope and capsule endoscope system
JP5496398B1 (en) * 2013-08-08 2014-05-21 株式会社 ディー・エヌ・エー Payment apparatus, payment program, and EC server

Also Published As

Publication number Publication date
JP2000083190A (en) 2000-03-21

Similar Documents

Publication Publication Date Title
JP4745790B2 (en) Electronic endoscope device
US20030030722A1 (en) Electronic endoscope system with color-balance alteration process
JP5326065B2 (en) Endoscope device
JP3684067B2 (en) Electronic endoscope system
EP1527729A1 (en) Image processing apparatus
WO2016185763A1 (en) Light-source control device, light-source control method, and imaging system
JP4246320B2 (en) Electronic endoscope
US6414710B1 (en) Electronic endoscope
JP2007215907A (en) Endoscope processor, endoscopic system and black balance adjustment program
JP4349689B2 (en) Electronic endoscope
JP2002112962A (en) Electronic endoscope apparatus
JP4694051B2 (en) Electronic endoscope
JP2003102680A (en) Image processor for endoscope
JP4010816B2 (en) Electronic endoscope device
JP4459506B2 (en) Automatic dimming device for endoscope and electronic endoscope device
JP2002263064A (en) Automatic dimmer for endoscope and processor of electronic endoscope apparatus containing the same
JP3976950B2 (en) Electronic endoscope
JP4648577B2 (en) Electronic endoscope device
JP2002085345A (en) Electronic endoscope
JP2001251613A (en) Endoscope system
JP2003153859A (en) Electronic endoscope
JP2005124755A (en) Image processor for endoscope
JP3927740B2 (en) Switchable electronic endoscope system between normal light illumination and special wavelength light illumination
JPH0644104B2 (en) Endoscopic video system
JP2004121486A (en) Light source equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060501

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080428

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080909

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081107

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090106

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

R150 Certificate of patent or registration of utility model

Ref document number: 4246320

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120116

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140116

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees