JP4374726B2 - Imaging device and storage medium - Google Patents

Imaging device and storage medium Download PDF

Info

Publication number
JP4374726B2
JP4374726B2 JP2000137464A JP2000137464A JP4374726B2 JP 4374726 B2 JP4374726 B2 JP 4374726B2 JP 2000137464 A JP2000137464 A JP 2000137464A JP 2000137464 A JP2000137464 A JP 2000137464A JP 4374726 B2 JP4374726 B2 JP 4374726B2
Authority
JP
Japan
Prior art keywords
pixel
image
evaluation position
pixels
photographed
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
JP2000137464A
Other languages
Japanese (ja)
Other versions
JP2001320719A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2000137464A priority Critical patent/JP4374726B2/en
Publication of JP2001320719A publication Critical patent/JP2001320719A/en
Application granted granted Critical
Publication of JP4374726B2 publication Critical patent/JP4374726B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Input (AREA)
  • Color Television Image Signal Generators (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、同一の被写体の撮影時に複数の撮像データを合成して出力する撮影装置、及び記憶媒体に関する。
【0002】
【従来の技術】
従来より、画素ずらし技術を利用して、色成分の異なる複数の撮影画像を合成して出力するデジタルカメラが利用されている。画素ずらし技術とは、ピエゾ素子で単板CCDや光学系レンズ等の撮像手段を振動させて、被写体の1点で赤色光(R)、緑色光(G)、青色光(B)の中から、何れかの単色光を取り込んだ複数の画素を重ね合わせることにより、多彩な画像を出力する技術である。これにより、デジタルカメラは、撮影画像をフルカラー且つ高解像度で取得し、被写体の再現性を向上する。
【0003】
【発明が解決しようとする課題】
しかしながら、従来のデジタルカメラでは、画像合成に伴う撮影の長時間化のため、被写体のブレの影響を受け易く、表示画像の輪郭ぼけやにじみ等の画質低下が多かった。特に、100万画素を超える高解像度のデジタルカメラでは、1画素当りの受光部分が微少なため、振動による僅かな撮像位置のブレが画質を低下させるという問題があった。この様な問題を解決するため、RGB何れかの単色光を取り込む際に、各画素毎に各色光を重ね合わせる必要があるが、これらを完全に一致させることはできなかった。
【0004】
本発明の課題は、色成分の異なる複数の撮像データを最適な位置で合成する撮影装置、及び記憶媒体を提供することである。
【0005】
【課題を解決するための手段】
本発明は、上記課題を解決するため、以下の様な特徴を備えている。なお、以下に示す手段の説明中、括弧書きにより実施の形態に対応する構成を例示する。また、符号等は、後述する図面参照符号に対応する。
【0006】
請求項1記載の発明は、
同一の被写体の画素をずらして撮影した色成分の異なる複数の撮影画像を合成する撮影装置(例えば、図1のデジタルカメラ1)において、
第1の撮影画像を構成する複数の縦方向と横方向の画素列の中から、隣接する同色画素間の変位量を示すエッジ量の合計値を、前記撮影画像の各色成分毎に算出する合計算出手段(例えば、図1のCPU2;図4のステップS701〜S705)と、
前記合計算出手段で算出された各色成分のエッジ量の合計値の総計を各画素列毎に算出する総計算出手段(例えば、図1のCPU2;図4のステップS706〜S708)と、
前記総計算出手段で算出されたエッジ量の総計が最大となる画素列を、前記第1の撮影画像の縦方向と横方向の画素列に対して、各々別に選択する最大列選択手段(例えば、図1のCPU2;図4のステップS709)と、
前記最大列選択手段で選択された前記第1の撮影画像の縦方向と横方向の画素列の交点の画素を、前記複数の撮影画像の合成の中心となる評価位置画素として、検出する評価位置画素検出手段(例えば、図1のCPU2;図5のステップS718)と、
前記複数の撮影画像を前記評価位置画素検出手段によって検出された第1の撮影画像の評価位置画素と、前記第1の撮影画像以外の夫々の撮影画像の、前記第1の撮影画像の評価位置画素と同じ位置の画素とその周辺画素において同色画素のエッジ量が前記第1の撮影画像の評価位置画素と最近似の大きさの画素とを中心にして合成する画像合成手段(例えば、図1のCPU2;図3のステップS11)と、
を備えることを特徴とする。
【0008】
【発明の実施の形態】
以下、図1〜図10を参照して本発明の実施の形態におけるデジタルカメラ1について説明する。
【0009】
まず構成を説明する。
図1は、デジタルカメラ1の機能的構成を示すブロック図である。図1に示す様に、デジタルカメラ1は、CPU2、入力部3、記憶媒体4aを有する記憶部4、表示部5、RAM6、通信部7、撮像部8、駆動制御部9、VRAM10、画像処理部11より構成され、記憶媒体4aを除く各部はバス12により接続される。
【0010】
CPU(Central Processing Unit)2は、記憶部4に記憶されているデジタルカメラ1に対応する各種プログラムの中から指定されたプログラム、入力部3から入力される各種指示、またはデータをRAM6内のワークメモリ6aに展開し、この入力指示、及び入力データに応じて上記プログラムに従って各種処理を実行し、その処理結果をRAM6内の所定の領域に格納すると共に、表示部5に表示させる。
【0011】
また、CPU2は、入力部3から入力される操作信号に基づいて、各ブロックの動作を統一的に制御すると共に、撮影画像の合成位置を最適化するため、後述する撮像処理(図3参照)、合成位置決定処理(図4〜図6参照)等の各種処理プログラムを実行制御する。
【0012】
また、CPU2は、後述する撮像処理において、RGBの各色成分の撮影画像を取り込み、各撮影画像の合成基準位置となる評価位置画素を選択し、該評価位置画素に基づいて、各撮影画像データ(以下、「撮像データ」と称する。)を合成して合成画像データC1を生成し、合成画像データC1を有効画素範囲でトリミングして出力する。
【0013】
また、CPU2は、後述する合成位置決定処理において、第1の撮像データP1から横方向の画素列を選択し、該画素列内で隣接する同色画素の、後述するエッジ量を算出し、全同色画素のエッジ量を合計して各横方向の画素列の総エッジ量を算出し、総エッジ量が最大となる横方向の画素列を選択して記憶し、上記処理を縦方向の画素列に対して実行し、総エッジ量が最大となる横方向の画素列と縦方向の画素列の交点を算出して第1の評価位置画素D1とし、評価位置画素D1を第n回目の撮像データPnの評価位置画素Dnとし、評価位置画素Dnをその周辺8画素の中で評価位置画素D1のエッジ量に最近似の画素に変更して、撮像データP1〜P4の評価位置画素D1〜D4を選択する。
【0014】
入力部3は、電源釦、モード切換キー、シャッタ釦、カーソルキー等を備えて構成され、各キーの押圧操作やスライド操作に応じた各種操作信号をCPU2へ出力する。
【0015】
記憶部4は、電源がOFFされても記憶内容を保持することが可能な様に、EEPROM(Electrical Erasable Programmable ROM )等の不揮発性の半導体メモリで構成される。記憶部4は、デジタルカメラ1の各部を制御するための各種制御プログラム、処理プログラム、及び当該プログラムの実行に必要な諸データを予め記憶すると共に、各種処理によって生成された撮像データ、合成画像データ等を所定の領域に記憶する。
【0016】
上記処理プログラムには、例えば、後述する撮像処理(図3参照)、及び合成位置決定処理(図4〜図6参照)を含む。これらの各処理プログラムは、CPU2が読み取り可能なプログラムコードの形態で格納されている。
【0017】
記憶媒体4aは磁気的、光学的記録媒体等で構成され、記憶部4に固定的に設けたもの、若しくは着脱自在に装着するものである。記憶媒体4aには、上記各種プログラムや撮像データ、合成画像データ等を記憶可能であり、これらのプログラム、データ等は、その一部若しくは全部をサーバやクライアント等の外部機器から、ネットワーク回線等の伝送媒体を介して通信部7から受信して記憶する構成にしてもよく、また、記憶媒体4aはネットワーク上に構築されたサーバの記憶媒体であってもよい。更に、上記プログラムをネットワーク回線等の伝送媒体を介してサーバやクライアントへ伝送してこれらの機器にインストールする様に構成してもよい。
【0018】
表示部5は、LCD(Liquid Crystal Display)等により構成され、画像処理部11から入力される合成画像データのビデオ信号に基づいて、表示画面にカラー画像を表示する。また、表示部5は、ファインダとして、撮影時に撮像レンズを介して取り込んだ被写体Aの画像を表示すると共に、撮影後に記憶部4に格納された合成画像データを再生表示する。
【0019】
RAM(Random Access Memory)6は、CPU2により各種制御処理が実行される際に、その制御処理を司るプログラムを展開したり、処理される各種データ、パラメータ等を一時的に格納するワークメモリ6aを形成する。また、後述する撮像処理(図3参照)、合成位置決定処理(図4〜図6参照)において、例えば撮像データP1〜Pnや評価位置画素D1〜Dnの取得回数を計数するためのカウンタメモリ6bを形成する。
【0020】
通信部7は、デジタルカメラ1と外部機器との間でIrDA(Infrared Data Association )方式の赤外線通信を行なうための赤外線インタフェースであり、赤外線通信により授受される画像データ、制御データ等の送受信制御を行なう。すなわち、通信部7は、赤外線通信機能を有する外部機器に送信する送信データを一時的に格納する送信データメモリと、該送信データメモリに格納されたデータを赤外線信号に変調する変調部と、変調された赤外線信号を赤外線パルスにより、赤外線通信用窓を介して上記外部機器に送信する送信用LEDと、前記外部機器から赤外線パルスにより送信された赤外線信号を赤外線通信用窓を介して受信するフォトダイオードと、受信された赤外線信号を受信データとして復調する復調部と、復調された受信データを一時的に格納する受信データメモリと、より構成されている。
【0021】
撮像部8は、CCD8a、画像信号処理部8b、A/D変換部8cより構成される。
CCD(Charge Coupled Device)8aは、フォトダイオード等の受光部に転送電極を重ねた素子(画素)を平面状に多数配設した画素面と、各画素に蓄積された電荷を電圧に変換して出力する出力部とから構成される。撮像レンズ(図示略)を介して入射した光は上記画素面で受光され、各画素には受光量に比例した電荷が蓄積される。各画素の蓄積電荷は、駆動制御部9から供給される駆動信号に応じて上記出力部により撮像信号(アナログ信号)として1画素分ずつ順次読み出され、画像信号処理部8bを介してA/D変換部8cへ出力される。
【0022】
CCD8aの受光部には、多数の画素が配置され、各画素は1回の撮像時に光の3原色(RGB)の何れか1つの単色光のみ取得するため、CCD8aの位置を変えて複数回撮像することにより、同一画素におけるフルカラー画像を撮影する。但し、人間の視覚感度が高い緑感光用の画素は、1画素当り2回分の撮像データを要する。このため、1つの合成画像データを生成するには、R(赤色)、G(緑色)、B(青色)、G感光用の計4種類の撮像データP1〜P4が必要になる。
【0023】
画像信号処理部8bは、CPU2から入力される制御信号に基づいて、CCD8aの受光部の各転送電極に蓄えられた蓄積電荷を電気信号(アナログ信号)を増幅し、撮像信号として1電極ずつ順次A/D変換部8cへ出力する。
【0024】
A/D(Analog to Digital )変換部8cは、CCD8aから画像信号処理部8bを介して入力された撮像信号をアナログ信号からデジタル信号に変換し、撮像データとしてVRAM10に供給する。
【0025】
駆動制御部9は、CCD8aの撮像位置を横または縦方向に1画素分ずらす駆動制御を行う。該駆動制御は、図2(a)〜(d)に示す様に、標準位置、横方向1画素ずらし、縦横方向各1画素ずらし、縦方向1画素ずらしの計4回実行される。すなわち、CCD8aの各画素は、RGBの何れか1つの単色情報しか得られないが、撮像位置を変えて4回撮影することにより同一画素におけるRGB全ての各色情報を揃えることが可能となる。同図において、各撮像データP1〜P4中の丸印の位置に示す様に、特定の画素に着目すると、4回の撮像データの取込でCPU2はRGBGの順に各色情報を取得する。
【0026】
VRAM(Video Random Access Memory)10は、A/D変換部8cから入力される撮像データを一時的に格納するビデオメモリであり、4枚の撮像データP1〜P4、またはその合成画像データC1を格納可能なメモリ容量を有する。
【0027】
画像処理部11は、CPU2によりVRAM10から出力される画像データに同期信号を付加する等してビデオ信号(デジタル信号)を生成し、該ビデオ信号を表示部5に出力する。また、ビデオ出力端子にビデオケーブルを介して外部機器が接続されている場合は、該ビデオ信号をこの外部機器に対しても出力する。
【0028】
また、画像処理部11は、後述する撮像処理(図3参照)や合成位置決定処理(図4〜図6参照)において、複数の撮像データを合成して生成した合成画像データC1の表示制御処理を行なう。すなわち、画像処理部11は、CPU2の制御信号に基づいて、VRAM11に格納された4枚の撮像データP1〜P4を、最適化した評価位置で合成、トリミング処理し、最終的な合成画像データC1として記憶部4または記憶媒体4aに保存すると共に、合成画像データC1に同期信号を付加する等してビデオ信号(デジタル信号)を生成し、その中から1画面分のビデオ信号を読み出して表示部5へ表示させる。なお、合成対象となる複数の撮像データが同色成分(例えば緑色成分)を含む場合にはその色成分を平均し、含まない場合にはその成分を単純に加算することにより、鮮明なフルカラー画像を生成する。
【0029】
次に、動作を説明する。
まず、デジタルカメラ1の使用者がシャッタ釦を押下した際に実行される撮像処理、及び撮像処理に基づく具体的表示例について、図3〜図10を参照して詳述する。
【0030】
図3は、撮像処理を示すフローチャートである。
デジタルカメラ1のシャッタ釦が押下されると、以下に説明する撮像処理を実行するプログラムを記憶部4から読み出しRAM6に展開すると共に、図3のフローチャートに従った各種動作を実行する。
【0031】
図3において、まずCPU2はRAM6内のカウンタメモリ6bに初期値として「n=1」を設定する(ステップS1)。次に、CPU2は、CCD8aにより被写体Aを撮影し(ステップS2)、該撮影画像をVRAM10の所定の領域に取り込み、第1回目の撮像データP1として一時的に格納する(ステップS3)。次に、駆動制御部9は、CPU2の指令に従って、CCD8aの位置を標準位置から被写体Aに向かって右方向に1画素分ずらす(ステップS4)。
【0032】
次に、CPU2は、カウンタメモリ6bの設定値が「n=4」であるか否かを判定する(ステップS5)。ここで、上記設定値が「n=4」でない場合(ステップS5;No)、CPU2は「n=n+1」とし(ステップS6)、再度ステップS2に戻り、それ以降の処理を実行する。
【0033】
なお、図3に示す様に、ステップS2〜S5の処理は計4回繰り返して実行され、1回目はCCD8aの標準位置で被写体Aを撮影し、撮像データP1としてVRAM10に格納する。同様に、2回目はCCD8aを標準位置から右方向に1画素分ずらして撮影し、撮像データP2として格納する。また、3回目はCCD8aを標準位置から、右方向と下方向に夫々1画素分ずつずらして撮影し、第3の撮像データP3として格納する。更に、4回目はCCD8aを標準位置から下方向に1画素分ずらして撮影し、第4の撮像データP4として格納する。
【0034】
次に、CPU2は、上記4つの撮像データの最適な合成位置を決定するため、後述する合成位置決定処理を実行制御する(ステップS7)。以下、図4〜図6を参照して、合成位置決定処理について詳述する。
【0035】
図4において、まずCPU2は、撮像データP1をVRAM10から読み出す(ステップS701)。次に、CPU2は、図7(b)に示す様に、最初の横方向の画素列H1を選択し(ステップS702)、該横方向の画素列H1を同色画素を選択すると共に、特定の同色画素(例えば白色領域)内の画素のエッジ量を算出する(ステップS703)。
【0036】
ここで、エッジ量とは、所定の撮像領域内における特定の画素の変位量(差分)を示す値であり、該エッジ量が大きい程、各撮像データ間の画素のずれが大きい。このため、エッジ量が最大となる画素を評価位置画素(重ね合わせの基準点)として、異なる複数の撮像データを合成することで、重ね合わせ誤差の少ないより高精度な画像合成が可能となる。
【0037】
次に、CPU2は、ステップS703で算出された同色画素内の画素のエッジ量を合計する(ステップS704)。次に、CPU2は、横方向の画素列H1における全ての同色画素内のエッジ量の合計を算出したか否かを判定し(ステップS705)、算出していなければ(ステップS705;No)、次の同色画素(例えば黒色領域)を指定する。そして、横方向の画素列H1における全ての同色画素内のエッジ量の合計を算出するまで、ステップS703〜S704の処理を繰り返し実行する。
【0038】
次に、CPU2は、ステップS703〜S704で算出された各同色画素のエッジ量を合計して、横方向の画素列H1内の総エッジ量を算出する(ステップS706)。次に、CPU2は、撮像データP1の全ての横方向の画素列H1〜H5の総エッジ量を算出したか否かを判定し(ステップS707)、算出していなければ(ステップS707;No)、次の横方向の画素列を指定する(ステップS708)。
【0039】
そして、全ての横方向の画素列内の総エッジ量を算出するまでステップS703〜S706の処理を繰り返し実行する。次に、CPU2は、総エッジ量が最大となる横方向の画素列を選択する(ステップS709)。この場合、図7(e)に示す様に横方向の画素列H3が選択される。
【0040】
次に、CPU2は、ステップS702〜S709と同様の処理を縦方向の画素列に対して実行する。すなわち、CPU2は、最初の縦方向の画素列V3を選択し(ステップS710)、画素列V3について同色画素を選択すると共に、特定の同色画素(例えば白色領域)内の画素のエッジ量を算出する(ステップS711)。
【0041】
次に、CPU2は、ステップS711で算出された同色画素内の画素のエッジ量を合計する(ステップS712)。次に、CPU2は、画素列V3における全ての同色画素内のエッジ量の合計を算出したか否かを判定し(ステップS713)、算出していなければ(ステップS713;No)、次の同色画素(例えば青色領域)を指定する。そして、縦方向の画素列V3における全ての同色画素内のエッジ量の合計を算出するまで、ステップS711〜S712の処理を繰り返し実行する。
【0042】
次に、CPU2は、ステップS711〜S712で算出された各同色画素のエッジ量を合計して、縦方向の画素列V3内の総エッジ量を算出する(ステップS714)。次に、CPU2は、撮像データP1の全ての縦方向の画素列の総エッジ量を算出したか否かを判定し(ステップS715)、算出していなければ(ステップS715;No)、次の縦方向の画素列を指定する(ステップS716)。
【0043】
そして、全ての縦方向の画素列内の総エッジ量を算出するまでステップS711〜S714の処理を繰り返し実行する。次に、CPU2は、総エッジ量が最大となる縦方向の画素列V3を選択する(図5のステップS717)。この場合、図7(h)に示す様に縦方向の画素列V3が選択される。
【0044】
次に、CPU2は、ステップS709で選択された横方向の画素列H3とステップS717で選択された縦方向の画素列V3の交点となる画素を算出し、撮像データP1の評価位置画素D1とする(ステップS718)。
【0045】
ここで、図7(a)〜(i)の撮像データの具体的構成例を参照して、ステップS701〜S718に示した一連の評価位置画素D1の決定処理について説明する。まず、図7(a)は、元画像データP0の一例を示す図である。元画像データP0は、例えば横方向の画素列として画素列H1〜H5を有し、縦方向の画素列として画素列V1〜V5を有する。
【0046】
また、同図(b)〜(d)は、夫々光の3原色(RGB)に対応する元画像データP0に基づく各色成分レベルの撮像データP1〜P3を示す図である。CPU2は、各色成分に対応する撮像データ毎に各画素列H1〜H5のエッジ量を算出する。そして、各色成分のエッジ量の合計が最大となる画素列を検出する。この場合、同図(e)〜(g)に示す様に、画素列H3のエッジ量の総計が最大値をとる。
【0047】
同様に、縦方向の画素列のエッジ量を各色成分毎に算出すると、同図(h)に示す様に、画素列V3のエッジ量の総計が最大値となる。従って、同図(i)に示す様に、画素列H3と画素列V3の交点が撮像データP1の評価位置画素D1としてワークメモリ6aに記憶される。
【0048】
次に、CPU2は、メモリカウンタ6bに「n=2」を設定する(ステップS719)と同時に、2回目の撮影画像データである撮像データP2をVRAM10から読み出す(ステップS720)。次に、CPU2は、図8(a)に示す様に、上記評価位置画素D1をn回目の評価位置画素Dnに仮設定し(ステップS721)、該評価位置画素Dnとその周辺8画素(図8(b)参照)についてエッジ量を算出する(ステップS722)。次に、CPU2は、図8(c)に示す様に、評価位置画素D1の大きさを、評価位置画素Dnとその周辺8画素の大きさと比較し(ステップS723)、評価位置画素D1の大きさと最近似の大きさの画素を選択する(ステップS724)。
【0049】
次に、CPU2は、ステップS724で評価位置画素が選択されたか否かを判定し(ステップS725)、決定したn回目評価位置画素を評価位置画素Dnとしてワークメモリ6aに記憶する(ステップS726)。次に、CPU2は、カウンタメモリ6bの設定値が「n=4」であるか否かを判定し(ステップS727)、n=4であれば、再度図3のステップS8に戻り、それ以降の処理を実行する。
【0050】
また、ステップS725において、評価位置画素が選択されない場合(ステップS725;No)、CPU2は、エッジ量が評価位置画素D1と最近似の大きさの画素が複数存在するか否かを判定する(ステップS728)。ここで、複数存在しない場合(ステップS728;No)、エッジ量が評価位置画素D1と最近似の大きさの画素をn回目の評価位置画素Dnとし(ステップS729)、再度ステップS722に戻り、それ以降の処理を繰り返し実行する。
【0051】
また、ステップS728において、エッジ量が評価位置画素D1と最近似の大きさの画素が複数存在する場合(ステップS728;Yes)、ステップS730以降の処理に移行する。すなわち、CPU2は上記複数の画素の中から任意の1画素を選択し、その画素を中心に周辺8画素についてエッジ量を算出する(ステップS730)。
【0052】
次に、CPU2は、ステップS730で選択された画素以外で最近似の大きさの画素が存在するか否かを判定する(ステップS731)。ここで、他にエッジ量が最近似の大きさの画素が存在しない場合(ステップS731;No)、CPU2は、エッジ量が評価位置画素D1と最近似の大きさの画素を選択する(ステップS732)。
【0053】
次に、CPU2は、評価位置画素D1のエッジ量の大きさと最近似の大きさの画素が複数存在するか否かを判定する(ステップS733)。ここで、エッジ量が最近似の画素が複数存在しない場合(ステップS733;No)、エッジ量が評価位置画素D1と最近似の画素をn回目の評価位置画素Dnとし(ステップS734)、再度ステップS726に戻り、それ以降の処理を繰り返し実行する。
【0054】
また、ステップS731で、他にエッジ量が最近似の画素が存在する場合(ステップS731;Yes)、またはステップS733で、エッジ量が評価位置画素D1と最近似の大きさの画素が複数存在する場合(ステップS733;Yes)、再びステップS730に戻り、CPU2は上記複数の画素の中から任意の1画素を選択し、その画素を中心に周辺8画素についてエッジ量を算出する。
【0055】
また、ステップS727において、カウンタメモリ6bの設定値が「n=4」でない場合(ステップS727;No)、CPU2はカウンタメモリ6bを「n=n+1」に設定する(ステップS728)と共に、再度ステップS719に戻り、それ以降の処理を繰り返し実行する。すなわち、CPU2は、撮像データP1〜P4に対応する評価位置画素D1〜D4を算出してワークメモリ6aに記憶する。
【0056】
前述した合成位置決定処理を終了すると、CPU2は、撮像データP1をVRAM10から読み出し、それに対応する評価位置画素D1をワークメモリ6aから読み出す(ステップS8)。次に、CPU2は、カウンタメモリ6bに「n=2」を設定し(ステップS9)、n回目の撮影画像データPnをVRAM10から読み出し、それに対応する評価位置画素Dnをワークメモリ6aから読み出す(ステップS10)。
【0057】
次に、CPU2は、撮像データP1と撮像データPnとを、夫々の評価位置画素D1、Dnを中心にして合成する(ステップS11)。次に、CPU2は、カウンタメモリ6bの設定値が「n=4」であるか否かを判定する(ステップS12)。ここで、n=4でない場合(ステップS12;No)、CPU2は、カウンタメモリ6bの設定値を「n=n+1」とし(ステップS13)、再びステップS10に戻り、n回目の撮像データPnをVRAM10から読み出し、それに対応する評価位置画素Dnをワークメモリ6aから読み出す。
【0058】
すなわち、CPU2は、図9(a)〜(d)に示す全撮像データP1〜P4を評価位置画素D1〜D4を中心画素として合成する。そして、図9(e)に示す様に、合成画像データC1を最終画像の有効画素範囲Eで切り抜いてトリミングし(ステップS13)、上述した撮像処理を終了する。なお、有効画素範囲Eは、撮像データP1〜P4の全てが重なる最大範囲とする。
【0059】
以上説明した様に、本発明に係るデジタルカメラ1は、図10(a)〜(f)に示す様に、1つの被写体Aに対して、CCD8aの撮像位置を変えて色成分の異なる4枚の撮像データP1〜P4を取得し、撮像データP1からRGBの各色成分のエッジ量の総計が最大となる横方向と縦方向の画素列を選択し、その交点を評価位置画素D1として記憶する。
【0060】
次に、撮像データP2内で評価位置画素D1の総エッジ量に最も近い周辺画素を評価位置画素D2として記憶する。同様に、撮像データP3、P4の評価位置画素D3、D4を算出して記憶する。次に、4枚の撮像データP1〜P4を夫々の評価位置画素D1〜D4を中心として重ね合わせて合成し、有効画素範囲でトリミングする。そして、トリミング後の画像データを、CCD8aの受光部の各画素を表示部5の1画素データ(RGB)に割り当てて表示すると共に、合成画像データC1として記憶部4に記憶する。
【0061】
従って、色成分の異なる複数の撮像データの合成時に、最適な評価位置を検出することが可能となり、複数の撮像データを高精度に重ね合わせることができる。このため、高解像度を維持しつつ、画像の輪郭ぼけやにじみ等のブレの影響を抑えた高画質且つ鮮明な撮像データを取得できる。また、例えば人間の視覚的感度が高い緑色成分の撮像データを平均し、赤色成分と青色成分の撮像データを単純に加算して合成すれば、特定の撮像データの色成分に偏らない均質な画像データを出力できる。更に、4枚の撮像データを重ね合わせて、有効画素範囲でトリミングすれば、多彩な画像データを効率的に出力できる。
【0062】
なお、上記実施の形態における記述内容は、本発明に係るデジタルカメラ1の好適な一例であり、これに限定されるものではない。
例えば、本実施の形態では、本発明をCCD8aの撮像位置を複数回移動させて撮影するデジタルカメラに適用したが、光源位置を変更させて複数回走査し合成するスキャナに適用してもよい。この場合、物理的なブレだけでなく光路差に起因する色ずれ等を抑えることができる。
【0063】
その他、デジタルカメラ1の細部構成、及び詳細動作に関しても、本発明の趣旨を逸脱することのない範囲で適宜変更可能である。
【0064】
【発明の効果】
請求項1記載の発明によれば、同一の被写体の画素をずらして撮影した色成分の異なる複数の撮影画像を合成する撮影装置において、合計算出手段と、総計算出手段と、最大列選択手段と、評価位置画素検出手段と、画像合成手段と、を備えたので、第1の撮影画像の合成時に最適な評価位置を検出し、この評価位置を中心して色成分の異なる複数の撮影画像を合成することができる。したがって、各撮影画像の評価位置に基づく、重ね合わせ誤差の少ない高精度な合成が可能となる。
【0065】
請求項2記載の発明によれば、請求項1記載の発明の効果に加えて、色成分の異なる複数の撮影画像の最適な合成位置を検出することが可能となり、色成分の異なる複数の撮影画像をより高精度に重ね合わせることができる。このため、画像の輪郭ぼけやにじみ等のブレの影響を抑えた高画質且つ鮮明な撮像データを取得できる。
【0066】
請求項3記載の発明によれば、請求項記載の発明の効果に加えて、色成分の異なる複数の撮影画像の合成時に、特定の撮影画像の色成分に偏らない均質な画像データを出力できる。
【0067】
請求項4記載の発明によれば、請求項記載の発明の効果に加えて、複数の撮影画像を合成して得られた画像から、所望の合成部分を画像として選択的に抽出することが可能となり、効率的且つ多彩な画像を出力できる。
【0068】
請求項5記載の発明によれば、第1の撮影画像の合成時に最適な評価位置を検出し、この評価位置を中心して色成分の異なる複数の撮影画像を合成するプログラムをコンピュータ上で実行できる。したがって、各撮影画像の評価位置に基づいて、高精度な合成が可能となる。
【図面の簡単な説明】
【図1】本発明に係るデジタルカメラ1の機能的構成を示すブロック図である。
【図2】CCD8aの受光部における撮像データP1〜P4の位置関係を示す図である。
【図3】図1のCPU2により実行される撮像処理を示すフローチャートである。
【図4】図1のCPU2により実行される合成位置決定処理を示すフローチャートである。
【図5】図1のCPU2により実行される合成位置決定処理を示すフローチャートである。
【図6】図1のCPU2により実行される合成位置決定処理を示すフローチャートである。
【図7】元画像データP0の各色成分の撮像データP1〜P3、各撮像データのエッジ量、及び撮像データP1の評価位置画素D1を示す図である。
【図8】図7の評価位置画素D1を基準とした他の評価位置画素の選択方法を示す図である。
【図9】撮像データP1〜P4の有効画素範囲Eにおけるトリミング位置を示す図である。
【図10】撮像データP1〜P4の通常手法による合成画像データC0、及び最適化による合成画像データC1を示す図である。
【符号の説明】
1 デジタルカメラ
2 CPU
3 入力部
4 記憶部
4a 記憶媒体
5 表示部
6 RAM
6a ワークメモリ
6b カウンタメモリ
7 通信部
8a CCD
8b 画像信号処理部
8c A/D変換部
9 駆動制御部
10 VRAM
11 画像処理部
12 バス
A 被写体
P0 元画像データ
P1,P2,P3,P4,Pn 撮像データ
D1,D2,D3,D4,Dn 評価位置画素
H1,H2,H3,H4,H5 横方向の画素列
V3 縦方向の画素列
C0,C1 合成画像データ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a photographing apparatus that synthesizes and outputs a plurality of imaging data when photographing the same subject, and a storage medium.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, digital cameras that combine and output a plurality of captured images having different color components using a pixel shifting technique have been used. The pixel shifting technique is to vibrate imaging means such as a single CCD or an optical lens with a piezo element, and at one point of the subject, red light (R), green light (G), and blue light (B). This is a technique for outputting a variety of images by superimposing a plurality of pixels incorporating any single color light. As a result, the digital camera acquires the captured image with full color and high resolution, and improves the reproducibility of the subject.
[0003]
[Problems to be solved by the invention]
However, conventional digital cameras are subject to blurring of the subject because of the long shooting time associated with image synthesis, and image quality such as blurring and blurring of the displayed image is often reduced. In particular, in a high-resolution digital camera having more than 1 million pixels, since the light receiving portion per pixel is very small, there is a problem that slight blurring at the imaging position due to vibration deteriorates the image quality. In order to solve such a problem, it is necessary to superimpose each color light for each pixel when capturing any single color light of RGB, but these cannot be completely matched.
[0004]
An object of the present invention is to provide an imaging device and a storage medium that synthesize a plurality of imaging data having different color components at an optimal position.
[0005]
[Means for Solving the Problems]
In order to solve the above problems, the present invention has the following features. In the following description of the means, the configuration corresponding to the embodiment is illustrated in parentheses. Reference numerals and the like correspond to reference numerals of drawings described later.
[0006]
The invention described in claim 1
In a photographing apparatus (for example, the digital camera 1 in FIG. 1) that combines a plurality of photographed images with different color components that are photographed by shifting pixels of the same subject,
A total for calculating, for each color component of the photographic image, a total value of edge amounts indicating the amount of displacement between adjacent pixels of the same color from among a plurality of vertical and horizontal pixel columns constituting the first photographic image. Calculation means (for example, CPU 2 in FIG. 1; steps S701 to S705 in FIG. 4);
Total calculation means (for example, CPU 2 in FIG. 1; steps S706 to S708 in FIG. 4) for calculating the total sum of the edge amounts of the respective color components calculated by the total calculation means for each pixel column;
Maximum column selection means (for example, for selecting separately the pixel columns in which the total amount of edges calculated by the total calculation means is the maximum for the vertical and horizontal pixel columns of the first photographed image) CPU 2 in FIG. 1; step S709 in FIG.
Evaluation position for detecting the pixel at the intersection of the vertical and horizontal pixel columns of the first captured image selected by the maximum column selection means as an evaluation position pixel that is the center of the synthesis of the plurality of captured images Pixel detection means (for example, CPU 2 in FIG. 1; step S718 in FIG. 5);
The plurality of captured images , Evaluation position pixel of the first photographed image detected by the evaluation position pixel detection means In addition, the edge amount of the same color pixel in the pixel at the same position as the evaluation position pixel of the first photographed image and the peripheral pixels of each photographed image other than the first photographed image is evaluated in the first photographed image. The position pixel and the pixel of the closest size Image synthesizing means (e.g., CPU 2 in FIG. 1; step S11 in FIG. 3),
It is characterized by providing.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
The digital camera 1 according to the embodiment of the present invention will be described below with reference to FIGS.
[0009]
First, the configuration will be described.
FIG. 1 is a block diagram showing a functional configuration of the digital camera 1. As shown in FIG. 1, the digital camera 1 includes a CPU 2, an input unit 3, a storage unit 4 having a storage medium 4a, a display unit 5, a RAM 6, a communication unit 7, an imaging unit 8, a drive control unit 9, a VRAM 10, and image processing. Each unit is configured by the unit 11 and is connected by a bus 12 except for the storage medium 4a.
[0010]
A CPU (Central Processing Unit) 2 stores a program designated from various programs corresponding to the digital camera 1 stored in the storage unit 4, various instructions input from the input unit 3, or data in a work in the RAM 6. The data is expanded in the memory 6a, and various processes are executed in accordance with the program according to the input instruction and input data. The processing results are stored in a predetermined area in the RAM 6 and displayed on the display unit 5.
[0011]
Further, the CPU 2 controls the operation of each block uniformly based on the operation signal input from the input unit 3 and optimizes the composite position of the captured image, so that an imaging process described later (see FIG. 3). Various execution programs such as a composite position determination process (see FIGS. 4 to 6) are executed and controlled.
[0012]
Further, the CPU 2 captures captured images of each color component of RGB in an imaging process to be described later, selects an evaluation position pixel that is a combination reference position of each captured image, and selects each captured image data ( Hereinafter, the image data is referred to as “imaging data”) to generate composite image data C1, and the composite image data C1 is trimmed within the effective pixel range and output.
[0013]
Further, the CPU 2 selects a pixel row in the horizontal direction from the first imaging data P1 in a composition position determination process, which will be described later, calculates an edge amount, which will be described later, of adjacent pixels of the same color in the pixel row, and all the same colors The pixel edge amount is summed to calculate the total edge amount of each horizontal pixel row, the horizontal pixel row having the maximum total edge amount is selected and stored, and the above processing is performed on the vertical pixel row. The intersection of the horizontal pixel column and the vertical pixel column with the maximum total edge amount is calculated as the first evaluation position pixel D1, and the evaluation position pixel D1 is set as the n-th imaging data Pn. The evaluation position pixel Dn is changed to the pixel closest to the edge amount of the evaluation position pixel D1 among the eight surrounding pixels, and the evaluation position pixels D1 to D4 of the imaging data P1 to P4 are selected. To do.
[0014]
The input unit 3 includes a power button, a mode switching key, a shutter button, a cursor key, and the like, and outputs various operation signals to the CPU 2 in accordance with the pressing operation or sliding operation of each key.
[0015]
The storage unit 4 is composed of a nonvolatile semiconductor memory such as an EEPROM (Electrical Erasable Programmable ROM) so that the stored contents can be retained even when the power is turned off. The storage unit 4 stores in advance various control programs and processing programs for controlling each unit of the digital camera 1 and various data necessary for the execution of the programs, as well as imaging data and composite image data generated by various processes. Etc. are stored in a predetermined area.
[0016]
The processing program includes, for example, an imaging process (see FIG. 3), which will be described later, and a composite position determination process (see FIGS. 4 to 6). Each of these processing programs is stored in the form of a program code that can be read by the CPU 2.
[0017]
The storage medium 4a is composed of a magnetic or optical recording medium or the like, and is fixedly provided in the storage unit 4 or detachably mounted. The storage medium 4a can store the above-described various programs, imaging data, composite image data, and the like. Some or all of these programs, data, and the like can be transmitted from an external device such as a server or client to a network line or the like. It may be configured to receive and store from the communication unit 7 via a transmission medium, and the storage medium 4a may be a storage medium of a server built on a network. Further, the program may be transmitted to a server or a client via a transmission medium such as a network line and installed in these devices.
[0018]
The display unit 5 is configured by an LCD (Liquid Crystal Display) or the like, and displays a color image on the display screen based on the video signal of the composite image data input from the image processing unit 11. Further, the display unit 5 displays, as a finder, an image of the subject A captured through the imaging lens at the time of shooting, and reproduces and displays the composite image data stored in the storage unit 4 after shooting.
[0019]
A RAM (Random Access Memory) 6 has a work memory 6a that expands a program that controls the control process when the CPU 2 executes various control processes, and temporarily stores various data and parameters to be processed. Form. Further, in imaging processing (see FIG. 3) and composite position determination processing (see FIGS. 4 to 6), which will be described later, for example, a counter memory 6b for counting the number of acquisitions of imaging data P1 to Pn and evaluation position pixels D1 to Dn. Form.
[0020]
The communication unit 7 is an infrared interface for performing IrDA (Infrared Data Association) infrared communication between the digital camera 1 and an external device, and performs transmission / reception control of image data, control data, and the like exchanged by infrared communication. Do. That is, the communication unit 7 includes a transmission data memory that temporarily stores transmission data to be transmitted to an external device having an infrared communication function, a modulation unit that modulates the data stored in the transmission data memory into an infrared signal, LED for transmitting the infrared signal transmitted by infrared pulse to the external device through the infrared communication window, and a photo for receiving the infrared signal transmitted from the external device by infrared pulse through the infrared communication window. It comprises a diode, a demodulator that demodulates the received infrared signal as reception data, and a reception data memory that temporarily stores the demodulated reception data.
[0021]
The imaging unit 8 includes a CCD 8a, an image signal processing unit 8b, and an A / D conversion unit 8c.
A CCD (Charge Coupled Device) 8a converts a pixel surface in which a large number of elements (pixels) in which a transfer electrode is superimposed on a light receiving unit such as a photodiode, and a charge accumulated in each pixel into a voltage. And an output unit for outputting. Light incident through an imaging lens (not shown) is received by the pixel surface, and charges proportional to the amount of received light are accumulated in each pixel. The accumulated charge of each pixel is sequentially read out for each pixel as an imaging signal (analog signal) by the output unit in accordance with the drive signal supplied from the drive control unit 9, and is supplied to the A / V via the image signal processing unit 8b. The data is output to the D converter 8c.
[0022]
A large number of pixels are arranged in the light receiving portion of the CCD 8a, and each pixel captures only one single color light of the three primary colors (RGB) of light at the time of imaging, so the CCD 8a is changed in position and is imaged a plurality of times. By doing so, a full color image in the same pixel is taken. However, the green light sensitive pixels with high human visual sensitivity require two times of image data per pixel. For this reason, in order to generate one composite image data, a total of four types of image data P1 to P4 for R (red), G (green), B (blue), and G photosensitive are required.
[0023]
Based on the control signal input from the CPU 2, the image signal processing unit 8b amplifies an electric signal (analog signal) accumulated in each transfer electrode of the light receiving unit of the CCD 8a, and sequentially sequentially picks up one electrode at a time as an imaging signal. The data is output to the A / D converter 8c.
[0024]
The A / D (Analog to Digital) conversion unit 8c converts the imaging signal input from the CCD 8a via the image signal processing unit 8b from an analog signal to a digital signal, and supplies it to the VRAM 10 as imaging data.
[0025]
The drive control unit 9 performs drive control for shifting the imaging position of the CCD 8a by one pixel in the horizontal or vertical direction. As shown in FIGS. 2A to 2D, the drive control is executed a total of four times, with the standard position shifted by one pixel in the horizontal direction, shifted by one pixel in the vertical and horizontal directions, and shifted by one pixel in the vertical direction. That is, each pixel of the CCD 8a can obtain only one single color information of RGB, but it is possible to align all the color information of RGB in the same pixel by photographing four times while changing the imaging position. In the same figure, as shown by the positions of circles in each of the imaging data P1 to P4, when attention is paid to a specific pixel, the CPU 2 acquires each color information in the order of RGBG by capturing the imaging data four times.
[0026]
A video random access memory (VRAM) 10 is a video memory that temporarily stores image data input from the A / D converter 8c, and stores four image data P1 to P4 or composite image data C1 thereof. It has a possible memory capacity.
[0027]
The image processing unit 11 generates a video signal (digital signal) by adding a synchronization signal to the image data output from the VRAM 10 by the CPU 2, and outputs the video signal to the display unit 5. If an external device is connected to the video output terminal via a video cable, the video signal is also output to the external device.
[0028]
In addition, the image processing unit 11 performs display control processing of composite image data C1 generated by combining a plurality of imaging data in imaging processing (see FIG. 3) and composite position determination processing (see FIGS. 4 to 6) described later. To do. That is, the image processing unit 11 synthesizes and trims the four pieces of imaging data P1 to P4 stored in the VRAM 11 at the optimized evaluation position based on the control signal of the CPU 2 to obtain the final synthesized image data C1. Are stored in the storage unit 4 or the storage medium 4a, and a video signal (digital signal) is generated by adding a synchronization signal to the composite image data C1, and a video signal for one screen is read out from the generated video signal. 5 is displayed. In addition, when a plurality of imaging data to be combined includes the same color component (for example, a green component), the color components are averaged, and when not included, the components are simply added to obtain a clear full color image. Generate.
[0029]
Next, the operation will be described.
First, an imaging process executed when the user of the digital camera 1 presses the shutter button and a specific display example based on the imaging process will be described in detail with reference to FIGS.
[0030]
FIG. 3 is a flowchart showing the imaging process.
When the shutter button of the digital camera 1 is pressed, a program for executing an imaging process described below is read from the storage unit 4 and expanded in the RAM 6, and various operations according to the flowchart of FIG. 3 are executed.
[0031]
In FIG. 3, first, the CPU 2 sets “n = 1” as an initial value in the counter memory 6b in the RAM 6 (step S1). Next, the CPU 2 captures the subject A by the CCD 8a (step S2), takes the captured image into a predetermined area of the VRAM 10, and temporarily stores it as the first imaging data P1 (step S3). Next, the drive control unit 9 shifts the position of the CCD 8a from the standard position toward the subject A by one pixel in the right direction in accordance with a command from the CPU 2 (step S4).
[0032]
Next, the CPU 2 determines whether or not the set value of the counter memory 6b is “n = 4” (step S5). If the set value is not “n = 4” (step S5; No), the CPU 2 sets “n = n + 1” (step S6), returns to step S2, and executes the subsequent processing.
[0033]
As shown in FIG. 3, the processes of steps S2 to S5 are repeated a total of four times. The first time, the subject A is photographed at the standard position of the CCD 8a and stored in the VRAM 10 as the imaging data P1. Similarly, in the second time, the CCD 8a is photographed while being shifted by one pixel in the right direction from the standard position, and stored as imaging data P2. In the third time, the CCD 8a is photographed while being shifted by one pixel from the standard position in the right and downward directions, and stored as the third image data P3. Further, in the fourth time, the CCD 8a is photographed by shifting one pixel downward from the standard position, and stored as fourth image data P4.
[0034]
Next, the CPU 2 performs execution control of a combination position determination process (to be described later) in order to determine the optimal combination position of the four imaging data (step S7). Hereinafter, the composite position determination process will be described in detail with reference to FIGS.
[0035]
In FIG. 4, first, the CPU 2 reads the imaging data P1 from the VRAM 10 (step S701). Next, as shown in FIG. 7B, the CPU 2 selects the first horizontal pixel column H1 (step S702), selects the same color pixel in the horizontal pixel column H1, and selects a specific same color. The edge amount of the pixel in the pixel (for example, white area) is calculated (step S703).
[0036]
Here, the edge amount is a value indicating the displacement amount (difference) of a specific pixel within a predetermined imaging region, and the larger the edge amount, the larger the pixel shift between the respective imaging data. For this reason, by combining a plurality of different imaging data using the pixel having the maximum edge amount as the evaluation position pixel (superimposition reference point), it is possible to perform more accurate image synthesis with less overlay error.
[0037]
Next, the CPU 2 adds up the edge amounts of the pixels in the same color pixel calculated in step S703 (step S704). Next, the CPU 2 determines whether or not the sum of the edge amounts in all the same color pixels in the horizontal pixel row H1 has been calculated (step S705), and if not calculated (step S705; No), the next Of the same color pixel (for example, black region). Then, the processes in steps S703 to S704 are repeatedly executed until the sum of the edge amounts in all the same color pixels in the horizontal pixel row H1 is calculated.
[0038]
Next, the CPU 2 calculates the total edge amount in the horizontal pixel row H1 by summing up the edge amounts of the same color pixels calculated in steps S703 to S704 (step S706). Next, the CPU 2 determines whether or not the total edge amount of all the horizontal pixel columns H1 to H5 of the imaging data P1 has been calculated (step S707), and if not calculated (step S707; No), The next horizontal pixel column is designated (step S708).
[0039]
Then, the processes in steps S703 to S706 are repeatedly executed until the total edge amount in all the horizontal pixel rows is calculated. Next, the CPU 2 selects the horizontal pixel row that maximizes the total edge amount (step S709). In this case, the horizontal pixel column H3 is selected as shown in FIG.
[0040]
Next, the CPU 2 executes processing similar to steps S702 to S709 on the vertical pixel columns. That is, the CPU 2 selects the first vertical pixel column V3 (step S710), selects the same color pixel for the pixel column V3, and calculates the edge amount of the pixel in the specific same color pixel (for example, white area). (Step S711).
[0041]
Next, the CPU 2 sums up the edge amounts of the pixels in the same color pixel calculated in step S711 (step S712). Next, the CPU 2 determines whether or not the sum of the edge amounts in all the same color pixels in the pixel row V3 has been calculated (step S713), and if not calculated (step S713; No), the next same color pixel (For example, a blue region) is specified. Then, the processes in steps S711 to S712 are repeatedly executed until the sum of the edge amounts in all the same color pixels in the vertical pixel row V3 is calculated.
[0042]
Next, the CPU 2 calculates the total edge amount in the vertical pixel row V3 by summing up the edge amounts of the same color pixels calculated in steps S711 to S712 (step S714). Next, the CPU 2 determines whether or not the total edge amount of all the vertical pixel columns of the imaging data P1 has been calculated (step S715), and if not calculated (step S715; No), the next vertical A pixel column in the direction is designated (step S716).
[0043]
Then, the processes in steps S711 to S714 are repeatedly executed until the total edge amount in all the vertical pixel rows is calculated. Next, the CPU 2 selects the vertical pixel row V3 having the maximum total edge amount (step S717 in FIG. 5). In this case, the vertical pixel column V3 is selected as shown in FIG.
[0044]
Next, the CPU 2 calculates a pixel that is an intersection of the horizontal pixel row H3 selected in step S709 and the vertical pixel row V3 selected in step S717, and sets it as the evaluation position pixel D1 of the imaging data P1. (Step S718).
[0045]
Here, a series of evaluation position pixel D1 determination processes shown in steps S701 to S718 will be described with reference to specific configuration examples of the imaging data in FIGS. First, FIG. 7A shows an example of the original image data P0. The original image data P0 has, for example, pixel columns H1 to H5 as horizontal pixel columns and pixel columns V1 to V5 as vertical pixel columns.
[0046]
FIGS. 7B to 7D are diagrams showing imaging data P1 to P3 of each color component level based on the original image data P0 corresponding to the three primary colors (RGB) of light. The CPU 2 calculates the edge amounts of the pixel columns H1 to H5 for each imaging data corresponding to each color component. Then, a pixel row in which the sum of the edge amounts of the respective color components is maximized is detected. In this case, as shown in FIGS. 5E to 5G, the total of the edge amounts of the pixel column H3 takes the maximum value.
[0047]
Similarly, when the edge amount of the pixel column in the vertical direction is calculated for each color component, the sum of the edge amounts of the pixel column V3 becomes the maximum value as shown in FIG. Accordingly, as shown in FIG. 5I, the intersection of the pixel column H3 and the pixel column V3 is stored in the work memory 6a as the evaluation position pixel D1 of the imaging data P1.
[0048]
Next, the CPU 2 sets “n = 2” in the memory counter 6b (step S719), and simultaneously reads out the imaging data P2, which is the second captured image data, from the VRAM 10 (step S720). Next, as shown in FIG. 8A, the CPU 2 temporarily sets the evaluation position pixel D1 as the nth evaluation position pixel Dn (step S721), and the evaluation position pixel Dn and its surrounding eight pixels (FIG. 8). 8b), the edge amount is calculated (step S722). Next, as shown in FIG. 8C, the CPU 2 compares the size of the evaluation position pixel D1 with the size of the evaluation position pixel Dn and the surrounding 8 pixels (step S723), and the size of the evaluation position pixel D1. And the pixel having the closest size is selected (step S724).
[0049]
Next, the CPU 2 determines whether or not an evaluation position pixel is selected in step S724 (step S725), and stores the determined nth evaluation position pixel in the work memory 6a as the evaluation position pixel Dn (step S726). Next, the CPU 2 determines whether or not the setting value of the counter memory 6b is “n = 4” (step S727). If n = 4, the process returns to step S8 in FIG. Execute the process.
[0050]
If the evaluation position pixel is not selected in step S725 (step S725; No), the CPU 2 determines whether or not there are a plurality of pixels whose edge amounts are closest to the evaluation position pixel D1 (step S725). S728). If there are not a plurality of pixels (step S728; No), the pixel whose edge amount is the closest to the evaluation position pixel D1 is set to the nth evaluation position pixel Dn (step S729), and the process returns to step S722 again. The subsequent processing is executed repeatedly.
[0051]
In step S728, when there are a plurality of pixels whose edge amounts are the closest to the evaluation position pixel D1 (step S728; Yes), the process proceeds to step S730 and subsequent steps. That is, the CPU 2 selects an arbitrary pixel from the plurality of pixels, and calculates an edge amount for the surrounding 8 pixels around the pixel (step S730).
[0052]
Next, the CPU 2 determines whether or not there is a pixel having the closest size other than the pixel selected in step S730 (step S731). Here, when there is no other pixel having the closest approximate edge amount (step S731; No), the CPU 2 selects a pixel having the closest approximate edge size to the evaluation position pixel D1 (step S732). ).
[0053]
Next, the CPU 2 determines whether or not there are a plurality of pixels having a size closest to the edge amount of the evaluation position pixel D1 (step S733). Here, when there are not a plurality of pixels with the closest edge amount (step S733; No), the evaluation position pixel D1 and the pixel with the closest edge amount are set to the nth evaluation position pixel Dn (step S734), and the step is performed again. Returning to S726, the subsequent processing is repeatedly executed.
[0054]
In addition, in step S731, when there is another pixel with the closest edge amount (step S731; Yes), or in step S733, there are a plurality of pixels with the edge amount closest to the evaluation position pixel D1. In the case (step S733; Yes), the process returns to step S730 again, and the CPU 2 selects one arbitrary pixel from the plurality of pixels, and calculates the edge amount for the surrounding eight pixels around the pixel.
[0055]
In step S727, if the set value of the counter memory 6b is not “n = 4” (step S727; No), the CPU 2 sets the counter memory 6b to “n = n + 1” (step S728) and again step S719. Return to, and repeat the subsequent processing. That is, the CPU 2 calculates the evaluation position pixels D1 to D4 corresponding to the imaging data P1 to P4 and stores them in the work memory 6a.
[0056]
When the composite position determination process described above is completed, the CPU 2 reads the imaging data P1 from the VRAM 10, and reads the corresponding evaluation position pixel D1 from the work memory 6a (step S8). Next, the CPU 2 sets “n = 2” in the counter memory 6b (step S9), reads the nth captured image data Pn from the VRAM 10, and reads the corresponding evaluation position pixel Dn from the work memory 6a (step S9). S10).
[0057]
Next, the CPU 2 synthesizes the imaging data P1 and the imaging data Pn with the respective evaluation position pixels D1 and Dn as the center (step S11). Next, the CPU 2 determines whether or not the set value of the counter memory 6b is “n = 4” (step S12). If n = 4 is not satisfied (step S12; No), the CPU 2 sets the setting value of the counter memory 6b to “n = n + 1” (step S13), returns to step S10 again, and stores the nth imaging data Pn in the VRAM 10 And the corresponding evaluation position pixel Dn is read from the work memory 6a.
[0058]
That is, the CPU 2 combines all the imaging data P1 to P4 shown in FIGS. 9A to 9D with the evaluation position pixels D1 to D4 as the center pixel. Then, as shown in FIG. 9E, the synthesized image data C1 is cut out and trimmed in the effective pixel range E of the final image (step S13), and the above-described imaging process is ended. Note that the effective pixel range E is the maximum range in which all of the imaging data P1 to P4 overlap.
[0059]
As described above, in the digital camera 1 according to the present invention, as shown in FIGS. 10 (a) to 10 (f), for one subject A, four images having different color components by changing the imaging position of the CCD 8a. Image data P1 to P4 are acquired, a pixel row in the horizontal direction and the vertical direction in which the sum of the edge amounts of the RGB color components is maximized is selected from the image data P1, and the intersection is stored as the evaluation position pixel D1.
[0060]
Next, the peripheral pixel closest to the total edge amount of the evaluation position pixel D1 in the imaging data P2 is stored as the evaluation position pixel D2. Similarly, evaluation position pixels D3 and D4 of the imaging data P3 and P4 are calculated and stored. Next, the four pieces of image data P1 to P4 are superimposed and synthesized with the respective evaluation position pixels D1 to D4 as the centers, and trimmed in the effective pixel range. Then, the trimmed image data is displayed by assigning each pixel of the light receiving unit of the CCD 8a to one pixel data (RGB) of the display unit 5 and also stored in the storage unit 4 as the composite image data C1.
[0061]
Therefore, it is possible to detect an optimum evaluation position when combining a plurality of imaging data having different color components, and the plurality of imaging data can be superimposed with high accuracy. For this reason, it is possible to acquire high-quality and clear imaging data that suppresses the influence of blurring such as blurring and blurring of the image while maintaining high resolution. In addition, for example, if the image data of the green component with high human visual sensitivity is averaged and the image data of the red component and the blue component are simply added and synthesized, a homogeneous image that is not biased to the color component of the specific image data Data can be output. Furthermore, if four pieces of image data are superimposed and trimmed within the effective pixel range, a variety of image data can be output efficiently.
[0062]
In addition, the description content in the said embodiment is a suitable example of the digital camera 1 which concerns on this invention, and is not limited to this.
For example, in the present embodiment, the present invention is applied to a digital camera that captures images by moving the imaging position of the CCD 8a a plurality of times, but may be applied to a scanner that scans and combines a plurality of times by changing the light source position. In this case, not only physical blur but also color misregistration caused by the optical path difference can be suppressed.
[0063]
In addition, the detailed configuration and detailed operation of the digital camera 1 can be changed as appropriate without departing from the spirit of the present invention.
[0064]
【The invention's effect】
According to invention of Claim 1, Combining multiple shot images with different color components taken by shifting pixels of the same subject In the photographing apparatus, a total calculation unit, a total calculation unit, a maximum column selection unit, an evaluation position pixel detection unit, Image synthesis means; So that the first Taken image The best evaluation position when synthesizing It is possible to synthesize a plurality of captured images with different color components around the evaluation position. it can. Therefore, each captured image Based on the evaluation position, it is possible to perform highly accurate synthesis with little overlay error.
[0065]
According to the invention of claim 2, in addition to the effect of the invention of claim 1, Color component Multiple of different Taken image It is possible to detect the optimal synthesis position of Different color components plural Taken image Can be superimposed with higher accuracy. For this reason, it is possible to acquire high-quality and clear imaging data in which the influence of blur such as blurring and blurring of the image is suppressed.
[0066]
According to the invention of claim 3, the claim of claim 2 In addition to the effects of the described invention, Different color components plural Taken image When synthesizing Taken image Homogeneous image data that is not biased to color components can be output.
[0067]
According to the invention of claim 4, the claim of claim 2 In addition to the effects of the described invention, a plurality of Image obtained by combining the shot images From the desired synthesis part image Can be selectively extracted as an efficient and versatile image Statue Can output.
[0068]
According to the invention of claim 5, the first Taken image The best evaluation position when synthesizing Then, combine multiple shot images with different color components around this evaluation position. Program to be executed on the computer. Therefore, each captured image Based on the evaluation position, a highly accurate composition is possible.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a functional configuration of a digital camera 1 according to the present invention.
FIG. 2 is a diagram showing a positional relationship of imaging data P1 to P4 in a light receiving unit of a CCD 8a.
FIG. 3 is a flowchart showing an imaging process executed by a CPU 2 in FIG. 1;
4 is a flowchart showing a composite position determination process executed by CPU 2 of FIG.
FIG. 5 is a flowchart showing a composite position determination process executed by the CPU 2 of FIG.
6 is a flowchart showing a composite position determination process executed by the CPU 2 of FIG.
7 is a diagram illustrating imaging data P1 to P3 of each color component of the original image data P0, an edge amount of each imaging data, and an evaluation position pixel D1 of the imaging data P1. FIG.
8 is a diagram illustrating a method for selecting another evaluation position pixel with reference to the evaluation position pixel D1 in FIG. 7;
FIG. 9 is a diagram illustrating a trimming position in an effective pixel range E of imaging data P1 to P4.
FIG. 10 is a diagram illustrating composite image data C0 obtained by a normal method of imaging data P1 to P4 and composite image data C1 obtained by optimization.
[Explanation of symbols]
1 Digital camera
2 CPU
3 Input section
4 storage
4a storage media
5 display section
6 RAM
6a Work memory
6b Counter memory
7 Communication Department
8a CCD
8b Image signal processor
8c A / D converter
9 Drive controller
10 VRAM
11 Image processing unit
12 Bus
A Subject
P0 original image data
P1, P2, P3, P4, Pn Imaging data
D1, D2, D3, D4, Dn Evaluation position pixel
H1, H2, H3, H4, H5 Horizontal pixel rows
V3 Vertical pixel row
C0, C1 composite image data

Claims (5)

同一の被写体の画素をずらして撮影した色成分の異なる複数の撮影画像を合成する撮影装置において、
第1の撮影画像を構成する複数の縦方向と横方向の画素列の中から、隣接する同色画素間の変位量を示すエッジ量の合計値を、前記撮影画像の各色成分毎に算出する合計算出手段と、
前記合計算出手段で算出された各色成分のエッジ量の合計値の総計を各画素列毎に算出する総計算出手段と、
前記総計算出手段で算出されたエッジ量の総計が最大となる画素列を、前記第1の撮影画像の縦方向と横方向の画素列に対して、各々別に選択する最大列選択手段と、
前記最大列選択手段で選択された前記第1の撮影画像の縦方向と横方向の画素列の交点の画素を、前記複数の撮影画像の合成の中心となる評価位置画素として、検出する評価位置画素検出手段と、
前記複数の撮影画像を前記評価位置画素検出手段によって検出された第1の撮影画像の評価位置画素と、前記第1の撮影画像以外の夫々の撮影画像の、前記第1の撮影画像の評価位置画素と同じ位置の画素とその周辺画素において同色画素のエッジ量が前記第1の撮影画像の評価位置画素と最近似の大きさの画素とを中心にして合成する画像合成手段と、
を備えることを特徴とする撮影装置。
In a shooting device that combines a plurality of shot images with different color components shot by shifting pixels of the same subject,
A total for calculating, for each color component of the photographic image, a total value of edge amounts indicating the amount of displacement between adjacent pixels of the same color from among a plurality of vertical and horizontal pixel columns constituting the first photographic image. A calculation means;
Total calculation means for calculating the total of the total amount of edge amounts of each color component calculated by the total calculation means for each pixel column;
A maximum column selecting unit that individually selects a pixel column having a maximum sum of edge amounts calculated by the total calculating unit with respect to the vertical and horizontal pixel columns of the first captured image;
Evaluation position for detecting the pixel at the intersection of the vertical and horizontal pixel columns of the first captured image selected by the maximum column selection means as an evaluation position pixel that is the center of the synthesis of the plurality of captured images Pixel detection means;
Evaluation of the first photographed image of the plurality of photographed images, the evaluation position pixel of the first photographed image detected by the evaluation position pixel detection means, and each photographed image other than the first photographed image. An image compositing means for compositing the pixel at the same position as the position pixel and the peripheral pixel around the evaluation position pixel of the first photographed image and the pixel of the closest size, with the edge amount of the same color pixel ;
An imaging apparatus comprising:
前記第1の撮影画像の評価位置画素を、前記第1の撮影画像に対して画素をずらして撮影した第2の撮影画像の評価位置画素として、予想検出する予想検出手段と、
前記予想検出手段で予想検出した画素とその周辺画素について、同色画素のエッジ量を算出するエッジ量算出手段と、
前記エッジ量算出手段で算出された同色画素のエッジ量と、前記第1の撮影画像の評価位置画素のエッジ量と、を比較するエッジ量比較手段と、
前記エッジ量比較手段による比較結果に基づいて、前記第2の撮影画像における評価位置画素をエッジ量が前記第1の撮影画像の評価位置画素と最近似の大きさの画素とするまで前記第2の撮影画像における評価位置画素としてエッジ量が前記第1の撮影画像の評価位置画素と最近似の大きさの画素を選択し、前記エッジ量の算出及び前記比較を繰り返し実行する実行手段と、を更に備え、
前記画像合成手段は、前記第1の撮影画像と前記第2の撮影画像とを、前記第1の撮影画像の評価位置画素と前記実行手段によって選択された第2の撮影画像の評価位置画素とを中心にして合成する
ことを特徴とする請求項1記載の撮影装置。
Anticipation detection means for anticipating and detecting the evaluation position pixel of the first captured image as the evaluation position pixel of the second captured image captured by shifting the pixel with respect to the first captured image;
Edge amount calculation means for calculating the edge amount of the same color pixel for the pixel detected by the prediction detection means and its surrounding pixels,
Edge amount comparison means for comparing the edge amount of the same color pixel calculated by the edge amount calculation means with the edge amount of the evaluation position pixel of the first photographed image;
Based on the comparison result by the edge amount comparing means, to the edge amount evaluation position pixel in the second captured image is the size of the pixels of similar evaluation position pixel and recent first captured image, the first An execution unit that selects a pixel whose edge amount is the closest to the evaluation position pixel of the first photographed image as the evaluation position pixel in the two photographed images, and repeatedly executes the calculation of the edge amount and the comparison ; Further comprising
The image synthesizing unit converts the first photographed image and the second photographed image into an evaluation position pixel of the first photographed image and an evaluation position pixel of the second photographed image selected by the execution unit. The photographing apparatus according to claim 1, wherein the image is synthesized with respect to the center.
前記画像合成手段は、
前記複数の撮影画像の合成時に、同色成分を含む撮影画像の画素を平均した画素と、同色成分を含まない撮影画像のそれぞれの画素とを加算して合成することを特徴とする請求項2記載の撮影装置。
The image composition means includes
3. The composite of the plurality of photographed images by adding a pixel obtained by averaging the pixels of the photographed image including the same color component and each pixel of the photographed image not including the same color component. Shooting device.
前記画像合成手段によって複数の撮影画像を合成した画像を所定の有効画素範囲でトリミングして出力する出力手段、
を更に備えることを特徴とする請求項2記載の撮影装置。
Output means for trimming and outputting an image obtained by combining a plurality of photographed images by the image combining means within a predetermined effective pixel range;
The imaging apparatus according to claim 2, further comprising:
同一の被写体の画素をずらして撮影した色成分の異なる複数の撮影画像を合成する撮影装置を制御するためのコンピュータが実行可能なプログラムを格納した記憶媒体であって、
第1の撮影画像を構成する複数の縦方向と横方向の画素列の中から、隣接する同色画素間の変位量を示すエッジ量の合計値を、前記撮影画像の各色成分毎に算出するためのプログラムコードと、
算出された各色成分のエッジ量の合計値の総計を各画素列毎に算出するためのプログラムコードと、
算出されたエッジ量の総計が最大となる画素列を、前記第1の撮影画像の縦方向と横方向の画素列に対して、各々別に選択するためのプログラムコードと、
選択された前記第1の撮影画像の縦方向と横方向の画素列の交点の画素を、前記複数の撮影画像の合成の中心となる評価位置画素として、検出するためのプログラムコードと、
前記複数の撮影画像を検出された第1の撮影画像の評価位置画素と、前記第1の撮影画像以外の夫々の撮影画像の、前記第1の撮影画像の評価位置画素と同じ位置の画素とその周辺画素において同色画素のエッジ量が前記第1の撮影画像の評価位置画素と最近似の大きさの画素とを中心にして合成するためのプログラムコードと、
を含むプログラムを格納したことを特徴とする記憶媒体。
A storage medium storing a computer-executable program for controlling a photographing device that synthesizes a plurality of photographed images with different color components photographed by shifting pixels of the same subject,
In order to calculate the total value of edge amounts indicating the amount of displacement between adjacent pixels of the same color from among a plurality of vertical and horizontal pixel columns constituting the first captured image for each color component of the captured image. Program code,
A program code for calculating the total sum of the calculated edge amounts of each color component for each pixel column;
A program code for individually selecting a pixel column having a maximum sum of the calculated edge amounts with respect to the vertical and horizontal pixel columns of the first captured image;
A program code for detecting the pixel at the intersection of the vertical and horizontal pixel columns of the selected first captured image as an evaluation position pixel that is the center of the synthesis of the plurality of captured images;
The plurality of captured images, and the evaluation position pixels of the first photographed image is detected the first captured image than each of the captured image, pixels at the same position as the evaluation position pixels of the first captured image And a program code for synthesizing the edge amount of the same color pixel around the evaluation position pixel of the first photographed image and the pixel of the most approximate size in the surrounding pixels, and
A storage medium characterized by storing a program including:
JP2000137464A 2000-05-10 2000-05-10 Imaging device and storage medium Expired - Fee Related JP4374726B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000137464A JP4374726B2 (en) 2000-05-10 2000-05-10 Imaging device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000137464A JP4374726B2 (en) 2000-05-10 2000-05-10 Imaging device and storage medium

Publications (2)

Publication Number Publication Date
JP2001320719A JP2001320719A (en) 2001-11-16
JP4374726B2 true JP4374726B2 (en) 2009-12-02

Family

ID=18645236

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000137464A Expired - Fee Related JP4374726B2 (en) 2000-05-10 2000-05-10 Imaging device and storage medium

Country Status (1)

Country Link
JP (1) JP4374726B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4843415B2 (en) 2006-08-30 2011-12-21 株式会社東芝 Pattern evaluation method and program

Also Published As

Publication number Publication date
JP2001320719A (en) 2001-11-16

Similar Documents

Publication Publication Date Title
US7825969B2 (en) Image stabilization using multi-exposure pattern
US6947082B2 (en) Image-taking apparatus and image-taking method
JP3675412B2 (en) Imaging device
TWI387330B (en) Imaging apparatus provided with panning mode for taking panned image
JP5563283B2 (en) Image processing device
EP2219366B1 (en) Image capturing device, image capturing method, and image capturing program
CN103828345B (en) Apparatus, method and image pickup apparatus for image processing
JP3704238B2 (en) Imaging device
JP2006115446A (en) Photographing device, and method of evaluating image
WO2006048962A1 (en) Pixel signal processor and pixel signal processing method
JP2012049773A (en) Imaging apparatus and method, and program
US8872963B2 (en) Imaging apparatus and imaging method
JP2007053499A (en) White balance control unit and imaging apparatus
JP3854754B2 (en) Imaging apparatus, image processing apparatus and method, and memory medium
JP5735846B2 (en) Image processing apparatus and method
JP6833801B2 (en) Imaging equipment, imaging methods, programs and recording media
JP5033711B2 (en) Imaging device and driving method of imaging device
JP4617870B2 (en) Imaging apparatus and method, and program
JP5786355B2 (en) Defocus amount detection device and electronic camera
US7256827B1 (en) Image reading device with thinned pixel data
JP4374726B2 (en) Imaging device and storage medium
JP3143245B2 (en) Imaging device, photometric method therefor, focusing control method therefor, and imaging method
JP2007049301A (en) Image processing apparatus and method therefor
JP2000315784A (en) Color image pickup element and image pickup device
JP4687619B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050405

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080924

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081007

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

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130918

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees