JP2004133644A - Image processing circuit - Google Patents
Image processing circuit Download PDFInfo
- Publication number
- JP2004133644A JP2004133644A JP2002296924A JP2002296924A JP2004133644A JP 2004133644 A JP2004133644 A JP 2004133644A JP 2002296924 A JP2002296924 A JP 2002296924A JP 2002296924 A JP2002296924 A JP 2002296924A JP 2004133644 A JP2004133644 A JP 2004133644A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- signal
- cursor
- processing
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
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 principalfeatures,”〔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に係る発明は、画素信号読み出し手段により読み出された撮像素子の第1の画素の画素信号と、前記第1の画素に先行する第2の画素の画素信号に係る処理信号との比較結果に基づき、前記第1の画素の画素信号に係る複数の処理信号及び前記第2の画素の画素信号に係る処理信号から任意の処理信号を選択して出力する画像処理回路であって、前記第1の画素信号から複数の処理信号を生成する演算回路と、該演算回路からの複数の処理信号及び前記第2の画素の画素信号に係る処理信号から、前記比較結果に基づいて任意の処理信号を選択して出力する選択回路と、前記第1の画素の画素信号と前記第2の画素の画素信号に係る処理信号との比較結果を出力する比較回路と、前記選択回路の出力側から前記比較回路の比較結果出力の前記選択回路の制御入力側までの信号に係る第1の遅延量及び前記選択回路の出力側から該選択回路への入力側までの前記第2の画素の画素信号の処理信号に係る第2の遅延量と、前記画素信号読み出し手段から前記演算回路及び選択回路を経て前記比較回路までの信号に係る第3の遅延量とがほぼ等しくなるように、遅延量を設定する遅延量設定手段とを有することを特徴とするものである。
【0012】
この請求項1に係る発明に関する実施の形態には、第1〜第3の実施の形態が対応する。そして、このように構成された画像処理回路においては、選択回路及び比較回路の出力信号に対して適切な遅延量を設定することができ、ヒステリシススムージング処理に代表されるフィードバック処理を有する画像処理を、パイプライン処理により高速に行うことが可能となる。
【0013】
請求項2に係る発明は、請求項1に係る画像処理回路において、前記遅延量設定手段は、前記第1の遅延量及び前記第2の遅延量と前記第3の遅延量とに差があるときには、前記比較回路に入力する前記第1の画素の画素信号をその差分遅延させることを特徴とするものである。
【0014】
この請求項2に係る発明に関する実施の形態には、第1〜第3の実施の形態が対応する。そして、このように構成された画像処理回路においては、比較回路への入力信号のタイミングを合わせることができ、適確な比較結果を出力させることが可能となる。
【0015】
請求項3に係る発明は、請求項1又は2に係る画像処理回路において、前記遅延量設定手段は、フリップフロップ回路であることを特徴とするものである。
【0016】
この請求項3に係る発明に関する実施の形態には、第1〜第3の実施の形態が対応する。そして、このように構成された画像処理装置においては、遅延量設定手段をフリップフロップ回路で構成するようにしているので、遅延量を容易に設定することができる。
【0017】
請求項4に係る発明は、請求項1〜3のいずれか1項に係る画像処理回路において、前記第1の画素と前記第2の画素とは、所定のライン方向に隣接する画素同士であることを特徴とするものであり、この発明に関する実施の形態には、第1の実施の形態が対応する。
【0018】
請求項5に係る発明は、請求項1〜3のいずれか1項に係る画像処理回路において、前記第1の画素と前記第2の画素とは、所定のライン方向に色的に隣接する画素同士であることを特徴とするものであり、この発明に関する実施の形態には、第2及び第3の実施の形態が対応する。
【0019】
請求項6に係る発明は、請求項1に係る画像処理回路において、前記画素信号読み出し手段は、前記所定ライン方向における前記第1の画素と前記第2の画素との間の画素数差に対応する遅延量と、前記第1或いは第2の遅延量とに差があるときには、その差に対応する画素数分、前記所定ラインに交差するライン方向に並ぶ画素の画素信号をジグザグ状に読み出すことを特徴とするものであり、この発明に関する実施の形態には、第1〜第3の実施の形態が対応する。
【0020】
請求項7に係る発明は、請求項1に係る画像処理回路において、前記演算回路は、前記第1の画素の画素信号を、前記第2の画素に係る処理信号の代表値に置換する信号値の変動の範囲量を設定するカーソル高さ決定部と、前記第1の画素の画素信号を上端とし、前記範囲量を減算した信号値を下端とする第1の処理信号を生成する第1のカーソル位置決定部と、前記第1の画素の画素信号を下端とし、前記範囲量を加算した信号値を上端とする第2の処理信号を生成する第2のカーソル位置決定部と、前記第1の画素の画素信号を前記範囲量の中央として上端と下端とを定める初期の処理信号を生成するカーソル初期位置決定部とを有していることを特徴とするものであり、この発明に関する実施の形態には、第1及び第2の実施の形態が対応する。
【0021】
請求項8に係る発明は、請求項1に係る画像処理回路において、前記演算回路は、前記第1の画素の画素信号を、前記第2の画素に係る処理信号の代表値に置換する信号値の変動の範囲量を設定するカーソル高さ決定部と、前記第1の画素の画素信号から、前記範囲量の半分の量を減算した信号値を第1の処理信号とする第1のカーソル中心位置決定部と、前記第1の画素の画素信号から、前記範囲量の半分の量を加算した信号値を第2の処理信号とする第2のカーソル中心位置決定部と、前記選択回路の出力信号を中心とし、前記範囲量の半分の量を減算した信号値を下端とし、前記範囲量の半分の量を加算した信号値と上端とするカーソル上下端位置決定部とを有していることを特徴とするものであり、この発明に関する実施の形態には、第3の実施の形態が対応する。
【0022】
請求項9に係る発明は、請求項7又は8に係る画像処理回路において、前記比較回路は、前記第1の画素の画素信号が前記第2の画素に係る処理信号の上端を上回るときには、前記第1の処理信号を、前記第1の画素の画素信号が前記第2の画素に係る処理信号の下端を下回るときには、前記第2の処理信号を、前記第1の画素の画素信号が前記第2の画素に係る処理信号の前記範囲内にあるときには、前記第2の画素に係る処理信号を、それぞれ選択する比較結果を出力することを特徴とするものであり、この発明に関する実施の形態には、第1〜第3の実施の形態が対応する。
【0023】
【発明の実施の形態】
次に、実施の形態について説明する。まず、本発明の実施の形態の説明に先立って、本発明に関連する画像処理回路として考えられる基本的な回路構成、及びその動作について説明する。図1は、ヒステリシススムージング処理回路をデジタルカメラに搭載した場合に考えられる基本的な回路構成を示すブロック図である。図1において、1はモノクロ画像を撮像するための撮像素子、又は単色のカラーフィルタを有する撮像素子、2は撮像素子1の信号をデジタル信号に変換するADコンバータ、3はADコンバータの出力信号を1画面分記憶するための画像メモリ、4は画像メモリ3のリード・ライトアドレスを生成するメモリコントローラ、5は撮影情報及び入力画像信号を元にカーソルの高さhを決定するカーソル高さ決定部である。
【0024】
また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の出力データ間のタイミングをクロック単位で合わせるためのディレイ部(一般的回路におけるフリップフロップ)である。
【0025】
次に、図1で示した画像処理回路の動作について、図2の(A)のタイミングチャート及び図2の(B)の説明図を用いて説明する。図2の(A)は、図1に示した回路における画像データの流れを説明するタイミングチャートであり、図2の(B)は画像の読み出し順を説明するための図である。図2の(A)における番号▲1▼〜▲7▼は、図1に示した画像処理回路を流れるデータのタイミングを示す番号であり、それぞれ図1に示した画像処理回路の▲1▼〜▲7▼で示す部分におけるデータのタイミングを表している。
【0026】
撮像素子1から出力される画像信号は、図2の(B)で示すような、横画素数N個、縦画素数M個の2次元の画像の画像信号であり、説明を容易にするため左上端から、0から始まる画素番号をつけてある。この2次元の画像信号は、ADコンバータ2でデジタル信号に変換された後、画像メモリ3に書き込まれる。このときの画像信号の書き込み順は、メモリコントローラ4により画素番号0,1,2,3,・・・N−1,N+0,N+1,・・・と画素番号順に書き込まれるように制御されている。
【0027】
次に、画像信号は画像メモリ3から1クロック毎に読み出されるが、このときの読み出し順は、図2の(B)の矢印で示したように、左上端の0番目の画素から順に横方向に読み出される。右端まで読み出された後は、2行目のN+0番目から順に右方向に走査され、以下、同様にして画像の右下端まで繰り返され、これが入力画像信号Iとなる。
【0028】
一方、画像処理回路のもう一つの入力データである撮影情報は、撮影時のISO感度やシャッター速などの情報であり、図2の(A)のフローチャートの▲2▼で示したように1フレーム単位で切り替わるデータであるため、1 画面中は同じ情報が保持される。
【0029】
入力画像信号I及び撮影情報は、カーソル高さ決定部5に入力され、これらの情報を元に、1 画素毎にカーソル高さ情報cursを計算し出力する。ここでは、撮像素子1が持つ、画像信号のレベルが高いとノイズの振幅も大きくなるという特性や、また、シャッタースピードが長くなるほどノイズ振幅が大きくなるという特性を元に、カーソル高さ情報cursを計算する。そして、算出されたカーソル高さ情報cursは、ディレイ部11を通りクロック同期信号となる。
【0030】
入力画像信号Iもまた、カーソル高さ情報cursとクロック単位でのタイミングを合わせるためにディレイ部12を通り、その結果、入力画像信号Iが1クロック遅れたI1という信号となる。したがって、この2つの信号curs,I1は、図2の(A)のタイミングチャートの▲3▼に示したタイミングの信号となる。
【0031】
次に、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8では、カーソル高さcurs及び入力画像信号I1から、カーソルの上下端位置及びカーソル中心位置を演算する。
【0032】
カーソル初期位置決定部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)
【0033】
第1のカーソル位置決定部7は、入力画像信号I1をカーソルの上端位置とした場合の演算を行うブロックであるから、カーソル上端位置high1,下端位置 low1,及びカーソル中心位置center1は、それぞれ、(4),(5),(6)で示すように演算される。
high1=I1 ・・・・・・・・・・・・・・(4)
low1=I1−curs ・・・・・・・・・・・(5)
center1=I1−curs/2 ・・・・・・・・・(6)
【0034】
同様に、第2のカーソル位置決定部8は、入力画像信号I1をカーソルの下端位置とした場合の演算を行うブロックであるから、カーソル上端位置high2,下端位置 low2,及びカーソル中心位置center2は、それぞれ、(7),(8),(9)で示すように演算される。
high2=I1+curs ・・・・・・・・・・・(7)
low2=I1 ・・・・・・・・・・・・・(8)
center2=I1+curs/2 ・・・・・・・・(9)
【0035】
そして、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8の出力信号は、それぞれディレイ部13,14,15を通り、クロック同期信号となり、その結果、これらの信号は、図2の(A)のタイミングチャートの▲4▼に示したタイミングの信号となる。
【0036】
次に、セレクタ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つの状態を持つ信号である。
【0037】
このセレクト信号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を出力する。
【0038】
このようにセレクタ9でセレクトされた信号は、ディレイ部17を通り、図2の(A)のタイミングチャートの▲5▼で示したタイミングの信号high,low,center となる。この信号high,low,center は、ヒステリシススムージング処理を終えた信号であるので、セレクタ9の入力信号high3,low3,center3となり、また、信号centerは出力画像信号Oとなる。
【0039】
次に、比較器10では、上記セレクトされたカーソル位置信号の上端及び下端位置信号high,lowと、画像信号との比較を行う。この比較は、1画素前隣の画素位置におけるカーソルの上端及び下端位置信号high,lowと、現在の画像信号とを比較する必要があるため、前記カーソルの上端及び下端位置信号high,lowと画像信号とのタイミングの関係は、1 画素ずらしたものとしなければならない。したがって、画像信号は図2の(A)のタイミングチャートの▲6▼で示す、画像信号I1をディレイ部16で更に1クロック遅らせた画像信号I2となる。
【0040】
これらのカーソルの上端及び下端位置信号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”を出力する。
【0041】
ここで、画像の左端画素とは、図2の(B)における、0,N+0,2N+0,・・・の左端1列の画素である。この比較器10からの信号は、ディレイ部18を通った後、セレクタ9のセレクト信号Sとなる。したがって、このセレクト信号Sは図2の(A)のタイミングチャートの▲7▼に示したタイミングの信号となる。また、画像左端の処理は、図2の(B)に示した画像において、一行につき最初の一回だけ行われる処理であり、フィードバック回路について述べる本発明とは直接の関係がないので、以後の説明においては省略する。
【0042】
ところで、比較器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が生成される。
【0043】
これでは、2画素前の結果から導いたセレクト信号を用いることになり、所望のヒステリシススムージング結果を得ることができない。この問題を解決するためには、セレクト信号Sを生成するタイミングを1クロック分早める必要があり、そのためには、セレクタ9の後のディレイ部17,又は比較器10の後のディレイ部18のいずれかを削除する必要がある。すなわち、セレクタ9と比較器10の処理の両方を1クロック周期以内で処理する必要があるということになる。
【0044】
しかしながら、例えば、画像信号のデータビット長が大きい場合は演算時間が長くなるため、セレクタ9及び比較器10の処理を1クロック周期内に終わらせることができない可能性がある。また、回路の動作周波数を上げて高速に処理させようとした場合も、1クロック周期が短くなるため、セレクタ9及び比較器10を1クロック周期内に終わらせることができない可能性がある。特に、比較的ゲート遅延時間が大きい半導体デバイスを用いて、この回路を実現した場合、クロック周波数を上げることは更に難しくなる。あるいは、例えば、高性能の半導体デバイスを使い、且つ、低い動作周波数で動作させることによってパイプライン処理を実現しようとした場合、高コスト、低性能の画像処理装置になってしまうという問題がある。
【0045】
次に、この問題を解決できるようにした本発明の実施の形態について説明する。図3は、本発明に係る画像処理回路の第1の実施の形態を示すブロック構成図で、ヒステリシススムージング処理回路をデジタルカメラに搭載した場合の画像処理回路の構成を示すブロック図である。図3において、図1に示した回路と同一又は対応する部材には同一符号を付して示し、その説明は省略する。この実施の形態が図1に示した回路と異なる点は、画像信号を1クロック遅らせるディレイ部16を省き、セレクタ9に対する、ヒステリシススムージング処理を終えている1画素前隣の画素の処理結果(high3,low3,center3)の入力部に2クロック分ディレイさせるディレイ部19を設け、更に比較器10から出力するセレクト信号Sを、ディレイ部18で2クロック分ディレイさせるようにした点である。なお、ディレイ部11〜19において、1クロック分ディレイさせる場合はD,nクロック分ディレイさせる場合はnDと表示している。
【0046】
次に、このように構成された第1の実施の形態の動作について、図3に加え、図4の(A),(B)を用いて説明する。ただし、図1の回路と同じ動作については、その説明を省略する。図4の(A)は、図3に示した回路における画像データの流れを説明するタイミングチャート図であり、図4の(B)は画像の読み出し順を説明するための説明図である。図4の(A)のタイミングチャート中の番号▲1▼〜▲8▼は回路を流れるデータのタイミングを示し、それぞれ図3において▲1▼〜▲8▼で示す部分におけるデータのタイミングを表している。
【0047】
撮像素子1から出力される画像信号が、ADコンバータ2でデジタル信号に変換された後、メモリコントローラ4によって、0,1,2,・・・の順に画像メモリ3に書き込まれるのは図1に示した画像処理回路と同じである。
【0048】
次に、画像信号は画像メモリ3から1クロック毎に読み出されるが、このときの読み出し順は、図4の(B)の説明図において矢印で示したように、0番目の画素から矢印に沿って、縦方向にN+0,2N+0の順に読み出され、次に、1,N+1,2N+1とジグザグ状に読み出される。右端の3N−1まで読み出された後は、3N+0番目から4N+0,5N+0と読み出され、以下、同様に画像の下端まで繰り返される。これを画像信号Iとする。
【0049】
カーソル高さ決定部5の動作は、図1に示した画像処理回路と同じ動作であり、ディレイ部11,12を通ったカーソル高さ信号curs及び画像信号I1信号は、図4の(A)のタイミングチャートの▲3▼に示したタイミングの信号となる。
【0050】
次に、カーソル初期位置決定部6,第1のカーソル位置決定部7,及び第2のカーソル位置決定部8における動作も、図1に示した画像処理回路の動作と同じであり、これらの出力信号は、それぞれディレイ部13及び14及び15を通った後、図4の(A)のタイミングチャートの▲4▼に示したタイミングの信号となる。
【0051】
次に、セレクタ9の動作も図1に示した画像処理回路の動作と同じであり、ディレイ部17を通った後、図4の(A)のタイミングチャートの▲5▼で示したタイミングの信号high,low,center となる。これらの信号はヒステリシススムージング処理を終えたカーソル位置信号であり、このうちの信号centerはヒステリシススムージング処理を終えた画像信号であるので、出力画像信号Oとなる。
【0052】
ここで、セレクタ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の画素に対応する信号を同じタイミングとする必要がある。
【0053】
したがって、これらの信号のタイミング合わせのため、ヒステリシススムージング処理の終えたカーソル位置信号のセレクタ9への入力信号high3,low3,center3は、処理済のカーソル位置信号high,low,center をディレイ部19によって2クロック遅らせた信号となる。
【0054】
次に、比較器10では、上記ヒステリシススムージング処理済のカーソル位置信号の上下端位置信号high,lowの2つ信号と、入力画像信号Iとの比較を行う。この比較は、1画素前隣の画素に対応するカーソル位置信号high,lowと、現在の画像信号Iとを比較するものである。具体的には、図4の(A)のタイミングチャートの▲5▼の画素番号0の画素に対応する信号と、タイミングチャートの▲7▼の画素番号1の画素に対応する信号を比較するということであるから、カーソル位置信号high,lowは画像信号Iに対し、3クロック分遅れたものとしなければならない。したがって、ここでの画像信号にはディレイ部を通さない入力画像信号Iを用いることになる。
【0055】
比較器10の動作は、図1に示した画像処理回路で示した動作と同じであり、その出力信号はディレイ部18を通った後、セレクタ9のセレクト信号Sとなる。
【0056】
ここで、このセレクタ信号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クロック分のディレイを必要とするということになる。
【0057】
ここで、ディレイ部18は2クロック分のディレイが必要であるということは、比較器10の処理に2クロック分のパイプラインディレイを割り振ることが可能であるということである。例えば、この画像処理回路を動作させるクロックとして、比較的高速なクロックを用いた場合、比較器10の処理が1クロック周期内に終わらないということが考えられる。このとき、比較器10を構成する回路を分割し、比較器10の内部にディレイ部18を構成する1つ又は2つのディレイ素子を挿入することで、分割回路間の処理は簡単になり、すなわち、パイプライン化が可能となる。
【0058】
また、この実施の形態の変形例として、セレクタ9の処理が1クロック周期内に終わらない場合は、ディレイ部17のディレイ数を2クロック分として、セレクタ9内にその一部を挿入し、ディレイ部19のディレイ数を1クロック分とし、ディレイ部18のディレイ数を1クロック分とし、更に比較器10に入力される画像信号Iを1クロック遅らせることにより、パイプライン処理が可能となる。ここで、比較器10に入力する画像信号Iを1クロック遅らせるのは、比較器10への入力信号high,lowと画像信号Iのタイミングを合わせるためである。
【0059】
以上の説明を一般化して表すと、次のようになる。
(1)ディレイ部17とディレイ部18のディレイ数(ディレイクロック数)の和は3であればよい。
(2)ディレイ部17とディレイ部19のディレイ数の和は3であればよい。
(3)入力画像信号Iがカーソル位置決定部6〜8を経て比較器10までに至る間に存在するディレイ数の和は最低3必要で、3より多い場合は、その多い分のディレイ数を、比較器10への入力画像信号Iの入力部分に挿入する必要がある。
(4)上記(1),(2)及び(3)に示したディレイ数の和は、画像信号を画像メモリ3から読み出す際に、縦方向に読み出す画素数に等しい。
【0060】
すなわち、本実施の形態では、画像メモリ3からの画素信号の読み出しを、画素番号0,N+0,2N+0,1,・・・というように読み出していたため、上記(1)及び(2)に記したディレイ数の和は3であったが、例えば、画素番号0,N+0,2N+0,3N+0,1,・・・というように読み出した場合は、ディレイ数の和は4となる。したがって、画像を縦に読み出す数を増やせば増やすほど、ディレイ部19,ディレイ部17,ディレイ部18に割り当てるディレイ数は多くなり、より複雑な処理をより高速に行うことが可能となる。
【0061】
また、上記一般化した説明を、図1に示した画像処理回路に当てはめた場合、画素信号の読み出し順は画素番号1,2,・・・となっているので、上記(4)の条件から、ディレイ部17とディレイ部18のディレイ数の和は1となる。したがって、図1に示した画像処理回路においては、セレクタ9と比較器10は、合わせて1クロック内で処理しなければならないことになり、これは図1に示した画像処理回路における問題点につながる。
【0062】
以上で説明したように、画像メモリ3からの画素信号の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、ヒステリシススムージング回路に代表されるようなフィードバック処理回路を有する画像処理回路を、パイプライン処理により高速処理することが可能となる。
【0063】
次に、本発明の第2の実施の形態について説明する。前記第1の実施の形態においては、入力画像は単一色の画像であったのに対し、第2の実施の形態は、単板のカラー画像を入力画像とした場合の画像処理回路に関するものである。図5は、本発明に係る画像処理装置の第2の実施の形態を示すブロック構成図であり、具体的にはヒステリシススムージング処理回路をデジタルカメラに搭載した場合の回路構成を示すブロック図である。図5において、図3に示した第1の実施の形態における構成要素と同一又は対応する構成要素には同一符号を付して示し、その詳細な説明は省略する。この実施の形態が第1の実施の形態と異なる点は、撮像素子としてRGBベイヤーカラーフィルタを有する単板カラー撮像素子1′を用いている点と、ディレイ部13〜15,17〜19のディレイクロック数を異ならせている点で、その他の構成は第1の実施の形態と同様である。
【0064】
次に、このように構成された第2の実施の形態の動作について、図5に加え、図6の(A)〜(C)を用いて説明する。ただし、図1及び図3に示した画像処理回路と同じ動作をするブロックについては、その説明を省略する。図6の(A)は、図5に示した画像処理回路における画像データの流れを説明するタイミングチャートであり、図6の(B)は画素信号の読み出し順を説明するための図であり、図6の(C)はベイヤーカラーフィルターを説明するための図である。図6の(A)のタイミングチャートの番号▲1▼〜▲8▼で示す信号のタイミングは、図5に示す画像処理回路の同じ番号で示す部分に流れるデータのタイミングを示している。
【0065】
ベイヤーカラーフィルタを有する撮像素子1から出力される画像信号は、図6の(B)で示されるような、横画素数N個、縦画素数M個の2次元の単板カラー画像の画像信号であり、説明を容易にするため0から始まる画素番号、及びそれぞれの画素に対応するカラーフィルタの色を表記している。カラーフィルタの色は、図6の(C)で示す単板ベイヤーカラーフィルタの色であり、Rは赤、Grは赤と同じ行の緑、Bは青、Gbは青と同じ行の緑を表している。
【0066】
この2次元の単板カラー画像信号は、ADコンバータ2でデジタル信号に変換された後、画像メモリ3に書き込まれる。このときの画像信号の書き込み順は、メモリコントローラ4により、画素番号0(R),1(Gr),2(R),3(Gr),・・・,N+0(Gb),N+1(B),・・・というように、画素番号順に書き込まれるように制御される。
【0067】
次に、画像メモリ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▼で示す信号)とする。
【0068】
一方、画像処理回路のもう一つの入力データである撮影情報は、撮影時のISO感度やシャッター速などの情報であり、図6の(A)のタイミングチャートの▲2▼で示すように、1フレーム単位で切り替わるデータであるため、1 画面中は同じ情報が保持される。
【0069】
カーソル高さ決定部5の動作は、図1に示した画像処理回路と同じ動作であり、ディレイ部11,12を通ったカーソル高さ信号curs及び画像信号I1信号は、図6の(A)のタイミングチャートの▲3▼に示すタイミングの信号となる。
【0070】
次に、カーソル初期位置決定部6,第1 のカーソル位置決定部7,及び第2のカーソル位置決定部8は、図1に示した画像処理回路と同じ動作をし、それらの出力信号は、それぞれディレイ部13,14,15を通った後、図6の(A)のタイミングチャートの▲4▼に示すタイミングの信号となる。ここで、ディレイ部13,14,15のディレイクロック数が3になっているが、この理由については後に述べる。
【0071】
次に、セレクタ9の動作も図1に示した画像処理回路と同じであり、ディレイ部17を通った後、図6の(A)のタイミングチャートの▲5▼で示したタイミングの処理済のカーソル位置信号high,low,center となる。このうちの信号centerはヒステリシススムージング処理を終えた画像信号であるので、出力画像信号Oとなる。
【0072】
ここで、セレクタ9の入力信号high3,low3,center3は、既にヒステリシススムージング処理を終えている1画素前隣の画素に対応するカーソル位置信号であるが、この1画素前隣の画素とは、2次元画像における同じ色の前隣の画素を示し、例えば、図6の(B)に示した画素番号2(R)の1画素前隣の画素とは、画素番号0(R)の画素のことであり、メモリからの読み出し順とは関係ない。前隣の画素を同色の画素とする理由は、色が異なると、ノイズの振幅値や画素のレベルが異なるため、同じ色同士でヒステリシススムージングを行う必要があるからである。
【0073】
よって、セレクタ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クロック遅らせた信号となる。
【0074】
次に、比較器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列の画素である。
【0075】
この比較器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クロック分のディレイを必要とするということになる。
【0076】
ここで、ディレイ部18は4クロック分のディレイが必要であるということは、比較器10の処理に4クロック分のパイプラインディレイを割り振ることが可能であるということであり、また、ディレイ部17が、2クロック必要であるということは、セレクタ9の処理に2クロック分のパイプラインディレイを割り振ることが可能であるということである。
【0077】
以上の説明を一般化して表すと、次のようになる。
(1)ディレイ部17とディレイ部18のディレイ数(ディレイクロック数)の和は6であればよい。
(2)ディレイ部17とディレイ部19のディレイ数の和は6であればよい。
(3)入力画像信号Iがカーソル位置決定部6〜8を経て比較器10までに至る間に存在するディレイ数の和は最低6必要で、もし、6より多い場合は、その多い分のディレイ数を、比較器10への入力画像信号Iの入力部分に挿入する必要がある。
(4)ベイヤーカラー画像においては、上記(1),(2)及び(3)に示したディレイ数の和は、画像信号を画像メモリ3から読み出す際に、縦方向に読み出す画素数×2に等しい。
【0078】
すなわち、本実施の形態では、画像メモリ3からの画素信号の読み出しを、画素番号0,N+0,2N+0,1,・・・というように読み出していたため、上記(1)及び(2)に記したディレイ数の和は3×2=6であったが、例えば、画素番号0,N+0,2N+0,3N+0,1,・・・というように読み出した場合は、ディレイ数の和は8となる。したがって、画像を縦に読み出す数を増やせば増やすほど、ディレイ部19,ディレイ部17,ディレイ部18に割り当てるディレイ数は多くなり、より複雑な処理をより高速に行うことが可能となる。
【0079】
さて、本実施の形態においては、ディレイ17,18,19のディレイ数は上記のように設定することが可能であるが、ディレイ13,14,15のディレイ数については、次のようにして設定される。
【0080】
まず、入力画像信号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のタイミングを合わせるためである。
【0081】
また、仮に、ディレイ部17のディレイ数を5とした場合は、ディレイ部18及びディレイ部19のディレイ数を1とし、ディレイ部13,14,15のディレイ数を1にし、且つ、比較器10に入力する画像信号Iを1クロック遅らせる必要がある。これは第1の実施の形態での説明と同じで、比較器10の入力信号high,lowと入力画像信号Iのタイミングを合わせるためである。
【0082】
また、本実施の形態では入力画像をベイヤーカラー画像としたものを示したが、これは例えば補色フィルターような他のカラーフィルターによるカラー画像でも成り立つ。また、本実施の形態で用いたベイヤーカラー画像のような、1 画素おきに同色画素が並ぶ画像を扱う場合においては、画像メモリからの画像の読み出しを0,1,2,3,・・・というように、画像の横方向に読み出した場合、ディレイ部17とディレイ部18のディレイ数の和は2,ディレイ部17とディレイ部19のディレイ数の和は2となる。すなわち、セレクタ及び比較器をそれぞれ1クロック周期内で処理することが可能となり、図1で示した回路構成のままでも、回路のクロック周波数が高くない場合や、画像のビット幅が少ない場合においては、ヒステリシススムージングのパイプライン処理が実現可能である。
【0083】
以上で説明したように、画像メモリ3からの画像信号の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、カラー画像においても、ヒステリシススムージング回路に代表されるようなフィードバック処理回路を有する画像処理回路における画像処理を、パイプライン処理により高速処理することが可能となる。
【0084】
次に、本発明の第3の実施の形態について説明する。図7は、本発明に係る画像処理装置の第3の実施の形態を示すブロック構成図であり、図3及び図5に示した第1及び第2の実施の形態と同一又は対応する構成要素には同一の符号を付して示し、その説明を省略する。図7において、21は入力画素信号値がカーソルの上端より上となった場合の、カーソルの中心位置center1 を演算する第1のカーソル中心位置決定部、22は入力画素値がカーソルの下端より下となった場合の、カーソルの中心位置center2 を演算する第2のカーソル中心位置決定部、23はカーソルの上端位置high及び下端位置low を演算するカーソル上下端位置決定部、24はディレイ部(一般的回路におけるフリップフロップ)であり、ディレイ部11〜19と共に1 クロック分ディレイさせる場合はD,nクロック分ディレイさせる場合はnDと表している。
【0085】
この実施の形態においては、カーソル位置の演算は、最初に第1のカーソル中心位置決定部21及び第2のカーソル中心位置決定部22にて、中心位置center1,center2のみ求め、そしてセレクタ9により選ばれたカーソル中心位置から、カーソル上下端位置決定部23にてカーソル上下端位置を求めるようにしている。したがって、前記第1及び第2の実施の形態に対し、機能的には同じであるが、カーソルの位置を演算するブロックが簡単になり、回路規模を小さくできるという利点がある。
【0086】
しかし、セレクタ9の処理後に、カーソル上下端位置high,lowの演算を行うため、カーソル中心位置centerからセレクタ信号Sを演算するまでの回路は更に複雑になるので、画像信号の読み出しを図2の(B)のように横方向に読み出した場合においては、セレクタ9,カーソル中心位置決定部21又は22,及び比較器10の3つのブロックを、1クロック周期内に処理しなければならないことになり、一般的な回路でのパイプライン処理は難しい。
【0087】
このような、より複雑な構成の回路においても、図7に示す第3の実施の形態の回路構成のように、ディレイ部の配置及びディレイクロック数を適切に決め、図6の(B)で示したような画像読み出し方法をとることにより、カラー画像に対して図8に示したタイミングのパイプライン処理が可能となる。
【0088】
また、図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に等しい。
【0089】
以上で説明したように、画像メモリ3からの画像の読み出し順序を工夫し、また回路内のパイプラインディレイ部のディレイ数及び挿入位置を適切に選択することにより、より複雑な構成のフィードバック回路においても、パイプライン処理により高速処理することが可能な画像処理回路を提供することができる。
【0090】
【発明の効果】
以上実施の形態に基づいて説明したように、本発明によれば、画像処理回路を構成する選択回路及び比較回路の出力信号に対して適切な遅延量を設定することができ、ヒステリシススムージング処理に代表されるフィードバック処理を有する画像処理を、パイプライン処理により高速に行うことが可能な画像処理回路を実現することができる。
【図面の簡単な説明】
【図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]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing circuit, and more particularly to an image processing circuit provided with an image data feedback processing unit.
[0002]
[Prior art]
[Non-Patent Document 1] R.I. W. Ehrich, "A symmetry hysteresis smoothing algorithm that preserves principal features," [CGIP, vol. 8, pp. 121-126, August 1978]
[0003]
An image processing apparatus that performs digital image processing on an image signal obtained from an image pickup device such as a CCD to obtain an image of a desired image quality uses a past processing result as one function of the image processing. In some cases, a feedback process may be required to perform the current process.
[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. Note that, for simplicity of explanation, the image data handled by the image processing apparatus is monochrome image data. Hysteresis smoothing is one of the methods for removing noise contained in an image. W. Ehrich, "A symmetry hysteresis smoothing algorithm that preserves principalfeatures," [CGIP, vol. 8, pp. 121-126, August 1978] (Non-Patent Document 1).
[0005]
In this hysteresis smoothing, noise removal is performed 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
(1) The initial position of the cursor 101 (pixel position (1) in FIG. 9) is set so that the
(2) The cursor 101 is horizontally moved by one pixel from the current position while maintaining the position, that is, the same pixel level.
(3) If the
(4) If the
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 described 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 immediately preceding pixel and performs noise removal. This is a feedback image processing device that uses cursor position information as feedback data for current cursor position calculation.
[0007]
On the other hand, in an image processing apparatus that implements the digital image processing by hardware processing, high-speed processing is generally performed using pipeline processing. The pipeline process is a process in which a series of processes of image processing is divided into small blocks operable within one clock cycle, and each block is operated in a flowing manner.
[0008]
[Problems to be solved by the invention]
By the way, in a case where feedback processing such as hysteresis smoothing is performed by pipeline processing, processing of feedback data also needs to be performed within one clock cycle. However, since the feedback data of the hysteresis smoothing process is generated by comparing the upper and lower cursor values with the input image value, if the operating frequency of the circuit is high or the bit width of the image is large, the feedback data is processed within one clock cycle. May not end.
[0009]
As described above, when an image processing circuit including feedback processing for performing a complicated operation on feedback data is to be realized by pipeline processing, there is a problem that a pipeline circuit cannot be realized. Heretofore, no method has been proposed for realizing processing in which data passing through such a complicated gate must be fed back in pixel units by pipeline processing.
[0010]
The present invention has been made in order to solve the above-described problem that occurs when pipeline processing of an image processing algorithm having conventional feedback processing is performed, and image processing including feedback processing of a complicated configuration is performed by pipeline processing. It is an object to provide an image processing circuit capable of high-speed processing.
[0011]
[Means for Solving the Problems]
In order to solve the above problem, the invention according to
[0012]
The first to third embodiments correspond to the embodiment according to the first aspect of the present invention. In the image processing circuit configured as described above, an appropriate delay amount can be set for the output signals of the selection circuit and the comparison circuit, and image processing having feedback processing represented by hysteresis smoothing processing can be performed. , Can be performed at high speed by pipeline processing.
[0013]
According to a second aspect, in the image processing circuit according to the first aspect, the delay amount setting unit has a difference between the first delay amount, the second delay amount, and the third delay amount. In some cases, the pixel signal of the first pixel input to the comparison circuit is delayed by the difference.
[0014]
The first to third embodiments correspond to the embodiment according to the second aspect of the present invention. Then, in the image processing circuit configured as described above, the timing of the input signal to the comparison circuit can be adjusted, and an accurate comparison result can be output.
[0015]
The invention according to
[0016]
The first to third embodiments correspond to the embodiment according to the third aspect of the present invention. In the image processing apparatus thus configured, since the delay amount setting means is configured by a flip-flop circuit, the delay amount can be easily set.
[0017]
According to a fourth aspect of the present invention, in the image processing circuit according to any one of the first to third aspects, the first pixel and the second pixel are adjacent pixels in a predetermined line direction. The first embodiment corresponds to the embodiment relating to the present invention.
[0018]
According to a fifth aspect of the present invention, in the image processing circuit according to any one of the first to third aspects, the first pixel and the second pixel are pixels that are adjacent in color in a predetermined line direction. The second and third embodiments correspond to an embodiment of the present invention.
[0019]
According to a sixth aspect of the present invention, in the image processing circuit according to the first aspect, the pixel signal readout unit corresponds to a pixel number difference between the first pixel and the second pixel in the predetermined line direction. When there is a difference between the delay amount to be performed and the first or second delay amount, pixel signals of pixels arranged in a line direction intersecting the predetermined line are read in a zigzag manner by the number of pixels corresponding to the difference. The first to third embodiments correspond to the embodiments according to the present invention.
[0020]
According to a seventh aspect of the present invention, in the image processing circuit according to the first aspect, the arithmetic circuit replaces a pixel signal of the first pixel with a representative value of a processing signal of the second pixel. A cursor height determining unit for setting a range amount of fluctuation of the first pixel; and a first processing signal generating a first processing signal having a pixel signal of the first pixel as an upper end and a signal value obtained by subtracting the range amount as a lower end. A cursor position determining unit, a second cursor position determining unit that generates a second processing signal having a pixel signal of the first pixel as a lower end and a signal value obtained by adding the range amount as an upper end, and the first cursor position determining unit; And a cursor initial position determination unit that generates an initial processing signal that defines an upper end and a lower end with the pixel signal of the pixel as the center of the range amount. The form includes the first and second embodiments. To respond.
[0021]
The invention according to
[0022]
According to a ninth aspect of the present invention, in the image processing circuit according to the seventh or eighth aspect, when the pixel signal of the first pixel exceeds the upper end of the processing signal of the second pixel, When the pixel signal of the first pixel is lower than the lower end of the processing signal of the second pixel, the second processing signal is converted into the first processing signal by the pixel signal of the first pixel. When the processing signal of the second pixel is within the range, a comparison result for selecting the processing signal of the second pixel is output. Corresponds to the first to third embodiments.
[0023]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, an embodiment will be described. First, before describing the embodiments of the present invention, a basic circuit configuration and an operation of the image processing circuit related to the present invention will be described. FIG. 1 is a block diagram showing a basic circuit configuration that can be considered when a hysteresis smoothing processing circuit is mounted on a digital camera. In FIG. 1,
[0024]
[0025]
Next, the operation of the image processing circuit illustrated in FIG. 1 will be described with reference to a timing chart in FIG. 2A and an explanatory diagram in FIG. FIG. 2A is a timing chart for explaining the 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 indicate the timings of data flowing through the image processing circuit shown in FIG. 1, and are numbers (1) to (7) of the image processing circuit shown in FIG. The timing of the data in the portion indicated by (7) is shown.
[0026]
The image signal output from the
[0027]
Next, the image signal is read from the
[0028]
On the other hand, photographing information, which is another input data of the image processing circuit, is information such as ISO sensitivity and shutter speed at the time of photographing, and as shown by (2) in the flowchart of FIG. Since the data is switched in units, the same information is held during one screen.
[0029]
The input image signal I and the photographing information are input to the cursor
[0030]
The input image signal I also passes through the
[0031]
Next, the cursor initial
[0032]
The cursor initial
high0 = I1 + curs / 2 (1)
low0 = I1-curs / 2 (2)
center0 = I1 (3)
[0033]
Since the first cursor
high1 = I1 (4)
low1 = I1-curs (5)
center1 = I1-curs / 2 (6)
[0034]
Similarly, since the second cursor
high2 = I1 + curs (7)
low2 = I1 (8)
center2 = I1 + curs / 2 (9)
[0035]
The output signals of the cursor initial
[0036]
Next, in the
[0037]
By this select signal S, the
(1) When S = "00", the
(2) When S = "01", the
(3) When S = "10", the
(4) When S = "11", the
[0038]
The signal selected by the
[0039]
Next, the
[0040]
Using these upper and lower position signals of the cursor, high and low, and the image signal I2, the
(1) If I2> high, the
(2) If I2 <low, the
(3) If low <I2 <high, the
(4) If I2 is the signal of the left end pixel of the image, "11" is output irrespective of the high and low signals.
[0041]
Here, the left end pixel of the image is a pixel in the leftmost column of 0, N + 0, 2N + 0,... In FIG. The signal from the
[0042]
By the way, the select signal S output from the
[0043]
In this case, a select signal derived from a 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 of generating the select signal S by one clock. For this purpose, either the
[0044]
However, for example, when the data bit length of the image signal is large, the operation time becomes long, so that the processing of the
[0045]
Next, an embodiment of the present invention that can solve this problem will be described. FIG. 3 is a block diagram showing a first embodiment of the image processing circuit according to the present invention. FIG. 3 is a block diagram showing a 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 the circuits shown in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted. The difference of this embodiment from the circuit shown in FIG. 1 is that the
[0046]
Next, the operation of the first embodiment thus configured will be described with reference to FIGS. 4A and 4B in addition to FIG. However, the description of the same operation as that of the circuit of FIG. 1 is omitted. FIG. 4A is a timing chart illustrating the flow of image data in the circuit illustrated in FIG. 3, and FIG. 4B is an explanatory diagram illustrating an image reading order. Numbers (1) to (8) in the timing chart of FIG. 4A indicate the timings of data flowing through the circuit, and represent the timings of data in the portions indicated by (1) to (8) in FIG. I have.
[0047]
The image signal output from the
[0048]
Next, the image signal is read from the
[0049]
The operation of the cursor
[0050]
Next, the operations of the cursor initial
[0051]
Next, the operation of the
[0052]
Here, the input signals high3, low3, and center3 of the
[0053]
Therefore, in order to adjust the timing of these signals, the input signals high3, low3, and center3 of the cursor position signal after the hysteresis smoothing processing is input to the
[0054]
Next, the
[0055]
The operation of the
[0056]
Here, as described above, this selector signal S selects any one set of the input signals high0, low0, center0, high1, low1, center1, high2, low2, center2 and high3, low3, center3 to the
[0057]
Here, the fact that the
[0058]
As a modified example of this embodiment, when the processing of the
[0059]
The above description can be generalized as follows.
(1) The sum of the number of delays (the number of delay clocks) of the
(2) The sum of the delay numbers of the
(3) The sum of the number of delays existing between the input image signal I and the
(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
[0060]
That is, in the present embodiment, the pixel signals are read out from the
[0061]
Also, when the generalized description is applied to the image processing circuit shown in FIG. 1, the pixel signals are read out in the order of
[0062]
As described above, by devising the reading order of the pixel signals from the
[0063]
Next, a second embodiment of the present invention will be described. In the first embodiment, the input image is a single-color image. On the other hand, 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 structure when a hysteresis smoothing processing circuit is mounted on a digital camera. . 5, components that are the same as or correspond to those in the first embodiment shown in FIG. 3 are given the same reference numerals, and detailed descriptions thereof are omitted. This embodiment is different from the first embodiment in that a single-chip color image sensor 1 'having an RGB Bayer color filter is used as an image sensor, and the delay of the
[0064]
Next, the operation of the second embodiment thus configured will be described with reference to FIGS. 6A to 6C in addition to FIG. However, description of the blocks that operate in the same manner as the image processing circuits shown in FIGS. 1 and 3 will be omitted. FIG. 6A is a timing chart illustrating the flow of image data in the image processing circuit illustrated in FIG. 5, and FIG. 6B is a diagram illustrating the reading order of pixel signals. FIG. 6C is a diagram illustrating a Bayer color filter. The timings of the signals indicated by the numbers (1) to (8) in the timing chart of FIG. 6A indicate the timings of data flowing to the portions indicated by the same numbers in the image processing circuit shown in FIG.
[0065]
The image signal output from the
[0066]
The two-dimensional single-plate color image signal is converted into a digital signal by the
[0067]
Next, the image signal written in the
[0068]
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 as shown by (2) in the timing chart of FIG. Since the data is switched on a frame basis, the same information is held during one screen.
[0069]
The operation of the cursor
[0070]
Next, the cursor initial
[0071]
Next, the operation of the
[0072]
Here, the input signals high3, low3, and center3 of the
[0073]
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
[0074]
Next, the
[0075]
The output signal of the
[0076]
Here, the fact that the
[0077]
The above description can be generalized as follows.
(1) The sum of the number of delays (the number of delay clocks) of the
(2) The sum of the delay numbers of the
(3) The sum of the number of delays existing between the input image signal I and the
(4) In the Bayer color image, the sum of the delay numbers shown in the above (1), (2) and (3) is the number of pixels read out in the vertical direction × 2 when the image signal is read out from the
[0078]
That is, in the present embodiment, the pixel signals are read out from the
[0079]
In the present embodiment, the number of delays of the
[0080]
First, the input image signal I arrives at the
[0081]
If the number of delays in the
[0082]
Further, in the present embodiment, the input image is shown as a Bayer color image. However, this is also applicable to a color image formed by another color filter such as a complementary color filter. In the case of handling an image in which the same color pixels are arranged every other pixel, such as the Bayer color image used in the present embodiment, the reading of the image from the image memory is performed as 0, 1, 2, 3,. Thus, when the image is read in the horizontal direction of the image, the sum of the delay numbers of the
[0083]
As described above, by devising the reading order of the image signal from the
[0084]
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. The same or corresponding components as those of the first and second embodiments shown in FIGS. Are denoted by the same reference numerals, and description thereof is omitted. In FIG. 7,
[0085]
In this embodiment, the cursor position is first calculated by the first cursor center
[0086]
However, since the calculation of the cursor upper and lower end positions high and low is performed after the processing of the
[0087]
Even in such a circuit having a more complicated configuration, the arrangement of the delay units and the number of delay clocks are appropriately determined as in the circuit configuration of the third embodiment shown in FIG. By using the image reading method as shown, the pipeline processing at the timing shown in FIG. 8 can be performed on the color image.
[0088]
The number of pipeline delays (the 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 number of delays of the
(2) The sum of the delay numbers of the
(3) The sum of the number of delays existing between the input image signal I and the
(4) In the Bayer color image, the sum of the delay numbers shown in the above (1), (2) and (3) is the number of pixels read out in the vertical direction × 2 when the image signal is read out from the
[0089]
As described above, by devising the reading order of the images from the
[0090]
【The invention's effect】
As described above based on the embodiments, according to the present invention, it is possible to set an appropriate delay amount for the output signals of the selection circuit and the comparison circuit that constitute the image processing circuit, and to perform the hysteresis smoothing processing. It is possible to realize an image processing circuit that can perform image processing having a representative feedback processing at high speed by pipeline processing.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image processing circuit related to the present invention.
FIG. 2 is a timing chart for explaining the operation of the image processing circuit shown in FIG. 1 and an explanatory diagram showing a reading order of image data in the image processing circuit shown in FIG. 1;
FIG. 3 is a block diagram showing a first embodiment of the image processing apparatus according to the present invention.
FIG. 4 is a timing chart for explaining the operation of the first embodiment shown in FIG. 3, and an explanatory diagram showing a reading order of image data in the first embodiment;
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 a reading order of image data in the second embodiment, and a timing chart in the second embodiment. FIG. 2 is a diagram illustrating a configuration of a Bayer color filter used for an image sensor.
FIG. 7 is a block diagram showing a third embodiment of the present invention.
FIG. 8 is a timing chart for explaining an 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-chip color image sensor
2 A / D converter
3 Image memory
4 Memory controller
5 Cursor height determination unit
6 Cursor initial position determination unit
7 First cursor position determination unit
8 Second cursor position determination unit
9 Selector
10 Comparators
11-19 Delay section
21 First cursor center position determination unit
22 Second cursor center position determination unit
23 Cursor upper and lower end position determination unit
24 Delay section
Claims (9)
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 true JP2004133644A (en) | 2004-04-30 |
JP4129163B2 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) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0668244A (en) * | 1993-03-26 | 1994-03-11 | Hitachi Ltd | Image processing processor |
JP2001298621A (en) * | 2000-02-07 | 2001-10-26 | Sony Corp | Image processor and image processing method |
-
2002
- 2002-10-10 JP JP2002296924A patent/JP4129163B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0668244A (en) * | 1993-03-26 | 1994-03-11 | Hitachi Ltd | Image processing processor |
JP2001298621A (en) * | 2000-02-07 | 2001-10-26 | Sony Corp | Image processor and image processing method |
Also Published As
Publication number | Publication date |
---|---|
JP4129163B2 (en) | 2008-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7116358B1 (en) | Image processing circuit of image input device | |
US20130242199A1 (en) | Image processing device and image processing method | |
JP2007174117A (en) | Image processing circuit and image processing method | |
US6636629B1 (en) | Image processing apparatus | |
JP3991011B2 (en) | Image signal processing device | |
JP5829122B2 (en) | Imaging apparatus and evaluation value generation apparatus | |
US20060177148A1 (en) | Image processing device, image processing program, and program-recording medium | |
EP0746166B1 (en) | Image sensing apparatus and method | |
JP2002150281A (en) | Image compression processing device and method | |
JP2009194721A (en) | Image signal processing device, image signal processing method, and imaging device | |
JP2004193911A (en) | Image processing apparatus, its method and digital still camera | |
JP2004133644A (en) | Image processing circuit | |
JP2004153848A (en) | Image processing circuit for image input apparatus | |
JP6415086B2 (en) | Image processing apparatus, image processing method, and program | |
US8705884B2 (en) | Image processing apparatus and method for controlling the same | |
JP6381219B2 (en) | Image processing apparatus, image processing method, and program | |
JP4246479B2 (en) | Imaging apparatus and imaging method | |
JP7379217B2 (en) | Imaging system | |
JP2004153849A (en) | Image processing circuit for image input apparatus | |
US20230388661A1 (en) | Integrated circuit with multi-application image processing | |
JP2002330283A (en) | Method and device for converting resolution | |
JP2010183246A (en) | Color camera | |
JP3463640B2 (en) | Digital noise reduction circuit | |
JP3671448B2 (en) | Image signal processing device | |
JPH10327422A (en) | Color information interpolation method and its interpolation circuit |
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 |