JP4273748B2 - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- JP4273748B2 JP4273748B2 JP2002333488A JP2002333488A JP4273748B2 JP 4273748 B2 JP4273748 B2 JP 4273748B2 JP 2002333488 A JP2002333488 A JP 2002333488A JP 2002333488 A JP2002333488 A JP 2002333488A JP 4273748 B2 JP4273748 B2 JP 4273748B2
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Image Processing (AREA)
- Picture Signal Circuits (AREA)
- Facsimile Image Signal Circuits (AREA)
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により設定された閾値がε1とされる。εフィルタ53Aは、レジスタ101乃至116、閾値設定部140、セレクタ141乃至144、増幅器161乃至165、加算器181、並びに割算器182により構成される。レジスタ101乃至116は、それぞれ1画素分の画素値を保持するレジスタである。
【0042】
セレクタ141は、レジスタ116から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値ε1に基づいて、演算を行ない、演算を行なった結果を増幅器161に供給する。セレクタ142は、レジスタ112から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値ε1に基づいて演算を行ない、演算結果を増幅器161に供給する。
【0043】
セレクタ143は、レジスタ104から供給された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値ε1に基づいて、演算を行ない、演算を行なった結果を増幅器164に供給する。セレクタ144は、入力された値Xm、レジスタ108から供給された中心画素pnの画素値Xn、並びに閾値設定部140から供給された閾値ε1に基づいて演算を行ない、演算結果を増幅器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に供給される閾値ε2の値と、レジスタの数(図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に供給される閾値ε3の値と、レジスタの数(εフィルタ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 |と、所定の閾値ε(いまの例の場合、閾値ε1)とを比較し、その比較結果をセレクタ201に送出する。セレクタ201は、絶対値|Xn −Xm |が所定の閾値εよりも小さい場合には、画素値Xm を選択して後段の増幅器161に送出するとともに、絶対値|Xn −Xm |が所定の閾値ε1よりも大きい場合には、画素値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は、閾値ε1乃至ε3の大きさを異ならせることにより、相対的に画像データの振幅に応じて適応的な平滑化処理を行うが、一般に画像データの振幅の大きさは、撮像対象を照明している照明光の強さに比例して大きくなる。そこでルックアップテーブル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のインターバルにより第1段の平滑化処理を実行する。なお、この処理の詳細は、図10を参照して後述する。εフィルタ53Aは、第1の平滑化処理を実行した平滑化データを後段のεフィルタ53Bに供給する。
【0070】
ステップS72において、εフィルタ53Bは、第2の閾値ε2と第2のインターバルにより第2段の平滑化処理を実行する。εフィルタ53Bは、第2の平滑化処理を実行した平滑化データを後段のεフィルタ53Cに供給する。
【0071】
ステップS73において、εフィルタ53Cは、第3の閾値ε2と第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 |と所定の閾値ε(いまの例の場合、閾値ε1)とを比較し、その比較結果をセレクタ201に送出する。
【0083】
ステップS105において、セレクタ141乃至144のセレクタ201は、絶対値|Xn −Xm |が所定の閾値εよりも小さい場合には、画素値Xm を選択して後段の増幅器161に送出し、絶対値|Xn −Xm |が所定の閾値ε1よりも大きい場合には、画素値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】
【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|が、所定の閾値ε1と比較され、所定の閾値ε1よりも大きいとされた場合、画素値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】
【0095】
図12は、εフィルタ53A乃至εフィルタ53Cにおける閾値εの関係を説明する図である。
【0096】
εフィルタ53A乃至εフィルタ53Cにおける閾値εは、後段のεフィルタ53になるほど、大きくなる。すなわち、この場合、閾値ε1<ε2<ε3とされる。
【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(=22)(インターバル設定のためのレジスタの数は3個)、εフィルタ53Bのインターバルは、2(=21)(インターバル設定の為のレジスタの数は1個)、εフィルタ53Cのインターバルは、1(=20)(インターバル設定のためのレジスタの数は0個)とされる。
【0103】
ここで、それぞれの画素値に対して上述した式(1)と式(2)が適用されることにより、出力画素値C’が得られる。このとき、タップ数が大きいεフィルタ53Aに比較して、εフィルタ53Bにより演算される出力画素値C’は、ノイズが多くなる。また、タップ数が大きいεフィルタ53Bに比較して、εフィルタ53Cにより演算される出力画素値C’は、ノイズが多くなる。すなわち、ノイズの大きさは、タップ数の多いεフィルタ53Aにおいてはノイズが少なく、後段のεフィルタ53C(タップ数が少ない)になるに連れて、ノイズが多くなる。
【0104】
そこで、図12に示されるように、εフィルタ53の閾値εを、εフィルタのタップ数により変化させる(タップ数の多いεフィルタ53Aにおいては、閾値ε1を小さくさせ、タップ数の少ないεフィルタ53Cにおいては、閾値ε3を大きくさせる)ことにより、εフィルタ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】
【0113】
式(3)において、ゲイン係数g(i,j)を全画面に一様なゲイン係数Gに置き換えると共に、平滑化画像データの各画素値s(i,j)を入力画像データのダイナミックレンジの中央値又は全画素値の平均値Cに置き換えると、この式(3)は、従来のトーンカーブ調整によるコントラスト強調方法を示す式(4)のように表わされる。
【数4】
【0114】
また、式(3)において、ゲイン係数g(i,j)を全画面に一様なゲイン係数Gに置き換えると共に、平滑化画像データの各画素値s(i,j)を入力画像データの各画素値x(i,j)に線形ローパスフィルタ処理を施した画像データの各画素値f(i,j)に置き換えると、この式(3)は、従来のアンシャープマスクによる高域成分強調方法を示す式(5)のように表わされる。
【数5】
【0115】
このように、従来のコントラスト強調方法は、画像の各画素毎に独立して画像強調処理を行う方法であると共に、従来の高域成分強調方法は、中心画素の周辺に存在する周辺画素との相対的なレベル差を基に画像強調処理を行う方法であるのに対して、本実施の形態による方法は、非線形平滑化フィルタを用いて従来のコントラスト強調方法及び高域成分強調方法を統合し、一段と高品位な画像強調処理を可能にしている。
【0116】
また、従来の非線形平滑化フィルタを用いた方法(入力画像データのうち画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を増幅することにより、エッジ以外の部分を強調して表示する方法)に対して、本実施の形態による方法は、εフィルタ53のタップ数のインターバルを2のべき乗とし、εフィルタ53の閾値εをフィルタの帯域にあわせて変更することにより、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができる。
【0117】
以上のように、帯域に応じた閾値εを設定し(狭帯域フィルタ(タップ数の多いεフィルタ)の場合は、閾値εを小さくし、広帯域フィルタ(タップ数の少ないεフィルタ)の場合は、閾値εを大きくする)、狭帯域フィルタから広帯域フィルタの順番にεフィルタをカスケード接続し、さらに、εフィルタのインターバル(実質的に処理する画素の抽出間隔)を2のべき乗とすることにより、画素値の変化が急峻なエッジを保存したまま当該エッジ以外の部分を平滑化する場合においても、計算量を抑えることができる。
【0118】
また、ノイズが生じにくく、かつ、計算量を抑えた出力画像を得ることができる。
【0119】
また、サイドローブを抑えた画像を出力させることができる。
【0120】
さらに上述の実施の形態においては、本発明をビデオカメラ1に適用した場合について述べたが、本発明はこれに限らず、例えば電子スチルカメラ、プリンタ、ディスプレイ、コンピュータのような他の種々の画像処理装置に本発明を広く適用し得る。この場合、コンピュータでは、画像コントラストを修正する際、ダイナミックレンジを維持しながら高品位なコントラスト修正画像を得ることができ、また異なる照明条件下で得られた画像同士を合成する際、それぞれのコントラスト成分の違いのみを補正でき、自然な合成画像を生成することができる。
【0121】
なお、以上の例においては、非線形平滑化器22が備えるεフィルタの数を3個(εフィルタ53A,εフィルタ53B、およびεフィルタ53C)としたが、任意のN個のεフィルタ53を備えるようにしてもよい。勿論、その場合、N番目のεフィルタをεフィルタ53Nとすると、εフィルタ53Aの閾値ε1は最小とされ、後段に接続されるεフィルタ53Nの閾値εNは最大とされる(ε1<εN)。
【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]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and method, and in particular, image processing capable of suppressing the amount of calculation even when smoothing a portion other than an edge while preserving an edge with a sharp change in pixel value. The present invention relates to an apparatus and a method.
[0002]
[Prior art]
Conventional video cameras improve the contrast (brightness and darkness) and sharpness (brightness of boundaries) of images captured by image sensors such as CCD (Charge Coupled Device) and CMOS (Complementary Metal-Oxide Semiconductor). 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 are considered.
[0003]
As a contrast enhancement method, tone curve adjustment for converting each pixel level of an image with a function having a predetermined input / output relationship (hereinafter referred to as a level conversion function), or frequency distribution of pixel levels A method called histogram equalization has been proposed in which the level conversion function is adaptively changed according to the frequency.In addition, as a high-frequency component enhancement method, so-called contour enhancement that extracts edges from an image and emphasizes the extracted edges is proposed. A method called an unsharp mask has been proposed.
[0004]
However, in contrast enhancement methods, in addition to the problem that the contrast can be improved only in a part of the luminance range in the entire dynamic range (difference between the maximum level and the minimum level) of the image, in addition, in the case of tone curve adjustment However, there is a problem that the contrast is lowered in the brightest and darkest parts of the image, and in the case of histogram equalization, in the vicinity of the luminance region where the frequency distribution is small. Further, in the high frequency component enhancement method, only the contrast of the high frequency component of the image is enhanced, and thus, there is a problem that it is inevitable that the vicinity of the edge of the image is unnaturally enhanced and the image quality is deteriorated.
[0005]
Therefore, the present applicant has first proposed that the portion other than the edge is emphasized and displayed by amplifying the portion other than the edge while preserving the edge where the pixel value changes sharply in the input image data. (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
[0008]
The present invention has been made in view of such a situation, and the amount of calculation can be reduced even when a portion other than the edge is smoothed while an edge with a sharp change in pixel value is preserved. It is what you want to do.
[0009]
[Means for Solving the Problems]
An image processing apparatus according to the present invention includes a smoothing unit that smoothes input image data and generates smoothed image data. series Connected to Multiple Nonlinear filter A plurality of nonlinear filters are filters having different smoothing thresholds and different tap numbers by setting different intervals for the taps. It is characterized by that.
[0010]
The smoothing means is a difference value between a central pixel and its neighboring pixels. And the threshold value On the basis of the, Above It is possible to adaptively change the degree of smoothing.
[0011]
Of the nonlinear filter The threshold The latter stage can be made larger than the previous stage.
[0012]
Of the nonlinear filter Above The interval value can be made smaller in the latter stage than in the former stage.
[0013]
Of the nonlinear filter Above The interval can be a power of two.
[0014]
The nonlinear filter is an ε filter Is Can be.
[0015]
The image processing method of the present invention includes a smoothing step of smoothing input image data and generating smoothed image data. series Connected to the Number of taps due to different smoothing thresholds and different intervals inserted Is performed by a plurality of different nonlinear filters.
[0016]
In the present invention, the input image data is smoothed. Also, smoothing of input image data is series Connected to the Number of taps due to different smoothing thresholds and different intervals set for taps Are performed by a plurality of nonlinear filters.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows a configuration example of a
[0018]
An image sensor 11 made of an image sensor such as a CCD or CMOS acquires a light image from a subject as input image data, and inputs the input image data to the
[0019]
The non-linear smoother 22 smoothes the input image data and generates smoothed data.
[0020]
The
[0021]
The
[0022]
The
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
[0023]
The camera
[0024]
Next, image processing in the
[0025]
In step S <b> 1, the
[0026]
In step S <b> 2, the nonlinear smoother 22 acquires the input image data supplied from the image sensor 11.
[0027]
In step S3, the nonlinear smoother 22 extracts an edge component having a sharp change in pixel value from the input image data acquired by the processing in step S2, and the edge component is directly smoothed without being smoothed. In contrast to output, small amplitude components other than edge components are smoothed to smooth the input image data while preserving the edge components of the input image data to generate smoothed image data. To 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
[0028]
In step S4, the
[0029]
In step S5, the
[0030]
In step S6, the
[0031]
In step S7, the
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 nonlinear smoother 22 by the processing of step S3), and the resulting output image data Is sent to the camera
[0032]
With the processing in FIG. 2, the
[0033]
FIG. 3 is a block diagram illustrating a configuration example of the nonlinear smoother 22.
[0034]
The linear low-
[0035]
The
[0036]
The
[0037]
The
[0038]
The look-up table 54 performs gradation conversion (inverse conversion of logarithmic conversion performed by the look-up table 52) on the smoothed image data supplied from the
[0039]
The linear low-
[0040]
FIG. 4 is a block diagram showing a detailed configuration example of the
[0041]
The
[0042]
The
[0043]
The
[0044]
A
[0045]
The
[0046]
Each of the
[0047]
FIG. 5 is a block diagram illustrating a detailed configuration example of the
[0048]
As is clear by comparing FIG. 4 with FIGS. 5 and 6, the ε filters 53B and 53C in FIGS. 5 and 6 have basically the same configuration as the
[0049]
That is, the
[0050]
However, the
[0051]
Further, the
[0052]
However, as in the above-described FIG. 5 (
[0053]
FIG. 7 is a block diagram illustrating a configuration example of the
[0054]
The pixel value Xm of the pixel pm (in this example, the pixel value supplied from the register 116) and the pixel value Xn of the central pixel pn supplied from the
[0055]
The
[0056]
The
[0057]
The configurations of the
[0058]
Next, the nonlinear smoothing process in the nonlinear smoother 22 of FIG. 3 will be described with reference to the flowchart of FIG. This flowchart explains in detail the processing of step S2 and step S3 of FIG. This process is started when input image data is supplied from the image sensor 11 to the linear low-
[0059]
In step S <b> 31, the linear low-
[0060]
In step S <b> 32, the linear low-
[0061]
As described above, the linear low-
[0062]
In step S33, the lookup table 52 acquires the image data supplied from the linear low-
[0063]
By the way, the downstream ε filters 53A to 53C have a threshold ε. 1 To ε Three However, the amplitude of the image data is generally the intensity of the illumination light that illuminates the object to be imaged. It increases in proportion to the height. Therefore, the look-up table 52 performs logarithmic transformation on the image data in advance, so that the same smoothing effect can be obtained regardless of the illumination conditions when performing the smoothing process in the subsequent ε filters 53A to 53C. To do. At the same time, the look-up table 52 controls the smoothing effect according to the pixel value, for example, by increasing the smoothing effect in a dark region or a bright region of the image, thereby increasing the degree of enhancement by the subsequent image enhancement processing. enable.
[0064]
In step S34, the ε filter 53 (ε filters 53A to 53C) executes a smoothing process. Details of the smoothing process will be described later with reference to FIG.
[0065]
In step S35, the look-up table 54 performs gradation conversion on the smoothed image data supplied from the ε filter 53 (
[0066]
In step S36, the linear low-
[0067]
The smoothed data subjected to the nonlinear smoothing process by the process of FIG. 8 is further subjected to the processes in steps S4 to S7 of FIG. 2 as described above.
[0068]
FIG. 9 is a flowchart for explaining 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
[0069]
In step S71, the
[0070]
In step S72, the
[0071]
In step S73, the
[0072]
With the processing of FIG. 9, smoothing processing is performed by the ε filters 53A to 53C included in the
[0073]
Specifically, the {1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, The tap coefficient of 0,1} is calculated, the tap coefficient of {1,0,2,0,2,0,2,0,1} is calculated by the
[0074]
That is, by cascading three ε filters (17-tap, 9-tap, and 5-tap ε filters), it is possible to obtain almost the same effect as the result of calculation using a 27-tap nonlinear filter. At this time, the comparison operation can be reduced from 26 times to 12 times, and the multiplication operation can be reduced from 27 times to 15 times, compared to the case where the operation is performed using a 27-tap non-linear filter.
[0075]
In this smoothing process (the process of step S34 in FIG. 8), it is desirable to generate an image with as little change as possible in the portion other than the edge. For this purpose, a very large filter is used in the
[0076]
Therefore, in this embodiment, each of the register trains (
[0077]
Therefore, by connecting the
[0078]
FIG. 10 is a flowchart for explaining the processing 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 process is started when input image data is supplied to an
[0079]
In step S101, each register holds data. For example, when this process is executed in the
[0080]
In step S102, the
[0081]
In step S103, the
[0082]
In step S104, the
[0083]
In step S105, when the absolute value | Xn−Xm | is smaller than the predetermined threshold ε, the
[0084]
In step S106, the
[0085]
In step S <b> 107, the
[0086]
In step S108, the
[0087]
10, the ε filter 53 (ε filters 53A to 53C), which is a non-linear smoothing filter, smoothes the pixel value without impairing a sharp change in the pixel value, and the image supplied from the lookup table 52 The image data can be smoothed while the edges of the data (image data supplied from the lookup table 52 by the process of step S32 in FIG. 8) are preserved. Summarizing the smoothing process (process of FIG. 10) in the
[Expression 1]
[0088]
That is, the
[0089]
On the other hand, if the
[0090]
FIG. 11 is a diagram illustrating pixel values held in the
[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, since the line is scanned from the upper left to the lower right, 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 Is held in the
[0093]
As described above, the tap coefficient of the
[0094]
When the above-described equation (1) is applied, for example, the absolute value | C−L1 | of the difference between the pixel value C and the pixel value L1 is a predetermined threshold value ε. 1 And the predetermined threshold ε 1 Is greater than the pixel value L1, the pixel value L1 is replaced with the pixel value C. The pixel values obtained as a result of calculation for each of R2, Y6, Y5, Y4, R1, Y3, Y2, Y1, X1, X2, X3, L1, X4, X5, X6, and L2 according to Expression (1) R2 ′, Y6 ′, Y5 ′, Y4 ′, R1 ′, Y3 ′, Y2 ′, Y1 ′, X1 ′, X2 ′, X3 ′, L1 ′, X4 ′, X5 ′, X6 ′, and L2 ′ The pixel value C ′ output from the
[Expression 2]
[0095]
FIG. 12 is a diagram for explaining the relationship of the threshold value ε in the
[0096]
The threshold ε in the
[0097]
The larger the threshold value ε, the easier it is to create a nuisance (that is, noise can be taken because blur occurs), and the smaller the value ε, the less likely the image is blurred (that is, the blur hardly 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 according to the expression (1) (R1 ′ is set to the value (R1) as it is). Further, C ′ = {1 × 100 + 2 × 100 + 1 × 80} / 4 is calculated from the expression (2), and the output pixel C ′ = 95. On the other hand, for example, when the number of taps is 3, the tap coefficients are {1, 2, 1}, L1 = 30, C = 100, R1 = 80, and the threshold ε is 80 (that is, the above-described case). In the case where only the value of the threshold value ε is different from the above example), L1 ′ and R1 ′ are set to the values (L1, R1) as they are from the equation (1). Further, C ′ = {1 × 30 + 2 × 100 + 1 × 80} / 4 is calculated by the expression (2), and the output pixel C ′ = 77.5 is obtained. Thus, the larger the threshold value ε (in the present example, the more the threshold value ε is 50 than 50), the more the output image is blurred (the image is blurred).
[0099]
13 is a diagram for explaining pixel values held in the
[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 coefficient of the
[0101]
Further, in the
[0102]
Thus, the interval of the
[0103]
Here, the above-described expressions (1) and (2) are applied to the respective pixel values to obtain the output pixel value C ′. At this time, the output pixel value C ′ calculated by the
[0104]
Therefore, as shown in FIG. 12, the threshold value ε of the
[0105]
FIG. 15 is a diagram for explaining image data to be smoothed.
[0106]
The input image data on the left side in the figure is smoothed by the
[0107]
That is, when the absolute value of the difference between the pixel values before and after the steep edge exceeds the predetermined threshold value ε, the center pixel pn is the center, and the pixel value Xm of the pixel pm is set to the center pixel pn when performing low-pass filter processing. By performing low-pass filter processing instead 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 around the pixel pm, smoothing is performed in the vicinity of the pixel value Xm.
[0108]
At this time, the
[0109]
FIG. 16 is a diagram illustrating the frequency response in the
[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
[0111]
By setting the interval (decimation) of the tap number of the ε filter 53 (for example, ε
[0112]
As described above, the smoothed image data smoothed by the
[Equation 3]
[0113]
In Expression (3), the gain coefficient g (i, j) is replaced with a uniform gain coefficient G over 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 with the median value or the average value C of all pixel values, the equation (3) is expressed as an equation (4) indicating a contrast enhancement method by conventional tone curve adjustment.
[Expression 4]
[0114]
Further, in equation (3), the gain coefficient g (i, j) is replaced with a uniform gain coefficient G over the entire screen, and each pixel value s (i, j) of the smoothed image data is replaced with each input image data. When the pixel value x (i, j) is replaced with each pixel value f (i, j) of the image data obtained by performing the linear low-pass filter processing, this equation (3) is a high-frequency component enhancement method using a conventional unsharp mask. It is expressed as shown in equation (5).
[Equation 5]
[0115]
As described above, the conventional contrast enhancement method is a method in which image enhancement processing is performed independently for each pixel of the image, and the conventional high-frequency component enhancement method is performed with the surrounding pixels existing around the center pixel. In contrast to the method of performing image enhancement processing based on the relative level difference, the method according to the present embodiment integrates the conventional contrast enhancement method and high-frequency component enhancement method using a nonlinear smoothing filter. This enables higher-quality image enhancement processing.
[0116]
In addition, a method using a conventional non-linear smoothing filter (amplifies the part other than the edge by amplifying the part other than the edge while preserving the edge with a sharp change in pixel value in the input image data, and displays the highlighted part. On the other hand, in the method according to the present embodiment, the interval of the number of taps of the
[0117]
As described above, the threshold value ε is set according to the band (in the case of a narrowband filter (ε filter with a large number of taps), the threshold value ε is reduced, and in the case of a wideband filter (an ε filter with a small number of taps), By increasing the threshold ε), cascading the ε filters in the order from the narrowband filter to the wideband filter, and further setting the interval of the ε filter (substantially the pixel extraction interval to be processed) to a power of two, Even in the case where the portion other than the edge is smoothed while the sharp edge of the value is preserved, the calculation amount can be suppressed.
[0118]
Further, it is possible to obtain an output image in which noise is hardly generated and the calculation amount is suppressed.
[0119]
In addition, an image with suppressed side lobes can be output.
[0120]
Further, in the above-described embodiment, the case where the present invention is applied to the
[0121]
In the above example, the number of ε filters provided in the nonlinear smoother 22 is three (
[0122]
In the above example, the ε filter is used. However, not only the ε filter but also a median filter, for example, may be used.
[0123]
In the present specification, the steps describing each flowchart include not only processes performed in time series according to the described order, but also processes executed in parallel or individually even if not necessarily performed in time series. Is also included.
[0124]
【The invention's effect】
As described above, according to the present invention, it is possible to reduce the amount of calculation even when smoothing a portion other than the edge while preserving an edge having a sharp change in pixel value. In particular, according to the present invention, it is possible to output an image in which noise is hardly generated 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.
FIG. 3 is a block diagram showing a functional configuration of the nonlinear smoother of FIG. 1;
4 is a block diagram illustrating a configuration example of an ε filter in FIG. 2. FIG.
5 is a block diagram showing a configuration example of another ε filter in FIG. 2;
6 is a block diagram showing a configuration example of still another ε filter of FIG. 2. FIG.
7 is a block diagram illustrating a configuration example of a selector in FIG. 4;
8 is a flowchart for explaining nonlinear smoothing processing in the nonlinear smoother of FIG. 2;
FIG. 9 is a flowchart illustrating the process of step S34 of FIG.
FIG. 10 is a flowchart illustrating processing in steps S71 to S73 in FIG.
11 is a diagram for explaining pixel values held in the register of FIG. 4;
12 is a diagram for explaining a relationship of threshold values in each ε filter of FIG. 3; FIG.
13 is a diagram illustrating pixel values held in the register of FIG.
14 is a diagram illustrating pixel values held in the register of FIG. 6. FIG.
FIG. 15 is a diagram illustrating image data to be smoothed.
FIG. 16 is a diagram illustrating a relationship between the number of taps and a frequency response.
[Explanation of symbols]
DESCRIPTION OF
Claims (7)
前記入力画像データを平滑化し、平滑化画像データを生成する平滑化手段を備え、
前記平滑化手段は、直列に接続された複数の非線形フィルタを含み、
前記複数の非線形フィルタは、それぞれ、前記平滑化の閾値が異なるとともに、タップに異なるインターバルが設定されることによりタップ数が異なるフィルタである
ことを特徴とする画像処理装置。In an image processing apparatus that processes input image data,
Smoothing means for smoothing the input image data and generating smoothed image data;
The smoothing means includes a plurality of nonlinear filters connected in series ,
The image processing apparatus according to claim 1 , wherein each of the plurality of nonlinear filters is a filter having a different threshold value for smoothing and a different number of taps by setting different intervals for the taps .
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the smoothing unit adaptively changes the degree of smoothing based on a difference value between a central pixel and its neighboring pixels and the threshold value.
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the threshold value of the non-linear filter is larger in a rear stage than in a front stage.
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the value of the interval of the nonlinear filter is smaller in the latter stage than in the former stage.
ことを特徴とする請求項4に記載の画像処理装置。The image processing apparatus according to claim 4, wherein the interval of the nonlinear filter is a power of two.
ことを特徴とする請求項1に記載の画像処理装置。The nonlinear filter, the image processing apparatus according to claim 1, characterized in that the ε filter.
前記入力画像データを平滑化し、平滑化画像データを生成する平滑化ステップを含み、
前記平滑化ステップの処理は、直列に接続された、前記平滑化の閾値が異なるとともに、タップに異なるインターバルが設定されることによりタップ数が異なる複数の非線形フィルタにより行なわれる
ことを特徴とする画像処理方法。In an image processing method of an image processing apparatus that processes input image data,
A smoothing step of smoothing the input image data and generating smoothed image data;
The processing of the smoothing step is performed by a plurality of nonlinear filters connected in series with different smoothing thresholds and different tap numbers by setting different intervals for the taps. Processing method.
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 JP2004172726A (en) | 2004-06-17 |
JP4273748B2 true 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) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007096509A (en) | 2005-09-27 | 2007-04-12 | Fujifilm Corp | Image processing apparatus and image processing method |
WO2008020487A1 (en) * | 2006-08-17 | 2008-02-21 | Fujitsu Limited | Image processing device, image processing program, and image processing method |
JP4946417B2 (en) * | 2006-12-18 | 2012-06-06 | ソニー株式会社 | IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, PROGRAM FOR IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROGRAM FOR IMAGE PROCESSING METHOD |
JP4288623B2 (en) | 2007-01-18 | 2009-07-01 | ソニー株式会社 | Imaging device, noise removal device, noise removal method, noise removal method program, and recording medium recording noise removal method program |
JP4746575B2 (en) * | 2007-03-16 | 2011-08-10 | 株式会社東芝 | Image processing apparatus and method |
WO2009072208A1 (en) | 2007-12-06 | 2009-06-11 | Fujitsu Limited | Image processing device, image processing program, and image processing method |
JP4952796B2 (en) | 2007-12-25 | 2012-06-13 | 富士通株式会社 | Image processing device |
JP2011065641A (en) * | 2010-09-01 | 2011-03-31 | Toshiba Corp | Image processing apparatus, display device and image processing method |
JP6048911B2 (en) * | 2012-12-17 | 2016-12-21 | 株式会社リコー | Image processing apparatus, image processing method, and imaging apparatus |
-
2002
- 2002-11-18 JP JP2002333488A patent/JP4273748B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004172726A (en) | 2004-06-17 |
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 | |
JP5157753B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4273428B2 (en) | Image processing apparatus, image processing method, program for image processing method, and recording medium recording program for image processing method | |
US7920183B2 (en) | Image processing device and digital camera | |
JP4214457B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP2001275015A (en) | Circuit and method for image processing | |
JP5392560B2 (en) | Image processing apparatus and image processing method | |
JP2009049547A (en) | Image processing apparatus, image processing method, and image processing program | |
US20090016635A1 (en) | Edge-enhancement device and edge-enhancement method | |
JP4526445B2 (en) | Imaging device | |
JP3208762B2 (en) | Image processing apparatus and image processing method | |
KR100694090B1 (en) | Method and apparatus for noise boost protection in image contrast enhancement systems | |
JP4273748B2 (en) | Image processing apparatus and method | |
JP4869653B2 (en) | Image processing device | |
JP5932068B1 (en) | Image processing apparatus, imaging apparatus, image processing method, and image processing program | |
JP4096613B2 (en) | Image processing method and image processing apparatus | |
JP2008511048A (en) | Image processing method and computer software for image processing | |
JP2011015277A (en) | Image processing device, image processing method, image processing program, and recording medium recording image processing program | |
JP4479527B2 (en) | Image processing method, image processing apparatus, image processing program, and electronic camera | |
JP5365881B2 (en) | Image processing apparatus and image processing method | |
JP2007180851A (en) | Gray scale transformation device, program and method for raw image, and electronic camera | |
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 |