Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6514577B2 - IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS - Google Patents
[go: Go Back, main page]

JP6514577B2 - IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS - Google Patents

IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS Download PDF

Info

Publication number
JP6514577B2
JP6514577B2 JP2015122111A JP2015122111A JP6514577B2 JP 6514577 B2 JP6514577 B2 JP 6514577B2 JP 2015122111 A JP2015122111 A JP 2015122111A JP 2015122111 A JP2015122111 A JP 2015122111A JP 6514577 B2 JP6514577 B2 JP 6514577B2
Authority
JP
Japan
Prior art keywords
luminance
image
luminance value
image processing
value
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.)
Expired - Fee Related
Application number
JP2015122111A
Other languages
Japanese (ja)
Other versions
JP2017011366A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2015122111A priority Critical patent/JP6514577B2/en
Publication of JP2017011366A publication Critical patent/JP2017011366A/en
Application granted granted Critical
Publication of JP6514577B2 publication Critical patent/JP6514577B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像処理装置および画像処理方法ならびに撮像装置に関する。   The present invention relates to an image processing apparatus, an image processing method, and an imaging apparatus.

従来より、画像を撮影する際の適切な露光量制御を行う技術や、撮影した画像に最適な階調処理を行う技術が提案されている。しかしながら、被写体領域内でダイナミックレンジ(以下、Dレンジ)の広い斜光人物等のシーンでは、被写体の明るさを適切に判定することが困難であり、適切な露光量制御や適切な階調処理を実現するのが困難であった。例えば、特許文献1では、撮影画像のブロック積分の結果によって算出された第1の露出補正値と、ヒストグラムによって算出された第2の露出補正値とを用いることが提案されている。特許文献1では、画面全体の平均輝度が閾値以下の場合は第1、第2の露出補正値のうちの小さい方を、平均輝度値が閾値以上の場合はそれらのうちの大きい方を最終的な露出補正値として設定することが提案されている。   2. Description of the Related Art Conventionally, there have been proposed a technique for performing appropriate exposure amount control at the time of shooting an image and a technique for performing gradation processing optimal for a shot image. However, in a scene such as an oblique person with a wide dynamic range (hereinafter referred to as D range) within the subject area, it is difficult to properly determine the brightness of the subject, and appropriate exposure control and appropriate gradation processing are required. It was difficult to realize. For example, Patent Document 1 proposes using a first exposure correction value calculated as a result of block integration of a captured image and a second exposure correction value calculated using a histogram. In Patent Document 1, the smaller one of the first and second exposure correction values is selected if the average luminance of the entire screen is equal to or less than the threshold value, and the larger one of them is finally determined if the average luminance value is equal to or more It is proposed to set as an exposure correction value.

特開2011−259226号公報JP, 2011-259226, A

しかしながら、上述の特許文献に開示された従来技術では、撮影画像における被写体位置を加味しておらず、特に被写体のDレンジが広い場合には、被写体を適切な明るさにするような露光量の設定や階調処理を実現するのは難しい。また、画面全体の平均輝度に応じて露出補正値を切り替えているため、被写体が小さいシーンでは、適切な補正が行われにくいという課題がある。   However, in the prior art disclosed in the above-mentioned patent documents, the subject position in the photographed image is not taken into consideration, and in particular, when the D range of the subject is wide, the exposure amount to make the subject appropriate brightness. It is difficult to realize settings and gradation processing. In addition, since the exposure correction value is switched according to the average brightness of the entire screen, there is a problem that it is difficult to perform appropriate correction in a scene where the subject is small.

本発明は、上記の課題に鑑みてなされたものであり、被写体のDレンジが広い場合でも、適切に被写体の明るさを判定することを可能にすることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to make it possible to appropriately determine the brightness of a subject even when the D range of the subject is wide.

上記の目的を達成するための、本発明の一態様による画像処理装置は以下の構成を備える。すなわち、
入力された画像の輝度画像を生成する生成手段と、
前記輝度画像における特定の被写体領域の位置に関連して前記輝度画像から選択された画素の輝度値に基づいて第1の輝度値を算出する第1の算出手段と、
前記輝度画像における前記特定の被写体領域内の輝度値の度数分布と前記第1の輝度値とに基づいて第2の輝度値を算出する第2の算出手段と、
前記第1の輝度値と前記第2の輝度値に基づいて前記特定の被写体領域の明るさを表す代表輝度値を決定する決定手段と、を備える。
In order to achieve the above object, an image processing apparatus according to an aspect of the present invention has the following configuration. That is,
Generation means for generating a luminance image of the input image;
First calculating means for calculating a first luminance value based on the luminance value of a pixel selected from the luminance image in relation to the position of a specific subject region in the luminance image;
A second calculation unit that calculates a second luminance value based on a frequency distribution of luminance values in the specific subject area in the luminance image and the first luminance value;
Determining means for determining a representative luminance value representing the brightness of the specific subject area based on the first luminance value and the second luminance value.

本発明によれば、被写体のDレンジが広い場合でも、適切に被写体の明るさを判定することが可能になる。   According to the present invention, it is possible to appropriately determine the brightness of the subject even when the D range of the subject is wide.

実施形態による撮像装置の構成例を示したブロック図。FIG. 1 is a block diagram showing an example of the configuration of an imaging device according to an embodiment. 撮像装置が有する画像処理装置の構成例を示したブロック図。FIG. 2 is a block diagram showing an example of the configuration of an image processing apparatus included in the imaging apparatus. 画像処理装置が有する代表輝度値算出部内の構成例を示したブロック図。FIG. 3 is a block diagram showing an example of the configuration of a representative luminance value calculation unit included in the image processing apparatus. 画像処理部の処理を示したフローチャート。The flowchart which showed the processing of the image processing part. 代表輝度値算出部の処理の流れを示したフローチャート。The flowchart which showed the flow of processing of a representative luminance value calculation part. 実施形態によるブロック積分を説明した図。The figure explaining the block integral by embodiment. 顔検出枠とブロックへの重み付けについて説明した図。The figure explaining weighting to a face detection frame and a block. 顔検出枠内のヒストグラムについて説明した図。The figure explaining the histogram in a face detection frame. ヒストグラムの累積加算と輝度ポイントについて説明した図。The figure explaining accumulation addition of a histogram, and a luminance point. 輝度ポイントに対する重みについて説明した図。The figure explaining the weight with respect to the luminance point. 最終代表輝度値を算出するために必要な調整量について説明した図。The figure explaining the adjustment amount required in order to calculate the last representative luminance value. 階調特性の調整について説明した図。FIG. 7 is a diagram for explaining adjustment of gradation characteristics.

以下に、本発明の好ましい実施形態について、添付の図面に基づいて詳細に説明する。以下に説明する実施形態では、Dレンジの広い被写体の画像(たとえば斜光状態となっている人物の画像)の明るさ(代表輝度値)を適切に判定し、被写体の画像を好適な明るさで得るための露光量や階調処理のための階調特性を調整する。なお、以下の実施形態では、斜光状態となっている人物が写っているシーンを例として説明しているが、本発明これに限られるものではない。斜光などにより明暗差が生じた被写体が写っているシーンであれば、人物以外のシーンであっても本発明を適用可能である。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the attached drawings. In the embodiment described below, the brightness (representative luminance value) of an image of a subject with a wide D range (for example, an image of a person in oblique light state) is appropriately determined, and the image of the subject has suitable brightness. The amount of exposure to be obtained and the gradation characteristics for gradation processing are adjusted. In the following embodiments, a scene in which a person in oblique light is shown is described as an example, but the present invention is not limited to this. The present invention can be applied to a scene other than a person as long as it is a scene in which a subject in which a contrast has occurred due to oblique light or the like is captured.

図1は、本実施形態の画像処理装置を適用した撮像装置の構成例を示すブロック図である。図1において、光学系101は、ズームレンズやフォーカスレンズから構成されるレンズ群、絞り調整装置、および、シャッター装置を備えている。光学系101は、撮像部102に到達する被写体像の倍率やピント位置、あるいは、光量を調整する。撮像部102は、光学系101を通過した被写体の光束を光電変換により電気信号に変換するCCDやCMOSセンサー等の光電変換素子である。   FIG. 1 is a block diagram showing an example of the configuration of an imaging apparatus to which the image processing apparatus of the present embodiment is applied. In FIG. 1, an optical system 101 includes a lens unit configured of a zoom lens and a focus lens, an aperture adjustment device, and a shutter device. The optical system 101 adjusts the magnification, the focus position, or the light amount of the subject image reaching the imaging unit 102. The imaging unit 102 is a photoelectric conversion element such as a CCD or a CMOS sensor that converts a light flux of an object having passed through the optical system 101 into an electric signal by photoelectric conversion.

A/D変換部103は、入力された映像信号をデジタルの画像に変換する。画像処理部104は、通常の信号処理の他に、後述する露光量算出処理や階調処理を行う。なお、画像処理部104は、A/D変換部103から出力された画像のみでなく、記録部109から読み出した画像に対しても同様の画像処理を行うことができる。露光制御部105は、画像処理部104によって算出された露光量での撮像を実現するために、光学系101の露出を制御(たとえば、絞り、シャッタースピードの制御)するとともに、撮像部102の制御(たとえば、センサーのアナログゲインの制御)を行う。   The A / D converter 103 converts the input video signal into a digital image. The image processing unit 104 performs exposure amount calculation processing and gradation processing, which will be described later, in addition to normal signal processing. The image processing unit 104 can perform similar image processing not only on the image output from the A / D conversion unit 103 but also on the image read out from the recording unit 109. The exposure control unit 105 controls the exposure of the optical system 101 (for example, controls the aperture and shutter speed) in order to realize imaging with the exposure amount calculated by the image processing unit 104, and controls the imaging unit 102. (Eg, control of the sensor's analog gain).

システム制御部106は、本実施形態の装置全体の動作を制御、統括する制御機能部である。システム制御部106は、画像処理部104で処理された画像から得られる輝度値や操作部107から送信された指示に基づいて、光学系101や撮像部102の駆動制御も行う。操作部107はユーザインターフェースを提供し、ユーザ操作に応じた指示をシステム制御部106に出力する。表示部108は、液晶ディスプレイや有機EL(Electro Luminescence)ディスプレイで構成され、撮像部102で生成された画像や、記録部109から読み出した画像を表示する。記録部109は、画像を記録する機能を有し、たとえば、半導体メモリが搭載されたメモリカードや光磁気ディスク等の回転記録体を収容したパッケージなどを用いた情報記録媒体を含んでもよい。また、記録部109において、このような情報記録媒体が着脱可能であってもよい。バス110は、画像処理部104、システム制御部106、表示部108、および、記録部109を接続し、これらの間でデータ(たとえば画像)をやり取りすることを可能にする。   A system control unit 106 is a control function unit that controls and controls the overall operation of the apparatus of this embodiment. The system control unit 106 also performs drive control of the optical system 101 and the imaging unit 102 based on a luminance value obtained from the image processed by the image processing unit 104 and an instruction transmitted from the operation unit 107. The operation unit 107 provides a user interface, and outputs an instruction corresponding to a user operation to the system control unit 106. The display unit 108 is configured by a liquid crystal display or an organic EL (Electro Luminescence) display, and displays an image generated by the imaging unit 102 and an image read out from the recording unit 109. The recording unit 109 has a function of recording an image, and may include, for example, an information recording medium using a package containing a rotary recording medium such as a memory card or a magneto-optical disk mounted with a semiconductor memory. Moreover, in the recording unit 109, such an information recording medium may be detachable. The bus 110 connects the image processing unit 104, the system control unit 106, the display unit 108, and the recording unit 109, and enables data (for example, an image) to be exchanged between them.

次に、画像処理部104の動作、処理について説明する。図2は、画像処理部104の露光量算出処理と階調処理を実現するための構成例を示したブロック図である。画像処理部104は、画像入力部201、代表輝度値算出部202、階調特性生成部203、露光量算出部204、現像処理部205、顔検出部206を有する。なお、画像処理部104には、本撮影前の撮影待機状態において得られた撮影画像や本撮影時の撮影画像が入力される。これら撮影画像はともに画像処理部104の画像入力部201から入力される。画像入力部201が本撮影前の撮影画像を入力した場合には、その撮影画像は露光量算出部204による露光量の算出に用いられ、得られた露光量算出結果は露光制御部105へ出力される。他方、本撮影時の撮影画像が入力された場合は、階調特性生成部203による階調特性の生成に用いられ、現像処理部205が生成された階調特性を用いて撮影画像に階調処理を施し、出力画像を得る。   Next, the operation and processing of the image processing unit 104 will be described. FIG. 2 is a block diagram showing a configuration example for realizing the exposure amount calculation processing and gradation processing of the image processing unit 104. As shown in FIG. The image processing unit 104 includes an image input unit 201, a representative luminance value calculation unit 202, a gradation characteristic generation unit 203, an exposure amount calculation unit 204, a development processing unit 205, and a face detection unit 206. The image processing unit 104 receives a photographed image obtained in the photographing standby state before the main photographing and a photographed image at the time of the main photographing. These photographed images are both input from the image input unit 201 of the image processing unit 104. When the image input unit 201 inputs a photographed image before main photographing, the photographed image is used for calculation of the exposure amount by the exposure amount calculation unit 204, and the obtained exposure amount calculation result is output to the exposure control unit 105. Be done. On the other hand, when the photographed image at the time of main photographing is input, it is used for generation of the gradation characteristic by the gradation characteristic generation unit 203, and the gradation of the photographed image is used using the gradation characteristic generated by the development processing unit 205. Process and get an output image.

図4は、図2の画像処理部104の各ブロックの処理、機能を示すフローチャートである。以下、図4のフローチャートを参照して画像処理部104の露光量算出処理と階調処理の流れについて詳細に説明する。図4において、ステップS401〜S402の処理は、代表輝度値を決定するための処理であり、露光量算出処理および階調処理に共通の処理である。ステップS403では、たとえば、入力された撮影画像が本撮影の撮影画像化撮影待機中の撮影画像化に応じて、露光量算出処理または階調処理を実行するために処理が分岐する。入力された画像が撮影待機中の撮影画像であれば、露光量算出処理を実行するべくステップS404〜S405の処理が実行される。また、入力された画像が本撮影による撮影画像であれば、階調特性を決定して現像処理を実行するためにステップS406〜S408の処理が実行される。以下、各ステップについて詳細に説明する。   FIG. 4 is a flowchart showing processing and functions of each block of the image processing unit 104 in FIG. Hereinafter, the flow of the exposure amount calculation processing and the gradation processing of the image processing unit 104 will be described in detail with reference to the flowchart of FIG. 4. In FIG. 4, the processes of steps S401 to S402 are processes for determining a representative luminance value, and are processes common to the exposure amount calculation process and the gradation process. In step S403, the process branches in order to execute the exposure amount calculation process or the gradation process according to, for example, the input shot image and the shot image formation on standby for the shot image formation for the main shooting. If the input image is a photographed image on standby for photographing, the processing of steps S404 to S405 is executed to execute the exposure amount calculation processing. If the input image is a photographed image in the main photographing, the processing of steps S406 to S408 is executed to determine the gradation characteristic and execute the development processing. Each step will be described in detail below.

ステップS401において、画像入力部201は、処理対象の撮影画像を入力する。ステップS402において、代表輝度値算出部202は、露光量・階調特性を決めるための代表輝度値を算出する。本実施形態が想定するシーンの場合、斜光状態の人物の代表輝度値が算出されることになる。したがって、代表輝度値算出部202は、顔検出部206が入力された撮影画像から検出した人物の顔の位置を用いて代表輝度値を算出する。なお、顔検出部206による撮影画像からの顔の検出処理には周知の技術を適用できる。代表輝度値の算出方法については、後述する。   In step S401, the image input unit 201 inputs a captured image to be processed. In step S402, the representative luminance value calculation unit 202 calculates a representative luminance value for determining the exposure amount and gradation characteristics. In the case of the scene assumed in this embodiment, the representative luminance value of the person in the oblique state is calculated. Therefore, the representative luminance value calculation unit 202 calculates the representative luminance value using the position of the face of the person detected from the photographed image input by the face detection unit 206. A well-known technique can be applied to the face detection process from the captured image by the face detection unit 206. The method of calculating the representative luminance value will be described later.

次に、ステップS403において、画像処理部104は、本撮影前の露光量算出処理と本撮影後の階調処理の何れを実行するのかを判定する。たとえば、画像処理部104は、画像入力部201が入力した撮影画像が、本撮影前の(撮影待機状態の)撮影画像であるか本撮影により得られた撮影画像であるかを判定し、露光量算出処理と階調処理のいずれを実行するかを決定する。本撮影前の露光量算出処理を実行すると判定された場合、処理はステップS404へ進む。また、本撮影後の階調処理を実行すること判定された場合、処理はステップS406へ進む。   Next, in step S403, the image processing unit 104 determines which of exposure amount calculation processing before main photographing and gradation processing after main photographing is to be performed. For example, the image processing unit 104 determines whether the photographed image input by the image input unit 201 is a photographed image (in the photographing standby state) before the main photographing or a photographed image obtained by the main photographing, It is determined which of the amount calculation processing and the gradation processing is to be performed. If it is determined that the exposure amount calculation process before the main shooting is to be performed, the process proceeds to step S404. If it is determined that tone processing after main shooting is to be performed, the process proceeds to step S406.

ステップS404において、露光量算出部204は、ステップS402で算出した代表輝度値をもとに、撮影するために最適と判断される露光量を算出する。露光量算出部204による露光量の算出方法については後述する。ステップS405において、露光量算出部204は、ステップS404で算出した露光量を画像処理部104の出力データとして出力し、画像処理部104の処理を終了する。なお、この出力データは露光制御部105の入力データとなる。   In step S404, the exposure amount calculation unit 204 calculates an exposure amount that is determined to be optimal for photographing based on the representative luminance value calculated in step S402. The method of calculating the exposure amount by the exposure amount calculation unit 204 will be described later. In step S405, the exposure amount calculation unit 204 outputs the exposure amount calculated in step S404 as output data of the image processing unit 104, and ends the processing of the image processing unit 104. This output data is input data of the exposure control unit 105.

他方、階調処理を実行する場合、ステップS406において、階調特性生成部203は、ステップS402で算出した代表輝度値をもとに階調処理を行うための階調特性を算出する。階調特性の算出方法については後述する。次に、ステップS407において現像処理部205は、ステップS401で入力された撮影画像に対し、現像処理を行う。現像処理では、ステップS406で算出した階調特性をもとに撮影画像に対して階調処理を行うだけでなく、ホワイトバランス処理や、ノイズリダクション処理、エッジ強調処理等の処理も行う。ステップS408において、現像処理部205は、ステップS407で現像処理を行って得られた画像を画像処理部104の出力データとして出力し、画像処理部104の処理を終了する。以上が、画像処理部104の処理である。   On the other hand, when performing gradation processing, in step S406, the gradation characteristic generation unit 203 calculates gradation characteristics for performing gradation processing based on the representative luminance value calculated in step S402. The calculation method of the gradation characteristic will be described later. Next, in step S407, the development processing unit 205 performs development processing on the captured image input in step S401. In the development processing, not only tone processing is performed on the captured image based on the tone characteristics calculated in step S406, but also processing such as white balance processing, noise reduction processing, and edge enhancement processing is performed. In step S408, the development processing unit 205 outputs the image obtained by performing the development processing in step S407 as output data of the image processing unit 104, and the processing of the image processing unit 104 ends. The above is the processing of the image processing unit 104.

次に、代表輝度値算出部202(ステップS402)による代表輝度値の算出方法について説明する。図3は、代表輝度値算出部202の構成例を示したブロック図である。代表輝度値算出部202は、輝度画像生成部301、ブロック処理部302、第1輝度値算出部303、ヒストグラム算出部304、輝度ポイント算出部305、第2輝度値算出部306、第3輝度値算出部307を有する。   Next, a method of calculating a representative luminance value by the representative luminance value calculation unit 202 (step S402) will be described. FIG. 3 is a block diagram showing a configuration example of the representative luminance value calculation unit 202. As shown in FIG. The representative luminance value calculation unit 202 includes a luminance image generation unit 301, a block processing unit 302, a first luminance value calculation unit 303, a histogram calculation unit 304, a luminance point calculation unit 305, a second luminance value calculation unit 306, and a third luminance value. A calculation unit 307 is included.

図5は代表輝度値算出部202による代表輝度値の算出処理を示すフローチャートである。図4に示される代表輝度値算出部202の各構成の動作について、図5のフローチャートを参照して説明する。なお、本実施形態の代表輝度値算出部202の主な処理の流れは、
・撮影画像の輝度画像における特定の被写体領域(本実施形態では顔の領域)の位置に関連して輝度画像から選択された画素の輝度値に基づいて第1の輝度値を算出する。
・輝度画像における特定の被写体領域内の輝度値の度数分布(ヒストグラム)と第1の輝度値とに基づいて第2の輝度値を算出する。
第1の輝度値と第2の輝度値に基づいて特定の被写体領域の明るさを表す代表輝度値を決定し出力する、というものである。
FIG. 5 is a flowchart showing a process of calculating a representative luminance value by the representative luminance value calculation unit 202. The operation of each component of the representative luminance value calculation unit 202 shown in FIG. 4 will be described with reference to the flowchart of FIG. The main processing flow of the representative luminance value calculation unit 202 of this embodiment is as follows:
The first luminance value is calculated based on the luminance value of the pixel selected from the luminance image in relation to the position of the specific subject region (the region of the face in this embodiment) in the luminance image of the photographed image.
A second luminance value is calculated based on the frequency distribution (histogram) of luminance values in a specific subject region in the luminance image and the first luminance value.
Based on the first luminance value and the second luminance value, a representative luminance value representing the brightness of a specific subject area is determined and output.

まず、ステップS501において、輝度画像生成部301は、入力された撮影画像から輝度信号のみで構成される輝度画像を生成する。輝度信号Yの生成には公知手法を適用することができ、たとえば、R、G、B信号を下記(式1)の様に混合(MIX)して作成する。なお、(式1)においてk、l、mはそれぞれ輝度信号を作成するためのMIX係数である。
First, in step S501, the luminance image generation unit 301 generates a luminance image composed of only luminance signals from the input captured image. A known method can be applied to the generation of the luminance signal Y. For example, R, G, and B signals are mixed (MIX) as shown in the following (Expression 1) to create. In Equation (1), k, l and m are MIX coefficients for creating a luminance signal.

次に、ステップS502〜S503により、第1の輝度値が算出される。本実施形態では、輝度画像の画素と特定の被写体領域との位置関係に応じた重みを用いて、輝度値の重み付け平均を、第1の輝度値として算出する。本実施形態では、輝度画像の画素と特定の被写体領域との位置関係に応じた重み付けによる重み付け平均を得る方法として、以下のような処理を行う。すなわち、輝度画像を複数の部分領域(本実施形態ではブロック)に分割し、部分領域ごとに平均輝度値を取得する。そして、特定の被写体領域と部分領域の位置関係に基づいて部分領域ごとの重みを決定し、決定された重みを用いることにより、部分領域ごとの平均輝度値を重み付け平均して、第1の輝度値を算出する。以下、より具体的に説明する。   Next, the first luminance value is calculated in steps S502 to S503. In the present embodiment, the weighted average of the luminance values is calculated as the first luminance value, using the weights according to the positional relationship between the pixels of the luminance image and the specific subject region. In the present embodiment, the following processing is performed as a method of obtaining a weighted average by weighting according to the positional relationship between pixels of a luminance image and a specific subject region. That is, the luminance image is divided into a plurality of partial areas (blocks in the present embodiment), and an average luminance value is acquired for each partial area. Then, the weight for each partial area is determined based on the positional relationship between the specific subject area and the partial area, and the average luminance value for each partial area is weighted and averaged by using the determined weight, and the first luminance is obtained. Calculate the value. The following more specifically describes.

まず、ステップS502において、ブロック処理部302は、ステップS501で作成した輝度画像についてブロック積分処理を行う。本実施形態のブロック積分処理では、まず、ブロック処理部302が図6(a)に示すような、輝度画像生成部301が生成した輝度画像601を、図6(b)に示すように矩形分割して複数の矩形を得る。以降の説明では、矩形分割により得られた枠をブロック積分枠602と呼称する。そして、ブロック処理部302は、ブロック積分枠602内の画素の輝度値を積分し、その積分結果をそのブロック積分枠602内の画素数で平均する。こうして、各ブロック積分枠のブロック積分結果が得られる。   First, in step S502, the block processing unit 302 performs block integration processing on the luminance image created in step S501. In the block integration process of the present embodiment, first, the luminance image 601 generated by the luminance image generation unit 301 as shown in FIG. 6A by the block processing unit 302 is divided into rectangles as shown in FIG. 6B. Get multiple rectangles. In the following description, a frame obtained by the rectangular division is referred to as a block integration frame 602. Then, the block processing unit 302 integrates the luminance values of the pixels in the block integration frame 602, and averages the integration result by the number of pixels in the block integration frame 602. Thus, block integration results of each block integration frame are obtained.

ステップS503において、第1輝度値算出部303は、ステップS502で作成したブロック積分結果から第1の輝度値を算出する。第1輝度値算出部303は、下記の(式2)で示す様に、ブロック積分結果に重みを加えて加重平均することによって第1の輝度値repY1を算出する。なお、(式2)において、全ブロック数をB_NUM、i番目のブロック積分結果をBY(i)、i番目のブロックに対応する重みwiとする。
In step S503, the first luminance value calculation unit 303 calculates a first luminance value from the block integration result generated in step S502. The first luminance value calculation unit 303 calculates the first luminance value repY1 by adding a weight to the block integration result and performing weighted averaging, as shown in the following (Expression 2). In Equation (2), the total number of blocks is B_NUM, the ith block integration result is BY (i), and the weight w i corresponding to the i th block.

本実施形態では、ブロックに対応する重みwiは、撮影画像中で検出された人物の顔検出枠を元に生成される。なお、顔検出枠は、撮影画像から顔を検出する顔検出部206により提供される。なお、顔検出枠を生成するのに用いられる画像(顔の検出に用いられる画像)は、画像入力部201が入力した撮影画像であってもよいし、輝度画像生成部301が生成した輝度画像であってもよい。図7(a)に示すように、輝度画像601において顔検出枠701が配置される。図7(b)は、各ブロック積分枠と顔検出枠701の位置関係を示している。ブロック処理部302は、顔検出枠701がブロック積分枠に含まれる面積によって各ブロック検出枠の重みを決定する。図7(d)に示されるように、顔検出枠701が全く含まれないブロック検出枠の重みは0となり、顔検出枠701が含まれる面積が大きくなればなる程重みが大きくなるように重み値を設定する。このような重み付けの性質により、被写体の顔領域の輝度が多く含まれているブロック積分値を重視した代表輝度値が算出される。図7(c)は、ブロック積分枠と顔検出枠701が図7(b)に示されるような位置関係にある場合の、各ブロック積分枠に対して設定される重み付け値の様子を示している。図7(c)において、黒いブロック積分枠は重み値が0であり、白いブロック積分枠は重み値が1であり、白に近いほど重み値が大きい。 In the present embodiment, the weight w i corresponding to the block is generated based on the face detection frame of the person detected in the photographed image. The face detection frame is provided by the face detection unit 206 that detects a face from the captured image. The image used to generate the face detection frame (the image used to detect the face) may be a photographed image input by the image input unit 201, or the luminance image generated by the luminance image generation unit 301. It may be As shown in FIG. 7A, the face detection frame 701 is arranged in the luminance image 601. FIG. 7B shows the positional relationship between each block integration frame and the face detection frame 701. The block processing unit 302 determines the weight of each block detection frame according to the area in which the face detection frame 701 is included in the block integration frame. As shown in FIG. 7D, the weight of the block detection frame that does not include the face detection frame 701 at all is 0, and the weight increases as the area including the face detection frame 701 increases. Set the value Due to the nature of such weighting, a representative luminance value is calculated which places emphasis on a block integral value including a large amount of luminance of the face area of the subject. FIG. 7C shows a state of weighting values set for each block integration frame when the block integration frame and the face detection frame 701 have the positional relationship as shown in FIG. 7B. There is. In FIG. 7C, the black block integration frame has a weight value of 0, the white block integration frame has a weight value of 1, and the closer to white, the larger the weight value.

以上の様に、第1の輝度値の特徴の一つは、撮影画像内の被写体位置に応じた重みで被写体の明るさを求めるという点である。また、被写体の周辺領域の輝度も含んだブロック積分枠のブロック積分結果も用いられるため、被写体の分光反射率の依存性をある程度低くしてロバスト性を高めているという特徴もある。   As described above, one of the features of the first luminance value is that the brightness of the subject is determined by the weight according to the subject position in the photographed image. In addition, since the block integration result of the block integration frame including the luminance of the peripheral region of the subject is also used, there is also a feature that the dependence of the spectral reflectance of the subject is reduced to some extent to enhance the robustness.

次に、ステップS504〜S506により、第2の輝度値が算出される。上述したように、第2の輝度値は、輝度画像における特定の被写体領域(顔検出枠)内の輝度値の度数分布(ヒストグラム)と第1の輝度値とに基づいて算出される。本実施形態では、
・輝度値の度数分布について輝度の順に度数を累積した累積加算値が予め設定された複数の閾値に達したときの複数の輝度値の各々と第1の輝度値との差に基づいて、複数の輝度値の各々に重みを設定し、
・設定された重みを用いた複数の輝度値の重みづけ平均を第2の輝度値として算出する。以下、より具体的に第2の輝度値の算出処理を説明する。
Next, the second luminance value is calculated by steps S504 to S506. As described above, the second luminance value is calculated based on the frequency distribution (histogram) of the luminance value in the specific subject area (face detection frame) in the luminance image and the first luminance value. In the present embodiment,
A plurality of luminance values are calculated based on the difference between each of the plurality of luminance values and the first luminance value when the cumulative addition value obtained by accumulating the frequencies in the order of luminance reaches a plurality of preset threshold values. Set weights on each of the luminance values of
A weighted average of a plurality of luminance values using the set weight is calculated as a second luminance value. Hereinafter, the calculation process of the second luminance value will be described more specifically.

まず、ステップS504において、ヒストグラム算出部304は、ステップS501で作成した輝度画像を入力としてヒストグラムを作成する。ヒストグラム算出部304は、図8(a)で示している様に顔検出枠701内の輝度の度数分布(輝度ヒストグラム)を算出する。そのような輝度ヒストグラムの一例を図8(b)に示す。次に、ステップS505において、輝度ポイント算出部305は、ステップS504で作成したヒストグラムから輝度ポイントを算出する。輝度ポイントは後述のステップS506における第2の輝度値の算出に用いられる。   First, in step S504, the histogram calculation unit 304 generates a histogram using the luminance image generated in step S501 as an input. The histogram calculation unit 304 calculates the frequency distribution (brightness histogram) of the brightness in the face detection frame 701 as shown in FIG. 8A. An example of such a luminance histogram is shown in FIG. Next, in step S505, the luminance point calculation unit 305 calculates luminance points from the histogram created in step S504. The luminance point is used to calculate a second luminance value in step S506 described later.

図9は本実施形態における輝度ポイントを算出する処理について説明する図である。輝度ポイント算出部305は、ステップS504で作成された顔検出枠701のヒストグラム(図9(a))を低輝度側から累積加算していき、累積加算値がある閾値に達した時点での輝度値を輝度ポイントとして算出する。ここで、閾値とは、顔検出枠701の面積、つまりヒストグラムの度数の合計値に対する累積加算値の割合を用いている。本実施形態では累積加算値が度数の合計値に対して20、40、60、80%に達した輝度値を輝度ポイント[1]から輝度ポイント[4]として算出する。図9(a)、(b)の様に、斜光状態の人物の顔検出枠701から作成したヒストグラムから算出した輝度ポイントはそれぞれ離れた位置に分布する傾向にある。反対に図9(c)の様に、斜光状態ではない人物の顔検出枠から作成されたヒストグラムから算出した輝度ポイントは、図9(d)に示されるように、それぞれ近い位置に分布する傾向にあるという特徴がある。   FIG. 9 is a diagram for explaining the process of calculating the luminance point in the present embodiment. The luminance point calculation unit 305 cumulatively adds the histogram (FIG. 9A) of the face detection frame 701 created in step S 504 from the low luminance side, and the luminance at the point when the cumulative addition value reaches a certain threshold Calculate the value as the luminance point. Here, the threshold value is the area of the face detection frame 701, that is, the ratio of the cumulative addition value to the total value of the frequencies of the histogram. In the present embodiment, the luminance value at which the cumulative addition value reaches 20, 40, 60, 80% with respect to the total value of the frequencies is calculated as the luminance point [4] from the luminance point [1]. As shown in FIGS. 9A and 9B, the luminance points calculated from the histogram created from the face detection frame 701 of the person in the oblique state tend to be distributed at distant positions. On the contrary, as shown in FIG. 9 (c), the luminance points calculated from the histogram created from the face detection frame of the person who is not in the oblique state tend to be distributed close to each other as shown in FIG. 9 (d). It is characterized by

図5に戻り、ステップS506において、第2輝度値算出部306は、ステップS505で算出した輝度ポイントとステップS503で算出した第1の輝度値を入力として、第2の輝度値を算出する。図10を用いて、第2の輝度値の算出方法について詳細に説明する。第2輝度値算出部306は、第2の輝度値repY2を(式3)を用いて、各輝度ポイントの値を用いて2種類の重みW1、W2によって加重平均する事で算出する。(式3)において、Y_1〜Y_4は各輝度ポイントの輝度値、W1_1〜W1_4は第1の重み、W2_1〜W2_4は第2の重みを示す。
Returning to FIG. 5, in step S506, the second luminance value calculation unit 306 calculates a second luminance value with the luminance point calculated in step S505 and the first luminance value calculated in step S503 as inputs. The method of calculating the second luminance value will be described in detail with reference to FIG. The second luminance value calculation unit 306 calculates the second luminance value repY2 by performing weighted averaging with two types of weights W1 and W2 using the value of each luminance point using (Expression 3). In Equation (3), Y_1 to Y_4 indicate the luminance values of the respective luminance points, W1_1 to W1_4 indicate the first weights, and W2_1 to W2_4 indicate the second weights.

(式3)の第1の重みW1は、第1の輝度値に対して輝度ポイントが異なっているほど重みを大きくするような重みとなっている。第2輝度値算出部306では、図10(a)で示されるように輝度ポイントと第1の輝度値の差分絶対値(dist1〜dist4)を取得し、たとえば図10(b)の特性(重み値W1はdistの値に比例する)にしたがって重みW1を決定する。なお、図10(b)では正比例の関係を示したが、これに限られるものではない。前述した通り、輝度ポイントが第1の輝度値から離れている程、重みW1を大きくする特性となっていればよい。   The first weight W1 of (Equation 3) is a weight that increases the weight as the luminance point is different from the first luminance value. The second luminance value calculation unit 306 obtains the difference absolute value (dist1 to dist4) of the luminance point and the first luminance value as shown in FIG. The weight W1 is determined according to the value W1 is proportional to the value of dist). In addition, although the relationship of direct proportion was shown in FIG.10 (b), it is not restricted to this. As described above, the weight W1 may be increased as the luminance point is farther from the first luminance value.

他方、第2の重みW2は、図10(c)で示したように、各輝度ポイントに対してあらかじめ設定した固定の重みとなっている。第2の重みW2は、低輝度側の輝度ポイントを重視するか、高輝度側の輝度ポイントを重視するかを決めている。たとえば、輝度ポイント[1][2]の重みW2_1、W2_2を大きくすれば低輝度側重視、輝度ポイント[3][4]の重みW2_3、W2_4を大きくすれば高輝度側重視となる。具体的な重み値は、ユーザが所定のユーザインターフェースを介して設定できるようにしてもよいし、装置に固定の値としてもよい。   On the other hand, as shown in FIG. 10C, the second weight W2 is a fixed weight preset for each luminance point. The second weight W2 determines whether to emphasize the luminance point on the low luminance side or to emphasize the luminance point on the high luminance side. For example, if the weights W2_1 and W2_2 of the luminance points [1] and [2] are increased, the low luminance side is emphasized, and if the weights W2_3 and W2_4 of the luminance points [3] and [4] are increased, the high luminance side is emphasized. The specific weight value may be set by the user via a predetermined user interface, or may be fixed to the device.

以上の様に、本実施形態では、被写体領域内のヒストグラムを参照することにより、低輝度から高輝度にかけて偏りのある輝度分布になっているかどうかを判断し、偏りを考慮した明るさを第2の輝度値として算出している。これは、本実施形態の特徴の一つである。なお、第2の輝度値算出において、第1の輝度値を用いて偏りを算出するという点も特徴の一つである。なお、上記では第2の輝度値を算出するための重み値としてW1とW2を用いたが、W1のみを用いて第2の輝度値を算出してもよい。   As described above, in the present embodiment, by referring to the histogram in the subject region, it is determined whether or not the luminance distribution has a bias from low luminance to high luminance, and the brightness in consideration of the bias is second It is calculated as the luminance value of. This is one of the features of the present embodiment. One of the features is that the bias is calculated using the first luminance value in the second luminance value calculation. Although W1 and W2 are used as weight values for calculating the second luminance value in the above, the second luminance value may be calculated using only W1.

図5に戻り、ステップS507において、第3輝度値算出部307は、ステップS503で算出した第1の輝度値repY1と、ステップS506で算出した第2の輝度値repY2を元に最終的な代表輝度値rep_Yを決定する。代表輝度値rep_Yは、下記の(式4)の様に第1の輝度値rep_Y1に対し調整量ADJを加味して算出される。
Returning to FIG. 5, in step S507, the third luminance value calculator 307 determines the final representative luminance based on the first luminance value repY1 calculated in step S503 and the second luminance value repY2 calculated in step S506. Determine the value rep_Y. The representative luminance value rep_Y is calculated by adding the adjustment amount ADJ to the first luminance value rep_Y1 as in the following (Expression 4).

(式4)において、調整量ADJは図11の様に、第2の輝度値repY2と第1の輝度値repY1の輝度段差によって算出される。上記の様にすることで、入力した撮影画像における被写体の明るさが決定される。なお、本実施形態では、輝度段差として、第2の輝度値repY2と第1の輝度値repY1の比の二進対数(LOG2(repY2/repY1))を用い、そのような輝度段差に比例した値を調整量ADJとしている(図11)。そして、この調整量ADJを指数として2をべき乗した値を第1の輝度値に乗じて代表輝度値を決定する。 In Equation (4), as shown in FIG. 11, the adjustment amount ADJ is calculated by the luminance step between the second luminance value repY2 and the first luminance value repY1. By doing as described above, the brightness of the subject in the input photographed image is determined. In the present embodiment, the binary logarithm (LOG 2 (repY2 / repY1)) of the ratio of the second luminance value repY2 to the first luminance value repY1 is used as the luminance step, and is proportional to such a luminance step. The value is taken as the adjustment amount ADJ (FIG. 11). Then, a representative luminance value is determined by multiplying the first luminance value by a value obtained by raising the adjustment amount ADJ to a power of 2 as an index.

以上、代表輝度値算出部202による代表輝度値の算出処理(ステップS402)について説明した。   The process of calculating the representative luminance value (step S402) by the representative luminance value calculation unit 202 has been described above.

次に、図4のステップS404の露光量算出方法について説明する。露光量算出においては、代表輝度値算出部202が算出した代表輝度値rep_Yが用いられる。露光量算出部204は、算出された露光量をtarget_bv、現在の入力画像の露光量をcapture_bv、被写体の目標輝度値をtarget_Yとすると、たとえば(式5)の様にして露光量を算出する。この様にして露光量を算出することで斜光状態の被写体(人物)を適切な明るさで撮影できるように露光量を制御することができる。
Next, the exposure amount calculation method of step S404 of FIG. 4 will be described. In the exposure amount calculation, the representative luminance value rep_Y calculated by the representative luminance value calculation unit 202 is used. Assuming that the calculated exposure amount is target_bv, the exposure amount of the current input image is capture_bv, and the target luminance value of the object is target_Y, the exposure amount calculation unit 204 calculates the exposure amount as shown in equation 5, for example. By calculating the amount of exposure in this manner, it is possible to control the amount of exposure so that a subject (person) in a state of oblique light can be photographed with an appropriate brightness.

次に、ステップS406の階調特性算出方法について説明する。本実施形態の階調特性はγカーブによる階調圧縮の特性を指しており、階調を維持する輝度域と、階調を圧縮する輝度域がある。階調特性生成部203は、図12(a)に示される様に輝度域を分ける境界となるPOINTを左右に移動することにより、斜光状態の人物でも適切な明るさとなるように調整された階調特性を作成する。POINTの調整は前述した代表輝度値rep_Yと第1の輝度値repY1を用いて算出する。調整後のPOINTをOUT_POINT、調整前の基準となるPOINTをIN_POINT、POINTの調整量をPOINT_ADJとすると下記の(式6)の様に調整する。
Next, the gradation characteristic calculation method of step S406 will be described. The gradation characteristic of the present embodiment refers to the characteristic of gradation compression based on a γ curve, and there are a luminance range for maintaining the gradation and a luminance range for compressing the gradation. As shown in FIG. 12A, the gradation characteristic generation unit 203 moves the POINT, which is the boundary separating the luminance range, to the left and right, so that the floor adjusted so as to have appropriate brightness even for a person in an oblique state. Create key characteristics. The adjustment of POINT is calculated using the above-described representative luminance value rep_Y and the first luminance value repY1. Assuming that POINT after adjustment is OUT_POINT, POINT as a reference before adjustment is IN_POINT, and the adjustment amount of POINT is POINT_ADJ, adjustment is made as shown in the following (Equation 6).

POINTの調整量POINT_ADJは、図12(b)のように第1の輝度値repY1と代表輝度値rep_Yの輝度段差に基づいて決定される。図12(b)の横軸では、輝度段差として、第1の輝度値repY1と代表輝度値rep_Yの比の二進対数(LOG2(repY2/rep_Y))が用いられている。このような階調特性の調整によれば、第1の輝度値rep_Y1が代表輝度値rep_Yよりも高い場合は、高輝度側の階調を圧縮する輝度域を拡げるため、POINT_ADJは1より小さい値となる。反対に、代表輝度値rep_Yが第1の輝度値rep_Y1よりも高い場合は、低輝度側の階調を維持する輝度域を拡げるため、POINT_ADJは1より大きい値となる。以上のように階調特性を調整することにより、斜光状態の人物の明部と暗部でそれぞれ階調をコントロールして適切な明るさとなる階調特性を算出することが出来る。 The adjustment amount POINT_ADJ of POINT is determined based on the luminance step between the first luminance value repY1 and the representative luminance value rep_Y as shown in FIG. 12 (b). On the horizontal axis of FIG. 12B, the binary logarithm (LOG 2 (repY2 / rep_Y)) of the ratio of the first luminance value repY1 to the representative luminance value rep_Y is used as the luminance step. According to such adjustment of gradation characteristics, when the first luminance value rep_Y1 is higher than the representative luminance value rep_Y, POINT_ADJ is a value smaller than 1 in order to expand the luminance range in which the gradation on the high luminance side is compressed. It becomes. On the other hand, when the representative luminance value rep_Y is higher than the first luminance value rep_Y1, the POINT_ADJ has a value larger than 1 in order to expand the luminance range for maintaining the gradation on the low luminance side. As described above, by adjusting the gradation characteristic, it is possible to control the gradation in each of the bright part and the dark part of the person in the oblique light state and to calculate the gradation characteristic to be appropriate brightness.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、画像処理装置の適用は、デジタルカメラやビデオカメラといった撮像装置に限られるものではなく、携帯端末、PCなど、種々の電子機器に適用できる。   As mentioned above, although the preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary. For example, the application of the image processing apparatus is not limited to an imaging apparatus such as a digital camera or a video camera, and can be applied to various electronic devices such as a portable terminal and a PC.

(他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. Can also be realized. It can also be implemented by a circuit (eg, an ASIC) that implements one or more functions.

101:光学系、102:撮像部、103:A/D変換部、104:画像処理部、105:露光制御部、106:システム制御部、107:操作部、108:表示部、109:記録部、110:システムバス、202:代表輝度値算出部、301:輝度画像生成部、302:ブロック処理部、303:第1輝度値算出部、304:ヒストグラム算出部、305:輝度ポイント算出部、306:第2輝度値算出部、307:第3輝度値算出部 101: optical system, 102: imaging unit, 103: A / D conversion unit, 104: image processing unit, 105: exposure control unit, 106: system control unit, 107: operation unit, 108: display unit, 109: recording unit 110: system bus 202: representative luminance value calculation unit 301: luminance image generation unit 302: block processing unit 303: first luminance value calculation unit 304: histogram calculation unit 305: luminance point calculation unit 306 : Second luminance value calculation unit, 307: Third luminance value calculation unit

Claims (17)

入力された画像の輝度画像を生成する生成手段と、
前記輝度画像における特定の被写体領域の位置に関連して前記輝度画像から選択された画素の輝度値に基づいて第1の輝度値を算出する第1の算出手段と、
前記輝度画像における前記特定の被写体領域内の輝度値の度数分布と前記第1の輝度値とに基づいて第2の輝度値を算出する第2の算出手段と、
前記第1の輝度値と前記第2の輝度値に基づいて前記特定の被写体領域の明るさを表す代表輝度値を決定する決定手段と、を備えることを特徴とする画像処理装置。
Generation means for generating a luminance image of the input image;
First calculating means for calculating a first luminance value based on the luminance value of a pixel selected from the luminance image in relation to the position of a specific subject region in the luminance image;
A second calculation unit that calculates a second luminance value based on a frequency distribution of luminance values in the specific subject area in the luminance image and the first luminance value;
An image processing apparatus comprising: determining means for determining a representative luminance value representing the brightness of the specific subject area based on the first luminance value and the second luminance value.
前記第1の算出手段は、前記輝度画像の画素と前記特定の被写体領域との位置関係に応じた重みを用いた、輝度値の重み付け平均を前記第1の輝度値として算出することを特徴とする請求項1に記載の画像処理装置。   The first calculation means is characterized in that a weighted average of luminance values is calculated as the first luminance value using a weight corresponding to a positional relationship between pixels of the luminance image and the specific subject area. The image processing apparatus according to claim 1. 前記第1の算出手段は、
前記輝度画像を複数の部分領域に分割し、
部分領域ごとに平均輝度値を取得し、
前記特定の被写体領域と部分領域の位置関係に基づいて部分領域ごとの重みを決定し、
前記決定された重みを用いることにより、部分領域ごとに取得された平均輝度値を重み付け平均して、前記第1の輝度値を得ることを特徴とする請求項1または2に記載の画像処理装置。
The first calculation means is
Dividing the luminance image into a plurality of partial areas;
Get the average luminance value for each partial area,
The weight for each partial area is determined based on the positional relationship between the specific subject area and the partial area,
3. The image processing apparatus according to claim 1, wherein the first luminance value is obtained by performing weighted averaging on average luminance values acquired for each partial area by using the determined weight. .
前記部分領域ごとの重みは、部分領域の前記特定の被写体領域が占める割合に応じて設定されることを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the weight for each partial area is set in accordance with a ratio of the specific subject area occupied by the partial area. 前記第2の算出手段は、
輝度値の度数分布について輝度の順に度数を累積した累積加算値が予め設定された複数の閾値に達したときの複数の輝度値の各々と第1の輝度値との差に基づいて、複数の輝度値の各々に重みを設定し、
設定された重みを用いた複数の輝度値の重みづけ平均を第2の輝度値として算出することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。
The second calculation means is
Based on the difference between each of the plurality of luminance values and the first luminance value when the cumulative addition value obtained by accumulating the frequencies in the order of luminance for the frequency distribution of the luminance values reaches a plurality of preset threshold values, Set a weight for each of the luminance values,
The image processing apparatus according to any one of claims 1 to 4, wherein a weighted average of a plurality of luminance values using the set weight is calculated as a second luminance value.
前記複数の輝度値の各々には、前記第1の輝度値との差が大きいほど、大きい重みが設定されることを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein a larger weight is set to each of the plurality of luminance values as the difference with the first luminance value is larger. 前記第2の算出手段は、前記複数の閾値の各々に対応して予め設定されている重みをさらに用いて前記複数の輝度値の各々に重み付けを行い、
前記予め設定されている重みは、低輝度側ほど大きい値である、または、高輝度側ほど大きい値である、ことを特徴とする請求項5または6に記載の画像処理装置。
The second calculation means weights each of the plurality of luminance values by further using a weight preset corresponding to each of the plurality of thresholds.
7. The image processing apparatus according to claim 5, wherein the weight set in advance is a larger value on the lower luminance side or a larger value on the higher luminance side.
前記決定手段は、前記第1の輝度値と前記第2の輝度値との第1の比に基づいて前記第1の輝度値を調整することにより前記代表輝度値を決定することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。   The determination means determines the representative luminance value by adjusting the first luminance value based on a first ratio of the first luminance value and the second luminance value. The image processing apparatus according to any one of claims 1 to 7. 前記決定手段は、前記第1の比の二進対数に比例した値を指数として2をべき乗した値を調整量とし、前記第1の輝度値から前記調整量を差し引くことで前記代表輝度値を決定することを特徴とする請求項8に記載の画像処理装置。   The determination means sets a value obtained by raising 2 as a exponent to a value proportional to the binary logarithm of the first ratio as an adjustment amount, and subtracting the adjustment amount from the first luminance value to calculate the representative luminance value. The image processing apparatus according to claim 8, wherein the image processing apparatus determines the image. 前記決定手段により決定された前記代表輝度値に基づいて撮影のための露光量を算出する第3の算出手段をさらに備えることを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。   The image according to any one of claims 1 to 9, further comprising third calculation means for calculating an exposure amount for photographing based on the representative luminance value determined by the determination means. Processing unit. 前記代表輝度値に基づいて、前記入力された画像の階調処理に用いる階調特性を調整する調整手段をさらに備えることを特徴とする請求項1乃至10のいずれか1項に記載の画像処理装置。   The image processing according to any one of claims 1 to 10, further comprising: adjustment means for adjusting gradation characteristics used for gradation processing of the input image based on the representative luminance value. apparatus. 前記調整手段は、前記代表輝度値と前記第1の輝度値との比に基づいて、前記階調特性を調整することを特徴とする請求項11に記載の画像処理装置。   The image processing apparatus according to claim 11, wherein the adjustment unit adjusts the gradation characteristic based on a ratio of the representative luminance value to the first luminance value. 前記調整手段は、前記比の二進対数に比例した値を調整量とし、前記階調特性における階調を維持する輝度域と階調を圧縮する輝度域との境界を、前記調整量を用いて変更することを特徴とする請求項12に記載の画像処理装置。   The adjustment means uses a value proportional to the binary logarithm of the ratio as an adjustment amount, and uses the adjustment amount as a boundary between a luminance range for maintaining the gradation in the gradation characteristic and a luminance range for compressing the gradation. The image processing apparatus according to claim 12, wherein the image processing apparatus is changed. 撮像手段と、
請求項10に記載の画像処理装置と、
前記撮像手段により撮影待機中に撮影された画像を前記画像処理装置に入力することにより、撮影のための前記露光量を取得し、取得された前記露光量を用いて前記撮像手段の露出を制御する制御手段と、を備えることを特徴とする撮像装置。
Imaging means,
An image processing apparatus according to claim 10;
The exposure amount for imaging is acquired by inputting an image captured during imaging standby by the imaging unit to the image processing apparatus, and the exposure of the imaging unit is controlled using the acquired exposure amount. An image pickup apparatus comprising:
撮像手段と、
請求項11乃至13のいずれか1項に記載の画像処理装置と、
前記撮像手段により本撮影で撮影された画像を前記画像処理装置に入力することにより前記調整手段により調整された前記階調特性を取得し、取得された前記階調特性を用いて前記撮影された画像を処理する処理手段と、を備えることを特徴とする撮像装置。
Imaging means,
An image processing apparatus according to any one of claims 11 to 13.
The gradation characteristic adjusted by the adjustment unit is acquired by inputting the image photographed in the main photographing by the imaging unit into the image processing apparatus, and the image is photographed using the acquired gradation characteristic An imaging device comprising: processing means for processing an image.
画像処理装置による画像処理方法であって、
入力された画像の輝度画像を生成する生成工程と、
前記輝度画像における特定の被写体領域の位置に関連して前記輝度画像から選択された画素の輝度値に基づいて第1の輝度値を算出する第1の算出工程と、
前記輝度画像における前記特定の被写体領域内の輝度値の度数分布と前記第1の輝度値とに基づいて第2の輝度値を算出する第2の算出工程と、
前記第1の輝度値と前記第2の輝度値に基づいて前記特定の被写体領域の明るさを表す代表輝度値を決定する決定工程と、を有することを特徴とする画像処理方法。
An image processing method by an image processing apparatus
Generating a luminance image of the input image;
A first calculation step of calculating a first luminance value based on the luminance value of a pixel selected from the luminance image in relation to the position of a specific subject region in the luminance image;
A second calculation step of calculating a second luminance value based on the first luminance value and the frequency distribution of luminance values in the specific subject area in the luminance image;
A determining step of determining a representative luminance value representing the brightness of the specific subject area based on the first luminance value and the second luminance value.
請求項16に記載の画像処理方法の各工程をコンピュータに実行させるためのプログラム。   The program for making a computer perform each process of the image processing method of Claim 16.
JP2015122111A 2015-06-17 2015-06-17 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS Expired - Fee Related JP6514577B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015122111A JP6514577B2 (en) 2015-06-17 2015-06-17 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015122111A JP6514577B2 (en) 2015-06-17 2015-06-17 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS

Publications (2)

Publication Number Publication Date
JP2017011366A JP2017011366A (en) 2017-01-12
JP6514577B2 true JP6514577B2 (en) 2019-05-15

Family

ID=57764028

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015122111A Expired - Fee Related JP6514577B2 (en) 2015-06-17 2015-06-17 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS

Country Status (1)

Country Link
JP (1) JP6514577B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7104575B2 (en) * 2018-06-29 2022-07-21 キヤノン株式会社 Image processing equipment, control methods, and programs

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4289259B2 (en) * 2004-08-31 2009-07-01 カシオ計算機株式会社 Imaging apparatus and exposure control method
CN101331515B (en) * 2005-12-21 2013-03-27 日本电气株式会社 Gray-scale correcting method, gray-scale correcting device, gray-scale correcting program, and image device
JP2009276560A (en) * 2008-05-14 2009-11-26 Ricoh Co Ltd Imaging apparatus and imaging method
US8339506B2 (en) * 2009-04-24 2012-12-25 Qualcomm Incorporated Image capture parameter adjustment using face brightness information
JP2013041059A (en) * 2011-08-12 2013-02-28 Nikon Corp Exposure calculation unit and camera

Also Published As

Publication number Publication date
JP2017011366A (en) 2017-01-12

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
JP6020199B2 (en) Image processing apparatus, method, program, and imaging apparatus
JP6116272B2 (en) Image processing apparatus, image processing method, program, and storage medium
WO2016067541A1 (en) Data processing apparatus, imaging apparatus and data processing method
US20100177215A1 (en) Image processing apparatus and recording medium
US10091422B2 (en) Image processing device and recording medium
KR20070078819A (en) Face Importance Determination Apparatus, Method and Imaging Apparatus
JP2009212853A (en) White balance controller, its control method, and imaging apparatus
CN101013250A (en) Exposure control device and image capture device
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
US9071766B2 (en) Image capturing apparatus and control method thereof
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
JP2014121019A (en) Image processing system and control method of the same
JP2019029833A (en) Imaging device
JP2016127388A (en) Image processing apparatus, control method therefor, program, and storage medium
JP6786273B2 (en) Image processing equipment, image processing methods, and programs
JP2018185586A (en) Image processing apparatus, image processing method, and imaging apparatus
US9143684B2 (en) Digital photographing apparatus, method of controlling the same, and computer-readable storage medium
JP2013009105A (en) Image processing apparatus and image processing method
JP5038190B2 (en) Image capturing apparatus and setting method thereof
JP2010183460A (en) Image capturing apparatus and method of controlling the same
JP6386843B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP6514577B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGING APPARATUS
US11727716B2 (en) Information processing apparatus, imaging apparatus, which determines exposure amount with respect to face detection and human body detection
JP2008085634A (en) Imaging apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190225

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: 20190315

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190412

R151 Written notification of patent or utility model registration

Ref document number: 6514577

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees