JP4712576B2 - Image layout apparatus and method, and program - Google Patents

Image layout apparatus and method, and program Download PDF

Info

Publication number
JP4712576B2
JP4712576B2 JP2006040263A JP2006040263A JP4712576B2 JP 4712576 B2 JP4712576 B2 JP 4712576B2 JP 2006040263 A JP2006040263 A JP 2006040263A JP 2006040263 A JP2006040263 A JP 2006040263A JP 4712576 B2 JP4712576 B2 JP 4712576B2
Authority
JP
Japan
Prior art keywords
image
layout
face area
images
distance
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
Application number
JP2006040263A
Other languages
Japanese (ja)
Other versions
JP2007219878A (en
Inventor
敏貢 福島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2006040263A priority Critical patent/JP4712576B2/en
Publication of JP2007219878A publication Critical patent/JP2007219878A/en
Application granted granted Critical
Publication of JP4712576B2 publication Critical patent/JP4712576B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数の画像をレイアウトする画像レイアウト装置および方法並びに画像レイアウト方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to an image layout apparatus and method for laying out a plurality of images, and a program for causing a computer to execute the image layout method.

デジタルカメラの普及により、誰もが手軽に画像を取得し、これをプリント出力することが可能となっている。また、画像を自身のパソコンにより加工することも容易となっている。例えば、複数の画像を適宜レイアウトして1枚のレイアウト画像を作成し、これをパソコンに保存したりプリント出力をすることも可能となっている。このようにレイアウト画像を作成する場合には、得られるレイアウト画像の全体のバランスを考慮して、できるだけ見栄えをよくするように複数の画像を配置するのが一般的である。   With the widespread use of digital cameras, anyone can easily acquire images and print them out. Also, it is easy to process the image with its own personal computer. For example, a plurality of images are appropriately laid out to create a single layout image, which can be stored in a personal computer or printed out. When creating a layout image in this way, it is common to arrange a plurality of images so as to improve the appearance as much as possible in consideration of the overall balance of the obtained layout images.

しかしながら、レイアウトの作業は、作業を行うユーザの手作業により行われるものであるため、レイアウト画像の見栄えは、ユーザのデザインセンスや経験に左右されることが多く、必ずしも満足のいくレイアウト画像が得られないものとなっており、さらには作業を行うユーザの負担も大きいものとなっている。   However, since the layout work is performed manually by the user who performs the work, the appearance of the layout image often depends on the user's design sense and experience, and a satisfactory layout image is not always obtained. In addition, the burden on the user who performs the work is large.

このため、複数の画像のレイアウトを自動で行うための各種手法が提案されている。例えば、特許文献1においては、あらかじめ定められた複数のレイアウト領域に画像をレイアウトする際に、配置する画像の顔領域の面積および分散値を用いることにより、画像のバランスを考慮してレイアウトを行う手法が提案されている。また、特許文献2においては、レイアウトする画像についての人目を引く指標である誘目度を算出し、誘目度に基づいてゲーム性や娯楽性の高いレイアウト画像を生成する手法が提案されている。さらに、特許文献3においては、顔の向き等の画像のバランス、取得された年代等を評価し、遺伝的アルゴリズムを用いてレイアウト画像を生成する手法が提案されている。
特開2005−190401号公報 特開2005−284597号公報 特開2002−288669号公報
For this reason, various methods for automatically laying out a plurality of images have been proposed. For example, in Patent Document 1, when an image is laid out in a plurality of predetermined layout areas, layout is performed in consideration of the balance of the image by using the area and variance value of the face area of the image to be arranged. A method has been proposed. Japanese Patent Application Laid-Open No. 2004-228620 proposes a method of calculating a degree of attraction that is an eye-catching index for an image to be laid out and generating a layout image having high game performance and entertainment based on the degree of attraction. Further, Patent Document 3 proposes a method for evaluating the balance of images such as the face orientation, the acquired age, and the like, and generating a layout image using a genetic algorithm.
JP-A-2005-190401 JP 2005-284597 A JP 2002-288669 A

しかしながら、上記特許文献1に記載された手法は、あらかじめ画像をレイアウトする領域が決まっているため、得られるレイアウト画像が面白味に欠けるものとなることが多い。また、特許文献2に記載された手法では、ゲーム性や娯楽性が高いレイアウト画像を得ることができるものの、とくにゲーム性や娯楽性を望まない場合には、レイアウト画像がうるさく感じるものとなる。また、特許文献3に記載され得た手法では、遺伝的アルゴリズムを用いているため、見栄えのよいレイアウト画像が得られるまでには多くの学習を行う必要がある。   However, the technique described in Patent Document 1 has a predetermined layout area, so that the obtained layout image often lacks interest. Further, although the method described in Patent Document 2 can obtain a layout image having high game performance and entertainment, the layout image feels noisy particularly when game performance and entertainment are not desired. Further, since the method described in Patent Document 3 uses a genetic algorithm, it is necessary to perform a lot of learning before a layout image having a good appearance can be obtained.

本発明は上記事情に鑑みなされたものであり、複数の画像をレイアウトする際に、見栄えのよいレイアウト画像を簡易に得ることができるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to easily obtain a layout image having a good appearance when laying out a plurality of images.

本発明による画像レイアウト装置は、レイアウト画像を作成するための複数の画像のそれぞれについて顔領域を検出するとともに、該顔領域のサイズおよび重心を検出する顔検出手段と、
背景となるベース画像に最初に配置すべき第1の画像を配置し、2枚目に配置すべき第2の画像については、前記第1の画像に含まれる顔領域の重心と、前記第2の画像に含まれる顔領域の重心との間の重心間距離が、前記第1の画像の全顔領域が視認可能となる所定の距離となるように、前記第2の画像を前記ベース画像に配置し、さらに配置する画像がある場合、該さらに配置する画像については、前記ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、前記さらに配置する画像の顔領域の重心との間の重心間距離が、前記すでに配置されているすべての画像の全顔領域が視認可能となる所定の距離となるように、前記さらに配置する画像を前記ベース画像に配置するレイアウト処理を行うレイアウト手段とを備えたことを特徴とするものである。
An image layout apparatus according to the present invention detects a face area for each of a plurality of images for creating a layout image, and detects a size and a center of gravity of the face area;
The first image to be placed first in the base image as the background, and the second image to be placed in the second image, the center of gravity of the face area included in the first image, and the second image The second image is used as the base image so that the distance between the center of gravity between the center and the center of the face area included in the image of the first image becomes a predetermined distance at which the entire face area of the first image can be visually recognized. When there is an image to be arranged and further arranged, for the image to be further arranged, the centroid of each face area of the plurality of images already arranged in the base image and the centroid of the face area of the further arranged image Layout processing for arranging the further image to be arranged on the base image so that the distance between the center of gravity is a predetermined distance at which all face areas of all the already arranged images can be visually recognized. Layout means to do And it is characterized in that there was example.

なお、1つの画像に複数の顔領域が含まれる場合があるが、その場合はすべての顔領域のサイズを検出するとともに、すべての顔領域についての重心を検出する。   In some cases, a single image includes a plurality of face areas. In this case, the sizes of all the face areas are detected, and the centroids of all the face areas are detected.

「画像の全顔領域を視認可能とする」とは、すでに配置されているすべての画像のすべての顔領域が、さらに配置する画像と重ならないようにする、すなわち、すでに配置されているすべての画像のすべての顔領域が、さらに配置する画像に隠されないようにすることを意味する。   “Make all the face areas of the image visible” means that all face areas of all the already arranged images do not overlap with the image to be placed, that is, This means that all face regions of the image are not hidden by the image to be further arranged.

なお、本発明による画像レイアウト装置においては、すべての前記画像がレイアウトされたベース画像を、前記レイアウトされたすべての画像を含み、かつ指定されたアスペクト比を有する領域に切り出し、該切り出された領域を指定されたサイズに変更してレイアウト画像を取得する最終処理手段をさらに備えるようにしてもよい。   In the image layout device according to the present invention, the base image in which all the images are laid out is cut out into an area including all the laid out images and having a specified aspect ratio, and the cut out area A final processing means for obtaining a layout image by changing the size to a designated size may be further provided.

また、本発明による画像レイアウト装置においては、前記複数の画像のうちの所望とされる画像に対して、サイズ変更および回転の少なくとも1つの処理を施して加工済み画像を取得する画像加工手段をさらに備えるものとし、
前記レイアウト手段を、前記加工済み画像に対して前記レイアウト処理を行う手段としてもよい。
The image layout apparatus according to the present invention further includes an image processing means for obtaining a processed image by performing at least one of resizing and rotation on a desired image among the plurality of images. Shall be prepared,
The layout unit may be a unit that performs the layout process on the processed image.

「複数の画像のうちの所望とされる画像」としては、あらかじめ指定された画像であってもよく、すべての画像であってもよい。また、ランダムに選択された画像であってもよい。   The “desired image of the plurality of images” may be an image designated in advance or all images. Moreover, the image selected at random may be sufficient.

「サイズ変更および回転の少なくとも1つの処理」については、サイズ変更および回転の程度が大きすぎるとレイアウト画像の見栄えが悪くなることから、サイズ変更および回転の程度を指定するためのパラメータの範囲を定めておくことが好ましい。なお、サイズ変更および回転の処理は所望とされる画像のすべてに対して行ってもよく、あらかじめ指定された画像あるいはランダムに選択された画像に対して行ってもよい。また、パラメータは処理を施す画像毎に異なるものであっても同一であってもよい。また、パラメータはランダムに設定してもよい。   Regarding “at least one process of resizing and rotating”, since the appearance of the layout image deteriorates if the degree of resizing and rotating is too large, a parameter range for specifying the degree of resizing and rotating is defined. It is preferable to keep it. Note that the size change and rotation processing may be performed on all desired images, or may be performed on an image designated in advance or an image selected at random. The parameters may be different or the same for each image to be processed. The parameters may be set randomly.

また、本発明による画像レイアウト装置においては、前記複数の画像のそれぞれに含まれる人物数を検出する人物数検出手段と、
前記人物数が多い画像ほどサイズが大きくなるように前記複数の画像のうちの所定の画像のサイズを変更してサイズ変更済み画像を取得するサイズ変更手段とをさらに備えるものとし、
前記レイアウト手段を、前記サイズ変更済み画像に対して前記レイアウト処理を行う手段としてもよい。
In the image layout apparatus according to the present invention, a person number detecting means for detecting the number of persons included in each of the plurality of images,
The image processing apparatus further includes size changing means for changing a size of a predetermined image of the plurality of images so as to increase a size as the number of persons increases, and obtaining a resized image.
The layout unit may be a unit that performs the layout process on the resized image.

この場合、前記所定の画像は、前記人物数が最も多い画像であることが好ましい。   In this case, it is preferable that the predetermined image is an image having the largest number of persons.

また、本発明による画像レイアウト装置においては、前記所定の距離を、前記重心間距離の最小値を基準とする距離としてもよい。とくに、前記所定の距離を、前記重心間距離の最小値とすることが好ましい。   In the image layout apparatus according to the present invention, the predetermined distance may be a distance based on a minimum value of the distance between the centers of gravity. In particular, it is preferable that the predetermined distance is a minimum value of the distance between the centers of gravity.

「重心間距離の最小値を基準とする距離」とは、すでに配置されている画像の全顔領域が視認可能であれば、重心間距離の最小値であってもよく、最小値から若干大きい(例えば10%程度)大きい距離であってもよい。また、レイアウトする画像の数に応じて変更するようにしてもよい。具体的には、レイアウトする画像の数が多いほどこの距離を小さくすることが好ましい。   The “distance based on the minimum value of the distance between the centers of gravity” may be the minimum value of the distance between the centers of gravity if the entire face area of the image already arranged is visible, and is slightly larger than the minimum value. It may be a large distance (for example, about 10%). Further, it may be changed according to the number of images to be laid out. Specifically, it is preferable to decrease this distance as the number of images to be laid out increases.

本発明による画像レイアウト方法は、複数の画像のそれぞれについて顔領域を検出するとともに、該顔領域のサイズおよび重心を検出し、
背景となるベース画像に最初に配置すべき第1の画像を配置し、
2枚目に配置すべき第2の画像については、前記第1の画像に含まれる顔領域の重心と、前記第2の画像に含まれる顔領域の重心との間の重心間距離が、前記第1の画像の全顔領域が視認可能となる所定の距離となるように、前記第2の画像を前記ベース画像に配置し、
さらに配置する画像がある場合、該さらに配置する画像については、前記ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、前記さらに配置する画像の顔領域の重心との間の重心間距離が、前記すでに配置されているすべての画像の全顔領域が視認可能となる所定の距離となるように、前記さらに配置する画像を前記ベース画像に配置することを特徴とするものである。
The image layout method according to the present invention detects a face area for each of a plurality of images, detects the size and center of gravity of the face area,
Place the first image to be placed first on the base image that becomes the background,
For the second image to be placed on the second image, the distance between the center of gravity between the center of gravity of the face area included in the first image and the center of gravity of the face area included in the second image is The second image is arranged on the base image so that the entire face area of the first image becomes a predetermined distance that can be visually recognized.
When there is an image to be further arranged, the image to be further arranged is between the centroid of each face area of the plurality of images already arranged in the base image and the centroid of the face area of the further image to be arranged. The image to be further arranged is arranged in the base image so that the distance between the center of gravity of the image becomes a predetermined distance at which all face areas of all the images already arranged can be visually recognized. It is.

なお、本発明による画像レイアウト方法をコンピュータに実行させるためのプログラムとして提供してもよい。   The image layout method according to the present invention may be provided as a program for causing a computer to execute the image layout method.

本発明によれば、レイアウトする複数の画像の入力が受け付けられ、複数の画像のそれぞれについて顔領域が検出されるとともに、顔領域のサイズおよび重心が検出される。そして、まず、背景となるベース画像に最初に配置すべき第1の画像が配置される。続いて、2枚目に配置すべき第2の画像については、第1の画像に含まれる顔領域の重心と、第2の画像に含まれる顔領域の重心との間の重心間距離が、第1の画像の全顔領域が視認可能となる所定の距離となるようにベース画像に配置される。そして、さらに配置する画像がある場合には、さらに配置する画像については、ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、さらに配置する画像の顔領域の重心との間の重心間距離が、すでに配置されているすべての画像の全顔領域が視認可能となる所定の距離となるように、ベース画像に配置される。   According to the present invention, the input of a plurality of images to be laid out is accepted, the face area is detected for each of the plurality of images, and the size and the center of gravity of the face area are detected. First, the first image to be arranged first is arranged on the background base image. Subsequently, for the second image to be placed on the second image, the distance between the center of gravity between the center of gravity of the face area included in the first image and the center of gravity of the face area included in the second image is It arrange | positions in a base image so that it may become the predetermined distance which the whole face area | region of a 1st image becomes visually recognizable. If there is an image to be further arranged, for the image to be further arranged, the centroid of each face area of the plurality of images already arranged in the base image and the centroid of the face area of the image to be further arranged The distance between the centers of gravity is arranged in the base image so that the distance between the centers of gravity becomes a predetermined distance at which all the face areas of all the already arranged images can be visually recognized.

このため、レイアウトする複数の画像に含まれる顔領域の位置、顔領域の数に応じて、画像の配置に意外性のあるレイアウト画像を得ることができる。また、配置されている画像の全顔領域が視認可能とされているため、レイアウトする画像に含まれる人物の顔が他の画像に隠れてしまうこともない。また、画像に含まれる顔領域の重心間距離に基づいて、すでに配置されているすべての画像の全顔領域が視認可能となるように画像を配置していることから、特許文献3に記載されたような複雑なアルゴリズムを使用することなく、レイアウト画像を得ることができる。よって、見栄えのよいレイアウト画像を簡易に得ることができる。   Therefore, it is possible to obtain a layout image having an unexpected arrangement of images according to the position of the face area and the number of face areas included in the plurality of images to be laid out. In addition, since the entire face area of the arranged image is visible, the face of the person included in the image to be laid out is not hidden by another image. Further, since the images are arranged so that all the face areas of all the already arranged images are visible based on the distance between the centers of gravity of the face areas included in the image, it is described in Patent Document 3. A layout image can be obtained without using a complicated algorithm. Therefore, a good-looking layout image can be easily obtained.

また、すべての画像がレイアウトされたベース画像を、レイアウトされたすべての画像を含み、かつ指定されたアスペクト比を有する領域に切り出し、切り出した領域を指定されたサイズに変更することにより、所望とするアスペクト比を有し、かつ所望とするサイズを有するレイアウト画像を得ることができる。   In addition, the base image in which all the images are laid out is cut out into an area including all the laid out images and having a specified aspect ratio, and the cut out area is changed to a specified size. A layout image having a desired aspect ratio and a desired size can be obtained.

また、複数の画像のうちの所望とされる画像に対して、サイズ変更および回転の少なくとも1つの処理を施して加工済み画像を取得し、加工済み画像に対してレイアウト処理を行うことにより、より見栄えのよいレイアウト画像を得ることができる。   Further, by performing at least one process of resizing and rotating on a desired image among a plurality of images to obtain a processed image, and performing layout processing on the processed image, A good-looking layout image can be obtained.

ここで、画像に含まれる人物の顔のサイズは、画像に含まれる人物数が多いほど小さくなる。このため、人物数が多い画像ほどサイズが大きくなるようにサイズを変更してレイアウト処理を行うことにより、より人物の顔が見やすいように画像をレイアウトしたレイアウト画像を得ることができる。   Here, the size of the face of the person included in the image decreases as the number of persons included in the image increases. For this reason, by performing layout processing by changing the size so that the larger the number of persons, the larger the size, the layout image can be obtained by laying out the images so that the face of the person can be seen more easily.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による画像レイアウト装置の構成を示す概略ブロック図である。図1に示すように第1の実施形態による画像レイアウト装置1は、画像データの記録制御および表示制御等の各種制御を行うとともに、装置1を構成する各部の制御を行うCPU12と、CPU12を動作させるプログラム、画像を閲覧するためのビューアソフトおよび各種定数が記録されているROMおよびCPU12が処理を実行する際の作業領域となるRAMにより構成されるシステムメモリ14と、種々の指示を装置1に対して行うためのキーボードおよびマウス等からなる入力部16と、各種表示を行う液晶モニタ等からなる表示部18とを備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing the configuration of an image layout apparatus according to the first embodiment of the present invention. As shown in FIG. 1, the image layout apparatus 1 according to the first embodiment performs various controls such as recording control and display control of image data, and controls each part of the apparatus 1 and operates the CPU 12. A system memory 14 including a program to be executed, a viewer software for viewing images, a ROM in which various constants are recorded, and a RAM serving as a work area when the CPU 12 executes processing, and various instructions to the apparatus 1. An input unit 16 including a keyboard and a mouse for performing the display and a display unit 18 including a liquid crystal monitor for performing various displays are provided.

また、画像レイアウト装置1は、画像データを記録したメモリカード2から画像データを読み出したり、メモリカード2に画像データを記録したりするためのカードスロット20と、画像データをJPEGに代表される手法で圧縮したり、圧縮した画像データを解凍する圧縮解凍部22と、画像データやCPU12が実行する各種プログラム等を記録するハードディスク24と、システムメモリ14、カードスロット20およびハードディスク24を制御するメモリ制御部26とを備える。   The image layout apparatus 1 also includes a card slot 20 for reading image data from the memory card 2 on which image data is recorded, and recording image data on the memory card 2, and a technique represented by JPEG. A compression / decompression unit 22 that compresses or decompresses compressed image data; a hard disk 24 that records image data and various programs executed by the CPU 12; and a memory control that controls the system memory 14, the card slot 20, and the hard disk 24 Part 26.

また、画像レイアウト装置1は、レイアウト画像の作成に使用する複数の画像のそれぞれから顔領域を検出するとともに、検出した顔領域の位置、サイズおよび重心を検出する顔検出部28と、後述するようにレイアウト処理を行うレイアウト部30と、後述するように最終的なレイアウト画像を取得する最終処理部32とを備える。また、表示部18の表示を制御する表示制御部34も備える。   In addition, the image layout apparatus 1 detects a face area from each of a plurality of images used to create a layout image, and detects a position, size, and center of gravity of the detected face area, as will be described later. Are provided with a layout unit 30 that performs layout processing and a final processing unit 32 that acquires a final layout image, as will be described later. A display control unit 34 that controls the display of the display unit 18 is also provided.

以下、第1の実施形態における顔検出部28、レイアウト部30および最終処理部32が行う処理について説明する。図2は第1の実施形態において行われる処理を示すフローチャートである。なお、レイアウトする複数の画像(以下、レイアウト対象画像とする)は、メモリカード2から読み出されてハードディスク24に保存された複数の画像からすでに選択されているものとする。また、レイアウト対象画像について、レイアウトする順序はあらかじめ指定されているものとする。   Hereinafter, processing performed by the face detection unit 28, the layout unit 30, and the final processing unit 32 in the first embodiment will be described. FIG. 2 is a flowchart showing processing performed in the first embodiment. It is assumed that a plurality of images to be laid out (hereinafter referred to as layout target images) have already been selected from a plurality of images read from the memory card 2 and stored in the hard disk 24. Further, it is assumed that the layout order is specified in advance for the layout target image.

レイアウト画像作成の指示をユーザが入力部16から行うことによりCPU12が処理を開始し、顔検出部28がすべてのレイアウト対象画像から顔領域を検出する(ステップST1)。なお、画像から顔領域を検出する手法としては、例えば特開平2005−157964号公報に記載されているように、肌色情報の標準偏差に基づいて設定したしきい値により画像を2値化し、2値化された画像から両目を検出し、検出した両目の情報に基づいて顔領域を検出する手法、および特開平2005−190400号公報に記載されているように、画像の肌色情報および輝度情報等を用いて顔領域が画像中に存在するか否かを判定し、顔領域が存在すると判定された画像について、検出対象領域を複数のブロックに分割し、ブロックの特徴ベクトルを用いて顔領域を検出する手法等、公知の任意の手法を用いることができる。また、複数の顔を含むレイアウト対象画像からはすべての顔領域を検出する。また、顔領域はレイアウト対象画像に含まれる顔を囲む矩形の領域とする。   When the user issues an instruction to create a layout image from the input unit 16, the CPU 12 starts processing, and the face detection unit 28 detects a face area from all layout target images (step ST1). As a method for detecting a face area from an image, for example, as described in Japanese Patent Laid-Open No. 2005-157964, the image is binarized with a threshold value set based on the standard deviation of skin color information. A method of detecting both eyes from a digitized image and detecting a face area based on the detected information of both eyes, and skin color information and luminance information of an image as described in JP-A-2005-190400 Is used to determine whether or not a face area exists in the image, and for an image determined to have a face area, the detection target area is divided into a plurality of blocks, and the face area is determined using the feature vector of the block. Any known method such as a detection method can be used. Further, all face areas are detected from the layout target image including a plurality of faces. The face area is a rectangular area surrounding the face included in the layout target image.

続いて、顔検出部28は、すべてのレイアウト対象画像について、顔領域の位置、サイズおよび重心を検出する(ステップST2)。ここで、顔領域の位置とは、レイアウト対象画像の左上隅を原点とする2次元座標を設定した場合における、顔領域の左上隅の座標値とする。顔領域のサイズは、顔領域の縦横の画素数とする。以下、顔領域の重心の検出について説明する。   Subsequently, the face detection unit 28 detects the position, size, and center of gravity of the face area for all layout target images (step ST2). Here, the position of the face area is a coordinate value of the upper left corner of the face area when two-dimensional coordinates having the origin at the upper left corner of the layout target image are set. The size of the face area is the number of pixels in the vertical and horizontal directions of the face area. Hereinafter, detection of the center of gravity of the face area will be described.

図3は顔領域の重心の検出を説明するための図である。図3(a)に示すようにレイアウト対象画像に顔領域F1が1つのみ含まれる場合、顔領域F1の重心G1は、顔領域F1の対角線の交点となる。また、図3(b)に示すように、レイアウト対象画像に複数(ここでは2つ)の顔領域F1が含まれる場合、顔領域F1の重心G1は、各顔領域F1の重心G1を結ぶ線分を顔領域F1のサイズに応じて内分する点とする。なお、顔領域F1が3つ存在する場合には、3つの顔領域F1のそれぞれの重心を頂点とする三角形の重心を顔領域F1の重心とする。さらに多くの顔領域F1が存在する場合には、顔領域F1が2つの場合、および3つの場合の重心を検出する手法を組み合わせて、すべての顔領域F1の重心G1を検出する。なお、検出した顔領域の位置、サイズおよび重心はレイアウト対象画像と対応づけられてシステムメモリ14あるいはハードディスク24に一時的に保存される。   FIG. 3 is a diagram for explaining the detection of the center of gravity of the face area. When the layout target image includes only one face area F1 as shown in FIG. 3A, the center of gravity G1 of the face area F1 is an intersection of diagonal lines of the face area F1. As shown in FIG. 3B, when a plurality of (here, two) face areas F1 are included in the layout target image, the centroid G1 of the face area F1 is a line connecting the centroids G1 of the face areas F1. The minutes are internally divided according to the size of the face area F1. When there are three face areas F1, the center of gravity of a triangle whose vertex is the center of each of the three face areas F1 is set as the center of gravity of the face area F1. When more face areas F1 exist, the centroids G1 of all the face areas F1 are detected by combining the techniques of detecting the centroids in the case of two face areas F1 and three. Note that the detected position, size, and center of gravity of the face area are temporarily stored in the system memory 14 or the hard disk 24 in association with the layout target image.

ここで、レイアウト対象画像が人物を含まない場合には顔領域は検出されない。この場合、図3(c)に示すように、レイアウト対象画像の重心を顔領域の重心G1と仮定して後述するレイアウト処理を行う。またこの場合、顔領域F1はレイアウト対象画像に対してあらかじめ定められた割合のサイズを有し、アスペクト比がレイアウト対象画像と同一の領域と仮定して後述するレイアウト処理を行う。   Here, when the layout target image does not include a person, the face area is not detected. In this case, as shown in FIG. 3C, layout processing described later is performed assuming that the center of gravity of the layout target image is the center of gravity G1 of the face region. In this case, the face area F1 has a predetermined proportion of size with respect to the layout target image, and the layout process described later is performed assuming that the aspect ratio is the same area as the layout target image.

ここで、本実施形態においては、図3(a)、(b)に示す画像および図3(d)に示す3枚のレイアウト対象画像を配置するものとして以降の説明を行う。   Here, in the present embodiment, the following description will be made assuming that the images shown in FIGS. 3A and 3B and the three layout target images shown in FIG. 3D are arranged.

続いて、レイアウト部30が、配置する画像を最初のレイアウト対象画像に設定し(ステップST3)、レイアウト対象画像をレイアウト画像の背景となるベース画像に配置する(ステップST4)。図4は最初のレイアウト対象画像(L1とする)がベース画像B0に配置された状態を示す図である。ベース画像B0はサイズが無限大の仮想的な平面とする。次いで、レイアウト部30は配置する画像を2枚目のレイアウト対象画像に設定し(ステップST5)、レイアウト対象画像の顔領域の位置、サイズおよび重心を考慮して2枚目のレイアウト対象画像を配置する(ステップST6)。以下、2枚目のレイアウト対象画像の配置について説明する。   Subsequently, the layout unit 30 sets the image to be placed as the first layout target image (step ST3), and places the layout target image on the base image that is the background of the layout image (step ST4). FIG. 4 is a diagram illustrating a state in which the first layout target image (L1) is arranged in the base image B0. The base image B0 is a virtual plane having an infinite size. Next, the layout unit 30 sets the image to be placed as the second layout target image (step ST5), and places the second layout target image in consideration of the position, size, and center of gravity of the face area of the layout target image. (Step ST6). Hereinafter, the arrangement of the second layout target image will be described.

まず、2枚目のレイアウト対象画像(L2とする)については、1枚目のレイアウト対象画像L1の顔領域F1と2枚目のレイアウト対象画像L2とが重ならず、かつベース画像B0に配置された最初のレイアウト対象画像L1の顔領域F1の重心G1と2枚目のレイアウト対象画像L2の顔領域F1の重心G1との距離が最短となる位置をレイアウト部30が探索し、その位置に2枚目のレイアウト対象画像L2を配置する。   First, for the second layout target image (referred to as L2), the face area F1 of the first layout target image L1 and the second layout target image L2 do not overlap and are arranged in the base image B0. The layout unit 30 searches for a position where the distance between the center of gravity G1 of the face area F1 of the first layout target image L1 and the center of gravity G1 of the face area F1 of the second layout target image L2 is the shortest. A second layout target image L2 is arranged.

図5は最初のレイアウト対象画像L1および2枚目のレイアウト対象画像L2をベース画像B0に配置した状態を示す図である。図5に示すように、最初のレイアウト対象画像L1の顔領域F1が2枚目のレイアウト対象画像L2とは重ならず、かつ最初のレイアウト対象画像L1の顔領域F1の重心G1と2枚目のレイアウト対象画像L2の顔領域F1の重心G1とが最短となる位置に2枚目のレイアウト対象画像L2が配置されている。   FIG. 5 is a diagram illustrating a state in which the first layout target image L1 and the second layout target image L2 are arranged in the base image B0. As shown in FIG. 5, the face area F1 of the first layout target image L1 does not overlap the second layout target image L2, and the center G1 of the face area F1 of the first layout target image L1 and the second sheet The second layout target image L2 is arranged at a position where the center of gravity G1 of the face area F1 of the layout target image L2 is the shortest.

次いで、レイアウト部30はさらに配置するレイアウト対象画像があるか否かを判定し(ステップST7)。ステップST7が肯定されると、配置するレイアウト対象画像を次のレイアウト対象画像に設定し(ステップST8)、ステップST6に戻り、ステップST6以降の処理を繰り返す。   Next, the layout unit 30 determines whether there is a layout target image to be further arranged (step ST7). If step ST7 is affirmed, the layout target image to be arranged is set as the next layout target image (step ST8), the process returns to step ST6, and the processes after step ST6 are repeated.

ここで、3枚目以降のレイアウト対象画像を配置する場合、レイアウト部30は、すでにベース画像B0に配置されているすべてのレイアウト対象画像L1,L2の顔領域F1と、配置するレイアウト対象画像の顔領域とが重ならず、かつベース画像B0に配置されたすべてのレイアウト対象画像の顔領域F1の重心G1と配置するレイアウト対象画像の顔領域F1の重心G1との距離が最短となる位置を探索してレイアウト対象画像を配置する。   Here, when the third and subsequent layout target images are arranged, the layout unit 30 includes the face areas F1 of all the layout target images L1 and L2 already arranged in the base image B0 and the layout target images to be arranged. A position where the face area does not overlap and the distance between the centroid G1 of the face area F1 of all layout target images arranged in the base image B0 and the centroid G1 of the face area F1 of the layout target image arranged is the shortest. Search and place the layout target image.

ここで、図5に示すように2枚のレイアウト対象画像が配置された状態においては、2枚のレイアウト対象画像の顔領域の重心G1は図6に示す位置となる。したがって、図5に示すように2枚のレイアウト対象画像L1,L2がベース画像B0に配置された状態において、図3(d)に示すレイアウト対象画像(L3とする)を配置すると、図7に示すように3枚のレイアウト対象画像L1,L2,L3が配置される。なお、この場合における3枚のレイアウト対象画像L1,L2,L3の顔領域の重心G1は図8に示すものとなる。   Here, in the state where two layout target images are arranged as shown in FIG. 5, the center of gravity G1 of the face area of the two layout target images is at the position shown in FIG. Therefore, when the layout target image (referred to as L3) shown in FIG. 3D is arranged in a state where the two layout target images L1 and L2 are arranged in the base image B0 as shown in FIG. 5, FIG. As shown, three layout target images L1, L2, and L3 are arranged. In this case, the center of gravity G1 of the face area of the three layout target images L1, L2, and L3 is as shown in FIG.

一方、ステップST7が否定されると、最終処理部32が、図9に示すように、ベース画像B0にレイアウトされたすべてのレイアウト対象画像L1,L2,L3を含み、かつ指定されたアスペクト比を有する最小サイズの矩形領域S0によりベース画像B0をトリミングする(ステップST9)。ここで、最小サイズの矩形領域S0は図9に示すように3枚のレイアウト対象画像L1,L2,L3に内接する領域となる。   On the other hand, if step ST7 is negative, the final processing unit 32 includes all the layout target images L1, L2, and L3 laid out in the base image B0 and has the designated aspect ratio as shown in FIG. The base image B0 is trimmed by the rectangular region S0 having the minimum size (step ST9). Here, the minimum-sized rectangular area S0 is an area inscribed in the three layout target images L1, L2, and L3 as shown in FIG.

続いて、最終処理部32は、トリミングした矩形領域S0を指定されたサイズに変更して(ステップST10)、レイアウト画像の作成を終了する。これにより図10に示すように、3枚のレイアウト対象画像L1,L2,L3が配置されたレイアウト画像を得ることができる。なお、レイアウト画像はプリント出力やモニタの表示に供される。   Subsequently, the final processing unit 32 changes the trimmed rectangular area S0 to the designated size (step ST10), and ends the creation of the layout image. As a result, as shown in FIG. 10, a layout image in which three layout target images L1, L2, and L3 are arranged can be obtained. The layout image is used for print output and monitor display.

このように第1の実施形態においては、ベース画像B0にすでに配置されているレイアウト対象画像の顔領域F1の重心G1と、さらに配置すべきレイアウト対象画像の顔領域F1の重心G1との間の重心間距離が最短となり、かつ、すでに配置されているすべてのレイアウト対象画像の顔領域F1と配置するレイアウト対象画像とが重ならないように、レイアウト対象画像を配置するようにしたものである。   As described above, in the first embodiment, the centroid G1 of the face area F1 of the layout target image already arranged in the base image B0 and the centroid G1 of the face area F1 of the layout target image to be further arranged. The layout target images are arranged such that the distance between the centers of gravity is the shortest and the face area F1 of all layout target images that have already been arranged do not overlap with the layout target images to be arranged.

このため、レイアウト対象画像に含まれる顔領域F1の位置、顔領域の数に応じて、画像の配置に意外性のあるレイアウト画像を得ることができる。また、配置されているレイアウト対象画像のすべての顔領域F1が他のレイアウト対象画像により隠されることがなくなるため、レイアウト対象画像に含まれる人物の顔が他の画像に隠れてしまうこともない。また、上記特許文献3に記載されたような複雑なアルゴリズムを使用することなくレイアウト画像を得ることができるため、見栄えのよいレイアウト画像を簡易に得ることができる。   Therefore, it is possible to obtain a layout image that is unexpected in the arrangement of the images according to the position of the face area F1 and the number of face areas included in the layout target image. Further, since all the face areas F1 of the arranged layout target images are not hidden by other layout target images, the face of a person included in the layout target images is not hidden by other images. Moreover, since a layout image can be obtained without using a complicated algorithm as described in Patent Document 3, a layout image having a good appearance can be easily obtained.

次いで、本発明の第2の実施形態について説明する。図11は本発明の第2の実施形態による画像レイアウト装置の構成を示す概略ブロック図である。なお、第2の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、詳細な説明は省略する。図11に示すように第2の実施形態による画像レイアウト装置1Aは、複数のレイアウト対象画像のうちの所望のレイアウト対象画像に対して、サイズ変更および回転の少なくとも1つの処理を施して加工済みのレイアウト対象画像を取得する画像加工部36を備えた点が第1の実施形態と異なる。   Next, a second embodiment of the present invention will be described. FIG. 11 is a schematic block diagram showing the configuration of an image layout apparatus according to the second embodiment of the present invention. Note that in the second embodiment, the same reference numerals are assigned to the same components as those in the first embodiment, and detailed description thereof is omitted. As shown in FIG. 11, the image layout apparatus 1A according to the second embodiment has been processed by performing at least one process of size change and rotation on a desired layout target image among a plurality of layout target images. The point provided with the image process part 36 which acquires a layout object image differs from 1st Embodiment.

なお、ここでは、画像加工部36はすべてのレイアウト対象画像に対してランダムにサイズ変更および回転の処理を施して加工済みのレイアウト対象画像を得るものとする。この際、極端にサイズを変更したり回転するとレイアウト画像の見栄えが悪くなるため、サイズ変更および回転の程度は、あらかじめ定められたパラメータの範囲内において行うものとする。具体的には、サイズ変更の場合は元の画像のサイズの±20%程度の範囲内において行うことが好ましく、回転については±15度程度の範囲内において行うことが好ましい。なお、ここではすべてのレイアウト対象画像に対してサイズ変更および回転を行うようにしているが、あらかじめ指定されたレイアウト対象画像に対してのみサイズ変更および回転を行うようにしてもよい。また、サイズ変更および回転のいずれか一方の処理のみを行うようにしてもよい。なお、サイズ変更および回転はランダムではなく、指定されたパラメータにより行うようにしてもよい。   Here, it is assumed that the image processing unit 36 performs a size change and rotation process on all layout target images at random to obtain processed layout target images. At this time, since the appearance of the layout image deteriorates if the size is changed or rotated extremely, the size change and rotation are performed within a predetermined parameter range. Specifically, the size change is preferably performed within a range of about ± 20% of the original image size, and the rotation is preferably performed within a range of about ± 15 degrees. Here, the size change and rotation are performed on all layout target images, but the size change and rotation may be performed only on a layout target image designated in advance. Further, only one of the size change and the rotation may be performed. Note that the size change and rotation are not random, and may be performed by designated parameters.

次いで、第2の実施形態において行われる処理について説明する。図12は第2の実施形態において行われる処理を示すフローチャートである。レイアウト画像作成の指示をユーザが入力部16から行うことによりCPU12が処理を開始し、顔検出部28がすべてのレイアウト対象画像から顔領域を検出する(ステップST21)。次いで、画像加工部36がすべてのレイアウト対象画像に対してランダムにサイズ変更および回転処理を施して、加工済みのレイアウト対象画像を取得する(ステップST22)。続いて、顔検出部28が、すべての加工済みのレイアウト対象画像について、顔領域の位置、サイズおよび重心を検出する(ステップST23)。   Next, processing performed in the second embodiment will be described. FIG. 12 is a flowchart showing processing performed in the second embodiment. When the user gives an instruction to create a layout image from the input unit 16, the CPU 12 starts processing, and the face detection unit 28 detects a face area from all layout target images (step ST21). Next, the image processing unit 36 performs a size change and rotation process on all layout target images at random, and acquires processed layout target images (step ST22). Subsequently, the face detection unit 28 detects the position, size, and center of gravity of the face area for all processed layout target images (step ST23).

続いて、レイアウト部30が、配置する画像を最初のレイアウト対象画像に設定し(ステップST24)、レイアウト対象画像をレイアウト画像の背景となるベース画像に配置する(ステップST25)。次いで、レイアウト部30は配置する画像を2枚目のレイアウト対象画像に設定し(ステップST26)、レイアウト対象画像の顔領域の位置、サイズおよび重心を考慮して2枚目のレイアウト対象画像を配置する(ステップST27)。   Subsequently, the layout unit 30 sets the image to be placed as the first layout target image (step ST24), and places the layout target image on the base image that is the background of the layout image (step ST25). Next, the layout unit 30 sets the image to be arranged as the second layout target image (step ST26), and places the second layout target image in consideration of the position, size, and center of gravity of the face area of the layout target image. (Step ST27).

次いで、レイアウト部30はさらに配置するレイアウト対象画像があるか否かを判定し(ステップST28)。ステップST28が肯定されると、配置するレイアウト対象画像を次のレイアウト対象画像に設定し(ステップST29)、ステップST27に戻り、ステップST27以降の処理を繰り返す。この際、加工済みのレイアウト対象画像に対して、上記第1の実施形態と同様に、すでに配置されたレイアウト対象画像の顔領域F1とこれから配置するレイアウト対象画像とが重ならず、かつベース画像B0に配置されたすべてのレイアウト対象画像の顔領域F1の重心G1とこれから配置するレイアウト対象画像の顔領域F1の重心G1との距離が最短となる位置をレイアウト部30が探索し、その位置にレイアウト対象画像を配置する。   Next, the layout unit 30 determines whether there is a layout target image to be further arranged (step ST28). If step ST28 is affirmed, the layout target image to be arranged is set as the next layout target image (step ST29), the process returns to step ST27, and the processes after step ST27 are repeated. At this time, as in the first embodiment, the face area F1 of the layout target image that has already been arranged and the layout target image to be arranged in the future do not overlap with the processed layout target image, and the base image The layout unit 30 searches for the position where the distance between the centroid G1 of the face area F1 of all the layout target images arranged in B0 and the centroid G1 of the face area F1 of the layout target image arranged in the future is the shortest. Arrange the layout target image.

一方、ステップST28が否定されると、最終処理部32が、ベース画像B0にレイアウトされたすべてのレイアウト対象画像を含み、かつ指定されたアスペクト比を有する最小サイズの矩形領域S0によりベース画像B0をトリミングする(ステップST30)。   On the other hand, if step ST28 is negative, the final processing unit 32 includes the base image B0 by the rectangular region S0 of the minimum size that includes all the layout target images laid out in the base image B0 and has the specified aspect ratio. Trimming is performed (step ST30).

続いて、最終処理部32は、トリミングした矩形領域S0を指定されたサイズに変更して(ステップST31)、レイアウト画像の作成を終了する。これにより図13に示すように、サイズが変更されるとともに回転された3枚のレイアウト対象画像L1,L2,L3が配置されたレイアウト画像を得ることができる。   Subsequently, the final processing unit 32 changes the trimmed rectangular area S0 to the designated size (step ST31), and ends the creation of the layout image. As a result, as shown in FIG. 13, it is possible to obtain a layout image in which three layout target images L1, L2, and L3 whose size is changed and rotated are arranged.

このように第2の実施形態においては、レイアウト対象画像に対して、サイズ変更および回転の少なくとも1つの処理を施し、処理が施されたレイアウト対象画像に対してレイアウト処理を行うようにしたため、より見栄えのよいレイアウト画像を得ることができる。   As described above, in the second embodiment, the layout target image is subjected to at least one process of size change and rotation, and the layout process is performed on the processed layout target image. A good-looking layout image can be obtained.

次いで、本発明の第3の実施形態について説明する。図14は本発明の第3の実施形態による画像レイアウト装置の構成を示す概略ブロック図である。なお、第3の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、詳細な説明は省略する。図13に示すように第3の実施形態による画像レイアウト装置1Bは、レイアウト対象画像に含まれる人物数を検出する人物数検出部38と、人物数が多いほどサイズが大きくなるようにレイアウト対象画像のサイズを変更するサイズ変更部40とを備えた点が第1の実施形態と異なる。   Next, a third embodiment of the present invention will be described. FIG. 14 is a schematic block diagram showing the configuration of an image layout apparatus according to the third embodiment of the present invention. Note that in the third embodiment, the same reference numerals are assigned to the same configurations as those in the first embodiment, and detailed description thereof is omitted. As illustrated in FIG. 13, the image layout device 1B according to the third embodiment includes a person number detection unit 38 that detects the number of persons included in the layout target image, and a layout target image that increases in size as the number of persons increases. This embodiment differs from the first embodiment in that it includes a size changing unit 40 that changes the size.

なお、ここでは、サイズ変更部40は、人物数が最も多い1枚のレイアウト対象画像のサイズを変更するものとするが、人物数が多いほどレイアウト対象画像のサイズが異なるものとなるように複数のレイアウト対象画像のサイズを変更するようにしてもよい。   Here, the size changing unit 40 changes the size of the single layout target image having the largest number of persons. However, the size changing unit 40 can change the size of the layout target image so that the size of the layout target image is different. The size of the layout target image may be changed.

次いで、第3の実施形態において行われる処理について説明する。図15は第3の実施形態において行われる処理を示すフローチャートである。レイアウト画像作成の指示をユーザが入力部16から行うことによりCPU12が処理を開始し、顔検出部28がすべてのレイアウト対象画像から顔領域を検出する(ステップST41)。次いで、人物数検出部38が、顔検出部28の検出結果を用いて、レイアウト対象画像の人物数を検出する(ステップST42)。そして、サイズ変更部40が、最も人物数が多いレイアウト対象画像のサイズを変更する(ステップST43)。   Next, processing performed in the third embodiment will be described. FIG. 15 is a flowchart showing processing performed in the third embodiment. When the user gives an instruction to create a layout image from the input unit 16, the CPU 12 starts processing, and the face detection unit 28 detects a face area from all layout target images (step ST41). Next, the number-of-persons detection unit 38 detects the number of people in the layout target image using the detection result of the face detection unit 28 (step ST42). Then, the size changing unit 40 changes the size of the layout target image having the largest number of persons (step ST43).

続いて、顔検出部28が、すべてのレイアウト対象画像(サイズ変更済みのレイアウト対象画像を含む)について、顔領域の位置、サイズおよび重心を検出する(ステップST44)。   Subsequently, the face detection unit 28 detects the position, size, and center of gravity of the face area for all layout target images (including the layout target image whose size has been changed) (step ST44).

続いて、レイアウト部30が、配置する画像をサイズが変更されたレイアウト対象画像に設定し(ステップST45)、レイアウト対象画像をレイアウト画像の背景となるベース画像に配置する(ステップST46)。次いで、レイアウト部30は配置する画像を2枚目のレイアウト対象画像に設定し(ステップST47)、レイアウト対象画像の顔領域の位置、サイズおよび重心を考慮して2枚目のレイアウト対象画像を配置する(ステップST48)。   Subsequently, the layout unit 30 sets the image to be placed as the layout target image whose size has been changed (step ST45), and places the layout target image on the base image serving as the background of the layout image (step ST46). Next, the layout unit 30 sets the image to be arranged as the second layout target image (step ST47), and places the second layout target image in consideration of the position, size, and center of gravity of the face area of the layout target image. (Step ST48).

次いで、レイアウト部30はさらに配置するレイアウト対象画像があるか否かを判定し(ステップST49)。ステップST49が肯定されると、配置するレイアウト対象画像を次のレイアウト対象画像に設定し(ステップST50)、ステップST48に戻り、ステップST48以降の処理を繰り返す。この際、上記第1の実施形態と同様に、すでに配置されたレイアウト対象画像の顔領域F1とこれから配置するレイアウト対象画像とが重ならず、かつベース画像B0に配置されたすべてのレイアウト対象画像の顔領域F1の重心G1とこれから配置するレイアウト対象画像の顔領域F1の重心G1との距離が最短となる位置をレイアウト部30が探索し、その位置にレイアウト対象画像を配置する。   Next, the layout unit 30 determines whether there is a layout target image to be further arranged (step ST49). If step ST49 is affirmed, the layout target image to be arranged is set as the next layout target image (step ST50), the process returns to step ST48, and the processes after step ST48 are repeated. At this time, as in the first embodiment, the face area F1 of the layout target image that has already been arranged does not overlap with the layout target image to be arranged in the future, and all the layout target images arranged in the base image B0. The layout unit 30 searches for a position where the distance between the center of gravity G1 of the face area F1 of the face and the center of gravity G1 of the face area F1 of the layout target image to be arranged is the shortest, and places the layout target image at that position.

一方、ステップST49が否定されると、最終処理部32が、ベース画像B0にレイアウトされたすべてのレイアウト対象画像を含み、かつ指定されたアスペクト比を有する最小サイズの矩形領域S0にベース画像B0をトリミングする(ステップST51)。   On the other hand, if step ST49 is negative, the final processing unit 32 adds the base image B0 to the rectangular region S0 of the minimum size that includes all the layout target images laid out in the base image B0 and has the specified aspect ratio. Trimming is performed (step ST51).

続いて、最終処理部32は、トリミングした矩形領域S0を指定されたサイズに変更して(ステップST52)、レイアウト画像の作成を終了する。これにより図16に示すように、人物数が最も多いレイアウト対象画像L4が拡大されたレイアウト画像を得ることができる。   Subsequently, the final processing unit 32 changes the trimmed rectangular area S0 to the designated size (step ST52), and ends the creation of the layout image. Thereby, as shown in FIG. 16, a layout image in which the layout target image L4 having the largest number of persons is enlarged can be obtained.

ここで、画像に含まれる人物の顔のサイズは、画像に含まれる人物数が多いほど小さくなる。このため、人物数が多いレイアウト対象画像のサイズを大きくなるように変更してレイアウト処理を行うことにより、より人物の顔が見やすいように画像をレイアウトしたレイアウト画像を得ることができる。   Here, the size of the face of the person included in the image decreases as the number of persons included in the image increases. For this reason, by performing layout processing by changing the size of a layout target image having a large number of people to be large, a layout image in which images are laid out so that the faces of people can be seen more easily can be obtained.

次いで、本発明の第4の実施形態について説明する。図17は本発明の第4の実施形態による画像レイアウト装置の構成を示す概略ブロック図である。なお、第4の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、詳細な説明は省略する。図17に示すように第4の実施形態による画像レイアウト装置1Cは、第2の実施形態における画像加工部36、並びに第3の実施形態における人物数検出部38およびサイズ変更部40とを備え、入力部16からの指示により、第1から第3の実施形態において行われる処理を切り替え可能としたものである。なお、以降の説明においては、第1から第3の実施形態において行われる処理を、それぞれ第1から第3の処理と称するものとする。   Next, a fourth embodiment of the present invention will be described. FIG. 17 is a schematic block diagram showing the configuration of an image layout apparatus according to the fourth embodiment of the present invention. In the fourth embodiment, the same reference numerals are assigned to the same components as those in the first embodiment, and detailed description thereof is omitted. As shown in FIG. 17, the image layout device 1 </ b> C according to the fourth embodiment includes the image processing unit 36 in the second embodiment, and the person number detection unit 38 and the size changing unit 40 in the third embodiment. The processing performed in the first to third embodiments can be switched by an instruction from the input unit 16. In the following description, the processes performed in the first to third embodiments are referred to as first to third processes, respectively.

図18は第4の実施形態において行われる処理を示すフローチャートである。レイアウト画像作成の指示をユーザが入力部16から行うことによりCPU12が処理を開始し、CPU12は、第1から第3のいずれの処理が指定されたか否かを判定する(ステップST61)。第1の処理が指定された場合には第1の実施形態と同様の第1の処理を行ってレイアウト画像を作成する(ステップST62)。第2の処理が指定された場合には第2の実施形態と同様の第2の処理を行ってレイアウト画像を作成する(ステップST63)。第3の処理が指定された場合には第3の実施形態と同様の第3の処理を行ってレイアウト画像を作成する(ステップST64)。   FIG. 18 is a flowchart showing processing performed in the fourth embodiment. The CPU 12 starts the process when the user gives an instruction to create a layout image from the input unit 16, and the CPU 12 determines whether any of the first to third processes is designated (step ST61). When the first process is designated, the first process similar to the first embodiment is performed to create a layout image (step ST62). When the second process is designated, a second process similar to that of the second embodiment is performed to create a layout image (step ST63). If the third process is designated, the third process similar to that of the third embodiment is performed to create a layout image (step ST64).

このように、第1から第3の実施形態において行われる処理を切り替え可能とすることにより、ユーザが所望とする態様にてレイアウト画像を作成することができる。   As described above, by making it possible to switch the processing performed in the first to third embodiments, a layout image can be created in a manner desired by the user.

なお、上記第1から第4の実施形態においては、すでに配置されたレイアウト対象画像の顔領域F1とこれから配置するレイアウト対象画像とが重ならず、かつベース画像B0に配置されたすべてのレイアウト対象画像の顔領域F1の重心G1とこれから配置するレイアウト対象画像の顔領域F1の重心G1との距離が最短となるようにレイアウト対象画像を配置しているが、重心G1間の距離は最短に限定されるものではなく、すでに配置されたレイアウト対象画像の顔領域F1とこれから配置するレイアウト対象画像とが重ならなければ、最短距離からある程度大きくてもよい。この場合、レイアウト対象画像の数が少ないほど、画像の間隔に余裕を持たせることができるため、重心G1間の距離を比較的余裕を持って大きくすることが可能である。   In the first to fourth embodiments, the face area F1 of the layout target image that has already been arranged and the layout target image to be arranged in the future do not overlap, and all the layout objects arranged in the base image B0. The layout target image is arranged so that the distance between the centroid G1 of the face area F1 of the image and the centroid G1 of the face area F1 of the layout target image to be arranged will be shortest, but the distance between the centroids G1 is limited to the shortest. Instead, the face area F1 of the layout target image that has already been arranged and the layout target image to be arranged in the future may be increased to some extent from the shortest distance. In this case, the smaller the number of layout target images is, the more space can be provided between the images. Therefore, the distance between the centroids G1 can be increased with a relatively large margin.

以上、本発明の実施形態に係る装置について説明したが、コンピュータを、上記の顔検出部28、レイアウト部30、最終処理部32、画像加工部36、人物数検出部38およびサイズ変更部40に対応する手段として機能させ、図2,12,15,18に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。また、このようなプログラムを、画像を閲覧するためのビューアソフトに組み込むようにしてもよい。   As described above, the apparatus according to the embodiment of the present invention has been described. However, the computer is connected to the face detection unit 28, the layout unit 30, the final processing unit 32, the image processing unit 36, the number of people detection unit 38, and the size changing unit 40. A program that functions as a corresponding means and performs processing as shown in FIGS. 2, 12, 15, and 18 is also one embodiment of the present invention. A computer-readable recording medium in which such a program is recorded is also one embodiment of the present invention. Further, such a program may be incorporated in viewer software for browsing images.

本発明の第1の実施形態による画像レイアウト装置の構成を示す概略ブロック図1 is a schematic block diagram showing the configuration of an image layout apparatus according to a first embodiment of the present invention. 第1の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 1st Embodiment 顔領域の重心の検出を説明するための図The figure for demonstrating the detection of the gravity center of a face area | region 最初のレイアウト対象画像がベース画像に配置された状態を示す図The figure which shows the state by which the first layout object image was arrange | positioned at the base image 最初のレイアウト対象画像および2枚目のレイアウト対象画像をベース画像に配置した状態を示す図The figure which shows the state which has arrange | positioned the first layout object image and the 2nd layout object image to the base image 最初のレイアウト対象画像および2枚目のレイアウト対象画像をベース画像に配置した状態における顔領域の重心を示す図The figure which shows the gravity center of the face area in the state which has arrange | positioned the first layout object image and the 2nd layout object image to the base image 3枚のレイアウト対象画像をベース画像に配置した状態を示す図The figure which shows the state which has arrange | positioned three layout object images to a base image 3枚のレイアウト対象画像をベース画像に配置した状態における顔領域の重心を示す図The figure which shows the gravity center of the face area in the state which has arrange | positioned three layout object images to a base image トリミングを説明するための図Diagram for explaining trimming 第1の実施形態において得られるレイアウト画像を示す図The figure which shows the layout image obtained in 1st Embodiment 本発明の第2の実施形態による画像レイアウト装置の構成を示す概略ブロック図Schematic block diagram showing the configuration of an image layout apparatus according to a second embodiment of the present invention 第2の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 2nd Embodiment. 第2の実施形態において得られるレイアウト画像を示す図The figure which shows the layout image obtained in 2nd Embodiment 本発明の第3の実施形態による画像レイアウト装置の構成を示す概略ブロック図The schematic block diagram which shows the structure of the image layout apparatus by the 3rd Embodiment of this invention. 第3の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 3rd Embodiment 第3の実施形態において得られるレイアウト画像を示す図The figure which shows the layout image obtained in 3rd Embodiment 本発明の第4の実施形態による画像レイアウト装置の構成を示す概略ブロック図The schematic block diagram which shows the structure of the image layout apparatus by the 4th Embodiment of this invention. 第4の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 4th Embodiment

符号の説明Explanation of symbols

1,1A,1B,1C 画像レイアウト装置
2 メモリカード
12 CPU
14 システムメモリ
16 入力部
18 表示部
20 カードスロット
22 圧縮解凍部
24 ハードディスク
26 メモリ制御部
28 顔検出部
30 レイアウト部
32 最終処理部
34 表示制御部
36 画像加工部
38 人物検出部
40 サイズ変更部
1, 1A, 1B, 1C Image layout device 2 Memory card 12 CPU
DESCRIPTION OF SYMBOLS 14 System memory 16 Input part 18 Display part 20 Card slot 22 Compression / decompression part 24 Hard disk 26 Memory control part 28 Face detection part 30 Layout part 32 Final process part 34 Display control part 36 Image processing part 38 Person detection part 40 Size change part

Claims (9)

レイアウト画像を作成するための複数の画像のそれぞれについて顔領域を検出するとともに、該顔領域のサイズおよび重心を検出する顔検出手段と、
背景となるベース画像に最初に配置すべき第1の画像を配置し、2枚目に配置すべき第2の画像については、前記第1の画像の全顔領域が視認可能となり、かつ前記第1の画像に含まれる顔領域の重心と、前記第2の画像に含まれる顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記第2の画像の配置位置を探索し、該探索した配置位置に前記第2の画像を配置し、さらに配置する画像がある場合、該さらに配置する画像については、すでに配置されているすべての前記画像の全顔領域が視認可能となり、かつ前記ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、前記さらに配置する画像の顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記さらに配置する画像の配置位置を探索し、該探索した配置位置に前記さらに配置する画像を配置するレイアウト処理を行うレイアウト手段とを備えたことを特徴とする画像レイアウト装置。
Detecting a face area for each of a plurality of images for creating a layout image, and detecting a size and a center of gravity of the face area;
The first image to be arranged first in the base image as the background, and the second image to be arranged in the second sheet, the entire face area of the first image becomes visible, and the first image The distance between the center of gravity between the center of gravity of the face area included in one image and the center of gravity of the face area included in the second image is a distance based on the minimum value of the distance between the center of gravity. When the arrangement position of the second image is searched, the second image is arranged at the searched arrangement position, and there is an image to be further arranged, the images to be further arranged are all already arranged. The distance between the centroids between the centroid of each face area of a plurality of images already arranged in the base image and the centroid of the face area of the further image to be arranged , where the entire face area of the image is visible distance but relative to the minimum value of the polymerization inter-axis distance And so that, searches for the position of the image to be the further arrangement, an image layout apparatus that is characterized in that a layout means performing the layout process to place the image of the further arranged in the arrangement positions the search.
すべての前記画像がレイアウトされたベース画像を、前記レイアウトされたすべての画像を含み、かつ指定されたアスペクト比を有する領域に切り出し、該切り出された領域を指定されたサイズに変更してレイアウト画像を取得する最終処理手段をさらに備えたことを特徴とする請求項1記載の画像レイアウト装置。   A base image on which all the images are laid out is cut out into an area including all the laid out images and having a specified aspect ratio, and the cut out area is changed to a specified size to be a layout image. The image layout apparatus according to claim 1, further comprising a final processing unit that acquires the image data. 前記複数の画像のうちの所望とされる画像に対して、サイズ変更および回転の少なくとも1つの処理を施して加工済み画像を取得する画像加工手段をさらに備え、
前記レイアウト手段は、前記加工済み画像に対して前記レイアウト処理を行う手段であることを特徴とする請求項1または2記載の画像レイアウト装置。
Image processing means for obtaining a processed image by performing at least one process of resizing and rotating on a desired image of the plurality of images,
The image layout apparatus according to claim 1, wherein the layout unit is a unit that performs the layout process on the processed image.
前記複数の画像のそれぞれに含まれる人物数を検出する人物数検出手段と、
前記人物数が多い画像ほどサイズが大きくなるように前記複数の画像のうちの所定の画像のサイズを変更してサイズ変更済み画像を取得するサイズ変更手段とをさらに備え、
前記レイアウト手段は、前記サイズ変更済み画像に対して前記レイアウト処理を行う手段であることを特徴とする請求項1から3のいずれか1項記載の画像レイアウト装置。
Person number detecting means for detecting the number of persons included in each of the plurality of images;
Resize means for obtaining a resized image by changing the size of a predetermined image of the plurality of images so that the image has a larger size as the number of persons increases.
The image layout apparatus according to claim 1, wherein the layout unit is a unit that performs the layout process on the resized image.
前記所定の画像は、前記人物数が最も多い画像であることを特徴とする請求項4記載の画像レイアウト装置。   The image layout apparatus according to claim 4, wherein the predetermined image is an image having the largest number of persons. 前記重心間距離の最小値を基準とする距離は、前記重心間距離の最小値であることを特徴とする請求項1から5のいずれか1項記載の画像レイアウト装置。 Distance relative to the minimum value of the distance between centers of gravity are, the image layout apparatus according to any one of claims 1 to 5, wherein the minimum value of the distance between center of gravity. 前記レイアウト手段は、前記複数の画像の数が多いほど、前記重心間距離の最小値を基準とする距離を小さくする手段であることを特徴とする請求項1から6のいずれか1項記載の画像レイアウト装置。  The said layout means is a means to make the distance on the basis of the minimum value of the distance between the centers of gravity the larger the number of the plurality of images, the smaller one of the plurality of images. Image layout device. コンピュータが、レイアウト画像を作成するための複数の画像のそれぞれについて顔領域を検出するとともに、該顔領域のサイズおよび重心を検出し、
背景となるベース画像に最初に配置すべき第1の画像を配置し、
2枚目に配置すべき第2の画像については、前記第1の画像の全顔領域が視認可能となり、かつ前記第1の画像に含まれる顔領域の重心と、前記第2の画像に含まれる顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記第2の画像の配置位置を探索し、
該探索した配置位置に前記第2の画像を配置し
さらに配置する画像がある場合、該さらに配置する画像については、すでに配置されているすべての前記画像の全顔領域が視認可能となり、かつ前記ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、前記さらに配置する画像の顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記さらに配置する画像の配置位置を探索し、該探索した配置位置に前記さらに配置する画像を配置することを特徴とする画像レイアウト方法。
The computer detects a face area for each of a plurality of images for creating a layout image, and detects the size and center of gravity of the face area,
Place the first image to be placed first on the base image that becomes the background,
For the second image to be placed on the second image, the entire face area of the first image is visible, and the center of the face area included in the first image is included in the second image. Searching for the arrangement position of the second image so that the distance between the center of gravity of the face area to be determined is a distance based on the minimum value of the distance between the center of gravity ,
The second image is arranged at the searched arrangement position ,
When there is an image to be further arranged, for the image to be further arranged , all the face regions of all the images already arranged are visible and each of the plurality of images already arranged in the base image is displayed. and the center of gravity of the face area, the centroid distance between the centroid of the face area of the image to be the further arrangement, so that the distance relative to the minimum value of the polymerization inter-axis distance, position of the image to be the further arranged And laying out the image to be further arranged at the searched arrangement position .
レイアウト画像を作成するための複数の画像のそれぞれについて顔領域を検出するとともに、該顔領域のサイズおよび重心を検出する手順と、
背景となるベース画像に最初に配置すべき第1の画像を配置する手順と、
2枚目に配置すべき第2の画像については、前記第1の画像の全顔領域が視認可能となり、かつ前記第1の画像に含まれる顔領域の重心と、前記第2の画像に含まれる顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記第2の画像の配置位置を探索する手順と、
該探索した配置位置に前記第2の画像を配置する手順と
さらに配置する画像がある場合、該さらに配置する画像については、すでに配置されているすべての前記画像の全顔領域が視認可能となり、かつ前記ベース画像にすでに配置されている複数の画像のそれぞれの顔領域の重心と、前記さらに配置する画像の顔領域の重心との間の重心間距離が、該重心間距離の最小値を基準とした距離となるように、前記さらに配置する画像の配置位置を探索し、該探索した配置位置に前記さらに配置する画像を配置する手順とをコンピュータに実行させることを特徴とする画像レイアウトプログラム。
Detecting a face area for each of a plurality of images for creating a layout image, and detecting a size and a center of gravity of the face area;
A procedure for placing a first image to be placed first on a background base image;
For the second image to be placed on the second image, the entire face area of the first image is visible, and the center of the face area included in the first image is included in the second image. A procedure for searching for an arrangement position of the second image so that a distance between the center of gravity between the center of the face area to be determined is a distance based on a minimum value of the distance between the center of gravity ;
Placing the second image at the searched placement position ;
When there is an image to be further arranged, for the image to be further arranged , all the face regions of all the images already arranged are visible and each of the plurality of images already arranged in the base image is displayed. and the center of gravity of the face area, the centroid distance between the centroid of the face area of the image to be the further arrangement, so that the distance relative to the minimum value of the polymerization inter-axis distance, position of the image to be the further arranged And an image layout program for causing a computer to execute a procedure for arranging the image to be further arranged at the searched arrangement position .
JP2006040263A 2006-02-17 2006-02-17 Image layout apparatus and method, and program Active JP4712576B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006040263A JP4712576B2 (en) 2006-02-17 2006-02-17 Image layout apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006040263A JP4712576B2 (en) 2006-02-17 2006-02-17 Image layout apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2007219878A JP2007219878A (en) 2007-08-30
JP4712576B2 true JP4712576B2 (en) 2011-06-29

Family

ID=38497105

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006040263A Active JP4712576B2 (en) 2006-02-17 2006-02-17 Image layout apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP4712576B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5061987B2 (en) * 2008-03-25 2012-10-31 セイコーエプソン株式会社 Image processing method, program therefor, and image processing apparatus
JP5253069B2 (en) 2008-09-29 2013-07-31 キヤノン株式会社 Image processing method and image processing apparatus
JP5136444B2 (en) 2009-01-29 2013-02-06 セイコーエプソン株式会社 Image processing method, program therefor, and image processing apparatus
US8271871B2 (en) * 2009-04-30 2012-09-18 Xerox Corporation Automated method for alignment of document objects

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092481A (en) * 1998-09-16 2000-03-31 Omron Corp Image processor, image processing method and recording medium in which image processing program is recorded
JP2005202588A (en) * 2004-01-14 2005-07-28 Canon Inc Image display device, image display method and image display program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092481A (en) * 1998-09-16 2000-03-31 Omron Corp Image processor, image processing method and recording medium in which image processing program is recorded
JP2005202588A (en) * 2004-01-14 2005-07-28 Canon Inc Image display device, image display method and image display program

Also Published As

Publication number Publication date
JP2007219878A (en) 2007-08-30

Similar Documents

Publication Publication Date Title
AU2018214005B2 (en) Systems and methods for generating a 3-D model of a virtual try-on product
EP1324269B1 (en) Image processing apparatus, image processing method, record medium, computer program, and semiconductor device
US11567624B2 (en) Techniques to modify content and view content on mobile devices
US11275436B2 (en) Interface-based modeling and design of three dimensional spaces using two dimensional representations
CN102005059B (en) Image processing apparatus and image processing method
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
CN103391396B (en) Display control apparatus and display control method
JP4712576B2 (en) Image layout apparatus and method, and program
US20160110909A1 (en) Method and apparatus for creating texture map and method of creating database
JP2022507502A (en) Augmented Reality (AR) Imprint Method and System
CN110267079B (en) Method and device for replacing human face in video to be played
JP7247579B2 (en) Information processing device, information processing method and program
JP2019512141A (en) Face model editing method and apparatus
CN106716500A (en) Program, information processing device, depth definition method, and recording medium
Rabi et al. Face Fusion: an automatic method for virtual plastic surgery
JP2004151979A (en) System for automated preparation of index for electronic catalog
KR102388715B1 (en) Apparatus for feeling to remodeling historic cites
JP2006343953A (en) Image processing method and image processing device
JP6697573B2 (en) Hairstyle simulation device, hairstyle simulation method, and computer program
CN111627118A (en) Scene portrait showing method and device, electronic equipment and storage medium
JP7475625B2 (en) Method and program for receiving and displaying input in three-dimensional space, and device for receiving and displaying input in three-dimensional space
CN113128304B (en) Image processing method and electronic equipment
US10866688B2 (en) Augmented reality tour guide
JP3224399U (en) Makeup evaluation device and makeup evaluation system
JP3620658B2 (en) Mapping processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080715

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110128

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110323

R150 Certificate of patent or registration of utility model

Ref document number: 4712576

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250