JP4226232B2 - Image processing apparatus, storage medium, and computer program - Google Patents

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

Info

Publication number
JP4226232B2
JP4226232B2 JP2001191444A JP2001191444A JP4226232B2 JP 4226232 B2 JP4226232 B2 JP 4226232B2 JP 2001191444 A JP2001191444 A JP 2001191444A JP 2001191444 A JP2001191444 A JP 2001191444A JP 4226232 B2 JP4226232 B2 JP 4226232B2
Authority
JP
Japan
Prior art keywords
background
image
area
data
computer
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
JP2001191444A
Other languages
Japanese (ja)
Other versions
JP2002084542A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2001191444A priority Critical patent/JP4226232B2/en
Publication of JP2002084542A publication Critical patent/JP2002084542A/en
Application granted granted Critical
Publication of JP4226232B2 publication Critical patent/JP4226232B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置、記憶媒体及びコンピュータプログラムに関し、特に背景画像を動画像から作成して他の画像と合成する画像処理装置、コンピュータにこのような画像の合成を行わせるコンピュータプログラム、及びこのようなコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体に関する。
【0002】
近年、動画像に関する情報処理技術の進歩に伴い、動画像中の物体及び背景を夫々個別のオブジェクト画像として扱う技術が注目されている。ISOにおいて標準化作業が進められている動画像圧縮符号化の国際標準であるMPEG−4では、個々の動画オブジェクト画像を合成して1つのシーンを生成するといったオブジェクト化画像に関する技術が検討されている。
【0003】
こうした中で、動画像中から指定した物体のみを抜き出してオブジェクト画像化する技術について、様々な研究がなされている。又、画像の背景についても同様に、画像から物体を取り除いた背景画像のみを背景オブジェクト画像として扱うことが行われている。このようにして作成された背景オブジェクト画像を、別の動画像オブジェクト画像と合成することで、新たな動画像を作成することができる。
【0004】
【従来の技術】
背景が静止している動画像からの背景オブジェクト画像の作成方法としては、各フレームの物体の映っていない領域を重ね合わせて1枚の背景画像を合成する方法が知られている。この方法では、背景が静止している場合は、動画像を見ながら各フレームの背景領域を指定して寄せ集めることで、1枚の静止画像で構成される背景オブジェクト画像を得ることができる。
【0005】
又、背景が移動している動画像から背景オブジェクト画像を作成する方法としては、例えば特開平9−130803号公報にて提案されている方法がある。この提案方法では、背景領域の動きベクトルを利用して、背景の無い部分の背景を推定することで、背景画像を合成する。
【0006】
他方、例えば特開平6−338136号公報では、背景領域の動きを検出して、背景の動きが領域毎に異なる場合でも、大きなゆがみの無い背景画像を合成する方法が提案されている。
【0007】
更に、例えば特開平8−305830号公報では、背景画像と物体画像とを合成する際に、背景画像を元の画像の一部としてとらえ、画像合成時に背景画像の存在しない領域を隠すように物体画像を合成する方法が提案されている。この提案方法では、元々の動画像を構造化して、その動画像と対応する構造化データ及び合成表示したい画像の情報に基づいて、背景領域に穴の無い状態で背景画像と物体画像を合成する。
【0008】
【発明が解決しようとする課題】
しかし、上記の如き従来の画像処理方法では、次のような問題があった。
【0009】
背景オブジェクト画像を作成する方法では、背景オブジェクト画像を作成できる条件として、背景領域が全て見えていることが前提であった。即ち、動画像中の物体画像が常に背景のある領域を隠す位置にあるような、背景を完全に作成できないような場合には、背景オブジェクト画像としての条件から外れてしまうので、不完全な背景オブジェクト画像しか得られない。このような不完全な背景オブジェクト画像に対しては、背景の無い穴の部分を埋めるようにユーザが手動で背景を描いたり、穴の部分の近くの画素から穴の部分の画素を推定することで、見た目に穴の無い完全な背景オブジェクト画像を作成する必要がある。ところが、手動で穴の部分の背景を描くには、時間と手間がかかり、ユーザへの負担が増大してしまう。又、穴の部分の背景はユーザにより人工的に作成されるので、画像のオリジナリティが失われてしまう。他方、穴の部分の画素を推定するには、複雑で時間のかかる演算処理を行う必要があり、画像処理装置内のプロセッサへの負荷が増大してしまう。
【0010】
これに対し、背景の無い穴の部分を埋めるのに、例えば特開平8−305830号公報に提案されている方法を用いることもできるが、この提案方法では、背景を元の画像の一部とみなしているので、背景のみを分離することができない。従って、背景のみが部品として必要な場合であっても、背景を含む元の画像全てが1つの部品として取り出されてしまい、画像処理の効率が悪くなってしまう。
このように、従来の画像処理方法では、部分的に背景が見えない領域がある動画像についても、動画像中から背景オブジェクト画像を生成して、背景オブジェクト画像を独立した画像部品として画像処理を行うことができないという問題があった。
【0011】
そこで、本発明は、部分的に背景が見えない領域がある動画像についても、動画像中から背景オブジェクト画像を生成して、背景オブジェクト画像を独立した画像部品として画像処理を行うことのできる画像処理装置、記憶媒体及びコンピュータプログラムを提供することを目的とする。
【0012】
【課題を解決するための手段】
上記課題は、動画像中から背景を利用するフレームを指定するフレーム指定処理部と、指定されたフレームの画像から背景領域を指定する背景領域指定部と指定された背景領域から全体の背景を合成して背景データを出力する背景合成部と、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定して非背景領域データを出力する非背景領域設定部とを備え、該背景データ及び該非背景領域データは、背景オブジェクト画像を構成することを特徴とする画像処理装置により達成できる。
【0013】
上記の課題は、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識して非背景領域情報を求める非背景領域認識部と、該非背景領域認識部により認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出して、位置情報を決定する合成位置自動決定部と、該合成位置自動決定部により決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成する画像合成部とを備えたことを特徴とする画像処理装置によっても達成できる。
【0014】
上記の課題は、背景を利用する複数の画像を指定する画像指定処理部と、指定された複数の画像から背景領域を指定する背景領域指定部と、指定された背景領域から全体の背景を合成して背景データを出力する背景合成部と、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定して非背景領域データを出力する非背景領域設定部とを備え、該背景データ及び該非背景領域データは、背景オブジェクト画像を構成することを特徴とする画像処理装置によっても達成できる。
【0015】
上記の課題は、コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、該コンピュータプログラムは、コンピュータに、動画像中から背景を利用するフレームを指定させ、コンピュータに、指定されたフレームの画像から背景領域を指定させ、コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とするコンピュータ読み取り可能な記憶媒体によっても達成できる。
【0016】
上記の課題は、コンピュータに、合成画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、該コンピュータプログラムは、コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とするコンピュータ読み取り可能な記憶媒体によっても達成できる。
【0017】
上記の課題は、コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、該コンピュータプログラムは、コンピュータに、背景を利用する複数の画像を指定させ、コンピュータに、指定された複数の画像から背景領域を指定させ、コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とするコンピュータ読み取り可能な記憶媒体によっても達成できる。
【0018】
上記の課題は、コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、コンピュータに、動画像中から背景を利用するフレームを指定させ、コンピュータに、指定されたフレームの画像から背景領域を指定させ、コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とするコンピュータプログラムによっても達成できる。
【0019】
上記の課題は、コンピュータに、合成画像を作成させるコンピュータプログラムであって、コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とするコンピュータプログラムによっても達成できる。
【0020】
上記の課題は、コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、コンピュータに、背景を利用する複数の画像を指定させ、コンピュータに、指定された複数の画像から背景領域を指定させ、コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とするコンピュータプログラムによっても達成できる。
【0021】
従って、本発明によれば、部分的に背景が見えない領域がある動画像についても、動画像中から背景オブジェクト画像を生成して、背景オブジェクト画像を独立した画像部品として画像処理を行うことが可能となる。
【0022】
又、上記の如き背景オブジェクト画像と動画像オブジェクト画像を合成する際に、背景の無い部分を覆い隠すように物体を自動的に配置することで、背景に穴の無い合成動画像を簡単に作成することが可能となる。
【0023】
【発明の実施の形態】
本発明では、背景オブジェクト画像を作成する際に、背景が存在しない部分があると、背景の存在しない領域に対応する非背景領域フラグを設定したデータを同時に作成する。これにより、画像合成時に非背景領域フラグを読むことで、背景の存在しない領域を簡単に認識することができる。又、物体画像のサイズ等の領域データと、背景の無い領域のデータとから、どこに物体画像を配置すれば背景の穴が見えなくなるかを自動的に計算する。これにより、背景の存在しない領域を含む背景画像についても、通常の背景画像と同程度の部品化を行うことができる。
【0024】
他方、背景画像が動いている場合には、上記と同様にして各フレーム毎に非背景領域フラグを設定したデータを作成して、背景オブジェクト画像として利用することができる。この場合、背景オブジェクト画像は動画形式になるが、背景の重なっている部分を繋げて背景を表す1枚の静止画を構成することもできる。これにより、背景が動いている場合には、背景オブジェクト画像を動画としても、1枚の静止画としても使用することができ、背景オブジェクト画像の部品としての利用価値を高めることができる。
【0025】
本発明になる画像処理装置、記憶媒体及びコンピュータプログラムの各実施例を、以下に図面と共に説明する。
【0026】
【実施例】
先ず、本発明になる画像処理装置の第1実施例を説明する。画像処理装置の第1実施例は、本発明になるコンピュータプログラムの第1実施例及び本発明になるコンピュータ読み取り可能な記憶媒体の第1実施例を用いる。第1実施例では、本発明がコンピュータシステムに適用されている。図1は、第1実施例において本発明が適用されるコンピュータシステムを示す斜視図である。
【0027】
図1に示すコンピュータシステム100は、大略CPUやディスクドライブ等を内臓した本体部101、本体部101からの指示により表示画面102a上に画像を表示するディスプレイ102、コンピュータシステム100に種々の情報を入力するためのキーボード103、ディスプレイの表示画面102a上の任意の位置を指定するマウス104、外部のデータベース等にアクセスして他のコンピュータシステムに記憶されているコンピュータプログラム等をダウンロードするモデム105、CCDカメラ等からなる撮像部120、及び音声を再生するスピーカ121を有する。
【0028】
ディスク110等の可搬型記録媒体に格納されるか、モデム105等の通信装置を使って他のコンピュータシステムの記録媒体106からダウンロードされる、コンピュータシステム100に画像処理機能を持たせるコンピュータプログラム(画像処理ソフトウェア)は、コンピュータシステム100に入力されて実行される。本発明になる記憶媒体は、本発明になるコンピュータプログラムを格納した、例えばディスク110等の記録媒体からなる。本発明になる記憶媒体を構成する記録媒体は、ディスク110、ICカードメモリ、フロッピーディスク、光磁気ディスク、CD−ROM等の可搬型記録媒体に限定されるものではなく、モデム105やLAN等の通信装置や通信手段を介して接続されるコンピュータシステムでアクセス可能な各種記録媒体を含む。
【0029】
図2は、コンピュータシステム100の本体部101内の要部の構成を説明するブロック図である。同図中、本体部101は、大略バス200により接続されたCPU201、RAMやROM等からなるメモリ部202、ディスク110用のディスクドライブ203及びハードディスクドライブ204からなる。本実施例では、ディスプレイ102、キーボード103、マウス104、撮像部120等は、図示の如くバス200を介してCPU201に接続されているが、直接CPU201に接続されていても良い。又、ディスプレイ102及び撮像部120は、入出力画像データの処理を行う周知のグラフィックインタフェース(図示せず)を介してCPU201に接続されていても良い。
【0030】
尚、コンピュータシステム100の構成は図1及び図2に示す構成に限定されるものではなく、代わりに各種周知の構成を使用しても良い。
【0031】
図3は、第1実施例におけるCPU201の処理を説明するための図である。同図中、ユーザ入力1及び入力データ2を入力され、背景画像作成処理を行って出力データ4を出力する処理部3は、CPU201により実現される。処理部3は、フレーム指定処理部31、背景領域指定部32、全体移動情報算出部33、背景合成部34及び非背景領域設定部35からなる。同図では、処理部3の構成は、機能的に示してある。
【0032】
ユーザ入力1は、キーボード103、マウス104等の入力デバイスからユーザにより入力され、フレーム指定処理部31に供給される。入力データ2は、背景を作成するための元となる動画像データ2−1を含み、メモリ部202、ディスクドライブ203又はハードディスクドライブ204から入力されるか、或いは、他のコンピュータシステムからモデム105を介して入力される。入力データ2は、背景領域指定部32及び全体移動情報算出部33に供給される。他方、出力データ4は、背景合成部34から出力される背景データ4−1と、非背景領域設定部35から出力される非背景領域データ4−2を含む。本実施例では、説明の便宜上、入力データ2及び出力データ4は、夫々ディスプレイ102に供給されて表示画面102a上に表示されるものとする。
【0033】
(1−1)背景画像の作成
図3において、フレーム指定処理部31は、表示画面102a上に表示されている入力データ2の動画像データ2−1中の各フレーム画像から、入力デバイスからのユーザ入力1に基づいて背景として選択される画像を含むフレームを指定する。フレーム指定処理部31は、このようにして指定されたフレームのフレーム番号を、例えばメモリ部202に格納する。
【0034】
背景領域指定部32は、フレーム指定処理部31により指定されたフレーム番号に対応するフレーム画像を、入力データ2の動画像データ2−1から取得して例えばメモリ部202に格納する。又、背景領域指定部32は、格納されたフレーム画像データから、背景として設定したい領域をユーザ入力1に基づいて指定し、背景領域情報として例えばメモリ部202に格納する。本実施例では、説明の便宜上、背景領域の指定は、ユーザが表示された画像データを見ながら直接入力デバイスを用いて指定するものとするが、周知の画像認識技術を用いて自動的に指定するようにしても良い。
【0035】
全体移動情報算出部33は、入力データの動画像データ2−1から、各フレーム間における背景領域の動きを算出し、移動情報として例えばメモリ部202に格納する。背景領域の動きの算出は、各種周知の方法により行え、例えば画像をブロック単位に分割して各ブロックがフレーム間でどこに移動するかを探すことでも算出できる。これにより、動画撮像時にカメラが移動しているために、背景画像が移動したり、変形したりする動画像に対しても、背景画像を良好に作成することができる。
【0036】
背景合成部34は、背景領域指定部32により指定された背景領域情報と、全体移動情報算出部33により算出された移動情報とに基づいて、全体の背景を合成し、背景データ4−1として出力する。又、背景合成部34は、背景画像の重なり部分を繋げて、1枚の静止画を合成するようにしても良い。
【0037】
非背景領域設定部35は、背景合成部34で合成された背景画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定した非背景領域データ4−2を作成して出力する。
【0038】
(1−2)出力データのデータ構造
図4は、処理部3から出力される出力データ4のデータ構造を示す図である。同図に示すように、出力データ4は、Nを1以上の整数とすると、N枚の背景B1〜BNからなる。背景B1について示すように、各背景は、背景データの先頭を示すヘッダ部と、実際の背景データ4−1が格納されている背景データ部と、非背景領域データ4−2が格納されている非背景領域データ部とからなる。尚、各背景データ中のデータの順番は、同図に示す順番に限定されるものではない。
【0039】
背景データ4−1は、各画素毎の生データ値であっても、JPEG等の画像圧縮フォーマットで圧縮されているデータであっても良い。非背景領域データ4−2は、非背景領域に対応する座標点を示すデータ列であり、その形式は特に限定されない。従って、非背景領域データ4−2は、非背景領域の輪郭点の座標のみからなるデータであっても、圧縮されたデータであっても良く、非背景画像領域が特定できるデータであればどのようなデータやデータ形式であっても良い。
【0040】
(1−3)背景画像作成処理
図5は、本実施例におけるCPU201の処理を説明するフローチャートである。同図中、ステップS1はフレーム指定処理部31、ステップS2,S3は背景領域指定部32、ステップS4,S5は全体移動情報算出部33、ステップS6は背景合成部34、ステップS7は非背景領域設定部35の処理に夫々対応している。記憶媒体の第1実施例は、CPU201に図5に示す処理を行わせるコンピュータプログラムが格納された記録媒体により構成される。
【0041】
図5において、背景画像作成処理が開始されると、ステップS1は、表示画面102a上に表示されている入力データ2の動画像データ2−1中の各フレーム画像から、背景の作成に十分な数のフレームを取り出し、入力デバイスからのユーザ入力1に基づいて背景として選択される画像を含むフレームを指定する。又、ステップS1は、このようにして指定されたフレームのフレーム番号を、例えばメモリ部202に格納する。尚、入力データ2は、撮像部120により撮像されたものを一旦メモリ部202等に格納して読み出すようにしても良い。
【0042】
ステップS2は、指定されたフレーム番号に対応するフレーム画像を、入力データ2の動画像データ2−1から取得して例えばメモリ部202に格納する。又、ステップS2は、格納されたフレーム画像データから、背景として設定したい領域をユーザ入力1に基づいて指定し、背景領域情報として例えばメモリ部202に格納する。背景領域の指定は、ユーザが表示された画像データを見ながら直接入力デバイスを用いて指定しても、周知の画像認識技術を用いて自動的に指定しても良い。ステップS3は、入力データの動画像データ2−1から、背景の作成に十分な希望枚数のフレームが指定されたか否かを判定し、判定結果がNOであると、処理はステップS1へ戻る。
【0043】
他方、ステップS3の判定結果がYESであると、ステップS4は、入力データの動画像データ2−1から、背景が動いているか否かを判定する。ステップS4の判定結果がYESであると、ステップS5は、各フレーム間における背景領域の動きを算出し、移動情報として例えばメモリ部202に格納する。背景領域の動きの算出は、各種周知の方法により行え、例えば画像をブロック単位に分割して書くブロックがフレーム間でどこに移動するかを探すことでも算出できる。
ステップS4の判定結果がNOであると、或いは、ステップS5の後、ステップS6は、指定された背景領域情報と、全体移動情報算出部33により算出された移動情報とに基づいて、全体の背景を合成し、背景データ4−1として出力する。背景を合成する際に、同じ座標点が複数枚の背景領域に含まれる場合には、その点での背景の画素値の平均値や最頻値、最大値や最小値等を求めて代表値を1つ決定する。又、ステップS6は、背景画像の重なり部分を繋げて、1枚の静止画を合成するようにしても良い。
【0044】
ステップS7は、合成された背景画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定した非背景領域データ4−2を作成して出力し、処理は終了する。
【0045】
このようにして出力された背景データ4−1及び非背景領域データ4−2は、図4と共に説明したデータ構造での形式で例えばメモリ部202に格納される。
図6は、本実施例により得られる背景オブジェクト画像を説明する図である。同図では、動画像データ2−1から、救急車202を除いた建物201だけの背景を作成するものとする。同図に示す背景オブジェクト画像4は、図3に示す出力データ4に対応する。
【0046】
この場合、先ず動画像データ2−1から、同図中左側に示す如き背景の作成に十分なN枚のフレーム2−11〜2−1Nを取り出し、同図中真中に示すようなN枚の背景指定画像2−31〜2−3Nを作成する。ここでは、網掛けの領域が背景領域として設定されているものとする。次に、各背景指定画像2−31〜2−3Nで指定された背景を例えばメモリ部202に順次格納して行き、重なりのある点については、それらの値の平均値や最頻値、最大値や最小値等を求めて代表値を1つ決定する。この画像の場合、穴203の存在のために背景が全て見えていないので、最終的に作成される背景には穴が残る。この穴は、同図中右側に示す、背景データ4−1と非背景領域データ4−2で構成される背景オブジェクト画像4中、黒い領域204である。ここでは、穴の領域内に位置する点の値は、黒とされているが、黒以外の色で穴の領域を埋めるようにしたり、他の背景からコピーしてきても良いことは、言うまでもない。
【0047】
次に、本発明になる画像処理装置の第2実施例を説明する。画像処理装置の第2実施例は、本発明になるコンピュータプログラムの第2実施例及び本発明になるコンピュータ読み取り可能な記憶媒体の第2実施例を用いる。第2実施例でも、本発明がコンピュータシステムに適用されている。第2実施例において本発明が適用されるコンピュータシステムは、上記第1実施例の場合と同様に図1及び図2に示すもので良いため、その図示及び説明は省略する。
【0048】
図7は、第2実施例におけるCPU201の処理を説明するための図である。同図中、上記第1実施例により作成された背景オブジェクト画像4及び動画像オブジェクト画像12を入力され、画像合成処理を行って出力合成画像15を出力する処理部30は、CPU201により実現される。処理部30は、非背景領域認識部36、合成位置自動決定部37、画像合成部38及び合成画像出力部39からなる。同図では、処理部30の構成は、機能的に示してある。
【0049】
背景オブジェクト画像4は、実際の背景画像に関する背景データ4−1と、背景の存在しない領域を示す非背景領域データ4−2とからなり、例えばメモリ部202から読み出されて入力される。背景データ4−1は、合成位置自動決定部37及び画像合成部38に供給される。又、非背景領域データ4−2は、非背景領域認識部36に供給される。動画像オブジェクト画像12は、背景画像と合成したい動画像に関する動画像データ12−1からなり、例えばメモリ部202から読み出されて入力される。動画像データ12−1は、合成位置自動決定部37及び画像合成部38に供給される。出力合成画像15は、合成結果である合成動画像データ15−1からなる。本実施例では、説明の便宜上、背景オブジェクト画像4、動画像オブジェクト画像12及び出力合成画像15は、夫々ディスプレイ102に供給されて表示画面102a上に表示されるものとする。
【0050】
(2−1)合成画像の作成
図7において、非背景領域認識部36は、背景オブジェクト画像4の非背景領域データ4−2に基づいて、背景中の非背景領域を認識し、非背景領域情報として例えばメモリ部202に格納する。
【0051】
合成位置自動決定部37は、非背景領域認識部36により認識された非背景領域情報と、動画像オブジェクト画像12の動画像データ12−1内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を自動的に算出して決定し、位置情報として例えばメモリ部202に格納する。
【0052】
画像合成部38は、合成位置自動決定部37により決定された位置情報に従って、背景オブジェクト画像4の背景データ4−1と、動画像オブジェクト画像12の動画像データ12−1とを1つの合成画像に合成する。
【0053】
合成画像出力部39は、画像合成部38により合成された合成画像を、合成動画像データ15−1からなる1つの出力合成画像15として出力し、ディスプレイ102の表示画面102a上に表示する。
【0054】
(2−2)画像合成処理
図8は、本実施例におけるCPU201の処理を説明するフローチャートである。同図中、ステップS11は画像合成部38、ステップS12は非背景領域認識部36、ステップS13は合成位置自動決定部37及び画像合成部38、ステップS14,S15は合成位置自動決定部37、ステップS16は画像合成部38、ステップS17,S18は合成画像出力部39の処理に夫々対応している。記憶媒体の第2実施例は、CPU201に図8に示す処理を行わせるコンピュータプログラムが格納された記録媒体により構成される。
【0055】
図8において、画像合成処理が開始されると、ステップS11は、背景オブジェクト画像4から背景データ4−1を読み込み、ステップS12は、背景オブジェクト画像4から非背景領域データ4−2を読み込む。ステップS13は、背景オブジェクト画像4に合成したい動画像オブジェクト画像12から動画像データ12−1を読み込み、ステップS14は、動画像データ12−1のデータサイズを計算する。読み込まれた背景データ4−1、非背景領域データ4−2及び動画像データ12−1と、計算された動画像データ12−1のデータサイズは、例えばメモリ部202に格納される。尚、動画像オブジェクト画像12は、撮像部120により撮像されたものを一旦メモリ部202等に格納して読み出すようにしても良い。
【0056】
ステップS15は、非背景領域データ4−2と、動画像データ12−1のデータサイズから、背景オブジェクト画像4と動画像オブジェクト画像12の合成時の合成位置を算出して決定する。合成位置は、背景の穴を埋めるように、自動的に決定される。尚、背景が完全なデータからなり、非背景領域データの無い背景オブジェクト画像の場合には、合成位置はどこであっても穴は見えないので、合成位置の算出は省略できる。
【0057】
合成位置の算出方法としては、各種周知の算出方法を採用し得る。例えば、非背景領域と画像領域の各々の外接矩形を求めて、画像領域の外接矩形が穴領域の外接矩形を常に囲むような合成位置を算出する方法を採用することもできる。又、動画像オブジェクト画像の動く領域を予め求めておき、この動く領域の端を穴の外接矩形の端に合わせて、各フレーム毎に動画像オブジェクト画像の動きによって穴が覆いきれなくなったか否かに応じて合成位置を算出する方法を採用することも可能である。このように、合成位置の算出方法は、非背景領域データと、動画像オブジェクトデータの位置に関するデータとに基づいて合成位置を算出できる方法を採用すれば良い。
【0058】
尚、背景の穴の方が動画像オブジェクト領域よりも大きいために、穴を覆いきれない場合には、元の動画像オブジェクト画像のサイズはそのままで、できる限り穴を覆う合成位置を求めて覆いきれない穴はそのままにしておく方法や、動画像オブジェクト画像に拡大等の変形処理を施し、穴を完全に覆うようにする方法等を採用することも可能である。
【0059】
図8の説明に戻ると、ステップS16は、背景オブジェクト画像4と動画像オブジェクト画像12をステップS15で算出された合成位置に従って合成して出力合成画像15を生成し、ステップS17は、出力合成画像15を出力するか否かを判定する。ステップS17の判定結果がYESであると、ステップS18は、出力合成画像15をディスプレイ102に出力して表示画面102a上に表示し、処理は終了する。他方、ステップS17の判定結果がNOであると、例えば出力合成画像15をメモリ部202等に格納し、処理は終了する。尚、出力合成画像15に対応する音声データが存在する場合には、周知の方法により出力合成画像15をディスプレイ102の表示画面102a上に表示すると同時に、スピーカ121から音声データを再生すれば良い。
【0060】
図9は、第2実施例により得られる合成動画像を説明する図である。同図中、図6と同一部分には同一符号を付し、その説明は省略する。同図では、背景オブジェクト画像4及び動画像オブジェクト画像12から、合成動画像15−11〜15−1Mを合成するものとする。又、動画像オブジェクト画像12は、救急車202とは異なる車302に関する画像であるものとする。同図に示す合成動画像15−11〜15−1Mは、図7に示す出力合成画像15に対応する。
【0061】
上記の如く、本実施例では、背景オブジェクト画像4の非背景領域データ4−1から背景の穴204の領域を認識する。次に、背景オブジェクト画像4に重ね合わせる車302の動画像オブジェクト画像12のサイズを求め、合成する時に背景の穴204の領域を覆い隠すような位置に車302の動画像オブジェクト画像12を配置する。
【0062】
この配置の算出方法としては、上記の如く、例えば穴の領域(非背景領域)と画像領域の各々の外接矩形を求めて、画像領域の外接矩形が穴領域の外接矩形を常に囲むような合成位置を算出する方法を採用することもできる。又、動画像オブジェクト画像の動く領域を予め求めておき、この動く領域の端を穴の外接矩形の端に合わせて、各フレーム毎に動画像オブジェクト画像の動きによって穴が覆いきれなくなったか否かに応じて合成位置を算出する方法を採用することも可能である。合成位置の算出方法は、非背景領域データと、動画像オブジェクトデータの位置に関するデータとに基づいて合成位置を算出できる方法を採用すれば良い。
【0063】
図9の場合、動画像オブジェクト画像12の車302のサイズが、背景オブジェクト画像4の非背景領域データ4−2、即ち、穴204の領域のサイズよりも大きいので、穴204の領域は車302により覆い隠すことができる。しかし、背景の穴の方が動画像オブジェクト領域よりも大きいために、穴を覆いきれない場合には、元の動画像オブジェクト画像のサイズはそのままで、できる限り穴を覆う合成位置を求めて覆いきれない穴はそのままにしておく方法や、動画像オブジェクト画像に拡大等の変形処理を施し、穴を完全に覆うようにする方法等を採用することも可能である。このようにして、合成動画像15には、背景の穴204ができるだけ見えないようにすることができる。
【0064】
図10は、第2実施例の変形例におけるCPU201の処理を説明するフローチャートである。同図中、図8と同一ステップには同一符号を付し、その説明は省略する。ステップS21,22は合成位置自動決定部37の処理に対応している。記憶媒体の第2実施例の変形例は、CPU201に図10に示す処理を行わせるコンピュータプログラムが格納された記録媒体により構成される。
【0065】
図10において、ステップS14の後、ステップS21は、動画像データ12−1のデータサイズが、非背景領域データ4−2のデータサイズより大きいか否かを判定し、判定結果がYESであると、処理はステップS15へ進む。他方、ステップS21の判定結果がNOであると、そのままでは画像合成を行えないので、ステップS22は、動画像データ12−1のデータサイズを非背景領域データ4−2のデータサイズおり大きくなるように拡大し、処理はステップS15へ進む。その他の処理は、上記第2実施例の場合と同様である。
【0066】
尚、上記第1実施例、第2実施例及びその変形例は、適宜組み合わせた構成としても良い。
【0067】
又、本発明は、以下に付記する発明をも包含するものである。
【0068】
(付記1) 動画像中から背景を利用するフレームを指定するフレーム指定処理部と、
指定されたフレームの画像から背景領域を指定する背景領域指定部と、
指定された背景領域から全体の背景を合成して背景データを出力する背景合成部と、
合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定して非背景領域データを出力する非背景領域設定部とを備え、
該背景データ及び該非背景領域データは、背景オブジェクト画像を構成することを特徴とする、画像処理装置。
【0069】
(付記2) 動画像から各フレーム間における背景領域の動きを算出し、移動情報を求める全体移動情報算出部を更に備え、
前記背景合成部は、前記背景領域を指定する背景領域情報と前記移動情報とに基づいて、全体の背景を合成して背景データとして出力することを特徴とする、(付記1)記載の画像処理装置。
【0070】
(付記3) 前記背景合成部は、背景画像の重なり部分を繋げて1枚の静止画を合成することを特徴とする、(付記2)記載の画像処理装置。
【0071】
(付記4) 前記背景オブジェクト画像の非背景領域データに基づいて、背景中の非背景領域を認識して非背景領域情報を求める非背景領域認識部と、
該非背景領域認識部により認識された非背景領域情報と、動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出して、位置情報を決定する合成位置自動決定部と、
該合成位置自動決定部により決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成する画像合成部とを更に備えたことを特徴とする、(付記1)〜(付記3)のいずれか1項記載の画像処理装置。
【0072】
(付記5) 背景を利用する複数の画像を指定する画像指定処理部と、
指定された複数の画像から背景領域を指定する背景領域指定部と、
指定された背景領域から全体の背景を合成して背景データを出力する背景合成部と、
合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定して非背景領域データを出力する非背景領域設定部とを備え、
該背景データ及び該非背景領域データは、背景オブジェクト画像を構成することを特徴とする、画像処理装置。
【0073】
(付記6) 背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識して非背景領域情報を求める非背景領域認識部と、
該非背景領域認識部により認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出して、位置情報を決定する合成位置自動決定部と、
該合成位置自動決定部により決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成する画像合成部とを備えたことを特徴とする、画像処理装置。
【0074】
(付記7) コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、動画像中から背景を利用するフレームを指定させ、
コンピュータに、指定されたフレームの画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータ読み取り可能な記憶媒体。
【0075】
(付記8) コンピュータに、合成画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、
コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、
コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とする、コンピュータ読み取り可能な記憶媒体。
【0076】
(付記9) コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、背景を利用する複数の画像を指定させ、
コンピュータに、指定された複数の画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータ読み取り可能な記憶媒体。
【0077】
(付記10) コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、
コンピュータに、動画像中から背景を利用するフレームを指定させ、
コンピュータに、指定されたフレームの画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータプログラム。
【0078】
(付記11) コンピュータに、合成画像を作成させるコンピュータプログラムであって、
コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、
コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、
コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とする、コンピュータプログラム。
【0079】
(付記12) コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、
コンピュータに、背景を利用する複数の画像を指定させ、
コンピュータに、指定された複数の画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータプログラム。
【0080】
以上、本発明を実施例により説明したが、本発明は上記実施例に限定されるものではなく、本発明の範囲内で種々の変形及び改良が可能であることは、言うまでもない。
【0081】
【発明の効果】
本発明によれば、部分的に背景が見えない領域がある動画像についても、動画像中から背景オブジェクト画像を生成して、背景オブジェクト画像を独立した画像部品として画像処理を行うことが可能となる。
【0082】
又、上記の如き背景オブジェクト画像と動画像オブジェクト画像を合成する際に、背景の無い部分を覆い隠すように物体を自動的に配置することで、背景に穴の無い合成動画像を簡単に作成することが可能となる。
【図面の簡単な説明】
【図1】第1実施例において本発明が適用されるコンピュータシステムを示す斜視図である。
【図2】コンピュータシステムの本体部内の要部の構成を説明するブロック図である。
【図3】第1実施例におけるCPUの処理を説明するための図である。
【図4】背景データのデータ構造を示す図である。
【図5】第1実施例におけるCPUの処理を説明するフローチャートである。
【図6】第1実施例により得られる背景オブジェクト画像を説明する図である。
【図7】第2実施例におけるCPUの処理を説明するための図である。
【図8】第2実施例におけるCPUの処理を説明するためのフローチャートである。
【図9】第2実施例により得られる合成動画像を説明する図である。
【図10】第2実施例の変形例におけるCPUの処理を説明するための図である。
【符号の説明】
3 処理部
100 コンピュータシステム
102 ディスプレイ
103 キーボード
104 マウス
105 モデム
202 メモリ部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing device, a storage medium, and a computer program, and in particular, an image processing device that creates a background image from a moving image and combines it with another image, a computer program that causes a computer to combine such an image, and The present invention relates to a computer-readable storage medium storing such a computer program.
[0002]
2. Description of the Related Art In recent years, with the progress of information processing technology related to moving images, attention has been paid to a technology that handles objects and backgrounds in moving images as individual object images. In MPEG-4, which is an international standard for moving image compression coding, which is being standardized in ISO, a technique relating to objectized images, such as generating individual scenes by combining individual moving image object images, is being studied. .
[0003]
Under these circumstances, various studies have been made on techniques for extracting only a specified object from a moving image and converting it into an object image. Similarly, only the background image obtained by removing the object from the image is handled as the background object image. By synthesizing the background object image thus created with another moving image object image, a new moving image can be created.
[0004]
[Prior art]
As a method for creating a background object image from a moving image with a static background, a method is known in which a single background image is synthesized by superimposing regions where objects of each frame are not reflected. In this method, when the background is stationary, a background object image composed of a single still image can be obtained by specifying and collecting the background areas of the respective frames while viewing the moving image.
[0005]
As a method for creating a background object image from a moving image whose background is moving, for example, there is a method proposed in Japanese Patent Laid-Open No. 9-130803. In this proposed method, a background image is synthesized by estimating a background of a portion without a background using a motion vector of a background region.
[0006]
On the other hand, for example, Japanese Patent Application Laid-Open No. 6-338136 proposes a method of detecting a background region motion and synthesizing a background image without a large distortion even when the background motion varies from region to region.
[0007]
Further, for example, in Japanese Patent Application Laid-Open No. 8-305830, when combining a background image and an object image, the background image is regarded as a part of the original image, and the object is hidden so as to hide the area where the background image does not exist during image combination. A method for synthesizing images has been proposed. In this proposed method, the original moving image is structured, and the background image and the object image are synthesized with no hole in the background region based on the structured data corresponding to the moving image and information on the image to be synthesized and displayed. .
[0008]
[Problems to be solved by the invention]
However, the conventional image processing method as described above has the following problems.
[0009]
In the method of creating a background object image, it was assumed that all the background areas were visible as a condition for creating a background object image. In other words, if a background cannot be created completely, such as when an object image in a moving image is always in a position to hide an area with a background, it will be out of the conditions for a background object image, so an incomplete background Only object images can be obtained. For such an incomplete background object image, the user manually draws the background so as to fill in the hole portion without the background, or estimates the pixel of the hole portion from the pixels near the hole portion. Therefore, it is necessary to create a complete background object image without a visible hole. However, manually drawing the background of the hole portion takes time and effort and increases the burden on the user. Further, since the background of the hole portion is artificially created by the user, the originality of the image is lost. On the other hand, in order to estimate the pixel of the hole portion, it is necessary to perform a complicated and time-consuming arithmetic process, which increases the load on the processor in the image processing apparatus.
[0010]
On the other hand, for example, a method proposed in Japanese Patent Laid-Open No. 8-305830 can be used to fill a hole portion without a background. However, in this proposed method, the background is defined as a part of the original image. Because it is considered, only the background can not be separated. Therefore, even if only the background is necessary as a part, the entire original image including the background is extracted as one part, and the efficiency of image processing is deteriorated.
As described above, in the conventional image processing method, a background object image is generated from a moving image even for a moving image in which a background is partially invisible, and the image processing is performed using the background object image as an independent image component. There was a problem that could not be done.
[0011]
Accordingly, the present invention can generate a background object image from a moving image and perform image processing using the background object image as an independent image component even for a moving image in which a background is partially invisible. It is an object to provide a processing device, a storage medium, and a computer program.
[0012]
[Means for Solving the Problems]
The above problem is to synthesize the entire background from the specified background area and the frame specification processing part that specifies the frame that uses the background from the moving image, the background area specifying part that specifies the background area from the image of the specified frame If there is an area where no background exists in the synthesized background image, a non-background area flag is set to indicate that no background exists in the area. A non-background area setting unit that outputs data, and the background data and the non-background area data can be achieved by an image processing apparatus that constitutes a background object image.
[0013]
The above problem is to recognize the non-background area in the background based on the non-background area data in which the non-background area flag is set for the area where the background does not exist in the background image. A non-background region recognition unit for obtaining non-background region information, non-background region information recognized by the non-background region recognition unit, and position information in moving image data of a moving image object image to be combined with the background object image. Based on the position of the object that can cover the hole in the background and determines the position information, and the position of the background object image according to the position information determined by the position determination Also achieved by an image processing apparatus comprising an image composition unit for compositing background data and moving image data of a moving image object image into a single composite image Kill.
[0014]
The above issues are the image specification processing unit that specifies multiple images that use the background, the background region specification unit that specifies the background region from the specified images, and the entire background from the specified background region If there is an area where no background exists in the synthesized background image, a non-background area flag is set to indicate that no background exists in the area. A non-background area setting unit for outputting data, and the background data and the non-background area data can be achieved by an image processing apparatus that constitutes a background object image.
[0015]
The above-described problem is a computer-readable storage medium storing a computer program that causes a computer to create a background object image. The computer program causes a computer to specify a frame that uses a background from a moving image. , Let the computer specify the background area from the image of the specified frame, let the computer synthesize the whole background from the specified background area and output the background data, and let the computer If there is an area in which no background exists, a non-background area flag indicating that no background exists in the area is set and non-background area data is output. The background data and the non-background area data are obtained from the background object image. By a computer readable storage medium characterized by comprising It can be achieved.
[0016]
The above-described problem is a computer-readable storage medium that stores a computer program that causes a computer to create a composite image. The computer program causes a background to be included in a background image among background object images. For non-existing areas, based on the non-background area data for which the non-background area flag is set, the non-background area in the background is recognized and non-background area information is obtained, and the computer recognizes the non-background area. Based on the information and the position information in the moving image data of the moving image object image to be combined with the background object image, the position of the object that can cover the hole in the background is calculated, and the position information is determined. According to the determined position information on the computer, the background data of the background object image and the moving image object It can also be achieved by a computer readable storage medium characterized thereby synthesizing the moving image data of the image into one composite image.
[0017]
An object of the present invention is a computer-readable storage medium storing a computer program that causes a computer to create a background object image. The computer program causes a computer to designate a plurality of images using a background, and the computer Allows the computer to specify a background area from a plurality of specified images, causes the computer to combine the entire background from the specified background area and output the background data, and causes the computer to add a background to the background image. If there is a nonexistent area, a non-background area flag indicating that no background exists in the area is set and non-background area data is output. The background data and the non-background area data constitute the background object image. This can also be achieved by a computer-readable storage medium.
[0018]
The above problem is a computer program that causes a computer to create a background object image. The computer program designates a frame that uses a background from a moving image, and the computer designates a background area from the image of the specified frame. The computer to synthesize the entire background from the specified background area and output the background data. If the computer has an area where no background exists in the synthesized background image, the background exists in that area. The non-background area data indicating that the non-background area is set may be output to output non-background area data, and the background data and the non-background area data may be achieved by a computer program that constitutes the background object image.
[0019]
The above problem is a computer program that causes a computer to create a composite image. In the background object image, a non-background region flag is set for a region in the background image that does not have a background. Based on the non-background area data, the non-background area in the background is recognized to obtain non-background area information, and the computer recognizes the recognized non-background area information and the moving object object image to be combined with the background object image. Based on the position information in the moving image data, the position of the object that can cover the background hole is calculated, the position information is determined, and the background of the background object image is determined according to the determined position information. A computer characterized by combining data and moving image data of a moving image object image into a single combined image. It can also be achieved by the program.
[0020]
The above problem is a computer program for creating a background object image on a computer, causing the computer to designate a plurality of images using the background, causing the computer to designate a background region from the designated plurality of images, When the computer synthesizes the entire background from the specified background area and outputs the background data, if the computer has an area where no background exists in the synthesized background image, the background does not exist in that area The non-background area data indicating that the background object image is set and the non-background area data is output, and the background data and the non-background area data constitute the background object image.
[0021]
Therefore, according to the present invention, it is possible to generate a background object image from a moving image and perform image processing using the background object image as an independent image component even for a moving image having a region where the background is partially invisible. It becomes possible.
[0022]
In addition, when a background object image and a moving image object image as described above are combined, an object is automatically arranged so as to obscure a portion without a background, thereby easily creating a combined moving image without a hole in the background. It becomes possible to do.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
In the present invention, when a background object image is created, if there is a portion where no background exists, data in which a non-background region flag corresponding to a region where no background exists is set at the same time. Thus, by reading the non-background area flag at the time of image synthesis, it is possible to easily recognize an area where no background exists. Further, from the area data such as the size of the object image and the data of the area without the background, it is automatically calculated where the object image is arranged to make the background hole invisible. As a result, a background image including a region where no background exists can be divided into parts similar to a normal background image.
[0024]
On the other hand, when the background image is moving, data in which a non-background region flag is set for each frame can be created and used as a background object image in the same manner as described above. In this case, the background object image is in a moving image format, but it is also possible to configure a single still image representing the background by connecting the overlapping portions of the background. Accordingly, when the background is moving, the background object image can be used as a moving image or a single still image, and the utility value of the background object image as a component can be increased.
[0025]
Embodiments of an image processing apparatus, a storage medium, and a computer program according to the present invention will be described below with reference to the drawings.
[0026]
【Example】
First, a first embodiment of the image processing apparatus according to the present invention will be described. The first embodiment of the image processing apparatus uses the first embodiment of the computer program according to the present invention and the first embodiment of the computer-readable storage medium according to the present invention. In the first embodiment, the present invention is applied to a computer system. FIG. 1 is a perspective view showing a computer system to which the present invention is applied in the first embodiment.
[0027]
A computer system 100 shown in FIG. 1 includes a main body 101 that generally includes a CPU, a disk drive, and the like, a display 102 that displays an image on a display screen 102 a according to instructions from the main body 101, and various information input to the computer system 100. Keyboard 103, mouse 104 for designating an arbitrary position on display screen 102a, modem 105 for accessing an external database or the like and downloading a computer program or the like stored in another computer system, CCD camera And the like, and a speaker 121 for reproducing sound.
[0028]
A computer program (image) which is stored in a portable recording medium such as a disk 110 or downloaded from a recording medium 106 of another computer system using a communication device such as a modem 105 and which has an image processing function in the computer system 100 Processing software) is input to the computer system 100 and executed. The storage medium according to the present invention includes a recording medium such as the disk 110 storing the computer program according to the present invention. The recording medium constituting the storage medium according to the present invention is not limited to a portable recording medium such as a disk 110, an IC card memory, a floppy disk, a magneto-optical disk, or a CD-ROM. Various recording media accessible by a computer system connected via a communication device or communication means are included.
[0029]
FIG. 2 is a block diagram illustrating a configuration of a main part in the main body 101 of the computer system 100. In FIG. 1, a main body 101 includes a CPU 201 generally connected by a bus 200, a memory unit 202 including a RAM and a ROM, a disk drive 203 for the disk 110, and a hard disk drive 204. In the present embodiment, the display 102, the keyboard 103, the mouse 104, the imaging unit 120, and the like are connected to the CPU 201 via the bus 200 as illustrated, but may be directly connected to the CPU 201. The display 102 and the imaging unit 120 may be connected to the CPU 201 via a well-known graphic interface (not shown) that processes input / output image data.
[0030]
The configuration of the computer system 100 is not limited to the configuration shown in FIGS. 1 and 2, and various known configurations may be used instead.
[0031]
FIG. 3 is a diagram for explaining the processing of the CPU 201 in the first embodiment. In FIG. 2, a processing unit 3 that receives user input 1 and input data 2, performs background image generation processing, and outputs output data 4 is realized by the CPU 201. The processing unit 3 includes a frame designation processing unit 31, a background region designation unit 32, an overall movement information calculation unit 33, a background composition unit 34, and a non-background region setting unit 35. In the figure, the configuration of the processing unit 3 is functionally shown.
[0032]
The user input 1 is input by a user from an input device such as the keyboard 103 and the mouse 104 and supplied to the frame designation processing unit 31. The input data 2 includes moving image data 2-1 which is a base for creating a background, and is input from the memory unit 202, the disk drive 203 or the hard disk drive 204, or the modem 105 from another computer system. Is input via. The input data 2 is supplied to the background area designation unit 32 and the entire movement information calculation unit 33. On the other hand, the output data 4 includes background data 4-1 output from the background composition unit 34 and non-background region data 4-2 output from the non-background region setting unit 35. In this embodiment, for convenience of explanation, it is assumed that the input data 2 and the output data 4 are respectively supplied to the display 102 and displayed on the display screen 102a.
[0033]
(1-1) Creating a background image
In FIG. 3, the frame designation processing unit 31 selects as a background from each frame image in the moving image data 2-1 of the input data 2 displayed on the display screen 102a based on the user input 1 from the input device. Specifies the frame that contains the image to be played. The frame designation processing unit 31 stores the frame number of the frame designated in this way, for example, in the memory unit 202.
[0034]
The background area designation unit 32 acquires a frame image corresponding to the frame number designated by the frame designation processing unit 31 from the moving image data 2-1 of the input data 2, and stores the frame image in the memory unit 202, for example. The background area designating unit 32 designates an area to be set as a background based on the user input 1 from the stored frame image data, and stores it in the memory unit 202 as background area information. In this embodiment, for convenience of explanation, the background area is specified using a direct input device while viewing the displayed image data, but is automatically specified using a well-known image recognition technique. You may make it do.
[0035]
The entire movement information calculation unit 33 calculates the movement of the background area between each frame from the moving image data 2-1 of the input data, and stores it as movement information in the memory unit 202, for example. The movement of the background region can be calculated by various known methods, for example, by dividing the image into blocks and searching for where each block moves between frames. Thereby, since the camera is moving at the time of moving image capturing, it is possible to satisfactorily create a background image even for a moving image in which the background image moves or is deformed.
[0036]
The background composition unit 34 synthesizes the entire background based on the background region information specified by the background region specification unit 32 and the movement information calculated by the entire movement information calculation unit 33, and as background data 4-1. Output. In addition, the background composition unit 34 may combine the overlapping portions of the background images to synthesize one still image.
[0037]
The non-background area setting unit 35 sets non-background area data indicating a non-background area flag indicating that there is no background in the background image in the background image synthesized by the background synthesis unit 34 when there is no area. Create and output 4-2.
[0038]
(1-2) Data structure of output data
FIG. 4 is a diagram illustrating a data structure of the output data 4 output from the processing unit 3. As shown in the figure, the output data 4 is composed of N backgrounds B1 to BN, where N is an integer of 1 or more. As shown for the background B1, each background stores a header portion indicating the head of the background data, a background data portion in which the actual background data 4-1 is stored, and non-background area data 4-2. It consists of a non-background area data part. The order of data in each background data is not limited to the order shown in FIG.
[0039]
The background data 4-1 may be a raw data value for each pixel or data compressed in an image compression format such as JPEG. The non-background area data 4-2 is a data string indicating coordinate points corresponding to the non-background area, and the format is not particularly limited. Therefore, the non-background area data 4-2 may be data consisting only of the coordinates of the contour points of the non-background area, or may be compressed data, and any data that can identify the non-background image area. Such data or data format may be used.
[0040]
(1-3) Background image creation processing
FIG. 5 is a flowchart for explaining the processing of the CPU 201 in this embodiment. In the figure, step S1 is a frame designation processing section 31, steps S2 and S3 are background area designation sections 32, steps S4 and S5 are total movement information calculation sections 33, step S6 is a background composition section 34, and step S7 is a non-background area. Each corresponds to the processing of the setting unit 35. The first embodiment of the storage medium is constituted by a recording medium storing a computer program that causes the CPU 201 to perform the processing shown in FIG.
[0041]
In FIG. 5, when the background image creation process is started, step S1 is sufficient for creating a background from each frame image in the moving image data 2-1 of the input data 2 displayed on the display screen 102a. A number of frames are extracted and a frame containing an image selected as a background based on user input 1 from the input device is designated. In step S1, the frame number of the frame designated in this way is stored in the memory unit 202, for example. The input data 2 may be temporarily stored in the memory unit 202 or the like after being captured by the imaging unit 120.
[0042]
In step S <b> 2, a frame image corresponding to the designated frame number is acquired from the moving image data 2-1 of the input data 2 and stored in, for example, the memory unit 202. In step S2, an area to be set as a background is designated from the stored frame image data based on the user input 1 and stored as background area information in the memory unit 202, for example. The background area may be designated using a direct input device while viewing the image data displayed by the user, or automatically using a known image recognition technique. In step S3, it is determined whether or not a desired number of frames sufficient for creating a background has been designated from the moving image data 2-1 of the input data. If the determination result is NO, the process returns to step S1.
[0043]
On the other hand, if the decision result in the step S3 is YES, a step S4 decides whether or not the background is moving from the moving image data 2-1 of the input data. If the decision result in the step S4 is YES, a step S5 calculates the movement of the background area between the frames and stores it as movement information in the memory unit 202, for example. The movement of the background area can be calculated by various known methods. For example, the movement of the background area can be calculated by searching for where a block written by dividing an image into blocks moves between frames.
If the decision result in the step S4 is NO, or after the step S5, the step S6 is based on the designated background area information and the movement information calculated by the whole movement information calculating unit 33, and the entire background. Are output as background data 4-1. When compositing the background, if the same coordinate point is included in multiple background areas, the average value, mode value, maximum value, minimum value, etc. of the background pixel value at that point are determined to represent the representative value. Is determined. In step S6, the overlapping portions of the background images may be connected to synthesize one still image.
[0044]
Step S7 creates and outputs non-background area data 4-2 in which a non-background area flag indicating that there is no background exists in the synthesized background image where there is no background. The process ends.
[0045]
The background data 4-1 and the non-background area data 4-2 output in this way are stored in, for example, the memory unit 202 in the format of the data structure described with reference to FIG.
FIG. 6 is a diagram for explaining a background object image obtained by this embodiment. In the figure, it is assumed that the background of only the building 201 excluding the ambulance 202 is created from the moving image data 2-1. The background object image 4 shown in the figure corresponds to the output data 4 shown in FIG.
[0046]
In this case, first, from the moving image data 2-1, N frames 2-11 to 2-1N sufficient for creating the background as shown on the left side in the figure are taken out, and N frames as shown in the middle in the figure are taken. Background designation images 2-31 to 2-3N are created. Here, it is assumed that the shaded area is set as the background area. Next, the background designated by each of the background designation images 2-31 to 2-3N is sequentially stored in, for example, the memory unit 202, and for the overlapping points, the average value, mode value, maximum A representative value is determined by obtaining a value, minimum value, and the like. In the case of this image, since the entire background is not visible due to the presence of the hole 203, a hole remains in the finally created background. This hole is a black area 204 in the background object image 4 composed of the background data 4-1 and the non-background area data 4-2 shown on the right side in the figure. Here, the value of the point located in the hole area is black, but it goes without saying that the hole area may be filled with a color other than black or copied from another background. .
[0047]
Next, a description will be given of a second embodiment of the image processing apparatus according to the present invention. The second embodiment of the image processing apparatus uses the second embodiment of the computer program according to the present invention and the second embodiment of the computer-readable storage medium according to the present invention. In the second embodiment, the present invention is applied to a computer system. Since the computer system to which the present invention is applied in the second embodiment may be the one shown in FIGS. 1 and 2 as in the case of the first embodiment, its illustration and description are omitted.
[0048]
FIG. 7 is a diagram for explaining the processing of the CPU 201 in the second embodiment. In the figure, a processing unit 30 that receives the background object image 4 and the moving image object image 12 created by the first embodiment, performs image composition processing, and outputs an output composite image 15 is realized by the CPU 201. . The processing unit 30 includes a non-background region recognition unit 36, a synthesis position automatic determination unit 37, an image synthesis unit 38, and a synthesized image output unit 39. In the figure, the configuration of the processing unit 30 is functionally shown.
[0049]
The background object image 4 includes background data 4-1 relating to an actual background image and non-background area data 4-2 indicating an area where no background exists. For example, the background object image 4 is read from the memory unit 202 and input. The background data 4-1 is supplied to the synthesis position automatic determination unit 37 and the image synthesis unit 38. The non-background area data 4-2 is supplied to the non-background area recognition unit 36. The moving image object image 12 includes moving image data 12-1 relating to a moving image to be combined with a background image, and is read from the memory unit 202 and input, for example. The moving image data 12-1 is supplied to the synthesis position automatic determination unit 37 and the image synthesis unit 38. The output composite image 15 is composed of composite moving image data 15-1 which is a composite result. In this embodiment, for convenience of explanation, it is assumed that the background object image 4, the moving image object image 12, and the output composite image 15 are respectively supplied to the display 102 and displayed on the display screen 102a.
[0050]
(2-1) Creation of composite image
In FIG. 7, the non-background area recognition unit 36 recognizes a non-background area in the background based on the non-background area data 4-2 of the background object image 4 and stores it as non-background area information in, for example, the memory unit 202. .
[0051]
The composition position automatic determination unit 37 covers the background hole based on the non-background region information recognized by the non-background region recognition unit 36 and the position information in the moving image data 12-1 of the moving image object image 12. The position of an object that can be hidden is automatically calculated and determined, and is stored in the memory unit 202 as position information, for example.
[0052]
The image composition unit 38 converts the background data 4-1 of the background object image 4 and the moving image data 12-1 of the moving image object image 12 into one composite image according to the position information determined by the combining position automatic determination unit 37. To synthesize.
[0053]
The synthesized image output unit 39 outputs the synthesized image synthesized by the image synthesizing unit 38 as one output synthesized image 15 including the synthesized moving image data 15-1 and displays it on the display screen 102 a of the display 102.
[0054]
(2-2) Image composition processing
FIG. 8 is a flowchart for explaining the processing of the CPU 201 in this embodiment. In the figure, step S11 is an image composition unit 38, step S12 is a non-background region recognition unit 36, step S13 is a composition position automatic decision unit 37 and image composition unit 38, steps S14 and S15 are composition position automatic decision units 37, step. S16 corresponds to the processing of the image composition unit 38, and steps S17 and S18 correspond to the processing of the composite image output unit 39, respectively. The second embodiment of the storage medium is constituted by a recording medium storing a computer program that causes the CPU 201 to perform the processing shown in FIG.
[0055]
In FIG. 8, when the image composition process is started, step S <b> 11 reads background data 4-1 from the background object image 4, and step S <b> 12 reads non-background area data 4-2 from the background object image 4. In step S13, the moving image data 12-1 is read from the moving image object image 12 to be combined with the background object image 4, and in step S14, the data size of the moving image data 12-1 is calculated. The read background data 4-1, non-background area data 4-2 and moving image data 12-1, and the calculated data size of the moving image data 12-1 are stored in the memory unit 202, for example. Note that the moving image object image 12 may be temporarily stored in the memory unit 202 or the like after being captured by the imaging unit 120.
[0056]
A step S15 calculates and determines a combining position at the time of combining the background object image 4 and the moving image object image 12 from the non-background area data 4-2 and the data size of the moving image data 12-1. The composition position is automatically determined so as to fill the hole in the background. It should be noted that in the case of a background object image that is composed of complete data and has no non-background area data, since the hole cannot be seen wherever the composition position is, calculation of the composition position can be omitted.
[0057]
Various known calculation methods can be adopted as the calculation method of the synthesis position. For example, it is possible to adopt a method of obtaining a circumscribed rectangle of each of the non-background area and the image area and calculating a composite position where the circumscribed rectangle of the image area always surrounds the circumscribed rectangle of the hole area. Also, a moving area of the moving image object image is obtained in advance, and the end of this moving area is aligned with the edge of the circumscribed rectangle of the hole, and whether or not the hole cannot be covered by the movement of the moving image object image for each frame. It is also possible to adopt a method for calculating the composite position according to the above. As described above, the method for calculating the composite position may be a method that can calculate the composite position based on the non-background area data and the data related to the position of the moving image object data.
[0058]
If the hole cannot be covered because the background hole is larger than the moving image object area, the size of the original moving image object image remains the same, and the composite position that covers the hole is obtained as much as possible. It is also possible to adopt a method in which a hole that cannot be cut is left as it is or a method in which a moving image object image is subjected to deformation processing such as enlargement so as to completely cover the hole.
[0059]
Returning to the description of FIG. 8, in step S16, the background object image 4 and the moving image object image 12 are synthesized in accordance with the synthesis position calculated in step S15 to generate an output composite image 15. In step S17, the output composite image is displayed. It is determined whether or not 15 is output. If the decision result in the step S17 is YES, a step S18 outputs the output composite image 15 to the display 102 and displays it on the display screen 102a, and the process ends. On the other hand, if the decision result in the step S17 is NO, for example, the output composite image 15 is stored in the memory unit 202 or the like, and the process ends. If there is audio data corresponding to the output synthesized image 15, the output synthesized image 15 may be displayed on the display screen 102a of the display 102 and reproduced at the same time from the speaker 121 by a known method.
[0060]
FIG. 9 is a diagram for explaining a synthesized moving image obtained by the second embodiment. In the figure, the same parts as those in FIG. In the figure, it is assumed that the synthesized moving images 15-11 to 15-1M are synthesized from the background object image 4 and the moving image object image 12. The moving image object image 12 is an image relating to a car 302 different from the ambulance 202. The synthesized moving images 15-11 to 15-1M shown in the figure correspond to the output synthesized image 15 shown in FIG.
[0061]
As described above, in this embodiment, the area of the background hole 204 is recognized from the non-background area data 4-1 of the background object image 4. Next, the size of the moving image object image 12 of the car 302 to be overlaid on the background object image 4 is obtained, and the moving image object image 12 of the car 302 is arranged at a position so as to cover the area of the hole 204 in the background when combining. .
[0062]
As a calculation method of this arrangement, as described above, for example, a circumscribed rectangle of each of the hole region (non-background region) and the image region is obtained, and the circumscribed rectangle of the image region always surrounds the circumscribed rectangle of the hole region. A method of calculating the position can also be adopted. Also, a moving area of the moving image object image is obtained in advance, and the end of this moving area is aligned with the edge of the circumscribed rectangle of the hole, and whether or not the hole cannot be covered by the movement of the moving image object image for each frame. It is also possible to adopt a method for calculating the composite position according to the above. As a calculation method of the composite position, a method that can calculate the composite position based on the non-background area data and the data related to the position of the moving image object data may be adopted.
[0063]
In the case of FIG. 9, the size of the car 302 of the moving image object image 12 is larger than the non-background area data 4-2 of the background object image 4, that is, the size of the hole 204 area. Can be covered. However, if the hole in the background cannot be covered because the hole in the background is larger than the moving image object area, the size of the original moving image object image remains the same and the composite position that covers the hole is found and covered as much as possible. It is also possible to adopt a method in which a hole that cannot be cut is left as it is or a method in which a moving image object image is subjected to deformation processing such as enlargement so as to completely cover the hole. In this way, the background hole 204 can be made as invisible as possible in the synthesized moving image 15.
[0064]
FIG. 10 is a flowchart for explaining the processing of the CPU 201 in a modification of the second embodiment. In the figure, the same steps as those in FIG. 8 are denoted by the same reference numerals, and the description thereof is omitted. Steps S <b> 21 and S <b> 22 correspond to the processing of the synthesis position automatic determination unit 37. A modification of the second embodiment of the storage medium is constituted by a recording medium storing a computer program that causes the CPU 201 to perform the processing shown in FIG.
[0065]
In FIG. 10, after step S14, step S21 determines whether the data size of the moving image data 12-1 is larger than the data size of the non-background area data 4-2, and the determination result is YES. The process proceeds to step S15. On the other hand, if the determination result in step S21 is NO, image synthesis cannot be performed as it is, so that in step S22, the data size of the moving image data 12-1 is increased by the data size of the non-background area data 4-2. The process proceeds to step S15. Other processes are the same as those in the second embodiment.
[0066]
The first embodiment, the second embodiment, and modifications thereof may be combined as appropriate.
[0067]
The present invention also includes the inventions appended below.
[0068]
(Supplementary Note 1) A frame designation processing unit for designating a frame using a background from a moving image;
A background area designating unit for designating a background area from an image of a specified frame;
A background synthesis unit that synthesizes the entire background from the specified background region and outputs background data;
Provided with a non-background area setting unit that outputs a non-background area data by setting a non-background area flag indicating that no background exists in the area when there is an area that does not exist in the synthesized background image ,
An image processing apparatus, wherein the background data and the non-background area data constitute a background object image.
[0069]
(Supplementary Note 2) An overall movement information calculation unit that calculates the movement information by calculating the movement of the background area between the frames from the moving image,
The image processing according to (Appendix 1), wherein the background synthesis unit synthesizes an entire background based on background area information specifying the background area and the movement information and outputs the background as background data. apparatus.
[0070]
(Additional remark 3) The said background synthetic | combination part connects the overlap part of a background image, and synthesize | combines one still image, The image processing apparatus of (Additional remark 2) characterized by the above-mentioned.
[0071]
(Additional remark 4) Based on the non-background area | region data of the said background object image, the non-background area | region recognition part which recognizes the non-background area | region in a background and calculates | requires non-background area | region information,
Based on the non-background area information recognized by the non-background area recognition unit and the position information in the moving image data of the moving image object image, the position of an object that can cover the background hole is calculated, A composition position automatic determination unit for determining information;
According to the position information determined by the combined position automatic determination unit, the image processing unit further includes an image combining unit that combines the background data of the background object image and the moving image data of the moving image object image into one combined image. The image processing apparatus according to any one of (Appendix 1) to (Appendix 3).
[0072]
(Additional remark 5) The image designation | designated process part which designates the several image using a background,
A background area designating unit for designating a background area from a plurality of designated images;
A background synthesis unit that synthesizes the entire background from the specified background region and outputs background data;
Provided with a non-background area setting unit that outputs a non-background area data by setting a non-background area flag indicating that no background exists in the area when there is an area that does not exist in the synthesized background image ,
An image processing apparatus, wherein the background data and the non-background area data constitute a background object image.
[0073]
(Supplementary Note 6) For the background object image, the non-background region in the background is recognized based on the non-background region data in which the non-background region flag is set for the region where the background does not exist in the background image. A non-background area recognition unit for obtaining non-background area information;
Based on the non-background region information recognized by the non-background region recognition unit and the position information in the moving image data of the moving image object image to be combined with the background object image, the object that can cover the hole in the background A composite position automatic determination unit that calculates a position and determines position information;
An image combining unit that combines background data of a background object image and moving image data of a moving image object image into a single combined image according to position information determined by the combining position automatic determination unit. An image processing apparatus.
[0074]
(Supplementary note 7) A computer-readable storage medium storing a computer program for causing a computer to create a background object image,
The computer program is
Let the computer specify the frame that uses the background from the video,
Let the computer specify the background area from the image of the specified frame,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer-readable storage medium, wherein the background data and the non-background area data constitute the background object image.
[0075]
(Supplementary note 8) A computer-readable storage medium storing a computer program for causing a computer to create a composite image,
The computer program is
The computer recognizes the non-background area in the background based on the non-background area data in which the non-background area flag is set for the background object image in which no background exists in the background image. Ask for background area information,
The computer calculates the position of the object that can cover the background hole based on the recognized non-background area information and the position information in the moving image data of the moving image object image to be synthesized with the background object image. Let me determine the location information,
A computer-readable storage medium characterized by causing a computer to combine background data of a background object image and moving image data of a moving image object image into a single combined image according to determined position information.
[0076]
(Supplementary note 9) A computer-readable storage medium storing a computer program for causing a computer to create a background object image,
The computer program is
Let the computer specify multiple images that use the background,
Let the computer specify the background area from the specified images,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer-readable storage medium, wherein the background data and the non-background area data constitute the background object image.
[0077]
(Supplementary Note 10) A computer program for causing a computer to create a background object image,
Let the computer specify the frame that uses the background from the video,
Let the computer specify the background area from the image of the specified frame,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer program according to claim 1, wherein the background data and the non-background area data constitute the background object image.
[0078]
(Supplementary Note 11) A computer program for causing a computer to create a composite image,
The computer recognizes the non-background area in the background based on the non-background area data in which the non-background area flag is set for the background object image in which no background exists in the background image. Ask for background area information,
The computer calculates the position of the object that can cover the background hole based on the recognized non-background area information and the position information in the moving image data of the moving image object image to be synthesized with the background object image. Let me determine the location information,
A computer program for causing a computer to synthesize background data of a background object image and moving image data of a moving image object image into one synthesized image in accordance with the determined position information.
[0079]
(Supplementary Note 12) A computer program for causing a computer to create a background object image,
Let the computer specify multiple images that use the background,
Let the computer specify the background area from the specified images,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer program according to claim 1, wherein the background data and the non-background area data constitute the background object image.
[0080]
Although the present invention has been described with reference to the embodiments, it is needless to say that the present invention is not limited to the above-described embodiments, and various modifications and improvements can be made within the scope of the present invention.
[0081]
【The invention's effect】
According to the present invention, it is possible to generate a background object image from a moving image and perform image processing using the background object image as an independent image component even for a moving image in which a background is partially invisible. Become.
[0082]
In addition, when a background object image and a moving image object image as described above are combined, an object is automatically arranged so as to obscure a portion without a background, thereby easily creating a combined moving image without a hole in the background. It becomes possible to do.
[Brief description of the drawings]
FIG. 1 is a perspective view showing a computer system to which the present invention is applied in a first embodiment.
FIG. 2 is a block diagram illustrating a configuration of a main part in a main body of the computer system.
FIG. 3 is a diagram for explaining CPU processing in the first embodiment;
FIG. 4 is a diagram illustrating a data structure of background data.
FIG. 5 is a flowchart for explaining processing of a CPU in the first embodiment;
FIG. 6 is a diagram for explaining a background object image obtained by the first embodiment.
FIG. 7 is a diagram for explaining CPU processing in the second embodiment;
FIG. 8 is a flowchart for explaining processing of a CPU in the second embodiment.
FIG. 9 is a diagram for explaining a synthesized moving image obtained by the second embodiment.
FIG. 10 is a diagram for explaining processing of a CPU in a modification of the second embodiment.
[Explanation of symbols]
3 processing section
100 computer system
102 display
103 keyboard
104 mouse
105 modem
202 Memory unit

Claims (8)

動画像中から背景を利用するフレームを指定するフレーム指定処理部と、
指定されたフレームの画像から背景領域を指定する背景領域指定部と、
指定された背景領域から全体の背景を合成して背景データを出力する背景合成部と、
合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定して非背景領域データを出力する非背景領域設定部とを備え、
該背景データ及び該非背景領域データは、背景オブジェクト画像を構成することを特徴とする、画像処理装置。
A frame designation processing unit for designating a frame using a background from a moving image;
A background area designating unit for designating a background area from an image of a specified frame;
A background synthesis unit that synthesizes the entire background from the specified background region and outputs background data;
Provided with a non-background area setting unit that outputs a non-background area data by setting a non-background area flag indicating that no background exists in the area when there is an area that does not exist in the synthesized background image ,
An image processing apparatus, wherein the background data and the non-background area data constitute a background object image.
背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識して非背景領域情報を求める非背景領域認識部と、
該非背景領域認識部により認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出して、位置情報を決定する合成位置自動決定部と、
該合成位置自動決定部により決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成する画像合成部とを備えたことを特徴とする、画像処理装置。
Non-background area information by recognizing the non-background area in the background based on the non-background area data for which the non-background area flag is set for the background object image where the background does not exist in the background image A non-background region recognition unit for
Based on the non-background region information recognized by the non-background region recognition unit and the position information in the moving image data of the moving image object image to be combined with the background object image, the object that can cover the hole in the background A composite position automatic determination unit that calculates a position and determines position information;
An image combining unit that combines background data of a background object image and moving image data of a moving image object image into a single combined image according to position information determined by the combining position automatic determination unit. An image processing apparatus.
コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、動画像中から背景を利用するフレームを指定させ、
コンピュータに、指定されたフレームの画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータ読み取り可能な記憶媒体。
A computer-readable storage medium storing a computer program for causing a computer to create a background object image,
The computer program is
Let the computer specify the frame that uses the background from the video,
Let the computer specify the background area from the image of the specified frame,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer-readable storage medium, wherein the background data and the non-background area data constitute the background object image.
コンピュータに、合成画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、
コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、
コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とする、コンピュータ読み取り可能な記憶媒体。
A computer-readable storage medium storing a computer program for causing a computer to create a composite image,
The computer program is
The computer recognizes the non-background area in the background based on the non-background area data in which the non-background area flag is set for the background object image in which no background exists in the background image. Ask for background area information,
The computer calculates the position of the object that can cover the background hole based on the recognized non-background area information and the position information in the moving image data of the moving image object image to be synthesized with the background object image. Let me determine the location information,
A computer-readable storage medium characterized by causing a computer to combine background data of a background object image and moving image data of a moving image object image into a single combined image according to determined position information.
コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、
該コンピュータプログラムは、
コンピュータに、背景を利用する複数の画像を指定させ、
コンピュータに、指定された複数の画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータ読み取り可能な記憶媒体。
A computer-readable storage medium storing a computer program for causing a computer to create a background object image,
The computer program is
Let the computer specify multiple images that use the background,
Let the computer specify the background area from the specified images,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer-readable storage medium, wherein the background data and the non-background area data constitute the background object image.
コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、
コンピュータに、動画像中から背景を利用するフレームを指定させ、
コンピュータに、指定されたフレームの画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータプログラム。
A computer program that causes a computer to create a background object image,
Let the computer specify the frame that uses the background from the video,
Let the computer specify the background area from the image of the specified frame,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer program according to claim 1, wherein the background data and the non-background area data constitute the background object image.
コンピュータに、合成画像を作成させるコンピュータプログラムであって、
コンピュータに、背景オブジェクト画像のうち、背景の画像中に背景が存在しない領域に対しては非背景領域フラグが設定された非背景領域データに基づいて、背景中の非背景領域を認識させて非背景領域情報を求めさせ、
コンピュータに、認識された非背景領域情報と、該背景オブジェクト画像と合成する動画像オブジェクト画像の動画像データ内の位置情報とに基づいて、背景の穴を覆い隠すことのできる物体の位置を算出させて、位置情報を決定させ、
コンピュータに、決定された位置情報に従って、背景オブジェクト画像の背景データと、動画像オブジェクト画像の動画像データとを1つの合成画像に合成させることを特徴とする、コンピュータプログラム。
A computer program that causes a computer to create a composite image,
The computer recognizes the non-background area in the background based on the non-background area data in which the non-background area flag is set for the background object image in which no background exists in the background image. Ask for background area information,
The computer calculates the position of the object that can cover the background hole based on the recognized non-background area information and the position information in the moving image data of the moving image object image to be synthesized with the background object image. Let me determine the location information,
A computer program for causing a computer to synthesize background data of a background object image and moving image data of a moving image object image into one synthesized image in accordance with the determined position information.
コンピュータに、背景オブジェクト画像を作成させるコンピュータプログラムであって、
コンピュータに、背景を利用する複数の画像を指定させ、
コンピュータに、指定された複数の画像から背景領域を指定させ、
コンピュータに、指定された背景領域から全体の背景を合成して背景データを出力させ、
コンピュータに、合成された背景の画像中に背景が存在しない領域があると、その領域に背景が存在しないことを示す非背景領域フラグを設定させて非背景領域データを出力させ、
該背景データ及び該非背景領域データは、前記背景オブジェクト画像を構成することを特徴とする、コンピュータプログラム。
A computer program that causes a computer to create a background object image,
Let the computer specify multiple images that use the background,
Let the computer specify the background area from the specified images,
Let the computer synthesize the entire background from the specified background area and output the background data,
If there is an area where no background exists in the synthesized background image, let the computer set the non-background area flag indicating that there is no background in that area and output the non-background area data,
The computer program according to claim 1, wherein the background data and the non-background area data constitute the background object image.
JP2001191444A 2000-07-06 2001-06-25 Image processing apparatus, storage medium, and computer program Expired - Fee Related JP4226232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001191444A JP4226232B2 (en) 2000-07-06 2001-06-25 Image processing apparatus, storage medium, and computer program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000-205280 2000-07-06
JP2000205280 2000-07-06
JP2001191444A JP4226232B2 (en) 2000-07-06 2001-06-25 Image processing apparatus, storage medium, and computer program

Publications (2)

Publication Number Publication Date
JP2002084542A JP2002084542A (en) 2002-03-22
JP4226232B2 true JP4226232B2 (en) 2009-02-18

Family

ID=26595515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001191444A Expired - Fee Related JP4226232B2 (en) 2000-07-06 2001-06-25 Image processing apparatus, storage medium, and computer program

Country Status (1)

Country Link
JP (1) JP4226232B2 (en)

Also Published As

Publication number Publication date
JP2002084542A (en) 2002-03-22

Similar Documents

Publication Publication Date Title
JP4990994B2 (en) Short film generating apparatus, short film generating method, program, and recording medium
US7574069B2 (en) Retargeting images for small displays
US6798424B2 (en) Image processing method and apparatus and storage medium
US20130051771A1 (en) Image processing device and method, and program
JP3690391B2 (en) Image editing apparatus, image trimming method, and program
JP2004172671A (en) Moving picture processing method and apparatus
US20120237186A1 (en) Moving image generating method, moving image generating apparatus, and storage medium
JP2001109913A (en) Picture processor, picture processing method, and recording medium recording picture processing program
US6693960B2 (en) Moving picture encoder and moving picture decoder
JP2005056390A (en) Image display apparatus and short film generation device
JP4328397B2 (en) Image data processing method and apparatus, and storage medium
US7477761B2 (en) Image processing apparatus and method, and image-capturing apparatus
JP5408037B2 (en) Image processing apparatus and method, and program
JP2010092094A (en) Image processing apparatus, image processing program, and digital camera
JP4226232B2 (en) Image processing apparatus, storage medium, and computer program
US7522189B2 (en) Automatic stabilization control apparatus, automatic stabilization control method, and computer readable recording medium having automatic stabilization control program recorded thereon
JP2002163678A (en) Method and device for generating pseudo three- dimensional image
JP4323910B2 (en) Image composition apparatus and method
JP4189575B2 (en) Image processing apparatus, thumbnail movie creation method, and thumbnail movie creation program
WO2014132816A1 (en) Image processing device, method, and program
JP5371232B2 (en) Image processing apparatus and image processing method
JP5173377B2 (en) Image processing method and apparatus, program, and storage medium
JP5192940B2 (en) Image conversion apparatus, image conversion program, and image conversion method
JP7191514B2 (en) Image processing device, image processing method, and program
KR101607948B1 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061013

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081107

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

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

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

Free format text: PAYMENT UNTIL: 20111205

Year of fee payment: 3

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111205

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121205

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121205

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131205

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees