JP4129163B2 - Image processing circuit - Google Patents

Image processing circuit Download PDF

Info

Publication number
JP4129163B2
JP4129163B2 JP2002296924A JP2002296924A JP4129163B2 JP 4129163 B2 JP4129163 B2 JP 4129163B2 JP 2002296924 A JP2002296924 A JP 2002296924A JP 2002296924 A JP2002296924 A JP 2002296924A JP 4129163 B2 JP4129163 B2 JP 4129163B2
Authority
JP
Japan
Prior art keywords
signal
pixel
image
cursor
selector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002296924A
Other languages
Japanese (ja)
Other versions
JP2004133644A (en
Inventor
厚志 小橋
和正 功刀
英明 古川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2002296924A priority Critical patent/JP4129163B2/en
Publication of JP2004133644A publication Critical patent/JP2004133644A/en
Application granted granted Critical
Publication of JP4129163B2 publication Critical patent/JP4129163B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
この発明は、画像処理回路、特に画像データのフィードバック処理部を備えた画像処理回路に関する。
【0002】
【従来の技術】
【非特許文献1】
R .W.Ehrich ,"A symmetric hysterisis smoothing algorithm that preserves principal features,"〔CGIP , vol.8, pp.121-126 ,August 1978 〕
【0003】
CCD等の撮像素子から得られる画像信号に対してデジタル画像処理を行って、所望の画質の画像を得ることを目的とする画像処理装置において、画像処理の一機能として、過去の処理結果を用いて現在の処理を行う、フィードバック処理を必要とすることがある。
【0004】
ここで、フィードバック処理を有する画像処理の一例として、画像のヒステリシススムージングついて説明する。最初に、ヒステリシススムージングの動作の概要について、図9を用いて説明する。なお、説明を簡単にするために、画像処理装置の取り扱う画像データは、モノクロ画像データとする。ヒステリシススムージングは、画像中に含まれるノイズを除去する方法の一つであり、R .W.Ehrich ,"A symmetric hysterisis smoothing algorithm that preserves principal features,"〔CGIP , vol.8, pp.121-126 ,August 1978 〕(非特許文献1)により提案されている。
【0005】
このヒステリシススムージングは、画像の一次元方向のみの処理でノイズ除去を行うものであり、図9に示すように高さhのカーソル101 を入力画像値102 の一次元方向に移動させ、カーソル101 の中心値101cをノイズ除去後の出力画像値103 として出力するものである。なお、図9において、横軸は画素位置を示しており、縦軸は画素レベルを示している。カーソル101 は、以下のようなルールによって移動させる。
(1)カーソル101 の初期位置(図9の画素位置(1) )は、カーソル101 の中心101cが入力画素値102 となるように設定する。
(2)現在の位置からカーソル101 を、その位置すなわち同じ画素レベルを保ったまま1画素分だけ水平移動させる。
(3)もし、1画素水平移動した先の入力画素値102 が、図9の画素位置(2) の位置のときのように、カーソル101 の範囲内に入っていれば、縦方向(画素レベル方向)にはカーソル101 を動かさず、このときのカーソル中心101cのレベル値をノイズ除去後の出力画像値103 として出力する。
(4) もし、1画素水平移動させたとき、入力画素値102 が、図9の画素位置(5) の位置のときのように、カーソル101 の上端101hより上にくれば、カーソル101 の上端101hが入力画素値102 に一致するように縦方向に移動させ、一方、図9の画素位置(8) のときのように、入力画素値102 がカーソル101 の下端101lより下にくれば、カーソル101 の下端101lが入力画素値102 に一致するように縦方向に移動させる。そして、このときのカーソル中心101cのレベル値をそれぞれノイズ除去後の出力画像値として出力する。
このようにすることにより、被写体に含まれる大きな振幅成分は保存しつつ、カーソル101 の高さhよりも小さなノイズ成分を除去することができる。
【0006】
上記動作説明で示したしたように、このヒステリシススムージングは、1画素前隣のカーソル位置情報を元に現在のカーソル位置を決定し、ノイズ除去を行うというアルゴリズムであり、すなわち、1画素前隣のカーソル位置情報をフィードバックデータとして、現在のカーソル位置計算に用いるフィードバック画像処理装置である。
【0007】
一方、上記デジタル画像処理をハードウェア処理によって実現する画像処理装置においては、パイプライン処理を用いて高速処理するのが一般的である。パイプライン処理とは、画像処理の一連の処理を、1クロック周期内で動作可能な小さなブロックに分割し、それぞれのブロックを流れ作業的に動作させる処理である。
【0008】
【発明が解決しようとする課題】
ところで、ヒステリシススムージングのようなフィードバック処理をパイプライン処理させようとした場合、フィードバックデータの処理も1クロック周期内で処理することが必要である。しかし、ヒステリシススムージング処理のフィードバックデータは、カーソル上下端値と入力画像値との比較により生成されるため、回路の動作周波数が高かったり、画像のビット幅が大きい場合は、1クロック周期内に処理が終わらない可能性がある。
【0009】
このように、フィードバックデータに対し複雑な演算を施すようなフィードバック処理を含む画像処理回路を、パイプライン処理で実現しようとした場合、パイプライン回路が実現できないという問題点がある。従来、このような複雑なゲートを通ったデータを画素単位でフィードバックしなければならない処理を、パイプライン処理にて実現する方法は提案されていなかった。
【0010】
本発明は、従来のフィードバック処理を有する画像処理アルゴリズムをパイプライン処理する際に生じる上記問題点を解消するためになされたもので、複雑な構成のフィードバック処理を含む画像処理を、パイプライン処理により高速処理することが可能な画像処理回路を提供することを目的とする。
【0011】
【課題を解決するための手段】
上記問題点を解決するため、請求項1に係る発明は、撮像素子から得られる画像信号を 所定の順序で読み出した入力画像信号Iに対して、フィードバック処理を含む所定のノイズ除去を行い、当該ノイズ除去が行われた出力画像信号Oを出力する画像処理回路であって、前記入力画像信号Iのうちの前記撮像素子の第1の画素に対応する画素信号を処理して複数のカーソル位置を演算し、当該カーソル位置に係る複数組のカーソル位置信号を出力するカーソル位置決定部と、入力されるセレクト信号Sに基づいて、前記複数組のカーソル位置信号と、前記第1の画素に先行して既にノイズ除去を終えている第2の画素に対応する画素信号に係るカーソル位置信号との中から、いずれか一組の信号を選択し、その選択された信号を出力するセレクタと、前記セレクタにて選択された信号と前記第1の画素信号とを比較し、その比較結果を前記セレクタのセレクト信号Sとして前記セレクタへ出力する比較部と、前記セレクタの出力側から前記比較部を介して前記セレクタのセレクト信号Sとして前記セレクタに入力されるまでの第1の遅延量、ノイズ除去を終えている前記第2の画素に対応する画素信号に係るカーソル位置信号として前記セレクタの出力側から前記セレクタに入力されるまでの第2の遅延量、及び前記入力画像信号Iが前記カーソル位置決定部を経て前記比較部までに到る第3の遅延量が等しくなるように、遅延量を与えるディレイ部とを有することを特徴とするものである。
【0012】
この請求項1に係る発明に関する実施の形態には、第1〜第3の実施の形態が対応する。そして、このように構成された画像処理回路においては、セレクタ及び比較の出力信号に対して適切な遅延量を設定することができ、ヒステリシススムージングに代表されるフィードバック処理を有する画像処理を、パイプライン処理により高速に行うことが可能となる。
【0013】
請求項に係る発明は、請求項に係る画像処理回路において、前記ディレイ部は、フリップフロップ回路であることを特徴とするものである。
【0014】
この請求項に係る発明に関する実施の形態には、第1〜第3の実施の形態が対応する。そして、このように構成された画像処理装置においては、ディレイ部をフリップフロップ回路で構成するようにしているので、遅延量を容易に設定することができる。
【0015】
請求項に係る発明は、請求項に係る画像処理回路において、前記第1の画素と前記第2の画素とは、隣接する画素同士であることを特徴とするものであり、この発明に関する実施の形態には、第1の実施の形態が対応する。
【0016】
【発明の実施の形態】
次に、実施の形態について説明する。まず、本発明の実施の形態の説明に先立って、本発明に関連する画像処理回路として考えられる基本的な回路構成、及びその動作について説明する。図1は、ヒステリシススムージング処理回路をデジタルカメラに搭載した場合に考えられる基本的な回路構成を示すブロック図である。図1において、1はモノクロ画像を撮像するための撮像素子、又は単色のカラーフィルタを有する撮像素子、2は撮像素子1の信号をデジタル信号に変換するADコンバータ、3はADコンバータの出力信号を1画面分記憶するための画像メモリ、4は画像メモリ3のリード・ライトアドレスを生成するメモリコントローラ、5は撮影情報及び入力画像信号を元にカーソルの高さhを決定するカーソル高さ決定部である。
【0017】
また6は入力画素信号が画像端の場合における、カーソル上端位置high0 ,下端位置low0,及びカーソル中心位置center0 を演算するカーソル初期位置決定部、7は入力画素信号値をカーソルの上端とする、カーソル上端位置high1 ,下端位置low1,及びカーソル中心位置center1 を演算する第1のカーソル位置決定部、8は入力画素値をカーソルの下端とする、カーソル上端位置high2 ,下端位置low2,及びカーソル中心位置center2 を演算する第2のカーソル位置決定部、9はカーソル初期位置決定部6の出力、第1のカーソル位置決定部7の出力、第2のカーソル位置決定部8の出力、及び既にヒステリシススムージング処理を終えている1画素前隣の画素(先行画素)の処理結果high3,low3,center3のいずれか1組を、セレクトして出力するセレクタ、10は現在の画素値とカーソルの上端及び下端を比較する比較器、11〜18は各構成ブロック5〜10で発生する演算遅延時間をクロックタイミングで同期させることにより吸収し、また、各構成ブロック5〜10の出力データ間のタイミングをクロック単位で合わせるためのディレイ部(一般的回路におけるフリップフロップ)である。
【0018】
次に、図1で示した画像処理回路の動作について、図2の(A)のタイミングチャート及び図2の(B)の説明図を用いて説明する。図2の(A)は、図1に示した回路における画像データの流れを説明するタイミングチャートであり、図2の(B)は画像の読み出し順を説明するための図である。図2の(A)における番号(1) 〜(7) は、図1に示した画像処理回路を流れるデータのタイミングを示す番号であり、それぞれ図1に示した画像処理回路の(1) 〜(7) で示す部分におけるデータのタイミングを表している。
【0019】
撮像素子1から出力される画像信号は、図2の(B)で示すような、横画素数N個、縦画素数M個の2次元の画像の画像信号であり、説明を容易にするため左上端から、0から始まる画素番号をつけてある。この2次元の画像信号は、ADコンバータ2でデジタル信号に変換された後、画像メモリ3に書き込まれる。このときの画像信号の書き込み順は、メモリコントローラ4により画素番号0,1,2,3,・・・N−1,N+0,N+1,・・・と画素番号順に書き込まれるように制御されている。
【0020】
次に、画像信号は画像メモリ3から1クロック毎に読み出されるが、このときの読み出し順は、図2の(B)の矢印で示したように、左上端の0番目の画素から順に横方向に読み出される。右端まで読み出された後は、2行目のN+0番目から順に右方向に走査され、以下、同様にして画像の右下端まで繰り返され、これが入力画像信号Iとなる。
【0021】
一方、画像処理回路のもう一つの入力データである撮影情報は、撮影時のISO感度やシャッター速などの情報であり、図2の(A)のフローチャートの(2) で示したように1フレーム単位で切り替わるデータであるため、1 画面中は同じ情報が保持される。
【0022】
入力画像信号I及び撮影情報は、カーソル高さ決定部5に入力され、これらの情報を元に、1 画素毎にカーソル高さ情報cursを計算し出力する。ここでは、撮像素子1が持つ、画像信号のレベルが高いとノイズの振幅も大きくなるという特性や、また、シャッタースピードが長くなるほどノイズ振幅が大きくなるという特性を元に、カーソル高さ情報cursを計算する。そして、算出されたカーソル高さ情報cursは、ディレイ部11を通りクロック同期信号となる。
【0023】
入力画像信号Iもまた、カーソル高さ情報cursとクロック単位でのタイミングを合わせるためにディレイ部12を通り、その結果、入力画像信号Iが1クロック遅れたI1という信号となる。したがって、この2つの信号curs,I1は、図2の(A)のタイミングチャートの(3) に示したタイミングの信号となる。
【0024】
次に、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8では、カーソル高さcurs及び入力画像信号I1から、カーソルの上下端位置及びカーソル中心位置を演算する。
【0025】
カーソル初期位置決定部6は、図2の(B)における、0,N+0,2N+0,・・・といった、画像の左端におけるカーソル初期位置を決定するブロックであり、カーソル上端位置high0,下端位置 low0,及びカーソル中心位置center0は、それぞれ次式(1),(2),(3)で示すように演算される。
high0=I1+curs/2 ・・・・・・・・・・(1)
low0=I1−curs/2 ・・・・・・・・・・(2)
center0=I1 ・・・・・・・・・・・・・・(3)
【0026】
第1のカーソル位置決定部7は、入力画像信号I1をカーソルの上端位置とした場合の演算を行うブロックであるから、カーソル上端位置high1,下端位置 low1,及びカーソル中心位置center1は、それぞれ、(4),(5),(6)で示すように演算される。
high1=I1 ・・・・・・・・・・・・・・(4)
low1=I1−curs ・・・・・・・・・・・(5)
center1=I1−curs/2 ・・・・・・・・・(6)
【0027】
同様に、第2のカーソル位置決定部8は、入力画像信号I1をカーソルの下端位置とした場合の演算を行うブロックであるから、カーソル上端位置high2,下端位置 low2,及びカーソル中心位置center2は、それぞれ、(7),(8),(9)で示すように演算される。
high2=I1+curs ・・・・・・・・・・・(7)
low2=I1 ・・・・・・・・・・・・・(8)
center2=I1+curs/2 ・・・・・・・・(9)
【0028】
そして、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8の出力信号は、それぞれディレイ部13,14,15を通り、クロック同期信号となり、その結果、これらの信号は、図2の(A)のタイミングチャートの(4) に示したタイミングの信号となる。
【0029】
次に、セレクタ9では、上述した、ディレイ部13通過後のカーソル初期位置決定部6の出力信号high0,low0,center0、ディレイ部14通過後の第1のカーソル位置決定部7の出力信号high1,low1,center1、ディレイ部15通過後の第2のカーソル位置決定部8の出力信号high2,low2,center2、及び既にヒステリシススムージング処理を終えている一画素前隣の画素信号の処理結果high3,low3,center3のいずれか1組を、セレクトして出力する。セレクタ9のセレクト信号Sは、セレクタ9の後段にある比較器10からの2ビットの出力信号であり、"00","01","10","11"の4つの状態を持つ信号である。
【0030】
このセレクト信号Sにより、セレクタ9は以下の動作となる。
(1)S="00"のとき、セレクタ9は第1のカーソル位置決定部7の出力high1,low1,center1を出力する。
(2)S="01"のとき、セレクタ9は第2のカーソル位置決定部8の出力high2,low2,center2を出力する。
(3)S="10"のとき、セレクタ9はヒステリシススムージング処理処理済信号high3,low3,center3を出力する。
(4)S="11"のとき、セレクタ9はカーソル初期位置決定部6の出力high0,low0,center0を出力する。
【0031】
このようにセレクタ9でセレクトされた信号は、ディレイ部17を通り、図2の(A)のタイミングチャートの(5) で示したタイミングの信号high,low,center となる。この信号high,low,center は、ヒステリシススムージング処理を終えた信号であるので、セレクタ9の入力信号high3,low3,center3となり、また、信号centerは出力画像信号Oとなる。
【0032】
次に、比較器10では、上記セレクトされたカーソル位置信号の上端及び下端位置信号high,lowと、画像信号との比較を行う。この比較は、1画素前隣の画素位置におけるカーソルの上端及び下端位置信号high,lowと、現在の画像信号とを比較する必要があるため、前記カーソルの上端及び下端位置信号high,lowと画像信号とのタイミングの関係は、1 画素ずらしたものとしなければならない。したがって、画像信号は図2の(A)のタイミングチャートの(6) で示す、画像信号I1をディレイ部16で更に1クロック遅らせた画像信号I2となる。
【0033】
これらのカーソルの上端及び下端位置信号high,low,及び画像信号I2を用いて、比較器10は以下のように動作する。比較器10の出力は2ビットの信号である。
(1)もしI2>highなら、比較器10は"00"を出力する。
(2)もしI2<low なら、比較器10は"01"を出力する。
(3)もし low<I2<highなら、比較器10は"10"を出力する。
(4)もし、I2が画像の左端画素の信号の場合は、high,low の信号と関係なく、"11"を出力する。
【0034】
ここで、画像の左端画素とは、図2の(B)における、0,N+0,2N+0,・・・の左端1列の画素である。この比較器10からの信号は、ディレイ部18を通った後、セレクタ9のセレクト信号Sとなる。したがって、このセレクト信号Sは図2の(A)のタイミングチャートの(7) に示したタイミングの信号となる。また、画像左端の処理は、図2の(B)に示した画像において、一行につき最初の一回だけ行われる処理であり、フィードバック回路について述べる本発明とは直接の関係がないので、以後の説明においては省略する。
【0035】
ところで、比較器10が出力するセレクト信号Sは、セレクタ9の入力信号(high1,low1,center1)、及び(high2,low2,center2)に対して、1画素前の結果から導いた信号でなくてはならない。具体的には、図2の(B)における画素番号1の画素に対応するカーソル位置信号(high1,low1,center1)、及び(high2,low2,center2)をセレクトするためのセレクト信号Sは、画素番号0の画素に対応する信号である必要がある。しかしながら、図2の(A)のタイミングチャートの(4) と(7) で示す信号のタイミング関係を見ると、画素番号1の画素に対応するカーソル位置信号(high1,low1,center1)、及び(high2,low2,center2)をセレクトするためのセレクト信号Sはまだ決定されておらず、画素番号2の画素に対応するカーソル位置信号(high1,low1,center1)、及び(high2,low2,center2)のセレクト信号として初めて、画素番号0の画素に対応するセレクト信号Sが生成される。
【0036】
これでは、2画素前の結果から導いたセレクト信号を用いることになり、所望のヒステリシススムージング結果を得ることができない。この問題を解決するためには、セレクト信号Sを生成するタイミングを1クロック分早める必要があり、そのためには、セレクタ9の後のディレイ部17,又は比較器10の後のディレイ部18のいずれかを削除する必要がある。すなわち、セレクタ9と比較器10の処理の両方を1クロック周期以内で処理する必要があるということになる。
【0037】
しかしながら、例えば、画像信号のデータビット長が大きい場合は演算時間が長くなるため、セレクタ9及び比較器10の処理を1クロック周期内に終わらせることができない可能性がある。また、回路の動作周波数を上げて高速に処理させようとした場合も、1クロック周期が短くなるため、セレクタ9及び比較器10を1クロック周期内に終わらせることができない可能性がある。特に、比較的ゲート遅延時間が大きい半導体デバイスを用いて、この回路を実現した場合、クロック周波数を上げることは更に難しくなる。あるいは、例えば、高性能の半導体デバイスを使い、且つ、低い動作周波数で動作させることによってパイプライン処理を実現しようとした場合、高コスト、低性能の画像処理装置になってしまうという問題がある。
【0038】
次に、この問題を解決できるようにした本発明の実施の形態について説明する。図3は、本発明に係る画像処理回路の第1の実施の形態を示すブロック構成図で、ヒステリシススムージング処理回路をデジタルカメラに搭載した場合の画像処理回路の構成を示すブロック図である。図3において、図1に示した回路と同一又は対応する部材には同一符号を付して示し、その説明は省略する。この実施の形態が図1に示した回路と異なる点は、画像信号を1クロック遅らせるディレイ部16を省き、セレクタ9に対する、ヒステリシススムージング処理を終えている1画素前隣の画素の処理結果(high3,low3,center3)の入力部に2クロック分ディレイさせるディレイ部19を設け、更に比較器10から出力するセレクト信号Sを、ディレイ部18で2クロック分ディレイさせるようにした点である。なお、ディレイ部11〜19において、1クロック分ディレイさせる場合はD,nクロック分ディレイさせる場合はnDと表示している。
【0039】
次に、このように構成された第1の実施の形態の動作について、図3に加え、図4の(A),(B)を用いて説明する。ただし、図1の回路と同じ動作については、その説明を省略する。図4の(A)は、図3に示した回路における画像データの流れを説明するタイミングチャート図であり、図4の(B)は画像の読み出し順を説明するための説明図である。図4の(A)のタイミングチャート中の番号(1) 〜(8) は回路を流れるデータのタイミングを示し、それぞれ図3において(1) 〜(8) で示す部分におけるデータのタイミングを表している。
【0040】
撮像素子1から出力される画像信号が、ADコンバータ2でデジタル信号に変換された後、メモリコントローラ4によって、0,1,2,・・・の順に画像メモリ3に書き込まれるのは図1に示した画像処理回路と同じである。
【0041】
次に、画像信号は画像メモリ3から1クロック毎に読み出されるが、このときの読み出し順は、図4の(B)の説明図において矢印で示したように、0番目の画素から矢印に沿って、縦方向にN+0,2N+0の順に読み出され、次に、1,N+1,2N+1とジグザグ状に読み出される。右端の3N−1まで読み出された後は、3N+0番目から4N+0,5N+0と読み出され、以下、同様に画像の下端まで繰り返される。これを画像信号Iとする。
【0042】
カーソル高さ決定部5の動作は、図1に示した画像処理回路と同じ動作であり、ディレイ部11,12を通ったカーソル高さ信号curs及び画像信号I1信号は、図4の(A)のタイミングチャートの(3) に示したタイミングの信号となる。
【0043】
次に、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8における動作も、図1に示した画像処理回路の動作と同じであり、これらの出力信号は、それぞれディレイ部13及び14及び15を通った後、図4の(A)のタイミングチャートの(4) に示したタイミングの信号となる。
【0044】
次に、セレクタ9の動作も図1に示した画像処理回路の動作と同じであり、ディレイ部17を通った後、図4の(A)のタイミングチャートの(5) で示したタイミングの信号high,low,center となる。これらの信号はヒステリシススムージング処理を終えたカーソル位置信号であり、このうちの信号centerはヒステリシススムージング処理を終えた画像信号であるので、出力画像信号Oとなる。
【0045】
ここで、セレクタ9の入力信号high3,low3,center3は、既にヒステリシススムージング処理を終えている1画素前隣の画素に対応するカーソル位置信号であるが、この1画素前隣の画素とは、2次元画像における前隣の画素(先行画素)を示し、例えば、図4の(B)に示した説明図における画素番号1の画素に対する画素番号0の画素のことであり、メモリからの読み出し順とは関係ない。よって、セレクタ9に入力するカーソル位置信号high0,low0,center0、high1,low1,center1、high2,low2,center2、及びhigh3,low3,center3は、図4の(A)のタイミングチャートの(4) と(6) で表したようなタイミングの関係、すなわち、タイミングチャートの(4) の画素番号1の画素に対応する信号と、タイミングチャートの(6) の画素番号0の画素に対応する信号を同じタイミングとする必要がある。
【0046】
したがって、これらの信号のタイミング合わせのため、ヒステリシススムージング処理の終えたカーソル位置信号のセレクタ9への入力信号high3,low3,center3は、処理済のカーソル位置信号high,low,center をディレイ部19によって2クロック遅らせた信号となる。
【0047】
次に、比較器10では、上記ヒステリシススムージング処理済のカーソル位置信号の上下端位置信号high,lowの2つ信号と、入力画像信号Iとの比較を行う。この比較は、1画素前隣の画素に対応するカーソル位置信号high,lowと、現在の画像信号Iとを比較するものである。具体的には、図4の(A)のタイミングチャートの(5) の画素番号0の画素に対応する信号と、タイミングチャートの(7) の画素番号1の画素に対応する信号を比較するということであるから、カーソル位置信号high,lowは画像信号Iに対し、3クロック分遅れたものとしなければならない。したがって、ここでの画像信号にはディレイ部を通さない入力画像信号Iを用いることになる。
【0048】
比較器10の動作は、図1に示した画像処理回路で示した動作と同じであり、その出力信号はディレイ部18を通った後、セレクタ9のセレクト信号Sとなる。
【0049】
ここで、このセレクタ信号Sは前述したように、セレクタ9への入力信号high0,low0,center0、high1,low1,center1、high2,low2,center2及びhigh3,low3,center3のいずれかの1組を選択するための信号であるため、これらの信号とのタイミングを考慮する必要がある。具体的には、図4の(B)における画素番号1の画素位置におけるヒステリシススムージング結果を得るためには、画素番号1の画素位置に対応するカーソル位置信号high1,low1,center1及びhigh2,low2,center2と、画素番号0の画素位置に対応する処理済のカーソル位置信号high3,low3,center3のいずれかを選択するセレクトする信号として、画素番号0の画素位置に対応するセレクト信号Sが必要ということになる。すなわち、セレクト信号Sは図4の(A)のタイミングチャートの(8) に示したタイミングの信号とする必要がある。そしてこのセレクト信号Sは、例えば画素番号0の画素位置に対応するセレクト信号Sは、図4の(A)のタイミングチャートの(5) で示す処理済のカーソル位置信号high,low,center の画素番号0の画素位置に対応する信号、及びタイミングチャートの(7) で示す画像信号Iの画素番号1の画素信号から生成される信号であるから、この2つの信号に対して2クロック分遅れた信号ということになる。つまり、図4の(A)のタイミングチャートの(8) のタイミングのセレクト信号Sを得るためには、ディレイ部18は2クロック分のディレイを必要とするということになる。
【0050】
ここで、ディレイ部18は2クロック分のディレイが必要であるということは、比較器10の処理に2クロック分のパイプラインディレイを割り振ることが可能であるということである。例えば、この画像処理回路を動作させるクロックとして、比較的高速なクロックを用いた場合、比較器10の処理が1クロック周期内に終わらないということが考えられる。このとき、比較器10を構成する回路を分割し、比較器10の内部にディレイ部18を構成する1つ又は2つのディレイ素子を挿入することで、分割回路間の処理は簡単になり、すなわち、パイプライン化が可能となる。
【0051】
また、この実施の形態の変形例として、セレクタ9の処理が1クロック周期内に終わらない場合は、ディレイ部17のディレイ数を2クロック分として、セレクタ9内にその一部を挿入し、ディレイ部19のディレイ数を1クロック分とし、ディレイ部18のディレイ数を1クロック分とし、更に比較器10に入力される画像信号Iを1クロック遅らせることにより、パイプライン処理が可能となる。ここで、比較器10に入力する画像信号Iを1クロック遅らせるのは、比較器10への入力信号high,lowと画像信号Iのタイミングを合わせるためである。
【0052】
以上の説明を一般化して表すと、次のようになる。
(1)ディレイ部17とディレイ部18のディレイ数(ディレイクロック数)の和は3であればよい。
(2)ディレイ部17とディレイ部19のディレイ数の和は3であればよい。
(3)入力画像信号Iがカーソル位置決定部6〜8を経て比較器10までに至る間に存在するディレイ数の和は最低3必要で、3より多い場合は、その多い分のディレイ数を、比較器10への入力画像信号Iの入力部分に挿入する必要がある。
(4)上記(1),(2)及び(3)に示したディレイ数の和は、画像信号を画像メモリ3から読み出す際に、縦方向に読み出す画素数に等しい。
【0053】
すなわち、本実施の形態では、画像メモリ3からの画素信号の読み出しを、画素番号0,N+0,2N+0,1,・・・というように読み出していたため、上記(1)及び(2)に記したディレイ数の和は3であったが、例えば、画素番号0,N+0,2N+0,3N+0,1,・・・というように読み出した場合は、ディレイ数の和は4となる。したがって、画像を縦に読み出す数を増やせば増やすほど、ディレイ部19,ディレイ部17,ディレイ部18に割り当てるディレイ数は多くなり、より複雑な処理をより高速に行うことが可能となる。
【0054】
また、上記一般化した説明を、図1に示した画像処理回路に当てはめた場合、画素信号の読み出し順は画素番号1,2,・・・となっているので、上記(4)の条件から、ディレイ部17とディレイ部18のディレイ数の和は1となる。したがって、図1に示した画像処理回路においては、セレクタ9と比較器10は、合わせて1クロック内で処理しなければならないことになり、これは図1に示した画像処理回路における問題点につながる。
【0055】
以上で説明したように、画像メモリ3からの画素信号の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、ヒステリシススムージング回路に代表されるようなフィードバック処理回路を有する画像処理回路を、パイプライン処理により高速処理することが可能となる。
【0056】
次に、本発明の第2の実施の形態について説明する。前記第1の実施の形態においては、入力画像は単一色の画像であったのに対し、第2の実施の形態は、単板のカラー画像を入力画像とした場合の画像処理回路に関するものである。図5は、本発明に係る画像処理装置の第2の実施の形態を示すブロック構成図であり、具体的にはヒステリシススムージング処理回路をデジタルカメラに搭載した場合の回路構成を示すブロック図である。図5において、図3に示した第1の実施の形態における構成要素と同一又は対応する構成要素には同一符号を付して示し、その詳細な説明は省略する。この実施の形態が第1の実施の形態と異なる点は、撮像素子としてRGBベイヤーカラーフィルタを有する単板カラー撮像素子1′を用いている点と、ディレイ部13〜15,17〜19のディレイクロック数を異ならせている点で、その他の構成は第1の実施の形態と同様である。
【0057】
次に、このように構成された第2の実施の形態の動作について、図5に加え、図6の(A)〜(C)を用いて説明する。ただし、図1及び図3に示した画像処理回路と同じ動作をするブロックについては、その説明を省略する。図6の(A)は、図5に示した画像処理回路における画像データの流れを説明するタイミングチャートであり、図6の(B)は画素信号の読み出し順を説明するための図であり、図6の(C)はベイヤーカラーフィルターを説明するための図である。図6の(A)のタイミングチャートの番号(1) 〜(8) で示す信号のタイミングは、図5に示す画像処理回路の同じ番号で示す部分に流れるデータのタイミングを示している。
【0058】
ベイヤーカラーフィルタを有する撮像素子1から出力される画像信号は、図6の(B)で示されるような、横画素数N個、縦画素数M個の2次元の単板カラー画像の画像信号であり、説明を容易にするため0から始まる画素番号、及びそれぞれの画素に対応するカラーフィルタの色を表記している。カラーフィルタの色は、図6の(C)で示す単板ベイヤーカラーフィルタの色であり、Rは赤、Grは赤と同じ行の緑、Bは青、Gbは青と同じ行の緑を表している。
【0059】
この2次元の単板カラー画像信号は、ADコンバータ2でデジタル信号に変換された後、画像メモリ3に書き込まれる。このときの画像信号の書き込み順は、メモリコントローラ4により、画素番号0(R),1(Gr),2(R),3(Gr),・・・,N+0(Gb),N+1(B),・・・というように、画素番号順に書き込まれるように制御される。
【0060】
次に、画像メモリ3に書き込まれた画像信号は、画像メモリ3から1クロック毎に読み出されるが、このときの読み出し順は、図6の(B)の矢印で示したように、画素番号0(R)の画素から矢印に沿って、縦方向にN+0(Gb),2N+0(R)の順に読み出され、次に、1(Gr),N+1(B),2N+1(Gr)というように、ジグザグ状に読み出される。右端の3N−1まで読み出された後は、3N+0(Gb)から4N+0(R),5N+0(Gb)と読み出され、以下、同様に画像の下端まで繰り返される。このようにして画像メモリ3から読み出された画像信号を、画像信号I(図6の(A)のタイミングチャートの番号(1) で示す信号)とする。
【0061】
一方、画像処理回路のもう一つの入力データである撮影情報は、撮影時のISO感度やシャッター速などの情報であり、図6の(A)のタイミングチャートの(2) で示すように、1フレーム単位で切り替わるデータであるため、1 画面中は同じ情報が保持される。
【0062】
カーソル高さ決定部5の動作は、図1に示した画像処理回路と同じ動作であり、ディレイ部11,12を通ったカーソル高さ信号curs及び画像信号I1信号は、図6の(A)のタイミングチャートの(3) に示すタイミングの信号となる。
【0063】
次に、カーソル初期位置決定部6,第1 のカーソル位置決定部7,及び第2のカーソル位置決定部8は、図1に示した画像処理回路と同じ動作をし、それらの出力信号は、それぞれディレイ部13,14,15を通った後、図6の(A)のタイミングチャートの(4) に示すタイミングの信号となる。ここで、ディレイ部13,14,15のディレイクロック数が3になっているが、この理由については後に述べる。
【0064】
次に、セレクタ9の動作も図1に示した画像処理回路と同じであり、ディレイ部17を通った後、図6の(A)のタイミングチャートの(5) で示したタイミングの処理済のカーソル位置信号high,low,center となる。このうちの信号centerはヒステリシススムージング処理を終えた画像信号であるので、出力画像信号Oとなる。
【0065】
ここで、セレクタ9の入力信号high3,low3,center3は、既にヒステリシススムージング処理を終えている1画素前隣の画素に対応するカーソル位置信号であるが、この1画素前隣の画素とは、2次元画像における同じ色の前隣の画素を示し、例えば、図6の(B)に示した画素番号2(R)の1画素前隣の画素とは、画素番号0(R)の画素のことであり、メモリからの読み出し順とは関係ない。前隣の画素を同色の画素とする理由は、色が異なると、ノイズの振幅値や画素のレベルが異なるため、同じ色同士でヒステリシススムージングを行う必要があるからである。
【0066】
よって、セレクタ9に入力するカーソル位置信号high0,low0,center0、high1,low1,center1、及びhigh2,low2,center2と、high3,low3,center3との関係は、図6の(A)のタイミングチャートの(4) と(6) で表したようなタイミングの関係、すなわち、タイミングチャートの(4) の画素番号2(R)の画素に対応する信号と、タイミングチャートの(6) の画素番号0(R)の画素に対応する信号とを同じタイミングとする必要がある。したがって、このタイミング合わせのため、処理済のカーソル位置信号のセレクタ9への入力信号high3,low3,center3は、処理済のカーソル位置信号high,low,center をディレイ部19によって4クロック遅らせた信号となる。
【0067】
次に、比較器10では、上記処理済のカーソル位置信号の上下端位置信号high,lowの2つ信号と、入力画像信号Iとの比較を行う。この比較は、1画素前隣の同色画素に対応するカーソル位置信号high,lowと、現在の入力画像信号Iとを比較するものである。具体的には、図6の(A)のタイミングチャートの(5) の画素番号0(R)の画素に対応する信号と、タイミングチャートの(7) の画素番号2(R)の画素に対応する信号とを比較するということであるから、カーソル位置信号high,lowは入力画像信号Iに対し、6クロック分遅れたものとしなければならない。したがって、ここでの画像信号にはディレイ部を通さない入力画像信号Iを用いることになる。比較器10の動作は、図1に示した画像処理回路の動作と同じであるが、比較器10が"11"を出力する条件である、左端画素の位置には違いがある。本実施の形態における左端画素とは、図6の(B)における、0(R),N+0(Gb),2N+0(R),・・・及び、1(Gr),N+1(B),2N+1(Gr),・・・の左端2列の画素である。
【0068】
この比較器10の出力信号は、ディレイ部18を通った後、セレクタ9のセレクト信号Sとなる。ここで、このセレクタ信号Sは前述したように、セレクタ9への入力信号high0,low0,center0、high1,low1,center1、high2,low2,center2、及びhigh3,low3,center3のいずれか1組を選択するための信号であるため、これらの信号とのタイミングを考慮する必要がある。具体的には、図6の(B)における画素番号2(R)の画素位置におけるヒステリシススムージング結果を得るためには、画素番号2(R)の画素位置に対応するカーソル位置信号high1,low1,center1及びhigh2,low2,center2と、画素番号0(R)の画素位置に対応する処理済のカーソル位置信号high3,low3,center3のいずれかを選択するセレクトする信号として、画素番号0(R)の画素位置に対応するセレクト信号Sが必要ということになる。すなわち、セレクト信号Sは図6の(A)のタイミングチャートの(8) に示したタイミングの信号とする必要がある。そして、このセレクト信号Sは、例えば画素番号0(R)の画素位置に対応するセレクト信号Sは、図6の(A)のタイミングチャートの(5) で示す処理済のカーソル位置信号high,low,center の画素番号0(R)の画素位置に対応する信号、及びタイミングチャートの(7) で示す画像信号Iの画素番号2(R)の画素信号から生成される信号であるから、この2つの信号に対して4クロック分遅れた信号ということになる。つまり、図6の(A)のタイミングチャートの(8) のタイミングのセレクト信号Sを得るためには、ディレイ部18は4クロック分のディレイを必要とするということになる。
【0069】
ここで、ディレイ部18は4クロック分のディレイが必要であるということは、比較器10の処理に4クロック分のパイプラインディレイを割り振ることが可能であるということであり、また、ディレイ部17が、2クロック必要であるということは、セレクタ9の処理に2クロック分のパイプラインディレイを割り振ることが可能であるということである。
【0070】
以上の説明を一般化して表すと、次のようになる。
(1)ディレイ部17とディレイ部18のディレイ数(ディレイクロック数)の和は6であればよい。
(2)ディレイ部17とディレイ部19のディレイ数の和は6であればよい。
(3)入力画像信号Iがカーソル位置決定部6〜8を経て比較器10までに至る間に存在するディレイ数の和は最低6必要で、もし、6より多い場合は、その多い分のディレイ数を、比較器10への入力画像信号Iの入力部分に挿入する必要がある。
(4)ベイヤーカラー画像においては、上記(1),(2)及び(3)に示したディレイ数の和は、画像信号を画像メモリ3から読み出す際に、縦方向に読み出す画素数×2に等しい。
【0071】
すなわち、本実施の形態では、画像メモリ3からの画素信号の読み出しを、画素番号0,N+0,2N+0,1,・・・というように読み出していたため、上記(1)及び(2)に記したディレイ数の和は3×2=6であったが、例えば、画素番号0,N+0,2N+0,3N+0,1,・・・というように読み出した場合は、ディレイ数の和は8となる。したがって、画像を縦に読み出す数を増やせば増やすほど、ディレイ部19,ディレイ部17,ディレイ部18に割り当てるディレイ数は多くなり、より複雑な処理をより高速に行うことが可能となる。
【0072】
さて、本実施の形態においては、ディレイ17,18,19のディレイ数は上記のように設定することが可能であるが、ディレイ13,14,15のディレイ数については、次のようにして設定される。
【0073】
まず、入力画像信号Iが、比較器10に一番早く到達するのは図6の(A)のタイミングチャートの(7) で示すタイミングのときである。したがって、この入力画像信号Iとタイミングを合わせる必要のある処理済のカーソル位置信号の上下端位置信号high,lowも、図6の(A)のタイミングチャートの(5) で示すタイミングより前には生成してはいけないことになる。この制約があるため、ディレイ部17のディレイ数を減らしたい場合は、図6の(A)のタイミングチャートの(4) で示すセレクタ9への入力信号(カーソル位置信号)を遅らせるしか方法はない。つまり、本実施の形態では、ディレイ部17のディレイ数を2としているため、ディレイ部13,14,15のディレイ数を3とする必要がある。仮に、ディレイ部17のディレイ数を1にしたい場合は、ディレイ部13,14,15のディレイ数を4にする必要がある。これは、比較器10への入力信号(処理済のカーソル位置信号の上下端位置信号)high,lowと、入力画像信号Iのタイミングを合わせるためである。
【0074】
また、仮に、ディレイ部17のディレイ数を5とした場合は、ディレイ部18及びディレイ部19のディレイ数を1とし、ディレイ部13,14,15のディレイ数を1にし、且つ、比較器10に入力する画像信号Iを1クロック遅らせる必要がある。これは第1の実施の形態での説明と同じで、比較器10の入力信号high,lowと入力画像信号Iのタイミングを合わせるためである。
【0075】
また、本実施の形態では入力画像をベイヤーカラー画像としたものを示したが、これは例えば補色フィルターような他のカラーフィルターによるカラー画像でも成り立つ。また、本実施の形態で用いたベイヤーカラー画像のような、1 画素おきに同色画素が並ぶ画像を扱う場合においては、画像メモリからの画像の読み出しを0,1,2,3,・・・というように、画像の横方向に読み出した場合、ディレイ部17とディレイ部18のディレイ数の和は2,ディレイ部17とディレイ部19のディレイ数の和は2となる。すなわち、セレクタ及び比較器をそれぞれ1クロック周期内で処理することが可能となり、図1で示した回路構成のままでも、回路のクロック周波数が高くない場合や、画像のビット幅が少ない場合においては、ヒステリシススムージングのパイプライン処理が実現可能である。
【0076】
以上で説明したように、画像メモリ3からの画像信号の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、カラー画像においても、ヒステリシススムージング回路に代表されるようなフィードバック処理回路を有する画像処理回路における画像処理を、パイプライン処理により高速処理することが可能となる。
【0077】
次に、本発明の第3の実施の形態について説明する。図7は、本発明に係る画像処理装置の第3の実施の形態を示すブロック構成図であり、図3及び図5に示した第1及び第2の実施の形態と同一又は対応する構成要素には同一の符号を付して示し、その説明を省略する。図7において、21は入力画素信号値がカーソルの上端より上となった場合の、カーソルの中心位置center1 を演算する第1のカーソル中心位置決定部、22は入力画素値がカーソルの下端より下となった場合の、カーソルの中心位置center2 を演算する第2のカーソル中心位置決定部、23はカーソルの上端位置high及び下端位置low を演算するカーソル上下端位置決定部、24はディレイ部(一般的回路におけるフリップフロップ)であり、ディレイ部11〜19と共に1 クロック分ディレイさせる場合はD,nクロック分ディレイさせる場合はnDと表している。
【0078】
この実施の形態においては、カーソル位置の演算は、最初に第1のカーソル中心位置決定部21及び第2のカーソル中心位置決定部22にて、中心位置center1,center2のみ求め、そしてセレクタ9により選ばれたカーソル中心位置から、カーソル上下端位置決定部23にてカーソル上下端位置を求めるようにしている。したがって、前記第1及び第2の実施の形態に対し、機能的には同じであるが、カーソルの位置を演算するブロックが簡単になり、回路規模を小さくできるという利点がある。
【0079】
しかし、セレクタ9の処理後に、カーソル上下端位置high,lowの演算を行うため、カーソル中心位置centerからセレクタ信号Sを演算するまでの回路は更に複雑になるので、画像信号の読み出しを図2の(B)のように横方向に読み出した場合においては、セレクタ9,カーソル中心位置決定部21又は22,及び比較器10の3つのブロックを、1クロック周期内に処理しなければならないことになり、一般的な回路でのパイプライン処理は難しい。
【0080】
このような、より複雑な構成の回路においても、図7に示す第3の実施の形態の回路構成のように、ディレイ部の配置及びディレイクロック数を適切に決め、図6の(B)で示したような画像読み出し方法をとることにより、カラー画像に対して図8に示したタイミングのパイプライン処理が可能となる。
【0081】
また、図7に示した第3の実施の形態に係る画像処理回路におけるパイプラインディレイ数(ディレイクロック数)は、第1及び第2の実施の形態と同様に、以下のように一般化できる。
(1)ディレイ部17とディレイ部24とディレイ部18のディレイ数の和は6であればよい。
(2)ディレイ部17とディレイ部19のディレイ数の和は6であればよい。
(3)入力画像信号Iがカーソル中心位置決定部21,22、セレクタ9、及びカーソル上下端位置決定部23を経て比較器10までに至る間に存在するディレイ数の和は最低6必要で、もし、6より多い場合は、その多い分のディレイ数を、比較器10への入力画像信号Iの入力部分に挿入する必要がある。本実施の形態では、入力画像信号Iがカーソル中心位置決定部21,22、セレクタ9、及びカーソル上下端位置決定部23を経て比較器10までに至る間に9段(9クロック分)のディレイ数があるため、3段のディレイ数のディレイ部16が比較器10に入力される画像信号Iの入力側に挿入されている。
(4)ベイヤーカラー画像においては、上記(1),(2)及び(3)に示したディレイ数の和は、画像信号を画像メモリ3から読み出す際に、縦方向に読み出す画素数×2に等しい。
【0082】
以上で説明したように、画像メモリ3からの画像の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、より複雑な構成のフィードバック回路においても、パイプライン処理により高速処理することが可能な画像処理回路を提供することができる。
【0083】
【発明の効果】
以上実施の形態に基づいて説明したように、本発明によれば、画像処理回路を構成するセレクタ及び比較の出力信号に対して適切な遅延量を設定することができ、ヒステリシススムージング処理に代表されるフィードバック処理を有する画像処理を、パイプライン処理により高速に行うことが可能な画像処理回路を実現することができる。
【図面の簡単な説明】
【図1】 本発明に関連する画像処理回路の構成を示すブロック構成図である。
【図2】 図1に示した画像処理回路の動作を説明するためのタイミングチャート、及び図1に示した画像処理回路における画像データの読み出し順を示す説明図である。
【図3】 本発明に係る画像処理装置の第1の実施の形態を示すブロック構成図である。
【図4】 図3に示した第1の実施の形態の動作を説明するためのタイミングチャート、及び第1の実施の形態における画像データの読み出し順を示す説明図である。
【図5】 本発明の第2の実施の形態を示すブロック構成図である。
【図6】 図5に示した第2の実施の形態の動作を説明するためのタイミングチャート、第2の実施の形態における画像データの読み出し順を示す説明図、及び第2の実施の形態における撮像素子に用いられるベイヤーカラーフィルタの構成を示す図である。
【図7】 本発明の第3の実施の形態を示すブロック構成図である。
【図8】 図7に示した第3の実施の形態の動作を説明するためのタイミングチャートである。
【図9】 ヒステリシススムージング処理を説明するための説明図である。
【符号の説明】
1 撮像素子
1′ 単板カラー撮像素子
2 A/Dコンバータ
3 画像メモリ
4 メモリコントローラ
5 カーソル高さ決定部
6 カーソル初期位置決定部
7 第1のカーソル位置決定部
8 第2のカーソル位置決定部
9 セレクタ
10 比較器
11〜19 ディレイ部
21 第1のカーソル中心位置決定部
22 第2のカーソル中心位置決定部
23 カーソル上下端位置決定部
24 ディレイ部
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to an image processing circuit, and more particularly to an image processing circuit including an image data feedback processing unit.
[0002]
[Prior art]
[Non-Patent Document 1]
  R.W.Ehrich, "A symmetric hysterisis smoothing algorithm that preserves principal features," [CGIP, vol.8, pp.121-126, August 1978]
[0003]
  In an image processing apparatus that aims to obtain an image of a desired image quality by performing digital image processing on an image signal obtained from an image sensor such as a CCD, the past processing result is used as a function of image processing. In some cases, feedback processing is required to perform the current processing.
[0004]
  Here, hysteresis smoothing of an image will be described as an example of image processing having feedback processing. First, an outline of the hysteresis smoothing operation will be described with reference to FIG. In order to simplify the description, the image data handled by the image processing apparatus is assumed to be monochrome image data. Hysteresis smoothing is one of the methods for removing noise contained in an image. R.W.Ehrich, “A symmetric hysterisis smoothing algorithm that preserves principal features,” [CGIP, vol.8, pp.121-126 , August 1978] (Non-Patent Document 1).
[0005]
  This hysteresis smoothing is to remove noise by processing only in the one-dimensional direction of the image. As shown in FIG. 9, the cursor 101 having a height h is moved in the one-dimensional direction of the input image value 102, and the cursor 101 The center value 101c is output as the output image value 103 after noise removal. In FIG. 9, the horizontal axis indicates the pixel position, and the vertical axis indicates the pixel level. The cursor 101 is moved according to the following rules.
(1) The initial position of the cursor 101 (pixel position (1) in FIG. 9) is set so that the center 101c of the cursor 101 becomes the input pixel value 102.
(2) The cursor 101 is horizontally moved from the current position by one pixel while maintaining the position, that is, the same pixel level.
(3) If the input pixel value 102 that has been moved horizontally by one pixel is within the range of the cursor 101 as in the pixel position (2) in FIG. (Direction), the cursor 101 is not moved, and the level value of the cursor center 101c at this time is output as the output image value 103 after noise removal.
(4) If the input pixel value 102 is above the upper end 101h of the cursor 101 when the pixel is moved horizontally by one pixel as in the pixel position (5) in FIG. If the input pixel value 102 is below the lower end 101l of the cursor 101 as in the case of the pixel position (8) in FIG. The lower end 101l of 101 is moved in the vertical direction so as to match the input pixel value 102. The level value of the cursor center 101c at this time is output as an output image value after noise removal.
  By doing so, it is possible to remove a noise component smaller than the height h of the cursor 101 while preserving a large amplitude component included in the subject.
[0006]
  As shown in the above description of the operation, this hysteresis smoothing is an algorithm that determines the current cursor position based on the cursor position information of the previous pixel and performs noise removal. This is a feedback image processing apparatus that uses the cursor position information as feedback data and is used for the current cursor position calculation.
[0007]
  On the other hand, in an image processing apparatus that realizes the digital image processing by hardware processing, high-speed processing is generally performed using pipeline processing. Pipeline processing is processing in which a series of image processing is divided into small blocks that can operate within one clock cycle, and each block is operated in a flow-like manner.
[0008]
[Problems to be solved by the invention]
  By the way, when a feedback process such as hysteresis smoothing is to be pipelined, it is also necessary to process the feedback data within one clock cycle. However, since the feedback data for the hysteresis smoothing process is generated by comparing the cursor upper and lower end values with the input image value, if the circuit operating frequency is high or the image bit width is large, it is processed within one clock cycle. May not end.
[0009]
  As described above, when an image processing circuit including a feedback process that performs a complicated operation on feedback data is to be realized by pipeline processing, there is a problem that the pipeline circuit cannot be realized. Conventionally, there has not been proposed a method for realizing processing that requires feedback of data passing through such complicated gates in units of pixels by pipeline processing.
[0010]
  The present invention has been made to solve the above-mentioned problems that occur when pipeline processing is performed on an image processing algorithm having conventional feedback processing. Image processing including feedback processing with a complicated configuration is performed by pipeline processing. An object is to provide an image processing circuit capable of high-speed processing.
[0011]
[Means for Solving the Problems]
  In order to solve the above problems, the invention according to claim 1The image signal obtained from the image sensor The input image signal I read out in a predetermined order is subjected to predetermined noise removal including feedback processing, and the output image signal O subjected to the noise removal is obtained.An image processing circuit for outputting,Cursor position determination for processing a pixel signal corresponding to the first pixel of the image sensor in the input image signal I to calculate a plurality of cursor positions and outputting a plurality of sets of cursor position signals related to the cursor position And a cursor relating to a plurality of sets of cursor position signals and a pixel signal corresponding to a second pixel that has already been subjected to noise removal prior to the first pixel, based on the select signal S inputted Select one set of signals from the position signals, compare the selector that outputs the selected signals, the signal selected by the selector and the first pixel signal, and compare A comparison unit that outputs the result to the selector as the select signal S of the selector, and the selector as a select signal S of the selector from the output side of the selector. A first delay amount until being input, and a second delay until the input from the selector output side to the selector as a cursor position signal related to the pixel signal corresponding to the second pixel for which noise removal has been completed A delay unit that provides a delay amount so that the amount and the third delay amount of the input image signal I reaching the comparison unit through the cursor position determination unit are equal.It is characterized by having.
[0012]
  The first to third embodiments correspond to the embodiment relating to the first aspect of the present invention. And in the image processing circuit configured in this way,selectorAnd comparisonPartTherefore, an appropriate delay amount can be set for the output signal, and image processing having feedback processing represented by hysteresis smoothing can be performed at high speed by pipeline processing.
[0013]
  Claim2The invention according to claim1In the image processing circuit according to the above,Delay sectionIs a flip-flop circuit.
[0014]
  This claim2The first to third embodiments correspond to the embodiments related to the invention. In the image processing apparatus configured as described above,Delay sectionIs configured with a flip-flop circuit, the delay amount can be easily set.
[0015]
  Claim3The invention according to claim1In the image processing circuit according to claim 1, the first pixel and the second pixelAnd adjacentThe first embodiment corresponds to the embodiment relating to the present invention.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
  Next, embodiments will be described. First, prior to the description of the embodiment of the present invention, a basic circuit configuration considered as an image processing circuit related to the present invention and its operation will be described. FIG. 1 is a block diagram showing a basic circuit configuration conceivable when a hysteresis smoothing processing circuit is mounted on a digital camera. In FIG. 1, 1 is an image sensor for capturing a monochrome image, or an image sensor having a monochrome color filter, 2 is an AD converter that converts the signal of the image sensor 1 into a digital signal, and 3 is an output signal of the AD converter. An image memory for storing one screen, a memory controller 4 for generating a read / write address of the image memory 3, and a cursor height determining unit 5 for determining a cursor height h based on photographing information and an input image signal It is.
[0017]
  Reference numeral 6 denotes a cursor initial position determination unit for calculating the cursor upper end position high0, the lower end position low0, and the cursor center position center0 when the input pixel signal is an image end, and 7 is a cursor having the input pixel signal value as the upper end of the cursor. A first cursor position determination unit for calculating the upper end position high1, the lower end position low1, and the cursor center position center1, 8 is the cursor upper end position high2, the lower end position low2, and the cursor center position center2 with the input pixel value as the lower end of the cursor. The second cursor position determination unit 9 calculates the output of the cursor initial position determination unit 6, the output of the first cursor position determination unit 7, the output of the second cursor position determination unit 8, and the hysteresis smoothing process. Selector for selecting and outputting one set of processing results high3, low3, and center3 of the pixel (advanced pixel) adjacent to the previous pixel that has been completed, 10 is the current Comparators 11 to 18 for comparing the pixel value of the cursor with the upper and lower ends of the cursor absorb the operation delay time generated in each of the constituent blocks 5 to 10 by synchronizing with the clock timing, and each of the constituent blocks 5 to 10 This is a delay unit (flip-flop in a general circuit) for matching the timing between the output data of each of the output data in units of clocks.
[0018]
  Next, operation of the image processing circuit shown in FIG. 1 will be described with reference to a timing chart in FIG. 2A and an explanatory diagram in FIG. 2A is a timing chart for explaining a flow of image data in the circuit shown in FIG. 1, and FIG. 2B is a diagram for explaining an image reading order. Numbers (1) to (7) in (A) of FIG. 2 are numbers indicating the timing of data flowing through the image processing circuit shown in FIG. 1, and (1) to (7) of the image processing circuit shown in FIG. This represents the data timing in the part indicated by (7).
[0019]
  The image signal output from the image sensor 1 is a two-dimensional image signal having N horizontal pixels and M vertical pixels, as shown in FIG. 2B, for ease of explanation. Pixel numbers starting from 0 are assigned from the upper left corner. The two-dimensional image signal is converted into a digital signal by the AD converter 2 and then written into the image memory 3. The image signal writing order at this time is controlled by the memory controller 4 so that the pixel numbers 0, 1, 2, 3,... N-1, N + 0, N + 1,. .
[0020]
  Next, the image signal is read out from the image memory 3 every clock, and the reading order at this time is the horizontal direction in order from the 0th pixel at the upper left end as shown by the arrow in FIG. Is read out. After reading to the right end, scanning is performed in the right direction in order from the (N + 0) th row in the second row, and thereafter the same is repeated to the lower right end of the image, and this becomes the input image signal I.
[0021]
  On the other hand, shooting information, which is another input data of the image processing circuit, is information such as ISO sensitivity and shutter speed at the time of shooting, and one frame as shown in (2) of the flowchart of FIG. Since the data is switched in units, the same information is retained in one screen.
[0022]
  The input image signal I and the photographing information are input to the cursor height determining unit 5, and the cursor height information curs is calculated and output for each pixel based on these information. Here, the cursor height information curs is obtained based on the characteristic that the image pickup element 1 has a characteristic that the amplitude of noise increases when the level of the image signal is high, and the characteristic that the noise amplitude increases as the shutter speed increases. calculate. The calculated cursor height information curs passes through the delay unit 11 and becomes a clock synchronization signal.
[0023]
  The input image signal I also passes through the delay unit 12 in order to synchronize the cursor height information curs with the timing in clock units, and as a result, the input image signal I becomes a signal I1 delayed by one clock. Therefore, these two signals curs and I1 are signals having the timing shown in (3) of the timing chart of FIG.
[0024]
  Next, in the cursor initial position determination unit 6, the first cursor position determination unit 7, and the second cursor position determination unit 8, the cursor upper and lower end positions and the cursor center position are determined from the cursor height curs and the input image signal I1. Is calculated.
[0025]
  The cursor initial position determination unit 6 is a block for determining the cursor initial position at the left end of the image, such as 0, N + 0, 2N + 0,... In FIG. The cursor center position center0 is calculated as shown by the following equations (1), (2), and (3), respectively.
    high0 = I1 + curs / 2 (1)
     low0 = I1-curs / 2 (2)
    center0 = I1 (3)
[0026]
  Since the first cursor position determination unit 7 is a block that performs calculation when the input image signal I1 is set to the upper end position of the cursor, the cursor upper end position high1, the lower end position low1, and the cursor center position center1 are respectively ( 4), (5), and (6) are calculated.
    high1 = I1 (4)
     low1 = I1-curs (5)
    center1 = I1-curs / 2 (6)
[0027]
  Similarly, since the second cursor position determination unit 8 is a block that performs calculation when the input image signal I1 is set to the lower end position of the cursor, the cursor upper end position high2, the lower end position low2, and the cursor center position center2 are: Calculations are performed as indicated by (7), (8), and (9), respectively.
    high2 = I1 + curs (7)
     low2 = I1 (8)
    center2 = I1 + curs / 2 (9)
[0028]
  The output signals of the cursor initial position determining unit 6, the first cursor position determining unit 7, and the second cursor position determining unit 8 pass through the delay units 13, 14, and 15 to become clock synchronization signals, respectively. These signals are signals having the timing shown in (4) of the timing chart of FIG.
[0029]
  Next, in the selector 9, the output signals high 0, low 0, center 0 of the cursor initial position determining unit 6 after passing through the delay unit 13 and the output signal high 1 of the first cursor position determining unit 7 after passing through the delay unit 14 described above. low1, center1, the output signal high2, low2, center2 of the second cursor position determination unit 8 after passing through the delay unit 15, and the processing result high3, low3, the pixel signal immediately before the pixel that has already been subjected to the hysteresis smoothing process Select and output one set of center3. The select signal S of the selector 9 is a 2-bit output signal from the comparator 10 in the subsequent stage of the selector 9, and is a signal having four states of “00”, “01”, “10”, and “11”. is there.
[0030]
  In response to the select signal S, the selector 9 operates as follows.
(1) When S = “00”, the selector 9 outputs the outputs high1, low1, and center1 of the first cursor position determination unit 7.
(2) When S = “01”, the selector 9 outputs the outputs high2, low2, and center2 of the second cursor position determination unit 8.
(3) When S = “10”, the selector 9 outputs the hysteresis smoothing processed signals high3, low3, and center3.
(4) When S = “11”, the selector 9 outputs the outputs high0, low0, and center0 of the cursor initial position determination unit 6.
[0031]
  Thus, the signal selected by the selector 9 passes through the delay unit 17 and becomes the signals high, low, and center at the timing indicated by (5) in the timing chart of FIG. Since the signals high, low, and center are signals that have undergone the hysteresis smoothing process, they become the input signals high3, low3, and center3 of the selector 9, and the signal center becomes the output image signal O.
[0032]
  Next, the comparator 10 compares the upper and lower end position signals high and low of the selected cursor position signal with the image signal. Since this comparison needs to compare the upper and lower edge position signals high and low of the cursor at the pixel position adjacent to the previous pixel and the current image signal, the upper and lower edge position signals high and low of the cursor and the image The timing relationship with the signal must be shifted by one pixel. Therefore, the image signal becomes an image signal I2 obtained by further delaying the image signal I1 by one clock by the delay unit 16 as shown in (6) of the timing chart of FIG.
[0033]
  Using the upper and lower end position signals high and low of these cursors and the image signal I2, the comparator 10 operates as follows. The output of the comparator 10 is a 2-bit signal.
(1) If I2> high, the comparator 10 outputs “00”.
(2) If I2 <low, the comparator 10 outputs “01”.
(3) If low <I2 <high, the comparator 10 outputs “10”.
(4) If I2 is the signal of the leftmost pixel of the image, “11” is output regardless of the high and low signals.
[0034]
  Here, the leftmost pixel of the image is a pixel in the leftmost column of 0, N + 0, 2N + 0,... In FIG. The signal from the comparator 10 becomes the select signal S of the selector 9 after passing through the delay unit 18. Therefore, the select signal S is a signal having the timing shown in (7) of the timing chart of FIG. Further, the processing at the left end of the image is processing that is performed only once for each row in the image shown in FIG. 2B, and is not directly related to the present invention that describes the feedback circuit. It is omitted in the description.
[0035]
  By the way, the select signal S output from the comparator 10 is not a signal derived from the result one pixel before the input signals (high1, low1, center1) and (high2, low2, center2) of the selector 9. Must not. Specifically, the select signal S for selecting the cursor position signals (high1, low1, center1) and (high2, low2, center2) corresponding to the pixel of pixel number 1 in FIG. The signal needs to correspond to the number 0 pixel. However, looking at the timing relationship of the signals indicated by (4) and (7) in the timing chart of FIG. 2A, the cursor position signals (high1, low1, center1) corresponding to the pixel of pixel number 1 and ( The select signal S for selecting high2, low2, center2) has not yet been determined, and the cursor position signals (high1, low1, center1) and (high2, low2, center2) corresponding to the pixel of pixel number 2 For the first time as a select signal, a select signal S corresponding to the pixel of pixel number 0 is generated.
[0036]
  In this case, a select signal derived from the result two pixels before is used, and a desired hysteresis smoothing result cannot be obtained. In order to solve this problem, it is necessary to advance the timing for generating the select signal S by one clock. For this purpose, either the delay unit 17 after the selector 9 or the delay unit 18 after the comparator 10 is used. Need to be removed. That is, both the selector 9 and the comparator 10 need to be processed within one clock cycle.
[0037]
  However, for example, when the data bit length of the image signal is large, the calculation time becomes long, so that the processing of the selector 9 and the comparator 10 may not be completed within one clock cycle. In addition, even when an operation frequency of the circuit is increased and processing is performed at a high speed, since one clock cycle is shortened, there is a possibility that the selector 9 and the comparator 10 cannot be completed within one clock cycle. In particular, when this circuit is realized using a semiconductor device having a relatively long gate delay time, it is more difficult to increase the clock frequency. Alternatively, for example, when pipeline processing is realized by using a high-performance semiconductor device and operating at a low operating frequency, there is a problem that an image processing apparatus with high cost and low performance is obtained.
[0038]
  Next, an embodiment of the present invention capable of solving this problem will be described. FIG. 3 is a block diagram showing the configuration of the image processing circuit according to the first embodiment of the present invention, and is a block diagram showing the configuration of the image processing circuit when the hysteresis smoothing processing circuit is mounted on a digital camera. 3, members that are the same as or correspond to those in the circuit shown in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted. This embodiment is different from the circuit shown in FIG. 1 in that the delay unit 16 that delays the image signal by one clock is omitted, and the processing result (high3 , low3, center3) is provided with a delay unit 19 that delays by two clocks, and the select signal S output from the comparator 10 is further delayed by two clocks by the delay unit. In the delay units 11 to 19, D is displayed when delaying by one clock, and nD is displayed when delaying by n clocks.
[0039]
  Next, the operation of the first embodiment configured as described above will be described with reference to FIGS. 4A and 4B in addition to FIG. However, the description of the same operation as the circuit of FIG. 1 is omitted. 4A is a timing chart for explaining the flow of image data in the circuit shown in FIG. 3, and FIG. 4B is an explanatory diagram for explaining the reading order of images. Numbers (1) to (8) in the timing chart of FIG. 4 (A) indicate the timing of data flowing through the circuit, and represent the timing of data in the portions indicated by (1) to (8) in FIG. 3, respectively. Yes.
[0040]
  The image signal output from the image sensor 1 is converted into a digital signal by the AD converter 2 and then written to the image memory 3 in the order of 0, 1, 2,... By the memory controller 4 in FIG. This is the same as the image processing circuit shown.
[0041]
  Next, the image signal is read from the image memory 3 every clock, and the reading order at this time is as indicated by the arrow in the explanatory diagram of FIG. Are read in the order of N + 0, 2N + 0 in the vertical direction, and then read out in a zigzag manner as 1, N + 1,2N + 1. After reading up to 3N−1 at the right end, 3N + 0th to 4N + 0, 5N + 0 are read out, and the same is repeated until the lower end of the image. This is defined as an image signal I.
[0042]
  The operation of the cursor height determining unit 5 is the same as that of the image processing circuit shown in FIG. 1. The cursor height signal curs and the image signal I1 signal that have passed through the delay units 11 and 12 are shown in FIG. The timing signal shown in (3) of the timing chart of FIG.
[0043]
  Next, the operations in the cursor initial position determining unit 6, the first cursor position determining unit 7, and the second cursor position determining unit 8 are the same as the operations of the image processing circuit shown in FIG. After passing through the delay sections 13, 14 and 15, respectively, the signal becomes a signal having the timing shown in (4) of the timing chart of FIG.
[0044]
  Next, the operation of the selector 9 is the same as the operation of the image processing circuit shown in FIG. 1, and after passing through the delay unit 17, the signal of the timing shown in (5) of the timing chart of FIG. high, low, center. These signals are the cursor position signals that have been subjected to the hysteresis smoothing process. Among these signals, the signal center is an image signal that has been subjected to the hysteresis smoothing process, and thus becomes an output image signal O.
[0045]
  Here, the input signals high3, low3, and center3 of the selector 9 are cursor position signals corresponding to the pixel immediately before the pixel that has already been subjected to the hysteresis smoothing process. 4 shows a pixel adjacent to the front (a preceding pixel) in the two-dimensional image, for example, a pixel of pixel number 0 with respect to a pixel of pixel number 1 in the explanatory diagram shown in FIG. Does not matter. Therefore, the cursor position signals high0, low0, center0, high1, low1, center1, high2, low2, center2, and high3, low3, center3 input to the selector 9 are represented by (4) in the timing chart of FIG. The timing relationship as shown in (6), that is, the signal corresponding to the pixel number 1 in the timing chart (4) and the signal corresponding to the pixel number 0 in the timing chart (6) are the same. Need to be timing.
[0046]
  Therefore, in order to adjust the timing of these signals, the input signals high3, low3, and center3 of the cursor position signal for which the hysteresis smoothing processing has been completed are input to the selector 9 by the delay unit 19. The signal is delayed by 2 clocks.
[0047]
  Next, the comparator 10 compares the input image signal I with the two signals of the upper and lower end position signals high and low of the cursor position signal subjected to the hysteresis smoothing process. In this comparison, the cursor position signals high and low corresponding to the pixel adjacent to the previous pixel are compared with the current image signal I. Specifically, the signal corresponding to the pixel number 0 of (5) in the timing chart of FIG. 4A is compared with the signal corresponding to the pixel number 1 of (7) of the timing chart. Therefore, the cursor position signals high and low must be delayed by 3 clocks with respect to the image signal I. Therefore, the input image signal I that does not pass through the delay unit is used as the image signal here.
[0048]
  The operation of the comparator 10 is the same as that shown in the image processing circuit shown in FIG. 1, and its output signal passes through the delay unit 18 and becomes the select signal S of the selector 9.
[0049]
  Here, as described above, the selector signal S selects one of the input signals high0, low0, center0, high1, low1, center1, high2, low2, center2 and high3, low3, center3 to the selector 9. Therefore, it is necessary to consider the timing with these signals. Specifically, in order to obtain the hysteresis smoothing result at the pixel position of pixel number 1 in FIG. 4B, the cursor position signals high1, low1, center1 and high2, low2, corresponding to the pixel position of pixel number 1. A select signal S corresponding to the pixel position of pixel number 0 is required as a selection signal for selecting one of center2 and the processed cursor position signals high3, low3, and center3 corresponding to the pixel position of pixel number 0 become. That is, the select signal S needs to be a signal having the timing shown in (8) of the timing chart of FIG. For example, the select signal S corresponding to the pixel position of the pixel number 0 is the pixel of the processed cursor position signal high, low, center indicated by (5) in the timing chart of FIG. Since the signal is generated from the signal corresponding to the pixel position of the number 0 and the pixel signal of the pixel number 1 of the image signal I shown in (7) of the timing chart, the two signals are delayed by 2 clocks. It will be a signal. That is, in order to obtain the select signal S at the timing (8) in the timing chart of FIG. 4A, the delay unit 18 requires a delay of two clocks.
[0050]
  Here, the fact that the delay unit 18 requires a delay of two clocks means that a pipeline delay of two clocks can be allocated to the processing of the comparator 10. For example, when a relatively high-speed clock is used as a clock for operating the image processing circuit, it is conceivable that the processing of the comparator 10 does not end within one clock cycle. At this time, by dividing the circuit constituting the comparator 10 and inserting one or two delay elements constituting the delay unit 18 inside the comparator 10, the processing between the divided circuits is simplified. Pipelining becomes possible.
[0051]
  As a modification of this embodiment, when the processing of the selector 9 does not end within one clock period, the delay number of the delay unit 17 is set to two clocks, and a part thereof is inserted into the selector 9 to delay the delay. By setting the number of delays of the unit 19 to one clock, the number of delays of the delay unit 18 to one clock, and further delaying the image signal I input to the comparator 10 by one clock, pipeline processing becomes possible. Here, the reason why the image signal I input to the comparator 10 is delayed by one clock is to match the timing of the input signal high and low to the comparator 10 with the timing of the image signal I.
[0052]
  The above description is generalized as follows.
(1) The sum of the number of delays (the number of delay clocks) of the delay unit 17 and the delay unit 18 may be three.
(2) The sum of the delay numbers of the delay unit 17 and the delay unit 19 may be three.
(3) The sum of the number of delays existing while the input image signal I reaches the comparator 10 through the cursor position determination units 6 to 8 is required to be at least 3. Therefore, it is necessary to insert the input image signal I into the input portion to the comparator 10.
(4) The sum of the delay numbers shown in the above (1), (2), and (3) is equal to the number of pixels read in the vertical direction when the image signal is read from the image memory 3.
[0053]
  That is, in the present embodiment, pixel signals are read from the image memory 3 as pixel numbers 0, N + 0, 2N + 0, 1,..., And are described in (1) and (2) above. The sum of the number of delays is 3. However, for example, when the pixel numbers 0, N + 0, 2N + 0, 3N + 0, 1,. Therefore, as the number of images read out vertically increases, the number of delays assigned to the delay unit 19, the delay unit 17, and the delay unit 18 increases, and more complicated processing can be performed at higher speed.
[0054]
  When the above generalized description is applied to the image processing circuit shown in FIG. 1, the readout order of the pixel signals is pixel numbers 1, 2,... The sum of the delay numbers of the delay unit 17 and the delay unit 18 is 1. Therefore, in the image processing circuit shown in FIG. 1, the selector 9 and the comparator 10 must be processed within one clock. This is a problem in the image processing circuit shown in FIG. Connected.
[0055]
  As described above, the order of reading out the pixel signals from the image memory 3 is devised, and the number of delays and the insertion position of the pipeline delay unit in the circuit are appropriately selected, which is represented by the hysteresis smoothing circuit. An image processing circuit having such a feedback processing circuit can be processed at high speed by pipeline processing.
[0056]
  Next, a second embodiment of the present invention will be described. In the first embodiment, the input image is a single color image, whereas the second embodiment relates to an image processing circuit when a single-plate color image is used as the input image. is there. FIG. 5 is a block diagram showing a second embodiment of the image processing apparatus according to the present invention. Specifically, FIG. 5 is a block diagram showing a circuit configuration when a hysteresis smoothing processing circuit is mounted on a digital camera. . In FIG. 5, the same or corresponding components as those in the first embodiment shown in FIG. 3 are denoted by the same reference numerals, and detailed description thereof is omitted. This embodiment differs from the first embodiment in that a single-plate color image pickup device 1 ′ having an RGB Bayer color filter is used as the image pickup device, and delays 13 to 15 and 17 to 19. Other configurations are the same as those of the first embodiment in that the number of clocks is different.
[0057]
  Next, the operation of the second embodiment configured as described above will be described with reference to FIGS. 6A to 6C in addition to FIG. However, description of blocks that perform the same operation as the image processing circuit shown in FIGS. 1 and 3 is omitted. 6A is a timing chart for explaining the flow of image data in the image processing circuit shown in FIG. 5, and FIG. 6B is a diagram for explaining the reading order of pixel signals. FIG. 6C is a diagram for explaining the Bayer color filter. The timings of the signals indicated by the numbers (1) to (8) in the timing chart of FIG. 6A indicate the timing of data flowing in the portions indicated by the same numbers in the image processing circuit shown in FIG.
[0058]
  An image signal output from the image sensor 1 having a Bayer color filter is an image signal of a two-dimensional single-plate color image having N horizontal pixels and M vertical pixels as shown in FIG. In order to facilitate the explanation, the pixel numbers starting from 0 and the color of the color filter corresponding to each pixel are shown. The color of the color filter is the color of the single-plate Bayer color filter shown in FIG. 6C, where R is red, Gr is green in the same row as red, B is blue, and Gb is green in the same row as blue. Represents.
[0059]
  The two-dimensional single-plate color image signal is converted into a digital signal by the AD converter 2 and then written in the image memory 3. The order of writing the image signals at this time is determined by the memory controller 4 using pixel numbers 0 (R), 1 (Gr), 2 (R), 3 (Gr),..., N + 0 (Gb), N + 1 (B). ,... Are controlled so that they are written in the order of pixel numbers.
[0060]
  Next, the image signal written in the image memory 3 is read from the image memory 3 every clock, and the reading order at this time is the pixel number 0 as shown by the arrow in FIG. (R) pixels are read in the order of N + 0 (Gb), 2N + 0 (R) in the vertical direction along the arrow, and then 1 (Gr), N + 1 (B), 2N + 1 (Gr), and so on. Read out in zigzag form. After reading up to 3N-1 at the right end, 3N + 0 (Gb) is read out to 4N + 0 (R), 5N + 0 (Gb), and the same is repeated until the lower end of the image. The image signal read from the image memory 3 in this way is referred to as an image signal I (a signal indicated by number (1) in the timing chart of FIG. 6A).
[0061]
  On the other hand, shooting information which is another input data of the image processing circuit is information such as ISO sensitivity and shutter speed at the time of shooting. As shown in (2) of the timing chart of FIG. Since the data is switched in units of frames, the same information is retained in one screen.
[0062]
  The operation of the cursor height determining unit 5 is the same as that of the image processing circuit shown in FIG. 1, and the cursor height signal curs and the image signal I1 signal that have passed through the delay units 11 and 12 are shown in FIG. The timing signal shown in (3) of the timing chart of FIG.
[0063]
  Next, the cursor initial position determination unit 6, the first cursor position determination unit 7, and the second cursor position determination unit 8 operate in the same manner as the image processing circuit shown in FIG. After passing through the delay units 13, 14 and 15, respectively, the signal becomes the timing signal shown in (4) of the timing chart of FIG. Here, the number of delay clocks of the delay units 13, 14, and 15 is 3. The reason for this will be described later.
[0064]
  Next, the operation of the selector 9 is also the same as that of the image processing circuit shown in FIG. 1, and after passing through the delay unit 17, the timing processed as indicated by (5) in the timing chart of FIG. The cursor position signals are high, low, and center. Of these signals, the signal center is an image signal that has been subjected to the hysteresis smoothing process, and thus becomes an output image signal O.
[0065]
  Here, the input signals high3, low3, and center3 of the selector 9 are cursor position signals corresponding to the pixel immediately before the pixel that has already been subjected to the hysteresis smoothing process. 6 shows the adjacent pixel of the same color in the two-dimensional image. For example, the pixel immediately adjacent to the pixel number 2 (R) shown in FIG. 6B is the pixel having the pixel number 0 (R). And has nothing to do with the order of reading from the memory. The reason why the adjacent pixel is the same color pixel is that, if the colors are different, the amplitude value of the noise and the level of the pixels are different, so that it is necessary to perform hysteresis smoothing between the same colors.
[0066]
  Therefore, the relationship between the cursor position signals high0, low0, center0, high1, low1, center1 and high2, low2, center2 and high3, low3, center3 input to the selector 9 is as shown in the timing chart of FIG. (4) and (6) in the timing chart, that is, the signal corresponding to the pixel of pixel number 2 (R) in (4) of the timing chart and the pixel number 0 ( The signal corresponding to the pixel R) needs to have the same timing. Therefore, for this timing adjustment, the input signals high3, low3, and center3 of the processed cursor position signal to the selector 9 are signals obtained by delaying the processed cursor position signals high, low, and center by 4 clocks by the delay unit 19. Become.
[0067]
  Next, the comparator 10 compares the two signals of the upper and lower end position signals high and low of the processed cursor position signal with the input image signal I. This comparison is to compare the cursor position signals high and low corresponding to the same color pixel one pixel before and the current input image signal I. Specifically, it corresponds to the signal corresponding to the pixel number 0 (R) of (5) in the timing chart of FIG. 6A and the pixel number 2 (R) of (7) of the timing chart. The cursor position signals “high” and “low” must be delayed from the input image signal I by 6 clocks. Therefore, the input image signal I that does not pass through the delay unit is used as the image signal here. The operation of the comparator 10 is the same as that of the image processing circuit shown in FIG. 1, but there is a difference in the position of the left end pixel, which is a condition for the comparator 10 to output “11”. The leftmost pixel in this embodiment means 0 (R), N + 0 (Gb), 2N + 0 (R),..., 1 (Gr), N + 1 (B), 2N + 1 (B) in FIG. Gr),... Are pixels in the leftmost two columns.
[0068]
  The output signal of the comparator 10 becomes the select signal S of the selector 9 after passing through the delay unit 18. Here, as described above, the selector signal S selects one set of the input signals high0, low0, center0, high1, low1, center1, high2, low2, center2 and high3, low3, center3 to the selector 9. Therefore, it is necessary to consider the timing with these signals. Specifically, in order to obtain the hysteresis smoothing result at the pixel position of the pixel number 2 (R) in FIG. 6B, the cursor position signals high1, low1, corresponding to the pixel position of the pixel number 2 (R). As a signal for selecting one of center1, high2, low2, and center2, and processed cursor position signals high3, low3, and center3 corresponding to the pixel position of pixel number 0 (R), pixel number 0 (R) This means that the select signal S corresponding to the pixel position is necessary. That is, the select signal S must be a signal having the timing shown in (8) of the timing chart of FIG. For example, the select signal S corresponding to the pixel position of pixel number 0 (R) is the processed cursor position signal high, low shown in (5) of the timing chart of FIG. , center is a signal generated from the signal corresponding to the pixel position of pixel number 0 (R) and the pixel signal of pixel number 2 (R) of the image signal I shown in (7) of the timing chart. This is a signal delayed by 4 clocks with respect to one signal. That is, in order to obtain the select signal S at the timing (8) in the timing chart of FIG. 6A, the delay unit 18 needs a delay of 4 clocks.
[0069]
  Here, the fact that the delay unit 18 needs a delay of 4 clocks means that a pipeline delay of 4 clocks can be allocated to the processing of the comparator 10, and the delay unit 17 However, the fact that two clocks are required means that a pipeline delay of two clocks can be allocated to the processing of the selector 9.
[0070]
  The above description is generalized as follows.
(1) The sum of the number of delays (the number of delay clocks) of the delay unit 17 and the delay unit 18 may be six.
(2) The sum of the delay numbers of the delay unit 17 and the delay unit 19 may be six.
(3) The sum of the number of delays existing while the input image signal I passes from the cursor position determination units 6 to 8 to the comparator 10 is required to be at least six. The number needs to be inserted into the input portion of the input image signal I to the comparator 10.
(4) In a Bayer color image, the sum of the delay numbers shown in (1), (2) and (3) above is the number of pixels read in the vertical direction × 2 when the image signal is read from the image memory 3. equal.
[0071]
  That is, in the present embodiment, pixel signals are read from the image memory 3 as pixel numbers 0, N + 0, 2N + 0, 1,..., And are described in (1) and (2) above. The sum of the number of delays is 3 × 2 = 6. However, for example, when the pixel numbers 0, N + 0, 2N + 0, 3N + 0, 1,. Therefore, as the number of images read out vertically increases, the number of delays assigned to the delay unit 19, the delay unit 17, and the delay unit 18 increases, and more complicated processing can be performed at higher speed.
[0072]
  In this embodiment, the delay numbers of the delays 17, 18, and 19 can be set as described above. However, the delay numbers of the delays 13, 14, and 15 are set as follows. Is done.
[0073]
  First, the input image signal I arrives at the comparator 10 earliest at the timing indicated by (7) in the timing chart of FIG. Therefore, the upper and lower end position signals high and low of the processed cursor position signal that need to be synchronized with the input image signal I are also before the timing indicated by (5) in the timing chart of FIG. It must not be generated. Because of this restriction, the only way to reduce the number of delays in the delay unit 17 is to delay the input signal (cursor position signal) to the selector 9 indicated by (4) in the timing chart of FIG. . That is, in this embodiment, since the delay number of the delay unit 17 is 2, the delay numbers of the delay units 13, 14, and 15 need to be 3. If it is desired to set the number of delays in the delay unit 17 to 1, the number of delays in the delay units 13, 14, and 15 needs to be set to 4. This is to match the timing of the input image signal I with the input signals to the comparator 10 (upper and lower end position signals of the processed cursor position signal) high and low.
[0074]
  If the delay number of the delay unit 17 is 5, the delay numbers of the delay unit 18 and the delay unit 19 are set to 1, the delay numbers of the delay units 13, 14, 15 are set to 1, and the comparator 10 It is necessary to delay the image signal I input to 1 by one clock. This is the same as the description in the first embodiment, in order to match the timings of the input signals high and low of the comparator 10 and the input image signal I.
[0075]
  In the present embodiment, a Bayer color image is used as the input image. However, this also holds for a color image using another color filter such as a complementary color filter. In addition, when handling an image in which the same color pixels are arranged every other pixel, such as a Bayer color image used in the present embodiment, reading of the image from the image memory is 0, 1, 2, 3,. Thus, when the image is read out in the horizontal direction, the sum of the delay numbers of the delay unit 17 and the delay unit 18 is 2, and the sum of the delay numbers of the delay unit 17 and the delay unit 19 is two. That is, each of the selector and the comparator can be processed within one clock cycle. Even when the circuit configuration shown in FIG. 1 is maintained, the circuit clock frequency is not high or the image bit width is small. Hysteresis smoothing pipeline processing can be realized.
[0076]
  As described above, hysteresis smoothing can be achieved even in a color image by devising the reading order of image signals from the image memory 3 and appropriately selecting the number of delays and the insertion position of the pipeline delay unit in the circuit. Image processing in an image processing circuit having a feedback processing circuit typified by a circuit can be processed at high speed by pipeline processing.
[0077]
  Next, a third embodiment of the present invention will be described. FIG. 7 is a block diagram showing a third embodiment of the image processing apparatus according to the present invention, and the same or corresponding components as those in the first and second embodiments shown in FIG. 3 and FIG. Are denoted by the same reference numerals, and description thereof is omitted. In FIG. 7, 21 is a first cursor center position determination unit that calculates the center position center1 of the cursor when the input pixel signal value is above the upper end of the cursor, and 22 is an input pixel value that is lower than the lower end of the cursor. The second cursor center position determining unit for calculating the center position center2 of the cursor, 23 is the cursor upper / lower position determining unit for calculating the upper end position high and the lower end position low of the cursor, and 24 is the delay unit (general In the case of delaying by one clock together with the delay units 11 to 19, D is indicated, and when being delayed by n clocks, it is indicated as nD.
[0078]
  In this embodiment, the calculation of the cursor position is first performed by the first cursor center position determination unit 21 and the second cursor center position determination unit 22 to obtain only the center positions center 1 and center 2 and then selected by the selector 9. The cursor upper / lower end position determination unit 23 obtains the cursor upper / lower end positions from the cursor center position. Therefore, although functionally the same as the first and second embodiments, there is an advantage that the block for calculating the cursor position is simplified and the circuit scale can be reduced.
[0079]
  However, since the calculation of the cursor upper and lower end positions high and low is performed after the processing of the selector 9, the circuit until the selector signal S is calculated from the cursor center position center is further complicated. When reading out in the horizontal direction as in (B), the three blocks of the selector 9, the cursor center position determining unit 21 or 22, and the comparator 10 must be processed within one clock cycle. Pipeline processing with a general circuit is difficult.
[0080]
  Even in such a circuit with a more complicated configuration, as in the circuit configuration of the third embodiment shown in FIG. 7, the arrangement of the delay units and the number of delay clocks are appropriately determined. By adopting the image reading method as shown, the pipeline processing at the timing shown in FIG. 8 can be performed on the color image.
[0081]
  Further, the number of pipeline delays (number of delay clocks) in the image processing circuit according to the third embodiment shown in FIG. 7 can be generalized as follows, as in the first and second embodiments. .
(1) The sum of the delay numbers of the delay unit 17, the delay unit 24, and the delay unit 18 may be six.
(2) The sum of the delay numbers of the delay unit 17 and the delay unit 19 may be six.
(3) The sum of the number of delays existing while the input image signal I reaches the comparator 10 through the cursor center position determining units 21 and 22, the selector 9, and the cursor upper / lower end position determining unit 23 is at least 6. If it is greater than 6, it is necessary to insert the larger number of delays into the input portion of the input image signal I to the comparator 10. In this embodiment, the input image signal I is delayed by 9 stages (9 clocks) while it reaches the comparator 10 through the cursor center position determining units 21 and 22, the selector 9, and the cursor upper / lower end position determining unit 23. Therefore, the delay unit 16 having a three-stage delay number is inserted on the input side of the image signal I input to the comparator 10.
(4) In a Bayer color image, the sum of the delay numbers shown in (1), (2) and (3) above is the number of pixels read in the vertical direction × 2 when the image signal is read from the image memory 3. equal.
[0082]
  As described above, in the feedback circuit having a more complicated configuration, the order of reading the image from the image memory 3 is devised, and the number of delays and the insertion position of the pipeline delay unit in the circuit are appropriately selected. In addition, an image processing circuit capable of high-speed processing by pipeline processing can be provided.
[0083]
【The invention's effect】
  As described above based on the embodiments, according to the present invention, the image processing circuit is configured.selectorAnd comparisonPartAn image processing circuit that can set an appropriate delay amount for the output signal and can perform image processing having feedback processing represented by hysteresis smoothing processing at high speed by pipeline processing is realized. Can do.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image processing circuit related to the present invention.
2 is a timing chart for explaining the operation of the image processing circuit shown in FIG. 1 and an explanatory diagram showing the reading order of image data in the image processing circuit shown in FIG. 1;
FIG. 3 is a block configuration diagram showing a first embodiment of an image processing apparatus according to the present invention.
4 is a timing chart for explaining the operation of the first embodiment shown in FIG. 3 and an explanatory diagram showing the reading order of image data in the first embodiment. FIG.
FIG. 5 is a block diagram showing a second embodiment of the present invention.
FIG. 6 is a timing chart for explaining the operation of the second embodiment shown in FIG. 5, an explanatory diagram showing the reading order of image data in the second embodiment, and in the second embodiment; It is a figure which shows the structure of the Bayer color filter used for an image pick-up element.
FIG. 7 is a block diagram showing a third embodiment of the present invention.
FIG. 8 is a timing chart for explaining the operation of the third embodiment shown in FIG. 7;
FIG. 9 is an explanatory diagram for explaining a hysteresis smoothing process.
[Explanation of symbols]
  1 Image sensor
  1 'single plate color image sensor
  2 A / D converter
  3 Image memory
  4 Memory controller
  5 Cursor height determination part
  6 Cursor initial position determination part
  7 First cursor position determination unit
  8 Second cursor position determination unit
  9 Selector
  10 Comparator
  11-19 Delay section
  21 First cursor center position determination unit
  22 Second cursor center position determination unit
  23 Cursor upper / lower end position determination part
  24 Delay section

Claims (3)

撮像素子から得られる画像信号を所定の順序で読み出した入力画像信号Iに対して、フィードバック処理を含む所定のノイズ除去を行い、当該ノイズ除去が行われた出力画像信号Oを出力する画像処理回路であって、
前記入力画像信号Iのうちの前記撮像素子の第1の画素に対応する画素信号を処理して複数のカーソル位置を演算し、当該カーソル位置に係る複数組のカーソル位置信号を出力するカーソル位置決定部と、
入力されるセレクト信号Sに基づいて、前記複数組のカーソル位置信号と、前記第1の画素に先行して既にノイズ除去を終えている第2の画素に対応する画素信号に係るカーソル位置信号との中から、いずれか一組の信号を選択し、その選択された信号を出力するセレクタと、
前記セレクタにて選択された信号と前記第1の画素信号とを比較し、その比較結果を前記セレクタのセレクト信号Sとして前記セレクタへ出力する比較部と、
前記セレクタの出力側から前記比較部を介して前記セレクタのセレクト信号Sとして前記セレクタに入力されるまでの第1の遅延量、ノイズ除去を終えている前記第2の画素に対応する画素信号に係るカーソル位置信号として前記セレクタの出力側から前記セレクタに入力されるまでの第2の遅延量、及び前記入力画像信号Iが前記カーソル位置決定部を経て前記比較部までに到る第3の遅延量が等しくなるように、遅延量を与えるディレイ部と、
を有することを特徴とする画像処理回路。
An image processing circuit that performs predetermined noise removal including feedback processing on an input image signal I obtained by reading image signals obtained from the image sensor in a predetermined order, and outputs an output image signal O subjected to the noise removal Because
Cursor position determination for processing a pixel signal corresponding to the first pixel of the image sensor in the input image signal I to calculate a plurality of cursor positions and outputting a plurality of sets of cursor position signals related to the cursor position And
Based on the input select signal S, the plurality of sets of cursor position signals, and a cursor position signal related to a pixel signal corresponding to a second pixel that has already undergone noise removal prior to the first pixel; A selector that selects any one set of signals from the output and outputs the selected signals;
A comparator that compares the signal selected by the selector with the first pixel signal and outputs the comparison result to the selector as a select signal S of the selector;
A first delay amount from the output side of the selector to the selector as a select signal S of the selector through the comparator, and a pixel signal corresponding to the second pixel that has been denoised A second delay amount until the input of the cursor position signal from the output side of the selector to the selector, and a third delay of the input image signal I reaching the comparison section through the cursor position determination section A delay unit that gives a delay amount so that the amounts are equal;
An image processing circuit comprising:
前記ディレイ部は、フリップフロップ回路であることを特徴とする請求項に係る画像処理回路。The image processing circuit according to claim 1 , wherein the delay unit is a flip-flop circuit. 前記第1の画素と前記第2の画素とは、隣接する画素同士であることを特徴とする請求項に係る画像処理回路。The image processing circuit according to claim 1 , wherein the first pixel and the second pixel are adjacent pixels.
JP2002296924A 2002-10-10 2002-10-10 Image processing circuit Expired - Fee Related JP4129163B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002296924A JP4129163B2 (en) 2002-10-10 2002-10-10 Image processing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002296924A JP4129163B2 (en) 2002-10-10 2002-10-10 Image processing circuit

Publications (2)

Publication Number Publication Date
JP2004133644A JP2004133644A (en) 2004-04-30
JP4129163B2 true JP4129163B2 (en) 2008-08-06

Family

ID=32286754

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002296924A Expired - Fee Related JP4129163B2 (en) 2002-10-10 2002-10-10 Image processing circuit

Country Status (1)

Country Link
JP (1) JP4129163B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0769955B2 (en) * 1993-03-26 1995-07-31 株式会社日立製作所 Image processor
JP4415236B2 (en) * 2000-02-07 2010-02-17 ソニー株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2004133644A (en) 2004-04-30

Similar Documents

Publication Publication Date Title
JP2000236473A (en) Image processing circuit for image input device
CN102265595B (en) Method and apparatus for image processing and on-vehicle camera apparatus
US20060187503A1 (en) Image sensor with scaler and image scaling method thereof
JP3991011B2 (en) Image signal processing device
CN101094319A (en) Image pickup apparatus and signal processor
JP4829802B2 (en) Image quality improving apparatus and image quality improving method
JPH09284783A (en) Defect corrective device and solid-state image pickup device using the device
JP2003023570A (en) Correcting method for image data and image signal processing apparatus
JP5829122B2 (en) Imaging apparatus and evaluation value generation apparatus
JP4129163B2 (en) Image processing circuit
JP2002150281A (en) Image compression processing device and method
US20120127344A1 (en) Image pickup device
JP4633525B2 (en) Focus detection device
JP5457687B2 (en) Color camera and noise removal method
US8154627B2 (en) Imaging device
JP2004153848A (en) Image processing circuit for image input apparatus
JP2009253760A (en) Image processing apparatus, image processing method and electronic device
JP2007228269A (en) Image signal processing device and method
JP4246479B2 (en) Imaging apparatus and imaging method
JP4132264B2 (en) Image signal processing circuit
JP2004153849A (en) Image processing circuit for image input apparatus
US8437546B2 (en) Image processing apparatus and method of controlling the same
JP6415086B2 (en) Image processing apparatus, image processing method, and program
JP2014075623A (en) Image processor, image processing method, and imaging device
JP2001028711A (en) Correction device for defect pixel data for solid-state image pickup element

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080411

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

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

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

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees