JP4340836B2 - Image composition apparatus and image composition program - Google Patents

Image composition apparatus and image composition program Download PDF

Info

Publication number
JP4340836B2
JP4340836B2 JP2002209529A JP2002209529A JP4340836B2 JP 4340836 B2 JP4340836 B2 JP 4340836B2 JP 2002209529 A JP2002209529 A JP 2002209529A JP 2002209529 A JP2002209529 A JP 2002209529A JP 4340836 B2 JP4340836 B2 JP 4340836B2
Authority
JP
Japan
Prior art keywords
image
images
main subject
creating
image composition
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
JP2002209529A
Other languages
Japanese (ja)
Other versions
JP2004056359A (en
Inventor
文博 舟崎
征和 西嶋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2002209529A priority Critical patent/JP4340836B2/en
Publication of JP2004056359A publication Critical patent/JP2004056359A/en
Application granted granted Critical
Publication of JP4340836B2 publication Critical patent/JP4340836B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は画像合成装置及び画像合成プログラムに係り、特に連続撮影された複数枚の画像を合成して合成画像を作成する技術に関する。
【0002】
【従来の技術】
従来、撮影した撮影画像とメモリに記録した記録画像とを合成したり、メモリに記録した2枚の記録画像を合成して多重露光合成やクロマキー合成する電子カメラが提案されている(特開平6−189255号公報)。
【0003】
また、連続撮影された複数枚の画像からそれぞれ主要被写体を抽出し、これらの抽出した各フレーム間の主要被写体の画像の変化部分(差分画像)を求めてメモリに記録し、これらの差分画像を合成することで、少ないメモリ容量で多重露光画像(合成画像)を得る電子カメラが提案されている(特開2001−28726号公報)。
【0004】
【発明が解決しようとする課題】
しかしながら、特開平6−189255号公報に記載の電子カメラは、2枚の画像を合成(加算による合成又はクロマキー合成)するものであり、動画のような連続撮影された複数枚の画像を合成するものではない。また、加算による画像合成の場合、加算枚数が多くなると、主要被写体などの動きによって画像がぼけ、良質な画像が得られないという問題がある。
【0005】
また、特開2001−28726号公報に記載の電子カメラは、主要被写体の差分画像をとるため、動き部分が薄まり、それを加算して電子的に多重露光画像合成するため、更にぼけた画像となり、良質な画像が得られないという問題がある。
【0006】
本発明はこのような事情に鑑みてなされたもので、連続撮影された複数枚の画像から良質な多重露光画像を得ることができる画像合成装置及び画像合成プログラムを提供することを目的とする。
【0007】
【課題を解決するための手段】
前記目的を達成するために請求項1に係る画像合成装置は、連続撮影された複数枚の画像から主要被写体を抽出する抽出手段と、前記抽出手段によって抽出した主要被写体のみ画素値をもつ複数の画像を時系列順に順次上乗せ合成してなる上乗せ画像を作成する画像合成手段であって、前記主要被写体のみ画素値をもつ複数の画像の同一座標位置の画素を、複数の画像毎に相対的にずらしてメモリ上に上乗せマッピングすることにより前記上乗せ画像を作成する画像合成手段と、を備えたことを特徴としている。
【0008】
即ち、複数の画像を加算した通常の多重露光画像を得るのではなく、連続撮影された複数枚の画像からそれぞれ抽出した主要被写体のみ画素値をもつ複数の画像を、画像をずらしながら時系列順に順次上乗せ合成することで、上乗せ画像(合成画像)を作成するようにしている。これにより、主要被写体の動きが明瞭に分かる合成画像を作成することができ、特に、主要被写体の画像を適宜ずらしながら上乗せ合成することにより、主要被写体の画像の重なる部分を少なくすることができ、連続する個々の主要被写体の画像がより明瞭になる。
【0010】
請求項に示すように前記画像合成手段は、前記上乗せ画像を所定の背景画に上乗せ合成してなる合成画像を作成することを特徴としている。
【0011】
請求項3に係る発明は、連続撮影された複数枚の画像を合成してなる合成画像を作成するための画像合成プログラムであって、コンピュータに、前記連続撮影された複数枚の画像から主要被写体を抽出する機能と、前記抽出した主要被写体のみ画素値をもつ複数の画像を時系列順に順次上乗せ合成してなる上乗せ画像を作成する画像合成機能であって、前記主要被写体のみ画素値をもつ複数の画像の同一座標位置の画素を、複数の画像毎に相対的にずらしてメモリ上に上乗せマッピングすることにより前記上乗せ画像を作成する画像合成機能と、を実現させることを特徴としている。
【0012】
前記画像合成プログラムは、連続撮影が可能な電子カメラ内のアプリケーションソフトとして使用され、又は連続撮影された画像の保存や表示等が可能なパソコン等のアプリケーションソフトとして使用される。
【0013】
【発明の実施の形態】
以下、添付図面に従って本発明に係る画像合成装置及び画像合成プログラムの好ましい実施の形態について詳説する。
【0014】
図1は本発明に係る画像合成プログラムを有するパーソナル・コンピュータ(以下、「パソコン」という)のハードウェア構成例を示すブロック図である。
【0015】
図1に示すようにパソコン1は、主として各構成要素の動作を制御する中央処理装置(CPU)10と、装置の制御プログラムが格納されたり、プログラム実行時の作業領域となる主メモリ12と、パソコン1のオペレーティングシステム(OS)、パソコン1に接続された周辺機器のデバイスドライバ、本発明に係る画像合成プルグラムを含む各種のアプリケーションソフト、ユーザの画像等が格納されるハードディスク装置14と、CD−ROMドライブ16と、表示用データを一時記憶する表示メモリ18と、この表示メモリ18からの画像データ、文字データ等により画像や文字等を表示するCRTモニタや液晶モニタ等のモニタ装置20と、キーボード22と、位置入力装置としてのマウス24と、マウス24の状態を検出してモニタ装置20上のマウスポインタの位置やマウス24の状態等の信号をCPU10に出力するマウスコントローラ26と、デジタルカメラ2と接続して画像データ等の入力が可能なUSB(Universal Serial Bus)などのインターフェース27と、上記各構成要素を接続するバス28とから構成されている。
【0016】
尚、上記構成のパソコン1は、ハードディスク装置14に格納されている、本発明に係る画像合成処理を行うための画像合成プログラムを除いて周知のものであるため、各構成要素の詳細な説明については省略する。この画像合成プログラムは、例えば、デジタルカメラ2の購入時に同梱されているCD−ROMなどに記録されており、このCD−ROMをパソコン1のCD−ROMドライブ16にセットすることにより、パソコン1にインストールすることができる。また、図示しない通信手段を介して画像合成プログラムを提供するサーバからダウンロードすることもできる。
【0017】
次に、上記パソコン1に接続されるデジタルカメラ2による撮影からパソコン1へのデータ転送について説明する。
(ステップS1)
デジタルカメラ2を三脚等に固定し、被写体の入っていない静止画を撮影する。この撮影した静止画を、背景画としてカメラ内のメモリカードにJPEG形式などの静止画ファイル形式で保存する。
(ステップS2)
ステップS1での静止画の撮影に引き続き、デジタルカメラ2を固定した状態で被写体をフレーム撮像にて動画撮影を行う。撮影した動画を、カメラ内のメモリカードにMotion JPEG 形式などの動画ファイル形式、もしくは連続する静止画ファイル形式で保存する。
(ステップS3)
撮影終了後のデジタルカメラ2を図1に示すようにパソコン1に接続し、デジタルカメラ2内のメモリカードに保存した静止画ファイル、動画ファイルをパソコン1に転送してハードディスク装置14に保存する。
【0018】
次に、パソコン1での画像合成処理について、図2に示すフローチャートを参照しながら説明する。
【0019】
まず、本発明に係る画像合成処理プログラムを起動すると、パソコン1のモニタ装置20には、背景画となる静止画ファイルや、画像合成する動画ファイルを選択するための画面が表示され(図示せず)、この画面上で所望の静止画ファイルと動画ファイルとを選択する(ステップS10、S11)。
【0020】
続いて、ステップS11で選択した動画ファイルから処理対象となるn枚の静止画を選択し、この選択したn枚の静止画を、動画ファイルから切り出して連続する静止画として再保存する(ステップS12、S13)。尚、n枚の静止画は、任意の数値nを入力し、動画ファイルからn枚の静止画を等間隔で自動的に選択するようにしてもよいし、動画の各コマ画像を見ながら手動で1枚ずつ選択するようにしてもよい。あるいは、動画中のある期間を指定し、その期間内のすべてのコマ画像を選択するようにしてもよい。
【0021】
次に、n枚の静止画のうちの処理する静止画の番号iを1(i=1)にする(ステップS14)。尚、n枚の静止画は、時系列順に1〜nの番号が付されているものとする。
【0022】
処理対象のi番目の静止画から主要被写体を抽出する(ステップS15)。主要被写体の抽出は、ステップS10で選択した背景画に基づいて行う。即ち、i番目の静止画と背景画の同位置の画素間の色空間距離(それぞれの画素のR、G、Bデータの差分値の合計)を算出し、算出結果が規定値以上の画素を主要被写体候補画素として抽出する。
【0023】
このようにして抽出した主要被写体候補画素群に対し、連結化等の画像処理を施し、ノイズ画素除去を行って主要被写体のみの画像を得る。この主要被写体のみの画像を、元の静止画と同じ画素サイズにして主メモリ12に保存する。即ち、元の静止画の主要被写体以外の領域は、画素値をもたない画素(例えば、R、G、B=(-1,-1,-1)) で埋めて元の静止画と同じ画素サイズにする。
【0024】
次に、ステップS15で抽出した主要被写体のみ画素値をもつ画像を、主メモリ12の1フレーム分の合成画像用のメモリ領域に上乗せマッピングして主要被写体の上乗せ合成を行う(ステップS16)。即ち、連続するi番目の画像iとi+1番目の画像(i+1)のそれぞれ同じ座標 (x,y) の画素が重なるようにマッピングした後、両画像の画素の画素値が重なる部分に関しては、画像(i+1)の画素値が採用されるように上乗せ後の画素値を決める。尚、1番目の静止画から抽出した主要被写体のみの画像の場合には、そのままメモリ上にマッピングする。
【0025】
上記上乗せ合成のアルゴリズムを以下に示す。
【0026】
画像iと画像(i+1)の各画素をスキャンし、上乗せ後の合成画像compの各画素値(Rcomp,Gcomp,Bcomp) を決める。便宜上、ここでは主要被写体の画素以外の画素値を(R,G,B) =(-1 、-1、-1) と定義する。
【0027】
画像iの画素と画像(i+1)の同位置の画素がともに主要被写体の画素値を持つ場合には、画像(i+1)の画素値を採用する。即ち、
(Ri,Gi,Bi)≠(-1 、-1、-1) かつ(Ri+1,Gi+1,Bi+1)≠(-1 、-1、-1) の画素
→(Rcomp,Gcomp,Bcomp) =(Ri+1,Gi+1,Bi+1)
画像iの画素が主要被写体の画素値を持たず、画像(i+1)の同位置の画素が主要被写体の画素値を持つ場合には、画像(i+1)の画素値を採用する。即ち、
(Ri,Gi,Bi)=(-1 、-1、-1) かつ(Ri+1,Gi+1,Bi+1)≠(-1 、-1、-1) の画素
→(Rcomp,Gcomp,Bcomp) =(Ri+1,Gi+1,Bi+1)
画像iの画素が主要被写体の画素値を持ち、画像(i+1)の同位置の画素が主要被写体の画素値を持たない場合には、画像iの画素値を採用する。即ち、
(Ri,Gi,Bi)≠(-1 、-1、-1) かつ(Ri+1,Gi+1,Bi+1)=(-1 、-1、-1) の画素
→(Rcomp,Gcomp,Bcomp) =(Ri,Gi,Bi)
画像iの画素と画像(i+1)の同位置の画素がともに主要被写体の画素値を持たない場合には、上乗せ後も画素値を持たない値(-1 、-1、-1) にする。即ち、
(Ri,Gi,Bi)=(-1 、-1、-1) かつ(Ri+1,Gi+1,Bi+1)=(-1 、-1、-1) の画素
→(Rcomp,Gcomp,Bcomp) =(-1 、-1、-1)
上記のようにしてi番目の画像の主要被写体の上乗せ合成が終了すると、n枚分の上乗せ合成が終了したか否かを判別し(ステップS17)、終了していない場合(i<n)には、iを1だけインクリメントし(ステップS18)、ステップS15に戻る。これにより、時系列順の次の静止画に対して上記と同様な主要被写体の抽出処理、及び主要被写体の上乗せ合成が行われる。
【0028】
n枚分の上乗せ合成が終了した場合(i=n)には、上乗せ画像を背景画に上乗せ合成する(ステップS19)。即ち、上乗せ画像中の画素値がない部分を、すべて背景画の画素で埋める。
【0029】
このようにして作成された合成画像は、ハードディスク装置14に保存され、又はモニタ装置20に表示され、あるいは図示しないプリンタによってプリント出力される。
【0030】
図3は上記のようにして作成された合成画像の作成イメージ図である。
【0031】
次に、主要被写体の画像の上乗せ合成の他の実施の形態について説明する。
【0032】
まず、n枚の静止画からそれぞれ主要被写体を抽出するまで処理は、上記と同様にして行う。このようにして抽出した主要被写体の画像を内側に含む最小矩形を算出し、この最小矩形内の画像(矩形画像)をメモリ上に保存する。
【0033】
図4(A)及び(B)に示す画像は、それぞれi番目の矩形画像iとi+1番目の矩形画像(i+1)である。
【0034】
次に、矩形画像iの座標(xi,i )と、矩形画像(i+1)の座標(xi+1,i+1)が重なるように画素をマッピングする。
【0035】
例えば、各矩形画像の下側で揃え、矩形画像iの右側半分に矩形画像(i+1)が重なるように上乗せ合成する際には、矩形画像iの横幅をMax-xiとすると、矩形画像(i+1)の各画素の座標(xi+1,i+1)のx座標にMax-xi/2を加算して、右側にずれた座標(xi+1 +Max-xi/2, i+1)に変換する。その後、同じ座標の画素が重なるようにマッピングした後、両画像の画素の画素値が重なる部分に関しては、画像(i+1)の画素値が採用されるように上乗せ後の画素値を決める。
【0036】
このようにして図4(A)に示す矩形画像iに対して同図(B)に示す矩形画像(i+1)を右側にずらして上乗せ合成することにより、同図(C)に示す合成画像が得られる。
【0037】
このような上乗せ合成をn枚の矩形画像(1〜n)に対して順次行うことにより、図5に示すような合成画像を作成することができる。
【0038】
尚、この実施の形態では、動画とは別に、主要被写体の入っていない静止画(背景画)を撮影するようにしたが、これに限らず、主要被写体の入っていない動画を撮影し、その動画の1コマを背景画として採用してもよい。また、動画から複数枚の静止画を取得するようにしたが、これに限らず、連続する複数枚の画像は、所定のインターバルで連続的に撮影する連写モードで撮影された複数枚の静止画でもよい。
【0039】
また、画像から主要被写体を抽出する方法としては、例えば、ブルーバックなどの特定色のスクリーンを背景にして主要被写体を撮影し、この撮影した画像から特定色に基づいて主要被写体を抽出するクロマキー処理によって抽出する方法を採用してもよいし、画像中の主要被写体の画素の1つをポイントし、そのポイントされた画素の連続性等から主要被写体の輪郭を求め、その輪郭に基づいて主要被写体を抽出する方法を採用してもよい。これらの主要被写体の抽出方法の場合には、主要被写体を抽出するために主要被写体が入っていない背景画を別途撮影する必要がない。
【0040】
更に、本発明に係る画像合成処理装置は、上記画像合成処理プログラムを有するパソコンに限らず、デジタルカメラ内の画像合成処理機能として追加されたものでもよい。
【0041】
【発明の効果】
以上説明したように本発明によれば、複数の画像を加算した通常の多重露光画像を得るのではなく、連続撮影された複数枚の画像からそれぞれ抽出した主要被写体のみの複数の画像を、時系列順に順次上乗せ合成して上乗せ画像(合成画像)を作成するようにしたため、主要被写体の動きが明瞭に分かる良質な合成画像を作成することができる。
【0042】
また、主要被写体の画像をずらさずに上乗せ合成する場合の他に、適宜ずらしながら上乗せ合成してもよく、この場合には、主要被写体の画像の重なる部分を少なくすることができ、連続する個々の主要被写体の画像がより明瞭になる。
【図面の簡単な説明】
【図1】本発明に係る画像合成プログラムを有するパソコンのハードウェア構成例を示すブロック図
【図2】本発明に係る画像合成処理手順の一例を示すフローチャート
【図3】複数の主要被写体の画像をそれぞれ同位置で上乗せ合成した合成画像の作成イメージ図
【図4】主要被写体の画像をずらして上乗せ合成する方法を説明するために用いた図
【図5】複数の主要被写体の画像をそれぞれずらして上乗せ合成した合成画像の作成イメージ図
【符号の説明】
1…パソコン、2…デジタルカメラ、10…中央処理装置、12…主メモリ、14…ハードディスク装置、20…モニタ装置、22…キーボード、24…マウス、27…インターフェース
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image synthesizing apparatus and an image synthesizing program, and more particularly to a technique for creating a synthesized image by synthesizing a plurality of continuously shot images.
[0002]
[Prior art]
Conventionally, there has been proposed an electronic camera that synthesizes a photographed image and a recorded image recorded in a memory, or synthesizes two recorded images recorded in a memory to perform multiple exposure composition or chroma key composition (Japanese Patent Laid-Open No. Hei 6). -189255).
[0003]
Also, the main subject is extracted from each of the continuously shot images, and the changed portion (difference image) of the main subject image between the extracted frames is obtained and recorded in the memory. There has been proposed an electronic camera that obtains a multiple exposure image (composite image) with a small memory capacity by combining (Japanese Patent Laid-Open No. 2001-28726).
[0004]
[Problems to be solved by the invention]
However, the electronic camera described in Japanese Patent Laid-Open No. 6-189255 synthesizes two images (synthesis by addition or chroma key synthesis), and synthesizes a plurality of images taken continuously such as a moving image. It is not a thing. In addition, in the case of image composition by addition, when the number of additions increases, there is a problem that the image is blurred due to the movement of the main subject or the like and a high-quality image cannot be obtained.
[0005]
In addition, the electronic camera described in Japanese Patent Application Laid-Open No. 2001-28726 takes a difference image of the main subject, so that the moving part is thinned and added to synthesize the multiple exposure image electronically, resulting in a further blurred image. There is a problem that a high-quality image cannot be obtained.
[0006]
The present invention has been made in view of such circumstances, and an object of the present invention is to provide an image composition apparatus and an image composition program that can obtain a high-quality multiple exposure image from a plurality of continuously photographed images.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, an image synthesizing apparatus according to claim 1 includes an extraction unit that extracts a main subject from a plurality of continuously shot images, and a plurality of pixel values that have only pixel values of the main subject extracted by the extraction unit. Image synthesizing means for creating an added image obtained by sequentially adding and synthesizing images in time series, wherein the pixels at the same coordinate position of a plurality of images having pixel values only for the main subject are relatively set for each of the plurality of images. And image compositing means for creating the added image by shifting and mapping on the memory.
[0008]
That is, instead of obtaining a normal multiple exposure image obtained by adding a plurality of images, a plurality of images each having a pixel value of only a main subject extracted from a plurality of images taken continuously are shifted in time series while shifting the images. An overlay image (composite image) is created by sequentially overlaying and compositing. This makes it possible to create a composite image that clearly shows the movement of the main subject.In particular, by overlaying and combining the main subject images as appropriate, the overlapping portion of the main subject images can be reduced. The image of each continuous main subject becomes clearer.
[0010]
According to a second aspect of the present invention, the image synthesizing unit creates a synthesized image formed by superimposing the superimposed image on a predetermined background image.
[0011]
According to a third aspect of the present invention, there is provided an image composition program for creating a composite image formed by combining a plurality of continuously shot images, wherein a main subject is obtained from the plurality of continuously shot images. And an image composition function for creating an added image obtained by sequentially adding and synthesizing a plurality of images having pixel values only in the extracted main subject in time series, and a plurality of images having pixel values only in the main subject. The image synthesizing function for creating the added image is realized by mapping the pixels at the same coordinate position of the image of the image on the memory while being shifted relative to each other for each of the plurality of images.
[0012]
The image composition program is used as application software in an electronic camera capable of continuous shooting, or used as application software such as a personal computer capable of storing and displaying continuously shot images.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of an image composition device and an image composition program according to the present invention will be described in detail with reference to the accompanying drawings.
[0014]
FIG. 1 is a block diagram showing a hardware configuration example of a personal computer (hereinafter referred to as “personal computer”) having an image composition program according to the present invention.
[0015]
As shown in FIG. 1, a personal computer 1 includes a central processing unit (CPU) 10 that mainly controls the operation of each component, a main memory 12 that stores a control program for the device, and serves as a work area when the program is executed. An operating system (OS) of the personal computer 1, device drivers for peripheral devices connected to the personal computer 1, various application software including an image composition program according to the present invention, a hard disk device 14 storing user images, etc., and a CD- ROM drive 16, display memory 18 for temporarily storing display data, monitor device 20 such as a CRT monitor or a liquid crystal monitor for displaying images, characters, etc. from image data, character data, etc. from this display memory 18, keyboard 22, mouse 24 as a position input device, and the state of mouse 24 A mouse controller 26 that outputs signals such as the position of the mouse pointer on the data device 20 and the state of the mouse 24 to the CPU 10, and a USB (Universal Serial Bus) that can be connected to the digital camera 2 to input image data and the like. It comprises an interface 27 and a bus 28 for connecting the above components.
[0016]
The personal computer 1 having the above configuration is known except for the image composition program stored in the hard disk device 14 for performing the image composition processing according to the present invention. Is omitted. The image composition program is recorded on, for example, a CD-ROM included when the digital camera 2 is purchased. By setting this CD-ROM in the CD-ROM drive 16 of the personal computer 1, the personal computer 1 Can be installed on. It can also be downloaded from a server that provides an image composition program via communication means (not shown).
[0017]
Next, data transfer from the photographing by the digital camera 2 connected to the personal computer 1 to the personal computer 1 will be described.
(Step S1)
The digital camera 2 is fixed on a tripod or the like to shoot a still image that does not contain a subject. The captured still image is saved as a background image in a still image file format such as JPEG format in a memory card in the camera.
(Step S2)
Subsequent to the still image shooting in step S1, moving image shooting is performed by frame imaging of the subject with the digital camera 2 fixed. Save the shot video to a memory card in the camera in a video file format such as Motion JPEG or continuous still image file format.
(Step S3)
The digital camera 2 after photographing is connected to the personal computer 1 as shown in FIG. 1, and the still image file and the moving image file stored in the memory card in the digital camera 2 are transferred to the personal computer 1 and stored in the hard disk device 14.
[0018]
Next, image composition processing in the personal computer 1 will be described with reference to the flowchart shown in FIG.
[0019]
First, when the image composition processing program according to the present invention is started, a screen for selecting a still image file as a background image or a moving image file to be composed is displayed on the monitor device 20 of the personal computer 1 (not shown). ) A desired still image file and moving image file are selected on this screen (steps S10 and S11).
[0020]
Subsequently, n still images to be processed are selected from the moving image file selected in step S11, and the selected n still images are cut out from the moving image file and re-saved as continuous still images (step S12). , S13). For n still images, an arbitrary numerical value n may be input, and n still images may be automatically selected from the movie file at equal intervals, or manually while viewing each frame image of the movie. You may make it select one by one. Alternatively, a certain period in the moving image may be designated and all the frame images within the period may be selected.
[0021]
Next, the number i of the still image to be processed among the n still images is set to 1 (i = 1) (step S14). Note that n still images are numbered 1 to n in chronological order.
[0022]
A main subject is extracted from the i-th still image to be processed (step S15). The extraction of the main subject is performed based on the background image selected in step S10. That is, the color space distance between pixels at the same position of the i-th still image and the background image (the sum of the difference values of R, G, and B data of each pixel) is calculated, and pixels whose calculation results are equal to or greater than a specified value are calculated. Extracted as main subject candidate pixels.
[0023]
The main subject candidate pixel group extracted in this manner is subjected to image processing such as concatenation, and noise pixels are removed to obtain an image of only the main subject. The image of only the main subject is saved in the main memory 12 with the same pixel size as the original still image. That is, the area other than the main subject of the original still image is filled with pixels having no pixel value (for example, R, G, B = (-1, -1, -1)) and is the same as the original still image. Set to pixel size.
[0024]
Next, the image having the pixel value of only the main subject extracted in step S15 is added and mapped on the synthesized image memory area for one frame of the main memory 12, and the main subject is added and combined (step S16). That is, after mapping so that the pixels of the same coordinates (x, y) overlap each other in the consecutive i-th image i and i + 1-th image (i + 1), the pixel values of the pixels of both images overlap. The added pixel value is determined so that the pixel value of (i + 1) is adopted. In the case of an image of only the main subject extracted from the first still image, it is mapped on the memory as it is.
[0025]
The above overlay synthesis algorithm is shown below.
[0026]
Each pixel of the image i and the image (i + 1) is scanned, and each pixel value (Rcomp, Gcomp, Bcomp) of the composite image comp after addition is determined. For convenience, pixel values other than the main subject pixel are defined as (R, G, B) = (− 1, −1, −1).
[0027]
When both the pixel of the image i and the pixel at the same position of the image (i + 1) have the pixel value of the main subject, the pixel value of the image (i + 1) is adopted. That is,
(Ri, Gi, Bi) ≠ (-1, -1, -1) and (Ri + 1, Gi + 1, Bi + 1) ≠ (-1, -1, -1) → (Rcomp, Gcomp , Bcomp) = (Ri + 1, Gi + 1, Bi + 1)
When the pixel of the image i does not have the pixel value of the main subject and the pixel at the same position in the image (i + 1) has the pixel value of the main subject, the pixel value of the image (i + 1) is adopted. That is,
(Ri, Gi, Bi) = (− 1, −1, −1) and (Ri + 1, Gi + 1, Bi + 1) ≠ (−1, −1, −1) pixels → (Rcomp, Gcomp , Bcomp) = (Ri + 1, Gi + 1, Bi + 1)
When the pixel of the image i has the pixel value of the main subject and the pixel at the same position in the image (i + 1) does not have the pixel value of the main subject, the pixel value of the image i is adopted. That is,
(Ri, Gi, Bi) ≠ (-1, -1, -1) and (Ri + 1, Gi + 1, Bi + 1) = (-1, -1, -1) pixels → (Rcomp, Gcomp , Bcomp) = (Ri, Gi, Bi)
When both the pixel of the image i and the pixel at the same position of the image (i + 1) do not have the pixel value of the main subject, values (−1, −1, −1) having no pixel value after addition are set. That is,
(Ri, Gi, Bi) = (− 1, −1, −1) and (Ri + 1, Gi + 1, Bi + 1) = (− 1, −1, −1) pixels → (Rcomp, Gcomp , Bcomp) = (-1, -1, -1)
When the overlay synthesis of the main subject of the i-th image is completed as described above, it is determined whether or not the overlay synthesis for n images has been completed (step S17), and if not completed (i <n). Increments i by 1 (step S18) and returns to step S15. As a result, the main subject extraction process and the addition of the main subject are performed on the next still image in time series order.
[0028]
When the addition of n sheets is completed (i = n), the addition image is added to the background image and combined (step S19). In other words, all the portions of the superimposed image that have no pixel value are filled with the background image pixels.
[0029]
The composite image created in this way is stored in the hard disk device 14, displayed on the monitor device 20, or printed out by a printer (not shown).
[0030]
FIG. 3 is a creation image diagram of the composite image created as described above.
[0031]
Next, another embodiment of the overlay synthesis of the main subject image will be described.
[0032]
First, processing is performed in the same manner as described above until each main subject is extracted from n still images. A minimum rectangle including the image of the main subject extracted in this way is calculated, and an image (rectangular image) within the minimum rectangle is stored in the memory.
[0033]
The images shown in FIGS. 4A and 4B are an i-th rectangular image i and an i + 1-th rectangular image (i + 1), respectively.
[0034]
Next, the pixels are mapped so that the coordinates (x i, y i ) of the rectangular image i and the coordinates (x i + 1, y i + 1 ) of the rectangular image (i + 1) overlap.
[0035]
For example, when aligning the rectangle image i so that the rectangle image (i + 1) overlaps the right half of the rectangle image i and overlaying the rectangle image i, the rectangle image i is set to Max-xi. ) By adding Max-xi / 2 to the x coordinate of the coordinates (x i + 1, y i + 1 ) of each pixel, and shifting the coordinates to the right (x i + 1 + Max-xi / 2 , y i + Convert to 1 ). Thereafter, after mapping so that pixels with the same coordinates overlap, the pixel value after addition is determined so that the pixel value of the image (i + 1) is adopted for the portion where the pixel values of the pixels of both images overlap.
[0036]
In this way, by combining the rectangular image i shown in FIG. 4A with the rectangular image (i + 1) shown in FIG. 4B shifted to the right and combining them, the combined image shown in FIG. can get.
[0037]
By sequentially performing such overlay composition on n rectangular images (1 to n), a composite image as shown in FIG. 5 can be created.
[0038]
In this embodiment, a still image (background image) that does not contain the main subject is shot separately from the movie. However, the present invention is not limited to this, and a movie that does not contain the main subject is shot. One frame of a moving image may be used as a background image. In addition, a plurality of still images are acquired from a moving image. However, the present invention is not limited to this, and a plurality of continuous images are captured in a continuous shooting mode in which images are continuously captured at a predetermined interval. It may be a picture.
[0039]
Further, as a method for extracting the main subject from the image, for example, a chroma key process is performed in which the main subject is photographed against a screen of a specific color such as a blue background and the main subject is extracted from the photographed image based on the specific color. May be adopted, or one of the pixels of the main subject in the image is pointed, the contour of the main subject is obtained from the continuity of the pointed pixel, and the main subject based on the contour You may employ | adopt the method of extracting. In the case of these main subject extraction methods, it is not necessary to separately shoot a background image that does not contain the main subject in order to extract the main subject.
[0040]
Furthermore, the image composition processing apparatus according to the present invention is not limited to a personal computer having the image composition processing program, and may be added as an image composition processing function in the digital camera.
[0041]
【The invention's effect】
As described above, according to the present invention, instead of obtaining a normal multiple-exposure image obtained by adding a plurality of images, a plurality of images of only the main subject extracted from a plurality of images taken continuously are Since an added image (synthesized image) is created by sequentially adding and synthesizing in order of series, a high-quality synthesized image in which the movement of the main subject can be clearly seen can be created.
[0042]
Further, in addition to the case where the main subject image is superimposed and combined without shifting, the main subject image may be superimposed and combined as appropriate. In this case, the overlapping portion of the main subject image can be reduced, and the individual images can be continuously displayed. The image of the main subject becomes clearer.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of a hardware configuration of a personal computer having an image composition program according to the present invention. FIG. 2 is a flowchart showing an example of an image composition processing procedure according to the present invention. Fig. 4 is a diagram used to explain the method of adding and compositing images of the main subject by shifting the images of the main subject. Fig. 5 Shifting the images of a plurality of main subjects. Image of creating a composite image that is superimposed on top [Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Personal computer, 2 ... Digital camera, 10 ... Central processing unit, 12 ... Main memory, 14 ... Hard disk drive, 20 ... Monitor device, 22 ... Keyboard, 24 ... Mouse, 27 ... Interface

Claims (3)

連続撮影された複数枚の画像から主要被写体を抽出する抽出手段と、
前記抽出手段によって抽出した主要被写体のみ画素値をもつ複数の画像を時系列順に順次上乗せ合成してなる上乗せ画像を作成する画像合成手段であって、前記主要被写体のみ画素値をもつ複数の画像の同一座標位置の画素を、複数の画像毎に相対的にずらしてメモリ上に上乗せマッピングすることにより前記上乗せ画像を作成する画像合成手段と、
を備えたことを特徴とする画像合成装置。
Extraction means for extracting a main subject from a plurality of images continuously shot;
Image synthesizing means for creating an added image obtained by sequentially superposing and synthesizing a plurality of images having pixel values only in the main subject extracted by the extracting means in a time-series order, and a plurality of images having pixel values only in the main subject. Image synthesizing means for creating the added image by shifting the pixels at the same coordinate position relative to each other for each of the plurality of images and adding and mapping on the memory;
An image composition device comprising:
前記画像合成手段は、前記上乗せ画像を所定の背景画に上乗せ合成してなる合成画像を作成することを特徴とする請求項1の画像合成装置。  2. The image synthesizing apparatus according to claim 1, wherein the image synthesizing unit creates a synthesized image formed by superimposing the superimposed image on a predetermined background image. 連続撮影された複数枚の画像を合成してなる合成画像を作成するための画像合成プログラムであって、コンピュータに、
前記連続撮影された複数枚の画像から主要被写体を抽出する機能と、
前記抽出した主要被写体のみ画素値をもつ複数の画像を時系列順に順次上乗せ合成してなる上乗せ画像を作成する画像合成機能であって、前記主要被写体のみ画素値をもつ複数の画像の同一座標位置の画素を、複数の画像毎に相対的にずらしてメモリ上に上乗せマッピングすることにより前記上乗せ画像を作成する画像合成機能と、
を実現させることを特徴とする画像合成プログラム。
An image composition program for creating a composite image formed by combining a plurality of images taken continuously,
A function of extracting a main subject from a plurality of images taken continuously;
An image composition function for creating an added image obtained by sequentially adding and synthesizing a plurality of images having pixel values only in the extracted main subject in chronological order, and the same coordinate positions of the plurality of images having pixel values only in the main subject An image composition function for creating the above-described added image by relatively shifting the pixels of each of the plurality of images and mapping on the memory,
An image composition program characterized by realizing the above.
JP2002209529A 2002-07-18 2002-07-18 Image composition apparatus and image composition program Expired - Fee Related JP4340836B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002209529A JP4340836B2 (en) 2002-07-18 2002-07-18 Image composition apparatus and image composition program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002209529A JP4340836B2 (en) 2002-07-18 2002-07-18 Image composition apparatus and image composition program

Publications (2)

Publication Number Publication Date
JP2004056359A JP2004056359A (en) 2004-02-19
JP4340836B2 true JP4340836B2 (en) 2009-10-07

Family

ID=31933350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002209529A Expired - Fee Related JP4340836B2 (en) 2002-07-18 2002-07-18 Image composition apparatus and image composition program

Country Status (1)

Country Link
JP (1) JP4340836B2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4531416B2 (en) * 2004-02-20 2010-08-25 Hoya株式会社 Endoscope system
JP2006005452A (en) * 2004-06-15 2006-01-05 Nippon Hoso Kyokai <Nhk> Image composite apparatus and image composite system
JP2006203443A (en) * 2005-01-19 2006-08-03 Inc Corp Image synthesizer and synthesization program
KR101177106B1 (en) * 2005-07-23 2012-08-24 삼성전자주식회사 Digital image composing method
JP4843297B2 (en) * 2005-11-24 2011-12-21 良次 大塲 Subject monitoring method, subject monitoring device, and subject monitoring program
JP4971813B2 (en) * 2007-01-31 2012-07-11 日本放送協会 Video generation apparatus and video generation program
JP5098949B2 (en) * 2008-10-21 2012-12-12 株式会社ニコン Electronic camera and image processing program
JP5168097B2 (en) * 2008-11-13 2013-03-21 ソニー株式会社 IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
KR101595380B1 (en) * 2009-05-07 2016-02-18 엘지전자 주식회사 Mobile terminal and control method thereof
JP5152233B2 (en) * 2010-03-17 2013-02-27 カシオ計算機株式会社 Imaging apparatus, imaging control method, and program
US20150002546A1 (en) * 2012-02-20 2015-01-01 Sony Corporation Image processing device, image processing method, and program
JP2018148272A (en) 2017-03-01 2018-09-20 オリンパス株式会社 Imaging apparatus, image processing apparatus, imaging method, and program
JP7119425B2 (en) 2018-03-01 2022-08-17 ソニーグループ株式会社 Image processing device, encoding device, decoding device, image processing method, program, encoding method and decoding method

Also Published As

Publication number Publication date
JP2004056359A (en) 2004-02-19

Similar Documents

Publication Publication Date Title
US6344907B1 (en) Image modification apparatus and method
JP4340836B2 (en) Image composition apparatus and image composition program
TWI410132B (en) Data generation device, data generation method and program product
JP4556813B2 (en) Image processing apparatus and program
US8509518B2 (en) Real-time image collage method and apparatus
KR20090088325A (en) Image processing apparatus, image processing method and imaging apparatus
JP4110560B2 (en) Image processing method and apparatus
JP2011119974A (en) Panoramic image synthesizer, panoramic image synthesis method, and program
US20080152226A1 (en) Apparatus, Method and Program for Information Processing
JP2004199248A (en) Image layouting device, method and program
JP3649468B2 (en) Electronic album system with shooting function
JP2004040559A (en) Method and program for processing image and image processor
US7522189B2 (en) Automatic stabilization control apparatus, automatic stabilization control method, and computer readable recording medium having automatic stabilization control program recorded thereon
JP2001119625A (en) Image-processing method and image processor
JP2002084440A (en) Digital camera, image processing method and recording medium
JP2004207936A (en) Image processing apparatus
JP2004248171A (en) Moving image recorder, moving image reproduction device, and moving image recording and reproducing device
JP2004312549A (en) Panoramic image photographing apparatus and panoramic image photographing method
JP2005252739A (en) Static image generating device and method thereof
JP2006119730A (en) Image stitching
JP2000196956A (en) Device and method for synthesizing picture
JP5493839B2 (en) Imaging apparatus, image composition method, and program
JPH0991407A (en) Panorama image synthesis system and panorama image synthesis method
JP2004178368A (en) Image processor
JP3368012B2 (en) Image data processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050222

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070618

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071203

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080805

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081006

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081224

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090311

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090623

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

Free format text: PAYMENT UNTIL: 20120717

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4340836

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120717

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130717

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees