JP3678160B2 - Image processing apparatus, display apparatus, program, and storage medium - Google Patents

Image processing apparatus, display apparatus, program, and storage medium Download PDF

Info

Publication number
JP3678160B2
JP3678160B2 JP2001087827A JP2001087827A JP3678160B2 JP 3678160 B2 JP3678160 B2 JP 3678160B2 JP 2001087827 A JP2001087827 A JP 2001087827A JP 2001087827 A JP2001087827 A JP 2001087827A JP 3678160 B2 JP3678160 B2 JP 3678160B2
Authority
JP
Japan
Prior art keywords
image
focus position
focus
blur
still
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
JP2001087827A
Other languages
Japanese (ja)
Other versions
JP2002290831A (en
Inventor
一睦 佐藤
宣之 沖須
勝仁 新川
Original Assignee
コニカミノルタフォトイメージング株式会社
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 コニカミノルタフォトイメージング株式会社 filed Critical コニカミノルタフォトイメージング株式会社
Priority to JP2001087827A priority Critical patent/JP3678160B2/en
Publication of JP2002290831A publication Critical patent/JP2002290831A/en
Application granted granted Critical
Publication of JP3678160B2 publication Critical patent/JP3678160B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、複数の静止画像から映像効果を有する動画像を生成する画像処理技術に関する。
【0002】
【従来の技術】
従来より、デジタルカメラ等で撮影された静止画像から、様々な映像効果を有する動画像の画像ファイルを作成することが行われている。このような動画像の画像ファイルは、それぞれが1フレームにあたる複数の静止画像が連結されて構成される。これらの複数の静止画像はそれぞれの画像データ(図柄)が相対的に微少に相違しており、所定の時間間隔毎に連続的に表示されることによって、様々な映像効果が表現されることとなる。
【0003】
【発明が解決しようとする課題】
ところで、このような動画像の画像ファイルで表現される映像効果として、遠景から近景に至って、あるいは、近景から遠景に至って徐々に合焦位置が変化するようなものが求められている。このような映像効果を有する動画像の画像ファイルを生成するには、同一の被写体に対して撮影され、かつ、合焦位置が相対的に微小変化した複数の静止画像を、動画像の画像ファイルを構成するフレーム数だけ用意する必要がある。つまり、表示される全ての合焦位置の静止画像がそれぞれ必要である。
【0004】
しかしながら、従来、上記の複数の静止画像を取得するためには、撮影を行うデジタルカメラ等において必要なフレーム数と同回数撮影レンズの焦点位置を変化させて撮影を行わなければならなかった。
【0005】
本発明は、上記課題に鑑みてなされたものであり、少数の静止画像から、徐々に合焦位置が変化する映像効果を有する動画像の画像ファイルを作成することができる画像処理装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
上記課題を解決するため、請求項1の発明は、画像処理装置において、同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより、前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を撮影した場合に得られるべき第3静止画像を演算によって生成する第1の画像生成手段と、前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記第1の画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いて動画像を生成する第2の画像生成手段と、を備えている。
【0007】
また、請求項2の発明は、請求項1の発明に係る画像処理装置において、静止画像を撮影する撮像手段、をさらに備え、前記撮像手段は、操作ボタンの操作に応答して前記第1静止画像と前記第2静止画像を時間的に連続して撮影することを特徴とする。
【0008】
また、請求項3の発明は、請求項1または2の発明に係る画像処理装置において、前記第1の画像生成手段は、前記第3静止画像の前記ぼけ関数においてぼけの程度を指定するパラメータを可変に設定するぼけパラメータ設定手段、を備えている。
【0009】
また、請求項4の発明は、請求項1ないし3のいずれかの発明に係る画像処理装置において、前記第2の画像生成手段は、前記動画像を構成する画像数を可変に設定する画像数設定手段、を備えている。
【0010】
また、請求項5の発明は、請求項1ないし4のいずれかの発明に係る画像処理装置において、前記第2の画像生成手段は、前記動画像の表示速度を可変に設定する表示速度設定手段、を備えている。
【0011】
また、請求項6の発明は、表示装置において、同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより、前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を撮影した場合に得られるべき第3静止画像を演算によって生成する画像生成手段と、前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いた動画像を出力して表示させる出力手段と、を備えている。
【0012】
また、請求項7の発明は、請求項6の発明に係る表示装置において、静止画像を撮影する撮像手段、をさらに備え、前記撮像手段は、操作ボタンの操作に応答して前記第1静止画像と前記第2静止画像を時間的に連続して撮影することを特徴とする。
【0013】
また、請求項8の発明は、プログラムにおいて、画像処理装置に含まれるコンピュータによって実行されることにより、前記コンピュータに、同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより、前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を撮影した場合に得られるべき第3静止画像を演算によって生成する工程と、前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記第1の画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いて動画像を生成する工程と、を実行させる
【0014】
また、請求項9の発明は、記録媒体において、請求項8に記載のプログラムを記録してあることを特徴とする。
【0015】
【発明の実施の形態】
以下、図面を参照しつつ本発明の実施の形態について詳細に説明する。
【0016】
<1.静止画像撮影>
まず、動画像の生成に使用する静止画像を撮影する撮像手段を備えた画像処理装置であるデジタルカメラについて説明を行う。
【0017】
図1〜図3は、デジタルカメラ1の要部構成を示す図であり、図1は平面図、図2は図1のII−II位置から見た断面図、図3は背面図に相当する。これらの図は必ずしも三角図法に則っているものではなく、デジタルカメラ1の要部構成を概念的に例示することを主眼としている。
【0018】
これらの図に示すように、デジタルカメラ1は、略直方体状のカメラ本体部2と、撮像部3とに大別される構造である。カメラ本体部2には、撮影画像を記録するメモリカード8が脱着可能に収納される。また、デジタルカメラ1は、4本の単三形乾電池E1〜E4を直列接続してなる電源電池Eを駆動源としている。
【0019】
撮像部3は、撮影レンズであるマクロ機能付きレンズ群30の後方位置の適所にCCDカラーエリアセンサ303を有する撮像回路302が設けられている。また、このレンズ群30は、ズームレンズ300と合焦レンズ301とを備えている。
【0020】
一方、カメラ本体部2の内部には、ズームレンズ300のズーム比の変更と収容位置、撮影位置間のレンズ移動を行うためのズームモータM1、および合焦レンズ301を駆動して焦点位置の変更を行うためのフォーカスモータM2とが設けられている。
【0021】
カメラ本体部2の前面には、グリップ部Gが設けられ、カメラ本体部2上端部の適所にポップアップ形式の内蔵フラッシュ5が設けられている。なお、フラッシュ5は手動でポップアップしたり、収納したりできるものとなっている。また、カメラ本体部2の上面にはシャッタボタン9が設けられている。
【0022】
一方、図3に示すように、カメラ本体部2の背面には、撮影画像のライブビュー表示及び記録画像を電子的に表示可能な液晶ディスプレイ(LCD)10と、電子ビューファインダ(EVF)20とが設けられている。EVF20は、接眼レンズを介して電子的に撮影画像の表示が可能となっているとともに、LCD10は、EVF20より大きな表示画面に電子的に撮影画像の表示が可能となっている。
【0023】
カメラ本体部2の背面には、「記録モード」と「再生モード」とを切換設定する記録/再生モード設定ボタン14が設けられている。記録モードは、写真撮影を行ないメモリカード8に撮影画像を記録するモードであり、再生モードは、メモリカード8に記録された撮影画像をLCD10に再生表示するモードである。
【0024】
デジタルカメラ1の背面右方には、4連ボタン35が設けられており、ボタンL、Rを押すことにより、ズームモータM1が駆動しズーミングを行い、その他、ボタンU、D、L、Rで各種操作を行う。
【0025】
また、カメラ本体部2の背面には、取消ボタン33、確定ボタン32、メニューボタン34及びLCDボタン31が設けられている。メニューボタン34は、LCD10にメニュー画面を表示するためのものである。このメニュー画面においては、4連ボタン35などでユーザの操作入力によりデジタルカメラ1の機能に関するメニューの設定が行える。取消ボタン33は、このメニュー画面で選択された内容を取り消すためのボタンであり、確定ボタン32は、メニュー画面で選択された内容を確定するためのボタンである。また、LCDボタン31は、LCD10表示のオフオフ切り替えのためのボタンである。
【0026】
ユーザは、メニュー画面において記録モードにおける撮影モードを選択することが可能である。デジタルカメラ1の撮影モードには、通常の一枚毎の撮影を行う通常撮影モードと、ぼけ味調整モードとが含まれる。ぼけ味調整モードとは、1回のシャッタ操作で撮影レンズの焦点位置を変化させて連続して2回の撮影動作を行うことにより、近景に焦点を合わせた撮影画像と遠景に焦点を合わせた撮影画像とを取得するモードである。ぼけ味調整モードにおいて撮影された撮影画像は、後述する画像処理装置において、任意の合焦位置の静止画像を得るために使用される。
【0027】
次に、デジタルカメラ1の内部構成について説明する。図5は、デジタルカメラ1の内部構成を示す概略ブロック図である。同図において、CCD303は、レンズ群30により結像された被写体の光像を、R(赤),G(緑),B(青)の色成分の画像信号(各画素で受光された画素信号の信号列からなる信号)に光電変換して出力する。タイミングジェネレータ314は、CCD303の駆動を制御するための各種のタイミングパルスを生成するものである。
【0028】
撮像部3における露出制御は、絞り制御ドライバ306によるレンズ群30の絞りと、CCD303の露光量、すなわち、シャッタスピードに相当するCCD303の電荷蓄積時間を調節して行なわれる。被写体輝度が低輝度時に適切なシャッタスピードが設定できない場合は、CCD303から出力される画像信号のレベル調整を行なうことにより露光不足による不適正露出が補正される。すなわち、低輝度時は、シャッタスピードとゲイン調整とを組み合わせて露出制御が行なわれる。画像信号のレベル調整は、信号処理回路313内のAGC回路のゲイン調整において行なわれる。
【0029】
タイミングジェネレータ314は、タイミング制御回路202から送信される基準クロック基づきCCD303の駆動制御信号を生成するものである。タイミングジェネレータ314は、例えば積分開始/終了(露出開始/終了)のタイミング信号、各画素の受光信号の読出制御信号(水平同期信号,垂直同期信号,転送信号等)等のクロック信号を生成し、CCD303に出力する。
【0030】
信号処理回路313は、CCD303から出力される画像信号(アナログ信号)に所定のアナログ信号処理を施すものである。信号処理回路313は、CDS(相関二重サンプリング)回路とAGC(オートゲインコントロール)回路とを有し、CDS回路により画像信号のノイズの低減を行ない、AGC回路のゲインを調整することにより画像信号のレベル調整を行なう。
【0031】
調光回路304は、フラッシュ撮影における内蔵フラッシュ5の発光量を全体制御部250により設定された所定の発光量に制御するものである。フラッシュ撮影においては、露出開始と同時に被写体からのフラッシュ光の反射光が調光センサにより受光され、この受光量が所定の発光量に達すると、調光回路304から発光停止信号が出力され、この発光停止信号に応答して内蔵フラッシュ5の発光を強制的に停止し、これにより内蔵フラッシュ5の発光量が所定の発光量に制御される。
【0032】
A/D変換回路205は、画像信号の各画素信号を10ビットのデジタル信号に変換するものである。A/D変換回路205は、タイミング発生回路から入力されるA/D変換用のクロックに基づいて各画素信号(アナログ信号)を10ビットのデジタル信号に変換する。
【0033】
タイミングジェネレータ314には、A/D変換回路205に対するクロックを生成するタイミング制御回路202が設けられている。タイミング制御回路202は、全体制御部250内の基準クロックにより制御される。
【0034】
黒レベル補正回路206は、A/D変換された画素信号の黒レベルを基準の黒レベルに補正するものである。また、WB(ホワイトバランス)回路207は、R,G,Bの各色成分の画素データのレベル変換を行なうものである。WB回路207は、全体制御部250から入力されるレベル変換テーブルを用いてR,G,Bの各色成分の画素データのレベルを変換する。なお、レベル変換テーブルの各色成分のパラメータ(特性の傾き)は全体制御部250により、オートまたはマニュアルで、撮影画像毎に設定される。γ補正回路208は、画素データの階調を補正するものである。
【0035】
画像メモリ209は、信号処理の終了した画像データを一時記憶するメモリである。画像メモリ209は、少なくとも2フレーム分の画像データを記憶し得る容量を有している。これは、ぼけ味調整モードでは1回のシャッタ操作で2フレーム分の画像データが取り込まれるため、これらをそれぞれ記憶するためである。なお、1フレーム分の記憶容量は、CCD303の画素数に対応する1600×1200画素分の画素データを記憶し得る容量である。
【0036】
また、ぼけ味調整モードにおいては、全体制御部250の制御により、A/D変換された画像データは上記黒レベル補正回路206、WB回路207及びγ補正回路208による所定の処理は行われずに画像メモリ209に記憶される。つまり、画像メモリ209には、A/D変換されただけのCCD−RAW形式の画像データが2フレーム分記憶されることとなる。これは、その後の画像処理(ぼけ味調整処理)に利用するため、画質の低下要因となり得る処理をできるだけ行わないようにするためである。
【0037】
LCDVRAM210は、LCD10に表示される画像データのバッファメモリである。LCDVRAM210は、LCD10の画素数400×300に対応した画像データの記憶容量を有している。EVFVRAM220は、EVF20に表示される画像データのバッファメモリである。EVFVRAM220は、EVF20の画素数640×480に対応した画像データの記憶容量を有している。
【0038】
また、撮影待機状態においては、撮像部3により1/30(秒)毎に撮像された画像の各画素データがA/D変換回路205〜γ補正回路208により所定の信号処理を施された後、画像メモリ209に一時記憶されるとともに、全体制御部250を介してLCDVRAM210、EVFVRAM220に転送され、LCD10やEVF20に表示される(ライブビュー表示)。
【0039】
これによって、ユーザは被写体像を視認することができる。また、再生モードにおいては、メモリカード8から読み出された画像が全体制御部250で所定の信号処理が施された後、LCDVRAM210に転送され、LCD10に再生表示される。EVF20でも同様の表示が行われる。
【0040】
カードI/F212は、メモリカード8への画像データの書込み及び画像データの読出しを行なうためのインターフィースである。また、通信用I/F224は、パーソナルコンピュータ225を通信可能に外部接続するための、例えばUSB規格に準拠したインターフェースである。このカードI/F212、通信用I/F224を介して、メモリカード8やCD−ROM等の記録媒体226に記録している制御プログラムを、全体制御部250のROM251内に取り込むことができる。
【0041】
RTC219は、撮影日時を管理するするための時計回路である。図示しない別の電源で駆動される。
【0042】
操作部211は、上述したシャッタボタン9、LCDボタン31、確定ボタン32などの各種ボタン、ボタンなどで構成されている。
【0043】
シャッタボタン9は、銀塩カメラで採用されているような半押し状態(S1)と押し込んだ状態(S2)とが検出可能な2段階ボタンになっている。待機状態でシャッタボタン9をS1状態にすると、AFのためのレンズ駆動を開始し、全体制御部250によって画像メモリ209内における画像のコントラストを評価しながら、コントラストがもっとも高くなるようにモータM1、M2により、レンズを駆動し停止させる。S1状態時の画像メモリ内の画像データのレベルを判定することで、シャッタースピード(SS)と絞り値を決定する。さらにホワイトバランスの補正値を決定する。
【0044】
ズーム制御回路307はズームモータM1の駆動を制御するものである。全体制御部250から入力されるズーム制御信号に基づいてズームモータM1を駆動し、ズームレンズ300をユーザによって指定された方向に移動させる。フォーカス制御回路308はフォーカスモータM2の駆動を制御するものである。全体制御部250から入力されるAF制御信号に基づいてフォーカスモータM2の駆動量を制御し、合焦レンズ301を焦点位置に設定する。
【0045】
全体制御部250は、マイクロコンピュータからなり、撮影機能及び再生機能を集中制御するものである。全体制御部250は、デジタルカメラ1の上述した各部材の駆動を制御したり取得された画像データを処理する制御プログラムが記憶されたROM251と、制御プログラムに従って数々の演算作業を行うための作業領域となるRAM252を備えている。
【0046】
図4において、露出設定部253、表示制御部254、記録制御部255、再生制御部256及び特殊撮影制御部257は、ROM251に記憶された制御プログラムに従って全体制御部250のCPU等によって演算処理されることにより実現される機能を機能ブロックとして表したものである。
【0047】
露出設定部253は、露出制御処理を行うもので、ライブビュー画像のGの色成分の画像データを用いて被写体の輝度を判定し、その判定結果に基づいて露出制御値(シャッタスピード(SS)と絞り値)を設定する。
【0048】
表示制御部254は、画像表示処理を行うもので、画像メモリ209に一時記憶されている画像データを読み出し、必要に応じて画像サイズを表示先の画像サイズに調整した後、VRAM210,220に転送する動作を行う。
【0049】
記録制御部255は、記録処理を行うものである。通常撮影モードにおいて、記録制御部255は、撮影指示後に画像メモリ209に一時記憶された画像データをRAM252に読み出し、2次元DTC変換、ハフマン符号化等のJPEG方式による所定の圧縮処理を行って記録用の撮影画像データとして作成する。また、画像メモリ209から縦横両方向でそれぞれ8画素毎に画素データをRAM252に読み出すことで、サムネイル画像を作成する。さらに、これらの記録用データに付随して記録される撮影画像データに関するタグ情報を作成する。そして、記録制御部255は、圧縮された高解像度の撮影画像データ及びサムネイル画像にタグ情報を添付した静止画像ファイルを作成し、メモリカード8に記録する。
【0050】
一方、ぼけ味調整モードにおいては、記録制御部255は、画像メモリ209に一時記憶された画像データ(A/D変換されただけのCCD−RAW形式データ)に対して、圧縮処理は行わず、そのまま記録用の撮影画像データとする。これは、上記JPEG方式による圧縮処理は、非可逆圧縮のため元画像の情報を損なうこととなり、処理後の画質が低下するためである。サムネイル画像及びタグ情報は通常撮影モードと同様に作成され、さらに、非圧縮のCCD−RAW形式の撮影画像データ及びサムネイル画像にタグ情報を添付した静止画像ファイルが作成され、メモリカード8に記録される。ぼけ味調整モードにおいては、2枚の撮影画像データが生じるのでそれぞれの撮影画像データに対して静止画像ファイルが作成されてメモリカード8に記録される。
【0051】
図5は、メモリカード8に記憶された静止画像ファイルの構成例を示すものである。図5において、「P000001.JPG」「P000002.JPG」等は、静止画像ファイル名を示している。同図の例においては静止画像ファイル名を「PL.M」で表記しており、「PL.M」の「L」は静止画像ファイルが作成された順番を示す6桁の番号であり、「M」は撮影画像データのデータ形式を示す拡張子である。「M」において「JPG」はJPEG形式で圧縮されて記録された撮影画像データであり、「RAW」はCCD−RAW形式で記録された撮影画像データである。通常撮影モードで撮影された撮影画像データは拡張子「JPG」となっており、ぼけ味調整モードにおいて撮影された撮影画像データは拡張子「RAW」となっている。
【0052】
また、「1b」,「2b」は、ぼけ味調整モードで撮影された静止画像ファイルのフォルダ名を示している。ぼけ味調整モードでは、1回のシャッタ操作で2つの静止画像ファイルが作成されるため、両静止画像ファイルを1つのフォルダにまとめてメモリカード8に記録するようになっている。図5の例においては、フォルダ名は「Nb」で表記しており、「N」はぼけ味調整モードにおける撮影順を示す番号を示している。従って、「1b」は、ぼけ味調整モードで最初に撮影された静止画像ファイルの組み合わせが格納されたフォルダであることを示している。
【0053】
図6は、メモリカード8への静止画像ファイルの記録方法を示す図である。メモリカード8の先頭の記憶領域には、フォルダ情報と各フォルダに属する静止画像ファイルの情報とを記憶するインデックス領域が設けられ、その後の領域に各静止画像ファイルが撮影された順に記憶されている。メモリカード8における各静止画像ファイルの記憶領域は3つの領域からなり、上から順にタグ情報、撮影画像データ及びサムネイル画像が記憶される。図に示すように、タグ情報には、カメラ名称、レンズ名称、撮影時の焦点距離、撮影時のF値、撮影モード、焦点位置、ファイル名、被写体輝度、ホワイトバランス調整値等の情報が含まれる。ここで撮影モードは、通常撮影モードで撮影されたものであるか、ぼけ味調整モードで撮影されたものであるかの情報を示すこととなる。
【0054】
再生制御部256は、メモリカード8に記録された撮影画像のLCD10への再生処理を行うものである。再生制御部256は、記録/再生モード設定ボタン14により再生モードが設定されると、メモリカード8に記録された各静止画像ファイルからサムネイル画像を読み出し、順次所定のインデックスフォーマットに従ってLCDVRAM210に記憶する。これにより、サムネイル画像がLCD10にインデックス表示される。
【0055】
インデックス表示されたサムネイル画像に対して再生すべきコマのサムネイル画像が4連ボタン35等の操作によって指定されると、再生制御部256は、そのコマに対応する静止画像ファイルから撮影画像データを読み出す。読み出したコマが、通常撮影モードで撮影されたものである場合は、圧縮された撮影画像データに所定の伸長処理を行い、画像メモリ209に記憶する。一方、ぼけ味調整モードで撮影されたものである場合は、圧縮されていないので撮影画像データをそのまま画像メモリ209に記憶する。画像メモリ209に記憶された撮影画像データは、表示制御部254によって画像サイズが調整された後に、LCDVRAM210に転送され、LCD10に表示されることとなる。
【0056】
特殊撮影制御部257は、撮影モードがぼけ味調整モードに設定されている場合の、デジタルカメラ1の各部材の駆動を制御するものである。特殊撮影制御部257は、シャッタボタン9がS2状態となると、ぼけ味調整用の2枚の画像データを取り込むため、それぞれフォーカスモータを駆動して焦点位置を変化させて、所定間隔でCCD303の露光動作を2回繰り返すように制御を行う。さらに、黒レベル補正回路206、WB回路207及びγ補正回路208に対して所定の処理を行わないように制御を行う。
【0057】
次に、上記のように構成されたデジタルカメラ1のぼけ味調整モードにおける撮影動作について説明する。図7は、ぼけ味調整モードでの静止画像の撮影手順を示すフローチャートである。
【0058】
ステップS11において、シャッタボタン9が半押し(S1状態)されるとデジタルカメラ1は静止画像の撮影のための準備を行う。まず、絞りの絞り値を開放絞り値(例えばF=2.8)に設定する(ステップS12)。ここで、絞り値を開放絞り値に設定するのは、被写界深度を浅くして合焦する対象距離以外の被写体をぼかすためである。
【0059】
続いて、撮影レンズの焦点が無限大になるように制御される。さらに、シャッタスピードに相当するCCD303の露光時間が設定され、ホワイトバランス調整値が設定される(ステップS13)。
【0060】
この状態でステップS14において、シャッタボタン9が全押し(S2状態)されると、CCD303によって設定された露光時間だけ露光して被写体の静止画像が取り込まれる。露光の後、CCD303から出力される画像信号は、信号処理回路313で所定のアナログ信号処理が施され、A/D変換回路205において10ビットの画素データに変換され、そのままCCD−RAW形式で画像メモリ209に記憶される(ステップS15)。この静止画像は、撮影レンズの焦点が無限大で撮影されたものであるため、背景等の遠景にピントが合っており近景はピンボケ状態となっている。
【0061】
続いて、全体制御部250の記録制御部255によって、タグ情報及びサムネイル画像が作成され、これらと画像メモリ209に記憶されたCCD−RAW形式の画像データから静止画像ファイルが作成される。そして、ぼけ味調整モードの撮影画像を格納するフォルダをメモリカード8に作成し、当該フォルダに生成された静止画像ファイルが記録される(ステップS16)。この静止画像ファイルのタグ情報の撮影モードには、「ぼけ味調整モード1/2」のように、ぼけ味調整モードにおいて1回目に撮影されたものである情報が付与される。また、タグ情報の焦点位置には「無限大」という情報が付与される。
【0062】
次に、撮影レンズの焦点が、近景の所定距離例えば1m先の被写体が合焦するように制御される(ステップS17)。なお、CCD303の露光時間及びホワイトバランス調整値は、1枚目の撮影時から変更されず、そのままの設定が用いられる。
【0063】
そして、CCD303によって設定された露光時間だけ露光して被写体の静止画像が取り込まれる。露光の後、1枚目の撮影時と同様に、信号処理回路313及びA/D変換回路205で所定の処理が行われ、画像メモリ209に記憶される(ステップS18)。この静止画像は、撮影レンズの焦点が1m先に制御されているので、人物等の近景にピントがほぼ合っており、遠景はピンボケ状態である。
【0064】
続いて、全体制御部250の記録制御部255によって、タグ情報及びサムネイル画像が作成され、これらと画像メモリ209に記憶されたCCD−RAW形式の画像データから静止画像ファイルが作成される。そして、1枚目の静止画像ファイルが格納されたフォルダと同一のフォルダに、生成された静止画像ファイルが記録される(ステップS19)。この静止画像ファイルのタグ情報の撮影モードには、「ぼけ味調整モード2/2」のように、ぼけ味調整モードにおいて2回目に撮影されたものである情報が付与される。また、タグ情報の焦点位置には「1m」という情報が付与される。
【0065】
なお、本実施の形態においては、1回目に遠景側に焦点を合わせた静止画像(遠景合焦画像)を撮影し、2回目に近景側に焦点を合わせた静止画像(近景合焦画像)を撮影しているが、撮影の順番はこの逆であってもよい。
【0066】
<2.ぼけ味調整処理>
ここで、上記のように撮影レンズの焦点位置を変更して撮影された2枚の静止画像を用いて任意の合焦位置の静止画像(以下、「ぼけ味調整画像」)を取得するぼけ味調整処理について簡単に説明する。なお、ここでは映像情報メディア学会誌Vol.51,No.12,pp.2072〜2081「反復法に基づく複数画像からの任意焦点画像の生成」に示されている手法を適用するものとする。
【0067】
図8は、ぼけ味調整処理に用いる2枚の静止画像を示したモデル図である。この説明においては、図8に示す2枚の画像Ir,Ifを用いてぼけ味調整画像Iの作成を行うものとする。図8(a)は近景に合焦した近景合焦画像Irを示しており、図8(b)は遠景に合焦した遠景合焦画像Ifを示している。また、円形状のものは近景の被写体、六角形状のものは遠景の被写体を表し、それぞれ実線は合焦状態、波線はぼけ状態を表している。
【0068】
ぼけ味調整処理は、基本的に、
(1)2枚の静止画像Ir,If間での位置合わせ処理
(2)所定の演算処理である画像合成処理によるぼけ味調整画像の作成
という2つの工程で行われる。以下、それぞれについて説明する。
【0069】
位置合わせ処理は、使用する2枚の静止画像の同一の図柄を正確に合成するために、両静止画像の位置を合わせるものである。これは、2枚の静止画像間には、撮影タイミングの違いよって微少な位置的相違が発生するためである。この位置合わせ処理は、画像全体の位置合わせ処理と、局所的な位置合わせ処理の2段階で行われる。
【0070】
画像全体の位置合わせ処理では、例えば近景合焦画像Irを基準として、遠景合焦画像Ifにおける拡大率、平行移動量、回転角等のパラメータを変更させながら、両画像Ir,Ifを比較して、両画像Ir,Ifが最も一致するパラメータの組み合わせを算出する。より具体的には、両画像の対応する各画素レベル差の2乗平均値ΔUを算出し、これらの総和ΣΔUを指標として、この総和ΣΔUが最小となるように最適な拡大率、平行移動量及び回転角等のパラメータの組み合わせを算出する。なお、近景合焦画像Irと遠景合焦画像Ifでは撮影時の焦点位置が異なることから、両画像Ir,Ifを直接比較すると誤差が生じる可能性がある。このため、最適なパラメータの組み合わせを求めるのに、階層化マッチング法を用いて算出する。算出されたパラメータで遠景合焦画像Ifを変換すると、近景合焦画像Irに対して画像全体の位置合わせの行われた遠景合焦画像Ifが得られる。
【0071】
局所的な位置合わせ処理では、近景合焦画像Irと画像全体の位置合わせ処理を行った遠景合焦画像Ifとの間で画素毎に位置ずれの補正を行う。この補正は近景合焦画像Irの画素位置(x,y)と、画像全体の位置合わせ処理を行った遠景合焦画像Ifの画素位置(x+m,y+n)を中心に、r×r画素内の両画像の対応する画素レベル差の2乗平均値を算出し、さらにr×r個の総和が最小となるパラメータ(m,n)を算出することによって行う。全ての画素に対してパラメータ(m,n)を算出し、このパラメータ(m,n)を用いて遠景合焦画像Ifを補正すると、最終的に近景合焦画像Irに対して位置合わせの行われた遠景合焦画像Ifが得られる。
【0072】
画像合成処理としては種々の方法が知られているが、本実施の形態では反復法を採用するため以下の説明では反復法について説明する。
【0073】
図8に示すように、近景合焦画像Irの合焦している近景領域を表す関数をf1(x,y)、遠景合焦画像Ifの合焦している遠景領域を表す関数をf2(x,y)とし、遠景合焦画像Ifの合焦していない近景領域のぼけ具合を表す関数をh1(x,y)、近景合焦画像Irの合焦していない遠景領域のぼけ具合を表す関数をh2(x,y)とすると、近景合焦画像Irを表す関数g1(x,y)は
g1(x,y)=f1(x,y)+h2(x,y)*f2(x,y) …(1)
で表され、遠景合焦画像Ifを表す関数g2(x,y)は
g2(x,y)=h1(x,y)*f1(x,y)+f2(x,y) …(2)
で表される。なお、これらの式において*はコンボリューションであり、以下の式においても同様である。
【0074】
一方、ぼけ味調整画像Iは近景合焦画像Irの近景領域をぼけ関数ha(x,y)でぼかした画像と、遠景合焦画像Ifの遠景領域をぼけ関数hb(x,y)でぼかした画像とを合成して作成されるとすると、ぼけ味調整画像Iを表す関数f(x,y)は、
f(x,y)=ha(x,y)*f1(x,y)+hb(x,y)*f2(x,y) …(3)
で表される。
【0075】
ここで、元画像Ir,Ifのぼけ関数h1,h2及びぼけ味調整画像Iのぼけ関数ha,hbは、
h(x,y)=(1/πR2)・exp(-(x2+y2)/R2) …(4)
R;ぼけ量(ぼけ半径)
の二次元ガウス関数において、ぼけ関数h1,h2に対するぼけ量R1,R2をRに代入して得られる撮影画像の場合、ぼけ量R1,R2は撮影時の撮影レンズの焦点位置によって規定される値となる。このため本実施の形態では、撮影時の情報を示す静止画像ファイルのタグ情報から、撮影レンズの種類と撮影レンズの焦点位置の情報を得て、予め設定されたテーブルを参照することにより、ぼけ関数h1,h2を取得するようにしている。また、ぼけ関数ha,hbに対するぼけ量をそれぞれRa,Rbとすると、ぼけ量Ra,Rbの設定値は、処理後に生成されるぼけ味調整画像Iのぼけ具合、すなわち、合焦位置を決定するものとなる。
【0076】
(1)〜(3)式からf1(x,y)、f2(x,y)を消去すると、近景合焦画像Irの関数g1(x,y)、遠景合焦画像Ifの関数g2(x,y)、ぼけ味調整画像Iの関数f(x,y)の関係式
(ha-hb*h1)*g1+(hb-ha*h2)*g2=(δ-h1*h2)*f …(5)
が得られる。なお、(5)式でδはディラックのデルタ関数である。また、(5)式では便宜上、関数表記の変数(x,y)部分を省略している。
【0077】
よって、(5)式を解くことによりぼけ味調整画像Iを示す関数fを得ることができる。反復法においては、(5)式において、左辺を
g=(ha-hb*h1)*g1+(hb-ha*h2)*g2 …(6)
とおき、fについてk回反復したものをf(k)とし、
f(k+1)=g+(h1*h2)*f(k) …(7)
に示すように反復演算すると、k→∞でf( )は式(5)を満足するfに収束することから、この反復演算を繰り返すことにより、任意の合焦位置のぼけ味調整画像Iが算出されることとなる。なおここで、初期値f(0)は、g1,g2,(g1+g2)/2等でよい。
【0078】
図9から図15は、ぼけ味調整処理において、上記ぼけ量Ra,Rbを変更することにより取得されたぼけ味調整画像Iの例を示す図である。図9は合焦位置が無限大、図10は合焦位置が20m、図11は合焦位置が10m、図12は合焦位置が5m、図13は合焦位置が2m、図14は合焦位置が1m、図15は合焦位置が0.5mにそれぞれ相当するぼけ味調整画像Iを示している。なお、これらの図のぼけ味調整画像Iにおいて、遠景の被写体である家屋A1は撮影距離が20mであり、中景の被写体である自動車A2は撮影距離が5mであり、近景の被写体である人物A3は撮影距離が1mである。
【0079】
例えば、図10(合焦位置20m)においては、撮影距離が20mの被写体である家屋A1に対して合焦状態となっているが、他の被写体に対してはピンボケ状態である。また、図12(合焦位置5m)においては、撮影距離が5mの被写体である自動車A2に対して合焦状態になっているが、他の被写体に対してはピンボケ状態である。また、図14(合焦位置1m)においては、撮影距離が1mの被写体である人物A3に対して合焦状態となっているが、他の被写体に対してはピンボケ状態である。
【0080】
また、図9から図15のぼけ味調整画像Iをこの順に比較すると、徐々に、遠景の被写体、中景の被写体、近景の被写体と合焦していくこととなる。つまり、遠景から近景に至って徐々に合焦位置が変化する動画像の画像ファイル(以下、「合焦変化動画」)は、図9から図15の例に示したようなぼけ味調整画像Iを連結することにより作成することが可能となる。なおここでは、説明のため7枚のぼけ味調整画像Iを例示したが、例示していない合焦位置のぼけ味調整画像Iを取得することも可能であることは言うまでもない。
【0081】
<3.動画像作成>
次に、前述したデジタルカメラ1のぼけ味調整モードにおいて撮影された2枚の静止画像(近景合焦画像及び遠景合焦画像)を用いてぼけ味調整処理を行い、合焦変化動画を作成する画像処理装置について説明する。
【0082】
図16は、合焦変化動画を作成する画像処理装置の構成を示す外観図である。図16に示すように、画像処理装置50は、パーソナルコンピュータ60とその出力装置であるプリンタ70とを備えている。
【0083】
パーソナルコンピュータ60は、コンピュータ本体61と、各種情報の表示を行うディスプレイ62と、ユーザからの入力を受け付けるキーボード63及びマウス64を備えている。また、コンピュータ本体61は、CD−ROM等の記録媒体90から各種データの読み取りを行う読取装置61a,61c及びデジタルカメラ等のメモリカードの読み取りを行うメモリカードリーダ61bを備えている。
【0084】
また、パーソナルコンピュータ60は、コンピュータ本体61内部の所定の記憶装置に、ぼけ味調整モードで撮影された2枚の静止画像から合焦変化動画を作成することが可能な処理プログラム(以下、「合焦変化動画作成プログラム」)を記憶している。パーソナルコンピュータ60は、所定の記憶装置からこの合焦変化動画作成プログラム読み出して実行することにより画像処理装置として機能することとなる。この動画作成プログラムは、当該プログラムが記録されたCD−ROM等の記録媒体90から読取装置61aまたは61bを介してコンピュータ本体61に予めインストールされている。なお、この合焦変化動画作成プログラムは、所定のサーバー記憶装置からインターネット等の通信回線を介してダウンロードされた後、インストールされるようになっていてもよい。
【0085】
図17は、パーソナルコンピュータ60において、合焦変化動画作成プログラムを実行した場合におけるディスプレイ62に表示される作業ウィンドウの一例を示す図である。作業ウィンドウ100には合焦変化動画の作成処理に関係する画像データ等を表示する3つの表示領域101〜103と、処理内容や処理条件等を指示するためのコマンドボタン104〜108が表示される。
【0086】
表示領域101及び表示領域102は画面上部に配置され、表示領域101には近景合焦画像のサムネイル画像が表示され、表示領域102には遠景合焦画像のサムネイル画像が表示される。また、表示領域103は表示領域101の下部に配置され、後述するぼけ味調整処理における処理結果が表示される。コマンドボタン104〜107は、表示領域102の下部に縦配列されて表示され、コマンドボタン108は表示領域101の下部に表示される。
【0087】
「ファイル」の表記されたコマンドボタン(以下、「ファイルボタン」)104は、合焦変化動画を作成する元となる2枚の静止画像ファイルを指定するためのものである。このファイルボタン04をクリックすることにより、フォルダ指定ウィンドウが開き、メモリカードリーダ61bに装着されたメモリカード等のぼけ味調整モードで撮影された静止画像ファイルが格納されたフォルダが表示される。ぼけ味調整モードで撮影された近景合焦画像及び遠景合焦画像は、同一フォルダ「Nb」内に含まれているため、フォルダの指定のみで両静止画像ファイルを指定することが可能である。
【0088】
このフォルダ指定ウィンドウにおいてユーザにより開くべきフォルダが指定されると、指定されたフォルダ内に含まれる両静止画像ファイルのタグ情報を参照し、ぼけ味調整モードで撮影されたものであるか否かを判別するようになっている。ぼけ味調整モードで撮影された静止画像ファイルにおいては、タグ情報の撮影モードに「ぼけ味調整モード1/2」もしくは「ぼけ味調整モード2/2」という情報が含まれているため、この情報を参照することでぼけ味調整モードで撮影されたものであるということが判別される。ぼけ味調整モードで撮影されたもので無い場合はその後の処理を行うことができないため、所定のエラーメッセージの表示を行い再度ユーザに開くべきフォルダの指定をさせるようになっている。
【0089】
「設定」と表記されたコマンドボタン(以下、「設定ボタン」)105は、作成する合焦変化動画の各種パラメータ設定を行うものである。設定ボタン105をクリックすると図18の如き設定ウィンドウ110がディスプレイ62に表示される。図18に示すように、設定ウィンドウ110では、作成する合焦変化動画のぼけ具合、フレーム数、再生時間、表示速度の各パラメータを設定可能な設定フォーム111〜114が表示される。
【0090】
ここで、本実施の形態で作成する合焦変化動画について簡単に説明する。図23は、作成する合焦変化動画の構成を示す図である。図に示すように、合焦変化動画はn枚(n>1)のフレームが連結された構成となっており、フレームのそれぞれは1枚の静止画像データ(ぼけ味調整画像)に対応する。合焦変化動画の再生を行うと、これらの静止画像データが1枚目のフレームF1から順にn枚目のフレームFnまで表示される。
【0091】
本実施の形態では、遠景から近景に徐々に合焦位置が変化する動画像を作成するため、1枚目のフレームF1は遠景に合焦した状態であり、近景は全てのフレーム中で最もぼけた状態となる。一方、n枚目のフレームFnは近景に合焦した状態であり、遠景は全てのフレーム中で最もぼけた状態となる。
【0092】
また、本実施の形態で作成される合焦変化動画は、再生時において各フレームを一定の時間T1秒毎に表示する。従って、合焦変化動画の再生時間T2秒はT2=T1×nの関係にあり、1秒間あたりに表示するフレーム数(fps)すなわち表示速度Vは、V=n/T2の関係にある。また、各フレームの表示時間T1は、表示速度Vの逆数になる。
【0093】
図18に戻り、設定フォーム111は、合焦変化動画のぼけ具体を決定するパラメータとなる近景最大ぼけ量raと遠景最大ぼけ量rbを設定するためのものである。これは、作成する1枚目のフレームF1の近景領域のぼけ量(前述Raに相当)を近景最大ぼけ量raとして、n枚目のフレームFnの遠景領域のぼけ量(前述Rbに相当)を遠景最大ぼけ量rbとして設定することとなる。
【0094】
図18に示すように、設定フォーム111は、2つのオプションボタン115,116と、2つの数値入力ボックス116a,116bとを備えている。「自動」と表記されたオプションボタン115が選択された場合は、近景最大ぼけ量ra及び遠景最大ぼけ量rbはそれぞれ予め設定されているデフォルト値、例えば「5」ピクセルと設定される。一方、「手動」と表記されたオプションボタン116が選択された場合は、数値入力ボックス116aに入力された値が近景最大ぼけ量raとして、数値入力ボックス116bに入力された値が遠景最大ぼけ量rbとしてそれぞれ設定される。
【0095】
設定フォーム112は合焦変化動画のフレーム数n、設定フォーム113は合焦変化動画の再生時間T2、設定フォーム114は合焦変化動画の表示速度Vのそれぞれのパラメータを設定するためのものである。これらのパラメータは、設定フォーム112〜114のそれぞれに備えられた数値入力ボックスに値が入力されることにより可変に設定される。なお、前述したように、V=n/T2の関係にあるため、設定フォーム112〜114のうち2つの数値入力ボックスに値が入力されれば、残りの1つは演算されて自動的に数値入力ボックスに表示されるようになっている。
【0096】
また、設定ウィンドウ110は、OKボタン117とキャンセルボタン118をさらに備えている。OKボタン117がクリックされた場合は、上記設定フォーム111〜117において入力された各パラメータが更新設定され、コンピュータ本体61内部の所定の記憶装置に記憶される。一方、キャンセルボタン118がクリックされた場合は、各パラメータの更新は行われない。
【0097】
図17に戻り、「実行」と表示されたコマンドボタン(以下、「実行ボタン」)106は、ぼけ味調整モードで撮影された2枚の画像を用いて実際に合焦変化動画の作成処理を実行するためのものである。この合焦変化動画の作成処理の詳細については後述する。
【0098】
「終了」と表示されたコマンドボタン(以下、「終了ボタン」)107は、合焦変化動画作成プログラムの実行を終了させるためのものである。この終了ボタン107がクリックされると、作業ウィンドウ100がクローズし全ての処理が終了する。
【0099】
「中止」と表示されたコマンドボタン(以下、「中止ボタン」)108は、合焦変化動画の作成処理を途中で中止させるためのものである。合焦変化動画の作成処理の処理時間は長時間となるため、何らかの理由によりユーザが強制的に処理を中止したい場合は、この中止ボタンをクリックすることにより中止することができる。
【0100】
次に、図19に示すフローチャートに従って、合焦変化動画の作成処理について説明する。
【0101】
まず、ユーザによりファイルボタン104がクリックされ、合焦変化動画の作成に使用する2枚の静止画像ファイルが格納されたフォルダの指定が行われる。開くべきフォルダが指定されると、指定されたフォルダに格納された2枚の静止画像ファイルからサムネイル画像がそれぞれ読み出され、作業ウィンドウ100の表示領域101,102に表示される(ステップS21,S22)。
【0102】
次に、ユーザにより設定ボタン105がクリックされ、作成する合焦変化動画の各種パラメータ設定が行われる。すなわち、近景最大ぼけ量ra、遠景最大ぼけ量rb、フレーム数n、再生時間T2及び再生速度Vのパラメータが設定される(ステップS23)。
【0103】
続いて、実行ボタン106が操作されたか否かが判別される(ステップS24)。ここで、実行ボタン106の操作がなければ、サムネイル画像が2枚表示された状態で、待機状態となる。この状態においては、ステップS23に戻り合焦変化動画の各種パラメータ設定を再度行うことが可能である。
【0104】
実行ボタン106が操作されると、二枚の指定された静止画像ファイルからそれぞれ撮影画像データ(近景合焦画像及び遠景合焦画像)が読み出される(ステップS25)。
【0105】
さらに、二枚の静止画像ファイルからタグ情報が読み出され、タグ情報に含まれる撮影レンズの撮影レンズの種類と撮影レンズの焦点位置の情報が取得される。取得された情報に基づいて、予め所定の記憶装置に記憶されたテーブルを参照し、読み出された遠景合焦画像における近景領域のぼけ量R1及び近景合焦画像における遠景領域のぼけ量R2が設定される(ステップS26)。
【0106】
続いて、まず、1枚目のフレームF1を作成するため、現在の作成しているフレーム番号を示すカウント値i(i=1,2,3,・・・・,n)が「1」にセットされる(ステップS27)。
【0107】
続いて、近景合焦画像と遠景合焦画像とを用いてぼけ味調整処理を行い合焦変化動画のフレームとなるぼけ味調整画像が作成される(ステップS28)。このフレーム作成処理は、作成するフレーム数nと同回数繰り返されることとなる。以下の説明においては、i枚目のフレームFiを作成するものとして説明する。
【0108】
図2は、このフレーム作成処理の流れを示すフローチャートである。まず、近景合焦画像と遠景合焦画像との前述した位置合わせ処理が行われ、最終的に近景合焦画像に対して位置合わせの行われた遠景合焦画像が得られる(ステップS41)。なお、この位置合わせ処理においては処理速度を向上させるため、近景合焦画像を基準とした遠景合焦画像の平行移動のみで行われてもよい。また、2枚目以降のフレーム作成時(i>1)においては、1枚目のフレーム作成時(i=1)に位置合わせ処理が行われているためこの処理は省略されるようになっていてもよい。
【0109】
続いて、作成するi枚目のフレームにおける近景領域のぼけ量Raと遠景領域のぼけ量Rbが設定される(ステップS42)。具体的には、ぼけ量Ra,Rbはそれぞれ、設定されたパラメータである最大ぼけ量ra,rbに基づく段階的な変化を規定する演算式
Ra=ra・(n−i)/(n−1)
Rb=rb・(i−1)/(nー1)
で算出されて設定される。
【0110】
例えば、i=1(1枚目のフレームF1)の場合は、Ra=ra,Rb=0となる。つまり、近景領域のぼけ量Raは近景最大ぼけ量raとなり、遠景領域のぼけ量Rbは「0」となるため、遠景に合焦し近景は最もぼけた状態となるように設定される。一方、i=n(n枚目のフレームFn)の場合は、Ra=0,Rb=rbとなる。つまり、近景領域のぼけ量Raは「0」となり、遠景領域のぼけ量Rbは遠景最大ぼけ量rbとなるため、近景に合焦し遠景は最もぼけた状態となるように設定される。また、1<i<nの場合は、フレームF1とフレームFnの中間的なぼけ状態となるようにそれぞれ設定が行われることとなる。
【0111】
続いて、反復法によりぼけ味調整画像を算出する際の反復演算回数をカウントするカウンタのカウント値jが「0」にセットされる(ステップS43)。続いて、前述したぼけ味調整処理の反復法における1回目の演算が行われ(ステップS44)、その演算結果のぼけ味調整画像が表示領域103に表示される(ステップS45)。
【0112】
続いて、中止ボタン108による処理の中止が指示されているか否かが判別され(ステップS46)、処理の中止が指示されている場合は、強制的に処理を中止し図19のステップS21に戻る。
【0113】
ステップS46において処理の中止が指示されていない場合は、反復演算結果が収束しているか否か(ステップS47)、反復演算回数のカウント値jが予め設定されている所定回数に達しているか否か(ステップS48)が順次判別される。反復演算結果が収束しておらず、反復演算回数のカウント値jが所定回数に達していなければ、カウント値jが1だけインクリメントされて(ステップS49)、ステップS44に戻り、次のぼけ味調整演算が行われる。
【0114】
一方、反復演算結果が収束した場合、または、反復演算回数のカウント値jが所定回数に達した場合は、演算結果であるぼけ味調整画像をフレームFiとして、フレーム作成処理を終了する。
【0115】
フレームFiの作成処理が終了すると、図19のステップS29において、作成中の動画像データにフレームFiが連結される。つまり、フレームが作成される毎に動画像データに連結され、順次、合焦変化動画が作成されていくこととなる。また、このとき同時に、再生速度Vの逆数が、フレームFiの再生すべきタイミング情報として付加される。なお、i=1の場合は連結する動画像データが無いためこの処理が行われることはない。
【0116】
続いて、現在作成しているフレーム番号のカウント値iがフレーム数nに達したか否かが判別され(ステップS30)、フレーム数nに達していなければ、カウント値iが1だけインクリメントされて(ステップS31)、ステップS28に戻り、次のフレームが作成されることとなる。
【0117】
図21は、合焦変化動画を作成中の作業ウィンドウ100の状態を示す図である。合焦変化動画の作成中においては、作業ウィンドウ100の下部に作成処理の進行状況を示すプログレスバー109aの表示とともに、合焦変化動画を作成中である旨のステイタス表示109bがなされる。ユーザは、この表示によって、作成処理の進行状況を認識することができる。なお、この作業ウィンドウ100に表示される中止ボタン108をクリックすれば強制的にこの処理を中止することとなる。
【0118】
以下、同様の処理で順次フレームが作成され、作成されたフレームは作成中の動画像データに連結されていく。中止ボタン108による処理の中止が指示されなければ、ステップS30においてフレーム番号のカウント値iがフレーム数nに達した時点で、合焦変化動画の作成が終了する。
【0119】
合焦変化動画が作成されると、図22に示すようにディスプレイ62に動画再生ウィンドウ120を表示させ、その表示領域121に作成された合焦変化動画が再生表示される(図19ステップS32)。動画再生ウィンドウ120の下部には、再生の進行状況を示すプログレスバー122aと再生中である旨のステイタス表示122bがなされる。ユーザは、この動画再生ウィンドウ120により作成された合焦変化動画を確認することが可能である。つまり、画像処理装置50は、合焦変化動画を表示する表示装置としても機能することとなる。
【0120】
続いて、合焦変化動画の再生が終了すると、当該合焦変化動画を保存するか否かを問い合わせる確認ダイアログが表示され、ユーザにより保存すると選択された場合は、当該合焦変化動画は所定の記憶手段に保存されることとなる(図19ステップS33,34)。
【0121】
<4.変形例>
以上、本発明の実施の形態について説明したが、この発明は上記実施の形態に限定されるものではない。
【0122】
上記実施の形態においては、合焦変化動画の作成をパーソナルコンピュータ60において合焦変化動画作成プログラムを実行させた画像処理装置50を利用していたが、上述した撮像手段を備えた画像処理装置であるデジタルカメラ1のROM251に合焦変化動画作成プログラムを記憶させ、デジタルカメラ1において当該プログラムを実行させて、合焦変化動画の作成を行うようにしてもよい。このような場合、作成された合焦変化動画がLCD10に表示されることによりデジタルカメラ1は表示装置としても機能することとなる。
【0123】
また、上記実施の形態における合焦変化動画は、遠景から近景に至って徐々に合焦位置が変化するものであったが、逆に、近景から遠景に至って徐々に合焦位置が変化するようなものであってもよい。このような場合、図20のステップS42におけるぼけ量Ra,Rbを算出する演算式を逆にすれば簡単に実現可能である。また、「遠景から近景」または「近景から遠景」という合焦方向をユーザにより設定できるようになっていてもよい。
【0124】
また、上記実施の形態においては、合焦変化動画の各フレームは、全てぼけ味調整処理の演算結果であるぼけ味調整画像によって構成されていたが、元の撮影画像データを含むようにしてもよい。例えば、1枚目のフレームF1に撮影画像データである遠景合焦画像を利用し、n枚目のフレームFnに撮影画像データである近景合焦画像を利用し、これらの中間にあたるフレームのみをぼけ味調整処理によって作成するようにしてもよい。合焦変化動画作成の処理時間は長時間となるが、このようにすれば、比較的処理時間を短くすることが可能である。
【0125】
【発明の効果】
以上、説明したように、請求項1ないし請求項5、請求項8および請求項9の発明によれば、それぞれ異なる合焦位置で撮影された2枚の静止画像から、徐々に合焦位置が変化する映像効果を有する動画像の画像ファイルを作成することができる。
【0126】
また、特に請求項2の発明によれば、操作ボタンの操作に応答して合焦位置を変化させ時間的に連続して撮影することができるため、異なる合焦位置の2枚の静止画像を簡易に取得することができる。
【0127】
また、特に請求項3の発明によれば、動画像の画像ファイルに含まれる静止画像のぼけ具合のパラメータを可変に設定することができるため、動画像の画像ファイルの映像効果におけるぼけ具合を可変に設定することができる。
【0128】
また、特に請求項4の発明によれば、動画像の画像ファイルを構成する静止画像群の画像数を可変に設定することができるため、動画像の画像ファイルの映像効果の段階を可変に設定することができる。
【0129】
また、特に請求項5の発明によれば、動画像の画像ファイルを構成する静止画像群の表示速度を可変に設定することができるため、動画像の画像ファイルの映像効果の表示速度を可変に設定することができる。
【0130】
また、請求項6および請求項7の発明によれば、それぞれ異なる合焦位置で撮影された2枚の静止画像から、徐々に合焦位置が変化する映像効果を表示することができる。
【0131】
また、特に請求項7の発明によれば、操作ボタンの操作に応答して合焦位置を変化させ時間的に連続して撮影することができるため、異なる合焦位置の2枚の静止画像を簡易に取得することができる。
【図面の簡単な説明】
【図1】静止画像を撮影するデジタルカメラの平面図である。
【図2】静止画像を撮影するデジタルカメラの断面図である。
【図3】静止画像を撮影するデジタルカメラの背面図である。
【図4】デジタルカメラの機能構成を示すブロック図である。
【図5】メモリカードへの静止画像ファイルの記録方法を示す図である。
【図6】メモリカードに記憶された静止画像ファイルの構成例を示す図である。
【図7】デジタルカメラのぼけ味調整モードにおける撮影手順を示す図である。
【図8】ぼけ味調整処理に使用される2枚の画像を示すモデル図である。
【図9】合焦位置無限大に相当するぼけ味調整画像の例を示す図である。
【図10】合焦位置20mに相当するぼけ味調整画像の例を示す図である。
【図11】合焦位置10mに相当するぼけ味調整画像の例を示す図である。
【図12】合焦位置5mに相当するぼけ味調整画像の例を示す図である。
【図13】合焦位置2mに相当するぼけ味調整画像の例を示す図である。
【図14】合焦位置1mに相当するぼけ味調整画像の例を示す図である。
【図15】合焦位置0.5mに相当する取得されたぼけ味調整画像の例を示す図である。
【図16】本発明の実施の形態に係る画像処理装置の構成を示す外観図である。
【図17】画像処理装置のディスプレイに表示された作業ウィンドウの一例を示す図である。
【図18】画像処理装置のディスプレイに表示された設定ウィンドウの一例を示す図である。
【図19】動画像の画像ファイルを作成する処理の手順を示す図である。
【図20】動画像を構成する各フレームを作成する処理の手順を示す図である。
【図21】動画像の画像ファイルを作成中の作業ウィンドウの状態を示す図である。
【図22】画像処理装置のディスプレイに表示された動画再生ウィンドウの一例を示す図である。
【図23】動画像の画像ファイルの構成を示す図である。
【符号の説明】
1 デジタルカメラ
8 メモリカード
9 シャッタボタン
50 画像処理装置
60 パーソナルコンピュータ
61 コンピュータ本体
62 ディスプレイ
70 プリンタ
90 記録媒体
100 作業ウィンドウ
110 設定ウィンドウ
120 動画再生ウィンドウ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing technique for generating a moving image having a video effect from a plurality of still images.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, moving image files having various video effects are created from still images taken with a digital camera or the like. Such an image file of a moving image is configured by connecting a plurality of still images each corresponding to one frame. Each of these still images has a relatively small difference in image data (symbols), and various video effects are expressed by being continuously displayed at predetermined time intervals. Become.
[0003]
[Problems to be solved by the invention]
By the way, as a video effect expressed by an image file of such a moving image, there is a demand for an in-focus position that gradually changes from a distant view to a close view or from a close view to a distant view. In order to generate a moving image file having such a video effect, a plurality of still images that have been photographed with respect to the same subject and whose focus position has changed relatively slightly are converted into a moving image file. It is necessary to prepare as many as the number of frames composing That is, still images at all the in-focus positions to be displayed are necessary.
[0004]
However, conventionally, in order to acquire the above-described plurality of still images, it has been necessary to perform imaging by changing the focal position of the imaging lens as many times as the number of frames required in a digital camera or the like that performs imaging.
[0005]
The present invention has been made in view of the above problems, and provides an image processing apparatus capable of creating an image file of a moving image having a video effect in which the focus position gradually changes from a small number of still images. For the purpose.
[0006]
[Means for Solving the Problems]
  In order to solve the above-mentioned problem, the invention according to claim 1 is the image processing apparatus, the first still image captured at the first focus position and the second focus position for the same subject. The second still image andAnd using a blur function that indicates the degree of blur caused by deviation from focus, In a third focusing position different from the first focusing position and the second focusing position.Should be obtained when shooting the subjectThe third still imageBy calculationFirst image generating means for generating;By activating the first image generation means while sequentially setting a plurality of in-focus positions as the third in-focus position, a plurality of third in which the degree of blur of the subject varies stepwise in order of frame numbers. A still image is generated, and a moving image is generated using the plurality of third still images.And second image generation means for generating.
[0007]
According to a second aspect of the present invention, in the image processing device according to the first aspect of the present invention, the image processing apparatus further includes an imaging unit that captures a still image, and the imaging unit responds to an operation of an operation button. An image and the second still image are taken continuously in time.
[0008]
  According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect of the present invention, the first image generation means is configured to store the third still image.Specify the degree of blur in the blur functionBlur parameter setting means for variably setting the parameters.
[0009]
  According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the second image generating means includesVideoConfigurePaintingImage number setting means for variably setting the number of images is provided.
[0010]
  The invention according to claim 5 is the image processing apparatus according to any one of claims 1 to 4, wherein the second image generating means isVideoDisplay speed setting means for variably setting the display speed.
[0011]
  According to a sixth aspect of the present invention, in the display device, a first still image captured at the first focus position with respect to the same subject, and a second still image captured at the second focus position,And using a blur function that indicates the degree of blur caused by deviation from focus, In a third focusing position different from the first focusing position and the second focusing position.Should be obtained when shooting the subjectThe third still imageBy calculationImage generating means for generating;By activating the image generation means while sequentially setting a plurality of in-focus positions as the third in-focus position, a plurality of third still images in which the degree of blur of the subject varies stepwise in order of frame numbers. And generating a moving image using the plurality of third still images.Output means for outputting and displaying.
[0012]
The invention according to claim 7 is the display device according to claim 6, further comprising an imaging unit that captures a still image, wherein the imaging unit responds to an operation of an operation button. And the second still image is taken continuously in time.
[0013]
  The invention according to claim 8 is executed by a computer included in the image processing apparatus in the program,The computer uses a first still image taken at the first in-focus position for the same subject and a second still image taken at the second in-focus position, and is out of focus. Should be obtained when the subject is photographed at a third in-focus position different from the first in-focus position and the second in-focus position. A step of generating a third still image by calculation, and activating the first image generation means while sequentially setting a plurality of in-focus positions as the third in-focus position; Generating a plurality of third still images that differ stepwise in order of frame numbers, and generating a moving image using the plurality of third still images..
[0014]
The invention according to claim 9 is characterized in that the program according to claim 8 is recorded in a recording medium.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0016]
<1. Still image shooting>
First, a digital camera that is an image processing apparatus including an imaging unit that captures a still image used for generating a moving image will be described.
[0017]
1-3 is a figure which shows the principal part structure of the digital camera 1, FIG. 1 is a top view, FIG. 2 is sectional drawing seen from the II-II position of FIG. 1, FIG. 3 is equivalent to a rear view. . These figures are not necessarily in accordance with the triangulation method, and are mainly intended to conceptually illustrate the main configuration of the digital camera 1.
[0018]
As shown in these drawings, the digital camera 1 has a structure roughly divided into a substantially rectangular parallelepiped camera body 2 and an imaging unit 3. A memory card 8 for recording a photographed image is detachably stored in the camera body 2. The digital camera 1 uses a power source battery E formed by connecting four AA batteries E1 to E4 in series as a drive source.
[0019]
The imaging unit 3 is provided with an imaging circuit 302 having a CCD color area sensor 303 at an appropriate position behind the lens group 30 with a macro function as a photographing lens. The lens group 30 includes a zoom lens 300 and a focusing lens 301.
[0020]
On the other hand, in the camera main body 2, the zoom position of the zoom lens 300 is changed and the focus position is changed by driving the zoom motor M <b> 1 for moving the lens between the accommodation position and the photographing position and the focusing lens 301. A focus motor M2 for performing the above is provided.
[0021]
A grip portion G is provided on the front surface of the camera body 2, and a pop-up built-in flash 5 is provided at an appropriate position on the upper end of the camera body 2. The flash 5 can be manually popped up and stored. A shutter button 9 is provided on the upper surface of the camera body 2.
[0022]
On the other hand, as shown in FIG. 3, a liquid crystal display (LCD) 10 capable of electronically displaying a live view display of a captured image and a recorded image, and an electronic viewfinder (EVF) 20 are provided on the back of the camera body 2. Is provided. The EVF 20 can display a captured image electronically via an eyepiece lens, and the LCD 10 can display the captured image electronically on a display screen larger than the EVF 20.
[0023]
A recording / playback mode setting button 14 for switching between “recording mode” and “playback mode” is provided on the back of the camera body 2. The recording mode is a mode in which a photograph is taken and a photographed image is recorded on the memory card 8, and the reproduction mode is a mode in which the photographed image recorded on the memory card 8 is reproduced and displayed on the LCD 10.
[0024]
A quadruple button 35 is provided on the right side of the back side of the digital camera 1. When the buttons L and R are pressed, the zoom motor M1 is driven to perform zooming, and in addition, the buttons U, D, L, and R are used. Perform various operations.
[0025]
Further, a cancel button 33, a confirmation button 32, a menu button 34 and an LCD button 31 are provided on the back of the camera body 2. The menu button 34 is for displaying a menu screen on the LCD 10. On this menu screen, a menu related to the functions of the digital camera 1 can be set by a user's operation input using the quad button 35 or the like. The cancel button 33 is a button for canceling the content selected on the menu screen, and the confirmation button 32 is a button for confirming the content selected on the menu screen. The LCD button 31 is a button for switching the LCD 10 display off and off.
[0026]
The user can select a shooting mode in the recording mode on the menu screen. The shooting mode of the digital camera 1 includes a normal shooting mode in which normal shooting is performed for each image, and a blur adjustment mode. In the blur adjustment mode, the focus position of the photographing lens is changed by one shutter operation, and the photographing operation is performed twice in succession, so that the photographed image focused on the foreground and the distant view are focused. In this mode, a captured image is acquired. A captured image captured in the blur adjustment mode is used to obtain a still image at an arbitrary in-focus position in an image processing apparatus described later.
[0027]
Next, the internal configuration of the digital camera 1 will be described. FIG. 5 is a schematic block diagram showing the internal configuration of the digital camera 1. In the figure, a CCD 303 converts an optical image of a subject formed by the lens group 30 into image signals of R (red), G (green), and B (blue) color components (pixel signals received by each pixel). Of the signal sequence) and output the result. The timing generator 314 generates various timing pulses for controlling the driving of the CCD 303.
[0028]
Exposure control in the imaging unit 3 is performed by adjusting the aperture of the lens group 30 by the aperture control driver 306 and the exposure amount of the CCD 303, that is, the charge accumulation time of the CCD 303 corresponding to the shutter speed. If the appropriate shutter speed cannot be set when the subject brightness is low, the inappropriate exposure due to insufficient exposure is corrected by adjusting the level of the image signal output from the CCD 303. That is, when the luminance is low, exposure control is performed by combining the shutter speed and gain adjustment. The level adjustment of the image signal is performed in the gain adjustment of the AGC circuit in the signal processing circuit 313.
[0029]
The timing generator 314 generates a drive control signal for the CCD 303 based on the reference clock transmitted from the timing control circuit 202. The timing generator 314 generates, for example, a clock signal such as a timing signal for integration start / end (exposure start / end), a read control signal (horizontal synchronization signal, vertical synchronization signal, transfer signal, etc.) of the light reception signal of each pixel, Output to the CCD 303.
[0030]
The signal processing circuit 313 performs predetermined analog signal processing on the image signal (analog signal) output from the CCD 303. The signal processing circuit 313 includes a CDS (correlated double sampling) circuit and an AGC (auto gain control) circuit. The CDS circuit reduces the noise of the image signal and adjusts the gain of the AGC circuit to thereby generate the image signal. Adjust the level.
[0031]
The light control circuit 304 controls the light emission amount of the built-in flash 5 in flash photography to a predetermined light emission amount set by the overall control unit 250. In flash photography, the reflected light of the flash light from the subject is received by the light control sensor at the same time as the exposure starts, and when the amount of received light reaches a predetermined light emission amount, a light emission stop signal is output from the light adjustment circuit 304. In response to the light emission stop signal, the light emission of the built-in flash 5 is forcibly stopped, whereby the light emission amount of the built-in flash 5 is controlled to a predetermined light emission amount.
[0032]
The A / D conversion circuit 205 converts each pixel signal of the image signal into a 10-bit digital signal. The A / D conversion circuit 205 converts each pixel signal (analog signal) into a 10-bit digital signal based on the A / D conversion clock input from the timing generation circuit.
[0033]
The timing generator 314 is provided with a timing control circuit 202 that generates a clock for the A / D conversion circuit 205. The timing control circuit 202 is controlled by a reference clock in the overall control unit 250.
[0034]
The black level correction circuit 206 corrects the black level of the A / D converted pixel signal to a reference black level. A WB (white balance) circuit 207 performs level conversion of pixel data of R, G, and B color components. The WB circuit 207 converts the level of the pixel data of each of the R, G, and B color components using the level conversion table input from the overall control unit 250. The parameters (characteristic gradients) of each color component in the level conversion table are set for each captured image by the overall control unit 250, either automatically or manually. The γ correction circuit 208 corrects the gradation of pixel data.
[0035]
The image memory 209 is a memory that temporarily stores image data for which signal processing has been completed. The image memory 209 has a capacity capable of storing image data for at least two frames. This is because in the blur adjustment mode, image data for two frames is captured by one shutter operation, and these are stored respectively. The storage capacity for one frame is a capacity capable of storing pixel data for 1600 × 1200 pixels corresponding to the number of pixels of the CCD 303.
[0036]
In the blur adjustment mode, the A / D converted image data is not subjected to predetermined processing by the black level correction circuit 206, WB circuit 207, and γ correction circuit 208 under the control of the overall control unit 250. Stored in the memory 209. That is, the image memory 209 stores two frames of image data in the CCD-RAW format that has only undergone A / D conversion. This is for the purpose of avoiding as much as possible processing that may cause a reduction in image quality because it is used for subsequent image processing (blur adjustment processing).
[0037]
The LCD VRAM 210 is a buffer memory for image data displayed on the LCD 10. The LCD VRAM 210 has a storage capacity for image data corresponding to the number of pixels 400 × 300 of the LCD 10. The EVFVRAM 220 is a buffer memory for image data displayed on the EVF 20. The EVFVRAM 220 has a storage capacity of image data corresponding to the number of pixels 640 × 480 of the EVF 20.
[0038]
Further, in the shooting standby state, after each pixel data of the image captured by the imaging unit 3 every 1/30 (seconds) is subjected to predetermined signal processing by the A / D conversion circuit 205 to the γ correction circuit 208. Are temporarily stored in the image memory 209, transferred to the LCD VRAM 210 and the EVF VRAM 220 via the overall control unit 250, and displayed on the LCD 10 and the EVF 20 (live view display).
[0039]
As a result, the user can visually recognize the subject image. In the reproduction mode, the image read from the memory card 8 is subjected to predetermined signal processing by the overall control unit 250, then transferred to the LCD VRAM 210, and reproduced and displayed on the LCD 10. A similar display is performed also in the EVF 20.
[0040]
The card I / F 212 is an interface for writing image data to the memory card 8 and reading image data. In addition, the communication I / F 224 is an interface compliant with, for example, the USB standard for externally connecting the personal computer 225 so as to allow communication. The control program recorded in the recording medium 226 such as the memory card 8 or the CD-ROM can be taken into the ROM 251 of the overall control unit 250 via the card I / F 212 and the communication I / F 224.
[0041]
The RTC 219 is a clock circuit for managing the shooting date and time. It is driven by another power source (not shown).
[0042]
The operation unit 211 includes various buttons and buttons such as the shutter button 9, the LCD button 31, and the confirmation button 32 described above.
[0043]
The shutter button 9 is a two-stage button capable of detecting a half-pressed state (S1) and a pressed-in state (S2) as used in a silver halide camera. When the shutter button 9 is set to the S1 state in the standby state, the lens driving for AF is started, and the overall control unit 250 evaluates the contrast of the image in the image memory 209, and the motor M1, The lens is driven and stopped by M2. By determining the level of the image data in the image memory in the S1 state, the shutter speed (SS) and aperture value are determined. Further, a white balance correction value is determined.
[0044]
The zoom control circuit 307 controls the driving of the zoom motor M1. The zoom motor M1 is driven based on the zoom control signal input from the overall control unit 250, and the zoom lens 300 is moved in the direction specified by the user. A focus control circuit 308 controls driving of the focus motor M2. The driving amount of the focus motor M2 is controlled based on the AF control signal input from the overall control unit 250, and the focusing lens 301 is set to the focal position.
[0045]
The overall control unit 250 is composed of a microcomputer and centrally controls the photographing function and the reproduction function. The overall control unit 250 includes a ROM 251 storing a control program for controlling driving of the above-described members of the digital camera 1 and processing acquired image data, and a work area for performing various arithmetic operations according to the control program. The RAM 252 is provided.
[0046]
In FIG. 4, an exposure setting unit 253, a display control unit 254, a recording control unit 255, a reproduction control unit 256, and a special photographing control unit 257 are arithmetically processed by the CPU of the overall control unit 250 according to a control program stored in the ROM 251. The function realized by this is expressed as a function block.
[0047]
The exposure setting unit 253 performs exposure control processing, determines the luminance of the subject using the image data of the G color component of the live view image, and determines the exposure control value (shutter speed (SS)) based on the determination result. And aperture value).
[0048]
The display control unit 254 performs image display processing, reads the image data temporarily stored in the image memory 209, adjusts the image size to the display destination image size as necessary, and transfers the image data to the VRAMs 210 and 220. To perform the operation.
[0049]
The recording control unit 255 performs a recording process. In the normal shooting mode, the recording control unit 255 reads the image data temporarily stored in the image memory 209 after the shooting instruction, reads the image data to the RAM 252, performs a predetermined compression process using the JPEG method such as two-dimensional DTC conversion and Huffman encoding, and records the data. Created as photographic image data for use. Also, a thumbnail image is created by reading out pixel data from the image memory 209 every 8 pixels in both the vertical and horizontal directions to the RAM 252. Further, tag information related to the photographed image data recorded accompanying these recording data is created. Then, the recording control unit 255 creates a still image file in which tag information is attached to the compressed high-resolution captured image data and thumbnail image, and records them in the memory card 8.
[0050]
On the other hand, in the blur adjustment mode, the recording control unit 255 does not perform compression processing on the image data temporarily stored in the image memory 209 (CCD-RAW format data that has only been A / D converted). The captured image data for recording is used as it is. This is because the compression processing by the JPEG method loses the information of the original image due to lossy compression, and the image quality after processing deteriorates. Thumbnail images and tag information are created in the same manner as in the normal shooting mode. Further, uncompressed CCD-RAW format shot image data and still image files with tag information attached to thumbnail images are created and recorded in the memory card 8. The In the blur adjustment mode, two pieces of photographed image data are generated, so that a still image file is created for each photographed image data and recorded in the memory card 8.
[0051]
FIG. 5 shows an example of the structure of a still image file stored in the memory card 8. In FIG. 5, “P000001.JPG”, “P000002.JPG”, and the like indicate still image file names. In the example of the figure, the still image file name is represented by “PL.M”, and “L” in “PL.M” is a 6-digit number indicating the order in which the still image files were created. “M” is an extension indicating the data format of the photographed image data. In “M”, “JPG” is photographed image data compressed and recorded in the JPEG format, and “RAW” is photographed image data recorded in the CCD-RAW format. The photographed image data photographed in the normal photographing mode has the extension “JPG”, and the photographed image data photographed in the blur adjustment mode has the extension “RAW”.
[0052]
“1b” and “2b” indicate the folder names of still image files shot in the blur adjustment mode. In the blur adjustment mode, since two still image files are created by one shutter operation, both still image files are collected in one folder and recorded on the memory card 8. In the example of FIG. 5, the folder name is represented by “Nb”, and “N” indicates a number indicating the shooting order in the blur adjustment mode. Therefore, “1b” indicates that the folder stores a combination of still image files first captured in the blur adjustment mode.
[0053]
FIG. 6 is a diagram illustrating a method of recording a still image file on the memory card 8. The top storage area of the memory card 8 is provided with an index area for storing folder information and information of still image files belonging to each folder, and each still image file is stored in the subsequent area in the order of shooting. . The storage area of each still image file in the memory card 8 is composed of three areas, and tag information, captured image data, and thumbnail images are stored in order from the top. As shown in the figure, the tag information includes information such as camera name, lens name, focal length at the time of photographing, F value at the time of photographing, photographing mode, focal position, file name, subject brightness, white balance adjustment value, and the like. It is. Here, the shooting mode indicates information indicating whether the shooting was performed in the normal shooting mode or the shooting was performed in the blur adjustment mode.
[0054]
The reproduction control unit 256 performs reproduction processing of the captured image recorded on the memory card 8 on the LCD 10. When the playback mode is set by the recording / playback mode setting button 14, the playback control unit 256 reads thumbnail images from each still image file recorded on the memory card 8 and sequentially stores them in the LCD VRAM 210 according to a predetermined index format. As a result, the thumbnail images are displayed as indexes on the LCD 10.
[0055]
When a thumbnail image of a frame to be reproduced is designated by the operation of the quadruple button 35 or the like with respect to the indexed thumbnail image, the reproduction control unit 256 reads captured image data from a still image file corresponding to the frame. . When the read frame is taken in the normal shooting mode, a predetermined expansion process is performed on the compressed shot image data, and the image memory 209 is stored. On the other hand, if the image was taken in the blur adjustment mode, the image data is stored in the image memory 209 as it is because the image is not compressed. The captured image data stored in the image memory 209 is transferred to the LCD VRAM 210 and displayed on the LCD 10 after the image size is adjusted by the display control unit 254.
[0056]
The special photographing control unit 257 controls driving of each member of the digital camera 1 when the photographing mode is set to the blur adjustment mode. When the shutter button 9 enters the S2 state, the special imaging control unit 257 captures two pieces of image data for blur adjustment so that the focus motor is driven to change the focal position, and the CCD 303 is exposed at predetermined intervals. Control is performed so that the operation is repeated twice. Further, the black level correction circuit 206, the WB circuit 207, and the γ correction circuit 208 are controlled not to perform predetermined processing.
[0057]
Next, the photographing operation in the blur adjustment mode of the digital camera 1 configured as described above will be described. FIG. 7 is a flowchart illustrating a procedure for capturing a still image in the blur adjustment mode.
[0058]
In step S11, when the shutter button 9 is half-pressed (S1 state), the digital camera 1 prepares for taking a still image. First, the aperture value of the aperture is set to an open aperture value (for example, F = 2.8) (step S12). Here, the reason why the aperture value is set to the full aperture value is to blur the subject other than the target distance to be focused by reducing the depth of field.
[0059]
Subsequently, the focus of the taking lens is controlled to be infinite. Further, the exposure time of the CCD 303 corresponding to the shutter speed is set, and a white balance adjustment value is set (step S13).
[0060]
In this state, when the shutter button 9 is fully pressed (state S2) in step S14, exposure is performed for the exposure time set by the CCD 303, and a still image of the subject is captured. After exposure, the image signal output from the CCD 303 is subjected to predetermined analog signal processing in the signal processing circuit 313, converted into 10-bit pixel data in the A / D conversion circuit 205, and is directly converted into an image in the CCD-RAW format. It is stored in the memory 209 (step S15). Since this still image was taken with the focus of the taking lens being infinite, the distant view such as the background is in focus and the close view is out of focus.
[0061]
Subsequently, the recording control unit 255 of the overall control unit 250 creates tag information and thumbnail images, and creates a still image file from these and image data in the CCD-RAW format stored in the image memory 209. Then, a folder for storing the captured image in the blur adjustment mode is created in the memory card 8, and the generated still image file is recorded in the folder (step S16). Information that is taken for the first time in the blur adjustment mode is added to the shooting mode of the tag information of the still image file, such as “blur adjustment mode 1/2”. Further, information of “infinity” is given to the focal position of the tag information.
[0062]
Next, the focus of the photographic lens is controlled so that a subject at a predetermined distance in the foreground, for example, 1 m away is in focus (step S17). Note that the exposure time and white balance adjustment value of the CCD 303 are not changed from when the first image was taken, but the settings are used as they are.
[0063]
Then, exposure is performed for the exposure time set by the CCD 303 to capture a still image of the subject. After exposure, as in the case of shooting the first image, predetermined processing is performed by the signal processing circuit 313 and the A / D conversion circuit 205 and stored in the image memory 209 (step S18). In this still image, since the focus of the taking lens is controlled 1 m ahead, the near view of a person or the like is almost in focus, and the distant view is out of focus.
[0064]
Subsequently, the recording control unit 255 of the overall control unit 250 creates tag information and thumbnail images, and creates a still image file from these and image data in the CCD-RAW format stored in the image memory 209. The generated still image file is recorded in the same folder in which the first still image file is stored (step S19). In the tag information shooting mode of the still image file, information that is taken for the second time in the blur adjustment mode is added, such as “bokeh adjustment mode 2/2”. Further, information “1 m” is given to the focus position of the tag information.
[0065]
In the present embodiment, a still image (distant view focused image) focused on the far view side is first photographed, and a still image (near view focused image) focused on the near view side is captured the second time. Although shooting is performed, the order of shooting may be reversed.
[0066]
<2. Defocus adjustment process>
Here, a still image (hereinafter referred to as “bokeh adjustment image”) at an arbitrary in-focus position is acquired using two still images captured by changing the focal position of the photographing lens as described above. The adjustment process will be briefly described. In this case, it is assumed that the technique shown in the Journal of the Institute of Image Information and Television Engineers Vol. 51, No. 12, pp. 2072 to 2081 “Generation of Arbitrarily Focused Image from Multiple Images Based on Iterative Method” is applied.
[0067]
FIG. 8 is a model diagram showing two still images used for the blur adjustment process. In this description, it is assumed that the blur adjustment image I is created using the two images Ir and If shown in FIG. FIG. 8A shows a foreground focused image Ir focused on a foreground, and FIG. 8B shows a distant focused image If focused on a far view. A circular shape represents a near-field subject, a hexagonal shape represents a distant subject, and a solid line represents a focused state and a wavy line represents a blurred state.
[0068]
The blur adjustment process is basically
(1) Positioning process between two still images Ir and If
(2) Creation of a blur adjustment image by image composition processing, which is predetermined calculation processing
It is performed in two steps. Each will be described below.
[0069]
  The alignment process aligns the positions of both still images in order to accurately synthesize the same pattern of the two still images to be used. This is the difference in shooting timing between the two still imagesInThis is because a slight positional difference occurs. This alignment process is performed in two stages, that is, an alignment process for the entire image and a local alignment process.
[0070]
In the alignment processing of the entire image, for example, the images Ir and If are compared while changing parameters such as an enlargement ratio, a parallel movement amount, and a rotation angle in the distant focused image If with reference to the foreground focused image Ir. Then, a combination of parameters in which both the images Ir and If are the best match is calculated. More specifically, the mean square value ΔU of the respective pixel level differences corresponding to both images is calculated, and using these sums ΣΔU as an index, an optimal enlargement ratio and parallel movement amount are set so that the sum ΣΔU is minimized. And a combination of parameters such as a rotation angle. Note that since the focus position at the time of shooting differs between the foreground in-focus image Ir and the foreground in-focus image If, an error may occur when the images Ir and If are directly compared. For this reason, in order to obtain the optimum combination of parameters, the calculation is performed using a hierarchical matching method. When the distant view focused image If is converted with the calculated parameters, the distant view focused image If obtained by aligning the entire image with the close view focused image Ir is obtained.
[0071]
In the local alignment process, a positional deviation is corrected for each pixel between the foreground focused image Ir and the distant view focused image If subjected to the alignment process for the entire image. This correction is performed within the r × r pixel centered on the pixel position (x, y) of the foreground in-focus image Ir and the pixel position (x + m, y + n) of the distant-focus image If for which the entire image has been aligned. The calculation is performed by calculating the mean square value of the corresponding pixel level differences between the two images, and further calculating the parameter (m, n) that minimizes the sum total of r × r. When the parameter (m, n) is calculated for all the pixels and the distant view focused image If is corrected using the parameter (m, n), the alignment row is finally aligned with the near view focused image Ir. A distant view focused image If is obtained.
[0072]
Various methods are known as image composition processing. Since the iterative method is adopted in the present embodiment, the following description will be made on the iterative method.
[0073]
As shown in FIG. 8, the function representing the in-focus area in the foreground focused image Ir is f1 (x, y), and the function representing the in-focus area in the distant in-focus image If is f2 ( x, y), h1 (x, y) is a function representing the degree of blurring of the unfocused foreground area of the distant focused image If, and the degree of blurring of the unfocused distant view area of the foreground focused image Ir is If the function to represent is h2 (x, y), the function g1 (x, y) representing the foreground focused image Ir is
g1 (x, y) = f1 (x, y) + h2 (x, y) * f2 (x, y) (1)
And the function g2 (x, y) representing the distant view focused image If is
g2 (x, y) = h1 (x, y) * f1 (x, y) + f2 (x, y) (2)
It is represented by In these formulas, * is a convolution, and the same applies to the following formulas.
[0074]
On the other hand, in the blur adjustment image I, an image obtained by blurring the foreground area of the foreground in-focus image Ir with the blur function ha (x, y) and a distant view area of the distant-focus image If if with the blur function hb (x, y). The function f (x, y) representing the blur adjustment image I is
f (x, y) = ha (x, y) * f1 (x, y) + hb (x, y) * f2 (x, y)… (3)
It is represented by
[0075]
  Here, the blur functions h1 and h2 of the original images Ir and If and the blur functions ha and hb of the blur adjustment image I are expressed as follows:
    h (x, y) = (1 / πR2) ・ Exp (-(x2+ Y2) / R2) …(Four)
      R: amount of blur (blur radius)
Is obtained by substituting R for the blur amounts R1 and R2 for the blur functions h1 and h2..In the case of a photographed image, the blur amounts R1 and R2 are values defined by the focal position of the photographing lens at the time of photographing. For this reason, in this embodiment, blurring is obtained by obtaining information about the type of the photographing lens and the focal position of the photographing lens from the tag information of the still image file indicating information at the time of photographing, and referring to a preset table. The functions h1 and h2 are acquired. Also, assuming that the blur amounts for the blur functions ha and hb are Ra and Rb, respectively, the set values of the blur amounts Ra and Rb determine the degree of blur of the blur adjustment image I generated after processing, that is, the in-focus position. It will be a thing.
[0076]
When f1 (x, y) and f2 (x, y) are deleted from the equations (1) to (3), the function g1 (x, y) of the foreground focused image Ir and the function g2 (x of the far view focused image If , y), a relational expression of the function f (x, y) of the blur adjustment image I
(ha-hb * h1) * g1 + (hb-ha * h2) * g2 = (δ-h1 * h2) * f… (5)
Is obtained. In Equation (5), δ is a Dirac delta function. Further, in the expression (5), the variable (x, y) portion in the function notation is omitted for convenience.
[0077]
Therefore, the function f indicating the blur adjustment image I can be obtained by solving the equation (5). In the iterative method, the left side in (5)
g = (ha-hb * h1) * g1 + (hb-ha * h2) * g2… (6)
And f repeated k times(k)age,
f(k + 1)= g + (h1 * h2) * f(k)  … (7)
When iterative calculation is performed as shown in, f → k → ∞( )Converges to f satisfying the expression (5), so that the blur adjustment image I at an arbitrary in-focus position is calculated by repeating this iterative calculation. Here, the initial value f(0)May be g1, g2, (g1 + g2) / 2 or the like.
[0078]
9 to 15 are diagrams illustrating examples of the blur adjustment image I acquired by changing the blur amounts Ra and Rb in the blur adjustment process. 9 is infinite, FIG. 10 is 20 m, FIG. 11 is 10 m, FIG. 12 is 5 m, FIG. 13 is 2 m, and FIG. 14 is in focus. FIG. 15 shows a blur adjustment image I corresponding to a focus position of 1 m and FIG. 15 corresponding to a focus position of 0.5 m. Note that, in the blur adjustment image I of these figures, the home A1, which is a distant subject, has a shooting distance of 20 m, and the automobile A2, which is a mid-range subject, has a shooting distance of 5 m, and is a person who is a close-up subject. A3 has a shooting distance of 1 m.
[0079]
For example, in FIG. 10 (in-focus position 20 m), the house A1 which is a subject with a shooting distance of 20 m is in focus, but the other subjects are out of focus. In FIG. 12 (in-focus position 5 m), the vehicle A2 which is a subject with a shooting distance of 5 m is in focus, but other subjects are out of focus. Further, in FIG. 14 (in-focus position 1 m), the person A3 who is a subject with a shooting distance of 1 m is in focus, but the other subjects are out of focus.
[0080]
Further, when the blur adjustment images I of FIGS. 9 to 15 are compared in this order, the object in the background, the object in the middle background, and the object in the foreground are gradually focused. That is, an image file of a moving image whose focus position gradually changes from a distant view to a close view (hereinafter referred to as “focus change moving image”) is obtained by converting the blur adjustment image I as shown in the examples of FIGS. It becomes possible to create by connecting. Here, for the sake of explanation, seven blur adjustment images I have been illustrated, but it is needless to say that blur adjustment images I at in-focus positions that are not illustrated can also be acquired.
[0081]
<3. Movie creation>
Next, blur adjustment processing is performed using the two still images (the foreground in-focus image and the distant background in-focus image) taken in the above-described blur adjustment mode of the digital camera 1 to create a focus change moving image. An image processing apparatus will be described.
[0082]
FIG. 16 is an external view showing a configuration of an image processing apparatus that creates a focus change moving image. As shown in FIG. 16, the image processing apparatus 50 includes a personal computer 60 and a printer 70 that is an output device thereof.
[0083]
The personal computer 60 includes a computer main body 61, a display 62 for displaying various information, a keyboard 63 and a mouse 64 for receiving input from the user. The computer main body 61 also includes readers 61a and 61c that read various data from a recording medium 90 such as a CD-ROM, and a memory card reader 61b that reads a memory card such as a digital camera.
[0084]
In addition, the personal computer 60 is a processing program (hereinafter referred to as “focusing program”) that can create a focus change movie from two still images shot in the blur adjustment mode in a predetermined storage device in the computer main body 61. A focal change movie creation program ") is stored. The personal computer 60 functions as an image processing device by reading out and executing this in-focus change moving image creating program from a predetermined storage device. This moving image creation program is installed in advance in the computer main body 61 via a reader 61a or 61b from a recording medium 90 such as a CD-ROM in which the program is recorded. The in-focus change movie creating program may be installed after being downloaded from a predetermined server storage device via a communication line such as the Internet.
[0085]
FIG. 17 is a diagram illustrating an example of a work window displayed on the display 62 when the in-focus change moving image creating program is executed in the personal computer 60. In the work window 100, three display areas 101 to 103 for displaying image data and the like related to the process of creating the in-focus moving image, and command buttons 104 to 108 for instructing processing contents and processing conditions are displayed. .
[0086]
The display area 101 and the display area 102 are arranged at the upper part of the screen. The display area 101 displays a thumbnail image of a foreground in-focus image, and the display area 102 displays a thumbnail image of a distant-focus image. The display area 103 is arranged below the display area 101, and displays a processing result in a blur adjustment process described later. The command buttons 104 to 107 are displayed vertically arranged below the display area 102, and the command buttons 108 are displayed below the display area 101.
[0087]
  A command button (hereinafter referred to as “file button”) 104 labeled “file” is for designating two still image files from which a focus-change moving image is created. This file button1By clicking 04, a folder designation window is opened, and a folder storing still image files shot in the blur adjustment mode such as a memory card attached to the memory card reader 61b is displayed. Since the foreground in-focus image and the far-in-focus image taken in the blur adjustment mode are included in the same folder “Nb”, both still image files can be specified only by specifying the folder.
[0088]
When a folder to be opened is designated by the user in this folder designation window, the tag information of both still image files included in the designated folder is referred to and whether or not the image is taken in the blur adjustment mode. It is to be determined. In the still image file shot in the blur adjustment mode, the information of “bokeh adjustment mode 1/2” or “bokeh adjustment mode 2/2” is included in the tag information shooting mode. , It is determined that the image was taken in the blur adjustment mode. If the image was not shot in the blur adjustment mode, the subsequent processing cannot be performed, so that a predetermined error message is displayed to allow the user to specify a folder to be opened again.
[0089]
A command button (hereinafter referred to as “setting button”) 105 described as “setting” is used to set various parameters of a focus change moving image to be created. When the setting button 105 is clicked, a setting window 110 as shown in FIG. As shown in FIG. 18, the setting window 110 displays setting forms 111 to 114 that can set parameters such as the degree of blur of the in-focus moving image to be created, the number of frames, the playback time, and the display speed.
[0090]
Here, the focus change moving image created in the present embodiment will be briefly described. FIG. 23 is a diagram illustrating a configuration of a focus change moving image to be created. As shown in the figure, the in-focus change video has a configuration in which n frames (n> 1) are connected, and each frame corresponds to one still image data (blur adjustment image). When the in-focus moving image is reproduced, these still image data are displayed from the first frame F1 to the nth frame Fn in order.
[0091]
In this embodiment, since a moving image in which the focus position gradually changes from a distant view to a foreground is created, the first frame F1 is in a state in which the distant view is in focus, and the foreground is the most blurred among all frames. It becomes a state. On the other hand, the nth frame Fn is in a state in which the near view is in focus, and the distant view is in the most blurred state in all frames.
[0092]
In addition, the focus-change moving image created in the present embodiment displays each frame at a certain time T1 seconds during reproduction. Accordingly, the reproduction time T2 seconds of the focus-changing moving image has a relationship of T2 = T1 × n, and the number of frames displayed per second (fps), that is, the display speed V has a relationship of V = n / T2. The display time T1 of each frame is the reciprocal of the display speed V.
[0093]
Returning to FIG. 18, the setting form 111 is used to set the near-field maximum blur amount ra and the far-field maximum blur amount rb that are parameters for determining the blur details of the in-focus moving image. This is based on the amount of blur in the foreground area of the first frame F1 to be created (corresponding to Ra described above) as the maximum foreground blur amount ra and the amount of blur in the distant region of the nth frame Fn (corresponding to Rb described above). This is set as the far-field maximum blur amount rb.
[0094]
As shown in FIG. 18, the setting form 111 includes two option buttons 115 and 116 and two numerical value input boxes 116a and 116b. When the option button 115 described as “automatic” is selected, the near-field maximum blur amount ra and the far-field maximum blur amount rb are set to preset default values, for example, “5” pixels. On the other hand, when the option button 116 described as “manual” is selected, the value input in the numerical value input box 116a is the foreground maximum blur amount ra, and the value input in the numerical value input box 116b is the maximum far view blur amount. Set as rb.
[0095]
The setting form 112 is for setting the number of frames n of the focus-changing moving image, the setting form 113 is for setting the playback time T2 of the focusing-change moving image, and the setting form 114 is for setting the display speed V of the focusing-change moving image. . These parameters are variably set by inputting values into numerical value input boxes provided in the setting forms 112 to 114, respectively. As described above, since there is a relationship of V = n / T2, if a value is input to two numerical value input boxes among the setting forms 112 to 114, the remaining one is calculated and automatically numerical values. It is displayed in the input box.
[0096]
The setting window 110 further includes an OK button 117 and a cancel button 118. When the OK button 117 is clicked, each parameter input in the setting forms 111 to 117 is updated and stored in a predetermined storage device inside the computer main body 61. On the other hand, when the cancel button 118 is clicked, each parameter is not updated.
[0097]
Returning to FIG. 17, the command button (hereinafter referred to as “execution button”) 106 displayed as “execution” actually performs the process of creating the in-focus moving image using the two images shot in the blur adjustment mode. It is for execution. The details of the process for creating the in-focus moving image will be described later.
[0098]
A command button (hereinafter referred to as “end button”) 107 displayed as “end” is for ending the execution of the focus change moving image creating program. When the end button 107 is clicked, the work window 100 is closed and all processing is completed.
[0099]
A command button (hereinafter referred to as “cancel button”) 108 displayed as “Cancel” is used to cancel the process of creating a focus-change moving image halfway. Since the processing time of the process for creating the in-focus moving image is long, if the user wants to forcibly stop the process for some reason, it can be stopped by clicking this stop button.
[0100]
Next, in-focus moving image creation processing will be described with reference to the flowchart shown in FIG.
[0101]
First, the user clicks the file button 104, and designates a folder in which two still image files used for creating a focus change moving image are stored. When the folder to be opened is specified, thumbnail images are read from the two still image files stored in the specified folder and displayed in the display areas 101 and 102 of the work window 100 (steps S21 and S22). ).
[0102]
Next, the setting button 105 is clicked by the user, and various parameters are set for the focus-changing moving image to be created. That is, the parameters of the near view maximum blur amount ra, the far view maximum blur amount rb, the number of frames n, the playback time T2, and the playback speed V are set (step S23).
[0103]
Subsequently, it is determined whether or not the execution button 106 has been operated (step S24). Here, if there is no operation of the execution button 106, it will be in a standby state in the state where two thumbnail images were displayed. In this state, it is possible to return to step S23 and perform various parameter settings for the in-focus moving image again.
[0104]
When the execution button 106 is operated, captured image data (a foreground in-focus image and a foreground in-focus image) are read from the two designated still image files (step S25).
[0105]
Further, tag information is read from the two still image files, and information on the type of the photographing lens of the photographing lens and the focal position of the photographing lens included in the tag information is acquired. Based on the acquired information, a table stored in advance in a predetermined storage device is referred to, and the read out distance in-focus image R1 in the distant view in-focus image and the distant view region in the distant-focus image R2 It is set (step S26).
[0106]
Subsequently, in order to create the first frame F1, the count value i (i = 1, 2, 3,..., N) indicating the currently created frame number is set to “1”. It is set (step S27).
[0107]
Subsequently, blur adjustment processing is performed using the foreground in-focus image and the distant view in-focus image, and a defocus adjustment image to be a frame of the in-focus change moving image is created (step S28). This frame creation process is repeated as many times as the number of frames to be created n. In the following description, it is assumed that the i-th frame Fi is created.
[0108]
  FIG.0These are flowcharts showing the flow of this frame creation processing. First, the above-described registration processing of the foreground in-focus image and the foreground in-focus image is performed, and finally a distant-in-focus image that is aligned with the foreground in-focus image is obtained (step S41). In addition, in this alignment process, in order to improve the processing speed, it may be performed only by the parallel movement of the distant view focused image with reference to the close view focused image. Further, when the second and subsequent frames are created (i> 1), this processing is omitted because the alignment process is performed when the first frame is created (i = 1). May be.
[0109]
Subsequently, the blur amount Ra of the foreground region and the blur amount Rb of the far view region in the i-th frame to be created are set (step S42). Specifically, the blur amounts Ra and Rb are arithmetic expressions that define stepwise changes based on the maximum blur amounts ra and rb, which are set parameters, respectively.
Ra = ra · (n−i) / (n−1)
Rb = rb · (i−1) / (n−1)
It is calculated and set by.
[0110]
For example, when i = 1 (first frame F1), Ra = ra and Rb = 0. That is, since the blur amount Ra of the foreground area is the maximum near-field blur amount ra and the blur amount Rb of the far-field area is “0”, it is set so that the distant view is focused and the foreground is in the most blurred state. On the other hand, when i = n (the nth frame Fn), Ra = 0 and Rb = rb. That is, the blur amount Ra of the foreground area is “0”, and the blur amount Rb of the distant view area is the maximum distant view blur rb, so that the near view is in focus and the far view is in the most blurred state. Further, when 1 <i <n, the setting is performed so that the blur state is intermediate between the frames F1 and Fn.
[0111]
Subsequently, the count value j of the counter that counts the number of iterations when calculating the blur adjustment image by the iterative method is set to “0” (step S43). Subsequently, the first calculation is performed in the above-described iterative method of the blur adjustment process (step S44), and the blur adjustment image of the calculation result is displayed in the display area 103 (step S45).
[0112]
Subsequently, it is determined whether or not an instruction to stop processing is instructed by the stop button 108 (step S46). If an instruction to stop processing is instructed, the processing is forcibly stopped and the process returns to step S21 in FIG. .
[0113]
If the stop of the process is not instructed in step S46, whether the iterative calculation result has converged (step S47), and whether the count value j of the number of repetitive calculations has reached a predetermined number set in advance. (Step S48) is sequentially determined. If the iterative calculation result has not converged and the count value j of the number of iterations has not reached the predetermined number, the count value j is incremented by 1 (step S49), and the process returns to step S44 to adjust the next blur. An operation is performed.
[0114]
On the other hand, when the result of the iterative calculation converges or when the count value j of the number of times of the repeated calculation reaches a predetermined number, the frame creation process is terminated with the blur adjustment image as the result of the calculation as the frame Fi.
[0115]
When the creation process of the frame Fi is completed, the frame Fi is connected to the moving image data being created in step S29 of FIG. That is, every time a frame is created, it is linked to the moving image data, and a focus-changing moving image is created sequentially. At the same time, the reciprocal of the reproduction speed V is added as timing information to be reproduced for the frame Fi. If i = 1, there is no moving image data to be connected, so this process is not performed.
[0116]
Subsequently, it is determined whether or not the count value i of the currently created frame number has reached the frame number n (step S30). If the frame number n has not been reached, the count value i is incremented by one. (Step S31), the process returns to step S28, and the next frame is created.
[0117]
FIG. 21 is a diagram illustrating a state of the work window 100 in which a focus change moving image is being created. During the creation of the in-focus change movie, a progress bar 109a indicating the progress of the creation process is displayed at the bottom of the work window 100, and a status display 109b indicating that the in-focus change movie is being created. From this display, the user can recognize the progress of the creation process. Note that if the cancel button 108 displayed on the work window 100 is clicked, this process is forcibly stopped.
[0118]
Thereafter, frames are sequentially created by the same processing, and the created frames are connected to the moving image data being created. If the stop button 108 is not instructed to stop the process, the creation of the in-focus change movie ends when the frame number count value i reaches the frame number n in step S30.
[0119]
When the focus-changing moving image is created, a moving-image playback window 120 is displayed on the display 62 as shown in FIG. 22, and the created focus-changing moving image is played back and displayed in the display area 121 (step S32 in FIG. 19). . At the bottom of the moving image playback window 120, a progress bar 122a indicating the progress of playback and a status display 122b indicating that playback is in progress are made. The user can confirm the in-focus moving image created by the moving image playback window 120. That is, the image processing device 50 also functions as a display device that displays a focus change moving image.
[0120]
Subsequently, when the reproduction of the focus change video is finished, a confirmation dialog for inquiring whether or not to save the focus change video is displayed. When the user selects to save, the focus change video It is stored in the storage means (steps S33 and S34 in FIG. 19).
[0121]
<4. Modification>
As mentioned above, although embodiment of this invention was described, this invention is not limited to the said embodiment.
[0122]
In the above-described embodiment, the focus change moving image is generated using the image processing device 50 in which the personal computer 60 executes the focus change moving image generation program. However, the image processing device including the above-described imaging unit is used. A focusing change moving image creation program may be stored in the ROM 251 of a certain digital camera 1, and the digital camera 1 may execute the program to create a focusing change moving image. In such a case, the created in-focus moving image is displayed on the LCD 10, so that the digital camera 1 also functions as a display device.
[0123]
In addition, the in-focus moving image in the above-described embodiment is such that the in-focus position gradually changes from the distant view to the foreground, but conversely, the in-focus position gradually changes from the foreground to the distant view. It may be a thing. In such a case, it can be easily realized by reversing the arithmetic expression for calculating the blur amounts Ra and Rb in step S42 in FIG. Further, the user may be able to set the in-focus direction “from distant view to near view” or “from close view to distant view”.
[0124]
Further, in the above embodiment, each frame of the in-focus moving image is configured by the blur adjustment image that is the calculation result of the blur adjustment process. However, the original captured image data may be included. For example, a distant-focus image that is captured image data is used for the first frame F1, and a near-focus image that is captured image data is used for the n-th frame Fn, and only the intermediate frame is blurred. You may make it produce by a taste adjustment process. Although the processing time for creating the in-focus moving image is long, in this way, the processing time can be relatively shortened.
[0125]
【The invention's effect】
As described above, according to the inventions of claims 1 to 5, 8 and 9, the in-focus position is gradually determined from two still images taken at different in-focus positions. An image file of a moving image having a changing video effect can be created.
[0126]
In particular, according to the invention of claim 2, since it is possible to shoot continuously in time by changing the focus position in response to the operation of the operation button, it is possible to capture two still images at different focus positions. It can be obtained easily.
[0127]
In particular, according to the invention of claim 3, since the blur parameter of the still image included in the moving image file can be set variably, the blur in the video effect of the moving image file can be changed. Can be set to
[0128]
Further, according to the invention of claim 4, since the number of still images constituting the moving image file can be set variably, the stage of the video effect of the moving image file can be set variably. can do.
[0129]
In particular, according to the invention of claim 5, since the display speed of the still image group constituting the moving image file can be set variably, the display speed of the video effect of the moving image file can be changed. Can be set.
[0130]
According to the sixth and seventh aspects of the present invention, it is possible to display a video effect in which the in-focus position gradually changes from two still images taken at different in-focus positions.
[0131]
In particular, according to the seventh aspect of the present invention, since the in-focus position can be changed in response to the operation of the operation button and images can be continuously captured in time, two still images at different in-focus positions can be captured. It can be obtained easily.
[Brief description of the drawings]
FIG. 1 is a plan view of a digital camera that captures a still image.
FIG. 2 is a cross-sectional view of a digital camera that captures a still image.
FIG. 3 is a rear view of a digital camera that captures a still image.
FIG. 4 is a block diagram illustrating a functional configuration of the digital camera.
FIG. 5 is a diagram illustrating a method of recording a still image file on a memory card.
FIG. 6 is a diagram illustrating a configuration example of a still image file stored in a memory card.
FIG. 7 is a diagram illustrating a shooting procedure in a blur adjustment mode of the digital camera.
FIG. 8 is a model diagram showing two images used for blurring adjustment processing.
FIG. 9 is a diagram illustrating an example of a blur adjustment image corresponding to an in-focus position of infinity.
FIG. 10 is a diagram illustrating an example of a blur adjustment image corresponding to a focus position of 20 m.
FIG. 11 is a diagram illustrating an example of a blur adjustment image corresponding to a focus position of 10 m.
FIG. 12 is a diagram illustrating an example of a blur adjustment image corresponding to a focus position of 5 m.
FIG. 13 is a diagram illustrating an example of a blur adjustment image corresponding to a focus position of 2 m.
FIG. 14 is a diagram illustrating an example of a blur adjustment image corresponding to a focus position of 1 m.
FIG. 15 is a diagram illustrating an example of an acquired blur adjustment image corresponding to a focus position of 0.5 m.
FIG. 16 is an external view showing a configuration of an image processing apparatus according to an embodiment of the present invention.
FIG. 17 is a diagram illustrating an example of a work window displayed on the display of the image processing apparatus.
FIG. 18 is a diagram illustrating an example of a setting window displayed on the display of the image processing apparatus.
FIG. 19 is a diagram illustrating a processing procedure for creating an image file of a moving image.
FIG. 20 is a diagram illustrating a procedure of processing for creating each frame constituting a moving image.
FIG. 21 is a diagram illustrating a state of a work window during creation of a moving image file.
FIG. 22 is a diagram illustrating an example of a moving image playback window displayed on the display of the image processing apparatus.
FIG. 23 is a diagram illustrating a configuration of an image file of a moving image.
[Explanation of symbols]
1 Digital camera
8 Memory card
9 Shutter button
50 Image processing device
60 Personal computer
61 Computer body
62 display
70 Printer
90 recording media
100 working window
110 Settings window
120 Movie playback window

Claims (9)

画像処理装置であって、
同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより
前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を撮影した場合に得られるべき第3静止画像を演算によって生成する第1の画像生成手段と、
前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記第1の画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いて動画像を生成する第2の画像生成手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus,
The first still image captured at the first in-focus position for the same subject and the second still image captured at the second in-focus position are used, and blur caused by deviation from the in- focus position is used. By using a blur function that indicates the degree ,
First image generation for generating a third still image to be obtained when the subject is photographed at a third in-focus position different from the first in-focus position and the second in-focus position by calculation. Means,
By activating the first image generation means while sequentially setting a plurality of in-focus positions as the third in-focus position, a plurality of third in which the degree of blur of the subject varies stepwise in order of frame numbers. Second image generating means for generating a still image and generating a moving image using the plurality of third still images ;
An image processing apparatus comprising:
請求項1に記載の画像処理装置において、
静止画像を撮影する撮像手段、
をさらに備え、
前記撮像手段は、操作ボタンの操作に応答して前記第1静止画像と前記第2静止画像を時間的に連続して撮影することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
Imaging means for capturing still images;
Further comprising
The image processing device is characterized in that the imaging means captures the first still image and the second still image sequentially in response to an operation of an operation button.
請求項1または2に記載の画像処理装置において、
前記第1の画像生成手段は、前記第3静止画像の前記ぼけ関数においてぼけの程度を指定するパラメータを可変に設定するぼけパラメータ設定手段、を備えていることを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The image processing apparatus according to claim 1, wherein the first image generation unit includes a blur parameter setting unit that variably sets a parameter that specifies a degree of blur in the blur function of the third still image.
請求項1ないし3のいずれかに記載の画像処理装置において、
前記第2の画像生成手段は、前記動画像を構成する画像数を可変に設定する画像数設定手段、を備えていることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 3,
The second image generating means, an image processing apparatus characterized by comprising an image number setting unit that variably sets the picture number image that make up the moving picture.
請求項1ないし4のいずれかに記載の画像処理装置において、
前記第2の画像生成手段は、前記動画像の表示速度を可変に設定する表示速度設定手段、を備えていることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The image processing apparatus, wherein the second image generating means includes display speed setting means for variably setting the display speed of the moving image .
表示装置であって、
同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより
前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を撮影した場合に得られるべき第3静止画像を演算によって生成する画像生成手段と、
前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いた動画像を出力して表示させる出力手段と、
を備えることを特徴とする表示装置。
A display device,
The first still image captured at the first in-focus position for the same subject and the second still image captured at the second in-focus position are used, and blur caused by deviation from the in- focus position is used. By using a blur function that indicates the degree ,
Image generating means for generating, by calculation, a third still image to be obtained when the subject is photographed at a third in-focus position different from the first in-focus position and the second in-focus position;
By activating the image generating means while sequentially setting a plurality of in-focus positions as the third in-focus position, a plurality of third still images in which the degree of blur of the subject varies stepwise in order of frame numbers Output means for generating and outputting a moving image using the plurality of third still images ;
A display device comprising:
請求項6に記載の表示装置において、
静止画像を撮影する撮像手段、
をさらに備え、
前記撮像手段は、操作ボタンの操作に応答して前記第1静止画像と前記第2静止画像を時間的に連続して撮影することを特徴とする表示装置。
The display device according to claim 6,
Imaging means for capturing still images;
Further comprising
The display device is characterized in that the first still image and the second still image are taken continuously in time in response to an operation of an operation button.
画像処理装置に含まれるコンピュータによって実行されることにより、前記コンピュータに、
同一被写体に対して第1の合焦位置で撮影された第1静止画像と、第2の合焦位置で撮影された第2静止画像とを使用し、かつ合焦からのずれによって生じるぼけの程度を示すぼけ関数を用いることにより、
前記第1の合焦位置および前記第2の合焦位置とは別の第3の合焦位置で前記被写体を 撮影した場合に得られるべき第3静止画像を演算によって生成する工程と、
前記第3の合焦位置として複数の合焦位置を順次に設定しつつ前記第1の画像生成手段を能動化することにより、前記被写体のぼけ具合がフレーム番号順に段階的に異なる複数の第3静止画像を生成させ、当該複数の第3静止画像を用いて動画像を生成する工程と、
を実行させることを特徴とするプログラム。
By being executed by a computer included in the image processing apparatus ,
The first still image captured at the first in-focus position for the same subject and the second still image captured at the second in-focus position are used, and blur caused by deviation from the in-focus position is used. By using a blur function that indicates the degree,
Generating a third still image by calculation to be obtained when the subject is photographed at a third in-focus position different from the first in-focus position and the second in-focus position ;
By activating the first image generation means while sequentially setting a plurality of in-focus positions as the third in-focus position, a plurality of third in which the degree of blur of the subject varies stepwise in order of frame numbers. Generating a still image and generating a moving image using the plurality of third still images; and
A program characterized by having executed .
請求項8に記載のプログラムを記録してあることを特徴とするコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium on which the program according to claim 8 is recorded.
JP2001087827A 2001-03-26 2001-03-26 Image processing apparatus, display apparatus, program, and storage medium Expired - Fee Related JP3678160B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001087827A JP3678160B2 (en) 2001-03-26 2001-03-26 Image processing apparatus, display apparatus, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001087827A JP3678160B2 (en) 2001-03-26 2001-03-26 Image processing apparatus, display apparatus, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2002290831A JP2002290831A (en) 2002-10-04
JP3678160B2 true JP3678160B2 (en) 2005-08-03

Family

ID=18943019

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001087827A Expired - Fee Related JP3678160B2 (en) 2001-03-26 2001-03-26 Image processing apparatus, display apparatus, program, and storage medium

Country Status (1)

Country Link
JP (1) JP3678160B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986854A (en) * 2013-02-07 2014-08-13 佳能株式会社 Image processing apparatus, image capturing apparatus, and control method

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004304763A (en) 2003-03-14 2004-10-28 Casio Comput Co Ltd Image compositing apparatus, image compositing method and program
JP4186699B2 (en) 2003-05-16 2008-11-26 株式会社ニコン Imaging apparatus and image processing apparatus
US11232768B2 (en) 2005-04-12 2022-01-25 Douglas G. Richardson Embedding animation in electronic mail, text messages and websites
JP4622809B2 (en) * 2005-10-28 2011-02-02 株式会社ニコン Imaging device
JP2007184733A (en) * 2006-01-05 2007-07-19 Fujifilm Corp Imaging apparatus and photographing mode display method
JP4821350B2 (en) * 2006-02-08 2011-11-24 カシオ計算機株式会社 Camera apparatus and camera control program
JP4868075B2 (en) * 2009-10-09 2012-02-01 株式会社ニコン Imaging device
JP5120356B2 (en) * 2009-10-13 2013-01-16 株式会社ニコン Imaging device
JP5299529B2 (en) 2011-03-29 2013-09-25 株式会社ニコン Imaging device
JP6138222B2 (en) * 2012-02-20 2017-05-31 キヤノン株式会社 Image processing apparatus, imaging apparatus, control method, and program
JP5854984B2 (en) * 2012-02-20 2016-02-09 キヤノン株式会社 Image processing apparatus, imaging apparatus, control method, and program
JP6160996B2 (en) * 2012-09-12 2017-07-12 パナソニックIpマネジメント株式会社 Imaging device
CN104662888B (en) * 2012-09-18 2018-01-02 富士胶片株式会社 Still image display device and system and camera device
KR102257620B1 (en) * 2014-03-20 2021-05-28 엘지전자 주식회사 Display device and method for controlling the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986854A (en) * 2013-02-07 2014-08-13 佳能株式会社 Image processing apparatus, image capturing apparatus, and control method
US10855903B2 (en) 2013-02-07 2020-12-01 Canon Kabushiki Kaisha Image processing apparatus, image capturing apparatus, control method and recording medium

Also Published As

Publication number Publication date
JP2002290831A (en) 2002-10-04

Similar Documents

Publication Publication Date Title
JP3539394B2 (en) Image processing apparatus, program, and recording medium
JP4904108B2 (en) Imaging apparatus and image display control method
JP4567593B2 (en) Imaging apparatus and imaging method
JP5893713B1 (en) Imaging apparatus, imaging method, and processing program
US7199829B2 (en) Device and method for processing unprocessed image data based on image property parameters
JP4979969B2 (en) Imaging apparatus and imaging method
JP4379728B2 (en) Imaging apparatus and program thereof
JP3678160B2 (en) Image processing apparatus, display apparatus, program, and storage medium
US20020171747A1 (en) Image capturing apparatus, and method of display-control thereof
JP4654887B2 (en) Imaging device
JP2001177741A (en) Electronic camera and display system
JP3395770B2 (en) Digital still camera
KR101700366B1 (en) Digital photographing apparatus and control method thereof
JP2006033241A (en) Image pickup device and image acquiring means
JP5578442B2 (en) Imaging apparatus, image composition method, and program
JP2008306651A (en) Imaging system and program
JP2002112008A (en) Image processing system and recording medium recording image processing program
JP3859131B2 (en) Digital camera
JP2009058834A (en) Imaging apparatus
JP4683337B2 (en) Image display device and image display method
JP2009071592A (en) Imaging apparatus and imaging control method
JP3444281B2 (en) IMAGE PROCESSING SYSTEM, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROCESSING PROGRAM OF THE METHOD
WO2008035635A1 (en) Imaging device and focus control program
JP6706167B2 (en) Imaging device, image synthesizing method, and program
JP3601500B2 (en) Digital camera

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040511

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040709

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040712

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040712

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050502

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100520

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100520

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110520

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120520

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130520

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees