Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4677582B2 - Image processing device - Google Patents
[go: Go Back, main page]

JP4677582B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4677582B2
JP4677582B2 JP2001174080A JP2001174080A JP4677582B2 JP 4677582 B2 JP4677582 B2 JP 4677582B2 JP 2001174080 A JP2001174080 A JP 2001174080A JP 2001174080 A JP2001174080 A JP 2001174080A JP 4677582 B2 JP4677582 B2 JP 4677582B2
Authority
JP
Japan
Prior art keywords
image processing
register
pixel
data
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.)
Expired - Fee Related
Application number
JP2001174080A
Other languages
Japanese (ja)
Other versions
JP2002366946A (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.)
MegaChips Corp
Original Assignee
MegaChips 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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2001174080A priority Critical patent/JP4677582B2/en
Publication of JP2002366946A publication Critical patent/JP2002366946A/en
Application granted granted Critical
Publication of JP4677582B2 publication Critical patent/JP4677582B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Studio Devices (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、デジタル画像データに画素補間などを施す画像処理装置に関する。
【0002】
【従来の技術】
一般に、デジタル・ビデオ・カメラやデジタル・スチル・カメラなどの撮像デバイスでは、レンズ群やプリズムなどからなる光学系を透過した光はCCDセンサやCMOSセンサなどの撮像センサで検出され画像信号に変換される。その画像信号はデジタル信号(原画像データ)にA/D変換された後に、画素補間、色空間変換、輪郭強調および解像度変換などの種々の画像処理を施され、液晶表示装置(ファインダー)などで表示される。また撮像デバイスの中には、その画像処理を施した画像データを、JPEG(Joint Photographic Experts Group)やモーションJPEG、MPEG(Moving Picture Experts Group)などの各種方式で圧縮符号化した後に不揮発性メモリなどのメモリカードに書き出したり、インターフェースを介してパーソナル・コンピュータなどの外部機器に出力したりする機能を有するものもある。また、通常、前記原画像データに対する画像処理のリアルタイム性を高めるべく、撮像デバイスには画像処理専用のチップ(集積回路)が組み込まれている。しかし、ハードウェア構成のチップがなし得る画像処理には、予め組み込まれた画像処理しか実行できないという制限があり、このため、ハードウェアの仕様から外れた画像処理(適応型画像処理と呼ばれる。)はCPUに依存したプログラム(ソフトウェア)で実現される。
【0003】
【発明が解決しようとする課題】
しかしながら、そのようなCPUに依存した適応型画像処理ではオーバーヘッドが大きく、処理時間が長大化し易いという問題がある。例えば、撮像した原画像データをソフトウェア処理で画素補間する場合、その原画像データは一旦、SDRAMなどのバッファに転送され格納される。次いでCPUは、そのバッファにアクセスして2次元画素配列の原画像データを読み出さねばならないため、データ転送そのものに非常に時間がかかってしまう。また、CPUにおけるソフトウェア処理とチップにおけるハードウェア処理とを組み合わせた画像処理を行う場合にもデータ転送時のオーバーヘッドが大きくなる。すなわち、1画素毎のデータ転送回数には、CPUとバッファとの間で画像データを読出しおよび書き出しするために2ステップ、チップとバッファとの間で補間データを読出しおよび書き出しするために2ステップが要求され、合計4ステップが必要となる。このことが処理時間を長大化させる一因にもなっていた。
【0004】
以上の問題に鑑みて本発明が解決しようとするところは、ハードウェア処理とソフトウェア処理とを組み合わせた画像処理の速度を大幅に向上し得る画像処理装置を提供する点にある。
【0005】
【課題を解決するための手段】
上記課題を解決するため、請求項1に係る発明は、ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え、前記画像処理部は、入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、前記画素補間回路は、前記2次元局所領域内の全画素データの平均値または前記2次元局所領域内の各色成分毎の平均値を算出し、前記各平均値を第2の前記レジスタに保持させる線形演算回路と、前記画素補間回路は、前記2次元局所領域内の前記各色成分毎の平均値を特定の色成分の平均値で除算した色成分比率を算出し、該色成分比率を第3の前記レジスタに保持させる色成分比演算回路と、を備えることを特徴とするものである。
また請求項2に係る発明は、ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え、前記画像処理部は、入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、前記画素補間回路は、前記2次元局所領域内の全画素データの平均値または前記2次元局所領域内の各色成分毎の平均値を算出し、前記各平均値を第2の前記レジスタに保持させる線形演算回路と、前記2次元局所領域内の所定の注目画素の画素データと前記平均値との偏差(高域成分)を算出し、該偏差を第4の前記レジスタに保持させる高域成分演算回路と、を備えることを特徴とするものである。
また請求項3に係る発明は、ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え、前記画像処理部は、入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、前記画素補間回路は、前記2次元局所領域内の任意の画素データを昇順または降順に並べ替え、第5の前記レジスタに保持させる並べ替え演算回路を備えることを特徴とするものである。
【0006】
また請求項に係る発明は、請求項1〜3の何れか1項に記載の画像処理装置であって、前記画像処理部に対する画像データの入出力は少なくとも1チャンネルのDMA(ダイレクト・メモリ・アクセス)で実行されるものである。
【0007】
また請求項に係る発明は、請求項1〜4の何れか1項に記載の画像処理装置であって、前記マイクロ・プロセッサの処理速度が前記画像処理部の処理速度と同程度もしくは当該処理速度よりも低い場合に、少なくとも、前記マイクロ・プロセッサで前記適応型画像処理を実行する期間は、前記レジスタに同一の画像データを保持させ、且つ、前記画像処理部における処理を一時中断させるものである。
【0008】
また請求項に係る発明は、請求項1〜4の何れか1項に記載の画像処理装置であって、少なくとも、前記マイクロ・プロセッサで前記適応型画像処理を実行する期間に前記レジスタが同一の画像データを保持するように、前記マイクロ・プロセッサの処理速度が前記画像処理部の処理速度よりも高く設定されるものである。
【0014】
また請求項に係る発明は、請求項1〜6の何れか1項に記載の画像処理装置であって、前記画素補間回路は、前記2次元局所領域内の画素データの各々に所定の係数値を乗算して加算する空間フィルタリングを実行し、第6の前記レジスタに保持させる空間フィルタ回路を備える。
【0015】
また請求項に係る発明は、請求項記載の画像処理装置であって、前記空間フィルタ回路は、前記各画素データに対応する係数値を記憶した複数種類の係数テーブルと、該係数テーブルを切り換えるセレクタと、を備える。
【0016】
そして請求項に係る発明は、請求項1〜の何れか1項に記載の画像処理装置であって、前記インターフェースとしてコプロセッサ・インターフェースを用いたものである。
【0017】
【発明の実施の形態】
図1は、本発明の実施の形態に係る画像処理装置を搭載したデジタル・スチル・カメラ1の全体構成を示す機能ブロック図である。このデジタル・スチル・カメラ1は、AF(オート・フォーカス)機能や自動露出調節機能などを備えた光学機構11を有しており、この光学機構11を通して入射した被写体画像の光がCCDからなる画像撮像センサ12で検出される。また被写体を撮影するタイミングと同期するように光量を調節された光をストロボ(閃光装置)30から発して被写体に照射することができる。アナログ信号処理回路13は、画像撮像センサ12から出力された被写体の画像信号をデジタル化して得られる原画像データをRPU(リアルタイム・プロセッシング・ユニット)14に出力する。RPU(画像処理部)14は入力する原画像データに対して、後述する画素補間や色空間変換などの画像処理をリアルタイムに実行する機能を有する。また上記アナログ信号処理回路13とRPU14はそれぞれメイン・バス10と接続されており、アナログ信号処理回路13から出力される原画像データをRPU14に入力させずに、メイン・バス10を介して主メモリ26に転送させ一時記憶させることができる。
【0018】
またRPU14から出力された画像データは主メモリ26のバッファ領域に転送されて一時記憶されたり、メイン・バス10を介してディスプレイ・モジュール20に転送されLCD(液晶表示装置)23に表示されたりする。尚、同図中、符号21はデジタル・エンコーダ、22はLCD駆動回路22を示している。またそのバッファ領域に記憶された画像データは、CPU17やDMA(ダイレクト・メモリ・アクセス)コントローラ24の制御により読み出され、メイン・バス10を介して圧縮処理部25に転送されJPEGやMPEGなどの方式で圧縮符号化された後に、インターフェース27Aに転送され不揮発性メモリからなるメモリ・カード27に格納できる。また圧縮処理部25で圧縮符号化した画像データを外部インターフェース28に転送し、この外部インターフェース28と接続された外部の表示装置やコンピュータなどに転送することも可能である。
【0019】
尚、図1中、符号15は画像撮像センサ12を駆動する駆動回路、符号16はRPU14および駆動回路15などの動作タイミングを規律するタイミング・ジェネレータ、符号18はPLL発振回路、符号19はCPU17の補助演算を実行するコプロセッサを示している。またクロック・ジェネレータ29は、PLL発振回路18から供給されるクロック信号を逓倍もしくは分周することで、RPU14、タイミング・ジェネレータ16、CPU17およびデジタル・エンコーダ21などの全モジュールの駆動クロック信号を生成する。
【0020】
上記画像撮像センサ(CCD撮像センサ)12は、光電効果で発生したキャリア(電子またはホール)を蓄積する電荷蓄積部と、蓄積されたキャリアに電界を印加して転送するように制御する電荷転送部とを備える一般的なものである。例えば、IT−CCD(Interline Transfer CCD;インタライン転送CCD)、FF−CCD(Full Frame CCD;フルフレームCCD)、FT−CCD(Frame Transfer CCD;フレーム転送CCD)、FIT−CCD(Frame Interline Transfer CCD;フレームインターライン転送CCD)などが挙げられる。また画像撮像センサ12としては、画素を構成するラインのうち偶数番目ラインからなるフィールド(偶数フィールド)と奇数番目ラインからなるフィールド(奇数フィールド)とから交互に画素データを読み出されるインターレース(飛越し走査)タイプのものと、ライン順次に画素データを読み出されるプログレッシブ(順次走査)タイプのものとの何れかが使用される。尚、本実施の形態では、画像撮像センサ12にCCD撮像センサを採用するが、これに限らず、電荷転送部をもたないCMOS撮像センサを採用してもよい。このような画像撮像センサ12の感光部上には単板式の色フィルタ・アレイが配設されている。
【0021】
図2は、上記RPU14の概略構成を示す機能ブロック図である。RPU14は集積回路化されており、単一画素処理部40,画素補間・ガンマ補正処理部41,色空間変換・色抑圧処理部42,空間フィルタリング・コアリング処理部43および解像度変換部44を備えている。各処理ブロック40〜44はメイン・バス10と接続されており、画像データを処理ブロック40〜44でシリアル(逐次的)に画像処理させることができるし、一の処理ブロックのみで画像処理することも可能である。例えば、主メモリ26に一時記憶された画像データをメイン・バス10経由で画素補間・ガンマ補正処理部41にDMA転送し画像処理させた後、画素補間・ガンマ補正処理部41から出力された処理データをメイン・バス10経由で主メモリ26上のバッファにDMA転送し格納することができる。
【0022】
前記単一画素処理部40は、主メモリ26上のバッファからDMA転送されて入力する原画像データを単一画素単位で処理する機能を有し、入力する原画像データを複数フレームもしくは複数フィールドに亘り平均化する経時的平均化処理やシェーディング処理などを実行する。例えば、経時的平均化処理では、被写体の露光量が不足している場合、画像撮像センサ12から通常周期で読出した複数フレームまたは複数フィールドに亘る画素データを累積することで露出量を増大させる処理が行われる。従来、被写体の露光量が不足している場合は、画像撮像センサ12からの画素データの読出しを所定期間停止し、画像撮像センサ12の感光部における蓄積電荷量を十分に増大させた後に画素データを読出したり、アナログ信号処理回路13で画像信号を増幅したりすることが行われていたが、これらでは画素データに含まれるノイズも増大しS/N特性が低下するという問題が生じていた。また、シェーディング処理は、画像の全体が平均的に一様な明るさになるように、各画素の輝度値をゲイン調整することで実行される。ここで、シェーディングとは、光学機構11の中心部に対する周辺部の減光や、画像撮像センサ12の受光感度の不均一に起因して生ずる、被写体画像の本来の輝度と映像信号との間の変換特性の不整合を意味しており、例えば、画像の周辺部が中心部に比べて暗くなるという輝度ムラとなって現れるものである。
【0023】
次に、上記画素補間・ガンマ補正処理部41は主要な機能として、後に詳述するように、内部に組み込まれた空間レジスタ群(レジスタ)50に一時記憶した画素データを用いて各画素毎に不足の色成分を補間する画素補間機能と、ルック・アップ・テーブル(以下、LUTと呼ぶ。)を用いてガンマ値などを補正するガンマ補正機能とを有している。画像撮像センサ12の感光部上に配設される単板式の色フィルタ・アレイには、「R(赤色)」,「G(緑色)」,「B(青色)」の3原色系色フィルタや、「Y(イエロー色)」、「M(マゼンダ色)」、「C(シアン色)」、「G(緑色)」のような4色の補色系色フィルタなどがある。図3は、ベイヤー配列と称する3原色系色フィルタ配列35を例示する模式図、図4は、補色系色フィルタ配列37を例示する模式図である。3原色系の色フィルタ配列35は、太線枠で示した2×2画素の単位画素領域36を繰り返し単位として配列して構成される。その単位画素領域36には、対角をなす2画素の各々にGフィルタが配列され、残る2画素にRフィルタとBフィルタが配列されている。また、補色系の色フィルタ配列37は、太線枠で示した2×2画素の単位画素領域38を繰り返し単位として配列して構成される。その単位画素領域38には、Mフィルタ、Gフィルタ、CフィルタおよびYフィルタが各画素と一対一対応で配列される。このような色フィルタ・アレイを透過した光から得た画素データは、一画素に単色成分しかもたないため、画素補間機能は、一画素に3色もしくは4色の色成分をもたせるように当該着目画素の周辺画素の色成分を用いてそれらの平均値などを算出することで不足の色成分を補間する。また、ガンマ補正機能は、離散的な階調をもつ色成分値(入力値)と各入力値に対応する補正後の色成分値(出力値)とをLUTに保持しており、このLUTに基づいて入力値は対応する出力値に変換し出力する。
【0024】
本発明に係る画像処理装置では、CPU17は、以上の画素補間・ガンマ補正処理部41に組み込まれた空間レジスタ群50とインターフェースを介して直接アクセスでき、その空間レジスタ群50に記憶された画素データを取り込んで画像処理し、その空間レジスタ群50の任意のレジスタに戻すことが可能である。
【0025】
次に、色空間変換・色抑圧処理部42は、原信号がカラー画像信号の場合に例えばRGB信号からYCbCr信号へ色空間を変換する色空間変換機能と、画像中の明部と暗部の色抑圧(クロマサプレス;偽色防止)を行う色抑圧機能とを有している。色空間変換機能で変換先の色空間としては、YCbCr色空間の他に、NTSC(National Television System Committee)方式などで規定されているYIQ色空間などを採用しても構わない。また色抑圧機能は画像に現れる明部および暗部の発色を抑制することで自然な画質を実現するものである。一般に、画像に現れる暗部は様々なノイズの影響を受けやすい性質をもつため、暗部ではできるだけ発色を抑制することが自然な画質を出すことにつながる。一方、画像の現れる明部は当該明部を撮像した撮像素子やその他の種々のハードウェアの特性に応じて変調の影響を受け易い部分でありホワイトバランスが狂い易い部分であるため、出来るだけ発色を抑制することが自然な画質を出すことにつながる。これらを考慮して色抑圧機能は画像中の明部と暗部の発色が抑制される。
【0026】
次に、空間フィルタリング・コアリング処理部43は、画像データの5×5画素程度の局所領域に空間フィルタ(重みマスク)を適用し、各空間フィルタの係数値を対応する画素データに重み付け(乗算)し加算するという積和演算を実行する空間フィルタリング機能と、空間フィルタリング処理を施された画像データに対し、高域成分が一定レベルを超えたときに一般的な非線形処理(コアリング)を施すコアリング機能とを有するものである。以上の空間フィルタリング機能とコアリング機能とで画像に含まれる雑音が低減されたり、線およびエッジ部分を強調する輪郭強調処理が実行されたりする。
【0027】
次に、解像度変換部44は、前記空間フィルタリング・コアリング処理部43から出力された画像データのサイズを、バイリニア法(線形補間法)などに基づいて縮小または拡大する機能を有している。
【0028】
以上の構成のRPU14を用いた実施の形態に係る画像処理装置を以下に詳説する。図5は、本実施の形態に係る画像処理装置を構成する画素補間・ガンマ補正処理部41の概略を示すブロック図である。この画素補間・ガンマ補正処理部41は、上記した空間レジスタ群50として、上記単一画素処理部40またはメイン・バス10から入力する画素データの5×5画素分を記憶する入力データ・レジスタ群50Aと、各演算回路53〜58で処理された画素データ(中間データ)を記憶する中間データ・レジスタ群50Bと、補間組み合わせ回路59で処理された画素データを記憶する補間データ・レジスタ群50Cとを備えている。各レジスタ群50A〜50CはDフリップ・フロップなどから構成され、AND素子72から出力される制御信号に同期して動作する。AND素子72は、CPU17から伝達するPC(Processing Control)制御信号と画素クロックCLKとを論理積演算し、双方の信号レベルが高レベルのときに限り高レベルの制御信号を出力する。
【0029】
また、CPU17は、当該CPU17に備わるコプロセッサ・インターフェース80を介して画素補間・ガンマ補正処理部41のレジスタ群50A〜50Cの各々と接続されている。またCPU17は、メモリ(図示せず)に格納されたプログラムをロードし、当該プログラムに記述されたコプロセッサ・インターフェース80の命令に基づいて前記レジスタ群50A〜50Cの任意のレジスタ(以下、画素補間用レジスタと呼ぶ。)に直接アクセスでき、当該レジスタに格納された画素データをCPU17内の汎用レジスタ(図示せず)に取り込んで格納し、格納した画素データを用いて画素補間・ガンマ補正処理部41では処理し得ない適応型補間処理をソフトウェアで実行できる。そしてCPU17は、コプロセッサ・インターフェース80を介してその適応型補間データを任意の画素補間用レジスタに転送し格納させることが可能である。例えば、画素補間用レジスタからCPU17上の汎用レジスタにデータを移動させる移動命令は、"MFC $1, $2"のように表現され得る。その移動命令中、"$1"はCPU17内の汎用レジスタ、"$2"は画素補間用レジスタを示している。このような移動命令は、1CPUサイクルで実行できるため、高速に且つ効率良く双方のレジスタ間で画素データを移動できる。
【0030】
またCPU17のクロック周波数が画素クロックCLKの周波数と同程度もしくは画素クロックCLKの周波数よりも低い場合は、上記適応型画像処理を実行し且つ画素データをレジスタ群50A〜50Cのレジスタに戻す迄の処理期間は、PC制御信号のレベルをL(Low)レベルに維持し、各レジスタに同一の画素データを保持させ、リアルタイム処理を一時中断させる。これは、レジスタ群50A〜50Cに保持されている画素データが適応型画像処理途中で更新されるのを防ぐための措置である。他方、CPU17のクロック周波数が画素クロックCLKの周波数よりも十分に高い場合は、CPU17で適応型画像処理を行いつつ、PC制御信号のレベルをH(High)レベルに維持したまま画素補間・ガンマ補正処理部41のリアルタイム処理を続行できる。かかる場合は、RPU14におけるリアルタイム性を損なうこと無く適応型画像処理を実行できるため好ましい。
【0031】
尚、コプロセッサ・インターフェース80を用いる代わりに、CPU17の論理アドレスとSRAM上のアドレスとをメモリ・マッピングし、メイン・バス10を介して画素補間用レジスタとSRAMとの間で画素データを移動させるメモリ管理インターフェース(図示せず)を用いてもよい。但し、1つの命令を実行するのに一般的には平均で4CPUサイクル以上必要となるため、データ転送の速度および効率の観点からは、本実施の形態のようにコプロセッサ・インターフェース80を用いるのが望ましい。
【0032】
またRPU14に対する画素データの入出力は、少なくとも1チャンネルのDMAで実行できる。DMAコントローラ24を用いることで、CPU17はRPU14に対する画素データの転送処理の負荷を受けないため、適応型画像処理の処理速度の向上が可能である。また上記画像撮像センサ12には、画像読出しの進行の中断および再開を許可しないタイプと、画像読出しの進行の中断および再開を許可するタイプとに2分される。
【0033】
画像撮像センサ12が画像読出しの進行の中断と再開を許可しない通常のIT−CCDなどで構成される場合、RPU14の1クロックタイムの間にCPU17による適応型画像処理が終了しないときは、上述の通り、アナログ信号処理回路13から出力される原画像データを一旦、主メモリ26のバッファ領域に転送し記憶させる必要がある。かかる場合、適応型画像処理を行わない期間、DMAコントローラ24は、そのバッファ領域に格納された原画像データをRPU14にDMA転送する動作に1チャンネルを使用し、RPU14から出力される処理データを主メモリ26の他のバッファ領域にDMA転送する動作に1チャンネルを使用するため、合計2チャンネルが必要となる。他方、適応型画像処理を行う期間、上記PC制御信号のレベルをLレベルに切り換えることでRPU14の動作は一時中断されると同時に、DMAコントローラ24はDMA転送動作を一時中断するように制御される。そして、当該適応型画像処理の終了後にRPU14の動作およびDMA転送動作が再開される。尚、実際には、DMA転送された画素データが入力するRPU14のデータ入力部、およびDMA転送される画素データを出力するRPU14のデータ出力部には、FIFOバッファ(図示せず)が設けられている。このため、DMA転送するか否かのタイミングはそのFIFOバッファによる緩衝作用により左右されるが、上記のPC制御信号がLレベルである期間は、少なくとも、RPU14からFIFOバッファに対するデータ入出力要求は発生しない。
【0034】
また画像撮像センサ12が画像読出しの進行の中断と再開を許可できるFT−CCDやCMOSなどで構成される場合は、アナログ信号処理回路13から出力される原画像データを一旦、主メモリ26のバッファ領域に転送する必要が無く、その原画像データは、直接、RPU14に転送できる。このため、適応型画像処理を行わない期間、DMAコントローラ24は、RPU14から出力される処理データを主メモリ26のバッファ領域にDMA転送する動作に1チャンネル使用するだけでよい。また適応型画像処理を行う期間は、上記PC制御信号のレベルをLレベルに切り換えることでRPU14の動作は一時中断されると同時に、DMAコントローラ24はDMA転送動作を一時中断するように制御される。そして、当該適応型画像処理の終了後にRPU14の動作およびDMA転送動作が再開される。
【0035】
上記入力データ・レジスタ群50Aは、点順次で入力する画素データを、水平方向に5画素分且つ垂直方向に5画素分記憶する25個のレジスタ51,51,…を備えており、各レジスタ51,…は、ライン・メモリ52A,52B,52C,52Dを介して直列接続されている。また画素クロックCLKの印加により画素データはレジスタ51,51,…とライン・メモリ52A〜52Dとを順次移動し、画像データ内の5×5画素の所望の局所領域の画素データをレジスタ群50Aに記憶させ保持させることができる。このような入力データ・レジスタ群50Aに記憶された局所領域内の画素データは、各演算回路53〜58に選択的に取り込まれ処理された後、中間データ・レジスタ群50Bに記憶される。それら演算回路53〜58のうち線形演算回路53は、当該局所領域の中心画素(以下、注目画素と呼ぶ。)に対して線形演算により5種類の補間値を算出できる。第1の補間値は、当該局所領域内の全画素データの平均値Callであり、レジスタ60aに格納される。すなわち、図6に示すように当該局所領域内の画素値をR[i,j](i,jは0〜4の整数、iは行番号、jは列番号)で表現するとすれば、注目画素値はR[2,2]であり、Call=(R[0,0]+R[0,1]+…+R[4,3]+R[4,4])/25で算出される。また第2〜第5の補間値C1〜C4は、同色成分のみを用いた平均値であり、レジスタ60b〜60eにそれぞれ格納される。本実施の形態では、4色成分に対応し得るように4種類の補間値(平均値)が算出可能である。例えば、図3に示す色配列の画素データをレジスタ群50Aに保持し且つ注目画素データをG成分に設定した場合、当該注目画素に不足の色成分はR成分とB成分であるから、当該注目画素値R[2,2]を選択的に読み出してそのまま補間値C1とし、画素値R[2,1]、R[2,3]を選択的に読み出してR成分(補間値)C2を算出し、また画素値R[1,2]、R[3,2]を選択的に読み出してB成分(補間値)C3を算出する。このようにして各画素に対応する3色成分を補間することが可能となる。以上の補間値は、コプロセッサ・インターフェース80を介してCPU17のレジスタに移動され適応型画像処理を施された後に、レジスタ群50A〜50C内の任意のレジスタに戻され得る。例えば、CPU17で前記平均値Callと比較して他の補間値C1,C2,C3,C4の何れかの輝度値分布が偏っていると判定された場合、CPU17はデータ・ベースなどに従って当該補間値を補正(適応型画像処理)した後にレジスタ60b〜60eに戻すことができる。
【0036】
また、色成分比演算回路54は、レジスタ60b〜60eに格納した各色成分C1,C2,C3,C4を用いて基準となる色成分と他の色成分との比率を算出し、レジスタ61a〜61cに出力し保持させる機能を有する。例えば、基準となる色成分C1と他の色成分C2,C3,C4との比率は、C2/C1、C3/C1およびC4/C1で算出される。
【0037】
また、高域成分演算回路55は、当該着目画素値から各色成分の平均値(低域成分)を減算した高域成分を算出し、レジスタ62a〜62eに出力し保持させる機能を有する。この高域成分演算回路55は、全方向、水平方向、垂直方向および対角方向の5種類の高域成分を算出できる。例えば、全方向の高域成分(偏差)Hallは、Hall=R[2,2]−Call、の演算式で算出できる。水平方向の高域成分(偏差)HHは、当該画素値から、水平方向に亘る5個の画素値の平均値を減算した値であり、具体的には、HH=R[2,2]−(R[2,0]+R[2,1]+R[2,2]+R[2,3]+R[2,4])/5、の演算式で算出できる。また垂直方向の高域成分(偏差)HVは、当該画素値から、垂直方向に亘る5個の画素値の平均値を減算した値であり、具体的には、HV=R[2,2]−(R[0,2]+R[1,2]+R[2,2]+R[3,2]+R[4,2])/5、の演算式で算出できる。そして、対角方向の高域成分(偏差)HDは、当該画素値から、左上方から右下方もしくは右上方から左下方への対角方向に亘る5個の画素値の平均値を減算した値であり、具体的には、HD=R[2,2]−(R[0,0]+R[1,1]+R[2,2]+R[3,3]+R[4,4])/5、もしくは、HD=R[2,2]−(R[0,4]+R[1,3]+R[2,2]+R[3,1]+R[4,0])/5、の演算式で算出できる。
【0038】
また、分散演算回路56は、前記レジスタ62a〜62eに格納した高域成分を読み出して各高域成分の平方を分散量として算出し、レジスタ63a〜63eに出力し保持させる機能を有する。全方向の分散Vallは、Vall=Hall 2、の演算式で算出され、レジスタ63aに格納される。また、水平方向、垂直方向および対角方向の分散もそれぞれ、VH=HH 2、VV=HV 2およびVD=HD 2、の演算式で算出され、レジスタ62b〜62eに格納される。尚、分散量を求める代わりに標準偏差などの他の統計量を算出してもよい。
【0039】
以上の色成分比演算回路54や高域成分演算回路55、分散演算回路56で算出された値は、コプロセッサ・インターフェース80を介してレジスタからCPU17内のレジスタに移動されて、CPU17で上記適応型画像処理を行う際に利用され得る。このため、CPU17がレジスタ60b〜60eに格納した補間値に対してホワイト・バランスなどの微調整を行う際、上記高域成分や分散量などの演算時間を省くことができ、適応型画像処理を高速に実行できる。
【0040】
次に、上記空間フィルタ回路57は、画像データの5×5画素の局所領域に空間フィルタ(重みマスク)を適用し、当該局所領域内の各画素に割り当てられた係数値を当該画素データに重み付け(乗算)し加算するという積和演算を実行する機能を有する。図7は、空間フィルタ回路57の係数テーブル73の例を示す模式図である。係数テーブル73は、上記入力データ・レジスタ群50Aに保持された各画素データに対応する係数値K[0,0],K[0,1],…,K[4,4]を格納している。画像データのi行j列目(i,j:整数)の注目画素値G[i,j](=R[2,2])に対する出力画素値O[i,j]は次式(1)に従って算出され、レジスタ64に格納される。
【0041】
【数1】

Figure 0004677582
【0042】
尚、空間フィルタ回路57は、上式(1)の出力画素値O[i,j]に所定の補正値を加算できるし、出力画素値O[i,j]を2の巾乗値で除算して算術シフトすることもできる。またCPU17はこのような空間フィルタ回路57の出力画素値を取り込み適応型画像処理を行うことができる。
【0043】
また、上記空間フィルタ回路57は、複数の係数値テーブルを備えることが好ましい。図8は、第1係数テーブル73Aと第2係数テーブル73Bを備えた空間フィルタ回路57を示す概略図である。空間フィルタ回路57は、CPU17からのFS(Filter Select)制御信号により第1および第2係数テーブル73A,73Bの何れか一方を選択するセレクタ74と、このセレクタ74を介して読み出した係数値を用いて上記積和演算を実行する空間フィルタリング演算回路75とを備えている。例えば、第1係数テーブル73Aを高周波数成分算出用、第2係数テーブル73Bを低周波数成分算出用のものとして係数値を書き込んでおくことで、高周波数成分と低周波数成分との双方を得ることができる。また複数の係数テーブルを用意することは処理の高速化に繋がる。例えば、1つの係数テーブルしか用意されていない場合、1画素データの処理に対して、その係数テーブルに高周波数成分算出用の係数値を書き込むために数CPUステップ、前記係数値を読出すために1CPUステップ、その係数テーブルに低周波数成分算出用の係数値を書き込んで更新するために数CPUステップ、そして前記係数値を読出すために1CPUステップがそれぞれ必要となり、処理時間が長大化し易い。他方、2つの係数テーブル73A,73Bを用意した場合は、各テーブルに高周波数成分算出用と低周波数成分算出用の係数値をそれぞれ書き込んでおけば、1画素データの処理に対して、セレクタ74の切換制御に1CPUステップ、高周波成分算出用の係数値を読出すために1CPUステップ、低周波数成分算出用の係数値を読出すために1CPUステップがそれぞれ必要であるが、1つの係数テーブルしか用意していない場合と比べると処理時間の大幅な短縮が可能であることが分かる。
【0044】
次に、並べ替え演算回路58は、入力データ・レジスタ群50Aから読出した画素データを降順または昇順に並べ替え演算し、レジスタ65に出力し保持させる機能を有する。例えば、CPU17は、コプロセッサ・インターフェース80を介してレジスタ65に保持された画素データを取り込み、並べ替えた画素データの中央値(メディアン)を当該注目画素の画素値とするメディアン補間や、当該中央値付近の複数の画素データを選択して平均化する補間などの適応型画像処理を行った後、レジスタ65に戻すことができる。
【0045】
以上の各種演算回路53〜58で算出された画素データは、中間データ・レジスタ群50Bから補間組み合わせ回路59に読み出される。補間組み合わせ回路59は、レジスタ群50Bから読出した画素データを用いて3色成分もしくは4色成分を画素補間した後、各色成分毎にそれぞれ、レジスタ66a,66b,66c,66dに出力し保持させる。尚、補間組み合わせ回路59は、中間データ・レジスタ群50Bのレジスタ60b,60c,60d,60eに保持された各色成分(補間値)をそのまま読み出してレジスタ66a〜66dに出力しても構わない。
【0046】
次に、第1ガンマ補正回路70A,70B,70C,70Dは、それぞれ補間データ・レジスタ群50Cのレジスタ66a,66b,66c、66dから伝達した画素データに対してLUTを用いてガンマ補正を実行し、各補正データをレジスタ71a,71b,71c,71dに出力し保持させる。そして、レジスタ71a〜71dで保持された画素データは、図2に示した色空間変換・色抑圧処理部42に出力される。
【0047】
以上の実施の形態に係る画像処理装置によれば、CPU17は、RPU14に入力しリアルタイム処理されている途中の画素データをコプロセッサ・インターフェース80を介して取り込み、適応型画像処理を施した後に、RPU14に戻してリアルタイム処理を続行させることができる。よって、RPU14におけるハードウェア処理とCPU17におけるソフトウェア処理(適応型画像処理)とを組み合わせた複合処理を効率良く実行でき、その処理速度を大幅に向上させることが可能となる。
【0048】
【発明の効果】
以上の如く、本発明の請求項1〜3に係る画像処理装置によれば、上記インターフェースにより上記マイクロ・プロセッサは上記画像処理部のレジスタに直接アクセスして画像データの読出しおよび書き出しを実行できる。よって、画像処理部でハードウェア処理の途中にある画像データに対してマイクロ・プロセッサでソフトウェア処理(適応型画像処理)を施し、ソフトウェア処理した画像データを画像処理部に戻してハードウェア処理を続行させることが可能となる。従って、ハードウェア処理とソフトウェア処理との複合処理を極めて効率良く行うことができ、その処理速度を大幅に向上させることが可能となる。
【0049】
また請求項によれば、上記画像処理部に対して画像データをDMA転送する期間、マイクロ・プロセッサはデータ転送の処理負荷を受けないため、適応型画像処理を専念して実行できる。このため、適応型画像処理の処理速度を更に向上することが可能となる。
【0050】
また請求項によれば、上記適応型画像処理の最中にレジスタの記憶内容が更新されるのを確実に防止することができる。
【0051】
また請求項によれば、上記適応型画像処理の最中にレジスタの記憶内容が更新されるのを確実に防止できると共に、画像処理部におけるハードウェア処理のリアルタイム性を損なうこと無く適応型画像処理を実行することが可能となる。
【0052】
また請求項1〜3によれば、画素補間処理の途中の画素データに対してマイクロ・プロセッサで適応型画像処理を施すことができる。また、画素補間処理で利用されるレジスタや該レジスタに保持された演算結果を利用した適応型画像処理を行うことが可能である。
【0053】
また請求項1,2によれば、マイクロ・プロセッサは、上記線形演算回路で算出した2種類の平均値を用いて適応型画像処理を実行できるため、当該平均値の演算時間を省くことができ適応型画像処理の速度を向上できる。
【0054】
また請求項によれば、マイクロ・プロセッサは、上記色成分比演算回路で算出した色成分比率を用いてホワイト・バランスの微調整などの適応型画像処理を実行できるため、当該色成分比率の演算時間を省くことができ適応型画像処理の速度を向上できる。
【0055】
また請求項によれば、マイクロ・プロセッサは、上記高域成分演算回路で算出した偏差(高域成分)を用いてホワイト・バランスの微調整などの適応型画像処理を実行できるため、当該偏差の演算時間を省くことができ適応型画像処理の速度を向上できる。
【0056】
また請求項によれば、マイクロ・プロセッサは、上記並べ替え演算回路で昇順または降順に並べ替えた画素データを用いてメディアン(中央値)補間などの適応型画像処理を実行できるため、画素データを並べ替える演算時間を省くことができ適応型画像処理の速度を向上できる。
【0057】
また請求項によれば、マイクロ・プロセッサは、空間フィルタリングで実行する積和演算結果をレジスタから読み出して適応型画像処理を実行でき、当該適応型画像処理の速度を向上できる。
【0058】
また請求項によれば、複数種類の空間フィルタリングを実行するとき、1種類の係数テーブルしか用意していない場合と比べると、係数テーブルの係数値を書き込み更新する回数が減るため、処理時間を大幅に短縮化することが可能となる。
【0059】
そして請求項によれば、上記コプロセッサ・インターフェースによるレジスタ間の画素データの移動命令は1CPUサイクルで実行できるため、上記画像処理部におけるハードウェア処理とマイクロ・プロセッサにおけるソフトウェア処理との複合処理速度を更に向上できる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係る画像処理装置を搭載したデジタル・スチル・カメラの全体構成を示す機能ブロック図である。
【図2】本発明の実施の形態に係る画像処理装置を構成するRPUを示すブロック図である。
【図3】3原色系色フィルタ配列を示す模式図である。
【図4】補色系色フィルタ配列を示す模式図である。
【図5】実施の形態に係る画像処理装置を構成する画素補間・ガンマ補正処理部の概略を示すブロック図である。
【図6】局所領域内の画素値を示す模式図である。
【図7】実施の形態に係る画像処理装置を構成する空間フィルタ回路の係数テーブルを示す模式図である。
【図8】2種類の係数テーブルを備えた空間フィルタ回路を示す概略図である。
【符号の説明】
1 デジタル・スチル・カメラ
10 メイン・バス
14 RPU
17 CPU
26 主メモリ
41 画素補間・ガンマ補正処理部
50 空間レジスタ群
50A〜50C 入力データ・レジスタ群
52A〜50D ライン・メモリ
53〜58 演算回路
59 補間組み合わせ回路
70A〜70D ガンマ補正回路
73,73A,73B 係数テーブル
74 セレクタ
75 空間フィルタリング演算回路
80 コプロセッサ・インターフェース[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus that performs pixel interpolation or the like on digital image data.
[0002]
[Prior art]
In general, in an imaging device such as a digital video camera or a digital still camera, light transmitted through an optical system including a lens group and a prism is detected by an imaging sensor such as a CCD sensor or a CMOS sensor and converted into an image signal. The The image signal is A / D converted into a digital signal (original image data), and then subjected to various image processing such as pixel interpolation, color space conversion, contour enhancement and resolution conversion, and is performed on a liquid crystal display (finder) or the like. Is displayed. In addition, some imaging devices compress and encode image data that has undergone image processing using various methods such as JPEG (Joint Photographic Experts Group), Motion JPEG, MPEG (Moving Picture Experts Group), etc. Some of them have a function of writing to a memory card or outputting to an external device such as a personal computer via an interface. In general, a chip (integrated circuit) dedicated to image processing is incorporated in the imaging device in order to improve real-time performance of image processing on the original image data. However, image processing that can be performed by a chip having a hardware configuration has a limitation that only image processing that has been incorporated in advance can be executed. For this reason, image processing that deviates from hardware specifications (referred to as adaptive image processing). Is realized by a program (software) depending on the CPU.
[0003]
[Problems to be solved by the invention]
However, such adaptive image processing depending on the CPU has a problem that the overhead is large and the processing time tends to be long. For example, when imaged original image data is subjected to pixel interpolation by software processing, the original image data is temporarily transferred to and stored in a buffer such as an SDRAM. Next, since the CPU must access the buffer and read the original image data of the two-dimensional pixel array, the data transfer itself takes a very long time. Also, when performing image processing that combines software processing in the CPU and hardware processing in the chip, the overhead at the time of data transfer increases. That is, the number of data transfers per pixel includes two steps for reading and writing image data between the CPU and the buffer, and two steps for reading and writing interpolation data between the chip and the buffer. A total of 4 steps are required. This has also contributed to lengthening the processing time.
[0004]
In view of the above problems, an object of the present invention is to provide an image processing apparatus capable of greatly improving the speed of image processing combining hardware processing and software processing.
[0005]
[Means for Solving the Problems]
  In order to solve the above problems, an invention according to claim 1 is an image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor for executing adaptive image processing based on a predetermined program. The image processing unitIn processing performed by the image processing unit,A register for holding image data in the middle of processing; and the microprocessor directly accesses and reads out the image data held in the register, and the image data subjected to the adaptive image processing is read in the register Provides an interface to access and return directly toThe image processing unit executes pixel interpolation using the first register that holds pixel data of a predetermined two-dimensional local region of input image data and the pixel data held in the first register. A pixel interpolation circuit that calculates an average value of all pixel data in the two-dimensional local region or an average value for each color component in the two-dimensional local region, and the average value And the pixel interpolation circuit calculate a color component ratio obtained by dividing the average value for each color component in the two-dimensional local region by the average value of a specific color component. And a color component ratio calculation circuit for holding the color component ratio in the third register.It is characterized by that.
According to a second aspect of the present invention, there is provided an image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor that executes adaptive image processing based on a predetermined program. The processing unit includes a register that stores image data being processed in the processing performed by the image processing unit, and the micro processor directly accesses and reads the image data held in the register, and An interface for directly accessing and returning the image data subjected to the adaptive image processing to the register; and the image processing unit stores the pixel data of a predetermined two-dimensional local region of the input image data. And a pixel interpolation circuit that performs pixel interpolation using the pixel data held in the first register. The pixel interpolation circuit calculates an average value of all pixel data in the two-dimensional local area or an average value for each color component in the two-dimensional local area, and holds the average value in the second register. A high-frequency component that calculates a deviation (high-frequency component) between pixel data of a predetermined pixel of interest in the two-dimensional local region and the average value, and holds the deviation in the fourth register And an arithmetic circuit.
According to a third aspect of the present invention, there is provided an image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor that executes adaptive image processing based on a predetermined program. The processing unit includes a register that stores image data being processed in the processing performed by the image processing unit, and the micro processor directly accesses and reads the image data held in the register, and An interface for directly accessing and returning the image data subjected to the adaptive image processing to the register; and the image processing unit stores the pixel data of a predetermined two-dimensional local region of the input image data. And a pixel interpolation circuit that performs pixel interpolation using the pixel data held in the first register. The pixel interpolation circuit, the sort any pixel data of two-dimensional local region in ascending or descending order, and is characterized in further comprising a sorting operation circuit for holding the fifth said register.
[0006]
  And claims4The invention according to claim 1In any one of ~ 3In the image processing apparatus described above, input / output of image data to / from the image processing unit is executed by at least one channel of DMA (Direct Memory Access).
[0007]
  And claims5The invention according to claim 1In any one of -4When the processing speed of the microprocessor is the same as or lower than the processing speed of the image processing unit, at least the adaptive image processing is performed by the microprocessor. During the execution period, the same image data is held in the register, and the processing in the image processing unit is temporarily suspended.
[0008]
  And claims6The invention according to claim 1In any one of -4The image processing apparatus according to claim 1, wherein the processing speed of the microprocessor is set so that the register holds the same image data at least during a period in which the adaptive image processing is executed by the microprocessor. Is set to be higher than the processing speed of the unit.
[0014]
  And claims7The invention according to claimIn any one of 1-6The pixel interpolation circuit performs spatial filtering in which each pixel data in the two-dimensional local region is multiplied by a predetermined coefficient value and added, and held in the sixth register A spatial filter circuit is provided.
[0015]
  And claims8The invention according to claim7The spatial filter circuit includes a plurality of types of coefficient tables that store coefficient values corresponding to the pixel data, and a selector that switches the coefficient tables.
[0016]
  And claims9The invention according to claim 1 to claim 18The image processing apparatus according to any one of the above, wherein a coprocessor interface is used as the interface.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a functional block diagram showing an overall configuration of a digital still camera 1 equipped with an image processing apparatus according to an embodiment of the present invention. The digital still camera 1 has an optical mechanism 11 having an AF (auto focus) function, an automatic exposure adjustment function, and the like, and the light of the subject image incident through the optical mechanism 11 is an image formed by a CCD. It is detected by the image sensor 12. In addition, the light whose light amount is adjusted so as to be synchronized with the timing of photographing the subject can be emitted from the strobe (flash device) 30 and irradiated onto the subject. The analog signal processing circuit 13 outputs original image data obtained by digitizing the image signal of the subject output from the image pickup sensor 12 to an RPU (real-time processing unit) 14. An RPU (image processing unit) 14 has a function of executing image processing such as pixel interpolation and color space conversion, which will be described later, on the input original image data in real time. The analog signal processing circuit 13 and the RPU 14 are respectively connected to the main bus 10, and the original image data output from the analog signal processing circuit 13 is not input to the RPU 14, and the main memory is connected via the main bus 10. 26 to be temporarily stored.
[0018]
The image data output from the RPU 14 is transferred to the buffer area of the main memory 26 and temporarily stored, or transferred to the display module 20 via the main bus 10 and displayed on the LCD (liquid crystal display) 23. . In the figure, reference numeral 21 denotes a digital encoder, and 22 denotes an LCD drive circuit 22. The image data stored in the buffer area is read out under the control of the CPU 17 and the DMA (direct memory access) controller 24, transferred to the compression processing unit 25 via the main bus 10, and such as JPEG or MPEG. After being compressed and encoded by the method, it is transferred to the interface 27A and can be stored in the memory card 27 formed of a nonvolatile memory. It is also possible to transfer the image data compression-encoded by the compression processing unit 25 to the external interface 28 and transfer it to an external display device or computer connected to the external interface 28.
[0019]
In FIG. 1, reference numeral 15 denotes a drive circuit for driving the image pickup sensor 12, reference numeral 16 denotes a timing generator that regulates the operation timing of the RPU 14 and the drive circuit 15, reference numeral 18 denotes a PLL oscillation circuit, and reference numeral 19 denotes a CPU 17. 2 shows a coprocessor that performs auxiliary operations. The clock generator 29 multiplies or divides the clock signal supplied from the PLL oscillation circuit 18 to generate drive clock signals for all the modules such as the RPU 14, the timing generator 16, the CPU 17, and the digital encoder 21. .
[0020]
The image imaging sensor (CCD imaging sensor) 12 includes a charge accumulation unit that accumulates carriers (electrons or holes) generated by the photoelectric effect, and a charge transfer unit that controls to apply and transfer an electric field to the accumulated carriers. It is a general thing provided with. For example, IT-CCD (Interline Transfer CCD), FF-CCD (Full Frame CCD), FT-CCD (Frame Transfer CCD), FIT-CCD (Frame Interline Transfer CCD) Frame interline transfer CCD). Further, the image pickup sensor 12 is an interlace (interlaced scanning) in which pixel data is alternately read from a field composed of even-numbered lines (even-numbered field) and a field composed of odd-numbered lines (odd-numbered field). ) Type and progressive (sequential scanning) type in which pixel data is read out line by line. In this embodiment, a CCD image sensor is employed as the image sensor 12. However, the present invention is not limited to this, and a CMOS image sensor having no charge transfer unit may be employed. A single-plate color filter array is disposed on the photosensitive part of the image pickup sensor 12.
[0021]
FIG. 2 is a functional block diagram showing a schematic configuration of the RPU 14. The RPU 14 is an integrated circuit, and includes a single pixel processing unit 40, a pixel interpolation / gamma correction processing unit 41, a color space conversion / color suppression processing unit 42, a spatial filtering / coring processing unit 43, and a resolution conversion unit 44. ing. Each processing block 40-44 is connected to the main bus 10, and image data can be processed serially (sequentially) by the processing blocks 40-44, or image processing can be performed by only one processing block. Is also possible. For example, after the image data temporarily stored in the main memory 26 is DMA-transferred to the pixel interpolation / gamma correction processing unit 41 via the main bus 10 and subjected to image processing, the processing output from the pixel interpolation / gamma correction processing unit 41 is performed. Data can be DMA transferred to the buffer on the main memory 26 via the main bus 10 and stored.
[0022]
The single pixel processing unit 40 has a function of processing original image data input by DMA transfer from a buffer on the main memory 26 in units of single pixels, and the input original image data is converted into a plurality of frames or a plurality of fields. A time-dependent averaging process, a shading process, and the like that perform averaging are performed. For example, in the temporal averaging process, when the exposure amount of the subject is insufficient, the exposure amount is increased by accumulating pixel data over a plurality of frames or a plurality of fields read out from the image pickup sensor 12 in a normal cycle. Is done. Conventionally, when the exposure amount of the subject is insufficient, the reading of pixel data from the image pickup sensor 12 is stopped for a predetermined period, and the pixel charge is increased after sufficiently increasing the accumulated charge amount in the photosensitive portion of the image pickup sensor 12. However, there is a problem that the noise included in the pixel data is increased and the S / N characteristic is deteriorated. Further, the shading process is executed by adjusting the gain of the luminance value of each pixel so that the entire image has a uniform brightness on average. Here, the shading is the difference between the original luminance of the subject image and the video signal, which is caused by the dimming of the peripheral portion with respect to the central portion of the optical mechanism 11 and the non-uniformity of the light receiving sensitivity of the image pickup sensor 12. This means that the conversion characteristics are inconsistent. For example, it appears as luminance unevenness in which the peripheral portion of the image becomes darker than the central portion.
[0023]
Next, as described in detail later, the pixel interpolation / gamma correction processing unit 41 uses a pixel data temporarily stored in a space register group (register) 50 incorporated therein as a main function. It has a pixel interpolation function for interpolating insufficient color components, and a gamma correction function for correcting gamma values and the like using a look-up table (hereinafter referred to as LUT). A single-plate color filter array disposed on the photosensitive portion of the image sensor 12 includes three primary color filters “R (red)”, “G (green)”, and “B (blue)”. , “Y (yellow color)”, “M (magenta color)”, “C (cyan color)”, “G (green)”, etc., and four complementary color filters. FIG. 3 is a schematic diagram illustrating a three-primary color filter array 35 called a Bayer array, and FIG. 4 is a schematic diagram illustrating a complementary color filter array 37. The color filter array 35 of the three primary colors is configured by arranging unit pixel regions 36 of 2 × 2 pixels indicated by thick line frames as repeating units. In the unit pixel area 36, a G filter is arranged for each of the two diagonal pixels, and an R filter and a B filter are arranged for the remaining two pixels. The complementary color filter array 37 is formed by arranging unit pixel regions 38 of 2 × 2 pixels indicated by thick line frames as repeating units. In the unit pixel region 38, an M filter, a G filter, a C filter, and a Y filter are arranged in a one-to-one correspondence with each pixel. Since pixel data obtained from light that has passed through such a color filter array has only a single color component per pixel, the pixel interpolation function is focused on so that one pixel has three or four color components. An insufficient color component is interpolated by calculating an average value of the color components of the peripheral pixels of the pixel. The gamma correction function holds color component values (input values) having discrete gradations and corrected color component values (output values) corresponding to the respective input values in the LUT. Based on this, the input value is converted into a corresponding output value and output.
[0024]
In the image processing apparatus according to the present invention, the CPU 17 can directly access the space register group 50 incorporated in the pixel interpolation / gamma correction processing unit 41 via the interface, and can store the pixel data stored in the space register group 50. It is possible to capture and process the image, and to return to an arbitrary register of the space register group 50.
[0025]
Next, when the original signal is a color image signal, the color space conversion / color suppression processing unit 42 converts a color space from, for example, an RGB signal to a YCbCr signal, and colors of bright and dark portions in the image. And a color suppression function for performing suppression (chroma suppress: prevention of false color). As a destination color space for the color space conversion function, a YIQ color space defined by the NTSC (National Television System Committee) system or the like may be adopted in addition to the YCbCr color space. The color suppression function realizes a natural image quality by suppressing the coloring of bright and dark parts appearing in an image. In general, since a dark part appearing in an image is easily affected by various noises, suppressing color development as much as possible in the dark part leads to a natural image quality. On the other hand, the bright part where the image appears is a part that is easily affected by modulation depending on the characteristics of the image pickup device that picked up the bright part and other various hardware, and is a part that tends to get out of white balance. Suppressing will lead to natural image quality. In consideration of these, the color suppression function suppresses the color development in the bright and dark areas in the image.
[0026]
Next, the spatial filtering / coring processing unit 43 applies a spatial filter (weight mask) to a local region of about 5 × 5 pixels of the image data, and weights (multiplies) the coefficient value of each spatial filter to the corresponding pixel data. ) And a spatial filtering function that performs a sum-of-products operation that adds and general non-linear processing (coring) is applied to the image data that has undergone spatial filtering when the high-frequency component exceeds a certain level It has a coring function. With the spatial filtering function and the coring function described above, noise included in the image is reduced, or contour enhancement processing for enhancing lines and edge portions is executed.
[0027]
Next, the resolution conversion unit 44 has a function of reducing or enlarging the size of the image data output from the spatial filtering / coring processing unit 43 based on a bilinear method (linear interpolation method) or the like.
[0028]
The image processing apparatus according to the embodiment using the RPU 14 having the above configuration will be described in detail below. FIG. 5 is a block diagram showing an outline of the pixel interpolation / gamma correction processing unit 41 constituting the image processing apparatus according to the present embodiment. The pixel interpolation / gamma correction processing unit 41 has, as the space register group 50 described above, an input data register group that stores 5 × 5 pixels of pixel data input from the single pixel processing unit 40 or the main bus 10. 50A, an intermediate data register group 50B for storing pixel data (intermediate data) processed by the arithmetic circuits 53 to 58, and an interpolation data register group 50C for storing pixel data processed by the interpolation combination circuit 59 It has. Each of the register groups 50 </ b> A to 50 </ b> C includes a D flip-flop and the like, and operates in synchronization with a control signal output from the AND element 72. The AND element 72 performs an AND operation on a PC (Processing Control) control signal transmitted from the CPU 17 and the pixel clock CLK, and outputs a high-level control signal only when both signal levels are high.
[0029]
The CPU 17 is connected to each of the register groups 50 </ b> A to 50 </ b> C of the pixel interpolation / gamma correction processing unit 41 via a coprocessor interface 80 provided in the CPU 17. The CPU 17 loads a program stored in a memory (not shown) and, based on an instruction of the coprocessor interface 80 described in the program, any register (hereinafter referred to as pixel interpolation) of the register groups 50A to 50C. The pixel data stored in the register is fetched and stored in a general-purpose register (not shown) in the CPU 17, and the pixel interpolation / gamma correction processing unit 41 is used using the stored pixel data. Then, adaptive interpolation processing that cannot be processed can be executed by software. Then, the CPU 17 can transfer and store the adaptive interpolation data to an arbitrary pixel interpolation register via the coprocessor interface 80. For example, a move command for moving data from a pixel interpolation register to a general-purpose register on the CPU 17 can be expressed as “MFC $ 1, $ 2”. In the movement command, “$ 1” indicates a general-purpose register in the CPU 17 and “$ 2” indicates a pixel interpolation register. Since such a movement command can be executed in one CPU cycle, pixel data can be moved between both registers at high speed and efficiently.
[0030]
When the clock frequency of the CPU 17 is about the same as the pixel clock CLK or lower than the pixel clock CLK, the processing until the adaptive image processing is executed and the pixel data is returned to the registers of the register groups 50A to 50C is performed. During the period, the level of the PC control signal is maintained at the L (Low) level, the same pixel data is held in each register, and the real-time processing is temporarily suspended. This is a measure for preventing the pixel data held in the register groups 50A to 50C from being updated during the adaptive image processing. On the other hand, when the clock frequency of the CPU 17 is sufficiently higher than the frequency of the pixel clock CLK, pixel interpolation and gamma correction are performed while maintaining the level of the PC control signal at the H (High) level while performing the adaptive image processing in the CPU 17. The real-time processing of the processing unit 41 can be continued. Such a case is preferable because adaptive image processing can be executed without impairing real-time performance in the RPU 14.
[0031]
Instead of using the coprocessor interface 80, the logical address of the CPU 17 and the address on the SRAM are memory-mapped, and the pixel data is moved between the pixel interpolation register and the SRAM via the main bus 10. A memory management interface (not shown) may be used. However, since an average of 4 CPU cycles or more is generally required to execute one instruction, the coprocessor interface 80 is used as in the present embodiment from the viewpoint of data transfer speed and efficiency. Is desirable.
[0032]
Further, input / output of pixel data to / from the RPU 14 can be performed by at least one channel of DMA. By using the DMA controller 24, the CPU 17 is not subjected to the load of the pixel data transfer process to the RPU 14, so that the processing speed of the adaptive image processing can be improved. The image pickup sensor 12 is divided into two types: a type that does not permit interruption and resumption of the progress of image reading and a type that permits interruption and resumption of the progress of image reading.
[0033]
When the image pickup sensor 12 is configured by a normal IT-CCD or the like that does not permit interruption and resumption of image reading progress, when the adaptive image processing by the CPU 17 is not completed during one clock time of the RPU 14, As described above, the original image data output from the analog signal processing circuit 13 needs to be once transferred and stored in the buffer area of the main memory 26. In such a case, during a period when adaptive image processing is not performed, the DMA controller 24 uses one channel for the operation of DMA-transferring the original image data stored in the buffer area to the RPU 14, and the processing data output from the RPU 14 is mainly used. Since one channel is used for the DMA transfer operation to the other buffer area of the memory 26, a total of two channels are required. On the other hand, during the period of adaptive image processing, the operation of the RPU 14 is temporarily suspended by switching the level of the PC control signal to the L level, and at the same time, the DMA controller 24 is controlled to temporarily suspend the DMA transfer operation. . Then, after the adaptive image processing ends, the operation of the RPU 14 and the DMA transfer operation are resumed. Actually, a FIFO buffer (not shown) is provided in the data input unit of the RPU 14 to which pixel data transferred by DMA transfer and the data output unit of the RPU 14 to output pixel data transferred by DMA transfer. Yes. For this reason, the timing of DMA transfer depends on the buffering action of the FIFO buffer, but at least the data input / output request from the RPU 14 to the FIFO buffer is generated while the PC control signal is at the L level. do not do.
[0034]
When the image pickup sensor 12 is composed of an FT-CCD or a CMOS that can permit interruption and resumption of image reading progress, the original image data output from the analog signal processing circuit 13 is temporarily buffered in the main memory 26. There is no need to transfer it to the area, and the original image data can be transferred directly to the RPU 14. For this reason, during a period when adaptive image processing is not performed, the DMA controller 24 only needs to use one channel for the operation of DMA-transferring the processing data output from the RPU 14 to the buffer area of the main memory 26. Also, during the period of adaptive image processing, the operation of the RPU 14 is temporarily suspended by switching the level of the PC control signal to the L level, and at the same time, the DMA controller 24 is controlled to temporarily suspend the DMA transfer operation. . Then, after the adaptive image processing ends, the operation of the RPU 14 and the DMA transfer operation are resumed.
[0035]
The input data register group 50A includes 25 registers 51, 51,... For storing pixel data inputted in a dot-sequential manner for 5 pixels in the horizontal direction and 5 pixels in the vertical direction. ,... Are connected in series via line memories 52A, 52B, 52C, 52D. .. And the line memories 52A to 52D are sequentially moved by applying the pixel clock CLK, and the pixel data of a desired local region of 5 × 5 pixels in the image data is transferred to the register group 50A. Can be stored and retained. The pixel data in the local area stored in the input data register group 50A is selectively fetched and processed by the arithmetic circuits 53 to 58 and then stored in the intermediate data register group 50B. Among these arithmetic circuits 53 to 58, the linear arithmetic circuit 53 can calculate five types of interpolation values by linear calculation for the central pixel (hereinafter referred to as a target pixel) of the local region. The first interpolation value is an average value C of all pixel data in the local region.allAnd stored in the register 60a. That is, if the pixel value in the local region is expressed by R [i, j] (i, j is an integer of 0 to 4, i is a row number, j is a column number) as shown in FIG. The pixel value is R [2,2] and Call= (R [0,0] + R [0,1] +... + R [4,3] + R [4,4]) / 25. The second to fifth interpolation values C1~ CFourIs an average value using only the same color components and is stored in the registers 60b to 60e, respectively. In the present embodiment, four types of interpolation values (average values) can be calculated so as to correspond to the four color components. For example, when the pixel data of the color array shown in FIG. 3 is held in the register group 50A and the target pixel data is set to the G component, the color components insufficient for the target pixel are the R component and the B component. The pixel value R [2,2] is selectively read out and the interpolation value C is directly used.1Pixel values R [2,1] and R [2,3] are selectively read out to obtain an R component (interpolated value) C2And pixel values R [1,2] and R [3,2] are selectively read out to obtain a B component (interpolated value) CThreeIs calculated. In this way, it is possible to interpolate the three color components corresponding to each pixel. The interpolated values described above can be returned to any register in the register group 50A to 50C after being moved to the register of the CPU 17 via the coprocessor interface 80 and subjected to adaptive image processing. For example, the CPU 17 calculates the average value CallCompared with other interpolation value C1, C2, CThree, CFourWhen it is determined that any one of the luminance value distributions is biased, the CPU 17 can correct the interpolation value (adaptive image processing) according to the data base or the like and then return it to the registers 60b to 60e.
[0036]
In addition, the color component ratio calculation circuit 54 includes each color component C stored in the registers 60b to 60e.1, C2, CThree, CFourIs used to calculate a ratio between a color component serving as a reference and other color components, and output and hold the ratio in registers 61a to 61c. For example, the reference color component C1And other color components C2, CThree, CFourThe ratio to is C2/ C1, CThree/ C1And CFour/ C1Is calculated by
[0037]
The high frequency component calculation circuit 55 has a function of calculating a high frequency component obtained by subtracting the average value (low frequency component) of each color component from the pixel value of interest, and outputting and holding the high frequency component in the registers 62a to 62e. The high-frequency component calculation circuit 55 can calculate five types of high-frequency components in all directions, the horizontal direction, the vertical direction, and the diagonal direction. For example, high frequency component (deviation) H in all directionsallIs Hall= R [2,2] -CallIt can be calculated by the following equation. Horizontal high-frequency component (deviation) HHIs a value obtained by subtracting an average value of five pixel values in the horizontal direction from the pixel value.H= R [2,2]-(R [2,0] + R [2,1] + R [2,2] + R [2,3] + R [2,4]) / 5. Also, the high frequency component (deviation) H in the vertical directionVIs a value obtained by subtracting an average value of five pixel values in the vertical direction from the pixel value.V= R [2,2]-(R [0,2] + R [1,2] + R [2,2] + R [3,2] + R [4,2]) / 5. And the high frequency component (deviation) H in the diagonal directionDIs a value obtained by subtracting an average value of five pixel values in the diagonal direction from the upper left to the lower right or from the upper right to the lower left.D= R [2,2]-(R [0,0] + R [1,1] + R [2,2] + R [3,3] + R [4,4]) / 5 or HD= R [2,2]-(R [0,4] + R [1,3] + R [2,2] + R [3,1] + R [4,0]) / 5.
[0038]
The distributed arithmetic circuit 56 has a function of reading out the high frequency components stored in the registers 62a to 62e, calculating the square of each high frequency component as a distribution amount, and outputting and holding them in the registers 63a to 63e. Variance in all directions VallIs Vall= Hall 2, And is stored in the register 63a. Also, the horizontal, vertical and diagonal variances are respectively VH= HH 2, VV= HV 2And VD= HD 2, And is stored in the registers 62b to 62e. Note that other statistics such as standard deviation may be calculated instead of obtaining the variance.
[0039]
The values calculated by the color component ratio calculation circuit 54, the high frequency component calculation circuit 55, and the dispersion calculation circuit 56 are moved from the register to the register in the CPU 17 via the coprocessor interface 80, and the CPU 17 performs the above adaptation. It can be used when performing mold image processing. For this reason, when the CPU 17 performs fine adjustment such as white balance on the interpolated values stored in the registers 60b to 60e, the calculation time such as the high frequency component and the amount of dispersion can be saved, and adaptive image processing is performed. It can be executed at high speed.
[0040]
Next, the spatial filter circuit 57 applies a spatial filter (weight mask) to the 5 × 5 pixel local region of the image data, and weights the pixel data with the coefficient value assigned to each pixel in the local region. It has a function of executing a product-sum operation of (multiplication) and addition. FIG. 7 is a schematic diagram illustrating an example of the coefficient table 73 of the spatial filter circuit 57. The coefficient table 73 stores coefficient values K [0,0], K [0,1],..., K [4,4] corresponding to each pixel data held in the input data register group 50A. Yes. The output pixel value O [i, j] for the target pixel value G [i, j] (= R [2,2]) in the i-th row and j-th column (i, j: integer) of the image data is expressed by the following equation (1). And is stored in the register 64.
[0041]
[Expression 1]
Figure 0004677582
[0042]
The spatial filter circuit 57 can add a predetermined correction value to the output pixel value O [i, j] of the above equation (1), and divide the output pixel value O [i, j] by the power of 2 value. And arithmetic shifts. Further, the CPU 17 can take in the output pixel value of the spatial filter circuit 57 and perform adaptive image processing.
[0043]
The spatial filter circuit 57 preferably includes a plurality of coefficient value tables. FIG. 8 is a schematic diagram showing a spatial filter circuit 57 including a first coefficient table 73A and a second coefficient table 73B. The spatial filter circuit 57 uses a selector 74 for selecting one of the first and second coefficient tables 73A and 73B by an FS (Filter Select) control signal from the CPU 17, and a coefficient value read through the selector 74. And a spatial filtering operation circuit 75 for executing the product-sum operation. For example, by writing coefficient values with the first coefficient table 73A for calculating high frequency components and the second coefficient table 73B for calculating low frequency components, both high frequency components and low frequency components are obtained. Can do. In addition, preparing a plurality of coefficient tables leads to an increase in processing speed. For example, when only one coefficient table is prepared, for processing of one pixel data, several CPU steps for writing a coefficient value for calculating a high frequency component in the coefficient table, for reading the coefficient value One CPU step, several CPU steps are required to write and update the coefficient value for calculating the low frequency component in the coefficient table, and one CPU step is required to read the coefficient value, and the processing time tends to be long. On the other hand, when two coefficient tables 73A and 73B are prepared, if the coefficient values for high frequency component calculation and low frequency component calculation are written in the respective tables, the selector 74 is used for processing one pixel data. 1 CPU step for switching control, 1 CPU step for reading the coefficient value for high frequency component calculation, and 1 CPU step for reading the coefficient value for low frequency component calculation are required, but only one coefficient table is prepared. It can be seen that the processing time can be significantly shortened compared to the case where it is not.
[0044]
Next, the rearrangement calculation circuit 58 has a function of rearranging the pixel data read from the input data / register group 50 </ b> A in descending order or ascending order, and outputting and holding them in the register 65. For example, the CPU 17 takes in the pixel data held in the register 65 via the coprocessor interface 80 and performs median interpolation using the median value of the rearranged pixel data as the pixel value of the pixel of interest, After performing adaptive image processing such as interpolation for selecting and averaging a plurality of pixel data in the vicinity of the value, the data can be returned to the register 65.
[0045]
The pixel data calculated by the various arithmetic circuits 53 to 58 is read out from the intermediate data register group 50B to the interpolation combination circuit 59. The interpolation combination circuit 59 interpolates three or four color components using the pixel data read from the register group 50B, and then outputs and holds each of the color components to the registers 66a, 66b, 66c, and 66d. The interpolation combination circuit 59 may read the color components (interpolation values) held in the registers 60b, 60c, 60d, and 60e of the intermediate data register group 50B as they are and output them to the registers 66a to 66d.
[0046]
Next, the first gamma correction circuits 70A, 70B, 70C, and 70D perform gamma correction using the LUT on the pixel data transmitted from the registers 66a, 66b, 66c, and 66d of the interpolation data register group 50C, respectively. Each correction data is output to and held in the registers 71a, 71b, 71c, 71d. The pixel data held in the registers 71a to 71d is output to the color space conversion / color suppression processing unit 42 shown in FIG.
[0047]
According to the image processing apparatus according to the above-described embodiment, the CPU 17 takes in pixel data being input to the RPU 14 and being processed in real time through the coprocessor interface 80, and after performing adaptive image processing, The real time processing can be continued by returning to the RPU 14. Therefore, it is possible to efficiently execute composite processing combining hardware processing in the RPU 14 and software processing (adaptive image processing) in the CPU 17, and the processing speed can be greatly improved.
[0048]
【The invention's effect】
  As described above, claim 1 of the present invention.~ 3According to the image processing apparatus, the microprocessor can read and write image data by directly accessing the register of the image processing unit through the interface. Therefore, software processing (adaptive image processing) is performed on the image data in the middle of the hardware processing by the image processing unit by the microprocessor, and the hardware processing is continued by returning the software processed image data to the image processing unit. It becomes possible to make it. Therefore, the combined processing of hardware processing and software processing can be performed very efficiently, and the processing speed can be greatly improved.
[0049]
  And claims4Accordingly, since the microprocessor is not subjected to the data transfer processing load during the period of DMA transfer of the image data to the image processing unit, the adaptive image processing can be performed exclusively. For this reason, it is possible to further improve the processing speed of the adaptive image processing.
[0050]
  And claims5Therefore, it is possible to reliably prevent the stored contents of the register from being updated during the adaptive image processing.
[0051]
  And claims6According to the above, it is possible to reliably prevent the stored contents of the register from being updated during the adaptive image processing, and to execute the adaptive image processing without impairing the real-time property of the hardware processing in the image processing unit. It becomes possible.
[0052]
  And claims1-3Accordingly, the adaptive image processing can be performed on the pixel data in the middle of the pixel interpolation processing by the microprocessor. In addition, it is possible to perform adaptive image processing using a register used in pixel interpolation processing and an operation result held in the register.
[0053]
  And claims1, 2Therefore, since the microprocessor can execute adaptive image processing using the two types of average values calculated by the linear arithmetic circuit, the calculation time of the average value can be saved and the speed of the adaptive image processing can be saved. Can be improved.
[0054]
  And claims1Therefore, since the microprocessor can perform adaptive image processing such as fine adjustment of white balance using the color component ratio calculated by the color component ratio calculation circuit, the calculation time of the color component ratio is saved. The speed of adaptive image processing can be improved.
[0055]
  And claims2Therefore, the microprocessor can execute adaptive image processing such as fine adjustment of white balance using the deviation (high-frequency component) calculated by the high-frequency component calculation circuit. The speed of the adaptive image processing can be improved.
[0056]
  And claims3According to the present invention, the microprocessor can perform adaptive image processing such as median (median) interpolation using the pixel data rearranged in ascending or descending order by the rearrangement arithmetic circuit. Time can be saved and the speed of adaptive image processing can be improved.
[0057]
  And claims7According to the above, the microprocessor can read out the product-sum operation result executed by the spatial filtering from the register and execute the adaptive image processing, and can improve the speed of the adaptive image processing.
[0058]
  And claims8According to the method, when executing multiple types of spatial filtering, the number of times of updating the coefficient values in the coefficient table is reduced compared to the case where only one type of coefficient table is prepared, thereby greatly reducing the processing time. It becomes possible to do.
[0059]
  And claims9According to the above, since the pixel data movement instruction between the registers by the coprocessor interface can be executed in one CPU cycle, the combined processing speed of the hardware processing in the image processing unit and the software processing in the microprocessor can be further improved. .
[Brief description of the drawings]
FIG. 1 is a functional block diagram showing an overall configuration of a digital still camera equipped with an image processing apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram showing an RPU constituting the image processing apparatus according to the embodiment of the present invention.
FIG. 3 is a schematic diagram showing a three primary color filter arrangement.
FIG. 4 is a schematic diagram showing a complementary color filter arrangement.
FIG. 5 is a block diagram illustrating an outline of a pixel interpolation / gamma correction processing unit constituting the image processing apparatus according to the embodiment;
FIG. 6 is a schematic diagram showing pixel values in a local region.
FIG. 7 is a schematic diagram showing a coefficient table of a spatial filter circuit constituting the image processing apparatus according to the embodiment.
FIG. 8 is a schematic diagram showing a spatial filter circuit including two types of coefficient tables.
[Explanation of symbols]
1 Digital still camera
10 Main bus
14 RPU
17 CPU
26 Main memory
41 Pixel interpolation / gamma correction processing section
50 space registers
50A-50C input data register group
52A-50D line memory
53-58 arithmetic circuit
59 Interpolation combinational circuit
70A-70D gamma correction circuit
73, 73A, 73B Coefficient table
74 Selector
75 Spatial filtering operation circuit
80 coprocessor interface

Claims (9)

ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、
前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、
前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え
前記画像処理部は、
入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、
当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、
前記画素補間回路は、
前記2次元局所領域内の全画素データの平均値または前記2次元局所領域内の各色成分毎の平均値を算出し、前記各平均値を第2の前記レジスタに保持させる線形演算回路と、
前記画素補間回路は、前記2次元局所領域内の前記各色成分毎の平均値を特定の色成分の平均値で除算した色成分比率を算出し、該色成分比率を第3の前記レジスタに保持させる色成分比演算回路と、を備える、
ことを特徴とする画像処理装置。
An image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor that executes adaptive image processing based on a predetermined program,
The image processing unit includes a register that holds image data being processed in the processing performed by the image processing unit ,
The microprocessor includes an interface for directly accessing and reading out the image data held in the register, and directly returning the image data subjected to the adaptive image processing to the register ,
The image processing unit
A first register for holding pixel data of a predetermined two-dimensional local region of image data to be input;
A pixel interpolation circuit that performs pixel interpolation using the pixel data held in the first register,
The pixel interpolation circuit includes:
A linear arithmetic circuit that calculates an average value of all pixel data in the two-dimensional local region or an average value for each color component in the two-dimensional local region, and holds the average value in the second register;
The pixel interpolation circuit calculates a color component ratio obtained by dividing the average value for each color component in the two-dimensional local region by the average value of a specific color component, and holds the color component ratio in the third register and the color component ratio calculation circuit for, Ru provided with,
An image processing apparatus.
ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、
前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、
前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え、
前記画像処理部は、
入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、
当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、
前記画素補間回路は、
前記2次元局所領域内の全画素データの平均値または前記2次元局所領域内の各色成分毎の平均値を算出し、前記各平均値を第2の前記レジスタに保持させる線形演算回路と、
前記2次元局所領域内の所定の注目画素の画素データと前記平均値との偏差(高域成分)を算出し、該偏差を第4の前記レジスタに保持させる高域成分演算回路と、を備える、
ことを特徴とする画像処理装置。
An image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor that executes adaptive image processing based on a predetermined program,
The image processing unit includes a register that holds image data being processed in the processing performed by the image processing unit,
The microprocessor includes an interface for directly accessing and reading out the image data held in the register, and directly returning the image data subjected to the adaptive image processing to the register,
The image processing unit
A first register for holding pixel data of a predetermined two-dimensional local region of image data to be input;
A pixel interpolation circuit that performs pixel interpolation using the pixel data held in the first register,
The pixel interpolation circuit includes:
A linear arithmetic circuit that calculates an average value of all pixel data in the two-dimensional local region or an average value for each color component in the two-dimensional local region, and holds the average value in the second register;
A high-frequency component calculation circuit that calculates a deviation (high-frequency component) between pixel data of a predetermined pixel of interest in the two-dimensional local region and the average value, and holds the deviation in a fourth register ,
An image processing apparatus.
ハードウェアで構成される画像処理部と、所定のプログラムに基づいた適応型画像処理を実行するマイクロ・プロセッサと、を備えた画像処理装置であって、
前記画像処理部は、当該画像処理部により行う処理における、処理途中の画像データを保持するレジスタを備え、
前記マイクロ・プロセッサは、前記レジスタに保持された画像データを当該レジスタに直接アクセスして読出し、且つ、前記適応型画像処理を施した画像データを当該レジスタに直接アクセスして戻すインターフェースを備え、
前記画像処理部は、
入力する画像データの所定の2次元局所領域の画素データを保持する第1の前記レジスタと、
当該第1のレジスタに保持された前記画素データを用いた画素補間を実行する画素補間回路と、を備え、
前記画素補間回路は、前記2次元局所領域内の任意の画素データを昇順または降順に並べ替え、第5の前記レジスタに保持させる並べ替え演算回路を備える、
ことを特徴とする画像処理装置。
An image processing apparatus comprising: an image processing unit configured by hardware; and a microprocessor that executes adaptive image processing based on a predetermined program,
The image processing unit includes a register that holds image data being processed in the processing performed by the image processing unit,
The microprocessor includes an interface for directly accessing and reading out the image data held in the register, and directly returning the image data subjected to the adaptive image processing to the register,
The image processing unit
A first register for holding pixel data of a predetermined two-dimensional local region of image data to be input;
A pixel interpolation circuit that performs pixel interpolation using the pixel data held in the first register,
The pixel interpolation circuit includes a rearrangement arithmetic circuit that rearranges arbitrary pixel data in the two-dimensional local region in ascending order or descending order and holds the data in a fifth register.
An image processing apparatus.
請求項1〜3の何れか1項に記載の画像処理装置であって、前記画像処理部に対する画像データの入出力は少なくとも1チャンネルのDMA(ダイレクト・メモリ・アクセス)で実行される、画像処理装置。 4. The image processing apparatus according to claim 1, wherein input / output of image data to / from the image processing unit is executed by at least one channel of DMA (Direct Memory Access). apparatus. 請求項1〜4の何れか1項に記載の画像処理装置であって、前記マイクロ・プロセッサの処理速度が前記画像処理部の処理速度と同程度もしくは当該処理速度よりも低い場合に、少なくとも、前記マイクロ・プロセッサで前記適応型画像処理を実行する期間は、前記レジスタに同一の画像データを保持させ、且つ、前記画像処理部における処理を一時中断させる、画像処理装置。 5. The image processing apparatus according to claim 1, wherein when the processing speed of the microprocessor is the same as or lower than the processing speed of the image processing unit, An image processing apparatus in which the same image data is held in the register and processing in the image processing unit is temporarily suspended during a period in which the adaptive image processing is executed by the microprocessor . 請求項1〜4の何れか1項に記載の画像処理装置であって、少なくとも、前記マイクロ・プロセッサで前記適応型画像処理を実行する期間に前記レジスタが同一の画像データを保持するように、前記マイクロ・プロセッサの処理速度が前記画像処理部の処理速度よりも高く設定される、画像処理装置。 5. The image processing apparatus according to claim 1, wherein the register holds the same image data at least during a period in which the adaptive image processing is executed by the microprocessor. An image processing apparatus , wherein a processing speed of the microprocessor is set higher than a processing speed of the image processing unit. 請求項1〜6の何れか1項に記載の画像処理装置であって、前記画素補間回路は、前記2次元局所領域内の画素データの各々に所定の係数値を乗算して加算する空間フィルタリングを実行し、第6の前記レジスタに保持させる空間フィルタ回路を備える、画像処理装置。 The image processing device according to claim 1, wherein the pixel interpolation circuit multiplies each pixel data in the two-dimensional local region by a predetermined coefficient value and adds the resultant data. And a spatial filter circuit that is held in the sixth register . 請求項7記載の画像処理装置であって、前記空間フィルタ回路は、前記各画素データに対応する係数値を記憶した複数種類の係数テーブルと、該係数テーブルを切り換えるセレクタと、を備える、画像処理装置。 8. The image processing device according to claim 7, wherein the spatial filter circuit includes a plurality of types of coefficient tables storing coefficient values corresponding to the pixel data, and a selector that switches the coefficient tables. apparatus. 請求項1〜8の何れか1項に記載の画像処理装置であって、前記インターフェースとしてコプロセッサ・インターフェースを用いる、画像処理装置。 The image processing apparatus according to claim 1, wherein a coprocessor interface is used as the interface .
JP2001174080A 2001-06-08 2001-06-08 Image processing device Expired - Fee Related JP4677582B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001174080A JP4677582B2 (en) 2001-06-08 2001-06-08 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001174080A JP4677582B2 (en) 2001-06-08 2001-06-08 Image processing device

Publications (2)

Publication Number Publication Date
JP2002366946A JP2002366946A (en) 2002-12-20
JP4677582B2 true JP4677582B2 (en) 2011-04-27

Family

ID=19015418

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001174080A Expired - Fee Related JP4677582B2 (en) 2001-06-08 2001-06-08 Image processing device

Country Status (1)

Country Link
JP (1) JP4677582B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5469197B2 (en) * 2012-05-09 2014-04-09 株式会社メガチップス Image processing system and imaging apparatus
CN114244969B (en) * 2021-12-21 2024-03-15 上海集成电路装备材料产业创新中心有限公司 Image brightness correction method and hardware system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0388490A (en) * 1989-08-30 1991-04-12 Mitsubishi Electric Corp Processor module for picture processor
JPH06164413A (en) * 1992-11-20 1994-06-10 Ricoh Co Ltd Method for constituting arithmetic sign encoding device and decoding device
JP3578878B2 (en) * 1996-11-22 2004-10-20 大日本スクリーン製造株式会社 Image processing device
JPH11355580A (en) * 1998-06-08 1999-12-24 Nec Corp Mtf correcting circuit and image processor
US6321329B1 (en) * 1999-05-19 2001-11-20 Arm Limited Executing debug instructions
JP2001101393A (en) * 1999-09-28 2001-04-13 Advantest Corp Data processor and method for data processing and recording medium with data processing program recorded thereon
JP2001061071A (en) * 2000-01-01 2001-03-06 Olympus Optical Co Ltd Image correction device and image correction method

Also Published As

Publication number Publication date
JP2002366946A (en) 2002-12-20

Similar Documents

Publication Publication Date Title
JP3532781B2 (en) Image processing circuit of image input device
US7034868B2 (en) Image processing circuit
JP3753385B2 (en) Full color image adaptive interpolator using luminance gradation
US6778216B1 (en) Method and apparatus for digital camera real-time image correction in preview mode
KR100580911B1 (en) Image synthesis method and image pickup apparatus
CN102224736A (en) camera device
CN101505368A (en) Progressive-to-interlace conversion method, image processing apparatus, and imaging apparatus
CN100361508C (en) Signal reconstruction method including input image signal dynamic range control
JP2007174117A (en) Image processing circuit and image processing method
JP4077161B2 (en) Imaging apparatus, luminance correction method, and program for executing the method on a computer
JP4677582B2 (en) Image processing device
JP4051780B2 (en) Image pickup device driving method and image pickup apparatus
JP4412446B2 (en) Resolution conversion method and resolution conversion apparatus
JP4279562B2 (en) Control method for solid-state imaging device
JP3777861B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
JP3983500B2 (en) Data conversion circuit and digital camera
US9013626B2 (en) Signal processing circuit of solid-state imaging element, signal processing method of solid-state imaging element, and electronic apparatus
JP4260769B2 (en) Image processing circuit
JP4307862B2 (en) Signal processing method, signal processing circuit, and imaging apparatus
JP3696536B2 (en) Data conversion circuit
JP3748446B2 (en) Image processing circuit of image input device
JP4249152B2 (en) Image processing circuit
JP3810699B2 (en) Resolution conversion device and imaging device
JP4522640B2 (en) Data transfer system and data transfer method
JP2004153848A (en) Image processing circuit of image input device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080508

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080508

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100921

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101117

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4677582

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140210

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees