JP2004172726A - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP2004172726A
JP2004172726A JP2002333488A JP2002333488A JP2004172726A JP 2004172726 A JP2004172726 A JP 2004172726A JP 2002333488 A JP2002333488 A JP 2002333488A JP 2002333488 A JP2002333488 A JP 2002333488A JP 2004172726 A JP2004172726 A JP 2004172726A
Authority
JP
Japan
Prior art keywords
filter
image data
smoothing
pixel
pixel value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002333488A
Other languages
Japanese (ja)
Other versions
JP4273748B2 (en
Inventor
Shintaro Okada
紳太郎 岡田
Kazuhiko Ueda
和彦 上田
Mitsuyasu Asano
光康 浅野
Kazuki Yokoyama
一樹 横山
Takeshi Kubozono
猛 窪園
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2002333488A priority Critical patent/JP4273748B2/en
Publication of JP2004172726A publication Critical patent/JP2004172726A/en
Application granted granted Critical
Publication of JP4273748B2 publication Critical patent/JP4273748B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide technology capable of suppressing a computing amount even when parts other than an edge are smoothed while keeping the edge in which a change in the pixel value is steep. <P>SOLUTION: A nonlinear smoothing unit 22 is provided with ε filters 53A to 53C connected in cascade. The ε filters are set from the pre-stage ε filter 53A toward the post-stage ε filter 53C in a way of being formed from a narrow band filter with many numbers of taps to a broad band filter with a few numbers of taps. In this case, the interval of the number of taps from the ε filter 53A to the ε filter 53C is set to the power of two. Threshold values ε<SB>1</SB>, ε<SB>2</SB>, ε<SB>3</SB>of the ε filter 53A to the ε filter 53C are set to be a relation of ε<SB>1</SB><ε<SB>2</SB><ε<SB>3</SB>. The image processing apparatus and method is applicable to video cameras. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置および方法に関し、特に、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができるようにした画像処理装置および方法に関する。
【0002】
【従来の技術】
従来、ビデオカメラにおいては、CCD(Charge Coupled Device),CMOS(Complementary Metal−Oxide Semiconductor)などの撮像素子により撮像された画像のコントラスト(明暗の差)および鮮鋭度(境界の明確さ)を向上させる方法として、階調変換によるコントラスト強調方法や画像中の高域成分のコントラストを強調する高域成分強調方法が考えられている。
【0003】
コントラスト強調方法としては、画像の各画素に対して、その画素レベルを所定の入出力関係を持つ関数(以下、これをレベル変換関数と称する)で変換するトーンカーブ調整や、画素レベルの頻度分布に応じてレベル変換関数を適応的に変化させるヒストグラムイコライゼーションと呼ばれる方法が提案されており、また高域成分強調方法としては、画像からエッジを抽出し、当該抽出したエッジを強調するいわゆる輪郭強調を行うアンシャープマスクと呼ばれる方法が提案されている。
【0004】
しかしながら、コントラスト強調方法においては、画像の全ダイナミックレンジ(最大レベルと最小レベルの差)のうち一部の輝度域しかコントラストを向上させることができない問題があることに加えて、トーンカーブ調整の場合には画像の最明部と最暗部において、またヒストグラムイコライゼーションの場合には頻度分布の少ない輝度域付近において、逆にコントラストが低下するという問題があった。さらに高域成分強調方法においては、画像の高域成分のコントラストのみが強調され、これにより画像のエッジ付近が不自然に強調され、画質が劣化することを避け得ないという課題があった。
【0005】
そこで、本出願人は、入力画像データのうち画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を増幅することにより、エッジ以外の部分を強調して表示することを先に提案している(例えば、特許文献1)。
【0006】
【特許文献1】
特開2001−298621号公報
【0007】
【発明が解決しようとする課題】
しかしながら、特許文献1に記載されている方法においては、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合、平滑化の効果を充分に得るためには、非常に大きなタップ数の非線形フィルタを設ける必要があり、計算量が多くなるという課題があった。
【0008】
本発明は、このような状況に鑑みてなされたものであり、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を少なくすることができるようにするものである。
【0009】
【課題を解決するための手段】
本発明の画像処理装置は、入力画像データを平滑化し、平滑化画像データを生成する平滑化手段を備え、平滑化手段は、縦属に接続された、平滑化の度合いを制御するパラメータおよび帯域に関するインターバルが異なる複数の非線形フィルタからなることを特徴とする。
【0010】
前記平滑化手段は、中心画素とその近傍画素の差分値に基づいて、平滑化の度合いを適応的に変化させるようにすることができる。
【0011】
前記非線形フィルタのパラメータの値は、後段の方が前段に較べて大きいようにすることができる。
【0012】
前記非線形フィルタのインターバルの値は、後段の方が前段に較べて小さいようにすることができる。
【0013】
前記非線形フィルタのインターバルは2のべき乗とされるようにすることができる。
【0014】
前記非線形フィルタは、εフィルタまたはメディアンフィルタとされるようにすることができる。
【0015】
本発明の画像処理方法は、入力画像データを平滑化し、平滑化画像データを生成する平滑化ステップを含み、平滑化ステップの処理は、縦属に接続された、平滑化の度合いを制御するパラメータおよび帯域に関するインターバルが異なる複数の非線形フィルタにより行なわれることを特徴とする。
【0016】
本願発明においては、入力画像データが平滑化される。また、入力画像データの平滑化は、縦属に接続された、平滑化の度合いを制御するパラメータおよび帯域に関するインターバルが異なる複数の非線形フィルタにより行なわれる。
【0017】
【発明の実施の形態】
図1は、本発明を適用したビデオカメラ1の構成例を表わしている。
【0018】
CCD,CMOSなどの撮像素子よりなる撮像素子11は、被写体からの光画像を入力画像データとして取得し、入力画像データを画像処理回路12の遅延回路21および非線形平滑化器22に入力する。この入力画像データは、2次元ディジタル画像とされ、画像上の位置(i,j)に対応する画素値がx(i,j)により表わされる。
【0019】
非線形平滑化器22は、入力画像データを平滑化して、平滑化データを生成する。
【0020】
遅延回路21は、撮像素子11によって撮像された入力画像データを所定量遅延させ、これを遅延画像データとして演算部23の減算器31に送出する。画像強調手段を構成する演算部23は、減算器31の他、乗算器32、および加算器33により構成され、出力画像データを生成する。減算器31は、遅延画像データの各画素値x(i,j)から平滑化画像データの各画素値s(i,j)を減算し、その結果得られた差分画像データを乗算器32に出力する。
【0021】
乗算器32は、差分画像データの各画素値(x(i,j)−s(i,j))に、それぞれゲイン係数g(i,j)を乗算して増幅し、その結果得られた差分画像データを加算器33に出力する。ゲイン係数g(i,j)としては、全画面に対して一様な値、又は各画素(i,j)毎に設定された値が用いられる。
【0022】
加算器33は、乗算器32から供給される差分画像データの各画素値
g(i,j)×(x(i,j)−s(i,j))
に対して、減算器31によって減算されたオフセット分である平滑化画像データの各画素値s(i,j)を加算し、その結果得られた出力画像データをカメラ信号処理回路13に出力する。
【0023】
カメラ信号処理回路13は、出力画像データに対して所定のデータ処理を施し、その結果得られた出力画像データをVTR(Video Tape Recorder)14に送出して記録させる。
【0024】
次に、図2のフローチャートを参照して、図1の画像処理回路12における画像処理を説明する。なお、この処理は、ユーザの指令により、撮像素子11から入力画像データが供給されたとき開始される。
【0025】
ステップS1において、遅延回路21は、撮像素子11から供給された入力画像データを取得する。
【0026】
ステップS2において、非線形平滑化器22は、撮像素子11から供給された入力画像データを取得する。
【0027】
ステップS3において、非線形平滑化器22は、ステップS2の処理により取得した入力画像データの中から画素値の変化が急峻なエッジ成分を抽出し、当該エッジ成分に対しては平滑化することなくそのまま出力するのに対して、エッジ成分以外の小振幅成分に対しては、平滑化することにより、入力画像データのエッジ成分を保存したまま当該入力画像データを平滑化して、平滑化画像データを生成する。その処理の詳細は、図8乃至図10を参照して後述する。非線形平滑化器22は、生成した平滑化画像データを、減算器31と加算器33に供給する。
【0028】
ステップS4において、遅延回路21は、ステップS1の処理により取得した入力画像データを所定量遅延させ、これを遅延画像データとして減算器31に送出する。
【0029】
ステップS5において、減算器31は、遅延回路21から供給された遅延画像データ(ステップS4の処理)の各画素値x(i,j)から非線形平滑化器22から供給された(ステップS3の処理)平滑化画像データの各画素値s(i,j)を減算し、差分画像データを生成する。減算器31は、生成した差分画像データを乗算器32に供給する。
【0030】
ステップS6において、乗算器32は、減算器31から供給された(ステップS5の処理)差分画像データの各画素値(x(i,j)−s(i,j))に、それぞれゲイン係数g(i,j)を乗算して増幅し、その結果得られた差分画像データを加算器33に送出する。なお、ゲイン係数g(i,j)は、全画面に対して一様な値、又は各画素(i,j)毎に設定された値が用いられる。
【0031】
ステップS7において、加算器33は、ステップS6の処理により乗算器32から供給される差分画像データの各画素値
g(i,j)×(x(i,j)−s(i,j))
に対して、平滑化画像データ(ステップS3の処理により非線形平滑化器22から供給された平滑化画像データ)の各画素値s(i,j)を加算し、その結果得られた出力画像データをカメラ信号処理回路13に送出する。
【0032】
図2の処理により、画像処理回路12は、入力画像データを平滑化し、画像強調処理された出力画像データを得ることができる。
【0033】
図3は、非線形平滑化器22の構成例を示すブロック図である。
【0034】
線形ローパスフィルタ51は、入力画像データのうち、極めて高い周波数成分の信号レベルを減衰させ、その結果得られた画像データをルックアップテーブル52に送出する。ルックアップテーブル52は、線形ローパスフィルタ51から供給された画像データに対して、例えば、対数変換のような階調変換を施し(入力画像データに対して非線形変換を施し、非線形画像データを生成し)、その結果得られた画像データをεフィルタ53に送出する。
【0035】
εフィルタ53は、縦属に接続(カスケード接続)されたn個(図3の例では、3個)のεフィルタ53A乃至εフィルタ53Cにより構成される。εフィルタ53Aは、非線形平滑化フィルタ、すなわち、画素値の急峻な変化を損なうことなく当該画素値を平滑化する際に有効なディジタルフィルタであり、ルックアップテーブル52から供給される画像データのエッジを保存したまま当該画像データを平滑化し、その結果得られた平滑化画像データをεフィルタ53Bに送出する。
【0036】
εフィルタ53Aの後段に接続されるεフィルタ53Bと、さらにその後段に接続されるεフィルタ53Cは、当該εフィルタ53Aと同様の構成であるが、閾値εと帯域(タップ数)が異なる。εフィルタ53A乃至εフィルタ53Cの詳細は、図4乃至図6を参照して後述する。
【0037】
εフィルタ53Bは、画像データを平滑化し、その結果得られた平滑化画像データをεフィルタ53Cに送出する。εフィルタ53Cは、εフィルタ53Bから供給された平滑化画像データをさらに平滑化し、平滑化画像データをルックアップテーブル54に供給する。
【0038】
ルックアップテーブル54は、εフィルタ53Cから供給された平滑化画像データに対して、階調変換(ルックアップテーブル52が施した対数変換の逆変換)を施し、その結果得られた平滑化画像データを線形ローパスフィルタ55に送出する。
【0039】
線形ローパスフィルタ55は、エッジを保存したまま平滑化された平滑化画像データのエッジを僅かに鈍らせることにより平滑化画像データを生成し、これを減算器31および加算器33に送出する。これにより、後段の画像強調処理(演算部23が実行する処理)においてエッジ近傍での画像の滑らかさを保持することができる。
【0040】
図4は、εフィルタ53Aの詳細な構成例を示すブロック図である。
【0041】
このεフィルタ53Aは、フィルタ処理用の画素が1次元で17タップとされ、閾値設定部140により設定された閾値がεとされる。εフィルタ53Aは、レジスタ101乃至116、閾値設定部140、セレクタ141乃至144、増幅器161乃至165、加算器181、並びに割算器182により構成される。レジスタ101乃至116は、それぞれ1画素分の画素値を保持するレジスタである。
【0042】
セレクタ141は、レジスタ116から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値εに基づいて、演算を行ない、演算を行なった結果を増幅器161に供給する。セレクタ142は、レジスタ112から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値εに基づいて演算を行ない、演算結果を増幅器161に供給する。
【0043】
セレクタ143は、レジスタ104から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値εに基づいて、演算を行ない、演算を行なった結果を増幅器164に供給する。セレクタ144は、入力された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値εに基づいて演算を行ない、演算結果を増幅器165に供給する。
【0044】
レジスタ101乃至103で構成されるレジスタ191、レジスタ105乃至107で構成されるレジスタ192、レジスタ109乃至111で構成されるレジスタ193、レジスタ113乃至115で構成されるレジスタ194は、それぞれインターバルを設定する為に設けられている。
【0045】
増幅器163には、レジスタ108から中心画素pn の画素値Xn が供給される。
【0046】
増幅器161乃至165は、入力される画素値Xに対してそれぞれタップ係数ak を乗算し、その演算結果を加算器181に送出する。いまの場合、増幅器161と増幅器165のタップ係数は1とされ、増幅器162乃至164のタップ係数は2とされる。加算器181は、供給されたそれぞれの値(増幅器161乃至165から供給された値)を加算し、これを割算部182に供給する。割算部182は供給された値を割算し(いまの例の場合、8で割算する)、これをεフィルタ53Bに送出する。なお、割算器182を省略し、増幅器161,165のタップ係数を1/8とし、増幅器162乃至164のタップ係数を2/8としてもよい。
【0047】
図5は、εフィルタ53Bの詳細な構成例を示すブロック図であり、図6は、εフィルタ53Cの詳細な構成例を示すブロック図である。
【0048】
図4を図5および図6と比較して明らかなように、図5および図6のεフィルタ53Bおよび53Cは、図4のεフィルタ53Aと、基本的に同様の構成とされている。
【0049】
すなわち、図4のεフィルタ53Aのレジスタ101乃至116、閾値設定部140、セレクタ141乃至144、増幅器161乃至165、加算器181、並びに割算器182に対応して、図5のεフィルタ53Bは、レジスタ301乃至308、閾値設定部340、セレクタ341乃至344、増幅器361乃至365、加算器381、並びに割算器382を有している。対応する名称のものは対応する機能を有している。
【0050】
ただし、εフィルタ53Bは、閾値設定部340により設定され、セレクタ341乃至344に供給される閾値εの値と、レジスタの数(図6のεフィルタ53Aの場合、レジスタの数は、16個であり、図8のεフィルタ53Bの場合、レジスタの数は、8個である)が、図4のεフィルタ53Aと異なる。εフィルタ53Bにおいては、インターバルを設定するレジスタ391乃至394は、それぞれ1個のレジスタ301,303,305,または307により構成されている。
【0051】
また、図4のεフィルタ53Aのレジスタ101乃至116、閾値設定部140、セレクタ141乃至144、増幅器161乃至165、加算器181、並びに割算器182に対応して、図6のεフィルタ53Cは、レジスタ401乃至404、閾値設定部440、セレクタ441乃至444、増幅器461乃至465、加算器481、並びに、割算器482を有している。対応する名称のものは対応する機能を有している。
【0052】
ただし、上述した図5(εフィルタ53B)と同様、εフィルタ53Cは、閾値設定部440により設定され、セレクタ401乃至404に供給される閾値εの値と、レジスタの数(εフィルタ53Aのレジスタの数は16個であり、εフィルタ53Cのレジスタの数は4個である)が、図6のεフィルタ53Aと異なる。εフィルタ53Cにおいては、インターバルを設定するレジスタは設けられていない。
【0053】
図7は、図4のセレクタ141の構成例を示すブロック図である。
【0054】
画素pmの画素値Xm(いまの例の場合、レジスタ116から供給される画素値)、およびレジスタ108から供給される中心画素pnの画素値Xnは、減算器200およびセレクタ201に入力される。減算器200は、画素値Xn と画素値Xm の差をとり、その結果を絶対値変換器202に出力する。絶対値変換器202は、画素値Xn と画素値Xm の差の絶対値|Xn −Xm |を求め、これを大小比較器203に出力する。
【0055】
大小比較器203は、この絶対値|Xn −Xm |と、所定の閾値ε(いまの例の場合、閾値ε)とを比較し、その比較結果をセレクタ201に送出する。セレクタ201は、絶対値|Xn −Xm |が所定の閾値εよりも小さい場合には、画素値Xm を選択して後段の増幅器161に送出するとともに、絶対値|Xn −Xm |が所定の閾値εよりも大きい場合には、画素値Xn を選択して後段の増幅器161に送出する。
【0056】
セレクタ142乃至144は、それぞれセレクタ141と同様に構成され、選択した画素pの画素値Xをそれぞれ対応する後段の増幅器162,164および165に送出する。
【0057】
図5のセレクタ341乃至344、並びに、図6のセレクタ441乃至444の構成も、セレクタ141と同様であるため、その説明は省略する。
【0058】
次に、図8のフローチャートを参照して、図3の非線形平滑化器22における非線形平滑化処理を説明する。このフローチャートは、図2のステップS2およびステップS3の処理を詳細に説明するものである。なお、この処理は、ユーザの指令により撮像素子11から入力画像データが非線形平滑化器22の線形ローパスフィルタ51に供給されたとき開始される。
【0059】
ステップS31において、線形ローパスフィルタ51は、撮像素子11から供給された入力画像データを取得する。
【0060】
ステップS32において、線形ローパスフィルタ51は、入力画像データのうち極めて高い周波数成分の信号レベルを減衰させ、その結果得た画像データをルックアップテーブル52に送信する。
【0061】
このように、線形ローパスフィルタ51は、入力画像データのうち極めて高い周波数成分の信号レベルを減衰させることにより、後段のεフィルタ53(εフィルタ53A乃至53C)において平滑化処理を行う場合、振幅の大きい高周波成分が十分平滑化されずに点状のノイズとして画像上に残存することを防止している。なお、この線形ローパスフィルタ51は、1次元の線形ローパスフィルタを画像の水平方向および垂直方向にそれぞれ適用することによって構成されるか、又は2次元の線形ローパスフィルタによって構成される。
【0062】
ステップS33において、ルックアップテーブル52は、ステップS32の処理により線形ローパスフィルタ51から供給された画像データを取得し、取得した画像データに対して、例えば、対数変換のような階調変換を施し、その結果得られた画像データをεフィルタ53(εフィルタ53A)に送出する。
【0063】
ところで、後段のεフィルタ53A乃至53Cは、閾値ε乃至εの大きさを異ならせることにより、相対的に画像データの振幅に応じて適応的な平滑化処理を行うが、一般に画像データの振幅の大きさは、撮像対象を照明している照明光の強さに比例して大きくなる。そこでルックアップテーブル52は、予め画像データに対して対数変換を施すことにより、後段のεフィルタ53A乃至53Cにおいて平滑化処理を行う際、照明条件によらず同一の平滑効果を得ることを可能にする。これと共にルックアップテーブル52は、例えば画像の暗い領域や明るい領域で平滑効果を高くすることにより、後段の画像強調処理による強調度合いを増加させるなど、画素値に応じて平滑効果を制御することも可能にする。
【0064】
ステップS34において、εフィルタ53(εフィルタ53A乃至53C)は、平滑化処理を実行する。なお、この平滑化処理の詳細は、図9を参照して後述する。
【0065】
ステップS35において、ルックアップテーブル54は、εフィルタ53(εフィルタ53C)から供給された平滑化画像データに対して、階調変換(ステップS33の処理によりルックアップテーブル52が施した対数変換の逆変換)を施し、その結果得た平滑化画像データを線形ローパスフィルタ55に送出する。
【0066】
ステップS36において、線形ローパスフィルタ55は、エッジを保存したまま平滑化された平滑化画像データ(ステップS35の処理によりルックアップテーブル54から供給された平滑化画像データ)のエッジを僅かに鈍らせることにより平滑化画像データを生成し、これを減算器31と加算器33(図1)に送出する。これにより、後段の演算部23による画像強調処理においてエッジ近傍での画像の滑らかさを保持することができる。
【0067】
図8の処理により非線形平滑化処理が行なわれた平滑化データは、上述したように、さらに図2のステップS4乃至ステップS7における処理が実行される。
【0068】
図9は、図8のステップS34の平滑化処理を説明するフローチャートである。なお、この処理は、εフィルタ53の第1段目のεフィルタ(すなわち、いまの場合、εフィルタ53A)に、画像データが供給されたとき(図8のステップS33の処理の後)開始される。
【0069】
ステップS71において、εフィルタ53Aは、第1の閾値εと第1のインターバルにより第1段の平滑化処理を実行する。なお、この処理の詳細は、図10を参照して後述する。εフィルタ53Aは、第1の平滑化処理を実行した平滑化データを後段のεフィルタ53Bに供給する。
【0070】
ステップS72において、εフィルタ53Bは、第2の閾値εと第2のインターバルにより第2段の平滑化処理を実行する。εフィルタ53Bは、第2の平滑化処理を実行した平滑化データを後段のεフィルタ53Cに供給する。
【0071】
ステップS73において、εフィルタ53Cは、第3の閾値εと第3のインターバルにより第3段の平滑化処理を実行する。εフィルタ53Cは、第3の平滑化処理を実行した平滑化データをεフィルタ53の出力として、ルックアップテーブル54に供給する。ルックアップテーブル54は、上述したように、平滑化データを階調変換する(図8のステップS35の処理)。
【0072】
図9の処理により、εフィルタ53に備えられているεフィルタ53A乃至53Cにより平滑化処理が行なわれ、平滑化データが生成される。
【0073】
具体的には、εフィルタ53Aにより、入力された画像データに対して、{1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,1}のタップ係数の演算がなされ、εフィルタ53Bにより{1,0,2,0,2,0,2,0,1}のタップ係数の演算がなされ、εフィルタ53Cにより{1,2,2,2,1}のタップ係数の演算がなされる。その結果、実質的に、入力された画像データに、{1,2,3,4,6,8,10,12,13,14,15,16,16,16,16,16,15,14,13,12,10,8,6,4,3,2,1}のタップ係数の演算がなされたことと等価となる。
【0074】
すなわち、3個のεフィルタ(17タップ、9タップ、および5タップのεフィルタ)をカスケード接続することで、27タップの非線形フィルタを用いて演算した結果とほぼ同等の効果を得ることができる。このとき、27タップの非線形フィルタを用いて演算した場合に較べて、比較演算は、26回から12回へ削減することができ、乗算演算は、27回から15回へ削減することができる。
【0075】
なお、この平滑化処理(図8のステップS34の処理)ではエッジ以外の部分では可能な限り変化の少ない画像を生成することが望ましいが、そのためにはεフィルタ53Aにおいて、非常に大きなフィルタを用いる必要がある。しかし、用いるフィルタを大きくした場合、全画素にタップ係数ak を乗算すると後段のセレクタ141乃至144、増幅器161乃至165の数も増加させなければならず、回路規模が増大する。
【0076】
そこで、本実施の形態では、レジスタ列(レジスタ101乃至104,レジスタ105乃至108,レジスタ109乃至112、および、レジスタ113乃至116)をそれぞれ4画素分のレジスタによって構成し、これ以降の演算処理に対しては各レジスタ列の先頭の1画素(レジスタ104,レジスタ108,レジスタ112、および、レジスタ116の画素)のみに施すようにすることにより、後段の回路規模を増加させることなく、空間的に広い範囲をカバーするεフィルタを実現している。但し、このように数画素おきにのみ有意な係数を持つフィルタは大きな平滑化効果が期待できる反面、一般的にサイドローブが大きくなる傾向があり、不要な高周波数成分が平滑化画像データに残存し易くなる。
【0077】
そこで、εフィルタ53Bおよびεフィルタ53Cを縦属(カスケード)接続することにより、平滑化効果とサイドローブの抑制を両立させている。
【0078】
図10は、図9のステップS71乃至73の各ステップの処理、すなわち、第n段(n=1,2,または3)の平滑化処理(任意のεフィルタにおける平滑化処理)を説明するフローチャートである。なお、この処理は、処理を実行する任意のεフィルタ53に対して、入力画像データが供給されて来たとき開始される。
【0079】
ステップS101において、各レジスタは、それぞれデータを保持する。例えば、図4のεフィルタ53Aにおいてこの処理を実行する場合、レジスタ101乃至116は、それぞれ入力されたデータを保持する。このとき、保持されたデータは、画素pmの画素値Xmとしてそれぞれセレクタ141乃至144に供給される。すなわち、そのときレジスタ104,108,112,および116に保持されている画素値Xmが、それぞれセレクタ141乃至144に供給される。また、レジスタ108から供給される中心画素pnの画素値Xnは、セレクタ141乃至セレクタ144、並びに、乗算器163に入力される。
【0080】
ステップS102において、セレクタ141乃至144の減算器200は、画素pmの画素値Xmと中心画素pnの画素値Xnにおける差分(Xn−Xm)を演算する。
【0081】
ステップS103において、セレクタ141乃至144の絶対値変換器202は、ステップS102の処理により演算した差分画素値Xn と画素値Xm の差(Xn−Xm)の絶対値|Xn −Xm |を求め、これを大小比較器203に送出する。
【0082】
ステップS104において、セレクタ141乃至144の大小比較器203は、この絶対値|Xn −Xm |と所定の閾値ε(いまの例の場合、閾値ε)とを比較し、その比較結果をセレクタ201に送出する。
【0083】
ステップS105において、セレクタ141乃至144のセレクタ201は、絶対値|Xn −Xm |が所定の閾値εよりも小さい場合には、画素値Xm を選択して後段の増幅器161に送出し、絶対値|Xn −Xm |が所定の閾値εよりも大きい場合には、画素値Xn を選択して増幅器161に送出する。このとき増幅器161に供給される画素値を画素値Xと設定する。
【0084】
ステップS106において、増幅器161乃至165は、入力される画素値Xに対してタップ係数ak を乗算し、その演算結果を加算器181に送出する。すなわち、増幅器161乃至165は、画素値Xを重み付けする。いまの例の場合、増幅器161,165のタップ係数は1であり、増幅器162乃至164のタップ係数は2であるので、画素値Xに対して、1または2が乗算される。
【0085】
ステップS107において、加算器181は、増幅器161乃至165より供給されたそれぞれの値を加算し、これを割算部182に供給する。
【0086】
ステップS108において、割算部182は加算器181から供給された値を割算し(いまの例の場合8で割算する)、これをεフィルタ53Bに送出する。そして処理は、図9に戻り、それ以降(いまの場合、ステップS72)の処理が行なわれる。
【0087】
図10の処理により、非線形平滑化フィルタであるεフィルタ53(εフィルタ53A乃至53C)は、画素値の急峻な変化を損なうことなく当該画素値を平滑化し、ルックアップテーブル52から供給される画像データ(図8のステップS32の処理によりルックアップテーブル52から供給される画像データ)のエッジを保存したまま当該画像データを平滑化することができる。このεフィルタ53における平滑化処理(図10の処理)をまとめると、フィルタ処理用の画素が1次元で2N+1タップの場合、式(1)により示される。
【数1】

Figure 2004172726
【0088】
すなわち、εフィルタ53は、フィルタ処理の中心画素pn の画素値Xn と画素pn−k の画素値Xn−k との差の絶対値|Xn −Xn−k |を所定の閾値εと比較する。その結果、εフィルタ53Aは、絶対値|Xn −Xn−k |が所定の閾値εよりも小さいと判断した場合には、wn−k に画素値Xn−k を代入し、ak を各タップ係数とした通常の線形ローパスフィルタと同様の処理を実行することにより、中心画素pn を中心として画像を一様に平滑化する。
【0089】
これに対して、εフィルタ53は、絶対値|Xn −Xn−k |が所定の閾値εよりも大きいと判断した場合には、wn−k に画素値Xn を代入し、画素pn−k の画素値Xn−k を中心画素pn の画素値Xn に置き換えた後に当該中心画素pn を中心としてローパスフィルタ処理を行うことにより、画素値Xn−k を無視して画素値Xn 近傍の画素値のみで平滑化を行う。
【0090】
図11は、εフィルタ53A(17タップのεフィルタ)のレジスタ101乃至116に保持される画素値を説明する図である。
【0091】
図11において、フィルタ中心画素の画素値はCとされ、中心画素より左側の画素値がX1,X2,X3,L1,X4,X5,X6,およびL2とされている。また、中心画素より右側の画素値がY1,Y2,Y3,R1,Y4,Y5,Y6,およびR2とされている。
【0092】
通常、ラインの走査は、左上から右下方向に行なわれるので、図中、最も左側の画素値L2が最も先に走査され、最も右側の画素値R2が最後に走査されるので、画素値L2がレジスタ116に保持され、画素値X6がレジスタ115に保持され、画素値X5がレジスタ114に保持される。以下、順次、図11において左側の画素値から順番にレジスタ113,112,111,・・・に保持され、画素値Y6がレジスタ101に保持され、画素値R2がセレクタ144に直接供給される(画素値R2をラッチするレジスタを設けてもよい)。
【0093】
上述したようにεフィルタ53Aのタップ係数は{1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,1}であるので、L2,R2の係数は1とされ、L1,C1,R1の係数は2とされ、X1乃至X6(それぞれ、レジスタ115,114,113,111,110,109に保持される)、並びに、Y1乃至Y6(それぞれ、レジスタ107,106,105,103,102,101に保持される)の係数は0とされる(各レジスタの出力が加算器181に供給されていない)。
【0094】
上述した式(1)を適用すると、例えば、画素値Cと画素値L1との差の絶対値|C−L1|が、所定の閾値εと比較され、所定の閾値εよりも大きいとされた場合、画素値L1が、画素値Cに置き換えられる。式(1)によりR2,Y6,Y5,Y4,R1,Y3,Y2,Y1,X1,X2,X3,L1,X4,X5,X6,およびL2のそれぞれに対して演算された結果の画素値をR2’,Y6’,Y5’,Y4’,R1’,Y3’,Y2’,Y1’,X1’,X2’,X3’,L1’,X4’,X5’,X6’,およびL2’とすると、εフィルタ53Aから出力される画素値C’は、式(2)が演算されることにより行なわれる(式(2)は、図10のステップS106乃至ステップS108の処理をまとめた式とされる)。
【数2】
Figure 2004172726
【0095】
図12は、εフィルタ53A乃至εフィルタ53Cにおける閾値εの関係を説明する図である。
【0096】
εフィルタ53A乃至εフィルタ53Cにおける閾値εは、後段のεフィルタ53になるほど、大きくなる。すなわち、この場合、閾値ε<ε<εとされる。
【0097】
閾値εは、大きい値であるほど、ナマリが生じやすく(すなわち、ボケが生じるため、ノイズが取れる)、小さい値であるほど、ナマリが生じにくい(すなわち、ボケが生じにくく、ノイズが残る)。
【0098】
例えば、タップ数が3とされ、タップ係数が{1,2,1}とされ、L1,C,R1が、それぞれL1=30,C=100およびR1=80とされ、閾値εが50とされる場合、式(1)により、L1’=100とされる(R1’はそのままの値(R1)とされる)。また、式(2)により、C’={1×100+2×100+1×80}/4が演算され、出力画素C’=95とされる。一方、例えば、タップ数が3とされ、タップ係数が{1,2,1}とされ、L1=30,C=100,R1=80とされ、閾値εが80とされる場合(すなわち、上述した例と閾値εの値のみが異なる場合)、式(1)から、L1’とR1’はそのままの値(L1,R1)とされる。また、式(2)により、C’={1×30+2×100+1×80}/4が演算され、出力画素C’=77.5とされる。このように、閾値εが大きいほど(いまの例の場合、閾値εが50より80であるほど)、出力画像にナマリが生じる(ボケが生じる)こととなる。
【0099】
図13は、εフィルタ53B(9タップのεフィルタ)のレジスタ301乃至308に保持される画素値を説明する図であり、図14は、εフィルタ53Cのレジスタ301乃至308に保持されている画素値を説明する図である。
【0100】
図13において、フィルタ中心画素の画素値はCとされ、中心画素より左側の画素値がX1,L1,X2,およびL2とされている。また、中心画素より右側の画素値がY1,R1,Y2,およびR2とされている。上述したようにεフィルタ53Bのタップ係数は{1,0,2,0,2,0,2,0,1}であるので、L2,R2の係数は1とされ、L1,C1,R1の係数は2とされ、X1,X2,Y1,およびY2(それぞれ、レジスタ307,305,303,301に保持される)の係数は0とされる。
【0101】
また、図14のεフィルタ53Cにおいて、フィルタ中心画素の画素値はCとされ、中心画素より左側の画素値がL1,およびL2とされている。また、中心画素より右側の画素値がR1,およびR2とされている。上述したようにεフィルタ53Cのタップ係数は{1,2,2,2,1}であるので、L2,R2の係数は1とされ、L1,C1,R1の係数は2とされる。
【0102】
このように、εフィルタ53Aのインターバルは、4(=2)(インターバル設定のためのレジスタの数は3個)、εフィルタ53Bのインターバルは、2(=2)(インターバル設定の為のレジスタの数は1個)、εフィルタ53Cのインターバルは、1(=2)(インターバル設定のためのレジスタの数は0個)とされる。
【0103】
ここで、それぞれの画素値に対して上述した式(1)と式(2)が適用されることにより、出力画素値C’が得られる。このとき、タップ数が大きいεフィルタ53Aに比較して、εフィルタ53Bにより演算される出力画素値C’は、ノイズが多くなる。また、タップ数が大きいεフィルタ53Bに比較して、εフィルタ53Cにより演算される出力画素値C’は、ノイズが多くなる。すなわち、ノイズの大きさは、タップ数の多いεフィルタ53Aにおいてはノイズが少なく、後段のεフィルタ53C(タップ数が少ない)になるに連れて、ノイズが多くなる。
【0104】
そこで、図12に示されるように、εフィルタ53の閾値εを、εフィルタのタップ数により変化させる(タップ数の多いεフィルタ53Aにおいては、閾値εを小さくさせ、タップ数の少ないεフィルタ53Cにおいては、閾値εを大きくさせる)ことにより、εフィルタ53A乃至εフィルタ53Cの全ての出力画素値C’のノイズを抑えることができる。
【0105】
図15は、平滑化処理される画像データを説明する図である。
【0106】
図中左側の入力された画像データは、εフィルタ53により平滑化処理されることによって、図中右側に示されるような画像データにされる。
【0107】
すなわち、急峻なエッジの前後で画素値の差の絶対値が所定の閾値εを超える場合、中心画素pn を中心とし、ローパスフィルタ処理を行う際には画素pm の画素値Xm を中心画素pn の画素値Xn に置き換えてローパスフィルタ処理を施すことにより、画素値Xn の近傍で平滑化するのに対して、画素pm を中心としてローパスフィルタ処理を行う際には画素値Xm 近傍で平滑化する。
【0108】
このとき、εフィルタ53Aは、フィルタ処理を行う範囲内に画素値Xの近い画素pが存在しないエッジ部分の画素pでは、当該エッジ部分の画素pの画素値Xをほぼそのまま出力することにより、エッジの急峻な変化をそのまま保存する(式(1))。因みに、εフィルタ53Aは、線形ローパスフィルタ51と同様に、1次元のεフィルタを画像の水平方向および垂直方向にそれぞれ適用することによって構成される場合と、2次元のεフィルタによって構成される場合とがある。
【0109】
図16は、εフィルタ53A乃至εフィルタ53Cにおける周波数応答を説明する図である。
【0110】
図16において、横軸はナイキスト周波数を0.5として正規化した周波数であり、縦軸はフィルタ周波数応答を表わしている。53A,53B,53Cは、それぞれ、εフィルタ53A、εフィルタ53B、およびεフィルタ53Cに対応する周波数応答を示す。
【0111】
εフィルタ53(例えば、εフィルタ53A)のタップ数のインターバル(間引き)を2のべき乗とすることにより、図16に示されるように、εフィルタ53A(例えば、インターバル=4)の周波数応答の波形におけるサイドローブのピークを、εフィルタ53B(例えば、インターバル=2)の周波数応答により打ち消すことができる(εフィルタ53Aの周波数応答の波形におけるサイドローブのピーク点と、εフィルタ53Bの周波数応答の波形における0点が同じであるため、打ち消している)。すなわち、前のεフィルタ53のサイドローブを、次のεフィルタ53により抑制することができ、もって、平滑化効果とサイドローブの抑制を両立することができる。
【0112】
εフィルタ53により平滑化された平滑化画像データは、上述したように、演算部23により演算され、画像処理回路12の出力として、カメラ信号処理回路13に供給される。このとき、画像処理回路12から出力される出力画像データの各画素値y(i,j)は、式(3)により示される。
【数3】
Figure 2004172726
【0113】
式(3)において、ゲイン係数g(i,j)を全画面に一様なゲイン係数Gに置き換えると共に、平滑化画像データの各画素値s(i,j)を入力画像データのダイナミックレンジの中央値又は全画素値の平均値Cに置き換えると、この式(3)は、従来のトーンカーブ調整によるコントラスト強調方法を示す式(4)のように表わされる。
【数4】
Figure 2004172726
【0114】
また、式(3)において、ゲイン係数g(i,j)を全画面に一様なゲイン係数Gに置き換えると共に、平滑化画像データの各画素値s(i,j)を入力画像データの各画素値x(i,j)に線形ローパスフィルタ処理を施した画像データの各画素値f(i,j)に置き換えると、この式(3)は、従来のアンシャープマスクによる高域成分強調方法を示す式(5)のように表わされる。
【数5】
Figure 2004172726
【0115】
このように、従来のコントラスト強調方法は、画像の各画素毎に独立して画像強調処理を行う方法であると共に、従来の高域成分強調方法は、中心画素の周辺に存在する周辺画素との相対的なレベル差を基に画像強調処理を行う方法であるのに対して、本実施の形態による方法は、非線形平滑化フィルタを用いて従来のコントラスト強調方法及び高域成分強調方法を統合し、一段と高品位な画像強調処理を可能にしている。
【0116】
また、従来の非線形平滑化フィルタを用いた方法(入力画像データのうち画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を増幅することにより、エッジ以外の部分を強調して表示する方法)に対して、本実施の形態による方法は、εフィルタ53のタップ数のインターバルを2のべき乗とし、εフィルタ53の閾値εをフィルタの帯域にあわせて変更することにより、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができる。
【0117】
以上のように、帯域に応じた閾値εを設定し(狭帯域フィルタ(タップ数の多いεフィルタ)の場合は、閾値εを小さくし、広帯域フィルタ(タップ数の少ないεフィルタ)の場合は、閾値εを大きくする)、狭帯域フィルタから広帯域フィルタの順番にεフィルタをカスケード接続し、さらに、εフィルタのインターバル(実質的に処理する画素の抽出間隔)を2のべき乗とすることにより、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができる。
【0118】
また、ノイズが生じにくく、かつ、計算量を抑えた出力画像を得ることができる。
【0119】
また、サイドローブを抑えた画像を出力させることができる。
【0120】
さらに上述の実施の形態においては、本発明をビデオカメラ1に適用した場合について述べたが、本発明はこれに限らず、例えば電子スチルカメラ、プリンタ、ディスプレイ、コンピュータのような他の種々の画像処理装置に本発明を広く適用し得る。この場合、コンピュータでは、画像コントラストを修正する際、ダイナミックレンジを維持しながら高品位なコントラスト修正画像を得ることができ、また異なる照明条件下で得られた画像同士を合成する際、それぞれのコントラスト成分の違いのみを補正でき、自然な合成画像を生成することができる。
【0121】
なお、以上の例においては、非線形平滑化器22が備えるεフィルタの数を3個(εフィルタ53A,εフィルタ53B、およびεフィルタ53C)としたが、任意のN個のεフィルタ53を備えるようにしてもよい。勿論、その場合、N番目のεフィルタをεフィルタ53Nとすると、εフィルタ53Aの閾値εは最小とされ、後段に接続されるεフィルタ53Nの閾値εは最大とされる(ε<ε)。
【0122】
また、以上の例においては、εフィルタを用いるようにしたが、εフィルタだけでなく、例えば、メディアンフィルタ等を用いるようにしても良い。
【0123】
なお、本明細書において、各フローチャートを記述するステップは、記載された順序に従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
【0124】
【発明の効果】
以上の如く、本願発明によれば、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができる。特に、この発明によれば、ノイズが生じにくく、かつ、サイドローブを抑えた画像を出力させることができる。
【図面の簡単な説明】
【図1】本発明を適用したビデオカメラの機能的構成を示すブロック図である。
【図2】図1の画像処理回路における画像処理を説明するフローチャートである。
【図3】図1の非線形平滑化器の機能的構成を示すブロック図である。
【図4】図2のεフィルタの構成例を示すブロック図である。
【図5】図2の他のεフィルタの構成例を示すブロック図である。
【図6】図2のさらに他のεフィルタの構成例を示すブロック図である。
【図7】図4のセレクタの構成例を示すブロック図である。
【図8】図2の非線形平滑化器における非線形平滑化処理を説明するフローチャートである。
【図9】図8のステップS34の処理を説明するフローチャートである。
【図10】図9のステップS71乃至ステップS73の処理を説明するフローチャートである。
【図11】図4のレジスタに保持される画素値を説明する図である。
【図12】図3の各εフィルタにおける閾値の関係を説明する図である。
【図13】図5のレジスタに保持される画素値を説明する図である。
【図14】図6のレジスタに保持される画素値を説明する図である。
【図15】平滑化処理される画像データを説明する図である。
【図16】タップ数と周波数応答の関係を示す図である。
【符号の説明】
1 ビデオカメラ, 11 撮像素子, 12 画像処理回路, 21 遅延回路, 22 非線形平滑化器, 23 演算部, 31 減算器, 32 乗算器, 33 加算器, 51 線形ローパスフィルタ, 52 ルックアップテーブル, 53 εフィルタ, 54 ルックアップテーブル, 55 線形ローパスフィルタ, 101乃至116 レジスタ, 141乃至144 セレクタ, 161乃至165 増幅器, 181 加算器, 182 割算器, 140 閾値設定部, 200 減算器, 201 セレクタ, 202 絶対値変換器, 203 大小比較器[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and an image processing method, and more particularly to an image processing apparatus and method capable of reducing the amount of calculation even when smoothing a part other than the edge while preserving an edge with a sharp change in pixel value. Apparatus and method.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a video camera, the contrast (brightness / darkness difference) and sharpness (clearness of a boundary) of an image captured by an imaging device such as a charge coupled device (CCD) and a complementary metal-oxide semiconductor (CMOS) are improved. As a method, a contrast enhancement method by gradation conversion and a high-frequency component enhancement method for enhancing the contrast of a high-frequency component in an image have been considered.
[0003]
As a contrast enhancement method, for each pixel of an image, a tone curve adjustment for converting the pixel level by a function having a predetermined input / output relationship (hereinafter referred to as a level conversion function), a frequency distribution of the pixel level, and the like. A method called histogram equalization in which a level conversion function is adaptively changed according to the so-called contour enhancement, which extracts edges from an image and emphasizes the extracted edges, has been proposed as a high-frequency component enhancement method. A method called “unsharp mask” has been proposed.
[0004]
However, the contrast enhancement method has a problem that the contrast can be improved only in a part of the luminance range of the entire dynamic range (difference between the maximum level and the minimum level) of the image. In contrast, in contrast, in the brightest and darkest parts of an image, and in the case of histogram equalization, there is a problem that the contrast is reduced in the vicinity of a luminance region where the frequency distribution is small. Further, the high-frequency component emphasizing method has a problem that only the contrast of the high-frequency component of the image is enhanced, whereby the vicinity of the edge of the image is unnaturally enhanced, and the image quality cannot be avoided from being deteriorated.
[0005]
Therefore, the present applicant has previously proposed that a part other than the edge is amplified and displayed by emphasizing a part other than the edge while preserving the edge of the input image data in which the pixel value changes sharply. (For example, Patent Document 1).
[0006]
[Patent Document 1]
JP 2001-298621 A
[0007]
[Problems to be solved by the invention]
However, in the method described in Patent Literature 1, when a portion other than the edge is smoothed while preserving an edge with a sharp change in pixel value, it is extremely difficult to obtain a sufficient smoothing effect. It is necessary to provide a non-linear filter having a large number of taps, and the problem is that the amount of calculation increases.
[0008]
The present invention has been made in view of such a situation, and it is possible to reduce the amount of calculation even in a case where a portion other than the edge is smoothed while an edge having a sharp change in pixel value is stored. Is to do so.
[0009]
[Means for Solving the Problems]
The image processing apparatus of the present invention includes smoothing means for smoothing input image data and generating smoothed image data, wherein the smoothing means is a cascade-connected parameter and band for controlling the degree of smoothing. It is characterized by comprising a plurality of non-linear filters having different intervals with respect to each other.
[0010]
The smoothing means may adaptively change the degree of smoothing based on a difference value between a central pixel and its neighboring pixels.
[0011]
The value of the parameter of the nonlinear filter can be set to be larger in the latter stage than in the former stage.
[0012]
The value of the interval of the non-linear filter can be set to be smaller in the latter stage than in the former stage.
[0013]
The interval of the nonlinear filter may be a power of two.
[0014]
The nonlinear filter may be an ε filter or a median filter.
[0015]
The image processing method of the present invention includes a smoothing step of smoothing input image data and generating smoothed image data, wherein the processing of the smoothing step is a cascade-connected parameter for controlling the degree of smoothing. And a plurality of nonlinear filters having different intervals with respect to the band.
[0016]
In the present invention, the input image data is smoothed. The smoothing of the input image data is performed by a plurality of non-linear filters connected in tandem and having different parameters for controlling the degree of smoothing and intervals related to bands.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 shows a configuration example of a video camera 1 to which the present invention is applied.
[0018]
An image sensor 11 including an image sensor such as a CCD or a CMOS acquires a light image from a subject as input image data, and inputs the input image data to a delay circuit 21 and a non-linear smoother 22 of an image processing circuit 12. The input image data is a two-dimensional digital image, and a pixel value corresponding to a position (i, j) on the image is represented by x (i, j).
[0019]
The nonlinear smoother 22 smoothes the input image data to generate smoothed data.
[0020]
The delay circuit 21 delays the input image data captured by the image sensor 11 by a predetermined amount, and sends the delayed image data to the subtracter 31 of the arithmetic unit 23 as delayed image data. The arithmetic unit 23 constituting the image enhancing means is configured by a multiplier 32 and an adder 33 in addition to the subtracter 31, and generates output image data. The subtractor 31 subtracts each pixel value s (i, j) of the smoothed image data from each pixel value x (i, j) of the delayed image data, and outputs the resulting difference image data to the multiplier 32. Output.
[0021]
The multiplier 32 multiplies and amplifies each pixel value (x (i, j) -s (i, j)) of the difference image data by a gain coefficient g (i, j), and obtains the result. The difference image data is output to the adder 33. As the gain coefficient g (i, j), a uniform value for the entire screen or a value set for each pixel (i, j) is used.
[0022]
The adder 33 calculates each pixel value of the differential image data supplied from the multiplier 32.
g (i, j) × (x (i, j) −s (i, j))
Is added to each pixel value s (i, j) of the smoothed image data, which is the offset amount subtracted by the subtractor 31, and the output image data obtained as a result is output to the camera signal processing circuit 13. .
[0023]
The camera signal processing circuit 13 performs predetermined data processing on the output image data, and sends the resulting output image data to a VTR (Video Tape Recorder) 14 for recording.
[0024]
Next, the image processing in the image processing circuit 12 in FIG. 1 will be described with reference to the flowchart in FIG. This process is started when input image data is supplied from the image sensor 11 in accordance with a user's command.
[0025]
In step S1, the delay circuit 21 acquires input image data supplied from the image sensor 11.
[0026]
In step S2, the non-linear smoother 22 acquires the input image data supplied from the image sensor 11.
[0027]
In step S3, the non-linear smoother 22 extracts an edge component whose pixel value changes sharply from the input image data acquired in the process of step S2, and does not smooth the edge component without smoothing. On the other hand, the small amplitude components other than the edge components are smoothed, so that the input image data is smoothed while the edge components of the input image data are preserved to generate smoothed image data. I do. Details of the processing will be described later with reference to FIGS. The non-linear smoother 22 supplies the generated smoothed image data to the subtractor 31 and the adder 33.
[0028]
In step S4, the delay circuit 21 delays the input image data acquired by the processing in step S1 by a predetermined amount, and sends the input image data to the subtracter 31 as delayed image data.
[0029]
In step S5, the subtractor 31 is supplied from the non-linear smoother 22 from each pixel value x (i, j) of the delayed image data (the processing in step S4) supplied from the delay circuit 21 (the processing in step S3). ) Subtract each pixel value s (i, j) of the smoothed image data to generate difference image data. The subtracter 31 supplies the generated difference image data to the multiplier 32.
[0030]
In step S6, the multiplier 32 adds a gain coefficient g to each pixel value (x (i, j) -s (i, j)) of the difference image data supplied from the subtractor 31 (processing in step S5). The signal is amplified by multiplying by (i, j), and the resulting difference image data is sent to the adder 33. As the gain coefficient g (i, j), a uniform value for the entire screen or a value set for each pixel (i, j) is used.
[0031]
In step S7, the adder 33 determines each pixel value of the differential image data supplied from the multiplier 32 by the processing in step S6.
g (i, j) × (x (i, j) −s (i, j))
Is added to each pixel value s (i, j) of the smoothed image data (smoothed image data supplied from the non-linear smoother 22 by the process of step S3), and the resulting output image data To the camera signal processing circuit 13.
[0032]
By the processing of FIG. 2, the image processing circuit 12 can smooth the input image data and obtain output image data subjected to image enhancement processing.
[0033]
FIG. 3 is a block diagram illustrating a configuration example of the nonlinear smoother 22.
[0034]
The linear low-pass filter 51 attenuates the signal level of an extremely high frequency component of the input image data, and sends out the resulting image data to the look-up table 52. The look-up table 52 performs a gradation conversion such as a logarithmic conversion on the image data supplied from the linear low-pass filter 51 (a non-linear conversion is performed on the input image data to generate the non-linear image data). ), And sends the resulting image data to the ε-filter 53.
[0035]
The ε filter 53 is composed of n (three in the example of FIG. 3) ε filters 53A to 53C connected in cascade (cascade connection). The ε filter 53A is a non-linear smoothing filter, that is, a digital filter effective when smoothing a pixel value without impairing a sharp change in the pixel value. Is stored, and the image data is smoothed, and the resulting smoothed image data is sent to the ε filter 53B.
[0036]
The ε filter 53B connected to the subsequent stage of the ε filter 53A and the ε filter 53C connected to the subsequent stage have the same configuration as the ε filter 53A, but differ in the threshold ε and the band (the number of taps). The details of the ε filters 53A to 53C will be described later with reference to FIGS.
[0037]
The ε filter 53B smoothes the image data, and sends the resulting smoothed image data to the ε filter 53C. The ε filter 53C further smoothes the smoothed image data supplied from the ε filter 53B, and supplies the smoothed image data to the lookup table 54.
[0038]
The look-up table 54 performs gradation conversion (inverse of the logarithmic conversion performed by the lookup table 52) on the smoothed image data supplied from the ε filter 53C, and obtains the resulting smoothed image data. To the linear low-pass filter 55.
[0039]
The linear low-pass filter 55 generates smoothed image data by slightly dulling the edges of the smoothed image data that has been smoothed while preserving the edges, and sends this to the subtractor 31 and the adder 33. This makes it possible to maintain the smoothness of the image in the vicinity of the edge in the subsequent image enhancement processing (processing performed by the arithmetic unit 23).
[0040]
FIG. 4 is a block diagram illustrating a detailed configuration example of the ε filter 53A.
[0041]
In the ε filter 53A, the pixels for the filtering process are one-dimensional with 17 taps, and the threshold set by the threshold setting unit 140 is ε. 1 It is said. The ε filter 53A includes registers 101 to 116, a threshold setting unit 140, selectors 141 to 144, amplifiers 161 to 165, an adder 181, and a divider 182. Each of the registers 101 to 116 is a register that holds a pixel value for one pixel.
[0042]
The selector 141 determines the value Xm supplied from the register 116, the pixel value Xn of the central pixel pn supplied from the register 108, and the threshold ε supplied from the threshold setting unit 140. 1 , And supplies the result of the operation to the amplifier 161. The selector 142 determines the value Xm supplied from the register 112, the pixel value Xn of the central pixel pn supplied from the register 108, and the threshold ε supplied from the threshold setting unit 140. 1 , And supplies the operation result to the amplifier 161.
[0043]
The selector 143 calculates the value Xm supplied from the register 104, the pixel value Xn of the central pixel pn supplied from the register 108, and the threshold ε supplied from the threshold setting unit 140. 1 , And supplies the result of the operation to the amplifier 164. The selector 144 receives the input value Xm, the pixel value Xn of the central pixel pn supplied from the register 108, and the threshold ε supplied from the threshold setting unit 140. 1 , And supplies the operation result to the amplifier 165.
[0044]
The register 191 including the registers 101 to 103, the register 192 including the registers 105 to 107, the register 193 including the registers 109 to 111, and the register 194 including the registers 113 to 115 each set an interval. It is provided for.
[0045]
The pixel value Xn of the center pixel pn is supplied from the register 108 to the amplifier 163.
[0046]
Each of the amplifiers 161 to 165 multiplies the input pixel value X by a tap coefficient ak, and sends the calculation result to the adder 181. In this case, the tap coefficients of the amplifiers 161 and 165 are set to 1, and the tap coefficients of the amplifiers 162 to 164 are set to 2. The adder 181 adds the supplied values (the values supplied from the amplifiers 161 to 165) and supplies the result to the dividing unit 182. The division unit 182 divides the supplied value (in the present example, divides by 8) and sends this to the ε filter 53B. Note that the divider 182 may be omitted, the tap coefficients of the amplifiers 161 and 165 may be set to 1 /, and the tap coefficients of the amplifiers 162 to 164 may be set to /.
[0047]
FIG. 5 is a block diagram illustrating a detailed configuration example of the ε filter 53B, and FIG. 6 is a block diagram illustrating a detailed configuration example of the ε filter 53C.
[0048]
As is apparent from a comparison of FIG. 4 with FIGS. 5 and 6, the ε filters 53B and 53C of FIGS. 5 and 6 have basically the same configuration as the ε filter 53A of FIG.
[0049]
That is, the ε filter 53B of FIG. 5 corresponds to the registers 101 to 116, the threshold setting unit 140, the selectors 141 to 144, the amplifiers 161 to 165, the adder 181, and the divider 182 of the ε filter 53A of FIG. , Registers 301 to 308, a threshold setting unit 340, selectors 341 to 344, amplifiers 361 to 365, an adder 381, and a divider 382. Those with corresponding names have corresponding functions.
[0050]
However, the ε filter 53B is set by the threshold setting unit 340 and supplied to the selectors 341 to 344. 2 And the number of registers (in the case of the ε filter 53A of FIG. 6, the number of registers is 16, and in the case of the ε filter 53B of FIG. 8, the number of registers is 8). Filter 53A. In the ε filter 53B, the registers 391 to 394 for setting the interval are each constituted by one register 301, 303, 305, or 307.
[0051]
6 correspond to the registers 101 to 116, the threshold setting unit 140, the selectors 141 to 144, the amplifiers 161 to 165, the adder 181, and the divider 182 of the ε filter 53A in FIG. , Registers 401 to 404, a threshold setting unit 440, selectors 441 to 444, amplifiers 461 to 465, an adder 481, and a divider 482. Those with corresponding names have corresponding functions.
[0052]
However, as in FIG. 5 (ε filter 53B) described above, the ε filter 53C is set by the threshold setting unit 440 and supplied to the selectors 401 to 404. 3 And the number of registers (the number of registers of the ε filter 53A is 16 and the number of registers of the ε filter 53C is 4) are different from the ε filter 53A of FIG. The ε filter 53C is not provided with a register for setting an interval.
[0053]
FIG. 7 is a block diagram showing a configuration example of the selector 141 of FIG.
[0054]
The pixel value Xm of the pixel pm (the pixel value supplied from the register 116 in this example) and the pixel value Xn of the central pixel pn supplied from the register 108 are input to the subtractor 200 and the selector 201. The subtracter 200 calculates the difference between the pixel value Xn and the pixel value Xm, and outputs the result to the absolute value converter 202. The absolute value converter 202 obtains the absolute value | Xn−Xm | of the difference between the pixel value Xn and the pixel value Xm, and outputs this to the magnitude comparator 203.
[0055]
The magnitude comparator 203 calculates the absolute value | Xn−Xm | and a predetermined threshold value ε (in this example, the threshold value ε 1 ) And sends the comparison result to the selector 201. When the absolute value | Xn−Xm | is smaller than the predetermined threshold ε, the selector 201 selects the pixel value Xm and sends it to the amplifier 161 at the subsequent stage, and the absolute value | Xn−Xm | ε 1 If it is larger, the pixel value Xn is selected and sent to the subsequent amplifier 161.
[0056]
Each of the selectors 142 to 144 is configured similarly to the selector 141, and sends the pixel value X of the selected pixel p to the corresponding subsequent amplifier 162, 164, or 165, respectively.
[0057]
The configurations of the selectors 341 to 344 in FIG. 5 and the selectors 441 to 444 in FIG. 6 are the same as those of the selector 141, and a description thereof will be omitted.
[0058]
Next, the non-linear smoothing process in the non-linear smoother 22 in FIG. 3 will be described with reference to the flowchart in FIG. This flowchart explains in detail the processing of steps S2 and S3 in FIG. This process is started when the input image data is supplied from the image sensor 11 to the linear low-pass filter 51 of the nonlinear smoother 22 according to a user's command.
[0059]
In step S31, the linear low-pass filter 51 acquires the input image data supplied from the image sensor 11.
[0060]
In step S32, the linear low-pass filter 51 attenuates the signal level of an extremely high frequency component of the input image data, and transmits the resulting image data to the lookup table 52.
[0061]
As described above, the linear low-pass filter 51 attenuates the signal level of an extremely high frequency component of the input image data, so that when the ε filter 53 (ε filters 53A to 53C) at the subsequent stage performs the smoothing processing, the amplitude of the amplitude is reduced. This prevents large high-frequency components from remaining on the image as point-like noise without being sufficiently smoothed. Note that the linear low-pass filter 51 is configured by applying a one-dimensional linear low-pass filter in the horizontal and vertical directions of an image, respectively, or is configured by a two-dimensional linear low-pass filter.
[0062]
In step S33, the look-up table 52 acquires the image data supplied from the linear low-pass filter 51 by the processing in step S32, and performs, for example, tone conversion such as logarithmic conversion on the obtained image data, The image data obtained as a result is sent to the ε filter 53 (ε filter 53A).
[0063]
By the way, the ε filters 53A to 53C at the subsequent stage have the threshold ε 1 Or ε 3 By performing the smoothing process adaptively in accordance with the amplitude of the image data, the magnitude of the amplitude of the image data generally depends on the intensity of the illumination light illuminating the imaging target. It increases in proportion to that. Therefore, the look-up table 52 performs logarithmic conversion on the image data in advance, so that the same smoothing effect can be obtained regardless of the lighting conditions when performing the smoothing processing in the subsequent ε filters 53A to 53C. I do. At the same time, the look-up table 52 can control the smoothing effect according to the pixel value, for example, by increasing the degree of smoothing in a dark area or a bright area of the image to increase the degree of enhancement in the subsequent image enhancement processing. enable.
[0064]
In step S34, the ε filter 53 (the ε filters 53A to 53C) performs a smoothing process. The details of the smoothing process will be described later with reference to FIG.
[0065]
In step S35, the look-up table 54 converts the smoothed image data supplied from the ε filter 53 (ε filter 53C) into a gradation conversion (inverse of the logarithmic conversion performed by the lookup table 52 by the processing in step S33). Conversion), and sends the resulting smoothed image data to the linear low-pass filter 55.
[0066]
In step S36, the linear low-pass filter 55 slightly smoothes the edges of the smoothed image data (the smoothed image data supplied from the lookup table 54 by the processing in step S35) while maintaining the edges. To generate the smoothed image data and send it to the subtractor 31 and the adder 33 (FIG. 1). This makes it possible to maintain the smoothness of the image in the vicinity of the edge in the image enhancement processing by the arithmetic unit 23 in the subsequent stage.
[0067]
As described above, the processing in steps S4 to S7 in FIG. 2 is further performed on the smoothed data on which the non-linear smoothing processing has been performed by the processing in FIG.
[0068]
FIG. 9 is a flowchart illustrating the smoothing process in step S34 of FIG. This process is started when image data is supplied to the first stage ε filter of the ε filter 53 (that is, in this case, the ε filter 53A) (after the process of step S33 in FIG. 8). You.
[0069]
In step S71, the ε filter 53A sets the first threshold ε 1 And the first interval, the first-stage smoothing process is executed. The details of this processing will be described later with reference to FIG. The ε filter 53A supplies the smoothed data that has been subjected to the first smoothing process to the subsequent ε filter 53B.
[0070]
In step S72, the ε filter 53B sets the second threshold ε 2 And the second interval, the second-stage smoothing process is executed. The ε filter 53B supplies the smoothed data that has been subjected to the second smoothing process to the subsequent ε filter 53C.
[0071]
In step S73, the ε filter 53C sets the third threshold ε 2 And the third interval, a third-stage smoothing process is executed. The ε filter 53C supplies the lookup table 54 with the smoothed data that has been subjected to the third smoothing process as an output of the ε filter 53. As described above, the look-up table 54 performs gradation conversion on the smoothed data (the processing of step S35 in FIG. 8).
[0072]
By the processing of FIG. 9, smoothing processing is performed by the ε filters 53A to 53C provided in the ε filter 53, and smoothed data is generated.
[0073]
Specifically, the ε filter 53A applies {1,0,0,0,2,0,0,0,2,0,0,0,2,0,0, A tap coefficient of 0,1} is calculated, a tap coefficient of {1,0,2,0,2,0,2,0,1} is calculated by the ε filter 53B, and a {1, 0} is calculated by the ε filter 53C. Calculation of tap coefficients of 2, 2, 2, 1} is performed. As a result, the input image data substantially includes {1, 2, 3, 4, 6, 8, 10, 12, 13, 14, 15, 16, 16, 16, 16, 16, 15, 15, 14}. , 13, 12, 10, 8, 6, 6, 4, 3, 2, 1}.
[0074]
That is, by cascading three ε filters (17 tap, 9 tap, and 5 tap ε filters), it is possible to obtain substantially the same effect as the result calculated using the 27 tap nonlinear filter. At this time, the number of comparison operations can be reduced from 26 times to 12 times, and the number of multiplication operations can be reduced from 27 times to 15 times as compared with the case where the calculation is performed using a 27-tap nonlinear filter.
[0075]
In this smoothing process (the process in step S34 in FIG. 8), it is desirable to generate an image with as little change as possible in portions other than the edges. For this purpose, an extremely large filter is used in the ε filter 53A. There is a need. However, when a filter to be used is increased, multiplying all pixels by the tap coefficient ak requires increasing the number of selectors 141 to 144 and amplifiers 161 to 165 at the subsequent stage, which increases the circuit scale.
[0076]
Therefore, in the present embodiment, the register columns (registers 101 to 104, registers 105 to 108, registers 109 to 112, and registers 113 to 116) are each configured by a register for four pixels, and the following arithmetic processing is performed. On the other hand, by applying to only the first pixel (pixels of the register 104, the register 108, the register 112, and the register 116) of each register row, spatially without increasing the circuit scale of the subsequent stage. An ε filter covering a wide range is realized. However, a filter having a significant coefficient only every few pixels can expect a large smoothing effect, but generally tends to have a large side lobe, and unnecessary high frequency components remain in the smoothed image data. Easier to do.
[0077]
Therefore, the ε filter 53B and the ε filter 53C are connected in cascade (cascade) to achieve both the smoothing effect and the suppression of the side lobe.
[0078]
FIG. 10 is a flowchart for explaining the processing in each of steps S71 to S73 in FIG. 9, that is, the smoothing processing (smoothing processing in an arbitrary ε filter) of the n-th stage (n = 1, 2, or 3). It is. This processing is started when input image data is supplied to an arbitrary ε filter 53 that executes the processing.
[0079]
In step S101, each register holds data. For example, when this processing is executed in the ε filter 53A of FIG. 4, the registers 101 to 116 hold the input data. At this time, the held data is supplied to the selectors 141 to 144 as the pixel value Xm of the pixel pm. That is, the pixel values Xm held in the registers 104, 108, 112, and 116 at that time are supplied to the selectors 141 to 144, respectively. The pixel value Xn of the central pixel pn supplied from the register 108 is input to the selectors 141 to 144 and the multiplier 163.
[0080]
In step S102, the subtracters 200 of the selectors 141 to 144 calculate a difference (Xn-Xm) between the pixel value Xm of the pixel pm and the pixel value Xn of the center pixel pn.
[0081]
In step S103, the absolute value converter 202 of each of the selectors 141 to 144 obtains the absolute value | Xn−Xm | of the difference (Xn−Xm) between the difference pixel value Xn and the pixel value Xm calculated by the processing in step S102. Is sent to the magnitude comparator 203.
[0082]
In step S104, the magnitude comparators 203 of the selectors 141 to 144 determine the absolute value | Xn−Xm | and a predetermined threshold ε (in this example, the threshold ε 1 ) And sends the comparison result to the selector 201.
[0083]
In step S105, when the absolute value | Xn−Xm | is smaller than the predetermined threshold value ε, the selector 201 of the selectors 141 to 144 selects the pixel value Xm and sends it to the amplifier 161 at the subsequent stage, where the absolute value | Xn−Xm | is a predetermined threshold ε 1 If it is larger, the pixel value Xn is selected and sent to the amplifier 161. At this time, the pixel value supplied to the amplifier 161 is set as a pixel value X.
[0084]
In step S106, the amplifiers 161 to 165 multiply the input pixel value X by the tap coefficient ak, and send the operation result to the adder 181. That is, the amplifiers 161 to 165 weight the pixel value X. In the case of the present example, the tap coefficients of the amplifiers 161 and 165 are 1, and the tap coefficients of the amplifiers 162 to 164 are 2, so that the pixel value X is multiplied by 1 or 2.
[0085]
In step S107, the adder 181 adds the respective values supplied from the amplifiers 161 to 165, and supplies the result to the divider 182.
[0086]
In step S108, the divider 182 divides the value supplied from the adder 181 (divides by 8 in the present example), and sends this to the ε filter 53B. Then, the process returns to FIG. 9, and thereafter (step S72 in this case) is performed.
[0087]
By the processing in FIG. 10, the ε filter 53 (ε filters 53A to 53C), which is a non-linear smoothing filter, smoothes the pixel value without impairing the sharp change of the pixel value, and the image supplied from the lookup table 52. The image data can be smoothed while retaining the edges of the data (the image data supplied from the lookup table 52 by the processing in step S32 in FIG. 8). When the smoothing process (the process of FIG. 10) in the ε filter 53 is summarized, when the pixel for the filter process is one-dimensional and has 2N + 1 taps, it is expressed by Expression (1).
(Equation 1)
Figure 2004172726
[0088]
That is, the ε filter 53 compares the absolute value | Xn−Xn−k | of the difference between the pixel value Xn of the center pixel pn of the filtering process and the pixel value Xn−k of the pixel pn−k with the predetermined threshold value ε. As a result, when the ε filter 53A determines that the absolute value | Xn−Xn−k | is smaller than the predetermined threshold ε, the ε filter 53A substitutes the pixel value Xn−k into wn−k and sets ak to each tap coefficient. By performing the same processing as that of the ordinary linear low-pass filter described above, the image is uniformly smoothed around the center pixel pn.
[0089]
On the other hand, when the ε filter 53 determines that the absolute value | Xn−Xn−k | is larger than the predetermined threshold ε, the ε filter 53 substitutes the pixel value Xn into wn−k, and By substituting the pixel value Xn-k with the pixel value Xn of the central pixel pn and then performing a low-pass filter process around the central pixel pn, the pixel value Xn-k is ignored and only the pixel values near the pixel value Xn are used. Perform smoothing.
[0090]
FIG. 11 is a diagram illustrating pixel values held in registers 101 to 116 of the ε filter 53A (a 17-tap ε filter).
[0091]
In FIG. 11, the pixel value of the filter center pixel is C, and the pixel values on the left side of the center pixel are X1, X2, X3, L1, X4, X5, X6, and L2. The pixel values on the right side of the center pixel are Y1, Y2, Y3, R1, Y4, Y5, Y6, and R2.
[0092]
Usually, the scanning of the line is performed from the upper left to the lower right, so that the leftmost pixel value L2 in the figure is scanned first and the rightmost pixel value R2 is scanned last, so that the pixel value L2 Are stored in the register 116, the pixel value X6 is stored in the register 115, and the pixel value X5 is stored in the register 114. .., The pixel value Y6 is stored in the register 101, and the pixel value R2 is directly supplied to the selector 144 (see FIG. 11). A register for latching the pixel value R2 may be provided).
[0093]
As described above, the tap coefficients of the ε filter 53A are {1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1}. The coefficients of L2 and R2 are set to 1, the coefficients of L1, C1 and R1 are set to 2, and X1 to X6 (respectively held in registers 115, 114, 113, 111, 110 and 109), and Y1 to X1 The coefficient of Y6 (respectively held in registers 107, 106, 105, 103, 102, and 101) is set to 0 (the output of each register is not supplied to adder 181).
[0094]
When the above equation (1) is applied, for example, the absolute value | C−L1 | of the difference between the pixel value C and the pixel value L1 becomes a predetermined threshold ε 1 Is compared with a predetermined threshold ε 1 If the pixel value is larger than the pixel value L, the pixel value L1 is replaced with the pixel value C. The pixel value of the result calculated for each of R2, Y6, Y5, Y4, R1, Y3, Y2, Y1, X1, X2, X3, L1, X4, X5, X6, and L2 by equation (1) is R2 ', Y6', Y5 ', Y4', R1 ', Y3', Y2 ', Y1', X1 ', X2', X3 ', L1', X4 ', X5', X6 ', and L2' , The pixel value C ′ output from the ε filter 53A is obtained by calculating Expression (2) (Expression (2) is an expression obtained by summarizing the processing of Steps S106 to S108 in FIG. 10). ).
(Equation 2)
Figure 2004172726
[0095]
FIG. 12 is a diagram illustrating the relationship between the thresholds ε in the ε filters 53A to 53C.
[0096]
The threshold value ε in the ε filters 53A to 53C increases as the ε filter 53 is located at a later stage. That is, in this case, the threshold ε 123 It is said.
[0097]
The larger the threshold value ε is, the more likely a summarization occurs (that is, blurring occurs and noise is removed), and the smaller the threshold value ε is, the less likely the summarization occurs (namely, blurring occurs and noise remains).
[0098]
For example, the number of taps is 3, the tap coefficients are {1, 2, 1}, L1, C, and R1 are L1 = 30, C = 100, and R1 = 80, respectively, and the threshold ε is 50. In this case, L1 ′ = 100 (R1 ′ is left as it is (R1)) according to the equation (1). In addition, C ′ = {1 × 100 + 2 × 100 + 1 × 80} / 4 is calculated by Expression (2), and the output pixel C ′ = 95. On the other hand, for example, when the number of taps is 3, the tap coefficient is {1, 2, 1}, L1 = 30, C = 100, R1 = 80, and the threshold ε is 80 (that is, In the case where only the value of the threshold ε is different from the example described above), L1 ′ and R1 ′ are set to the same values (L1, R1) from Expression (1). In addition, C ′ = {1 × 30 + 2 × 100 + 1 × 80} / 4 is calculated by equation (2), and the output pixel C ′ is set to 77.5. As described above, the larger the threshold ε is (the more the threshold ε is 80 than 50 in the present example), the more the output image is blurred (the more blur is generated).
[0099]
FIG. 13 is a diagram for explaining the pixel values held in the registers 301 to 308 of the ε filter 53B (9-tap ε filter). FIG. 14 is a diagram illustrating the pixels held in the registers 301 to 308 of the ε filter 53C. It is a figure explaining a value.
[0100]
In FIG. 13, the pixel value of the filter center pixel is C, and the pixel values on the left side of the center pixel are X1, L1, X2, and L2. The pixel values on the right side of the center pixel are Y1, R1, Y2, and R2. As described above, since the tap coefficients of the ε filter 53B are {1, 0, 2, 0, 2, 0, 2, 0, 1}, the coefficients of L2 and R2 are 1, and the coefficients of L1, C1, and R1 are The coefficient is 2, and the coefficients of X1, X2, Y1, and Y2 (stored in registers 307, 305, 303, and 301, respectively) are 0.
[0101]
In the ε filter 53C of FIG. 14, the pixel value of the filter center pixel is C, and the pixel values on the left side of the center pixel are L1 and L2. The pixel values on the right side of the center pixel are R1 and R2. As described above, since the tap coefficients of the ε filter 53C are {1, 2, 2, 2, 1}, the coefficients of L2 and R2 are set to 1, and the coefficients of L1, C1 and R1 are set to 2.
[0102]
Thus, the interval of the ε filter 53A is 4 (= 2 2 ) (The number of registers for setting the interval is three), and the interval of the ε filter 53B is 2 (= 2 1 ) (The number of registers for setting the interval is one), and the interval of the ε filter 53C is 1 (= 2 0 ) (The number of registers for setting the interval is 0).
[0103]
Here, the output pixel value C ′ is obtained by applying the above-described equations (1) and (2) to each pixel value. At this time, the output pixel value C ′ calculated by the ε filter 53B has more noise than the ε filter 53A having a large number of taps. The output pixel value C ′ calculated by the ε filter 53C has more noise than the ε filter 53B having a large number of taps. That is, the magnitude of the noise is small in the ε filter 53A having a large number of taps, and increases as the ε filter 53C (the number of taps) in the subsequent stage is small.
[0104]
Therefore, as shown in FIG. 12, the threshold value ε of the ε filter 53 is changed by the number of taps of the ε filter (in the ε filter 53A having a large number of taps, the threshold value ε 1 In the ε filter 53C with a small number of taps, the threshold ε 3 Is increased), it is possible to suppress noise of all the output pixel values C ′ of the ε filters 53A to 53C.
[0105]
FIG. 15 is a diagram illustrating image data to be subjected to smoothing processing.
[0106]
The input image data on the left side in the figure is subjected to a smoothing process by the ε-filter 53 to be image data as shown on the right side in the figure.
[0107]
That is, when the absolute value of the difference between the pixel values before and after the steep edge exceeds a predetermined threshold value ε, the center pixel pn is set as the center, and the pixel value Xm of the pixel pm is set to the center pixel pn when performing the low-pass filtering. By performing low-pass filter processing in place of the pixel value Xn, smoothing is performed in the vicinity of the pixel value Xn. On the other hand, when performing low-pass filter processing centering on the pixel pm, smoothing is performed in the vicinity of the pixel value Xm.
[0108]
At this time, the ε filter 53A outputs the pixel value X of the pixel p in the edge portion substantially as it is, for the pixel p in the edge portion where the pixel p close to the pixel value X does not exist within the range for performing the filtering process, The sharp change of the edge is stored as it is (Equation (1)). Incidentally, the ε filter 53A is, similarly to the linear low-pass filter 51, configured by applying a one-dimensional ε filter in the horizontal direction and the vertical direction of the image, respectively, and configured by a two-dimensional ε filter. There is.
[0109]
FIG. 16 is a diagram illustrating the frequency response of the ε filters 53A to 53C.
[0110]
In FIG. 16, the horizontal axis represents the frequency normalized with the Nyquist frequency being 0.5, and the vertical axis represents the filter frequency response. 53A, 53B, and 53C indicate frequency responses corresponding to the ε filter 53A, the ε filter 53B, and the ε filter 53C, respectively.
[0111]
By setting the interval (decimation) of the number of taps of the ε filter 53 (for example, ε filter 53A) to a power of 2, as shown in FIG. 16, the frequency response waveform of the ε filter 53A (for example, interval = 4) Can be canceled by the frequency response of the ε filter 53B (for example, interval = 2) (the peak point of the side lobe in the frequency response waveform of the ε filter 53A and the frequency response waveform of the ε filter 53B). Are canceled because the 0 points in are the same). That is, the side lobe of the previous ε-filter 53 can be suppressed by the next ε-filter 53, so that both the smoothing effect and the suppression of the side lobe can be achieved.
[0112]
As described above, the smoothed image data smoothed by the ε filter 53 is calculated by the calculation unit 23 and supplied to the camera signal processing circuit 13 as an output of the image processing circuit 12. At this time, each pixel value y (i, j) of the output image data output from the image processing circuit 12 is represented by Expression (3).
[Equation 3]
Figure 2004172726
[0113]
In equation (3), the gain coefficient g (i, j) is replaced with a uniform gain coefficient G for the entire screen, and each pixel value s (i, j) of the smoothed image data is replaced with the dynamic range of the input image data. When replaced by the median value or the average value C of all pixel values, this equation (3) is expressed as equation (4) showing a conventional contrast enhancement method by tone curve adjustment.
(Equation 4)
Figure 2004172726
[0114]
In the equation (3), the gain coefficient g (i, j) is replaced with a uniform gain coefficient G for the entire screen, and each pixel value s (i, j) of the smoothed image data is replaced with each of the input image data. When the pixel values x (i, j) are replaced with the pixel values f (i, j) of the image data obtained by performing the linear low-pass filter processing, the expression (3) is expressed by the conventional high-frequency component enhancement method using an unsharp mask. Is expressed as shown in Expression (5).
(Equation 5)
Figure 2004172726
[0115]
As described above, the conventional contrast enhancement method is a method in which image enhancement processing is performed independently for each pixel of an image, and the conventional high-frequency component enhancement method is a method in which a peripheral pixel existing around a central pixel is compared with a peripheral pixel existing around the central pixel. In contrast to the method of performing image enhancement processing based on a relative level difference, the method according to the present embodiment integrates a conventional contrast enhancement method and a high-frequency component enhancement method using a nonlinear smoothing filter. This enables a higher quality image enhancement process.
[0116]
Also, a method using a conventional nonlinear smoothing filter (amplifying and displaying a portion other than the edge by amplifying a portion other than the edge of the input image data while preserving an edge having a sharp change in pixel value). On the other hand, the method according to the present embodiment sets the interval of the number of taps of the ε filter 53 to a power of 2 and changes the threshold ε of the ε filter 53 in accordance with the band of the filter. The amount of calculation can be reduced even when a portion other than the sharp edge is smoothed while the sharply changing edge is preserved.
[0117]
As described above, the threshold ε is set according to the band (in the case of a narrow band filter (ε filter with a large number of taps), the threshold ε is reduced, and in the case of a wide band filter (an ε filter with a small number of taps), The threshold value ε is increased), the ε filters are cascaded in order from the narrow band filter to the wide band filter, and the interval of the ε filter (substantially, the extraction interval of the pixel to be processed) is set to a power of two, whereby the pixel The amount of calculation can be reduced even when a portion other than the edge is smoothed while an edge having a sharp change in value is preserved.
[0118]
Further, it is possible to obtain an output image in which noise hardly occurs and the amount of calculation is suppressed.
[0119]
Further, an image in which side lobes are suppressed can be output.
[0120]
Further, in the above-described embodiment, the case where the present invention is applied to the video camera 1 has been described. However, the present invention is not limited to this, and various other images such as an electronic still camera, a printer, a display, and a computer may be used. The present invention can be widely applied to a processing apparatus. In this case, when correcting the image contrast, the computer can obtain a high-quality contrast-corrected image while maintaining the dynamic range, and when synthesizing images obtained under different lighting conditions, the respective contrasts can be improved. Only the difference between the components can be corrected, and a natural synthesized image can be generated.
[0121]
In the above example, the number of ε filters included in the non-linear smoother 22 is three (ε filter 53A, ε filter 53B, and ε filter 53C), but any number of ε filters 53 are provided. You may do so. Of course, in this case, if the N-th ε filter is the ε filter 53N, the threshold ε of the ε filter 53A 1 Is minimized, and the threshold ε of the ε filter 53N connected at the subsequent stage is N Is the maximum (ε 1N ).
[0122]
In the above example, the ε filter is used. However, not only the ε filter but also a median filter or the like may be used.
[0123]
Note that, in this specification, the steps describing each flowchart refer to not only processes performed in chronological order according to the described order, but also processes performed in parallel or individually even if not necessarily performed in chronological order. Is also included.
[0124]
【The invention's effect】
As described above, according to the present invention, the amount of calculation can be suppressed even when a portion other than the edge is smoothed while an edge having a sharp change in pixel value is stored. In particular, according to the present invention, it is possible to output an image in which noise is less likely to occur and side lobes are suppressed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a functional configuration of a video camera to which the present invention is applied.
FIG. 2 is a flowchart illustrating image processing in the image processing circuit of FIG. 1;
FIG. 3 is a block diagram illustrating a functional configuration of the nonlinear smoother in FIG. 1;
FIG. 4 is a block diagram illustrating a configuration example of an ε filter of FIG. 2;
FIG. 5 is a block diagram showing a configuration example of another ε filter of FIG. 2;
FIG. 6 is a block diagram illustrating a configuration example of still another ε filter of FIG. 2;
FIG. 7 is a block diagram illustrating a configuration example of a selector of FIG. 4;
FIG. 8 is a flowchart illustrating a nonlinear smoothing process in the nonlinear smoother of FIG. 2;
FIG. 9 is a flowchart illustrating a process in step S34 of FIG. 8;
FIG. 10 is a flowchart illustrating processing in steps S71 to S73 of FIG. 9;
FIG. 11 is a diagram illustrating pixel values held in the register of FIG. 4;
FIG. 12 is a diagram illustrating a relationship between threshold values in each ε filter of FIG. 3;
FIG. 13 is a diagram illustrating pixel values held in the register of FIG. 5;
FIG. 14 is a diagram illustrating pixel values held in the register of FIG. 6;
FIG. 15 is a diagram illustrating image data to be subjected to smoothing processing.
FIG. 16 is a diagram illustrating a relationship between the number of taps and a frequency response.
[Explanation of symbols]
Reference Signs List 1 video camera, 11 image pickup device, 12 image processing circuit, 21 delay circuit, 22 nonlinear smoother, 23 operation unit, 31 subtractor, 32 multiplier, 33 adder, 51 linear low-pass filter, 52 lookup table, 53 ε filter, 54 look-up table, 55 linear low-pass filter, 101 to 116 registers, 141 to 144 selector, 161 to 165 amplifier, 181 adder, 182 divider, 140 threshold setting unit, 200 subtractor, 201 selector, 202 Absolute value converter, 203 large / small comparator

Claims (7)

入力画像データを処理する画像処理装置において、
前記入力画像データを平滑化し、平滑化画像データを生成する平滑化手段を備え、
前記平滑化手段は、縦属に接続された、平滑化の度合いを制御するパラメータおよび帯域に関するインターバルが異なる複数の非線形フィルタからなる
ことを特徴とする画像処理装置。
In an image processing device that processes input image data,
Smoothing the input image data, comprising a smoothing means to generate smoothed image data,
The image processing apparatus according to claim 1, wherein the smoothing means includes a plurality of non-linear filters connected in tandem and having different parameters for controlling a degree of smoothing and intervals related to bands.
前記平滑化手段は、中心画素とその近傍画素の差分値に基づいて、平滑化の度合いを適応的に変化させる
ことを特徴とする請求項1に記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein the smoothing unit adaptively changes a degree of smoothing based on a difference value between a central pixel and a neighboring pixel.
前記非線形フィルタのパラメータの値は、後段の方が前段に較べて大きい
ことを特徴とする請求項1に記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein parameter values of the non-linear filter are larger in a latter stage than in a preceding stage. 3.
前記非線形フィルタのインターバルの値は、後段の方が前段に較べて小さい
ことを特徴とする請求項1に記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein the value of the interval of the nonlinear filter is smaller in a subsequent stage than in a preceding stage.
前記非線形フィルタのインターバルは2のべき乗とされる
ことを特徴とする請求項4に記載の画像処理装置。
The image processing apparatus according to claim 4, wherein an interval of the nonlinear filter is a power of two.
前記非線形フィルタは、εフィルタまたはメディアンフィルタとされる
ことを特徴とする請求項1に記載の画像処理装置。
The image processing device according to claim 1, wherein the nonlinear filter is an ε filter or a median filter.
入力画像データを処理する画像処理装置の画像処理方法において、
前記入力画像データを平滑化し、平滑化画像データを生成する平滑化ステップを含み、
前記平滑化ステップの処理は、縦属に接続された、平滑化の度合いを制御するパラメータおよび帯域に関するインターバルが異なる複数の非線形フィルタにより行なわれる
ことを特徴とする画像処理方法。
In an image processing method of an image processing device that processes input image data,
Smoothing the input image data, including a smoothing step of generating smoothed image data,
An image processing method, wherein the processing of the smoothing step is performed by a plurality of non-linear filters connected in tandem and having different parameters for controlling the degree of smoothing and intervals related to bands.
JP2002333488A 2002-11-18 2002-11-18 Image processing apparatus and method Expired - Lifetime JP4273748B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002333488A JP4273748B2 (en) 2002-11-18 2002-11-18 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002333488A JP4273748B2 (en) 2002-11-18 2002-11-18 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2004172726A true JP2004172726A (en) 2004-06-17
JP4273748B2 JP4273748B2 (en) 2009-06-03

Family

ID=32698186

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002333488A Expired - Lifetime JP4273748B2 (en) 2002-11-18 2002-11-18 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4273748B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008020487A1 (en) * 2006-08-17 2008-02-21 Fujitsu Limited Image processing device, image processing program, and image processing method
JP2008153917A (en) * 2006-12-18 2008-07-03 Sony Corp Imaging device, image processor, image processing method, program for image processing method, and recording medium with program for image processing method recorded thereon
EP1947837A2 (en) 2007-01-18 2008-07-23 Sony Corporation Imaging and noise removal
JP2008236072A (en) * 2007-03-16 2008-10-02 Toshiba Corp Imaging processor and its method
WO2009072208A1 (en) * 2007-12-06 2009-06-11 Fujitsu Limited Image processing device, image processing program, and image processing method
WO2009081485A1 (en) * 2007-12-25 2009-07-02 Fujitsu Limited Image processing apparatus, image processing method and image processing program
US7742653B2 (en) 2005-09-27 2010-06-22 Fujifilm Corporation Image processing apparatus and image processing method
JP2011065641A (en) * 2010-09-01 2011-03-31 Toshiba Corp Image processing apparatus, display device and image processing method
JP2014119941A (en) * 2012-12-17 2014-06-30 Ricoh Co Ltd Image processing apparatus, image processing method, and imaging apparatus

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7742653B2 (en) 2005-09-27 2010-06-22 Fujifilm Corporation Image processing apparatus and image processing method
JP4847531B2 (en) * 2006-08-17 2011-12-28 富士通株式会社 Image processing apparatus, image processing program, and image processing method
WO2008020487A1 (en) * 2006-08-17 2008-02-21 Fujitsu Limited Image processing device, image processing program, and image processing method
US8213736B2 (en) 2006-08-17 2012-07-03 Fujitsu Limited Image processing device and image processing method
JPWO2008020487A1 (en) * 2006-08-17 2010-01-07 富士通株式会社 Image processing apparatus, image processing program, and image processing method
JP2008153917A (en) * 2006-12-18 2008-07-03 Sony Corp Imaging device, image processor, image processing method, program for image processing method, and recording medium with program for image processing method recorded thereon
EP1947837A2 (en) 2007-01-18 2008-07-23 Sony Corporation Imaging and noise removal
JP2008236072A (en) * 2007-03-16 2008-10-02 Toshiba Corp Imaging processor and its method
WO2009072208A1 (en) * 2007-12-06 2009-06-11 Fujitsu Limited Image processing device, image processing program, and image processing method
JP4962573B2 (en) * 2007-12-06 2012-06-27 富士通株式会社 Image processing device
US8478063B2 (en) 2007-12-06 2013-07-02 Fujitsu Limited Image processing apparatus and image processing method
JP4952796B2 (en) * 2007-12-25 2012-06-13 富士通株式会社 Image processing device
WO2009081485A1 (en) * 2007-12-25 2009-07-02 Fujitsu Limited Image processing apparatus, image processing method and image processing program
US8311356B2 (en) 2007-12-25 2012-11-13 Fujitsu Limited Image processing apparatus and image processing method
JP2011065641A (en) * 2010-09-01 2011-03-31 Toshiba Corp Image processing apparatus, display device and image processing method
JP2014119941A (en) * 2012-12-17 2014-06-30 Ricoh Co Ltd Image processing apparatus, image processing method, and imaging apparatus

Also Published As

Publication number Publication date
JP4273748B2 (en) 2009-06-03

Similar Documents

Publication Publication Date Title
JP4662190B2 (en) Image processing apparatus, image processing method, and image processing program
JP4415236B2 (en) Image processing apparatus and image processing method
JP3828251B2 (en) Video dynamic range expansion device
JP4894595B2 (en) Image processing apparatus and method, and program
JP5157753B2 (en) Image processing apparatus, image processing method, and image processing program
JP4526445B2 (en) Imaging device
JP4273428B2 (en) Image processing apparatus, image processing method, program for image processing method, and recording medium recording program for image processing method
JP2001275015A (en) Circuit and method for image processing
KR100694090B1 (en) Methods and apparatus of preventing noise boost in image contrast enhancement systems
JP4214457B2 (en) Image processing apparatus and method, recording medium, and program
JP2008511048A (en) Image processing method and computer software for image processing
JP5392560B2 (en) Image processing apparatus and image processing method
JP2009071621A (en) Image processor and digital camera
JP2005520442A (en) Method and apparatus for processing sensor images
WO2007036853A2 (en) Image detail enhancement
JP2008160740A (en) Image processing apparatus
JP4111980B2 (en) Image processing apparatus and image processing method
JP5701640B2 (en) Image processing device
WO2016111020A1 (en) Image processing device, image capturing device, image processing method, and image processing program
JP4273748B2 (en) Image processing apparatus and method
JP2007180851A (en) Gray scale transformation device, program and method for raw image, and electronic camera
JP2011015277A (en) Image processing device, image processing method, image processing program, and recording medium recording image processing program
JP6335614B2 (en) Image processing apparatus, control method thereof, and program
JP5197447B2 (en) Image processing apparatus and imaging apparatus
JP2009081526A (en) Imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051108

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080401

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

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

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

Free format text: PAYMENT UNTIL: 20120313

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130313

Year of fee payment: 4