JP2009065711A - Image output apparatus, image output method, and program - Google Patents

Image output apparatus, image output method, and program Download PDF

Info

Publication number
JP2009065711A
JP2009065711A JP2008311686A JP2008311686A JP2009065711A JP 2009065711 A JP2009065711 A JP 2009065711A JP 2008311686 A JP2008311686 A JP 2008311686A JP 2008311686 A JP2008311686 A JP 2008311686A JP 2009065711 A JP2009065711 A JP 2009065711A
Authority
JP
Japan
Prior art keywords
luminance
value
contrast
input
gradation
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.)
Granted
Application number
JP2008311686A
Other languages
Japanese (ja)
Other versions
JP4900373B2 (en
Inventor
Tomoo Mitsunaga
知生 光永
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2008311686A priority Critical patent/JP4900373B2/en
Publication of JP2009065711A publication Critical patent/JP2009065711A/en
Application granted granted Critical
Publication of JP4900373B2 publication Critical patent/JP4900373B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To perform correction in lightness so as to clear a region with a local contrast without exceptional application of photometric frame in an input image. <P>SOLUTION: A photometric estimator 350 produces a photometric estimation value of lightness in an imaging signal. A luminance-region producer 361 calculates a dark-side foot value and a light-side foot value in the luminance distribution of an average luminance image in block. A spline generator 362 takes the photometric estimation value as an average luminance value, and further generates a tone curve based on a spline curve using the dark-side and the light-side foot values. A gradation compressor 380 compresses the gradation of the luminance value based on the tone curve. A contrast corrector 390 corrects the contrast of the luminance value compressed in gradation. A gradational correction processor 320 corrects the non-linearly converted gradation of a pixel value in an RGB pixel based on the corrected luminance value in contrast. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像出力装置に関し、特に画像の明るさ補正を行う画像出力装置、および、その処理方法ならびに当該方法をコンピュータに実行させるプログラムに関する。   The present invention relates to an image output apparatus, and more particularly to an image output apparatus that performs image brightness correction, a processing method thereof, and a program that causes a computer to execute the method.

画像を適切な明るさで撮像あるいは出力するために、原画像の明るさを計測によって評価し、その評価値に基づいて明るさ補正量を算出するような処理は、撮像装置や画像出力装置において従来から行われている。   In order to capture or output an image with appropriate brightness, a process for evaluating the brightness of an original image by measurement and calculating a brightness correction amount based on the evaluation value is performed in an imaging device or an image output device. Traditionally done.

例えば、撮像装置では、光学系や画像センサの動作を自動制御する機構を備えていることが多いが、特に露光量を制御して撮像された画像の明るさを適切にするための機構はAE(Auto Exposure)と呼ばれる。このAE機構を有する撮像装置では、デモザイク、ガンマ補正、色補正等によって適切な色と階調を持ってカラー画像データを生成し出力する系の他に、撮像データの明るさを測光してそれに基づいた露出制御を行う系を有する。すなわち、撮像データの各部分の明るさの計測値に基づいて撮像データの明るさを評価した測光評価値を出力して、標準的な明るさを示す基準値と比較する。そして、測光評価値と基準値との間のずれ量を差分値として、その差分値が「0」に近づく方向に、光学系の絞りの開口量、センサの電荷蓄積時間、および、アンプの増幅量などが調整されて、露光量が制御される。   For example, an imaging apparatus is often provided with a mechanism for automatically controlling the operation of an optical system and an image sensor. In particular, a mechanism for controlling the exposure amount to make the brightness of an image captured appropriate is AE. This is called (Auto Exposure). In an imaging apparatus having this AE mechanism, in addition to a system that generates and outputs color image data having an appropriate color and gradation by demosaic, gamma correction, color correction, etc., the brightness of the imaging data is measured and A system for performing exposure control based on the above. That is, a photometric evaluation value obtained by evaluating the brightness of the imaging data based on the measured brightness value of each part of the imaging data is output and compared with a reference value indicating standard brightness. Then, the amount of deviation between the photometric evaluation value and the reference value is set as a difference value, and the difference value approaches “0” in the direction in which the difference value approaches “0”, the sensor charge accumulation time, and the amplifier amplification. The exposure amount is controlled by adjusting the amount and the like.

このようなAE機構として、撮像された画像データを分割した小領域毎に輝度値の積分値を生成して、その輝度積分値の重みつき加算を画像全体の明るさ評価値とするものが提案されている。例えば、画像データの全画面の画素を複数のエリアに分割して、画像の中央部を主要エリアとして測光値を求める画像処理装置が提案されている(例えば、特許文献1参照。)。
特開2004−259177号公報(図1)
As such an AE mechanism, it is proposed that an integral value of a luminance value is generated for each small area obtained by dividing captured image data, and a weighted addition of the luminance integral value is used as a brightness evaluation value of the entire image. Has been. For example, there has been proposed an image processing device that divides pixels of the entire screen of image data into a plurality of areas and obtains a photometric value using a central portion of the image as a main area (see, for example, Patent Document 1).
Japanese Patent Laying-Open No. 2004-259177 (FIG. 1)

上述の従来技術では、画像の中央部を主要エリアとして測光値を求めている。しかしながら、被写体は人物や風景などと多岐に亘るため、重要な被写体が画面中心に位置するとは限らない。   In the above-described conventional technology, the photometric value is obtained with the central portion of the image as the main area. However, since subjects vary widely, such as people and landscapes, important subjects are not always located at the center of the screen.

また、測光枠の大きさを固定した場合、被写体の大きさとの関係で、測光枠に別の物体が入り込む可能性がある。一方、被写体に合わせて測光枠の大きさや形を変えることは、実際には困難である。   When the size of the photometric frame is fixed, another object may enter the photometric frame due to the size of the subject. On the other hand, it is actually difficult to change the size and shape of the photometry frame according to the subject.

そもそも、反射光量を指標にして明るさ補正を行うためには、厳密にはその被写体の反射率に合わせて制御する必要がある。すなわち、反射率の小さい被写体は暗めに、反射率の大きい被写体は明るめに再現されるべきである。しかしながら、任意の照明下で入力画像から被写体の反射率を知るためには物体認識処理を前提とすることになり、処理速度の観点からも現実的ではない。   In the first place, in order to perform brightness correction using the amount of reflected light as an index, strictly speaking, it is necessary to control in accordance with the reflectance of the subject. That is, a subject with low reflectance should be reproduced darker and a subject with high reflectance should be reproduced brighter. However, in order to know the reflectance of a subject from an input image under an arbitrary illumination, object recognition processing is assumed, which is not realistic from the viewpoint of processing speed.

そこで、本発明は、入力画像について、局所的な明暗差(コントラスト)を有する領域に着目して入力画像の明るさを評価することを目的とする。さらにその入力画像の明るさ評価値に基づいて画像出力装置の明るさ補正処理を行うことを目的とする。   Accordingly, an object of the present invention is to evaluate the brightness of an input image by paying attention to a region having a local contrast (contrast). It is another object of the present invention to perform brightness correction processing of the image output device based on the brightness evaluation value of the input image.

本発明は、上記課題を解決するためになされたものであり、その第1の側面は、複数の画素からなる入力画像信号における部分領域毎に上記入力画像信号の輝度である入力輝度に基づくコントラストを局所コントラストとして算出して、当該局所コントラストが所定値より大きい部分領域をコントラスト領域として検出するコントラスト領域検出手段と、上記コントラスト領域において上記入力輝度の明るい明側輝度と上記入力輝度の暗い暗側輝度に分配する輝度分配手段と、上記明側輝度および暗側輝度の分布に基づいて上記明側輝度および暗側輝度の境界輝度値を生成する境界輝度値生成手段と、上記境界輝度値に相当する上記入力輝度値が中庸な輝度値として出力されるように明るさ補正を行う明るさ補正手段とを具備し、上記明るさ補正手段は、上記境界輝度値および上記入力輝度の分布に基づいて輝度の階調の圧縮に用いる変換曲線を算出する変換曲線算出手段と、上記入力画像の低周波成分からなる大局輝度画像の輝度である大局輝度を算出する大局輝度算出手段と、上記変換曲線に基づいて上記入力輝度の階調および上記大局輝度の階調を圧縮する階調圧縮手段と、上記変換曲線の傾きおよび階調が圧縮された上記大局輝度に基づいて階調が圧縮された上記入力輝度からなる階調圧縮入力画像のコントラストを補正するコントラスト補正手段とを具備する画像出力装置、各手段により実現される各手順を備える画像出力方法およびその手順をコンピュータに実行させるプログラムである。これにより、輝度のコントラストの大きいコントラスト領域において、明側輝度および暗側輝度を分離する境界輝度値に基づいて入力画像を補正させるという作用をもたらす。   The present invention has been made to solve the above problems, and a first aspect of the present invention is a contrast based on the input luminance which is the luminance of the input image signal for each partial region in the input image signal composed of a plurality of pixels. Is calculated as a local contrast, and a contrast area detecting means for detecting a partial area where the local contrast is greater than a predetermined value as a contrast area, and a bright side brightness of the input brightness and a dark side of the input brightness in the contrast area Equivalent to the boundary luminance value, luminance distribution means for distributing the luminance, boundary luminance value generating means for generating a boundary luminance value of the bright side luminance and the dark side luminance based on the distribution of the bright side luminance and the dark side luminance, and Brightness correction means for performing brightness correction so that the input brightness value is output as a moderate brightness value. The positive means includes a conversion curve calculation means for calculating a conversion curve used for compression of luminance gradation based on the boundary luminance value and the distribution of the input luminance, and luminance of a global luminance image composed of low frequency components of the input image. The overall brightness calculating means for calculating the overall brightness, the tone compression means for compressing the gradation of the input brightness and the brightness of the overall brightness based on the conversion curve, and the slope and the gradation of the conversion curve An image output apparatus comprising contrast correction means for correcting the contrast of a tone-compressed input image composed of the input brightness whose tone is compressed based on the compressed overall brightness, and each procedure realized by each means. An image output method and a program for causing a computer to execute the procedure. This brings about the effect that the input image is corrected based on the boundary luminance value that separates the bright side luminance and the dark side luminance in the contrast region where the luminance contrast is large.

すなわち、被写体の面積が変わったとしてもその輪郭にあるコントラスト領域における明暗の比率は変化しないことから、コントラスト領域に着目する本発明によれば被写体の面積によって評価値がばらつくという従来の問題は解消される。また、周囲に比べて相対的に反射率が低い被写体は暗めに再現され、周囲に比べて相対的に反射率が高い被写体は明るめに再現されるようになるため、本発明によれば、反射率が低い被写体が不自然に明るく再現され、反射率が高い被写体が不自然に暗く再現されるという従来の問題は解消される。   That is, even if the area of the subject changes, the contrast ratio in the contrast area in the outline does not change, and according to the present invention focusing on the contrast area, the conventional problem that the evaluation value varies depending on the area of the subject is solved. Is done. In addition, according to the present invention, a subject having a relatively low reflectance compared to the surroundings is reproduced darker, and a subject having a relatively high reflectance compared to the surroundings is reproduced brightly. The conventional problem that a subject with a low rate is reproduced unnaturally brightly and a subject with a high reflectance is reproduced unnaturally darkly is solved.

また、この第1の側面において、上記境界輝度値生成手段は、上記明側輝度の平均値EG=1と、上記明側輝度の分散値VG=1と、上記暗側輝度の平均値EG=0と、上記暗側輝度の分散値VG=0とに基づいて方程式

Figure 2009065711
の解である境界輝度値Im(但し、EG=0<Im<EG=1)を上記境界輝度値として生成してもよい。これは、判別分析手法により境界輝度値を生成させるものである。また、上記2次方程式を簡略化して以下の方程式
Figure 2009065711
によって境界輝度値Im(但し、EG=0<Im<EG=1)を生成してもよい。この場合、境界輝度値Imについての1次方程式として解くことができる。 In this first aspect, the boundary luminance value generation means includes the bright side luminance average value E G = 1 , the bright side luminance dispersion value V G = 1, and the dark side luminance average value. E G = 0 and the equation based on the dark side luminance dispersion value V G = 0
Figure 2009065711
The boundary luminance value I m (E G = 0 <I m <E G = 1 ) may be generated as the boundary luminance value. This is to generate a boundary luminance value by a discriminant analysis method. In addition, the above quadratic equation is simplified to
Figure 2009065711
The boundary luminance value I m (where E G = 0 <I m <E G = 1 ) may be generated. In this case, it can be solved as a linear equation for the boundary luminance value I m.

本発明によれば、入力画像について、局所的な明暗差を有する領域が明瞭になるように明るさを評価して、その評価値に基づいて撮像装置の露出制御や画像出力装置の明るさ補正を行うことができるという優れた効果を奏し得る。   According to the present invention, the brightness of an input image is evaluated so that a region having a local contrast is clear, and exposure control of the imaging device and brightness correction of the image output device are performed based on the evaluation value. It is possible to achieve an excellent effect that it can be performed.

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

図1は、本発明の実施の形態におけるデジタルスチルカメラ100の一構成例を示す図である。このデジタルスチルカメラ100は、レンズ111と、絞り112と、センサ113と、アンプ114と、ドライバ122と、タイミング生成部123と、カメラ信号処理部130と、測光部140と、測光評価部150と、カメラ動作パラメータ160と、基準値設定部170と、差分値算出部180と、制御部190とを備えている。   FIG. 1 is a diagram illustrating a configuration example of a digital still camera 100 according to an embodiment of the present invention. The digital still camera 100 includes a lens 111, an aperture 112, a sensor 113, an amplifier 114, a driver 122, a timing generation unit 123, a camera signal processing unit 130, a photometry unit 140, and a photometry evaluation unit 150. , A camera operation parameter 160, a reference value setting unit 170, a difference value calculation unit 180, and a control unit 190.

レンズ111は、被写体の光画像(入射光)を集光するものである。絞り112は、レンズ111によって集光された光画像の光量を調整するものである。入射光は、レンズ111および絞り112などの光学系を通過してセンサ113に到達する。   The lens 111 collects a light image (incident light) of the subject. The diaphragm 112 adjusts the amount of light of the optical image collected by the lens 111. Incident light passes through an optical system such as the lens 111 and the diaphragm 112 and reaches the sensor 113.

センサ113は、集光された光画像を光電変換して電気信号に変換するものであり、例えば、CCD(Charge Coupled Devices)イメージセンサなどにより実現される。アンプ114は、センサ113によって光電変換された画像信号を増幅(ゲインアップ)するものである。このアンプ114によって増幅された画像信号は、信号線119を介してカメラ信号処理部130および測光部140に供給される。ドライバ122は、絞り112を駆動して絞りの開口量を調整するものである。タイミング生成部123は、センサ113を駆動して電荷蓄積時間を調整するものである。   The sensor 113 photoelectrically converts a collected light image into an electrical signal, and is realized by, for example, a CCD (Charge Coupled Devices) image sensor. The amplifier 114 amplifies (gains up) the image signal photoelectrically converted by the sensor 113. The image signal amplified by the amplifier 114 is supplied to the camera signal processing unit 130 and the photometry unit 140 via the signal line 119. The driver 122 drives the diaphragm 112 to adjust the aperture amount of the diaphragm. The timing generator 123 adjusts the charge accumulation time by driving the sensor 113.

カメラ信号処理部130は、信号線119を介してアンプ114から供給された画像信号について、デモザイク処理、ガンマ補正処理、色補正処理などの信号処理を行うものである。このカメラ信号処理部130によって信号処理の施された画像信号は、信号線139から出力され、記録媒体への記録や表示部における表示に用いられる。   The camera signal processing unit 130 performs signal processing such as demosaic processing, gamma correction processing, and color correction processing on the image signal supplied from the amplifier 114 via the signal line 119. The image signal subjected to the signal processing by the camera signal processing unit 130 is output from the signal line 139 and used for recording on a recording medium and display on the display unit.

測光部140は、信号線119を介してアンプ114から供給された画像信号について、各部分の明るさの計測結果を出力するものである。この測光部140による計測結果は、信号線149を介して測光評価部150に供給される。   The photometry unit 140 outputs the measurement result of the brightness of each part of the image signal supplied from the amplifier 114 via the signal line 119. The measurement result by the photometry unit 140 is supplied to the photometry evaluation unit 150 via the signal line 149.

測光評価部150は、信号線149を介して測光部140から供給された計測結果に基づいて、その画像信号の明るさを評価した測光評価値を生成するものである。この測光評価部150によって生成された測光評価値は、信号線159を介して差分値算出部180に供給される。   The photometric evaluation unit 150 generates a photometric evaluation value that evaluates the brightness of the image signal based on the measurement result supplied from the photometric unit 140 via the signal line 149. The photometric evaluation value generated by the photometric evaluation unit 150 is supplied to the difference value calculation unit 180 via the signal line 159.

カメラ動作パラメータ160は、デジタルスチルカメラ100の現在の動作状況を示すパラメータである。基準値設定部170は、カメラ動作パラメータ160を参照して、標準的な明るさを示す基準値を設定するものである。なお、この基準値としては、例えば、ガンマ曲線によって0.4乃至0.5に変換される18乃至20%程度を選択することができる。   The camera operation parameter 160 is a parameter indicating the current operation state of the digital still camera 100. The reference value setting unit 170 refers to the camera operation parameter 160 and sets a reference value indicating standard brightness. As the reference value, for example, about 18 to 20% converted to 0.4 to 0.5 by a gamma curve can be selected.

差分値算出部180は、測光評価部150によって生成された測光評価値を、基準値設定部170によって設定された基準値と比較して、そのずれ量としての差分値を算出するものである。   The difference value calculation unit 180 compares the photometry evaluation value generated by the photometry evaluation unit 150 with the reference value set by the reference value setting unit 170, and calculates a difference value as a deviation amount.

制御部190は、差分値算出部180によって算出された差分値が0に近づく方向に、光学系の絞り112の開口量、センサ113の電荷蓄積時間、アンプ114の増幅量などを調整する制御信号を生成するものである。制御部190によって生成された制御信号は、これら絞り112、センサ113およびアンプ114などに供給され、各部はこの制御信号に基づいて適切な露光量が得られるように動作する。   The control unit 190 adjusts the opening amount of the diaphragm 112 of the optical system, the charge accumulation time of the sensor 113, the amplification amount of the amplifier 114, and the like so that the difference value calculated by the difference value calculation unit 180 approaches zero. Is generated. A control signal generated by the control unit 190 is supplied to the diaphragm 112, the sensor 113, the amplifier 114, and the like, and each unit operates so as to obtain an appropriate exposure amount based on the control signal.

図2は、本発明の実施の形態における測光部140の一構成例を示す図である。この測光部140は、輝度算出部141と、非線形変換部142と、ブロック平均生成部143と、ブロック平均輝度画像メモリ144とを備えている。   FIG. 2 is a diagram illustrating a configuration example of the photometry unit 140 according to the embodiment of the present invention. The photometry unit 140 includes a luminance calculation unit 141, a non-linear conversion unit 142, a block average generation unit 143, and a block average luminance image memory 144.

輝度算出部141は、信号線119を介してアンプ114から供給された入力画像信号について、各画素の輝度を算出するものである。通常のカラーセンサでは画素毎には何れか1つの色しか計測できないため、画像の明るさを計測するためには、一旦そのようなセンサ出力から輝度を算出する処理が必要となる。   The luminance calculation unit 141 calculates the luminance of each pixel for the input image signal supplied from the amplifier 114 via the signal line 119. Since a normal color sensor can measure only one color for each pixel, in order to measure the brightness of an image, it is necessary to temporarily calculate luminance from such sensor output.

非線形変換部142は、輝度算出部141によって算出された各画素の輝度を非線形変換するものである。この非線形変換としては、例えば、対数変換やガンマ補正などの「上に凸の単調増加関数」を利用することができる。この非線形変換は、明るさ補正のためのスケーリング操作に対して、ヒストグラム形状を保存するために行われるものである。   The non-linear conversion unit 142 performs non-linear conversion on the luminance of each pixel calculated by the luminance calculation unit 141. As this non-linear conversion, for example, a “upwardly convex monotone increasing function” such as logarithmic conversion or gamma correction can be used. This non-linear conversion is performed to preserve the histogram shape for the scaling operation for brightness correction.

ブロック平均生成部143は、非線形変換部142によって非線形変換された画像信号の画像を格子状に分割したブロック毎に、非線形変換された輝度の平均をブロック平均輝度として生成するものである。すなわち、各画素位置が何れのブロックに属するかを判別し、非線形変換された輝度を加算していくことによって該当するブロックの積分値を求め、その積分値をそのブロックに属する画素数で除算することによってそのブロック内の非線形変換された輝度の平均を算出する。このブロック平均生成部143において分割されたブロックを構成画素とする画像をブロック平均画像と呼称し、その構成画素をブロック画素と呼称する。すなわち、ブロック画素の輝度は、そのブロックのブロック平均輝度となる。なお、1つのブロックは、例えば40×30画素または32×32画素程度の大きさを採用することができる。   The block average generation unit 143 generates the average of the non-linearly converted luminance as the block average luminance for each block obtained by dividing the image of the image signal nonlinearly converted by the non-linear conversion unit 142 into a lattice shape. That is, it is determined to which block each pixel position belongs, and the integral value of the corresponding block is obtained by adding the luminance subjected to nonlinear transformation, and the integral value is divided by the number of pixels belonging to the block. Thus, the average of the non-linearly transformed luminance in the block is calculated. An image including the blocks divided by the block average generation unit 143 as constituent pixels is referred to as a block average image, and the constituent pixels are referred to as block pixels. That is, the luminance of the block pixel is the block average luminance of the block. One block can adopt a size of about 40 × 30 pixels or 32 × 32 pixels, for example.

ブロック平均輝度画像メモリ144は、ブロック平均生成部143によって生成されたブロック平均画像を保持するものである。このブロック平均輝度画像メモリ144に保持されたブロック平均画像は、測光部140による計測結果として、信号線149を介して測光評価部150に供給される。   The block average luminance image memory 144 holds the block average image generated by the block average generation unit 143. The block average image held in the block average luminance image memory 144 is supplied as a measurement result by the photometry unit 140 to the photometry evaluation unit 150 via the signal line 149.

図3は、本発明の実施の形態におけるブロック平均画像の生成例を示す図である。図3(a)は、ブロックに分割される前の各画素を示している。輝度算出部141によって算出された輝度は、非線形変換部142によって非線形変換されて、図3(b)の太線のようにブロックに分割される。   FIG. 3 is a diagram illustrating a generation example of a block average image according to the embodiment of the present invention. FIG. 3A shows each pixel before being divided into blocks. The luminance calculated by the luminance calculation unit 141 is nonlinearly converted by the non-linear conversion unit 142, and is divided into blocks as indicated by the thick lines in FIG.

そして、ブロック平均生成部143によって、各ブロックに属する輝度(非線形変換された輝度)の平均がブロック平均輝度として算出される。この様子を表したものが図3(c)である。これにより、ブロック平均画像が生成される。   Then, the block average generation unit 143 calculates the average of the luminance (nonlinearly converted luminance) belonging to each block as the block average luminance. FIG. 3C shows this state. Thereby, a block average image is generated.

図4は、本発明の実施の形態における測光評価部150の一構成例を示す図である。この測光評価部150は、コントラスト領域検出部151および測光評価値生成部155を備えている。コントラスト領域検出部151は、ブロック平均画像における部分領域について、輝度のコントラスト(輝度差)が所定値より大きい部分領域をコントラスト領域として検出するものである。測光評価値生成部155は、コントラスト領域検出部151によって検出されたコントラスト領域において、ブロック平均画像の測光評価値を生成するものである。   FIG. 4 is a diagram illustrating a configuration example of the photometric evaluation unit 150 according to the embodiment of the present invention. The photometric evaluation unit 150 includes a contrast area detection unit 151 and a photometric evaluation value generation unit 155. The contrast area detection unit 151 detects, as a contrast area, a partial area having a luminance contrast (brightness difference) greater than a predetermined value for the partial area in the block average image. The photometric evaluation value generator 155 generates a photometric evaluation value of the block average image in the contrast area detected by the contrast area detector 151.

コントラスト領域検出部151は、局所コントラスト算出部152と、閾値判定部153と、コントラスト領域情報メモリ154とを備えている。   The contrast region detection unit 151 includes a local contrast calculation unit 152, a threshold determination unit 153, and a contrast region information memory 154.

局所コントラスト算出部152は、部分領域毎の輝度のコントラスト(輝度差)を局所コントラストとして算出するものである。この局所コントラストを算出するためには、例えば、ブロック平均画像における輝度の局所1次微分の絶対値または局所2次微分の絶対値を利用することができる。また、微分演算子でなくとも、局所最大値と局所最小値の差の絶対値を利用してもよい。   The local contrast calculation unit 152 calculates the luminance contrast (luminance difference) for each partial region as the local contrast. In order to calculate the local contrast, for example, the absolute value of the local primary derivative of the luminance or the absolute value of the local secondary derivative in the block average image can be used. Further, an absolute value of a difference between the local maximum value and the local minimum value may be used instead of the differential operator.

閾値判定部153は、局所コントラスト算出部152によって算出された局所コントラストの大きさが所定の閾値より大きいか否かを比較して、局所コントラストが閾値より大きければコントラスト領域に該当するものと判定するものである。   The threshold determination unit 153 compares whether or not the local contrast calculated by the local contrast calculation unit 152 is greater than a predetermined threshold, and determines that the local contrast corresponds to the contrast region if the local contrast is greater than the threshold. Is.

コントラスト領域情報メモリ154は、ブロック平均画像のブロック画素についてコントラスト領域に該当するか否かの情報をコントラスト領域情報として保持するメモリである。例えば、ブロック平均画像の各ブロック画素に対応して、「そのブロック画素がコントラスト領域に該当するか否か」を表す2値データを、1ビットずつ保持する。このコントラスト領域情報は、信号線158を介して測光評価値生成部155に供給される。   The contrast area information memory 154 is a memory that holds information as to whether or not a block pixel of the block average image corresponds to a contrast area as contrast area information. For example, corresponding to each block pixel of the block average image, binary data representing “whether or not the block pixel corresponds to the contrast region” is held bit by bit. This contrast area information is supplied to the photometric evaluation value generation unit 155 via the signal line 158.

測光評価値生成部155は、輝度分配部156と、明側輝度群メモリ191と、暗側輝度群メモリ192と、境界輝度値生成部157とを備えている。   The photometric evaluation value generation unit 155 includes a luminance distribution unit 156, a bright side luminance group memory 191, a dark side luminance group memory 192, and a boundary luminance value generation unit 157.

輝度分配部156は、信号線158を介して供給されたコントラスト領域情報の示すコントラスト領域において、各画素の輝度を明るい輝度(以下、明側輝度という。)と暗い輝度(以下、暗側輝度という。)に分配するものである。例えば、コントラスト領域に該当する部分領域毎に輝度の最大値を明側輝度とし、輝度の最小値を暗側輝度とすることができる。また、コントラスト領域に該当する画素位置毎に輝度の局所2次微分の正負に基づき当該画素位置の輝度を明側輝度か暗側輝度に分類してもよい。例えば、画像に適用する2次微分演算子として、1次元2次微分演算子[1,−2,1]を2次元に合成したものを利用する場合は、その2次微分演算子の出力が負であれば当該画素位置の輝度を明側輝度とし、正であれば暗側輝度とする。ちなみに画像処理の分野では、上記の2次微分演算子の例の正負を反転させたものも慣用的に2次微分演算子として用いることもあるが、その場合は明側または暗側輝度の判定を上記と逆にする必要がある。   In the contrast region indicated by the contrast region information supplied via the signal line 158, the luminance distribution unit 156 converts the luminance of each pixel into bright luminance (hereinafter referred to as “bright side luminance”) and dark luminance (hereinafter referred to as “dark side luminance”). )). For example, for each partial area corresponding to the contrast area, the maximum luminance value can be the bright side luminance, and the minimum luminance value can be the dark side luminance. Further, the luminance at the pixel position may be classified into bright side luminance or dark side luminance based on the sign of the local secondary differential of the luminance for each pixel position corresponding to the contrast region. For example, when using a two-dimensional composite of a one-dimensional secondary differential operator [1, -2, 1] as a secondary differential operator applied to an image, the output of the secondary differential operator is If it is negative, the luminance at the pixel position is the bright side luminance, and if it is positive, the luminance is the dark side luminance. Incidentally, in the field of image processing, the above-described example of the second-order differential operator, in which the sign is inverted, is also commonly used as the second-order differential operator. Must be reversed from the above.

なお、コントラスト領域検出部151において輝度の局所1次微分の絶対値から局所コントラストを求めた場合、もしくは、局所最大値と最小値の差の絶対値から局所コントラストを求めた場合には、輝度分配部156において輝度の最大値および最小値から輝度を分配することが適している。一方、コントラスト領域検出部151において輝度の局所2次微分の絶対値から局所コントラストを求めた場合には、その途中結果を利用して、輝度分配部156において輝度の局所2次微分の符号により輝度を分配することが効率的である。但し、これらの組合せは、特に制約されるものではない。   Note that when the local contrast is obtained from the absolute value of the local first derivative of the luminance in the contrast region detection unit 151 or when the local contrast is obtained from the absolute value of the difference between the local maximum value and the minimum value, the luminance distribution is performed. It is suitable for the unit 156 to distribute the luminance from the maximum value and the minimum value of the luminance. On the other hand, when the local contrast is obtained from the absolute value of the local second derivative of the luminance in the contrast region detecting unit 151, the luminance distribution unit 156 uses the intermediate result to obtain the luminance by the sign of the local second derivative of the luminance. Is efficient to distribute. However, these combinations are not particularly limited.

明側輝度群メモリ191は、輝度分配部156によって明側輝度に分配された輝度(非線形変換された輝度)を保持するものである。暗側輝度群メモリ192は、輝度分配部156によって暗側輝度に分配された輝度(非線形変換された輝度)を保持するものである。   The bright-side luminance group memory 191 holds the luminance (non-linearly converted luminance) distributed to the bright-side luminance by the luminance distribution unit 156. The dark side luminance group memory 192 holds the luminance (the luminance subjected to nonlinear conversion) distributed to the dark side luminance by the luminance distribution unit 156.

境界輝度値生成部157は、明側輝度群メモリ191に保持された明側輝度および暗側輝度群メモリ192に保持された暗側輝度のそれぞれの分布に基づいて明側輝度および暗側輝度の境界輝度値を測光評価値として生成するものである。すなわち、明側輝度と暗側輝度をなるべくうまく分離できるような境界輝度値を生成する。この境界輝度値生成部157によって生成された境界輝度値は、測光評価値として信号線159を介して出力される。   The boundary luminance value generation unit 157 determines the bright side luminance and the dark side luminance based on the respective distributions of the bright side luminance held in the bright side luminance group memory 191 and the dark side luminance held in the dark side luminance group memory 192. The boundary luminance value is generated as a photometric evaluation value. That is, a boundary luminance value that can separate the bright side luminance and the dark side luminance as well as possible is generated. The boundary luminance value generated by the boundary luminance value generation unit 157 is output via the signal line 159 as a photometric evaluation value.

本発明の実施の形態では、境界輝度値を生成するために、以下のように判別分析手法を用いる。すなわち、ある輝度値Iが与えられたときに、それが暗側輝度群か明側輝度群のどちらに属するかの事後確率(posterior)が大きい方の群にその輝度値Iを振り分ける。どちらの群に属するかの確率変数をGとして、暗側輝度群のときG=0、明側輝度群のときG=1とする。ここで、それぞれの群に属する事後確率の比率Λは、次式により与えられる。

Figure 2009065711
In the embodiment of the present invention, a discriminant analysis method is used as follows to generate the boundary luminance value. That is, when a certain luminance value I is given, the luminance value I is assigned to a group having a larger posterior probability (posterior) as to whether it belongs to the dark side luminance group or the bright side luminance group. It is assumed that the random variable of which group belongs to G, G = 0 for the dark side luminance group, and G = 1 for the bright side luminance group. Here, the ratio Λ of posterior probabilities belonging to each group is given by the following equation.
Figure 2009065711

この比率Λの対数をとると、logΛ<0であれば輝度値Iは暗側輝度群に、logΛ>0であれば輝度値Iは明側輝度群に属すると判断することができる。logΛ=0であれば輝度値Iは両群を分離する境界輝度上である。なお、この場合の対数の底は何れでもよく、常用対数や自然対数など適宜選択することができる。   Taking the logarithm of this ratio Λ, it can be determined that if log Λ <0, the luminance value I belongs to the dark side luminance group, and if log Λ> 0, the luminance value I belongs to the bright side luminance group. If logΛ = 0, the luminance value I is on the boundary luminance that separates both groups. In this case, the base of the logarithm may be any, and a common logarithm or a natural logarithm may be selected as appropriate.

p(I|G)は、暗側輝度群(G=0の場合)と明側輝度群(G=1の場合)の輝度分布を示す。ここで、判別分析を適用するため、ブロック平均画像におけるコントラスト領域から得られた暗側輝度群と明側輝度群の輝度軸上の分布は正規分布に従うものと仮定する。   p (I | G) indicates the luminance distribution of the dark side luminance group (when G = 0) and the bright side luminance group (when G = 1). Here, in order to apply discriminant analysis, it is assumed that the distribution on the luminance axis of the dark side luminance group and the bright side luminance group obtained from the contrast area in the block average image follows a normal distribution.

p(G)は、輝度値にかかわらずどちらの群に属するかの確率を示す。本発明の実施の形態においては、コントラスト領域の暗側輝度と明側輝度に注目しているため、両群に属するデータの数はほぼ同数であり、p(G=0)=p(G=1)と考えても差し支えない。したがって、両群を分離する境界輝度値Imに対して以下の方程式が得られる。

Figure 2009065711
p (G) indicates the probability of belonging to which group regardless of the luminance value. In the embodiment of the present invention, attention is paid to the dark side brightness and the bright side brightness of the contrast region, so the number of data belonging to both groups is substantially the same, and p (G = 0) = p (G = It can be considered as 1). Therefore, the following equation is obtained for the boundary luminance value I m to separate the two groups.
Figure 2009065711

但し、明側輝度の平均値をEG=1、明側輝度の分散値をVG=1、暗側輝度の平均値をEG=0、暗側輝度の分散値をVG=0としている。この式は、境界輝度値Imについての2次方程式であるため、解が2つ存在する。これら両解のうち、EG=0<Im<EG=1の範囲にある方を選択することによって境界輝度値Imが得られる。 However, the average value of bright side luminance is E G = 1 , the variance value of bright side luminance is V G = 1 , the average value of dark side luminance is E G = 0 , and the variance value of dark side luminance is V G = 0. Yes. This equation are the quadratic equation for the boundary luminance value I m, the solution there are two. Of these two solutions, the boundary luminance value Im is obtained by selecting the one in the range of E G = 0 <I m <E G = 1 .

なお、ここでは、判別分析の例として、2次判別分析を例に挙げて説明したが、これ以外にも、例えば線形判別やサポートベクターマシンなどを用いてもよい。例えば、線形判別の場合は上記方程式が以下のように簡略化される。なお、この式は境界輝度値Im(但し、EG=0<Im<EG=1)に対する1次方程式となる。

Figure 2009065711
Here, as an example of discriminant analysis, secondary discriminant analysis has been described as an example, but other than this, for example, linear discriminant or support vector machine may be used. For example, in the case of linear discrimination, the above equation is simplified as follows. This equation is a linear equation for the boundary luminance value I m (where E G = 0 <I m <E G = 1 ).
Figure 2009065711

図5は、本発明の実施の形態における境界輝度値の生成例を示す図である。ここでは、コントラスト領域における明側輝度および暗側輝度の組が5組分表示されている。すなわち、第1組目の明側輝度511および暗側輝度521の組、第2組目の明側輝度512および暗側輝度522の組、第3組目の明側輝度513および暗側輝度523の組、第4組目の明側輝度514および暗側輝度524の組、および、第5組目の明側輝度515および暗側輝度525の組である。これらの組は、輝度分配部156において、輝度の最大値および最小値を示し、または、輝度の局所2次微分の符号によって分配された組である。   FIG. 5 is a diagram illustrating a generation example of the boundary luminance value in the embodiment of the present invention. Here, five sets of bright-side luminance and dark-side luminance in the contrast region are displayed. That is, the first set of bright side luminance 511 and dark side luminance 521, the second set of bright side luminance 512 and dark side luminance 522, the third set of bright side luminance 513 and dark side luminance 523 , A fourth set of bright side luminance 514 and dark side luminance 524, and a fifth set of bright side luminance 515 and dark side luminance 525. These sets are groups that indicate the maximum and minimum values of luminance in the luminance distribution unit 156, or are distributed according to the sign of the local second derivative of luminance.

これらの組の分布を表したものがその上の分布グラフであり、明側輝度群510と暗側輝度群520である。この分布グラフは横方向が非線形変換された輝度(この図の例では輝度Lの対数)を示しており、右側ほど輝度が明るくなっている。また、上方向には各輝度の存在確率が示されており、上側ほど存在確率が高くなっている。   A distribution graph above the distribution of these sets is a bright side luminance group 510 and a dark side luminance group 520. This distribution graph shows the luminance obtained by nonlinear transformation in the horizontal direction (in the example of this figure, the logarithm of luminance L), and the luminance is brighter toward the right side. In addition, the existence probability of each luminance is shown in the upper direction, and the existence probability is higher toward the upper side.

上述のように、方程式(数2)の解を求めることにより境界輝度値が得られる。この境界輝度値が、明側輝度群510と暗側輝度群520を分離する。   As described above, the boundary luminance value is obtained by finding the solution of the equation (Equation 2). This boundary luminance value separates the bright side luminance group 510 and the dark side luminance group 520.

図6は、本発明の実施の形態における明側輝度群と暗側輝度群の生成例を示す図である。図6(a)は、非線形変換された輝度の明側輝度および暗側輝度を区別する前のヒストグラム例である。このような分布を示す画像に対して境界輝度値を求めることにより、同図(b)および(c)のような分布が得られる。すなわち、同図(b)は非線形変換された輝度の明側輝度群のヒストグラム例であり、同図(c)は非線形変換された輝度の暗側輝度群のヒストグラム例である。   FIG. 6 is a diagram showing a generation example of the bright side luminance group and the dark side luminance group in the embodiment of the present invention. FIG. 6A is an example of a histogram before the bright side luminance and the dark side luminance of the luminance subjected to nonlinear conversion are distinguished. By obtaining the boundary luminance value for an image showing such a distribution, the distributions as shown in FIGS. That is, FIG. 5B is a histogram example of a bright side luminance group of non-linearly converted luminance, and FIG. 10C is a histogram example of a dark side luminance group of non-linearly converted luminance.

なお、これらのヒストグラム例では、それぞれの存在確率の最大値によって正規化が行われている。   In these histogram examples, normalization is performed by the maximum value of each existence probability.

図7は、本発明の実施の形態におけるデジタルスチルカメラ100の制御手順の一例を示す図である。まず、被写体からの入射光がレンズ111および絞り112などの光学系を通過してセンサ113において撮像されると(ステップS901)、アンプ114によって増幅された入力画像について、測光部140において測光処理が行われる(ステップS910)。そして、測光処理による計測結果に基づいて、測光評価部150において測光評価処理が行われる(ステップS920)。   FIG. 7 is a diagram illustrating an example of a control procedure of the digital still camera 100 according to the embodiment of the present invention. First, when incident light from a subject passes through an optical system such as the lens 111 and the diaphragm 112 and is imaged by the sensor 113 (step S901), the photometric unit 140 performs photometric processing on the input image amplified by the amplifier 114. Performed (step S910). Then, based on the measurement result of the photometric process, the photometric evaluation unit 150 performs the photometric evaluation process (step S920).

測光評価処理による測光評価値が出力されると(ステップS902)、差分値算出部180は基準値設定部170によって設定された基準値との差分値を生成する(ステップS903)。制御部190は、生成された差分値に基づいて、ドライバ122、タイミング生成部123およびアンプ114などにおける制御信号を生成して動作制御を行う(ステップS904)。   When the photometric evaluation value obtained by the photometric evaluation process is output (step S902), the difference value calculation unit 180 generates a difference value from the reference value set by the reference value setting unit 170 (step S903). Based on the generated difference value, the control unit 190 generates control signals in the driver 122, the timing generation unit 123, the amplifier 114, and the like to perform operation control (step S904).

図8は、本発明の実施の形態における測光処理(ステップS910)の処理手順の一例を示す図である。信号線119を介して入力画像が入力されると(ステップS911)、入力画像の各画素について以下の処理が行われる(ループL991)。ここで、入力画像の各画素を2次元座標(p,q)により表す。但し、pおよびqはともに0以上の整数である。   FIG. 8 is a diagram showing an example of a processing procedure of the photometric process (step S910) in the embodiment of the present invention. When an input image is input via the signal line 119 (step S911), the following processing is performed for each pixel of the input image (loop L991). Here, each pixel of the input image is represented by two-dimensional coordinates (p, q). However, p and q are both integers of 0 or more.

まず、入力画素(p,q)の輝度が輝度算出部141によって算出される(ステップS912)。その算出された輝度は非線形変換部142によって非線形変換される(ステップS913)。   First, the luminance of the input pixel (p, q) is calculated by the luminance calculation unit 141 (step S912). The calculated luminance is nonlinearly converted by the nonlinear converter 142 (step S913).

そして、ブロック平均生成部143において、入力画素(p,q)の属するブロックが判別されて(ステップS914)、その判別されたブロックの積分値を保持する変数に、入力画素(p,q)の非線形変換された輝度が加算される(ステップS915)。   Then, in the block average generation unit 143, the block to which the input pixel (p, q) belongs is determined (step S914), and the variable of the integrated value of the determined block is stored in the variable of the input pixel (p, q). The non-linearly converted luminance is added (step S915).

ループL991において、全ての入力画素(p,q)について上述の処理が行われると、次に各ブロックについて以下の処理が行われる(ループL992)。すなわち、各ブロックの積分値をそのブロックの画素数で除算する処理が行われる(ステップS916)。これにより、その除算結果は各ブロックのブロック平均輝度としてブロック平均輝度画像メモリ144に保持される(ステップS917)。   When the above-described processing is performed for all input pixels (p, q) in the loop L991, the following processing is performed for each block (loop L992). That is, a process of dividing the integral value of each block by the number of pixels of that block is performed (step S916). Thereby, the division result is held in the block average luminance image memory 144 as the block average luminance of each block (step S917).

図9は、本発明の実施の形態における測光評価処理(ステップS920)の処理手順の一例を示す図である。信号線149を介してブロック平均画像が入力されると(ステップS921)、コントラスト領域検出部151においてブロック平均画像についてコントラスト領域の検出処理が行われる(ステップS930)。また、コントラスト領域検出部151で検出されたコントラスト領域について、測光評価値生成部155において測光評価値の生成処理が行われる(ステップS940)。生成された測光評価値は信号線159を介して出力される(ステップS925)。   FIG. 9 is a diagram showing an example of a processing procedure of the photometric evaluation process (step S920) in the embodiment of the present invention. When a block average image is input via the signal line 149 (step S921), the contrast area detection unit 151 performs a contrast area detection process on the block average image (step S930). Further, for the contrast area detected by the contrast area detection unit 151, a photometric evaluation value generation process is performed in the photometric evaluation value generation unit 155 (step S940). The generated photometric evaluation value is output via the signal line 159 (step S925).

図10は、本発明の実施の形態におけるコントラスト領域検出処理(ステップS930)の処理手順の一例を示す図である。信号線149を介してブロック平均画像が入力されると(ステップS931)、ブロック平均画像の各画素について以下の処理が行われる(ループL993)。ここで、ブロック平均画像の各画素を2次元座標(r,s)により表す。但し、rおよびsはともに0以上の整数である。   FIG. 10 is a diagram showing an example of the processing procedure of the contrast area detection processing (step S930) in the embodiment of the present invention. When the block average image is input via the signal line 149 (step S931), the following processing is performed for each pixel of the block average image (loop L993). Here, each pixel of the block average image is represented by two-dimensional coordinates (r, s). However, r and s are both integers of 0 or more.

まず、ブロック平均画像の画素(r,s)における輝度の局所コントラストが局所コントラスト算出部152によって算出される(ステップS932)。上述のように、この局所コントラストを算出するためには、例えば、ブロック平均画像における輝度の局所1次微分の絶対値または局所2次微分の絶対値を利用することができる。   First, the local contrast calculation unit 152 calculates the luminance local contrast at the pixel (r, s) of the block average image (step S932). As described above, in order to calculate the local contrast, for example, the absolute value of the local primary derivative or the absolute value of the local secondary derivative of the luminance in the block average image can be used.

そして、この生成された局所コントラストが閾値より大きければ(ステップS933)、その画素(r,s)がコントラスト領域に該当する旨を示すコントラスト領域情報が閾値判定部153によってコントラスト領域情報メモリ154に保持される(ステップS934)。このコントラスト領域情報は、信号線158を介して測光評価値生成部155の輝度分配部156に供給される。   If the generated local contrast is larger than the threshold value (step S933), contrast area information indicating that the pixel (r, s) corresponds to the contrast area is stored in the contrast area information memory 154 by the threshold determination unit 153. (Step S934). The contrast area information is supplied to the luminance distribution unit 156 of the photometric evaluation value generation unit 155 via the signal line 158.

図11は、本発明の実施の形態における測光評価値生成処理(ステップS940)の処理手順の一例を示す図である。信号線149を介してブロック平均画像が入力され(ステップS941)、信号線158を介してコントラスト領域情報が入力されると(ステップS942)、輝度分配部156によって明側輝度または暗側輝度への輝度分配処理が行われる(ステップS950)。そして、これら明側輝度および暗側輝度の分布に基づいて境界輝度値生成部157によって境界輝度値生成処理が行われる(ステップS960)。この境界輝度値生成処理によって生成された境界輝度値は、測光評価値として信号線159を介して出力される(ステップS945)。   FIG. 11 is a diagram illustrating an example of a processing procedure of the photometric evaluation value generation process (step S940) according to the embodiment of the present invention. When the block average image is input via the signal line 149 (step S941) and the contrast area information is input via the signal line 158 (step S942), the luminance distribution unit 156 changes the brightness to the bright side luminance or the dark side luminance. A luminance distribution process is performed (step S950). Then, the boundary luminance value generation processing is performed by the boundary luminance value generation unit 157 based on the distribution of the bright side luminance and the dark side luminance (step S960). The boundary luminance value generated by the boundary luminance value generation processing is output as a photometric evaluation value via the signal line 159 (step S945).

図12は、本発明の実施の形態における輝度分配処理(ステップS950)の処理手順の一例を示す図である。信号線149を介してブロック平均画像が入力され(ステップS951)、信号線158を介してコントラスト領域情報が入力されると(ステップS952)、ブロック平均画像の各画素について以下の処理が行われる(ループL995)。ここで、ブロック平均画像の各画素を2次元座標(r,s)により表す。但し、rおよびsはともに0以上の整数である。   FIG. 12 is a diagram showing an example of the processing procedure of the luminance distribution processing (step S950) in the embodiment of the present invention. When a block average image is input via the signal line 149 (step S951) and contrast area information is input via the signal line 158 (step S952), the following processing is performed on each pixel of the block average image (step S952). Loop L995). Here, each pixel of the block average image is represented by two-dimensional coordinates (r, s). However, r and s are both integers of 0 or more.

まず、ブロック平均画像の画素(r,s)がコントラスト領域内である旨をコントラスト領域情報が示していれば(ステップS953)、輝度分配部156によって画素(r,s)の輝度が明側輝度または暗側輝度に分配される。同図の例では、分配の基準として、輝度の局所2次微分の符号が用いられている。すなわち、画素(r,s)における輝度の局所2次微分が算出され(ステップS954)、その算出された局所2次微分が「0」より小さければ(ステップS955)、その局所2次微分の値が明側輝度として明側輝度群メモリ191に保持される(ステップS956)。一方、算出された局所2次微分が「0」より小さくなければ(ステップS955)、その局所2次微分の値が暗側輝度として暗側輝度群メモリ192に保持される(ステップS957)。   First, if the contrast region information indicates that the pixel (r, s) of the block average image is in the contrast region (step S953), the luminance distribution unit 156 changes the luminance of the pixel (r, s) to the bright side luminance. Or it is distributed to the dark side luminance. In the example of the figure, the sign of the local second derivative of luminance is used as a distribution reference. That is, the local secondary derivative of the luminance at the pixel (r, s) is calculated (step S954), and if the calculated local secondary derivative is smaller than “0” (step S955), the value of the local secondary derivative is calculated. Is stored in the bright side luminance group memory 191 as the bright side luminance (step S956). On the other hand, if the calculated local secondary derivative is not smaller than “0” (step S955), the value of the local secondary derivative is held in the dark side luminance group memory 192 as the dark side luminance (step S957).

図13は、本発明の実施の形態における境界輝度値生成処理(ステップS960)の処理手順の一例を示す図である。明側輝度群メモリ191および暗側輝度群メモリ192から明側輝度および暗側輝度が入力されると(ステップS961)、明側輝度の平均値EG=1が算出され(ステップS962)、明側輝度の分散値VG=1が算出される(ステップS963)。また、同様に、暗側輝度の平均値EG=0が算出され(ステップS964)、暗側輝度の分散値VG=0が算出される(ステップS965)。 FIG. 13 is a diagram showing an example of the processing procedure of the boundary luminance value generation processing (step S960) in the embodiment of the present invention. When the bright side luminance and the dark side luminance are input from the bright side luminance group memory 191 and the dark side luminance group memory 192 (step S961), an average value EG = 1 of the bright side luminance is calculated (step S962). The side luminance variance value V G = 1 is calculated (step S963). Similarly, an average value EG = 0 of the dark side luminance is calculated (step S964), and a variance value V G = 0 of the dark side luminance is calculated (step S965).

そして、以下の境界輝度値Imに関する2次方程式の解が算出される(ステップS966)。

Figure 2009065711
Then, the solution of the quadratic equation are calculated for the following boundary luminance value I m (step S966).
Figure 2009065711

ここで、2次方程式であるため解は2つ存在するが、両解のうち、EG=0<Im<EG=1の範囲にある方が解として選択される(ステップS967)。この選択された解が、境界輝度値(すなわち、測光評価値)として信号線159を介して出力される(ステップS968)。 Here, since there are two solutions because of the quadratic equation, the solution that is in the range of E G = 0 <I m <E G = 1 is selected as the solution (step S967). The selected solution is output as a boundary luminance value (that is, a photometric evaluation value) via the signal line 159 (step S968).

このように、本発明の実施の形態によれば、コントラスト領域検出部151によって検出されたコントラスト領域において、測光評価値生成部155によって各画素の輝度が明側輝度または暗側輝度に分配されて、これら明側輝度および暗側輝度の分布に基づいて境界輝度値が測光評価値として生成される。この測光評価値は、差分値算出部180において基準値と比較され、制御部190における明るさ補正の動作制御に用いることができる。   As described above, according to the embodiment of the present invention, the luminance of each pixel is distributed to the bright side luminance or the dark side luminance by the photometric evaluation value generation unit 155 in the contrast region detected by the contrast region detection unit 151. A boundary luminance value is generated as a photometric evaluation value based on the distribution of the bright side luminance and the dark side luminance. This photometric evaluation value is compared with a reference value in the difference value calculation unit 180, and can be used for brightness correction operation control in the control unit 190.

なお、上述の実施の形態では、デジタルスチルカメラにおける明るさ補正に適用する例を示したが、本発明はこれに限定されるものではない。例えば、以下のようにコンピュータシステムにおける出力画像の明るさ補正にも適用することができる。   In the above-described embodiment, an example is shown in which the present invention is applied to brightness correction in a digital still camera, but the present invention is not limited to this. For example, the present invention can be applied to brightness correction of an output image in a computer system as follows.

図14は、本発明の実施の形態におけるコンピュータシステム200の一構成例を示す図である。このコンピュータシステム200は、プロセッサ211と、メモリ212と、ディスプレイコントローラ213と、入出力インターフェース214とを含むコンピュータを備える。   FIG. 14 is a diagram showing a configuration example of the computer system 200 according to the embodiment of the present invention. The computer system 200 includes a computer including a processor 211, a memory 212, a display controller 213, and an input / output interface 214.

プロセッサ211は、プログラムの実行や各装置の制御をおこなう演算装置である。メモリ212は、そのようなプログラムの実行や各装置の制御に必要な一時的データの格納場所である。   The processor 211 is an arithmetic device that executes a program and controls each device. The memory 212 is a place for storing temporary data necessary for executing such a program and controlling each device.

ディスプレイコントローラ213は、ディスプレイを接続するためのインターフェースであり、グラフィックスコントローラを内蔵する。このディスプレイコントローラ213には、ディスプレイ220が接続されている。ディスプレイ220は、コンピュータ210による出力画像を表示する表示装置であり、例えば、LCD(Liquid Crystal Display)などにより実現される。   The display controller 213 is an interface for connecting a display and incorporates a graphics controller. A display 220 is connected to the display controller 213. The display 220 is a display device that displays an output image from the computer 210, and is realized by, for example, an LCD (Liquid Crystal Display).

入出力インターフェース214は、周辺装置を接続するためのインターフェースであり、USB(Universal Serial Bus)コントローラなどを内蔵する。この入出力インターフェース214には、例えば、マウス230、キーボード240、記録媒体アクセス装置250、プリンタ260などが接続される。マウス230は、クリックやドラッグなどの操作によるユーザの指示を受け付けるものである。キーボード240は、文字キーや数字キーなどによるユーザの指示を受け付けるものである。記録媒体アクセス装置250は、挿入された記録媒体に対する書込みや読出しを行う装置である。プリンタ260は、コンピュータ210による出力画像を印刷する印刷装置である。   The input / output interface 214 is an interface for connecting peripheral devices, and incorporates a USB (Universal Serial Bus) controller and the like. For example, a mouse 230, a keyboard 240, a recording medium access device 250, a printer 260, and the like are connected to the input / output interface 214. The mouse 230 receives a user instruction by an operation such as click or drag. The keyboard 240 accepts user instructions such as character keys and numeric keys. The recording medium access device 250 is a device that performs writing and reading with respect to an inserted recording medium. The printer 260 is a printing device that prints an output image from the computer 210.

このようなコンピュータシステム200において、記録媒体アクセス装置250に挿入された記録媒体に記録されている画像データを自動的に読み込み、適切な補正がなされた画像をプリンタ260において印刷する印刷システムを想定する。この印刷システムは、プロセッサ211上で動作するプログラムにより実現してもよく、また、ハードウェアにより制御してもよい。   In such a computer system 200, a printing system is assumed in which image data recorded on a recording medium inserted into the recording medium access device 250 is automatically read and an image that has been appropriately corrected is printed by the printer 260. . This printing system may be realized by a program operating on the processor 211 or may be controlled by hardware.

図15は、本発明の実施の形態における印刷システムによる表示例を示す図である。この表示例では、一番外側の枠500は印刷システムによるGUI(Graphical User Interface)表示の範囲を表しており、通常これがディスプレイ220の画面全体に表示される。   FIG. 15 is a diagram showing a display example by the printing system in the embodiment of the present invention. In this display example, the outermost frame 500 represents a GUI (Graphical User Interface) display range by the printing system, and this is usually displayed on the entire screen of the display 220.

枠500の大部分を占める領域は、4×4のクリック可能な小窓510に区切られている。この小窓510は、記録媒体アクセス装置250によって記録媒体から読み出された画像のサムネイルを表示する領域である。記録媒体に記録されている画像の数が16以下とは限らないため、サムネイル表示領域はスクロールバー531と2つのスクロールボタン532および533によってスクロール表示が可能になっている。   The area occupying most of the frame 500 is divided into 4 × 4 clickable small windows 510. The small window 510 is an area for displaying a thumbnail of an image read from the recording medium by the recording medium access device 250. Since the number of images recorded on the recording medium is not necessarily 16 or less, the thumbnail display area can be scroll-displayed by the scroll bar 531 and the two scroll buttons 532 and 533.

サムネイルの周囲に表示されている太枠521および522は、その画像が選択状態にあることをあらわすインジケータである。各サムネイルがクリックされると、その画像の選択または非選択の状態が切り替わる(トグルされる)ようになっている。画面右上隅のプリントボタン550は、クリックされることによって、現在選択状態にある画像の自動補正および印刷が開始されるようになっている。   Thick frames 521 and 522 displayed around the thumbnail are indicators that indicate that the image is in a selected state. When each thumbnail is clicked, the selected or unselected state of the image is switched (toggled). When the print button 550 in the upper right corner of the screen is clicked, automatic correction and printing of the currently selected image is started.

図16は、本発明の実施の形態における印刷システムの処理手順の一例を示す図である。記録媒体アクセス装置250に記録媒体が挿入されると、記録媒体から表示用の画像データが読み出され(ステップS801)、上述のGUI表示画面にサムネイル画像が並べて表示される(ステップS802)。その後、記録媒体アクセス装置250に記録媒体が挿入されている間、以下の処理が繰り返される(ループL896)。   FIG. 16 is a diagram illustrating an example of a processing procedure of the printing system according to the embodiment of the present invention. When the recording medium is inserted into the recording medium access device 250, image data for display is read from the recording medium (step S801), and thumbnail images are displayed side by side on the GUI display screen (step S802). Thereafter, while the recording medium is inserted into the recording medium access device 250, the following processing is repeated (loop L896).

ユーザによる操作入力が受け付けられると(ステップS803)、その操作入力の種類が判別される。もし、操作入力がサムネイルのクリック操作であれば(ステップS804)、該当する画像の現在の状態に応じてその画像の選択または非選択の状態が切り替わる(ステップS805)。すなわち、現在の状態が選択状態であれば選択状態が解除され(ステップS806)、または、現在の状態が選択状態でなければ選択状態に設定され(ステップS807)、今回の操作入力に対する動作を完了する。   When an operation input by the user is accepted (step S803), the type of the operation input is determined. If the operation input is a thumbnail click operation (step S804), the selected or unselected state of the image is switched according to the current state of the corresponding image (step S805). That is, if the current state is the selected state, the selected state is canceled (step S806), or if the current state is not the selected state, the selected state is set (step S807), and the operation for the current operation input is completed. To do.

もし、操作入力がスクロールバー531またはスクロールボタン532および533の操作であった場合には、サムネイル表示領域のスクロール動作を行い、今回の操作入力に対する動作を完了する。   If the operation input is an operation of the scroll bar 531 or the scroll buttons 532 and 533, the thumbnail display area is scrolled to complete the operation for the current operation input.

もし、操作入力がプリントボタン550のクリック操作であった場合には、その時点で選択状態となっている全ての画像を対象画像として明るさ補正処理が施され(ステップS872)、その明るさ補正の施された画像がプリンタ260によって印刷される(ステップS873)。選択状態となっている全ての対象画像について印刷が完了すると(ループL897)、今回の操作入力に対する動作を完了する。   If the operation input is a click operation on the print button 550, brightness correction processing is performed on all the images that are currently selected as target images (step S872), and the brightness correction is performed. The image subjected to is printed by the printer 260 (step S873). When printing is completed for all target images in the selected state (loop L897), the operation for the current operation input is completed.

1回の操作入力に対する動作が完了した時点で、記録媒体アクセス装置250に記録媒体が挿入されているか否かが判定され、挿入されていれば上記処理が繰り返される。一方、1回の操作入力に対する動作が完了した時点で記録媒体が挿入されていないことが判明すると、一連の処理を終了する。   When the operation for one operation input is completed, it is determined whether or not a recording medium is inserted into the recording medium access device 250, and if it is inserted, the above processing is repeated. On the other hand, when it is determined that the recording medium is not inserted at the time when the operation for one operation input is completed, the series of processes is ended.

図17は、本発明の実施の形態におけるコンピュータシステム200の明るさ補正処理の機能構成例を示す図である。この明るさ補正処理は、信号線307乃至309により入力されたRGB画像の画素の赤色成分R、緑色成分Gおよび青色成分Bに明るさ補正を施して信号線337乃至339に出力するものである。この明るさ補正処理は、変換部310と、階調補正処理部320と、逆変換部330と、測光部340と、測光評価部350と、輝度域生成部361と、スプライン発生部362と、トーンカーブメモリ363と、γ_compパラメータメモリ364と、輝度生成部371と、非線形変換部372と、補間部377と、階調圧縮部380と、コントラスト補正部390の機能を備えている。   FIG. 17 is a diagram illustrating a functional configuration example of brightness correction processing of the computer system 200 according to the embodiment of the present invention. In this brightness correction process, brightness correction is performed on the red component R, green component G, and blue component B of the pixels of the RGB image input through the signal lines 307 to 309, and the result is output to the signal lines 337 to 339. . This brightness correction processing includes a conversion unit 310, a gradation correction processing unit 320, an inverse conversion unit 330, a photometry unit 340, a photometry evaluation unit 350, a luminance range generation unit 361, a spline generation unit 362, The tone curve memory 363, the γ_comp parameter memory 364, the luminance generation unit 371, the nonlinear conversion unit 372, the interpolation unit 377, the gradation compression unit 380, and the contrast correction unit 390 are provided.

なお、本発明の実施の形態において説明する図17の明るさ補正処理の構成は、本発明における必須の構成要件ではない。すなわち、先に説明した本発明の実施の形態における測光評価値算出方法に基づいて得られた測光評価値に相当する入力輝度値が中庸な出力輝度に変換されるように明るさ補正を行う明るさ補正処理の機能があれば、本発明を利用した明るさ補正を伴う画像表示が可能となる。図17の構成例以外の構成で該当する明るさ補正処理としては、輝度スケーリング係数を制御する方法、輝度バイアス値を制御する方法、ガンマカーブのべき乗指数を測光評価値で制御する方法、または、それらの組み合わせが考えられる。これらの処理の詳細な内容については説明を省略する。   Note that the configuration of the brightness correction processing of FIG. 17 described in the embodiment of the present invention is not an essential configuration requirement in the present invention. That is, the brightness for which the brightness correction is performed so that the input luminance value corresponding to the photometric evaluation value obtained based on the photometric evaluation value calculation method in the embodiment of the present invention described above is converted into a moderate output luminance. If there is a function of brightness correction processing, image display with brightness correction using the present invention is possible. The brightness correction processing corresponding to the configuration other than the configuration example of FIG. 17 includes a method for controlling the luminance scaling coefficient, a method for controlling the luminance bias value, a method for controlling the power exponent of the gamma curve with the photometric evaluation value, or Combinations of these are possible. Description of the detailed contents of these processes is omitted.

変換部310は、信号線307乃至309により入力されたRGB画像の各成分の画素値を非線形変換するものである。この変換部310は、非線形変換部311乃至313を備えており、それぞれ赤色成分R、緑色成分Gおよび青色成分Bの画素値を非線形変換して、信号線317乃至319に出力する。なお、ここで非線形変換として、例えば対数変換やガンマ補正などを適用することができる。   The conversion unit 310 performs non-linear conversion on pixel values of each component of the RGB image input through the signal lines 307 to 309. The conversion unit 310 includes non-linear conversion units 311 to 313, and performs non-linear conversion on the pixel values of the red component R, the green component G, and the blue component B, respectively, and outputs them to the signal lines 317 to 319. Here, for example, logarithmic transformation or gamma correction can be applied as the nonlinear transformation.

階調補正処理部320は、信号線317乃至319により入力された画素値(非線形変換されたRGB画像の画素値)の階調を補正(変換)するものである。この階調補正処理部320は、階調補正部321乃至323を備えており、それぞれ赤色成分R、緑色成分Gおよび青色成分Bの画素値の階調を補正して、信号線327乃至329に出力する。なお、この階調補正処理部320において用いられる、非線形変換された輝度値(信号線375)およびコントラスト補正された輝度値(信号線399)については後述する。   The gradation correction processing unit 320 corrects (converts) the gradation of pixel values (pixel values of RGB images subjected to nonlinear conversion) input through the signal lines 317 to 319. The gradation correction processing unit 320 includes gradation correction units 321 to 323, and corrects the gradations of the pixel values of the red component R, the green component G, and the blue component B, respectively, to the signal lines 327 to 329. Output. Note that the non-linearly converted luminance value (signal line 375) and the contrast-corrected luminance value (signal line 399) used in the gradation correction processing unit 320 will be described later.

逆変換部330は、信号線317乃至319により入力された画素値(階調補正されたRGB画像の画素値)を非線形逆変換するものである。この逆変換部330は、非線形逆変換部331乃至333を備えており、それぞれ赤色成分R、緑色成分Gおよび青色成分Bの画素値を非線形逆変換して、信号線337乃至339に出力する。   The inverse conversion unit 330 performs nonlinear inverse conversion on the pixel values (pixel values of the RGB image subjected to gradation correction) input through the signal lines 317 to 319. The inverse transform unit 330 includes nonlinear inverse transform units 331 to 333, which nonlinearly transform the pixel values of the red component R, the green component G, and the blue component B, respectively, and output them to the signal lines 337 to 339.

測光部340は、図2により説明した測光部140と同様のものであり、信号線307乃至309により入力されたRGB画像の各成分の画素値について明るさの計測結果(すなわち、ブロック平均輝度画像)を信号線349に出力するものである。   The photometry unit 340 is the same as the photometry unit 140 described with reference to FIG. 2, and brightness measurement results (that is, block average luminance images) for the pixel values of each component of the RGB image input through the signal lines 307 to 309. ) To the signal line 349.

測光評価部350は、図4により説明した測光評価部150と同様のものであり、信号線349を介して測光部340から供給された計測結果に基づいて、その画像信号の明るさを評価した測光評価値を生成して信号線359に出力するものである。   The photometric evaluation unit 350 is the same as the photometric evaluation unit 150 described with reference to FIG. 4, and evaluated the brightness of the image signal based on the measurement result supplied from the photometric unit 340 via the signal line 349. A photometric evaluation value is generated and output to the signal line 359.

輝度域生成部361は、信号線349を介して測光部340から供給されたブロック平均輝度画像の輝度分布において、全体の画素数に占める所定の境界値以下の輝度の画素数の比率がほぼ所定の値(例えば、0.5)になる境界値である暗側裾野値Ldark (nl)、および、全体の画素数に占める所定の境界値以上の輝度の画素数の比率がほぼ所定の値(例えば、0.5)になる境界値である明側裾野値Lbright (nl)を算出する。なお、各値の右上に付された「(nl)」は、非線形変換された値であることを示すものである。 In the luminance distribution of the block average luminance image supplied from the photometry unit 340 via the signal line 349, the luminance region generation unit 361 has a ratio of the number of pixels with luminance equal to or less than a predetermined boundary value in the total number of pixels. The ratio of the number of pixels with a luminance equal to or higher than a predetermined boundary value to the total number of pixels and the dark side base value L dark (nl) which is a boundary value that becomes a value of 0.5 (for example, 0.5) is almost a predetermined value The bright side base value L bright (nl) , which is a boundary value that becomes (for example, 0.5), is calculated. Note that “(nl)” added to the upper right of each value indicates that the value has been nonlinearly transformed.

なお、測光評価部350および輝度域生成部361においては、輝度値の雑音レベルおよび飽和レベルを(図示しない)内部のメモリから読み出して、雑音レベル以下の輝度値および飽和レベル以上の輝度値を除去するようにしてもよい。   Note that the photometric evaluation unit 350 and the luminance range generation unit 361 read out the noise level and saturation level of the luminance value from an internal memory (not shown), and remove the luminance value below the noise level and the luminance value above the saturation level. You may make it do.

スプライン発生部362は、測光評価部350から信号線359によって供給された測光評価値を平均輝度値Laverage (nl)として扱い、さらに輝度域生成部361から供給された暗側裾野値Ldark (nl)および明側裾野値Lbright (nl)を用いて、スプライン曲線を発生するものである。このスプライン曲線は階調圧縮のためのトーンカーブ(変換曲線)を表している。トーンカーブは、入力された画像が適切な明るさで再現されるよう画像の輝度分布に基づいて算出されるものである。このトーンカーブを表すルックアップテーブルはトーンカーブメモリ363に保持される。また、トーンカーブの形状(傾き)を表すγ_compパラメータがγ_compパラメータメモリ364に保持される。 The spline generation unit 362 treats the photometric evaluation value supplied from the photometric evaluation unit 350 through the signal line 359 as the average luminance value L average (nl) , and further, the dark side skirt value L dark ( supplied from the luminance region generation unit 361 ). The spline curve is generated using nl) and the bright side base value L bright (nl) . This spline curve represents a tone curve (conversion curve) for tone compression. The tone curve is calculated based on the luminance distribution of the image so that the input image is reproduced with appropriate brightness. A look-up table representing the tone curve is held in the tone curve memory 363. In addition, a γ_comp parameter representing the shape (inclination) of the tone curve is held in the γ_comp parameter memory 364.

輝度生成部371は、信号線307乃至309により入力されたRGB画像の各成分の画素値から、その画素位置に対応する輝度値Lを算出するものである。非線形変換部372は、輝度生成部371により生成された輝度値を非線形変換するものである。この非線形変換部372によって非線形変換された輝度値L(nl)からなる画像は信号線375を介して補間部377、階調圧縮部380および階調補正処理部320に供給される。 The luminance generation unit 371 calculates a luminance value L corresponding to the pixel position from the pixel value of each component of the RGB image input through the signal lines 307 to 309. The non-linear conversion unit 372 performs non-linear conversion on the luminance value generated by the luminance generation unit 371. An image composed of the luminance value L (nl) nonlinearly transformed by the nonlinear transformation unit 372 is supplied to the interpolation unit 377, the gradation compression unit 380, and the gradation correction processing unit 320 via the signal line 375.

補間部377は、測光部340から供給されたブロック平均輝度画像を補間して、信号線375を介して非線形変換部372から供給された画像と同じ画素値になるように拡大するものである。この拡大された画像を構成する画素の輝度値は、信号線379を介して大局輝度値Ll (nl)として階調圧縮部380に供給される。すなわち、この大局輝度値は、非線形変換部372から供給された画像の低周波成分を有することになる。 The interpolating unit 377 interpolates the block average luminance image supplied from the photometric unit 340 and enlarges it to have the same pixel value as the image supplied from the non-linear converting unit 372 via the signal line 375. The luminance value of the pixels constituting the enlarged image is supplied to the gradation compression unit 380 as a general luminance value L l (nl) via the signal line 379. That is, this overall luminance value has the low frequency component of the image supplied from the nonlinear conversion unit 372.

階調圧縮部380は、輝度値L(nl)および大局輝度値Ll (nl)の階調を圧縮するものである。この階調圧縮部380は、2つのマッピング部381および382を備えている。マッピング部381は、トーンカーブメモリ363から読み出されたトーンカーブに基づいて、信号線375を介して供給された輝度値L(nl)の階調を圧縮して、圧縮輝度値Lc (nl)を生成するものである。マッピング部382は、トーンカーブメモリ363から読み出されたトーンカーブに基づいて、信号線379を介して供給された大局輝度値Ll (nl)の階調を圧縮して、圧縮大局輝度値Lcl (nl)を生成するものである。このようなトーンカーブに基づいた階調圧縮はトーンカーブ補正と呼ばれる。 The gradation compression unit 380 compresses the gradation of the luminance value L (nl) and the overall luminance value L l (nl) . The tone compression unit 380 includes two mapping units 381 and 382. The mapping unit 381 compresses the gradation of the luminance value L (nl) supplied via the signal line 375 based on the tone curve read out from the tone curve memory 363, and compresses the compressed luminance value L c (nl ) . The mapping unit 382 compresses the gradation of the overall luminance value L l (nl) supplied via the signal line 379 based on the tone curve read from the tone curve memory 363, and compresses the compressed overall luminance value L cl (nl) is generated. Such tone compression based on the tone curve is called tone curve correction.

コントラスト補正部390は、γ_compパラメータメモリ364に保持されたγ_compパラメータ、および、マッピング部382から供給された圧縮大局輝度値Lcl (nl)に基づいて、マッピング部381から供給された圧縮輝度値Lc (nl)からなる画像のコントラストを補正して、信号線399を介して輝度値Lu (nl)として出力するものである。 Based on the γ_comp parameter stored in the γ_comp parameter memory 364 and the compressed overall luminance value L cl (nl) supplied from the mapping unit 382, the contrast correction unit 390 compresses the compressed luminance value L supplied from the mapping unit 381. The contrast of the image composed of c (nl) is corrected and output as a luminance value L u (nl) via the signal line 399.

具体的には、コントラスト補正部390では、階調が圧縮された圧縮輝度値Lc (nl)および圧縮大局輝度値Lcl (nl)、および、ゲイン値gに基づいて、以下の式により、コントラスト補正された輝度値Lu (nl)が算出される。
u (nl)=g・(Lc (nl)−Lcl (nl))+Lc (nl)
但し、ゲイン値gは、γ_compパラメータに依存する値である。
Specifically, in the contrast correction unit 390, based on the compressed luminance value L c (nl) and the compressed overall luminance value L cl (nl) in which the gradation is compressed, and the gain value g, A contrast-corrected luminance value L u (nl) is calculated.
L u (nl) = g · (L c (nl) −L cl (nl) ) + L c (nl)
However, the gain value g is a value depending on the γ_comp parameter.

なお、輝度値(Lc (nl)−Lcl (nl))からなる画像は、輝度値Lc (nl)からなる画像から、輝度値Lc (nl)からなる画像のごく低周波域の成分からなる大局輝度画像を差し引いたものである。従って、輝度値Lu (nl)からなる画像は、輝度値Lc (nl)からなる画像のごく低周波域を除く周波数成分がゲイン値gにより強調された画像となる。 Note that the image formed of the luminance value (L c (nl) -L cl (nl)) from the image consisting of brightness value L c (nl), the very low frequency region of an image made up of the brightness value L c (nl) This is a subtraction of the overall luminance image made up of components. Therefore, the image composed of the luminance value L u (nl) is an image in which the frequency component excluding the extremely low frequency range of the image composed of the luminance value L c (nl) is emphasized by the gain value g.

このコントラスト補正部390によってコントラストの補正が行われた輝度値Lu (nl)は、信号線399を介して階調補正部321乃至323に供給される。これにより、階調補正処理部320は、以下の式によって、信号線317乃至319から供給された画素値R(nl)、G(nl)、または、B(nl)の階調を補正して、画素値Ru (nl)、Gu (nl)、または、Bu (nl)を算出する。
u (nl)=chromagain・(R(nl)−L(nl))+Lu (nl)
u (nl)=chromagain・(G(nl)−L(nl))+Lu (nl)
u (nl)=chromagain・(B(nl)−L(nl))+Lu (nl)
但し、chromagainは、R、GおよびBの各成分の彩度を調節するための所定の値の係数である。
The luminance value L u (nl) subjected to contrast correction by the contrast correction unit 390 is supplied to the gradation correction units 321 to 323 via the signal line 399. Accordingly, the gradation correction processing unit 320 corrects the gradation of the pixel values R (nl) , G (nl) , or B (nl) supplied from the signal lines 317 to 319 by the following formula. The pixel value R u (nl) , G u (nl) or B u (nl) is calculated.
R u (nl) = chromagain · (R (nl) −L (nl) ) + L u (nl)
G u (nl) = chromagain · (G (nl) −L (nl) ) + L u (nl)
B u (nl) = chromagain · (B (nl) −L (nl) ) + L u (nl)
However, chromagain is a coefficient of a predetermined value for adjusting the saturation of each component of R, G, and B.

すなわち、画素値Ru (nl)、Gu (nl)、または、Bu (nl)は、それぞれ画素値R(nl)、G(nl)、または、B(nl)からなる画像と階調変換前の輝度値L(nl)からなる画像との差分である差分画像の各画素値にchromagainを乗じ、さらに、コントラスト補正後の輝度値Lu (nl)からなる画像を加えた画像の画素値である。これにより、非線形変換されたRGB値に階調変換後の輝度値が反映される。 That is, the pixel value R u (nl) , G u (nl) , or B u (nl) is an image and gradation composed of the pixel value R (nl) , G (nl) , or B (nl) , respectively. A pixel of an image obtained by multiplying each pixel value of a difference image, which is a difference from an image composed of a luminance value L (nl) before conversion, by chromagain and adding an image composed of a luminance value L u (nl) after contrast correction Value. Thereby, the luminance value after gradation conversion is reflected in the RGB value subjected to nonlinear conversion.

このようにして生成された画素値Ru (nl)、Gu (nl)、および、Bu (nl)は、それぞれ非線形逆変換部331乃至333において非線形逆変換され、信号線337乃至339に画素値Ru、Gu、または、Buが出力される。 The pixel values R u (nl) , G u (nl) , and B u (nl) generated in this way are nonlinearly inversely transformed by the nonlinear inverse transformers 331 to 333, respectively, and are transmitted to the signal lines 337 to 339, respectively. Pixel values R u , G u , or B u are output.

すなわち、図17の例による明るさ補正処理は、入力画像の輝度を調べて算出したトーンカーブによるトーンカーブ補正処理と、それにより生じたコントラストの劣化を回復させるコントラスト補正処理とを組み合わせたものになる。   That is, the brightness correction process according to the example of FIG. 17 is a combination of the tone curve correction process based on the tone curve calculated by examining the brightness of the input image and the contrast correction process for recovering the deterioration of contrast caused thereby. Become.

図18は、本発明の実施の形態によるスプライン発生部362によって生成されるトーンカーブの一例を示す図である。このグラフの横軸方向は階調補正する前の入力輝度の非線形変換された値(例えば、対数値)を表し、縦軸方向はトーンカーブCLによる階調補正後の出力輝度の非線形変換された値(例えば、対数値)を表している。   FIG. 18 is a diagram showing an example of a tone curve generated by the spline generator 362 according to the embodiment of the present invention. The horizontal axis direction of this graph represents a value (for example, logarithmic value) of the input luminance before gradation correction, and the vertical axis direction is a nonlinear conversion of the output luminance after gradation correction by the tone curve CL. It represents a value (for example, a logarithmic value).

スプライン発生部362において、9つのコントロールポイントP1乃至P9が設定される。そして、このスプライン発生部362では、コントロールポイントP1乃至P9の各ポイント間を補間する3次スプライン曲線上の座標が算出されて、トーンカーブCLのルックアップテーブルが生成される。   In the spline generation unit 362, nine control points P1 to P9 are set. The spline generator 362 calculates coordinates on a cubic spline curve that interpolates between the control points P1 to P9, and generates a look-up table for the tone curve CL.

コントロールポイントP1は、入力輝度が所定の最小レベルとなり、出力輝度が所定の最小レベルLbase (nl)となるポイントに設定される。コントロールポイントP2は、入力輝度がノイズレベルであるとみなすことができる輝度である所定のノイズレベルLnoise (nl)となり、出力輝度が最小レベルLbase (nl)となるポイントに設定される。コントロールポイントP3は、入力輝度がノイズレベルLnoise (nl)の2倍の輝度値となり、出力輝度が最小レベルLbase (nl)となるポイントに設定される。 The control point P1 is set to a point where the input luminance is a predetermined minimum level and the output luminance is a predetermined minimum level L base (nl) . The control point P2 has a predetermined noise level L noise (nl) that is a luminance at which the input luminance can be regarded as a noise level, and is set to a point at which the output luminance becomes the minimum level L base (nl) . The control point P3 is set to a point where the input luminance becomes a luminance value twice the noise level L noise (nl) and the output luminance becomes the minimum level L base (nl) .

コントロールポイントP4は、入力輝度が暗側裾野値Ldark (nl)となり、出力輝度がほぼ黒レベルの輝度値である輝度値Lankle (nl)となるポイントに設定される。コントロールポイントP5は、入力輝度が暗側裾野値Ldark (nl)の2倍の輝度値となり、出力輝度が輝度値Lankle (nl)の2倍の輝度値となるポイントに設定される。コントロールポイントP6は、入力輝度が入力輝度の平均レベル(平均輝度値)Laverage (nl)となり、出力輝度が出力輝度の輝度範囲における所定のほぼ中間の中間輝度レベルLmid (nl)となるポイントに設定される。コントロールポイントP7は、入力輝度が明側裾野値Lbright (nl)の2分の1の輝度値となり、出力輝度がほぼ白レベルの輝度値である輝度値Lshoulder (nl)の2分の1の輝度値となるポイントに設定される。コントロールポイントP8は、入力輝度が明側裾野値Lbright (nl)となり、出力輝度が輝度値Lshoulder (nl)となるポイントに設定される。コントロールポイントP9は、入力輝度が所定の入力輝度の最大値となり、出力輝度が所定の出力輝度の最大値となるポイントに設定される。 The control point P4 is set to a point at which the input luminance becomes the dark side base value L dark (nl) and the output luminance becomes the luminance value Lankle (nl) which is a luminance value of a substantially black level. The control point P5 is set to a point where the input luminance is a luminance value twice as large as the dark side base value L dark (nl) and the output luminance is a luminance value twice as large as the luminance value Lankle (nl) . The control point P6 is a point at which the input luminance is an average level (average luminance value) L average (nl) of the input luminance and the output luminance is a predetermined almost intermediate intermediate luminance level L mid (nl) in the luminance range of the output luminance. Set to In the control point P7, the input luminance is a half luminance value of the bright side base value L bright (nl) , and the output luminance is a half luminance value L shoulder (nl) which is a luminance value of almost white level. It is set to the point that becomes the luminance value. The control point P8 is set to a point where the input luminance becomes the bright side base value L bright (nl) and the output luminance becomes the luminance value L shoulder (nl) . The control point P9 is set to a point where the input luminance becomes the maximum value of the predetermined input luminance and the output luminance becomes the maximum value of the predetermined output luminance.

すなわち、コントロールポイントP1、P2、P3およびP9については、入力画像と想定する出力デバイスのノイズレベル、飽和レベル、階調特性などによりあらかじめ固定値を与えてあり、入力画像の輝度分布によって変化することはない。コントロールポイントP4、P6、P8の縦軸方向の座標に関しては同様に固定であるが、横軸方向の座標は入力画像の輝度分布によって算出される。また、コントロールポイントP5およびP7の位置は、コントロールポイントP4、P6、P8の位置が入力画像により決定されると、従属的に決定されるものである。なお、このコントロールポイントP5およびP7を接続する線分の傾きが、γ_compパラメータメモリ364に保持されるγ_compパラメータである。   That is, the control points P1, P2, P3, and P9 are given fixed values in advance according to the noise level, saturation level, gradation characteristics, and the like of the output device assumed to be the input image, and change according to the luminance distribution of the input image. There is no. The coordinates of the control points P4, P6, and P8 in the vertical axis direction are similarly fixed, but the coordinates in the horizontal axis direction are calculated from the luminance distribution of the input image. Further, the positions of the control points P5 and P7 are subordinately determined when the positions of the control points P4, P6, and P8 are determined by the input image. The slope of the line segment connecting the control points P5 and P7 is the γ_comp parameter held in the γ_comp parameter memory 364.

コントロールポイントP6は出力画像の中庸な明るさにマップされるため、再現される画像の明るさを決定する上で一番重要なコントロールポイントである。そこで、本発明の実施の形態では、測光評価部350によって生成された測光評価値をこのコントロールポイントP6の横軸方向の座標(平均輝度値)として用いることによって、より適切な明るさで画像が再現されるようにする。   Since the control point P6 is mapped to the moderate brightness of the output image, it is the most important control point in determining the brightness of the reproduced image. Therefore, in the embodiment of the present invention, the photometric evaluation value generated by the photometric evaluation unit 350 is used as the coordinate (average luminance value) in the horizontal axis direction of the control point P6, so that an image can be obtained with more appropriate brightness. To be reproduced.

図19および20は、本発明の実施の形態における印刷システムの明るさ補正処理の手順例を示す図である。この明るさ補正処理では、入力画像の全画像を2回スキャンする2パス構成で処理している。第1番目のパスは、測光評価を利用したブロック平均画像の生成およびトーンカーブの算出を行うものであり、図19に示される。第2番目のパスは、ブロック平均画像およびトーンカーブに基づいて全画素の階調補正処理を行うものであり、図20に示される。   19 and 20 are diagrams illustrating an example of the procedure of the brightness correction process of the printing system according to the embodiment of the present invention. In this brightness correction processing, the entire input image is processed in a two-pass configuration that scans twice. The first pass performs block average image generation and tone curve calculation using photometric evaluation, and is shown in FIG. The second pass performs gradation correction processing for all pixels based on the block average image and the tone curve, and is shown in FIG.

この明るさ補正処理では、まず測光部340によって測光処理として対象画像の明るさの計測が行われ、ブロック平均輝度画像が生成される(ステップS810)。この測光処理における手順は図8において説明した測光処理(ステップS910)と同様である。   In this brightness correction process, first, the brightness of the target image is measured by the photometry unit 340 as a photometry process, and a block average luminance image is generated (step S810). The procedure in this photometry process is the same as the photometry process (step S910) described in FIG.

生成されたブロック平均輝度画像に基づき、測光評価部350によって測光評価処理として測光評価値が生成される(ステップS820)。この測光評価処理における手順は図9において説明した測光評価処理(ステップS920)と同様である。   Based on the generated block average luminance image, a photometric evaluation value is generated by the photometric evaluation unit 350 as a photometric evaluation process (step S820). The procedure in this photometric evaluation process is the same as the photometric evaluation process (step S920) described in FIG.

また、輝度域生成部361では、ブロック平均輝度画像の輝度分布から輝度ヒストグラムの明側と暗側の裾野値が生成される(ステップS874)。   In addition, the luminance range generation unit 361 generates the base values on the bright side and the dark side of the luminance histogram from the luminance distribution of the block average luminance image (step S874).

そして、スプライン発生部362において、測光評価部350から供給された測光評価値を平均輝度値Laverage (nl)とし、輝度域生成部361から供給された明側と暗側の裾野値をそれぞれ明側裾野値Lbright (nl)および暗側裾野値Ldark (nl)として、トーンカーブが生成される(ステップS875)。生成されたトーンカーブを表すルックアップテーブルは、トーンカーブメモリ363に保持される。また、トーンカーブのコントロールポイントP5およびP7を接続する線分の傾きがγ_compパラメータとして生成される(ステップS876)。このγ_compパラメータは、γ_compパラメータメモリ364に保持される。 Then, in the spline generation unit 362, the photometric evaluation value supplied from the photometric evaluation unit 350 is set as the average luminance value L average (nl), and the bright side and dark side base values supplied from the luminance range generation unit 361 are set to be bright. A tone curve is generated as the side base value L bright (nl) and the dark side base value L dark (nl) (step S875). A look-up table representing the generated tone curve is held in the tone curve memory 363. Further, the slope of the line segment connecting the tone curve control points P5 and P7 is generated as the γ_comp parameter (step S876). The γ_comp parameter is held in the γ_comp parameter memory 364.

次に、入力された対象画像の各画素について以下の処理が行われる(ループL898)。ここで、対象画像の各画素を2次元座標(p,q)により表す。但し、pおよびqはともに0以上の整数である。   Next, the following processing is performed for each pixel of the input target image (loop L898). Here, each pixel of the target image is represented by two-dimensional coordinates (p, q). However, p and q are both integers of 0 or more.

まず、対象画像の該当する画素(p,q)のRGB値が入力されると(ステップS880)、輝度生成部371において画素(p,q)の輝度値Lが生成される(ステップS881)。この輝度値Lは、非線形変換部372において非線形変換されて輝度値L(nl)として出力される(ステップS882)。 First, when the RGB value of the pixel (p, q) corresponding to the target image is input (step S880), the luminance generation unit 371 generates the luminance value L of the pixel (p, q) (step S881). The luminance value L is nonlinearly converted by the nonlinear conversion unit 372 and output as the luminance value L (nl) (step S882).

そして、第1のパスで生成されたブロック平均輝度画像の補間処理が、非線形変換された輝度値L(nl)に基づいて補間部377によって行われ、画素(p,q)に対応する大局輝度値Ll (nl)として生成される(ステップS883)。 Then, the interpolation processing of the block average luminance image generated in the first pass is performed by the interpolation unit 377 based on the non-linearly converted luminance value L (nl) , and the overall luminance corresponding to the pixel (p, q). A value L l (nl) is generated (step S883).

このようにして生成された画素(p,q)の輝度値L(nl)および大局輝度値Ll (nl)は、それぞれマッピング部381または382によって、トーンカーブに基づいたトーンカーブ補正(階調圧縮)が行われる(ステップS884)。その結果、圧縮輝度値Lc (nl)および圧縮大局輝度値Lcl (nl)が生成される。コントラスト補正部390では、圧縮大局輝度値Lcl (nl)およびγ_compパラメータに基づいて、圧縮輝度値Lc (nl)がコントラスト補正される(ステップS885)。このコントラスト補正後の輝度値Lu (nl)は、階調補正処理に用いられる。 The luminance value L (nl) and the overall luminance value L l (nl) of the pixel (p, q) generated in this way are corrected by the tone curve correction (gradation) based on the tone curve by the mapping unit 381 or 382, respectively. Compression) is performed (step S884). As a result, a compressed luminance value L c (nl) and a compressed global luminance value L cl (nl) are generated. The contrast correction unit 390 corrects the contrast of the compressed luminance value L c (nl) based on the compressed overall luminance value L cl (nl) and the γ_comp parameter (step S885). The luminance value L u (nl) after the contrast correction is used for the gradation correction process.

一方、対象画像の該当する画素(p,q)のRGB値は、非線形変換部311乃至313によって非線形変換される(ステップS886)。非線形変換されたRGB値(R(nl)、G(nl)およびB(nl))は、非線形変換された輝度値L(nl)およびコントラスト補正後の輝度値Lu (nl)に基づいて、階調補正部321乃至323によって階調補正される(ステップS886)。階調補正されたRGB値(Ru (nl)、Gu (nl)およびBu (nl))は、非線形逆変換部331乃至333によって非線形逆変換される(ステップS888)。これにより、非線形逆変換されたRGB値(Ru、GuおよびBu)が出力される(ステップS889)。 On the other hand, the RGB values of the corresponding pixel (p, q) of the target image are nonlinearly transformed by the nonlinear transformation units 311 to 313 (step S886). The non-linearly transformed RGB values (R (nl) , G (nl) and B (nl) ) are based on the non-linearly transformed luminance value L (nl) and the luminance value L u (nl) after contrast correction. Gradation correction is performed by the gradation correction units 321 to 323 (step S886). The RGB values (R u (nl) , G u (nl), and B u (nl) ) subjected to gradation correction are nonlinearly inversely transformed by the nonlinear inverse transform units 331 to 333 (step S888). Thereby, the RGB values (R u , G u and B u ) subjected to nonlinear inverse transformation are output (step S889).

これらの処理が全ての画素について行われると、対象画像に関する明るさ補正処理は終了する。   When these processes are performed for all pixels, the brightness correction process for the target image ends.

このように、本発明は、デジタルスチルカメラなどの撮像装置における明るさ補正だけでなく、コンピュータシステムにおける印刷の際の明るさ補正などにも広く適用することができる。   Thus, the present invention can be widely applied not only to brightness correction in an imaging apparatus such as a digital still camera but also to brightness correction during printing in a computer system.

なお、本発明の実施の形態は本発明を具現化するための一例を示したものであり、以下に示すように特許請求の範囲における発明特定事項とそれぞれ対応関係を有するが、これに限定されるものではなく本発明の要旨を逸脱しない範囲において種々の変形を施すことができる。   The embodiment of the present invention is an example for embodying the present invention and has a corresponding relationship with the invention-specific matters in the claims as shown below, but is not limited thereto. However, various modifications can be made without departing from the scope of the present invention.

すなわち、請求項1において、コントラスト領域検出手段は例えばコントラスト領域検出部151に対応する。また、輝度分配手段は例えば輝度分配部156に対応する。また、境界輝度値生成手段は例えば境界輝度値生成部157に対応する。また、明るさ補正手段は、例えばスプライン発生部362、補間部377、および、コントラスト補正部390などを含み得る。また、変換曲線算出手段は例えばスプライン発生部362に対応する。また、大局輝度算出手段は例えば補間部377に対応する。また、階調圧縮手段は例えば階調圧縮部380に対応する。また、コントラスト補正手段は例えばコントラスト補正部390に対応する。   That is, in claim 1, the contrast area detecting means corresponds to the contrast area detecting unit 151, for example. The luminance distribution unit corresponds to the luminance distribution unit 156, for example. The boundary luminance value generation unit corresponds to the boundary luminance value generation unit 157, for example. Further, the brightness correction unit may include, for example, a spline generation unit 362, an interpolation unit 377, a contrast correction unit 390, and the like. The conversion curve calculation means corresponds to the spline generation unit 362, for example. The overall luminance calculation means corresponds to the interpolation unit 377, for example. A gradation compression unit corresponds to the gradation compression unit 380, for example. A contrast correction unit corresponds to the contrast correction unit 390, for example.

また、請求項4および5において、コントラスト領域検出手順は例えばステップS930に対応する。また、輝度分配手順は例えばステップS950に対応する。また、境界輝度値生成手順は例えばステップS960に対応する。また、明るさ補正手順は、例えばステップS875およびS883乃至S885を含み得る。また、変換曲線算出手順は例えばステップS875に対応する。また、大局輝度算出手順は例えばステップS883に対応する。また、階調圧縮手順は例えばステップS884に対応する。また、コントラスト補正手順は例えばステップS885に対応する。   Further, in claims 4 and 5, the contrast region detection procedure corresponds to, for example, step S930. The luminance distribution procedure corresponds to, for example, step S950. The boundary luminance value generation procedure corresponds to, for example, step S960. The brightness correction procedure can include, for example, steps S875 and S883 to S885. The conversion curve calculation procedure corresponds to, for example, step S875. The overall luminance calculation procedure corresponds to step S883, for example. The gradation compression procedure corresponds to step S884, for example. The contrast correction procedure corresponds to step S885, for example.

なお、本発明の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。   The processing procedure described in the embodiment of the present invention may be regarded as a method having a series of these procedures, and a program for causing a computer to execute these series of procedures or a recording medium storing the program May be taken as

本発明の実施の形態におけるデジタルスチルカメラ100の一構成例を示す図である。It is a figure which shows one structural example of the digital still camera 100 in embodiment of this invention. 本発明の実施の形態における測光部140の一構成例を示す図である。It is a figure which shows the example of 1 structure of the photometry part 140 in embodiment of this invention. 本発明の実施の形態におけるブロック平均画像の生成例を示す図である。It is a figure which shows the example of a production | generation of the block average image in embodiment of this invention. 本発明の実施の形態における測光評価部150の一構成例を示す図である。It is a figure which shows the example of 1 structure of the photometry evaluation part 150 in embodiment of this invention. 本発明の実施の形態における境界輝度値の生成例を示す図である。It is a figure which shows the example of a production | generation of the boundary luminance value in embodiment of this invention. 本発明の実施の形態における明側輝度群と暗側輝度群の生成例を示す図である。It is a figure which shows the example of a production | generation of the bright side luminance group and dark side luminance group in embodiment of this invention. 本発明の実施の形態におけるデジタルスチルカメラ100の制御手順の一例を示す図である。It is a figure which shows an example of the control procedure of the digital still camera 100 in embodiment of this invention. 本発明の実施の形態における測光処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the photometry process in embodiment of this invention. 本発明の実施の形態における測光評価処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the photometry evaluation process in embodiment of this invention. 本発明の実施の形態におけるコントラスト領域検出処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the contrast area | region detection process in embodiment of this invention. 本発明の実施の形態における測光評価値生成処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the photometric evaluation value production | generation process in embodiment of this invention. 本発明の実施の形態における輝度分配処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the brightness | luminance distribution process in embodiment of this invention. 本発明の実施の形態における境界輝度値生成処理の処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the boundary luminance value production | generation process in embodiment of this invention. 本発明の実施の形態におけるコンピュータシステム200の一構成例を示す図である。It is a figure which shows the example of 1 structure of the computer system 200 in embodiment of this invention. 本発明の実施の形態における印刷システムによる表示例を示す図である。It is a figure which shows the example of a display by the printing system in embodiment of this invention. 本発明の実施の形態における印刷システムの処理手順の一例を示す図である。It is a figure which shows an example of the process sequence of the printing system in embodiment of this invention. 本発明の実施の形態におけるコンピュータシステム200の明るさ補正処理の機能構成例を示す図である。It is a figure which shows the function structural example of the brightness correction process of the computer system 200 in embodiment of this invention. 本発明の実施の形態によるスプライン発生部362によって生成されるトーンカーブの一例を示す図である。It is a figure which shows an example of the tone curve produced | generated by the spline generation part 362 by embodiment of this invention. 本発明の実施の形態における印刷システムの明るさ補正処理の前半の手順例を示す図である。It is a figure which shows the example of a procedure of the first half of the brightness correction process of the printing system in embodiment of this invention. 本発明の実施の形態における印刷システムの明るさ補正処理の後半の手順例を示す図である。It is a figure which shows the example of a procedure of the latter half of the brightness correction process of the printing system in embodiment of this invention.

符号の説明Explanation of symbols

100 デジタルスチルカメラ
111 レンズ
112 絞り
113 センサ
114 アンプ
122 ドライバ
123 タイミング生成部
130 カメラ信号処理部
140、340 測光部
141 輝度算出部
142 非線形変換部
143 ブロック平均生成部
144 ブロック平均輝度画像メモリ
150、350 測光評価部
151 コントラスト領域検出部
152 局所コントラスト算出部
153 閾値判定部
154 コントラスト領域情報メモリ
155 測光評価値生成部
156 輝度分配部
157 境界輝度値生成部
160 カメラ動作パラメータ
170 基準値設定部
180 差分値算出部
190 制御部
191 明側輝度群メモリ
192 暗側輝度群メモリ
200 コンピュータシステム
210 コンピュータ
211 プロセッサ
212 メモリ
213 ディスプレイコントローラ
214 入出力インターフェース
220 ディスプレイ
230 マウス
240 キーボード
250 記録媒体アクセス装置
260 プリンタ
310 変換部
311〜313 非線形変換部
320 階調補正処理部
321〜323 階調補正部
330 逆変換部
331〜333 非線形逆変換部
361 輝度域生成部
362 スプライン発生部
363 トーンカーブメモリ
364 γ_compパラメータメモリ
371 輝度生成部
372 非線形変換部
377 補間部
380 階調圧縮部
381、382 マッピング部
390 コントラスト補正部
DESCRIPTION OF SYMBOLS 100 Digital still camera 111 Lens 112 Aperture 113 Sensor 114 Amplifier 122 Driver 123 Timing generation part 130 Camera signal processing part 140,340 Photometry part 141 Luminance calculation part 142 Nonlinear conversion part 143 Block average production | generation part 144 Block average luminance image memory 150,350 Photometric evaluation unit 151 Contrast region detection unit 152 Local contrast calculation unit 153 Threshold determination unit 154 Contrast region information memory 155 Photometric evaluation value generation unit 156 Luminance distribution unit 157 Boundary luminance value generation unit 160 Camera operation parameter 170 Reference value setting unit 180 Difference value Calculation unit 190 Control unit 191 Bright side luminance group memory 192 Dark side luminance group memory 200 Computer system 210 Computer 211 Processor 212 Memory 213 Display controller 214 Input / output interface 220 Display 230 Mouse 240 Keyboard 250 Recording medium access device 260 Printer 310 Conversion unit 311 to 313 Nonlinear conversion unit 320 Gradation correction processing unit 321 to 323 Gradation correction unit 330 Inverse conversion unit 331 to 333 Nonlinear inverse Conversion unit 361 Luminance region generation unit 362 Spline generation unit 363 Tone curve memory 364 γ_comp parameter memory 371 Luminance generation unit 372 Non-linear conversion unit 377 Interpolation unit 380 Tone compression unit 381, 382 Mapping unit 390 Contrast correction unit

Claims (5)

複数の画素からなる入力画像信号における部分領域毎に前記入力画像信号の輝度である入力輝度に基づくコントラストを局所コントラストとして算出して、当該局所コントラストが所定値より大きい部分領域をコントラスト領域として検出するコントラスト領域検出手段と、
前記コントラスト領域において前記入力輝度の明るい明側輝度と前記入力輝度の暗い暗側輝度に分配する輝度分配手段と、
前記明側輝度および暗側輝度の分布に基づいて前記明側輝度および暗側輝度の境界輝度値を生成する境界輝度値生成手段と、
前記境界輝度値に相当する前記入力輝度値が中庸な輝度値として出力されるように明るさ補正を行う明るさ補正手段と
を具備し、
前記明るさ補正手段は、
前記境界輝度値および前記入力輝度の分布に基づいて輝度の階調の圧縮に用いる変換曲線を算出する変換曲線算出手段と、
前記入力画像の低周波成分からなる大局輝度画像の輝度である大局輝度を算出する大局輝度算出手段と、
前記変換曲線に基づいて前記入力輝度の階調および前記大局輝度の階調を圧縮する階調圧縮手段と、
前記変換曲線の傾きおよび階調が圧縮された前記大局輝度に基づいて階調が圧縮された前記入力輝度からなる階調圧縮入力画像のコントラストを補正するコントラスト補正手段と
を具備する
画像出力装置。
For each partial region in the input image signal composed of a plurality of pixels, a contrast based on the input luminance that is the luminance of the input image signal is calculated as a local contrast, and a partial region in which the local contrast is greater than a predetermined value is detected as a contrast region. Contrast region detection means;
Luminance distribution means for distributing the bright luminance of the input luminance to the bright dark side luminance of the input luminance and the dark dark luminance of the input luminance in the contrast region;
Boundary luminance value generation means for generating a boundary luminance value of the bright side luminance and the dark side luminance based on the distribution of the bright side luminance and the dark side luminance;
Brightness correction means for performing brightness correction so that the input brightness value corresponding to the boundary brightness value is output as a moderate brightness value;
The brightness correction means includes
Conversion curve calculation means for calculating a conversion curve used for compression of luminance gradation based on the boundary luminance value and the distribution of the input luminance;
A global luminance calculating means for calculating a global luminance which is a luminance of a global luminance image composed of low frequency components of the input image;
A gradation compression means for compressing the gradation of the input luminance and the gradation of the overall luminance based on the conversion curve;
An image output apparatus comprising: a contrast correction unit configured to correct a contrast of a gradation-compressed input image including the input luminance whose gradation has been compressed based on the global luminance whose inclination and gradation are compressed.
前記境界輝度値生成手段は、前記明側輝度の平均値EG=1と、前記明側輝度の分散値VG=1と、前記暗側輝度の平均値EG=0と、前記暗側輝度の分散値VG=0とに基づいて方程式
Figure 2009065711
の解である境界輝度値Im(但し、EG=0<Im<EG=1)を前記境界輝度値として生成することを特徴とする請求項1記載の画像出力装置。
The boundary luminance value generating means includes an average value E G = 1 of the bright side luminance, a variance value V G = 1 of the bright side luminance, an average value E G = 0 of the dark side luminance, and the dark side Equation based on luminance variance VG = 0
Figure 2009065711
The image output apparatus according to claim 1, wherein a boundary luminance value I m (E G = 0 <I m <E G = 1 ), which is a solution of the above, is generated as the boundary luminance value.
前記境界輝度値生成手段は、前記明側輝度の平均値EG=1と、前記明側輝度の分散値VG=1と、前記暗側輝度の平均値EG=0と、前記暗側輝度の分散値VG=0とに基づいて方程式
Figure 2009065711
の解である境界輝度値Im(但し、EG=0<Im<EG=1)を前記境界輝度値として生成することを特徴とする請求項1記載の画像出力装置。
The boundary luminance value generating means includes an average value E G = 1 of the bright side luminance, a variance value V G = 1 of the bright side luminance, an average value E G = 0 of the dark side luminance, and the dark side Equation based on luminance variance VG = 0
Figure 2009065711
The image output apparatus according to claim 1, wherein a boundary luminance value I m (E G = 0 <I m <E G = 1 ), which is a solution of the above, is generated as the boundary luminance value.
複数の画素からなる入力画像信号における部分領域毎に前記入力画像信号の輝度である入力輝度に基づくコントラストを局所コントラストとして算出して、当該局所コントラストが所定値より大きい部分領域をコントラスト領域として検出するコントラスト領域検出手順と、
前記コントラスト領域において前記入力輝度の明るい明側輝度と前記入力輝度の暗い暗側輝度に分配する輝度分配手順と、
前記明側輝度および暗側輝度の分布に基づいて前記明側輝度および暗側輝度の境界輝度値を生成する境界輝度値生成手順と、
前記境界輝度値に相当する前記入力輝度値が中庸な輝度値として出力されるように明るさ補正を行う明るさ補正手順と
を具備し、
前記明るさ補正手順は、
前記境界輝度値および前記入力輝度の分布に基づいて輝度の階調の圧縮に用いる変換曲線を算出する変換曲線算出手順と、
前記入力画像の低周波成分からなる大局輝度画像の輝度である大局輝度を算出する大局輝度算出手順と、
前記変換曲線に基づいて前記入力輝度の階調および前記大局輝度の階調を圧縮する階調圧縮手順と、
前記変換曲線の傾きおよび階調が圧縮された前記大局輝度に基づいて階調が圧縮された前記入力輝度からなる階調圧縮入力画像のコントラストを補正するコントラスト補正手順と
を備える
画像出力方法。
For each partial region in the input image signal composed of a plurality of pixels, a contrast based on the input luminance that is the luminance of the input image signal is calculated as a local contrast, and a partial region having the local contrast greater than a predetermined value is detected as a contrast region. Contrast area detection procedure;
A luminance distribution procedure for distributing the bright brightness of the input brightness to the dark dark brightness of the input brightness in the contrast region;
A boundary luminance value generation procedure for generating a boundary luminance value of the bright side luminance and the dark side luminance based on the distribution of the bright side luminance and the dark side luminance;
A brightness correction procedure for performing brightness correction so that the input brightness value corresponding to the boundary brightness value is output as a moderate brightness value,
The brightness correction procedure is as follows:
A conversion curve calculation procedure for calculating a conversion curve used for compression of luminance gradation based on the boundary luminance value and the distribution of the input luminance;
A general luminance calculation procedure for calculating a general luminance which is a luminance of a general luminance image composed of low frequency components of the input image;
A gradation compression procedure for compressing the gradation of the input luminance and the gradation of the overall luminance based on the conversion curve;
An image output method comprising: a contrast correction procedure for correcting a contrast of a gradation-compressed input image composed of the input luminance with the gradation compressed based on the global luminance with the gradient of the conversion curve and the gradation compressed.
複数の画素からなる入力画像信号における部分領域毎に前記入力画像信号の輝度である入力輝度に基づくコントラストを局所コントラストとして算出して、当該局所コントラストが所定値より大きい部分領域をコントラスト領域として検出するコントラスト領域検出手順と、
前記コントラスト領域において前記入力輝度の明るい明側輝度と前記入力輝度の暗い暗側輝度に分配する輝度分配手順と、
前記明側輝度および暗側輝度の分布に基づいて前記明側輝度および暗側輝度の境界輝度値を生成する境界輝度値生成手順と、
前記境界輝度値に相当する前記入力輝度値が中庸な輝度値として出力されるように明るさ補正を行う明るさ補正手順と
をコンピュータに実行させ、
前記明るさ補正手順においては、
前記境界輝度値および前記入力輝度の分布に基づいて輝度の階調の圧縮に用いる変換曲線を算出する変換曲線算出手順と、
前記入力画像の低周波成分からなる大局輝度画像の輝度である大局輝度を算出する大局輝度算出手順と、
前記変換曲線に基づいて前記入力輝度の階調および前記大局輝度の階調を圧縮する階調圧縮手順と、
前記変換曲線の傾きおよび階調が圧縮された前記大局輝度に基づいて階調が圧縮された前記入力輝度からなる階調圧縮入力画像のコントラストを補正するコントラスト補正手順と
をコンピュータに実行させる
プログラム。
For each partial region in the input image signal composed of a plurality of pixels, a contrast based on the input luminance that is the luminance of the input image signal is calculated as a local contrast, and a partial region having the local contrast greater than a predetermined value is detected as a contrast region. Contrast area detection procedure;
A luminance distribution procedure for distributing the bright brightness of the input brightness to the dark dark brightness of the input brightness in the contrast region;
A boundary luminance value generation procedure for generating a boundary luminance value of the bright side luminance and the dark side luminance based on the distribution of the bright side luminance and the dark side luminance;
Causing the computer to execute a brightness correction procedure for performing brightness correction so that the input brightness value corresponding to the boundary brightness value is output as a moderate brightness value;
In the brightness correction procedure,
A conversion curve calculation procedure for calculating a conversion curve used for compression of luminance gradation based on the boundary luminance value and the distribution of the input luminance;
A general luminance calculation procedure for calculating a general luminance which is a luminance of a general luminance image composed of low frequency components of the input image;
A gradation compression procedure for compressing the gradation of the input luminance and the gradation of the overall luminance based on the conversion curve;
A program for causing a computer to execute a contrast correction procedure for correcting the contrast of a gradation-compressed input image composed of the input luminance whose gradation is compressed based on the global luminance in which the gradient and gradation of the conversion curve are compressed.
JP2008311686A 2008-12-08 2008-12-08 Image output apparatus, image output method and program Expired - Fee Related JP4900373B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008311686A JP4900373B2 (en) 2008-12-08 2008-12-08 Image output apparatus, image output method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008311686A JP4900373B2 (en) 2008-12-08 2008-12-08 Image output apparatus, image output method and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006162927A Division JP4264553B2 (en) 2006-06-12 2006-06-12 Image processing apparatus, imaging apparatus, image output apparatus, method and program in these apparatuses

Publications (2)

Publication Number Publication Date
JP2009065711A true JP2009065711A (en) 2009-03-26
JP4900373B2 JP4900373B2 (en) 2012-03-21

Family

ID=40559796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008311686A Expired - Fee Related JP4900373B2 (en) 2008-12-08 2008-12-08 Image output apparatus, image output method and program

Country Status (1)

Country Link
JP (1) JP4900373B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101289698B1 (en) 2011-10-21 2013-07-26 한양대학교 에리카산학협력단 Apparatus and method for enhancing image
US8681242B2 (en) 2010-06-24 2014-03-25 Hitachi, Ltd. Image signal processing system
CN111372020A (en) * 2020-03-18 2020-07-03 康佳集团股份有限公司 Image display method, terminal and storage medium for enhancing contrast
JP7334608B2 (en) 2019-12-19 2023-08-29 株式会社Jvcケンウッド VIDEO SIGNAL PROCESSING DEVICE AND VIDEO SIGNAL PROCESSING METHOD
JP7359091B2 (en) 2020-07-15 2023-10-11 株式会社デンソー Image processing device, image processing method, and image processing program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015011585A (en) 2013-06-28 2015-01-19 株式会社リコー Image processing apparatus, image forming apparatus, image forming system, image processing method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002006474A (en) * 2000-06-21 2002-01-09 Toppan Printing Co Ltd Method for processing mask pattern image
JP2005039456A (en) * 2003-07-18 2005-02-10 Canon Inc Image processing method and apparatus
JP2005348115A (en) * 2004-06-03 2005-12-15 Canon Inc Brightness correction image generating device and brightness correction image generation method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002006474A (en) * 2000-06-21 2002-01-09 Toppan Printing Co Ltd Method for processing mask pattern image
JP2005039456A (en) * 2003-07-18 2005-02-10 Canon Inc Image processing method and apparatus
JP2005348115A (en) * 2004-06-03 2005-12-15 Canon Inc Brightness correction image generating device and brightness correction image generation method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8681242B2 (en) 2010-06-24 2014-03-25 Hitachi, Ltd. Image signal processing system
KR101289698B1 (en) 2011-10-21 2013-07-26 한양대학교 에리카산학협력단 Apparatus and method for enhancing image
JP7334608B2 (en) 2019-12-19 2023-08-29 株式会社Jvcケンウッド VIDEO SIGNAL PROCESSING DEVICE AND VIDEO SIGNAL PROCESSING METHOD
CN111372020A (en) * 2020-03-18 2020-07-03 康佳集团股份有限公司 Image display method, terminal and storage medium for enhancing contrast
CN111372020B (en) * 2020-03-18 2023-05-16 康佳集团股份有限公司 Image display method, terminal and storage medium for enhancing contrast
JP7359091B2 (en) 2020-07-15 2023-10-11 株式会社デンソー Image processing device, image processing method, and image processing program
US11790634B2 (en) 2020-07-15 2023-10-17 Denso Corporation Image signal processing system, method, and program

Also Published As

Publication number Publication date
JP4900373B2 (en) 2012-03-21

Similar Documents

Publication Publication Date Title
JP4264553B2 (en) Image processing apparatus, imaging apparatus, image output apparatus, method and program in these apparatuses
US10997696B2 (en) Image processing method, apparatus and device
JP6415062B2 (en) Image processing apparatus, image processing method, control program, and recording medium
JP4612845B2 (en) Image processing apparatus and method
US10742860B2 (en) Method and device for double-camera-based imaging
JP4900373B2 (en) Image output apparatus, image output method and program
US9185265B2 (en) Image processing method and image processing apparatus for performing a tone correction to acquire a combined image
JP2017037357A (en) Image processing device, program and recording medium
JP5589660B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2010074222A (en) Image processing apparatus, luminance conversion curve correcting method and program
US10757321B2 (en) Detection apparatus for detecting portion satisfying predetermined condition from image, image processing apparatus for applying predetermined image processing on image, detection method, and image processing method
JP7277158B2 (en) Setting device and method, program, storage medium
JP2020145553A (en) Image processing apparatus, image processing method and program
JP5693647B2 (en) Image processing method, image processing apparatus, and imaging apparatus
JP2012044560A (en) Image processing apparatus, image processing method, and imaging apparatus
JP5264695B2 (en) Image processing method, image processing apparatus, and imaging apparatus
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP5159647B2 (en) Image processing apparatus and image processing method
US11120579B2 (en) Image processing apparatus, image processing method, and storage medium
JP5147912B2 (en) Image processing method, image processing apparatus, program, and recording medium
CN114697483B (en) Under-screen camera shooting device and method based on compressed sensing white balance algorithm
US20230370725A1 (en) Imaging apparatus and control method for imaging apparatus
JP5881350B2 (en) Image processing apparatus, image processing method, and image processing program
JP2009032182A (en) Image processor
JP2008283282A (en) Development processor for undeveloped image data, development processing method, and computer program for development processing

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111004

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111011

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111111

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111219

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150113

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees