JP2019140567A - Image processing system - Google Patents

Image processing system Download PDF

Info

Publication number
JP2019140567A
JP2019140567A JP2018023275A JP2018023275A JP2019140567A JP 2019140567 A JP2019140567 A JP 2019140567A JP 2018023275 A JP2018023275 A JP 2018023275A JP 2018023275 A JP2018023275 A JP 2018023275A JP 2019140567 A JP2019140567 A JP 2019140567A
Authority
JP
Japan
Prior art keywords
image
aspect ratio
size
trimming
panoramic image
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.)
Pending
Application number
JP2018023275A
Other languages
Japanese (ja)
Inventor
博之 星加
Hiroyuki Hoshika
博之 星加
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 JP2018023275A priority Critical patent/JP2019140567A/en
Publication of JP2019140567A publication Critical patent/JP2019140567A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)

Abstract

To create a nice looking video by creating a video according to the situation, when creating a video from a panoramic image.SOLUTION: When performing creation/display of videos for a prescribed time with regard to one panoramic image, trimming is carried out by sequentially moving the position of trimming region of the panoramic image, and creation/display of videos is performed so that multiple trimming images, subjected to trimming while changing the position, are reproduced sequentially. Trimming of the panoramic image at a prescribed aspect ratio (S906) and trimming of the panoramic image at an aspect ratio different from the prescribed aspect ratio (S907, S908) are changed over according to the size of the panoramic image in a prescribed direction or the aspect ratio (S901). Furthermore, when trimming at an aspect ratio different from the prescribed aspect ratio, the creation/display time of the video is prolonged, according to the size of the panoramic image in the prescribed direction or the aspect ratio.SELECTED DRAWING: Figure 9

Description

本発明は、パノラマ画像を取り扱う画像処理装置に関する。   The present invention relates to an image processing apparatus that handles panoramic images.

従来、デジタルカメラやスマートフォンにおいて、撮影した静止画像及び動画像を用いて一連のアルバム動画を作成し、家族や仲間と楽しむといったことが一般的に行われるようになってきた。アルバム動画を楽しむために、アルバム動画の素材となる静止画像及び動画像に文字データを付与したり、フェードなどのトランジションやBGMを併せて記録するなど趣向を凝らした効果が提供されている。   2. Description of the Related Art Conventionally, it has become common for digital cameras and smartphones to create a series of album videos using captured still images and moving images and enjoy them with family and friends. In order to enjoy album moving images, there are provided elaborate effects such as adding character data to still images and moving images as materials of album moving images and recording transitions such as fades and BGM together.

また、近年のデジタルカメラやスマートフォンにおいて、様々な撮影方法が提供されている。その中で、広い範囲に広がる風景を撮影するパノラマ撮影も広く利用されている。パノラマ撮影で撮影されるパノラマ画像は、通常撮影される静止画と大きく異なるアスペクトで記録される。パノラマ画像は、撮影時の周りの雰囲気全体を表現しており、アルバム動画の素材対象として適している。パノラマ画像をアルバム動画に取り込むために動画に変換する必要がある。特許文献1では、パノラマ画像からパノラマ画像全体を見渡すパンニング動画を作成する方法が記載されている。   Also, various photographing methods are provided in recent digital cameras and smartphones. Among them, panoramic photography that captures a wide range of scenery is also widely used. A panorama image shot by panorama shooting is recorded with an aspect that is significantly different from a still image shot normally. The panoramic image expresses the entire atmosphere at the time of shooting, and is suitable as a material target of the album moving image. It is necessary to convert a panorama image into a movie in order to import it into an album movie. Patent Document 1 describes a method of creating a panning video overlooking the entire panoramic image from the panoramic image.

特開2011−082917号公報Japanese Patent Application Laid-Open No. 2011-082917

パノラマ画像からパンニング動画を生成して再生することは有効な表現手段である。しかしながら、単純にパンニング動画生成するだけではパンニング動画の見栄えを損なってしまう場合がある。例えば、パノラマ画像を含む複数の画像を連続的に再生する場合、他のシーンの再生時間が4秒と決められている中、パンニング動画だけ4秒を大きく超えてしまうと、全体としての見栄えを損なってしまう。または、BGMがソローテンポな曲であるにもかかわらず、パンニング動画のスライド速度が速かったり、他のシーンとの差異が目立ち、アルバム動画の1シーンとしては適切とは言えず、その結果アルバム動画全体の見栄えが損なわれてしまうことが起こる。そこで、本願発明では、パノラマ画像から動画を生成する際に、状況に応じた動画の生成を行うことにより、見栄えのよい動画を生成することを目的とする。   Generating and reproducing a panning video from a panoramic image is an effective expression means. However, simply creating a panning video may impair the appearance of the panning video. For example, when a plurality of images including a panoramic image are played back continuously, the playback time of other scenes is determined to be 4 seconds, and if the panning video is much longer than 4 seconds, the overall appearance is improved. It will be lost. Or, despite the fact that BGM is a slow tempo song, the panning video slide speed is fast and the difference from other scenes is conspicuous, so it is not appropriate as one scene of the album video. As a result, the entire album video It will happen that the appearance of will be impaired. In view of the above, the present invention has an object to generate a good-looking moving image by generating a moving image according to the situation when generating a moving image from a panoramic image.

上述の課題を解決するため、本発明の画像処理装置は、
パノラマ画像を取得する取得手段と、パノラマ画像に基づいて動画を生成する動画生成手段であって、パノラマ画像をトリミングする際のトリミング領域の位置を順次移動してトリミングし、位置を変更してトリミングした複数のトリミング画像が順次再生される所定時間分の動画を生成する動画生成手段と、を有し、動画生成手段は、パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、パノラマ画像を所定のアスペクト比でトリミングするか、パノラマ画像を所定のアスペクト比と異なるアスペクト比でトリミングするかを切り替え、さらに、所定のアスペクト比と異なるアスペクト比でトリミングする場合に、パノラマ画像のアスペクト比または所定方向のサイズに応じて、所定時間よりも長い時間分の動画を生成することを特徴とする。
In order to solve the above-described problems, an image processing apparatus according to the present invention provides:
An acquisition unit that acquires a panoramic image and a moving image generation unit that generates a moving image based on the panoramic image, and sequentially trims the position of the trimming area when trimming the panoramic image, and changes the position to perform trimming. Moving image generating means for generating a moving image for a predetermined time in which the plurality of trimmed images are sequentially reproduced, and the moving image generating means determines the panoramic image according to the size or aspect ratio of the panoramic image in a predetermined direction. When the aspect ratio of the panorama image is switched or the panorama image is trimmed with an aspect ratio different from the predetermined aspect ratio, and the aspect ratio different from the predetermined aspect ratio is trimmed, the aspect ratio of the panoramic image or the predetermined direction is selected. Generate videos longer than the specified time depending on the size of And features.

または、本発明の画像処理装置は、
パノラマ画像を取得する取得手段と、パノラマ画像の一部領域をトリミングし、トリミングされた画像を表示するように制御する表示制御手段であって、1つのパノラマ画像について所定期間の表示を行うために、パノラマ画像のトリミング領域の位置を順次移動してトリミングし、位置を変更してトリミングしたトリミング画像を所定期間内に順次表示させるように制御する表示制御手段と、を有し、表示制御手段は、パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、パノラマ画像を所定のアスペクト比でトリミングするか、パノラマ画像を所定のアスペクト比と異なるアスペクト比でトリミングするかを切り替え、さらに、所定のアスペクト比と異なるアスペクト比でトリミングする場合に、パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、1つのパノラマ画像について表示する期間を所定期間よりも長い期間とすることを特徴とする。
Alternatively, the image processing apparatus of the present invention is
An acquisition unit that acquires a panoramic image, and a display control unit that controls to trim a partial area of the panoramic image and display the trimmed image, in order to display a single panoramic image for a predetermined period. Display control means for sequentially moving and trimming the position of the trimming area of the panoramic image and controlling the trimmed image that has been trimmed by changing the position within a predetermined period, and the display control means Depending on the size or aspect ratio of the panoramic image in a predetermined direction, the panorama image can be trimmed with a predetermined aspect ratio or the panoramic image can be trimmed with an aspect ratio different from the predetermined aspect ratio. When cropping with an aspect ratio different from the Depending on's or aspect ratio, characterized by a period for displaying the one panoramic image and a period longer than the predetermined time period.

本発明によれば、パノラマ画像から適切な動画を生成することができる。   According to the present invention, an appropriate moving image can be generated from a panoramic image.

デジタルカメラ100の構成ブロック図である。1 is a configuration block diagram of a digital camera 100. FIG. パノラマ撮影モードのフローチャートである。It is a flowchart of a panoramic shooting mode. パノラマ画像撮影時のデジタルカメラの動きと撮影画像の関係を示す図である。It is a figure which shows the relationship between the motion of a digital camera at the time of panoramic image photography, and a picked-up image. パノラマ画像撮影時の画像合成を説明する図である。It is a figure explaining the image composition at the time of panoramic image photography. 再生モードのフローチャートである。It is a flowchart of reproduction | regeneration mode. アルバム作成処理のフローチャートである。It is a flowchart of an album creation process. アルバム動画保存処理のフローチャートである。It is a flowchart of an album moving image saving process. JPEGデータをアルバム動画に追記する処理のフローチャートである。It is a flowchart of the process which adds JPEG data to an album moving image. パノラマ画像のトリミング方法の決定処理のフローチャートである。It is a flowchart of the determination process of the trimming method of a panoramic image. 横長のパノラマ画像のトリミングを説明するための模式図である。It is a schematic diagram for demonstrating trimming of a horizontally long panoramic image. MP4データをアルバム動画に追記する処理のフローチャートである。It is a flowchart of the process which adds MP4 data to an album moving image. BGMの合成処理のフローチャートである。It is a flowchart of a synthesis process of BGM. アルバム作成に関するメニュー表示の画面例である。It is an example of the screen display of the menu regarding album creation. 縦長のパノラマ画像のトリミングを説明するための模式図である。It is a schematic diagram for demonstrating trimming of a vertically long panoramic image. シナリオの構成を示す図である。It is a figure which shows the structure of a scenario.

[実施例1]
本実施例では撮像装置としてのデジタルカメラを例にとって説明するが、これ以外にもカメラ付き携帯電話などであってもよい。或いは、撮像装置で撮影した画像を記録媒体、または、通信を介して取得可能な情報処理装置、画像処理装置等で実現してもよい。
[Example 1]
In the present embodiment, a digital camera as an image pickup apparatus will be described as an example. Or you may implement | achieve with the information processing apparatus, image processing apparatus, etc. which can acquire the image image | photographed with the imaging device via a recording medium or communication.

以下、図1を用いて、本実施例の撮像装置(デジタルカメラ)100の主要な構成を説明する。   Hereinafter, the main configuration of the imaging apparatus (digital camera) 100 of the present embodiment will be described with reference to FIG.

図1において、制御部101は、例えば、CPU(MPU)、メモリ(DRAM、SRAM)、不揮発性メモリ(EEPROM)などから構成される。そして、不揮発性メモリ(EEPROM)からプログラムを読み出し、読み出したプログラムに基づいて各種処理を実行して撮像装置100の各ブロックを制御したり、各ブロック間でのデータ転送を制御したりする。また、制御部101は、ユーザからの操作を受け付ける操作部102からの操作信号に応じて、撮像装置100の各ブロックを制御する。また、制御部101は、後述の画像処理部111によって得られた画像を解析し、その解析結果に応じて、撮像装置100の各ブロックを制御する。   In FIG. 1, the control unit 101 includes, for example, a CPU (MPU), a memory (DRAM, SRAM), a nonvolatile memory (EEPROM), and the like. Then, the program is read from the nonvolatile memory (EEPROM), and various processes are executed based on the read program to control each block of the imaging apparatus 100, and to control data transfer between the blocks. Further, the control unit 101 controls each block of the imaging apparatus 100 in accordance with an operation signal from the operation unit 102 that receives an operation from the user. Further, the control unit 101 analyzes an image obtained by an image processing unit 111 described later, and controls each block of the imaging device 100 according to the analysis result.

操作部102は、例えば、電源ボタン、シャッターボタン(SW1,SW2)、動画記録開始ボタン、ズーム調整ボタン、オートフォーカスボタンなどの撮影に関連する各種操作を入力するスイッチ類からなる。また、メニュー表示ボタン、決定ボタン、その他カーソルキー、ポインティングデバイス、タッチパネル等からなり、ユーザによりこれらのキーやボタンが操作されると制御部101に操作信号を送信する。   The operation unit 102 includes switches for inputting various operations related to shooting such as a power button, a shutter button (SW1, SW2), a moving image recording start button, a zoom adjustment button, and an autofocus button. Further, it includes a menu display button, a determination button, other cursor keys, a pointing device, a touch panel, and the like. When these keys and buttons are operated by the user, an operation signal is transmitted to the control unit 101.

また、バス103は、各種データ、制御信号、指示信号などを撮像装置100の各ブロックに送るための汎用バスである。   The bus 103 is a general-purpose bus for sending various data, control signals, instruction signals, and the like to each block of the imaging apparatus 100.

不揮発性メモリ105は、電気的に消去・記録可能なメモリであり、制御部101の動作用の定数、プログラム等が記憶される。   The non-volatile memory 105 is an electrically erasable / recordable memory, and stores constants, programs, and the like for the operation of the control unit 101.

撮像部110は、レンズにより取り込まれた被写体の光学像を、絞りにより光量を制御して、CCDセンサやCMOSセンサ等の撮像素子により画像信号に変換し、アナログデジタル変換をして、画像処理部111に送信する。   The imaging unit 110 controls the light amount of the optical image of the subject captured by the lens using an aperture, converts the optical image into an image signal using an imaging element such as a CCD sensor or a CMOS sensor, performs analog-digital conversion, and performs an image processing unit. 111.

画像処理部111は、入力されたデジタル画像信号に、設定値に基づいてホワイトバランスや色、明るさなどを調整する画質調整処理を行う。そして、画像処理部111で処理された画像信号は、制御部101により、メモリ104や後述の映像出力部150や表示制御部131に送信される。   The image processing unit 111 performs image quality adjustment processing for adjusting white balance, color, brightness, and the like on the input digital image signal based on setting values. The image signal processed by the image processing unit 111 is transmitted by the control unit 101 to the memory 104, the video output unit 150, which will be described later, and the display control unit 131.

本実施例においては、例えば、撮像部110は、「光学ズーム」機能、「光学防振」機能を有し、画像処理部111は、「電子ズーム」機能、「電子防振」機能を有している。ここで、「光学ズーム」機能、「電子ズーム」機能は、ユーザの操作に応じて、得られる画像を拡大する機能である。また、「光学防振」機能、「電子防振」機能は、撮像装置100本体の振動による画像の揺れを防止する機能である。そして、これらの機能は、制御部101の制御の元、同時に使用されたり交互に使用されたり、単独で使用されたりする。   In this embodiment, for example, the imaging unit 110 has an “optical zoom” function and an “optical image stabilization” function, and the image processing unit 111 has an “electronic zoom” function and an “electronic image stabilization” function. ing. Here, the “optical zoom” function and the “electronic zoom” function are functions for enlarging an obtained image in accordance with a user operation. In addition, the “optical image stabilization” function and the “electronic image stabilization” function are functions that prevent image shake due to vibration of the imaging apparatus 100 main body. These functions are used simultaneously, alternately, or independently under the control of the control unit 101.

ここで、「光学ズーム」機能とは、ユーザにより操作部102のズームキーが操作されたことに応じて、撮像部110のレンズを移動させ、取り込まれる被写体の光学像を拡大/縮小する機能である。また、「電子ズーム」機能とは、ユーザにより操作部102のズームキーが操作されたことに応じて、画像処理部111が、撮像部110により生成された画像のうち一部を切り出した画像を拡大した画像信号を生成する処理である。また、「光学防振」機能とは、不図示の振動検出部からの加速度信号の値に基づいて、レンズの移動量を算出し、レンズを移動させることで、取得される画像の揺れを防止する機能である。また、「電子防振」機能とは、不図示の振動検出部からの加速度信号の値に基づいて、撮像部110により取得された画像信号の位置を調整することにより、画像の揺れを防止する機能である。また、「電子防振」機能は、不図示の振動検出部からの加速度信号の値に基づいて、撮像部110の撮像素子における読み出し位置をずらすことによっても実現できる。これらの機能は公知の技術であるため、詳細な説明は省略する。   Here, the “optical zoom” function is a function for enlarging / reducing the optical image of the captured subject by moving the lens of the imaging unit 110 in response to the user operating the zoom key of the operation unit 102. . In addition, the “electronic zoom” function refers to an enlargement of an image obtained by cutting out a part of the image generated by the imaging unit 110 by the image processing unit 111 in response to the user operating the zoom key of the operation unit 102. This is a process for generating the processed image signal. The “optical image stabilization” function calculates the amount of lens movement based on the value of an acceleration signal from a vibration detection unit (not shown), and prevents the image from being shaken by moving the lens. It is a function to do. Further, the “electronic image stabilization” function prevents image shaking by adjusting the position of the image signal acquired by the imaging unit 110 based on the value of an acceleration signal from a vibration detection unit (not shown). It is a function. The “electronic image stabilization” function can also be realized by shifting the readout position of the image sensor of the imaging unit 110 based on the value of an acceleration signal from a vibration detection unit (not shown). Since these functions are well-known techniques, detailed description is omitted.

また、音声入力部120は、例えば、内蔵された無指向性のマイクまたは音声入力端子を介して接続された外部マイク等により、撮像装置100の周囲の音声を集音(収音)し、アナログデジタル変換をして音声処理部121に送信する。音声処理部121は、入力されたデジタル音声信号のレベルの適正化処理等の音声に関する処理を行う。そして、音声処理部121で処理された音声信号は、制御部101によりメモリ104に送信される。メモリ104は、画像処理部111、音声処理部121により得られた画像信号及び音声信号を一時的に記憶する。   The audio input unit 120 collects (collects) audio around the imaging apparatus 100 using, for example, a built-in omnidirectional microphone or an external microphone connected via an audio input terminal, and analog It performs digital conversion and transmits it to the audio processing unit 121. The sound processing unit 121 performs sound-related processing such as level optimization processing of the input digital sound signal. The audio signal processed by the audio processing unit 121 is transmitted to the memory 104 by the control unit 101. The memory 104 temporarily stores the image signal and the audio signal obtained by the image processing unit 111 and the audio processing unit 121.

画像処理部111及び音声処理部121は、メモリ104に一時的に記憶された画像信号や音声信号を読み出して画像信号の符号化、音声信号の符号化などを行い、圧縮画像信号、圧縮音声信号等を生成する。制御部101は、これらの圧縮画像信号、圧縮音声信号を、記録再生部140に送信する。   The image processing unit 111 and the audio processing unit 121 read out the image signal and the audio signal temporarily stored in the memory 104 and perform the encoding of the image signal, the encoding of the audio signal, and the like, and the compressed image signal and the compressed audio signal And so on. The control unit 101 transmits the compressed image signal and the compressed audio signal to the recording / reproducing unit 140.

記録再生部140は、記録媒体141に対して画像処理部111及び音声処理部121で生成された圧縮画像信号、圧縮音声信号、その他撮影に関する制御データ等を記録する。また、音声信号を圧縮符号化しない場合には、制御部101は、音声処理部121により生成された音声信号と画像処理部111により生成された圧縮画像信号とを、記録再生部140に送信し記録媒体141に記録させる。   The recording / reproducing unit 140 records the compressed image signal generated by the image processing unit 111 and the audio processing unit 121, the compressed audio signal, and other control data related to shooting on the recording medium 141. When the audio signal is not compression-encoded, the control unit 101 transmits the audio signal generated by the audio processing unit 121 and the compressed image signal generated by the image processing unit 111 to the recording / reproducing unit 140. Recording is performed on the recording medium 141.

記録媒体141は、撮像装置に内蔵された記録媒体でも、取外し可能な記録媒体でもよい。記録媒体141には、撮像装置100で生成した圧縮画像信号、圧縮音声信号、音声信号、後述するBGMデータを含む各種データなどを記録することができ、不揮発性メモリ105よりも大容量な媒体が一般的に使用される。例えば、記録媒体141は、ハードディスク、光ディスク、光磁気ディスク、CD−R、DVD−R、磁気テープ、不揮発性の半導体メモリ、フラッシュメモリ、などのあらゆる方式の記録媒体を含む。   The recording medium 141 may be a recording medium built in the imaging apparatus or a removable recording medium. The recording medium 141 can record a compressed image signal, a compressed audio signal, an audio signal, various data including BGM data, which will be described later, and the like generated by the imaging apparatus 100, and has a larger capacity than the non-volatile memory 105. Generally used. For example, the recording medium 141 includes all types of recording media such as a hard disk, an optical disk, a magneto-optical disk, a CD-R, a DVD-R, a magnetic tape, a nonvolatile semiconductor memory, and a flash memory.

また、記録再生部140は、記録媒体141に記録された圧縮画像信号、圧縮音声信号、音声信号、各種データ、プログラムを読み出す(再生する)。そして読み出した圧縮画像信号、圧縮音声信号を、制御部101は画像処理部111及び音声処理部121に送信する。画像処理部111及び音声処理部121は、圧縮画像信号、圧縮音声信号を一時的にメモリ104に記憶させ、所定の手順で復号し、復号した音声信号を音声出力部151へ、復号化した画像信号を映像出力部150や表示制御部131に送信する。また、音声信号が記録媒体141に非圧縮記録されている場合には、制御部101は、音声信号を直接音声出力部151に送信する。   The recording / reproducing unit 140 reads (reproduces) a compressed image signal, a compressed audio signal, an audio signal, various data, and a program recorded on the recording medium 141. Then, the control unit 101 transmits the read compressed image signal and compressed audio signal to the image processing unit 111 and the audio processing unit 121. The image processing unit 111 and the audio processing unit 121 temporarily store the compressed image signal and the compressed audio signal in the memory 104, decode them in a predetermined procedure, and decode the decoded audio signal to the audio output unit 151. The signal is transmitted to the video output unit 150 and the display control unit 131. When the audio signal is recorded in the recording medium 141 in a non-compressed manner, the control unit 101 transmits the audio signal directly to the audio output unit 151.

音声出力部151は、例えば音声出力端子からなり、接続されたイヤホンやスピーカなどから音声を出力させるために音声信号を送信する。また、音声出力部151は、撮像装置100に内蔵され、音声信号にかかる音声を出力するスピーカであってもよい。映像出力部150は、例えば映像出力端子からなり、接続された外部ディスプレイ等に映像を表示させるために画像信号を送信する。また、音声出力部151、映像出力部150は、統合された1つの端子、例えばHDMI(登録商標)(High−Definition Multimedia Interface)端子のような端子であってもよい。   The audio output unit 151 includes an audio output terminal, for example, and transmits an audio signal in order to output audio from a connected earphone or speaker. In addition, the audio output unit 151 may be a speaker that is built in the imaging apparatus 100 and outputs audio related to an audio signal. The video output unit 150 includes, for example, a video output terminal, and transmits an image signal to display a video on a connected external display or the like. The audio output unit 151 and the video output unit 150 may be a single integrated terminal, for example, a terminal such as an HDMI (registered trademark) (High-Definition Multimedia Interface) terminal.

また、表示制御部131は、画像処理部111から送信された画像信号による映像や、撮像装置100の操作をするための操作画面(メニュー画面)等を表示部130に表示させる。表示部130は、例えば、液晶ディスプレイ、有機ELディスプレイ、電子ペーパー等の表示デバイスであれば何でもよい。   In addition, the display control unit 131 causes the display unit 130 to display a video based on the image signal transmitted from the image processing unit 111, an operation screen (menu screen) for operating the imaging apparatus 100, and the like. The display unit 130 may be any display device such as a liquid crystal display, an organic EL display, and electronic paper.

通信部152は、撮像装置100と外部装置との間で通信を行うもので、例えば、音声信号、画像信号、圧縮音声信号、圧縮画像信号などのデータを送信したり受信したりする。また、撮影開始や終了コマンド等の、撮影にかかる制御信号や、その他の情報を送信したり受信したりする。通信部152は、例えば、赤外線通信モジュール、Bluetooth(登録商標)通信モジュール、無線LAN通信モジュール、WirelessUSB、GPS受信機等の無線通信モジュールである。   The communication unit 152 performs communication between the imaging device 100 and an external device. For example, the communication unit 152 transmits or receives data such as an audio signal, an image signal, a compressed audio signal, and a compressed image signal. Also, it transmits and receives control signals related to shooting, such as shooting start and end commands, and other information. The communication unit 152 is, for example, a wireless communication module such as an infrared communication module, a Bluetooth (registered trademark) communication module, a wireless LAN communication module, a wireless USB, or a GPS receiver.

ここで、本実施例の撮像装置100の通常の動作について説明する。   Here, the normal operation of the imaging apparatus 100 of the present embodiment will be described.

本実施例の撮像装置100は、ユーザが操作部102の電源ボタンを操作すると、操作部102から制御部101に起動の指示が出される。この指示を受けて、制御部101は、不図示の電源供給部を制御して、撮像装置100の各ブロックに対して電源を供給させる。   In the imaging apparatus 100 according to the present exemplary embodiment, when the user operates the power button of the operation unit 102, a start instruction is issued from the operation unit 102 to the control unit 101. Upon receiving this instruction, the control unit 101 controls a power supply unit (not shown) to supply power to each block of the imaging apparatus 100.

電源が供給されると、制御部101は、例えば、操作部102のモード切り換えスイッチが、例えば、静止画撮影モード、動画撮影モード、再生モード等のどのモードであるかを操作部102からの指示信号により確認する。   When power is supplied, for example, the control unit 101 instructs the operation unit 102 to indicate which mode, for example, the still image shooting mode, the moving image shooting mode, the playback mode, or the like, of the mode switching switch of the operation unit 102. Check by signal.

静止画撮影モードでは、撮像装置100は撮影待機状態でユーザが操作部102の静止画記録ボタンを操作することで撮影を行い、圧縮画像信号が記録媒体141に記録される。そして再び撮影待機状態になる。動画撮影モードでは、撮像装置100は撮影待機状態でユーザが操作部102の動画記録開始ボタンを操作することで撮影を開始し、その間、圧縮画像信号と圧縮音声信号または音声信号が記録媒体141に記録される。そしてユーザが操作部102の動画記録終了ボタンを操作することで撮影を終了し、再び撮影待機状態になる。再生モードでは、ユーザが選択したファイルに関する圧縮画像信号や圧縮音声信号または音声信号を記録媒体141から再生して、音声出力部151から音声信号を出力し、表示部130に映像を表示させる。   In the still image shooting mode, the imaging apparatus 100 captures an image when the user operates a still image recording button of the operation unit 102 in a shooting standby state, and a compressed image signal is recorded on the recording medium 141. And it will be in a photography standby state again. In the moving image shooting mode, the imaging apparatus 100 starts shooting when the user operates the moving image recording start button of the operation unit 102 in a shooting standby state. During that time, the compressed image signal and the compressed audio signal or audio signal are transferred to the recording medium 141. To be recorded. Then, when the user operates the moving image recording end button of the operation unit 102, the photographing is finished, and the photographing standby state is entered again. In the reproduction mode, a compressed image signal, a compressed audio signal, or an audio signal related to a file selected by the user is reproduced from the recording medium 141, an audio signal is output from the audio output unit 151, and an image is displayed on the display unit 130.

以下、撮像装置100における各種処理について、図2、5,6,7、8,9、11,12のフローチャートを参照して説明する。これらのフローチャートの処理については、制御部101が、不揮発性メモリ105から読み出したプログラムに基づいて、制御部101により実行される。   Hereinafter, various processes in the imaging apparatus 100 will be described with reference to flowcharts of FIGS. 2, 5, 6, 7, 8, 9, 11, and 12. The processing of these flowcharts is executed by the control unit 101 based on the program read from the nonvolatile memory 105 by the control unit 101.

図2は、パノラマ撮影モードにおけるパノラマ画像の撮影処理。パノラマ撮影モードにおけるパノラマ画像の撮影処理を示すフローチャートである。   FIG. 2 shows panorama image shooting processing in the panorama shooting mode. 6 is a flowchart illustrating panorama image shooting processing in a panorama shooting mode.

撮像装置100では、操作部102に含まれるモード切り替えスイッチを切り替えることで、SW2を押し続けながら撮像装置100を左から右へ移動さることによってパノラマ画像を記録するパノラマ撮影モードを選択することができる。本実施形態では、左から右に移動させることとしたが、右から左や、上下に移動させて撮影するようにしてもよい。   In the imaging apparatus 100, a panoramic shooting mode for recording a panoramic image can be selected by moving the imaging apparatus 100 from the left to the right while continuing to hold down SW2 by switching a mode change switch included in the operation unit 102. . In the present embodiment, the camera is moved from left to right. However, the image may be moved from right to left or moved up and down.

また、パノラマ撮影モードにおける撮像装置100の動作を図示したものが図3である。   FIG. 3 illustrates the operation of the imaging apparatus 100 in the panoramic shooting mode.

パノラマ撮影モードでは、図3のように、301から30Nの状態まで撮像装置100を右に移動しながら連続撮影をおこなう。この時撮影される画像がP(0)〜P(N)である。この複数枚連続撮影された画像の前後の画像P(n)、P(n−1)の位置合わせを行い結合し続けることによって、最終的にパノラマ画像301を記録することができる。   In the panorama shooting mode, continuous shooting is performed while moving the imaging device 100 to the right from 301 to 30N as shown in FIG. Images captured at this time are P (0) to P (N). The panoramic image 301 can be finally recorded by aligning and continuing to combine the images P (n) and P (n−1) before and after the images continuously photographed.

パノラマ撮影モードでは、ステップS201にて、制御部101は、SW1が押下されたか確認をおこない、押下されていればステップS202に進みそうでなければ、再びステップS201に戻る。   In the panorama shooting mode, in step S201, the control unit 101 confirms whether SW1 has been pressed. If not, the control unit 101 returns to step S201 again.

SW1が押下された場合、ステップS202では、AF(オートフォーカス)処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理、EF(フラッシュプリ発光)処理を実行するように、制御部101が各ブロックに指示する。   When SW1 is pressed, in step S202, the control unit 101 performs an AF (auto focus) process, an AE (auto exposure) process, an AWB (auto white balance) process, and an EF (flash pre-flash) process. Instruct each block.

ステップS203では、制御部101は、SW1が押下中であるか確認をおこない、押下されていればステップS204に進みそうでなければ、再びステップS201に戻る。   In step S203, the control unit 101 confirms whether or not SW1 is being pressed. If not, the control unit 101 returns to step S201 again.

ステップS204では、制御部101は、SW2が押下されたか確認をおこない、押下されていればステップS205に進みそうでなければ、ステップS203に戻る。   In step S204, the control unit 101 confirms whether SW2 is pressed. If the switch is pressed, the control unit 101 returns to step S203.

ステップS205にて、制御部101は、パノラマ撮影モードでの1つのパノラマ画像の撮影時に、画像が撮像された回数を示す変数nを0に初期化する。   In step S205, the control unit 101 initializes a variable n indicating the number of times an image has been captured to 0 when capturing one panoramic image in the panorama capturing mode.

ステップS206では撮影処理をおこない、制御部101が撮像部110から得られた画像P(n)を画像処理部111で画像処理を施した後にメモリ104に格納する。   In step S206, a photographing process is performed, and the control unit 101 stores the image P (n) obtained from the imaging unit 110 in the memory 104 after the image processing unit 111 performs the image processing.

ステップS207では、nが0でないか比較し、0であればステップS211に進み、そうでなければステップS208へと進む。ここでは、nが0である場合を想定してステップS211に進む。   In step S207, whether n is not 0 is compared. If it is 0, the process proceeds to step S211; otherwise, the process proceeds to step S208. Here, assuming that n is 0, the process proceeds to step S211.

ステップS211では、撮影数を示す変数nに1加える。   In step S211, 1 is added to the variable n indicating the number of shots.

ステップS212では、nが所定数に達したか確認をおこない、達していればステップS213へと進む。そうでなければステップS206へと戻る。この所定数は、1つのパノラマ画像の撮影時に画像を撮影可能な最大回数であり、記録サイズや、メモリの容量等によって予め設定しておく。   In step S212, it is checked whether n has reached a predetermined number, and if it has reached, the process proceeds to step S213. Otherwise, the process returns to step S206. This predetermined number is the maximum number of times that an image can be taken when one panoramic image is taken, and is set in advance according to the recording size, memory capacity, and the like.

ステップS213では、SW2が押下され続けているか確認をおこない、押下されていればステップS206へ進む。そうでなければステップS214へ進む。   In step S213, it is confirmed whether or not SW2 is continuously pressed. If it is pressed, the process proceeds to step S206. Otherwise, the process proceeds to step S214.

続いて、ステップS207でnが1以上の場合に行う、ステップS208〜ステップS210の処理について説明をおこなう。   Subsequently, the processing of step S208 to step S210 performed when n is 1 or more in step S207 will be described.

ステップS208では、メモリ104に格納されている、撮影した最新の画像P(n)と、1回前に撮影した画像P(n−1)の画像の位置合わせ処理を画像処理部111にて行う。   In step S208, the image processing unit 111 performs alignment processing between the latest captured image P (n) stored in the memory 104 and the image P (n-1) captured one time before. .

位置合わせ処理の例を図示したものが図4である。まず、位置合わせ処理では、新たに撮影したP(n)上の12個のブロックB(n)[n=0〜11]を設定する。B(n)は、P(n−1)と重なる領域が含まれるように、パノラマ撮影におけるカメラの移動方向と逆方向の端部側の領域、つまり、本実施形態では、左から右にカメラを移動して撮影するので、P(n)の右側の領域に設定される。そして、B(n)それぞれの領域が、前に撮影したP(n−1)上のどの位置に対応するか(以下、対応ブロック位置と称す)探索をおこなう。   FIG. 4 shows an example of the alignment process. First, in the alignment process, 12 blocks B (n) [n = 0 to 11] on P (n) newly photographed are set. B (n) is an area on the end side opposite to the moving direction of the camera in panoramic photography, that is, in this embodiment, from left to right so that an area overlapping P (n−1) is included. Since the image is moved, the region on the right side of P (n) is set. Then, a search is performed on which position on each P (n-1) imaged previously (hereinafter referred to as a corresponding block position).

対応ブロック位置の決定方法としては、ブロックの領域の画素の高周波成分の差分が最小となる個所を対応ブロック位置とする方法や、画素の差分絶対値の和が最小となるものを対応ブロック位置とする方法等を用いる。   As a method for determining the corresponding block position, a method in which the position where the difference in the high-frequency component of the pixel in the block region is the minimum is set as the corresponding block position, or the case where the sum of the absolute difference values of the pixels is the minimum is determined as the corresponding block position. The method to do is used.

対応ブロック位置の理想的な探索結果B’(n)を示したものが図4(2)である。図4(2)は理想的な探索結果を図示しており、各ブロックの位置関係がP(n)上の位置関係と同様に等間隔になっている。しかしながら、一般的には、撮影中に被写体が動作中であったり、撮像装置のランダムノイズなどが影響することにより理想的な形にはならない。   FIG. 4 (2) shows an ideal search result B ′ (n) for the corresponding block position. FIG. 4 (2) shows an ideal search result, and the positional relationship of each block is equally spaced, as is the positional relationship on P (n). However, in general, the subject is not in an ideal shape due to the subject being in motion during shooting or the influence of random noise of the imaging device.

対応ブロック位置の実際の探索結果B’’(n)を図示したものが図4(3)である。このような場合は、相対的な位置が大きくずれた個所を除外して、位置関係がずれていない太字のブロックのみを用いて位置決めをおこなう。   FIG. 4 (3) shows an actual search result B ″ (n) of the corresponding block position. In such a case, a position where the relative position is greatly shifted is excluded, and positioning is performed using only the bold blocks whose positional relationship is not shifted.

ステップS209では、ステップS208で探索したブロックで相対的な位置関係がずれていないブロックの個数を合成信頼度としてメモリ104に記憶する。つまり、合成信頼度とは、合成する2枚の画像間の合成箇所を、ブロックごとにパターンマッチングして類似度を算出し、類似度が所定値以上となった、合成時に位置決めに使用されるブロックの数のことである。位置関係がずれていない位置決めに使用されたブロックの個数が多いほど結合が正しくできたものと判断可能である。そのため、合成時に位置決めに使用される位置関係がずれていないブロックの個数は合成処理がどれほどの精度で正しくなされたかを示す数値であると考えることができる。   In step S209, the number of blocks whose relative positional relationship is not shifted among the blocks searched in step S208 is stored in the memory 104 as the composite reliability. In other words, the composition reliability is used for positioning at the time of composition when the composition part between two images to be synthesized is subjected to pattern matching for each block to calculate the similarity, and the similarity is equal to or greater than a predetermined value. It is the number of blocks. It can be determined that as the number of blocks used for positioning in which the positional relationship is not deviated increases, the coupling is correctly performed. Therefore, the number of blocks whose positional relationship used for positioning at the time of composition is not shifted can be considered as a numerical value indicating how accurately the composition processing has been performed.

ステップS210では、ステップS208の位置合わせの結果を元に合成をおこない、P(n−1)としてメモリ104に格納する。   In step S210, composition is performed based on the alignment result in step S208, and the result is stored in the memory 104 as P (n-1).

こうして得られメモリ104に格納された画像が、S213においてSW2がOFFになったと判断されると、ステップS214にてJPEG画像として外部記録媒体141に記録する。ステップS209で得られた合成信頼度の情報も画像と共に画像情報(属性情報)として記録される。   If it is determined that the SW2 is turned off in S213, the image thus obtained and stored in the memory 104 is recorded on the external recording medium 141 as a JPEG image in step S214. Information on the composition reliability obtained in step S209 is also recorded as image information (attribute information) together with the image.

以上のように、パノラマ画像の撮影を行う。   As described above, panoramic images are taken.

次に図5を用いて再生モード処理について説明する。   Next, the playback mode process will be described with reference to FIG.

ステップS501では、制御部101は、記録媒体141から記録媒体141に記録されている画像の画像情報を取得しメモリ104に記憶する。そして、記録媒体141から最新の画像を読み出して最新画像を表示部130に表示し、ステップS502へ進む。   In step S <b> 501, the control unit 101 acquires image information of an image recorded on the recording medium 141 from the recording medium 141 and stores it in the memory 104. Then, the latest image is read from the recording medium 141 and displayed on the display unit 130, and the process proceeds to step S502.

ステップS502では、制御部101は、操作部102のアルバムボタンが押下されたか否かの判定を行う。アルバムボタンが押下されたと判定した場合、ステップS503へ進み、アルバムボタンが押下されていないと判定した場合はステップS507へ進む。   In step S502, the control unit 101 determines whether the album button of the operation unit 102 has been pressed. If it is determined that the album button has been pressed, the process proceeds to step S503. If it is determined that the album button has not been pressed, the process proceeds to step S507.

ステップS503では、制御部101は、図13の1301のようなアルバム選択画面を表示する。アルバム選択画面では、「イベント」「日付」「人物」「カスタム」の4つのアルバム選択アイコンの中から、1つを選択することにより、アルバムの再生対象とする画像の条件を選択できる。「イベント」を選択すると、現在表示部130に表示している画像の撮影日を基準として、数日間に撮影された画像をアルバム再生対象画像の選択条件とする。「日付」を選択すると、現在表示部130に表示している画像と同じ撮影日の画像をアルバム再生対象画像の選択条件とする。「人物」を選択すると、現在表示部130に表示している画像から人物を検出し、検出した人物と同じ人物が含まれる画像、または、関連する人物が含まれる画像をアルバム再生対象画像の選択条件とする。「カスタム」を選択すると、ユーザに日付、画像、人物等を選択させ、選択された日付、画像、人物に従って、アルバム再生対象画像の選択条件を決定する。   In step S503, the control unit 101 displays an album selection screen such as 1301 in FIG. On the album selection screen, by selecting one of the four album selection icons of “event”, “date”, “person”, and “custom”, it is possible to select the conditions of the images to be reproduced in the album. When “Event” is selected, an image captured for several days is set as a selection condition for the album playback target image based on the shooting date of the image currently displayed on the display unit 130. When “Date” is selected, an image on the same shooting date as the image currently displayed on the display unit 130 is set as a selection condition for the album reproduction target image. When “person” is selected, a person is detected from the images currently displayed on the display unit 130, and an image including the same person as the detected person or an image including a related person is selected as an album playback target image. Condition. When “Custom” is selected, the user is allowed to select a date, an image, a person, and the like, and the selection condition for the album playback target image is determined according to the selected date, image, and person.

なお、本実施形態では、アルバムの対象となることが可能なアルバム対象画像は、撮像装置100で自己録された静止画、動画とするため、S501で取得した画像情報を用いて、予めアルバム対象画像が存在するか否かの判定を行ってもよい。アルバム対象画像が存在しないと判定された場合、アルバム選択画面のアルバム選択アイコンをグレーアウト表示してもよい。また、現在表示中の画像と同じ撮影日のアルバム対象画像が所定数よりも少ない場合には「日付」アイコンをグレーアウトしたり、現在表示中の画像に含まれる人物を有するアルバム対象画像が所定数よりも少ない場合には「人物」アイコンをグレーアウトしてもよい。   Note that in this embodiment, the album target images that can be the target of the album are still images and moving images that are self-recorded by the imaging apparatus 100, and therefore the album target image is acquired in advance using the image information acquired in S501. It may be determined whether an image exists. When it is determined that the album target image does not exist, the album selection icon on the album selection screen may be grayed out. In addition, when the number of album target images having the same shooting date as the currently displayed image is smaller than a predetermined number, the “date” icon is grayed out, or a predetermined number of album target images having a person included in the currently displayed image are displayed. If the number is smaller, the “person” icon may be grayed out.

ステップS504では、制御部101は、操作部102を用いて、アルバム選択画面において作成するアルバムが選択されたか否かの判定を行う。アルバムが選択された場合、ステップS505へ進み、アルバムが選択されない場合はS506へ進む。   In step S504, the control unit 101 uses the operation unit 102 to determine whether an album to be created is selected on the album selection screen. If an album is selected, the process proceeds to step S505, and if an album is not selected, the process proceeds to S506.

ステップS505では、制御部101において、アルバム作成を行い、ステップS506へ進む。アルバム作成処理に関しては図6において説明する。   In step S505, the control unit 101 creates an album and proceeds to step S506. The album creation process will be described with reference to FIG.

ステップS506では、制御部101は、アルバム選択画面において「終了」が選択されたか、つまり、アルバムモードを終了するか否かの判定を行う。アルバムモードを終了する場合、ステップS507へ進み、アルバムモード終了しない場合ステップS503へ進む。   In step S506, the control unit 101 determines whether “End” has been selected on the album selection screen, that is, whether or not to end the album mode. If the album mode is to be ended, the process proceeds to step S507, and if the album mode is not to be ended, the process proceeds to step S503.

ステップS507では、制御部101は、ユーザから再生モードの終了の操作を受け付けて、再生モード終了か否かの判定を行う。再生モードが終了する場合、再生モードを終了し、再生モードを終了しない場合ステップS508へ進む。   In step S507, the control unit 101 receives an operation for ending the playback mode from the user, and determines whether or not the playback mode is ended. When the playback mode ends, the playback mode ends, and when the playback mode does not end, the process proceeds to step S508.

ステップS508では、制御部101は、操作部102より指示されたその他の再生処理を行いステップS502へ進む。その他処理は、例えば、表示部130に表示される画像を切り替える画像送り処理や、動画の再生処理、画像消去、画像編集、画像送信等である。   In step S508, the control unit 101 performs other reproduction processing instructed by the operation unit 102, and proceeds to step S502. Other processes include, for example, an image sending process for switching an image displayed on the display unit 130, a moving image reproduction process, an image erasing process, an image editing process, an image transmission process, and the like.

以上のように、再生モード処理を行う。   As described above, the playback mode processing is performed.

次に図6を用いて、ステップS505で実行されるアルバム作成処理について説明する。   Next, the album creation process executed in step S505 will be described with reference to FIG.

ステップS601では、制御部101は、メモリ104に読み込まれたアルバム対象画像を用いて、シナリオ作成処理を行い、作成したシナリオをメモリ104に記録する。シナリオ作成処理では、まずは、アルバム動画に用いる静止画及び動画像を選抜する。前に説明したように、「日付」でアルバム動画を作成する場合は、その日付に撮影された画像を選抜し、「人物」でアルバム動画を作成する場合は、その人物が被写体として撮影されたことが画像の画像情報に記録されている画像を選抜する。「イベント」でアルバム動画を作成する場合は、表示画像の撮影日を基準として数日間に撮影された画像を選抜する。そして、ユーザがアルバム動画の作成で「カスタム」を選んだ場合は、ユーザが選択した画像を選抜画像とする。   In step S <b> 601, the control unit 101 performs scenario creation processing using the album target image read into the memory 104 and records the created scenario in the memory 104. In the scenario creation process, first, still images and moving images used for the album moving image are selected. As explained before, when creating an album video with “Date”, the images taken on that date are selected, and when creating an album video with “People”, the person was taken as the subject. Select an image recorded in the image information of the image. When creating an album video by “event”, images taken for several days are selected based on the shooting date of the display image. When the user selects “custom” in creating the album moving image, the image selected by the user is selected.

画像の選抜が終了したら、アルバムとして選抜された画像の再生順(表示順)を決定し、図15のようなシナリオを作成する。シナリオには、再生対象の画像毎に、シーン番号1501、ファイル情報1502、チャプタ1503、フレーム数1504、画像サイズ1505、パノラマ画像フラグ1506等が再生順で記載される。シーン番号1501は、画像の再生順を示しており、1から始まる。ファイル情報1502は、再生対象の画像を特定するための情報が記載されており、本実施形態では、画像のファイルパスが記録されている。ファイルパスでなく、画像が特定できる、ハンドルや識別IDなどをファイル情報1502として記録してもよい。チャプタ1503には、再生対象の画像が動画の場合に、再生対象とするチャプタの番号が記載される。静止画の場合には記載されない。このように、動画については、再生対象として、動画全体ではなく、チャプタ毎に再生対象を指定する。フレーム数1504には、再生する際のフレーム数が記載される。動画のチャプタが再生対象として指定されている場合は、そのチャプタのフレーム数がフレーム数1504に記録される。静止画の場合は、通常の画像の場合は60、パノラマ画像の場合は120とする。本実施形態では、アルバム動画の再生および記録は、30fpsのフレームレートで行われる。つまり、通常の静止画の場合は2秒間再生され、パノラマ画像の場合は、4秒間再生されることになる。縦横サイズ1505には、再生対象の画像の縦横のサイズが記載される。パノラマ画像フラグ1506には、再生対象の画像がパノラマ画像であるかを示す情報が記載される。このようなシナリオを作成することにより、再生対象となる画像について、再生順、再生時間、動画については再生対象となるチャプタを指定することができる。また、これらの情報の他にも、シナリオ全体の情報として、BGM設定の情報や、シナリオ全体のフレーム数の情報も記録する。   When the image selection is completed, the playback order (display order) of the images selected as the album is determined, and a scenario as shown in FIG. 15 is created. In the scenario, scene number 1501, file information 1502, chapter 1503, number of frames 1504, image size 1505, panorama image flag 1506, and the like are described in the order of reproduction for each image to be reproduced. A scene number 1501 indicates the playback order of images, and starts from 1. The file information 1502 describes information for specifying an image to be reproduced. In this embodiment, the file path of the image is recorded. Instead of the file path, a handle, identification ID, or the like that can identify the image may be recorded as the file information 1502. The chapter 1503 describes the number of the chapter to be played back when the playback target image is a moving image. It is not described for still images. As described above, for a moving image, the reproduction target is designated for each chapter instead of the entire moving image. The number of frames 1504 describes the number of frames used for reproduction. When a chapter of a moving image is designated as a playback target, the number of frames of that chapter is recorded as the number of frames 1504. In the case of a still image, 60 is set for a normal image, and 120 is set for a panoramic image. In this embodiment, the reproduction and recording of the album moving image is performed at a frame rate of 30 fps. That is, a normal still image is played back for 2 seconds, and a panoramic image is played back for 4 seconds. The vertical and horizontal size 1505 describes the vertical and horizontal sizes of the image to be reproduced. The panorama image flag 1506 describes information indicating whether the image to be reproduced is a panorama image. By creating such a scenario, it is possible to specify the playback order, the playback time, and the chapter to be played back for the moving image for the playback target image. In addition to these pieces of information, information on BGM settings and information on the number of frames in the entire scenario are also recorded as information on the entire scenario.

ステップS602では、制御部101は、図13(1305)のアルバム設定変更メニュー1305を表示部130に表示させる。   In step S602, the control unit 101 causes the display unit 130 to display the album setting change menu 1305 in FIG. 13 (1305).

ステップS603、S605、S608、S610では、アルバム設定変更メニューでの操作部102への操作を監視し、アルバム動画作成1306、BGM設定1307、プレビュー再生1308、終了1309のうちのいずれかが選択されたことを判定する。いずれかが選択されるまで、ステップS603、S605、S608、S610の処理を繰り返す。ステップS603で、BGM設定1307が選択されたと判定した場合、S604へ進む。   In steps S603, S605, S608, and S610, the operation on the operation unit 102 in the album setting change menu is monitored, and one of album moving image creation 1306, BGM setting 1307, preview playback 1308, and end 1309 is selected. Judge that. Until any one is selected, the processes in steps S603, S605, S608, and S610 are repeated. If it is determined in step S603 that the BGM setting 1307 has been selected, the process proceeds to S604.

ステップS604では、制御部101はBGM設定を行う。撮像装置100の記録媒体141に予め記録されている複数のBGMからアルバム動画に合成するBGMを選択したり、動画の音声とBGMとをミックスする際の音声合成率などを選択したりする。設定した内容は、シナリオに記録し、その後、ステップS603に戻る。このときBGM設定の付属情報を併せてシナリオに記録する。BGMの付属情報とは、BGMがどのような曲、例えば、スローな曲、テンポの速い曲、さらには、曲の再生時間、音声合成率などを設定する。   In step S604, the control unit 101 performs BGM setting. A BGM to be combined with an album video is selected from a plurality of BGMs recorded in advance on the recording medium 141 of the imaging apparatus 100, or a voice synthesis rate when the audio of the video and the BGM are mixed is selected. The set contents are recorded in the scenario, and then the process returns to step S603. At this time, the attached information of the BGM setting is also recorded in the scenario. The BGM auxiliary information sets what kind of music the BGM has, for example, a slow music, a fast-tempo music, a music playback time, a voice synthesis rate, and the like.

ステップS605で、アルバム動画保存1306が選択されたと判定された場合、ステップS606へ進む。   If it is determined in step S605 that the album moving image storage 1306 has been selected, the process proceeds to step S606.

ステップS606では、ステップS601で作成したシナリオに基づきアルバム動画保存を行う。アルバム動画保存処理について図7で説明する。アルバム動画保存が完了すると、制御部101は再生モードへ遷移するように制御し(ステップS607)、アルバム作成処理を終了する。   In step S606, album moving image storage is performed based on the scenario created in step S601. The album moving image saving process will be described with reference to FIG. When the album moving image storage is completed, the control unit 101 performs control so as to shift to the reproduction mode (step S607), and the album creation process is ended.

ステップS608で、アルバム再生1308が選択されたと判定された場合、ステップS609へ進む。ステップS609では、シナリオに基づいて、アルバム動画の再生を行う。   If it is determined in step S608 that the album playback 1308 has been selected, the process proceeds to step S609. In step S609, the album moving image is reproduced based on the scenario.

ステップS610で、終了1309が選択されたと判定された場合、制御部101は、再生モードへ遷移するように制御し(ステップS607)、アルバム作成処理を終了する。   If it is determined in step S610 that the end 1309 has been selected, the control unit 101 performs control so as to transition to the playback mode (step S607), and ends the album creation process.

次に図7を用いて、アルバム動画保存処理について説明する。   Next, the album moving image saving process will be described with reference to FIG.

ます、ステップS701では、制御部101は、アルバム動画用の動画ファイルを新規作成し、記録再生部140により、新規動画ファイルを記録媒体141に記録させる。   First, in step S701, the control unit 101 newly creates a moving image file for the album moving image, and causes the recording / playback unit 140 to record the new moving image file on the recording medium 141.

ステップS702では、制御部101は、ステップS601で作成しメモリ104に記録されているシナリオから、シーン番号が1のシナリオ情報を読み出す。そして、読み出したシーン番号のシナリオ情報に基づいて、ステップS703〜S706の処理を実行する。   In step S <b> 702, the control unit 101 reads scenario information having a scene number of 1 from the scenario created in step S <b> 601 and recorded in the memory 104. Then, the processing of steps S703 to S706 is executed based on the read scenario information of the scene number.

ステップS703は、制御部101は、シナリオ情報に記載されているファイル情報から、再生対象の画像ファイルを特定し、再生対象の画像ファイルがJEPG(静止画)ファイルであるかMP4(動画)ファイルであるかを判断する。JEPGファイルであった場合はステップS704へ進み、そうでなければ動画のMP4ファイルのため、ステップS705へとすすむ。   In step S703, the control unit 101 specifies an image file to be reproduced from file information described in the scenario information, and the image file to be reproduced is a JEPG (still image) file or an MP4 (moving image) file. Determine if there is. If the file is a JEPG file, the process proceeds to step S704. If not, the process proceeds to step S705 because it is a moving image MP4 file.

ステップS704では、制御部101は、シナリオ情報に記載されているファイル情報で特定された再生対象のJPEGファイルについて、JPEGファイルのデータをアルバム動画用ファイルに追記する処理を実行し、ステップS706へ進む。JPEGファイルのデータをアルバム動画用ファイルに追記する処理は図8で詳細に説明する。   In step S704, the control unit 101 executes processing for adding the data of the JPEG file to the album moving image file for the JPEG file to be reproduced specified by the file information described in the scenario information, and proceeds to step S706. . The process of adding the JPEG file data to the album moving image file will be described in detail with reference to FIG.

ステップS705では、制御部101は、シナリオ情報に記載されているファイル情報で特定された再生対象のMP4ファイルについて、JPEGファイルのデータをアルバム動画用ファイルに追記する処理を実行し、ステップS706へ進む。MP4ファイルのデータをアルバム動画用ファイルに追記する処理を実行しは図11で詳細に説明する。   In step S705, the control unit 101 executes a process of adding the data of the JPEG file to the album video file for the MP4 file to be reproduced specified by the file information described in the scenario information, and the process proceeds to step S706. . The process of adding the MP4 file data to the album moving image file will be described in detail with reference to FIG.

本実施形態では、シナリオで再生対象として指定された画像データ(静止画、動画)について、アルバム動画用ファイルに順次追記していくことにより、アルバム動画データを生成するものとした。しかし、シナリオで再生対象として指定された画像データから、それぞれ動画データを生成し、生成した動画を結合してアルバム動画ファイルを作成するようにしてもよい。   In this embodiment, album moving image data is generated by sequentially adding image data (still image, moving image) designated as a reproduction target in the scenario to the album moving image file. However, it is also possible to generate moving image data from image data designated as playback targets in the scenario, and combine the generated moving images to create an album moving image file.

ステップS706では、制御部101は、メモリ104に記録されているシナリオに、次のシーン番号のシナリオ情報があるかを判断する。次のシーン番号のシナリオ情報があると判定された場合は、ステップS707で次のシーン番号のシナリオ情報を読み出し、読み出したシナリオ情報に基づいて、ステップS703〜S705の処理を実行する。次のシーン番号のシナリオ情報がなくなるまで、ステップS703〜S707の処理を繰り返す。そして、次のシーン番号のシナリオ情報がなくなったと判定された場合、アルバム動画の生成が完了していることになるので、ステップS708に進む。   In step S706, the control unit 101 determines whether there is scenario information of the next scene number in the scenario recorded in the memory 104. If it is determined that there is scenario information of the next scene number, the scenario information of the next scene number is read in step S707, and the processes of steps S703 to S705 are executed based on the read scenario information. The processes in steps S703 to S707 are repeated until there is no scenario information for the next scene number. If it is determined that there is no scenario information for the next scene number, the album moving image generation has been completed, and the process advances to step S708.

ステップS708では、制御部101は、ステップS601で作成されメモリ104に記録されたシナリオに記載されているBGMの設定に関する情報に従って、BGMを合成するか否かの判定を行う。BGMを合成すると判定した場合はステップS709へ進み、合成しないと判定した場合はアルバム動画保存処理を終了する。   In step S708, the control unit 101 determines whether to synthesize BGM according to the information regarding the BGM setting described in the scenario created in step S601 and recorded in the memory 104. If it is determined that BGM is to be combined, the process proceeds to step S709. If it is determined that BGM is not to be combined, the album moving image saving process is terminated.

ステップS709では、ステップS708で生成が完了したアルバム動画のMP4ファイルにBGMデータの合成を行うBGM合成処理を実行してから、アルバム動画保存処理を終了する。BGM合成処理については、図12で詳細に説明する。   In step S709, a BGM synthesis process for synthesizing BGM data to the MP4 file of the album video that has been generated in step S708 is executed, and then the album video storage process ends. The BGM synthesis process will be described in detail with reference to FIG.

次に図8を用いてステップS704の、JPEGファイルのデータをアルバム動画用ファイルに追記する処理について説明する。   Next, the process of adding the JPEG file data to the album moving image file in step S704 will be described with reference to FIG.

ステップS801では、ファイル情報1502から特定されるJPEGファイルを記録媒体141から読み出して、メモリ104に一時保持する。   In step S 801, the JPEG file specified from the file information 1502 is read from the recording medium 141 and temporarily stored in the memory 104.

ステップS802では、メモリ104に保持したJPEGファイルの画像データを、画像処理部111を用いてYUVデータへデコードしてメモリ104に保持し、ステップS803へ進む。   In step S802, the image data of the JPEG file held in the memory 104 is decoded into YUV data using the image processing unit 111 and held in the memory 104, and the process proceeds to step S803.

ステップS803では、パノラマ画像フラグ1506の情報から、再生対象の画像がパノラマ画像であるかを判定する。本実施形態では、シナリオにパノラマ画像フラグ1506の情報を記録するものとしたが、シナリオに1506の情報を記録せずに、JPEGファイルに記載されている画像情報からパノラマ画像であるかを判定してもよい。例えば、画像情報に含まれる撮影モードの情報にパノラマ撮影モードで撮影されたことを示す情報が記載されていた場合はパノラマ画像であると判定するようにしてもよい。また、画像の縦横サイズに応じて、パノラマ画像であるかを判定するようにしてもよい。パノラマ画像でないと判定された場合は、ステップS804に進み、パノラマ画像であると判定された場合、ステックS811に進む。   In step S803, it is determined from the information of the panoramic image flag 1506 whether the image to be reproduced is a panoramic image. In this embodiment, the information of the panorama image flag 1506 is recorded in the scenario. However, without recording the information of 1506 in the scenario, it is determined whether the image is a panoramic image from the image information described in the JPEG file. May be. For example, when information indicating that the image is captured in the panorama shooting mode is described in the shooting mode information included in the image information, it may be determined that the image is a panoramic image. Further, it may be determined whether the image is a panoramic image according to the vertical and horizontal sizes of the image. If it is determined that the image is not a panoramic image, the process proceeds to step S804. If it is determined that the image is a panoramic image, the process proceeds to a step S811.

ステップS804では、ステップS802でメモリ104に保持したYUVデータについて、画像処理部111を用いてアルバム動画の画像サイズに合わせてトリミングやリサイズを行ってメモリ104に保持し、ステップS805へ進む。なお、本実施形態においては、アルバム動画の画像サイズは、フルHD(1920×1080)とする。   In step S804, the YUV data held in the memory 104 in step S802 is trimmed or resized in accordance with the image size of the album moving image using the image processing unit 111 and held in the memory 104, and the process proceeds to step S805. In the present embodiment, the image size of the album moving image is set to full HD (1920 × 1080).

ステップS805では、リサイズしてメモリ104に保持されたYUVデータを、画像処理部111を用いて色フィルターなどの効果をかけ、再度メモリ104に保持し、ステップS806へ進む。   In step S805, the YUV data that has been resized and stored in the memory 104 is subjected to an effect such as a color filter using the image processing unit 111, and is stored again in the memory 104, and the process proceeds to step S806.

ステップS806では、効果をかけてメモリ104に保持されたYUVデータを、画像処理部111を用いてH.264にエンコードし、動画データを作成する。   In step S 806, the YUV data that has been stored in the memory 104 with the effect is converted to H.264 using the image processing unit 111. H.264 is encoded to create moving image data.

ステップS807では、音声処理部121を用いて無音のPCMデータをAACにエンコードした音声データを生成し、ステップS808へ進む。   In step S807, sound data obtained by encoding silent PCM data into AAC is generated using the sound processing unit 121, and the process proceeds to step S808.

ステップS808では、S806でエンコードして生成された動画データと、S807でエンコードして生成された音声データとからなるストリームデータを、ステップS701で記録媒体141に作成したアルバム動画用ファイルに追記する。ここで、記録媒体141へ書き込む単位はH.264のフレーム数やストリームデータのデータサイズ毎に書き込んでもよいし、所定のフレーム数、時間毎に書き込みを行ってもよい。   In step S808, stream data composed of the moving image data generated by encoding in step S806 and the audio data generated by encoding in step S807 are added to the album moving image file created in the recording medium 141 in step S701. Here, the unit of writing to the recording medium 141 is H.264. It may be written for each H.264 frame number or stream data size, or for every predetermined number of frames and time.

ステップS809では、フレーム数1504で指定されているフレーム数分について、ステップS806〜S808の処理が完了したかを判定する。指定されたフレーム数分の処理が完了していない場合は、フレーム数1504で指定された期間分の動画が生成されていないので、S806〜S808の処理を繰り返す。ステップS804〜S809は、通所の静止画についての処理であるため、60フレーム、つまり、2秒分の動画が生成され、アルバム動画用のファイルに追記される。そして、指定されたフレーム数分の処理が完了すると、ステップS810において、ストリームを追記したアルバム用動画ファイルのファイル管理情報を更新して記録する。なお、1つの静止画から生成された動画が、1つのチャプタとして構成されるように、管理情報を更新する。このようにして、シナリオで指定された静止画から生成した動画データの、アルバム用動画ファイルへの追記の処理が完了する。   In step S809, it is determined whether the processing in steps S806 to S808 has been completed for the number of frames specified by the number of frames 1504. If the processing for the designated number of frames has not been completed, since the moving image for the period designated by the number of frames 1504 has not been generated, the processing of S806 to S808 is repeated. Steps S804 to S809 are processing for a still image, so 60 frames, that is, 2 seconds of moving images are generated and added to the album moving image file. When the processing for the designated number of frames is completed, in step S810, the file management information of the album moving image file to which the stream has been added is updated and recorded. Note that the management information is updated so that a moving image generated from one still image is configured as one chapter. In this way, the process of adding the moving image data generated from the still image specified in the scenario to the album moving image file is completed.

一方、再生対対象のJPEGファイルがパノラマ画像と判定された場合、ステップS811でパノラマ画像(静止画)からパンニング動画にするためのトリミングの方法について決定する。トリミング方法の決定処理については、後述するが、この処理によって、パノラマ画像から作成されるパンニング動画の各フレームをパノラマ画像のどの領域からトリミングして作成するか、および、シナリオに記載されているフレーム数を修正するかが決定される。具体的には、まず、パノラマ画像から一部領域をトリミングする際のトリミング領域のアスペクト比が決定される。そして、さらに、シナリオに記載されているフレーム数を修正し、再生対象のパノラマ画像から生成するパンニング動画の再生時間を変更するかを決定する。さらに、決定されたアスペクト比、フレーム数に基づいて、縦横サイズと、トリミング領域の移動量が決定される。パノラマ画像の長辺方向の一方の端部から他方の端部まで移動するようにトリミング領域の移動量が決定されるため、トリミングした複数のトリミング画像により、パンニング動画を生成できる。以降の処理はこの処理で決められた方法に応じて処理を行う。   On the other hand, if it is determined that the JPEG file to be played back is a panoramic image, a trimming method for converting a panoramic image (still image) into a panning video is determined in step S811. The determination method of the trimming method will be described later. By this process, the frame in which each frame of the panning video created from the panoramic image is trimmed and created, and the frame described in the scenario. It is decided whether to correct the number. Specifically, first, the aspect ratio of the trimming area when trimming a partial area from the panoramic image is determined. Then, the number of frames described in the scenario is corrected to determine whether to change the playback time of the panning video generated from the panorama image to be played back. Further, based on the determined aspect ratio and the number of frames, the vertical and horizontal sizes and the movement amount of the trimming area are determined. Since the moving amount of the trimming region is determined so as to move from one end portion in the long side direction of the panoramic image to the other end portion, a panning moving image can be generated from a plurality of trimmed images. Subsequent processing is performed according to the method determined in this processing.

ステップS812では、ステップS802でメモリ104に保持したYUVデータについて、画像処理部111を用いて、ステップS811で決定された領域をトリミングし、さらに、アルバム動画用の画像サイズに収まるサイズにリサイズする。そして、リサイズしたYUVデータを、メモリ104に保持する。ここで、1つのパノラマ画像から生成されるアルバム動画は、120フレーム(4秒)分である。トリミング領域のサイズは120フレームで共通しているが、トリミング領域の位置は、各フレームによって異なるため、ステップS812では、生成するフレームに対応する位置でトリミングを行うようにする。具体的には、1フレーム目のデータを生成する際にはパノラマ画像の長辺方向の端の領域をトリミングし、2フレーム目以降は前のフレームを生成した際のトリミング領域の位置を記憶しておき、ステップS811で決定された移動量分トリミング領域を移動させる。トリミング領域の移動方向については、1フレーム目をトリミングした際のパノラマ画像の長辺方向の端側から、長辺方向の他方の端部側へ移動する方向とする。つまり、1フレーム目で右端をトリミングした場合の移動方向は右から左に、1フレーム目で左端をトリミングした場合の移動方向は左から右となる。また、1フレーム目で上端をトリミングした場合の移動方向は上から下に、1フレーム目で下端をトリミングした場合の移動方向は下から上となる。このように、生成するフレーム毎にトリミング領域の位置を順次移動させる。そのため、パノラマ画像内での位置が移動した領域の画像が順次再生(順次表示)されるパンニング動画が生成されることになる。   In step S812, for the YUV data held in the memory 104 in step S802, the area determined in step S811 is trimmed using the image processing unit 111, and further resized to fit within the image size for the album moving image. Then, the resized YUV data is held in the memory 104. Here, the album moving image generated from one panoramic image is 120 frames (4 seconds). Although the size of the trimming area is common to 120 frames, the position of the trimming area differs depending on each frame. Therefore, in step S812, trimming is performed at a position corresponding to the frame to be generated. Specifically, when generating the data of the first frame, the end region in the long side direction of the panoramic image is trimmed, and the position of the trimming region at the time of generating the previous frame is stored for the second and subsequent frames. The trimming area is moved by the movement amount determined in step S811. The moving direction of the trimming region is a direction in which the panoramic image moves from the long side end side to the other end side in the long side direction when the first frame is trimmed. That is, the movement direction when the right edge is trimmed in the first frame is from right to left, and the movement direction when the left edge is trimmed in the first frame is from left to right. The movement direction when the upper end is trimmed in the first frame is from top to bottom, and the movement direction when the lower end is trimmed in the first frame is from bottom to top. In this way, the position of the trimming area is sequentially moved for each frame to be generated. For this reason, a panning moving image is generated in which images in a region where the position in the panoramic image has moved are sequentially reproduced (sequentially displayed).

ステップS813では、リサイズしてメモリ104に保持されたYUVデータを、画像処理部111を用いて色フィルターなどの効果をかけ、再度メモリ104に保持し、ステップS815へ進む。   In step S813, the YUV data that has been resized and stored in the memory 104 is subjected to an effect such as a color filter using the image processing unit 111, is stored again in the memory 104, and the process proceeds to step S815.

ステップS815では、リサイズされたYUVデータのアスペクトがアルバム動画のアスペクトと同じ16:9であるか否かを判定する。なお、S812において、アルバム動画のサイズに収まるようにリサイズを行っているので、実際には、リサイズ済みのYUVデータの縦横サイズが、アルバム動画のサイズと同じであるかを判定する。同じであれば、ステップS815の処理を行わずにステップS816へ進み。異なっている場合には、ステップS815に進む。   In step S815, it is determined whether the aspect of the resized YUV data is 16: 9 which is the same as the aspect of the album moving image. In S812, since resizing is performed so as to fit within the size of the album moving image, it is actually determined whether the vertical and horizontal sizes of the resized YUV data are the same as the size of the album moving image. If they are the same, the process proceeds to step S816 without performing the process of step S815. If they are different, the process proceeds to step S815.

ステップS815では、リサイズされたYUVデータの縦横サイズが、アルバム動画の画像サイズと同じになるように、足りないサイズ分の余分画像(黒データ)を付加して、してメモリ104に保持する。余分画像は、左右または上下均等になるように付加する。   In step S815, an extra image (black data) of an insufficient size is added and stored in the memory 104 so that the vertical and horizontal sizes of the resized YUV data are the same as the image size of the album moving image. Extra images are added so as to be equal to the left and right or up and down.

ステップS816では、メモリ104に保持されている効果をかけられたYUVデータ(ステップS815を実行した場合は、余分画像を付加したYUVデータ)を、画像処理部111を用いてH.264にエンコードし、動画データを作成する。   In step S816, the effected YUV data held in the memory 104 (YUV data with an extra image added when step S815 is executed) is converted into H.264 data using the image processing unit 111. H.264 is encoded to create moving image data.

ステップS817では、音声処理部121を用いて無音のPCMデータをAACにエンコードして音声データを生成し、ステップS818へ進む。   In step S817, the silent PCM data is encoded into AAC using the voice processing unit 121 to generate voice data, and the process proceeds to step S818.

ステップS818では、S816でエンコードして生成された動画データおよびS817でエンコードして生成された音声データからなるストリームデータをステップS701で記録媒体141に作成したアルバム動画用のファイルに追記する。ここで、記録媒体141へ書き込む単位はH.264のフレーム数やストリームデータのデータサイズ毎に書き込んでもよいし、所定のフレーム数、時間毎に書き込みを行ってもよい。   In step S818, stream data composed of the moving image data generated by encoding in step S816 and the audio data generated by encoding in step S817 are added to the album moving image file created in the recording medium 141 in step S701. Here, the unit of writing to the recording medium 141 is H.264. It may be written for each H.264 frame number or stream data size, or for every predetermined number of frames and time.

ステップS819では、フレーム数1504で指定されているフレーム数分について、ステップS812〜S818の処理が完了したかを判定する。ステップS811の処理でフレーム数が変更された場合は、変更されたフレーム数分についてステップS812〜S818の処理が完了したかを判定する。指定されたフレーム数分の処理が完了していない場合は、指定された期間分の動画が生成されるまで、S812〜S818の処理を繰り返す。ステップS812〜S818は、パノラマ画像についての処理であるため、通常は120フレーム、つまり、4秒分の動画が生成され、アルバム動画用のファイルに追記される。ステップS811の処理でフレーム数が修正された場合は、フレーム数が120より多い、150、または,180となり、5秒または6秒分の動画が生成されることになる。このように、指定されたフレーム数分の処理が完了すると、ステップS810において、ストリームを追記したアルバム用動画ファイルのファイル管理情報を更新して記録する。なお、1つの静止画から生成された動画が、1つのチャプタとして構成されるように、管理情報を更新する。このようにして、シナリオで指定されたパノラマ画像から生成された動画データの、アルバム用動画ファイルへの追記処理が完了する。   In step S819, it is determined whether the processing in steps S812 to S818 has been completed for the number of frames specified by the number of frames 1504. When the number of frames is changed in the process of step S811, it is determined whether the processes of steps S812 to S818 have been completed for the changed number of frames. If processing for the designated number of frames has not been completed, the processing of S812 to S818 is repeated until moving images for the designated period are generated. Since steps S812 to S818 are processing for a panoramic image, normally 120 frames, that is, 4 seconds of moving images are generated and added to the album moving image file. When the number of frames is corrected in the process of step S811, the number of frames is greater than 120, 150, or 180, and a moving image for 5 seconds or 6 seconds is generated. Thus, when the processing for the designated number of frames is completed, in step S810, the file management information of the album moving image file to which the stream has been added is updated and recorded. Note that the management information is updated so that a moving image generated from one still image is configured as one chapter. In this way, the process of adding the moving image data generated from the panoramic image specified in the scenario to the moving image file for album is completed.

なお、S806〜S808、または、S812〜S818の処理で作成された1つの静止画から生成された動画データが、アルバム動画の1チャプタとなるように記録する。
次に、図9、図10を参照して、パノラマ画像のトリミング方法の決定について説明する。
Note that moving image data generated from one still image created by the processing of S806 to S808 or S812 to S818 is recorded so as to become one chapter of the album moving image.
Next, determination of a panoramic image trimming method will be described with reference to FIGS.

まず、図10を参照して、横長のパノラマ画像1001を例に、トリミング領域のアスペクト比の設定とパンニング動画生成について説明する。   First, with reference to FIG. 10, setting of the aspect ratio of the trimming area and generation of a panning video will be described using a horizontally long panoramic image 1001 as an example.

パノラマ画像1001は、4200×900のサイズを有する画像である。このパノラマ画像1001について、アルバム動画と同じアスペクト比16:9のトリミング領域でトリミングする場合、トリミング領域1011のサイズは、1600×900となる。ここで、パンニング動画を生成する際に、トリミング領域はフレーム毎にパノラマ画像の長辺方向(横方向)に移動させるので、パノラマ画像の短辺方向(縦方向)の画像サイズが、そのままトリミング領域の縦方向サイズとなる。また、パノラマ画像の長辺方向に対応するトリミング領域の横方向のサイズは、パノラマ画像の短辺方向の画像サイズとトリミング領域のアスペクト比とから算出できる。アスペクト比16:9のトリミング領域1011でトリミングする場合、アルバム動画も同じ16:9のアスペクト比であるため、トリミングした画像をリサイズするだけでアルバム動画のフレーム1012を生成することができる。   The panoramic image 1001 is an image having a size of 4200 × 900. When the panorama image 1001 is trimmed in the trimming area having the same aspect ratio 16: 9 as that of the album moving image, the size of the trimming area 1011 is 1600 × 900. Here, when the panning video is generated, the trimming area is moved in the long side direction (horizontal direction) of the panoramic image for each frame, so that the image size in the short side direction (vertical direction) of the panoramic image remains as it is. Is the vertical size. Further, the horizontal size of the trimming area corresponding to the long side direction of the panoramic image can be calculated from the image size of the panoramic image in the short side direction and the aspect ratio of the trimming area. When trimming in the trimming area 1011 having an aspect ratio of 16: 9, the album moving image has the same aspect ratio of 16: 9. Therefore, the album moving image frame 1012 can be generated simply by resizing the trimmed image.

パノラマ画像1001ついて、アスペクト比20:9のトリミング領域でトリミングする場合、トリミング領域1021のサイズは、2000×900となる。この場合、アルバム動画のアスペクト比とトリミング領域1021のアスペクト比が異なる。そのため、トリミングした画像(2000×900)をリサイズして1920×864の画像1023を生成し、さらに、リサイズした画像1023の上下にそれぞれ余分画像を付加して、1920×1080のアルバム動画のフレーム1022を生成する。   When panorama image 1001 is trimmed in a trimming area having an aspect ratio of 20: 9, the size of trimming area 1021 is 2000 × 900. In this case, the aspect ratio of the album moving image and the aspect ratio of the trimming area 1021 are different. Therefore, the trimmed image (2000 × 900) is resized to generate a 1920 × 864 image 1023, and extra images are added to the top and bottom of the resized image 1023, respectively. Is generated.

さらに、パノラマ画像1001ついて、アスペクト比30:9のトリミング領域でトリミングする場合、トリミング領域1031のサイズは、3000×900となる。この場合、アルバム動画のアスペクト比とトリミング領域1031のアスペクト比が異なる。そのため、トリミングした画像(3000×900)をリサイズして1920×576の画像1033を生成し、さらに、リサイズした画像1033の上下にそれぞれ余分画像を付加して、1920×1080のアルバム動画のフレーム1032を生成する。   Further, when the panoramic image 1001 is trimmed in a trimming area having an aspect ratio of 30: 9, the size of the trimming area 1031 is 3000 × 900. In this case, the aspect ratio of the album moving image is different from that of the trimming area 1031. Therefore, the trimmed image (3000 × 900) is resized to generate a 1920 × 576 image 1033, and extra images are added to the top and bottom of the resized image 1033, respectively. Is generated.

ここで、アルバム画像と同じ16:9のアスペクト比でトリミングしたほうが、余分画像が付加せずにパンニング動画を生成することができる。しかし、本実施形態において、パノラマ画像から生成されるパンニング動画の長さは、120フレームの4秒分と決まっている。そのため、短辺方向のサイズに対して長辺方向のサイズが非常に大きいパノラマ画像において、長辺方向全体を移動するパンニング動画を生成する場合、フレーム間でのトリミング位置の移動量が大きくなり、パンニングのスピードが速い動画が生成されてしまう。16:9のアスペクト比に対し、20:9のアスペクト比のほうが、トリミングされる長辺方向の画像サイズが大きくなるため、16:9のときよりも、フレーム間でのトリミング位置の移動量を小さくし、パンニングのスピードを小さくすることができる。さらに、20:9のアスペクト比よりも、30:9のアスペクト比のほうが、トリミングされる長辺方向の画像サイズがさらに大きくなるため、フレーム間でのトリミング位置の移動量をさらに小さくし、パンニングのスピードを小さくすることができる。   Here, if the trimming is performed with the same 16: 9 aspect ratio as the album image, a panning moving image can be generated without adding an extra image. However, in the present embodiment, the length of the panning video generated from the panoramic image is determined to be 4 seconds of 120 frames. Therefore, in panoramic images that have a very large size in the long side direction relative to the size in the short side direction, when generating a panning video that moves in the entire long side direction, the amount of movement of the trimming position between frames increases. A video with a fast panning speed is generated. Since the image size in the long side direction to be trimmed is larger in the aspect ratio of 20: 9 than in the aspect ratio of 16: 9, the amount of movement of the trimming position between frames is larger than in the case of 16: 9. It can be reduced and the panning speed can be reduced. Further, since the image size in the long side direction to be trimmed is larger at the aspect ratio of 30: 9 than at the aspect ratio of 20: 9, the amount of movement of the trimming position between frames is further reduced and panning is performed. Can reduce the speed.

そこで、本実施形態では、パンニングのスピードを調整するため、パノラマ画像の長辺方向(横方向)と短辺方向(縦方向)の画像サイズの比、または、長辺方向(横方向)の画像サイズに応じて、パノラマ画像からパンニング動画を生成する際のトリミングのアスペクト比を切り換えている。   Therefore, in this embodiment, in order to adjust the panning speed, the ratio of the image size in the long side direction (horizontal direction) and the short side direction (vertical direction) of the panoramic image, or the image in the long side direction (horizontal direction). The aspect ratio of trimming when generating a panning video from a panoramic image is switched according to the size.

図9を用いて、ステップS811におけるトリミング方法決定処理について説明する。   The trimming method determination process in step S811 will be described with reference to FIG.

ステップS901では、制御部101は、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH1未満か判定する。閾値TH1未満であれば、ステップS906に進む。TH1以上であれば、ステップS902に進む。本実施形態では、パノラマ画像は横長であり、パノラマ画像の縦の画像サイズが1080で固定であるため、長辺側である横の画像サイズが閾値TH1未満であるかを判定するものとした。しかし、パノラマ画像の短辺側の縦の画像サイズが可変である場合は、横(長辺)の画像サイズと横(短辺)の画像サイズを取得し、(横の画像サイズ)/(縦の画像サイズ)が閾値TH10未満であるか判定するようにしてもよい。   In step S901, the control unit 101 determines whether the horizontal image size (long side length) of the panoramic image is less than the threshold value TH1. If it is less than the threshold value TH1, the process proceeds to step S906. If it is greater than or equal to TH1, the process proceeds to step S902. In the present embodiment, since the panorama image is horizontally long and the vertical image size of the panorama image is fixed at 1080, it is determined whether or not the horizontal image size on the long side is less than the threshold value TH1. However, if the vertical image size on the short side of the panoramic image is variable, the horizontal (long side) image size and the horizontal (short side) image size are acquired, and (horizontal image size) / (vertical image size) It is also possible to determine whether the image size is less than the threshold value TH10.

ステップS906では、それほど長辺方向に長くないパノラマ画像であるので、制御部101は、パンニング動画を生成するためのトリミング領域のアスペクト比を、アルバム動画のアスペクト比と同じ16:9とすることに決定する。   In step S906, since the panoramic image is not so long in the long side direction, the control unit 101 sets the aspect ratio of the trimming area for generating the panning video to 16: 9, which is the same as the aspect ratio of the album video. decide.

ステップS902では、制御部101は、パノラマ画像の画像情報に含まれる被写体情報に人物が記録されているか判定する。人物が記録されていれば、ステップS906に進む。記録されていなければ、ステップS903に進む。人物が記録されているパノラマ画像は、パンニングスピードが速くなったとしても、余分画像を付加せずに、画像を大きく再生したほうがよいため、トリミング領域のアスペクト比を16:9に設定する。   In step S902, the control unit 101 determines whether a person is recorded in the subject information included in the image information of the panoramic image. If a person is recorded, the process proceeds to step S906. If not recorded, the process proceeds to step S903. A panoramic image in which a person is recorded has a trimming area aspect ratio of 16: 9 because it is better to reproduce the image without adding an extra image even if the panning speed is increased.

ステップS903では、制御部101は、前述のシナリオに記載されているBGMの付属情報からBGMのテンポが早いか否か判定する。早ければ、ステップS906に進む。それ以外であれば、ステップS904に進む。BGMのテンポが速い場合、パンニングスピードが速くなったとしてもBGMとの親和性が高くなり、パンニングスピードを遅くする必要がないため、リミング領域のアスペクト比を16:9に設定する。   In step S903, the control unit 101 determines whether or not the BGM tempo is fast based on the BGM attached information described in the above-described scenario. If it is early, the process proceeds to step S906. Otherwise, the process proceeds to step S904. When the BGM tempo is fast, even if the panning speed is increased, the affinity with the BGM is increased and there is no need to reduce the panning speed, so the aspect ratio of the rimming area is set to 16: 9.

ステップS904では、制御部101は、前述のシナリオに記載されているイベント情報がスポーツシーンか否か判定する。スポーツが設定されていれば、ステップS906に進む。それ以外であれば、ステップS905に進む。   In step S904, the control unit 101 determines whether the event information described in the above scenario is a sports scene. If sport is set, the process proceeds to step S906. Otherwise, the process proceeds to step S905.

ステップS905では、制御部101は、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH2(>TH1)未満かを判定する。閾値TH2未満であれば、ステップS907に進み、閾値TH2以上であれば、ステップS908に進む。ステップS905についても、ステップS901と同様に、(横の画像サイズ)/(縦の画像サイズ)が閾値TH20未満であるか判定するようにしてもよい。ここで、TH20>TH10である。   In step S905, the control unit 101 determines whether the horizontal image size (long side length) of the panoramic image is less than the threshold value TH2 (> TH1). If it is less than the threshold value TH2, the process proceeds to step S907, and if it is greater than or equal to the threshold value TH2, the process proceeds to step S908. Also in step S905, as in step S901, it may be determined whether (horizontal image size) / (vertical image size) is less than the threshold value TH20. Here, TH20> TH10.

ステップS907では、パノラマ画像がある程度長辺方向に長いパノラマ画像であるので、制御部101は、パンニング動画を生成するためのトリミング領域のアスペクト比を、20:9とすることに決定する。ステップS908では、パノラマ画像が長辺方向に非常に長いパノラマ画像であるので、制御部101は、パンニング動画を生成するためのトリミング領域のアスペクト比を、30:9とすることに決定する。   In step S907, since the panorama image is a panorama image that is long to some extent in the long side direction, the control unit 101 determines that the aspect ratio of the trimming area for generating the panning moving image is 20: 9. In step S908, since the panoramic image is a panoramic image that is very long in the long side direction, the control unit 101 determines that the aspect ratio of the trimming area for generating the panning moving image is 30: 9.

ステップS908でアスペクト比を30:9とすると決定された場合、さらに、シナリオに記載されているフレーム数を変更するかを判定し、フレーム数を変更する処理をステップS911〜S915で実行する。まず、ステップS911で、制御部101は、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH3(>TH2)以上かを判定する。閾値TH3以上であれば、ステップS912に進み、閾値TH3未満であれば、ステップS909に進む。ステップS911についても、ステップS901、S905と同様に、(横の画像サイズ)/(縦の画像サイズ)が閾値TH30以上であるか判定するようにしてもよい。ここで、TH30>TH20である。ステップS912では、制御部101は、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH4(>TH3)以上かを判定する。閾値TH4以上であれば、ステップS914に進み、ステップS914で制御部101は、フレーム数を120から180に変更してシナリオに記載する。閾値TH4未満であれば、ステップS913に進み、ステップS913で制御部101は、フレーム数を120から150に変更してシナリオに記載する。ステップS912についても、ステップS901、S905、S911と同様に、(横の画像サイズ)/(縦の画像サイズ)が閾値TH40以上であるか判定するようにしてもよい。ここで、TH40>TH50である。このような処理により、横の画像サイズ(長辺の長さ)が、TH3未満の場合は、フレーム数を120のままにし、TH3以上、TH4未満の場合は、フレーム数を150に変更し、TH4以上の場合は、フレーム数を180に変更している。横の画像サイズ(長辺の長さ)がTH3以上となる場合、トリミングのアスペクト比を30:9よりもさらに横の画像サイズが大きくなるようにすることも可能だが、これ以上横の画像サイズが大きくなるようにしてしまうと、生成される動画のうち、余分画像(黒データ)が付加される領域が大きくなり、画像を確認し難くなってしまう。そこで、本実施形態では、30:9よりもさらに横の画像サイズが大きくなるようにはせずに、生成する動画のフレーム数を増加させることで、パンニングのスピードを小さくするようにしている。   When it is determined in step S908 that the aspect ratio is 30: 9, it is further determined whether to change the number of frames described in the scenario, and processing for changing the number of frames is executed in steps S911 to S915. First, in step S911, the control unit 101 determines whether the horizontal image size (long side length) of the panoramic image is greater than or equal to a threshold value TH3 (> TH2). If it is greater than or equal to the threshold value TH3, the process proceeds to step S912, and if it is less than the threshold value TH3, the process proceeds to step S909. Also in step S911, as in steps S901 and S905, it may be determined whether (horizontal image size) / (vertical image size) is greater than or equal to a threshold value TH30. Here, TH30> TH20. In step S912, the control unit 101 determines whether the horizontal image size (long side length) of the panoramic image is greater than or equal to a threshold value TH4 (> TH3). If it is equal to or greater than the threshold TH4, the process proceeds to step S914, and in step S914, the control unit 101 changes the number of frames from 120 to 180 and describes it in the scenario. If it is less than the threshold TH4, the process proceeds to step S913, and in step S913, the control unit 101 changes the number of frames from 120 to 150 and describes it in the scenario. Also in step S912, as in steps S901, S905, and S911, it may be determined whether (horizontal image size) / (vertical image size) is greater than or equal to a threshold value TH40. Here, TH40> TH50. By such processing, when the horizontal image size (long side length) is less than TH3, the number of frames is kept at 120, and when it is greater than TH3 and less than TH4, the number of frames is changed to 150, In the case of TH4 or more, the number of frames is changed to 180. When the horizontal image size (long side length) is greater than TH3, it is possible to make the horizontal image size larger than the 30: 9 aspect ratio of trimming. If this is increased, the area to which the extra image (black data) is added in the generated moving image becomes large, and it becomes difficult to confirm the image. Therefore, in the present embodiment, the panning speed is reduced by increasing the number of frames of the generated moving image without increasing the horizontal image size further than 30: 9.

さらに、ステップS914でフレーム数を180に変更した場合、さらに、ステップS915で、制御部101は、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH5(>TH4)以上かを判定する。閾値TH5以上であれば、ステップS916に進む。ステップS915についても、ステップS901、S905、S911、S912と同様に、(横の画像サイズ)/(縦の画像サイズ)が閾値TH50以上であるか判定するようにしてもよい。ここで、TH50>TH40である。横の画像サイズ(長辺の長さ)が閾値TH5の場合は、ステップS916に進み、TH5未満の場合は、ステップS909に進む。   Furthermore, when the number of frames is changed to 180 in step S914, in step S915, the control unit 101 further determines whether the horizontal image size (long side length) of the panoramic image is greater than or equal to the threshold value TH5 (> TH4). To do. If it is greater than or equal to the threshold value TH5, the process proceeds to step S916. Also in step S915, as in steps S901, S905, S911, and S912, it may be determined whether (horizontal image size) / (vertical image size) is greater than or equal to a threshold value TH50. Here, TH50> TH40. If the horizontal image size (long side length) is the threshold value TH5, the process proceeds to step S916, and if it is less than TH5, the process proceeds to step S909.

パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH5未満の場合は、決定されたトリミングのアスペクト比や、フレーム数に関係なく、ステップS909に進むことになる。   If the horizontal image size (long side length) of the panoramic image is less than the threshold TH5, the process proceeds to step S909 regardless of the determined trimming aspect ratio and the number of frames.

ステップS909では、制御部101は、ステップS906〜S908で決定したトリミング領域のアスペクト比と、パノラマ画像の画像サイズとから、トリミング領域のサイズを決定する。   In step S909, the control unit 101 determines the size of the trimming area from the aspect ratio of the trimming area determined in steps S906 to S908 and the image size of the panoramic image.

そして、ステップS910では、制御部101は、決められたトリミング領域のサイズと、シナリオに記載されているフレーム数1504とから、トリミング領域をパノラマ画像の長辺方向の一方の端部から他方の端部まで順次移動させる際の移動量を決定する。ステップS913、S914でフレーム数を変更した場合は、変更したフレーム数に基づいて決定する。S910では、パノラマ画像全体を指定されたフレーム数でパンニングするように、トリミング領域の移動量を決定する。   In step S910, the control unit 101 determines the trimming area from one end in the long side direction of the panoramic image to the other end based on the determined size of the trimming area and the number of frames 1504 described in the scenario. The amount of movement when moving sequentially to the part is determined. When the number of frames is changed in steps S913 and S914, the determination is made based on the changed number of frames. In S910, the amount of movement of the trimming area is determined so that the entire panoramic image is panned by the designated number of frames.

ステップS916では、制御部101は、ステップS909と同様にトリミング領域のサイズを決定する。   In step S916, the control unit 101 determines the size of the trimming area as in step S909.

そして、ステップS917では、制御部101は、トリミング領域の移動量を、固定値Mに決定する。本実施形態では、M=TH5/180とする。つまり、Mは、パノラマ画像の横の画像サイズ(長辺の長さ)がTH5の場合に、180フレームでパノラマ画像全体をパンニングする際の移動量である。ステップS917では、パノラマ画像の横の画像サイズ(長辺の長さ)が閾値TH5以上であるので、横の画像サイズがTH5よりも大きいときは、移動量Mでは、パノラマ画像全体をパンニングすることができない。しかし、移動量をMよりも大きくすると、パンニング速度が速くなってしまって、画像を確認し難くなるため、移動量をMに固定し、パノラマ画像の一部のみをパンニングするようにしている。パノラマ画像の一部のみをパンニングする場合、パノラマ画像のうちパンニングする領域を指定するために、パンニング開始位置を決定するようにしてもよい。   In step S <b> 917, the control unit 101 determines the movement amount of the trimming area as a fixed value M. In this embodiment, M = TH5 / 180. That is, M is the amount of movement when panning the entire panoramic image with 180 frames when the horizontal image size (long side length) of the panoramic image is TH5. In step S917, since the horizontal image size (long side length) of the panoramic image is greater than or equal to the threshold value TH5, when the horizontal image size is larger than TH5, the entire panoramic image is panned with the movement amount M. I can't. However, if the amount of movement is larger than M, the panning speed increases and it becomes difficult to confirm the image. Therefore, the amount of movement is fixed to M and only a part of the panoramic image is panned. When panning only a part of the panoramic image, the panning start position may be determined in order to designate a panning area in the panoramic image.

このようにして、トリミング領域の縦横サイズとフレーム間でのトリミング領域の移動量を決定する。本実施形態では、トリミング領域の縦横サイズとフレーム間での移動量を決定することにしたが、各フレームについて個別にトリミング領域の位置を決定するようにしてもよい。以上のように、パノラマ画像の縦横サイズやシナリオに設定されている情報からトリミングする領域のサイズとフレーム毎のトリミング領域の移動量を決定する。   In this way, the vertical and horizontal sizes of the trimming area and the amount of movement of the trimming area between frames are determined. In the present embodiment, the vertical and horizontal sizes of the trimming area and the amount of movement between frames are determined, but the position of the trimming area may be determined individually for each frame. As described above, the size of the area to be trimmed and the movement amount of the trimming area for each frame are determined from the vertical and horizontal sizes of the panoramic image and the information set in the scenario.

本実施形態では、パノラマ画像からパンニング動画を作成する際の通常のフレーム数は120フレーム(4秒分)とあらかじめ決まっている。そのため、長辺のサイズが異なるパノラマ画像に対して、トリミングする領域のアスペクト比を同じに設定してしまうと、フレーム間でトリミング領域を移動する際の移動量が大きくなってしまう。それにより長辺方向に長いパノラマ画像では、再生時には高速でパンニングしているよう再生されてしまう。そのため、本願発明では、長辺方向の画像サイズ、または、短辺方向の画像サイズと長辺方向の画像サイズの比(アスペクト比)でトリミング領域のアスペクト比を適切に変更し、パンニングの速度を調節している。一方で、テンポの早いBGMが設定されている場合やイベントがスポーツである場合は、そのアルバム動画全体としては、躍動感のあるスピーディな動画として構成される。そのため、ユーザに提供する動画としてはあえて再生速度が速くなるようなトリミングを行って作成するパンニング動画を組み込むことが適していると考えられる。さらに、長辺方向の画像サイズ、または、短辺方向の画像サイズと長辺方向の画像サイズの比(アスペクト比)が大きくなると、アスペクト比を変更するだけでなく、動画を作成する際のフレーム数を増加させている。これにより、生成される動画において、パノラマ画像の再生領域が小さくなることを防いでいる。   In the present embodiment, the normal number of frames when creating a panning video from a panoramic image is predetermined as 120 frames (4 seconds). For this reason, if the aspect ratio of the trimming region is set to be the same for panoramic images having different long side sizes, the amount of movement when the trimming region is moved between frames increases. As a result, a panoramic image that is long in the long side direction is reproduced as if panned at high speed during reproduction. Therefore, in the present invention, the aspect ratio of the trimming region is appropriately changed by the image size in the long side direction or the ratio of the image size in the short side direction to the image size in the long side direction (aspect ratio), and the panning speed is increased. It is adjusting. On the other hand, when BGM with a fast tempo is set or when the event is a sport, the entire album moving image is configured as a speedy moving image with a lively feeling. For this reason, it is considered appropriate to incorporate a panning video that is created by performing trimming to increase the playback speed as a video provided to the user. Furthermore, if the image size in the long side direction, or the ratio of the image size in the short side direction to the image size in the long side direction (aspect ratio) increases, the frame for creating a movie will not only change the aspect ratio. The number is increasing. This prevents a playback area of the panoramic image from becoming small in the generated moving image.

図9では、横長のパノラマ画像におけるトリミング方法について説明した。縦長のパノラマ画像の場合も、横長のパノラマ画像と同様に、図9のフローチャートによりトリミング方法(トリミング領域のサイズとトリミング領域の移動量)を決定できる。ただし、縦長のパノラマ画像の場合は、ステップS901、S905、S911、S912、S915の判定方法、ステップS906、S907,S908で設定されるアスペクト比が、横長のパノラマ画像とは異なる。   In FIG. 9, the trimming method for a horizontally long panoramic image has been described. Also in the case of a vertically long panoramic image, the trimming method (the size of the trimming area and the amount of movement of the trimming area) can be determined by the flowchart of FIG. However, in the case of a vertically long panoramic image, the determination method in steps S901, S905, S911, S912, and S915, and the aspect ratio set in steps S906, S907, and S908 are different from those of a horizontally long panoramic image.

横長のパノラマ画像においてトリミング方法を決定する場合の、横長のパノラマ画像でのトリミング方法決定処理とは異なる点を以下に説明する。下記で説明する以外の処理は、横長のパノラマ画像でのトリミング方法決定処理と同様である。   Differences from the trimming method determination process for a horizontally long panoramic image when the trimming method is determined for a horizontally long panoramic image will be described below. Processing other than that described below is the same as the trimming method determination processing for a horizontally long panoramic image.

ステップS901において、制御部101は、パノラマ画像の縦方向(長辺)の画像サイズが、閾値TH6未満であるかを判定する。そして、閾値TH6未満の場合は、ステップS908に進み、閾値TH6未満でない場合は、ステップS902に進む。   In step S901, the control unit 101 determines whether the image size in the vertical direction (long side) of the panoramic image is less than the threshold value TH6. If it is less than the threshold TH6, the process proceeds to step S908. If it is not less than the threshold TH6, the process proceeds to step S902.

ステップS905において、制御部101は、パノラマ画像の縦方向(長辺)の画像サイズが、閾値TH7(>TH6)未満であるかを判定する。そして、閾値TH7未満の場合は、ステップS908に進み、閾値TH7未満でない場合は、ステップS902に進む。   In step S905, the control unit 101 determines whether the image size in the vertical direction (long side) of the panoramic image is less than a threshold value TH7 (> TH6). If it is less than the threshold value TH7, the process proceeds to step S908. If it is not less than the threshold value TH7, the process proceeds to step S902.

同様に、制御部101は、ステップS911で、パノラマ画像の縦方向(長辺)の画像サイズが、閾値TH8(>TH7)以上であるか、ステップS912で、閾値TH9(>TH8)以上であるか、ステップS915で、閾値TH10(TH9)以上であるかを判定する。   Similarly, in step S911, the control unit 101 determines that the image size in the vertical direction (long side) of the panoramic image is greater than or equal to the threshold value TH8 (> TH7) or greater than or equal to the threshold value TH9 (> TH8) in step S912. In step S915, it is determined whether or not the threshold value is TH10 (TH9) or more.

なお、ステップS901、S905において、長辺の画像サイズと閾値とを比較せずに、アスペクト比と閾値とを比較することにより判定を行ってもよい。つまり、S901において(縦の画像サイズ/横の画像サイズ)が閾値TH60未満であるかを判定し、S905において(縦の画像サイズ/横の画像サイズ)が閾値TH70(>TH60)未満であるかを判定してもよい。また、S911において(縦の画像サイズ/横の画像サイズ)が閾値TH80(TH80>TH70)以上であるか、S912においては閾値TH90(>TH80)以上であるか、S912においては閾値TH100(>TH90)以上であるかを判定してもよい。   In steps S901 and S905, the determination may be made by comparing the aspect ratio with the threshold value without comparing the image size of the long side with the threshold value. That is, in S901, it is determined whether (vertical image size / horizontal image size) is less than the threshold value TH60. In S905, (vertical image size / horizontal image size) is less than the threshold value TH70 (> TH60). May be determined. In S911, (vertical image size / horizontal image size) is greater than or equal to threshold TH80 (TH80> TH70), is greater than or equal to threshold TH90 (> TH80) in S912, or is greater than threshold TH100 (> TH90 in S912). ) It may be determined whether or not.

ステップS906では、パノラマ画像は長辺方向にそれほど長くはないパノラマ画像であるので、制御部101は、トリミング領域のアスペクト比を、アルバム動画のアスペクト比と同じ16:9に設定する。   In step S906, since the panoramic image is a panoramic image that is not so long in the long side direction, the control unit 101 sets the aspect ratio of the trimming area to 16: 9, which is the same as the aspect ratio of the album moving image.

ステップS907では、パノラマ画像がある程度長辺方向に長いパノラマ画像であるので、制御部101は、パンニング動画を生成するためのトリミング領域のアスペクト比を、4:3に設定する。ステップS908では、パノラマ画像が長辺方向に非常に長いパノラマ画像であるので、制御部101は、パンニング動画を生成するためのトリミング領域のアスペクト比を、1:1に設定する。   In step S907, since the panoramic image is a panoramic image that is long in the long side direction to some extent, the control unit 101 sets the aspect ratio of the trimming area for generating the panning moving image to 4: 3. In step S908, since the panoramic image is a panoramic image that is very long in the long side direction, the control unit 101 sets the aspect ratio of the trimming area for generating the panning moving image to 1: 1.

ここで、図14を参照して、縦長のパノラマ画像1401を例に、トリミング領域のアスペクト比の設定とパンニング動画生成について説明する。   Here, with reference to FIG. 14, setting of the aspect ratio of the trimming region and generation of a panning video will be described using a vertically long panoramic image 1401 as an example.

パノラマ画像1401は、1600×3600のサイズを有する縦方向に長いパノラマ画像である。このパノラマ画像1401について、アルバム動画と同じ、アスペクト比16:9のトリミング領域でトリミングする場合、トリミング領域1411のサイズは、1600×900となる。ここで、パンニング動画を生成する際に、トリミング領域はフレーム毎にパノラマ画像の長辺方向(縦方向)に移動させるので、パノラマ画像の短辺方向(横方向)の画像サイズが、そのままトリミング領域の横方向のサイズとなる。また、パノラマ画像の長辺方向に対応する縦方向のトリミング領域のサイズは、パノラマ画像の短辺方向(横方向)の画像サイズとトリミング領域のアスペクト比とから算出できる。アスペクト比16:9のトリミング領域1411でトリミングする場合、アルバム動画も同じ16:9のアスペクト比であるため、トリミングした画像をリサイズするだけでアルバム動画のフレーム1412を生成することができる。   The panoramic image 1401 is a panoramic image having a size of 1600 × 3600 and long in the vertical direction. When the panoramic image 1401 is trimmed in the trimming area having the aspect ratio of 16: 9, which is the same as the album moving image, the size of the trimming area 1411 is 1600 × 900. Here, when the panning video is generated, the trimming area is moved in the long side direction (vertical direction) of the panoramic image for each frame, so that the image size in the short side direction (horizontal direction) of the panoramic image remains as it is. The horizontal size of The size of the vertical trimming region corresponding to the long side direction of the panoramic image can be calculated from the image size in the short side direction (horizontal direction) of the panoramic image and the aspect ratio of the trimming region. When trimming in the trimming area 1411 having an aspect ratio of 16: 9, the album moving image has the same aspect ratio of 16: 9. Therefore, the album moving image frame 1412 can be generated simply by resizing the trimmed image.

パノラマ画像1401ついて、アスペクト比4:3のトリミング領域でトリミングする場合、トリミング領域1421のサイズは、1600×1200となる。この場合、アルバム動画のアスペクト比とトリミング領域1421のアスペクト比が異なる。そのため、トリミングした画像(1600×1200)をリサイズして1440×1080の画像1423を生成し、さらに、リサイズした画像1423の左右にそれぞれ余分画像を付加して、1920×1080のアルバム動画のフレーム1422を生成する。   When the panorama image 1401 is trimmed in a trimming area having an aspect ratio of 4: 3, the size of the trimming area 1421 is 1600 × 1200. In this case, the aspect ratio of the album moving image and the aspect ratio of the trimming area 1421 are different. Therefore, the trimmed image (1600 × 1200) is resized to generate a 1440 × 1080 image 1423, and extra images are added to the left and right of the resized image 1423, respectively, so that the frame 1422 of the 1920 × 1080 album movie is obtained. Is generated.

さらに、パノラマ画像1401ついて、アスペクト比1:1のトリミング領域でトリミングする場合、トリミング領域1431のサイズは、1600×1600となる。この場合、アルバム動画のアスペクト比とトリミング領域1431のアスペクト比が異なる。そのため、トリミングした画像(1600×1600)をリサイズして1080×1080の画像1033を生成し、さらに、リサイズした画像1433の左右にそれぞれ余分画像を付加して、1920×1080のアルバム動画のフレーム1432を生成する。   Further, when the panorama image 1401 is trimmed in a trimming area having an aspect ratio of 1: 1, the size of the trimming area 1431 is 1600 × 1600. In this case, the aspect ratio of the album moving image and the aspect ratio of the trimming area 1431 are different. Therefore, the trimmed image (1600 × 1600) is resized to generate a 1080 × 1080 image 1033, and extra images are added to the left and right of the resized image 1433, respectively, so that the frame 1432 of the 1920 × 1080 album movie is added. Is generated.

ここで、アルバム画像と同じ16:9のアスペクト比でトリミングしたほうが、余分画像が付加せずにパンニング動画を生成することができる。16:9のアスペクト比に対し、4:3のアスペクト比のほうが、トリミングされる長辺方向(縦方向)の画像サイズが大きくなるため、16:9のときよりも、フレーム間でのトリミング位置の移動量を小さくし、パンニングのスピードを小さくすることができる。さらに、4:3のアスペクト比よりも、1:1のアスペクト比のほうが、トリミングされる長辺方向(縦方向)の画像サイズがさらに大きくなるため、フレーム間でのトリミング位置の移動量をさらに小さくし、パンニングのスピードを小さくすることができる。   Here, if the trimming is performed with the same 16: 9 aspect ratio as the album image, a panning moving image can be generated without adding an extra image. Since the aspect ratio of 4: 3 is larger than the aspect ratio of 16: 9, the image size in the long side direction (vertical direction) to be trimmed is larger, so the trimming position between frames is larger than that of 16: 9. The amount of movement can be reduced, and the panning speed can be reduced. Furthermore, since the aspect ratio of 1: 1 is larger than the aspect ratio of 4: 3, the image size in the long side direction (vertical direction) to be trimmed is further increased, and therefore the amount of movement of the trimming position between frames is further increased. It can be reduced and the panning speed can be reduced.

以上のように、縦長のパノラマ画像においても、横長のパノラマ画像と同様に、トリミング方法を決定することができる。   As described above, a trimming method can be determined for a vertically long panoramic image as well as a horizontally long panoramic image.

なお、本実施形態では、生成されるアルバム動画の画像サイズを、フルHD(1920×1080)サイズとしたが、ユーザの操作部102への操作により他のサイズに変更可能に構成してもよい。その場合、ステップS906で設定されるアスペクト比は、変更されたサイズのアルバム動画のアスペクト比と同じにする。そして、ステップS907では、アルバム動画のアスペクト比よりも、パノラマ画像の長辺方向の割合が大きくなるアスペクト比に設定し、ステップS907では、さらに長辺方向の割合が大きくなるアスペクト比に設定する。   In the present embodiment, the image size of the generated album movie is set to the full HD (1920 × 1080) size, but may be configured to be able to be changed to another size by the user's operation on the operation unit 102. . In that case, the aspect ratio set in step S906 is made the same as the aspect ratio of the album moving image of the changed size. In step S907, the aspect ratio is set so that the ratio in the long side direction of the panoramic image is larger than the aspect ratio of the album moving image. In step S907, the aspect ratio is set so that the ratio in the long side direction is further increased.

次に図11を用いてステップS705のMP4ファイルのデータをアルバム動画用ファイルに追記する処理について説明する。   Next, the process of adding the MP4 file data in step S705 to the album moving image file will be described with reference to FIG.

ステップS1101では、制御部101は、ファイル情報1502から特定されるMP4ファイルのうち、チャプタ番号1503で特定されるチャプタ番号のチャプタのデータを、記録媒体141から読み出して、メモリ104に一時保持する。ここで、ステップS1101では、特定されるチャプタ番号のデータについて、先頭から順に、特定の単位(GOP単位またはフレーム単位)で読み出す。   In step S <b> 1101, the control unit 101 reads out the chapter data of the chapter number specified by the chapter number 1503 from the MP4 file specified from the file information 1502 from the recording medium 141 and temporarily stores it in the memory 104. Here, in step S1101, the data of the specified chapter number is read in a specific unit (GOP unit or frame unit) in order from the top.

ステップS1102では、ステップS1101でメモリ104に保持したチャプタのデータのうち、H.264形式の画像(動画)データを、画像処理部111を用いてYUVデータへデコードし、ステップS1103へ進む。   In step S1102, among the chapter data held in the memory 104 in step S1101, H. The image (moving image) data in the H.264 format is decoded into YUV data using the image processing unit 111, and the process proceeds to step S1103.

ステップS1103では、制御部101は、ステップS1101でメモリ104に保持したチャプタのデータに音声データが含まれているか否かの判定を行う。音声データがあると判定した場合はS1104へ進む、音声データがないと判定した場合はS1105へ進む。   In step S1103, the control unit 101 determines whether voice data is included in the chapter data held in the memory 104 in step S1101. If it is determined that there is audio data, the process proceeds to S1104. If it is determined that there is no audio data, the process proceeds to S1105.

ステップS1104では、メモリ104に保持されたAAC形式の音声データを、音声処理部121を用いてPCM形式の音声データへデコードし、ステップS1106へ進む。   In step S1104, the audio data in the AAC format held in the memory 104 is decoded into audio data in the PCM format using the audio processing unit 121, and the process proceeds to step S1106.

一方、ステップS1105では、音声処理部121を用いて無音のPCM形式の音声データをメモリ104に格納し、ステップS1106へ進む。   On the other hand, in step S1105, silent PCM format audio data is stored in the memory 104 using the audio processing unit 121, and the process proceeds to step S1106.

ステップS1106では、メモリ104に保持したYUVデータについて、ステップS805、S813と同様に画像処理部111により画像処理効果を施す。また、YUVデータの縦横サイズが、アルバム動画の縦横サイズと異なる場合は、アルバム動画の縦横サイズとなるようにリサイズ処理を施す。ステップS1107では、ステップS1106で効果をかけたYUVデータについて、ステップS806、S816と同様に、画像処理部111によりエンコードして、H.264形式の画像(動画)データに変換する。   In step S1106, image processing effects are applied to the YUV data held in the memory 104 by the image processing unit 111 in the same manner as in steps S805 and S813. If the vertical and horizontal sizes of the YUV data are different from the vertical and horizontal sizes of the album moving image, the resizing process is performed so that the vertical and horizontal sizes of the album moving image are obtained. In step S1107, the YUV data applied in step S1106 is encoded by the image processing unit 111 as in steps S806 and S816, and the H.264 data is encoded. H.264 format image (moving image) data is converted.

ステップS1108では、ステップS1104およびステップS1105で作られたPCMデータを、音声処理部121を用いてAACにエンコードし、ステップS1109へ進む。この時、不揮発性メモリ105に記録されたBGMデータ(AACデータ)のビットレートよりも大きいビットレートでエンコードを実施することにより、記録媒体141に記録するMP4ファイルの音声品質を高めることが可能である。容量制約のある不揮発性メモリ105に記録するBGMデータは、ビットレートを抑制する事で、容量を小さくすることで複数のBGMデータを格納することを可能とする。   In step S1108, the PCM data created in steps S1104 and S1105 is encoded into AAC using the audio processing unit 121, and the process proceeds to step S1109. At this time, by performing encoding at a bit rate larger than the bit rate of BGM data (AAC data) recorded in the non-volatile memory 105, it is possible to improve the sound quality of the MP4 file recorded on the recording medium 141. is there. The BGM data to be recorded in the non-volatile memory 105 with a capacity restriction can be stored in a plurality of BGM data by reducing the capacity by suppressing the bit rate.

ステップS1109は、ステップS808と同様に、ステップS1107、S1108で生成された画像データ及び音声データからなるストリームデータを、ステップS701で記録媒体141に作成したアルバム動画用のファイルに追記する。ステップS1110で、制御部101は、フレーム数1504で指定されたフレーム数について、ステップS1101〜S1108の処理を行ったかを判定する。指定されたフレーム数の処理が完了したと判定された場合はステップS1111へ進む。完了していないと判定した場合はステップS1101に戻り、指定されたフレーム数の処理が完了するまで処理を繰り返す。   In step S1109, as in step S808, the stream data composed of the image data and audio data generated in steps S1107 and S1108 is added to the album moving image file created on the recording medium 141 in step S701. In step S1110, the control unit 101 determines whether the processing in steps S1101 to S1108 has been performed for the number of frames specified by the number of frames 1504. If it is determined that the processing for the designated number of frames has been completed, the process proceeds to step S1111. If it is determined that the process has not been completed, the process returns to step S1101, and the process is repeated until the process for the designated number of frames is completed.

ステップS1111では、ストリームを追記したアルバム用動画ファイルのファイル管理情報を更新して記録する。なお、シナリオで指定されたチャプタから生成された動画が、1つのチャプタとして構成されるように、管理情報を更新する。このようにして、シナリオで指定された動画のチャプタから生成したアルバム動画用のデータが、アルバム用動画ファイルに追記される。   In step S1111, the file management information of the album moving image file to which the stream has been added is updated and recorded. Note that the management information is updated so that the moving image generated from the chapter specified in the scenario is configured as one chapter. In this manner, the album moving image data generated from the moving image chapter specified in the scenario is added to the album moving image file.

次に図12を用いてステップS709のアルバム動画のMP4ファイルにBGMを合成する処理について説明する。   Next, the process of combining BGM with the MP4 file of the album moving image in step S709 will be described using FIG.

ステップS1201では、合成用のBGMデータとして選択されている、WAVファイルを記録媒体141から読み出してメモリ104保持し、ステップS1202へ進む。   In step S1201, the WAV file selected as the composition BGM data is read from the recording medium 141 and stored in the memory 104, and the process proceeds to step S1202.

ステップS1202では、BGM合成用のMP4ファイルを新規作成し、記録媒体141に記録する。   In step S1202, an MP4 file for BGM synthesis is newly created and recorded on the recording medium 141.

ステップS1203は、アルバム動画のMP4ファイルのデータを記録媒体141から読み出してメモリ104に保持する。ここでは、MP4ファイルのデータを先頭から順に、所定の単位(GOP単位、フレーム単位、時間単位)で読みだす。   In step S1203, the MP4 file data of the album moving image is read from the recording medium 141 and stored in the memory 104. Here, the MP4 file data is read in order from the top in a predetermined unit (GOP unit, frame unit, time unit).

ステップS1204では、ステップS1203でメモリ104に保持したMP4ファイルのH.264形式の画像データをデコードし、YUVデータにする。ステップS1205では、テップS1203でメモリ104に保持したMP4ファイルのAAC形式の音声データをデコードしPCM形式の音声データに変換する。   In step S1204, the H.264 of the MP4 file held in the memory 104 in step S1203. H.264 format image data is decoded into YUV data. In step S1205, the AAC format audio data of the MP4 file held in the memory 104 in step S1203 is decoded and converted to PCM format audio data.

ステップS1206では、ステップS1201でメモリ104に保持したWAVファイルのPCMデータとステップS1205でデコードされたPCMデータとを、音声処理部121を用いてミックス処理を行う。ここで、ミックスする割合はシナリオに記載されている合成率0%、50%、100%のいずれかに応じて合成処理を行い、ステップS1207へ進む。   In step S1206, the audio processing unit 121 is used to mix the PCM data of the WAV file held in the memory 104 in step S1201 and the PCM data decoded in step S1205. Here, the mixing ratio is set according to one of the synthesis rates 0%, 50%, and 100% described in the scenario, and the process proceeds to step S1207.

ステップS1207では、ステップS1204で生成したYUVデータを。H.264データにエンコードする。ステップS1208では、ステップS1206でBGMがミックスされたPCMデータをACCにエンコードする。そして、ステップS1209では、ステップS1207で取得したH.264形式の動画データと、ステップS1208で取得したAAC形式の音声データと〜構成されるストリームデータを、ステップS1202で作成したGM合成用のMP4ファイルに記録する。既に、ストリームデータが記録されている場合は、追記していく。ステップS1201では、制御部101は、BGMの合成が指定されたアルバム動画のMP4ファイルの全フレームのデータについて、ステップS1203〜S1209の処理が完了したかを判定する。完了したと判定されるまで、ステップS1203〜S1209の処理を繰り返す。完了したと判定されたら、ステップS1211において、BGM合成用のMP4ファイルの管理情報を記録する。そして、ステップS1212では、BGM合成対象として指定されていたBGM合成前のMP4ファイルを記録媒体141から削除する。   In step S1207, the YUV data generated in step S1204 is obtained. H. Encode to H.264 data. In step S1208, the PCM data mixed with the BGM in step S1206 is encoded into ACC. In step S1209, the H.P. The H.264 format moving image data and the AAC format audio data obtained in step S1208 are recorded in the MP4 file for GM synthesis created in step S1202. If stream data has already been recorded, it is appended. In step S1201, the control unit 101 determines whether the processing in steps S1203 to S1209 has been completed for the data of all frames of the MP4 file of the album moving image for which BGM composition is specified. The processes in steps S1203 to S1209 are repeated until it is determined that the process has been completed. If it is determined that the process has been completed, management information of the MP4 file for BGM synthesis is recorded in step S1211. In step S <b> 1212, the MP4 file before BGM composition that has been designated as the BGM composition target is deleted from the recording medium 141.

このようにして、BGMの合成処理が実行される。   In this way, the BGM synthesis process is executed.

次に、ステップS609のプレビュー再生について説明する。   Next, the preview reproduction in step S609 will be described.

プレビュー再生処理においては、ステップS606のアルバム動画保存処理と同様にアルバム動画が作成される。ただし、プレビュー再生処理では、生成されたアルバム動画は、記録媒体141には記録せずに、表示制御部により表示用のデータに変換され、表示部130に表示される。記録媒体への記録はしないので、リサイズや効果を施してYUVデータを生成した後、H.264へのエンコードは行わずに、すぐに表示用のデータに変換して表示部130に表示するようにしてもよい。   In the preview reproduction process, an album moving image is created in the same manner as the album moving image storage process in step S606. However, in the preview reproduction process, the generated album moving image is not recorded on the recording medium 141 but is converted to display data by the display control unit and displayed on the display unit 130. Since recording on the recording medium is not performed, the Y.V. Instead of encoding to H.264, it may be immediately converted into display data and displayed on the display unit 130.

このように、本実施形態の撮像装置100では、アルバム動画を生成し、記録、または、表示(再生)する際に、再生対象としてパノラマ画像が含まれている場合に、パンニング動画を生成する。そして、パノラマ画像からパンニング動画を生成する際に、パノラマ画像の長辺方向の画像サイズまたはアスペクト比、BGMのテンポ、撮影シーンに応じて、トリミング方法を決定する。そのため、パノラマ画像から適切な動画を生成することができる。   As described above, in the imaging apparatus 100 according to the present embodiment, when an album moving image is generated, recorded, or displayed (reproduced), a panning moving image is generated when a panoramic image is included as a reproduction target. When a panning video is generated from a panoramic image, a trimming method is determined according to the image size or aspect ratio in the long side direction of the panoramic image, the BGM tempo, and the shooting scene. Therefore, an appropriate moving image can be generated from the panoramic image.

なお、本実施形態では、アルバム動画を生成して保存するものとしたが、生成したシナリオを記録媒体141に保存することにより、次回も同じアルバム動画の再生を行うようにしてもよい。その場合、再生時に出力するアスペクト比を変更することができる。そのため、例えばアスペクト比の異なる外部の表示装置にアルバム動画を出力する際などにも、外部表示装置の表示サイズや画像を表示する表示領域のサイズに応じた、適切なアルバム動画を生成することができる。この場合、上記で説明した処理において、アルバム動画の画像サイズの代わりに、表示サイズを用いて処理を実行する。   In this embodiment, the album moving image is generated and stored. However, the same scenario moving image may be reproduced next time by storing the generated scenario in the recording medium 141. In that case, the aspect ratio output at the time of reproduction can be changed. Therefore, for example, when outputting an album video to an external display device having a different aspect ratio, an appropriate album video can be generated according to the display size of the external display device or the size of the display area for displaying an image. it can. In this case, in the process described above, the process is executed using the display size instead of the image size of the album moving image.

<その他の実施形態>
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。また、上述の実施形態の機能を実現するソフトウェアのプログラムを、記録媒体から直接、或いは有線/無線通信を用いてプログラムを実行可能なコンピュータを有するシステム又は装置に供給し、そのプログラムを実行する場合も本発明に含む。従って、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明の機能処理を実現するためのコンピュータプログラム自体も本発明に含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。プログラムを供給するための記録媒体としては、例えば、ハードディスク、磁気テープ等の磁気記録媒体、光/光磁気記憶媒体、不揮発性の半導体メモリでもよい。また、プログラムの供給方法としては、コンピュータネットワーク上のサーバに本発明を形成するコンピュータプログラムを記憶し、接続のあったクライアントコンピュータはがコンピュータプログラムをダウンロードしてプログラムするような方法も考えられる。
<Other embodiments>
Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. A part of the above-described embodiments may be appropriately combined. Also, when a software program that realizes the functions of the above-described embodiments is supplied from a recording medium directly to a system or apparatus having a computer that can execute the program using wired / wireless communication, and the program is executed Are also included in the present invention. Accordingly, the program code itself supplied and installed in the computer in order to implement the functional processing of the present invention by the computer also realizes the present invention. That is, the computer program itself for realizing the functional processing of the present invention is also included in the present invention. In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS. As a recording medium for supplying the program, for example, a magnetic recording medium such as a hard disk or a magnetic tape, an optical / magneto-optical storage medium, or a nonvolatile semiconductor memory may be used. As a program supply method, a computer program that forms the present invention is stored in a server on a computer network, and a connected client computer downloads and programs the computer program.

Claims (19)

パノラマ画像を取得する取得手段と、
前記パノラマ画像に基づいて動画を生成する動画生成手段であって、前記パノラマ画像をトリミングする際のトリミング領域の位置を順次移動してトリミングし、位置を変更してトリミングした複数のトリミング画像が順次再生される所定時間分の動画を生成する動画生成手段と、を有し、
前記動画生成手段は、前記パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、前記パノラマ画像を所定のアスペクト比でトリミングするか、前記パノラマ画像を前記所定のアスペクト比と異なるアスペクト比でトリミングするかを切り替え、さらに、前記所定のアスペクト比と異なるアスペクト比でトリミングする場合に、前記パノラマ画像のアスペクト比または所定方向のサイズに応じて、前記所定時間よりも長い時間分の動画を生成することを特徴とする画像処理装置。
An acquisition means for acquiring a panoramic image;
A moving image generating means for generating a moving image based on the panoramic image, wherein a plurality of trimmed images trimmed by sequentially moving and trimming the position of a trimming area when trimming the panoramic image and changing the position Video generation means for generating a video for a predetermined time to be played,
The moving image generation means trims the panoramic image with a predetermined aspect ratio or trims the panoramic image with an aspect ratio different from the predetermined aspect ratio according to the size or aspect ratio of the panoramic image in a predetermined direction. In addition, when trimming with an aspect ratio different from the predetermined aspect ratio, a video for a time longer than the predetermined time is generated according to the aspect ratio of the panoramic image or the size in a predetermined direction. An image processing apparatus.
前記所定のアスペクト比は、前記動画生成手段により生成される動画のアスペクト比であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the predetermined aspect ratio is an aspect ratio of a moving image generated by the moving image generation unit. 前記動画生成手段は、前記パノラマ画像をトリミングする際に、トリミング領域のアスペクト比は変更せずに、トリミング領域の位置を順次移動することを特徴とする請求項1または2に記載の画像処理装置。   3. The image processing apparatus according to claim 1, wherein the moving image generation unit sequentially moves the position of the trimming area without changing the aspect ratio of the trimming area when the panoramic image is trimmed. 4. . 前記動画生成手段は、前記パノラマ画像の画像サイズと、トリミング領域のアスペクト比とに応じて、トリミング領域の位置の移動量を決定することを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the moving image generation unit determines a movement amount of the position of the trimming area according to an image size of the panoramic image and an aspect ratio of the trimming area. 前記動画生成手段は、前記パノラマ画像の画像サイズと、トリミング領域のアスペクト比と、前記所定時間の長さとに応じて、トリミング領域の位置の移動量を決定することを特徴とする請求項4に記載の画像処理装置。   The moving image generation means determines the amount of movement of the position of the trimming area according to the image size of the panoramic image, the aspect ratio of the trimming area, and the length of the predetermined time. The image processing apparatus described. 前記動画生成手段は、前記パノラマ画像をトリミングする際に、トリミング領域の位置を、前記パノラマ画像の長辺方向の一方の端部から、長辺方向の他方の端部まで移動させることを特徴とする請求項1ないし5のいずれか1項に記載の画像処理装置。   The moving image generating means, when trimming the panoramic image, moves the position of the trimming region from one end portion in the long side direction of the panoramic image to the other end portion in the long side direction. The image processing apparatus according to claim 1. 前記動画生成手段は、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが所定の値よりも小さい場合に、前記所定のアスペクト比でトリミングして動画を生成し、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが前記所定の値よりも大きいさい場合に、前記所定のアスペクト比よりも前記パノラマ画像の長辺に対応する辺のサイズが大きくなるアスペクト比でトリミングし、トリミングされた画像に所定のデータを付加して動画を生成することを特徴とする請求項1ないし6のいずれか1項に記載の画像処理装置。   The moving image generating means generates a moving image by trimming at the predetermined aspect ratio when the long side size of the panoramic image or the long side size / short side size is smaller than a predetermined value, When the size of the long side of the panoramic image or the size of the long side / the size of the short side is larger than the predetermined value, the side corresponding to the long side of the panoramic image is larger than the predetermined aspect ratio. The image processing apparatus according to any one of claims 1 to 6, wherein a moving image is generated by trimming at an aspect ratio that increases in size and adding predetermined data to the trimmed image. 前記動画生成手段は、前記所定のアスペクト比と異なるアスペクト比でトリミングする場合に、前記パノラマ画像の所定方向のサイズまたはアスペクト比に応じて決定される時間分の動画を生成することを特徴とする請求項1ないし7のいずれか1項に記載の画像処理装置。   The moving image generating means generates a moving image for a time determined according to a size or an aspect ratio of the panoramic image in a predetermined direction when trimming with an aspect ratio different from the predetermined aspect ratio. The image processing apparatus according to claim 1. 前記動画生成手段は、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが所定の値よりも大きいさい場合に、前記所定時間よりも長い時間分の動画を生成することを特徴とする請求項1ないし8のいずれか1項に記載の画像処理装置。   The moving image generation unit generates a moving image for a time longer than the predetermined time when the size of the long side of the panoramic image or the size of the long side / the size of the short side is larger than a predetermined value. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus. パノラマ画像を取得する取得手段と、
前記パノラマ画像の一部領域をトリミングし、トリミングされた画像を表示するように制御する表示制御手段であって、1つのパノラマ画像について所定期間の表示を行うために、前記パノラマ画像のトリミング領域の位置を順次移動してトリミングし、位置を変更してトリミングしたトリミング画像を前記所定期間内に順次表示させるように制御する表示制御手段と、を有し、
前記表示制御手段は、前記パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、前記パノラマ画像を所定のアスペクト比でトリミングするか、前記パノラマ画像を前記所定のアスペクト比と異なるアスペクト比でトリミングするかを切り替え、さらに、前記所定のアスペクト比と異なるアスペクト比でトリミングする場合に、前記パノラマ画像の所定方向のサイズまたはアスペクト比に応じて、1つのパノラマ画像について表示する期間を前記所定期間よりも長い期間とすることを特徴とする画像処理装置。
An acquisition means for acquiring a panoramic image;
Display control means for trimming a partial area of the panoramic image and controlling the trimmed image to be displayed. In order to display a single panoramic image for a predetermined period, Display control means for controlling the trimming by sequentially moving the position, trimming, and trimming the trimmed image by changing the position within the predetermined period;
The display control means trims the panoramic image with a predetermined aspect ratio or trims the panoramic image with an aspect ratio different from the predetermined aspect ratio according to the size or aspect ratio of the panoramic image in a predetermined direction. In addition, when trimming with an aspect ratio different from the predetermined aspect ratio, a period for displaying one panoramic image is longer than the predetermined period according to the size or aspect ratio of the panoramic image in a predetermined direction. An image processing apparatus having a long period.
前記所定のアスペクト比は、前記パノラマ画像を表示させる際の表示サイズに対応するアスペクト比であることを特徴とする請求項10に記載の画像処理装置。   The image processing apparatus according to claim 10, wherein the predetermined aspect ratio is an aspect ratio corresponding to a display size when the panoramic image is displayed. 前記表示制御手段は、前記パノラマ画像をトリミングして表示する際に、トリミング領域のアスペクト比は変更せずに、トリミング領域の位置を順次移動することを特徴とする請求項10または11に記載の画像処理装置。   12. The display control unit according to claim 10, wherein when the panoramic image is trimmed and displayed, the display control unit sequentially moves the position of the trimming area without changing the aspect ratio of the trimming area. Image processing device. 前記表示制御手段は、前記パノラマ画像の画像サイズと、トリミング領域のアスペクト比とに応じて、トリミング領域の位置の移動量を決定することを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the display control unit determines a movement amount of a position of the trimming area according to an image size of the panoramic image and an aspect ratio of the trimming area. 前記表示制御手段は、前記パノラマ画像の画像サイズと、トリミング領域のアスペクト比と、前記所定期間の長さとに応じて、トリミング領域の位置の移動量を決定することを特徴とする請求項10ないし13のいずれか1項に記載の画像処理装置。   11. The display control means determines the amount of movement of the position of the trimming area according to the image size of the panoramic image, the aspect ratio of the trimming area, and the length of the predetermined period. 14. The image processing device according to any one of items 13. 前記表示制御手段は、前記パノラマ画像をトリミングする際に、トリミング領域の位置を、前記パノラマ画像の長辺方向の一方の端部から、長辺方向の他方の端部まで移動させることを特徴とする請求項10ないし14のいずれか1項に記載の画像処理装置。   The display control means, when trimming the panoramic image, moves the position of the trimming region from one end portion in the long side direction of the panoramic image to the other end portion in the long side direction. The image processing apparatus according to any one of claims 10 to 14. 前記表示制御手段は、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが所定の値よりも小さい場合に、前記所定のアスペクト比でトリミングして表示し、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが前記所定の値よりも大きい場合に、前記所定のアスペクト比よりも前記パノラマ画像の長辺に対応する辺のサイズが大きくなるアスペクト比でトリミングし、トリミングされた画像に所定のデータを付加して生成された前記所定のアスペクト比の画像を表示するように制御することを特徴とする請求項10ないし15のいずれかに記載の画像処理装置。   The display control means trims and displays the panorama image with the predetermined aspect ratio when the size of the long side of the panoramic image or the size of the long side / the size of the short side is smaller than a predetermined value. When the size of the long side of the image or the size of the long side / the size of the short side is larger than the predetermined value, the size of the side corresponding to the long side of the panoramic image is larger than the predetermined aspect ratio. 16. The method according to any one of claims 10 to 15, wherein trimming is performed with an aspect ratio and control is performed to display the image with the predetermined aspect ratio generated by adding predetermined data to the trimmed image. The image processing apparatus described. 前記表示制御手段は、前記所定のアスペクト比と異なるアスペクト比でトリミングする場合に、1つのパノラマ画像について表示を行う所定期間を、前記パノラマ画像の所定方向のサイズまたはアスペクト比に応じて決定することを特徴とする請求項10ないし16のいずれか1項に記載の画像処理装置。   The display control means determines a predetermined period for displaying one panoramic image according to the size or aspect ratio of the panoramic image in a predetermined direction when trimming with an aspect ratio different from the predetermined aspect ratio. The image processing apparatus according to claim 10, wherein: 前記表示制御手段は、前記パノラマ画像の長辺のサイズ、または、長辺のサイズ/短辺のサイズが所定の値よりも大きいさい場合に、1つのパノラマ画像について表示を行う所定期間を、前記所定期間よりも長くすることを特徴とする請求項10ないし17のいずれか1項に記載の画像処理装置。   The display control means has a predetermined period for displaying one panoramic image when the size of the long side of the panoramic image or the size of the long side / the size of the short side is larger than a predetermined value. The image processing apparatus according to claim 10, wherein the image processing apparatus is longer than a predetermined period. コンピュータを、請求項1ないし18に記載の画像処理装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the image processing apparatus according to claim 1.
JP2018023275A 2018-02-13 2018-02-13 Image processing system Pending JP2019140567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018023275A JP2019140567A (en) 2018-02-13 2018-02-13 Image processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018023275A JP2019140567A (en) 2018-02-13 2018-02-13 Image processing system

Publications (1)

Publication Number Publication Date
JP2019140567A true JP2019140567A (en) 2019-08-22

Family

ID=67695543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018023275A Pending JP2019140567A (en) 2018-02-13 2018-02-13 Image processing system

Country Status (1)

Country Link
JP (1) JP2019140567A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023503519A (en) * 2019-11-29 2023-01-30 華為技術有限公司 Videography method and electronic device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023503519A (en) * 2019-11-29 2023-01-30 華為技術有限公司 Videography method and electronic device
US11856286B2 (en) 2019-11-29 2023-12-26 Huawei Technologies Co., Ltd. Video shooting method and electronic device
JP7450035B2 (en) 2019-11-29 2024-03-14 華為技術有限公司 Video shooting methods and electronic equipment

Similar Documents

Publication Publication Date Title
JP5568178B2 (en) How to summarize videos
JP2013533669A (en) Video summary instruction metadata storage
JP6332996B2 (en) Moving image processing apparatus, imaging apparatus, and moving image processing method
US8428121B2 (en) Image pick-up apparatus for shooting and reproducing a moving image
CN106683601B (en) Display control apparatus and control method thereof
JP4639965B2 (en) Imaging apparatus, image processing method, and program
JP2006254129A (en) Histogram display device
JP6460783B2 (en) Image processing apparatus and control method thereof
JP2006211324A (en) Digital camera apparatus, method and program for reproducing image, and data structure
JP7013272B2 (en) Image processing equipment
JP2019140567A (en) Image processing system
JP6355333B2 (en) Imaging apparatus, image processing apparatus, image processing method, and program
JP2017046160A (en) Image processing system, control method of the same, control program, and storage medium
JP4698961B2 (en) Electronic camera and electronic camera control program
JP5181453B2 (en) Image display device, image display method, and program
JP6685700B2 (en) Display control device, control method thereof, program, and storage medium
KR101285382B1 (en) A device having function editting of image and Method thereof
JP2018074523A (en) Imaging device, control method thereof, program, and recording medium
JP6463967B2 (en) Imaging apparatus and control method thereof
JP5464231B2 (en) Image display device, image display method, and program
JP6643081B2 (en) Album moving image generating apparatus, album moving image generating method, and program
JP6983692B2 (en) Image pickup device, its display control method, and program
JP6332963B2 (en) Image processing apparatus and image processing apparatus control method
JP2017090685A (en) Display control device and method for controlling the same
JP6598670B2 (en) Image processing apparatus, control method thereof, and program