JP5629499B2 - Information processing apparatus, information processing method, and program - Google Patents

Information processing apparatus, information processing method, and program Download PDF

Info

Publication number
JP5629499B2
JP5629499B2 JP2010136649A JP2010136649A JP5629499B2 JP 5629499 B2 JP5629499 B2 JP 5629499B2 JP 2010136649 A JP2010136649 A JP 2010136649A JP 2010136649 A JP2010136649 A JP 2010136649A JP 5629499 B2 JP5629499 B2 JP 5629499B2
Authority
JP
Japan
Prior art keywords
image
display area
images
layout
unit
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
JP2010136649A
Other languages
Japanese (ja)
Other versions
JP2012003433A (en
JP2012003433A5 (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010136649A priority Critical patent/JP5629499B2/en
Publication of JP2012003433A publication Critical patent/JP2012003433A/en
Publication of JP2012003433A5 publication Critical patent/JP2012003433A5/ja
Application granted granted Critical
Publication of JP5629499B2 publication Critical patent/JP5629499B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Studio Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)
  • User Interface Of Digital Computer (AREA)

Description

本発明は、画像レイアウトを行う情報処理装置、情報処理方法、およびプログラムに関する。   The present invention relates to an information processing apparatus, an information processing method, and a program for performing image layout.

従来、画像をレイアウトする場合には、テンプレートを用いてレイアウトを自動的に生成し、自動的に生成されたレイアウトを追加的に修正する場合には、選択画像の縦横変更、拡大・縮小を行う方法がある(例えば、特許文献1参照)。また最近では、複数の画像を1枚の用紙にほぼ隙間無く詰め込んで印刷するサービス「シャッフルプリント(シャッフルプリントは富士フィルム株式会社の商品名)」が開始されている。   Conventionally, when an image is laid out, a layout is automatically generated using a template, and when an automatically generated layout is additionally corrected, the selected image is vertically and horizontally changed and enlarged / reduced. There exists a method (for example, refer patent document 1). Recently, a service “shuffle print (shuffle print is a trade name of Fuji Film Co., Ltd.)” for printing a plurality of images packed on one sheet with almost no gap has been started.

特開平9−190546号公報JP-A-9-190546

デジタルカメラで撮影した写真を、日付ごとに作成されたフォルダごとに、枠を揃えて隙間無く詰め込んで1ページの用紙に印刷したいという要望がある。   There is a desire to print photos taken with a digital camera on a page of paper with a frame aligned for each folder created for each date, with no gaps.

しかしながら、特許文献1では、与えられたテンプレートを用いてレイアウトを自動的に生成するが、任意枚数の画像を1ページに枠を揃えて隙間無く詰め込んでレイアウトするものではない。また、写真の間に隙間があったり、レイアウト枠が揃っていない場合がある。   However, in Patent Document 1, a layout is automatically generated using a given template. However, an arbitrary number of images are not laid out with a frame aligned on one page with no gaps. There are also cases where there are gaps between photographs or layout frames are not aligned.

また、写真のコマ数が、12、16、48、54、64、70のように決まった枚数のときしか1ページに隙間無く詰め込んでレイアウトすることができない場合がある。さらに、先行例では、任意枚数の画像を1ページに隙間無く詰め込んだままの状態で、容易な操作で自動的に生成されたレイアウトを編集して所望のレイアウトを生成することができない。また、自動的に生成したレイアウトだけではユーザの好みに合致しないことがある。また写真の枚数が多くなるとレイアウト候補の組み合わせの数が膨大になるので、自動的にレイアウトを生成するだけではユーザが所望のレイアウトを得ることが困難である。   In addition, there may be a case where a page can be laid out with no gaps only when the number of frames of a photo is a fixed number such as 12, 16, 48, 54, 64, and 70. Furthermore, in the preceding example, a desired layout cannot be generated by editing a layout automatically generated by an easy operation while an arbitrary number of images are packed in one page without any gaps. In addition, the automatically generated layout alone may not match the user's preference. Further, since the number of layout candidate combinations becomes enormous as the number of photographs increases, it is difficult for the user to obtain a desired layout only by automatically generating a layout.

上記の課題に鑑み、本発明は、縦横比が同じ任意枚数の画像を1ページに枠を揃えて隙間無く詰め込んだレイアウト候補を得ることを目的とする。また、枠を揃えて隙間無く1ページに詰め込むという条件を保ったまま、自動的に生成したレイアウトを容易な操作で編集して所望のレイアウトを得ることを目的とする。   In view of the above problems, an object of the present invention is to obtain a layout candidate in which an arbitrary number of images having the same aspect ratio are arranged on one page without any gaps. It is another object of the present invention to obtain a desired layout by editing an automatically generated layout with an easy operation while maintaining the condition that the frames are aligned and packed into one page without a gap.

上記の目的の少なくとも1つを達成する、本発明に係る情報処理装置は、
画像レイアウトを行う情報処理装置であって、
同一の縦横比を有する複数枚の画像の画像枚数を計数する計数手段と、
前記計数手段により計数された前記画像枚数の平方根以上の整数の値をnとして、前記縦横比を有する表示領域に隙間無くレイアウトする際に最小サイズとなり且つ前記縦横比を有する単位画像に対する前記表示領域の一辺のそれぞれの長さとしてn×nの大きさを有する表示領域を設定する設定手段と、
前記計数手段により計数された画像枚数と、前記設定手段により設定された整数の値nとに基づいて、前記単位画像に対して一辺の長さがそれぞれ同じ整数倍である一または複数サイズの拡大画像と前記単位画像とを前記表示領域に隙間無くレイアウトするために必要な、前記一または複数サイズの拡大画像のそれぞれの必要枚数を算出する算出手段と、
前記算出手段により算出された前記一または複数サイズの拡大画像のそれぞれの必要枚数に基づいて、前記一または複数サイズの前記拡大画像と、前記単位画像とを前記表示領域にレイアウトするレイアウト手段と、
を備えることを特徴とする
An information processing apparatus according to the present invention that achieves at least one of the above-described objects,
An information processing apparatus that performs image layout,
Counting means for counting the number of images of a plurality of images having the same aspect ratio;
The display area corresponding to the unit image having the minimum size and the aspect ratio when laid out without any gap in the display area having the aspect ratio, where n is an integer greater than or equal to the square root of the number of images counted by the counting means Setting means for setting a display area having a size of n × n as the length of each side of
Based on the number of images counted by the counting means and the integer value n set by the setting means, one or a plurality of size enlargements whose side lengths are the same integer multiple with respect to the unit image A calculating means for calculating the required number of each of the one or a plurality of enlarged images necessary for laying out the image and the unit image without gaps in the display area;
Layout means for laying out the enlarged image of the one or more sizes and the unit image in the display area based on the required number of each of the enlarged images of the one or more sizes calculated by the calculating means;
Characterized by comprising

本発明によれば、縦横比が同じ任意枚数の画像を1ページに枠を揃えて隙間無く詰め込むレイアウト候補を得ることが可能になる。さらに、枠を揃えて隙間無く1ページに詰め込むという条件を保ったまま、自動的に生成したレイアウトを容易な操作で編集して所望のレイアウトを得ることが可能になる。   According to the present invention, it is possible to obtain a layout candidate in which an arbitrary number of images having the same aspect ratio are arranged on one page without any gaps. Furthermore, it is possible to edit the automatically generated layout with a simple operation and obtain a desired layout while maintaining the condition that the frames are aligned and packed into one page without a gap.

(a)画像レイアウト編集装置100の構成を示すブロック図、(b)画像レイアウト編集プログラムの操作画面150を示す図。(A) The block diagram which shows the structure of the image layout editing apparatus 100, (b) The figure which shows the operation screen 150 of an image layout editing program. 画像レイアウト処理の操作概要を示す図。The figure which shows the operation | movement outline | summary of an image layout process. 画像レイアウト編集処理の全体の流れを示すフローチャート。6 is a flowchart showing the overall flow of image layout editing processing. レイアウト候補の算出を行う処理Aの流れを示すフローチャート。The flowchart which shows the flow of the process A which calculates a layout candidate. レイアウト画像枚数がN=27のとき、本アルゴリズムで得られたレイアウト候補(K、A、B)を示す図。The figure which shows the layout candidate (K, A, B) obtained by this algorithm when the number of layout images is N = 27. 基本領域P(I)を設定する処理Bの流れを示すフローチャート。The flowchart which shows the flow of the process B which sets basic area | region P (I). 基本領域P(I)が設定された状態を示す図。The figure which shows the state in which basic area P (I) was set. 設定された基本領域P(I)に画像を描画する処理Cの流れを示す図。The figure which shows the flow of the process C which draws an image in the set basic area | region P (I). 画像を選択する処理Dの流れを示すフローチャート。The flowchart which shows the flow of the process D which selects an image. 開始領域番号SIに基本領域番号Iをセットする図。The figure which sets basic area number I to start area number SI. 画像を「削除/戻す」処理Eの流れを示すフローチャート。10 is a flowchart showing a flow of processing “deletion / return” of an image. 画像を「削除」する処理が行われる様子を示す図。The figure which shows a mode that the process which "deletes" an image is performed. 画像を「戻す」処理が行われる様子を示す図。The figure which shows a mode that the process of "returning" an image is performed. 選択された画像のシフト可能な位置の算出を行う処理Fの流れを示すフローチャート。The flowchart which shows the flow of the process F which calculates the position which can shift the selected image. 選択された画像のシフト可能な位置の算出の様子を示す図。The figure which shows the mode of the calculation of the position which can shift the selected image. 選択された画像Img[P(I)]をDragしてシフトする処理Gの流れを示すフローチャート。The flowchart which shows the flow of the process G which drags and shifts the selected image Img [P (I)]. 選択された画像がシフトする様子を示す図。The figure which shows a mode that the selected image shifts. 画像を交換する処理Hの流れを示すフローチャート。The flowchart which shows the flow of the process H which replaces | exchanges an image. 画像を交換する様子を示す図。The figure which shows a mode that an image is exchanged. レイアウト候補の算出を行う他の実施例である処理A2の流れを示すフローチャート。The flowchart which shows the flow of the process A2 which is another Example which calculates a layout candidate. レイアウト画像枚数がN=28のとき、本アルゴリズムで得られたレイアウト候補(K、A、B、C、D)の例を示す図。The figure which shows the example of the layout candidate (K, A, B, C, D) obtained by this algorithm when the number of layout images is N = 28. 画面の小さいデジタルカメラに本発明を適用した例を示す図。The figure which shows the example which applied this invention to the digital camera with a small screen.

同一の縦横比を有する複数枚の画像の全てを、同一の縦横比を有する表示領域に重複無く且つ隙間無くレイアウトする情報処理装置(画像レイアウト編集装置)について、以下詳述する。   An information processing apparatus (image layout editing apparatus) that lays out all of a plurality of images having the same aspect ratio in a display area having the same aspect ratio without overlapping and without any gap will be described in detail below.

(第1実施形態)
<画像レイアウト編集装置の構成図>
まず、図1(a)を参照して、画像レイアウト編集装置に適用可能な構成を示したブロック構成について説明する。画像レイアウト編集装置100は、CPU101と、ROM102と、RAM103と、画像記憶部104と、表示部105と、操作部106と、入力イベント処理部107とを備える。画像レイアウト編集装置100は、ROM102に記憶された画像レイアウト編集プログラムをCPU101が読み出して実行することによって動作する。RAM103を用いて、画像レイアウト編集プログラムの実行中に使用される変数や画像データの読み書きが行われる。表示部105は、ディスプレイ等である。ユーザは操作部106(例えば、マウス)によって操作を行い、ユーザのマウス操作は入力イベント処理部107によって、マウスDown、マウスUp、マウスDrag、マウスMoveのいずれであるかが解析される。画像記憶部104には日付ごとに画像フォルダが形成されており、画像フォルダにはそれぞれ何枚かの写真の画像が記憶されている。 <画像レイアウト編集装置の操作画面>
次に、図1(b)を参照して、表示部105に表示される画像レイアウト編集プログラムの操作画面150について説明する。操作画面150には、操作ボタン領域151、操作モード表示領域152、フォルダ表示領域153、メインレイアウト表示領域154、メイン画像枚数表示領域155、「削除/戻す」領域156、サブレイアウト表示領域157、サブ画像枚数表示領域158、およびレイアウト候補表示領域159が配置されている。
(First embodiment)
<Configuration of image layout editing device>
First, a block configuration showing a configuration applicable to the image layout editing device will be described with reference to FIG. The image layout editing apparatus 100 includes a CPU 101, a ROM 102, a RAM 103, an image storage unit 104, a display unit 105, an operation unit 106, and an input event processing unit 107. The image layout editing apparatus 100 operates when the CPU 101 reads and executes an image layout editing program stored in the ROM 102. The RAM 103 is used to read and write variables and image data used during the execution of the image layout editing program. The display unit 105 is a display or the like. The user performs an operation using the operation unit 106 (for example, a mouse), and the user's mouse operation is analyzed by the input event processing unit 107 as to whether the mouse is Down, Mouse Up, Mouse Drag, or Mouse Move. An image folder is formed for each date in the image storage unit 104, and several image images are stored in each image folder. <Operation screen of image layout editing device>
Next, the operation screen 150 of the image layout editing program displayed on the display unit 105 will be described with reference to FIG. The operation screen 150 includes an operation button area 151, an operation mode display area 152, a folder display area 153, a main layout display area 154, a main image number display area 155, a “delete / restore” area 156, a sub layout display area 157, a sub An image number display area 158 and a layout candidate display area 159 are arranged.

操作ボタン領域151には、「↑」ボタン151a、「↓」ボタン151b、「<」ボタン151c、「>」ボタン151d、「SFT」ボタン151e(画像シフトモードに移る/戻る)、「EX」ボタン151f(画像交換モードに移る/戻る)が配置されている。操作モード表示領域152には、操作モードを説明するテキストが表示される。   In the operation button area 151, an “↑” button 151a, a “↓” button 151b, a “<” button 151c, a “>” button 151d, an “SFT” button 151e (moving / returning to the image shift mode), an “EX” button 151f (moving / returning to the image exchange mode) is arranged. In the operation mode display area 152, text describing the operation mode is displayed.

フォルダ表示領域153には、画像記憶部104に形成された画像フォルダのフォルダ名である、Folder−1、Folder−2、・・・、およびFolder−Nが表示される。メインレイアウト表示領域154には、縦横比が同じ任意の枚数の画像が隙間無くレイアウトされて表示される。   In the folder display area 153, Folder-1, Folder-2,..., And Folder-N, which are folder names of image folders formed in the image storage unit 104, are displayed. In the main layout display area 154, an arbitrary number of images having the same aspect ratio are laid out and displayed without a gap.

メイン画像枚数表示領域155には、メインレイアウト表示領域154に表示された画像の枚数が表示される。サブレイアウト表示領域157には、メインレイアウト表示領域154から削除された画像が表示される。サブ画像枚数表示領域158には、サブレイアウト表示領域157に表示された画像の枚数が表示される。   In the main image number display area 155, the number of images displayed in the main layout display area 154 is displayed. In the sub-layout display area 157, an image deleted from the main layout display area 154 is displayed. In the sub image number display area 158, the number of images displayed in the sub layout display area 157 is displayed.

レイアウト候補表示領域159には、レイアウト候補Cand−1、Cand−2、・・・Cand−7が表示される。   In the layout candidate display area 159, layout candidates Cand-1, Cand-2,... Cand-7 are displayed.

<マウスによる基本操作>
フォルダの選択では、マウスを操作して「↑」ボタン151aまたは「↓」ボタン151bを押下すると、選択中のフォルダがハイライトされる。ユーザは、Folder−1、Folder−2、・・・、Folder−Nの中から所望の画像フォルダを選択する。レイアウト候補の選択では、マウスを操作して「<」ボタン151cと「>」ボタン151dを押下すると選択中のレイアウト候補がハイライトされる。ユーザは、Cand−1、Cand−2、・・・Cand−7の中から所望のレイアウト候補を選択する。
<Basic operation with mouse>
In selecting a folder, when the “↑” button 151a or the “↓” button 151b is pressed by operating the mouse, the selected folder is highlighted. The user selects a desired image folder from Folder-1, Folder-2,..., Folder-N. In selecting a layout candidate, when the “<” button 151c and the “>” button 151d are pressed by operating the mouse, the selected layout candidate is highlighted. The user selects a desired layout candidate from Cand-1, Cand-2,... Cand-7.

最初、操作モード表示領域152には「画像選択モード」と表示されている。「SFT」ボタン151eを押下すると、画像選択モードから画像シフトモードに移行する。画像シフトモードに移行すると、操作モード表示領域152には「画像シフトモード」と表示される。画像シフトモードでは、「SFT」ボタン151eと「EX」ボタン151fのみがアクティブになり、「↑」ボタン151aと「↓」ボタン151bと「<」ボタン151cと「>」ボタン151dとはロックされる。画像シフトモードから画像選択モードに戻るには、「SFT」ボタン151eを押下する。画像シフトモードから画像交換モードに移るには、「EX」ボタン151fを押下する。画像交換モードに移行すると、操作モード表示領域152には「画像交換モード」と表示される。画像交換モードでは、「EX」ボタン151fのみがアクティブになり、「↑」ボタン151aと「↓」ボタン151bと「<」ボタン151cと「>」ボタン151dと「SFT」ボタン151eとはロックされる。画像交換モードから画像シフトモードに戻るには、「EX」ボタン151fを押下する。   Initially, “image selection mode” is displayed in the operation mode display area 152. When the “SFT” button 151e is pressed, the mode shifts from the image selection mode to the image shift mode. When the mode shifts to the image shift mode, “image shift mode” is displayed in the operation mode display area 152. In the image shift mode, only the “SFT” button 151e and the “EX” button 151f are active, and the “↑” button 151a, the “↓” button 151b, the “<” button 151c, and the “>” button 151d are locked. . To return from the image shift mode to the image selection mode, the “SFT” button 151e is pressed. To move from the image shift mode to the image exchange mode, the “EX” button 151f is pressed. When the mode is changed to the image exchange mode, “image exchange mode” is displayed in the operation mode display area 152. In the image exchange mode, only the “EX” button 151f is active, and the “↑” button 151a, the “↓” button 151b, the “<” button 151c, the “>” button 151d, and the “SFT” button 151e are locked. . To return from the image exchange mode to the image shift mode, the “EX” button 151f is pressed.

メインレイアウト表示領域154に表示された画像を削除するには、削除したい画像をマウスで選択してからドラッグして「削除/戻す」領域156に移動する。すると、選択された画像がメインレイアウト表示領域154から削除されて、削除された画像はサブレイアウト表示領域157に表示される。サブレイアウト表示領域157に表示された画像をメインレイアウト表示領域154に戻して追加したいには、戻したい画像をマウスで選択してからドラッグして「削除/戻す」領域156に移動する。すると、サブレイアウト表示領域157からメインレイアウト表示領域154に画像が戻されて表示される。メインレイアウト表示領域154内での画像のシフト操作および交換操作もマウスのドラッグによって行われる。   In order to delete an image displayed in the main layout display area 154, the image to be deleted is selected with the mouse and dragged to move to the “delete / restore” area 156. Then, the selected image is deleted from the main layout display area 154, and the deleted image is displayed in the sub-layout display area 157. To return the image displayed in the sub-layout display area 157 to the main layout display area 154 and add it, the user selects the image to be returned with the mouse and drags it to the “delete / restore” area 156. Then, the image is returned from the sub-layout display area 157 to the main layout display area 154 and displayed. An image shift operation and an exchange operation in the main layout display area 154 are also performed by dragging the mouse.

<レイアウト処理の操作概要>
図2(a)〜(h)を参照して、画像レイアウト編集装置100における、レイアウト処理の操作概要を説明する。
<Outline of layout processing operations>
An outline of operation of layout processing in the image layout editing apparatus 100 will be described with reference to FIGS.

画像レイアウト編集プログラムを立ち上げると、画像記憶部104に記憶された画像フォルダおよび各画像フォルダ内の画像ファイルが読み込まれる。読み込んだ画像フォルダ名と各画像フォルダに含まれる画像枚数および画像ファイル名とを記憶して、フォルダ表示領域153に画像フォルダ名を表示する。   When the image layout editing program is started, the image folders stored in the image storage unit 104 and the image files in each image folder are read. The read image folder name, the number of images included in each image folder, and the image file name are stored, and the image folder name is displayed in the folder display area 153.

図2(a)に示すPhase1では、ユーザはマウスで「↑」ボタン151aまたは「↓」ボタン151bを押下して所望の画像フォルダを選択する。画像フォルダが選択されると、選択された画像フォルダがハイライト表示される。   In Phase 1 shown in FIG. 2A, the user presses the “↑” button 151 a or the “↓” button 151 b with the mouse to select a desired image folder. When an image folder is selected, the selected image folder is highlighted.

図2(b)に示すPhase2では、画像フォルダ内の画像を隙間無く詰め込んでレイアウト表示する処理が実行される。まず画像フォルダ内の画像枚数がカウントされてメイン画像枚数表示領域155に表示される。図2(b)に示す例では、画像枚数は67枚である。次に画像フォルダ内の画像ファイルがメインレイアウト表示領域154に隙間無く詰め込まれて表示される。また同じ画像枚数で拡大画像同士を重複することなく且つ隙間無く詰め込むことができるレイアウト候補がレイアウト候補表示領域159に最大7個表示される。   In Phase 2 shown in FIG. 2B, a process of laying out the images in the image folder without gaps and displaying the layout is executed. First, the number of images in the image folder is counted and displayed in the main image number display area 155. In the example shown in FIG. 2B, the number of images is 67. Next, the image files in the image folder are packed and displayed in the main layout display area 154 without any gaps. In addition, a maximum of seven layout candidates that can be stuffed without overlapping the enlarged images with the same number of images are displayed in the layout candidate display area 159.

図2(c)に示すPhase3では、優先順位指定部で指定した優先順位に従って画像を並べ替える処理が実行される。例えば顔の含まれている画像を優先するように優先順位指定部で指定する。すると優先順位指定部に含まれる顔認識によって、顔を含む尤度の高い順に画像F1、F2、F3、F4、F5、F6が選出され、読み込まれた画像が優先順位に従って並べ替えられて表示される。画像に対する優先順位の指定は、顔らしさ以外に、時間順、特定のイベントを含む尤度などに基づいて行われてもよい。   In Phase 3 shown in FIG. 2C, a process of rearranging images according to the priority specified by the priority specifying unit is executed. For example, the priority order designation unit designates the image including the face so as to give priority. Then, the images F1, F2, F3, F4, F5, and F6 are selected in descending order of likelihood of including the face by the face recognition included in the priority order specifying unit, and the read images are rearranged and displayed according to the priority order. The The designation of the priority order for the image may be performed based on time order, likelihood including a specific event, or the like, in addition to the facial appearance.

図2(d)に示すPhase4では、メインレイアウト表示領域154から失敗写真などの不要な画像を削除する処理が実行される。画像を削除するときは、メインレイアウト表示領域154内の不要な画像をマウスで選択して、「削除/戻す」領域156にドラッグする。すると選択された画像がメインレイアウト表示領域154から削除されて、サブレイアウト表示領域157に移動する。削除した画像を戻すときは、サブレイアウト表示領域157内の不要な画像をマウスで選択して、「削除/戻す」領域156にドラッグする。すると選択された画像がサブレイアウト表示領域157からメインレイアウト表示領域154に戻される。   In Phase 4 shown in FIG. 2D, processing for deleting unnecessary images such as failed photos from the main layout display area 154 is executed. When deleting an image, an unnecessary image in the main layout display area 154 is selected with the mouse and dragged to the “delete / return” area 156. Then, the selected image is deleted from the main layout display area 154 and moved to the sub layout display area 157. To restore the deleted image, an unnecessary image in the sub-layout display area 157 is selected with the mouse and dragged to the “delete / restore” area 156. Then, the selected image is returned from the sub-layout display area 157 to the main layout display area 154.

図2(e)に示すPhase5では、同じ画像枚数のもとで、別のレイアウト候補を選択する処理が実行される。ユーザはマウスで「<」ボタン151cまたは「>」ボタン151dを押下して、レイアウト候補表示領域159に表示されたレイアウト候補の中から所望の候補を選択する。   In Phase 5 shown in FIG. 2E, processing for selecting another layout candidate is executed under the same number of images. The user presses the “<” button 151 c or the “>” button 151 d with the mouse, and selects a desired candidate from the layout candidates displayed in the layout candidate display area 159.

図2(f)に示すPhase6では、大きいサイズの画像の配置を編集したり画像を交換したりする処理が実行される。画像シフトモードでは大きいサイズの画像をマウスで選択するとシフト可能な位置が表示され、シフト可能な位置に選択した画像をドラッグすると、大きいサイズの画像がシフトする。画像交換モードでは、画像を選択してドラッグすると、ドラッグ元の画像とドラッグ先の画像とが交換される。   In Phase 6 shown in FIG. 2F, processing for editing the arrangement of large-size images and exchanging images is executed. In the image shift mode, when a large size image is selected with the mouse, a shiftable position is displayed, and when the selected image is dragged to the shiftable position, the large size image is shifted. In the image exchange mode, when an image is selected and dragged, the drag source image and the drag destination image are exchanged.

図2(g)に示すPhase7では、レイアウトが完成した画像を印刷する処理が実行される。すると図2(h)に示すように、任意の枚数の画像が1枚の用紙に隙間無く詰め込んで印刷される。   In Phase 7 shown in FIG. 2G, a process of printing an image with a completed layout is executed. Then, as shown in FIG. 2 (h), an arbitrary number of images are printed on one sheet without any gaps.

<画像レイアウト編集処理の全体の流れ図>
図3を参照して、画像レイアウト編集処理の全体の流れについて説明する。これは、図2のレイアウト処理の操作概要に対応している。
<Overall Flowchart of Image Layout Editing Process>
The overall flow of the image layout editing process will be described with reference to FIG. This corresponds to the operation outline of the layout processing of FIG.

ステップS301において、初期フォルダを設定する。ステップS302において、処理を終了するか否か判定する。終了でなければ(ステップS302;NO)、ステップS303に進む。一方、終了であれば(ステップS302;YES)、処理を終了する。   In step S301, an initial folder is set. In step S302, it is determined whether or not to end the process. If not completed (step S302; NO), the process proceeds to step S303. On the other hand, if it is finished (step S302; YES), the process is finished.

ステップS303において、フォルダ内の画像ファイル数をカウントして変数N0にセットし、画像ファイルを配列Img[0]〜Img[N0−1]に読み込む。   In step S303, the number of image files in the folder is counted and set to a variable N0, and the image files are read into the arrays Img [0] to Img [N0-1].

ステップS304において、メイン画像枚数MNにN0をセットし、サブ画像枚数SNに0をセットし、レイアウト画像枚数NにN0をセットする。   In step S304, N0 is set to the main image number MN, 0 is set to the sub image number SN, and N0 is set to the layout image number N.

ステップS305の処理Aにおいて、与えられたレイアウト画像枚数Nに対してレイアウト候補の組(K、A、B)[i](i=0、1、・・・)を求める。処理Aについては図4、図5を参照して後述する。   In process A of step S305, a set of layout candidates (K, A, B) [i] (i = 0, 1,...) Is obtained for a given number N of layout images. The process A will be described later with reference to FIGS.

ステップS306の処理Bにおいて、メインレイアウト表示領域154とサブレイアウト表示領域157とに画像を配置するための、基本領域P(I)を設定する。処理Bについては図6、図7を参照して後述する。   In process B of step S306, a basic area P (I) for arranging images in the main layout display area 154 and the sub-layout display area 157 is set. The process B will be described later with reference to FIGS.

ステップS307の処理Cにおいて、設定された基本領域P(I)の値に従って画像を描画する。処理Cについては図8を参照して後述する。ステップS308において、選択中の画像フォルダがユーザの所望のフォルダであるか否かが判定される。すなわち、選択中の画像フォルダでOKかどうかをユーザに確認する。選択中の画像フォルダがユーザの所望のフォルダであると判定された場合(ステップS308;YES)、ステップS310に進む。一方、選択中の画像フォルダがユーザの所望のフォルダでないと判定された場合(ステップS308;NO)、ステップS309に進む。   In process C of step S307, an image is drawn according to the set value of the basic area P (I). The process C will be described later with reference to FIG. In step S308, it is determined whether the currently selected image folder is a user's desired folder. That is, the user is confirmed whether the selected image folder is OK. When it is determined that the selected image folder is a folder desired by the user (step S308; YES), the process proceeds to step S310. On the other hand, when it is determined that the currently selected image folder is not the user's desired folder (step S308; NO), the process proceeds to step S309.

ステップS309において、次/前のフォルダを選択して、ステップS303に戻る。ステップS310において、優先順位設定部で設定した優先順位でOKかどうかをユーザに確認する。優先順位設定部で設定した優先順位でよいと判断された場合(ステップS310;YES)、ステップS314に進む。一方、優先順位設定部で設定した優先順位ではよくないと判断された場合(ステップS310;NO)、ステップS311に進む。   In step S309, the next / previous folder is selected, and the process returns to step S303. In step S310, it is confirmed to the user whether the priority order set by the priority order setting unit is OK. When it is determined that the priority order set by the priority order setting unit is acceptable (step S310; YES), the process proceeds to step S314. On the other hand, when it is determined that the priority order set by the priority order setting unit is not good (step S310; NO), the process proceeds to step S311.

ステップS311において、優先順位を設定する。優先順位設定部は、顔やスマイル、時刻や場所などのいずれを優先して画像を並べ替えるかを設定する。   In step S311, a priority order is set. The priority order setting unit sets whether to rearrange the images with priority given to the face, smile, time or place.

ステップS312において、設定された優先順位に従って画像Img[0]〜Img[N0−1]に尤度が付与され、尤度順に画像が並べ替えられる。ステップS313の処理Cにおいて、尤度順に並べ替えられた画像は、ステップS307と同様に基本領域P(I)の値に従って描画される。その後、ステップS310に戻る。   In step S312, likelihoods are assigned to the images Img [0] to Img [N0-1] according to the set priority order, and the images are rearranged in the order of likelihood. In the process C of step S313, the images rearranged in the order of likelihood are drawn according to the value of the basic area P (I) as in step S307. Thereafter, the process returns to step S310.

一方、ステップS314において、メイン画像枚数MNにN0をセットし、サブ画像枚数SNに0をセットする。ステップS315において、メインレイアウト表示領域154に表示されている画像セットがOKかどうかをユーザに確認する。メインレイアウト表示領域154に表示されている画像セットでよいと判断された場合(ステップS315;YES)、ステップS321に進む。一方、メインレイアウト表示領域154に表示されている画像セットでよくないと判断された場合(ステップS315;NO)、ステップS316の処理Dに進む。   On the other hand, in step S314, N0 is set as the main image number MN, and 0 is set as the sub image number SN. In step S315, the user is confirmed whether the image set displayed in the main layout display area 154 is OK. If it is determined that the image set displayed in the main layout display area 154 is acceptable (step S315; YES), the process proceeds to step S321. On the other hand, if it is determined that the image set displayed in the main layout display area 154 is not acceptable (step S315; NO), the process proceeds to process D of step S316.

ステップS316の処理Dにおいて、ユーザはマウスDownによって画像を選択する。処理Dについては図9、図10を参照して後述する。ステップS317の処理Eにおいて、ステップS316で選択された画像をメインレイアウト表示領域154からサブレイアウト表示領域157に移動(削除)したり、選択された画像をサブレイアウト表示領域157からメインレイアウト表示領域154に移動(戻す)したりする。処理Eについては図11、図12、図13を参照して後述する。   In process D of step S316, the user selects an image with the mouse Down. The process D will be described later with reference to FIGS. In process E of step S317, the image selected in step S316 is moved (deleted) from the main layout display area 154 to the sub layout display area 157, or the selected image is moved from the sub layout display area 157 to the main layout display area 154. Move (return) to. The process E will be described later with reference to FIGS. 11, 12, and 13.

ステップS318の処理Aにおいて、画像を削除したり戻したりした結果、新たなレイアウト画像枚数Nに対して、ステップS305と同様にレイアウト候補の組(K、A、B)[i](i=0、1、・・・)を求める。   As a result of deleting or returning the image in the process A of step S318, the layout candidate group (K, A, B) [i] (i = 0) for the new layout image number N as in step S305. , 1, ...).

ステップS319の処理Bにおいて、ステップS306と同様に、メインレイアウト表示領域154とサブレイアウト表示領域157とに画像を配置するための、基本領域P(I)を設定する。ステップS320の処理Cにおいて、ステップS307と同様に、設定された基本領域P(I)の値に従って画像を描画する。その後、ステップS315に戻る。   In process B of step S319, as in step S306, a basic area P (I) for arranging images in the main layout display area 154 and the sub-layout display area 157 is set. In process C of step S320, an image is drawn according to the set value of the basic area P (I), as in step S307. Thereafter, the process returns to step S315.

一方、ステップS321において、優先順位設定部によって設定された優先順位に従ってレイアウト候補を並べ替える。ここではレイアウト候補全体に対して設定した尤度に基づいて、尤度順にレイアウト候補を並べ替えてレイアウト候補表示領域159に表示する。   On the other hand, in step S321, the layout candidates are rearranged according to the priority order set by the priority order setting unit. Here, based on the likelihood set for the entire layout candidate, the layout candidates are rearranged in the order of likelihood and displayed in the layout candidate display area 159.

ステップS322において、選択中のレイアウト候補でOKかどうかユーザに確認する。選択中のレイアウト候補でよいと判断された場合(ステップS322;YES)、ステップS326に進む。一方、選択中のレイアウト候補でよくないと判断された場合(ステップS322;NO)、ステップS323に進む。   In step S322, the user is confirmed whether the layout candidate being selected is OK. If it is determined that the selected layout candidate is acceptable (step S322; YES), the process proceeds to step S326. On the other hand, when it is determined that the selected layout candidate is not acceptable (step S322; NO), the process proceeds to step S323.

ステップS323において、次/前のレイアウト候補を表示して選択する。ステップS324の処理Bにおいて、ステップS306と同様に、メインレイアウト表示領域154とサブレイアウト表示領域157とに画像を配置するための、基本領域P(I)を設定する。   In step S323, the next / previous layout candidate is displayed and selected. In process B of step S324, as in step S306, a basic area P (I) for arranging images in the main layout display area 154 and the sub-layout display area 157 is set.

ステップS325の処理Cにおいて、ステップS307と同様に、設定された基本領域P(I)の値に従って画像を描画する。その後、ステップS322に戻る。   In process C of step S325, an image is drawn according to the set value of the basic area P (I), as in step S307. Thereafter, the process returns to step S322.

一方、ステップS326において、メインレイアウト表示領域154に表示されているレイアウト画像を印刷するかどうかをユーザに確認する。レイアウト画像を印刷すると判断された場合(ステップS326;YES)、ステップS327に進む。ステップS327において、メインレイアウト表示領域154に表示されている画像を印刷する。一方、レイアウト画像を印刷しないと判断された場合(ステップS327;NO)、ステップS328に進む。   On the other hand, in step S326, the user is confirmed whether or not to print the layout image displayed in the main layout display area 154. If it is determined to print the layout image (step S326; YES), the process proceeds to step S327. In step S327, the image displayed in the main layout display area 154 is printed. On the other hand, if it is determined not to print the layout image (step S327; NO), the process proceeds to step S328.

ステップS328において、画像をシフトするかどうかをユーザに確認する。画像をシフトしないと判断された場合(ステップS328;NO)、ステップS302に戻る。一方、画像をシフトすると判断された場合(ステップS328;YES)、ステップS329に進む。   In step S328, confirmation is made with the user as to whether or not to shift the image. If it is determined not to shift the image (step S328; NO), the process returns to step S302. On the other hand, when it is determined to shift the image (step S328; YES), the process proceeds to step S329.

ステップS329の処理Fにおいて、選択中の画像のシフト可能位置を算出して表示する。処理Fについては図14、図15を参照して後述する。ステップS330の処理Gにおいて、選択中の画像をマウスDragしてシフトする(図17(a)〜(b))。するとマウス操作に応じて、基本領域P(I)の値が書き換えられる(図16、図17(c)〜(d))。処理Gについては図16、図17を参照して後述する。   In process F of step S329, the shiftable position of the currently selected image is calculated and displayed. The process F will be described later with reference to FIGS. In process G of step S330, the currently selected image is shifted by dragging the mouse (FIGS. 17A to 17B). Then, the value of the basic area P (I) is rewritten according to the mouse operation (FIGS. 16 and 17C to 17D). The process G will be described later with reference to FIGS.

ステップS331の処理Cにおいて、ステップS307と同様に、設定された基本領域P(I)の値に従って画像を描画する(図17(e))。   In process C of step S331, an image is drawn according to the set value of the basic area P (I), as in step S307 (FIG. 17E).

ステップS332において、画像を交換するかどうかをユーザに確認する。画像を交換しないと判断された場合(ステップS332;NO)、ステップS326に戻る。一方、画像を交換すると判断された場合(ステップS332;YES)、ステップS333に進む。   In step S332, the user is confirmed as to whether or not to exchange images. If it is determined not to replace the image (step S332; NO), the process returns to step S326. On the other hand, when it is determined that the images are to be exchanged (step S332; YES), the process proceeds to step S333.

ステップ333の処理Dにおいて、ステップS316と同様に、ユーザがマウスDownによって交換元の画像を選択する。ステップS334の処理Hにおいて、ユーザがマウスDragして交換先の画像を選択し(図19(a))、マウスUpによって交換元の画像と交換先の画像を入れ替える(図19)。処理Hについては図18、図19を参照して後述する。   In step D of step 333, as in step S316, the user selects an exchange source image with the mouse Down. In process H of step S334, the user drags the mouse to select an exchange destination image (FIG. 19 (a)), and exchanges the exchange source image and the exchange destination image with the mouse Up (FIG. 19). The process H will be described later with reference to FIGS.

ステップS335の処理Cにおいて、ステップS307と同様に、設定された基本領域P(I)の値に従って画像を描画する(図19(c))。その後、ステップS332に戻る。   In the process C of step S335, an image is drawn according to the set value of the basic area P (I) as in step S307 (FIG. 19C). Thereafter, the process returns to step S332.

以上で、画像レイアウト編集処理の全体の流れの説明が終了する。以下、処理A、処理B、…、処理Gの各処理の詳細について説明する。   This is the end of the description of the overall flow of the image layout editing process. Hereinafter, details of each of the processes A, B,..., G will be described.

<レイアウト候補の算出:処理A>
まず、図4を参照しては、ステップS305におけるレイアウト候補の算出を行う処理Aの流れを説明する。このアルゴリズムでは、表示領域と縦横比が同じN枚の画像を、その表示領域に隙間無く詰め込むときに、最小画像に対して一辺が整数倍(ここでは2倍、3倍)の画像をそれぞれ何枚用いればよいかを算出する。ここで、メインレイアウト表示領域154における各基本領域P(I)の大きさが、最小画像のサイズである。
<Calculation of layout candidates: Process A>
First, with reference to FIG. 4, the flow of process A for calculating layout candidates in step S305 will be described. In this algorithm, when N images having the same aspect ratio as the display area are packed in the display area without any gaps, what is the number of images each having an integer multiple (here, double or triple) of the minimum image? Calculate whether or not to use one. Here, the size of each basic area P (I) in the main layout display area 154 is the size of the minimum image.

ステップS401において、レイアウト画像枚数Nを計数する。ステップS402において、√N以上の最小の自然数を求めて変数Kにセットする。ここでKは、最小画像の一辺の長さを1としたときの表示領域の一辺の長さである。すなわち、最小画像のサイズが縦H×横Wであるとしたとき、縦KH×横KWのサイズの表示領域を設定する。ただし表示領域の大きさを示す変数Kは、必ずしも計数された画像枚数Nの平方根以上の最小の整数である必要はなく、画像枚数Nの平方根以上の整数であればよい。その整数が値nである場合、n×nの大きさを有する表示領域を設定する。   In step S401, the number N of layout images is counted. In step S402, a minimum natural number equal to or greater than √N is obtained and set in the variable K. Here, K is the length of one side of the display area when the length of one side of the minimum image is 1. That is, when the minimum image size is H × W, a display area having a size of KH × WKW is set. However, the variable K indicating the size of the display area is not necessarily a minimum integer equal to or larger than the square root of the number N of counted images, and may be an integer equal to or larger than the square root of the number N of images. When the integer is the value n, a display area having a size of n × n is set.

ステップS403において、計数された画像枚数Nと、設定された変数Kの値とに基づいて、単位画像に対して一辺の長さがそれぞれ同じ整数k倍(k=2、3、…、M)である一または複数サイズの拡大画像と単位画像とを表示領域に隙間無くレイアウトするために必要な、一または複数サイズの拡大画像のそれぞれの必要枚数を算出する。ここでは、例えば拡大画像のサイズが2×2(k=2)および3×3(k=3)の2種類である場合を考える。具体的には、D=K×K−3A−8B−Nとセットする。ここで、Dは詰め込み判定関数であり、Aは一辺の長さが最小画像の2倍の画像の枚数、Bは一辺の長さが最小画像の3倍の画像の枚数である。すなわち、上記整数の二乗から、単位画像に対して一辺の長さがそれぞれ2倍の拡大画像の枚数の3倍(2−1倍)の値と、単位画像に対して一辺の長さがそれぞれ3倍の拡大画像の枚数の8倍(3−1倍)の値と、計数された画像枚数とを減算する。値が零となる、2×2(k=2)の拡大画像および3×3(k=3)の拡大画像の組み合わせを算出する。表示領域の一辺の長さKに対して、詰め込み判定関数D=0となる自然数A、Bが存在し、かつ、図5(a)〜(e)のように詰め込んだときに大きい画像同士が重ならないならば(K、A、B)の組はレイアウト候補となる。なお、さらに他のサイズの拡大画像も存在する場合は、詰め込み判定関数Dは、D=K×K−Σ[k=2、3、・・・、M](k−1)G(k)−Nとなる。上述した例では、G(2)がAに相当し、G(3)がBに相当する。この一般形については後述する。 In step S403, based on the counted number N of images and the value of the set variable K, the length of one side of the unit image is the same integer k times (k = 2, 3,..., M). The necessary number of each of the enlarged images of one or a plurality of sizes necessary for laying out the enlarged image of one or a plurality of sizes and the unit image without a gap in the display area is calculated. Here, for example, consider a case where there are two types of enlarged image sizes of 2 × 2 (k = 2) and 3 × 3 (k = 3). Specifically, D = K × K-3A-8B-N is set. Here, D is a stuffing determination function, A is the number of images whose side length is twice the minimum image, and B is the number of images whose side length is three times the minimum image. That is, from the square of the above-mentioned integer, the length of one side of the unit image is three times (2 2 -1 times) the number of enlarged images, each of which is twice the length of the unit image. The value of 8 times (3 2 −1 times) the number of 3 times magnified images and the counted number of images are subtracted. A combination of a 2 × 2 (k = 2) enlarged image and a 3 × 3 (k = 3) enlarged image with a value of zero is calculated. There are natural numbers A and B for which the stuffing determination function D = 0 with respect to the length K of one side of the display area, and when the images are stuffed as shown in FIGS. If they do not overlap, the set (K, A, B) is a layout candidate. If there are still enlarged images of other sizes, the stuffing determination function D uses D = K × K−Σ [k = 2, 3,..., M] (k 2 −1) G (k ) -N. In the example described above, G (2) corresponds to A and G (3) corresponds to B. This general form will be described later.

ステップS404において、表示領域の一辺の長さKに対して、詰め込み判定関数D=0となる自然数A、Bがあるかどうかを判定する。詰め込み判定関数D=0となる自然数A、Bがあると判定された場合(ステップS404;YES)、ステップS405に進む。一方、詰め込み判定関数D=0となる自然数A、Bがないと判定された場合(ステップS404;NO)、ステップS408に進む。   In step S404, it is determined whether or not there are natural numbers A and B for which the stuffing determination function D = 0 with respect to the length K of one side of the display area. When it is determined that there are natural numbers A and B that satisfy the stuffing determination function D = 0 (step S404; YES), the process proceeds to step S405. On the other hand, when it is determined that there are no natural numbers A and B that satisfy the stuffing determination function D = 0 (step S404; NO), the process proceeds to step S408.

ステップS405において、大きいサイズの画像(一辺の長さが最小画像の2倍の画像:A枚、3倍の画像:B枚)同士が重ならないかどうか判定する。大きいサイズの画像同士が重なると判定された場合(ステップS405;NO)、ステップS407に進む。一方、大きいサイズの画像同士が重ならないと判定された場合(ステップS405;YES)、ステップS406に進む。ステップS405において、重なり判定は次のように行う。まず、表示領域の左上から右下に向かうラスタースキャン方式で一辺の長さが最小画像の2倍の画像をA枚配置する。次に、表示領域の右下から左上に向かうラスタースキャン方式で一辺の長さが最小画像の3倍の画像をB枚配置する。このように配置したときに、これらの一辺の長さが最小画像の2倍の画像をA枚と、一辺の長さが最小画像の3倍の画像をB枚とが何れも重ならないときに、ステップS405においてYESと判定する。   In step S405, it is determined whether or not large-sized images (images each having a side length twice that of the smallest image: A sheet, three times image: B sheet) do not overlap each other. When it is determined that the large-size images overlap (step S405; NO), the process proceeds to step S407. On the other hand, when it is determined that the large-size images do not overlap (step S405; YES), the process proceeds to step S406. In step S405, the overlap determination is performed as follows. First, A sheets of images whose side length is twice the minimum image are arranged by a raster scan method from the upper left to the lower right of the display area. Next, B images having a side length three times the minimum image are arranged by a raster scan method from the lower right to the upper left of the display area. When these arrangements are made, the A image having twice the one side length of the minimum image and the B image having one side length three times the minimum image do not overlap. In step S405, YES is determined.

ステップS406において、(K、A、B)の組をレイアウト候補として記憶する。ステップS407において、より多くのレイアウト候補を得たいかどうか判定する。より多くのレイアウト候補を得たいと判定された場合(ステップS407;YES)、ステップS408に進む。一方、より多くのレイアウト候補を得る必要がないと判定された場合(ステップS407;NO)、処理を終了する。   In step S406, the set (K, A, B) is stored as a layout candidate. In step S407, it is determined whether more layout candidates are to be obtained. If it is determined that more layout candidates are desired (step S407; YES), the process proceeds to step S408. On the other hand, when it is determined that it is not necessary to obtain more layout candidates (step S407; NO), the process ends.

ステップS408において、表示画面の一辺の長さKをインクリメントして、ステップS403に戻る。なお、必ずしもインクリメントする必要はなく、所定の整数を加算してもよい。   In step S408, the length K of one side of the display screen is incremented, and the process returns to step S403. Note that it is not always necessary to increment, and a predetermined integer may be added.

ここで、図5(a)〜(e)は、レイアウト画像枚数がN=27のときに、本アルゴリズムで得られたレイアウト候補(K、A、B)を示す。図5(a)は、レイアウト候補(K、A、B)=(6、3、0)の場合である。図5(b)は、レイアウト候補(K、A、B)=(7、2、2)の場合である。図5(c)は、レイアウト候補(K、A、B)=(8、7、2)の場合である。図5(d)は、レイアウト候補(K、A、B)=(9、10、3)の場合である。図5(e)は、レイアウト候補(K、A、B)=(9、2、6)の場合である。   Here, FIGS. 5A to 5E show layout candidates (K, A, B) obtained by this algorithm when the number of layout images is N = 27. FIG. 5A shows a case where layout candidates (K, A, B) = (6, 3, 0). FIG. 5B shows a case where layout candidates (K, A, B) = (7, 2, 2). FIG. 5C shows a case where layout candidates (K, A, B) = (8, 7, 2). FIG. 5D shows a case where layout candidates (K, A, B) = (9, 10, 3). FIG. 5E shows a case where layout candidates (K, A, B) = (9, 2, 6).

本アルゴリズムでは、大きいサイズの画像として一辺の長さが最小画像の2倍、3倍の画像を用いているが、画像の枚数が2、3、5枚のときは隙間無く詰め込むことができない。そこでN<6のときは例外処理として、図5(f1)〜(f5)に示すように、何枚かの画像を90度回転して詰め込んだり、図5(g2)、(g3)、(g5)のように同じ画像を2回使って詰め込む。   In this algorithm, an image having a side length twice or three times that of the minimum image is used as a large size image. However, when the number of images is 2, 3, or 5, the images cannot be packed without a gap. Therefore, when N <6, as an exception process, as shown in FIGS. 5 (f1) to (f5), as shown in FIGS. 5 (f1) to (f5), a number of images are rotated 90 degrees and packed, or (g2), (g3), ( The same image is used twice as in g5).

以上がレイアウト候補の算出を行う処理Aの詳細である。   The above is the details of the process A for calculating the layout candidate.

<基本領域P(I)の設定:処理B>
次に、図6および図7を参照して、基本領域P(I)を設定する処理Bの流れを説明する。この処理で用いるレイアウト候補(K、A、B)は、処理A(図4)のアルゴリズムにおいてレイアウト画像枚数Nにメイン画像枚数MNをセットして算出する。
<Setting of Basic Area P (I): Process B>
Next, with reference to FIG. 6 and FIG. 7, the flow of the process B for setting the basic area P (I) will be described. The layout candidates (K, A, B) used in this process are calculated by setting the main image number MN to the layout image number N in the algorithm of the process A (FIG. 4).

ステップS601において、すべての基本領域番号Iに対して、基本領域P(I)の値を初期化する(P(I)←−1)。すなわち、P(I)を−1で初期化する。ステップS602において、メインレイアウト表示領域154をK×K個の基本領域P(I)に分割する(図7(a))。メインレイアウト表示領域154における各基本領域P(I)の大きさが、最小サイズの画像となる。次に、図7(c)に示すように、メインレイアウト表示領域154内の基本領域P(I)に値を設定する。   In step S601, the value of the basic area P (I) is initialized for all the basic area numbers I (P (I) ← −1). That is, P (I) is initialized with -1. In step S602, the main layout display area 154 is divided into K × K basic areas P (I) (FIG. 7A). The size of each basic area P (I) in the main layout display area 154 is the minimum size image. Next, as shown in FIG. 7C, values are set in the basic area P (I) in the main layout display area 154.

まずステップS603において、メインレイアウト表示領域154の左上から右下に向かうラスタスキャン方式で、2×2の大きさの4倍領域をA個設定し、4倍領域に数値を0から順番にセットする。4倍領域内の4個の基本領域P(I)には4倍領域に設定した数値と同じ数値をセットする。本発明において、「表示領域の左上から右下に向かうラスタースキャン方式で領域を設定」とは、例えば図7(a)において、P(0)、P(1)、・・・、P(6)、P(7)、P(8)、・・・、のような順番で領域を設定することを言う。   First, in step S603, A is set for a quadruple area of 2 × 2 size by a raster scan method from the upper left to the lower right of the main layout display area 154, and numerical values are set in the quadruple area in order from 0. . In the four basic areas P (I) in the quadruple area, the same numerical values as those set in the quadruple area are set. In the present invention, “setting the area by the raster scan method from the upper left to the lower right of the display area” means, for example, P (0), P (1),..., P (6 in FIG. ), P (7), P (8),...

次にステップS604において、メインレイアウト表示領域154の右下から左上に向かうラスタスキャン方式で、3×3の大きさの9倍領域をB個設定し、9倍領域に数値を順番にセットする。本発明において、「表示領域の右下から左上に向かうラスタースキャン方式で領域を設定」とは、例えば図7(a)において、P(48)、P(47)、・・・、P(42)、P(41)、P(40)、・・・、のような順番で領域を設定することを言う。   Next, in step S604, B 9 × 3 × 3 size areas are set by the raster scan method from the lower right to the upper left of the main layout display area 154, and numerical values are set in the 9 × area in order. In the present invention, “setting the area by a raster scan method from the lower right to the upper left of the display area” means, for example, P (48), P (47),. ), P (41), P (40),...

さらにステップS605において、残りのMN−A−B個の基本領域P(I)にも数値を順番にセットする。   In step S605, numerical values are also set in order in the remaining MN-A-B basic areas P (I).

また、ステップS606において、サブレイアウト表示領域157に、SN枚の画像を配置するためにSN個以上の基本領域P(I)を設定する(図7(b))。ステップS607において、図7(d)に示すように、サブレイアウト表示領域157のSN個の基本領域P(I)にも順番に数値をセットする。   In step S606, SN or more basic areas P (I) are set in the sub-layout display area 157 in order to arrange SN images (FIG. 7B). In step S607, as shown in FIG. 7D, numerical values are also set in order in the SN basic areas P (I) of the sub-layout display area 157.

図7(c)、(d)で示すように、P(0)=0、P(1)=0、P(2)=1、P(3)=1、P(4)=4、P(5)=5、P(6)=6、P(7)=0、P(8)=0、P(9)=1、P(10)=1、P(11)=7、・・・のように基本領域の値がセットされる。   7 (c) and 7 (d), P (0) = 0, P (1) = 0, P (2) = 1, P (3) = 1, P (4) = 4, P (5) = 5, P (6) = 6, P (7) = 0, P (8) = 0, P (9) = 1, P (10) = 1, P (11) = 7,. The value of the basic area is set like

以上が基本領域P(I)を設定する処理Bの詳細である。   The above is the details of the process B for setting the basic area P (I).

<画像の描画:処理C>
図8を参照して、設定された基本領域P(I)に画像を描画する処理Cの流れを説明する。まず、メインレイアウト表示領域154内の基本領域P(I)の値に応じて画像を描画する(図8(a)〜(b))。ここでは最初に、隣接する3×3の9つの基本領域P(I)が同じ値Jである9倍領域に対しては、一辺の長さが最小画像の3倍の画像Img[J]を描画する。次に、隣接する2×2の4つの基本領域P(I)が同じ値Jである4倍領域に対しては、一辺の長さが最小画像の2倍の画像Img[J]を描画する。最後に、残りの基本領域P(I)=Jに対して、最小画像サイズの画像Img[J]を描画する。
<Image drawing: Process C>
With reference to FIG. 8, the flow of process C for drawing an image in the set basic area P (I) will be described. First, an image is drawn according to the value of the basic area P (I) in the main layout display area 154 (FIGS. 8A to 8B). Here, first, an image Img [J] whose side length is three times the minimum image is applied to a 9 × region in which nine adjacent 3 × 3 basic regions P (I) have the same value J. draw. Next, an image Img [J] whose side length is twice the minimum image is drawn in a quadruple region in which four adjacent 2 × 2 basic regions P (I) have the same value J. . Finally, the image Img [J] having the minimum image size is drawn for the remaining basic area P (I) = J.

さらに、サブレイアウト表示領域157内の基本領域P(I)の値に応じて画像を描画する(図8(c)〜(d))。ここでは基本領域P(I)=Jに対して、画像Img[J]を描画する。このようにして、一または複数サイズの拡大画像のそれぞれの必要枚数に基づいて、拡大画像と単位画像とを表示領域にレイアウトすることができる。   Further, an image is drawn according to the value of the basic area P (I) in the sub-layout display area 157 (FIGS. 8C to 8D). Here, the image Img [J] is drawn for the basic region P (I) = J. In this manner, the enlarged image and the unit image can be laid out in the display area based on the required number of enlarged images of one or a plurality of sizes.

以上が、設定された基本領域P(I)に画像を描画する処理Cの詳細である。   The above is the details of the process C for drawing an image in the set basic region P (I).

<画像の選択:処理D>
図9および図10を参照して、画像を選択する処理Dの流れを説明する。まず、ステップS901において、マウスDownした位置(X、Y)を検出する。
<Image selection: Process D>
With reference to FIGS. 9 and 10, the flow of the process D for selecting an image will be described. First, in step S901, the position (X, Y) where the mouse is down is detected.

ステップS902において、マウスDownした位置(X、Y)がメインレイアウト表示領域154内の領域P(I)内にあるか否かが判断される。位置(X、Y)がメインレイアウト表示領域154内の領域P(I)内にあると判断された場合(ステップS902;YES)、ステップS903に進む。一方、位置(X、Y)がメインレイアウト表示領域154内の領域P(I)内にないと判断された場合(ステップS902;NO)、ステップS905に進む。   In step S <b> 902, it is determined whether or not the position (X, Y) where the mouse is down is in the area P (I) in the main layout display area 154. If it is determined that the position (X, Y) is in the area P (I) in the main layout display area 154 (step S902; YES), the process proceeds to step S903. On the other hand, when it is determined that the position (X, Y) is not in the area P (I) in the main layout display area 154 (step S902; NO), the process proceeds to step S905.

ステップS903において、開始領域番号SIに基本領域番号Iをセットする。ステップS904において、位置(X、Y)にある画像の大きさと範囲を取得する。その後、処理が終了する。   In step S903, the basic area number I is set as the start area number SI. In step S904, the size and range of the image at the position (X, Y) are acquired. Thereafter, the process ends.

また、ステップS905において、マウスDownした位置(X、Y)がサブレイアウト表示領域157内の領域P(I)内にあるか否かが判断される。位置(X、Y)がサブレイアウト表示領域157内の領域P(I)内にあると判断された場合(ステップS905;YES)、ステップS906に進む。一方、位置(X、Y)がサブレイアウト表示領域157内の領域P(I)内にないと判断された場合(ステップS905;NO)、処理が終了する。ステップS906において、開始領域番号SIに基本領域番号Iをセットする。その後、処理が終了する。   In step S 905, it is determined whether or not the position (X, Y) where the mouse is down is in the area P (I) in the sub-layout display area 157. When it is determined that the position (X, Y) is in the area P (I) in the sub-layout display area 157 (step S905; YES), the process proceeds to step S906. On the other hand, when it is determined that the position (X, Y) is not in the area P (I) in the sub-layout display area 157 (step S905; NO), the process ends. In step S906, the basic area number I is set as the start area number SI. Thereafter, the process ends.

図10(a)のようなメインレイアウト表示領域154内の矢印の位置でマウスDownが検出されると、開始領域番号SIに矢印が示す番号である32がセットされる。同様に、図10(b)のようなサブレイアウト表示領域157内の矢印の位置でマウスDownが検出されると、開始領域番号SIに矢印が示す番号である52がセットされる。   When the mouse Down is detected at the position of the arrow in the main layout display area 154 as shown in FIG. 10A, 32, which is the number indicated by the arrow, is set to the start area number SI. Similarly, when the mouse Down is detected at the position of the arrow in the sub-layout display area 157 as shown in FIG. 10B, 52, which is the number indicated by the arrow, is set to the start area number SI.

以上が画像を選択する処理Dの詳細である。   The above is the details of the process D for selecting an image.

<画像を「削除/戻す」:処理E>
図11、図12、および図13を参照して、画像を「削除/戻す」処理Eの流れを説明する。
<“Delete / Restore” image: Process E>
With reference to FIGS. 11, 12, and 13, the flow of the process “deleting / returning” an image will be described.

ステップS1101において、マウスUpの位置(X、Y)を検出する。ステップS1102において、マウスUpの位置が「削除/戻す」領域156内にあるかどうかを判定する。マウスUpの位置が「削除/戻す」領域156内にあると判定された場合(ステップS1102;YES)、ステップS1103に進む。。一方、マウスUpの位置が「削除/戻す」領域156内にないと判定された場合(ステップS1102;NO)、処理を終了する。   In step S1101, the position (X, Y) of the mouse Up is detected. In step S 1102, it is determined whether or not the position of the mouse Up is within the “delete / return” area 156. If it is determined that the position of the mouse Up is within the “delete / return” area 156 (step S1102; YES), the process proceeds to step S1103. . On the other hand, if it is determined that the position of the mouse Up is not within the “delete / return” area 156 (step S1102; NO), the process is terminated.

ステップS1103において、処理Dで求められた開始領域番号SIに対応する基本領域P(SI)がメインレイアウト表示領域154内にあるかどうか判定する。基本領域P(SI)がメインレイアウト表示領域154内にあると判定された場合(ステップS1103;YES)、ステップS1104に進む。一方、基本領域P(SI)がメインレイアウト表示領域154内にないと判定された場合(ステップS1103;NO)、ステップS1107に進む。   In step S1103, it is determined whether or not the basic area P (SI) corresponding to the start area number SI obtained in the process D is in the main layout display area 154. When it is determined that the basic area P (SI) is within the main layout display area 154 (step S1103; YES), the process proceeds to step S1104. On the other hand, when it is determined that the basic area P (SI) is not in the main layout display area 154 (step S1103; NO), the process proceeds to step S1107.

ステップS1104において、画像Img[P(SI)]をメインレイアウト表示領域154から削除して、それをサブレイアウト表示領域157の最後の画像Img[MN+SN−1]とする。   In step S1104, the image Img [P (SI)] is deleted from the main layout display area 154, and is set as the last image Img [MN + SN-1] in the sub-layout display area 157.

ステップS1105において、メイン画像枚数MNをディクリメントし、サブ画像枚数SNをインクリメントする。ステップS1106において、レイアウト画像枚数Nにメイン画像枚数MNをセットする。その後、処理を終了する。   In step S1105, the main image number MN is decremented and the sub image number SN is incremented. In step S1106, the main image number MN is set as the layout image number N. Thereafter, the process ends.

また、ステップS1107において、処理Dで求められた開始領域番号SIに対応する基本領域P(SI)がサブレイアウト表示領域157内にあるかどうか判定する。基本領域P(SI)がサブレイアウト表示領域157内にあると判定された場合(ステップS1107;YES)、ステップS1108に進む。一方、基本領域P(SI)がサブレイアウト表示領域157内にないと判定された場合(ステップS1107;NO)、処理を終了する。   In step S1107, it is determined whether or not the basic area P (SI) corresponding to the start area number SI obtained in process D is in the sub-layout display area 157. If it is determined that the basic area P (SI) is within the sub-layout display area 157 (step S1107; YES), the process proceeds to step S1108. On the other hand, if it is determined that the basic area P (SI) is not within the sub-layout display area 157 (step S1107; NO), the process is terminated.

ステップS1108において、画像Img[P(SI)]をサブレイアウト表示領域157から削除して、それをメインレイアウト表示領域154の最初の画像Img[0]とする。   In step S1108, the image Img [P (SI)] is deleted from the sub-layout display area 157 and is set as the first image Img [0] in the main layout display area 154.

ステップS1109において、メイン画像枚数MNをインクリメントし、サブ画像枚数SNをディクリメントする。ステップS1110において、レイアウト画像枚数Nにメイン画像枚数MNをセットする。その後、処理を終了する。   In step S1109, the main image number MN is incremented and the sub image number SN is decremented. In step S1110, the main image number MN is set as the layout image number N. Thereafter, the process ends.

図12は画像を「削除」する処理が行われる様子を示す図である。図の矢印で示すように、マウスでメインレイアウト表示領域154内の画像Img[2]を選択して「削除/戻す」領域156にDragする。すると図12(a)の画像Img[2]がメインレイアウト表示領域154から削除されて、図12(b)のサブレイアウト表示領域157の画像Img[38]となる。このとき、メイン画像枚数表示領域155のメイン画像枚数MNは、27から26にディクリメントされ、サブ画像枚数表示領域158のサブ画像枚数SNは、12から13にインクリメントされる。   FIG. 12 is a diagram illustrating a state in which the process of “deleting” an image is performed. As indicated by the arrows in the figure, the image Img [2] in the main layout display area 154 is selected with the mouse and dragged to the “delete / restore” area 156. Then, the image Img [2] in FIG. 12A is deleted from the main layout display area 154 and becomes the image Img [38] in the sub-layout display area 157 in FIG. At this time, the main image number MN in the main image number display area 155 is decremented from 27 to 26, and the sub image number SN in the sub image number display area 158 is incremented from 12 to 13.

一方、図13は画像を「戻す」処理が行われる様子を示す図である。図の矢印で示すように、マウスでサブレイアウト表示領域157内の画像Img[28]を選択して「削除/戻す」領域156にDragする。すると図13(a)の画像Img[28]がサブレイアウト表示領域157から削除されて、図13(b)のメインレイアウト表示領域154の画像Img[0]となる。このとき、メイン画像枚数表示領域155のメイン画像枚数MNは、19から20にインクリメントされ、サブ画像枚数表示領域158のサブ画像枚数SNは、20から19にディクリメントされる。   On the other hand, FIG. 13 is a diagram showing a state in which an image “returning” process is performed. As indicated by the arrows in the figure, the image Img [28] in the sub-layout display area 157 is selected with the mouse and dragged to the “delete / restore” area 156. Then, the image Img [28] in FIG. 13A is deleted from the sub-layout display area 157 and becomes the image Img [0] in the main layout display area 154 in FIG. At this time, the main image number MN in the main image number display area 155 is incremented from 19 to 20, and the sub image number SN in the sub image number display area 158 is decremented from 20 to 19.

以上が画像を「削除/戻す」処理Eの詳細である。   The above is the details of the process “deletion / return” of the image.

<画像のシフト:処理F〜G>
図14、図15、図16、及び図17を参照して、画像のシフトを説明する。
<Image Shift: Processing FG>
Image shift will be described with reference to FIGS. 14, 15, 16, and 17. FIG.

まず、図14および図15を参照して、指定された画像のシフト可能な位置の算出を行う処理Fの流れを説明する。ユーザにより指定された一または複数サイズの拡大画像または単位画像のうちの1つを縦横方向にシフトした場合に、シフト先に存在する他の拡大画像または単位画像の全てを包含する位置を、シフト可能な表示領域における位置として算出する。   First, with reference to FIG. 14 and FIG. 15, the flow of the process F for calculating the shiftable position of the designated image will be described. When one of the enlarged images or unit images of one or more sizes specified by the user is shifted in the vertical and horizontal directions, the position including all of the other enlarged images or unit images existing at the shift destination is shifted. Calculate as a possible position in the display area.

ステップS1401において、マウスDownの位置(X、Y)を検出し、位置(X、Y)の基本領域番号Iを求め、画像Img[P(I)]の矩形を求める(図15(a)、(b))。   In step S1401, the position (X, Y) of the mouse Down is detected, the basic area number I of the position (X, Y) is obtained, and the rectangle of the image Img [P (I)] is obtained (FIG. 15 (a), (B)).

ステップS1402において、画像と画像との境界からなる矩形で、選択した矩形を含み、他の矩形と交わらず、選択した矩形と幅が同じ矩形を探す(図15(c))。   In step S1402, a rectangle including the boundary between the images, including the selected rectangle, is searched for a rectangle having the same width as the selected rectangle without intersecting with the other rectangles (FIG. 15C).

ステップS1403において、画像と画像との境界からなる矩形で、選択した矩形を含み、他の矩形と交わらず、選択した矩形と高さが同じ矩形を探す(図15(d))。   In step S1403, a rectangle including the boundary between images and including the selected rectangle is searched for a rectangle having the same height as the selected rectangle without intersecting with other rectangles (FIG. 15D).

ステップS1404において、ステップS1402およびステップS1403で得られた矩形の辺のうち、選択した矩形に含まれない辺をシフト可能位置とする(図15(e))。   In step S1404, among the sides of the rectangle obtained in steps S1402 and S1403, a side not included in the selected rectangle is set as a shiftable position (FIG. 15E).

すなわち、図15(a)の位置でマウスDownすると、画像Img[3]がシフト可能位置として、図15(f)のL1、R1、U1、U2が得られる(シフト可能位置算出)。   That is, when the mouse is down at the position shown in FIG. 15A, the image Img [3] can be shifted as L1, R1, U1, and U2 shown in FIG. 15F (shiftable position calculation).

以上が画像のシフト可能な位置の算出を行う処理Fの詳細である。   The above is the details of the process F for calculating the shiftable position of the image.

次に、図16および図17を参照して、選択された画像Img[P(I)]をDragしてシフトを実行する処理Gの流れを説明する。   Next, with reference to FIG. 16 and FIG. 17, the flow of the process G for dragging the selected image Img [P (I)] and executing a shift will be described.

ステップS1601において、図17(a)の矢印で示すように画像をマウスDragする。画像をマウスDragしたと判断された場合(ステップS1601;YES)、ステップS1602に進む。一方、画像をマウスDragしていないと判断された場合(ステップS1601;NO)、処理を終了する。   In step S1601, the image is dragged with the mouse as indicated by the arrow in FIG. If it is determined that the mouse has been dragged (step S1601; YES), the process proceeds to step S1602. On the other hand, if it is determined that the image is not dragged with the mouse (step S1601; NO), the process is terminated.

ステップS1602において、Drag中のマウス位置(X、Y)がシフト可能位置であるL1、R1、U1、U2のいずれかの一定範囲内に近づいたかどうかを判定する。Drag中のマウス位置(X、Y)がシフト可能位置のいずれかの一定範囲内に近づいたと判定された場合(ステップS1602;YES)、ステップS1603に進む。一方、Drag中のマウス位置(X、Y)がシフト可能位置のいずれかの一定範囲内に近づいていないと判定された場合(ステップS1602;NO)、ステップS1604に進む。   In step S1602, it is determined whether or not the mouse position (X, Y) in the Drag has come within a certain range of any of L1, R1, U1, and U2 that are shiftable positions. When it is determined that the mouse position (X, Y) in the Drag has approached any one of the shiftable positions (step S1602; YES), the process proceeds to step S1603. On the other hand, if it is determined that the mouse position (X, Y) in the Drag is not approaching any one of the shiftable positions (step S1602; NO), the process proceeds to step S1604.

ステップS1603において、矢印で示すマウス位置(X、Y)の一定範囲内で最も近くにあるシフト可能位置を太い線で識別表示する(図17(b))。   In step S1603, the closest shiftable position within a certain range of the mouse position (X, Y) indicated by the arrow is identified and displayed with a thick line (FIG. 17B).

ステップS1604において、マウスUpの有無を判定する。マウスUpされたと判定された場合(ステップS1604;YES)、ステップS1605に進む。一方、マウスUpされていないと判定された場合(ステップS1604;NO)、ステップS1601に戻る。   In step S1604, it is determined whether or not there is a mouse Up. If it is determined that the mouse is up (step S1604; YES), the process proceeds to step S1605. On the other hand, if it is determined that the mouse is not up (step S1604; NO), the process returns to step S1601.

ステップS1605において、マウスUpの位置を算出する(シフト可能位置選択処理)。ここでは図17(c)の位置でマウスUpしたと仮定する。   In step S1605, the position of the mouse Up is calculated (shiftable position selection process). Here, it is assumed that the mouse is up at the position of FIG.

ステップS1606において、マウスDownの位置とマウスUpの位置に応じて基本領域P(I)の値を入れ替える。ここでは最初にマウスDownした位置にあった画像Img[3]に対応する9つの基本領域P(I)の値[3]を2つ上にシフトし、6つの基本領域P(I)の値[11]、[12]、[13]、[18]、[19]、[20]を3つ下にシフトする。その結果、基本領域P(I)の値は図17(d)のように入れ替えられる。図3で説明したように、処理Gの後に画像を描画する処理Cが実行されるので、処理Cによって基本領域P(I)の値に基づいて画像が描画される(図17(e))。その後、処理を終了する。   In step S1606, the value of the basic area P (I) is switched according to the position of the mouse Down and the position of the mouse Up. Here, the values [3] of the nine basic regions P (I) corresponding to the image Img [3] that were initially at the position of the mouse down are shifted up by two, and the values of the six basic regions P (I) [11], [12], [13], [18], [19], [20] are shifted down by three. As a result, the value of the basic area P (I) is switched as shown in FIG. As described with reference to FIG. 3, since the process C for drawing an image is executed after the process G, an image is drawn by the process C based on the value of the basic area P (I) (FIG. 17E). . Thereafter, the process ends.

以上が選択された画像Img[P(I)]をDragしてシフトを実行する処理Gの詳細である。   The above is the details of the process G for performing the shift by dragging the selected image Img [P (I)].

<画像の交換:処理H>
図3で説明したように、画像を選択する処理D(画像指定処理)の後に、画像を交換する処理H(画像交換処理)が行われる。図18および図19を参照して、画像を交換する処理Hの流れを説明する。ここでは、例えば図19(a)の矢印で示すように画像Img[8]をマウスで画像Img[3]の位置にDragする。
<Image exchange: Process H>
As described with reference to FIG. 3, the process H (image exchange process) for exchanging images is performed after the process D (image designation process) for selecting an image. The flow of processing H for exchanging images will be described with reference to FIGS. Here, for example, as shown by the arrow in FIG. 19A, the image Img [8] is dragged to the position of the image Img [3] with the mouse.

ステップS1801において、基本領域P(SI)にあった画像Img[P(SI)]をマウスでDrag中(図19(b))であるかどうか判定する。Drag中であると判定された場合(ステップS1801;YES)、ステップS1802に進む。一方、Drag中でないと判定された場合(ステップS1801;NO)、処理を終了する。   In step S1801, it is determined whether the image Img [P (SI)] in the basic area P (SI) is being dragged with the mouse (FIG. 19B). When it is determined that dragging is in progress (step S1801; YES), the process proceeds to step S1802. On the other hand, if it is determined that the drag is not being performed (step S1801; NO), the process is terminated.

ステップS1802において、マウスUpしたかどうか判定する。マウスUpしたと判定された場合(ステップS1802;YES)、ステップS1803に進む。一方、マウスUpしていないと判定された場合(ステップS1802;NO)、ステップS1801に戻る。   In step S1802, it is determined whether the mouse is up. When it is determined that the mouse is up (step S1802; YES), the process proceeds to step S1803. On the other hand, when it is determined that the mouse is not up (step S1802; NO), the process returns to step S1801.

ステップS1803において、マウスUpの位置(X、Y)を算出する。ステップS1804において、位置(X、Y)がメインレイアウト表示領域154内のいずれかの基本領域P(I)内にあるかどうかを判定する。位置(X、Y)が基本領域P(I)内にあると判定された場合(ステップS1804;YES)、ステップS1805に進む。一方、位置(X、Y)が基本領域P(I)内にないと判定された場合(ステップS1804;NO)、処理を終了する。   In step S1803, the position (X, Y) of the mouse Up is calculated. In step S 1804, it is determined whether or not the position (X, Y) is in any basic area P (I) in the main layout display area 154. If it is determined that the position (X, Y) is within the basic region P (I) (step S1804; YES), the process proceeds to step S1805. On the other hand, when it is determined that the position (X, Y) is not within the basic region P (I) (step S1804; NO), the process is terminated.

ステップS1805において、終了領域番号EIに基本領域番号Iをセットする。ステップS1806において、画像Img[P(SI)]と画像Img[P(EI)]とを交換する。ここでは図19(c)のように、画像Img[8]と画像Img[3]とが交換される。以上が画像を交換する処理Hの詳細である。   In step S1805, the basic area number I is set as the end area number EI. In step S1806, the image Img [P (SI)] and the image Img [P (EI)] are exchanged. Here, as shown in FIG. 19C, the image Img [8] and the image Img [3] are exchanged. The above is the details of the processing H for exchanging images.

第1実施形態では、画像枚数が与えられたら、1画面に複数の画像を隙間無く詰め込むための、画面の一辺の長さと、最小画像の枚数と、辺の長さとが最小画像の整数倍(2倍、3倍)の画像の枚数とを算出する。これによって、任意枚数の画像を1画面に隙間無く詰め込むことができるので、省スペースで画面または用紙に無駄が無く、かつ、枠が揃って美しいレイアウトを生成することが可能になる。   In the first embodiment, given the number of images, the length of one side of the screen, the minimum number of images, and the length of the sides for packing a plurality of images on one screen without gaps are integer multiples of the minimum image ( 2 times and 3 times) of images. As a result, an arbitrary number of images can be packed in one screen without any gaps, so that it is possible to generate a beautiful layout with space and no waste of screen or paper and with a uniform frame.

また、第1実施形態では、選択中のレイアウト候補から選択した画像を削除したり戻したりすることができ、削除や戻す操作で画像枚数が変われば、再び画像を1画面に隙間無く詰め込んでレイアウトする。これによって、失敗画像や失敗写真の削除および削除のやり直しが可能となる。   In the first embodiment, the selected image can be deleted or returned from the selected layout candidate. If the number of images changes by the deletion or return operation, the images are again packed into one screen without any gaps. To do. As a result, it is possible to delete the failed image and the failed photo and to redo the deletion.

また、第1実施形態では、選択された画像を含み、他の矩形と交わらず、選択された画像と幅が同じで、画像と画像との境界からなる矩形をすべて求め、求めた矩形の上辺と下辺を求める。また、選択された画像を含み、他の矩形と交わらず、選択された画像と高さが同じで、画像と画像との境界からなる矩形をすべて求め、求めた矩形の左辺と右辺を求める。そして、選択された画像のシフト可能な位置をこのように求めた上辺、下辺、左辺、右辺とし、ユーザにわかりやすく表示する。これによって、ユーザは簡単な操作でシフト可能な位置に画像をシフトして、所望のレイアウトを生成することが可能になる。   Further, in the first embodiment, all the rectangles that include the selected image, have the same width as the selected image and do not intersect with the other rectangles, and have the boundary between the images, and obtain the upper side of the obtained rectangle And find the bottom. Further, all the rectangles including the selected image and having the same height as the selected image and including the boundary between the images are obtained without intersecting with other rectangles, and the left side and the right side of the obtained rectangle are obtained. Then, the shiftable positions of the selected image are set as the upper side, the lower side, the left side, and the right side obtained in this way, and are displayed in an easy-to-understand manner for the user. Thus, the user can generate a desired layout by shifting the image to a position that can be shifted with a simple operation.

また、第1実施形態では、選択された画像を移動すると、移動先の位置にある画像と選択された画像とを交換する。これによって、所望の位置に所望の画像をレイアウトすることが可能になる。   In the first embodiment, when the selected image is moved, the image at the destination position is exchanged with the selected image. This makes it possible to lay out a desired image at a desired position.

(第2実施形態)
<レイアウト候補の算出を行う他の例:処理A2>
図20および図21を参照して、レイアウト候補の算出を行う他の例である処理A2の流れを説明する。このアルゴリズムでは、表示領域と縦横比が同じN枚の画像を表示領域に隙間無く詰め込むときに、最小画像に対して一辺が整数倍(ここでは2倍、3倍、・・・、M倍)の画像をそれぞれ何枚用いればよいかを算出する。ここで、メインレイアウト表示領域154における各基本領域P(I)の大きさが、最小画像のサイズである。
(Second Embodiment)
<Another example of calculating layout candidates: Process A2>
With reference to FIGS. 20 and 21, the flow of process A2, which is another example of calculating layout candidates, will be described. In this algorithm, when N images having the same aspect ratio as the display area are packed in the display area without any gaps, one side is an integral multiple of the minimum image (here, 2 times, 3 times,..., M times). It calculates how many of each image should be used. Here, the size of each basic area P (I) in the main layout display area 154 is the size of the minimum image.

ステップS2001において、レイアウト画像枚数Nをセットする。   In step S2001, the number N of layout images is set.

ステップS2002において、√N以上の最小の自然数を求めて変数Kにセットする。ここでKは、最小画像の一辺の長さを1としたときの表示領域の一辺の長さである。   In step S2002, the minimum natural number equal to or greater than √N is obtained and set in the variable K. Here, K is the length of one side of the display area when the length of one side of the minimum image is 1.

ステップS2003において、詰め込み判定関数D=K×K−Σ[L=2、・・・M](L×L−1)G(L)−Nとセットする。ここで、Σは総和であり、Mは使用される可能性のある最大画像の一辺の長さであり、G(L)は一辺の長さが最小画像のL倍の画像の枚数である。表示領域の一辺の長さKに対して、詰め込み判定関数D=0となる自然数G(L:L=2、・・・M)の組が存在し、かつ、図21(a)〜(j)のように詰め込んだときにL×L(L=2、3、・・・、M)サイズの大きい画像同士が重ならないならば(K、G(L:L=2、・・・M))の組はレイアウト候補となる。   In step S2003, the stuffing determination function D = K × K−Σ [L = 2,... M] (L × L−1) G (L) −N is set. Here, Σ is the sum, M is the length of one side of the maximum image that may be used, and G (L) is the number of images whose side length is L times the minimum image. There exists a set of natural numbers G (L: L = 2,... M) for which the stuffing determination function D = 0 with respect to the length K of one side of the display area, and FIGS. ) If the images with large L × L (L = 2, 3,..., M) size do not overlap when packed (K, G (L: L = 2,... M) ) Is a layout candidate.

ステップS2004において、表示領域の一辺の長さKに対して、詰め込み判定関数D=0となる自然数G(L:L=2、・・・M)の組があるかどうかを判定する。詰め込み判定関数D=0となる自然数G(L:L=2、・・・M)の組があると判定された場合(ステップS2004;YES)、ステップS2005に進む。一方、詰め込み判定関数D=0となる自然数G(L:L=2、・・・M)の組がないと判定された場合(ステップS2004;NO)、ステップS2008に進む。   In step S2004, it is determined whether or not there is a set of natural numbers G (L: L = 2,... M) for which the stuffing determination function D = 0 with respect to the length K of one side of the display area. When it is determined that there is a set of natural numbers G (L: L = 2,... M) that satisfies the stuffing determination function D = 0 (step S2004; YES), the process proceeds to step S2005. On the other hand, if it is determined that there is no set of natural numbers G (L: L = 2,... M) that satisfy the stuffing determination function D = 0 (step S2004; NO), the process proceeds to step S2008.

ステップS2005において、大きいサイズの画像同士が所定のレイアウトで重ならずに表示領域に配置できるかどうか判定する。大きいサイズの画像同士が所定のレイアウトで重ならずに配置できると判定された場合(ステップS2005;YES)、ステップS2006に進む。一方、大きいサイズの画像同士が重なると判定された場合(ステップS2005;NO)、ステップS2007に進む。ここで、ステップS2005における重なり判定は、次の処理(S1)〜(S3)ようにして行う。(S1):L(≧2)が偶数のとき、空いている表示領域を左上から右下に向かうラスタスキャン方式でスキャンしてL×Lの大きさの領域を設定可能な領域を探索し、探索した領域に左上から右下に向かうラスタスキャン方式でL×Lの大きさの領域をG(L)個設定する。(S2):L(≧3)が奇数のとき、空いている表示領域を右下から左上に向かうラスタスキャン方式でスキャンしてL×Lの大きさの領域を設定可能な領域を探索し、探索した領域に右下から左上に向かうラスタスキャン方式でL×Lの大きさの領域をG(L)個設定する。(S3):変数L=2、3、・・・、Mに対して、上記(S1)と(S2)の処理を繰り返し行い、全てのL×L(L=2、3、・・・、M)の大きさの領域が重ならなければ、ステップS2005でYESと判定する。   In step S2005, it is determined whether large-sized images can be arranged in the display area without overlapping with a predetermined layout. When it is determined that large-sized images can be arranged without overlapping in a predetermined layout (step S2005; YES), the process proceeds to step S2006. On the other hand, when it is determined that large-sized images overlap (step S2005; NO), the process proceeds to step S2007. Here, the overlap determination in step S2005 is performed as follows (S1) to (S3). (S1): When L (≧ 2) is an even number, a vacant display area is scanned by a raster scan method from the upper left to the lower right to search for an area where an L × L size area can be set; G (L) areas having a size of L × L are set in the searched area by a raster scan method from the upper left to the lower right. (S2): When L (≧ 3) is an odd number, a vacant display area is scanned by a raster scan method from the lower right to the upper left to search for an area where an L × L size area can be set; G (L) areas having a size of L × L are set in the searched area by a raster scan method from the lower right to the upper left. (S3): The above processes (S1) and (S2) are repeated for the variables L = 2, 3,..., M, and all L × L (L = 2, 3,. If the areas of size M) do not overlap, YES is determined in step S2005.

ステップS2006において、(K、G(L:L=2、・・・M))の組をレイアウト候補として記憶する。   In step S2006, a set of (K, G (L: L = 2,... M)) is stored as a layout candidate.

ステップS2007において、もっと多くのレイアウト候補を得たいかどうか判定する。もっと多くのレイアウト候補を得たいと判定された場合(ステップS2007;YES)、ステップS2008に進む。一方、もっと多くのレイアウト候補を得る必要がないと判定された場合(ステップS2007;NO)、処理を終了する。   In step S2007, it is determined whether more layout candidates are to be obtained. If it is determined that more layout candidates are desired (step S2007; YES), the process proceeds to step S2008. On the other hand, when it is determined that it is not necessary to obtain more layout candidates (step S2007; NO), the process ends.

また、ステップS2008において、表示画面の一辺の長さKをインクリメントして、ステップS2003に戻る。   In step S2008, the length K of one side of the display screen is incremented, and the process returns to step S2003.

図21(a)〜(j)は、レイアウト画像枚数がN=28のとき、本アルゴリズムで得られたレイアウト候補(K、G(2)、G(3)、G(4)、G(5))=(K、A、B、C、D)のいくつかの例を示す。図21(a)は、(K、A、B、C、D)=(6、0、1、0、0)の場合である。図21(b)は、(K、A、B、C、D)=(7、7、0、0、0)の場合である。図21(c)は、(K、A、B、C、D)=(7、2、0、1、0)の場合である。図21(d)は、(K、A、B、C、D)=(8、12、0、0、0)の場合である。図21(e)は、(K、A、B、C、D)=(8、7、0、1、0)の場合である。図21(f)は、(K、A、B、C、D)=(8、4、3、0、0)の場合である。図21(g)は、(K、A、B、C、D)=(8、4、0、0、1)の場合である。図21(h)は、(K、A、B、C、D)=(9、15、1、0、0)の場合である。図21(i)は、(K、A、B、C、D)=(9、7、4、0、0)の場合である。図21(j)は、(K、A、B、C、D)=(9、7、1、0、1)の場合である。第2実施形態では、画像枚数が与えられたら、1画面に複数の画像を隙間無く詰め込むための、画面の一辺の長さと、最小画像の枚数と、辺の長さが最小画像の整数倍(2倍、3倍、4倍、5倍)の画像の枚数とを算出する。これによって、選択した画像を特に大きいサイズで、すなわち辺の長さを最小画像の4倍、5倍としても表示できる。   FIGS. 21A to 21J show layout candidates (K, G (2), G (3), G (4), G (5) obtained by this algorithm when the number of layout images is N = 28. )) = Some examples of (K, A, B, C, D) are shown. FIG. 21A shows a case where (K, A, B, C, D) = (6, 0, 1, 0, 0). FIG. 21B shows the case where (K, A, B, C, D) = (7, 7, 0, 0, 0). FIG. 21C shows the case where (K, A, B, C, D) = (7, 2, 0, 1, 0). FIG. 21D shows a case where (K, A, B, C, D) = (8, 12, 0, 0, 0). FIG. 21E shows the case where (K, A, B, C, D) = (8, 7, 0, 1, 0). FIG. 21F shows the case where (K, A, B, C, D) = (8, 4, 3, 0, 0). FIG. 21G shows the case where (K, A, B, C, D) = (8, 4, 0, 0, 1). FIG. 21H shows the case where (K, A, B, C, D) = (9, 15, 1, 0, 0). FIG. 21 (i) shows a case where (K, A, B, C, D) = (9, 7, 4, 0, 0). FIG. 21J shows the case where (K, A, B, C, D) = (9, 7, 1, 0, 1). In the second embodiment, when the number of images is given, the length of one side of the screen, the number of minimum images, and the length of the sides are an integral multiple of the minimum image for packing a plurality of images on one screen without gaps ( 2 times, 3 times, 4 times, and 5 times the number of images. As a result, the selected image can be displayed in a particularly large size, that is, the side length is four times or five times that of the minimum image.

(第3実施形態)
<小画面への適用例>
図22を参照して、本発明を画面の小さいデジタルカメラに適用した例について説明する。本デジタルカメラは本体2200上に、タッチパネルを表面に配置した入力画面2201と操作ボタン類2202とが配備されている。
(Third embodiment)
<Application example to small screen>
An example in which the present invention is applied to a digital camera with a small screen will be described with reference to FIG. In this digital camera, an input screen 2201 and operation buttons 2202 with a touch panel arranged on the surface are arranged on a main body 2200.

まず、図22(a)のように操作ボタン類2202を操作して、日付ごとに作成された写真フォルダを選択する。   First, as shown in FIG. 22A, the operation buttons 2202 are operated to select a photo folder created for each date.

写真フォルダを選択すると図22(b)のように、選択されたフォルダ内の写真が読み込まれ、入力画面に隙間無く詰め込まれてレイアウトされ表示される。ここで、ユーザが指で画面の画像IAの位置をタッチする。   When a photo folder is selected, as shown in FIG. 22B, the photos in the selected folder are read, packed into the input screen without any gaps, laid out and displayed. Here, the user touches the position of the image IA on the screen with a finger.

指の大きさは画面上の最小画像サイズより大きいので、指でタッチした位置の中心を算出し、タッチ位置中心にある画像IAと操作メニュー(「削除」、「シフト」、「交換」)を拡大表示する(図22(c))。ここで、ユーザが「削除」メニューをタッチする。   Since the size of the finger is larger than the minimum image size on the screen, the center of the position touched with the finger is calculated, and the image IA at the center of the touch position and the operation menu (“Delete”, “Shift”, “Exchange”) are displayed. An enlarged display is displayed (FIG. 22C). Here, the user touches the “delete” menu.

すると、画像IAが削除され、新たな枚数でレイアウト候補が算出されて、図22(d)のようになる。次に、ユーザが指で画面に画像IBの位置をタッチする(図22(d))。   Then, the image IA is deleted, and layout candidates are calculated with a new number, as shown in FIG. Next, the user touches the position of the image IB on the screen with a finger (FIG. 22D).

すると、指でタッチした位置の中心を算出し、タッチ位置中心にある画像IBと操作メニュー(「削除」、「シフト」、「交換」)を拡大表示する(図22(e))。ここで、ユーザが「シフト」メニューをタッチする。   Then, the center of the position touched by the finger is calculated, and the image IB at the center of the touch position and the operation menu (“delete”, “shift”, “exchange”) are enlarged and displayed (FIG. 22E). Here, the user touches the “shift” menu.

すると、図22(f)のように、画像IBをシフト可能な位置が表示される。ここで、図22(f)の矢印で示す位置をユーザが指でなぞって画像をドラッグする。すると、図22(g)に示すように画像IBがシフトする。次に、ユーザが指で画面に画像ICの位置をタッチする(図22(g))。すると、指でタッチした位置の中心を算出し、タッチ位置中心にある画像ICと操作メニュー(「削除」、「シフト」、「交換」)を拡大表示する(図22(h))。ここで、ユーザが「交換」メニューをタッチする。すると、図22(i)で示すように、画像ICが指で操作可能な大きさに拡大表示される。図22(i)の矢印で示すようにユーザが指でなぞって画像ICを画像IBの位置にドラッグする。すると、図22(j)に示すように画像ICと画像IBとが交換される。   Then, a position where the image IB can be shifted is displayed as shown in FIG. Here, the user drags the image by tracing the position indicated by the arrow in FIG. Then, the image IB shifts as shown in FIG. Next, the user touches the position of the image IC on the screen with a finger (FIG. 22 (g)). Then, the center of the position touched with the finger is calculated, and the image IC at the center of the touch position and the operation menu (“delete”, “shift”, “exchange”) are enlarged and displayed (FIG. 22 (h)). Here, the user touches the “exchange” menu. Then, as shown in FIG. 22 (i), the image IC is enlarged and displayed in a size that can be operated with a finger. As shown by the arrow in FIG. 22 (i), the user drags the image IC to the position of the image IB by tracing with a finger. Then, the image IC and the image IB are exchanged as shown in FIG.

第3実施形態では、画像を選択すると、選択された画像および画像の操作メニューを拡大表示する。選択された画像を指でなぞってドラッグしたり、操作メニューを指でタッチしたりすることで、本発明を小画面の機器に適用することが可能になる。   In the third embodiment, when an image is selected, the selected image and the operation menu for the image are enlarged and displayed. The present invention can be applied to a small-screen device by dragging a selected image with a finger or touching an operation menu with a finger.

(第4実施形態)
また、小さいタッチパネル画面のデジタルカメラやプリンタのような機器に本発明を適用してレイアウト編集を行う場合には、大きい画像は表示するが、小さい画像は表示せずレイアウト枠のみ表示するようにしてもよい。また、大きいサイズの画像のみシフトや交換ができるようにしてもよい。このとき、大きいサイズの画像の領域のみタッチ操作を受け付けて、小さいサイズの画像の領域はタッチ操作を受け付けないようにしてもよい。
(Fourth embodiment)
In addition, when layout editing is performed by applying the present invention to a device such as a digital camera or printer with a small touch panel screen, a large image is displayed, but a small image is not displayed and only a layout frame is displayed. Also good. Further, only large-size images may be shifted or exchanged. At this time, the touch operation may be accepted only for the large-size image area, and the touch operation may not be accepted for the small-size image area.

第4実施形態では、小さいサイズの画像は表示せずレイアウト枠のみ表示し、大きいサイズの画像のみシフトや交換ができるようにすることで、小さい画面のタッチパネルによる誤操作を防止できる。   In the fourth embodiment, by displaying only a layout frame without displaying a small-sized image and allowing only a large-sized image to be shifted or exchanged, it is possible to prevent an erroneous operation with a small-screen touch panel.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

Claims (12)

画像レイアウトを行う情報処理装置であって、
同一の縦横比を有する複数枚の画像の画像枚数を計数する計数手段と、
前記計数手段により計数された前記画像枚数の平方根以上の整数の値をnとして、前記縦横比を有する表示領域に隙間無くレイアウトする際に最小サイズとなり且つ前記縦横比を有する単位画像に対する前記表示領域の一辺のそれぞれの長さとしてn×nの大きさを有する表示領域を設定する設定手段と、
前記計数手段により計数された画像枚数と、前記設定手段により設定された整数の値nとに基づいて、前記単位画像に対して一辺の長さがそれぞれ同じ整数倍である一または複数サイズの拡大画像と前記単位画像とを前記表示領域に隙間無くレイアウトするために必要な、前記一または複数サイズの拡大画像のそれぞれの必要枚数を算出する算出手段と、
前記算出手段により算出された前記一または複数サイズの拡大画像のそれぞれの必要枚数に基づいて、前記一または複数サイズの前記拡大画像と、前記単位画像とを前記表示領域にレイアウトするレイアウト手段と、
を備えることを特徴とする情報処理装置。
An information processing apparatus that performs image layout,
Counting means for counting the number of images of a plurality of images having the same aspect ratio;
The display area corresponding to the unit image having the minimum size and the aspect ratio when laid out without any gap in the display area having the aspect ratio, where n is an integer greater than or equal to the square root of the number of images counted by the counting means Setting means for setting a display area having a size of n × n as the length of each side of
Based on the number of images counted by the counting means and the integer value n set by the setting means, one or a plurality of size enlargements whose side lengths are the same integer multiple with respect to the unit image A calculating means for calculating the required number of each of the one or a plurality of enlarged images necessary for laying out the image and the unit image without gaps in the display area;
Layout means for laying out the enlarged image of the one or more sizes and the unit image in the display area based on the required number of each of the enlarged images of the one or more sizes calculated by the calculating means;
An information processing apparatus comprising:
前記計数手段により計数された前記画像枚数の平方根以上の整数の値nに所定の整数を加算する加算手段をさらに備え、
前記設定手段は、前記加算手段により加算された新たな整数の値を、前記単位画像に対する前記表示領域の一辺のそれぞれの長さとして前記表示領域の大きさを再び設定することを特徴とする請求項1に記載の情報処理装置。
Adding means for adding a predetermined integer to an integer value n equal to or larger than the square root of the number of images counted by the counting means;
The setting means re-sets the size of the display area with the new integer value added by the adding means as the length of each side of the display area for the unit image. Item 4. The information processing apparatus according to Item 1.
前記設定手段は、前記計数手段により計数された前記画像枚数の平方根以上の最小の整数の値を、前記単位画像に対する前記表示領域の一辺のそれぞれの長さとして前記表示領域の大きさを設定することを特徴とする請求項1または2に記載の情報処理装置。   The setting means sets the size of the display area with the minimum integer value equal to or larger than the square root of the number of images counted by the counting means as the length of each side of the display area for the unit image. The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus. 前記算出手段は、
前記設定手段により設定された前記整数の値nの二乗から、
前記単位画像に対して一辺の長さがそれぞれk(k=2、3、...、M≦前記設定手段により設定された整数の値)倍である拡大画像の枚数のk2−1倍の値に対する、k=2からk=Mまでの各kについての当該値の総和と、
前記計数手段により計数された前記画像枚数と、
を減算した値が零となる、前記単位画像に対して一辺の長さがそれぞれk倍である拡大画像の枚数の組み合わせを算出することにより、前記一または複数サイズの拡大画像のそれぞれの必要枚数を算出することを特徴とする請求項1乃至3の何れか1項に記載の情報処理装置。
The calculating means includes
From the square of the integer value n set by the setting means,
The length of one side of the unit image is k2-1 times the number of enlarged images each having k (k = 2, 3,..., M ≦ the integer value set by the setting means) times. The sum of the values for each k from k = 2 to k = M for the value,
The number of images counted by the counting means;
The required number of each of the one or more enlarged images is calculated by calculating a combination of the number of enlarged images in which the length of one side is k times each of the unit images. The information processing apparatus according to claim 1, wherein
前記拡大画像のサイズが、前記単位画像に対して一辺の長さがそれぞれ同じ2倍である場合、および、前記単位画像に対して一辺の長さがそれぞれ同じ3倍である場合、
前記算出手段は、前記設定手段により設定された前記整数の二乗から、前記単位画像に対して一辺の長さがそれぞれ2倍である拡大画像の枚数の3倍の値と、前記単位画像に対して一辺の長さがそれぞれ3倍である拡大画像の枚数の8倍の値と、前記計数手段により計数された前記画像枚数と、を減算した値が零となる、前記単位画像に対して一辺の長さがそれぞれ2倍である拡大画像の枚数と、前記単位画像に対して一辺の長さがそれぞれ3倍である拡大画像の枚数と、の組み合わせを算出することにより、前記一または複数サイズの拡大画像のそれぞれの必要枚数を算出することを特徴とする請求項4に記載の情報処理装置。
When the size of the enlarged image is twice the same length of each side of the unit image, and when the length of one side of the unit image is the same three times,
The calculation means calculates a value that is three times the number of enlarged images, each of which is twice the length of one side of the unit image, from the square of the integer set by the setting means, and the unit image. One side of the unit image in which the value obtained by subtracting the value of eight times the number of enlarged images each having a side length of three times and the number of images counted by the counting means is zero. By calculating a combination of the number of enlarged images each having a length of 2 times and the number of enlarged images having a side length of 3 times each of the unit images. The information processing apparatus according to claim 4, wherein a necessary number of each of the enlarged images is calculated.
前記レイアウト手段は、
前記算出手段により算出された前記必要枚数の一または複数サイズの前記拡大画像と、前記単位画像と、を前記表示領域にレイアウトする際に、前記拡大画像同士が重ならない配置をレイアウト候補として生成する生成手段と、
前記レイアウト候補のうち、1つのレイアウト候補を選択する選択手段と、を備え、
前記選択手段により選択されたレイアウト候補により、前記一または複数サイズの前記拡大画像と、前記単位画像とを前記表示領域にレイアウトすることを特徴とする請求項1乃至5の何れか1項に記載の情報処理装置。
The layout means includes
When laying out one or more sizes of the enlarged image and the unit image calculated by the calculating unit in the display area, an arrangement in which the enlarged images do not overlap is generated as a layout candidate. Generating means;
Selecting means for selecting one layout candidate among the layout candidates,
6. The one or more sizes of the enlarged image and the unit image are laid out in the display area according to a layout candidate selected by the selection unit. Information processing device.
前記レイアウト手段によりレイアウトされた前記一または複数サイズの前記拡大画像または前記単位画像を前記表示領域から削除する削除手段と、
前記削除手段により削除された前記一または複数サイズの前記拡大画像または前記単位画像を前記表示領域に再び追加する追加手段と、をさらに備え、
前記計数手段は、前記削除手段または前記追加手段により削除または追加された場合、前記画像枚数を改めて計数することを特徴とする請求項6に記載の情報処理装置。
Deleting means for deleting the enlarged image or the unit image of the one or more sizes laid out by the layout means from the display area;
Adding means for adding again the enlarged image or the unit image of the one or more sizes deleted by the deleting means to the display area;
The information processing apparatus according to claim 6, wherein the counting unit counts the number of images again when deleted or added by the deleting unit or the adding unit.
前記レイアウト手段によりレイアウトされた前記一または複数サイズの前記拡大画像または前記単位画像のうち1つをユーザに指定させる指定手段と、
前記指定手段により指定された前記一または複数サイズの前記拡大画像または前記単位画像のうちの1つを縦横方向にシフトした場合に、シフト先に存在する他の拡大画像または単位画像の全てを包含する位置を、シフト可能な前記表示領域における位置として算出するシフト可能位置算出手段と、
前記シフト可能位置算出手段により算出されたシフト可能な前記表示領域における位置のうち1つをユーザに選択させるシフト可能位置選択手段と、
前記シフト可能位置選択手段により選択されたシフト可能な前記表示領域における位置に前記一または複数サイズの前記拡大画像または前記単位画像をシフトするシフト手段と、
をさらに備えることを特徴とする請求項6に記載の情報処理装置。
Designating means for allowing a user to designate one of the one or a plurality of sizes of the enlarged image or the unit image laid out by the layout means;
When one of the enlarged image or the unit image of one or a plurality of sizes designated by the designation unit is shifted in the vertical and horizontal directions, all other enlarged images or unit images existing at the shift destination are included. Shiftable position calculating means for calculating the position to be shifted as the position in the display area that can be shifted;
Shiftable position selection means for allowing the user to select one of the positions in the shiftable display area calculated by the shiftable position calculation means;
Shift means for shifting the enlarged image or the unit image of the one or more sizes to a position in the shiftable display area selected by the shiftable position selection means;
The information processing apparatus according to claim 6, further comprising:
前記レイアウト手段によりレイアウトされた前記一または複数サイズの前記拡大画像または前記単位画像のうち1つをユーザに指定させる画像指定手段と、
前記画像指定手段により指定された前記一または複数サイズの前記拡大画像または前記単位画像と、前記表示領域における他の拡大画像または単位画像と、の前記表示領域における位置およびサイズを交換する交換手段と、
をさらに備えることを特徴とする請求項6に記載の情報処理装置。
Image designation means for allowing a user to designate one of the enlarged image or the unit image of the one or more sizes laid out by the layout means;
Exchange means for exchanging the position and size in the display area of the enlarged image or unit image of the one or a plurality of sizes designated by the image designation means and another enlarged image or unit image in the display area; ,
The information processing apparatus according to claim 6, further comprising:
画像のレイアウトを行う情報処理方法であって、
計数手段が、同一の縦横比を有する複数枚の画像の画像枚数を計数する計数工程と、
設定手段が、前記計数工程により計数された前記画像枚数の平方根以上の整数の値をnとして、前記縦横比を有する表示領域に隙間無くレイアウトする際に最小サイズとなり且つ前記縦横比を有する単位画像に対する前記表示領域の一辺のそれぞれの長さとしてn×nの大きさを有する表示領域を設定する設定工程と、
算出手段が、前記計数工程により計数された画像枚数と、前記設定工程により設定された整数の値nとに基づいて、前記単位画像に対して一辺の長さがそれぞれ同じ整数倍である一または複数サイズの拡大画像と前記単位画像とを前記表示領域に隙間無くレイアウトするために必要な、前記一または複数サイズの拡大画像のそれぞれの必要枚数を算出する算出工程と、
レイアウト手段が、前記算出工程により算出された前記一または複数サイズの拡大画像のそれぞれの必要枚数に基づいて、前記一または複数サイズの前記拡大画像と、前記単位画像とを前記表示領域にレイアウトするレイアウト工程と、
を有することを特徴とする情報処理方法。
An information processing method for performing image layout,
A counting step in which the counting means counts the number of images of a plurality of images having the same aspect ratio;
The unit image having the minimum aspect ratio and the aspect ratio when the setting means lays out an integer value equal to or larger than the square root of the number of images counted in the counting step and lays out the display area having the aspect ratio without any gap. A setting step of setting a display area having a size of n × n as the length of each side of the display area with respect to
The calculating means is based on the number of images counted in the counting step and the integer value n set in the setting step, and the length of one side of the unit image is the same integer multiple or A calculation step of calculating a necessary number of each of the one or a plurality of size enlarged images necessary for laying out a plurality of size enlarged images and the unit image without gaps in the display area;
A layout unit lays out the enlarged image of one or more sizes and the unit image in the display area based on the required number of enlarged images of the one or more sizes calculated by the calculating step. Layout process;
An information processing method characterized by comprising:
請求項10に記載の情報処理方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the information processing method according to claim 10. 前記単位画像の縦の長さをH、前記単位画像の横の長さをWとした場合、前記表示領域の縦の長さは、前記設定手段により設定された整数の値n×H、前記表示領域の横の長さは、前記設定手段により設定された整数の値n×Wであることを特徴とする請求項1乃至9の何れか1項に記載の情報処理装置。When the vertical length of the unit image is H and the horizontal length of the unit image is W, the vertical length of the display area is an integer value n × H set by the setting unit, The information processing apparatus according to claim 1, wherein a horizontal length of the display area is an integer value n × W set by the setting unit.
JP2010136649A 2010-06-15 2010-06-15 Information processing apparatus, information processing method, and program Active JP5629499B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010136649A JP5629499B2 (en) 2010-06-15 2010-06-15 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010136649A JP5629499B2 (en) 2010-06-15 2010-06-15 Information processing apparatus, information processing method, and program

Publications (3)

Publication Number Publication Date
JP2012003433A JP2012003433A (en) 2012-01-05
JP2012003433A5 JP2012003433A5 (en) 2013-08-01
JP5629499B2 true JP5629499B2 (en) 2014-11-19

Family

ID=45535350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010136649A Active JP5629499B2 (en) 2010-06-15 2010-06-15 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP5629499B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6223114B2 (en) * 2013-10-17 2017-11-01 発紘電機株式会社 Drawing editor device and its program
US10628009B2 (en) 2015-06-26 2020-04-21 Rovi Guides, Inc. Systems and methods for automatic formatting of images for media assets based on user profile
AU2016277553B2 (en) * 2015-06-26 2022-02-17 Rovi Guides, Inc. Systems and methods for automatic formatting of images for media assets based on user profile
CN111399956B (en) * 2020-03-12 2021-11-02 北京字节跳动网络技术有限公司 Content display method and device applied to display equipment and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7275210B2 (en) * 2003-03-21 2007-09-25 Fuji Xerox Co., Ltd. Systems and methods for generating video summary image layouts

Also Published As

Publication number Publication date
JP2012003433A (en) 2012-01-05

Similar Documents

Publication Publication Date Title
JP6399744B2 (en) Display device and display method
JP5629499B2 (en) Information processing apparatus, information processing method, and program
AU2012235840B2 (en) Method for three-dimensional viewing
JP6099961B2 (en) Image display apparatus, image display apparatus control method, and computer program
KR102362629B1 (en) Book display program and book display device
JP2013114558A (en) Information processing apparatus, display control method, and program
JP2024055962A (en) Information processing device, control method, and program
JP5921156B2 (en) Printing apparatus, layout changing method, and program
JP2016143345A (en) Program, information processor, and information processing method
JP4870581B2 (en) Parts catalog creation system, computer-executable program, and computer-readable recording medium
JP6198377B2 (en) Display control apparatus, display control method, and program
US9601091B2 (en) Information processing apparatus and information processing method
JPH0816824A (en) Three-dimensional computer aided design device/method
KR20190141122A (en) How to Navigate a Panel of Displayed Content
JP2013162181A (en) Image reader, control method therefor, and image formation device
JP6395768B2 (en) Display control apparatus, display control method, and program
JP7375308B2 (en) Information processing device and program
JP2015225509A (en) Information processor, information processing system, control method of information processor and computer program
JP2015049656A (en) Information processing device, method and program
JP7298133B2 (en) Display method and display device
JP6711890B2 (en) Display control device, display control method, and program
JP5843544B2 (en) Information processing apparatus and control method thereof
JP2023009584A (en) Image processing device, image processing method, and program
WO2023127584A1 (en) Computer-implementation method, information processing device, storage medium, and image display method
CN1936961A (en) Edge-shadow-guide grey-to-grey character font producing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130614

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130614

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140407

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141006

R151 Written notification of patent or utility model registration

Ref document number: 5629499

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151