JP2014039222A - Image processing apparatus, control method and control program of the same and imaging apparatus - Google Patents

Image processing apparatus, control method and control program of the same and imaging apparatus Download PDF

Info

Publication number
JP2014039222A
JP2014039222A JP2012181739A JP2012181739A JP2014039222A JP 2014039222 A JP2014039222 A JP 2014039222A JP 2012181739 A JP2012181739 A JP 2012181739A JP 2012181739 A JP2012181739 A JP 2012181739A JP 2014039222 A JP2014039222 A JP 2014039222A
Authority
JP
Japan
Prior art keywords
light
image
emitting image
conversion coefficient
emitting
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
JP2012181739A
Other languages
Japanese (ja)
Inventor
Shota Yamaguchi
彰太 山口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012181739A priority Critical patent/JP2014039222A/en
Publication of JP2014039222A publication Critical patent/JP2014039222A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve accuracy when a light emission image and a non-light emission image are positioned.SOLUTION: When a light emission image obtained by emitting light at the time of photographing a subject and a non-light emission image group which are continuously obtained without emitting light are positioned and synthesized, a positioning section 107 obtains a first positioning conversion coefficient used when a non-light emission image except for a reference non-light emission image is positioned to the reference non-light emission image in the non-light emission image group, and obtains a second positioning conversion coefficient used when the reference non-light emission image is positioned to the light emission image. The positioning section positions the light emission image and the non-light emission image group in accordance with the first and second positioning conversion coefficients. An image synthesis section 114 synthesizes the positioned light emission image and the non-light emission image group to obtain a synthesized image.

Description

本発明は、画像処理装置、その制御方法、および制御プログラム、並びに撮像装置に関し、特に、夜景撮影などの際に被写体および背景の双方を適切な露光状態に画像処理する画像処理装置に関する。   The present invention relates to an image processing apparatus, a control method thereof, a control program, and an imaging apparatus, and more particularly, to an image processing apparatus that performs image processing on both a subject and a background in an appropriate exposure state when shooting night scenes.

一般に、夜景などの低照度下において主要被写体(主に人物)と背景との双方を適正な露出で撮影する際には、露光時間などを背景が適正露出となるように設定する。そして、人物などの主要被写体についてはフラッシュなどの補助照明光によって適正露出に設定して撮影が行われる。このような撮影はスローシンクロ撮影と呼ばれている。   In general, when shooting both the main subject (mainly a person) and the background with an appropriate exposure under low illumination such as a night view, the exposure time and the like are set so that the background has an appropriate exposure. A main subject such as a person is photographed with an appropriate exposure set by an auxiliary illumination light such as a flash. Such shooting is called slow sync shooting.

ところが、スローシンクロ撮影においては、背景が低照度であるので設定すべき露光時間が長時間となってしまう。このため、背景についてブレを防止するため所謂三脚撮影を行う必要がある。   However, in slow sync photography, the exposure time to be set is long because the background is low in illuminance. For this reason, it is necessary to perform so-called tripod photography in order to prevent the background from blurring.

背景におけるブレを防止するため、ストロボ発光によって撮影した一枚の画像(以下発光画像と呼ぶ)と、ストロボ非発光で手振れを起こさない程度の時間で撮影された複数の画像(以下非発光画像と呼ぶ)とを連続撮影することが行われている。   In order to prevent blurring in the background, a single image shot with flash firing (hereinafter referred to as a flash image) and a plurality of images (hereinafter referred to as non-flash images) shot in a time that does not cause camera shake due to non-flash firing. Is called continuous shooting.

そして、発光画像と非発光画像との位置合わせを行って、主要被写体の部分について発光画像を用い、背景部分については複数の非発光画像を加算平均して用いる。これによって、所謂手持ち撮影によるスローシンクロ撮影を実現している。   Then, the light-emitting image and the non-light-emitting image are aligned, the light-emitting image is used for the main subject portion, and a plurality of non-light-emitting images are added and averaged for the background portion. This realizes slow sync photography by so-called hand-held photography.

例えば、予め主要被写体までの距離を検出して、主要被写体が遠くにいる場合には発光画像と複数の非発光画像との位置合わせを背景で行い、主要被写体が近くにいる場合には位置合わせを主要被写体で行うようにしたものがある(特許文献1参照)。   For example, the distance to the main subject is detected in advance, and when the main subject is far away, alignment of the light-emitting image and the plurality of non-light-emitting images is performed in the background, and when the main subject is close, alignment is performed. Is performed on a main subject (see Patent Document 1).

また、予め撮影した発光画像からストロボの照射されている領域を近景領域として検出して、近景領域で発光画像と非発光画像との像位置合わせを行うようにしたものがある(特許文献2参照)。   Also, there is an apparatus in which an area irradiated with a strobe is detected as a foreground area from a pre-photographed emission image, and image alignment between the emission image and the non-emission image is performed in the foreground area (see Patent Document 2). ).

特開2009−17606号公報JP 2009-17606 A 特開2010−114566号公報JP 2010-114566 A

前述のように、特許文献1においては、主要被写体が近くにいると判定すると、主要被写体で発光画像と非発光画像との位置合わせを行っている。ところが、発光画像と非発光画像とにおいては、一般に主要被写体の輝度が大きく異なっており、このような輝度が異なる主要被写体を基準として位置合わせを行うとなると、不可避的に位置合わせの精度が低下してしまう。   As described above, in Patent Document 1, when it is determined that the main subject is close, the alignment of the light-emitting image and the non-light-emitting image is performed on the main subject. However, the luminance of the main subject is generally greatly different between the light-emitting image and the non-light-emitting image, and if the alignment is performed with reference to the main subject having such a different luminance, the accuracy of the alignment inevitably decreases. Resulting in.

一方、前述のように、特許文献2においては、ストロボの照射されている領域を近景領域として当該近景領域で発光画像と非発光画像との位置合わせを行っている。ところが、特許文献1と同様に、発光画像と非発光画像との間で近景領域の輝度が大きく異なるので、位置合わせの精度が低下してしまう。   On the other hand, as described above, in Patent Document 2, the area irradiated with the strobe is set as a near view area, and the alignment of the light emission image and the non-light emission image is performed in the foreground area. However, as in Patent Document 1, since the brightness of the foreground area is greatly different between the light-emitting image and the non-light-emitting image, the alignment accuracy is lowered.

従って、本発明の目的は、発光画像と非発光画像との位置合わせを行う際の精度を向上させることのできる画像処理装置、その制御方法、および制御プログラム、並びに撮像装置を提供することにある。   Accordingly, an object of the present invention is to provide an image processing apparatus, a control method thereof, a control program, and an imaging apparatus capable of improving the accuracy when aligning a luminescent image and a non-luminescent image. .

上記の目的を達成するため、本発明による画像処理装置は、被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置であって、前記非発光画像群において特定の非発光画像を基準非発光画像として前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出手段と、前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出手段と、前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせ手段と、前記位置合わせ手段によって位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成手段と、を有することを特徴とする。   In order to achieve the above object, an image processing apparatus according to the present invention positions a luminescent image obtained by emitting light when photographing a subject and a non-luminescent image group obtained continuously without emitting light. An image processing apparatus for combining and synthesizing a non-light-emitting image excluding the reference non-light-emitting image as a reference non-light-emitting image as a reference non-light-emitting image in the non-light-emitting image group And a first alignment conversion coefficient used for aligning the reference non-light-emitting image with the light-emitting image on the basis of the light-emitting image. Second calculating means to be obtained; and positioning means for aligning the light emitting image and the non-light emitting image group according to the first alignment conversion coefficient and the second alignment conversion coefficient; And having and an image synthesizing means for the synthesized and the synthesized image of aligned light emitting image and the non-emission image group by the alignment means.

本発明による撮像装置は、上記の画像処理装置と、発光を行って被写体を撮影して発光画像を得るとともに、前記発光を行うことなく前記被写体を連続的に撮影して非発光画像群を得る撮像手段とを有することを特徴とする。   An imaging apparatus according to the present invention, together with the image processing apparatus described above, emits light to shoot a subject to obtain a luminescent image, and continuously shoots the subject without performing the luminescence to obtain a non-luminous image group. And imaging means.

本発明による制御方法は、被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置の制御方法であって、前記非発光画像群において特定の非発光画像を基準非発光画像として前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出ステップと、前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出ステップと、前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせステップと、前記位置合わせステップで位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成ステップと、を有することを特徴とする。   The control method according to the present invention is an image processing apparatus that aligns and combines a light-emitting image obtained by emitting light when photographing a subject and a non-light-emitting image group obtained continuously without light emission. In the non-light emitting image group, a first non-light emitting image is used as a reference non-light emitting image, and a non-light emitting image excluding the reference non-light emitting image is aligned with the reference non-light emitting image. A first calculation step for obtaining an alignment conversion coefficient, and a second calculation step for obtaining a second alignment conversion coefficient used when aligning the reference non-light-emitting image with the light-emitting image on the basis of the light-emitting image. An alignment step of aligning the light emitting image and the non-light emitting image group according to the first alignment conversion coefficient and the second alignment conversion coefficient; An image synthesizing step combined aligned the luminescent image and the non-emission image group in step combined to a composite image, characterized by having a.

本発明による制御プログラムは、被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置で用いられる制御プログラムであって、前記画像処理装置が備えるコンピュータに、前記非発光画像群において特定の非発光画像を基準非発光画像として前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出ステップと、前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出ステップと、前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせステップと、前記位置合わせステップで位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成ステップと、を実行させることを特徴とする。   The control program according to the present invention is an image processing apparatus that aligns and combines a light-emitting image obtained by emitting light when photographing a subject and a non-light-emitting image group obtained continuously without light emission. A control program to be used, wherein a non-light-emitting image excluding the reference non-light-emitting image as a specific non-light-emitting image in the non-light-emitting image group as a reference non-light-emitting image in the computer included in the image processing device A first calculation step for obtaining a first alignment conversion coefficient used when aligning the light emitting image, and a second calculating step used when aligning the reference non-light emitting image with the light emitting image on the basis of the light emitting image. A second calculating step for obtaining an alignment conversion coefficient; and the emission image and the first alignment conversion coefficient and the second alignment conversion coefficient in accordance with the second alignment conversion coefficient and the second alignment conversion coefficient. An alignment step of aligning the non-light emitting image group, and an image combining step of combining the light emitting image and the non-light emitting image group aligned in the alignment step to form a composite image. Features.

本発明によれば、発光画像と非発光画像との位置合わせを行う際の精度を向上させて、画質を良好にすることができる。   According to the present invention, it is possible to improve the accuracy at the time of performing alignment between the light emitting image and the non-light emitting image, and to improve the image quality.

本発明の実施の形態による画像処理装置が用いられた撮像装置の一例を示すブロック図である。It is a block diagram which shows an example of the imaging device with which the image processing apparatus by embodiment of this invention was used. 図1に示す撮像部、ストロボ発光制御部、および露出条件制御部の動作を説明するための図である。It is a figure for demonstrating operation | movement of the imaging part shown in FIG. 1, a strobe light emission control part, and an exposure condition control part. 図1に示すストロボ照射領域算出部で行われる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process performed in the flash irradiation area | region calculation part shown in FIG. 図1に示す非発光画像変換係数算出部で行われる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process performed by the nonluminous image conversion coefficient calculation part shown in FIG. 図4に示す変換係数の算出を説明するための図である。It is a figure for demonstrating calculation of the conversion factor shown in FIG. 図1に示す発光画像変換係数算出部で行われる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process performed in the light emission image conversion coefficient calculation part shown in FIG. 図1に示す位置合わせ変換係数算出部による変換係数(射影変換係数)の算出を説明するための図である。It is a figure for demonstrating calculation of the conversion coefficient (projection conversion coefficient) by the alignment conversion coefficient calculation part shown in FIG. 図1に示す位置合わせ変換係数算出部による画像変換係数の変換を説明するための図である。It is a figure for demonstrating conversion of the image conversion coefficient by the alignment conversion coefficient calculation part shown in FIG. 図1に示す画像合成部で行われる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process performed in the image synthetic | combination part shown in FIG. 図1に示す画像合成部で用いられる差分絶対値と画像合成比率との関係を示す図である。It is a figure which shows the relationship between the difference absolute value used by the image composition part shown in FIG. 1, and an image composition ratio.

以下、本発明の実施の形態による画像処理装置の一例について図面を参照して説明する。   Hereinafter, an example of an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.

本発明の第1の実施の形態による画像処理装置が用いられた撮像装置の一例を示すブロック図である。   It is a block diagram which shows an example of the imaging device with which the image processing apparatus by the 1st Embodiment of this invention was used.

撮像装置(以下単にカメラと呼ぶ)は撮像部101を備えている。図示はしないが、撮像部101は撮像レンズ群、CMOSセンサ又はCCDなどの半導体撮像素子(以下単に撮像素子と呼ぶ)、およびストロボ発光部を有している。   An imaging apparatus (hereinafter simply referred to as a camera) includes an imaging unit 101. Although not shown, the imaging unit 101 includes an imaging lens group, a semiconductor imaging device such as a CMOS sensor or a CCD (hereinafter simply referred to as an imaging device), and a strobe light emitting unit.

ここで、撮像部101は同一の被写体に対して複数回の撮影を連続的に行う。この際、ストロボ発光制御部102は、撮影毎にストロボを発光させるか否かを制御する。さらに、撮影毎に露出条件制御部103がその露出条件を決定する。   Here, the imaging unit 101 continuously performs a plurality of shootings on the same subject. At this time, the strobe light emission control unit 102 controls whether or not the strobe light is emitted every time shooting is performed. Further, the exposure condition control unit 103 determines the exposure condition for each photographing.

撮像部101による撮影の結果得られたアナログ信号(映像信号又は画像信号)はA/D変換部104に与えられる。A/D変換部104は映像信号をA/D変換して画像データとして、当該画像データを信号処理部105に送る。   An analog signal (video signal or image signal) obtained as a result of shooting by the imaging unit 101 is given to the A / D conversion unit 104. The A / D converter 104 A / D converts the video signal as image data and sends the image data to the signal processor 105.

信号処理部105は画像データに対して、階調変換およびノイズ低減などの所定の信号処理を施して、画像処理部106に出力する。なお、図示の例では、画像処理部106が第1の実施形態による画像処理装置である。   The signal processing unit 105 performs predetermined signal processing such as gradation conversion and noise reduction on the image data, and outputs the image data to the image processing unit 106. In the illustrated example, the image processing unit 106 is the image processing apparatus according to the first embodiment.

画像処理部106は、前述のように複数回の撮影の結果得られた画像データの位置合わせを行う位置合わせ部107を有するとともに、位置合わせ部107によって位置合わせ処理が行われた画像データについて合成処理を行う画像合成部114を有している。   As described above, the image processing unit 106 includes the alignment unit 107 that performs alignment of image data obtained as a result of a plurality of shootings, and combines the image data that has undergone the alignment process by the alignment unit 107. An image composition unit 114 that performs processing is included.

画像合成部114の出力(合成画像データ)は画像表示部115および画像記録部116に与えられる。画像表示部115は合成画像データに応じた画像を、例えば、撮像装置が備える液晶モニタに表示する。また、画像記録部116は、合成画像データを記録媒体(図示せず)に記録する。   The output (synthesized image data) of the image composition unit 114 is given to the image display unit 115 and the image recording unit 116. The image display unit 115 displays an image corresponding to the composite image data, for example, on a liquid crystal monitor provided in the imaging apparatus. The image recording unit 116 records the composite image data on a recording medium (not shown).

ここで、図1に示す撮像部101、ストロボ発光制御部102、および露出条件制御部103について説明する。   Here, the imaging unit 101, the strobe light emission control unit 102, and the exposure condition control unit 103 illustrated in FIG. 1 will be described.

図2は、図1に示す撮像部101、ストロボ発光制御部102、および露出条件制御部103の動作を説明するための図である。   FIG. 2 is a diagram for explaining operations of the imaging unit 101, the strobe light emission control unit 102, and the exposure condition control unit 103 shown in FIG.

ここでは、撮影回数を5回として、1回目にストロボ発光を伴った撮影を行う。そして、2回目以降についてストロボを発光させずに撮影を行うものとする。なお、以下の説明では、1回目の撮影で得られた撮影画像を発光画像0と呼び、2回目以降の撮影で得られた撮影画像を非発光画像1〜4と呼ぶ。また、非発光画像1〜4をまとめて非発光画像群と呼ぶ。   Here, the number of times of shooting is five, and shooting with strobe emission is performed for the first time. It is assumed that shooting is performed without firing the strobe for the second and subsequent times. In the following description, a photographed image obtained by the first photographing is referred to as a light emitting image 0, and photographed images obtained by the second and subsequent photographing are referred to as non-light emitting images 1 to 4. The non-light emitting images 1 to 4 are collectively referred to as a non-light emitting image group.

さらに、図2においては、発光画像0の撮影感度をSONとした場合に、非発光画像群の撮影感度SOFFは、SOFF=2×SONに設定される。このように、撮影感度の設定を行うのは、後の処理において非発光画像群を加算平均することを考慮して、加算平均後の非発光画像と発光画像0との人物(被写体)のノイズレベルを合わせるためである。   Further, in FIG. 2, when the shooting sensitivity of the luminescent image 0 is set to SON, the shooting sensitivity SOFF of the non-luminescent image group is set to SOFF = 2 × SON. In this way, the shooting sensitivity is set in consideration of the averaging of the non-light emitting image group in the subsequent processing in consideration of the noise of the person (subject) of the non-light emitting image after the averaging and the light emitting image 0. This is to match the level.

なお、発光画像0および非発光画像群を撮影する際のシャッター速度は異なり、発光画像0においてはシャッター速度はTONとされ、非発光画像群においてはシャッター速度はTOFFとされる。 Incidentally, unlike the shutter speed when capturing a luminescence image 0 and non-emission image group, the shutter speed in luminescent image 0 is a T ON, the shutter speed in the non-emission image group is set to T OFF.

また、発光画像0および非発光画像群を撮影する際のシ絞り値は異なり、発光画像0においては絞り値はAONとされ、非発光画像群においては絞り値はAOFFとされる。 Further, the aperture value at the time of shooting the light emitting image 0 and the non-light emitting image group is different, the aperture value is A ON in the light emitting image 0, and the aperture value is A OFF in the non-light emitting image group.

一般に、N(Nは2以上の整数)枚の画像を加算平均する場合、加算平均後の画像のノイズレベルは(1/√N)倍になる。ここでは、非発光画像を4枚加算平均するので、加算平均後の画像のノイズレベルは(1/2)倍となる。   In general, when N (N is an integer of 2 or more) images are averaged, the noise level of the image after the averaging is (1 / √N) times. Here, since four non-light-emitting images are added and averaged, the noise level of the image after the averaging is (1/2) times.

再び図1を参照して、位置合わせ部107は、メモリ部108、ストロボ照射領域算出部109、非発光画像変換係数群算出部110、発光画像変換係数算出部111、位置合わせ変換係数算出部112、および画像変形部113を有している。   Referring to FIG. 1 again, the alignment unit 107 includes a memory unit 108, a strobe irradiation area calculation unit 109, a non-light emission image conversion coefficient group calculation unit 110, a light emission image conversion coefficient calculation unit 111, and an alignment conversion coefficient calculation unit 112. And an image deformation unit 113.

メモリ部108は、信号処理部105によって所定の信号処理が施された画像データ(つまり、発光画像および非発光画像群)を一時的に記憶する。ストロボ照射領域算出部109は位置合わせに処理を行う前に、メモリ部108に記憶された画像データについてストロボが照射されている領域(照射領域)と照射されていない領域(非照射領域)とを判別する。   The memory unit 108 temporarily stores image data (that is, a light emitting image and a non-light emitting image group) subjected to predetermined signal processing by the signal processing unit 105. The strobe irradiation area calculation unit 109 calculates a region irradiated with a strobe (irradiation region) and a region not irradiated (non-irradiation region) for the image data stored in the memory unit 108 before performing processing for alignment. Determine.

図3は、図1に示すストロボ照射領域算出部109における処理を説明するためのフローチャートである。   FIG. 3 is a flowchart for explaining processing in the strobe irradiation area calculation unit 109 shown in FIG.

照射領域判別処理を開始すると、ストロボ照射領域算出部109はメモリ部108から発光画像0および非発光画像1を入力して、これら2画像における輝度レベルを調整する(ステップS301)。   When the irradiation area determination process is started, the strobe irradiation area calculation unit 109 inputs the light emission image 0 and the non-light emission image 1 from the memory unit 108, and adjusts the luminance level in these two images (step S301).

輝度レベル調整の際には、例えば、発光画像0と非発光画像1の露出条件(絞り値(Av),シャッター速度(Tv),撮影感度(Sv))を比較する。そして、露出差が存在すると、ストロボ照射領域算出部109は相対的に暗い画像に対して露出差を補正するゲインをかけて、2画像における輝度レベルを揃える。   When adjusting the brightness level, for example, the exposure conditions (aperture value (Av), shutter speed (Tv), photographing sensitivity (Sv)) of the light-emitting image 0 and the non-light-emitting image 1 are compared. If there is an exposure difference, the strobe irradiation area calculation unit 109 applies a gain for correcting the exposure difference to a relatively dark image to align the luminance levels in the two images.

このような処理を行うによって、後述するストロボ照射の判定を輝度差を用いて行う場合に、露出差による輝度レベルの相違による影響を排除することができる。   By performing such processing, it is possible to eliminate the influence of the difference in the brightness level due to the exposure difference when the strobe irradiation determination described later is performed using the brightness difference.

続いて、ストロボ照射領域算出部109は2画像を複数のブロック(小ブロック)に分割して、各画像において小ブロックにおける輝度を積分して輝度積分値を求める(ステップS302)。そして、ストロボ照射領域算出部109は2画像間における輝度積分値の差(輝度差分値)を求める(ステップS303)。   Subsequently, the strobe irradiation area calculation unit 109 divides the two images into a plurality of blocks (small blocks) and integrates the luminance in the small blocks in each image to obtain a luminance integrated value (step S302). Then, the strobe irradiation area calculation unit 109 obtains a difference in luminance integrated value (luminance difference value) between the two images (step S303).

次に、ストロボ照射領域算出部109は輝度差分値の絶対値と所定の第1の閾値(閾値1)と比較して、絶対値>閾値1であるか否かを判定する(ステップS304)。絶対値が第1の閾値以下(絶対値≦閾値1)であると(ステップS304において、NO)、ストロボ照射領域算出部109は当該小ブロック(絶対値≦閾値1である小ブロック)についてストロボ影響度を算出する(ステップS305)。   Next, the strobe irradiation area calculation unit 109 compares the absolute value of the luminance difference value with a predetermined first threshold value (threshold value 1) and determines whether absolute value> threshold value 1 is satisfied (step S304). When the absolute value is equal to or smaller than the first threshold value (absolute value ≦ threshold value 1) (NO in step S304), the strobe irradiation area calculation unit 109 affects the strobe for the small block (small block with absolute value ≦ threshold value 1). The degree is calculated (step S305).

ここで、ストロボ影響度Eは、上記の絶対値をSZ、非発光画像1の輝度積分値をSSとした際、次の式(1)で表される。   Here, the strobe influence E is expressed by the following equation (1), where SZ is the absolute value and SS is the integrated luminance value of the non-light-emitting image 1.

E=SZ/SS (1)
続いて、ストロボ照射領域算出部109は、ストロボ影響度(発光影響度)と所定の第2の閾値(閾値2)と比較して、ストロボ影響度>閾値2であるか否かを判定する(ステップS306)。ストロボ影響度≦閾値2であると(ステップS306において、NO)、ストロボ照射領域算出部109は当該小ブロックにはストロボが照射されておらず、輝度の変化が生じなかった小ブロックとみして、ストロボ非照射ブロックとする(ステップS307)。
E = SZ / SS (1)
Subsequently, the strobe irradiation area calculation unit 109 determines whether or not strobe influence degree> threshold value 2 by comparing the strobe influence degree (light emission influence degree) with a predetermined second threshold value (threshold value 2) ( Step S306). When the stroboscopic influence degree ≦ threshold 2 (NO in step S306), the stroboscopic irradiation area calculation unit 109 regards the small block as being a small block in which no stroboscope has been irradiated and no change in luminance has occurred. A strobe non-irradiation block is set (step S307).

一方、絶対値>閾値1であると(ステップS304において、YES)、ストロボ照射領域算出部109は当該小ブロックではストロボの照射によって輝度が大きく変化したとみなして、該当小ブロックをストロボ照射ブロックとする(ステップS308)。   On the other hand, if absolute value> threshold value 1 (YES in step S304), the strobe irradiation area calculation unit 109 regards that the small block has changed in brightness due to the strobe irradiation, and determines that the small block is a strobe irradiation block. (Step S308).

同様に、ストロボ影響度>閾値2であると(ステップS306において、YES)、ストロボ照射領域算出部109は輝度差分値の絶対値は大きくないものの、当該小ブロックをストロボの照射によって非発光時と比較して輝度が大きくなったブロックとみなす。そして、ストロボ照射領域算出部109はステップS308の処理に進んで、該当小ブロックをストロボ照射ブロックとする。   Similarly, if the stroboscopic influence degree> threshold value 2 (YES in step S306), the stroboscopic irradiation area calculation unit 109 determines that the small block is not illuminated by the stroboscopic irradiation although the absolute value of the luminance difference value is not large. It is regarded as a block whose luminance is increased in comparison. Then, the flash irradiation area calculation unit 109 proceeds to the process of step S308 and sets the corresponding small block as a flash irradiation block.

続いて、ステップS307又はS308の処理に続いて、ストロボ照射領域算出部109は、全ての小ブロックについてストロボ照射又は非照射の判別処理を行ったか否かを判定する(ステップS309)。そして、全ての小ブロックについて判別処理が終了していないと(ステップS309において、NO)、ストロボ照射領域算出部109はステップS304の処理に戻って次の小ブロックについて判別処理を行う。   Subsequently, following the processing in step S307 or S308, the strobe irradiation area calculation unit 109 determines whether or not strobe irradiation or non-irradiation determination processing has been performed for all small blocks (step S309). If the determination process has not been completed for all the small blocks (NO in step S309), the strobe irradiation area calculation unit 109 returns to the process of step S304 and performs the determination process for the next small block.

全ての小ブロックについて判別処理が終了すると(ステップS309において、YES)、ストロボ照射領域算出部109はストロボ照射ブロックの集合をストロボ照射領域とするとともに、ストロボ非照射ブロックの集合をストロボ非照射領域とする。そして、ストロボ照射領域算出部109は照射領域判別処理を終了する。   When the discrimination processing is completed for all the small blocks (YES in step S309), the strobe irradiation area calculation unit 109 sets the set of strobe irradiation blocks as the strobe irradiation area and sets the set of non-strobe irradiation blocks as the strobe non-irradiation area. To do. Then, the strobe irradiation area calculation unit 109 ends the irradiation area determination process.

図4は、図1に示す非発光画像変換係数算出部110で行われる処理を説明するためのフローチャートである。   FIG. 4 is a flowchart for explaining processing performed by the non-light emitting image conversion coefficient calculation unit 110 shown in FIG.

非発光画像変換係数算出部110は、非発光画像群の間における位置ズレを検出して、位置合わせのための非発光画像変換係数(射影変換係数:第1の位置合わせ変換係数)を算出する。   The non-light emission image conversion coefficient calculation unit 110 detects a positional deviation between the non-light emission image groups, and calculates a non-light emission image conversion coefficient (projection conversion coefficient: first alignment conversion coefficient) for alignment. .

まず、非発光画像変換係数算出部110は、ストロボ照射領域算出部109を介してメモリ部108から非発光画像群を読み込む。そして、非発光画像変換係数算出部110は非発光画像群から変換係数算出のための基準画像(基準非発光画像)を設定する。ここでは、非発光画像1を基準画像(基準非発光画像)として設定するものとする。   First, the non-light emission image conversion coefficient calculation unit 110 reads a non-light emission image group from the memory unit 108 via the strobe irradiation area calculation unit 109. Then, the non-light emission image conversion coefficient calculation unit 110 sets a reference image (reference non-light emission image) for conversion coefficient calculation from the non-light emission image group. Here, it is assumed that the non-light-emitting image 1 is set as a reference image (reference non-light-emitting image).

さらに、非発光画像変換係数算出部110は非発光画像群から基準画像以外の画像を比較画像として選択する(ステップS401)。ここでは、非発光画像2〜4を比較画像として選択するものとする。   Further, the non-light emission image conversion coefficient calculation unit 110 selects an image other than the reference image from the non-light emission image group as a comparison image (step S401). Here, the non-light-emitting images 2 to 4 are selected as comparison images.

次に、非発光画像変換係数算出部110は基準画像と比較画像との間の位置ズレを算出する。例えば、ストロボ照射領域算出部109による分割の結果得られた小ブロック毎に、非発光画像変換係数算出部110は基準画像と比較画像の間で動きベクトルを検出する(ステップS402)。   Next, the non-light emission image conversion coefficient calculation unit 110 calculates a positional deviation between the reference image and the comparison image. For example, for each small block obtained as a result of the division by the strobe irradiation area calculation unit 109, the non-light emission image conversion coefficient calculation unit 110 detects a motion vector between the reference image and the comparison image (step S402).

動きベクトルを検出する際には、例えば、差分絶対値の和を評価値とするパターンマッチング処理が用いられる。   When detecting a motion vector, for example, a pattern matching process using the sum of absolute differences as an evaluation value is used.

ところで、最終的に合成画像を行う際には、非発光画像からはストロボが照射されていない背景部分が得られる。このため、非発光画像同士の位置合わせを行うための変換係数は、ストロボ非照射領域で検出された動きベクトルに応じて算出することが望ましい。   By the way, when a composite image is finally performed, a background portion that is not irradiated with a strobe is obtained from the non-light-emitting image. For this reason, it is desirable to calculate the conversion coefficient for aligning the non-light emitting images according to the motion vector detected in the strobe non-irradiation region.

さらに、ストロボ照射領域、つまり、ストロボが照射されている主要被写体領域の動きがストロボ非照射領域と同様の動きを表す場合、ストロボ照射領域の動きベクトルも用いて変換係数を算出すれば、位置合わせの精度が向上する。   Furthermore, if the movement of the strobe illumination area, that is, the movement of the main subject area where the strobe is illuminated represents the same movement as the strobe non-irradiation area, the alignment can be achieved by calculating the conversion coefficient using the motion vector of the strobe illumination area. Improves accuracy.

ところが、特に、主要被写体が人物であり、さらには、人物と背景との距離の差が大きいと、人物の動きおよび距離差の影響などに起因してストロボ照射領域およびストロボ非照射領域の示す動きが異なることがある。このような場合には、ストロボ照射領域の動きベクトルを用いて変換係数を算出すると、背景部分の位置合わせ精度が低下する恐れがある。   However, in particular, when the main subject is a person and the difference in distance between the person and the background is large, the movement indicated by the flash irradiation area and the non-flash area due to the movement of the person and the influence of the distance difference, etc. May be different. In such a case, if the conversion coefficient is calculated using the motion vector of the strobe irradiation area, the alignment accuracy of the background portion may be lowered.

従って、図示の例では、ストロボ非照射領域のみから算出した変換係数Hと、ストロボ照射領域およびストロボ非照射領域、つまり、画像全体から算出した変換係数H’のうち背景部分の動きをより精度よく表している変換係数とを用いる。   Accordingly, in the illustrated example, the movement of the background portion of the conversion coefficient H calculated from only the strobe non-irradiation area and the strobe irradiation area and the strobe non-irradiation area, that is, the conversion coefficient H ′ calculated from the entire image, is more accurately determined. The conversion coefficient shown is used.

図5は、図4に示す変換係数の算出を説明するための図である。   FIG. 5 is a diagram for explaining the calculation of the conversion coefficient shown in FIG.

図4および図5を参照して、前述のようにして動きベクトルを検出した後、非発光画像変換係数算出部110はストロボ非照射領域に属する小ブロックにおいて検出された複数の動きベクトルに応じて、画像の位置ズレを表す変換係数H(第1の変換係数)を算出する(ステップS403)。ここでは、複数の動きベクトルから変換係数Hを算出する手法として、最小二乗法が用いられる。   4 and 5, after detecting a motion vector as described above, the non-light emission image conversion coefficient calculation unit 110 responds to the plurality of motion vectors detected in the small blocks belonging to the strobe non-irradiation region. Then, a conversion coefficient H (first conversion coefficient) representing the positional deviation of the image is calculated (step S403). Here, the least square method is used as a method of calculating the conversion coefficient H from a plurality of motion vectors.

続いて、非発光画像変換係数算出部110は、画像全体において検出された複数の動きベクトルに応じて変換係数H’(第2の変換係数)を算出する(ステップS404)。   Subsequently, the non-luminous image conversion coefficient calculation unit 110 calculates a conversion coefficient H ′ (second conversion coefficient) according to a plurality of motion vectors detected in the entire image (step S404).

次に、非発光画像変換係数算出部110は変換係数HおよびH’の評価を行う。まず、非発光画像変換係数算出部110は変換係数HおよびH’を用いてストロボ非照射領域に属する小ブロックの着目点の座標を変換する(ステップS405)。ここで、着目点とは、小ブロックの各々においてその中央の点を表す。   Next, the non-luminous image conversion coefficient calculation unit 110 evaluates the conversion coefficients H and H ′. First, the non-light emitting image conversion coefficient calculation unit 110 converts the coordinates of the point of interest of the small block belonging to the strobe non-irradiation region using the conversion coefficients H and H ′ (step S405). Here, the point of interest represents a central point in each of the small blocks.

図5に示すように、非発光画像はストロボ照射領域501およびストロボ非照射領域502を有している。そして、1つの小ブロックにおいて検出された動きベクトル503についてステップS405の処理を行うと、着目点506を始点として、座標変換後の着目点507を終点とする動きベクトル504および505が生成される。   As shown in FIG. 5, the non-light-emitting image has a strobe irradiation area 501 and a strobe non-irradiation area 502. Then, when the process of step S405 is performed on the motion vector 503 detected in one small block, motion vectors 504 and 505 are generated with the point of interest 506 as the starting point and the point of interest 507 after coordinate conversion as the end point.

なお、動きベクトル504は変換係数Hを用いて得られた動きベクトルであり、動きベクトル505は変換係数H’を用いて得られた動きベクトルである。   The motion vector 504 is a motion vector obtained using the conversion coefficient H, and the motion vector 505 is a motion vector obtained using the conversion coefficient H ′.

次に、非発光画像変換係数算出部110は小ブロックにおいて動きベクトル503と、変換係数HおよびH’を用いて生成された動きベクトル504および505との誤差ErrHおよびErrH’を算出する(ステップS406)。ここで、誤差ErrHおよびErrH’は動きベクトルが示す終点座標間の距離を示す。   Next, the non-light emitting image conversion coefficient calculation unit 110 calculates errors ErrH and ErrH ′ between the motion vector 503 and the motion vectors 504 and 505 generated using the conversion coefficients H and H ′ in the small block (step S406). ). Here, errors ErrH and ErrH 'indicate the distance between the end point coordinates indicated by the motion vector.

続いて、非発光画像変換係数算出部110はストロボ非照射領域に属する全ての小ブロックについてそれぞれ誤差ErrHおよびErrH’の総和を求める(ステップS407)。そして、非発光画像変換係数算出部110は誤差ErrHおよびErrH’の総和をそれぞれ総和ΣErrHおよびΣErrH’とする。   Subsequently, the non-emission image conversion coefficient calculation unit 110 calculates the sum of the errors ErrH and ErrH ′ for all the small blocks belonging to the strobe non-irradiation region (step S407). Then, the non-light emitting image conversion coefficient calculation unit 110 sets the sums of the errors ErrH and ErrH ′ as sums ΣErrH and ΣErrH ′, respectively.

さらに、非発光画像変換係数算出部110は総和ΣErrHおよびΣErrH’の大きさを比較して、総和ΣErrH>ΣErrH’であるか否かを判定する(ステップS408)。誤差の値が小さい程、変換係数の精度が高いと考えられるので、総和ΣErrH≦総和ΣErrH’であると(ステップS408において、NO)、非発光画像変換係数算出部110は変換係数Hを使用すると決定する(ステップS409)。   Further, the non-light emission image conversion coefficient calculation unit 110 compares the magnitudes of the sums ΣErrH and ΣErrH ′ to determine whether or not the sum ΣErrH> ΣErrH ′ (step S408). The smaller the error value, the higher the accuracy of the conversion coefficient. Therefore, if the sum ΣErrH ≦ the sum ΣErrH ′ (NO in step S408), the non-light emitting image conversion coefficient calculation unit 110 uses the conversion coefficient H. Determine (step S409).

続いて、非発光画像変換係数算出部110は全ての比較画像について変換係数を算出したか否かを判定する(ステップS410)。全ての比較画像について変換係数の算出を終了すると(ステップS410において、YES)、非発光画像変換係数算出部110は射影変換係数算出処理を終了する。   Subsequently, the non-luminous image conversion coefficient calculation unit 110 determines whether or not conversion coefficients have been calculated for all the comparative images (step S410). When the calculation of conversion coefficients for all the comparative images is completed (YES in step S410), the non-luminous image conversion coefficient calculation unit 110 ends the projective conversion coefficient calculation process.

一方、全ての比較画像について変換係数の算出を終了していない(ステップS410において、YES)、非発光画像変換係数算出部110はステップS402の処理に戻って、次の比較画像について変換係数の算出を行う。   On the other hand, calculation of conversion coefficients for all comparison images has not been completed (YES in step S410), the non-light emission image conversion coefficient calculation unit 110 returns to the process of step S402 and calculates conversion coefficients for the next comparison image. I do.

総和ΣErrH>総和ΣErrH’であると(ステップS408において、YES)、非発光画像変換係数算出部110は変換係数H’を使用すると決定する(ステップS411S409)。そして、非発光画像変換係数算出部110はステップS410の処理に進む。   If total ΣErrH> total ΣErrH ′ (YES in step S408), non-luminous image conversion coefficient calculation unit 110 determines to use conversion coefficient H ′ (step S411S409). Then, the non-light emitting image conversion coefficient calculation unit 110 proceeds to the process of step S410.

このようにして、非発光画像変換係数算出部110は基準画像と比較画像間との位置ズレを示す変換係数を確定する。なお、以下の説明では、非発光画像1(基準画像)に対する非発光画像2〜4(比較画像)の変換係数をそれぞれH12、H13、およびH14とする。   In this way, the non-light emission image conversion coefficient calculation unit 110 determines the conversion coefficient indicating the positional deviation between the reference image and the comparison image. In the following description, the conversion coefficients of the non-light emitting images 2 to 4 (comparison image) with respect to the non-light emitting image 1 (reference image) are H12, H13, and H14, respectively.

発光画像変換係数算出部111は、発光画像について、非発光画像変換係数算出部110において基準画像とした特定の非発光画像との位置ズレを表す変換係数(射影変換係数)を算出する。ここでは、発光画像0と基準画像である非発光画像1との変換係数を算出する。   The light emission image conversion coefficient calculation unit 111 calculates a conversion coefficient (projection conversion coefficient) representing a positional deviation of the light emission image from a specific non-light emission image that is the reference image in the non-light emission image conversion coefficient calculation unit 110. Here, a conversion coefficient between the light emission image 0 and the non-light emission image 1 which is the reference image is calculated.

合成画像の合成を行う際には、発光画像からはストロボが照射されている被写体像のみが得られる。このため、発光画像と非発光画像との位置合わせを行う際には、ストロボ照射領域で検出された動きベクトルから変換係数を算出することが望ましい。   When the synthesized image is synthesized, only the subject image irradiated with the strobe is obtained from the light emission image. For this reason, when performing alignment between the light emitting image and the non-light emitting image, it is desirable to calculate the conversion coefficient from the motion vector detected in the strobe irradiation region.

ところが、ストロボが照射された被写体像は、非発光画像においては光量不足のため黒く潰れてしまい、動きベクトルの検出が困難なことがある。従って、非発光画像におけるストロボ照射領域の輝度を検出して、当該輝度値が所定の輝度値(閾値レベル)よりも大きい場合には、ストロボ照射領域で変換係数の算出を行う。一方、輝度値が所定の閾値レベル以下である場合には、ストロボ非照射領域で変換係数の算出を行う。   However, the subject image irradiated with the strobe is crushed black due to insufficient light in the non-light emitting image, and it may be difficult to detect the motion vector. Accordingly, the brightness of the strobe irradiation area in the non-light-emitting image is detected, and when the brightness value is larger than a predetermined brightness value (threshold level), the conversion coefficient is calculated in the strobe irradiation area. On the other hand, when the luminance value is equal to or lower than a predetermined threshold level, the conversion coefficient is calculated in the strobe non-irradiation region.

図6は、図1に示す発光画像変換係数算出部111で行われる処理を説明するためのフローチャートである。   FIG. 6 is a flowchart for explaining processing performed by the light emission image conversion coefficient calculation unit 111 shown in FIG.

発光画像変換係数算出処理を開始すると、まず、発光画像変換係数算出部111は非発光画像においてストロボ照射領域の平均輝度値を算出する(ステップS601)。次に、発光画像変換係数算出部111は平均輝度値を所定の閾値と比較して、平均輝度値>所定の閾値(輝度閾値)であるか否かを判定する(ステップS602)。   When the light emission image conversion coefficient calculation process is started, first, the light emission image conversion coefficient calculation unit 111 calculates the average luminance value of the strobe irradiation area in the non-light emission image (step S601). Next, the light emission image conversion coefficient calculation unit 111 compares the average luminance value with a predetermined threshold value, and determines whether or not the average luminance value> the predetermined threshold value (luminance threshold value) (step S602).

平均輝度値>所定の閾値であると(ステップS602において、YES)、発光画像変換係数算出部111は非発光画像においてストロボ照射領域に黒潰れが生じていないと判断して、ストロボ照射領域で変換係数を算出する。   If average luminance value> predetermined threshold value (YES in step S602), the light emission image conversion coefficient calculation unit 111 determines that there is no black crushing in the strobe irradiation area in the non-light emission image, and converts in the strobe irradiation area. Calculate the coefficient.

この際、発光画像変換係数算出部111は、まずストロボ照射領域の輝度レベルを調整する(ステップS603)。例えば、発光画像変換係数算出部111は、発光画像および非発光画像においてストロボ照射領域の小ブロック毎に平均輝度を求める。   At this time, the light emission image conversion coefficient calculation unit 111 first adjusts the luminance level of the strobe irradiation area (step S603). For example, the light emission image conversion coefficient calculation unit 111 obtains an average luminance for each small block of the strobe irradiation area in the light emission image and the non-light emission image.

そして、発光画像変換係数算出部111は、発光画像および非発光画像における平均輝度値が互いに等しくなるようにゲインをかける。これによって、発光画像および非発光画像において小ブロック同士の輝度レベルが等しくなる。   Then, the light emission image conversion coefficient calculation unit 111 applies a gain so that the average luminance values in the light emission image and the non-light emission image are equal to each other. As a result, the luminance levels of the small blocks are equal in the light emitting image and the non-light emitting image.

続いて、発光画像変換係数算出部111は、ストロボ照射領域において小ブロック毎に発光画像および非発光画象の動きベクトルを検出する(ステップS604)。そして、発光画像変換係数算出部111は、検出した動きベクトルに応じて変換係数(発光画像変換係数)を求めて、発光画像変換係数算出処理を終了する。   Subsequently, the light emission image conversion coefficient calculation unit 111 detects the motion vectors of the light emission image and the non-light emission image for each small block in the strobe irradiation region (step S604). Then, the light emission image conversion coefficient calculation unit 111 obtains a conversion coefficient (light emission image conversion coefficient) according to the detected motion vector, and ends the light emission image conversion coefficient calculation process.

なお、ステップS604における動きベクトルの検出およびステップS605における変換係数の算出は、図4で説明した非発光画像変換係数算出部110と同様の処理で行われる。   Note that the detection of the motion vector in step S604 and the calculation of the conversion coefficient in step S605 are performed by the same process as the non-light emitting image conversion coefficient calculation unit 110 described in FIG.

一方、平均輝度値が所定の輝度閾値以下(平均輝度値≦輝度閾値)であると(ステップS602において、NO)、発光画像変換係数算出部111は非発光画像においてストロボ照射領域に黒潰れが生じている判断して、ストロボ非照射領域で変換係数を算出する。   On the other hand, when the average luminance value is equal to or less than the predetermined luminance threshold (average luminance value ≦ luminance threshold) (NO in step S602), the light emission image conversion coefficient calculation unit 111 causes black crushing in the strobe irradiation area in the non-light emission image. Therefore, the conversion coefficient is calculated in the non-flash area.

この場合、発光画像変換係数算出部111は、まずストロボ非照射領域の輝度レベルを調整する(ステップS606)。ここでは、ステップS603と同様に平均輝度値を用いて輝度レベルを調整してもよいが、ストロボ非照射領域はストロボの影響を受けていないので、図3で説明したステップS301と同様にして、露出条件を比較してゲイン調整を行うようにしてもよい。   In this case, the light emission image conversion coefficient calculation unit 111 first adjusts the luminance level of the strobe non-irradiation area (step S606). Here, the luminance level may be adjusted using the average luminance value in the same manner as in step S603. However, since the non-stroboscopic area is not affected by the strobe, similarly to step S301 described in FIG. Gain adjustment may be performed by comparing exposure conditions.

続いて、発光画像変換係数算出部111は、ストロボ非照射領域において小ブロック毎に発光画像および非発光画象の動きベクトルを検出する(ステップS607)。その後、発光画像変換係数算出部111はステップS605の処理を行う。   Subsequently, the light emission image conversion coefficient calculation unit 111 detects a motion vector of the light emission image and the non-light emission image for each small block in the strobe non-irradiation region (step S607). Thereafter, the light emission image conversion coefficient calculation unit 111 performs the process of step S605.

なお、ステップS607における動きベクトルの検出は図4で説明した非発光画像変換係数算出部110と同様の処理で行われる。また、以下の説明では、発光画像0に対する非発光画像1の変換係数をH01とする。   In addition, the detection of the motion vector in step S607 is performed by the same processing as the non-light emitting image conversion coefficient calculation unit 110 described in FIG. In the following description, the conversion coefficient of the non-light-emitting image 1 with respect to the light-emitting image 0 is H01.

このようにして、発光画像変換係数算出部111は発光画像と非発光画像群のうち基準画像との位置ズレを示す変換係数(第2の位置合わせ変換係数)を算出する。   In this way, the light emission image conversion coefficient calculation unit 111 calculates a conversion coefficient (second alignment conversion coefficient) indicating the positional deviation between the light emission image and the non-light emission image group and the reference image.

前述の図2に示すように、ここでは、撮影順において発光画像0が最初に撮影されている。最終の合成画像においてその画角はなるべくユーザーがシャッターを切ったタイミングの画角となることが望ましい。   As shown in FIG. 2 described above, here, the luminescent image 0 is first taken in the shooting order. In the final composite image, it is desirable that the angle of view is as much as possible when the user releases the shutter.

よって、位置合わせのために画像を変形する際の基準画像として発光画像0を用いることが望ましい。   Therefore, it is desirable to use the light emission image 0 as a reference image when the image is deformed for alignment.

ところが、図示の例では、発光画像0および非発光画像2〜4の位置ズレを表す変換係数(H02,H03,H04)は算出されていない。また、非発光画像同士でまず位置合わせを行って、その後に基準とした非発光画像と発光画像との位置合わせを行う場合、位置合わせのために非発光画像の座標変換が2回行われることになる。   However, in the illustrated example, conversion coefficients (H02, H03, H04) representing the positional deviation between the light emitting image 0 and the non-light emitting images 2 to 4 are not calculated. In addition, when first aligning non-light emitting images and then aligning the reference non-light emitting image and the light emitting image, coordinate conversion of the non-light emitting image is performed twice for alignment. become.

一般に、変換係数を用いた画像の変形においては、入出力の座標値がともに整数精度とはならないので、補間処理によって画素値を生成する必要がある。このため、画像の高周波成分が失われるという問題がある。   In general, when transforming an image using a transform coefficient, both input and output coordinate values do not have integer precision, so it is necessary to generate pixel values by interpolation processing. For this reason, there is a problem that high-frequency components of the image are lost.

従って、位置合わせ変換係数算出部112では、発光画像変換係数算出部111までの処理で算出された変換係数(以下座標変換係数とも呼ぶ)H12、H13,H14、およびH01から、発光画像0と非発光画像2〜4の位置ズレを表す変換係数(H02,H03,H04)を算出する。そして、変換係数H01、H02、H03、およびH04を用いて、画像変形部113は発光画像0に対して全ての非発光画像を変形した後、位置合わせを行う。   Therefore, the alignment conversion coefficient calculation unit 112 determines that the emission image 0 and the non-emission image 0 from the conversion coefficients (hereinafter also referred to as coordinate conversion coefficients) H12, H13, H14, and H01 calculated by the processing up to the emission image conversion coefficient calculation unit 111. Conversion coefficients (H02, H03, H04) representing the positional deviation of the light emission images 2 to 4 are calculated. Then, using the conversion coefficients H01, H02, H03, and H04, the image deforming unit 113 performs alignment after deforming all the non-light-emitting images with respect to the light-emitting image 0.

図7は、図1に示す位置合わせ変換係数算出部112による変換係数(射影変換係数)の算出を説明するための図である。   FIG. 7 is a diagram for explaining calculation of a conversion coefficient (projection conversion coefficient) by the alignment conversion coefficient calculation unit 112 shown in FIG.

また、図8は、図1に示す位置合わせ変換係数算出部112による画像変換係数の変換を説明するための図である。   FIG. 8 is a diagram for explaining conversion of image conversion coefficients by the alignment conversion coefficient calculation unit 112 shown in FIG.

まず、図7を参照して、発光画素0および非発光画素1の変換係数H01と非発光画像1および非発光画像2の変換係数H12とから、発光画像0と非発光画像2の変換係数H02を算出する場合について説明する。   First, referring to FIG. 7, from the conversion coefficient H01 of the light-emitting pixel 0 and the non-light-emitting pixel 1 and the conversion coefficient H12 of the non-light-emitting image 1 and the non-light-emitting image 2, the conversion coefficient H02 of the light-emitting image 0 and the non-light-emitting image 2 is obtained. The case of calculating will be described.

なお、同様にして、発光画素0および非発光画素2の変換係数H02と非発光画像2および非発光画像3の変換係数H23とから、発光画像0と非発光画像3の変換係数H03が求められ、発光画素0および非発光画素3の変換係数H03と非発光画像3および非発光画像4の変換係数H34とから、発光画像0と非発光画像4の変換係数H04が求められる。   Similarly, the conversion coefficient H03 of the luminescent image 0 and the non-luminescent image 3 is obtained from the conversion coefficient H02 of the luminescent pixel 0 and non-luminescent pixel 2 and the conversion coefficient H23 of the non-luminescent image 2 and non-luminescent image 3. The conversion coefficient H04 of the luminescent image 0 and the non-luminescent image 4 is obtained from the conversion coefficient H03 of the luminescent pixel 0 and non-luminescent pixel 3 and the conversion coefficient H34 of the non-luminescent image 3 and non-luminescent image 4.

いま、発光画像0の座標値を(x0,y0)、非発光画像1の座標値を(x1,y1)、そして、非発光画像2の座標値を(x2,y2)とする。また、変換係数H01およびH12はそれぞれ次の式(2)および(3)で示されるものする。   Now, assume that the coordinate value of the light-emitting image 0 is (x0, y0), the coordinate value of the non-light-emitting image 1 is (x1, y1), and the coordinate value of the non-light-emitting image 2 is (x2, y2). Also, the conversion coefficients H01 and H12 are represented by the following equations (2) and (3), respectively.

従って、斜影変換の際に用いられる式は次の式(4)〜式(7)で表される。 Therefore, the formulas used in the oblique conversion are expressed by the following formulas (4) to (7).

式(4)および式(5)の(x1,y1)にそれぞれ式(6)および式(7)を代入すると、それぞれ式(8)および式(9)が得られる。 By substituting Equation (6) and Equation (7) into (x1, y1) of Equation (4) and Equation (5), respectively, Equation (8) and Equation (9) are obtained.

なお、係数a02、b02、c02、d02、e02、f02、g02、およびh02は、式(4)および式(5)の(x1,y1)にそれぞれ式(6)および式(7)を代入して整理した後の係数を表す。 The coefficients a02, b02, c02, d02, e02, f02, g02, and h02 are obtained by substituting the expressions (6) and (7) into (x1, y1) of the expressions (4) and (5), respectively. Represents the coefficient after organizing.

従って、発光画像0と非発光画像2の変換係数H02は式(10)で示すことができる。   Therefore, the conversion coefficient H02 of the luminescent image 0 and the non-luminescent image 2 can be expressed by Expression (10).

このようにして、図7に示すように、位置合わせ変換係数算出部112は、発光画素0および非発光画素1の変換係数H01と非発光画像1および非発光画像2の変換係数H12とを用いて、発光画像0と非発光画像2の変換係数H02を算出する。   In this way, as shown in FIG. 7, the alignment conversion coefficient calculation unit 112 uses the conversion coefficient H01 of the luminescent pixel 0 and the non-luminescent pixel 1 and the conversion coefficient H12 of the non-luminescent image 1 and the non-luminescent image 2. Thus, the conversion coefficient H02 of the luminescent image 0 and the non-luminescent image 2 is calculated.

同様の処理を繰り返して、図8に示すように、位置合わせ変換係数算出部112は、発光画素0および非発光画素2の変換係数H02と非発光画像2および非発光画像3の変換係数H23とに基づいて、発光画像0と非発光画像3の変換係数H03を求める。   By repeating the same processing, as shown in FIG. 8, the alignment conversion coefficient calculation unit 112 converts the conversion coefficient H02 of the light emitting pixel 0 and the non-light emitting pixel 2 and the conversion coefficient H23 of the non-light emitting image 2 and the non-light emitting image 3. Based on the above, the conversion coefficient H03 of the luminescent image 0 and the non-luminescent image 3 is obtained.

また、位置合わせ変換係数算出部112は、発光画素0および非発光画素3の変換係数H03と非発光画像3および非発光画像4の変換係数H34とから、発光画像0と非発光画像4の変換係数H04を求める。   The alignment conversion coefficient calculation unit 112 converts the light emission image 0 and the non-light emission image 4 from the conversion coefficient H03 of the light emission pixel 0 and the non-light emission pixel 3 and the conversion coefficient H34 of the non-light emission image 3 and the non-light emission image 4. The coefficient H04 is obtained.

これら変換係数H01〜H04を用いて、画像変形部113は発光画像0に合わせて非発光画像1〜4を位置合わせする。そして、画像変形部113は発光画像0を基準として位置合わせ処理が行われた非発光画像1〜4を発光画像0とともに画像合成部114に出力する。   Using these conversion coefficients H01 to H04, the image transformation unit 113 aligns the non-light emitting images 1 to 4 with the light emitting image 0. Then, the image deformation unit 113 outputs the non-light-emitting images 1 to 4 subjected to the alignment processing with the light-emitting image 0 as a reference together with the light-emitting image 0 to the image composition unit 114.

画像合成部114には、位置合わせ部107で位置合わせ処理が行われた発光画像および非発光画像群が入力される。そして、画像合成部114は、後述するように、発光画像においてストロボが照射されている領域について発光画像の領域を出力し、ストロボが照射されていない領域には非発光画像の領域を出力する。さらに、画像合成部114は非発光画像が複数枚存在する場合には非発光画像を加算平均してノイズの低減を行う。   The image composition unit 114 receives the light emission image and the non-light emission image group subjected to the alignment processing by the alignment unit 107. Then, as will be described later, the image composition unit 114 outputs a region of the light emission image with respect to the region where the strobe is irradiated in the light emission image, and outputs a region of the non-light emission image to a region where the strobe is not irradiated. Further, when there are a plurality of non-light-emitting images, the image composition unit 114 performs averaging of the non-light-emitting images to reduce noise.

図9は、図1に示す画像合成部114で行われる処理を説明するためのフローチャートである。   FIG. 9 is a flowchart for explaining processing performed by the image composition unit 114 shown in FIG.

画像合成処理を開始すると、画像合成部114は、まず発光画像0および非発光画像1の輝度レベルを調整する(ステップS901)。ここでは、ストロボ照射領域算出部109における処理と同様に、画像合成部114は発光画像0と非発光画像1の露出条件を比較して、その比較結果に応じて輝度レベルが揃うようにゲイン調整を行う。   When the image composition process is started, the image composition unit 114 first adjusts the luminance levels of the light-emitting image 0 and the non-light-emitting image 1 (step S901). Here, similarly to the processing in the strobe irradiation area calculation unit 109, the image composition unit 114 compares the exposure conditions of the light emission image 0 and the non-light emission image 1, and adjusts the gain so that the luminance levels are aligned according to the comparison result. I do.

続いて、画像合成部114は輝度レベルの調整を行った発光画像0と非発光画像1との差分絶対値を算出する(ステップS902)。図示の例では、差分絶対値は画素単位で算出される。ここでは、背景の輝度レベルが揃っているので、差分絶対値の大きさはストロボが照射された領域では大きくなり、ストロボが照射されていない領域では小さくなる。   Subsequently, the image composition unit 114 calculates the absolute difference between the light-emitting image 0 and the non-light-emitting image 1 for which the luminance level has been adjusted (step S902). In the illustrated example, the absolute difference value is calculated in units of pixels. Here, since the luminance levels of the background are uniform, the absolute value of the difference is large in the region irradiated with the strobe and is small in the region not irradiated with the strobe.

同様にして、発光画像0と非発光画像2〜4について、ステップS901およびS902の処理が行われる。   Similarly, the processes in steps S901 and S902 are performed on the light emitting image 0 and the non-light emitting images 2 to 4.

一方、局所的なノイズの影響を受けて、ストロボの照射に関係なく差分絶対値が大きくなることが懸念されるので、差分絶対値を算出する前に画像をローパスフィルタ処理するようにしてもよい。   On the other hand, since there is a concern that the difference absolute value becomes large regardless of the strobe irradiation due to the influence of local noise, the image may be low-pass filtered before calculating the difference absolute value. .

次に、画像合成部114は差分絶対値に基づいて発光画像0および非発光画像1の画像合成比率を算出する。そして、画像合成部114は画像合成比率に応じて画素毎に画像の合成を行う(ステップS904)。   Next, the image composition unit 114 calculates the image composition ratio of the light emission image 0 and the non-light emission image 1 based on the absolute difference value. Then, the image composition unit 114 performs image composition for each pixel in accordance with the image composition ratio (step S904).

その後、画像合成部114は撮影の結果得られた画像の全てを合成したか否かを判定する(ステップS905)。画像の全てを合成していないと(ステップS905において、NO)、画像合成部114はステップS904の処理に戻る。   Thereafter, the image composition unit 114 determines whether or not all the images obtained as a result of photographing have been synthesized (step S905). If not all of the images have been combined (NO in step S905), the image combining unit 114 returns to the process of step S904.

一方、画像の全てを合成していないと(ステップS905において、NO)、画像合成部114は画像合成処理を終了する。なお、画像合成の際には、画像合成部114は発光画像と非発光画像群との合成を行うことになる。   On the other hand, if not all of the images have been combined (NO in step S905), the image combining unit 114 ends the image combining process. At the time of image composition, the image composition unit 114 performs composition of the light emission image and the non-light emission image group.

図10は、図1に示す画像合成部114で用いられる差分絶対値と画像合成比率との関係を示す図である。   FIG. 10 is a diagram showing the relationship between the absolute difference value and the image composition ratio used in the image composition unit 114 shown in FIG.

図10において、差分絶対値が小さい場合(閾値TH1以下であると)、発光画像合成比率は0、非発光画像合成比率は1となる。画像合成部114から出力される画像として非発光画像群が100%出力される。   In FIG. 10, when the difference absolute value is small (if it is equal to or less than the threshold value TH <b> 1), the emission image synthesis ratio is 0 and the non-emission image synthesis ratio is 1. A 100% non-luminous image group is output as an image output from the image composition unit 114.

差分絶対値が閾値TH1を超え閾値TH2未満であると、発光画像合成比率は線形的に逓減し、非発光画像群は線形的に逓増する。この結果、差分絶対値が閾値TH1を超え閾値TH2未満であると、差分絶対値が増加するに伴って、画像合成部114から出力される画像には非発光画像群の割合(比率)が増加することになる。   When the difference absolute value exceeds the threshold value TH1 and is less than the threshold value TH2, the light emission image composition ratio decreases linearly, and the non-light emission image group increases linearly. As a result, if the difference absolute value exceeds the threshold TH1 and is less than the threshold TH2, the ratio (ratio) of the non-light emitting image group increases in the image output from the image composition unit 114 as the difference absolute value increases. Will do.

そして、差分絶対値が閾値TH2以上となると、発光画像合成比率は1、非発光画像合成比率は0となり、画像合成部114から出力される画像として発光画像を100%出力される。   When the absolute difference value is equal to or greater than the threshold value TH2, the emission image synthesis ratio is 1, the non-emission image synthesis ratio is 0, and a 100% emission image is output as an image output from the image synthesis unit 114.

前述のように、発光画像について発光画像合成比率に応じて合成が行われることになるが、非発光画像は複数枚(ここでは、4枚)存在するので、非発光画像合成比率を非発光画像の枚数で除算したものが、非発光画像1枚当たりの合成比率となる。   As described above, the luminescent image is synthesized according to the luminescent image synthesis ratio. However, since there are a plurality of non-luminescent images (here, four), the non-luminescent image synthesis ratio is set to the non-luminescent image. Divided by the number of images is the composition ratio per non-light-emitting image.

このようにして、画像合成部114によって発光画像および非発光画像群が合成され、合成画像が画像表示部115および画像記録部116に送られる。   In this manner, the light emitting image and the non-light emitting image group are combined by the image combining unit 114, and the combined image is sent to the image display unit 115 and the image recording unit 116.

以上説明したように、図1に示すカメラでは、ストロボ発光画像と複数の非発光画像とを位置合わせする際、複数の非発光画像の位置合わせを所定の非発光画像を基準として行う。その後、発光画像と所定の非発光画像との位置合わせを行う。   As described above, in the camera shown in FIG. 1, when aligning the strobe light emission image and the plurality of non-light emission images, the alignment of the plurality of non-light emission images is performed with reference to the predetermined non-light emission image. Thereafter, alignment between the light emitting image and a predetermined non-light emitting image is performed.

これによって、非発光画像間の位置合わせにおいてストロボ照射領域も位置合わせに用いることが可能となって、従来よりも位置合わせの精度が向上する。その結果、合成画像の画質が向上する。   This makes it possible to use the strobe irradiation region for alignment between the non-light emitting images, and the alignment accuracy is improved as compared with the prior art. As a result, the image quality of the composite image is improved.

さらに、発光画像と非発光画像との位置合わせにおいても、非発光画像における輝度に応じて、主要被写体で位置合わせを行うか又は背景部分で位置合わせを行うかを選択するようにしたので、主要被写体における位置合わせが失敗することに起因する合成画像の画質低下を低減させることができる。   Furthermore, in the alignment of the luminescent image and the non-luminescent image, it is selected whether the alignment is performed on the main subject or the background portion according to the luminance in the non-luminescent image. It is possible to reduce deterioration in the image quality of the composite image due to the failure in alignment in the subject.

上述の説明から明らかなように、図1に示す例においては、画像処理部106が画像処理装置として機能する。さらに、非発光画像変換係数算出部110は第1の算出手段として機能し、発光画像変換係数算出部111および位置合わせ変換係数算出部112は第2の算出手段として機能する。そして、位置合わせ変換係数算出部112および画像変形部113は位置合わせ手段として機能し、画像合成部114は画像合成手段として機能する。   As is clear from the above description, in the example shown in FIG. 1, the image processing unit 1006 functions as an image processing apparatus. Further, the non-light emission image conversion coefficient calculation unit 110 functions as a first calculation unit, and the light emission image conversion coefficient calculation unit 111 and the alignment conversion coefficient calculation unit 112 function as a second calculation unit. The alignment conversion coefficient calculation unit 112 and the image transformation unit 113 function as alignment means, and the image composition unit 114 functions as image composition means.

なお、ストロボ照射領域算出部109は照射領域検出手段として機能する。また、撮像部101、ストロボ発光制御部102、露出制御部103、A/D変換部104、および信号処理部105は撮像手段として機能する。   The strobe irradiation area calculation unit 109 functions as an irradiation area detection unit. The imaging unit 101, the strobe light emission control unit 102, the exposure control unit 103, the A / D conversion unit 104, and the signal processing unit 105 function as an imaging unit.

以上、本発明について実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not limited to these embodiment, Various forms of the range which does not deviate from the summary of this invention are also contained in this invention. .

例えば、上記の実施の形態の機能を制御方法として、この制御方法を画像処理装置に実行させるようにすればよい。また、上述の実施の形態の機能を有するプログラムを制御プログラムとして、当該制御プログラムを画像処理装置が備えるコンピュータに実行させるようにしてもよい。なお、制御プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録される。   For example, the function of the above embodiment may be used as a control method, and this control method may be executed by the image processing apparatus. In addition, a program having the functions of the above-described embodiments may be used as a control program, and the control program may be executed by a computer included in the image processing apparatus. The control program is recorded on a computer-readable recording medium, for example.

上記の制御方法および制御プログラムの各々は、少なくとも第1の算出ステップ、第2の算出ステップ、位置合わせステップ、および画像合成ステップを有している。   Each of the control method and the control program has at least a first calculation step, a second calculation step, an alignment step, and an image composition step.

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

101 撮像部
106 画像処理部
107 位置合わせ部
108 メモリ部
109 ストロボ照射領域算出部
110 非発光画像変換係数算出部
111 発光画像変換係数算出部
112 位置合わせ変換係数算出部
113 画像変形部
114 画像合成部
DESCRIPTION OF SYMBOLS 101 Image pick-up part 106 Image processing part 107 Positioning part 108 Memory part 109 Strobe irradiation area calculation part 110 Non-light emission image conversion coefficient calculation part 111 Light emission image conversion coefficient calculation part 112 Positioning conversion coefficient calculation part 113 Image deformation part 114 Image composition part

Claims (12)

被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置であって、
前記非発光画像群において特定の非発光画像を基準非発光画像として、前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出手段と、
前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出手段と、
前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせ手段と、
前記位置合わせ手段によって位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus for aligning and combining a light emitting image obtained by emitting light when photographing a subject and a non-light emitting image group obtained continuously without emitting light,
A first alignment conversion coefficient used when aligning a non-light-emitting image excluding the reference non-light-emitting image with the reference non-light-emitting image with a specific non-light-emitting image as a reference non-light-emitting image in the non-light-emitting image group. A first calculating means to obtain;
Second calculation means for obtaining a second alignment conversion coefficient used when the reference non-light-emitting image is aligned with the light-emitting image on the basis of the light-emitting image;
Alignment means for aligning the light emitting image and the non-light emitting image group in accordance with the first alignment conversion coefficient and the second alignment conversion coefficient;
Image combining means for combining the light-emitting image and the non-light-emitting image group aligned by the alignment means into a composite image;
An image processing apparatus comprising:
前記発光画像と前記基準非発光画像についてその輝度レベルを比較して、前記発光画像において前記発光による光の照射が行われた照射領域を特定する照射領域検出手段を備え、
前記第1の算出手段は、前記基準非発光画像と前記基準非発光画像を除く非発光画像との間における動きベクトルを検出し、前記照射領域を除く非照射領域で検出された動きベクトルに応じて画像のズレを示す第1の変換係数を求め、さらに、画像全体において検出された動きベクトルに応じて第2の変換係数を求めて、前記第1の変換係数および前記第2の変換係数に応じて変換された所定の着目点の座標と前記動きベクトルとの誤差に応じて、前記第1の変換係数および前記第2の変換係数のいずれか一方を前記第1の位置合わせ変換係数として選択することを特徴とする請求項1に記載の画像処理装置。
Comparing the luminance levels of the light emitting image and the reference non-light emitting image, the light emitting image includes an irradiation region detection means for specifying an irradiation region in which light emission by the light emission is performed in the light emitting image,
The first calculating means detects a motion vector between the reference non-light-emitting image and a non-light-emitting image excluding the reference non-light-emitting image, and according to the motion vector detected in the non-irradiation region excluding the irradiation region. To obtain a first conversion coefficient indicating a deviation of the image, further obtain a second conversion coefficient according to a motion vector detected in the entire image, and calculate the first conversion coefficient and the second conversion coefficient. Depending on the error between the coordinate of the predetermined point of interest converted in response to the motion vector, one of the first conversion coefficient and the second conversion coefficient is selected as the first alignment conversion coefficient The image processing apparatus according to claim 1, wherein:
前記照射領域検出手段は、前記発光画像と前記基準非発光画像の各々を予め定められたブロックに分割して、当該ブロック毎に前記輝度レベルの差分を求めて前記差分の絶対値が所定の第1の閾値よりも大きいと当該ブロックを前記照射領域とすることを特徴とする請求項2に記載の画像処理装置。   The irradiation area detection unit divides each of the light emission image and the reference non-light emission image into predetermined blocks, obtains a difference in the luminance level for each block, and an absolute value of the difference is a predetermined first value. The image processing apparatus according to claim 2, wherein when the threshold value is larger than 1, the block is set as the irradiation region. 前記照射領域検出手段は、前記差分の絶対値が所定の第1の閾値以下であると、前記ブロック毎にその輝度レベルとに応じて発光の影響度を示す発光影響度を求めて、前記発光影響度が所定の第2の閾値よりも大きいと当該ブロックを前記照射領域とすることを特徴とする請求項3に記載の画像処理装置。   When the absolute value of the difference is equal to or less than a predetermined first threshold, the irradiation area detection unit obtains a light emission influence degree indicating the light emission influence degree according to the luminance level for each block, and the light emission The image processing apparatus according to claim 3, wherein when the influence degree is greater than a predetermined second threshold, the block is set as the irradiation area. 前記第2の算出手段は、前記基準非発光画像において前記照射領域における平均輝度を求めて、前記平均輝度が予め定められた輝度閾値よりも大きいと、前記照射領域において前記ブロック毎に前記発光画像および基準非発光画像においける動きベクトルを求め、当該動きベクトルに応じて、前記発光画像と前記基準非発光画像との位置合わせを行う前記第2の位置合わせ変換係数を求めることを特徴とする請求項3又は4に記載の画像処理装置。   The second calculation means obtains an average luminance in the irradiation area in the reference non-light-emitting image, and when the average luminance is larger than a predetermined luminance threshold, the light-emitting image for each block in the irradiation area. And a motion vector in the reference non-light-emitting image is obtained, and the second alignment conversion coefficient for aligning the light-emitting image and the reference non-light-emitting image is obtained according to the motion vector. The image processing apparatus according to claim 3 or 4. 前記第2の算出手段は、前記平均輝度が前記輝度閾値以下であると、前記照射領域を除く非照射領域において前記ブロック毎に前記発光画像および基準非発光画像においける動きベクトルを求め、当該動きベクトルに応じて、前記発光画像と前記基準非発光画像との位置合わせを行う前記第2の位置合わせ変換係数を求めることを特徴とする請求項5に記載の画像処理装置。   The second calculating means obtains a motion vector in the light-emitting image and the reference non-light-emitting image for each of the blocks in the non-irradiation area excluding the irradiation area when the average luminance is equal to or less than the luminance threshold, The image processing apparatus according to claim 5, wherein the second alignment conversion coefficient for performing alignment between the light emitting image and the reference non-light emitting image is obtained according to a motion vector. 前記第2の算出手段は、前記第1の位置合わせ変換係数と、前記発光画像と前記基準非発光画像との位置合わせを行う前記第2の位置合わせ変換係数とに応じて前記発光画像と前記基準非発光画像を除く非発光画像との位置合わせを行う前記第2の位置合わせ変換係数を求めることを特徴とする請求項6に記載の画像処理装置。   The second calculation means is configured to output the light emission image and the second alignment conversion coefficient according to the first alignment conversion coefficient and the second alignment conversion coefficient for performing alignment between the light emission image and the reference non-light emission image. The image processing apparatus according to claim 6, wherein the second alignment conversion coefficient for performing alignment with a non-light-emitting image excluding a reference non-light-emitting image is obtained. 前記画像合成手段は、前記位置合わせ手段によって位置合わせされた前記発光画像および前記非発光画像群を合成する際、前記発光画像と非発光画像との輝度の差分の絶対値に応じて予め設定された前記発光画像と前記非発光画像との合成比率を示す発光画像合成比率および非発光画像合成比率に基づいて前記発光画像および前記非発光画像群の合成を行うことを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。   The image synthesizing unit is preset according to an absolute value of a luminance difference between the light emitting image and the non-light emitting image when the light emitting image and the non-light emitting image group aligned by the position aligning unit are combined. The light-emitting image and the non-light-emitting image group are combined based on a light-emitting image composition ratio and a non-light-emitting image composition ratio indicating a composite ratio of the light-emitting image and the non-light-emitting image. 8. The image processing device according to any one of items 7. 前記画像合成手段は、前記位置合わせ手段によって位置合わせされた前記発光画像および前記非発光画像群を合成する際、前記照射領域については前記発光画像を出力し、前記照射領域を除く非照射領域については前記非発光画像群を加算平均した画像を出力することを特徴とする請求項3〜7のいずれか1項に記載の画像処理装置。   The image combining unit outputs the light-emitting image for the irradiation region and combines the light-emitting image and the non-light-emitting image group aligned by the position alignment unit, and the non-irradiation region excluding the irradiation region. The image processing apparatus according to claim 3, wherein an image obtained by adding and averaging the non-light emitting image group is output. 請求項1〜9のいずれか1項に記載の画像処理装置と、
発光を行って被写体を撮影して発光画像を得るとともに、前記発光を行うことなく前記被写体を連続的に撮影して非発光画像群を得る撮像手段とを有することを特徴とする撮像装置。
The image processing apparatus according to any one of claims 1 to 9,
An imaging apparatus comprising: an imaging unit that captures a subject by capturing light to obtain a light-emitting image, and continuously captures the subject without performing the light emission to obtain a non-light-emitting image group.
被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置の制御方法であって、
前記非発光画像群において特定の非発光画像を基準非発光画像として前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出ステップと、
前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出ステップと、
前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせステップと、
前記位置合わせステップで位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成ステップと、
を有することを特徴とする制御方法。
A control method of an image processing apparatus for aligning and combining a light emitting image obtained by emitting light when photographing a subject and a non-light emitting image group obtained continuously without emitting light,
In the non-light emitting image group, a first non-light emitting image is used as a reference non-light emitting image, and a first alignment conversion coefficient used when aligning a non-light emitting image excluding the reference non-light emitting image with the reference non-light emitting image is obtained. A first calculation step;
A second calculation step of obtaining a second alignment conversion coefficient used when aligning the reference non-light-emitting image with the light-emitting image on the basis of the light-emitting image;
An alignment step of aligning the light emitting image and the non-light emitting image group according to the first alignment conversion coefficient and the second alignment conversion coefficient;
An image combining step of combining the light-emitting image and the non-light-emitting image group aligned in the alignment step into a combined image;
A control method characterized by comprising:
被写体を撮影する際に発光を行って得られた発光画像と発光を行うことなく連続的に得られた非発光画像群とを位置合わせして合成する画像処理装置で用いられる制御プログラムであって、
前記画像処理装置が備えるコンピュータに、
前記非発光画像群において特定の非発光画像を基準非発光画像として前記基準非発光画像を除く非発光画像を前記基準非発光画像に位置合わせする際に用いられる第1の位置合わせ変換係数を求める第1の算出ステップと、
前記発光画像を基準として前記基準非発光画像を前記発光画像に位置合わせする際に用いられる第2の位置合わせ変換係数を求める第2の算出ステップと、
前記第1の位置合わせ変換係数および前記第2の位置合わせ変換係数に応じて前記発光画像および前記非発光画像群を位置合わせする位置合わせステップと、
前記位置合わせステップで位置合わせされた前記発光画像および前記非発光画像群を合成して合成画像とする画像合成ステップと、
を実行させることを特徴とする制御プログラム。
A control program used in an image processing apparatus for aligning and synthesizing a light-emitting image obtained by emitting light when photographing a subject and a non-light-emitting image group obtained continuously without light emission. ,
A computer included in the image processing apparatus,
In the non-light emitting image group, a first non-light emitting image is used as a reference non-light emitting image, and a first alignment conversion coefficient used when aligning a non-light emitting image excluding the reference non-light emitting image with the reference non-light emitting image is obtained. A first calculation step;
A second calculation step of obtaining a second alignment conversion coefficient used when aligning the reference non-light-emitting image with the light-emitting image on the basis of the light-emitting image;
An alignment step of aligning the light emitting image and the non-light emitting image group according to the first alignment conversion coefficient and the second alignment conversion coefficient;
An image combining step of combining the light-emitting image and the non-light-emitting image group aligned in the alignment step into a combined image;
A control program characterized by causing
JP2012181739A 2012-08-20 2012-08-20 Image processing apparatus, control method and control program of the same and imaging apparatus Pending JP2014039222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012181739A JP2014039222A (en) 2012-08-20 2012-08-20 Image processing apparatus, control method and control program of the same and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012181739A JP2014039222A (en) 2012-08-20 2012-08-20 Image processing apparatus, control method and control program of the same and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2014039222A true JP2014039222A (en) 2014-02-27

Family

ID=50287022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012181739A Pending JP2014039222A (en) 2012-08-20 2012-08-20 Image processing apparatus, control method and control program of the same and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2014039222A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016111444A (en) * 2014-12-03 2016-06-20 キヤノン株式会社 Image processing system
JP2017201455A (en) * 2016-05-02 2017-11-09 株式会社モルフォ Image synthesizer, image synthesis method, image synthesis program and storage medium
JP2020047186A (en) * 2018-09-21 2020-03-26 富士ゼロックス株式会社 Image processing apparatus and program
US11272124B2 (en) 2017-10-31 2022-03-08 Morpho, Inc. Image compositing device, image compositing method, and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016111444A (en) * 2014-12-03 2016-06-20 キヤノン株式会社 Image processing system
US10178312B2 (en) 2014-12-03 2019-01-08 Canon Kabushiki Kaisha Image processing apparatus and image processing method to position images to position images
JP2017201455A (en) * 2016-05-02 2017-11-09 株式会社モルフォ Image synthesizer, image synthesis method, image synthesis program and storage medium
US11272124B2 (en) 2017-10-31 2022-03-08 Morpho, Inc. Image compositing device, image compositing method, and storage medium
JP2020047186A (en) * 2018-09-21 2020-03-26 富士ゼロックス株式会社 Image processing apparatus and program
JP7247501B2 (en) 2018-09-21 2023-03-29 富士フイルムビジネスイノベーション株式会社 Image processing device and program

Similar Documents

Publication Publication Date Title
JP5917258B2 (en) Image processing apparatus and image processing method
JP5445363B2 (en) Image processing apparatus, image processing method, and image processing program
JP5367640B2 (en) Imaging apparatus and imaging method
JP6055332B2 (en) Image processing apparatus, imaging apparatus, control method, and program
US9288392B2 (en) Image capturing device capable of blending images and image processing method for blending images thereof
JP5408053B2 (en) Image processing apparatus and image processing method
JP5672796B2 (en) Image processing apparatus and image processing method
JP2005102116A (en) Image processing method, image processing device, and computer program
JP5411786B2 (en) Image capturing apparatus and image integration program
JP2012235197A (en) Device, method and program for image processing
US9071766B2 (en) Image capturing apparatus and control method thereof
JP5848662B2 (en) Image processing apparatus and control method thereof
JP2015144475A (en) Imaging apparatus, control method of the same, program and storage medium
JP2017011327A (en) Image processing apparatus, image processing method, and program
JP2012222669A (en) Image processing system and method therefor
JP2014039222A (en) Image processing apparatus, control method and control program of the same and imaging apparatus
JP2016144042A (en) Image processing apparatus, image processing method, and program
JP5713643B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2013192200A (en) Image processing apparatus, image processing method, and image processing program
JP2013225724A (en) Imaging device, control method therefor, program, and storage medium
JP6730423B2 (en) Image processing apparatus, image processing method, and image processing program
JP2012160852A (en) Image composition device, imaging device, image composition method, and image composition program
JP6025555B2 (en) Image processing apparatus, image processing method, and program
JP2014155000A (en) Image processing apparatus, control method for the same, and control program
JP2007020071A (en) Imaging apparatus, imaging method, and program