JP2010200360A - Imaging apparatus, stroboscopic image generation method, and program - Google Patents

Imaging apparatus, stroboscopic image generation method, and program Download PDF

Info

Publication number
JP2010200360A
JP2010200360A JP2010100484A JP2010100484A JP2010200360A JP 2010200360 A JP2010200360 A JP 2010200360A JP 2010100484 A JP2010100484 A JP 2010100484A JP 2010100484 A JP2010100484 A JP 2010100484A JP 2010200360 A JP2010200360 A JP 2010200360A
Authority
JP
Japan
Prior art keywords
image
subject
dimensional data
generating
strobe
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
JP2010100484A
Other languages
Japanese (ja)
Inventor
Tetsuji Makino
哲司 牧野
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2010100484A priority Critical patent/JP2010200360A/en
Publication of JP2010200360A publication Critical patent/JP2010200360A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To generate a stroboscopic image at a high speed by extracting an object part of effective frames and synthesizing the extracted object image and a background image. <P>SOLUTION: A one-dimensional data generating section 213 converts images, continuously photographed and stored in an image memory 230 by continuous photographing operation of an imaging section 100 to one-dimensional data whose data amount is small, by projecting them in one direction according to a moving direction of a photographed object. If an object detecting section 214 detects a part which shows the photographed object in respective photographed images, on the basis of the generated one-dimensional data, an image selection section 215 selects images in which the detected photographed object parts do not overlap as effective frames. If the effective frames are selected, on the basis of the one-dimensional data, a background image generation section 216 generates the background image using pixel values of the effective frames, and at the same time, the object detecting section 214 extracts the photographed object part of the respective effective frames. A stroboscopic image generating section 217 synthesizes the extracted photographed object image and the background image to generate a stroboscopic image. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、撮像装置、ストロボ画像生成方法、および、プログラムに関し、特に、撮像装置でのストロボ画像生成に好適な撮像装置、ストロボ画像生成方法、および、プログラムに関する。   The present invention relates to an imaging device, a strobe image generation method, and a program, and more particularly to an imaging device, a strobe image generation method, and a program suitable for strobe image generation in the imaging device.

固定したカメラで移動する被写体を撮影し、1枚の画像(写真)内に移動経過の様子を表したストロボ画像(マルチストロボ画像)が知られている。フィルムカメラ時代においては、長時間露光中に移動被写体へ複数回のストロボ発光をおこなうことでこのようなストロボ画像を生成していたが、デジタルカメラが普及した今日においては、カメラ内のコンピュータによる画像処理でストロボ画像の生成が可能となっている。   A stroboscopic image (multi-stroboscopic image) is known in which a moving subject is photographed with a fixed camera and a moving image is shown in one image (photo). In the era of film cameras, such strobe images were generated by flashing a moving subject multiple times during a long exposure, but in today's widespread use of digital cameras, images from computers in cameras are used. A strobe image can be generated by the processing.

このような画像処理によるストロボ画像生成では、従来、被写体が重ならない画像同士から被写体を取り出したり(例えば、特許文献1)、動画上の特定の領域から背景らしい撮影時間を特定したり(例えば、特許文献2)することで被写体の位置を判別していた。   In the strobe image generation by such image processing, conventionally, subjects are taken out from images in which subjects do not overlap (for example, Patent Document 1), or a shooting time that seems to be a background is specified from a specific area on a moving image (for example, (Patent Document 2) to determine the position of the subject.

特許第3793258号Japanese Patent No. 3793258 特許第3569992号Patent No. 35699992

このような従来技術では、連写撮影や動画撮影におけるフレームレートが変化したり、被写体の大きさが変化したりする場合などでは、撮像画像すべてについての領域情報が取得できるまで画像内での被写体の位置を特定することができない。このため、連写画像や動画像からストロボ画像を生成する場合、使用する画像の選択に時間がかかってしまい、ストロボ画像を高速に生成することができなかった。   In such a conventional technique, when the frame rate in continuous shooting or moving image shooting changes or the size of the subject changes, the subject in the image is acquired until the area information about all the captured images can be acquired. The position of cannot be specified. For this reason, when a strobe image is generated from a continuous image or a moving image, it takes time to select an image to be used, and the strobe image cannot be generated at high speed.

本発明は、上記実状に鑑みてなされたものであり、高速にストロボ画像を生成することのできる撮像装置、ストロボ画像生成方法、および、プログラムを提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an imaging device, a strobe image generation method, and a program that can generate a strobe image at high speed.

上記目的を達成するため、本発明の第1の観点にかかる撮像装置は、
撮像により連続する複数の撮像画像を生成する撮像手段と、
前記撮像手段が生成した各撮像画像から、被写体の移動方向に応じた1次元データを生成する1次元データ生成手段と、
前記1次元データ生成手段が生成した1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する被写体検出手段と、
前記被写体検出手段が検出した被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する画像選択手段と、
前記画像選択手段が選択した撮像画像から背景画像を生成する背景画像生成手段と、
前記背景画像生成手段が生成した背景画像と、前記画像選択手段が選択した撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成するストロボ画像生成手段と、
を備えることを特徴とする。
In order to achieve the above object, an imaging apparatus according to the first aspect of the present invention provides:
Imaging means for generating a plurality of continuous captured images by imaging;
One-dimensional data generating means for generating one-dimensional data corresponding to the moving direction of the subject from each captured image generated by the imaging means;
Subject detection means for detecting a portion indicating the subject in each captured image based on the one-dimensional data generated by the one-dimensional data generation means;
Image selecting means for selecting the captured image used for generating the strobe image based on a portion indicating the subject detected by the subject detecting means;
Background image generation means for generating a background image from the captured image selected by the image selection means;
A strobe image generating means for generating a strobe image by combining the background image generated by the background image generating means and the portion indicating the subject in the captured image selected by the image selecting means;
It is characterized by providing.

上記撮像装置において、
前記1次元データ生成手段は、
被写体の移動方向と直交する方向に前記各撮像画像を投影した投影データを前記1次元データとして生成することが望ましい。
In the imaging apparatus,
The one-dimensional data generation means includes
It is desirable to generate projection data obtained by projecting each captured image in the direction orthogonal to the moving direction of the subject as the one-dimensional data.

上記撮像装置において、
前記被写体検出手段は、前記1次元データと、当該1次元データ上の同一座標における画素値との差分と閾値との比較により、前記被写体を示す部分を検出することが望ましい。
In the imaging apparatus,
The subject detection means preferably detects a portion indicating the subject by comparing a difference between the one-dimensional data and a pixel value at the same coordinate on the one-dimensional data and a threshold value.

上記撮像装置において、
前記画像選択手段は、前記被写体検出手段によって検出された前記被写体を示す部分が重ならない撮像画像を選択することが望ましい。
In the imaging apparatus,
It is desirable that the image selection unit selects a captured image in which a portion indicating the subject detected by the subject detection unit does not overlap.

上記目的を達成するため、本発明の第2の観点にかかるストロボ画像生成方法は、
撮像装置による撮像からストロボ画像を生成するストロボ画像生成方法であって、
前記撮像装置が、
撮像によって生成した連続する複数の撮像画像から、被写体の移動方向に応じた1次元データを生成する1次元データ生成ステップと、
前記1次元データ生成ステップで生成された1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する被写体検出ステップと、
前記被写体検出ステップで検出された被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する画像選択ステップと、
前記画像選択ステップで選択された撮像画像から背景画像を生成する背景画像生成ステップと、
前記背景画像生成ステップで生成された背景画像と、前記画像選択ステップで選択された撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成するストロボ画像生成ステップと、
を実行することを特徴とする。
In order to achieve the above object, a strobe image generation method according to a second aspect of the present invention includes:
A strobe image generation method for generating a strobe image from imaging by an imaging device,
The imaging device is
A one-dimensional data generation step for generating one-dimensional data according to the moving direction of the subject from a plurality of consecutive captured images generated by imaging;
A subject detection step of detecting a portion indicating the subject in each captured image based on the one-dimensional data generated in the one-dimensional data generation step;
An image selection step of selecting the captured image used for generating the strobe image based on a portion indicating the subject detected in the subject detection step;
A background image generation step of generating a background image from the captured image selected in the image selection step;
A strobe image generation step of generating a strobe image by combining the background image generated in the background image generation step and the portion indicating the subject in the captured image selected in the image selection step;
It is characterized by performing.

上記目的を達成するため、本発明の第3の観点にかかるプログラムは、
コンピュータに、
撮像によって生成された連続する複数の撮像画像から、被写体の移動方向に応じた1次元データを生成する機能と、
前記1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する機能と、
前記検出された被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する機能と、
前記選択された撮像画像から背景画像を生成する機能と、
前記生成された背景画像と、前記選択された撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成する機能と、
を実現させることを特徴とする。
In order to achieve the above object, a program according to the third aspect of the present invention is:
On the computer,
A function of generating one-dimensional data corresponding to the moving direction of the subject from a plurality of consecutive captured images generated by imaging;
A function of detecting a portion indicating the subject in each captured image based on the one-dimensional data;
A function of selecting the captured image used for generating a strobe image based on a portion indicating the detected subject;
A function of generating a background image from the selected captured image;
A function of generating a strobe image by combining the generated background image and a portion showing the subject in the selected captured image;
It is characterized by realizing.

本発明によれば、ストロボ画像をより高速に生成することができる。   According to the present invention, a strobe image can be generated at a higher speed.

本発明の実施形態にかかるデジタルカメラの構成を示すブロック図である。It is a block diagram which shows the structure of the digital camera concerning embodiment of this invention. 図1に示す制御部によって実現される機能を示す機能ブロック図である。It is a functional block diagram which shows the function implement | achieved by the control part shown in FIG. 本発明の実施形態にかかる「ストロボ画像生成処理」を説明するためのフローチャートである。It is a flowchart for demonstrating the "strobe image generation process" concerning embodiment of this invention. 図3に示す「ストロボ画像生成処理」で表示される設定画面の表示例を説明するための図であり、(a)は、カメラの向きを指定するための設定画面の表示例を示し、(b)は、被写体の移動方向を指定するための設定画面の表示例を示す。FIG. 4 is a diagram for explaining a display example of a setting screen displayed in the “strobe image generation processing” shown in FIG. 3, and (a) shows a display example of a setting screen for designating the orientation of the camera; b) shows a display example of a setting screen for designating the moving direction of the subject. 本発明の実施形態にかかる撮像画像を説明するための図であり、(a)は、ストロボ画像生成に必要となる連写撮影の場面を例示し、(b)は、(a)に示した連写撮影で得られた撮像画像(連写画像)の例を示す。It is a figure for demonstrating the captured image concerning embodiment of this invention, (a) illustrated the scene of the continuous shooting required for strobe image generation, (b) was shown to (a). An example of a captured image (continuous shot image) obtained by continuous shooting is shown. 図3に示す「ストロボ画像生成処理」で実行される「1次元データ生成処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “one-dimensional data generation processing” executed in “strobe image generation processing” shown in FIG. 3. 図6に示す「1次元データ生成処理」を説明するための図であり、(a)は、撮像画像における座標と被写体移動方向の関係を示し、(b)および(c)は、撮像画像の投影と1次元データの例を示し、(d)は、(b)および(c)に示した1次元データを重ねて示した図である。FIG. 7 is a diagram for explaining the “one-dimensional data generation process” shown in FIG. 6, where (a) shows the relationship between the coordinates in the captured image and the subject movement direction, and (b) and (c) show the captured image. An example of projection and one-dimensional data is shown, and (d) is a diagram in which the one-dimensional data shown in (b) and (c) are superimposed. 図3に示す「ストロボ画像生成処理」で実行される「被写体領域検出処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “subject area detection processing” executed in “strobe image generation processing” shown in FIG. 3; 図3に示す「ストロボ画像生成処理」で実行される「被写体領域検出処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “subject area detection processing” executed in “strobe image generation processing” shown in FIG. 3; 図3に示す「ストロボ画像生成処理」で実行される「被写体領域検出処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “subject area detection processing” executed in “strobe image generation processing” shown in FIG. 3; 図8〜図10に示す「被写体領域検出処理」を説明するための図であり、(a)は、被写体の移動方向がX方向である場合に検出される被写体領域の例を示し、(b)は、被写体の移動方向がY方向である場合に検出される被写体領域の例を示す。FIG. 11 is a diagram for explaining the “subject area detection processing” shown in FIGS. 8 to 10, in which (a) shows an example of an object area detected when the moving direction of the object is the X direction; ) Shows an example of a subject area detected when the subject moving direction is the Y direction. 図3に示す「ストロボ画像生成処理」で実行される「有効フレーム選択処理」を説明するためのフローチャートである。4 is a flowchart for explaining an “effective frame selection process” executed in the “flash image generation process” shown in FIG. 3. 図3に示す「ストロボ画像生成処理」で実行される「有効フレーム選択処理」を説明するためのフローチャートである。4 is a flowchart for explaining an “effective frame selection process” executed in the “flash image generation process” shown in FIG. 3. 選択された有効フレームの例を示す図である。It is a figure which shows the example of the selected effective frame. 図3に示す「ストロボ画像生成処理」で実行される「背景画像生成処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “background image generation processing” executed in “strobe image generation processing” shown in FIG. 3; 図3に示す「ストロボ画像生成処理」で実行される「被写体画像抽出処理」を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining “subject image extraction processing” executed in “strobe image generation processing” shown in FIG. 3; 生成されたストロボ画像の例を示す図である。It is a figure which shows the example of the produced | generated flash image.

本発明にかかる実施形態を、図面を参照して以下に説明する。本実施形態では、本発明をデジタルスチルカメラ(以下、デジタルカメラ)によって実現した場合を例示する。本実施形態にかかるデジタルカメラ1は、一般的なデジタルスチルカメラが有する機能を備えているものとし、この中には、少なくとも、いわゆる連写機能が含まれているものとする。ここでの連写機能とは、1回のシャッタ操作で連続した複数の撮像画像を得ることのできる機能とする。   Embodiments according to the present invention will be described below with reference to the drawings. In the present embodiment, a case where the present invention is realized by a digital still camera (hereinafter referred to as a digital camera) is illustrated. The digital camera 1 according to the present embodiment is assumed to have a function that a general digital still camera has, and at least includes a so-called continuous shooting function. Here, the continuous shooting function is a function capable of obtaining a plurality of continuous captured images by a single shutter operation.

また、本実施形態にかかるデジタルカメラ1は、本発明の適用により、連写機能によって得られた撮像画像から、ストロボ画像(マルチストロボ画像)を生成するストロボ画像生成機能を有する。ここで「ストロボ画像」とは、動く被写体の移動経過が1つの画像内に表された画像をいう。本実施形態にかかるデジタルカメラ1でストロボ画像を生成するためには、連写機能によって動く(移動する)被写体を撮像するが、この場合、デジタルカメラ1を固定して撮像することとする。   The digital camera 1 according to the present embodiment has a strobe image generation function that generates a strobe image (multi-strobe image) from a captured image obtained by the continuous shooting function by applying the present invention. Here, the “strobe image” refers to an image in which a moving process of a moving subject is represented in one image. In order to generate a strobe image with the digital camera 1 according to the present embodiment, an object that moves (moves) is imaged by the continuous shooting function. In this case, the digital camera 1 is fixed and imaged.

図1は、本発明の実施形態にかかるデジタルカメラ1の構成を示すブロック図である。本実施形態にかかるデジタルカメラ1の概略的構成は、図示するように、撮像部100、データ処理部200、インタフェース(I/F)部300、などである。   FIG. 1 is a block diagram showing a configuration of a digital camera 1 according to an embodiment of the present invention. The schematic configuration of the digital camera 1 according to the present embodiment includes an imaging unit 100, a data processing unit 200, an interface (I / F) unit 300, and the like as illustrated.

撮像部100は、デジタルカメラ1の撮像動作をおこなう部分であり、図示するように、光学装置110やイメージセンサ部120などから構成されている。   The imaging unit 100 is a part that performs an imaging operation of the digital camera 1, and includes an optical device 110, an image sensor unit 120, and the like as illustrated.

光学装置110は、例えば、レンズ、絞り機構、シャッタ機構、などを含み、撮像にかかる光学的動作をおこなう。すなわち、光学装置110の動作により、入射光が集光されるとともに、焦点距離、絞り、シャッタスピードなどといった、画角やピント、露出などにかかる光学的要素の調整がなされる。なお、光学装置110に含まれるシャッタ機構はいわゆるメカニカルシャッタであり、イメージセンサの動作のみでシャッタ動作をおこなう場合には、光学装置110にシャッタ機構が含まれていなくてもよい。また、光学装置110は、後述する制御部210による制御によって動作する。   The optical device 110 includes, for example, a lens, a diaphragm mechanism, a shutter mechanism, and the like, and performs an optical operation related to imaging. In other words, the operation of the optical device 110 collects incident light and adjusts optical elements related to the angle of view, focus, exposure, and the like, such as focal length, aperture, and shutter speed. Note that the shutter mechanism included in the optical device 110 is a so-called mechanical shutter, and when the shutter operation is performed only by the operation of the image sensor, the optical device 110 may not include the shutter mechanism. The optical device 110 operates under the control of the control unit 210 described later.

イメージセンサ部120は、光学装置110によって集光された入射光に応じた電気信号を生成する、例えば、CCD(Charge Coupled Device:電荷結合素子)やCMOS(Complementally Metal Oxide Semiconductor:相補型金属酸化物半導体)などのイメージセンサから構成される。イメージセンサ部120は、光電変換をおこなうことで、受光に応じた電気信号を発生してデータ処理部200に出力する。   The image sensor unit 120 generates an electrical signal corresponding to the incident light collected by the optical device 110, for example, a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). (Semiconductor) image sensor. The image sensor unit 120 performs photoelectric conversion to generate an electrical signal corresponding to the received light and output it to the data processing unit 200.

データ処理部200は、撮像部100による撮像動作によって生成された電気信号を処理し、撮像画像を示すデジタルデータを生成するとともに、撮像画像に対する画像処理などをおこなう。図1に示すように、データ処理部200は、制御部210、画像処理部220、画像メモリ230、画像出力部240、記憶部250、外部記憶部260、などから構成される。   The data processing unit 200 processes the electrical signal generated by the imaging operation by the imaging unit 100 to generate digital data indicating the captured image, and performs image processing on the captured image. As shown in FIG. 1, the data processing unit 200 includes a control unit 210, an image processing unit 220, an image memory 230, an image output unit 240, a storage unit 250, an external storage unit 260, and the like.

制御部210は、例えば、CPU(Central Processing Unit:中央演算処理装置)などのプロセッサや、RAM(Random Access Memory)などの主記憶装置(メモリ)、などから構成され、後述する記憶部250などに格納されているプログラムを実行することで、デジタルカメラ1の各部を制御する。また、本実施形態では、所定のプログラムを実行することで、後述する各処理にかかる機能が制御部210によって実現される。   The control unit 210 includes, for example, a processor such as a CPU (Central Processing Unit), a main storage device (memory) such as a RAM (Random Access Memory), and the like. Each part of the digital camera 1 is controlled by executing the stored program. Further, in the present embodiment, by executing a predetermined program, a function related to each process described later is realized by the control unit 210.

画像処理部220は、例えば、ADC(Analog-Digital Converter:アナログ−デジタル変換器)、バッファメモリ、画像処理用のプロセッサ(いわゆる、画像処理エンジン)などから構成され、撮像部100によって生成された電気信号に基づいて、撮像画像を示すデジタルデータを生成する。   The image processing unit 220 includes, for example, an ADC (Analog-Digital Converter), a buffer memory, an image processing processor (a so-called image processing engine), and the like. Based on the signal, digital data indicating a captured image is generated.

すなわち、イメージセンサ部120から出力されたアナログ電気信号をADCがデジタル信号に変換して順次バッファメモリに格納すると、バッファされたデジタルデータに対し、画像処理エンジンがいわゆる現像処理などをおこなうことで、画質の調整やデータ圧縮などをおこなう。   That is, when the analog electric signal output from the image sensor unit 120 is converted into a digital signal by the ADC and sequentially stored in the buffer memory, the image processing engine performs so-called development processing on the buffered digital data. Adjust image quality and compress data.

画像メモリ230は、例えば、RAMやフラッシュメモリなどの記憶装置から構成され、画像処理部220によって生成された撮像画像データや、制御部210によって処理される画像データなどを一時的に格納する。   The image memory 230 includes, for example, a storage device such as a RAM or a flash memory, and temporarily stores captured image data generated by the image processing unit 220, image data processed by the control unit 210, and the like.

画像出力部240は、例えば、RGB信号の生成回路などから構成され、画像メモリ230に展開された画像データをRGB信号などに変換して表示画面(後述する表示部310など)に出力する。   The image output unit 240 includes, for example, an RGB signal generation circuit and the like, converts the image data expanded in the image memory 230 into an RGB signal and the like, and outputs the RGB signal to a display screen (a display unit 310 to be described later).

記憶部250は、例えば、ROM(Read Only Memory)やフラッシュメモリなどの記憶装置から構成され、デジタルカメラ1の動作に必要なプログラムやデータなどを格納する。本実施形態では、制御部210などが実行する動作プログラムや処理に必要となるパラメータや演算式などが記憶部250に格納されているものとする。   The storage unit 250 includes a storage device such as a ROM (Read Only Memory) or a flash memory, and stores programs and data necessary for the operation of the digital camera 1. In the present embodiment, it is assumed that the operation program executed by the control unit 210 and the like, parameters and arithmetic expressions necessary for the processing are stored in the storage unit 250.

外部記憶部260は、例えば、メモリカードなどといった、デジタルカメラ1に着脱可能な記憶装置から構成され、デジタルカメラ1で撮像した画像データなどを格納する。   The external storage unit 260 includes a storage device that can be attached to and detached from the digital camera 1 such as a memory card, and stores image data captured by the digital camera 1.

インタフェース部300は、デジタルカメラ1とその使用者あるいは外部装置とのインタフェースにかかる構成であり、図1に示すように、表示部310、外部インタフェース(I/F)部320、操作部330、などから構成される。   The interface unit 300 has a configuration related to an interface between the digital camera 1 and its user or an external device. As shown in FIG. 1, the display unit 310, an external interface (I / F) unit 320, an operation unit 330, etc. Consists of

表示部310は、例えば、液晶表示装置などから構成され、デジタルカメラ1を操作するために必要な種々の画面や、撮影時のライブビュー画像、撮像画像、などを表示出力する。本実施形態では、画像出力部240からの画像信号(RGB信号)などに基づいて撮像画像等の表示出力がおこなわれる。   The display unit 310 includes, for example, a liquid crystal display device, and displays and outputs various screens necessary for operating the digital camera 1, live view images at the time of shooting, captured images, and the like. In the present embodiment, display output of a captured image or the like is performed based on an image signal (RGB signal) from the image output unit 240.

外部インタフェース部320は、例えば、USB(Universal Serial Bus)コネクタやビデオ出力端子などから構成され、外部のコンピュータ装置への画像データの出力や、外部のモニタ装置への撮像画像の表示出力などをおこなう。   The external interface unit 320 includes, for example, a USB (Universal Serial Bus) connector, a video output terminal, and the like, and performs output of image data to an external computer device, display output of a captured image to an external monitor device, and the like. .

操作部330は、デジタルカメラ1の外面上に構成されている各種ボタンなどによって構成され、デジタルカメラ1の使用者による操作に応じた入力信号を生成して制御部210に入力する。操作部330を構成するボタンとして、例えば、シャッタ動作を指示するためのシャッタボタンや、デジタルカメラ1のもつ動作モードを指定するためのモードボタン、各種設定をおこなうための十字キーや機能ボタン、などが含まれているものとする。   The operation unit 330 includes various buttons configured on the outer surface of the digital camera 1, generates an input signal corresponding to an operation by the user of the digital camera 1, and inputs the input signal to the control unit 210. As buttons constituting the operation unit 330, for example, a shutter button for instructing a shutter operation, a mode button for designating an operation mode of the digital camera 1, a cross key and a function button for performing various settings, and the like Is included.

ここで、本実施形態では、記憶部250に格納されている動作プログラムを制御部210が実行することで、後述する各処理が実現されるが、この場合に制御部210によって実現される機能を、図2を参照して説明する。   Here, in the present embodiment, the control unit 210 executes the operation program stored in the storage unit 250 to realize each process described later. In this case, the functions realized by the control unit 210 are implemented. This will be described with reference to FIG.

図2は、制御部210によって実現される機能を示した機能ブロック図である。ここでは、連写機能によって撮像された画像からストロボ画像を生成する機能を実現するために必要な機能構成を示す。この場合、図示するように、制御部210は、動作モード処理部211、撮像制御部212、1次元データ生成部213、被写体検出部214、画像選択部215、背景画像生成部216、ストロボ画像生成部217、などとして機能する。   FIG. 2 is a functional block diagram illustrating functions realized by the control unit 210. Here, a functional configuration necessary for realizing a function of generating a strobe image from an image captured by the continuous shooting function is shown. In this case, as illustrated, the control unit 210 includes an operation mode processing unit 211, an imaging control unit 212, a one-dimensional data generation unit 213, a subject detection unit 214, an image selection unit 215, a background image generation unit 216, and a strobe image generation. Functions as a unit 217.

動作モード処理部211は、表示部310との協働により、デジタルカメラ1が有する各種動作モードをデジタルカメラ1のユーザに指定させるために必要な画面表示や指定された動作モード毎の設定画面表示などをおこなう他、操作部330との協働により、ユーザが指定した動作モードを認識し、当該動作モードの実行に必要なプログラムや演算式などを記憶部250から読み出し、制御部210の主記憶装置(メモリ)にロードする。   The operation mode processing unit 211 cooperates with the display unit 310 to display screens necessary for the user of the digital camera 1 to specify various operation modes of the digital camera 1 and setting screen displays for each specified operation mode. In addition, the operation mode designated by the user is recognized in cooperation with the operation unit 330, and a program or an arithmetic expression necessary for executing the operation mode is read from the storage unit 250, and the main memory of the control unit 210 is read out. Load to device (memory).

本実施形態では、ストロボ画像生成機能にかかる動作モード(ストロボ画像生成モード)がユーザによって指定されるものとし、以下に説明する制御部210の各機能構成は、ストロボ画像生成モードの指定に応じて動作モード処理部211がロードしたプログラムを実行することで実現される機能構成である。   In this embodiment, it is assumed that the operation mode (strobe image generation mode) related to the strobe image generation function is specified by the user, and each functional configuration of the control unit 210 described below corresponds to the specification of the strobe image generation mode. This is a functional configuration realized by executing a program loaded by the operation mode processing unit 211.

撮像制御部212は、撮像部100を制御することでデジタルカメラ1での撮像動作を実行する。本実施形態にかかるストロボ画像生成機能は、デジタルカメラ1の連写機能によって得られた撮像画像からストロボ画像を生成するので、本実施形態にかかる撮像制御部212は、撮像部100が連写動作をおこなうよう制御する。この場合、操作部330のシャッタボタンが押下されている間、撮像部100による撮像動作が連続的におこなわれるものとする。撮像制御部212の制御による連写動作で得られた撮像画像(連写画像)は、画像処理部220による処理を経て、順次画像メモリ230に格納される。この場合、画像メモリ230に格納される連写画像のそれぞれには、例えば、撮像順にフレーム番号が付与される。   The imaging control unit 212 executes an imaging operation with the digital camera 1 by controlling the imaging unit 100. Since the strobe image generation function according to the present embodiment generates a strobe image from the captured image obtained by the continuous shooting function of the digital camera 1, the imaging control unit 212 according to the present embodiment has a continuous shooting operation. Control to do. In this case, it is assumed that the imaging operation by the imaging unit 100 is continuously performed while the shutter button of the operation unit 330 is pressed. The captured images (continuous captured images) obtained by the continuous shooting operation controlled by the imaging control unit 212 are sequentially stored in the image memory 230 through the processing by the image processing unit 220. In this case, for example, a frame number is assigned to each of the continuous shot images stored in the image memory 230 in the order of imaging.

1次元データ生成部213は、画像メモリ230に格納された連写画像を順次1次元データに変換し、例えば、制御部210の主記憶装置(メモリ)に格納する。ここで「1次元データ」とは、画像データを構成している画素値など情報を1方向成分で表したものである。本実施形態では、画像データを所定の1方向に投影することで得られる投影データを1次元データとする。この場合に画像データを投影する1方向は、対象としている被写体の移動方向に基づいて決定される(詳細後述)。   The one-dimensional data generation unit 213 sequentially converts the continuous shot images stored in the image memory 230 into one-dimensional data, and stores it in the main storage device (memory) of the control unit 210, for example. Here, the “one-dimensional data” represents information such as pixel values constituting the image data in one direction component. In the present embodiment, projection data obtained by projecting image data in a predetermined one direction is set as one-dimensional data. In this case, one direction in which the image data is projected is determined based on the moving direction of the target subject (details will be described later).

被写体検出部214は、各撮像画像間の1次元データを比較することで、各撮像画像において被写体を示す部分(領域)を検出する。この場合、被写体検出部214は、検出した被写体部分の位置情報(座標情報)を検出する。また、画像選択部215が選択した画像についての被写体部分を、画像メモリ230に格納されている撮像画像(連写画像)から抽出する。   The subject detection unit 214 detects a portion (region) indicating the subject in each captured image by comparing one-dimensional data between the captured images. In this case, the subject detection unit 214 detects position information (coordinate information) of the detected subject part. In addition, the subject portion of the image selected by the image selection unit 215 is extracted from the captured image (continuous shot image) stored in the image memory 230.

画像選択部215は、被写体検出部214が検出した被写体部分の位置情報に基づいて、被写体部分が重ならない撮像画像を選択することで、ストロボ画像の生成に好適な画像(フレーム)を連写画像の中から選択する。   The image selection unit 215 selects a captured image in which the subject portions do not overlap based on the position information of the subject portion detected by the subject detection unit 214, and thereby selects an image (frame) suitable for generating a strobe image. Choose from.

背景画像生成部216は、画像選択部215が選択した撮像画像から背景画像を生成する。ここでは、選択された撮像画像すべてについて、同一座標における画素値を取得し、画素値の中央値などを当該座標の画素値とすることで、被写体を除外した背景画像を生成する。   The background image generation unit 216 generates a background image from the captured image selected by the image selection unit 215. Here, for all selected captured images, the pixel values at the same coordinates are acquired, and the background value excluding the subject is generated by using the median value of the pixel values as the pixel value of the coordinates.

ストロボ画像生成部217は、背景画像生成部216が生成した背景画像に、選択された撮像画像から被写体検出部214が抽出した被写体部分の画像を合成することで、1つの背景画像内に、移動する被写体が重ならずに複数箇所で現れるストロボ画像を生成する。   The strobe image generation unit 217 combines the background image generated by the background image generation unit 216 with the image of the subject portion extracted by the subject detection unit 214 from the selected captured image, thereby moving the image into one background image. Strobe images that appear at a plurality of locations without overlapping the subject to be generated are generated.

以上が制御部210によって実現される機能である。なお、本実施形態では、制御部210がプログラムを実行することによる論理的処理で上述した各機能が実現されるものとするが、これらの機能を、例えば、ASIC(Application Specific Integrated Circuit:特定用途向け集積回路)などのハードウェアによって構成してもよい。この場合、図2に示した機能のうち、画像処理にかかる機能については、画像処理部220によって実現されてもよい。   The above is the function realized by the control unit 210. In the present embodiment, each function described above is realized by a logical process performed by the control unit 210 executing a program. These functions are, for example, ASIC (Application Specific Integrated Circuit). Or an integrated circuit). In this case, among the functions shown in FIG. 2, the functions related to image processing may be realized by the image processing unit 220.

以上説明したデジタルカメラ1の構成は、本発明を実現するために必要な構成であり、デジタルカメラとしての基本機能や種々の付加機能に用いられる構成は必要に応じて備えられているものとする。   The configuration of the digital camera 1 described above is a configuration necessary for realizing the present invention, and a configuration used for a basic function and various additional functions as a digital camera is provided as necessary. .

このような構成のデジタルカメラ1による動作を以下に説明する。ここでは、ストロボ画像生成モードが指定された場合にデジタルカメラ1が実行する「ストロボ画像生成処理」を、図3に示すフローチャートを参照して説明する。このストロボ画像生成処理は、デジタルカメラ1のユーザが操作部330を操作することで、ストロボ画像生成モードを指定したことを契機に開始される。この場合、動作モード処理部211が、ストロボ画像生成モードにかかるプログラムなどを記憶部250からロードすることで、図2に示した各機能構成により以下の処理が実行される。   The operation of the digital camera 1 having such a configuration will be described below. Here, “strobe image generation processing” executed by the digital camera 1 when the strobe image generation mode is designated will be described with reference to the flowchart shown in FIG. This strobe image generation processing is started when the user of the digital camera 1 operates the operation unit 330 and designates the strobe image generation mode. In this case, the operation mode processing unit 211 loads the program or the like related to the strobe image generation mode from the storage unit 250, so that the following processing is executed by each functional configuration illustrated in FIG.

処理が開始されると、動作モード処理部211が、ストロボ画像生成モードを実施する上で必要となる設定のための設定画面を表示部310に表示する(ステップS101)。ここで表示される設定画面の例を図4に示す。   When the processing is started, the operation mode processing unit 211 displays a setting screen for setting necessary for implementing the strobe image generation mode on the display unit 310 (step S101). An example of the setting screen displayed here is shown in FIG.

ここではまず、図4(a)に示すような、カメラの向き(縦横)を設定するための設定画面が表示される。この設定画面は、ストロボ画像とする連写画像を撮影するときのデジタルカメラ1が、横位置であるか縦位置であるかをユーザに選択させるためのものである。デジタルカメラ1のユーザは、操作部330を操作し、連写撮影時のカメラの向きを指定する。なお、デジタルカメラ1が、例えば、加速度センサなどによる縦位置検出機能などを備えている場合は、その検出結果を用いることができるので、設定画面によってユーザに指定させる必要はない。   Here, first, a setting screen for setting the orientation (vertical and horizontal) of the camera as shown in FIG. 4A is displayed. This setting screen is for allowing the user to select whether the digital camera 1 when shooting a continuous shot image as a flash image is in the horizontal position or the vertical position. The user of the digital camera 1 operates the operation unit 330 and designates the direction of the camera during continuous shooting. If the digital camera 1 has, for example, a vertical position detection function using an acceleration sensor or the like, the detection result can be used, and it is not necessary for the user to specify the setting on the setting screen.

指定されたカメラの向きが指定されると、動作モード処理部211は、図4(b)に示すような、被写体の移動方向を設定するための設定画面を表示部310に表示する。つまり、ストロボ画像生成モードにおいては、移動する被写体を撮影することになるので、その移動方向をここで設定する。図示するように、被写体の移動方向を設定する設定画面には、例えば、4方向を示す矢印が表示されるので、ユーザは、操作部330の十字キーなどを操作することで、撮影する被写体の移動方向を設定する。   When the orientation of the designated camera is designated, the operation mode processing unit 211 displays on the display unit 310 a setting screen for setting the moving direction of the subject as shown in FIG. That is, in the strobe image generation mode, a moving subject is photographed, and the moving direction is set here. As shown in the figure, for example, an arrow indicating four directions is displayed on the setting screen for setting the moving direction of the subject. Therefore, the user operates the cross key of the operation unit 330 to select the subject to be photographed. Set the direction of movement.

動作モード処理部211は、このようにして設定された、カメラの向きや被写体の移動方向を、例えば、制御部210の主記憶装置(メモリ)などに記録することで、ストロボ画像生成モードにかかる設定をおこなう(ステップS102)。   The operation mode processing unit 211 records the camera direction and the moving direction of the subject set in this way, for example, in the main storage device (memory) of the control unit 210, and thus enters the strobe image generation mode. Setting is performed (step S102).

ここで、ストロボ画像生成モードで撮影する場合における、デジタルカメラ1と被写体との関係を図5(a)に例示する。この場合、例えば、左から右に移動する被写体MVをデジタルカメラ1で撮影することを想定する。この場合において、デジタルカメラ1の方向や画角は固定して撮影する。なお、図5(a)に例示した撮影の場合、ステップS102で設定される内容は「カメラの向き:横位置」、「被写体移動方向:→(右)」ということになる。つまり、横方向に被写体が移動することが設定される。   Here, FIG. 5A illustrates the relationship between the digital camera 1 and the subject when shooting in the strobe image generation mode. In this case, for example, it is assumed that the subject MV moving from the left to the right is shot with the digital camera 1. In this case, shooting is performed with the direction and angle of view of the digital camera 1 fixed. 5A, the contents set in step S102 are “camera direction: horizontal position” and “subject movement direction: → (right)”. That is, it is set that the subject moves in the horizontal direction.

上述したように、ストロボ画像生成モードにおいては連写で撮影するので、デジタルカメラ1のユーザは、上記の設定をおこなった後、操作部330のシャッタボタンを操作して撮影を開始することになる。よって、動作モード処理部211は、ストロボ画像生成モードが指定された際に、撮像制御部212に対し、連写撮像をおこなうよう指示する。   As described above, since continuous shooting is performed in the strobe image generation mode, the user of the digital camera 1 starts shooting by operating the shutter button of the operation unit 330 after performing the above settings. . Therefore, the operation mode processing unit 211 instructs the imaging control unit 212 to perform continuous shooting when the strobe image generation mode is designated.

そして、デジタルカメラ1のユーザ(撮影者)がシャッタボタン(操作部330)を操作(押下)すると、操作に応じた入力信号が操作部330から制御部210に入力される。これにより、撮像制御部212は、シャッタボタンが操作されたと判別し(ステップS103:Yes)、撮像部100を制御して連写撮像をおこなう(ステップS104)。この連写撮像動作は、ユーザがシャッタボタンを押下し続けている間おこなわれる(ステップS105:No)。   When the user (photographer) of the digital camera 1 operates (presses) the shutter button (operation unit 330), an input signal corresponding to the operation is input from the operation unit 330 to the control unit 210. As a result, the imaging control unit 212 determines that the shutter button has been operated (step S103: Yes), and controls the imaging unit 100 to perform continuous shooting (step S104). This continuous shooting imaging operation is performed while the user continues to press the shutter button (step S105: No).

シャッタ操作を終了すると(ステップS105:Yes)、撮像制御部212が撮像動作の終了を撮像部100に指示する。これにより、連写撮像動作が終了し、連写撮像によって得られた画像(連写画像)が順次、画像処理部220での処理を経て画像メモリ230に格納される(ステップS106)。   When the shutter operation ends (step S105: Yes), the imaging control unit 212 instructs the imaging unit 100 to end the imaging operation. As a result, the continuous shooting operation is completed, and images (continuous shot images) obtained by the continuous shooting are sequentially stored in the image memory 230 through the processing in the image processing unit 220 (step S106).

図5(a)に例示した場面を連写撮像した場合に得られる連写画像の例を図5(b)に示す。図示するように、被写体MVが移動する様子が、複数の撮像画像によって示される。上述したように、デジタルカメラ1を固定して撮影しているので、各連写画像における被写体MV以外の部分(すなわち、背景)には大きな変化はない。   FIG. 5B shows an example of the continuous shot image obtained when the scene illustrated in FIG. As illustrated, the movement of the subject MV is indicated by a plurality of captured images. As described above, since the digital camera 1 is fixed and photographed, the portion other than the subject MV (that is, the background) in each continuous image does not change significantly.

ここで、1回の連写撮像動作によって得られた連写画像のそれぞれには、撮像した時系列順に1〜pのフレーム番号が付される。図5(b)の例では、フレーム1〜フレーム12(すなわち、p=12)までの画像が得られたことになる。   Here, each of the continuous shot images obtained by one continuous shooting imaging operation is assigned a frame number of 1 to p in the time series of the captured images. In the example of FIG. 5B, images from frame 1 to frame 12 (that is, p = 12) are obtained.

このようにして連写撮像がおこなわれると、得られた連写画像を用いてストロボ画像を生成するための処理が順次実行される。ここではまず、撮像制御部212が、連写撮像の終了を1次元データ生成部213に通知することで、連写画像を1次元データ化するための「1次元データ生成処理」が実行される(ステップS200)。この1次元データ生成処理を、図6に示すフローチャートを参照して説明する。なお、理解を容易にするため、以下の説明においては、カメラの向きとして「横位置」が設定されているものとする。   When continuous shooting is performed in this manner, processing for generating a strobe image using the obtained continuous shot image is sequentially executed. Here, first, the imaging control unit 212 notifies the end of continuous shooting to the one-dimensional data generation unit 213, thereby executing “one-dimensional data generation processing” for converting the continuous shot image into one-dimensional data. (Step S200). This one-dimensional data generation process will be described with reference to the flowchart shown in FIG. In order to facilitate understanding, in the following description, it is assumed that “lateral position” is set as the orientation of the camera.

処理が開始されると、1次元データ生成部213は、処理対象となる画像(フレーム)を指定するためのポインタnに、フレーム番号の初期値「1」を設定し(ステップS201)、画像メモリ230に格納されている連写画像フレーム番号がnの画像(n番目の画像)を処理対象として選択する(ステップS202)。   When the processing is started, the one-dimensional data generation unit 213 sets the initial value “1” of the frame number to the pointer n for designating the image (frame) to be processed (step S201), and the image memory The image with the frame image number n stored in 230 (the nth image) is selected as a processing target (step S202).

処理対象画像を選択すると、1次元データ生成部213は、当該画像における調査座標の初期化をおこなう(ステップS203)。ここでは、x座標とy座標のそれぞれを「0」とした座標を初期調査座標とする。ここで、画像上の座標について、図7(a)を参照して説明する。本実施形態では、カメラの向きが「横位置」としているので、このようなデジタルカメラ1で得られる撮像画像は、図7(a)に示すような横長の画像となる。この場合、画像の左右方向を「X方向」、上下方向を「Y方向」とする。ここで、このような画像の左上端部を座標原点(0,0)とする。この場合、X方向の画素数をsizeXとすると、x座標の最大値はsizeX-1となる。同様に、Y方向の画素数をsizeYとすると、y座標の最大値はsizeY-1となる。   When the processing target image is selected, the one-dimensional data generation unit 213 initializes the survey coordinates in the image (step S203). Here, the coordinates in which each of the x coordinate and the y coordinate is “0” are set as initial investigation coordinates. Here, the coordinates on the image will be described with reference to FIG. In this embodiment, since the orientation of the camera is “horizontal position”, the captured image obtained by such a digital camera 1 is a horizontally long image as shown in FIG. In this case, the horizontal direction of the image is “X direction”, and the vertical direction is “Y direction”. Here, the upper left corner of such an image is taken as the coordinate origin (0, 0). In this case, if the number of pixels in the X direction is sizeX, the maximum value of the x coordinate is sizeX-1. Similarly, if the number of pixels in the Y direction is sizeY, the maximum value of the y coordinate is sizeY-1.

次に1次元データ生成部213は、上述したストロボ画像生成処理(図3)のステップS102で設定された被写体移動方向が、図7(a)のように定義した撮像画像の座標系におけるX方向であるかY方向であるか判別する(ステップS204)。ここで、カメラの向きが横位置である場合、図4(b)に示した設定画面で左右方向のいずれかが指定されていれば、被写体の移動方向はX方向(横方向)となる。一方、上下方向のいずれかが指定されていたのであれば、被写体の移動方向はY方向(縦方向)ということになる。   Next, the one-dimensional data generation unit 213 determines that the subject movement direction set in step S102 of the strobe image generation process (FIG. 3) is the X direction in the coordinate system of the captured image defined as shown in FIG. Or Y direction (step S204). Here, when the camera is in the horizontal position, if any of the left and right directions is specified on the setting screen shown in FIG. 4B, the moving direction of the subject is the X direction (horizontal direction). On the other hand, if any one of the up and down directions is designated, the moving direction of the subject is the Y direction (vertical direction).

図5(a)に例示した場面では、横方向に移動している被写体MVを撮影しているので、ここでは被写体の移動方向がX方向であると判別される(ステップS204:Yes)。被写体の移動方向がX方向である場合、1次元データ生成部213は、被写体の移動方向と直交する方向、すなわちY方向に画像を投影する処理をおこなう。   In the scene illustrated in FIG. 5A, since the subject MV moving in the lateral direction is captured, it is determined that the moving direction of the subject is the X direction (step S204: Yes). When the moving direction of the subject is the X direction, the one-dimensional data generation unit 213 performs a process of projecting an image in a direction orthogonal to the moving direction of the subject, that is, the Y direction.

この場合、1次元データ生成部213は、処理対象画像のX方向の座標すべてにおいて、Y方向の画素値を合算することでY方向に投影する(ステップS205、ステップS206、ステップS207:Yes)。ここでは、ステップS203で調査座標の初期化をおこなっているので、まず、x座標0に対応するy座標の画素値を合算し、その結果を制御部210の主記憶装置(メモリ)に保持する。つぎに、x座標の値を+1し、次のx座標について同様の演算をおこなう。このような処理を、x座標が当該画像のX方向のサイズ、すなわちX方向の画素数分繰り返しおこなう。   In this case, the one-dimensional data generation unit 213 projects in the Y direction by adding the pixel values in the Y direction in all the coordinates in the X direction of the processing target image (step S205, step S206, step S207: Yes). Here, since the survey coordinates are initialized in step S203, first, the pixel values of the y coordinate corresponding to the x coordinate 0 are added together, and the result is stored in the main storage device (memory) of the control unit 210. . Next, the value of the x coordinate is incremented by 1, and the same calculation is performed for the next x coordinate. Such processing is repeated for the x-coordinate size of the image in the X direction, that is, the number of pixels in the X direction.

一方、被写体の移動方向がY方向(上下方向)である場合(ステップS204:No)は、同様の方法によって、移動方向と直交する方向、すなわちX方向に画像を投影することとなる(ステップS208、ステップS209、ステップS210:Yes)。   On the other hand, when the moving direction of the subject is the Y direction (up and down direction) (step S204: No), the image is projected in the direction orthogonal to the moving direction, that is, the X direction by the same method (step S208). , Step S209, Step S210: Yes).

処理画像における投影が終了すると(ステップS207:No、もしくは、ステップS210:No)、1次元データ生成部213は、ポインタnを+1し(ステップS211)、新たなポインタnに対応するフレーム番号が連写撮像によって付されたフレーム番号の値以下であれば(ステップS212:No)、次の連写画像を処理対象として選択する(ステップS202)。   When the projection on the processed image ends (step S207: No or step S210: No), the one-dimensional data generation unit 213 increments the pointer n by 1 (step S211), and the frame number corresponding to the new pointer n is consecutive. If it is equal to or less than the frame number assigned by the shooting (step S212: No), the next continuous shot image is selected as a processing target (step S202).

一方、すべての連写画像についての投影が終了した場合(ステップS212:Yes)は、ストロボ画像生成処理(図3)のフローに戻る。   On the other hand, when the projection for all the continuous shot images is completed (step S212: Yes), the process returns to the flow of the strobe image generation process (FIG. 3).

このような、1次元データ生成処理による投影により、連写画像のそれぞれが、例えば、図7(b)や図7(c)に示すような1次元データに変換されることになる。このような1次元データ生成は、例えば、数1によって表すことができる。   By such projection by the one-dimensional data generation process, each of the continuous shot images is converted into one-dimensional data as shown in, for example, FIGS. 7B and 7C. Such one-dimensional data generation can be expressed by, for example, Equation 1.

Figure 2010200360
Figure 2010200360

このようにして、連写画像のそれぞれについての1次元データ(投影データ)を生成すると、1次元データ生成部213は、生成した1次元データを、元となった撮像画像のフレーム番号と対応づけて画像メモリ230に順次格納するとともに、すべての連写画像についての1次元データが生成された旨を被写体検出部214に通知する。被写体検出部214は、1次元データ生成部213からの通知に応じて、変換された1次元データを用いて被写体部分を検出するための「被写体領域検出処理」を実行する(ステップS300)。   When the one-dimensional data (projection data) is generated for each of the continuous shot images in this way, the one-dimensional data generation unit 213 associates the generated one-dimensional data with the frame number of the original captured image. Are sequentially stored in the image memory 230, and the subject detection unit 214 is notified that one-dimensional data for all the continuous shot images has been generated. In response to the notification from the one-dimensional data generation unit 213, the subject detection unit 214 executes “subject region detection processing” for detecting a subject portion using the converted one-dimensional data (step S300).

ここで、連写画像についての1次元データから被写体部分を検出する処理の概念を図7(b)〜図7(d)を参照して説明する。図7(b)は、図5(a)に示した場面において、被写体MVがない状態で撮像した場合の撮像画像の例(上段)と、当該撮像画像の1次元データの例(下段)を示し、図7(c)は、被写体MVがある状態の撮像画像の例(上段)と、当該撮像画像の1次元データ(下段)の例を示したものである。   Here, the concept of the process of detecting the subject portion from the one-dimensional data of the continuous shot image will be described with reference to FIGS. 7B to 7D. FIG. 7B shows an example (upper row) of a captured image when an image is taken without the subject MV in the scene shown in FIG. 5A and an example (lower row) of one-dimensional data of the captured image. FIG. 7C shows an example of a captured image in the state where the subject MV is present (upper stage) and an example of one-dimensional data (lower stage) of the captured image.

上述したように、本実施形態にかかるデジタルカメラ1でストロボ画像生成をおこなう場合、デジタルカメラ1を固定して連写撮像をおこなう。よって、得られる複数の連写画像間では、被写体MV以外の背景部分に大きな変化はない。よって、各連写画像間の1次元データを比較すると、被写体MVの範囲において変化が現れることになる。ここで、理解を容易にするため、被写体MVが写っていない画像と被写体MVが写っている画像の1次元データを、それぞれ図7(b)および図7(c)に示す。それぞれの1次元データを比較すると、図7(c)で被写体MVが写っている箇所のデータが図7(b)とは異なっており、その他の部分では同じデータとなっている。   As described above, when the strobe image is generated by the digital camera 1 according to the present embodiment, the digital camera 1 is fixed and continuous shooting is performed. Therefore, there is no significant change in the background portion other than the subject MV between the plurality of continuous shot images obtained. Therefore, when one-dimensional data between continuous shot images is compared, a change appears in the range of the subject MV. Here, for easy understanding, one-dimensional data of an image in which the subject MV is not shown and an image in which the subject MV is shown are shown in FIGS. 7B and 7C, respectively. Comparing the respective one-dimensional data, the data of the part where the subject MV is shown in FIG. 7C is different from FIG. 7B, and the other parts are the same data.

すなわち、両画像の1次元データを図7(d)に示すように重ねると、一致しない箇所が存在する。このような1次元データが一致しない箇所が、被写体MVが写っている範囲(被写体の移動方向がX方向であればX方向の範囲、移動方向がY方向であればY方向の範囲)となる。よって、時系列順に隣接する連写画像間の1次元データの差分をとれば、被写体範囲の推移が示されることとなる。   That is, when the one-dimensional data of both images are overlapped as shown in FIG. Such a place where the one-dimensional data does not match is a range where the subject MV is captured (a range in the X direction if the movement direction of the subject is the X direction, a range in the Y direction if the movement direction is the Y direction). . Therefore, if the difference of the one-dimensional data between the continuous image which adjoins in time series order is taken, the transition of a to-be-photographed range will be shown.

被写体検出部214は、このような原理に基づく処理をおこなうことで、連写画像における被写体部分の検出をおこなう。ここで実行される被写体領域検出処理(ステップS300)を、図8〜図10に示すフローチャートを参照して説明する。   The subject detection unit 214 detects a subject portion in the continuous shot image by performing processing based on such a principle. The subject area detection process (step S300) executed here will be described with reference to the flowcharts shown in FIGS.

処理が開始されると、被写体検出部214はまず、ストロボ画像生成処理(図3)のステップS102における設定内容に基づき、被写体の移動方向がX方向であるかY方向であるか判別する(ステップS301)。以下、被写体の移動方向がX方向である場合(ステップS301:Yes)を中心に説明する。   When the process is started, the subject detection unit 214 first determines whether the moving direction of the subject is the X direction or the Y direction based on the setting content in step S102 of the strobe image generation process (FIG. 3) (step S102). S301). Hereinafter, the case where the moving direction of the subject is the X direction (step S301: Yes) will be mainly described.

この場合、被写体検出部214は、調査対象とするX方向の座標を初期化する。上述したように、撮像画像の座標範囲は(0,0)〜(sizeX-1,sizeY-1)なので、x座標の初期値を「0」とする(ステップS302)。   In this case, the subject detection unit 214 initializes coordinates in the X direction to be investigated. As described above, since the coordinate range of the captured image is (0,0) to (sizeX-1, sizeY-1), the initial value of the x coordinate is set to “0” (step S302).

次に被写体検出部214は、ポインタnを1〜pとなるよう指定することで連写画像のフレームを順次指定し、各フレームについて「1次元データ生成処理」(図6)で生成された、座標xに対応する1次元データを画像メモリ230から取得して、例えば、制御部210の主記憶装置(メモリ)に格納する(ステップS303〜ステップS306:No)。   Next, the subject detection unit 214 sequentially designates frames of the continuous shot image by designating the pointer n to be 1 to p, and each frame is generated by the “one-dimensional data generation process” (FIG. 6). One-dimensional data corresponding to the coordinate x is acquired from the image memory 230 and stored in, for example, the main storage device (memory) of the control unit 210 (step S303 to step S306: No).

すべてのフレームの1次元データを取得すると(ステップS306:Yes)、被写体検出部214は、取得した1次元データをソートし(ステップS307)、その中央値を、座標xが背景画像を示している場合の画素値fb(x)とする(ステップS308)。   When the one-dimensional data of all the frames is acquired (step S306: Yes), the subject detection unit 214 sorts the acquired one-dimensional data (step S307), and the coordinate x indicates the background image. In this case, the pixel value fb (x) is set (step S308).

このような動作を、x座標の各点でおこなう(ステップS309、ステップS310:No)。すべてのフレームにおけるすべてのx座標(0〜sizeX-1)についての背景画素値fb(x)が得られると(ステップS310:Yes)、ステップS311(図9)に進む。   Such an operation is performed at each point of the x coordinate (Step S309, Step S310: No). When background pixel values fb (x) for all x coordinates (0 to sizeX-1) in all frames are obtained (step S310: Yes), the process proceeds to step S311 (FIG. 9).

ここで被写体検出部214は、ポインタnをフレーム初期値「1」にするとともに、x座標を座標初期値「0」とする(ステップS311、ステップS312)。そして、被写体検出部214は、n番目のフレームの当該x座標における画素値fn(x)と、ステップS308で求めた当該座標xにおける背景画素値fb(x)の差分fd(x)(=|fb(x)−fn(x)|)を算出する(ステップS313:Yes、ステップS314)。   Here, the subject detection unit 214 sets the pointer n to the frame initial value “1” and the x coordinate to the coordinate initial value “0” (steps S311 and S312). Then, the subject detection unit 214 calculates the difference fd (x) (= |) between the pixel value fn (x) at the x coordinate of the nth frame and the background pixel value fb (x) at the coordinate x obtained in step S308. fb (x) −fn (x) |) is calculated (step S313: Yes, step S314).

被写体検出部214は、算出した差分fd(x)が所定の閾値DiffThより大きいか否かを判別することで、当該座標xが被写体を示している部分であるか否かを判別する(ステップS315)。つまり、背景画素値fb(x)は、座標xが背景画像を示しているときの画素値であるから、実際の画素値fn(x)が背景画像の画素値より大きく異なっていれば、フレームnにおける座標xは、背景以外、すなわち被写体MVを示していることになる。よって、このような判別をおこなえる閾値DiffThを設定し、差分fd(x)が閾値DiffThより大きければ、画素値fn(x)は被写体部分を示す画素値であると判別することができる。   The subject detection unit 214 determines whether the calculated difference fd (x) is larger than a predetermined threshold DiffTh, thereby determining whether the coordinate x is a portion indicating the subject (step S315). ). That is, since the background pixel value fb (x) is a pixel value when the coordinate x indicates the background image, if the actual pixel value fn (x) is significantly different from the pixel value of the background image, the frame The coordinate x at n indicates other than the background, that is, the subject MV. Therefore, if the threshold value DiffTh for performing such determination is set and the difference fd (x) is larger than the threshold value DiffTh, it is possible to determine that the pixel value fn (x) is a pixel value indicating the subject portion.

ここで、画素値fn(x)が閾値DiffTh以下である場合(ステップS315:No)、n番目のフレームにおける座標xは被写体部分ではないので、x座標を+1し(ステップS316)、画像サイズ内の座標であれば(ステップS313:Yes)、次の座標xについて同様の判別をおこなう(ステップS314、ステップS315)。   Here, when the pixel value fn (x) is equal to or less than the threshold value DiffTh (step S315: No), the coordinate x in the nth frame is not the subject portion, so the x coordinate is incremented by 1 (step S316), and the image size is within the image size. (Step S313: Yes), the same determination is performed for the next coordinate x (steps S314 and S315).

ここで、ステップS312での初期化において、x座標を画像の左端である「0」としているので、調査座標の座標xが被写体部分の画素を示していると判別した場合(ステップS315:Yes)、被写体検出部214は、当該x座標を、n番目のフレームにおける被写体部分の左端に対応する座標L(n)とする(ステップS317)。   Here, since the x coordinate is set to “0”, which is the left end of the image, in the initialization in step S312, when it is determined that the coordinate x of the survey coordinate indicates the pixel of the subject portion (step S315: Yes). The subject detection unit 214 sets the x coordinate as the coordinate L (n) corresponding to the left end of the subject portion in the nth frame (step S317).

つまり、撮像画像の左端となるx=0の位置から、x座標を+1しながら判別をおこなっているので、ステップS312〜ステップS316の処理は、画像の左端から被写体部分の探索をおこなっていたことになる。ここで、x座標についての被写体範囲には幅があるので、被写体の範囲の右端についても特定する必要がある。よって、被写体部分の左端を特定すると、被写体検出部214は、被写体部分の右端を探索する動作をおこなう。   In other words, since the determination is performed from the position of x = 0, which is the left end of the captured image, while the x coordinate is incremented by 1, the processing of step S312 to step S316 has searched the subject portion from the left end of the image. become. Here, since the subject range with respect to the x-coordinate has a width, it is necessary to specify the right end of the subject range. Therefore, when the left end of the subject portion is specified, the subject detection unit 214 performs an operation of searching for the right end of the subject portion.

この場合、撮像画像の右端側から被写体部分の探索を開始する。したがって、被写体検出部214は、調査座標xを、撮像画像の右端を示すx座標であるsizeX-1とする(ステップS318)。ここでは、被写体部分の右端を探索するので、調査座標xは、ステップS317で被写体部分の左端とした座標L(n)よりも右側でなければならない。よって、被写体検出部214は、調査座標xがL(n)より大きい場合(ステップS319:Yes)、当該座標xについてのfd(x)を算出し(ステップS320)、算出したfd(x)が閾値DiffThより大きいか否かを判別する(ステップS321)。   In this case, the search for the subject portion is started from the right end side of the captured image. Therefore, the subject detection unit 214 sets the survey coordinate x to sizeX-1 that is the x coordinate indicating the right end of the captured image (step S318). Here, since the right end of the subject portion is searched, the survey coordinate x must be on the right side of the coordinate L (n) that is the left end of the subject portion in step S317. Therefore, if the survey coordinate x is larger than L (n) (step S319: Yes), the subject detection unit 214 calculates fd (x) for the coordinate x (step S320), and the calculated fd (x) is calculated. It is determined whether or not the threshold value is greater than DiffTh (step S321).

座標xにおけるfd(x)が閾値DiffTh以下で、被写体部分を示していないのであれば(ステップS321:No)、被写体検出部214は、調査座標xを−1することで左に1座標分ずらし(ステップS322)、当該座標xについて同様の判別をおこなう(ステップS319、ステップS320、ステップS321)。このようにして、撮像画像の右端側から探索し、調査座標xにおける画素が被写体部分を示していると判別した場合(ステップS321:Yes)、被写体検出部214は、当該座標xを、フレームnにおける被写体部分の右端の座標R(n)とする(ステップS323)。   If fd (x) at the coordinate x is equal to or less than the threshold DiffTh and does not indicate the subject portion (step S321: No), the subject detection unit 214 shifts the survey coordinate x by -1 to the left by one coordinate. (Step S322), the same determination is made for the coordinate x (step S319, step S320, step S321). In this way, when searching from the right end side of the captured image and determining that the pixel at the survey coordinate x indicates the subject portion (step S321: Yes), the subject detection unit 214 detects the coordinate x in the frame n. Is the coordinate R (n) of the right end of the subject portion at (step S323).

なお、画像の左端から探索しても被写体部分が検出されない場合(ステップS313:No)や、右端側から設定したx座標が被写体左端L(n)より左側にある場合(ステップS319:No)は、当該フレームnには被写体部分がないものとし、例えば、L(n)=R(n)となるよう数値設定し、次のフレームに調査対象を移動する(ステップS324)。   Note that when the subject portion is not detected even after searching from the left end of the image (step S313: No), or when the x coordinate set from the right end side is on the left side of the subject left end L (n) (step S319: No). It is assumed that there is no subject portion in the frame n. For example, a numerical value is set such that L (n) = R (n), and the investigation target is moved to the next frame (step S324).

また、フレームnについて被写体範囲が検出された場合も、次のフレームを調査対象として、上述した処理をおこなう(ステップS324、ステップS325:No)。そして、すべてのフレームについて被写体領域を検出すると(ステップS3325:Yes)、ストロボ画像生成処理(図3)のフローに戻る。   Also, when the subject range is detected for the frame n, the above-described processing is performed with the next frame as an investigation target (step S324, step S325: No). When the subject area is detected for all the frames (step S3325: Yes), the flow returns to the strobe image generation process (FIG. 3).

以上が、被写体の移動方向がX方向である場合の被写体領域検出の動作である。この場合、図11(a)に示すように、各フレームに現れている被写体MVのX方向についての範囲が順次求められることになる。このようにして求められた被写体範囲の座標(L(n)とR(n))は、フレーム番号と対応づけて主記憶装置(メモリ)などに格納される。   The above is the operation for detecting the subject area when the moving direction of the subject is the X direction. In this case, as shown in FIG. 11A, the range in the X direction of the subject MV appearing in each frame is sequentially obtained. The coordinates (L (n) and R (n)) of the subject range obtained in this way are stored in a main memory (memory) or the like in association with the frame number.

一方、被写体の移動方向がY方向である場合、上述した処理と同様の処理をY方向についておこなうことになる。すなわち、図8のステップS326〜ステップS334および図10のステップS335〜ステップS349をおこなうことで、各フレームに現れている被写体画像の上端座標T(n)と下端座標B(n)がそれぞれ求められる(図11(b)参照)。   On the other hand, when the moving direction of the subject is the Y direction, the same process as described above is performed in the Y direction. That is, by performing steps S326 to S334 in FIG. 8 and steps S335 to S349 in FIG. 10, the upper end coordinates T (n) and the lower end coordinates B (n) of the subject image appearing in each frame are obtained. (Refer FIG.11 (b)).

このようにして被写体領域を検出すると、被写体検出部214はその旨を画像選択部215に通知する。この場合、画像選択部215は、検出された被写体領域に基づいて、ストロボ画像の生成に用いる撮像画像(有効フレーム)を選択するための「有効フレーム選択処理」(図3のステップS400)を実行する。この有効フレーム選択処理を、図12および図13に示すフローチャートを参照して説明する。   When the subject area is detected in this way, the subject detection unit 214 notifies the image selection unit 215 to that effect. In this case, the image selection unit 215 executes “effective frame selection processing” (step S400 in FIG. 3) for selecting a captured image (effective frame) used for generating a strobe image based on the detected subject area. To do. This effective frame selection process will be described with reference to the flowcharts shown in FIGS.

処理が開始されると、画像選択部215はまず、被写体の移動方向がX方向であるかY方向であるかを判別する(ステップS401)。ここで、図12のフローチャートは、被写体の移動方向がX方向である場合の処理を示し、図13のフローチャートは、Y方向である場合の処理を示している。   When the process is started, the image selection unit 215 first determines whether the moving direction of the subject is the X direction or the Y direction (step S401). Here, the flowchart of FIG. 12 shows processing when the moving direction of the subject is the X direction, and the flowchart of FIG. 13 shows processing when the moving direction is the Y direction.

被写体の移動方向がX方向である場合(ステップS401:Yes)、画像選択部215は、ポインタnをフレーム初期値「1」とし、上述した被写体領域検出処理での検出結果に基づき、当該n番目のフレームには被写体領域があるか否かを判別する(ステップS402〜ステップS403)。ここでは、被写体領域の範囲を示すL(n)およびR(n)(もしくはT(n)およびB(n))がフレームnについて記録されており、かつ、L(n)≠R(n)(もしくはT(n)≠B(n))であれば、フレームnから被写体領域が検出されたと判別する。   When the moving direction of the subject is the X direction (step S401: Yes), the image selecting unit 215 sets the pointer n to the frame initial value “1” and based on the detection result in the subject region detection process described above, It is determined whether or not there is a subject area in the frame (steps S402 to S403). Here, L (n) and R (n) (or T (n) and B (n)) indicating the range of the subject area are recorded for frame n, and L (n) ≠ R (n) If (or T (n) ≠ B (n)), it is determined that the subject area is detected from frame n.

ここで、フレームnから被写体領域が検出されていない場合(ステップS403:No)は、当該n番目のフレームはストロボ画像の生成には用いない無効フレームとし(ステップS404)、次のフレームについて被写体領域の有無を判別する(ステップS409、ステップS410:No、ステップS403)。   If no subject area is detected from frame n (step S403: No), the nth frame is an invalid frame that is not used to generate a strobe image (step S404), and the subject area is set for the next frame. Is determined (step S409, step S410: No, step S403).

このようにして、連写画像の最初のフレームから順次被写体領域の有無を判別する。そして、画像選択部215は、被写体領域があると判別された最初のフレームを有効フレームとして選択する(ステップS403:Yes、ステップS405:No、ステップS407)。ここで、画像選択部215は、有効フレームとして選択したフレーム(連写画像)に、フレーム番号とは別の有効フレーム番号を付与する。この場合、ステップS407で最初の有効フレームとして選択したフレームには、有効フレーム番号として「1」を付与する。さらに、画像選択部215は、有効フレームを指定するためのポインタmに、ステップS407で選択されたフレームのフレーム番号を設定する(ステップS408)。   In this manner, the presence / absence of the subject region is sequentially determined from the first frame of the continuous shot image. Then, the image selection unit 215 selects the first frame determined to have a subject area as an effective frame (step S403: Yes, step S405: No, step S407). Here, the image selection unit 215 assigns an effective frame number different from the frame number to the frame (continuous shot image) selected as the effective frame. In this case, “1” is assigned as the effective frame number to the frame selected as the first effective frame in step S407. Further, the image selection unit 215 sets the frame number of the frame selected in step S407 to the pointer m for designating an effective frame (step S408).

最初の有効フレームを選択するとともに、このフレームのフレーム番号をポインタmに設定すると、画像選択部215は、ポインタnを+1し、次のフレームについて被写体領域の有無を判別する(ステップS409、ステップS410:No、ステップS403)。すなわち、ストロボ画像の生成に用いる次のフレームを探索する。ここで、最初の有効フレームが選択された後は(ステップS405:Yes)、調査対象フレーム(n番目のフレーム)と直前に選択した有効フレーム(ポインタmが指定するフレーム)との間で被写体領域の位置を比較することで、前の有効フレームと被写体部分が重ならないフレームを有効フレームとして選択していく。   When the first valid frame is selected and the frame number of this frame is set to the pointer m, the image selection unit 215 increments the pointer n by 1 and determines whether or not there is a subject area for the next frame (steps S409 and S410). : No, step S403). That is, the next frame used for generating the strobe image is searched. Here, after the first valid frame is selected (step S405: Yes), the subject area between the investigation target frame (nth frame) and the last valid frame (frame designated by the pointer m) is selected. By comparing these positions, a frame in which the previous effective frame and the subject portion do not overlap is selected as an effective frame.

ここで、被写体の移動方向がX方向である場合、左から右への移動と右から左への移動の2通りがある。左から右に移動していたのであれば、フレームnにおける被写体領域が、フレームmにおける被写体領域より右側にある必要がある。一方、右から左に移動していたのであれば、フレームnにおける被写体領域が、フレームmにおける被写体領域より左側にある必要がある。   Here, when the moving direction of the subject is the X direction, there are two types of movement: left-to-right movement and right-to-left movement. If moving from left to right, the subject area in frame n needs to be on the right side of the subject area in frame m. On the other hand, if moving from right to left, the subject area in frame n needs to be on the left side of the subject area in frame m.

よって、画像選択部215は、フレームnにおける被写体左端L(n)が、フレームmの被写体右端R(m)より大きいか、フレームnにおける被写体右端R(n)が、フレームmの被写体左端L(m)より小さい場合、フレームnの被写体部分がフレームmの被写体部分と重なっていないと判別する(ステップS406)。   Therefore, the image selection unit 215 determines that the subject left end L (n) in the frame n is larger than the subject right end R (m) of the frame m, or the subject right end R (n) in the frame n is the subject left end L (of the frame m. If smaller than m), it is determined that the subject portion of frame n does not overlap the subject portion of frame m (step S406).

フレームnの被写体領域がこのような条件に合致していれば(ステップS406:Yes)、画像選択部215は、当該n番目のフレームを有効フレームとして選択する(ステップS407)。一方、条件に合致しなければ(ステップS406:No)、当該n番目のフレームは、ストロボ画像の生成に用いない無効フレームとする(ステップS404)。   If the subject area of the frame n matches such a condition (step S406: Yes), the image selection unit 215 selects the nth frame as an effective frame (step S407). On the other hand, if the condition is not met (step S406: No), the n-th frame is set as an invalid frame that is not used for generating the strobe image (step S404).

以降の連写画像についても、このような条件判別による有効フレームの選択をおこない、すべての連写画像を調査して有効フレームの選択をおこなうと(ステップS410:Yes)、図14に示すように、フレーム番号とは別の有効フレーム番号が付与された有効フレームと、ストロボ画像の生成には用いない無効フレームとが峻別される。   As for the subsequent continuous shot images, when effective frames are selected by such condition determination and all continuous shot images are examined and effective frames are selected (step S410: Yes), as shown in FIG. The effective frame to which the effective frame number different from the frame number is assigned and the invalid frame not used for generating the strobe image are distinguished.

なお、有効フレーム番号は、図示するように、選択された有効フレームにおいて時系列順に連番となっているものとする。この場合、選択された有効フレームの数をp’(p’≦p)とする。このように、選択した有効フレームを示す識別情報を付与することで、画像メモリ230に格納した連写画像の中から有効フレームを峻別できるが、無効フレームを画像メモリ230から消去することで、有効フレームのみ画像メモリ230に残すようにしてもよい。   It is assumed that the effective frame numbers are serial numbers in the time series in the selected effective frame as shown in the figure. In this case, the number of selected effective frames is p ′ (p ′ ≦ p). As described above, by adding the identification information indicating the selected effective frame, the effective frame can be distinguished from the continuous shot images stored in the image memory 230. However, by deleting the invalid frame from the image memory 230, the effective frame can be distinguished. Only the frame may be left in the image memory 230.

以上が、被写体がX方向に移動していた場合に有効フレームを選択する動作である。被写体の移動方向がY方向である場合(図12のステップS401:No)も、同様の処理によって有効フレームを選択することができる。つまり、図13に示すフローチャートのステップS411〜ステップS419をおこなうことで、Y方向に移動する被写体の画像が重ならないフレームが有効フレームとして選択されるが、最初の有効フレームが選択された後の選択条件は、被写体が上から下に移動する場合と下から上に移動する場合を考慮する。   The above is the operation of selecting an effective frame when the subject has moved in the X direction. Even when the moving direction of the subject is the Y direction (step S401: No in FIG. 12), an effective frame can be selected by the same process. That is, by performing steps S411 to S419 in the flowchart shown in FIG. 13, a frame in which the images of the subject moving in the Y direction do not overlap is selected as the effective frame, but the selection after the first effective frame is selected. The condition considers the case where the subject moves from top to bottom and the case where the subject moves from bottom to top.

すなわち、上から下に移動していたのであれば、フレームnにおける被写体領域が、直前に選択した有効フレームmにおける被写体領域より下側にある必要がある。一方、下から上に移動していたのであれば、フレームnにおける被写体領域が、直前に選択した有効フレームmにおける被写体領域より上側にある必要がある。   That is, if moving from the top to the bottom, the subject area in the frame n needs to be below the subject area in the effective frame m selected immediately before. On the other hand, if it has moved from the bottom to the top, the subject area in the frame n needs to be above the subject area in the effective frame m selected immediately before.

よって、画像選択部215は、フレームnにおける被写体上端T(n)が、直前に選択した有効フレームmの被写体下端B(m)より大きいか、フレームnにおける被写体下端B(n)が、直前に選択した有効フレームmの被写体上端T(m)より小さい場合、フレームnの被写体部分が直前に選択した有効フレームmの被写体部分と重なっていないと判別する(図13のステップS415)。   Therefore, the image selection unit 215 determines that the subject upper end T (n) in the frame n is larger than the subject lower end B (m) of the effective frame m selected immediately before, or the subject lower end B (n) in the frame n is immediately before If it is smaller than the subject upper end T (m) of the selected effective frame m, it is determined that the subject portion of the frame n does not overlap with the subject portion of the effective frame m selected immediately before (step S415 in FIG. 13).

以上説明したように、撮像画像を1方向に投影した1次元データから、被写体領域の検出と、被写体部分が重ならないフレームの選択をおこなった。すなわち、ストロボ画像の生成に用いる画像(有効フレーム)の選択を、データ量の少ない1次元データに基づいておこなうことで、撮像画像のすべてのデータを用いておこなうよりも、画像選択までの処理量が大幅に削減される。   As described above, the subject area is detected from the one-dimensional data obtained by projecting the captured image in one direction, and the frame in which the subject portions do not overlap is selected. That is, by selecting an image (effective frame) used for generating a strobe image based on one-dimensional data with a small amount of data, the amount of processing until image selection is performed rather than using all data of the captured image. Is greatly reduced.

このようにして、ストロボ画像の生成に用いる画像(有効フレーム)が選択されると、ストロボ画像生成処理(図3)では、選択したフレームの画像データを用いて、ストロボ画像の背景画像を生成するための「背景画像生成処理」(ステップS500)、有効フレームから被写体部分の画像を抽出するための「被写体画像抽出処理」(ステップS600)が順次実行される。   When an image (effective frame) used for generating a strobe image is selected in this way, in the strobe image generation process (FIG. 3), a background image of the strobe image is generated using the image data of the selected frame. “Background image generation processing” (step S500) for the purpose, and “Subject image extraction processing” (step S600) for extracting the image of the subject portion from the effective frame are sequentially executed.

「背景画像生成処理」を、図15に示すフローチャートを参照して説明する。この背景画像生成処理は、有効フレーム選択処理が終了した旨を画像選択部215が背景画像生成部216に通知したことを契機に開始される。   The “background image generation process” will be described with reference to the flowchart shown in FIG. This background image generation processing is started when the image selection unit 215 notifies the background image generation unit 216 that the effective frame selection processing has ended.

処理が開始されると、背景画像生成部216は、有効フレーム上で調査する座標(x,y)の初期化をおこなう。ここでは、xおよびyのそれぞれの初期値「0」とすることで、有効フレームの座標原点(0,0)を調査座標とする(ステップS501)。   When the process is started, the background image generation unit 216 initializes coordinates (x, y) to be examined on the effective frame. Here, by setting the initial value “0” of each of x and y, the coordinate origin (0, 0) of the effective frame is set as the survey coordinates (step S501).

次に背景画像生成部216は、有効フレームを指定するポインタn’で1〜p’を順次指定することで、設定した座標(x,y)の画素値を、画像メモリ230に格納されているすべての有効フレーム(1〜p’)から順次取得する(ステップS502〜ステップS504、ステップS505:No)。   Next, the background image generation unit 216 stores the pixel value of the set coordinates (x, y) in the image memory 230 by sequentially specifying 1 to p ′ with the pointer n ′ that specifies the effective frame. It acquires sequentially from all the effective frames (1-p ') (step S502-step S504, step S505: No).

すべての有効フレームから座標(x,y)の画素値を取得すると(ステップS505:Yes)、背景画像生成部216は、取得した画素値をソートし(ステップS506)、その中央値を座標(x,y)が背景部分を示している場合の画素値(背景画素値fb'(x,y))とする(ステップS507)。   When the pixel values of the coordinates (x, y) are acquired from all the effective frames (step S505: Yes), the background image generation unit 216 sorts the acquired pixel values (step S506) and sets the median value to the coordinates (x , Y) is a pixel value (background pixel value fb ′ (x, y)) when the background portion is indicated (step S507).

座標(x,y)についての背景画素値fb'(x,y)を求めると、背景画像生成部216は、有効フレームの座標範囲内の座標を順次調査座標とし、当該座標(x,y)についての背景画素値fb'(x,y)を求める(ステップS508、ステップS509:No、ステップS502〜ステップS507)。ここでは、例えば、同一のy座標についてのx座標を順次+1していき、x座標が画像の右端に達したところでy座標を+1するとともに座標xを0にすることを繰り返すことで、(0,0)から(sizeX-1,sizeY-1)までの画素値を順次取得し、各座標における背景画素値fb'(x,y)を求める。   When the background pixel value fb ′ (x, y) for the coordinates (x, y) is obtained, the background image generation unit 216 sequentially sets the coordinates in the coordinate range of the effective frame as the investigation coordinates, and the coordinates (x, y). A background pixel value fb ′ (x, y) is obtained for (Step S508, Step S509: No, Step S502 to Step S507). Here, for example, by sequentially incrementing the x-coordinate with respect to the same y-coordinate by +1, when the x-coordinate reaches the right end of the image, the y-coordinate is incremented by 1 and the coordinate x is set to 0 (0) , 0) to (sizeX−1, sizeY−1) are sequentially obtained to obtain a background pixel value fb ′ (x, y) at each coordinate.

すべての座標から求めた背景画素値fb'(x,y)を各座標における画素値とすることで、有効フレームに示されている背景部分のみを示した背景画像とすることができる。背景画像生成部216は、このようにして背景画像を生成すると(ステップS510)、生成した背景画像を画像メモリ230に格納するとともに、背景画像を生成した旨を被写体検出部214に通知して処理を終了する。   By using the background pixel value fb ′ (x, y) obtained from all coordinates as the pixel value at each coordinate, a background image showing only the background portion shown in the effective frame can be obtained. When the background image generation unit 216 generates the background image in this way (step S510), the background image generation unit 216 stores the generated background image in the image memory 230 and notifies the subject detection unit 214 that the background image has been generated. Exit.

この場合、ストロボ画像生成処理(図3)のフローに戻り、「被写体画像抽出処理」(ステップS600)が実行される。この被写体画像抽出処理は、背景画像の生成を契機に被写体検出部214によって実行される。この被写体画像抽出処理を、図16に示すフローチャートを参照して説明する。   In this case, returning to the flow of the strobe image generation process (FIG. 3), the “subject image extraction process” (step S600) is executed. This subject image extraction process is executed by the subject detection unit 214 when the background image is generated. This subject image extraction processing will be described with reference to the flowchart shown in FIG.

処理が開始されると、被写体検出部214は、座標(x,y)の初期化(ステップS601)と、対象フレームの初期化(ステップS602)をおこない、有効フレーム1〜p’のそれぞれから座標(x,y)の画素値fn'(x,y)を順次取得し、当該座標(x,y)における背景画素値fb'(x,y)との差分fd'(x,y)を算出する(ステップS603〜ステップS605、ステップS606:No)。   When the process is started, the subject detection unit 214 initializes the coordinates (x, y) (step S601) and the target frame (step S602), and coordinates from each of the effective frames 1 to p ′. The pixel value fn ′ (x, y) of (x, y) is sequentially acquired, and the difference fd ′ (x, y) from the background pixel value fb ′ (x, y) at the coordinate (x, y) is calculated. (Step S603 to Step S605, Step S606: No).

すべての有効フレームから座標(x,y)における差分fd'(x,y)を算出すると(ステップS606:Yes)、被写体検出部214は、算出した差分fd'(x,y)の標準偏差fs(x,y)を算出する(ステップS607)。ここでは、例えば、被写体検出部214が数2を演算することで標準偏差fs(x,y)を算出する。   When the difference fd ′ (x, y) at the coordinates (x, y) is calculated from all the effective frames (step S606: Yes), the subject detection unit 214 calculates the standard deviation fs of the calculated difference fd ′ (x, y). (x, y) is calculated (step S607). Here, for example, the subject detection unit 214 calculates Formula 2 to calculate the standard deviation fs (x, y).

Figure 2010200360
Figure 2010200360

座標(x,y)での標準偏差fs(x,y)を算出すると、被写体検出部214は、有効フレームの座標範囲内で調査座標を移動させ、各座標における標準偏差fs(x,y)を順次算出する(ステップS608、ステップS609:No、ステップS602〜ステップS607)。   When the standard deviation fs (x, y) at the coordinates (x, y) is calculated, the subject detection unit 214 moves the survey coordinates within the coordinate range of the effective frame, and the standard deviation fs (x, y) at each coordinate. Are sequentially calculated (step S608, step S609: No, step S602 to step S607).

各座標における標準偏差fs(x,y)を算出すると、被写体検出部214は、各有効フレームにおける被写体部分の判別に用いる変動閾値moveを、算出した標準偏差fs(x,y)に基づいて設定する(ステップS610)。ここでは、例えば、数3を演算することで、変動閾値moveを設定する。   When the standard deviation fs (x, y) at each coordinate is calculated, the subject detection unit 214 sets the variation threshold move used for determining the subject part in each effective frame based on the calculated standard deviation fs (x, y). (Step S610). Here, for example, the variation threshold value move is set by calculating Equation 3.

Figure 2010200360
Figure 2010200360

変動閾値moveを設定すると、被写体検出部214は、画像メモリ230に格納されている有効フレーム(1〜p’)のそれぞれから、差分fd'(x,y)≧変動閾値moveとなる画素値を取得する(ステップS611、ステップS612、ステップS615、ステップS616:No)。   When the variation threshold move is set, the subject detection unit 214 calculates a pixel value satisfying the difference fd ′ (x, y) ≧ the variation threshold move from each of the effective frames (1 to p ′) stored in the image memory 230. Obtain (Step S611, Step S612, Step S615, Step S616: No).

被写体検出部214は、このような条件となる画素値を、フレームn’で被写体部分を示す画素値とするが(ステップS614)、この場合、例えば、差分fd'(x,y)≧変動閾値moveとなる座標を「1」、差分fd'(x,y)<変動閾値moveとなる座標を「0」するデータを生成し、生成した0と1のデータに対し、例えば、連続している領域には同じ番号を振り、離れている領域には別の番号を振るラベリングをおこなう。そして、ラベリングした領域のうちで最大となる領域のみとなる座標についての画素値を、当該フレームn’で被写体部分を示す画素値とする。   The subject detection unit 214 sets the pixel value satisfying such a condition as a pixel value indicating the subject portion in the frame n ′ (step S614). In this case, for example, the difference fd ′ (x, y) ≧ the variation threshold value. Data for which the coordinate for move is “1” and the coordinate for difference fd ′ (x, y) <variation threshold move is “0” is generated. For example, the generated data of 0 and 1 are continuous. Label areas with the same number and separate areas with different numbers. Then, the pixel value for the coordinate that becomes only the maximum region among the labeled regions is set as the pixel value indicating the subject portion in the frame n ′.

このとき、被写体検出部214は、例えば、膨張・穴埋め・収縮などといった欠損を補完するための処理や、被写体領域の周辺部に透過パラメータを付加させるなどといった処理をおこなう(ステップS613)。   At this time, the subject detection unit 214 performs, for example, processing for complementing defects such as expansion, hole filling, and contraction, and processing for adding a transmission parameter to the periphery of the subject region (step S613).

以上のような処理により、有効フレームのそれぞれから被写体部分を示す画像(被写体画像)が抽出される。有効フレームから被写体画像を抽出すると、本処理を終了して、ストロボ画像生成処理(図3)のフローに戻る。このとき、背景画像生成部216は、被写体画像が抽出された旨をストロボ画像生成部217に通知する。   Through the processing as described above, an image (subject image) indicating the subject portion is extracted from each effective frame. When the subject image is extracted from the effective frame, this process is terminated, and the flow returns to the strobe image generation process (FIG. 3). At this time, the background image generation unit 216 notifies the strobe image generation unit 217 that the subject image has been extracted.

ストロボ画像生成部217は、ストロボ画像生成処理のフローにおいて、背景画像生成処理(ステップS500)で生成された背景画像と、被写体画像抽出処理で抽出された各有効フレームにおける被写体画像とを合成することで、図17に示すようなストロボ画像を生成する(ステップS107)。   In the strobe image generation process flow, the strobe image generation unit 217 combines the background image generated in the background image generation process (step S500) and the subject image in each effective frame extracted in the subject image extraction process. Thus, a strobe image as shown in FIG. 17 is generated (step S107).

生成したストロボ画像は、画像出力部240を通じて表示部310に表示される他、デジタルカメラ1のユーザが操作部330を操作することによる指示入力に応じて、記憶部250や外部記憶部260に保存されて(ステップS108)、処理を終了する。   The generated strobe image is displayed on the display unit 310 through the image output unit 240 and is also stored in the storage unit 250 or the external storage unit 260 in response to an instruction input by the user of the digital camera 1 operating the operation unit 330. Then (step S108), the process ends.

なお、カメラの向きを縦位置とした場合は、撮像画像を−90°もしくは90°回転させたときの座標系で上述した処理をおこなえば、同様にストロボ画像を生成することができる。   When the camera is in the vertical position, a strobe image can be generated in the same manner by performing the above-described processing in the coordinate system when the captured image is rotated by −90 ° or 90 °.

以上説明したように、本発明を上記実施形態の如く適用することにより、ストロボ画像を高速に生成することができる。   As described above, a strobe image can be generated at high speed by applying the present invention as in the above embodiment.

つまり、連写によって得られた画像を、データ量の少ない1次元データに変換し、ストロボ画像の生成に必要なフレームの選択を1次元データに基づいておこなうことで、画像選択までの処理量を大幅に削減し、処理時間を短縮することができる。   In other words, an image obtained by continuous shooting is converted into one-dimensional data with a small amount of data, and a frame necessary for generating a strobe image is selected based on the one-dimensional data, thereby reducing the processing amount until image selection. This greatly reduces the processing time.

この場合において、1次元データは、撮像画像を1方向に投影した投影データとすることができる。よって、単純な処理によって1次元データを生成することができる。   In this case, the one-dimensional data can be projection data obtained by projecting a captured image in one direction. Therefore, one-dimensional data can be generated by a simple process.

このような投影データの生成する場合、被写体の移動方向に直交する1方向に投影すれば、移動方向についての1次元データとすることができる。このような投影データであれば、移動方向上での被写体部分の重なりを容易に判別することができる。したがって、ユーザが被写体の移動方向を指定するだけで、被写体が重ならずに合成されたストロボ画像を自動的に生成することができる。   When such projection data is generated, one-dimensional data regarding the moving direction can be obtained by projecting in one direction orthogonal to the moving direction of the subject. With such projection data, it is possible to easily determine the overlap of the subject portions in the movement direction. Therefore, only by designating the moving direction of the subject, it is possible to automatically generate a combined strobe image without overlapping the subjects.

1次元データの生成および有効フレームの選択にかかる処理量が少ないので、デジタルカメラのプロセッサなどに必要以上の処理能力をもたせなくても、高速にストロボ画像の生成ができる。この結果、例えば、コンパクトデジタルカメラなどであっても、撮ったその場でストレスなくストロボ画像を生成することができる。   Since the processing amount for generating one-dimensional data and selecting an effective frame is small, it is possible to generate a strobe image at high speed without providing a processor or the like of the digital camera with more processing power than necessary. As a result, for example, even with a compact digital camera, a strobe image can be generated without stress on the spot.

これにより、例えば、スポーツなどの動作にかかるフォームのチェックをストロボ画像でおこなう場合などに、パーソナルコンピュータなどの大がかりな装置を用意することなく、デジタルカメラだけで撮影からストロボ画像の生成までをその場で短時間におこなうことができる。   For example, when checking a form related to an action such as a sport with a strobe image, there is no need to prepare a large-scale device such as a personal computer. Can be done in a short time.

また、有効フレームの選択までを高速におこなえるので、連写画像が多数であっても高速にストロボ画像を生成することができる。つまり、ストロボ画像の生成にあたり、撮像画像の枚数や連写速度などに制限を設けなくてもよいので、連写速度や撮影開始タイミングにとらわれずに撮影しても、ストロボ画像を生成することができる。   In addition, since effective frames can be selected at high speed, a strobe image can be generated at high speed even if there are many continuous shot images. In other words, when creating a strobe image, there is no need to limit the number of captured images and the continuous shooting speed, so it is possible to generate a strobe image even when shooting regardless of the continuous shooting speed or shooting start timing. it can.

上記実施形態は一例であり、本発明の適用範囲はこれに限られない。すなわち、種々の応用が可能であり、あらゆる実施の形態が本発明の範囲に含まれる。   The said embodiment is an example and the application range of this invention is not restricted to this. That is, various applications are possible, and all embodiments are included in the scope of the present invention.

例えば、上記実施形態では、被写体領域の探索や背景画素値の取得などを1座標ずつずらしておこなったが、例えば、間欠的に座標を移動することでより高速に処理することができる。   For example, in the above embodiment, the search for the subject area and the acquisition of the background pixel value are performed by shifting the coordinates one by one. However, for example, the processing can be performed at a higher speed by moving the coordinates intermittently.

また、上記実施形態では、背景画素値を全画素値の中央値としたが、これに限られず、例えば、平均値などとしてもよい。   In the above embodiment, the background pixel value is the median value of all the pixel values, but is not limited thereto, and may be an average value, for example.

また、対象となる画像の座標数を実際の画像サイズより小さくしてから処理をおこなうことで高速化を図ってもよい。   Further, the processing speed may be increased by performing processing after making the number of coordinates of the target image smaller than the actual image size.

上記実施形態では、各座標での画素値の差分に基づく画素値で背景画像を生成したが、連写画像の中に被写体領域が検出されない画像があれば、上述した背景画像生成処理をおこなわずに、当該画像を背景画像として採用してもよい。   In the above embodiment, the background image is generated with the pixel value based on the difference of the pixel value at each coordinate. However, if the subject region is not detected in the continuous shot image, the above-described background image generation processing is not performed. In addition, the image may be adopted as the background image.

また、上記実施形態では、被写体部分が重ならないフレームを有効フレームとして選択することで、被写体画像が重ならないストロボ画像を生成するものとしたが、これに限られず、例えば、任意に指定した間隔で被写体部分が示されるストロボ画像を生成してもよい。この場合、例えば、撮影前の設定画面において、ユーザが所望する被写体画像の間隔(例えば、ピクセル数)を指定する。そして、1次元データから被写体領域を検出する際、最初に選択した有効フレームで検出された被写体領域のL(n)(もしくはR(n))、あるいは、T(n)(もしくはB(n))から指定された間隔分離れた位置がL(n)(もしくはR(n))、あるいは、T(n)(もしくはB(n))となるフレームを、次以降の有効フレームとして順次選択することで、被写体部分が指定した間隔で現れるストロボ画像を生成することができる。この場合、指定された間隔が大きければ被写体部分が重ならないが、間隔が小さければ被写体部分が重なるストロボ画像となる。この場合においても、1次元データから被写体領域を検出するので、高速にストロボ画像を生成することができる。   In the above embodiment, a strobe image in which subject images do not overlap is generated by selecting a frame in which subject portions do not overlap as effective frames. However, the present invention is not limited to this. A strobe image showing the subject portion may be generated. In this case, for example, an interval (for example, the number of pixels) of the subject image desired by the user is specified on the setting screen before shooting. When detecting the subject area from the one-dimensional data, L (n) (or R (n)) or T (n) (or B (n) of the subject area detected in the first selected effective frame ), The frame whose position separated by the specified interval is L (n) (or R (n)) or T (n) (or B (n)) is sequentially selected as the next and subsequent valid frames. Thus, it is possible to generate a strobe image in which the subject portion appears at a specified interval. In this case, the subject portion does not overlap if the specified interval is large, but the subject portion overlaps if the interval is small. Also in this case, since the subject area is detected from the one-dimensional data, a strobe image can be generated at high speed.

なお、本発明を上記実施形態で例示したデジタルカメラ1のような撮像装置で実現する場合においては、本発明にかかる構成や機能を予め備えた撮像装置として提供できる他、制御部210の各機能と同様の機能を実現するプログラムを適用することにより、既存の撮像装置を本発明にかかる撮像装置をして機能させることもできる。   In the case where the present invention is realized by an imaging apparatus such as the digital camera 1 exemplified in the above embodiment, each function of the control unit 210 can be provided in addition to the provision of the configuration and functions according to the present invention in advance. By applying a program that realizes the same function as the above, it is possible to make an existing imaging device function as the imaging device according to the present invention.

なお、上記実施形態では、撮像装置の例としてデジタルスチルカメラを示したが、撮像装置の形態は任意であり、単体のデジタルスチルカメラで実現可能であることはもとより、これと同様の撮像機能を備えた種々の電子機器(例えば、携帯電話など)に本発明を適用してもよい。   In the above-described embodiment, a digital still camera is shown as an example of an imaging device. However, the imaging device can be of any form, and can be realized with a single digital still camera. The present invention may be applied to various electronic devices (for example, cellular phones) provided.

上記実施形態では、スチルカメラによる連写機能で得られた画像からストロボ画像を生成する例を示したが、被写体が連続的に変化しているフレーム画像が得られればよいので、動画データからもストロボ画像を生成することができる。よって、本発明をビデオカメラや、動画撮像機能を有する種々の撮像装置に適用することでも高速にストロボ画像を生成することができる。   In the above embodiment, an example in which a strobe image is generated from an image obtained by a continuous shooting function by a still camera has been shown. However, since it is sufficient that a frame image in which a subject is continuously changed is obtained, it can be obtained from moving image data. A strobe image can be generated. Therefore, even if the present invention is applied to a video camera or various imaging devices having a moving image imaging function, a strobe image can be generated at high speed.

このような場合においても、プログラムを適用することで、既存の装置を本発明にかかる撮像装置として機能させることができる。   Even in such a case, by applying the program, an existing apparatus can be caused to function as the imaging apparatus according to the present invention.

このようなプログラムの適用方法は任意であり、例えば、CD−ROMやメモリカードなどの記憶媒体に格納して適用できる他、例えば、インターネットなどの通信媒体を介して適用することもできる。   The application method of such a program is arbitrary. For example, the program can be applied by being stored in a storage medium such as a CD-ROM or a memory card, or can be applied via a communication medium such as the Internet.

また、画像処理をおこなえる装置であれば、上記プログラムを適用することで、高速なストロボ画像生成を実現することができる。すなわち、撮像装置に限られず、例えば、パーソナルコンピュータなどに上記プログラムを適用することで、予め撮像された画像から高速にストロボ画像を生成することができる。   If the apparatus can perform image processing, high-speed strobe image generation can be realized by applying the above program. In other words, the present invention is not limited to an imaging apparatus, and for example, by applying the above program to a personal computer or the like, a strobe image can be generated at high speed from an image captured in advance.

1…デジタルカメラ、100…撮像部、110…光学装置、120…イメージセンサ部、200…データ処理部、210…制御部、211…動作モード処理部、212…撮像制御部、213…1次元データ生成部、214…被写体検出部、215…画像選択部、216…背景画像生成部、217…ストロボ画像生成部、220…画像処理部、230…画像メモリ、240…画像出力部、250…記憶部、260…外部記憶部、300…インタフェース部、310…表示部、320…外部インタフェース部、330…操作部 DESCRIPTION OF SYMBOLS 1 ... Digital camera, 100 ... Imaging part, 110 ... Optical apparatus, 120 ... Image sensor part, 200 ... Data processing part, 210 ... Control part, 211 ... Operation mode processing part, 212 ... Imaging control part, 213 ... One-dimensional data Generation unit, 214 ... Subject detection unit, 215 ... Image selection unit, 216 ... Background image generation unit, 217 ... Strobe image generation unit, 220 ... Image processing unit, 230 ... Image memory, 240 ... Image output unit, 250 ... Storage unit , 260 ... external storage unit, 300 ... interface unit, 310 ... display unit, 320 ... external interface unit, 330 ... operation unit

Claims (6)

撮像により連続する複数の撮像画像を生成する撮像手段と、
前記撮像手段が生成した各撮像画像から、被写体の移動方向に応じた1次元データを生成する1次元データ生成手段と、
前記1次元データ生成手段が生成した1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する被写体検出手段と、
前記被写体検出手段が検出した被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する画像選択手段と、
前記画像選択手段が選択した撮像画像から背景画像を生成する背景画像生成手段と、
前記背景画像生成手段が生成した背景画像と、前記画像選択手段が選択した撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成するストロボ画像生成手段と、
を備えることを特徴とする撮像装置。
Imaging means for generating a plurality of continuous captured images by imaging;
One-dimensional data generating means for generating one-dimensional data corresponding to the moving direction of the subject from each captured image generated by the imaging means;
Subject detection means for detecting a portion indicating the subject in each captured image based on the one-dimensional data generated by the one-dimensional data generation means;
Image selecting means for selecting the captured image used for generating the strobe image based on a portion indicating the subject detected by the subject detecting means;
Background image generation means for generating a background image from the captured image selected by the image selection means;
A strobe image generating means for generating a strobe image by combining the background image generated by the background image generating means and the portion indicating the subject in the captured image selected by the image selecting means;
An imaging apparatus comprising:
前記1次元データ生成手段は、
被写体の移動方向と直交する方向に前記各撮像画像を投影した投影データを前記1次元データとして生成する、
ことを特徴とする請求項1に記載の撮像装置。
The one-dimensional data generation means includes
Generating, as the one-dimensional data, projection data obtained by projecting each captured image in a direction orthogonal to the moving direction of the subject;
The imaging apparatus according to claim 1.
前記被写体検出手段は、前記1次元データと、当該1次元データ上の同一座標における画素値との差分と閾値との比較により、前記被写体を示す部分を検出する、
ことを特徴とする請求項1または2に記載の撮像装置。
The subject detection means detects a portion indicating the subject by comparing a difference between the one-dimensional data and a pixel value at the same coordinate on the one-dimensional data and a threshold value;
The imaging apparatus according to claim 1 or 2, wherein
前記画像選択手段は、
前記被写体検出手段によって検出された前記被写体を示す部分が重ならない撮像画像を選択する、
ことを特徴とする請求項1乃至3のいずれか1項に記載の撮像装置。
The image selection means includes
Selecting a captured image in which the portion indicating the subject detected by the subject detection means does not overlap;
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
撮像装置による撮像からストロボ画像を生成するストロボ画像生成方法であって、
前記撮像装置が、
撮像によって生成した連続する複数の撮像画像から、被写体の移動方向に応じた1次元データを生成する1次元データ生成ステップと、
前記1次元データ生成ステップで生成された1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する被写体検出ステップと、
前記被写体検出ステップで検出された被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する画像選択ステップと、
前記画像選択ステップで選択された撮像画像から背景画像を生成する背景画像生成ステップと、
前記背景画像生成ステップで生成された背景画像と、前記画像選択ステップで選択された撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成するストロボ画像生成ステップと、
を実行することを特徴とするストロボ画像生成方法。
A strobe image generation method for generating a strobe image from imaging by an imaging device,
The imaging device is
A one-dimensional data generation step for generating one-dimensional data according to the moving direction of the subject from a plurality of consecutive captured images generated by imaging;
A subject detection step of detecting a portion indicating the subject in each captured image based on the one-dimensional data generated in the one-dimensional data generation step;
An image selection step of selecting the captured image used for generating the strobe image based on a portion indicating the subject detected in the subject detection step;
A background image generation step of generating a background image from the captured image selected in the image selection step;
A strobe image generation step of generating a strobe image by combining the background image generated in the background image generation step and the portion indicating the subject in the captured image selected in the image selection step;
A strobe image generation method comprising:
コンピュータに、
撮像によって生成された連続する複数の撮像画像から、被写体の移動方向に応じた1次元データを生成する機能と、
前記1次元データに基づいて、各撮像画像において前記被写体を示す部分を検出する機能と、
前記検出された被写体を示す部分に基づいて、ストロボ画像の生成に用いる前記撮像画像を選択する機能と、
前記選択された撮像画像から背景画像を生成する機能と、
前記生成された背景画像と、前記選択された撮像画像における前記被写体を示す部分とを合成してストロボ画像を生成する機能と、
を実現させることを特徴とするプログラム。
On the computer,
A function of generating one-dimensional data corresponding to the moving direction of the subject from a plurality of consecutive captured images generated by imaging;
A function of detecting a portion indicating the subject in each captured image based on the one-dimensional data;
A function of selecting the captured image used for generating a strobe image based on a portion indicating the detected subject;
A function of generating a background image from the selected captured image;
A function of generating a strobe image by combining the generated background image and a portion showing the subject in the selected captured image;
A program characterized by realizing.
JP2010100484A 2010-04-26 2010-04-26 Imaging apparatus, stroboscopic image generation method, and program Pending JP2010200360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010100484A JP2010200360A (en) 2010-04-26 2010-04-26 Imaging apparatus, stroboscopic image generation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010100484A JP2010200360A (en) 2010-04-26 2010-04-26 Imaging apparatus, stroboscopic image generation method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008031866A Division JP4513869B2 (en) 2008-02-13 2008-02-13 Imaging apparatus, strobe image generation method, and program

Publications (1)

Publication Number Publication Date
JP2010200360A true JP2010200360A (en) 2010-09-09

Family

ID=42824508

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010100484A Pending JP2010200360A (en) 2010-04-26 2010-04-26 Imaging apparatus, stroboscopic image generation method, and program

Country Status (1)

Country Link
JP (1) JP2010200360A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442181A (en) * 2013-09-06 2013-12-11 深圳市中兴移动通信有限公司 Image processing method and image processing device
JP2016535552A (en) * 2014-08-29 2016-11-10 シャオミ・インコーポレイテッド Method and apparatus for obtaining a photograph
JP2019153863A (en) * 2018-03-01 2019-09-12 ソニー株式会社 Image processing device, encoding device, decoding device, image processing method, program, encoding method, and decoding method
CN113316804A (en) * 2019-01-16 2021-08-27 索尼集团公司 Image processing apparatus, image processing method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442181A (en) * 2013-09-06 2013-12-11 深圳市中兴移动通信有限公司 Image processing method and image processing device
JP2016535552A (en) * 2014-08-29 2016-11-10 シャオミ・インコーポレイテッド Method and apparatus for obtaining a photograph
JP2019153863A (en) * 2018-03-01 2019-09-12 ソニー株式会社 Image processing device, encoding device, decoding device, image processing method, program, encoding method, and decoding method
JP7119425B2 (en) 2018-03-01 2022-08-17 ソニーグループ株式会社 Image processing device, encoding device, decoding device, image processing method, program, encoding method and decoding method
US11508123B2 (en) 2018-03-01 2022-11-22 Sony Corporation Image processing device, encoding device, decoding device, image processing method, program, encoding method, and decoding method for processing multiple video camera image streams to generate stroboscopic images
CN113316804A (en) * 2019-01-16 2021-08-27 索尼集团公司 Image processing apparatus, image processing method, and program

Similar Documents

Publication Publication Date Title
JP4513869B2 (en) Imaging apparatus, strobe image generation method, and program
JP4735742B2 (en) Imaging apparatus, strobe image generation method, and program
KR101396743B1 (en) An image processing device, an image processing method, and a recording medium
JP4999268B2 (en) Electronic camera and program
JP5589548B2 (en) Imaging apparatus, image processing method, and program storage medium
JP2014123070A (en) Image capturing device and control method therefor
JP2011147109A (en) Image capturing apparatus and image processing apparatus
KR20120140036A (en) Digital photographing apparatus, method for controlling the same, and computer-readable storage medium
JP2006279894A (en) Image processing apparatus, image processing method, and program
KR20100066864A (en) Terminal having camera and method for processing image thereof
JP5952782B2 (en) Image processing apparatus, control method therefor, program, and storage medium
JP2010200360A (en) Imaging apparatus, stroboscopic image generation method, and program
JP5484129B2 (en) Imaging device
CN112640430B (en) Imaging element, imaging device, image data processing method, and storage medium
JP6223173B2 (en) Image processing apparatus, control method thereof, and program
JP7277187B2 (en) Image processing device, imaging device, image processing method, and program
JP6087617B2 (en) Imaging apparatus and control method thereof
KR101998846B1 (en) Terminal having camera and method for processing image thereof
KR101798019B1 (en) Terminal having camera and method for processing image thereof
JP2017220834A (en) Imaging apparatus, imaging method and program
KR101755520B1 (en) Terminal having camera and method for processing image thereof
KR101644888B1 (en) Terminal having camera and method for processing image thereof
EP3041219B1 (en) Image processing device and method, and program
JP2024011529A (en) Image processing device and system
JP5826309B2 (en) Image processing apparatus and image processing apparatus control method