JP2018050149A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2018050149A
JP2018050149A JP2016183800A JP2016183800A JP2018050149A JP 2018050149 A JP2018050149 A JP 2018050149A JP 2016183800 A JP2016183800 A JP 2016183800A JP 2016183800 A JP2016183800 A JP 2016183800A JP 2018050149 A JP2018050149 A JP 2018050149A
Authority
JP
Japan
Prior art keywords
image
composition ratio
exposure
processing apparatus
ratio
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
JP2016183800A
Other languages
Japanese (ja)
Inventor
尚子 渡澤
Naoko Tozawa
尚子 渡澤
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 JP2016183800A priority Critical patent/JP2018050149A/en
Publication of JP2018050149A publication Critical patent/JP2018050149A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus which allows generation of a composite image having natural gradation characteristics, even if a subject or a camera moves when synthesizing multiple images.SOLUTION: An image processing apparatus synthesizing multiple images has generation means for generating a composite ratio image for determining the composite ratio of image composition, according to the brilliance of at least one of a first image and a second image, detection means for detecting slippage of the first and second images, and control means for controlling the final composite ratio of the first and second images, according to the composite ratio image and detection results outputted from the detection means. The control means uses the detection results from the detection means only in an area where the first and second images are subjected to weighted synthesis in the composite ratio image.SELECTED DRAWING: Figure 2

Description

本発明は、複数の画像を合成する画像処理装置に関する。   The present invention relates to an image processing apparatus that combines a plurality of images.

デジタルカメラやデジタルビデオカメラは撮像した被写体像を、CMOSセンサやCCD等の撮像素子により、光の強度に応じて画素単位で光電変換し、映像信号に変換して画像信号処理を行う。撮像素子のダイナミックレンジは狭く、明るい被写体と暗い被写体との輝度差が大きいシーンにおいては、両被写体を適性露光で撮影することは困難である。   A digital camera or a digital video camera performs image signal processing by photoelectrically converting a captured subject image by a pixel unit in accordance with the intensity of light using an image sensor such as a CMOS sensor or a CCD, and converting it into a video signal. In a scene where the dynamic range of the image sensor is narrow and the brightness difference between a bright subject and a dark subject is large, it is difficult to capture both subjects with appropriate exposure.

このような問題を解決する為に、同一シーンにおいて露光量の異なる複数枚の画像を撮影し、複数枚の画像データを合成してダイナミックレンジが拡張された画像を取得する方法が提案されている。   In order to solve such a problem, a method has been proposed in which a plurality of images with different exposure amounts are photographed in the same scene, and a plurality of image data are combined to obtain an image with an expanded dynamic range. .

特許文献1では、長時間露光信号と短時間露光信号の露光量の比に相当する増幅率を用いて信号レベルの補正を行い、レベル補正した長時間露光信号と短時間露光信号とを合成する方法が開示されている。   In Patent Document 1, the signal level is corrected using an amplification factor corresponding to the exposure amount ratio between the long exposure signal and the short exposure signal, and the level corrected long exposure signal and the short exposure signal are synthesized. A method is disclosed.

特開平7−75026号公報Japanese Patent Laid-Open No. 7-75026

特許文献1で提案されている画像合成方法は、合成する2枚の画像の位置がずれていないことを前提にした合成方法である。したがって、被写体が移動した場合や、撮影者の手ぶれが生じた場合などによって、合成する2枚の画像に位置ずれが生じると、合成後の画像の階調特性が不連続となる領域が発生する。この不連続となった領域が、合成後の画像において2重像に見えたり、ぶれて見えるという問題があった。   The image synthesizing method proposed in Patent Document 1 is a synthesizing method based on the premise that the positions of two images to be synthesized are not shifted. Accordingly, if the two images to be combined are displaced due to movement of the subject or camera shake of the photographer, an area where the tone characteristics of the combined image are discontinuous occurs. . There is a problem that the discontinuous region appears to be a double image or is blurred in the synthesized image.

本発明は、上述の問題点に鑑みてなされたものであり、複数枚の画像を合成する際に、被写体がわずかに移動した場合及び撮影者の手ぶれによりカメラがわずかに動いた場合において、階調特性が不連続となり不自然な合成画像となってしまう問題を防ぎ、見えの自然な合成画像を生成することを可能にする画像合成処理装置を提供することを目的とする。   The present invention has been made in view of the above-described problems.When a plurality of images are combined, the subject is slightly moved and the camera is slightly moved due to camera shake of the photographer. It is an object of the present invention to provide an image composition processing apparatus that prevents a problem that the tonal characteristics become discontinuous and results in an unnatural composite image, and makes it possible to generate a natural composite image.

前述の目的を達成するために、本発明の実施態様は、複数の画像を合成する画像処理装置であって、第一の画像と第二の画像の少なくとも一方の輝度に応じて、画像合成の合成比率を決める合成比率画像を生成する生成手段と、第一の画像と第二の画像のずれを検出する検出手段と、前記合成比率画像と前記検出手段より出力される検出結果に応じて、第一の画像と第二の画像の最終合成比率を制御する制御手段と、を有し、前記制御手段は、合成比率画像において第一の画像と第二の画像を重み付け合成する領域に限り、前記検出手段の検出結果を用いる、ことを特徴とする。   In order to achieve the above-described object, an embodiment of the present invention is an image processing apparatus that combines a plurality of images, and performs image combining according to the luminance of at least one of the first image and the second image. In accordance with detection results output from the generating means for generating a composite ratio image for determining a composite ratio, detection means for detecting a shift between the first image and the second image, the composite ratio image and the detection means, Control means for controlling the final synthesis ratio of the first image and the second image, and the control means is limited to an area where the first image and the second image are weighted and synthesized in the synthesis ratio image. The detection result of the detection means is used.

本発明によれば、複数の画像を合成する際に、被写体がわずかに移動した場合及び撮影者の手ぶれによりカメラがわずかに動いた場合においても、階調が連続する合成画像を生成することが可能になるため、合成画像の画質が向上する。   According to the present invention, when a plurality of images are combined, a combined image having continuous gradations can be generated even when the subject moves slightly and the camera moves slightly due to camera shake of the photographer. This makes it possible to improve the quality of the composite image.

本発明の実施形態にかかる画像合成処理装置のブロック図である。1 is a block diagram of an image composition processing apparatus according to an embodiment of the present invention. 本発明の実施形態にかかる機能構成ブロック図(位置ずれ対策なし)である。FIG. 3 is a functional configuration block diagram (without countermeasures against misalignment) according to an embodiment of the present invention. 本発明の実施形態にかかる画像合成処理装置の動作フローチャートである。It is an operation | movement flowchart of the image composition processing apparatus concerning embodiment of this invention. 本発明の実施形態にかかるゲインマップとα画像を説明する図である。It is a figure explaining the gain map and (alpha) image concerning embodiment of this invention. 本発明の実施形態にかかる合成比率特性を説明する図である。It is a figure explaining the synthetic | combination ratio characteristic concerning embodiment of this invention. 本発明の実施形態にかかる機能構成ブロック図(位置ずれ対策あり)である。FIG. 3 is a functional configuration block diagram (with misalignment countermeasures) according to the embodiment of the present invention. 本発明の実施形態にかかる画像合成処理装置の動作フローチャートである。It is an operation | movement flowchart of the image composition processing apparatus concerning embodiment of this invention.

以下、本発明の実施形態について、図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

なお、以下に説明する実施形態は、デジタルカメラを用いて、晴天時に屋外で人物を逆光で撮影する場合において、人物に露出を合わせると背景の空や雲が白飛びしてしまい、逆に空に露出を合わせると人物が暗くなってしまう撮影シーンに対して、本発明を適用した例を説明する。   In the embodiment described below, when a person is photographed outdoors in fine weather using a digital camera, the sky and clouds in the background will be blown off when the exposure is adjusted to the person. An example will be described in which the present invention is applied to a shooting scene in which a person becomes dark when exposure is adjusted.

また、本実施形態においては、露出の異なる2枚の画像(低露出画像・高露出画像)を撮影し、各々に適したトーンマッピング処理を施し、トーンマッピング処理後の低露出画像・高露出画像を合成することにより、暗い被写体は高露出の画像で置き換え、明るい被写体は低露出の画像で置き換えることでダイナミックレンジが拡大された合成画像を作成する場合において、露出の異なる2枚の画像の位置が少しずれてしまった場合に、本発明を適用した例を説明する。   In the present embodiment, two images (low exposure image and high exposure image) with different exposures are taken, tone mapping processing suitable for each is performed, and the low exposure image and high exposure image after the tone mapping processing are performed. When combining a dark subject with a high-exposure image and a bright subject with a low-exposure image to create a composite image with an expanded dynamic range, the positions of two images with different exposures An example will be described in which the present invention is applied to a case where a slight deviation occurs.

図1は、本発明の実施形態に係るデジタルカメラ100の構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of a digital camera 100 according to an embodiment of the present invention.

図1において、100はデジタルカメラ、101はズームレンズ、フォーカスレンズを含むレンズ群、102は絞り機能を備えるシャッター、103は光学像を電気信号に変換するCCDやCMOS素子等で構成される撮像部、104はアナログ信号をデジタル信号に変換するA/D変換器、105はA/D変換器104から出力される画像データに対し、各種画像処理を行う画像処理部である。   In FIG. 1, 100 is a digital camera, 101 is a lens group including a zoom lens and a focus lens, 102 is a shutter having a diaphragm function, and 103 is an imaging unit including a CCD, a CMOS element, or the like that converts an optical image into an electrical signal. , 104 is an A / D converter that converts an analog signal into a digital signal, and 105 is an image processing unit that performs various image processing on the image data output from the A / D converter 104.

画像処理部105は、撮像した画像データに対し所定の演算処理を行い、得られた演算結果に基づいてシステム制御部50において露光制御、測距制御を行う。これにより、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理、AE(自動露出)処理、EF(フラッシュプリ発光)処理が行われる。更に、画像処理部105は、撮像した画像データに対し所定の演算処理を行い、得られた演算結果に基づいてTTL方式のAWB(オートホワイトバランス)処理を行う。   The image processing unit 105 performs predetermined calculation processing on the captured image data, and performs exposure control and distance measurement control in the system control unit 50 based on the obtained calculation result. Thereby, AF (autofocus) processing, AE (automatic exposure) processing, and EF (flash pre-emission) processing of the TTL (through-the-lens) method are performed. Further, the image processing unit 105 performs predetermined calculation processing on the captured image data, and performs TTL AWB (auto white balance) processing based on the obtained calculation result.

A/D変換器104からの出力データは、画像処理部105及びメモリ制御部107を介して、或いは、メモリ制御部107を介してメモリ106に直接書き込まれる。メモリ106は、撮像部103で撮像した撮像データをA/D変換器104によりデジタルデータに変換した画像データや、表示部109に表示するための画像データを格納する。メモリ106は、所定枚数の静止画像や所定時間の動画像および音声を格納するのに十分な記憶容量を備えている。また、メモリ106は画像表示用のメモリ(ビデオメモリ)を兼ねている。D/A変換器108は、メモリ106に格納されている画像表示用のデータをアナログ信号に変換して表示部109に供給する。   Output data from the A / D converter 104 is directly written into the memory 106 via the image processing unit 105 and the memory control unit 107 or via the memory control unit 107. The memory 106 stores image data obtained by converting image data captured by the image capturing unit 103 into digital data by the A / D converter 104 and image data to be displayed on the display unit 109. The memory 106 has a storage capacity sufficient to store a predetermined number of still images, a moving image and sound for a predetermined time. The memory 106 also serves as an image display memory (video memory). The D / A converter 108 converts the image display data stored in the memory 106 into an analog signal and supplies the analog signal to the display unit 109.

こうして、メモリ106に書き込まれた表示用の画像データはD/A変換器108を介して表示部109により表示される。表示部109は、LCD等の表示器上に、D/A変換器108からのアナログ信号に応じた表示を行う。110は記録媒体111とのインタフェース(I/F)、111はメモリカードやハードディスク等の記録媒体、50はデジタルカメラ100のシステム全体を制御するシステム制御部である。   Thus, the display image data written in the memory 106 is displayed on the display unit 109 via the D / A converter 108. The display unit 109 performs display according to an analog signal from the D / A converter 108 on a display such as an LCD. Reference numeral 110 denotes an interface (I / F) with the recording medium 111, reference numeral 111 denotes a recording medium such as a memory card or hard disk, and reference numeral 50 denotes a system control unit that controls the entire system of the digital camera 100.

システム制御部50は、不揮発性メモリ114に記録されたプログラムを実行する。112は各種制御に用いる時間や、内蔵された時計の時間を計測するシステムタイマー、113はシステム制御部50の動作用の定数、変数、後述する不揮発性メモリ114から読みだしたプログラム等を展開するシステムメモリである。不揮発性メモリ114は電気的に消去・記録可能であり、例えばEEPROM等が用いられる。不揮発性メモリ114には、システム制御部50の動作用の定数、プログラム等が記憶される。115は各種の操作指示を入力するための操作部である。   The system control unit 50 executes a program recorded in the nonvolatile memory 114. 112 is a system timer that measures the time used for various controls and the time of the built-in clock, 113 is a constant and variable for operating the system control unit 50, a program read from the nonvolatile memory 114 described later, and the like. System memory. The nonvolatile memory 114 can be electrically erased and recorded, and for example, an EEPROM or the like is used. The nonvolatile memory 114 stores constants, programs, and the like for operating the system control unit 50. Reference numeral 115 denotes an operation unit for inputting various operation instructions.

図2に、本実施形態での合成処理に関する機能構成ブロック図を示す。図2は、露出の異なる2枚の画像(低露出画像・高露出画像)の位置ずれを考慮しない場合の機能構成ブロック図を示している。位置ずれを考慮した機能構成ブロック図に関しては、後述で詳細に説明する。   FIG. 2 shows a functional block diagram relating to the composition processing in the present embodiment. FIG. 2 shows a functional configuration block diagram in the case where positional deviation between two images (low exposure image and high exposure image) having different exposures is not taken into consideration. A functional configuration block diagram in consideration of misalignment will be described in detail later.

図2において、201はゲインマップ生成回路である。ゲインマップ生成回路201は、短時間露光信号Sで撮影した低露出画像に対して、トーンマッピング処理(階調補正)する為のゲインマップを生成する。 In FIG. 2, reference numeral 201 denotes a gain map generation circuit. Gain map generator circuit 201, to the low-exposure image taken with short exposure signal S S, to generate a gain map for tone mapping (tone correction).

202はゲイン処理回路であり、入力される長時間露光信号Sに、ゲインマップ生成回路201で生成した高露出画像用のゲインマップを乗算し、乗算結果を出力する。203はゲイン処理回路であり、入力される短時間露光信号Sに、ゲインマップ生成回路201で生成した低露出画像用のゲインマップを乗算し、乗算結果を出力する。 A gain processing circuit 202 multiplies the input long-time exposure signal SL by the gain map for the high-exposure image generated by the gain map generation circuit 201 and outputs the multiplication result. 203 is a gain processing circuit, the short exposure signal S S input, multiplied by the gain map for the low-exposure image generated by the gain map generator circuit 201, and outputs the multiplication result.

204は、合成比率算出回路であり、ゲインマップ生成回路201で生成した低露出画像用のゲインマップを基に、合成比率画像(以下、α画像)を生成する。205は画像合成回路であり、ゲイン処理回路202、203から出力されたゲイン処理後の低露出画像と高露出画像とを、合成比率算出回路204で算出したα画像に基づいた合成比率で合成する。   Reference numeral 204 denotes a composition ratio calculation circuit that generates a composition ratio image (hereinafter referred to as an α image) based on the gain map for the low exposure image generated by the gain map generation circuit 201. An image synthesis circuit 205 synthesizes the low-exposure image and the high-exposure image after gain processing output from the gain processing circuits 202 and 203 at a synthesis ratio based on the α image calculated by the synthesis ratio calculation circuit 204. .

上記構成による合成処理動作について、図3のフローチャートを用いて説明する。   The synthesizing process operation with the above configuration will be described with reference to the flowchart of FIG.

ステップS301において、システム制御部50で所持している値の初期化が行われる。   In step S301, the values possessed by the system control unit 50 are initialized.

ステップS302において、システム制御部50は入力された長時間露光信号Sにより露光された画像と短時間露光信号Ssにより露光された画像のうち、どちらの画像をゲインマップ生成する際の基準画像とするかの選定を行う。本実施形態においては、短時間露光信号Sにより露光された画像を基準画像と選定し、長時間露光信号Sを非基準画像と選定した例について説明する。 In step S302, the system control unit 50 of the exposed image by the exposed by long exposure signal S L that is input image short exposure signal Ss, either the image and the reference image at the time of gain map generator Select whether to do. In the present embodiment, short image exposed by the exposure signal S S selects a reference image, for a long time an example of an exposure signal S L were selected as non-reference image will be described.

ステップS303において、ステップS302で選定した基準画像を基に、ゲインマップ生成回路201においてゲインマップ画像を生成する。ゲインマップは、画像サイズと同サイズであり、画素値は乗算すべきゲイン乗算値を表している。画像に対してどの程度の強度のトーンマッピング処理を加えるかについては、どのような方法で決定しても構わない。例えば、低露出画像の領域毎の輝度分布を分析して決定することができる。具体的には、図4(a)のような空・人・背景が含まれるシーンを撮影する場合において、白飛びしていない低露出画像を図4(b)に示すように、n×mブロックにブロック分割し、各々のブロックが空・人・背景領域のどの領域に対応しているか分析して領域判定し領域毎の輝度ヒストグラムを算出する。   In step S303, the gain map generation circuit 201 generates a gain map image based on the reference image selected in step S302. The gain map has the same size as the image size, and the pixel value represents a gain multiplication value to be multiplied. How much tone mapping processing is applied to the image may be determined by any method. For example, the luminance distribution for each region of the low-exposure image can be analyzed and determined. Specifically, when shooting a scene including sky, people, and background as shown in FIG. 4A, a low-exposure image that is not overexposed is shown in FIG. 4B as n × m. The block is divided into blocks, and each of the blocks corresponds to which area of the sky, the person, and the background area, and the area is determined to calculate a luminance histogram for each area.

領域判定する方法に関しては既存の方法を用いても構わないが、例えば、空領域に関しては、各ブロックの輝度値・色差B−Yが共に所定値より大きいブロックを空領域とする。例えば、人領域に関しては、画像をウェーブレット変換し、パターンマッチングすることにより人物の顔を検出するか、もしくは撮像前に主被写体として認識させる人物の顔を予め撮影して不揮発性メモリ114に記憶させておくことにより、前述の方法で検出した顔の特徴量を、主被写体として認識させる人物の顔の特徴量と比較することにより特定する。   As an area determination method, an existing method may be used. For example, for an empty area, a block in which both the luminance value and color difference BY of each block are larger than a predetermined value is set as an empty area. For example, for the human area, the human face is detected by wavelet transforming the image and pattern matching, or the human face to be recognized as the main subject is imaged in advance and stored in the nonvolatile memory 114 before imaging. Thus, the facial feature amount detected by the above-described method is specified by comparing it with the facial feature amount of the person to be recognized as the main subject.

これら既存の方法を用いて領域判定し、領域毎の輝度ヒストグラムを算出する。低露出画像に乗算するゲインマップの画素値は、図4(b)に示すように、輝度ヒストグラムの結果を基に、輝度が高い空領域のブロックのゲインマップの画素値は小さいゲイン値に、逆光シーンの顔領域のように輝度が低い領域のゲインマップの画素値は大きいゲイン値、中間の輝度値であれば中間のゲイン値となるようにゲイン量を制御してゲインマップを生成する。   Region determination is performed using these existing methods, and a luminance histogram for each region is calculated. As shown in FIG. 4B, the pixel value of the gain map of the sky region block with high luminance is set to a small gain value based on the result of the luminance histogram, as shown in FIG. The gain map is generated by controlling the gain amount so that the pixel value of the gain map in the low luminance region such as the face region of the backlight scene is a large gain value, and the intermediate gain value if the luminance value is an intermediate luminance value.

また、高露出画像に乗算するゲインマップは、低露出画像に対して生成したゲインマップに対し、露出段差分ゲインを掛けて生成する。例えば、低露出画像と高露出画像が1段差の露出段差であった場合には、低露出画像に乗算するゲインマップに対し、×1/2倍のゲインを掛けたものを高露出画像のゲインマップとする。   Further, the gain map for multiplying the high exposure image is generated by multiplying the gain map generated for the low exposure image by the gain corresponding to the exposure step. For example, if the low-exposure image and the high-exposure image have an exposure step of one step, the gain map obtained by multiplying the gain map to be multiplied by the low-exposure image by a factor of x1 / 2 is the gain of the high-exposure image. Map.

ステップS304において、合成比率算出回路204において、α画像を生成する。α画像とは、画像サイズと同サイズであり、画素値は低露出画像もしくは高露出画像どちらかの合成比率値を表している。例えば、図5に示すような合成比率特性に基づいて合成する比率値を算出する。図5の横軸は、ゲインマップ生成回路201で生成した低露出画像用のゲインマップのゲイン値、縦軸は、合成比率を示している。   In step S304, the composition ratio calculation circuit 204 generates an α image. The α image has the same size as the image size, and the pixel value represents a composite ratio value of either the low exposure image or the high exposure image. For example, the ratio value to be combined is calculated based on the combination ratio characteristic as shown in FIG. The horizontal axis in FIG. 5 indicates the gain value of the gain map for the low exposure image generated by the gain map generation circuit 201, and the vertical axis indicates the composition ratio.

ゲイン値が低いC0の範囲(低露出画像の輝度値が高い領域にあたり、輝度値が高いのでゲインマップのゲイン量が小さい領域)は低露出画像の合成比率を100%とし、ゲイン値が高いC2の範囲(低露出画像の輝度値が低い領域にあたり、輝度値が低いのでゲインマップのゲイン量が大きい領域)は、高露出画像の合成比率を100%とする。中間に値するC1の範囲は、低露出画像と高露出画像をブレンドする特性となっている。   In the range of C0 having a low gain value (a region where the luminance value is high and the gain amount of the gain map is small because the luminance value of the low-exposure image is high), the composition ratio of the low-exposure image is 100% and the gain value is high. In the range of (a region where the luminance value of the low exposure image is low and the gain value of the gain map is large because the luminance value is low), the composition ratio of the high exposure image is 100%. The range of C1, which is worth the middle, has a characteristic of blending a low exposure image and a high exposure image.

ステップS305において、ゲイン処理回路202、203において、低露出画像、高露出画像に対し、ゲインマップ生成回路201で生成したゲインマップを各々乗算するゲイン処理を行う。   In step S305, the gain processing circuits 202 and 203 perform gain processing for multiplying the low exposure image and the high exposure image by the gain map generated by the gain map generation circuit 201, respectively.

ステップS306において、ステップS304で生成されたα画像を基に画像合成回路205において低露出画像と高露出画像を合成する。合成後の画像は、図4(c)に示すように、空領域に関しては、低露出画像の合成比率が高く、人領域に関しては高露出画像の合成比率が高く、背景領域に関しては、低露出画像・高露出画像をブレンドした合成結果となる。   In step S306, the image composition circuit 205 synthesizes the low exposure image and the high exposure image based on the α image generated in step S304. As shown in FIG. 4C, the synthesized image has a high composition ratio of the low-exposure image for the sky area, a high composition ratio of the high-exposure image for the human area, and a low exposure for the background area. The result is a blended image / high-exposure image.

以上、位置ずれ対策を考慮していない場合のデジタルカメラ100の処理動作について説明した。   In the foregoing, the processing operation of the digital camera 100 when the countermeasure for misalignment is not considered has been described.

次に、露出の異なる2枚の画像(低露出画像・高露出画像)に位置ずれが生じた場合に、2枚の画像のずれを検出し、検出結果を基に最終合成比率を制御して合成処理する例について説明する。   Next, when misalignment occurs between two images with different exposures (low exposure image and high exposure image), the misalignment between the two images is detected, and the final composition ratio is controlled based on the detection result. An example of synthesizing processing will be described.

図6に、本実施形態での合成処理に関する機能構成ブロック図を示す。図6は、図2を用いて前述で説明した機能ブロックに、動き検出回路601、最終合成比率算出回路602を加えた構成となっている。よって、以下の説明においては図2との共通のブロックに関しては、同じ符号を用い、差異点である動き検出回路601、最終合成比率算出回路602に関する説明と、動作フローチャートについてのみ詳細に説明する。   FIG. 6 shows a functional block diagram relating to the composition processing in the present embodiment. 6 has a configuration in which a motion detection circuit 601 and a final synthesis ratio calculation circuit 602 are added to the functional blocks described above with reference to FIG. Therefore, in the following description, the same reference numerals are used for blocks common to those in FIG. 2, and only the description of the motion detection circuit 601 and the final composite ratio calculation circuit 602, which are the differences, and the operation flowchart will be described in detail.

図6において、201はゲインマップ生成回路である。ゲインマップ生成回路201は、短時間露光信号Sで撮影した低露出画像に対して、トーンマッピング処理(階調補正)する為のゲインマップを生成する。202はゲイン処理回路であり、入力される長時間露光信号Sに、ゲインマップ生成回路201で生成した高露出画像用のゲインマップを乗算し、乗算結果を出力する。203はゲイン処理回路であり、入力される短時間露光信号Sに、ゲインマップ生成回路201で生成した低露出画像用のゲインマップを乗算し、乗算結果を出力する。 In FIG. 6, reference numeral 201 denotes a gain map generation circuit. Gain map generator circuit 201, to the low-exposure image taken with short exposure signal S S, to generate a gain map for tone mapping (tone correction). A gain processing circuit 202 multiplies the input long-time exposure signal SL by the gain map for the high-exposure image generated by the gain map generation circuit 201 and outputs the multiplication result. 203 is a gain processing circuit, the short exposure signal S S input, multiplied by the gain map for the low-exposure image generated by the gain map generator circuit 201, and outputs the multiplication result.

合成比率算出回路204は、ゲインマップ生成回路201で生成した低露出画像用のゲインマップを基に、合成比率画像(α画像)を生成する。601は、動き検出回路であり、ゲイン処理回路202からゲイン処理後の高露出画像、ゲイン処理回路203からゲイン処理後の低露出画像を入力される。動き検出回路601は、入力されたゲイン処理後の高露出画像・低露出画像の動きを検出する。   The composition ratio calculation circuit 204 generates a composition ratio image (α image) based on the gain map for the low exposure image generated by the gain map generation circuit 201. Reference numeral 601 denotes a motion detection circuit which receives a high-exposure image after gain processing from the gain processing circuit 202 and a low-exposure image after gain processing from the gain processing circuit 203. The motion detection circuit 601 detects the motion of the input high-exposure image and low-exposure image after gain processing.

最終合成比率算出回路602は、入力された合成比率算出回路204で生成されたα画像と動き検出回路601からの動き検出結果とを基に、最終合成比率画像(以下、α´画像)を生成する。205は画像合成回路であり、ゲイン処理回路202、203から出力されたゲイン処理後の低露出画像と高露出画像とを、最終合成比率算出回路602で算出した算出結果(α’画像)に基づいた合成比率で合成する。   The final composite ratio calculation circuit 602 generates a final composite ratio image (hereinafter referred to as an α ′ image) based on the α image generated by the input composite ratio calculation circuit 204 and the motion detection result from the motion detection circuit 601. To do. Reference numeral 205 denotes an image composition circuit, which is based on the calculation result (α ′ image) calculated by the final composition ratio calculation circuit 602 for the low-exposure image and the high-exposure image after gain processing output from the gain processing circuits 202 and 203. Synthesize at the synthesis ratio.

上記構成による合成処理動作について、図7のフローチャートを用いて説明する。   The composition processing operation with the above configuration will be described with reference to the flowchart of FIG.

ステップS701において、システム制御部50で所持している値の初期化が行われる。   In step S701, the value possessed by the system control unit 50 is initialized.

ステップS702において、システム制御部50は入力された長時間露光信号Sにより露光された画像と短時間露光信号Ssにより露光された画像のうち、どちらの画像をゲインマップ生成する際の基準画像とするかの選定を行う。本実施形態においては、短時間露光信号Sにより露光された画像を基準画像と選定し、長時間露光信号Sを非基準画像と選定した例について説明する。 In step S702, the system control unit 50 of the exposed image by the exposed by long exposure signal S L that is input image short exposure signal Ss, either the image and the reference image at the time of gain map generator Select whether to do. In the present embodiment, short image exposed by the exposure signal S S selects a reference image, for a long time an example of an exposure signal S L were selected as non-reference image will be described.

ステップS703において、ステップS702で選定した基準画像を基に、ゲインマップ生成回路201においてゲインマップ画像を生成する。ゲインマップは、画像サイズと同サイズであり、画素値は乗算すべきゲイン乗算値を表している。   In step S703, the gain map generation circuit 201 generates a gain map image based on the reference image selected in step S702. The gain map has the same size as the image size, and the pixel value represents a gain multiplication value to be multiplied.

ゲインマップの生成方法に関しては、前述で説明した通り、基準画像を図4(b)に示すように、n×mブロックにブロック分割して各々のブロックの輝度ヒストグラムを算出する。また、各々のブロックが空・人・背景領域のどの領域に対応しているか分析して領域判定し領域毎の輝度ヒストグラムを算出する。   Regarding the method of generating the gain map, as described above, the reference image is divided into n × m blocks as shown in FIG. 4B, and the luminance histogram of each block is calculated. In addition, an area is determined by analyzing which of the sky, human, and background areas each block corresponds to, and a luminance histogram for each area is calculated.

この領域毎の輝度ヒストグラムの結果を基に、輝度が高い空領域のブロックのゲインマップの画素値は小さいゲイン値に、逆光シーンの顔領域のように輝度が低い領域のゲインマップの画素値は大きいゲイン値、中間の輝度値であれば中間のゲイン値となるようにゲイン量を制御してゲインマップを生成する。また、高露出画像に乗算するゲインマップは、低露出画像に対して生成したゲインマップに対し、露出段差分ゲインを掛けて生成する。   Based on the result of the brightness histogram for each area, the pixel value of the gain map of the block in the sky area with high brightness is set to a small gain value, and the pixel value of the gain map in the area of low brightness such as the face area of the backlight scene is A gain map is generated by controlling the amount of gain so that the gain value is an intermediate gain value if it is a large gain value or an intermediate luminance value. Further, the gain map for multiplying the high exposure image is generated by multiplying the gain map generated for the low exposure image by the gain corresponding to the exposure step.

ステップS704において、合成比率算出回路204において、α画像を生成する。生成されるα画像は、前述で説明した通り、図5に示すような合成比率特性に基づいて合成する比率値を算出される。   In step S704, the composition ratio calculation circuit 204 generates an α image. As described above, a ratio value to be synthesized is calculated based on a synthesis ratio characteristic as shown in FIG.

ステップS705において、ゲイン処理回路202、203において、低露出画像、高露出画像に対し、ゲインマップ生成回路201で生成したゲインマップを各々乗算するゲイン処理を行う。   In step S705, the gain processing circuits 202 and 203 perform gain processing for multiplying the low exposure image and the high exposure image by the gain map generated by the gain map generation circuit 201, respectively.

ステップS706において、動き検出回路601において、ステップS705でゲイン乗算後の基準画像と非基準画像との動き検出をする。具体的には、ゲイン処理後の高露出画像・低露出画像の輝度差分値を算出し、差分値が所定の閾値以上の領域を動き領域として検出する。   In step S706, the motion detection circuit 601 detects motion between the reference image and the non-reference image after gain multiplication in step S705. Specifically, a luminance difference value between the high-exposure image and the low-exposure image after gain processing is calculated, and an area where the difference value is equal to or greater than a predetermined threshold is detected as a motion area.

ステップS707において、最終合成比率算出回路602において、ステップS704で生成されたα画像と、ステップS706で検出した動き検出結果基に最終合成比率を算出する。具体的には、α画像の画素値が高露出画像と低露出画像をブレンドする比率値になっている場合に限り、動き検出回路601の検出結果を最終合成比率に反映させる。例えば、α画像の画素値が、高露出画像もしくは低露出画像を100%の比率で合成する領域に関しては、動き検出回路601の結果を用いずに、α画像の画素値が高露出画像と低露出画像をブレンドする比率値であり、且つ動き検出回路601において動き領域として検出された領域は、低露出画像の合成比率を100%とするよう最終合成比率を制御する。本説明においては、低露出画像の合成比率を100%とする例について説明したが、α画像でどちらかの画像を100%出力する比率となっている領域においては、動き検出回路601の結果を用いなければ、これに限らない。   In step S707, the final composition ratio calculation circuit 602 calculates the final composition ratio based on the α image generated in step S704 and the motion detection result detected in step S706. Specifically, the detection result of the motion detection circuit 601 is reflected in the final composition ratio only when the pixel value of the α image is a ratio value for blending the high exposure image and the low exposure image. For example, in a region where the pixel value of the α image is a combination of the high exposure image or the low exposure image at a ratio of 100%, the pixel value of the α image is low compared to the high exposure image without using the result of the motion detection circuit 601. The area that is a ratio value for blending the exposure images and that is detected as a motion area in the motion detection circuit 601 controls the final composition ratio so that the composition ratio of the low-exposure image is 100%. In this description, an example in which the composition ratio of the low-exposure image is set to 100% has been described. However, the result of the motion detection circuit 601 is obtained in the region where either image is output at 100% in the α image. If not used, it is not limited to this.

ステップS708において、ステップS707で算出した最終合成比率を基に画像合成回路205において低露出画像と高露出画像を合成する。   In step S708, the image composition circuit 205 synthesizes the low exposure image and the high exposure image based on the final composition ratio calculated in step S707.

以上、露出の異なる2枚の画像の位置が少しずれてしまった場合に、2枚の位置ずれを考慮した画像処理装置の合成処理動作について説明した。これにより、被写体がわずかに移動もしくは撮影者の手ぶれによりカメラがわずかに動いたとしても、合成比率算出回路204において、ゲインマップを基に生成したα画像が低露出画像、もしくは高露出画像どちらか一方を100%出力する領域内であった場合には、動き検出結果を用いないよう最終合成比率を制御する為、合成画像の画質が向上するといった効果がある。   As described above, the composition processing operation of the image processing apparatus considering the positional deviation of two images when the positions of the two images having different exposures are slightly shifted has been described. As a result, even if the subject moves slightly or the camera moves slightly due to the camera shake of the photographer, the α image generated based on the gain map in the synthesis ratio calculation circuit 204 is either a low exposure image or a high exposure image. If one is within the region where 100% is output, the final composition ratio is controlled so that the motion detection result is not used, so that the image quality of the composite image is improved.

また、本実施例においては、空・人・背景といった領域に基づいて輝度分布を分析しα画像を生成している為、領域毎にある一定の範囲内のα値となるα画像が生成される傾向にある。よって、例えば逆光シーンで暗くなってしまう人の領域内は高露出画像の合成比率を100%とするようなα画像が生成されることになり、仮に人体内で手などが微量に動いたとしてもその領域においては動き検出結果を用いずに高露出画像を100%の比率で合成するよう制御することとなり、人体内の手が2重像になるといった弊害を防ぐことが出来る。   In the present embodiment, the luminance distribution is analyzed based on the sky, people, background, and the like to generate an α image. Therefore, an α image having an α value within a certain range is generated for each region. It tends to be. Therefore, for example, in an area of a person who becomes dark in a backlight scene, an α image is generated in which the composition ratio of the high-exposure image is set to 100%. However, in this region, control is performed so that the high-exposure image is synthesized at a ratio of 100% without using the motion detection result, and it is possible to prevent the adverse effect that the hand in the human body becomes a double image.

なお、本実施形態においては、最終合成比率算出回路602において、合成比率算出回路204で生成したα画像の画素値が高露出画像と低露出画像をブレンドする比率値になっている場合に限り、動き検出回路601の検出結果を最終合成比率に反映させる例について説明したが、これに限ったものではない。例えば、動き検出結果の結果を用いるか否かは、α画像の画素値において所定の閾値範囲を設ける構成としても良い。例えば、α画像の画素値が所定のレベル以下(第1レベル以下)の場合、及び所定のレベル以上(第2レベル以上)の場合に動き検出結果を用いないといった構成にしても良い。   In the present embodiment, only when the pixel value of the α image generated by the composition ratio calculation circuit 204 is a ratio value for blending the high exposure image and the low exposure image in the final composition ratio calculation circuit 602. Although the example in which the detection result of the motion detection circuit 601 is reflected in the final composition ratio has been described, the present invention is not limited to this. For example, whether or not to use the result of the motion detection result may be configured to provide a predetermined threshold range in the pixel value of the α image. For example, the configuration may be such that the motion detection result is not used when the pixel value of the α image is a predetermined level or lower (first level or lower), or higher than a predetermined level (second level or higher).

なお、本実施形態においては、低露出画像・高露出画像の計2枚の画像を合成する例について説明したが、露出の異なる3枚以上の画像を合成する構成としても良い。   In the present embodiment, an example in which two low-exposure images and high-exposure images are combined has been described. However, a configuration in which three or more images with different exposures are combined may be used.

50 システム制御部
100 デジタルカメラ
103 撮像部
105 画像処理部
106 メモリ
107 メモリ制御部
109 表示部
111 記録媒体
115 操作部
DESCRIPTION OF SYMBOLS 50 System control part 100 Digital camera 103 Image pick-up part 105 Image processing part 106 Memory 107 Memory control part 109 Display part 111 Recording medium 115 Operation part

Claims (6)

複数の画像を合成する画像処理装置であって、
第一の画像と第二の画像の少なくとも一方の輝度に応じて、画像合成の合成比率を決める合成比率画像を生成する生成手段と、
第一の画像と第二の画像のずれを検出する検出手段と、
前記合成比率画像と前記検出手段より出力される検出結果に応じて、第一の画像と第二の画像の最終合成比率を制御する制御手段と、を有し、
前記制御手段は、合成比率画像において第一の画像と第二の画像を重み付け合成する領域に限り、前記検出手段の検出結果を用いる、ことを特徴とする画像処理装置。
An image processing apparatus for combining a plurality of images,
Generating means for generating a composition ratio image for determining a composition ratio of image composition in accordance with the luminance of at least one of the first image and the second image;
Detecting means for detecting a shift between the first image and the second image;
Control means for controlling the final composition ratio of the first image and the second image according to the composition ratio image and the detection result output from the detection means;
The image processing apparatus according to claim 1, wherein the control unit uses a detection result of the detection unit only in a region where the first image and the second image are weighted and combined in the combination ratio image.
複数の画像を合成する画像処理装置であって、
第一の画像と第二の画像の少なくとも一方の輝度に応じて、画像合成の合成比率画像を生成する生成手段と、
第一の画像と第二の画像のずれを検出する検出手段と、
前記生成手段により生成された合成比率画像と前記検出手段より出力される検出結果に応じて、第一の画像と第二の画像の最終合成比率を制御する制御手段と、を有し、
制御手段は、合成比率画像の合成比率に応じて、前記検出手段の動き検出結果を用いるか否かを制御することを特徴とする画像処理装置。
An image processing apparatus for combining a plurality of images,
Generating means for generating a composite ratio image of image synthesis according to the luminance of at least one of the first image and the second image;
Detecting means for detecting a shift between the first image and the second image;
Control means for controlling the final composition ratio of the first image and the second image in accordance with the composition ratio image generated by the generation means and the detection result output from the detection means;
The control means controls whether or not to use the motion detection result of the detection means in accordance with the composition ratio of the composition ratio image.
前記制御手段は、前記合成比率画像の合成比率が所定の第1レベル以下の場合、または所定の第2レベル以上の場合に、前記検出手段の検出結果を用いずに最終合成比率を制御することを特徴とする請求項2に記載の画像処理装置。   The control means controls the final composition ratio without using the detection result of the detection means when the composition ratio of the composition ratio image is not more than a predetermined first level or not less than a predetermined second level. The image processing apparatus according to claim 2. 画像にトーンマッピング処理をするトーンマッピング処理手段を備え、
トーンマッピング処理後の第一の画像と第二の画像に対し、前記制御手段は、前記生成手段より生成された合成比率画像と、前記検出手段より出力される検出結果に応じて、第一の画像と第二の画像の最終合成比率を制御することを特徴とする請求項1から請求項3のいずれかに記載の画像処理装置。
Tone mapping processing means for performing tone mapping processing on an image;
For the first image and the second image after the tone mapping process, the control means determines the first ratio according to the composite ratio image generated by the generation means and the detection result output from the detection means. The image processing apparatus according to any one of claims 1 to 3, wherein a final composition ratio of the image and the second image is controlled.
前記生成手段は、第一の画像または第二の画像において、被写体の領域毎に輝度分布を算出し、算出結果に基づいて合成比率画像を生成することを特徴とする請求項1から請求項4のいずれかに記載の画像処理装置。   The generation unit calculates a luminance distribution for each region of the subject in the first image or the second image, and generates a composite ratio image based on the calculation result. An image processing apparatus according to any one of the above. 前記生成手段が生成する合成比率画像は、被写体の領域毎にある一定の範囲内の合成比率になることを特徴とする請求項5に記載の画像処理装置。   6. The image processing apparatus according to claim 5, wherein the composition ratio image generated by the generation unit is a composition ratio within a certain range for each region of the subject.
JP2016183800A 2016-09-21 2016-09-21 Image processing apparatus Pending JP2018050149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016183800A JP2018050149A (en) 2016-09-21 2016-09-21 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016183800A JP2018050149A (en) 2016-09-21 2016-09-21 Image processing apparatus

Publications (1)

Publication Number Publication Date
JP2018050149A true JP2018050149A (en) 2018-03-29

Family

ID=61766620

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016183800A Pending JP2018050149A (en) 2016-09-21 2016-09-21 Image processing apparatus

Country Status (1)

Country Link
JP (1) JP2018050149A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020006685A1 (en) * 2018-07-03 2020-01-09 深圳前海达闼云端智能科技有限公司 Method for establishing map, and terminal and computer readable storage medium
US10970827B2 (en) 2018-11-30 2021-04-06 Panasonic Intellectual Property Management Co., Ltd. Image processor and image processing method
CN112929576A (en) * 2021-02-01 2021-06-08 北京字节跳动网络技术有限公司 Image processing method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020006685A1 (en) * 2018-07-03 2020-01-09 深圳前海达闼云端智能科技有限公司 Method for establishing map, and terminal and computer readable storage medium
US10970827B2 (en) 2018-11-30 2021-04-06 Panasonic Intellectual Property Management Co., Ltd. Image processor and image processing method
CN112929576A (en) * 2021-02-01 2021-06-08 北京字节跳动网络技术有限公司 Image processing method, device, equipment and storage medium
CN112929576B (en) * 2021-02-01 2023-08-01 北京字节跳动网络技术有限公司 Image processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6911202B2 (en) Imaging control method and imaging device
US10861136B2 (en) Image processing apparatus, image processing method, and storage medium
JP5665436B2 (en) Image processing apparatus, image processing method, and program
JP5743696B2 (en) Image processing apparatus, image processing method, and program
US8059187B2 (en) Image capturing apparatus
JP2012217102A (en) Image processing device and control method and program for the same
JP2013106149A (en) Imaging apparatus, control method of the same and program
JP2012029014A (en) Image processing device, and control method of the same
JP2014033276A (en) Image processing device, image processing method and program
JP5804856B2 (en) Image processing apparatus, image processing method, and program
JP2016086246A (en) Image processing apparatus and method, and imaging device
JP2019047169A (en) Apparatus, method, and program for generating high dynamic range image
JP2015231118A (en) Image composition device, image composition system and image composition method
JP2010193099A (en) Image capturing apparatus and method of controlling the same
JP2018050149A (en) Image processing apparatus
WO2019124289A1 (en) Device, control method, and storage medium
JP6148497B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP5335964B2 (en) Imaging apparatus and control method thereof
JP2015080157A (en) Image processing device, image processing method and program
JP6570311B2 (en) Image processing apparatus and image processing method
JP6157274B2 (en) Imaging apparatus, information processing method, and program
JP6075829B2 (en) IMAGING DEVICE, CAMERA SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP6990988B2 (en) Control method of image pickup device and image sensor
JP6554009B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND RECORDING MEDIUM
JP2015119436A (en) Imaging apparatus