JP2004248048A - Device and program for generating video - Google Patents

Device and program for generating video Download PDF

Info

Publication number
JP2004248048A
JP2004248048A JP2003036806A JP2003036806A JP2004248048A JP 2004248048 A JP2004248048 A JP 2004248048A JP 2003036806 A JP2003036806 A JP 2003036806A JP 2003036806 A JP2003036806 A JP 2003036806A JP 2004248048 A JP2004248048 A JP 2004248048A
Authority
JP
Japan
Prior art keywords
interpolation processing
color interpolation
color
difference
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003036806A
Other languages
Japanese (ja)
Other versions
JP4137663B2 (en
Inventor
Satoru Okamoto
悟 岡本
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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2003036806A priority Critical patent/JP4137663B2/en
Publication of JP2004248048A publication Critical patent/JP2004248048A/en
Application granted granted Critical
Publication of JP4137663B2 publication Critical patent/JP4137663B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a video generating device and a video generation program which are capable of generating video of high image quality with pseudo color and a pseudo signal suppressed even though there is a level difference in color and brightness in the vertical direction. <P>SOLUTION: All RGB data are read from an image pickup element in a single horizontal transfer in the order of "RGBGRGBG...,". A color interpolation processing part performs either one-line color interpolation processing that uses data read in the single horizontal transfer or two-line color interpolation processing that uses data read in two horizontal transfers. In a resolution priority mode, if there is a brightness (Y) boundary in the vertical direction, the one-line interpolation processing is selected, and if there is a color boundary in the vertical direction, the two-line color interpolation processing is selected. Meanwhile, in a pseudo color reduction priority mode or an unset mode, if there is a color boundary, the two-line color interpolation processing is selected, and in the other modes, the one-line interpolation processing is selected. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、偽信号や偽色を抑えて高画質な映像を生成する映像生成装置および映像生成プログラムに関する。
【0002】
【従来の技術】
従来の撮像素子の1つに、光電変換を行う複数の受光部が同一の配列ピッチで、かつ、互いに配列ピッチの1/2だけ行方向および列方向にずれた位置に配列されたものがある。このような配列(「ハニカム配列」という。)の撮像素子上には、図5に示すように、隣り合う行で各受光部の位置に合わせて、G(緑)のフィルタ並びにR(赤)およびB(青)が交互に並んだフィルタから構成されたカラーフィルタが例えば設けられている。当該ハニカム配列の撮像素子からは、1回の水平転送で「RGBGRGBG…」の順にRGBの全データを読み出すことができる。
【0003】
上記撮像素子を用いて動画撮影を行う場合、1回の水平転送で読み出されたRGBのデータ(1ラインの入力データ)を用いて色補間処理を行うことがある。例えば、1回の水平転送で「R,G,B,G,R,G,B,G」の入力データが得られた際、各画素データに対して以下に示す色補間データr,g,bを生成する。
【0004】
<入力データ>
, Gk+1, Bk+2, Gk+3, Rk+4, Gk+5, Bk+6, Gk+7
<色補間データ>
, rn+1, rn+2, rn+3
, gn+1, gn+2, gn+3
, bn+1, bn+2, bn+3
(n=k,k+4,k+8…)
但し、
画素データRの色補間データはr,g,b
画素データGk+1の色補間データはrk+1,gk+1,bk+1
画素データBk+2の色補間データはrk+2,gk+2,bk+2
画素データGk+3の色補間データはrk+3,gk+3,bk+3
である。
【0005】
なお、
=R
k+1=(3R+Rk+4)/4
k+2=(R+Rk+4)/2
k+3=(R+3Rk+4)/4
=(Gk−1+Gk+1)/2
k+1=(Gk−1+2Gk+1+Gk+3)/4
k+2=(Gk+1+Gk+3)/2
k+3=(Gk+1+2Gk+3+Gk+5)/4
=(Bk−2+Bk+2)/2
k+1=(Rk−2+3Rk+2)/4
k+2=Bk+2
k+3=(3Rk+2+Rk+6)/4
【0006】
【特許文献1】
特開2002−199411号公報
【0007】
【発明が解決しようとする課題】
しかしながら、垂直方向に色や輝度のレベル差がある映像に対して、1回の水平転送で読み出されたRGBのデータ(1ラインの入力データ)を用いた色補間処理を行うと、RGラインとGラインの境界部でRGBの色レベルや輝度レベルが異なるために偽色や偽信号の発生が避けられないという問題点があった。
【0008】
本発明は、上記従来の問題点に鑑みてなされたものであって、垂直方向に色や輝度のレベル差があっても偽色や偽信号を抑えた高画質な映像を生成することのできる映像生成装置および映像生成プログラムを提供することを目的としている。
【0009】
【課題を解決するための手段】
上記目的を達成するために、本発明に係る映像生成装置は、1回の水平転送でRGBの全データを出力する撮像手段と、前記撮像手段から出力された各画素データに対して所定の色補間処理を行う色補間処理手段と、前記色補間処理手段で色補間処理された各画素データをYC変換するYC変換手段と、前記撮像手段による撮像領域の垂直方向に隣接した2ライン間の色差レベル差を所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、1回の水平転送で前記撮像手段から出力された画素データを用いた1ライン色補間処理および2回の水平転送で前記撮像手段から出力された画素データを用いた2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する色補間処理方法決定手段と、前記色補間処理方法決定手段によって決定された色補間処理およびYC変換が行われたデータから映像を生成する。
【0010】
このように、2ライン間の色差レベル差に従って1ライン色補間処理または2ライン色補間処理を行っている。2ライン色補間処理では2ラインの画素データを用いて色補間を行うため、垂直方向に輝度や色のレベル差があってもエッジの偽色や偽信号を低減することができる。結果として、垂直方向に色差のレベル差があっても偽色を抑えた高画質な映像を生成することができる。
【0011】
また、本発明に係る映像生成装置は、前記色補間処理方法決定手段は、前記2ライン間の色差レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均色差レベル差を色差所定値と比較し、前記平均色差レベル差が前記色差所定値以上であれば前記2ライン色補間処理を行うよう決定し、前記平均色差レベル差が前記色差所定値未満であれば前記1ライン色補間処理を行うよう決定する。したがって、2ライン間の色差レベル差が大きければ2ライン色補間処理が行われるため、偽色を抑えた映像を生成することができる。
【0012】
また、本発明に係る映像生成装置は、前記色補間処理方法決定手段は、前記2ライン間の色差レベル差を前記所定領域分累積した結果および前記2ライン間の輝度レベル差を前記所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、前記1ライン色補間処理および前記2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する。
【0013】
このように、2ライン間の色差レベルおよび輝度レベル差の双方に従って1ライン色補間処理または2ライン色補間処理を行っている。したがって、垂直方向に色差または輝度のレベル差があっても偽色または偽信号を抑えた高画質な映像を生成することができる。
【0014】
また、本発明に係る映像生成装置は、前記色補間処理方法決定手段は、前記2ライン間の輝度レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均輝度レベル差を輝度所定値と比較し、前記平均輝度レベル差が前記輝度所定値以上であれば前記1ライン色補間処理を行うよう決定し、前記平均輝度レベル差が前記輝度所定値未満であれば前記色差レベル差と前記色差所定値との比較を行うことが望ましい。
【0015】
また、本発明に係る映像生成装置は、前記所定領域は、前記撮像手段による撮像領域の水平方向の1ライン、複数ラインまたは1フレームを構成する全ライン分の領域である。したがって、1ライン、複数ラインまたはフレーム毎に1ライン色補間処理を行うか2ライン色補間処理を行うかを選択することができる。
【0016】
また、本発明に係る映像生成プログラムは、コンピュータを、1回の水平転送でRGBの全データを出力する撮像手段から出力された各画素データに対して所定の色補間処理を行う色補間処理手段、前記色補間処理手段で色補間処理された各画素データをYC変換するYC変換手段、前記撮像手段による撮像領域の垂直方向に隣接した2ライン間の色差レベル差を所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、1回の水平転送で前記撮像手段から出力された画素データを用いた1ライン色補間処理および2回の水平転送で前記撮像手段から出力された画素データを用いた2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する色補間処理方法決定手段、として機能させ、前記色補間処理方法決定手段によって決定された色補間処理およびYC変換が行われたデータから映像を生成する。
【0017】
また、本発明に係る映像生成プログラムは、前記色補間処理方法決定手段は、前記2ライン間の色差レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均色差レベル差を色差所定値と比較し、前記平均色差レベル差が前記色差所定値以上であれば前記2ライン色補間処理を行うよう決定し、前記平均色差レベル差が前記色差所定値未満であれば前記1ライン色補間処理を行うよう決定する。
【0018】
また、本発明に係る映像生成プログラムは、前記色補間処理方法決定手段は、前記2ライン間の色差レベル差を前記所定領域分累積した結果および前記2ライン間の輝度レベル差を前記所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、前記1ライン色補間処理および前記2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する。
【0019】
また、本発明に係る映像生成プログラムは、前記色補間処理方法決定手段は、前記2ライン間の輝度レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均輝度レベル差を輝度所定値と比較し、前記平均輝度レベル差が前記輝度所定値以上であれば前記1ライン色補間処理を行うよう決定し、前記平均輝度レベル差が前記輝度所定値未満であれば前記色差レベル差と前記色差所定値との比較を行う。
【0020】
さらに、本発明に係る映像生成プログラムは、前記所定領域は、前記撮像手段による撮像領域の水平方向の1ライン、複数ラインまたは1フレームを構成する全ライン分の領域である。
【0021】
【発明の実施の形態】
以下、本発明に係る映像生成装置の実施の形態について、図面を参照して詳細に説明する。なお、以下の説明では本発明に係る映像生成装置について詳述するが、本発明に係る映像生成プログラムについては、映像生成装置を動作させるためのプログラムであることから、その説明は以下の説明に含まれる。また、本実施形態の映像生成装置は、動画機能を搭載したデジタルカメラ等に設けられているものとして説明する。
【0022】
以下、本実施形態のデジタルカメラの構成について、図1を参照して説明する。図1は、本実施形態のデジタルカメラの概略構成を示すブロック図である。同図に示すように、本実施形態のデジタルカメラは、特許請求の範囲の撮像手段に該当する撮像部1と、アナログ信号処理部2と、A/D変換部3と、映像生成装置に該当するデジタル信号処理部6と、圧縮/伸張処理部7と、表示部8と、システム制御部9と、内部メモリ10と、メディアインタフェース11と、記録メディア12と、操作部13とを備えて構成されている。デジタル信号処理部6、圧縮/伸張処理部7、表示部8、システム制御部9、内部メモリ10およびメディアインタフェース11は、システムバス20に接続されている。
【0023】
撮像部1は、撮影レンズ等の光学系およびCCDイメージセンサ等の撮像素子によって被写体の撮影を行うものであり、アナログの撮像信号を出力する。なお、本実施形態で利用されるCCDイメージセンサ等の撮像素子には、光電変換を行う複数の受光部が同一の配列ピッチで、かつ、互いに配列ピッチの1/2だけ行方向および列方向にずれた位置に配列されている。このような配列(「ハニカム配列」という。)の撮像素子上には、図5に示すように、隣り合う行で各受光部の位置に合わせて、G(緑)のフィルタ並びにR(赤)およびB(青)が交互に並んだフィルタから構成されたカラーフィルタが例えば設けられている。
【0024】
当該カラーフィルタを介して撮像素子に光が入射されると、当該撮像素子からは光に対して蓄積された信号電荷に基づくアナログ電圧信号が出力される。なお、当該ハニカム配列の撮像素子からは、1回の水平転送で「RGBGRGBG…」の順にRGBの全データが出力される。撮像部1から出力された信号はアナログ信号処理部2に送られ、所定のアナログ信号処理が施され、A/D変換部3でデジタル信号に変換された後、デジタル信号処理部6に送られる。
【0025】
デジタル信号処理部6は、A/D変換部4からのデジタルデータに対して、操作部12によって設定された動作モードに応じたデジタル信号処理を行う。デジタル信号処理部6が行う処理には、ホワイトバランス調整処理(ゲイン調整)やガンマ補正処理、色補間処理(同時化処理)、YC変換処理等が含まれる。なお、デジタル信号処理部6は例えばDSPで構成される。
【0026】
圧縮/伸張処理部7は、デジタル信号処理部6で得られたYCデータに対して圧縮処理を施したり、記録メディア12から得られた圧縮画像データに対して伸張処理を施す。また、表示部8は、撮影されデジタル信号処理された画像や動画または記録メディア12に記録された圧縮データを伸張処理して得られた画像や動画を表示する。なお、表示部8は、撮影時のスルー画像やデジタルカメラの各種状態、操作に関する情報の表示等も可能である。
【0027】
内部メモリ10は、例えばDRAMであり、デジタル信号処理部6やシステム処理部9のワークメモリとして利用される他、記録メディアに12に記録される撮影画像データを一時的に記憶するバッファメモリ、表示部8への表示画像データのバッファメモリとしても利用される。また、メディアインタフェース11は、メモリカード等の記録メディア12との間のデータの入出力を行うものである。
【0028】
システム制御部9は、所定のプログラムによって動作するプロセッサを主体に構成され、撮影動作を含むデジタルカメラ全体の制御を行う。また、操作部13は、デジタルカメラ使用時の各種操作を行うもので、デジタルカメラの動作モード(撮影モード、再生モード等)、撮影時の撮影方法、撮影条件、設定等を行う。なお、操作部13には、撮影動作を起動するためのレリーズボタンも含まれる。
【0029】
次に、本実施形態のデジタルカメラが備えるデジタル信号処理部6について、図2を参照して詳細に説明する。図2は、本実施形態のデジタルカメラが備えるデジタル信号処理部6の内部構成を示すブロック図である。なお、デジタル信号処理部6が行うホワイトバランス調整処理およびガンマ補正処理を行うブロックについては説明を省略し、図面(図2)にも記載しない。したがって、以下の説明では、本実施形態における色補間処理(同時化処理)やYC変換処理等についてのみ説明する。
【0030】
図2に示すように、本実施形態のデジタル信号処理部6は、特許請求の範囲の色補間処理手段に該当する色補間処理部101と、YC変換手段に該当するYC変換部103と、色補間処理方法決定手段に該当する色補間処理方法決定部105とを有している。色補間処理部101は、A/D変換部4からのデジタルデータに対して色補間を行うものである。より具体的には、RGBの各画素データに対して色補間データを生成する。
【0031】
なお、撮像素子からは1回の水平転送で「RGBGRGBG…」の順にRGBの全データが読み出されるが、本実施形態の色補間処理部101では、1回の水平転送で読み出されたデータ(1ラインの入力データ)を用いた色補間処理または2回の水平転送で読み出されたデータ(2ラインの入力データ)を用いた色補間処理のいずれかが行われる。以下の説明では、1ラインの入力データを用いた色補間処理を「1ライン色補間処理」といい、2ラインの入力データを用いた色補間処理を「2ライン色補間処理」という。
【0032】
例えば、1回の水平転送で「R,Gk+1,Bk+2,Gk+3,Rk+4,Gk+5,Bk+ ,Gk+7」の入力データが得られた際、1ライン色補間処理では、各画素データに対して以下に示す色補間データr,g,bを生成する。
【0033】
「1ライン色補間処理」
<入力データ>
, Gk+1, Bk+2, Gk+3, Rk+4, Gk+5, Bk+6, Gk+7
<色補間データ>
, rn+1, rn+2, rn+3
, gn+1, gn+2, gn+3
, bn+1, bn+2, bn+3
(n=k,k+4,k+8…)
但し、
画素データRの色補間データはr,g,b
画素データGk+1の色補間データはrk+1,gk+1,bk+1
画素データBk+2の色補間データはrk+2,gk+2,bk+2
画素データGk+3の色補間データはrk+3,gk+3,bk+3
である。
【0034】
なお、
=R
k+1=(3R+Rk+4)/4
k+2=(R+Rk+4)/2
k+3=(R+3Rk+4)/4
=(Gk−1+Gk+1)/2
k+1=(Gk−1+2Gk+1+Gk+3)/4
k+2=(Gk+1+Gk+3)/2
k+3=(Gk+1+2Gk+3+Gk+5)/4
=(Bk−2+Bk+2)/2
k+1=(Rk−2+3Rk+2)/4
k+2=Bk+2
k+3=(3Rk+2+Rk+6)/4
【0035】
一方、1回目の水平転送で「Rik,Gik+1,Bik+2,Gik+3,Rik+4,Gik+5,Bik+6,Gik+7」の入力データが得られ、2回目の水平転送で「Bi+1k,Gi+1k+1,Ri+1k+2,Gi+1k+3,Bi+1k+4,Gi+1k+5,Ri+1k+6,Gi+1k+7」の入力データが得られた際、2ライン色補間処理では、1回目の水平転送で得られた各画素データに対して以下に示す色補間データr,g,bを生成する。
【0036】
「2ライン色補間処理」
<入力データ>
ik, Gik+1, Bik+2, Gik+3, Rik+4, Gik+5, Bik+6, Gik+7
i+1k, Gi+1k+1, Ri+1k+2, Gi+1k+3, Bi+1k+4, Gi+1k+5, Ri+1k+6, Gi+1k+7
<色補間データ>
, rn+1, rn+2, rn+3
, gn+1, gn+2, gn+3
, bn+1, bn+2, bn+3
(n=k,k+4,k+8…)
但し、
画素データRikの色補間データはr,g,b
画素データGik+1の色補間データはrk+1,gk+1,bk+1
画素データBik+2の色補間データはrk+2,gk+2,bk+2
画素データGik+3の色補間データはrk+3,gk+3,bk+3
である。
【0037】
なお、
=(Ri+1k−2+2Rik+Ri+1k+2)/4
k+1=(Rik+Ri+1k+2)/2
k+2=(Rik+2Ri+1k+2+Rik+4)/4
k+3=(Ri+1k+2+Rik+4)/2
=(Gik−1+Gik+1)/2
k+1=(Gik−1+2Gik+1+Gik+3)/4
k+2=(Gik+1+Gik+3)/2
k+3=(Gik+1+2Gik+3+Gik+5)/4
=(Bik−2+2Bi+1k+Bik+2)/4
k+1=(Bi+1k+Bik+2)/2
k+2=(Bi+1k+2Bik+2+Bi+1k+4)/4
k+3=(Bik+2+Bi+1k+4)/2
【0038】
なお、上述の2ライン色補間処理では、Bの画素データに対しは1回目の水平転送で読み出されたデータを用いて色補間処理を行っているが、1回目および2回目の水平転送で読み出されたデータ(2ラインの入力データ)を用いて色補間処理を行っても良い。
【0039】
YC変換部103は、色補間処理部101で色補間されたRGBデータを輝度(Y)データおよび色差(C)データに変換するものである。YC変換部103で変換されたデータ(YCデータ)はシステムバス20を介して内部メモリ10に格納された後、RGBデータに変換されて表示部8で表示される。また、同様のYCデータは、色補間処理方法決定部105にも送られる。
【0040】
色補間処理方法決定部105は、撮像部1による撮像領域の垂直方向に隣接した2ライン間の輝度や色差の各レベル差に基づいて、次のフレームに対して色補間処理部101が1ライン色補間処理および2ライン色補間処理のいずれを行うか決定し、色補間処理部101に指示するものである。図3は、色補間処理方法決定部105の内部構成を示すブロック図である。同図に示すように、色補間処理方法決定部105は、ラインメモリ201a,201bと、差分算出部203a,203bと、絶対値算出部205a,205bと、積算部207a,207bと、レジスタ209a,209bと、平均化部211a,211bと、判定処理部213とを有している。
【0041】
なお、ラインメモリ201a、差分算出部203a、絶対値算出部205a、積算部207a、レジスタ209aおよび平均化部211aは、Yデータの垂直方向の勾配(輝度の勾配)を求める部分であり、ラインメモリ201b、差分算出部203b、絶対値算出部205b、積算部207b、レジスタ209bおよび平均化部211bは、Cデータの垂直方向の勾配(色差の勾配)を求める部分である。
【0042】
ラインメモリ201aは、1回の水平転送で得られた各画素データのYデータを記憶するものである。また、差分算出部203aは、ラインメモリ201aに記憶されている各画素データのYデータが示す輝度レベルから次に得られた各画素データのYデータが示す輝度レベルを差し引いて、垂直方向に隣り合うライン間の輝度のレベル差(ΔY)を算出するものである。また、絶対値算出部205aは、差分算出部203aで得られた輝度レベル差(ΔY)の絶対値(|ΔY|)を算出するものである。
【0043】
また、積算部207aは、絶対値算出部205aから得られた輝度レベル差の絶対値をレジスタ209に蓄積された所定ライン数分だけ積算するものである。したがって、積算部207aからは“Σ|ΔY|”で表すことのできる累積輝度レベル差が出力される。また、平均化部211aは、積算部207aから得られた累積輝度レベル差(Σ|ΔY|)を“累積したライン数×1ラインの画素数”によって示される数(x)で割ることにより、一画素当たりの平均輝度レベル差(Σ|ΔY|/x)を求めるものである。
【0044】
一方、ラインメモリ201b、差分算出部203b、絶対値算出部205b、積算部207b、レジスタ209bおよび平均化部211bは、Cデータに対してラインメモリ201a、差分算出部203a、絶対値算出部205a、積算部207a、レジスタ209aおよび平均化部211aと同様の動作を行うことにより、一画素当たりの平均色差レベル差(Σ|ΔC|/x)を求める。
【0045】
なお、積算部207a,207bが何ライン分の輝度レベル差の絶対値(|ΔY|)を積算するかは設定によって可変であり、1ライン分、複数ライン分、1フレームを構成するライン分の中から選択することができる。例えば、2ライン分の輝度レベル差の絶対値を積算する場合、レジスタ209には1ライン分のデータが蓄積され、2ライン毎にリセットされる。
【0046】
このようにして得られた平均輝度レベル差(Σ|ΔY|/x)および平均色差レベル差(Σ|ΔC|/x)は判定処理部213に入力される。判定処理部213は、本実施形態のデジタルカメラがユーザによって「解像度優先モード」、「偽色低減優先モード」および「未設定モード」のいずれが選択されているかに応じて異なる判定を行う。判定処理部213は、平均輝度レベル差“Σ|ΔY|/x”と所定のしきい値“y”を比較したり、平均色差レベル差“Σ|ΔC|/x”と所定のしきい値“c”を比較することにより、各々の大小関係に基づいて、色補間処理部101が1ライン色補間処理および2ライン色補間処理のいずれを行うかを決定し、色補間処理部101に指示している。
【0047】
以下、判定処理部213が行う判定処理について、図4に示すフローチャートを参照して詳しく説明する。図4は、判定処理部213が行う判定処理を説明するフローチャートである。まず、本実施形態のデジタルカメラがどのモードに設定されているかを判別する(ステップS101)。当該ステップS101による判別の結果、解像度優先モードが設定されていればステップS111に進み、偽色低減優先モードまたは未設定モードが設定されていればステップS121に進む。
【0048】
ステップS111では、平均輝度レベル差“Σ|ΔY|/x”と所定のしきい値“y”とを比較する。比較の結果、Σ|ΔY|/x≧yであれば1ライン色補間処理に決定し、Σ|ΔY|/x<yであればステップS113に進む。ステップS113では、平均色差レベル差“Σ|ΔC|/x”と所定のしきい値“c”とを比較する。比較の結果、Σ|ΔC|/x≧cであれば2ライン色補間処理を行うよう決定し、Σ|ΔC|/x<cであれば1ライン色補間処理を行うよう決定する。このように、解像度優先モードでは、垂直方向に輝度境界があれば1ライン色補間処理が選択され、垂直方向に色境界があれば2ライン色補間処理が選択される。
【0049】
一方、ステップS121では、平均色差レベル差“Σ|ΔC|/x”と所定のしきい値“c”とを比較する。比較の結果、Σ|ΔC|/x≧cであればステップS117に進んで2ライン色補間処理を行うよう決定し、Σ|ΔC|/x<cであれば1ライン色補間処理を行うよう決定する。このように、偽色低減優先モードまたは未設定モードでは、垂直方向に色境界があれば2ライン色補間処理が選択され、それ以外は1ライン色補間処理が選択される。
【0050】
判定処理部213は、色補間処理部101に対して、次のフレームの対象とされたラインまたは領域に対して、当該フローチャートによる規則に則って決定された色補間処理を行うよう指示する。すなわち、上記判定処理が1ラインに対して行われれば、次のフレームの該当ラインに対して決定された色補間処理を行うよう指示する。また、上記判定が複数ラインに対して行われれば、次のフレームの該当するラインから構成されるエリアに対して決定された色補間処理を行うよう指示する。さらに、上記判定処理がフレーム全体に対して行われれば、次のフレーム全体に対して決定された色補間処理を行うよう指示する。
【0051】
以上説明したように、本実施形態のデジタルカメラによれば、垂直方向に隣接するライン間の輝度や色差の各レベル差に基づいて、映像を構成する各フレームに対して色補間処理部101が1ライン色補間処理および2ライン色補間処理のいずれを行うかを決定し、色補間処理部101に指示している。1ライン色補間処理では1ラインを構成する画素データを用いて色補間を行うため、垂直方向に輝度や色のレベル差があると映像には偽色や偽信号が発生するという問題点があるが、2ライン色補間処理では2ラインの画素データを用いて色補間を行うため、垂直方向に輝度や色のレベル差があってもエッジの偽色や偽信号を低減することができる。結果として、垂直方向に輝度や色のレベル差がある映像であっても偽色や偽信号を抑えた高画質の映像を生成することができる。
【0052】
また、1ライン色補間処理と2ライン色補間処理のどちらを行うかは、フレームのライン毎、エリア毎またはフレーム全体に対して選択することができる。したがって、所望の領域(1ライン、複数ライン、フレーム全体)毎に1ライン色補間処理を行うか2ライン色補間処理を行うかを選択することができる。
【0053】
【発明の効果】
以上説明したように、本発明に係る映像生成装置および映像生成プログラムによれば、垂直方向に色や輝度のレベル差があっても偽色や偽信号を抑えた高画質な映像を生成することができる。
【図面の簡単な説明】
【図1】本実施形態のデジタルカメラの概略構成を示すブロック図
【図2】本実施形態のデジタルカメラが備えるデジタル信号処理部の内部構成を示すブロック図
【図3】デジタル信号処理部が有する色補間処理方法決定部の内部構成を示すブロック図
【図4】判定処理部が行う判定処理を説明するフローチャート
【図5】ハニカム配列の撮像素子上に設けられたカラーフィルタの配列を示す説明図
【符号の説明】
1 撮像部
2 アナログ信号処理部
3 A/D変換部
6 デジタル信号処理部
7 圧縮/伸張処理部
8 表示部
9 システム制御部
10 内部メモリ
11 メディアインタフェース
12 記録メディア
13 操作部
101 色補間処理部
103 YC変換部
105 色補間処理方法決定部
201a,201b ラインメモリ
203a,203b 差分算出部
205a,205b 絶対値算出部
207a,207b 積算部
209a,209b レジスタ
211a,211b 平均化部
213 判定処理部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a video generation apparatus and a video generation program that generate high-quality video while suppressing false signals and false colors.
[0002]
[Prior art]
One conventional imaging device has a plurality of light receiving portions that perform photoelectric conversion arranged at the same arrangement pitch and at positions shifted in the row direction and the column direction by a half of the arrangement pitch. . As shown in FIG. 5, on the image pickup device having such an arrangement (referred to as “honeycomb arrangement”), a G (green) filter and an R (red) are arranged in accordance with the position of each light receiving unit in adjacent rows. For example, a color filter composed of filters in which B and B (blue) are alternately arranged is provided. All the RGB data can be read out in the order of “RGBGRGBG...” By one horizontal transfer from the image pickup element having the honeycomb arrangement.
[0003]
When moving image shooting is performed using the image sensor, color interpolation processing may be performed using RGB data (one line of input data) read out by one horizontal transfer. For example, in one horizontal transfer, “R0, G1, B2, G3, R4, G5, B6, G7When the input data “is obtained, the color interpolation data r, g, and b shown below are generated for each pixel data.
[0004]
<Input data>
Rk, Gk + 1, Bk + 2, Gk + 3, Rk + 4, Gk + 5, Bk + 6, Gk + 7
<Color interpolation data>
rn, Rn + 1, Rn + 2, Rn + 3
gn, Gn + 1, Gn + 2, Gn + 3
bn, Bn + 1, Bn + 2, Bn + 3
(N = k, k + 4, k + 8 ...)
However,
Pixel data RkThe color interpolation data for is rk, Gk, Bk
Pixel data Gk + 1The color interpolation data for is rk + 1, Gk + 1, Bk + 1
Pixel data Bk + 2The color interpolation data for is rk + 2, Gk + 2, Bk + 2
Pixel data Gk + 3The color interpolation data for is rk + 3, Gk + 3, Bk + 3
It is.
[0005]
In addition,
rk= Rk
rk + 1= (3Rk+ Rk + 4) / 4
rk + 2= (Rk+ Rk + 4) / 2
rk + 3= (Rk+ 3Rk + 4) / 4
gk= (Gk-1+ Gk + 1) / 2
gk + 1= (Gk-1+ 2Gk + 1+ Gk + 3) / 4
gk + 2= (Gk + 1+ Gk + 3) / 2
gk + 3= (Gk + 1+ 2Gk + 3+ Gk + 5) / 4
bk= (Bk-2+ Bk + 2) / 2
bk + 1= (Rk-2+ 3Rk + 2) / 4
bk + 2= Bk + 2
bk + 3= (3Rk + 2+ Rk + 6) / 4
[0006]
[Patent Document 1]
JP 2002-199411 A
[0007]
[Problems to be solved by the invention]
However, when color interpolation processing using RGB data (one line of input data) read out by one horizontal transfer is performed on a video having a difference in level of color and brightness in the vertical direction, the RG line Since the RGB color level and luminance level are different at the boundary between the G line and the G line, there is a problem that generation of false colors and false signals cannot be avoided.
[0008]
The present invention has been made in view of the above-described conventional problems, and can generate a high-quality video in which false colors and false signals are suppressed even when there is a difference in level of color and brightness in the vertical direction. An object is to provide a video generation device and a video generation program.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, an image generation apparatus according to the present invention includes an imaging unit that outputs all RGB data in one horizontal transfer, and a predetermined color for each pixel data output from the imaging unit. Color interpolation processing means for performing interpolation processing, YC conversion means for YC conversion of each pixel data subjected to color interpolation processing by the color interpolation processing means, and a color difference between two lines adjacent in the vertical direction of the imaging region by the imaging means Based on the result of accumulating the level difference for the predetermined area, the color interpolation processing unit uses the pixel data output from the imaging unit in one horizontal transfer for the area corresponding to the predetermined area of the next frame. The one-line color interpolation processing and the two-line color interpolation processing using the pixel data output from the image pickup means in two horizontal transfers are determined, and the color interpolation instructed to the color interpolation processing means is determined. A processing method decision unit, wherein the color interpolation process method determining unit color determined by the interpolation processing and YC conversion to generate a video from the conducted data.
[0010]
Thus, one-line color interpolation processing or two-line color interpolation processing is performed according to the color difference level difference between two lines. In the two-line color interpolation process, color interpolation is performed using pixel data of two lines, so that even if there is a difference in luminance or color level in the vertical direction, the false color or false signal of the edge can be reduced. As a result, even if there is a color difference level difference in the vertical direction, it is possible to generate a high-quality video in which false colors are suppressed.
[0011]
Further, in the video generation device according to the present invention, the color interpolation processing method determination means accumulates the absolute value of the color difference level difference between the two lines for the predetermined area, and averages the number of pixels constituting the predetermined area. The average color difference level difference obtained by the comparison is compared with a predetermined color difference value, and if the average color difference level difference is equal to or greater than the predetermined color difference value, the two-line color interpolation process is determined. If it is less than the predetermined value, it is determined to perform the one-line color interpolation process. Therefore, if the color difference level difference between the two lines is large, the two-line color interpolation process is performed, so that an image with reduced false colors can be generated.
[0012]
Further, in the video generation device according to the present invention, the color interpolation processing method determining means may calculate the result of accumulating the color difference level difference between the two lines for the predetermined area and the luminance level difference between the two lines for the predetermined area. Based on the accumulated result, the color interpolation processing means determines whether to perform the one-line color interpolation process or the two-line color interpolation process for the area corresponding to the predetermined area of the next frame, Instructs the color interpolation processing means.
[0013]
As described above, the one-line color interpolation process or the two-line color interpolation process is performed according to both the color difference level and the luminance level difference between the two lines. Therefore, even when there is a color difference or a luminance level difference in the vertical direction, a high-quality video with suppressed false colors or false signals can be generated.
[0014]
Also, in the video generation device according to the present invention, the color interpolation processing method determination unit accumulates absolute values of luminance level differences between the two lines for the predetermined area, and averages the number of pixels constituting the predetermined area. The average luminance level difference obtained by converting to a predetermined luminance value is determined, and if the average luminance level difference is equal to or larger than the predetermined luminance value, it is determined to perform the one-line color interpolation process. If it is less than the predetermined value, it is desirable to compare the color difference level difference with the color difference predetermined value.
[0015]
In the video generation apparatus according to the present invention, the predetermined area is an area for all lines constituting one line, a plurality of lines, or one frame in the horizontal direction of the imaging area by the imaging means. Therefore, it is possible to select whether to perform one-line color interpolation processing or two-line color interpolation processing for each line, a plurality of lines, or frames.
[0016]
The video generation program according to the present invention is a color interpolation processing unit that performs predetermined color interpolation processing on each pixel data output from an imaging unit that outputs all RGB data in one horizontal transfer. YC conversion means for YC converting each pixel data subjected to color interpolation processing by the color interpolation processing means, and a result obtained by accumulating a color difference level difference between two adjacent lines in the vertical direction of the imaging area by the imaging means for a predetermined area. Based on this, the color interpolation processing means performs one-line color interpolation processing using the pixel data output from the imaging means in one horizontal transfer and two times for an area corresponding to the predetermined area of the next frame. Color interpolation processing method determining means for determining which of two-line color interpolation processing using pixel data output from the imaging means in horizontal transfer is to be performed and instructing the color interpolation processing means To function as, the color interpolation process method determining unit color determined by the interpolation processing and YC conversion to generate a video from the conducted data.
[0017]
Also, in the video generation program according to the present invention, the color interpolation processing method determination means accumulates the absolute value of the color difference level difference between the two lines for the predetermined area, and averages the number of pixels constituting the predetermined area. The average color difference level difference obtained by the comparison is compared with a color difference predetermined value, and if the average color difference level difference is greater than or equal to the color difference predetermined value, it is determined to perform the two-line color interpolation process, and the average color difference level difference is the color difference If it is less than the predetermined value, it is determined to perform the one-line color interpolation process.
[0018]
Further, in the video generation program according to the present invention, the color interpolation processing method determining means may calculate the result of accumulating the color difference level difference between the two lines for the predetermined area and the luminance level difference between the two lines for the predetermined area. Based on the accumulated result, the color interpolation processing means determines whether to perform the one-line color interpolation process or the two-line color interpolation process for the area corresponding to the predetermined area of the next frame, Instructs the color interpolation processing means.
[0019]
Further, in the video generation program according to the present invention, the color interpolation processing method determination unit accumulates absolute values of luminance level differences between the two lines for the predetermined area and averages the number of pixels constituting the predetermined area. The average luminance level difference obtained by converting to a predetermined luminance value is determined, and if the average luminance level difference is equal to or larger than the predetermined luminance value, it is determined to perform the one-line color interpolation process, and the average luminance level difference is the luminance If it is less than a predetermined value, the color difference level difference is compared with the color difference predetermined value.
[0020]
Further, in the video generation program according to the present invention, the predetermined area is an area for all lines constituting one line, a plurality of lines, or one frame in the horizontal direction of the imaging area by the imaging means.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of a video generation apparatus according to the present invention will be described below in detail with reference to the drawings. In the following description, the video generation device according to the present invention will be described in detail. However, since the video generation program according to the present invention is a program for operating the video generation device, the description thereof will be described below. included. The video generation apparatus according to the present embodiment is described as being provided in a digital camera or the like equipped with a moving image function.
[0022]
Hereinafter, the configuration of the digital camera of the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of the digital camera of the present embodiment. As shown in the figure, the digital camera according to the present embodiment corresponds to an imaging unit 1, an analog signal processing unit 2, an A / D conversion unit 3, and a video generation device corresponding to the imaging means in the claims. A digital signal processing unit 6, a compression / decompression processing unit 7, a display unit 8, a system control unit 9, an internal memory 10, a media interface 11, a recording medium 12, and an operation unit 13. Has been. The digital signal processing unit 6, compression / decompression processing unit 7, display unit 8, system control unit 9, internal memory 10 and media interface 11 are connected to a system bus 20.
[0023]
The imaging unit 1 captures a subject with an optical system such as a photographing lens and an imaging element such as a CCD image sensor, and outputs an analog imaging signal. Note that in the imaging device such as a CCD image sensor used in the present embodiment, a plurality of light receiving portions that perform photoelectric conversion have the same arrangement pitch and are ½ the arrangement pitch in the row direction and the column direction. They are arranged at shifted positions. As shown in FIG. 5, on the image pickup device having such an arrangement (referred to as “honeycomb arrangement”), a G (green) filter and an R (red) are arranged in accordance with the position of each light receiving unit in adjacent rows. For example, a color filter composed of filters in which B and B (blue) are alternately arranged is provided.
[0024]
When light is incident on the image sensor through the color filter, an analog voltage signal based on signal charges accumulated with respect to the light is output from the image sensor. Note that all the RGB data is output in the order of “RGBGRGBG...” By one horizontal transfer from the image pickup element having the honeycomb arrangement. The signal output from the imaging unit 1 is sent to the analog signal processing unit 2, subjected to predetermined analog signal processing, converted into a digital signal by the A / D conversion unit 3, and then sent to the digital signal processing unit 6. .
[0025]
The digital signal processing unit 6 performs digital signal processing on the digital data from the A / D conversion unit 4 according to the operation mode set by the operation unit 12. The processing performed by the digital signal processing unit 6 includes white balance adjustment processing (gain adjustment), gamma correction processing, color interpolation processing (synchronization processing), YC conversion processing, and the like. The digital signal processing unit 6 is configured by a DSP, for example.
[0026]
The compression / decompression processing unit 7 performs compression processing on the YC data obtained by the digital signal processing unit 6 and performs decompression processing on the compressed image data obtained from the recording medium 12. In addition, the display unit 8 displays an image or moving image obtained by decompressing an image or moving image that has been photographed and subjected to digital signal processing or compressed data recorded on the recording medium 12. The display unit 8 can also display a through image at the time of shooting, various states of the digital camera, information on operations, and the like.
[0027]
The internal memory 10 is, for example, a DRAM, and is used as a work memory for the digital signal processing unit 6 and the system processing unit 9 as well as a buffer memory that temporarily stores captured image data recorded on the recording medium 12 and a display. It is also used as a buffer memory for display image data to the unit 8. The media interface 11 inputs / outputs data to / from a recording medium 12 such as a memory card.
[0028]
The system control unit 9 is mainly configured by a processor that operates according to a predetermined program, and controls the entire digital camera including a photographing operation. The operation unit 13 performs various operations when the digital camera is used. The operation unit 13 performs an operation mode (shooting mode, playback mode, etc.) of the digital camera, a shooting method at the time of shooting, shooting conditions, settings, and the like. Note that the operation unit 13 also includes a release button for starting a shooting operation.
[0029]
Next, the digital signal processing unit 6 included in the digital camera of the present embodiment will be described in detail with reference to FIG. FIG. 2 is a block diagram showing an internal configuration of the digital signal processing unit 6 provided in the digital camera of the present embodiment. It should be noted that description of blocks that perform white balance adjustment processing and gamma correction processing performed by the digital signal processing unit 6 is omitted, and is not described in the drawing (FIG. 2). Therefore, in the following description, only the color interpolation process (synchronization process), the YC conversion process, and the like in this embodiment will be described.
[0030]
As shown in FIG. 2, the digital signal processing unit 6 of the present embodiment includes a color interpolation processing unit 101 corresponding to the color interpolation processing unit in the claims, a YC conversion unit 103 corresponding to the YC conversion unit, and a color And a color interpolation processing method determination unit 105 corresponding to the interpolation processing method determination means. The color interpolation processing unit 101 performs color interpolation on the digital data from the A / D conversion unit 4. More specifically, color interpolation data is generated for each pixel data of RGB.
[0031]
Note that all RGB data is read from the image sensor in the order of “RGBGRGBG...” In one horizontal transfer, but in the color interpolation processing unit 101 of the present embodiment, data read out in one horizontal transfer ( Either color interpolation processing using one line input data) or color interpolation processing using two horizontal transfer data (two line input data) is performed. In the following description, color interpolation processing using one line of input data is referred to as “one line color interpolation processing”, and color interpolation processing using two lines of input data is referred to as “two line color interpolation processing”.
[0032]
For example, in one horizontal transfer, “Rk, Gk + 1, Bk + 2, Gk + 3, Rk + 4, Gk + 5, Bk + 6, Gk + 7In the one-line color interpolation process, the following color interpolation data r, g, and b are generated for each pixel data.
[0033]
"One line color interpolation process"
<Input data>
Rk, Gk + 1, Bk + 2, Gk + 3, Rk + 4, Gk + 5, Bk + 6, Gk + 7
<Color interpolation data>
rn, Rn + 1, Rn + 2, Rn + 3
gn, Gn + 1, Gn + 2, Gn + 3
bn, Bn + 1, Bn + 2, Bn + 3
(N = k, k + 4, k + 8 ...)
However,
Pixel data RkThe color interpolation data for is rk, Gk, Bk
Pixel data Gk + 1The color interpolation data for is rk + 1, Gk + 1, Bk + 1
Pixel data Bk + 2The color interpolation data for is rk + 2, Gk + 2, Bk + 2
Pixel data Gk + 3The color interpolation data for is rk + 3, Gk + 3, Bk + 3
It is.
[0034]
In addition,
rk= Rk
rk + 1= (3Rk+ Rk + 4) / 4
rk + 2= (Rk+ Rk + 4) / 2
rk + 3= (Rk+ 3Rk + 4) / 4
gk= (Gk-1+ Gk + 1) / 2
gk + 1= (Gk-1+ 2Gk + 1+ Gk + 3) / 4
gk + 2= (Gk + 1+ Gk + 3) / 2
gk + 3= (Gk + 1+ 2Gk + 3+ Gk + 5) / 4
bk= (Bk-2+ Bk + 2) / 2
bk + 1= (Rk-2+ 3Rk + 2) / 4
bk + 2= Bk + 2
bk + 3= (3Rk + 2+ Rk + 6) / 4
[0035]
On the other hand, in the first horizontal transfer, “Rik, Gik + 1, Bik + 2, Gik + 3, Rik + 4, Gik + 5, Bik + 6, Gik + 7”Is obtained, and“ B ”is obtained in the second horizontal transfer.i + 1k, Gi + 1k + 1, Ri + 1k + 2, Gi + 1k + 3, Bi + 1k + 4, Gi + 1k + 5, Ri + 1k + 6, Gi + 1k + 7In the two-line color interpolation process, the following color interpolation data r, g, and b are generated for each pixel data obtained by the first horizontal transfer.
[0036]
"2-line color interpolation"
<Input data>
Rik, Gik + 1, Bik + 2, Gik + 3, Rik + 4, Gik + 5, Bik + 6, Gik + 7
Bi + 1k, Gi + 1k + 1, Ri + 1k + 2, Gi + 1k + 3, Bi + 1k + 4, Gi + 1k + 5, Ri + 1k + 6, Gi + 1k + 7
<Color interpolation data>
rn, Rn + 1, Rn + 2, Rn + 3
gn, Gn + 1, Gn + 2, Gn + 3
bn, Bn + 1, Bn + 2, Bn + 3
(N = k, k + 4, k + 8 ...)
However,
Pixel data RikThe color interpolation data for is rk, Gk, Bk
Pixel data Gik + 1The color interpolation data for is rk + 1, Gk + 1, Bk + 1
Pixel data Bik + 2The color interpolation data for is rk + 2, Gk + 2, Bk + 2
Pixel data Gik + 3The color interpolation data for is rk + 3, Gk + 3, Bk + 3
It is.
[0037]
In addition,
rk= (Ri + 1k-2+ 2Rik+ Ri + 1k + 2) / 4
rk + 1= (Rik+ Ri + 1k + 2) / 2
rk + 2= (Rik+ 2Ri + 1k + 2+ Rik + 4) / 4
rk + 3= (Ri + 1k + 2+ Rik + 4) / 2
gk= (Gik-1+ Gik + 1) / 2
gk + 1= (Gik-1+ 2Gik + 1+ Gik + 3) / 4
gk + 2= (Gik + 1+ Gik + 3) / 2
gk + 3= (Gik + 1+ 2Gik + 3+ Gik + 5) / 4
bk= (Bik-2+ 2Bi + 1k+ Bik + 2) / 4
bk + 1= (Bi + 1k+ Bik + 2) / 2
bk + 2= (Bi + 1k+ 2Bik + 2+ Bi + 1k + 4) / 4
bk + 3= (Bik + 2+ Bi + 1k + 4) / 2
[0038]
In the above-described two-line color interpolation processing, color interpolation processing is performed on the B pixel data using the data read in the first horizontal transfer, but in the first and second horizontal transfer. Color interpolation processing may be performed using the read data (two-line input data).
[0039]
The YC conversion unit 103 converts the RGB data color-interpolated by the color interpolation processing unit 101 into luminance (Y) data and color difference (C) data. The data (YC data) converted by the YC conversion unit 103 is stored in the internal memory 10 via the system bus 20, converted to RGB data, and displayed on the display unit 8. Similar YC data is also sent to the color interpolation processing method determination unit 105.
[0040]
The color interpolation processing method determination unit 105 determines that the color interpolation processing unit 101 performs one line for the next frame based on each level difference in luminance and color difference between two adjacent lines in the vertical direction of the imaging region by the imaging unit 1. Whether to perform color interpolation processing or 2-line color interpolation processing is determined, and the color interpolation processing unit 101 is instructed. FIG. 3 is a block diagram showing an internal configuration of the color interpolation processing method determination unit 105. As shown in the figure, the color interpolation processing method determination unit 105 includes line memories 201a and 201b, difference calculation units 203a and 203b, absolute value calculation units 205a and 205b, integration units 207a and 207b, registers 209a, 209b, averaging units 211a and 211b, and a determination processing unit 213.
[0041]
Note that the line memory 201a, the difference calculation unit 203a, the absolute value calculation unit 205a, the integration unit 207a, the register 209a, and the averaging unit 211a are parts for obtaining the vertical gradient (luminance gradient) of the Y data. 201b, the difference calculation unit 203b, the absolute value calculation unit 205b, the integration unit 207b, the register 209b, and the averaging unit 211b are portions for obtaining a vertical gradient (color difference gradient) of the C data.
[0042]
The line memory 201a stores Y data of each pixel data obtained by one horizontal transfer. In addition, the difference calculation unit 203a subtracts the luminance level indicated by the Y data of each pixel data obtained next from the luminance level indicated by the Y data of each pixel data stored in the line memory 201a, so that it is adjacent in the vertical direction. The brightness level difference (ΔY) between matching lines is calculated. The absolute value calculator 205a calculates the absolute value (| ΔY |) of the luminance level difference (ΔY) obtained by the difference calculator 203a.
[0043]
The accumulating unit 207a accumulates the absolute value of the luminance level difference obtained from the absolute value calculating unit 205a by the predetermined number of lines accumulated in the register 209. Therefore, the cumulative luminance level difference that can be expressed by “Σ | ΔY |” is output from the accumulating unit 207a. Further, the averaging unit 211a divides the accumulated luminance level difference (Σ | ΔY |) obtained from the integrating unit 207a by the number (x) indicated by “the number of accumulated lines × the number of pixels of one line”. An average luminance level difference (Σ | ΔY | / x) per pixel is obtained.
[0044]
On the other hand, the line memory 201b, the difference calculation unit 203b, the absolute value calculation unit 205b, the integration unit 207b, the register 209b, and the averaging unit 211b are configured so that the line memory 201a, the difference calculation unit 203a, the absolute value calculation unit 205a, An average color difference level difference (Σ | ΔC | / x) per pixel is obtained by performing the same operations as those of the accumulating unit 207a, the register 209a, and the averaging unit 211a.
[0045]
It should be noted that how many lines the absolute value (| ΔY |) of the luminance level difference is integrated by the integration units 207a and 207b is variable depending on the setting, and for one line, a plurality of lines, and a line constituting one frame. You can choose from. For example, when integrating the absolute value of the luminance level difference for two lines, the data for one line is accumulated in the register 209 and reset every two lines.
[0046]
The average luminance level difference (Σ | ΔY | / x) and the average color difference level difference (Σ | ΔC | / x) thus obtained are input to the determination processing unit 213. The determination processing unit 213 makes a different determination depending on whether the “resolution priority mode”, “false color reduction priority mode”, or “unset mode” is selected by the user of the digital camera of this embodiment. The determination processing unit 213 compares the average luminance level difference “Σ | ΔY | / x” with a predetermined threshold “y”, or compares the average color difference level difference “Σ | ΔC | / x” with a predetermined threshold. By comparing “c”, it is determined whether the color interpolation processing unit 101 performs the one-line color interpolation processing or the two-line color interpolation processing based on the respective magnitude relations, and the color interpolation processing unit 101 is instructed. doing.
[0047]
Hereinafter, the determination process performed by the determination processing unit 213 will be described in detail with reference to the flowchart shown in FIG. FIG. 4 is a flowchart illustrating the determination process performed by the determination processing unit 213. First, it is determined which mode the digital camera of this embodiment is set to (step S101). As a result of the determination in step S101, if the resolution priority mode is set, the process proceeds to step S111. If the false color reduction priority mode or the unset mode is set, the process proceeds to step S121.
[0048]
In step S111, the average luminance level difference “Σ | ΔY | / x” is compared with a predetermined threshold value “y”. As a result of the comparison, if Σ | ΔY | / x ≧ y, the one-line color interpolation processing is determined, and if Σ | ΔY | / x <y, the process proceeds to step S113. In step S113, the average color difference level difference “Σ | ΔC | / x” is compared with a predetermined threshold value “c”. As a result of the comparison, if Σ | ΔC | / x ≧ c, it is determined to perform 2-line color interpolation processing, and if Σ | ΔC | / x <c, it is determined to perform 1-line color interpolation processing. Thus, in the resolution priority mode, if there is a luminance boundary in the vertical direction, one-line color interpolation processing is selected, and if there is a color boundary in the vertical direction, two-line color interpolation processing is selected.
[0049]
On the other hand, in step S121, the average color difference level difference “Σ | ΔC | / x” is compared with a predetermined threshold value “c”. As a result of the comparison, if Σ | ΔC | / x ≧ c, the process proceeds to step S117 to decide to perform the two-line color interpolation process, and if Σ | ΔC | / x <c, the one-line color interpolation process is performed. decide. As described above, in the false color reduction priority mode or the non-setting mode, if there is a color boundary in the vertical direction, the 2-line color interpolation process is selected, and otherwise, the 1-line color interpolation process is selected.
[0050]
The determination processing unit 213 instructs the color interpolation processing unit 101 to perform the color interpolation processing determined in accordance with the rules according to the flowchart with respect to the line or region targeted for the next frame. That is, if the above determination process is performed for one line, an instruction is given to perform the determined color interpolation process for the corresponding line of the next frame. Further, if the above determination is made for a plurality of lines, an instruction is given to perform the determined color interpolation processing for the area constituted by the corresponding lines of the next frame. Further, if the above determination process is performed for the entire frame, an instruction is given to perform the determined color interpolation process for the entire next frame.
[0051]
As described above, according to the digital camera of the present embodiment, the color interpolation processing unit 101 for each frame constituting the video based on the level difference of luminance and color difference between lines adjacent in the vertical direction. It is determined whether to perform one-line color interpolation processing or two-line color interpolation processing, and the color interpolation processing unit 101 is instructed. In one-line color interpolation processing, color interpolation is performed using pixel data constituting one line, so that there is a problem that false colors and false signals are generated in the video if there is a difference in luminance or color level in the vertical direction. However, in the two-line color interpolation process, color interpolation is performed using pixel data of two lines, so that even if there is a difference in luminance or color level in the vertical direction, it is possible to reduce edge false colors and false signals. As a result, it is possible to generate a high-quality image in which false colors and false signals are suppressed even if the image has a luminance or color level difference in the vertical direction.
[0052]
Whether to perform one-line color interpolation processing or two-line color interpolation processing can be selected for each line of the frame, for each area, or for the entire frame. Therefore, it is possible to select whether to perform one-line color interpolation processing or two-line color interpolation processing for each desired region (one line, a plurality of lines, or the entire frame).
[0053]
【The invention's effect】
As described above, according to the video generation device and the video generation program according to the present invention, it is possible to generate a high-quality video that suppresses false colors and false signals even when there is a difference in level of color and brightness in the vertical direction. Can do.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of a digital camera according to an embodiment.
FIG. 2 is a block diagram showing an internal configuration of a digital signal processing unit included in the digital camera of the present embodiment.
FIG. 3 is a block diagram illustrating an internal configuration of a color interpolation processing method determination unit included in the digital signal processing unit.
FIG. 4 is a flowchart illustrating determination processing performed by a determination processing unit.
FIG. 5 is an explanatory diagram showing the arrangement of color filters provided on an image sensor with a honeycomb arrangement.
[Explanation of symbols]
1 Imaging unit
2 Analog signal processor
3 A / D converter
6 Digital signal processor
7 Compression / decompression processor
8 Display section
9 System controller
10 Internal memory
11 Media interface
12 Recording media
13 Operation part
101 Color interpolation processor
103 YC converter
105 color interpolation processing method determination unit
201a, 201b line memory
203a, 203b Difference calculation unit
205a, 205b Absolute value calculation unit
207a, 207b Integration unit
209a, 209b registers
211a, 211b Averaging unit
213 Determination processing unit

Claims (10)

1回の水平転送でRGBの全データを出力する撮像手段と、
前記撮像手段から出力された各画素データに対して所定の色補間処理を行う色補間処理手段と、
前記色補間処理手段で色補間処理された各画素データをYC変換するYC変換手段と、
前記撮像手段による撮像領域の垂直方向に隣接した2ライン間の色差レベル差を所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、1回の水平転送で前記撮像手段から出力された画素データを用いた1ライン色補間処理および2回の水平転送で前記撮像手段から出力された画素データを用いた2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する色補間処理方法決定手段と、
前記色補間処理方法決定手段によって決定された色補間処理およびYC変換が行われたデータから映像を生成することを特徴とする映像生成装置。
Imaging means for outputting all RGB data in one horizontal transfer;
Color interpolation processing means for performing predetermined color interpolation processing on each pixel data output from the imaging means;
YC conversion means for YC converting each pixel data subjected to color interpolation processing by the color interpolation processing means;
Based on the result of accumulating the color difference level difference between two adjacent lines in the vertical direction of the imaging area by the imaging means for a predetermined area, the color interpolation processing means for the area corresponding to the predetermined area of the next frame, Either one-line color interpolation processing using pixel data output from the imaging unit in one horizontal transfer or two-line color interpolation processing using pixel data output from the imaging unit in two horizontal transfers Color interpolation processing method determining means for determining whether to instruct the color interpolation processing means;
An image generating apparatus for generating an image from data subjected to color interpolation processing and YC conversion determined by the color interpolation processing method determining means.
前記色補間処理方法決定手段は、
前記2ライン間の色差レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均色差レベル差を色差所定値と比較し、前記平均色差レベル差が前記色差所定値以上であれば前記2ライン色補間処理を行うよう決定し、前記平均色差レベル差が前記色差所定値未満であれば前記1ライン色補間処理を行うよう決定することを特徴とする請求項1記載の映像生成装置。
The color interpolation processing method determining means includes
The absolute value of the color difference level difference between the two lines is accumulated for the predetermined area, and the average color difference level difference obtained by averaging with the number of pixels constituting the predetermined area is compared with the predetermined color difference value, and the average color difference level It is determined that the two-line color interpolation process is performed if the difference is greater than or equal to the color difference predetermined value, and the one-line color interpolation process is determined if the average color difference level difference is less than the color difference predetermined value. The video generation apparatus according to claim 1.
前記色補間処理方法決定手段は、
前記2ライン間の色差レベル差を前記所定領域分累積した結果および前記2ライン間の輝度レベル差を前記所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、前記1ライン色補間処理および前記2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示することを特徴とする請求項1または2記載の映像生成装置。
The color interpolation processing method determining means includes
Based on the result of accumulating the color difference level difference between the two lines for the predetermined area and the result of accumulating the luminance level difference between the two lines for the predetermined area, for the area corresponding to the predetermined area of the next frame The video according to claim 1 or 2, wherein the color interpolation processing means determines whether to perform the one-line color interpolation processing or the two-line color interpolation processing, and instructs the color interpolation processing means. Generator.
前記色補間処理方法決定手段は、
前記2ライン間の輝度レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均輝度レベル差を輝度所定値と比較し、前記平均輝度レベル差が前記輝度所定値以上であれば前記1ライン色補間処理を行うよう決定し、前記平均輝度レベル差が前記輝度所定値未満であれば前記色差レベル差と前記色差所定値との比較を行うことを特徴とする請求項3記載の映像生成装置。
The color interpolation processing method determining means includes
The absolute value of the luminance level difference between the two lines is accumulated for the predetermined area, and the average luminance level difference obtained by averaging with the number of pixels constituting the predetermined area is compared with the predetermined luminance value, and the average luminance level If the difference is equal to or greater than the predetermined luminance value, the one-line color interpolation process is determined to be performed, and if the average luminance level difference is less than the predetermined luminance value, the color difference level difference is compared with the predetermined color difference value. The video generation apparatus according to claim 3.
前記所定領域は、前記撮像手段による撮像領域の水平方向の1ライン、複数ラインまたは1フレームを構成する全ライン分の領域であることを特徴とする請求項1、2、3または4記載の映像生成装置。5. The video according to claim 1, 2, 3, or 4, wherein the predetermined area is an area for all lines constituting one line, a plurality of lines, or one frame in a horizontal direction of an imaging area by the imaging means. Generator. コンピュータを、
1回の水平転送でRGBの全データを出力する撮像手段から出力された各画素データに対して所定の色補間処理を行う色補間処理手段、
前記色補間処理手段で色補間処理された各画素データをYC変換するYC変換手段、
前記撮像手段による撮像領域の垂直方向に隣接した2ライン間の色差レベル差を所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、1回の水平転送で前記撮像手段から出力された画素データを用いた1ライン色補間処理および2回の水平転送で前記撮像手段から出力された画素データを用いた2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示する色補間処理方法決定手段、として機能させ、
前記色補間処理方法決定手段によって決定された色補間処理およびYC変換が行われたデータから映像を生成することを特徴とする映像生成プログラム。
Computer
Color interpolation processing means for performing predetermined color interpolation processing on each pixel data output from the imaging means for outputting all RGB data in one horizontal transfer;
YC conversion means for YC converting each pixel data subjected to color interpolation processing by the color interpolation processing means;
Based on the result of accumulating the color difference level difference between two adjacent lines in the vertical direction of the imaging area by the imaging means for a predetermined area, the color interpolation processing means for the area corresponding to the predetermined area of the next frame, Either one-line color interpolation processing using pixel data output from the imaging unit in one horizontal transfer or two-line color interpolation processing using pixel data output from the imaging unit in two horizontal transfers Determine whether to perform, and function as a color interpolation processing method determination means for instructing the color interpolation processing means,
An image generation program for generating an image from data subjected to color interpolation processing and YC conversion determined by the color interpolation processing method determination means.
前記色補間処理方法決定手段は、
前記2ライン間の色差レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均色差レベル差を色差所定値と比較し、前記平均色差レベル差が前記色差所定値以上であれば前記2ライン色補間処理を行うよう決定し、前記平均色差レベル差が前記色差所定値未満であれば前記1ライン色補間処理を行うよう決定することを特徴とする請求項6記載の映像生成プログラム。
The color interpolation processing method determining means includes
The absolute value of the color difference level difference between the two lines is accumulated for the predetermined area, and the average color difference level difference obtained by averaging with the number of pixels constituting the predetermined area is compared with the predetermined color difference value, and the average color difference level It is determined that the two-line color interpolation process is performed if the difference is greater than or equal to the color difference predetermined value, and the one-line color interpolation process is determined if the average color difference level difference is less than the color difference predetermined value. The video generation program according to claim 6.
前記色補間処理方法決定手段は、
前記2ライン間の色差レベル差を前記所定領域分累積した結果および前記2ライン間の輝度レベル差を前記所定領域分累積した結果に基づいて、次フレームの前記所定領域に該当する領域に対して前記色補間処理手段が、前記1ライン色補間処理および前記2ライン色補間処理のいずれを行うかを決定し、前記色補間処理手段に指示することを特徴とする請求項6または7記載の映像生成プログラム。
The color interpolation processing method determining means includes
Based on the result of accumulating the color difference level difference between the two lines for the predetermined area and the result of accumulating the luminance level difference between the two lines for the predetermined area, for the area corresponding to the predetermined area of the next frame 8. The video according to claim 6, wherein the color interpolation processing unit determines whether to perform the one-line color interpolation processing or the two-line color interpolation processing, and instructs the color interpolation processing unit. Generation program.
前記色補間処理方法決定手段は、
前記2ライン間の輝度レベル差の絶対値を前記所定領域分累積して、前記所定領域を構成する画素数で平均化して得られる平均輝度レベル差を輝度所定値と比較し、前記平均輝度レベル差が前記輝度所定値以上であれば前記1ライン色補間処理を行うよう決定し、前記平均輝度レベル差が前記輝度所定値未満であれば前記色差レベル差と前記色差所定値との比較を行うことを特徴とする請求項8記載の映像生成プログラム。
The color interpolation processing method determining means includes
The absolute value of the luminance level difference between the two lines is accumulated for the predetermined area, and the average luminance level difference obtained by averaging with the number of pixels constituting the predetermined area is compared with the predetermined luminance value, and the average luminance level If the difference is equal to or greater than the predetermined luminance value, the one-line color interpolation process is determined to be performed, and if the average luminance level difference is less than the predetermined luminance value, the color difference level difference is compared with the predetermined color difference value. The video generation program according to claim 8, wherein:
前記所定領域は、前記撮像手段による撮像領域の水平方向の1ライン、複数ラインまたは1フレームを構成する全ライン分の領域であることを特徴とする請求項6、7、8または9記載の映像生成プログラム。10. The video according to claim 6, 7, 8, or 9, wherein the predetermined area is an area for all lines constituting one line, a plurality of lines, or one frame in a horizontal direction of an imaging area by the imaging means. Generation program.
JP2003036806A 2003-02-14 2003-02-14 Video generation apparatus and video generation program Expired - Fee Related JP4137663B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003036806A JP4137663B2 (en) 2003-02-14 2003-02-14 Video generation apparatus and video generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003036806A JP4137663B2 (en) 2003-02-14 2003-02-14 Video generation apparatus and video generation program

Publications (2)

Publication Number Publication Date
JP2004248048A true JP2004248048A (en) 2004-09-02
JP4137663B2 JP4137663B2 (en) 2008-08-20

Family

ID=33021796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003036806A Expired - Fee Related JP4137663B2 (en) 2003-02-14 2003-02-14 Video generation apparatus and video generation program

Country Status (1)

Country Link
JP (1) JP4137663B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100967742B1 (en) 2004-09-07 2010-07-06 크로스텍 캐피탈, 엘엘씨 Method for color interpolation of image sensor
KR101068652B1 (en) 2009-11-17 2011-09-28 연세대학교 산학협력단 Apparatus and method for interpolating color, and the recording media storing the program performing the said method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100967742B1 (en) 2004-09-07 2010-07-06 크로스텍 캐피탈, 엘엘씨 Method for color interpolation of image sensor
USRE43239E1 (en) 2004-09-07 2012-03-13 Intellectual Ventures Ii Llc Color interpolation method of image sensor
KR101068652B1 (en) 2009-11-17 2011-09-28 연세대학교 산학협력단 Apparatus and method for interpolating color, and the recording media storing the program performing the said method

Also Published As

Publication number Publication date
JP4137663B2 (en) 2008-08-20

Similar Documents

Publication Publication Date Title
JPH10126796A (en) Digital camera for dynamic and still images using dual mode software processing
JP4433883B2 (en) White balance correction device, white balance correction method, program, and electronic camera device
US8218021B2 (en) Image capture apparatus, method of controlling the same, and program
US8471936B2 (en) Imaging device and signal processing method
JP2000244823A (en) Device for concealing defective pixel of imaging device
JP4367910B2 (en) Solid-state imaging device
JP5033711B2 (en) Imaging device and driving method of imaging device
JP6118118B2 (en) Imaging apparatus and control method thereof
US20070269133A1 (en) Image-data noise reduction apparatus and method of controlling same
JP2002335454A (en) Image processing unit, image processing method and imaging apparatus
JP2009164859A (en) Imaging apparatus and imaging control method
JP4137663B2 (en) Video generation apparatus and video generation program
JP4028395B2 (en) Digital camera
JP2013207427A (en) Image pickup device and image pickup method
JP2006279389A (en) Solid-state imaging apparatus and signal processing method thereof
JP2009164723A (en) Imaging apparatus and imaging control method
JP4028396B2 (en) Image composition method and digital camera
JP4449692B2 (en) Electronic camera
JP4517896B2 (en) Imaging apparatus and pixel interpolation method thereof
JP3893489B2 (en) Signal processing apparatus and signal processing method
JP2006109046A (en) Imaging device
JP4656621B2 (en) Signal processing apparatus and method, and imaging apparatus
US7518637B2 (en) Imaging processing apparatus
JP2006050308A (en) Image pickup device
JP2004222161A (en) Digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050221

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060325

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070411

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070611

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071108

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071115

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071122

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees