JP5487884B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5487884B2
JP5487884B2 JP2009254212A JP2009254212A JP5487884B2 JP 5487884 B2 JP5487884 B2 JP 5487884B2 JP 2009254212 A JP2009254212 A JP 2009254212A JP 2009254212 A JP2009254212 A JP 2009254212A JP 5487884 B2 JP5487884 B2 JP 5487884B2
Authority
JP
Japan
Prior art keywords
image
exposure
exposure amount
weight
luminance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009254212A
Other languages
Japanese (ja)
Other versions
JP2011101180A (en
JP2011101180A5 (en
Inventor
雅暢 小林
治久 倉根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2009254212A priority Critical patent/JP5487884B2/en
Publication of JP2011101180A publication Critical patent/JP2011101180A/en
Publication of JP2011101180A5 publication Critical patent/JP2011101180A5/en
Application granted granted Critical
Publication of JP5487884B2 publication Critical patent/JP5487884B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、露光量の異なる複数種類の撮像画像データを合成して、ダイナミックレンジを拡張した画像データを生成するのに好適な画像処理装置、画像処理方法、撮像装置及び電子機器等に関する。   The present invention relates to an image processing apparatus, an image processing method, an imaging apparatus, an electronic apparatus, and the like suitable for generating image data with an extended dynamic range by combining a plurality of types of captured image data having different exposure amounts.

従来、複数種類の露光量(露光時間)で同一被写体を撮像し、この撮像で得られた複数種類の露光量にそれぞれ対応した画素信号を合成して、ダイナミックレンジを拡張した画像データ(HDR画像データ)を生成する技術がある。かかる技術においては、合成画像における、各露光量に対応する画像部分と他の露光量に対応する画像部分との境界領域に発生するノイズ(偽色、疑似輪郭など)がしばしば問題となっていた。   Conventionally, image data (HDR image) in which the same subject is imaged with a plurality of types of exposure amounts (exposure times), and pixel signals corresponding to the plurality of types of exposure amounts obtained by the imaging are combined to expand the dynamic range. Data). In such a technique, noise (false color, pseudo contour, etc.) generated in a boundary region between an image portion corresponding to each exposure amount and an image portion corresponding to another exposure amount in the composite image is often a problem. .

例えば、露光量L1、L2(L1<L2)に対応する露光時間T1、T2(T1<T2)で同一被写体を撮像して、画素信号D1(T1に対応)、D2(T2に対応)が得られたとする。この場合に、図12(a)及び(b)に示すように、D1の傾きをD2の傾きに合わせるために、画素信号D1に係数「T2/T1」を乗算して正規化を行う。次に、正規化した「D1×T2/T1」と、「D2」とを線形合成する。これにより、図12(c)に示すように、ダイナミックレンジを拡張した(S/Nの良い)撮像画像信号が得られる。   For example, the same subject is imaged at exposure times T1 and T2 (T1 <T2) corresponding to the exposure amounts L1 and L2 (L1 <L2), and pixel signals D1 (corresponding to T1) and D2 (corresponding to T2) are obtained. Suppose that In this case, as shown in FIGS. 12A and 12B, normalization is performed by multiplying the pixel signal D1 by a coefficient “T2 / T1” in order to match the slope of D1 with the slope of D2. Next, the normalized “D1 × T2 / T1” and “D2” are linearly synthesized. As a result, as shown in FIG. 12C, a captured image signal with an extended dynamic range (good S / N) is obtained.

しかし、「D1×T2/T1」の傾きとD2の傾きとに微妙な差が生じた場合に、合成後の撮像画像信号の線形性が崩れる恐れがある。線形性が崩れると、「D1×T2/T1」の画像とD2の画像との境界領域において、偽色や疑似輪郭等の原因となるノイズが発生する場合がある。
このような問題を解決するために、画像の重み付け合成が従来から用いられている。例えば、特許文献1では、2組の合成画像のうち、より明るい方の明度情報をもとに重みが変わる関数f、gを用意し、合成後の画像D0を、下式(1)により求めている。

D0=(D1×T2/T1)×f(D2)+D2×g(D2) ・・・(1)

また、特許文献2では、オーバーラップ領域(信号の80%〜100%)を予め設定しておき、2つの画像を合成する際に、より長い露光時間の画像がオーバーラップ領域に達している部分、即ちハイライト部分で、飽和しにくいより短い露光時間の画像との重み付け合成を行っている。
However, if there is a slight difference between the slope of “D1 × T2 / T1” and the slope of D2, the linearity of the captured image signal after synthesis may be lost. If the linearity is lost, noise that may cause false colors or pseudo contours may occur in the boundary region between the “D1 × T2 / T1” image and the D2 image.
In order to solve such a problem, weighted image synthesis has been conventionally used. For example, in Patent Document 1, functions f and g whose weights change based on lighter brightness information among two sets of synthesized images are prepared, and a synthesized image D0 is obtained by the following equation (1). ing.

D0 = (D1 × T2 / T1) × f (D2) + D2 × g (D2) (1)

Further, in Patent Document 2, an overlap region (80% to 100% of a signal) is set in advance, and when two images are combined, an image having a longer exposure time reaches the overlap region. That is, weighting synthesis is performed with an image having a shorter exposure time that is less likely to be saturated in the highlight portion.

特許第3084189号公報Japanese Patent No. 3084189 特許第2970440号公報Japanese Patent No. 2970440

しかしながら、上記特許文献1の従来技術においては、露光量の異なる4枚の画像を重み付け合成する場合に、上式(1)を用いた合成方法では、2枚ずつの画像合成にしか対応していない。そのため、例えば、D1〜D4の4画素を重み付け合成するためには、図13に示すように、合計6回もの合成処理を行う必要があり、合成する画像の枚数が増加するほど計算量が飛躍的に増加する。   However, in the prior art disclosed in Patent Document 1, when four images having different exposure amounts are weighted and combined, the combining method using the above equation (1) only supports two images. Absent. Therefore, for example, in order to perform weighted synthesis of four pixels D1 to D4, it is necessary to perform synthesis processing six times in total as shown in FIG. 13, and the calculation amount jumps as the number of images to be synthesized increases. Increase.

また、上記特許文献2の従来技術においては、重み付け合成の行われる領域が、オーバーラップ領域に限定されるため、重み付け合成されているハイライト部分とそうでない部分とに、不自然な繋ぎ目が発生する恐れがある。
そこで、本発明は、このような従来の技術の有する未解決の課題に着目してなされたものである。本発明の幾つかの態様によれば、多段露光によって得られた画像を重み付け合成するのに好適な画像処理装置、画像処理方法、撮像装置及び電子機器を提供できる。
Moreover, in the prior art of the above-mentioned Patent Document 2, since the area where the weighted composition is performed is limited to the overlap area, an unnatural joint is formed between the highlighted part that is weighted and the part that is not. May occur.
Therefore, the present invention has been made paying attention to such unsolved problems of the conventional technology. According to some aspects of the present invention, it is possible to provide an image processing device, an image processing method, an imaging device, and an electronic apparatus suitable for weighted synthesis of images obtained by multistage exposure.

上記目的を達成するために、本発明にかかるひとつの画像処理装置は、3種類以上の露光量で被写体を撮像して得られた3種類以上の画像を用いた画像合成を行う画像処理装置であって、第1の画像の輝度と第2の画像の輝度とに基づき前記画像合成における前記第1の画像の重みを算出する重み計算部と、前記重み計算部において算出された重みを用いて前記画像合成を行う画像合成部と、前記画像合成の結果の画像から得られる統計情報により前記3種類以上の露光量を調整するための情報を生成する画像解析部と、を含み前記第1の画像の露光量は前記3種類以上の露光量において最小となる露光量以外及び最大となる露光量以外の露光量であり、前記第2の画像の露光量は前記第1の画像の露光量よりも大きく、且つ、前記3種類以上の露光量の中で前記第1の画像の露光量の次に大きい露光量であることを特徴とする。
上記のひとつの画像処理装置において、前記3種類以上の露光量で撮像された画像において、最小の露光量で撮像された画像を第3の画像とし、前記第3の画像の次に大きい露光量で撮像された画像を第4の画像としたときに、前記重み計算部において、前記第3の画像の重みが前記第4の画像の輝度を基に算出され、最大の露光量で撮像された画像を第5の画像とし、前記第5の画像の次に小さい露光量で撮像された画像を第6の画像としたときに、前記重み計算部において、前記第5の画像の重みが前記第6の画像の輝度を基に算出されることが好ましい。
上記のひとつの画像処理装置において、前記統計情報は、複数の前記画像合成の結果から求めた平均輝度であることが好ましい。
上記目的を達成するために、本発明にかかるひとつの画像処理方法は、3種類以上の露光量で被写体を撮像して得られた3種類以上の画像を用いた画像合成を行う画像処理方法であって、第1の画像の輝度と第2の画像の輝度とに基づき前記画像合成における前記第1の画像の重みを算出する重み計算のステップと、前記重み計算部において算出された重みを用いて前記画像合成を行う画像合成のステップと、前記画像合成の結果の画像から得られる統計情報により前記3種類以上の露光量を調整するための情報を生成する画像解析のステップと、を含み前記第1の画像の露光量は前記3種類以上の露光量において最小となる露光量以外並びに最大となる露光量以外の露光量であり、前記第2の画像の露光量は前記第1の画像の露光量よりも大きく、且つ、前記3種類以上の露光量の中で前記第1の画像の露光量の次に大きい露光量であることを特徴とする。
上記のひとつの画像処理方法において、前記3種類以上の露光量で撮像された画像において、最小の露光量で撮像された画像を第3の画像とし、前記第3の画像の次に大きい露光量で撮像された画像を第4の画像としたときに、前記重み計算のステップにおいて、前記第3の画像の重みが前記第4の画像の輝度を基に算出され、最大の露光量で撮像された画像を第5の画像とし、前記第5の画像の次に小さい露光量で撮像された画像を第6の画像としたときに、前記重み計算のステップにおいて、前記第5の画像の重みが前記第6の画像の輝度を基に算出されることが好ましい。
上記のひとつの画像処理方法において、前記統計情報は、複数の前記画像合成の結果から求めた平均輝度であることが好ましい。
〔形態1〕 上記目的を達成するために、形態1の画像処理装置は、
3種類以上の露光量で被写体を撮像して得られた3種類以上の画像のうち、第1の画像の輝度と、該第1の画像の次に露光量の大きい第2の画像の輝度とに基づき、該第1の画像に対して画像合成時に用いる重みを算出する重み算出手段と、
前記重み算出手段で算出した重みを用いて、前記3種類以上の画像の重み付け加算を行い、画像を合成する画像合成手段と、を備える。
In order to achieve the above object, one image processing apparatus according to the present invention is an image processing apparatus that performs image composition using three or more types of images obtained by imaging a subject with three or more types of exposure amounts. A weight calculation unit that calculates the weight of the first image in the image composition based on the luminance of the first image and the luminance of the second image, and the weight calculated by the weight calculation unit. An image synthesis unit that performs the image synthesis; and an image analysis unit that generates information for adjusting the three or more types of exposure amounts based on statistical information obtained from an image obtained as a result of the image synthesis. The exposure amount of the image is an exposure amount other than the minimum exposure amount and the maximum exposure amount among the three or more types of exposure amounts, and the exposure amount of the second image is greater than the exposure amount of the first image. Larger than the above three types Wherein the of the next large exposure amount of the exposure amount of the first image in the exposure amount.
In the one image processing apparatus described above, in the image captured with the three or more types of exposure amounts, the image captured with the minimum exposure amount is set as a third image, and the next largest exposure amount after the third image When the image captured in step 4 is the fourth image, the weight calculation unit calculates the weight of the third image based on the luminance of the fourth image and captures the image with the maximum exposure amount. When the image is the fifth image and the image captured with the second smallest exposure amount after the fifth image is the sixth image, the weight calculation unit determines that the weight of the fifth image is the first image. It is preferable to calculate based on the luminance of the six images.
In the one image processing apparatus described above, it is preferable that the statistical information is an average luminance obtained from a plurality of results of the image synthesis.
In order to achieve the above object, one image processing method according to the present invention is an image processing method for performing image composition using three or more images obtained by imaging a subject with three or more exposure amounts. A weight calculation step of calculating a weight of the first image in the image composition based on the luminance of the first image and the luminance of the second image, and the weight calculated by the weight calculation unit. Image synthesis for performing the image synthesis, and image analysis for generating information for adjusting the three or more types of exposure amounts based on statistical information obtained from the image as a result of the image synthesis. The exposure amount of the first image is an exposure amount other than the minimum exposure amount and the maximum exposure amount among the three or more types of exposure amounts, and the exposure amount of the second image is the exposure amount of the first image. More than exposure Hear, and characterized in that it is a next highest exposure amount of the exposure amount of the first image among the three or more exposure.
In the one image processing method described above, in the image captured with the three or more types of exposure amounts, the image captured with the minimum exposure amount is set as a third image, and the next largest exposure amount after the third image In the weight calculation step, the weight of the third image is calculated based on the luminance of the fourth image, and is captured with the maximum exposure amount. In the weight calculation step, the weight of the fifth image is set to be the fifth image, and the sixth image is the image captured with the next smallest exposure amount after the fifth image. It is preferable to calculate based on the luminance of the sixth image.
In the one image processing method described above, it is preferable that the statistical information is an average luminance obtained from a plurality of results of the image synthesis.
[Mode 1] In order to achieve the above object, an image processing apparatus according to mode 1 includes:
Among the three or more types of images obtained by imaging the subject with three or more types of exposure amounts, the luminance of the first image and the luminance of the second image having the next largest exposure amount after the first image Weight calculating means for calculating a weight to be used at the time of image synthesis for the first image,
Image synthesis means for performing weighted addition of the three or more types of images using the weights calculated by the weight calculation means and synthesizing the images.

このような構成であれば、重み付け算出手段によって、3種類以上の露光量で被写体を撮像して得られた3種類以上の画像のうち、第1の画像の輝度と、該第1の画像の次に露光量の大きい第2の画像の輝度とに基づき、第1の画像の画像合成に用いる重みが算出される。
例えば、4種類の露光量L1、L2、L3、L4(L1<L2<L3<L)で被写体を撮像して得られた画像S1〜S4について重みの算出を行う場合に、例えば、画像S2の重みについては、S2の輝度と、S3の輝度とに基づき重みが算出されることになる。
With such a configuration, the luminance of the first image among the three or more types of images obtained by imaging the subject with the three or more types of exposure amounts by the weight calculation unit, and the first image Next, based on the brightness of the second image having the large exposure amount, a weight used for image synthesis of the first image is calculated.
For example, when calculating weights for images S1 to S4 obtained by imaging a subject with four types of exposure amounts L1, L2, L3, and L4 (L1 <L2 <L3 <L), for example, As for the weight, the weight is calculated based on the luminance of S2 and the luminance of S3.

ここで、重みの算出は、重み付けの必要な露光量の画像の全てについて行う。例えば、重み付けの必要な露光量の画像が2種類以上ある場合は、そのそれぞれを第1の画像とし、そのそれぞれの次に露光量の大きい画像を第2の画像として重みを算出する。
重みが算出されると、画像合成手段によって、算出した重みを用いて、3種類以上の画像の重み付け加算が行われ、画像が合成される。
以上のことから、合成する画像のうち、露光量の大きさが隣り合う2つの画像の明度に基づき露光量の小さい方の画像の重みを算出することができる。これにより、露光量の大きい方の画像の明度のみに基づき重みを算出するよりも滑らかな線形合成が可能になるという効果が得られる。
Here, the calculation of the weight is performed for all images having an exposure amount that needs to be weighted. For example, when there are two or more types of images having exposure amounts that need to be weighted, the weights are calculated by setting each of the images as the first image and the second image having the next largest exposure amount as the second image.
When the weights are calculated, the image combining means performs weighted addition of three or more types of images using the calculated weights to combine the images.
From the above, among the images to be combined, the weight of the image with the smaller exposure amount can be calculated based on the brightness of the two images whose exposure amounts are adjacent to each other. As a result, it is possible to obtain an effect that smoother linear composition is possible than calculating the weight based only on the brightness of the image with the larger exposure amount.

〔形態2〕 更に、形態2の撮像装置は、形態1の撮像装置において、
前記重み算出手段は、前記3種類以上の画像のうち、露光量が最小及び最大となる2種類の画像以外の画像について、前記第1の画像の輝度と、前記第2の画像の輝度とに基づき重みを算出する。
このような構成であれば、重み算出手段によって、露光量が最小及び最大となる2種類の画像を除く、残りの中間の露光量について、第1の画像の輝度と第2の画像の輝度とに基づき重みが算出される。
これにより、露光量の大きい方の画像の明度のみに基づき重みを算出するよりも滑らかな線形合成が可能になるという効果が得られる。
[Mode 2] Furthermore, the imaging apparatus of mode 2 is the imaging apparatus of mode 1,
The weight calculation means is configured to set the luminance of the first image and the luminance of the second image for images other than the two types of images having the minimum and maximum exposure amounts among the three or more types of images. Based on this, the weight is calculated.
With such a configuration, the weight calculation means excludes the two types of images having the minimum and maximum exposure amounts, and the remaining intermediate exposure amounts are the luminances of the first image and the second image. The weight is calculated based on
As a result, it is possible to obtain an effect that smoother linear composition is possible than calculating the weight based only on the brightness of the image with the larger exposure amount.

〔形態3〕 更に、形態3の撮像装置は、形態1又は2の撮像装置において、
前記重み算出手段は、前記重みを、画像の輝度を要素xとし、関数値が輝度の大きさに応じて増加する関数F(x)によって算出した値を用いて算出する。
このような構成であれば、重み算出手段によって、輝度xの大きさに応じて増加する関数F(x)によって算出した値を用いて第1の画像に対する重みを算出することができる。
[Mode 3] Furthermore, the imaging device of mode 3 is the imaging device of mode 1 or 2,
The weight calculation means calculates the weight using a value calculated by a function F (x) in which the luminance of the image is an element x and the function value increases according to the luminance.
With such a configuration, the weight for the first image can be calculated by the weight calculation means using the value calculated by the function F (x) that increases according to the magnitude of the luminance x.

これによって、第2の画像の輝度が大きければ大きいほど、第1の画像に対する重みを大きくすることができるので、例えば、第1の画像の輝度が非飽和で、第2の画像の輝度が飽和している場合に、その飽和部分を第1の画像で補完してやることができる。
従って、露光量の大きい方の画像の明度のみに基づき重みを算出するよりも滑らかな線形合成が可能になるという効果が得られる。
As a result, the greater the luminance of the second image, the greater the weight for the first image. For example, the luminance of the first image is non-saturated and the luminance of the second image is saturated. In this case, the saturated portion can be complemented with the first image.
Therefore, it is possible to obtain an effect that smoother linear synthesis is possible than calculating the weight based only on the brightness of the image with the larger exposure amount.

〔形態4〕 更に、形態4の撮像装置は、形態3の撮像装置において、
前記重み算出手段は、前記関数として、前記要素xに対する算出値が、より急峻に変化する第1の関数F1(x)と、より緩やかに変化する第2の関数F2(x)とを切り替えて用いる。
このような構成であれば、重み算出手段によって、重みの算出に、第1の関数F1(x)と、第2の関数F2(x)とを切り替えて用いることができる。
つまり、より急峻に変化する関数F1(x)を用いた場合は、該当の画像の混合度合いをより強くすることができ、より緩やかに変化する関数F2(x)を用いた場合は、該当の画像の混合度合いをより弱くすることができる。
これによって、複数種類の画像の混合度合いを変化させることができ、より適切な重みを算出することができるという効果が得られる。
[Mode 4] Furthermore, the imaging device of mode 4 is the imaging device of mode 3,
The weight calculation means switches, as the function, a first function F1 (x) in which a calculated value for the element x changes more rapidly and a second function F2 (x) in which the calculation value changes more gradually. Use.
With such a configuration, the weight calculation unit can switch between the first function F1 (x) and the second function F2 (x) for calculation of the weight.
That is, when the function F1 (x) that changes more steeply is used, the degree of mixing of the corresponding image can be made stronger, and when the function F2 (x) that changes more slowly is used, The degree of image mixing can be made weaker.
As a result, it is possible to change the degree of mixing of a plurality of types of images and to obtain an effect that a more appropriate weight can be calculated.

〔形態5〕 一方、上記目的を達成するために、形態4の画像処理方法は、
3種類以上の露光量で被写体を撮像して得られた3種類以上の画像のうち、第1の画像の輝度と、該第1の画像の次に露光量の大きい第2の画像の輝度とに基づき、該第1の画像に対して画像合成時に用いる重みを算出する重み算出ステップと、
前記重み算出ステップで算出した重みを用いて、前記3種類以上の画像の重み付け加算を行い、画像を合成する画像合成ステップと、を含む。
このような構成であれば、形態1に記載の画像処理装置と同等の作用及び効果が得られる。
[Mode 5] On the other hand, in order to achieve the above object, an image processing method according to mode 4 includes:
Among the three or more types of images obtained by imaging the subject with three or more types of exposure amounts, the luminance of the first image and the luminance of the second image having the next largest exposure amount after the first image A weight calculating step for calculating a weight to be used for image synthesis on the first image, based on
An image synthesis step of performing weighted addition of the three or more types of images using the weights calculated in the weight calculation step, and synthesizing the images.
With such a configuration, operations and effects equivalent to those of the image processing apparatus described in aspect 1 can be obtained.

〔形態6〕 また、上記目的を達成するために、形態5の画像処理プログラムは、
3種類以上の露光量で被写体を撮像して得られた3種類以上の画像のうち、第1の画像の輝度と、該第1の画像の次に露光量の大きい第2の画像の輝度とに基づき、該第1の画像に対して画像合成時に用いる重みを算出する重み算出ステップと、
前記重み算出ステップで算出した重みを用いて、前記3種類以上の画像の重み付け加算を行い、画像を合成する画像合成ステップとを有する処理をコンピューターに実行させるためのプログラムを含む。
このような構成であれば、コンピューターによってプログラムが実行されると、形態1に記載の画像処理装置と同等の作用及び効果が得られる。
[Mode 6] In order to achieve the above object, an image processing program according to mode 5
Among the three or more types of images obtained by imaging the subject with three or more types of exposure amounts, the luminance of the first image and the luminance of the second image having the next largest exposure amount after the first image A weight calculating step for calculating a weight to be used for image synthesis on the first image, based on
A program for causing a computer to execute a process including a weighted addition of the three or more types of images using the weight calculated in the weight calculating step and an image combining step of combining the images.
With such a configuration, when the program is executed by a computer, the same operations and effects as those of the image processing apparatus described in the first embodiment can be obtained.

〔形態7〕 また、上記目的を達成するために、形態7の撮像装置は、
N種類(Nは3以上の自然数)の露光量で被写体を撮像する撮像手段と、
形態1乃至4のいずれか1に記載の画像処理装置と、を備え、
前記画像処理装置は、前記撮像手段で撮像して得られたN種類の露光量に対応するN種類の画像のうち、少なくとも画像合成に用いる3種類以上の画像について、前記第1の画像に対する重みを算出する。
このような構成であれば、形態1に記載の画像処理装置と同等の作用及び効果が得られる。
〔形態8〕 また、上記目的を達成するために、形態6の電子機器は、
形態7に記載の撮像装置を備える。
このような構成であれば、形態7に記載の撮像装置と同等の作用及び効果が得られる。
[Mode 7] In order to achieve the above object, an imaging apparatus according to mode 7 includes:
Imaging means for imaging a subject with N types of exposures (N is a natural number of 3 or more);
An image processing apparatus according to any one of forms 1 to 4,
The image processing apparatus includes a weight for the first image of at least three types of images used for image synthesis among N types of images corresponding to the N types of exposure amounts obtained by imaging with the imaging unit. Is calculated.
With such a configuration, operations and effects equivalent to those of the image processing apparatus described in aspect 1 can be obtained.
[Mode 8] In order to achieve the above object, an electronic device according to mode 6
The imaging apparatus according to the seventh aspect is provided.
With such a configuration, operations and effects equivalent to those of the imaging device described in aspect 7 can be obtained.

本発明に係る撮像装置1の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an imaging apparatus 1 according to the present invention. (a)は、撮像素子10の内部構成を示す模式図であり、(b)は、HDRセンサ10dの内部構成を示すブロック図である。(A) is a schematic diagram which shows the internal structure of the image pick-up element 10, (b) is a block diagram which shows the internal structure of HDR sensor 10d. 映像信号処理部16の内部構成を示すブロック図である。2 is a block diagram showing an internal configuration of a video signal processing unit 16. FIG. センサセルアレイにおける各画素のライン毎の露光及び画素信号の読み出し動作の一例を示す図である。It is a figure which shows an example of the exposure for every line of each pixel in a sensor cell array, and the read-out operation of a pixel signal. 撮像装置1の動作処理の一例を示すフローチャートである。3 is a flowchart illustrating an example of operation processing of the imaging apparatus 1. HDR合成処理の一例を示すフローチャートである。It is a flowchart which shows an example of a HDR synthetic | combination process. 露光比調整処理の一例を示すフローチャートである。It is a flowchart which shows an example of an exposure ratio adjustment process. (a)〜(d)は、比率が均等となるように決定された露光時間T1〜T4における入射光に対する応答信号S1〜S4の一例を示す図である。(A)-(d) is a figure which shows an example of response signal S1-S4 with respect to incident light in exposure time T1-T4 determined so that a ratio might become equal. (a)〜(d)は、入射光に対する合成重みW1〜W4の一例を示す図である。(A)-(d) is a figure which shows an example of synthetic | combination weight W1-W4 with respect to incident light. 図9(a)〜(d)を重ねて表示した図である。FIG. 10 is a diagram in which FIGS. 9A to 9D are displayed in an overlapping manner. 図8(a)〜(d)における入射光の軸を対数で表した場合の図である。It is a figure at the time of expressing the axis | shaft of the incident light in Fig.8 (a)-(d) by the logarithm. 従来の重み付けなしの場合の合成対象の画像及びHDR合成処理後の画像の光−信号特性の一例を示す図である。It is a figure which shows an example of the light-signal characteristic of the image of the synthetic | combination object in the case of the conventional non-weighting, and the image after HDR synthetic | combination processing. 従来の重み付けありの場合のHDR合成処理に係る計算処理の流れの一例を示す図である。It is a figure which shows an example of the flow of the calculation process which concerns on the HDR synthetic | combination process in the case of the conventional weighting.

以下、本発明の第1実施形態を図面に基づき説明する。図1〜図11は、本発明に係る画像処理装置、画像処理方法、画像処理プログラム、撮像装置及び電子機器の実施形態を示す図である。
まず、本発明に係る撮像装置の構成を図1に基づき説明する。図1は、本発明に係る撮像装置1の構成を示すブロック図である。
撮像装置1は、図1に示すように、撮像素子10と、SW(スイッチ)11と、第1〜第4メモリ12〜15と、映像信号処理部16と、フレームメモリ17と、制御部18と、画像解析部19と、操作部20とを含んで構成される。
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. 1 to 11 are diagrams illustrating embodiments of an image processing apparatus, an image processing method, an image processing program, an imaging apparatus, and an electronic apparatus according to the present invention.
First, the configuration of the imaging apparatus according to the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of an imaging apparatus 1 according to the present invention.
As shown in FIG. 1, the imaging apparatus 1 includes an imaging device 10, a SW (switch) 11, first to fourth memories 12 to 15, a video signal processing unit 16, a frame memory 17, and a control unit 18. And an image analysis unit 19 and an operation unit 20.

次に、図2に基づき、撮像素子10の詳細な構成を説明する。ここで、図2(a)は、撮像素子10の内部構成を示す模式図であり、(b)は、HDRセンサ10dの内部構成を示すブロック図である。
撮像素子10は、複数種類の露光量で被写体を撮像する機能を有し、図2(a)に示すように、レンズ10aと、マイクロレンズ10bと、カラーフィルタアレイ10cと、HDRセンサ10dとを含んで構成される。
Next, based on FIG. 2, the detailed structure of the image pick-up element 10 is demonstrated. Here, FIG. 2A is a schematic diagram showing the internal configuration of the image sensor 10, and FIG. 2B is a block diagram showing the internal configuration of the HDR sensor 10d.
The imaging element 10 has a function of imaging a subject with a plurality of types of exposure amounts, and includes a lens 10a, a microlens 10b, a color filter array 10c, and an HDR sensor 10d as shown in FIG. Consists of including.

以下、説明の便宜上、撮像素子10は、4種類の露光量L1、L2、L3、L4(L1<L2<L3<L4)に対応する露光時間T1、T2、T3、T4(T1<T2<T3<T4)で撮像を行うものとして構成を説明をする。もちろん、露光量は4種類に限らず、3種類又は5種類以上であってもよい。
レンズ10aは、被写体からの反射光を集光して、マイクロレンズへと導くものである。なお、撮像条件などに応じて、単焦点レンズ、ズームレンズ、オートアイリスレンズなどの種類がある。
Hereinafter, for convenience of description, the image sensor 10 has exposure times T1, T2, T3, and T4 (T1 <T2 <T3) corresponding to four types of exposure amounts L1, L2, L3, and L4 (L1 <L2 <L3 <L4). The configuration will be described assuming that imaging is performed at <T4). Of course, the exposure amount is not limited to four, and may be three or five or more.
The lens 10a collects reflected light from the subject and guides it to the microlens. There are types such as a single focus lens, a zoom lens, and an auto iris lens depending on the imaging conditions.

マイクロレンズ10bは、レンズを透過した光をHDRセンサ10dの有するセンサセルアレイの各センサセル(画素)に集光するものである。
カラーフィルタアレイ10cは、マイクロレンズ10bを透過した光から所定の1種類の色要素に対応する波長の光を分離して該分離した光を対応する各画素に入射するカラーフィルター部(以下、CF部と称す)を少なくとも画素数分含んで構成されるものである。
The microlens 10b condenses light transmitted through the lens on each sensor cell (pixel) of the sensor cell array included in the HDR sensor 10d.
The color filter array 10c separates light having a wavelength corresponding to one predetermined type of color element from light transmitted through the microlens 10b, and makes the separated light incident on each corresponding pixel (hereinafter referred to as CF). Part) and at least the number of pixels.

HDRセンサ10dは、電子シャッタ方式によって露光時間T1〜T4を制御して露光量の異なる4種類のデジタルの画像データを出力するものである。
HDRセンサ10dは、図2(b)に示すように、基準タイミング発生器50と、走査ラインスキャナ54と、センサセルアレイ56と、水平転送部58とを含んで構成される。
基準タイミング発生器50は、制御部18からの垂直同期信号及び水平同期信号に基づき、基準タイミング信号を発生し、これを走査ラインスキャナ54に出力する。
The HDR sensor 10d controls the exposure times T1 to T4 by an electronic shutter method and outputs four types of digital image data having different exposure amounts.
As shown in FIG. 2B, the HDR sensor 10d includes a reference timing generator 50, a scan line scanner 54, a sensor cell array 56, and a horizontal transfer unit 58.
The reference timing generator 50 generates a reference timing signal based on the vertical synchronization signal and the horizontal synchronization signal from the control unit 18 and outputs the reference timing signal to the scanning line scanner 54.

走査ラインスキャナ54は、基準タイミング発生器50及び制御部18からの各種信号に基づき、リセット処理を行うラインを有効にするリセットライン選択信号を生成する。そして、該生成したリセットライン選択信号をセンサセルアレイ56に出力する。
更に、走査ラインスキャナ54は、リセット後で且つ設定された露光時間T1〜T4の電荷の蓄積が行われたラインを画素信号の読出ラインとして有効にする読出しライン選択信号を生成する。そして、該生成した読出ライン選択信号をセンサセルアレイ56に出力する。
センサセルアレイ56は、CMOS技術を用いて構成された、受光素子(フォトダイオードなど)を含む複数のセンサセル(画素)が2次元マトリクス状に配設された構成の受光領域を備え、各画素のラインに対して、アドレス線、リセット線及び読出し線が共通に接続された構成を有している。
The scanning line scanner 54 generates a reset line selection signal that validates a line on which reset processing is performed based on various signals from the reference timing generator 50 and the control unit 18. Then, the generated reset line selection signal is output to the sensor cell array 56.
Further, the scanning line scanner 54 generates a readout line selection signal that enables the line on which charges are accumulated after the resetting and for the set exposure times T1 to T4 as the readout line of the pixel signal. Then, the generated read line selection signal is output to the sensor cell array 56.
The sensor cell array 56 includes a light receiving region having a configuration in which a plurality of sensor cells (pixels) including light receiving elements (photodiodes and the like) are arranged in a two-dimensional matrix, which is configured using CMOS technology. On the other hand, the address line, the reset line, and the readout line are connected in common.

そして、前記3つの制御線を介して各種駆動信号(選択信号)が各ラインを構成するセンサセルに送信され、アドレス線及び読出し線が有効になると、信号線を介して蓄積電荷(画素信号)を水平転送部58に転送(出力)する。
このような構成によって、センサセルアレイ56は、走査ラインスキャナ54から供給される選択信号に基づき、アドレス線により、リセット動作又は読出し動作を行わせる画素のラインを有効に(選択)する。そして、当該選択信号で選択したラインの各画素に対して、リセット動作を行わせる場合はリセット線を介してリセット動作を指示する信号を入力し、画素信号の読出しを行わせる場合は、読出し線を介して蓄積電荷の転送を指示する信号を入力する。更に、選択信号によって選択された各画素おいては、リセット動作を指示する信号が入力されたときはリセット動作が行われ、蓄積電荷の転送を指示する信号が入力されたときは、信号線を介して水平転送部58への蓄積電荷の転送が行われる。
Then, various drive signals (selection signals) are transmitted to the sensor cells constituting each line through the three control lines, and when the address line and the readout line become valid, the accumulated charge (pixel signal) is transmitted through the signal line. Transfer (output) to the horizontal transfer unit 58.
With such a configuration, the sensor cell array 56 validates (selects) a pixel line on which a reset operation or a read operation is performed by an address line based on a selection signal supplied from the scanning line scanner 54. When a reset operation is performed on each pixel on the line selected by the selection signal, a signal instructing the reset operation is input via the reset line, and when a pixel signal is read out, a read line is input. A signal for instructing the transfer of the accumulated charge is input via the. Further, in each pixel selected by the selection signal, the reset operation is performed when a signal instructing the reset operation is input, and the signal line is connected when the signal instructing the transfer of the accumulated charge is input. The accumulated charge is transferred to the horizontal transfer unit 58 via the via.

水平転送部58は、センサセルアレイ56の各画素から読み出された画素信号(アナログ信号)のデータをA/D変換して、ライン単位にメモリ12〜15へとシリアルで順次出力する。
図1に戻って、SW11は、撮像素子10から画像データS1〜S4が入力されると、これと対応して入力された識別信号に基づきスイッチを切り替え、第1〜第4メモリ12〜15のうち識別信号が示す露光時間に対応するメモリに、入力された画像データを出力する。具体的に、露光時間T1の画像データS1を第1メモリ12に、露光時間T2の画像データS2を第1メモリ13に、露光時間T3の画像データS3を第3メモリ14に、露光時間T4の画像データS4を第4メモリ15に出力する。
The horizontal transfer unit 58 performs A / D conversion on pixel signal (analog signal) data read from each pixel of the sensor cell array 56, and sequentially outputs the data serially to the memories 12 to 15 in line units.
Returning to FIG. 1, when the image data S <b> 1 to S <b> 4 are input from the image sensor 10, the SW 11 switches a switch based on the identification signal input corresponding to the image data S <b> 1 to S <b> 4. The input image data is output to a memory corresponding to the exposure time indicated by the identification signal. Specifically, the image data S1 of the exposure time T1 is stored in the first memory 12, the image data S2 of the exposure time T2 is stored in the first memory 13, the image data S3 of the exposure time T3 is stored in the third memory 14, and the exposure data of the exposure time T4 is stored. The image data S4 is output to the fourth memory 15.

第1〜第4メモリ12〜15は、SW11を介して入力される、露光時間T1〜T4で被写体を撮像して得られた4種類の露光量L1〜L4に対応する画像データS1〜S4のいずれか対応するものを一時記憶するメモリである。具体的に、SW11を介して順次入力される画像データS1〜S4を、同期をとって映像信号処理部16に出力するバッファとしての役割を果たすメモリである。   The first to fourth memories 12 to 15 store image data S1 to S4 corresponding to the four types of exposure amounts L1 to L4, which are input through the SW11 and obtained by imaging the subject with the exposure times T1 to T4. It is a memory that temporarily stores any corresponding one. Specifically, the memory serves as a buffer that outputs the image data S1 to S4 sequentially input via the SW 11 to the video signal processing unit 16 in synchronization.

映像信号処理部16は、図3に示すように、重み計算部16aと、正規化部16bと、合成部16cとを含んで構成される。ここで、図3は、映像信号処理部16の内部構成を示すブロック図である。
重み計算部16aは、露光時間T1〜T4に対応する画素データS1〜S4について、画像合成時に用いる重みW1〜W4(x,y)(以下、合成重みW1〜W4(x,y)と称す)を計算する機能を有している。
As shown in FIG. 3, the video signal processing unit 16 includes a weight calculation unit 16a, a normalization unit 16b, and a synthesis unit 16c. Here, FIG. 3 is a block diagram showing an internal configuration of the video signal processing unit 16.
The weight calculation unit 16a uses the weights W1 to W4 (x, y) used at the time of image composition for the pixel data S1 to S4 corresponding to the exposure times T1 to T4 (hereinafter referred to as composition weights W1 to W4 (x, y)). It has a function to calculate

具体的に、S1(x,y)の合成重みW1(x,y)を計算するときはS2(x,y)を用いる。また、S2(x,y)の合成重みW2(x,y)を計算するときは、S2(x,y)とS3(x,y)の2つの画素データを用いる。また、S3(x,y)の合成重みW3(x,y)を計算するときは、S3(x,y)とS4(x,y)の2つの画素データを用いて重みを計算する。また、S4(x,y)の合成重みW4(x,y)を計算するときは、合成重みW1〜W4(x,y)の総和が「1」となることを利用して計算を行う。   Specifically, S2 (x, y) is used when calculating the combined weight W1 (x, y) of S1 (x, y). Further, when calculating the composite weight W2 (x, y) of S2 (x, y), two pixel data of S2 (x, y) and S3 (x, y) are used. Further, when calculating the combined weight W3 (x, y) of S3 (x, y), the weight is calculated using two pixel data of S3 (x, y) and S4 (x, y). Further, when calculating the combined weight W4 (x, y) of S4 (x, y), the calculation is performed using the fact that the total sum of the combined weights W1 to W4 (x, y) is “1”.

本実施形態では、重み計算部16aは、下式(2)〜(6)に基づき、合成重みW1〜W4(x,y)を計算する。

F(x)=(x/255)n ・・・(2)
W1(x,y)=F(S2(x,y)) ・・・(3)
W2(x,y)=F(S3(x,y))−W1
=F(S3(x,y))−F(S2(x,y)) ・・・(4)
W3(x,y)=F(S4(x,y))−W2−W1
=F(S4(x,y))−F(S3(x,y)) ・・・(5)
W4(x,y)=1−W3(x,y)−W2(x,y)−W1(x,y)
=1−F(S4(x,y)) ・・・(6)
In the present embodiment, the weight calculation unit 16a calculates composite weights W1 to W4 (x, y) based on the following equations (2) to (6).

F (x) = (x / 255) n (2)
W1 (x, y) = F (S2 (x, y)) (3)
W2 (x, y) = F (S3 (x, y)) − W1
= F (S3 (x, y))-F (S2 (x, y)) (4)
W3 (x, y) = F (S4 (x, y))-W2-W1
= F (S4 (x, y))-F (S3 (x, y)) (5)
W4 (x, y) = 1-W3 (x, y) -W2 (x, y) -W1 (x, y)
= 1-F (S4 (x, y)) (6)

但し、上式(2)は、8ビットの階調範囲(0〜255)のxに対応する式であって、例えば、階調範囲が10ビットであれば、上式(2)の「255」を「1023」とする。このように、要素となるデータのビット数に応じて値を変更する必要がある。
なお、重み計算部16aは、上式(2)〜(6)に従って計算して得られた合成重みW1〜W4(x,y)の情報を、合成部16cに出力する。
正規化部16bは、メモリ12〜15からの画素データS1〜S4(x,y)及び制御部18からの露光比情報に基づき、画素データS1〜S4(x,y)の正規化処理を行う。本実施の形態において、露光比情報は、露光時間T1〜T4の情報となる。
However, the above expression (2) is an expression corresponding to x in the 8-bit gradation range (0 to 255). For example, if the gradation range is 10 bits, “255” in the above expression (2). "Is set to" 1023 ". As described above, it is necessary to change the value according to the number of bits of the data as the element.
The weight calculation unit 16a outputs information on the combination weights W1 to W4 (x, y) obtained by calculation according to the above equations (2) to (6) to the combination unit 16c.
The normalization unit 16b performs normalization processing of the pixel data S1 to S4 (x, y) based on the pixel data S1 to S4 (x, y) from the memories 12 to 15 and the exposure ratio information from the control unit 18. . In the present embodiment, the exposure ratio information is information on exposure times T1 to T4.

具体的に、本実施形態において、正規化部16bは、下式(7)〜(10)に基づき、露光時間T1〜T4を用いてS1〜S4(x,y)の正規化を行い、正規化後の画素データN1〜N4(x,y)を生成する。

N1(x,y)=S1(x,y)×T4/T1 ・・・(7)
N2(x,y)=S2(x,y)×T4/T2 ・・・(8)
N3(x,y)=S3(x,y)×T4/T3 ・・・(9)
N4(x,y)=S4(x,y)×T4/T4 ・・・(10)

なお、正規化部16bは、上式(7)〜(10)に従って計算して得られた正規化画素データN1〜N4(x,y)の情報を、合成部16cに出力する。
Specifically, in the present embodiment, the normalization unit 16b performs normalization of S1 to S4 (x, y) using the exposure times T1 to T4 based on the following expressions (7) to (10), and normalization is performed. Generated pixel data N1 to N4 (x, y) are generated.

N1 (x, y) = S1 (x, y) × T4 / T1 (7)
N2 (x, y) = S2 (x, y) × T4 / T2 (8)
N3 (x, y) = S3 (x, y) × T4 / T3 (9)
N4 (x, y) = S4 (x, y) × T4 / T4 (10)

In addition, the normalization part 16b outputs the information of the normalization pixel data N1-N4 (x, y) obtained by calculating according to said Formula (7)-(10) to the synthetic | combination part 16c.

合成部16cは、重み計算部16aから取得した合成重みW1〜W4(x,y)と、正規化部16bから取得した正規化画素データN1〜N4(x,y)に基づき、HDR合成処理を行い、HDR画素データを生成する機能を有している。
具体的に、本実施形態において、合成部16cは、下式(11)に基づき、正規化画素データN1〜N4(x,y)をW1〜W4(x,y)で重み付けしてから合成し、HDR画素データHDR(x,y)を生成する。

HDR(x,y)=W1(x,y)×N1(x,y)+W2(x,y)×N2(x,y)+W3(x,y)×N3(x,y)+W4(x,y)×N4(x,y)
・・・(11)

なお、合成部16cは、上式(11)に従って計算して得られたHDR画素データHDR(x,y)を、フレームメモリ17に格納する。
図1に戻って、フレームメモリ17は、映像信号処理部16において合成後のHDR画像データを記憶するメモリである。
The combining unit 16c performs HDR combining processing based on the combined weights W1 to W4 (x, y) acquired from the weight calculating unit 16a and the normalized pixel data N1 to N4 (x, y) acquired from the normalizing unit 16b. And has a function of generating HDR pixel data.
Specifically, in the present embodiment, the combining unit 16c combines the normalized pixel data N1 to N4 (x, y) with weights W1 to W4 (x, y) based on the following equation (11). , HDR pixel data HDR (x, y) is generated.

HDR (x, y) = W1 (x, y) × N1 (x, y) + W2 (x, y) × N2 (x, y) + W3 (x, y) × N3 (x, y) + W4 (x, y) × N4 (x, y)
(11)

The synthesizing unit 16c stores the HDR pixel data HDR (x, y) obtained by calculation according to the above equation (11) in the frame memory 17.
Returning to FIG. 1, the frame memory 17 is a memory for storing the HDR image data after the synthesis in the video signal processing unit 16.

また、制御部18は、操作部20からの入力情報に基づき露光比情報を生成する機能と、画像解析部19から取得した統計情報に基づき現在の露光比を適切なものに調整する機能と、生成した露光比情報を映像信号処理部16に出力する機能とを有するものである。
更に、制御部18は、調整後の露光比に対応する露光比情報又は新規に生成した露光比情報に基づき露光量信号を生成し、生成した露光量信号及び各種制御信号を撮像素子10に送信する機能も有している。ここで、各種制御信号は、垂直同期信号、水平同期信号、ピクセルクロックなどを含む。
具体的に、本実施形態の撮像素子10は、制御部18から出力される露光量信号に応じた4種類の露光量L1〜L4に対応する露光時間T1〜T4で同一被写体を撮像する。
The control unit 18 has a function of generating exposure ratio information based on input information from the operation unit 20, a function of adjusting the current exposure ratio to an appropriate one based on statistical information acquired from the image analysis unit 19, and And a function of outputting the generated exposure ratio information to the video signal processing unit 16.
Further, the control unit 18 generates an exposure amount signal based on the exposure ratio information corresponding to the adjusted exposure ratio or the newly generated exposure ratio information, and transmits the generated exposure amount signal and various control signals to the image sensor 10. It also has a function to do. Here, the various control signals include a vertical synchronization signal, a horizontal synchronization signal, a pixel clock, and the like.
Specifically, the image sensor 10 of the present embodiment images the same subject with exposure times T1 to T4 corresponding to four types of exposure amounts L1 to L4 corresponding to the exposure amount signals output from the control unit 18.

そして、本実施形態において、制御部18は、昇順に並ぶ露光量L1、L2、L3、L4における隣接する各2つの露光量の比率「L2/L1」、「L3/L2」、「L4/L3」が均等(L2/L1=L3/L2=L4/L3)となるように露光量L1〜L4に対応する露光時間T1〜T4を設定するようになっている。
また、本実施形態では、制御部18は、撮像環境の明るさに応じて露光量比を最適な比となるように調整するようになっている。そのために、制御部18は、画像解析部19から得たHDR画像データの平均輝度Lavと、予め用意された高輝度側の閾値Lthと、低輝度側の閾値Ltlとをそれぞれ比較する。
In the present embodiment, the control unit 18 sets the ratios “L2 / L1”, “L3 / L2”, and “L4 / L3” of two adjacent exposure amounts in the exposure amounts L1, L2, L3, and L4 arranged in ascending order. "Is equal (L2 / L1 = L3 / L2 = L4 / L3), the exposure times T1 to T4 corresponding to the exposure amounts L1 to L4 are set.
Further, in the present embodiment, the control unit 18 adjusts the exposure amount ratio so as to be an optimum ratio according to the brightness of the imaging environment. For this purpose, the control unit 18 compares the average luminance Lav of the HDR image data obtained from the image analysis unit 19 with the threshold value Lth on the high luminance side and the threshold value Ltl on the low luminance side prepared in advance.

制御部18は、この比較結果によって、平均輝度LavがLthより大きければ、撮像環境が比較的明るいと判断し、LavがLtlより小さければ、撮像環境が比較的暗いと判断する。更に、この判断結果に基づき、現在設定されている露光時間T1〜T4を、露光量の比率を均等とする状態を保ったままで増減することで、撮像環境の明るさに対して最適な露光量比となるように調整を行う。   Based on the comparison result, the control unit 18 determines that the imaging environment is relatively bright if the average luminance Lav is greater than Lth, and determines that the imaging environment is relatively dark if Lav is less than Ltl. Further, based on the determination result, the currently set exposure times T1 to T4 are increased / decreased while maintaining a uniform exposure amount ratio, so that the optimum exposure amount for the brightness of the imaging environment is obtained. Make adjustments to achieve the ratio.

画像解析部19は、映像信号処理部16で生成され、フレームメモリ17に格納されたHDR画像データに基づき、撮像環境の明るさに係る統計情報を算出し、算出した統計情報を制御部18に出力する機能を有している。本実施形態において、画像解析部19は、複数フレームの連続撮像時において、フレームメモリ17から得たHDR画像データ(少なくとも最初のフレーム分を含む)を統計的に解析する。本実施形態では、撮像環境の明るさに係る情報を得るために、統計情報として、HDR画像データの平均輝度Lavを算出する。そして、算出したLavを、制御部18に出力する。
操作部20は、撮像時、撮像画像の閲覧時、複数種類の撮像モードのうち任意のモードを選択時などにユーザによって操作されるもので、ユーザの操作内容に応じた情報を制御部18に出力する機能を有している。
The image analysis unit 19 calculates statistical information related to the brightness of the imaging environment based on the HDR image data generated by the video signal processing unit 16 and stored in the frame memory 17, and the calculated statistical information is sent to the control unit 18. It has a function to output. In the present embodiment, the image analysis unit 19 statistically analyzes the HDR image data (including at least the first frame) obtained from the frame memory 17 during continuous imaging of a plurality of frames. In this embodiment, in order to obtain information relating to the brightness of the imaging environment, the average luminance Lav of the HDR image data is calculated as statistical information. Then, the calculated Lav is output to the control unit 18.
The operation unit 20 is operated by the user at the time of imaging, when viewing a captured image, or when selecting an arbitrary mode from among a plurality of types of imaging modes. Information corresponding to the user's operation content is sent to the control unit 18. It has a function to output.

次に、図4に基づき、撮像素子10のHDRセンサ10dの露光時間の制御方法、及びセンサセルアレイ56からの画素信号の読み出し方法について説明する。ここで、図4は、HDRセンサのセンサセルアレイにおける各画素のライン毎の露光及び画素信号の読み出し動作の一例を示す図である。
本実施形態においては、センサセルアレイ56の露光領域(走査領域)に対して、露光時間T1の画素信号の非破壊読み出しを行う非破壊読み出しラインL1と、露光時間T2の画素信号の非破壊読み出しを行う非破壊読み出しラインL2とを設定する。更に、露光時間T3の画素信号の非破壊読み出しを行う非破壊読み出しラインL3を設定する。更に、各画素のラインの蓄積電荷のリセット及び露光時間T4の画素信号の読み出しを行う読み出し&リセットラインL4&Rを設定する。なお、T1〜T4の関係は、「T1<T2<T3<T4」となっている。そして、リセットされてから、まずT1経過時に非破壊読み出しラインL1が設定される。次にT2経過時に非破壊読み出しラインL2が設定され、次にT3経過時に非破壊読み出しラインL3が設定され、次にT4経過時に読み出し&リセットラインL4&Rが設定される。
Next, a method for controlling the exposure time of the HDR sensor 10d of the image sensor 10 and a method for reading a pixel signal from the sensor cell array 56 will be described with reference to FIG. Here, FIG. 4 is a diagram illustrating an example of exposure and pixel signal read operations for each pixel line in the sensor cell array of the HDR sensor.
In the present embodiment, a non-destructive readout line L1 for performing non-destructive readout of a pixel signal at an exposure time T1 and non-destructive readout of a pixel signal at an exposure time T2 with respect to an exposure region (scanning region) of the sensor cell array 56. A nondestructive read line L2 to be performed is set. Further, a nondestructive readout line L3 for performing nondestructive readout of the pixel signal at the exposure time T3 is set. Further, a read & reset line L4 & R for resetting the accumulated charge of each pixel line and reading the pixel signal at the exposure time T4 is set. The relationship between T1 and T4 is “T1 <T2 <T3 <T4”. After the reset, first, the nondestructive read line L1 is set when T1 has elapsed. Next, the nondestructive read line L2 is set when T2 elapses, the nondestructive read line L3 is set when T3 elapses, and the read & reset line L4 & R is set when T4 elapses.

具体的に、非破壊読み出しラインL1、L2及びL3並びに読み出し&リセットラインL4&Rは、図4に示すように、露光領域における画素のラインに順次露光時間T4分の電荷が蓄積されると、読み出し&リセットラインL4&Rが各画素のラインの画素信号を順次読み出すと共に、その蓄積電荷を順次リセットするように設定される。一方、露光領域のリセット後の各画素のラインにおいては、露光時間T4分の電荷が蓄積される期間中、露光時間T1、T2及びT3において各画素のラインの画素信号を非破壊で順次読み出すように非破壊読み出しラインL1、L2及びL3がそれぞれ設定される。   Specifically, as shown in FIG. 4, the non-destructive readout lines L1, L2, and L3 and the readout & reset line L4 & R are read out when charges corresponding to the exposure time T4 are sequentially accumulated in the pixel lines in the exposure region. The reset line L4 & R is set to sequentially read out the pixel signals of the lines of each pixel and to sequentially reset the accumulated charges. On the other hand, in the line of each pixel after resetting the exposure area, the pixel signals of the line of each pixel are sequentially read in a non-destructive manner during the exposure times T1, T2, and T3 during the period in which the charge for the exposure time T4 is accumulated. Non-destructive read lines L1, L2 and L3 are set respectively.

例えば、露光領域の一番目のラインである第1ラインにおいて露光時間T4の画素信号S4の読み出し及びリセットが行われたとする。以降は、画素信号S4が第4ラインメモリから読み出される毎に、図4中のスキャン方向に1ラインずつ、読み出し&リセットラインL4&Rの走査が順次行われる。このとき、読み出し&リセットラインL4&Rが再び第1ラインに到達したときに、丁度、露光時間T4が経過するタイミングとなるように走査が行われる。このような手順で、センサセルアレイの露光領域の画素のラインに対して、各画素のライン毎に、露光時間T4で露光時の画素信号の読み出し及び蓄積電荷のリセットを順次行う。   For example, it is assumed that the pixel signal S4 of the exposure time T4 is read and reset on the first line that is the first line of the exposure region. Thereafter, every time the pixel signal S4 is read from the fourth line memory, scanning of the read & reset lines L4 & R is sequentially performed for each line in the scan direction in FIG. At this time, when the read & reset line L4 & R reaches the first line again, scanning is performed so that the exposure time T4 has just passed. In such a procedure, readout of pixel signals at the time of exposure and reset of accumulated charges are sequentially performed for each pixel line for each pixel line in the exposure region of the sensor cell array.

一方、蓄積電荷がリセットされると、当該リセット後の画素のラインに対して、非破壊読み出しラインL1において露光時間T1の露光が行われた画素の画素信号S1の非破壊読み出しを行い、引き続き、非破壊読み出しラインL2において露光時間T2の露光が行われた画素の画素信号S2の非破壊読み出しを行う。引き続き、非破壊読み出しラインL3において露光時間T3の露光が行われた画素の画素信号S3の非破壊読み出しを行う。このような手順で、センサセルアレイの各画素のラインに対して、ライン毎に、露光時間T1、T2及びT3で露光時の画素信号S1、S2及びS3の非破壊読み出しを順次行う。   On the other hand, when the accumulated charge is reset, non-destructive readout of the pixel signal S1 of the pixel that has been exposed for the exposure time T1 in the non-destructive readout line L1 is performed on the pixel line after the reset, In the nondestructive readout line L2, nondestructive readout of the pixel signal S2 of the pixel that has been exposed for the exposure time T2 is performed. Subsequently, non-destructive readout of the pixel signal S3 of the pixel that has been exposed for the exposure time T3 in the non-destructive readout line L3 is performed. In such a procedure, the pixel signals S1, S2, and S3 at the time of exposure are sequentially read for each line of each pixel of the sensor cell array at the exposure times T1, T2, and T3.

なお、本実施形態においては、図4に示すように、露光時間T1に対応する画素信号のデータ(アナログデータ)S1は、第1ラインメモリに読み出され、露光時間T2に対応する画素信号のデータ(アナログデータ)S2は、第2ラインメモリに読み出される。更に、露光時間T3に対応する画素信号のデータ(アナログデータ)S3は、第3ラインメモリに読み出され、露光時間T4に対応する画素信号のデータ(アナログデータ)S4は、第4ラインメモリに読み出される。そして、これら読み出された画素信号のデータS1〜S4(以下、画素データS1〜S4と称す)は、図4に示すように、それぞれ選択回路を経てADCにS1〜S4の順で順次出力されそこでデジタルデータに変換される。変換された各画素データS1〜S4は、変換された順に(S1〜S4の順に)、S1は第1メモリ12に、S2は第2メモリ13に、S3は第3メモリ14に、S4は第4メモリ15にそれぞれ出力される。   In the present embodiment, as shown in FIG. 4, pixel signal data (analog data) S1 corresponding to the exposure time T1 is read into the first line memory, and the pixel signal data corresponding to the exposure time T2 is read. Data (analog data) S2 is read to the second line memory. Further, pixel signal data (analog data) S3 corresponding to the exposure time T3 is read to the third line memory, and pixel signal data (analog data) S4 corresponding to the exposure time T4 is read to the fourth line memory. Read out. Then, the read pixel signal data S1 to S4 (hereinafter referred to as pixel data S1 to S4) are sequentially output to the ADC in the order of S1 to S4 through the selection circuit, as shown in FIG. There, it is converted into digital data. The converted pixel data S1 to S4 are in the order of conversion (S1 to S4), S1 in the first memory 12, S2 in the second memory 13, S3 in the third memory 14, and S4 in the first. 4 is output to each of the memories 15.

次に、図5に基づき、撮像装置1の動作処理の流れを説明する。ここで、図5は、撮像装置1の動作処理の一例を示すフローチャートである。
撮像装置1の電源が投入されると、図5に示すように、まず、ステップS100に移行する。
ステップS100では、制御部18において、最短露光時間Tmin及び最長露光時間Tmaxの初期値を設定して、ステップS102に移行する。初期値の設定は、操作部20を介してユーザが入力又は選択した値を用いても良いし、標準露光時間として予め設定されている初期値を用いてもよい。
Next, based on FIG. 5, the flow of operation processing of the imaging apparatus 1 will be described. Here, FIG. 5 is a flowchart illustrating an example of operation processing of the imaging apparatus 1.
When the imaging apparatus 1 is powered on, the process proceeds to step S100 as shown in FIG.
In step S100, the control unit 18 sets initial values of the shortest exposure time Tmin and the longest exposure time Tmax, and the process proceeds to step S102. For the initial value setting, a value input or selected by the user via the operation unit 20 may be used, or an initial value set in advance as the standard exposure time may be used.

ステップS102では、制御部18において、ステップS100で設定された初期値を用いて、中間の露光量に対応する露光時間である露光時間Tmidを算出し、算出したTmidと、初期値として設定したTmin及びTmaxとに基づき露光比情報を生成する。そして、生成した露光比情報に基づき露光量信号を生成し、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号と各種制御信号とを撮像素子10に送信して、ステップS104に移行する。   In step S102, the control unit 18 uses the initial value set in step S100 to calculate an exposure time Tmid that is an exposure time corresponding to the intermediate exposure amount, and calculates the calculated Tmid and the initial value Tmin. And exposure ratio information are generated based on Tmax. Then, an exposure amount signal is generated based on the generated exposure ratio information, the generated exposure ratio information is output to the video signal processing unit 16, and the generated exposure amount signal and various control signals are transmitted to the image sensor 10. The process proceeds to step S104.

本実施形態では、露光量の種類をL1〜L4の4種類としたので、露光量L1に対応する最短露光時間TminはT1に、露光量L4に対応する最長露光時間TmaxはT4となる。そして、露光量L2及びL3に対応する中間露光時間TmidはT2及びT3となる。そして、制御部18は、下式(12)及び(13)に従って、「T2/T1=T3/T2=T4/T3」となる中間露光時間T2及びT3を算出する。

T2=(T12×T4)1/3 ・・・(12)
T3=(T1×T421/3 ・・・(13)
In the present embodiment, since there are four types of exposure amounts L1 to L4, the shortest exposure time Tmin corresponding to the exposure amount L1 is T1, and the longest exposure time Tmax corresponding to the exposure amount L4 is T4. The intermediate exposure times Tmid corresponding to the exposure amounts L2 and L3 are T2 and T3. Then, the control unit 18 calculates intermediate exposure times T2 and T3 that satisfy “T2 / T1 = T3 / T2 = T4 / T3” according to the following equations (12) and (13).

T2 = (T1 2 × T4) 1/3 (12)
T3 = (T1 × T4 2 ) 1/3 (13)

例えば、設定可能な最短露光時間Tminが1H、最長露光時間Tmaxが1000Hの場合は、T1=1H、T3=1000Hとして、上式(12)から「T2=(12×1000)1/3=10」と算出できる。また、上式(13)から「T3=(1×100021/3=100」と算出できる。これにより、露光量比=露光時間比=「1:10:100:1000」が求まる。この場合は、ダイナミックレンジが「60[dB]」となる。
なお、センサセルアレイにおける1ラインの走査時間を水平同期信号の呼称であるHSYNCの頭文字を取り、1Hと表している。例えば、センサセルアレイの総ライン数500ラインに対して、フレームレートが30[fps]の場合は、1Hの期間は1/30秒を500ラインで除算した時間、つまり1/15000秒、換言すれば1/15ミリ秒(約67μ秒)となる。
For example, when the shortest exposure time Tmin that can be set is 1H and the longest exposure time Tmax is 1000H, T1 = 1H and T3 = 1000H, and from the above equation (12), “T2 = (1 2 × 1000) 1/3 = 10 ". Further, it can be calculated from the above equation (13) as “T3 = (1 × 1000 2 ) 1/3 = 100”. Thereby, the exposure amount ratio = exposure time ratio = “1: 10: 100: 1000” is obtained. In this case, the dynamic range is “60 [dB]”.
Note that the scanning time for one line in the sensor cell array is abbreviated as HSYNC, which is the name of the horizontal synchronization signal, and is represented as 1H. For example, when the frame rate is 30 [fps] with respect to the total number of lines of the sensor cell array of 500 lines, the 1H period is the time obtained by dividing 1/30 seconds by 500 lines, that is, 1/15000 seconds, in other words. 1/15 milliseconds (about 67 microseconds).

ステップS104では、映像信号処理部16において、撮像処理が開始されたか否かを判定し、開始されたと判定した場合(Yes)は、ステップS106に移行し、そうでない場合(No)は、撮像処理が開始されるまで判定処理を繰り返す。
なお、撮像処理が開始されると、撮像素子10は、制御部18からの露光量信号及び各種制御信号に基づき、露光量L1〜L4(露光時間T1〜T4)で被写体を撮像する。そして、撮像により得られた画像データS1〜S4を、第1〜第4メモリ12〜15に順次出力して、ステップS106に移行する。
In step S104, the video signal processing unit 16 determines whether or not the imaging process has been started. If it is determined that the imaging process has started (Yes), the process proceeds to step S106. If not (No), the imaging process is performed. The determination process is repeated until is started.
When the imaging process is started, the image sensor 10 captures an image of the subject with the exposure amounts L1 to L4 (exposure times T1 to T4) based on the exposure amount signal and various control signals from the control unit 18. Then, the image data S1 to S4 obtained by imaging are sequentially output to the first to fourth memories 12 to 15, and the process proceeds to step S106.

ステップS106では、映像信号処理部16において、第1〜第4メモリ12〜15から順次出力される画像データS1〜S4と、制御部18からの露光比情報(T1:T2:T3:T4)とに基づき、HDR合成処理を実行して、ステップS108に移行する。
ステップS108では、制御部18において、撮像処理が終了したか否かを判定し、終了したと判定した場合(Yes)は、一連の処理を終了し、そうでない場合(No)は、ステップS110に移行する。
In step S106, the video signal processing unit 16 sequentially outputs image data S1 to S4 output from the first to fourth memories 12 to 15, and exposure ratio information (T1: T2: T3: T4) from the control unit 18. Then, the HDR synthesizing process is executed, and the process proceeds to step S108.
In step S108, the control unit 18 determines whether or not the imaging process has been completed. If it is determined that the imaging process has ended (Yes), the series of processes is terminated. If not (No), the process proceeds to step S110. Transition.

ステップS110に移行した場合は、制御部18において、フレームメモリ17に格納されたHDR合成処理によって生成されたHDR画像データに基づき、露光比調整処理を実行して、ステップS106に移行する。
露光比調整処理が実行されると、撮像素子10は、調整後の露光量信号に基づき、撮像処理を実行する。
When the process proceeds to step S110, the control unit 18 executes the exposure ratio adjustment process based on the HDR image data generated by the HDR synthesizing process stored in the frame memory 17, and the process proceeds to step S106.
When the exposure ratio adjustment process is executed, the image sensor 10 executes the image pickup process based on the adjusted exposure amount signal.

次に、図6に基づき、映像信号処理部16におけるHDR合成処理の流れを説明する。ここで、図6は、HDR合成処理の一例を示すフローチャートである。
ステップS106に移行すると、映像信号処理部16においてHDR合成処理が開始され、図6に示すように、まず、ステップS200に移行する。
ステップS200では、映像信号処理部16において、第1〜第4メモリ12〜15から画素データS1〜S4を1ライン分取得して、ステップS202に移行する。
Next, the flow of HDR synthesis processing in the video signal processing unit 16 will be described with reference to FIG. Here, FIG. 6 is a flowchart illustrating an example of the HDR synthesis process.
When the process proceeds to step S106, the HDR synthesis process is started in the video signal processing unit 16, and first, the process proceeds to step S200 as shown in FIG.
In step S200, the video signal processing unit 16 obtains one line of pixel data S1 to S4 from the first to fourth memories 12 to 15, and proceeds to step S202.

具体的に、映像信号処理部16は、第1〜第4メモリ12〜15に、同じ画素位置の1ライン分の画素データS1〜S4が格納されたタイミングで、該S1〜S4を取得する。
なお、本実施形態においては、画素データS1〜S4(x,y)は、輝度の情報(輝度値)と、画素の位置情報(行及び列の位置情報)とを含むデータであることとする。また、画素データS1〜S4が位置情報を持たず、映像信号処理部16において、水平同期信号及びピクセルクロックをカウントすることで、画素の位置情報を生成する構成としてもよい。
Specifically, the video signal processing unit 16 acquires S1 to S4 at the timing when the pixel data S1 to S4 for one line at the same pixel position are stored in the first to fourth memories 12 to 15.
In the present embodiment, the pixel data S1 to S4 (x, y) are data including luminance information (luminance values) and pixel position information (row and column position information). . Further, the pixel data S1 to S4 may have no position information, and the video signal processing unit 16 may generate the pixel position information by counting the horizontal synchronization signal and the pixel clock.

また、映像信号処理部16において、必要に応じて、取得した画素データS1〜S4に対して、固定パターンノイズの除去処理、クランプ処理等の前処理を施してもよい。
ステップS202では、映像信号処理部16において、1ライン分の画素データS1〜S4の中から、合成重みW1〜W4及び正規化画素データN1〜N4の計算処理が未処理の1画素分の画素データS1〜S4(x,y)を選択する。そして、選択した画素データS1〜S4(x,y)を正規化部16bに出力し、選択した画素データS1〜S4(x,y)のうちS2〜S4(x,y)を重み計算部16aに出力して、ステップS204に移行する。
Further, the video signal processing unit 16 may perform preprocessing such as fixed pattern noise removal processing and clamping processing on the acquired pixel data S1 to S4 as necessary.
In step S202, the video signal processing unit 16 outputs pixel data for one pixel for which the calculation processing of the combined weights W1 to W4 and the normalized pixel data N1 to N4 is unprocessed from the pixel data S1 to S4 for one line. S1 to S4 (x, y) are selected. Then, the selected pixel data S1 to S4 (x, y) are output to the normalization unit 16b, and S2 to S4 (x, y) among the selected pixel data S1 to S4 (x, y) are weight calculation unit 16a. And the process proceeds to step S204.

ステップS204では、重み計算部16aにおいて、ステップS202で選択された画素データS2(x,y)を用いて、上式(2)及び(3)から、合成重みW1(x,y)として、「W1(x,y)=F(S2(x,y))」を計算して、ステップS206に移行する。
ステップS206では、重み計算部16aにおいて、ステップS202で選択された画素データS3(x,y)に基づき、上式(2)から、まず、F(S3(x,y))を計算する。次に、該計算したF(S3(x,y))と、ステップS204で計算したF(S2(x,y))と、上式(4)とから、合成重みW2(x,y)として、「W2(x,y)=F(S3(x,y))−F(S2(x,y))」を計算して、ステップS208に移行する。
In step S204, the weight calculation unit 16a uses the pixel data S2 (x, y) selected in step S202 to obtain the combined weight W1 (x, y) from the above equations (2) and (3) as “ W1 (x, y) = F (S2 (x, y)) ”is calculated, and the process proceeds to step S206.
In step S206, the weight calculation unit 16a first calculates F (S3 (x, y)) from the above formula (2) based on the pixel data S3 (x, y) selected in step S202. Next, from the calculated F (S3 (x, y)), F (S2 (x, y)) calculated in step S204, and the above equation (4), the combined weight W2 (x, y) is obtained. , “W2 (x, y) = F (S3 (x, y)) − F (S2 (x, y))” is calculated, and the process proceeds to step S208.

ステップS208では、重み計算部16aにおいて、ステップS202で選択された画素データS4(x,y)に基づき、上式(2)から、まず、F(S4(x,y))を計算する。次に、該計算したF(S4(x,y))と、ステップS206で計算したF(S3(x,y))と、上式(5)とから、合成重みW3として、「W3(x,y)=F(S4(x,y))−F(S3(x,y))」を計算して、ステップS210に移行する。
ステップS210では、重み計算部16aにおいて、ステップS208で計算したF(S4(x,y))と、上式(6)とから、合成重みW4(x,y)として、「W4(x,y)=1−F(S4(x,y))」を計算して、ステップS212に移行する。
なお、ステップS204〜S210において計算した合成重みW1〜W4(x,y)は、合成部16cに出力される。
In step S208, the weight calculation unit 16a first calculates F (S4 (x, y)) from the above equation (2) based on the pixel data S4 (x, y) selected in step S202. Next, from the calculated F (S4 (x, y)), F (S3 (x, y)) calculated in step S206, and the above equation (5), the combined weight W3 is “W3 (x , Y) = F (S4 (x, y)) − F (S3 (x, y)) ”, and the process proceeds to step S210.
In step S210, the weight calculation unit 16a calculates “W4 (x, y) as a combined weight W4 (x, y) from F (S4 (x, y)) calculated in step S208 and the above equation (6). ) = 1−F (S4 (x, y)) ”, and the process proceeds to step S212.
Note that the combined weights W1 to W4 (x, y) calculated in steps S204 to S210 are output to the combining unit 16c.

ステップS212では、正規化部16bにおいて、ステップS202で選択された画素データS1(x,y)と、制御部18からの露光比情報「T1:T2:T3:T4」のうちT1とT4とに基づき、上式(7)から、画素データS1(x,y)を正規化する。具体的に、正規化画素データN1(x,y)として、「N1(x,y)=S1(x,y)×T4/T1」を計算して、ステップS214に移行する。   In step S212, the normalization unit 16b converts the pixel data S1 (x, y) selected in step S202 and the exposure ratio information “T1: T2: T3: T4” from the control unit 18 to T1 and T4. Based on the above equation (7), the pixel data S1 (x, y) is normalized. Specifically, “N1 (x, y) = S1 (x, y) × T4 / T1” is calculated as the normalized pixel data N1 (x, y), and the process proceeds to step S214.

ステップS214では、正規化部16bにおいて、ステップS202で選択された画素データS2(x,y)と、制御部18からの露光比情報「T1:T2:T3:T4」のうちT2とT4とに基づき、上式(8)から、画素データS2(x,y)を正規化する。具体的に、正規化画素データN2(x,y)として、「N2(x,y)=S2(x,y)×T4/T2」を計算して、ステップS216に移行する。   In step S214, the normalizing unit 16b converts the pixel data S2 (x, y) selected in step S202 and the exposure ratio information “T1: T2: T3: T4” from the control unit 18 to T2 and T4. Based on the above equation (8), the pixel data S2 (x, y) is normalized. Specifically, “N2 (x, y) = S2 (x, y) × T4 / T2” is calculated as the normalized pixel data N2 (x, y), and the process proceeds to step S216.

ステップS216では、正規化部16bにおいて、ステップS202で選択された画素データS3(x,y)と、制御部18からの露光比情報「T1:T2:T3:T4」のうちT3とT4とに基づき、上式(9)から、画素データS3を正規化する。具体的に、正規化画素データN3(x,y)として、「N3(x,y)=S3(x,y)×T4/T3」を計算して、ステップS218に移行する。
なお、ステップS212〜S216で計算した正規化画素データN1〜N3(x,y)と、「N4(x,y)=S4(x,y)」である正規化画素データN4(x,y)とは、合成部16cに出力される。
In step S216, the normalization unit 16b converts the pixel data S3 (x, y) selected in step S202 and the exposure ratio information “T1: T2: T3: T4” from the control unit 18 to T3 and T4. Based on the above equation (9), the pixel data S3 is normalized. Specifically, “N3 (x, y) = S3 (x, y) × T4 / T3” is calculated as the normalized pixel data N3 (x, y), and the process proceeds to step S218.
Note that the normalized pixel data N1 to N3 (x, y) calculated in steps S212 to S216 and the normalized pixel data N4 (x, y) that is “N4 (x, y) = S4 (x, y)”. Is output to the combining unit 16c.

ステップS218では、合成部16cにおいて、重み計算部16aから取得した合成重みW1〜W4(x,y)と、正規化部16bから取得した正規化画素データN1〜N4(x,y)とを用いて、上式(11)に基づき、N1〜N4(x,y)を合成して、ステップS220に移行する。
具体的に、合成部16cは、上式(11)から、HDR画素データHDR(x,y)として、「HDR(x,y)=W1(x,y)×N1(x,y)+W2(x,y)×N2(x,y)+W3(x,y)×N3(x,y)+W4(x,y)×N4(x,y)」を計算する。
In step S218, the synthesis unit 16c uses the synthesis weights W1 to W4 (x, y) acquired from the weight calculation unit 16a and the normalized pixel data N1 to N4 (x, y) acquired from the normalization unit 16b. Then, N1 to N4 (x, y) are synthesized based on the above equation (11), and the process proceeds to step S220.
Specifically, the synthesizing unit 16c obtains “HDR (x, y) = W1 (x, y) × N1 (x, y) + W2 ( x, y) * N2 (x, y) + W3 (x, y) * N3 (x, y) + W4 (x, y) * N4 (x, y) "is calculated.

ステップS220では、合成部16cにおいて、ステップS218で合成して得られたHDR画素データHDR(x,y)を、フレームメモリ17に格納して、ステップS222に移行する。
ステップS222では、映像信号処理部16において、1ライン分の画素データS1〜S4について、HDR合成処理が終了したか否かを判定し、終了したと判定した場合(Yes)は、ステップS224に移行し、そうでない場合(No)は、ステップS202に移行する。
In step S220, the synthesizing unit 16c stores the HDR pixel data HDR (x, y) obtained by synthesizing in step S218 in the frame memory 17, and proceeds to step S222.
In step S222, the video signal processing unit 16 determines whether or not the HDR synthesizing process is completed for the pixel data S1 to S4 for one line. If it is determined that the process is completed (Yes), the process proceeds to step S224. If not (No), the process proceeds to step S202.

ステップS224に移行した場合は、映像信号処理部16において、1フレーム分(1画像分)の画素データS1〜S4について、HDR合成処理が終了したか否かを判定し、終了したと判定した場合(Yes)は、一連の処理を終了して元の処理に復帰する。一方、終了していないと判定した場合(No)は、ステップS200に移行する。
なお、ステップS204〜S210の処理と、ステップS212〜S216の処理とは、順次行ってもよいし、並列に行ってもよい。
When the process proceeds to step S224, in the video signal processing unit 16, it is determined whether or not the HDR synthesis process is completed for the pixel data S1 to S4 for one frame (one image), and it is determined that the process has ended. (Yes) terminates the series of processing and returns to the original processing. On the other hand, if it is determined that the process has not been completed (No), the process proceeds to step S200.
Note that the processing in steps S204 to S210 and the processing in steps S212 to S216 may be performed sequentially or in parallel.

次に、図7に基づき、ステップS110の露光比調整処理の流れを説明する。ここで、図7は、露光比調整処理の一例を示すフローチャートである。
ステップS110に移行して、露光比調整処理が開始されると、図7に示すように、まず、ステップS300に移行する。
ステップS300では、制御部18において、フレームメモリ17からHDR合成処理によって生成された1フレーム分(1画像分)のHDR画像データを取得し、取得したHDR画像データから平均輝度Lavを算出して、ステップS302に移行する。
Next, the flow of the exposure ratio adjustment process in step S110 will be described with reference to FIG. Here, FIG. 7 is a flowchart showing an example of the exposure ratio adjustment processing.
When the process proceeds to step S110 and the exposure ratio adjustment process is started, the process proceeds to step S300 as shown in FIG.
In step S300, the control unit 18 acquires HDR image data for one frame (for one image) generated by the HDR synthesizing process from the frame memory 17, calculates an average luminance Lav from the acquired HDR image data, The process proceeds to step S302.

ステップS302では、制御部18において、ステップS300で算出した平均輝度Lavと、予め設定された平均輝度値の高輝度側の閾値Lthとを比較し、LavがLthよりも大きいか否かを判定する。そして、LavがLthよりも大きいと判定した場合(Yes)は、ステップS304に移行し、そうでない場合(No)は、ステップS308に移行する。
ステップS304に移行した場合は、制御部18において、最短露光時間Tminを、予め設定された時間だけ減少して、ステップS306に移行する。つまり、撮像環境が比較的明るい状態であるので、白飛びしない画像を得るために最短露光時間Tminを減少する調整を行う。なお、減少する時間は、平均輝度に応じてその都度適切な値を算出するようにしてもよいし、平均輝度の大きさに対応する値をテーブルとして予め用意するようにしてもよい。
In step S302, the control unit 18 compares the average luminance Lav calculated in step S300 with a threshold Lth on the high luminance side of a preset average luminance value, and determines whether or not Lav is larger than Lth. . If it is determined that Lav is greater than Lth (Yes), the process proceeds to step S304. If not (No), the process proceeds to step S308.
When the process proceeds to step S304, the control unit 18 decreases the shortest exposure time Tmin by a preset time, and the process proceeds to step S306. That is, since the imaging environment is relatively bright, adjustment is performed to reduce the shortest exposure time Tmin in order to obtain an image that does not blow out. It should be noted that an appropriate value may be calculated for each decrease time according to the average luminance, or a value corresponding to the magnitude of the average luminance may be prepared in advance as a table.

ステップS306では、制御部18において、ステップS304で減少したTminと、初期設定時のTmaxとを用いて、中間露光時間Tmidを再計算し、再計算したTmidと、減少後のTmin及び初期設定時のTmaxとに基づき露光比情報を生成する。
例えば、露光時間がT1〜T4の4種類の場合に、露光比情報として「T1:T2:T3:T4=Tmin(減):Tmid1(再):Tmid2(再):Tmax(初)」を生成する。なお、各露光時間の後ろに付した、(減)は減少調整後の、(再)は再計算後の、(初)は初期設定時の各露光時間であることを示す。更に、制御部18は、生成した露光比情報に基づき露光量信号を生成する。そして、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号と各種制御信号とを撮像素子10に送信して、一連の処理を終了し元の処理に復帰する。
In step S306, the control unit 18 recalculates the intermediate exposure time Tmid using Tmin decreased in step S304 and Tmax at the initial setting, and recalculated Tmid, the decreased Tmin, and the initial setting time. The exposure ratio information is generated based on Tmax.
For example, in the case of four types of exposure times T1 to T4, “T1: T2: T3: T4 = Tmin (decrease): Tmid1 (re): Tmid2 (re): Tmax (first)” is generated as exposure ratio information. To do. It should be noted that (decrease) attached after each exposure time indicates that the exposure time after the reduction adjustment, (re) indicates after recalculation, and (initial) indicates each exposure time at the time of initial setting. Further, the control unit 18 generates an exposure amount signal based on the generated exposure ratio information. Then, the generated exposure ratio information is output to the video signal processing unit 16, the generated exposure amount signal and various control signals are transmitted to the image sensor 10, the series of processes is terminated, and the original process is restored.

一方、ステップS302において、LavがLth以下であってステップS308に移行した場合は、制御部18において、ステップS300で算出した平均輝度Lavと、予め設定された平均輝度値の低輝度側の閾値Ltlとを比較する。更に、この比較結果に基づき、LavがLtlよりも小さいか否かを判定する。そして、LavがLtlよりも小さいと判定した場合(Yes)は、ステップS310に移行し、そうでない場合(No)は、ステップS314に移行する。   On the other hand, when Lav is equal to or less than Lth in step S302 and the process proceeds to step S308, the control unit 18 calculates the average luminance Lav calculated in step S300 and the threshold Ltl on the low luminance side of the preset average luminance value. And compare. Furthermore, based on the comparison result, it is determined whether or not Lav is smaller than Ltl. If it is determined that Lav is smaller than Ltl (Yes), the process proceeds to step S310. If not (No), the process proceeds to step S314.

ステップS310に移行した場合は、制御部18において、最長露光時間Tmaxを、予め設定された時間だけ増加して、ステップS312に移行する。つまり、撮像環境が比較的暗い状態であるので、黒つぶれしない画像を得るために最長露光時間Tmaxを増加する調整を行う。なお、増加する時間は、平均輝度に応じてその都度適切な値を算出するようにしてもよいし、平均輝度の大きさに対応する値をテーブルとして予め用意するようにしてもよい。   When the process proceeds to step S310, the control unit 18 increases the longest exposure time Tmax by a preset time, and the process proceeds to step S312. That is, since the imaging environment is in a relatively dark state, adjustment is performed to increase the longest exposure time Tmax in order to obtain an image that is not blackened. Note that an appropriate value for the increasing time may be calculated each time according to the average luminance, or a value corresponding to the magnitude of the average luminance may be prepared in advance as a table.

ステップS312では、制御部18において、ステップS310で増加したTmaxと初期設定時のTminとを用いて、中間露光時間Tmidを再計算し、再計算したTmidと、初期設定時のTmin及び増加後のTmaxとに基づき露光比情報を生成する。
例えば、露光時間がT1〜T4の4種類の場合に、露光比情報は、「T1:T2:T3:T4=Tmin(初):Tmid1(再):Tmid2(再):Tmax(増)」となる。なお、露光時間Tmaxの後ろに付した(増)は増加調整後の露光時間であることを示す。更に、制御部18は、生成した露光比情報に基づき露光量信号を生成する。そして、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号と各種制御信号とを撮像素子10に送信して、一連の処理を終了し元の処理に復帰する。
In step S312, the control unit 18 recalculates the intermediate exposure time Tmid using Tmax increased in step S310 and the initial setting Tmin, and recalculates the Tmid, the initial setting Tmin, and the increased value. Exposure ratio information is generated based on Tmax.
For example, when there are four types of exposure times T1 to T4, the exposure ratio information is “T1: T2: T3: T4 = Tmin (initial): Tmid1 (re): Tmid2 (re): Tmax (increase)”. Become. Note that (increased) added after the exposure time Tmax indicates the exposure time after the increase adjustment. Further, the control unit 18 generates an exposure amount signal based on the generated exposure ratio information. Then, the generated exposure ratio information is output to the video signal processing unit 16, the generated exposure amount signal and various control signals are transmitted to the image sensor 10, the series of processes is terminated, and the original process is restored.

また、ステップS308において、LavがLtl以上であってステップS314に移行した場合は、制御部18において、最短露光時間Tminと最長露光時間Tmaxとして通常露光時間を設定して、ステップS316に移行する。本実施形態では、通常露光時間として、初期設定時の露光時間を設定する。
ステップS316では、制御部18において、ステップS314で設定されたTmin及びTmaxを用いて、中間露光時間Tmidを再計算し、再計算したTmidと、初期設定時のTmin及び増加後のTmaxとに基づき露光比情報を生成する。
In step S308, if Lav is equal to or greater than Ltl and the process proceeds to step S314, the control unit 18 sets the normal exposure time as the shortest exposure time Tmin and the longest exposure time Tmax, and the process proceeds to step S316. In the present embodiment, the initial exposure time is set as the normal exposure time.
In step S316, the control unit 18 recalculates the intermediate exposure time Tmid using the Tmin and Tmax set in step S314. Based on the recalculated Tmid, the initial setting Tmin, and the increased Tmax. Exposure ratio information is generated.

例えば、露光時間がT1〜T4の4種類の場合に、露光比情報は、「T1:T2:T3:T4=Tmin(初):Tmid1(再):Tmid2(再):Tmax(初)」となる。更に、制御部18は、生成した露光比情報に基づき露光量信号を生成する。そして、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号と各種制御信号とを撮像素子10に送信して、一連の処理を終了し元の処理に復帰する。   For example, when there are four types of exposure times T1 to T4, the exposure ratio information is “T1: T2: T3: T4 = Tmin (first): Tmid1 (re): Tmid2 (re): Tmax (first)”. Become. Further, the control unit 18 generates an exposure amount signal based on the generated exposure ratio information. Then, the generated exposure ratio information is output to the video signal processing unit 16, the generated exposure amount signal and various control signals are transmitted to the image sensor 10, the series of processes is terminated, and the original process is restored.

次に、図8〜図11に基づき、本実施形態の動作を説明する。
ここで、図8(a)〜(d)は、比率が均等となるように決定された露光時間T1〜T4における入射光に対する応答信号S1〜S4の一例を示す図である。また、図9(a)〜(d)は、入射光に対する合成重みW1〜W4の一例を示す図である。また、図10は、図9(a)〜(d)を重ねて表示した図である。また、図11は、図8(a)〜(d)における入射光の軸を対数で表した場合の図である。
Next, the operation of the present embodiment will be described with reference to FIGS.
Here, FIGS. 8A to 8D are diagrams showing examples of response signals S1 to S4 with respect to incident light at exposure times T1 to T4 determined so that the ratios are equal. FIGS. 9A to 9D are diagrams illustrating examples of combined weights W1 to W4 for incident light. FIG. 10 is a diagram in which FIGS. 9A to 9D are displayed in an overlapping manner. FIG. 11 is a diagram showing the incident light axis in FIGS. 8A to 8D in logarithm.

電源が投入されると、撮像装置1は、撮像処理が開始される前に、まず、制御部18において、露光比情報及び露光量信号を生成し、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号及び各種制御信号を撮像素子10に送信する。
具体的に、まず、操作部20を介したユーザからの指示又は予め設定された値に基づき、露光時間T1及びT3の初期値が設定される(ステップS100)。ここでは、初期値として、「T1=2H、T4=500H」が設定されたとする。
When the power is turned on, the imaging apparatus 1 first generates exposure ratio information and an exposure amount signal in the control unit 18 before the imaging process is started, and the generated exposure ratio information is used as the video signal processing unit 16. The generated exposure amount signal and various control signals are transmitted to the image sensor 10.
Specifically, first, initial values of the exposure times T1 and T3 are set based on an instruction from the user via the operation unit 20 or a preset value (step S100). Here, it is assumed that “T1 = 2H, T4 = 500H” is set as the initial value.

制御部18は、次に、上式(6)及び(7)に従って、「T2/T1=T3/T2=T4/T3」の関係となる中間露光時間T2及びT3を算出する(ステップS102)。具体的に、「T2=2H、T3=500H」が設定されているので、制御部18において、「T2=(4×500)1/3≒12.6」が自動的に算出される。引き続き、制御部18において、「T3=(2×250000)1/3≒79.4」が自動的に算出される。 Next, the control unit 18 calculates intermediate exposure times T2 and T3 having a relationship of “T2 / T1 = T3 / T2 = T4 / T3” according to the above equations (6) and (7) (step S102). Specifically, since “T2 = 2H, T3 = 500H” is set, the control unit 18 automatically calculates “T2 = (4 × 500) 1/3 ≈12.6”. Subsequently, the control unit 18 automatically calculates “T3 = (2 × 250,000) 1/3 ≈79.4”.

ここでは、四捨五入してT2を「13」に設定し、T3を「79」に設定する。これにより、「T2/T1=13/2=6.5」、「T3/T2=79/13≒6.1」、「T4/T3=500/79≒6.3」となり、比率が略均等になる露光比情報「「T1:T2:T3:T4=2:13:79:500」を得ることができる。
更に、制御部18は、露光比情報「T1:T2:T3:T4=2:13:79:500」の情報を含む露光量信号を生成し、生成した露光比情報を映像信号処理部16に出力し、生成した露光量信号及び各種制御信号を撮像素子10に送信する。
Here, rounding is performed and T2 is set to “13”, and T3 is set to “79”. As a result, “T2 / T1 = 13/2 = 6.5”, “T3 / T2 = 79 / 13≈6.1”, and “T4 / T3 = 500 / 79≈6.3” are obtained, and the ratios are substantially equal. The exposure ratio information “T1: T2: T3: T4 = 2: 13: 79: 500” can be obtained.
Further, the control unit 18 generates an exposure amount signal including information of the exposure ratio information “T1: T2: T3: T4 = 2: 13: 79: 500”, and sends the generated exposure ratio information to the video signal processing unit 16. The generated exposure amount signal and various control signals are transmitted to the image sensor 10.

これにより、撮像素子10のHDRセンサ10dのレジスタに、露光時間比「T1:T2:T3:T4=2:13:79:500」の情報が書き込まれる。
引き続き、撮像素子10において、被写体の撮像が開始されると、被写体から反射された光は、レンズ10aで集光されてマイクロレンズ10bに入射される。レンズ10aからの入射光は、マイクロレンズ10bにおいて平行化されて、カラーフィルタアレイ10cを介してセンサセルアレイの各画素に入射される。
Thereby, information of the exposure time ratio “T1: T2: T3: T4 = 2: 13: 79: 500” is written in the register of the HDR sensor 10d of the image sensor 10.
Subsequently, when imaging of the subject is started in the image sensor 10, the light reflected from the subject is collected by the lens 10a and is incident on the microlens 10b. Incident light from the lens 10a is collimated by the microlens 10b and is incident on each pixel of the sensor cell array via the color filter array 10c.

一方、HDRセンサ10dにおいて、開始ラインから順に1ラインずつリセットラインRが設定されて、各画素の蓄積電荷がリセットされる。引き続き、各走査ラインに対して、各画素のリセット後において露光時間T1、T2、T3の経過タイミングで非破壊読み出しラインL1、L2、L3が設定さる。これにより、図8(a)〜(c)に示すような光応答の画素信号S1〜S3が順に読み出される。引き続き、開始ラインから順に読み出し&リセットラインL4&Rが設定されて、走査されたラインの各画素から図8(d)に示すような光応答の画素信号S4が読み出され、その後、各画素の蓄積電荷がリセットされる。
以降、撮像が行われている間は、上記の手順でL1〜L3&Rの設定、画素信号S1〜S3の読み出し及びリセット処理が繰り返し行われる。
On the other hand, in the HDR sensor 10d, the reset line R is set one line at a time from the start line, and the accumulated charge of each pixel is reset. Subsequently, the non-destructive readout lines L1, L2, and L3 are set for each scanning line at the elapse timing of the exposure times T1, T2, and T3 after the resetting of each pixel. Thereby, the pixel signals S1 to S3 of the optical response as shown in FIGS. 8A to 8C are sequentially read out. Subsequently, a read & reset line L4 & R is set in order from the start line, and a photoresponse pixel signal S4 as shown in FIG. 8D is read from each pixel of the scanned line, and thereafter, accumulation of each pixel is performed. The charge is reset.
Thereafter, while the imaging is being performed, the setting of L1 to L3 & R, the reading of the pixel signals S1 to S3, and the reset process are repeatedly performed according to the above procedure.

このようにして読み出された画素信号S1〜S4は、ライン毎に、第1ラインメモリ〜第4ラインメモリにそれぞれ格納されライン単位で選択回路へと出力される。選択回路からは、S1〜S4の順でアナログの画素データS1〜S4がADCに出力される。ADCは、アナログの画素データS1〜S4を、デジタルの画素データS1〜S4に変換する。そして、ADCからは、ライン単位で且つ画素データS1〜S4の順で順次画素データが、第1〜第4メモリ12〜15へと出力される。ここでは、画素データS1〜S4は8ビットの階調範囲の輝度値(0〜255)を示すデータとなる。
上記のようにして、比率が略均等となる露光時間T1、T2、T3、T4で撮像して得られる画素信号S1〜S4は、図11に示すように、入射光を対数で表したグラフにおいて略均等な間隔で並ぶ。
The pixel signals S1 to S4 read out in this way are stored in the first line memory to the fourth line memory for each line and output to the selection circuit in line units. From the selection circuit, analog pixel data S1 to S4 are output to the ADC in the order of S1 to S4. The ADC converts the analog pixel data S1 to S4 into digital pixel data S1 to S4. Then, the ADC sequentially outputs the pixel data to the first to fourth memories 12 to 15 in units of lines and in the order of the pixel data S1 to S4. Here, the pixel data S1 to S4 are data indicating luminance values (0 to 255) in an 8-bit gradation range.
As described above, the pixel signals S1 to S4 obtained by imaging with the exposure times T1, T2, T3, and T4 in which the ratios are substantially equal are shown in a graph representing incident light in a logarithm as shown in FIG. Line up at approximately equal intervals.

一方、映像信号処理部16は、撮像が開始され(ステップS104の「Yes」の分岐)、第1〜第4メモリ12〜15に1ライン分の画素データS1〜S4が格納されると、HDR合成処理を開始する(ステップS106)。
HDR合成処理が開始されると、映像信号処理部16は、第1〜第4メモリ12〜15から、1ライン分の画素データS1〜S4を取得する(ステップS200)。
映像信号処理部16は、取得した1ライン分の画素データS1〜S4のうち、合成重みW1〜W4及び正規化画素データN1〜N4の計算処理が未処理の1画素分の画素データS1〜S4(x,y)を選択する。そして、画素データS2〜S4(x,y)を重み計算部16aに出力し、画素データS1〜S4(x,y)を正規化部16bに出力する(ステップS202)。
On the other hand, when the video signal processing unit 16 starts imaging (the branch of “Yes” in step S104) and the pixel data S1 to S4 for one line are stored in the first to fourth memories 12 to 15, the HDR is performed. The synthesizing process is started (step S106).
When the HDR synthesizing process is started, the video signal processing unit 16 acquires pixel data S1 to S4 for one line from the first to fourth memories 12 to 15 (step S200).
The video signal processing unit 16 out of the acquired pixel data S1 to S4 for one line, the pixel data S1 to S4 for one pixel for which the calculation processing of the combined weights W1 to W4 and the normalized pixel data N1 to N4 is unprocessed. Select (x, y). Then, the pixel data S2 to S4 (x, y) are output to the weight calculation unit 16a, and the pixel data S1 to S4 (x, y) are output to the normalization unit 16b (step S202).

一方、重み計算部16aは、画素データS2〜S4(x,y)を取得すると、まず、画素データS2(x,y)を、上式(2)に代入して、F(S2(x,y))を算出する。更に、上式(3)から、「W1(x,y)=F(S2(x,y))」を計算する(ステップS204)。つまり、合成重みW1(x,y)を算出するときは、画素データS2(x,y)のみを用いる。
例えば、画素データS2(x,y)の輝度値が「10」であるとする。また、ここでは、上式(2)におけるnを「2」とする。この場合は、「F(S2(x,y))=(10/255)2≒1.538×10-3」となり、上式(3)から、「W1(x,y)=1.538×10-3」となる。
On the other hand, when the weight calculation unit 16a acquires the pixel data S2 to S4 (x, y), first, the pixel data S2 (x, y) is substituted into the above equation (2), and F (S2 (x, y) y)) is calculated. Further, “W1 (x, y) = F (S2 (x, y))” is calculated from the above equation (3) (step S204). That is, when calculating the composite weight W1 (x, y), only the pixel data S2 (x, y) is used.
For example, it is assumed that the luminance value of the pixel data S2 (x, y) is “10”. Here, n in the above equation (2) is “2”. In this case, “F (S2 (x, y)) = (10/255) 2 ≈1.538 × 10 −3 ”, and from the above equation (3), “W1 (x, y) = 1.538 × 10 −3 ”.

なお、撮像条件などに応じて、nの値を適宜切り替えることで、上式(2)の関数F(x)の値が、より急峻な変化をするように切り替えたり、より緩やかに変化するように切り替えたりすることができる。
ここで、合成重みW1(x,y)は、図9(a)に示すように、入射光量が少ないうちは比較的緩やかに変化し、ある入射光量を境に一定値となる。換言すると、S2(x,y)の明度(輝度値)が大きいほどW1(x,y)は大きくなり、S2(x,y)の明度が飽和状態となる明度のときにW1(x,y)は最大となる。
Note that the value of the function F (x) in the above equation (2) is switched so as to change more steeply or more gradually by appropriately switching the value of n according to the imaging conditions and the like. Or switch to
Here, as shown in FIG. 9A, the combined weight W1 (x, y) changes relatively slowly as the amount of incident light is small, and becomes a constant value with a certain amount of incident light as a boundary. In other words, W1 (x, y) increases as the brightness (luminance value) of S2 (x, y) increases, and W1 (x, y) when the brightness of S2 (x, y) is saturated. ) Is the maximum.

次に、重み計算部16aは、S3(x,y)を、上式(2)に代入して、F(S3(x,y))を算出し、算出したF(S3(x,y))と、先ほど算出したF(S2(x,y))とを上式(4)に代入する。これにより、「W2(x,y)=F(S3(x,y))−F(S2(x,y))」を計算する(ステップS206)。つまり、合成重みW2(x,y)を算出するときは、画素データS2(x,y)及びS3(x,y)の2つを用いる。   Next, the weight calculation unit 16a substitutes S3 (x, y) into the above equation (2) to calculate F (S3 (x, y)), and calculates F (S3 (x, y)) ) And F (S2 (x, y)) calculated earlier are substituted into the above equation (4). Thus, “W2 (x, y) = F (S3 (x, y)) − F (S2 (x, y))” is calculated (step S206). That is, when calculating the composite weight W2 (x, y), two pieces of pixel data S2 (x, y) and S3 (x, y) are used.

例えば、画素データS3(x,y)の輝度値が「40」であるとする。この場合は、「F(S3(x,y))=(40/255)2≒0.0246」となり、上式(4)から、「W2=F(S3(x,y))−F(S2(x,y))=0.0246−1.538×10-3≒0.02307」となる。
ここで、合成重みW2(x,y)は、図9(b)に示すように、入射光量に対して、W1(x,y)と比較して急峻に上昇し、ある入射光量を境に低下する。換言すると、S3(x,y)の明度(輝度値)が大きいほどW2(x,y)は大きくなるが、S2(x,y)の明度も大きいときはW2(x,y)は小さくなる。また、S2(x,y)、S3(x,y)が両方とも飽和しているときはW2(x,y)は最小値「0」となる。
For example, it is assumed that the luminance value of the pixel data S3 (x, y) is “40”. In this case, “F (S3 (x, y)) = (40/255) 2 ≈0.0246”, and from the above equation (4), “W2 = F (S3 (x, y)) − F ( S2 (x, y)) = 0.0246-1.538 × 10 −3 ≈0.02307 ”.
Here, as shown in FIG. 9B, the combined weight W2 (x, y) rises sharply as compared to W1 (x, y) with respect to the incident light amount, and at a certain incident light amount as a boundary. descend. In other words, W2 (x, y) increases as the brightness (luminance value) of S3 (x, y) increases, but W2 (x, y) decreases when the brightness of S2 (x, y) is also large. . In addition, when both S2 (x, y) and S3 (x, y) are saturated, W2 (x, y) becomes the minimum value “0”.

次に、重み計算部16aは、S4(x,y)を、上式(2)に代入して、F(S4(x,y))を算出し、算出したF(S4(x,y))と、先ほど算出したF(S3(x,y))とを上式(5)に代入する。これにより、「W3(x,y)=F(S4(x,y))−F(S3(x,y))」を計算する(ステップS208)。つまり、合成重みW3(x,y)を算出するときは、画素データS3(x,y)及びS4(x,y)の2つを用いる。   Next, the weight calculation unit 16a substitutes S4 (x, y) into the above equation (2) to calculate F (S4 (x, y)), and calculates F (S4 (x, y)) ) And F (S3 (x, y)) calculated earlier are substituted into the above equation (5). Thus, “W3 (x, y) = F (S4 (x, y)) − F (S3 (x, y))” is calculated (step S208). That is, when calculating the composite weight W3 (x, y), two pieces of pixel data S3 (x, y) and S4 (x, y) are used.

例えば、画素データS4(x,y)の輝度値が「160」であるとする。この場合は、「F(S4(x,y))=(160/255)2≒0.3937」となり、上式(5)から、「W3=F(S4(x,y))−F(S3(x,y))=0.3937−0.02307≒0.3706」となる。
ここで、合成重みW3(x,y)は、図9(c)に示すように、入射光量に対して、W2(x,y)と比較して急峻に上昇し、ある入射光量を境にW2(x,y)と比較して急峻に低下する。具体的に、S4(x,y)の明度(輝度値)が大きいほどW3(x,y)は大きくなるが、S3(x,y)の明度も大きいときはW3(x,y)は小さくなる。また、S3(x,y)、S4(x,y)が両方とも飽和しているときはW3(x,y)は最小値「0」となる。
For example, it is assumed that the luminance value of the pixel data S4 (x, y) is “160”. In this case, “F (S4 (x, y)) = (160/255) 2 ≈0.3937”, and from the above equation (5), “W3 = F (S4 (x, y)) − F ( S3 (x, y)) = 0.3937−0.02307≈0.3706 ”.
Here, as shown in FIG. 9C, the combined weight W3 (x, y) rises sharply with respect to the incident light amount as compared with W2 (x, y), and at a certain incident light amount as a boundary. Compared with W2 (x, y), it decreases sharply. Specifically, W3 (x, y) increases as the brightness (luminance value) of S4 (x, y) increases, but W3 (x, y) decreases when the brightness of S3 (x, y) also increases. Become. Further, when both S3 (x, y) and S4 (x, y) are saturated, W3 (x, y) has the minimum value “0”.

次に、重み計算部16aは、先ほど算出したF(S4(x,y))を上式(6)に代入し、「W4(x,y)=1−F(S4(x,y))」を計算する(ステップS210)。つまり、合成重みW4(x,y)を計算するときは、「W1+W2+W3+W4=1」となることを利用して計算を行う。
例えば、上記数値例の値を用いた場合に、「W4=1−F(S4(x,y))=1−0.3706=0.6294」となる。
Next, the weight calculation unit 16a substitutes the previously calculated F (S4 (x, y)) into the above equation (6), and “W4 (x, y) = 1−F (S4 (x, y))”. Is calculated (step S210). That is, when calculating the combined weight W4 (x, y), the calculation is performed using the fact that “W1 + W2 + W3 + W4 = 1”.
For example, when the value of the above numerical example is used, “W4 = 1−F (S4 (x, y)) = 1−0.3706 = 0.6294”.

ここで、合成重みW4(x,y)は、図9(d)に示すように、入射光量が少なければ少ないほど大きな値となり、入射光量の増加に応じてW3(x,y)と比較して急峻に低下する。具体的に、S4(x,y)の明度(輝度値)が小さいほどW4(x,y)は大きくなるが、S4(x,y)の明度が大きいときはW4(x,y)は小さくなる。また、S4(x,y)が飽和しているときはW4(x,y)は最小値「0」となる。   Here, as shown in FIG. 9D, the combined weight W4 (x, y) increases as the amount of incident light decreases, and is compared with W3 (x, y) as the amount of incident light increases. Suddenly decreases. Specifically, W4 (x, y) increases as the brightness (luminance value) of S4 (x, y) decreases, but W4 (x, y) decreases when the brightness of S4 (x, y) increases. Become. Further, when S4 (x, y) is saturated, W4 (x, y) becomes the minimum value “0”.

以上のようにして計算される合成重みW1〜W4(x,y)を重ねて表示すると、図10に示すように、入射光量に対して、W1〜W4(x,y)がオーバーラップする部分が現れる。本実施形態では、W2(x,y)を計算するときに、S2(x,y)及びS3(x,y)の2つの明度を用い、W3(x,y)を計算するときに、S3(x,y)及びS4(x,y)の2つの明度を用いている。そのため、特にオーバーラップする領域において、S3(x,y)だけ、又はS4(x,y)だけを用いて計算するよりも、より適切な合成重みW2(x,y)及びW3(x,y)を計算することができる。
なお、重み計算部16aは、上記のようにして算出した合成重みW1〜W4(x,y)を、合成部16cに出力する。
When the combined weights W1 to W4 (x, y) calculated as described above are displayed in an overlapping manner, as shown in FIG. 10, W1 to W4 (x, y) overlap with the incident light amount. Appears. In this embodiment, when calculating W2 (x, y), two brightness values S2 (x, y) and S3 (x, y) are used, and when calculating W3 (x, y), S3 Two brightness values (x, y) and S4 (x, y) are used. Therefore, in the overlapping region, more appropriate composite weights W2 (x, y) and W3 (x, y) than calculating using only S3 (x, y) or only S4 (x, y) ) Can be calculated.
The weight calculator 16a outputs the combined weights W1 to W4 (x, y) calculated as described above to the combiner 16c.

また、正規化部16bは、画素データS1〜S4(x,y)を取得すると、まず、画素データS1(x,y)と、制御部18から取得した露光比情報のうちT1及びT4とに基づき、上式(7)から、画素データS1(x,y)を正規化する(ステップS212)。
具体的に、画素データS1(x,y)と、露光時間T1、T4とを、上式(7)に代入して、正規化画素データN1(x,y)として、「N1(x,y)=S1(x,y)×T4/T1」を計算する。
露光時間T1、T4として上記数値例を用い、画素データS1(x,y)の輝度値が「2」である場合に、「N1(x,y)=2×500/2=500」となる。
Further, when the normalization unit 16b acquires the pixel data S1 to S4 (x, y), first, the normalization unit 16b converts the pixel data S1 (x, y) into T1 and T4 among the exposure ratio information acquired from the control unit 18. Based on the above equation (7), the pixel data S1 (x, y) is normalized (step S212).
Specifically, the pixel data S1 (x, y) and the exposure times T1 and T4 are substituted into the above equation (7) to obtain “N1 (x, y) as normalized pixel data N1 (x, y). ) = S1 (x, y) × T4 / T1 ”.
Using the above numerical example as the exposure times T1 and T4, when the luminance value of the pixel data S1 (x, y) is “2”, “N1 (x, y) = 2 × 500/2 = 500”. .

次に、正規化部16bは、画素データS2(x,y)と、制御部18から取得した露光比情報のうちT2及びT4とに基づき、上式(8)から、画素データS2(x,y)を正規化する(ステップS214)。
具体的に、画素データS2(x,y)と、露光時間T2、T4とを、上式(8)に代入して、正規化画素データN2(x,y)として、「N2(x,y)=S2(x,y)×T4/T2」を計算する。
露光時間T2、T4、画素データS2(x,y)として上記数値例を用いた場合に、「N2(x,y)=10×500/13≒385」となる。
Next, the normalization unit 16b calculates the pixel data S2 (x, y) from the above equation (8) based on the pixel data S2 (x, y) and T2 and T4 of the exposure ratio information acquired from the control unit 18. y) is normalized (step S214).
Specifically, the pixel data S2 (x, y) and the exposure times T2 and T4 are substituted into the above equation (8) to obtain “N2 (x, y) as normalized pixel data N2 (x, y). ) = S2 (x, y) * T4 / T2 ".
When the above numerical examples are used as the exposure times T2 and T4 and the pixel data S2 (x, y), “N2 (x, y) = 10 × 500 / 13≈385”.

次に、正規化部16bは、画素データS3(x,y)と、制御部18から取得した露光比情報のうちT3及びT4とに基づき、上式(9)から、画素データS3(x,y)を正規化する(ステップS216)。
具体的に、画素データS3(x,y)と、露光時間T3、T4とを、上式(9)に代入して、正規化画素データN3(x,y)として、「N3(x,y)=S3(x,y)×T4/T3」を計算する。
Next, the normalization unit 16b calculates the pixel data S3 (x, y) from the above equation (9) based on the pixel data S3 (x, y) and T3 and T4 of the exposure ratio information acquired from the control unit 18. y) is normalized (step S216).
Specifically, the pixel data S3 (x, y) and the exposure times T3 and T4 are substituted into the above equation (9) to obtain “N3 (x, y) as normalized pixel data N3 (x, y). ) = S3 (x, y) * T4 / T3 ".

露光時間T3、T4、画素データS3(x,y)として上記数値例を用いた場合に、「N3(x,y)=40×500/79≒253」となる。
なお、露光時間T4を基準としているため、画素データS4(x,y)は、そのままの値を用いる(上式(10))。上記数値例で言うと、「N4(x,y)=160」となる。
なお、正規化部16bは、上記のようにして算出した正規化画素データN1〜N4(x,y)を、合成部16cに出力する。
When the above numerical example is used as the exposure times T3 and T4 and the pixel data S3 (x, y), “N3 (x, y) = 40 × 500 / 79≈253”.
Since the exposure time T4 is used as a reference, the pixel data S4 (x, y) uses the same value (the above formula (10)). In the above numerical example, “N4 (x, y) = 160”.
The normalizing unit 16b outputs the normalized pixel data N1 to N4 (x, y) calculated as described above to the synthesizing unit 16c.

合成部16cは、重み計算部16aから合成重みW1〜W4(x,y)を取得し、正規化部16bから正規化画素データN1〜N4(x,y)を取得すると、上式(11)を用いて、N1〜N4のHDR合成処理を実行する(ステップS218)。
具体的に、上式(11)に示すように、正規化画素データN1〜N4(x,y)を、合成重みW1〜W4で重み付けすると共に加算して、HDR画素データHDR(x,y)を計算する。つまり、HDR画素データHDR(x,y)として、「HDR(x,y)=W1(x,y)×N1(x,y)+W2(x,y)×N2(x,y)+W3(x,y)×N3(x,y)+W4(x,y)×N4(x,y)」を計算する。
When the combining unit 16c acquires the combined weights W1 to W4 (x, y) from the weight calculating unit 16a and the normalized pixel data N1 to N4 (x, y) from the normalizing unit 16b, the above formula (11) Is used to execute HDR synthesis processing of N1 to N4 (step S218).
Specifically, as shown in the above equation (11), the normalized pixel data N1 to N4 (x, y) are weighted with the combined weights W1 to W4 and added to add the HDR pixel data HDR (x, y). Calculate That is, as HDR pixel data HDR (x, y), “HDR (x, y) = W1 (x, y) × N1 (x, y) + W2 (x, y) × N2 (x, y) + W3 (x , Y) * N3 (x, y) + W4 (x, y) * N4 (x, y) ".

ここで、合成重みW1〜W4(x,y)及び正規化画素データN1〜N4(x,y)として、上記数値例を用いる。
上式(11)に上記各数値を代入すると、「HDR(x,y)=1.538×10-3×500+0.02307×385+0.3706×253+0.6294×160≒0.769+8.88+93.8+101≒204」となる。
Here, the above numerical example is used as the combined weights W1 to W4 (x, y) and the normalized pixel data N1 to N4 (x, y).
When the above numerical values are substituted into the above equation (11), “HDR (x, y) = 1.538 × 10 −3 × 500 + 0.02307 × 385 + 0.3706 × 253 + 0.6294 × 160≈0.769 + 8.88 + 93.8 + 101 ≈ 204 ”.

このようにして生成されたHDR画素データHDR(x,y)は、フレームメモリ17の各画素位置に対応するアドレスのメモリ領域に格納される(ステップS220)。
上記のようにして、各画素の合成重みW1〜W4(x,y)、正規化画素データN1〜N4(x,y)、HDR画素データHDR(x,y)を順次計算する。このHDR合成処理は、1フレーム分の画素についてHDR合成処理が終了するまで行われる(ステップS222及びS224の「Yes」の分岐)。
The HDR pixel data HDR (x, y) generated in this way is stored in a memory area at an address corresponding to each pixel position in the frame memory 17 (step S220).
As described above, the composite weights W1 to W4 (x, y), normalized pixel data N1 to N4 (x, y), and HDR pixel data HDR (x, y) of each pixel are sequentially calculated. This HDR synthesizing process is performed until the HDR synthesizing process is completed for one frame of pixels (“Yes” branch in steps S222 and S224).

そして、1フレーム分のHDR画素データが生成され、且つ撮像処理が継続している場合に(ステップS108の「No」の分岐)、露光比調整処理を実行する(ステップS110)。
露光比調整処理が開始されると、画像解析部19は、1フレーム分のHDR画素データを、フレームメモリ17から取得する。そして、取得したHDR画素データに基づき、撮像環境の明るさに係る統計情報として、1フレーム分の平均輝度Lavを算出し、算出したLavを制御部18に出力する(ステップS300)。なお、1フレーム分に限らず、複数フレーム分のHDR画素データを用いて複数フレーム分の平均輝度を算出するようにしてもよい。
制御部18は、画像解析部19から平均輝度Lavを取得すると、Lavと、高輝度側の閾値Lthとを比較し、LavがLthより大きいか否かを判定する。ここでは、高輝度側の閾値Lthを「192」、低輝度側の閾値Ltlを「64」とする。
Then, when HDR pixel data for one frame is generated and the imaging process is continued (“No” branch of step S108), the exposure ratio adjustment process is executed (step S110).
When the exposure ratio adjustment process is started, the image analysis unit 19 acquires the HDR pixel data for one frame from the frame memory 17. Based on the acquired HDR pixel data, the average luminance Lav for one frame is calculated as statistical information related to the brightness of the imaging environment, and the calculated Lav is output to the control unit 18 (step S300). The average luminance for a plurality of frames may be calculated using the HDR pixel data for a plurality of frames, not limited to one frame.
When acquiring the average luminance Lav from the image analysis unit 19, the control unit 18 compares Lav with the threshold Lth on the high luminance side and determines whether or not Lav is greater than Lth. Here, the threshold Lth on the high luminance side is “192”, and the threshold Ltl on the low luminance side is “64”.

例えば、平均輝度Lavが「61」の場合は、Lav(61)はLth(192)よりも小さいので(ステップS302の「No」の分岐)、制御部18は、次に、LavとLtlとを比較し、LavがLtlよりも小さいか否かを判定する。ここでは、Lav(61)はLtl(64)よりも小さいので(ステップS308の「Yes」の分岐)、制御部18は、撮像環境が暗いと判断し、現在設定されている最長露光時間「Tmax(T3)=500H」を増加する調整を行う(ステップS310)。例えば、「T3=1000H」に増加したとする。これにより、略均等となっていた比率が崩れてしまうので、制御部18は、「T1=2H(初)、T4=1000H(増)」を、上式(6)及び(7)に代入して、中間露光時間Tmid(T2及びT3)を再計算する。これにより、「T2=(4×1000)1/3≒16」が算出され、「T3=(2×1000000)1/3≒126」が算出される。そして、新たな露光比情報として、「T1:T2:T3:T4=2:16:126:1000」が生成され、この露光比情報に基づき、新たな露光情報信号が生成される。生成された露光比情報は映像信号処理部16に出力され、生成された露光情報信号は、各制御信号と共に撮像素子10に送信される。これにより、撮像素子10では、撮像環境の明るさに適した新たな露光比情報に基づいて撮像処理が行われる。 For example, when the average luminance Lav is “61”, since Lav (61) is smaller than Lth (192) (the “No” branch in Step S302), the control unit 18 next calculates Lav and Ltl. A comparison is made to determine whether Lav is smaller than Ltl. Here, since Lav (61) is smaller than Ltl (64) (branch “Yes” in step S308), the control unit 18 determines that the imaging environment is dark, and currently sets the longest exposure time “Tmax”. Adjustment to increase (T3) = 500H ”is performed (step S310). For example, it is assumed that the number increases to “T3 = 1000H”. As a result, the ratio that is substantially uniform is lost, and the control unit 18 substitutes “T1 = 2H (initial), T4 = 1000H (increase)” in the above equations (6) and (7). Then, the intermediate exposure time Tmid (T2 and T3) is recalculated. As a result, “T2 = (4 × 1000) 1/3 ≈16” is calculated, and “T3 = (2 × 1000000) 1/3 ≈126” is calculated. Then, “T1: T2: T3: T4 = 2: 16: 126: 1000” is generated as new exposure ratio information, and a new exposure information signal is generated based on this exposure ratio information. The generated exposure ratio information is output to the video signal processing unit 16, and the generated exposure information signal is transmitted to the image sensor 10 together with each control signal. Thereby, in the image sensor 10, an imaging process is performed based on new exposure ratio information suitable for the brightness of the imaging environment.

また、算出した平均輝度Lavが「221」であった場合は、Lav(221)はLth(192)よりも大きいので(ステップS302の「Yes」の分岐)、制御部18は、撮像環境が明るいと判断し、現在設定されている最短露光時間「Tmin(T1)=2H」を減少する調整を行う(ステップS114)。例えば、「T1=1H」に減少したとする。これにより、略均等となっていた比率が崩れてしまうので、制御部18は、「T1=1H(減)、T4=500H(初)」を、上式(12)及び(13)に代入して、中間露光時間Tmid(T2及びT3)を再計算する。これにより、「T2=(1×500)1/3≒8」が算出され、「T3=(1×250000)1/3≒63」が算出される。そして、新たな露光比情報として、「T1:T2:T3:T4=1:8:63:500」が生成され、この露光比情報に基づき、新たな露光情報信号が生成される。生成された露光比情報は映像信号処理部16に出力され、生成された露光情報信号は、各制御信号と共に撮像素子10に送信される。これにより、撮像素子10では、撮像環境の明るさに適した新たな露光比情報に基づいて撮像処理が行われる。 When the calculated average luminance Lav is “221”, since Lav (221) is larger than Lth (192) (“Yes” branch in step S302), the control unit 18 has a bright imaging environment. And the adjustment is performed to reduce the currently set shortest exposure time “Tmin (T1) = 2H” (step S114). For example, it is assumed that the value decreases to “T1 = 1H”. As a result, the substantially uniform ratio is lost, and the control unit 18 substitutes “T1 = 1H (decrease), T4 = 500H (initial)” in the above equations (12) and (13). Then, the intermediate exposure time Tmid (T2 and T3) is recalculated. Thus, “T2 = (1 × 500) 1/3 ≈8” is calculated, and “T3 = (1 × 250,000) 1/3 ≈63” is calculated. Then, “T1: T2: T3: T4 = 1: 8: 63: 500” is generated as new exposure ratio information, and a new exposure information signal is generated based on this exposure ratio information. The generated exposure ratio information is output to the video signal processing unit 16, and the generated exposure information signal is transmitted to the image sensor 10 together with each control signal. Thereby, in the image sensor 10, an imaging process is performed based on new exposure ratio information suitable for the brightness of the imaging environment.

以上説明したように、本実施形態の撮像装置1は、露光時間T1〜T4で撮像して得られた画素データS1〜S4を重み付けして合成する際の合成重みW1〜W4の計算において、W2については、S2及びS3の2つを用いて計算するようにした。更に、W3については、S3及びS4の2つを用いて計算するようにした。
つまり、S2に対する合成重みW2については、S2とその次に露光時間の長いS3の両方の明度(輝度値)を用いて計算するので、S2の明度だけ用いた場合と比較して、より自然で適切な合成重みW2を計算することができる。
同様に、S3に対する合成重みW3については、S3とその次に露光時間の長いS4の両方の明度(輝度値)を用いて計算するので、S3の明度だけ用いた場合と比較して、より自然で適切な合成重みW3を計算することができる。
As described above, the imaging apparatus 1 according to the present embodiment calculates the combination weights W1 to W4 when weighting and combining the pixel data S1 to S4 obtained by imaging with the exposure times T1 to T4. Is calculated using two of S2 and S3. Furthermore, W3 is calculated using two of S3 and S4.
In other words, the combined weight W2 for S2 is calculated using the brightness (luminance value) of both S2 and S3, which has the longest exposure time, and therefore is more natural than the case where only the brightness of S2 is used. An appropriate composite weight W2 can be calculated.
Similarly, the composite weight W3 for S3 is calculated using the brightness (luminance value) of both S3 and S4, which has the longest exposure time, and therefore more natural than the case where only the brightness of S3 is used. Thus, an appropriate composite weight W3 can be calculated.

また、撮像素子10において、隣接する各2つの露光量の比率「L2/L1」、「L3/L2」及び「L4/L3」が均等「L2/L1=L3/L2=L4/L3」となる露光量L1〜L4に対応する露光時間T1〜T4で被写体を撮像することができる。
これによって、HDR合成処理で用いる画素データS1〜S4の露光量の比が常に一定となるため、暗部から明部に渡って、輝度が均等になり且つノイズの少ない合成画像を得ることができる。
In the image sensor 10, the ratios “L2 / L1”, “L3 / L2”, and “L4 / L3” of each two adjacent exposure amounts are equally “L2 / L1 = L3 / L2 = L4 / L3”. The subject can be imaged at exposure times T1 to T4 corresponding to the exposure amounts L1 to L4.
As a result, the ratio of the exposure amounts of the pixel data S1 to S4 used in the HDR synthesizing process is always constant, so that it is possible to obtain a synthesized image with uniform luminance and less noise from the dark part to the bright part.

更に、撮像環境の明るさに係る統計情報として、1フレーム分のHDR画素データから平均輝度Lavを算出し、該Lavと高輝度側閾値Lth及び低輝度側閾値Ltlとを比較して、撮像環境の明るさの状態を判断することができる。
更に、撮像環境が明るいと判断された場合は、最短露光時間Tmin(T1)を減少させる調整を行い、撮像環境が暗いと判断された場合は、最長露光時間Tmax(T4)を増加させる調整を行うことができる。
Further, as the statistical information related to the brightness of the imaging environment, the average luminance Lav is calculated from the HDR pixel data for one frame, and the Lav is compared with the high luminance side threshold value Lth and the low luminance side threshold value Ltl, thereby obtaining the imaging environment. It is possible to determine the brightness state.
Further, when the imaging environment is determined to be bright, adjustment is performed to decrease the shortest exposure time Tmin (T1), and when the imaging environment is determined to be dark, adjustment is performed to increase the longest exposure time Tmax (T4). It can be carried out.

更に、調整後のT1及びT4を用いて、上式(12)及び(13)に従ってT2及びT3を再計算することで、露光時間の調整によって崩れた比率を均等に戻すことができる。
これによって、露光量比(露光時間比)を、撮像環境の明るさに適した露光量比に自動で調整することができる。
上記実施形態において、撮像素子10及び制御部18は、形態7に記載の撮像手段に対応し、重み計算部16aは、形態1乃至4のいずれか1に記載の重み算出手段に対応し、正規化部16b及び合成部16cは、形態1に記載の画像合成手段に対応する。
Furthermore, by using T1 and T4 after adjustment and recalculating T2 and T3 according to the above formulas (12) and (13), the ratio collapsed by adjusting the exposure time can be returned evenly.
Thus, the exposure amount ratio (exposure time ratio) can be automatically adjusted to an exposure amount ratio suitable for the brightness of the imaging environment.
In the above embodiment, the imaging device 10 and the control unit 18 correspond to the imaging unit described in the form 7, and the weight calculation unit 16a corresponds to the weight calculation unit described in any one of the forms 1 to 4, and The combining unit 16b and the combining unit 16c correspond to the image combining unit described in the first embodiment.

また、上記実施形態において、ステップS204〜S210は、形態5又は6に記載の重み算出ステップに対応し、ステップ212〜s218は、形態5又は6に記載の画像合成ステップに対応する。
なお、上記実施形態における、撮像装置1は、表示装置、メモリ装置等の不図示の他の装置と組み合わせて、デジタルカメラ、デジタルビデオカメラなどの電子機器を構成することが可能である。
また、上記実施形態において、合成重みを用いるときに、上式(2)に示す関数F(x)を用いた構成を例に挙げたが、この構成に限らない。
Moreover, in the said embodiment, step S204-S210 respond | corresponds to the weight calculation step as described in form 5 or 6, and step 212-s218 respond | corresponds to the image composition step as described in form 5 or 6.
Note that the imaging device 1 in the above embodiment can be combined with other devices (not shown) such as a display device and a memory device to constitute an electronic device such as a digital camera or a digital video camera.
Moreover, in the said embodiment, when using the synthetic | combination weight, although the structure using the function F (x) shown to said Formula (2) was mentioned as an example, it is not restricted to this structure.

例えば、要素xの値(上記実施形態では輝度値)が大きいほど増加し、その最大値が「1」又は他の定数となるような関数であれば、他の関数を用いる構成としてもよい。例えば、オフセット値を設定して、xの値がオフセット値以下の場合は全て「0」とするような関数を用いてもよい。
また、上記実施形態において、比率が均等となる複数種類の露光量を、露光時間を制御することで実現する構成としたが、この構成に限らず、撮像素子10の機能に応じて、例えば、アイリス(絞り)や、撮像感度などを制御して実現する構成としてもよい。
For example, as long as the value of the element x (in the above embodiment, the luminance value) increases, the function increases as long as the maximum value is “1” or another constant, and another function may be used. For example, a function that sets an offset value and sets all values to “0” when the value of x is equal to or smaller than the offset value may be used.
Moreover, in the said embodiment, although it was set as the structure which implement | achieves the multiple types of exposure amount from which a ratio becomes equal by controlling exposure time, according to the function of the image pick-up element 10 not only in this structure, for example, It may be configured to be realized by controlling iris (aperture), imaging sensitivity, and the like.

また、上記実施形態において、上式(12)及び(13)を用いて、中間露光時間T2及びT3を算出する構成としたが、この構成に限らない。例えば、予め上式(12)及び(13)を用いて所定のT1及びT4に対するT2及びT3を算出してデータテーブル(LUT)を生成し、この生成したLUTを用いてT2及びT3を決定する構成としてもよい。
また、上記実施形態において、撮像素子10のHDRセンサ10dが、CMOS技術を用いて構成されたセンサセルアレイ56を有する構成としたが、この構成に限らない。例えば、CCDから構成されるセンサセルアレイを有する構成など他の構成としてもよい。
Moreover, in the said embodiment, although it was set as the structure which calculates intermediate | middle exposure time T2 and T3 using the said Formula (12) and (13), it is not restricted to this structure. For example, T2 and T3 for predetermined T1 and T4 are calculated in advance using the above equations (12) and (13) to generate a data table (LUT), and T2 and T3 are determined using the generated LUT. It is good also as a structure.
In the above embodiment, the HDR sensor 10d of the image sensor 10 has the sensor cell array 56 configured using the CMOS technology. However, the configuration is not limited thereto. For example, other configurations such as a configuration having a sensor cell array composed of CCDs may be used.

また、上記実施形態は、本発明の好適な具体例であり、技術的に好ましい種々の限定が付されているが、本発明の範囲は、上記の説明において特に本発明を限定する旨の記載がない限り、これらの形態に限られるものではない。また、上記の説明で用いる図面は、図示の便宜上、部材ないし部分の縦横の縮尺は実際のものとは異なる模式図である。
また、本発明は上記実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。
The above embodiments are preferable specific examples of the present invention, and various technically preferable limitations are given. However, the scope of the present invention is described in particular in the above description to limit the present invention. As long as there is no, it is not restricted to these forms. In the drawings used in the above description, for convenience of illustration, the vertical and horizontal scales of members or parts are schematic views different from actual ones.
Further, the present invention is not limited to the above-described embodiment, and modifications, improvements, and the like within the scope that can achieve the object of the present invention are included in the present invention.

1…撮像装置、10…撮像素子、10a…レンズ、10b…マイクロレンズ、10c…カラーフィルタアレイ、10d…HDRセンサ、12〜15…第1〜第4メモリ、16…映像信号処理部、16a…重み計算部、16b…正規化部、16c…合成部、17…フレームメモリ、18…制御部、19…画像解析部、20…操作部、50…基準タイミング発生器、54…走査ラインスキャナ、56…センサセルアレイ、58…水平転送部 DESCRIPTION OF SYMBOLS 1 ... Image pick-up device, 10 ... Image pick-up element, 10a ... Lens, 10b ... Micro lens, 10c ... Color filter array, 10d ... HDR sensor, 12-15 ... 1st-4th memory, 16 ... Image signal processing part, 16a ... Weight calculation unit, 16b ... normalization unit, 16c ... synthesis unit, 17 ... frame memory, 18 ... control unit, 19 ... image analysis unit, 20 ... operation unit, 50 ... reference timing generator, 54 ... scanning line scanner, 56 ... Sensor cell array, 58 ... Horizontal transfer unit

Claims (6)

3種類以上の露光量で被写体を撮像して得られた3種類以上の画像を用いた画像合成を行う画像処理装置であって、
第1の画像の輝度と第2の画像の輝度とに基づき前記画像合成における前記第1の画像の重みを算出する重み計算部と、
前記重み計算部において算出された重みを用いて前記画像合成を行う画像合成部と、
前記画像合成の結果の画像から得られる統計情報により前記3種類以上の露光量を調整するための情報を生成する画像解析部と、を含み
前記第1の画像の露光量は前記3種類以上の露光量において最小となる露光量以外及び最大となる露光量以外の露光量であり、
前記第2の画像の露光量は前記第1の画像の露光量よりも大きく、且つ、前記3種類以上の露光量の中で前記第1の画像の露光量の次に大きい露光量であることを特徴とする画像処理装置。
An image processing apparatus that performs image composition using three or more types of images obtained by imaging a subject with three or more types of exposure amounts,
A weight calculation unit for calculating a weight of the first image in the image composition based on the luminance of the first image and the luminance of the second image;
An image synthesis unit that performs the image synthesis using the weight calculated in the weight calculation unit;
And an image analysis unit that generates information for adjusting the three or more types of exposure amounts based on statistical information obtained from the image obtained as a result of the image synthesis. The exposure amount of the first image includes the three or more types of exposure amounts. The exposure amount other than the minimum exposure amount and the maximum exposure amount in the exposure amount,
The exposure amount of the second image is larger than the exposure amount of the first image, and is the second largest exposure amount after the exposure amount of the first image among the three or more types of exposure amounts. An image processing apparatus.
前記3種類以上の露光量で撮像された画像において、
最小の露光量で撮像された画像を第3の画像とし、前記第3の画像の次に大きい露光量で撮像された画像を第4の画像としたときに、
前記重み計算部において、前記第3の画像の重みが前記第4の画像の輝度を基に算出され、
最大の露光量で撮像された画像を第5の画像としときに、
前記重み計算部において、前記第5の画像の重みが前記3種類以上の露光量で撮像された画像のうち前記第3の画像以外の画像の輝度を基に算出されることを特徴とする請求項1に記載の画像処理装置。
In an image captured with the three or more exposure amounts,
When the image captured with the minimum exposure amount is the third image, and the image captured with the next largest exposure amount after the third image is the fourth image,
In the weight calculation unit, the weight of the third image is calculated based on the luminance of the fourth image,
The image captured at the maximum exposure amount when the fifth image,
The weight calculation unit calculates the weight of the fifth image based on the luminance of an image other than the third image among images captured with the three or more types of exposure amounts. Item 8. The image processing apparatus according to Item 1.
前記統計情報は、複数の前記画像合成の結果から求めた平均輝度であることを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the statistical information is an average luminance obtained from a plurality of image synthesis results. 3種類以上の露光量で被写体を撮像して得られた3種類以上の画像を用いた画像合成を行う画像処理方法であって、
第1の画像の輝度と第2の画像の輝度とに基づき前記画像合成における前記第1の画像の重みを算出する重み計算のステップと、
前記重み計算部において算出された重みを用いて前記画像合成を行う画像合成のステップと、
前記画像合成の結果の画像から得られる統計情報により前記3種類以上の露光量を調整するための情報を生成する画像解析のステップと、を含み
前記第1の画像の露光量は前記3種類以上の露光量において最小となる露光量以外並びに最大となる露光量以外の露光量であり、
前記第2の画像の露光量は前記第1の画像の露光量よりも大きく、且つ、前記3種類以上の露光量の中で前記第1の画像の露光量の次に大きい露光量であることを特徴とする画像処理方法。
An image processing method for performing image composition using three or more images obtained by imaging a subject with three or more exposure amounts,
A weight calculation step of calculating a weight of the first image in the image composition based on the luminance of the first image and the luminance of the second image;
An image synthesis step of performing the image synthesis using the weight calculated in the weight calculation unit;
And an image analysis step of generating information for adjusting the three or more types of exposure amounts based on statistical information obtained from the image obtained as a result of the image synthesis. The amount of exposure of the first image is three or more types. The exposure amount other than the minimum exposure amount and the exposure amount other than the maximum exposure amount,
The exposure amount of the second image is larger than the exposure amount of the first image, and is the second largest exposure amount after the exposure amount of the first image among the three or more types of exposure amounts. An image processing method characterized by the above.
前記3種類以上の露光量で撮像された画像において、
最小の露光量で撮像された画像を第3の画像とし、前記第3の画像の次に大きい露光量で撮像された画像を第4の画像としたときに、
前記重み計算のステップにおいて、前記第3の画像の重みが前記第4の画像の輝度を基に算出され、
最大の露光量で撮像された画像を第5の画像としときに、
前記重み計算のステップにおいて、前記第5の画像の重みが前記3種類以上の露光量で撮像された画像のうち前記第3の画像以外の画像の輝度を基に算出されることを特徴とする請求項4に記載の画像処理方法。
In an image captured with the three or more exposure amounts,
When the image captured with the minimum exposure amount is the third image, and the image captured with the next largest exposure amount after the third image is the fourth image,
In the weight calculation step, the weight of the third image is calculated based on the luminance of the fourth image;
The image captured at the maximum exposure amount when the fifth image,
In the weight calculation step, the weight of the fifth image is calculated based on the luminance of an image other than the third image among images captured with the three or more types of exposure amounts. The image processing method according to claim 4.
前記統計情報は、複数の前記画像合成の結果から求めた平均輝度であることを特徴とする請求項4又は5に記載の画像処理方法。   6. The image processing method according to claim 4, wherein the statistical information is an average luminance obtained from a plurality of results of the image synthesis.
JP2009254212A 2009-11-05 2009-11-05 Image processing apparatus and image processing method Active JP5487884B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009254212A JP5487884B2 (en) 2009-11-05 2009-11-05 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009254212A JP5487884B2 (en) 2009-11-05 2009-11-05 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2011101180A JP2011101180A (en) 2011-05-19
JP2011101180A5 JP2011101180A5 (en) 2012-12-20
JP5487884B2 true JP5487884B2 (en) 2014-05-14

Family

ID=44192006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009254212A Active JP5487884B2 (en) 2009-11-05 2009-11-05 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5487884B2 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013021660A (en) 2011-07-14 2013-01-31 Sony Corp Image processing apparatus, image pickup apparatus, image processing method, and program
US9076233B2 (en) 2012-02-03 2015-07-07 Seiko Epson Corporation Image processing device and electronic apparatus using the same
US9918017B2 (en) 2012-09-04 2018-03-13 Duelight Llc Image sensor apparatus and method for obtaining multiple exposures with zero interframe time
US9531961B2 (en) 2015-05-01 2016-12-27 Duelight Llc Systems and methods for generating a digital image using separate color and intensity data
US9807322B2 (en) 2013-03-15 2017-10-31 Duelight Llc Systems and methods for a digital image sensor
US10558848B2 (en) 2017-10-05 2020-02-11 Duelight Llc System, method, and computer program for capturing an image with correct skin tone exposure
US9819849B1 (en) 2016-07-01 2017-11-14 Duelight Llc Systems and methods for capturing digital images
US10924688B2 (en) 2014-11-06 2021-02-16 Duelight Llc Image sensor apparatus and method for obtaining low-noise, high-speed captures of a photographic scene
US11463630B2 (en) 2014-11-07 2022-10-04 Duelight Llc Systems and methods for generating a high-dynamic range (HDR) pixel stream
KR102273656B1 (en) 2014-11-24 2021-07-05 삼성전자주식회사 Noise level control device of wide dynanamic range image, and image processing system including the same
JP6700723B2 (en) * 2014-12-17 2020-05-27 キヤノン株式会社 Imaging device and driving method of imaging device
JP6589478B2 (en) 2015-09-11 2019-10-16 セイコーエプソン株式会社 Measuring apparatus, electronic device, and measuring method
WO2018044314A1 (en) 2016-09-01 2018-03-08 Duelight Llc Systems and methods for adjusting focus based on focus target information
CN115406536B (en) * 2022-09-06 2023-09-29 苏州普立视科技有限公司 Control method of spectrocolorimeter lighting system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4306750B2 (en) * 2007-03-14 2009-08-05 ソニー株式会社 Imaging apparatus, imaging method, exposure control method, program
JP2009049547A (en) * 2007-08-15 2009-03-05 Seiko Epson Corp Image processing apparatus, image processing method, image processing program

Also Published As

Publication number Publication date
JP2011101180A (en) 2011-05-19

Similar Documents

Publication Publication Date Title
JP5487884B2 (en) Image processing apparatus and image processing method
US8310562B2 (en) Imaging control apparatus, imaging apparatus and imaging control method for compressing the dynamic range of image data
JP2011091584A (en) Imaging device, imaging method and electronic equipment
US7911507B2 (en) Solid-state image pickup device in which the saturated signal quantity of a W pixel is controlled
US8259189B2 (en) Electronic camera
US7643072B2 (en) Signal processing method for image capturing apparatus, and image capturing apparatus including calculating image transfer efficiency
KR20130138360A (en) Image processing apparatus, image pickup apparatus, image processing method, and program
JP6082274B2 (en) Imaging apparatus and control method thereof
KR101449805B1 (en) Image processing device that performs image processing
JP2008263547A (en) Imaging apparatus
JP2008271123A (en) Imaging device
EP1067777A2 (en) Image sensing device, image processing apparatus and method, and memory medium
JP4350936B2 (en) Signal readout method for solid-state image sensor
US20070019105A1 (en) Imaging apparatus for performing optimum exposure and color balance control
JP4118864B2 (en) Imaging device
JP4905229B2 (en) Image processing apparatus, image processing method, and image processing program
US7418153B2 (en) Electronic camera
US10623642B2 (en) Image capturing apparatus and control method thereof with change, in exposure period for generating frame, of conversion efficiency
JP2021164112A (en) Imaging apparatus, image processing device, and image processing program
JP4935925B1 (en) Imaging apparatus, white balance adjustment method, and white balance adjustment program
JP2007060492A (en) Imaging apparatus
JP2021110885A (en) Image capturing apparatus and control method thereof
JP7020463B2 (en) Imaging device
JP6590055B2 (en) Imaging device
JP6402807B2 (en) Imaging device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20110630

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121101

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121101

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131010

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131015

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131204

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140210

R150 Certificate of patent or registration of utility model

Ref document number: 5487884

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250