JP6700686B2 - Image processing apparatus, album creating method and program - Google Patents
Image processing apparatus, album creating method and program Download PDFInfo
- Publication number
- JP6700686B2 JP6700686B2 JP2015157512A JP2015157512A JP6700686B2 JP 6700686 B2 JP6700686 B2 JP 6700686B2 JP 2015157512 A JP2015157512 A JP 2015157512A JP 2015157512 A JP2015157512 A JP 2015157512A JP 6700686 B2 JP6700686 B2 JP 6700686B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- scene
- predetermined
- images
- time
- 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.)
- Active
Links
Images
Description
本発明は画像処理装置およびアルバム作成方法およびプログラムに関し、より具体的にはアルバム作成アプリケーション(アプリ)における自動レイアウト生成に関する。 The present invention relates to an image processing apparatus, an album creating method, and a program, and more specifically, to automatic layout generation in an album creating application (app).
近年、デジタルスチルカメラやカメラ機能が搭載された可搬型多機能携帯電話(以下、モバイルコンピュータ)が普及し、写真を撮る機会が増加している。そして、膨大な写真を手動で整理することを困難であると感じるユーザーも少なくない。それに伴い、自動で複数の画像を複数ページに割り当てることでアルバムを作成する方法として様々な方法が提案されている。画像を複数の見開きページにわたって割り当てるアルバムでは、単に各見開きページに撮影順に画像を並べただけでは、各見開きページごとの画像のまとまりがなくなってしまうおそれがある。そこで、例えば、画像を日や月などの期間単位に区切って見開きページに割り当てる方法が提案されている(例えば、特許文献1参照)。 2. Description of the Related Art In recent years, digital still cameras and portable multifunctional mobile phones equipped with camera functions (hereinafter referred to as mobile computers) have become widespread, and opportunities for taking pictures have increased. And many users find it difficult to manually organize large numbers of photos. Along with this, various methods have been proposed as a method for automatically creating a plurality of pages by assigning a plurality of images to a plurality of pages. In an album in which images are assigned to a plurality of spread pages, simply arranging the images on each spread page in the order of shooting may result in the loss of images on each spread page. Therefore, for example, a method has been proposed in which an image is divided into period units such as days and months and assigned to spread pages (see, for example, Patent Document 1).
全画像を期間等の所定の単位に複数の画像群に区切って各画像群を見開きに割り当て、割り当てられた画像群から好ましい画像を選択し見開きにレイアウトする場合、区切られた期間の数と、見開きの数が一致しない場合がある。 All images are divided into a plurality of image groups in a predetermined unit such as a period and each image group is assigned to a spread, and when a preferred image is selected from the assigned image group and laid out in a spread, the number of the divided periods, The number of spreads may not match.
本発明は、上記の課題に鑑みてなされたものでありレイアウト対象の複数の画像を複数のテンプレートに適切にレイアウトすることのできる画像処理装置および方法およびプログラムを提供することを目的とするものである。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing device, method, and program capable of appropriately laying out a plurality of images to be laid out in a plurality of templates. is there.
上記課題を解決する為に、本発明は以下の手段を有する。 In order to solve the above problems, the present invention has the following means.
画像をページにレイアウトしてアルバムを作成する画像処理装置であって、
所定数である複数のページへのレイアウト候補である複数の画像を、少なくとも1つ以上の画像を含む複数の画像群に分割する分割手段と、
前記複数の画像群の数が前記所定数より多い場合、前記複数の画像群の一部を、前記複数のページへのレイアウト対象から除外する除外手段と、
前記除外手段により一部の画像群が除外された前記複数の画像群に含まれる画像を、当該複数の画像群に対応する前記複数のページにレイアウトするレイアウト手段と
を備え、
前記除外手段は、所定の画像群と他の画像群との間の第1の条件と、前記所定の画像群内の第2の条件とに基づいて、前記所定の画像群を除外することを特徴とする。
An image processing device for laying out images on a page to create an album,
Dividing means for dividing a plurality of images, which are layout candidates for a predetermined number of pages, into a plurality of image groups including at least one or more images;
When the number of the plurality of image groups is larger than the predetermined number, a part of the plurality of image groups is excluded from the layout target of the plurality of pages ,
An image included in a portion of the plurality of image groups images were excluded of the said excluding means, and a layout section for laying the plurality of pages corresponding to the plurality of image groups,
Said excluding means includes exclusion eliminates the risk of corrupting the first and conditions, based on the second condition in the predetermined images, the predetermined images between a given image group and another image group Is characterized by.
本発明によれば、レイアウト対象の複数の画像を複数のテンプレートに適切にレイアウトすることができる。 According to the present invention, a plurality of layout target images can be appropriately laid out in a plurality of templates.
[第1実施形態]
本実施形態では、画像処理装置上で、アルバム作成アプリケーション(アプリ)を動作させ、自動レイアウトを生成するまでの手順について説明する。図1は、本発明に係る画像処理装置のハードウェアの構成を説明するブロック図である。なお、画像処理装置としては、情報処理装置、例えば、PC、スマートフォン等が挙げられ、本実施形態ではPCとする。
[First Embodiment]
In this embodiment, a procedure for operating an album creating application (app) on an image processing apparatus and generating an automatic layout will be described. FIG. 1 is a block diagram illustrating the hardware configuration of an image processing apparatus according to the present invention. Note that the image processing device may be an information processing device, for example, a PC, a smartphone, or the like, and is a PC in this embodiment.
図1において、CPU(中央演算装置/プロセッサー)101は、本実施形態で説明する画像処理方法をプログラムに従って実行する処理部である。図中のCPUは1つであるが、複数ある場合も本実施形態では該CPUの一部として表す。ROM102は、CPU101により実行されるプログラムが記憶されている。RAM103は、CPU101によるプログラムの実行時に、各種情報を一時的に記憶するためのメモリを提供している。HDD(ハードディスク)104は、画像ファイルや画像解析などの処理結果を保持するデータベースなどを記憶するための記憶媒体である。ROM102、RAM103、ハードディスク104が記憶部を構成する。ディスプレイ105は、本実施形態のUI(ユーザーインターフェイス)や画像のレイアウト結果をユーザーに提示する装置であり、表示部を構成する。ディスプレイ105はタッチセンサー機能を備えても良い。キーボード106は、ディスプレイ105に表示されたUI上に例えば作成したいアルバムの見開き数を入力するためにユーザーが利用する。マウス107は座標指示デバイスであり、ディスプレイ105に表示されたUI上のボタンをクリックするためなどに使用される。キーボード106、マウス107が入力部であり、ディスプレイ105とあわせてユーザーインターフェイスを構成する。データ通信装置108は、自動レイアウトのデータをPCに接続されたプリンタやサーバーに送信する。データバス109は前記した各部とCPU101を接続する。本発明に係るアルバム作成アプリケーションはHDD104に保存され、後述するようにユーザーがディスプレイ105に表示されているアプリケーションのアイコンをマウス107を使ってダブルクリックして起動する。
In FIG. 1, a CPU (central processing unit/processor) 101 is a processing unit that executes an image processing method described in this embodiment according to a program. Although the number of CPUs in the figure is one, a plurality of CPUs are also shown as a part of the CPUs in this embodiment. The
<自動レイアウト処理部>
図2は、本発明に係るアルバム作成アプリケーションの自動レイアウト処理部216に関するソフトウェアブロック図である。アルバム作成アプリケーションは様々な機能を持つが、本実施形態では、特に自動レイアウト処理部216により提供される自動レイアウト機能に関して説明する。自動レイアウト機能は、撮影された写真をその内容や属性に基づいて分類し、あるいは選択して写真をレイアウトし、ディスプレイ105に表示するアルバム画像を生成するための機能である。
<Automatic layout processing unit>
FIG. 2 is a software block diagram of the automatic layout processing unit 216 of the album creating application according to the present invention. The album creating application has various functions, but in this embodiment, the automatic layout function provided by the automatic layout processing unit 216 will be described in particular. The automatic layout function is a function for classifying the photographed photos based on their contents and attributes, or selecting and laying out the photos to generate an album image to be displayed on the
図2において、201は条件指定部であり、入力部たとえばマウス107による後述のUI操作に応じたアルバム作成条件を自動レイアウト処理部216に指定する。指定はたとえば条件指定部201を介してユーザーが行う。指定される条件には、たとえば対象となる画像や主人公のID、アルバムの見開き数、テンプレート情報、画像補正のON/OFF条件等の指定が含まれる。画像の指定は、たとえば撮影日時など個別の画像データの付随情報や属性情報による指定であってもよいし、デバイスやディレクトの指定など、画像データを含むファイルシステムの構造に基づく指定であってもよい。なお見開きとは、たとえば表示においてはひとつの表示用ウィンドウに相当し、印刷においては、異なるシートに印刷された、互いに隣接する1対のページに相当する。画像取得部202は、条件指定部201から指定された画像群をHDD104から取得する。画像変換203は、以降の処理に使う画像データを所望の画素数や色情報に変換する。本実施形態では、短辺の画素数として420画素を持ち、sRGBの色情報の解析画像データ(以下、解析画像と呼ぶ)に変換する。画像解析部204は、解析画像から後述の特徴量取得、顔検出、表情認識、個人認識を実施する処理である。また、HDD104から取得した画像に付随したデータ、例えばExif情報から撮影日時の取得も画像処理部204で実施する。画像分類部205は、画像群に対して撮影日時情報や枚数、検出した顔情報を使って後述のシーン分割、シーン分類を実施する処理である。シーンとは、旅行や日常、結婚式等の撮影シーンのことである。シーンとは、例えば、一つの撮影対象について一時期の撮影機会に撮影された画像の集まりであるということもできる。画像得点部207は、各画像に対してレイアウトに適した画像が高得点になるように得点付けをする。後述するが、得点付けの際は、本実施形態では画像解析部からの情報と、画像分類部からの情報とを使う。他の情報を付加的に或いは代替的に用いてもよい。主人公情報入力部206は、条件指定部201から指示された主人公のID(識別情報)を画像得点部に入力する。画像得点部207は、主人公情報入力部206から入力された主人公IDが含まれる画像の得点をアップできる構成となっている。見開き割当部209は、画像群を分割して各見開きに割り当てる。見開き入力部208は、条件指定部201から指定されたアルバムの見開き数を見開き割当部209に入力する。見開き割当部209は、入力された見開き数に応じて画像群を分割して各見開きに画像群の一部を割り当てる。画像選択部210は、見開き割当部209で各見開きに割り当てられた画像群の一部から画像得点部207で付けた得点を参考に画像を選択する。
In FIG. 2,
画像レイアウト部212は、画像のレイアウトを決定する。テンプレート入力部211は、条件指定部201から指定されたテンプレート情報に応じた複数のテンプレートを画像レイアウト部212に入力する。画像レイアウト部212は、画像選択部210に適したテンプレートを、テンプレート入力部211から入力された複数のテンプレートから選択し、画像のレイアウトを決定する。レイアウト情報出力部215は、画像レイアウト部212が決定した画像レイアウトに従って、ディスプレイ105に表示する為のレイアウト情報を出力する。レイアウト情報は例えば、選択したテンプレートに選択した画像をレイアウトしたビットマップデータである。画像補正部214は、覆い焼き補正、赤目補正、コントラスト補正をする。画像補正条件入力部213は、条件指定部201から指定された画像補正のON/OFF(オンまたはオフ)条件を画像補正部214に入力する。画像補正のオンまたはオフは、補正の種類ごとに指定されてもよいし、全ての種類についてまとめて指定されてもよい。画像補正部214は、画像補正条件がONの場合は、画像に対して補正を実施する。画像補正条件がOFFの場合は、補正を実施しない。尚、画像補正部214は、画像変換部203から入力された画像に対して、画像補正のON/OFFに従って補正を実施する。画像変換部203から画像補正部214に入力する画像の画素数は、画像レイアウト部212で決定したレイアウトのサイズに合わせて変えられる構成となっている。レイアウト情報出力部215から出力される画像データは、例えば図3に示すような形式でディスプレイ105に表示される。
The
本実施形態に係るアルバム作成アプリケーションは、PCにインストールするとPC上で動作するOS(オペレーティングシステム)のトップ画面(デスクトップ)上に起動アイコンが表示される。ユーザーはディスプレイ105に表示されているデスクトップ上の起動アイコンをマウス107でダブルクリックすると、HDD104に保存されているアルバム作成アプリケーションのプログラムがRAM103にロードされる。RAM103のプログラムがCPU101によって実行されて、アルバム作成アプリケーションが起動する。もちろんプログラムはROM102に記憶しておいてもよい。
When the album creating application according to the present embodiment is installed in a PC, a startup icon is displayed on the top screen (desktop) of the OS (operating system) operating on the PC. When the user double-clicks the start icon on the desktop displayed on the
<表示例>
図3は起動したアルバム作成アプリケーションが提供するUI構成画面301であり、ディスプレイ105に表示される。ユーザーは、表示画面であるUI構成画面301を介して、後述するアルバムの作成条件を設定することができる。UI構成画面301のパスボックス302はアルバム作成の対象となる画像群のHDD104中の保存場所(パス)を示す。ユーザーはフォルダ選択ボタン303をマウス107でクリックして、アルバム作成の対象とする画像群を含むフォルダを、表示されるツリー構成から選択する。選択した画像群を含むフォルダパスがパスボックス302に表示される。主人公指定アイコン304は、人物の顔画像が表示されるアイコンである。主人公指定アイコン304には複数の異なる顔画像のアイコンが並び、それぞれの顔画像は個人IDと関連付けられている。なおこの主人公指定アイコンは、解析対象の画像すなわち写真に写った人物から中心人物である主人公を特定するために用いられる。顔画像は、たとえば予め画像から検出され、個人IDと関連付けて顔データベースに登録されている。主人公アイコン304は、たとえば顔データベースに登録された人物の顔画像のうち、ユーザーが選択した人物の顔画像である。主人公は図4の手順で自動設定することもできるが、主人公アイコン304を指定することで、ユーザーが手動設定することもできる。ユーザーはたとえばマウス107によってクリックするなどして顔データベースから主人公アイコンを選択できる。見開き数ボックス305には、見開き数を指定するである。ユーザーはキーボード106を使って見開き数ボックス305に直接数字を入力するか、マウス107を使ってリストから見開き数ボックスに数字を入力する。テンプレート指定アイコン306は、テンプレートのテイスト(ポップ調やシック調等)が分かるイラスト画像である。複数のテンプレートアイコンが並び、マウス107によってクリックして選択できる。チェックボックス307は、画像補正のON/OFFを指定することができる。マウス107でチェックを入れると画像補正ONであり、チェックを入れないと画像補正OFFである。図3の例ではすべての補正についてまとめてオンまたはオフが指定される。
<Display example>
FIG. 3 shows a
OKボタン308は、UI構成画面301上で指定されている状態を条件指定部201に伝える為のボタンである。ユーザーがOKボタン308をマウス107でクリックすると、条件指定部201を介して、自動レイアウト処理部216にアルバム作成条件が指定される。パスボックス302に入力されているパスは画像取得部202に伝えられる。主人公指定アイコン304で選択されている主人公の個人IDは主人公情報入力部206に伝えられる。見開き数ボックス305に入力されている見開き数は見開き数入力部208に伝えられる。テンプレート指定アイコン306で選択されているテンプレート情報はテンプレート入力部211に伝えられる。画像補正チェックボックスの画像補正のON/OFFは画像補正条件入力部213に伝えられる。リセットボタン309はUI構成画面上の各設定情報をリセットするためのボタンである。
The
<自動レイアウト処理>
図4は本実施形態に係るアルバム作成アプリケーションの自動レイアウト処理部216に関する処理フロー図である。図4に示すフローチャートは、例えば、CPU101がHDD104に格納されたプログラムをROM102やRAM103に読み出して実行することにより実現される。図4を使って、自動レイアウトの処理フローを以下説明する。
<Automatic layout processing>
FIG. 4 is a process flow diagram regarding the automatic layout processing unit 216 of the album creating application according to the present embodiment. The flowchart shown in FIG. 4 is realized, for example, by the
Step01では、指定された画像群に含まれる画像に順次着目して、画像変換部203で着目画像の解析画像を生成する。すなわち、条件指定部201で指定されたHDD104の画像群の各画像を所望の画素数と色情報に変換する。本実施形態では、短辺420画素のサイズとsRGBの色情報とを持つ解析画像に変換する。
In Step 01, the images included in the designated image group are sequentially focused on, and the
Step02では、画像解析部204で着目画像の画像特徴量を取得する。HDD104から取得した着目画像画像データに付随する例えばExif情報から撮影日時を取得する。また、Step01で生成された着目画像の解析画像から特徴量を取得する。特徴量としては、例えば、ピントが挙げられる。エッジの検出方法として一般的にソーベルフィルタが知られている。ソーベルフィルタでエッジ検出して、エッジの始点と終点の輝度差を始点と終点の距離で割ればエッジの傾きすなわち輝度勾配を算出できる。対象画像中のエッジの平均傾きを算出して、平均傾き大の画像は平均傾き小の画像よりもピントが合っていると考えることが出来る。傾きに対して異なる値の複数の閾値を設定し、算出した平均傾きと閾値との比較に基づいてピント量を出せる。本実施形態では異なる2つの閾値を設定し、○△×の3段階でピント量を判別する。例えば、算出した平均輝度勾配が大きい方の閾値以上であれば良好(○)、大きい方の閾値より小さく小さい方の閾値以上であれば許容可(△)、小さい方の閾値より小さければ不良(×)と判定する。そして、アルバムに採用したいピントの傾きを○、許容できるピントの傾きを△、許容できない傾きを×として、実験を通して閾値を設定する。
In Step 02, the
Step03では、画像解析部204で顔検出を実施する。ここではStep01で生成された着目画像の解析画像から顔を検出する。顔の検出は、公知の方法を用いることができ、例えば、複数用意した弱識別器から強識別器を作成するAdaboostが挙げられる。本実施形態では、Adaboostにより作成した強識別器により人物(オブジェクト)の顔を検出する。顔画像を抽出すると共に、検出した顔領域の左上座標値と右下座標値を取得する。この2種の座標を持つ為、顔の位置と顔のサイズを知ることが可能である。顔に限らず、犬や猫等の動物、花、食べ物、建物、置物等のオブジェクトを顔の代わりの検出対象としてAdaboostによって強識別器を作成することができる。これにより、顔以外のオブジェクトを検出することができる。
In Step 03, the
Step04では、画像解析部204で個人認識をする。Step03で抽出した顔画像と顔辞書データベースに個人ID毎に保存されている代表顔画像との類似性を比較する。類似性が閾値以上で最も類似性が高いIDを抽出した顔画像のIDとする。尚、類似性が閾値未満の場合は新規の顔として新規の個人IDとして顔辞書データベースに抽出した顔画像を登録する。
In Step 04, the
Step02からStep04で取得した画像解析情報500は、図5に示すように各画像を識別するID501毎に区別して記憶する。Step02で取得した撮影日時情報502とピント判別結果503、Step03で検出した顔の数504と位置情報505を保存する。尚、顔の位置情報はStep04で取得した個人ID毎に区別して記憶する。
The
Step05では、条件指定部201で指定されたHDD104の画像群の全画像に対してStep01からStep04が終了したか否かを判定する。終了していない場合(No)は新たな画像を着目画像としてStep01に戻る。終了している場合(Yes)はStep06に移行する。
In Step 05, it is determined whether Step 01 to Step 04 have been completed for all the images in the image group of the
Step06では、画像分類部205でシーン分割をする。Step02で取得済みの撮影日時情報から算出した画像と画像との時間差に基づいて画像群を複数に分割する。分割の基準の例は以下のとおりである。画像群のうち、たとえば最も撮影日時が古い(或いは新しい)画像に最初に着目し、その次に古い(新しい)画像との時間差を参照する。これを、着目画像を順次撮影日時が新しい(或いは古い)ものに置き換えつつ以下の判断を行う。なお以下の説明で分割するとは、2つの画像間を境に撮影日時の新しい方と古い方とに画像群を分割するという意味である。
1.画像間に撮影していない日が存在する場合は分割する。
2.撮影日が連続し、かつ時間差が16時間以上空いている場合は分割する。
3.撮影日が連続し、かつ時間差が16時間未満の場合は、連続する各日の最初の撮影から最後の撮影までの時間差が4時間未満なら分割する。
4.撮影日が連続し、かつ時間差が16時間未満、かつ連続する各日の最初の撮影から最後の撮影までの時間差が4時間以上の場合は、連続する各日の撮影枚数が50枚未満なら分割する。
5.上記以外の場合には分割しない。
In Step 06, the
1. If there is a non-photographed day between images, divide it.
2. If the shooting days are continuous and the time difference is 16 hours or more, the image is divided.
3. If the shooting days are continuous and the time difference is less than 16 hours, the image is divided if the time difference from the first shooting to the last shooting on each continuous day is less than 4 hours.
4. If the shooting days are continuous and the time difference is less than 16 hours, and the time difference from the first shooting to the last shooting on each consecutive day is 4 hours or more, if the number of consecutive shootings on each day is less than 50 To do.
5. In cases other than the above, do not divide.
もちろんこれ以外にも分割の基準はあり得る。たとえば撮影地が画像の付随情報に含まれている場合には、時間的には分割しない場合に該当しても、撮影地が所定距離以上離れていれば分割するものとしてもよい。図6(A)は前記説明したシーン分割方法で分割した結果を示している。なお分割後の画像群を分割と呼ぶ。 Of course, there may be other criteria for division. For example, when the shooting location is included in the accompanying information of the image, even if the shooting location is not divided in time, the shooting location may be divided if the shooting location is separated by a predetermined distance or more. FIG. 6A shows the result of division by the scene division method described above. The image group after division is called division.
Step07では、画像分類部206でシーン分類をする。本実施形態では、旅行、日常、セレモニーに分類する例で説明する。シーン分類のためには、予め、旅行、日常、セレモニーだと判定した画像群をそれぞれ複数集める。各画像群について、特徴量を取得する。ここで取得する特徴量の例は、例えば撮影期間、撮影枚数、撮影人数である。撮影期間は画像群の最初の撮影から最後の撮影までの時間差である。撮影枚数は画像群に含まれた画像の撮影枚数である。撮影人数は顔が写っている画像における顔の数である。シーン毎に集めた複数の画像群に対して次の値を求める。撮影期間の平均値と標準偏差、撮影枚数の平均値と標準偏差、1画像あたりの人数の平均値と標準偏差である。図7は本実施形態で求めた各平均値と標準偏差を示しており、シーン分類のためにあらかじめ用意されたテーブル700を示す。これらの求めた値を含むテーブル700をアルバム作成アプリケーションのプログラムに予め組み込んでおく。テーブル700では、シーンID701に対応付けて、撮影期間702、撮影枚数703、撮影人数704それぞれの平均値と標準偏差とが登録されている。Step07では、アルバム作成アプリケーションが起動された後、ユーザーがパスボックス302で指定した画像群のStep06でシーン分割された各分割群に対して、撮影期間と撮影枚数、撮影人数の平均値を算出する。各分割群の撮影期間、撮影枚数、撮影人数の特徴量について、図7に示したシーン毎の平均値と標準偏差を使って以下の得点化を実施する。なお下式の平均値および標準偏差は、テーブル700に登録されたシーンの分類ごとの撮影期間、撮影枚数、撮影人数それぞれの平均値および標準偏差であり、特徴量は、分割ごとの撮影期間と撮影枚数、撮影人数それぞれの値である。特徴量項目数は本例では3となる。
シーン分類および特徴量ごとの得点=50−|10×(シーン分類および特徴量ごとの平均値−分割群ごとの特徴量)/シーン分類および特徴量ごとの標準偏差|
シーン分類ごとの平均得点=(シーン分類ごとの撮影期間の得点+シーン分類ごとの撮影枚数の得点+シーン分類ごとの撮影人数の得点)/特徴量項目数。
上記第1式により、着目分割の、各シーンおよび各特徴量についての得点が求められる。例えば、旅行シーンの撮影期間、撮影枚数、撮影人数それぞれの得点が求められる。これら得点を第2式により平均化して、当該シーン分類に関する得点とする。同様に、日常、セレモニーという他のシーンについても得点が得られる。
In Step 07, the
Score for each scene classification and feature amount=50−|10×(mean value for each scene classification and feature amount−Feature amount for each divided group)/standard deviation for each scene classification and feature amount|
Average score for each scene classification = (shooting period score for each scene classification + number of shots for each scene classification + score for shooting number for each scene classification) / number of feature amount items.
From the first formula, the score for each scene and each feature amount of the target division is obtained. For example, a score for each shooting period of the travel scene, the number of shots, and the number of shots are required. These scores are averaged by the second formula to obtain the scores for the scene classification. Similarly, scores are obtained for other scenes such as everyday and ceremonies.
以上によって、各分割に対して旅行、日常、セレモニー毎の平均得点が算出される。分割毎に平均得点が最高点のシーンをその分割のシーンだと分類する。同点の場合は、優先シーンに分類する。例えば本実施形態では、日常>セレモニー>旅行の優先順であり、日常の優先度を最も高くしている。図6(A)のシーン分割された後の画像群(シーン)5は、たとえば撮影期間が36時間、撮影枚数が300枚、撮影人数が1.7人であった。旅行の平均得点は45.32、日常の平均得点は18.38、セレモニーの平均得点は−29.92となり、シーンは最高得点のシーンである旅行に分類される。分類したシーンは識別ができるようにシーンIDで管理する。 As described above, the average score for each trip, daily life, and ceremony is calculated for each division. For each division, the scene with the highest average score is classified as the scene of the division. If there is a tie, it is classified as a priority scene. For example, in the present embodiment, the order of priority is: daily life> ceremony> travel, and the daily life priority is the highest. In the image group (scene) 5 after the scene division in FIG. 6A, for example, the shooting period was 36 hours, the number of shots was 300, and the number of shots was 1.7. The average score of travel is 45.32, the average score of daily life is 18.38, the average score of ceremony is -29.92, and the scene is classified as the travel with the highest score. The classified scenes are managed by scene ID so that they can be identified.
Step08はStep06で分割された全シーンに対してStep07のシーン分類が終了したか否かを判定する。終了していない場合(No)は処理が済んでいない新たな分割に着目してStep07に戻る。終了している場合(Yes)はStep09に移行する。 In Step 08, it is determined whether or not the scene classification in Step 07 is completed for all the scenes divided in Step 06. If not completed (No), pay attention to a new division that has not been processed and return to Step 07. If completed (Yes), move to Step 09.
Step09では、画像得点化部207で主人公設定をする。主人公設定はユーザーが指定した画像群に対して実施され、自動と手動の2種類がある。Step04において実施された個人認識の結果と、Step06において実施されたシーン分割の結果から、画像群に登場する各個人IDの回数、各シーンに登場する各個人IDの回数、各個人IDが登場するシーンの回数等を知ることが可能である。これらの情報から自動で主人公を設定する。本実施形態では、画像群に複数シーンがある場合は複数のシーンに登場する個人IDを主人公IDと設定し、画像群が単一シーンである場合は、単一シーンの登場回数が多い個人IDを主人公IDと設定する。主人公設定アイコン304をユーザーが指定している場合は、主人公情報入力部206を介して個人IDが画像得点部207に伝えられる。ユーザー指定の個人IDがある場合は、前記説明した自動設定の主人公IDは無視して、ユーザー指定の個人IDを主人公IDと設定する。この設定を手動設定と呼ぶ。
In Step 09, the
Step10では、画像得点化部207で得点化をする。得点化とは、後述の画像選択時に参照する値であり、画像毎に後述の観点で評価した得点を付ける。図10は画像のレイアウトに使うテンプレート群を示している。1枚のテンプレート1001には、メインスロット1002、サブスロット1003と1004とが含まれる。メインスロット1002とは、テンプレート1001でメインとなるスロット(画像をレイアウトする枠)であり、サブスロット1003と1004よりもサイズが大きい特徴を持っている。得点化は、メインスロット用の得点とサブスロット用の得点の両方を画像毎に付ける処理である。図8(A)は旅行、日常、セレモニーの各シーンによってアルバムに採用する画像の特徴をメインスロットとサブスロットに分けてまとめた表である。図8(A)に示す表において、各シーンのメインスロット向き画像特徴とサブスロット向きの特徴それぞれに適合すると判定した複数の画像を予め集めておく。集めた各画像の顔の数、顔の位置、顔のサイズの特徴量を抽出して、それら特徴量の平均値と標準偏差とを、収集した画像が対応する各シーンおよび各スロット種類(メインスロットとサブスロット)に対して求めて、アルバム作成アプリケーションのプログラムとともに記憶しておく。その例を図8の表800に示す。ユーザーが指定した画像群の各画像がどのシーンに属すかはStep07のシーン分類の結果から知ることができる。注目画像のシーンに対応する予め求めた前記平均値と標準偏差、および注目画像の主人公IDの顔数、顔位置、顔サイズの各特徴量に対して以下の式を使って得点と平均得点を出す。下式において得点、平均値、標準偏差は、シーン分類、スロット種類及び特徴量ごとに求められる。
得点=50−|10×(平均値−特徴量)/標準偏差|
平均得点=(顔数の得点+顔位置の得点+顔サイズの得点)/特徴量項目数。
In
Score=50−|10×(average value−feature amount)/standard deviation|
Average score=(score of face count+score of face position+score of face size)/number of feature amount items.
得点化をメインスロット用とサブスロット用の両方を実施する。またアルバムに使う画像はピントが合っている方が好ましい為、図5に示すピントの特徴量が○である画像IDの画像に対しては得点を加算してもよい。図8(B)は前記説明の得点化による得点結果の例を示しており、表800においては、各画像ID801に対して、メインスロットとサブスロットのそれぞれの得点化がされて、得点802が登録されている。
Both the main slot and the sub slot are scored. Further, since it is preferable that the images used in the album are in focus, the score may be added to the image ID shown in FIG. FIG. 8B shows an example of the scoring result obtained by the scoring described above. In the table 800, each
Step11では、画像得点部207がユーザー指定の画像群の全画像に対してStep10の画像得点化が終了したか否かを判定する。終了していない場合(No)は未処理の次の画像について着目し、Step10に戻る。終了している場合(Yes)はStep12に移行する。
In
本実施形態では、画像レイアウト部212は、複数のシーンのそれぞれに含まれる画像を、当該複数のシーンのそれぞれに対応する複数のテンプレート(複数の見開き)のそれぞれにレイアウトする。そのため、複数のシーンの数と、複数のテンプレートの数(見開き数)が一致する必要がある。
In the present embodiment, the
Step12では、見開き割当部209が画像分類部205のシーン分割(Step06)の分割数が見開き数入力部208から入力される見開き数と同じか否かを判定する。同じでない場合(No)はStep13に移行する。同じ場合(Yes)はStep16に移行する。例えば図6(A)のシーン分割数は8であり、見開き数入力部208の入力数が8であればStep16に移行する。
In
Step13では、見開き割当部209が、画像分類部205のシーン分割(Step06)の分割数が見開き数入力部208から入力される見開き数より少ないか否かを判定する。多い場合(No)はStep15に移行する。少ない場合(Yes)はStep14に移行する。図6(A)のシーン分割数は8であり、例えば見開き数入力部208の入力数が10であればStep14に移行する。
In
Step14では、見開き割当部209がサブシーン分割をする。サブシーン分割とは、シーン分割数<見開き数の場合に、分割されたシーンを更に細分することを指す。図6(A)のシーン分割数8に対して指定見開き数が10の場合で説明する。図6(B)は図6(A)をサブシーン分割した結果である。破線矢印の箇所で分割したことで、分割数を10にしている。分割の基準は以下である。図6(A)の分割の中で画像枚数が多い分割箇所を探す。ここでは、分割数を8から10に2箇所増やす為、画像枚数が多い2箇所を決める。すなわち、再分割すべき数のシーンを、最も多くの画像を含むシーンから順に指定する。画像数が同数のシーンについては、画像間の撮影日時の差の最大値が大きい方のシーンを選択する。それでも決定できない場合には、たとえば時間的に早いシーンを優先的に再分割するなど、適宜決めておけばよい。図6(A)では画像の数が多い方からシーン5、次にシーン1と2である。シーン1と2は同じ枚数だが、シーン2の方が、最初に撮影した画像から最後に撮影した画像の時間差が大きい為、シーン2を分割対象とする。すなわちシーン5とシーン2をそれぞれ分割する。まずシーン2の分割を説明する。シーン2には画像枚数の山が2つあり、この2つは撮影日が違う。そこで図6(B)の破線矢印の箇所で分割する。次にシーン5の分割を説明する。シーン5には画像枚数の山が3つあり、3日連続である。撮影日が変わる箇所が2箇所あるが、分割後の枚数差が小さくなるように、撮影日単位で分割する。すなわち図6(B)の破線矢印の箇所で分割する。以上により分割数すなわちシーン数を8から10にする。一般的にいえば、シーンの再分割は、選択したシーンに撮影日の異なる画像が含まれていれば、撮影日の相違するそれぞれの画像群を新たなシーンとするよう分割する。撮影日が3日以上にわたるならば、各シーンに含まれる画像の数の差が最小になり、同一撮影日の画像が同一シーンに含まれるよう再分割を行う。ここでは撮影日の違う箇所で分割したが、撮影日が単一日であった場合は、単一日の中で撮影時刻の時間差が最大の箇所で分割する。以上の手順によって見開き数にシーン数を一致させる。なお分割により生成されたシーンについては、改めて分類してもよいし、分割前のシーンの分類を引き継いでもよい。サブシーン分割処理については図13を参照して説明する。
In
Step15では、見開き割当部209がシーン削除をする。シーン削除とは、シーン分割数>見開き数の場合に、分割されたシーンから条件に該当するシーンを削除する処理である。これによって見開き数にシーン数を一致させる。なお、シーンの削除とは、当該シーンに含まれる画像を見開きへのレイアウト対象から除外させる為の処理である。例えばRAM103においてアルバム作成のために設けられている記憶領域から当該シーンの画像を削除してもよいし、当該シーンの画像に、レイアウト対象から除外されていることを示すフラグを設定してもよい。Step115における処理の詳細については図11を参照して後述する。
In Step 15, the
Step16では、見開き割当部209が見開き割当をする。Step12〜Step15によって、シーン分割数と指定見開き数は同じになっている。撮影日時的に先頭の分割から見開きの先頭に順に割り当てる。
In Step 16, the two-page
Step17では、画像選択部210が画像選択をする。ここでは、ある見開きに割り当てられた画像群の分割(すなわちシーン)から画像を4枚選択する例を、図9を使って説明する。図9(A)は見開きに割り当てられた分割(シーン)の撮影日時的に最初の画像から最後の画像の時間差(分割撮影期間)を示している。テンプレートには1枚のメインスロット1002が含まれる。1枚目に選択する画像はメインスロット用の画像である。図9(B)に示す分割撮影期間に対応する画像のうち(すなわち着目シーンに含まれる画像のうち)Step10で付けたメインスロット用の得点が最高点の画像(1)を選択する。2枚目以降に選択する画像はサブスロット用の画像である。画像選択は分割撮影期間の一部に集中しないように、以下説明するように工夫をする。図9(C)のように分割撮影期間を2分割する。次に図9(D)のように1枚目が選ばれていない実線の分割撮影期間から2枚目を選択する。2枚目としては、実線の分割撮影期間に対応する画像のうちサブスロット用の得点が最高点の画像(2)を選択する。次に図9(E)のように図9(D)の各分割撮影期間を2分割する。図9(F)のように1枚目と2枚目がいずれも選ばれていない実線の分割撮影期間に対応する画像のうち、サブスロット用の得点が最高点の画像(3)を3枚目として選択する。
In Step 17, the
次に画像を選択する分割撮影期間に画像が存在せず、画像選択できない例を4枚目の選択を例に説明する。図9(G)のようにまだ画像が選ばれていない斜線の分割撮影期間から4枚目を選択したいが、この斜線の分割撮影期間には画像が存在しないものとする。そこで図9(H)のように各分割撮影期間を2分割する。次に図9(I)のように1〜3枚目が選ばれていない実線の分割撮影期間に対応する画像のうちサブスロット用の最高点の画像(4)を4枚目として選択する。 Next, an example in which an image does not exist in the divided shooting period for selecting an image and the image cannot be selected will be described by taking the selection of the fourth image as an example. As shown in FIG. 9G, it is desired to select the fourth image from the diagonally divided divided photographing periods in which no image has been selected yet, but it is assumed that no image exists in this diagonally divided divided photographing period. Therefore, each divided shooting period is divided into two as shown in FIG. Next, as shown in FIG. 9(I), the image (4) of the highest point for the sub-slot is selected as the fourth image among the images corresponding to the solid-line divided photographing periods in which the first to third images are not selected.
Step18では、画像レイアウト部212が画像レイアウトを決定する。画像レイアウトの決定のために、選択した画像を基にしてテンプレートを選択する。その方法は例えば以下のとおりである。まずテンプレート入力部211により入力されたテンプレート群を候補とする。次に、その候補から、テンプレート内のメインスロットの位置が、着目シーンの選択された画像群におけるメインスロット用画像の時系列的な位置に対応しているテンプレートを選択する。この判定は、たとえばテンプレート上のスロットの位置が、左上から右下へと時系列に沿って配置されることを前提として行われる。しかし各スロットの位置と画像とを個別に対応付けるのは煩雑なので、たとえばテンプレートをメインスロットとサブスロットの位置に応じてグループ分けしておき、さらに画像の方向(縦長、横長)に応じてさらにグループ分けしておく。そしてメインスロット用画像の時系列上の位置及び方向に応じてテンプレートを絞り込み、さらにサブスロットについての同様に絞り込む。このようにして、テンプレートの候補を絞り込み、最終的に採用するテンプレートを決定する。
In Step 18, the
次にStep18を、テンプレート入力部211が、指定のテンプレート情報に従ってある見開きに対して図10の(1−1)〜(4−4)を入力した例で説明する。入力されたテンプレートのスロット数は3である。選択されている画像3枚の画像を撮影日時に対して並べると図9(J)のように縦長、横長、縦長であったとする。ここでは、画像1005がメインスロット用であり、画像1006と画像1007がサブスロット用である。本実施形態で作成するレイアウトは、テンプレートの左上に撮影日時のより古い画像、右下に撮影日時のより新しい画像をレイアウトする。メインスロット用画像1005は撮影日時が一番新しい為、図10の(3−1)〜(3−4)と(4−1)〜(4−4)のテンプレートが候補となる。このうちメインスンロット用画像1005は縦長なので、テンプレート(4−1)〜(4−4)が候補となる。サブスロット用の古い方の画像1006が縦画像で、新しい方の画像1007が横画像の為、テンプレート(4−2)が、選択された画像に最も適したテンプレートとしてレイアウトが決まる。本ステップで決まるのは、どの画像をどのテンプレートのどのスロットにレイアウトするかを識別できる情報である。
Next, Step 18 will be described with an example in which the
Step19では、画像補正部214が画像補正をする。画像補正条件入力部からONが入力された場合は、画像補正を実施する。画像補正は、覆い焼き補正、赤目補正、コントラスト補正を自動で実施する。画像補正条件入力部からOFFが入力された場合は、画像補正を実施しない。補正する画像の画素数は短辺1200画素で、sRGBの色空間に変換した画像に対して画像補正ON/OFFを実施する。
In Step 19, the
Step20では、レイアウト情報出力部215がレイアウト情報を作成する。Step18で決まったテンプレートの各スロットに、対応する画像をレイアウトする。補正オンであれば補正済みの画像をレイアウトする。このとき、スロットのサイズ情報に合わせてレイアウトする画像を変倍してレイアウトする。テンプレートに画像をレイアウトしたビットマップデータを生成する。
In
Step21ではStep17〜Step20が全ての見開きに対して終了したか否かを判定する。終了していない場合(No)はStep17に戻る。終了している場合(Yes)は自動レイアウト処理を終了する。 In Step 21, it is determined whether Step 17 to Step 20 have been completed for all spreads. If not completed (No), return to Step 17. If it is finished (Yes), the automatic layout process is finished.
以上の手順により、指定された見開きの数に応じて分割されたシーンの数を調整し、見開きごとにシーンを適切にレイアウトしたアルバムを作成できる。また、重要度が低いと推定されるシーンを再分割して削除することで、関連性の低い画像をシーンから削除し、シーンを整理することができる。 By the above procedure, the number of scenes divided according to the specified number of spreads can be adjusted, and an album in which the scenes are appropriately laid out for each spread can be created. In addition, by re-dividing and deleting a scene that is estimated to have low importance, it is possible to delete unrelated images from the scene and organize the scene.
<シーン削除フローの詳細>
ここで、本発明の特徴であるシーン削除(図4のStep15)について説明する。図4のStep06のシーン分割において、その成功率が100%であるとは限らない。場合によっては失敗するケースがある。説明したように、撮影時間が16時間以上空いている場合はその空き時間を境界としてシーン分割を行う。よって、16時間という閾値付近に該当するシーンの場合は、分割に失敗する可能性が相対的に高くなる。失敗とはたとえば、分割すべきでないシーンを分割すること、あるいは逆に分割されるべきシーンが分割されないことを示す。しかし、シーン分割が失敗しているか否かは、正解を外部から入力しない限り、処理フローのなかでは判断することが困難である。よって、シーン分割に失敗している場合であってもレイアウトの出来栄え品質を損なわないようにするため、シーンの重要性に基づいて処理を切り替える処理を行う。
<Details of scene deletion flow>
Here, the scene deletion (Step 15 in FIG. 4) which is a feature of the present invention will be described. In the scene division of Step 06 of FIG. 4, the success rate is not always 100%. There are cases where it fails. As described above, when the shooting time is 16 hours or more, scene division is performed with the free time as a boundary. Therefore, in the case of a scene corresponding to a threshold value of 16 hours, the possibility of division failure is relatively high. Failure means, for example, that a scene that should not be divided is divided, or conversely, a scene that should be divided is not divided. However, it is difficult to judge whether the scene division has failed in the processing flow unless the correct answer is input from the outside. Therefore, even if scene division has failed, processing is switched based on the importance of the scene in order not to impair the quality of the layout.
シーン分割に失敗する例として、旅行で撮影した画像群が挙げられる。例えば、複数日の旅行において、1日目の夜に撮影した後、2日目の朝まで撮影しないケースがある。この場合、理想としては同じ旅行であるためシーンが分割されるべきではない。しかし、1日目の夜から2日目の朝までの時間差が前記閾値の16時間を超える場合、異なるシーンとして分割されるケースが発生する。 An example of failure in scene division is a group of images taken on a trip. For example, in a multi-day trip, there may be a case where the first night is taken and then the second morning is not taken. In this case, the scene should not be divided because the trip is ideally the same. However, when the time difference from the night of the first day to the morning of the second day exceeds the threshold value of 16 hours, there are cases where the scenes are divided into different scenes.
ここで、1日目の夜に撮影した枚数がごくわずかであれば、シーンとしての重要度は低いと考えられる。よって、この場合は該当シーンの画像をレイアウト候補画像から削除することで、他のシーンに混ざることを回避することが可能となる。逆に、1日目の夜に撮影した枚数が多ければ、シーンとしての重要度は高いと考えられる。よって、この場合は該当シーンの画像をレイアウト候補画像から削除しないことで、重要なシーンの欠落を回避することが可能となる。 Here, if the number of shots taken on the night of the first day is very small, the importance of the scene is considered to be low. Therefore, in this case, by deleting the image of the relevant scene from the layout candidate image, it is possible to avoid mixing with other scenes. On the contrary, if the number of images taken on the first night is large, it is considered that the scene is of high importance. Therefore, in this case, by omitting the image of the relevant scene from the layout candidate image, it is possible to avoid the loss of an important scene.
図11を用いてシーン削除処理(Step15)の詳細について説明する。まずS1101において、シーンの時間差を取得する。ここで、シーンの時間差はシーン情報から取得することができる。シーン情報の例を図12に示す。シーン情報はシーン分割時に各シーンに含まれる画像の画像情報および付随情報等に基づいて生成される。シーン情報は、シーンをサブシーンに分割した場合や、シーン(あるいはサブシーン)を統合(あるいは結合)した場合にも、その分割や統合に応じて更新される。図12(A)はシーン分割数をNとしたとき、N=14の例である。シーンIDは、各シーン固有のID(1から14までの数字に対応)を表す。シーン情報は、各シーンにおける画像数、人物数、期間、時間差から構成される。画像数は、シーンに分割された各シーンに含まれる画像の枚数を表す。人物数は、各シーンに含まれる画像中の人数の合計を表す。人数は前記画像解析部204で検出された顔の数とする。期間は、各シーンに含まれる画像の撮影期間であり、画像を撮影時間順に並べた時の先頭と最後尾の撮影時間の時間差を表す。時間差は、シーンに分割された各シーン間の時間差であり、画像を撮影時間順に並べた時の対象シーンの最後尾と次シーンの先頭の時間差を表す。ステップS1101では着目シーンについて時間差を取得する。
Details of the scene deletion process (Step 15) will be described with reference to FIG. First, in step S1101, the time difference between scenes is acquired. Here, the time difference of the scene can be acquired from the scene information. An example of the scene information is shown in FIG. The scene information is generated based on the image information of the images included in each scene and the accompanying information when the scene is divided. The scene information is updated according to the division or integration even when the scene is divided into subscenes or when the scenes (or subscenes) are integrated (or combined). FIG. 12A shows an example in which N=14, where N is the number of scene divisions. The scene ID represents an ID unique to each scene (corresponding to a number from 1 to 14). The scene information includes the number of images in each scene, the number of people, the period, and the time difference. The number of images represents the number of images included in each scene divided into scenes. The number of people represents the total number of people in the images included in each scene. The number of people is the number of faces detected by the
ステップS1102において、前記時間差が閾値の範囲に含まれるか否か、すなわち所定時間以内であるか否かを判定する。前記閾値はシーン分割で使用する閾値近辺の値を設定することが好ましい。本実施形態においては、16時間以上20時間以内とする。閾値の範囲に含まれない場合は、シーン分割に失敗している可能性は低い。よって、シーンの削除は行わずS1105において全シーンに対する処理が終了したか否かを判定する。終了していない場合は、次のシーンに着目してS1101に戻り、次のシーンに対して処理を行う。 In step S1102, it is determined whether the time difference is included in the threshold range, that is, whether the time difference is within a predetermined time. The threshold value is preferably set to a value near the threshold value used for scene division. In the present embodiment, it is 16 hours or more and 20 hours or less. If it is not included in the threshold range, it is unlikely that scene division has failed. Therefore, it is determined in S1105 whether or not the processing for all the scenes is completed without deleting the scenes. If it has not been completed, the next scene is focused on and the process returns to S1101 to process the next scene.
一方、前記時間差が閾値以内の場合は、シーン分割に失敗している可能性がある。図12(A)ではシーンID「2」、「6」、「7」、「8」および「11」が該当する。この場合はステップS1103において、削除条件を満たすか否かを判定する。削除条件を満たさない場合は、重要であり削除すべきではないシーンである可能性が高いため、削除せずステップS1105に進む。削除条件を満たす場合は、削除しても問題のないシーンである可能性が高いため、ステップS1104において着目シーンを削除する。ステップS1101からステップS1104までの処理を全てのシーンに対して実行する。本実施形態では、ステップS1103の削除条件としてシーン情報の画像数が所定数以下、例えば10枚以下であることとする。該当する場合には、着目シーンは重要なシーンでない可能性が高いためシーン削除を行う。上述したシーン分割に失敗した可能性のあるシーンのうちシーンID「7」については画像数が10枚を超えているため、シーン削除の対象にはならない。結果として図12(B)がシーンとして残る。全てのシーンについて処理が終了した場合はS1106においてシーン数と指定見開き数が一致しているか判定を行う。本実施例では図12(B)に示すようにシーン数が10であり、指定見開き数と一致するため処理を終了する。シーン数が指定見開き数と一致していない場合は、シーン数と指定見開き数とが一致するまでS1107においてシーンの統合を行う。 On the other hand, if the time difference is within the threshold value, there is a possibility that scene division has failed. In FIG. 12A, scene IDs “2”, “6”, “7”, “8” and “11” correspond. In this case, it is determined in step S1103 whether the deletion condition is satisfied. If the deletion condition is not satisfied, there is a high possibility that the scene is important and should not be deleted, and therefore the process proceeds to step S1105 without deletion. If the deletion condition is satisfied, there is a high possibility that the scene has no problem even if it is deleted. Therefore, the focused scene is deleted in step S1104. The processing from step S1101 to step S1104 is executed for all scenes. In the present embodiment, it is assumed that the number of images of the scene information is a predetermined number or less, for example, 10 or less, as the deletion condition of step S1103. If so, the scene of interest is likely to be an unimportant scene and is deleted. Of the scenes that may have failed in the above-described scene division, the scene ID “7” has more than 10 images, and thus is not a target for scene deletion. As a result, FIG. 12B remains as a scene. When the processing is completed for all the scenes, it is determined in S1106 whether the number of scenes and the number of specified spreads match. In the present embodiment, the number of scenes is 10 as shown in FIG. 12B, and since the number of scenes matches the designated number of spreads, the process ends. If the number of scenes does not match the specified number of spreads, the scenes are integrated in S1107 until the number of scenes matches the specified number of spreads.
シーンの統合について、図6(A)のシーン分割数8に対して指定見開き数が6の場合で説明する。図6(C)は図6(A)をシーン統合した結果である。破線の箇所を統合したことで、分割数を6にしている。統合の基準は以下である。図6(A)の分割の中で画像枚数が少ない分割箇所を探す。ここでは、分割数を8から6に2箇所減らす為、減らすべき数に相当する画像枚数が少ない2箇所を決める。少ない方からシーン8、3、7である。シーン3と7は同じ枚数である。ただし、シーン7に隣接するシーン8が統合対象の為、シーン3を統合対象とする。シーン8と3をそれぞれ統合する。まずシーン3の統合を説明する。着目シーンは、時間差が少ない隣接シーンと統合される。シーン3の前後のシーン2と4との時間差を比較するとシーン4の方が時間差が小さく、そのためにシーン4に統合する。またシーン8は後がない為、その前のシーン7と統合する。このようにして図6(C)の破線箇所で統合する。
The scene integration will be described in the case where the designated spread number is 6 with respect to the
以上より、シーン分割の結果が理想のシーン区切り位置と異なったとしても、シーン削除処理によって重要度の低いシーンはレイアウト候補画像から削除されるため、結果として異なるシーンが同じ見開き内にレイアウトされることを防止することができる。 From the above, even if the result of the scene division is different from the ideal scene division position, the scenes of low importance are deleted from the layout candidate image by the scene deletion processing, and as a result, different scenes are laid out in the same spread. Can be prevented.
なお、ステップS1105の直前にシーン数=見開き数であることを判定し、この条件が満たされたならシーン削除処理を終了してもよい。その場合にはシーン数=見開き数でなければステップS1105以下の処理を続行する。また、このようにステップS1105の前にシーン数=見開き数であることを判定しないなら、全シーンについてシーン削除処理を行った後、シーン数<見開き数となっている可能性がある。その場合には、シーン数=見開き数となるようにStep14のサブシーン分割処理をあらためて行ってもよい。
Note that it may be determined that the number of scenes=the number of spreads immediately before step S1105, and if this condition is satisfied, the scene deletion processing may be ended. In that case, if the number of scenes does not equal the number of spreads, the processing from step S1105 is continued. Further, if it is not determined that the number of scenes=the number of spreads before step S1105 as described above, it is possible that the number of scenes<the number of spreads after performing the scene deletion processing for all the scenes. In that case, the sub-scene division process of
<サブシーン分割フローの詳細>
シーン分割と同様にサブシーン分割(Step14)の正解率についても100%であるとは限らない。場合によっては失敗するケースがある。サブシーン分割に失敗した場合でもレイアウトの出来栄え品質を損なわないようにするため、シーン分割と同様にシーンの重要性に基づいて処理を切り替える必要がある。サブシーン分割処理(Step14)の詳細について図13を用いて説明する。
<Details of sub-scene division flow>
Like the scene division, the correct answer rate of the sub-scene division (Step 14) is not always 100%. There are cases where it fails. Even if the sub-scene division fails, the processing needs to be switched based on the importance of the scene as in the case of scene division so that the quality of the layout is not impaired. Details of the sub-scene division process (Step 14) will be described with reference to FIG.
まず、S1301において着目シーンをサブシーンに分割する。分割後のサブシーンはStep06で分割されたシーンと同様に扱うが、とくにStep14による分割後のシーンを特定するためにサブシーンと呼ぶ。サブシーンの分割方法については、前述の図4のStep14に示したサブシーン分割と同様の手順で行えばよく、詳細な説明については省略する。S1302では、サブシーンを削除する。サブシーン削除処理の詳細は図14を参照して後述する。S1303では、サブシーン削除を終えた時点でのシーン数が指定見開き数と一致しているか否かの判定を行う。シーン数が指定見開き数と一致していない場合は、S1304においてサブシーン分割数のシーン数の更新を行う。シーン分割数がNであるとき、N=N+1を分割後のシーン数として設定する。なおサブシーンをS1302で削除した場合にはNの値は更新しない。そして、再度S1301〜S1302までの処理を行い、S1303で前記同様の判定を行う。なお、Nの値にはシーンあるいはサブシーン分割時に1加算し、シーン或いはサブシーン削除時に1減算するように構成してもよい。この場合にはS1304は行わなくともよい。
First, in S1301, the target scene is divided into subscenes. The sub-scenes after division are handled in the same way as the scenes divided in Step 06, but in particular they are called sub-scenes to identify the scenes after division in
次に、S1302のサブシーン削除処理について図14を用いて説明する。S1401では、対象サブシーンについてシーン情報から時間差を取得する。対象サブシーンとはS1301でシーンの分割後の新たなサブシーンである。S1402において、前記時間差が閾値の範囲に含まれるか否かを判定する。前記閾値はシーン分割で使用した閾値近辺の値を設定することが好ましい。また、図11のS1102の閾値と同じであってもよいし、異なっていてもよい。閾値の範囲に含まれない場合は、シーン分割に失敗している可能性は低い。よって、サブシーンの削除は行わず、S1405において全サブシーンに対する処理が終了しているか否かの判定を行う。終了していない場合は、S1401に戻り次のサブシーンに対して処理を行う。一方、閾値の範囲に含まれる場合は、シーン分割に失敗している可能性が高い。この場合はS1403において、削除条件を満たすか否かを判定する。削除条件を満たさない場合は、重要であり削除すべきではないシーンである可能性が高いため、サブシーンの削除は行わずにS1405に進む。削除条件を満たす場合は、削除しても問題のないシーンである可能性が高いため、S1404においてサブシーンの削除を行う。削除条件はステップS1103の削除条件と同一でよく、たとえばサブシーン内の画像数が10枚以下であること、などである。S1401からS1404までの処理を全てのサブシーンに対して実行する。全てのサブシーンについて処理が終了した場合は図13のS1303に戻る。このようにして、シーン分割またはサブシーン分割により、本来ひとつであるべきシーンが分割されてしまった場合でも、より重要度の低いシーン或いはサブシーンは削除され、シーン内の画像の一貫性は保たれる。 Next, the sub-scene deletion process of S1302 will be described with reference to FIG. In S1401, the time difference is acquired from the scene information for the target sub-scene. The target sub-scene is a new sub-scene after the scene is divided in S1301. In S1402, it is determined whether the time difference is included in the threshold range. The threshold value is preferably set to a value near the threshold value used in scene division. Further, it may be the same as or different from the threshold of S1102 in FIG. If it is not included in the threshold range, it is unlikely that scene division has failed. Therefore, the sub-scene is not deleted, and it is determined in S1405 whether or not the processing for all the sub-scenes has been completed. If not completed, the process returns to S1401 to process the next sub-scene. On the other hand, if it falls within the threshold range, it is highly likely that scene division has failed. In this case, in S1403, it is determined whether the deletion condition is satisfied. If the deletion condition is not satisfied, there is a high possibility that the scene is important and should not be deleted. Therefore, the sub-scene is not deleted and the process proceeds to S1405. If the deletion condition is satisfied, there is a high possibility that the scene has no problem even if it is deleted, so the sub-scene is deleted in S1404. The deletion condition may be the same as the deletion condition of step S1103, for example, the number of images in the sub-scene is 10 or less. The processing from S1401 to S1404 is executed for all subscenes. When the processing is completed for all the sub-scenes, the process returns to S1303 in FIG. In this way, even if a scene that should originally be one is divided by scene division or subscene division, the less important scene or subscene is deleted, and the image consistency within the scene is maintained. Be drunk
以上説明したように、本実施形態によれば、指定された見開きの数に応じてシーンの数を調整する。調整にはシーンの削除とシーンの再分割すなわちサブシーンへの分割を含む。またシーンの再分割を行う際にもシーンの削除が行われる場合にある。シーンの削除においては、対象シーンが独立したシーンとして適当であるか否かが、時間的に隣接するシーンとの関係(時間差)と対象シーンそのものの特徴(含まれる人数など)とに基づいて判定され、適当ではないと判定されたシーンが削除される。 As described above, according to this embodiment, the number of scenes is adjusted according to the number of specified spreads. The adjustment includes deleting the scene and subdividing the scene, that is, dividing into subscenes. In addition, the scene may be deleted when the scene is subdivided. When deleting a scene, it is determined whether or not the target scene is appropriate as an independent scene based on the relationship (time difference) between adjacent scenes in time and the characteristics of the target scene itself (number of people included, etc.) Then, the scene determined to be inappropriate is deleted.
このように処理を経て、サブシーン分割処理を終了した段階では、シーン分割数と指定見開き数は同じになるため、図4のStep16の見開き割当において各見開きが各シーンに対応付けられることになる。サブシーン分割の結果が理想のシーン区切り位置と異なったとしても、シーン削除処理によって重要度の低いサブシーンはレイアウト候補画像から削除される。このため、本来なら同一のシーンに分類されるべきシーンが異なるシーンとして別々の見開き内にレイアウトされることを防止することができる。また、本来なら異なるシーンに分類されるべき画像をサブシーンとして分割し、それを削除することで、同じシーンとして同一の見開き内にレイアウトされることも防止することができる。また、以上が第1の実施形態の説明である。 At the stage where the sub-scene division processing is completed through the above processing, the number of scene divisions and the number of designated spreads are the same, and therefore each spread is associated with each scene in the spread allocation in Step 16 of FIG. .. Even if the result of sub-scene division is different from the ideal scene break position, the sub-scene of low importance is deleted from the layout candidate image by the scene deletion process. Therefore, it is possible to prevent the scenes that should originally be classified into the same scene from being laid out in different spreads as different scenes. Further, by dividing an image that should be classified into different scenes as a sub-scene and deleting it, it is possible to prevent the same scene from being laid out in the same spread. The above is the description of the first embodiment.
<第2の実施形態>
第1の実施形態では、シーン削除処理およびサブシーン削除処理におけるシーン削除の削除条件として画像数を使用したが、本発明はそれに限定されるものではない。たとえば、シーン情報に含まれる人物数を用いてもよい。この場合にはシーン情報の人物数と所定の閾値とを比較して、人物数が閾値より少なければそのシーンを削除する。人物数が多い場合は重要なシーンである可能性が高く、逆に少ない場合は重要なシーンでない可能性が高い。よって、人物数がある閾値よりも少ない場合にシーン削除を行うことで、人物を残しつつ異なるシーンが同じ見開き内にレイアウトされることを防止することができる。また、人物数の代わりに、シーンに含まれる全画像数に対する人物の画像数の割合をシーン削除の判定条件として使用してもよい。この場合には人物の画像数の割合と所定の閾値とを比較して、人物の画像数の割合が閾値より低ければそのシーンを削除する。人物の画像数の割合が高い場合は重要なシーンである可能性が高く、逆に低い場合は重要なシーンでない可能性が高い。
<Second Embodiment>
In the first embodiment, the number of images is used as the deletion condition for scene deletion in the scene deletion process and sub-scene deletion process, but the present invention is not limited to this. For example, the number of persons included in the scene information may be used. In this case, the number of persons in the scene information is compared with a predetermined threshold value, and if the number of persons is less than the threshold value, the scene is deleted. When the number of people is large, it is highly likely that the scene is important, and when the number of people is small, it is highly likely that the scene is not important. Therefore, by deleting a scene when the number of people is less than a certain threshold, it is possible to prevent different scenes from being laid out in the same spread while leaving people. Further, instead of the number of persons, the ratio of the number of images of the person to the total number of images included in the scene may be used as the determination condition for scene deletion. In this case, the ratio of the number of images of the person is compared with a predetermined threshold, and if the ratio of the number of images of the person is lower than the threshold, the scene is deleted. When the ratio of the number of images of a person is high, it is highly likely that it is an important scene, and when it is low, it is highly likely that it is not an important scene.
さらに、図4のStep09に示した主人公設定から取得した主人公の画像数を用いても良い。この場合にはシーン内に含まれた主人公すなわち重要人物の数と所定の閾値とを比較して、主人公の数が閾値より少なければそのシーンを削除する。主人公が少ない場合には重要なシーンでない可能性が高いため、シーン削除を行うことで、主人公を残しつつ異なるシーンが同じ見開き内にレイアウトされることを防止できる。また、重要人物の数の代わりに、シーンに含まれる全画像数に対する重要人物の画像数の割合をシーン削除の判定条件として使用してもよい。この場合は、重要人物の画像数の割合と所定の閾値とを比較して、重要人物の画像数の割合が閾値より低ければそのシーンを削除する。重要人物の画像数の割合が高い場合は重要なシーンである可能性が高く、逆に低い場合は重要なシーンでない可能性が高い。また、画像のコンテンツをシーン削除の判定条件として使用してもよい。この場合にはたとえば、画像のコンテンツを画像認識処理などにより認識し、それ(あるいはその種類)が予め定めた削除対象であればそのシーンを削除する。コンテンツはシーン内の画像中の特徴的なオブジェクトに基づいて判定してもよい。 Furthermore, the number of images of the hero acquired from the hero setting shown in Step 09 of FIG. 4 may be used. In this case, the number of protagonists included in the scene, that is, the number of important persons is compared with a predetermined threshold value, and if the number of protagonists is less than the threshold value, the scene is deleted. If the number of protagonists is small, it is highly likely that it is not an important scene. Therefore, by deleting a scene, it is possible to prevent different scenes from being laid out in the same spread while leaving the protagonist. Further, instead of the number of important persons, the ratio of the number of images of important persons to the total number of images included in the scene may be used as a condition for determining scene deletion. In this case, the ratio of the number of images of the important person is compared with a predetermined threshold, and if the ratio of the number of images of the important person is lower than the threshold, the scene is deleted. If the ratio of the number of images of the important person is high, it is highly likely that the scene is important, and conversely, if the ratio is low, there is a high possibility that the scene is not important. Further, the content of the image may be used as a determination condition for scene deletion. In this case, for example, the content of the image is recognized by image recognition processing or the like, and if the (or its type) is a predetermined deletion target, the scene is deleted. Content may be determined based on characteristic objects in images in the scene.
<その他の実施例>
第1、第2の実施例ではサブシーン分割処理において、サブシーン削除のみであったが、本発明はそれに限定されるものではない。図15に示すように、サブシーン削除の後にS1503のサブシーン統合を行うことで、異なるシーンが同じ見開き内にレイアウトされることを防止しつつ、シーンの欠落をより回避することが可能である。なおS1501で分割したサブシーンをS1503で統合するのはマッチポンプであるから、統合の対象はS1501で分割したサブシーン同志ではないものとすることが望ましい。サブシーンの統合は図11のステップS1107と同じ要領で行うことができる。また図15の手順では、サブシーン分割数が削除と統合とにより減少する可能性もあることから、S1505ではその可能性も考慮したうえで分割数を更新する。
<Other Examples>
In the first and second embodiments, only sub-scene deletion is performed in sub-scene division processing, but the present invention is not limited to this. As shown in FIG. 15, by performing the sub-scene integration of S1503 after deleting the sub-scenes, it is possible to prevent different scenes from being laid out in the same spread, and it is possible to further avoid the lack of scenes. . Since it is the match pump that integrates the sub-scenes divided in S1501 in S1503, it is desirable that the target of integration is not the sub-scenes divided in S1501. The sub-scenes can be integrated in the same manner as in step S1107 of FIG. Further, in the procedure of FIG. 15, the sub-scene division number may decrease due to deletion and integration. Therefore, in S1505, the division number is updated in consideration of the possibility.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. It can also be realized by the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
201 条件指定部、202 画像取得部、203 画像変換部、204 画像解析部、205 画像分類部、206 主人公情報入力部、207 画像得点部、208 見開き数入力部、209 見開き割当部、210 画像選択部、211 テンプレート入力部、212 画像レイアウト部、213 画像補正条件入力部、214 画像補正部、215 レイアウト情報出力部 201 condition designation unit, 202 image acquisition unit, 203 image conversion unit, 204 image analysis unit, 205 image classification unit, 206 main character information input unit, 207 image score unit, 208 spread number input unit, 209 spread allocation unit, 210 image selection Section, 211 template input section, 212 image layout section, 213 image correction condition input section, 214 image correction section, 215 layout information output section
Claims (12)
所定数である複数のページへのレイアウト候補である複数の画像を、少なくとも1つの画像を含む複数の画像群に分割する分割手段と、
前記複数の画像群の数が前記所定数より多い場合、前記複数の画像群の一部を、前記複数のページへのレイアウト対象から除外する除外手段と、
前記除外手段により一部の画像群が除外された前記複数の画像群に含まれる画像を、当該複数の画像群に対応する前記複数のページにレイアウトするレイアウト手段と
を備え、
前記除外手段は、所定の画像群と他の画像群との間の第1の条件と、前記所定の画像群内の第2の条件とに基づいて、前記所定の画像群を除外することを特徴とする画像処理装置。 An image processing device for laying out images on a page to create an album,
The multiple images is a layout candidates to a plurality of pages is a predetermined number, and dividing means for dividing into a plurality of image groups including at least one image,
When the number of the plurality of image groups is larger than the predetermined number, a part of the plurality of image groups is excluded from the layout target of the plurality of pages ,
The images included in the plurality of image groups in which a part of the image group is excluded by previous SL excluding means, and a layout section for laying the plurality of pages corresponding to the image group of those plurality of,
Said excluding means includes exclusion eliminates the risk of corrupting the first and conditions, based on the second condition in the predetermined images, the predetermined images between a given image group and another image group An image processing device characterized by.
前記除外手段は、前記再分割により得られた複数の画像群の一部を除外することを特徴とする請求項1に記載の画像処理装置。 The dividing unit divides the plurality of images into a plurality of image groups, and when the plurality of image groups is less than the predetermined number , re-divides the plurality of images ,
The image processing apparatus according to claim 1, wherein the excluding unit excludes a part of the plurality of image groups obtained by the subdivision .
前記分割手段は、前記入力手段により入力されたページ数に対応する数を前記所定数として、前記分割を行うことを特徴とする請求項1乃至8のいずれか1項に記載の画像処理装置。 Equipped with input means to input the number of pages of the album according to the user's instruction,
9. The image processing apparatus according to claim 1, wherein the dividing unit performs the division using the number corresponding to the number of pages input by the input unit as the predetermined number.
所定数である複数のページへのレイアウト候補である複数の画像を、少なくとも1つの画像を含む複数の画像群に分割する分割工程と、
前記複数の画像群の数が、前記所定数より多い場合、前記複数の画像群の一部を、前記複数のページへのレイアウト対象から除外する除外工程と、
前記除外工程において一部の画像群が除外された前記複数の画像群に含まれる画像を、当該複数の画像群に対応する前記複数のページにレイアウトするレイアウト工程と
を有し、
前記除外工程では、所定の画像群と他の画像群との間の第1の条件と、前記所定の画像群内の第2の条件とに基づいて、前記所定の画像群を除外することを特徴とするアルバム作成方法。 An album creating method of laying out images on a page by an information processing device to create an album,
A dividing step images of multiple, divided into a plurality of image groups including at least one image is a layout candidates to a plurality of pages is a predetermined number,
When the number of the plurality of image groups is larger than the predetermined number, a part of the plurality of image groups is excluded from the layout target to the plurality of pages ,
The images included in the plurality of image groups in which a part of the image group is excluded in the previous SL exclusion process, have a layout step of laying said plurality of pages corresponding to the image group of those plurality of,
In the excluding step, excluding the predetermined image group based on a first condition between the predetermined image group and another image group and a second condition in the predetermined image group. A featured album creation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015157512A JP6700686B2 (en) | 2015-08-07 | 2015-08-07 | Image processing apparatus, album creating method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015157512A JP6700686B2 (en) | 2015-08-07 | 2015-08-07 | Image processing apparatus, album creating method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017037418A JP2017037418A (en) | 2017-02-16 |
JP6700686B2 true JP6700686B2 (en) | 2020-05-27 |
Family
ID=58048398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015157512A Active JP6700686B2 (en) | 2015-08-07 | 2015-08-07 | Image processing apparatus, album creating method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6700686B2 (en) |
-
2015
- 2015-08-07 JP JP2015157512A patent/JP6700686B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017037418A (en) | 2017-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6711937B2 (en) | Image processing device, image processing method, and program | |
CN108230262B (en) | Image processing method, image processing apparatus, and storage medium | |
KR102157494B1 (en) | Control method and storage medium | |
JP6723937B2 (en) | Program, image processing apparatus, and image processing method | |
JP6719206B2 (en) | Image processing apparatus, image processing method, and program | |
JP6494504B2 (en) | Information processing apparatus, control method, and program | |
JP6862164B2 (en) | Programs, image processing equipment, and image processing methods | |
JP2019191830A (en) | Image processing device, image processing method, and program | |
JP6532398B2 (en) | Image processing apparatus, image processing method and program | |
JP6702900B2 (en) | Information processing apparatus, display control method, and program | |
JP7076974B2 (en) | Image processing equipment, control methods and programs | |
JP2020177419A (en) | Image processor, image processing method, and program | |
JP6422409B2 (en) | Display control apparatus, display control method, and program | |
JP2018097480A (en) | Image processing device, control method, and program | |
JP2020140557A (en) | Image processing device, control method, and program | |
JP2018097481A (en) | Image processing apparatus, control method, and program | |
JP6606374B2 (en) | Image processing apparatus and method, and program | |
JP7027101B2 (en) | Information processing equipment, control methods, and programs | |
JP2020140555A (en) | Image processing device, control method, and program | |
EP3128733B1 (en) | Information processing method, information processing apparatus, and program | |
EP4024347A2 (en) | Image processing apparatus, image processing method, and program | |
JP6700686B2 (en) | Image processing apparatus, album creating method and program | |
JP6700806B2 (en) | Program, information processing apparatus, and control method | |
JP7350496B2 (en) | Apparatus, method, and program | |
JP7263054B2 (en) | Apparatus, method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180806 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190806 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190920 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191115 |
|
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: 20200313 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200501 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6700686 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |