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

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5627730B2
JP5627730B2 JP2013051960A JP2013051960A JP5627730B2 JP 5627730 B2 JP5627730 B2 JP 5627730B2 JP 2013051960 A JP2013051960 A JP 2013051960A JP 2013051960 A JP2013051960 A JP 2013051960A JP 5627730 B2 JP5627730 B2 JP 5627730B2
Authority
JP
Japan
Prior art keywords
correction
image
luminance
gradation correction
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013051960A
Other languages
Japanese (ja)
Other versions
JP2013127818A (en
Inventor
潤二 多田
潤二 多田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2013051960A priority Critical patent/JP5627730B2/en
Publication of JP2013127818A publication Critical patent/JP2013127818A/en
Application granted granted Critical
Publication of JP5627730B2 publication Critical patent/JP5627730B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明はデジタル画像処理、特にデジタル画像の明るさの分布を改善する技術に関する。   The present invention relates to digital image processing, and more particularly to a technique for improving the brightness distribution of a digital image.

好ましい明るさ、コントラストの画像を得るために、撮影画像のヒストグラムや被写体情報を解析して、階調補正を行う方式が知られている。特に、主被写体の明るさが背景の明るさに比べて著しく暗いような、いわゆる逆光シーンは、撮影した画像においてどうしても主被写体部分が暗くなってしまうため、階調補正が有効なシーンと言える。   In order to obtain an image with preferable brightness and contrast, a method is known in which gradation correction is performed by analyzing a histogram of a captured image and subject information. In particular, a so-called backlight scene in which the brightness of the main subject is significantly darker than the brightness of the background can be said to be a scene where gradation correction is effective because the main subject portion is inevitably dark in the captured image.

階調補正には各入力輝度値を所定の出力輝度値に変換する補正テーブル(トーンカーブ)を用いる方式がある。特に、逆光シーンなどにおいては、主被写体を好ましい明るさに補正しつつ、背景の明るい領域を白トビさせないように補正を抑えるような補正テーブルを設定する方法が提案されている(特許文献1参照)。また、画像の輝度成分の低周波成分信号を用いて階調補正することで、いわゆる覆い焼きのような効果を得る方法が提案されており(特許文献2参照)、この方法ではトーンカーブ補正に比べて、画像のコントラストを維持したまま階調補正を行うことができる。   In the gradation correction, there is a method using a correction table (tone curve) for converting each input luminance value into a predetermined output luminance value. In particular, in a backlight scene or the like, there has been proposed a method of setting a correction table that suppresses correction so that a bright background area is not overexposed while correcting the main subject to a preferable brightness (see Patent Document 1). ). In addition, a method has been proposed in which gradation correction is performed using a low-frequency component signal of a luminance component of an image to obtain an effect such as so-called dodging (see Patent Document 2). In this method, tone curve correction is performed. In comparison, tone correction can be performed while maintaining the contrast of the image.

特開2007−124604号JP 2007-124604 A 特開2008−072604号JP 2008-072604

しかしながら、特許文献1のように、トーンカーブによって、画像の暗い部分を明るく補正し、もともと明るい部分は補正を抑えるような階調補正を行うと、主被写体と背景の中間の輝度帯域においてコントラストが失われ、のっぺりとした画像になることがあった。また、特許文献2のように、画像の輝度成分の低周波成分信号を用いて階調補正を行うと、シーンによってはコントラストがありすぎるために不自然な画像になることがあった。特許文献1の補正方法と特許文献2の補正方法の両方を利用するにしても、カメラの撮影条件の変化や様々なユーザの画質の好みに対応した補正量を設定することは困難であった。   However, as in Patent Document 1, when tone correction is performed so that dark portions of an image are brightly corrected by tone curves and correction is originally performed on bright portions, the contrast is reduced in a luminance band between the main subject and the background. Sometimes it was lost and it became a crisp image. Further, as described in Patent Document 2, when tone correction is performed using a low-frequency component signal of a luminance component of an image, an image may be unnatural because there is too much contrast depending on the scene. Even when both the correction method of Patent Document 1 and the correction method of Patent Document 2 are used, it is difficult to set a correction amount corresponding to a change in the shooting conditions of the camera and various user image quality preferences. .

本発明は上述した問題点を解決するためのものであり、本発明にかかる画像処理装置は、撮影画像の階調補正の目標値を算出する算出手段と、前記撮影画像から輝度成分画像である第1の画像と前記輝度成分画像の低周波成分画像である第2の画像とを抽出する抽出手段と、前記第1の画像と前記第2の画像とを用いて前記撮影画像に対して暗い部分を明るくする第1の階調補正処理を行う第1の階調補正処理手段と、トーンカーブ補正により前記撮影画像に対して暗い部分を明るくする第2の階調補正処理を行う第2の階調補正処理手段と、ユーザの操作入力に応じて階調補正レベルを設定する設定手段と、前記設定手段により設定された階調補正レベルに基づいて前記第1の階調補正処理の補正量及び前記第2の階調補正処理の補正量のいずれか一方を決定し、当該決定された補正量と前記算出手段により算出された目標値とに基づいて前記第1の階調補正処理の補正量及び前記第2の階調補正処理の補正量の他方を決定する決定手段と、を有することを特徴とする。 The present invention has been made to solve the above problems, an image processing apparatus according to the present invention includes: a calculation means for calculating a target value of the gradation correction of the photographed image is the luminance component image from the captured image extraction means for extracting a second image which is a low-frequency component image of the brightness component image with the first image, a dark relative to the captured image using said second image and the first image First gradation correction processing means for performing first gradation correction processing for brightening a portion, and second for performing second gradation correction processing for brightening a dark portion of the captured image by tone curve correction. and tone correction processing means, and setting means for setting a gradation correction level in response to an operation input of the user, the correction of the first gradation correction processing based on the gradation correction level set by the pre-Symbol setting means the amount and the correction amount of the second tone correction process One of the shifts is determined, and based on the determined correction amount and the target value calculated by the calculation means, the correction amount of the first gradation correction process and the correction amount of the second gradation correction process And determining means for determining the other of the two.

本発明によれば、輝度低周波成分を用いる階調補正とトーンカーブ補正による階調補正の両方を利用した階調補正を行うことができ、かつユーザの好みの画質の補正画像を得ることができるという効果を得ることができる。   According to the present invention, it is possible to perform gradation correction using both gradation correction using a low-frequency luminance component and gradation correction by tone curve correction, and obtain a corrected image having a user-preferred image quality. The effect that it is possible can be obtained.

本発明による画像処理方式を実現可能なデジタルカメラの一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the digital camera which can implement | achieve the image processing system by this invention. 輝度低周波成分検出処理を示すフローチャートである。It is a flowchart which shows a brightness | luminance low frequency component detection process. 補正量演算処理を示すフローチャートである。It is a flowchart which shows a correction amount calculation process. 検出された顔の顔輝度取得領域を示す図である。It is a figure which shows the face luminance acquisition area | region of the detected face. 顔の輝度の代表値の算出を示す流れ図である。It is a flowchart which shows calculation of the representative value of the brightness | luminance of a face. 検出したヒストグラムの一例を示す図である。It is a figure which shows an example of the detected histogram. 補正テーブルとルックアップテーブルとの関係を示す図である。It is a figure which shows the relationship between a correction table and a lookup table. 現像処理を示すフローチャートである。It is a flowchart which shows development processing. 補正曲線作成処理を示すフローチャートである。It is a flowchart which shows a correction curve creation process. 階調補正の補正量を決めるためのユーザーインターフェースを示す図である。It is a figure which shows the user interface for determining the correction amount of gradation correction. トーンカーブ補正の補正量の算出方法を示す概念図である。It is a conceptual diagram which shows the calculation method of the correction amount of tone curve correction. トーンカーブ補正の補正量の算出方法を示すフローチャートである。It is a flowchart which shows the calculation method of the correction amount of tone curve correction. ISO感度毎の補正テーブルを示す図である。It is a figure which shows the correction table for every ISO sensitivity.

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

(第1の実施形態)
図1は、本発明の画像処理装置を実現可能なデジタルカメラの一構成例を示すブロック図である。図1において、不図示の撮影レンズを通過した被写体光学像は撮像素子101上に結像され、その光量に応じた電荷に変換される。撮像素子101は例えばR(赤)、G(緑)、B(青)のカラーフィルタにより覆われている。各カラーフィルタはそれぞれの色の波長帯域周辺の分光感度を持ち、各カラーフィルタに対応して設けられた光電変換素子は、各カラーフィルタを通過した帯域の光線をそれぞれ光電変換する。各光電変換素子により変換された電荷は、撮像素子101から電気信号としてA/D変換部102に出力され、A/D変換処理によりデジタル信号(画像データ)に変換される。
(First embodiment)
FIG. 1 is a block diagram illustrating a configuration example of a digital camera capable of realizing the image processing apparatus of the present invention. In FIG. 1, a subject optical image that has passed through a photographing lens (not shown) is formed on an image sensor 101 and converted into electric charges corresponding to the amount of light. The image sensor 101 is covered with, for example, R (red), G (green), and B (blue) color filters. Each color filter has a spectral sensitivity around the wavelength band of each color, and a photoelectric conversion element provided corresponding to each color filter photoelectrically converts light in the band that has passed through each color filter. The electric charge converted by each photoelectric conversion element is output as an electric signal from the imaging element 101 to the A / D conversion unit 102 and converted into a digital signal (image data) by A / D conversion processing.

A/D変換部102から出力されたデジタル信号(入力画像データ)は、輝度低周波成分検出部103、補正量演算部105、WB処理部104のそれぞれに送られる。WB処理部104はWB検出部106で得られたホワイトバランスのゲイン値を画像のRGBの各画素値に積算する。WB処理部104でWB処理された画像データは現像処理部110に送られ、現像処理部110は後述の輝度低周波成分を用いた輝度補正処理(第1の階調補正処理)及びトーンカーブ補正処理(第2の階調補正処理)を行う。画像データ出力部111は、現像処理が行われた画像データをファイル化して出力する。例えば、ファイル形式をJPEGファイルに変換する場合には、画像データをYCrCb形式に3次元マトリックス変換して付属データを添付することでJPEGファイル形式に変換する。   The digital signal (input image data) output from the A / D conversion unit 102 is sent to each of the luminance low-frequency component detection unit 103, the correction amount calculation unit 105, and the WB processing unit 104. The WB processing unit 104 adds the white balance gain values obtained by the WB detection unit 106 to the RGB pixel values of the image. The image data subjected to WB processing by the WB processing unit 104 is sent to the development processing unit 110, and the development processing unit 110 performs luminance correction processing (first gradation correction processing) and tone curve correction using luminance low-frequency components described later. Processing (second gradation correction processing) is performed. The image data output unit 111 outputs the image data that has undergone development processing as a file. For example, when the file format is converted to a JPEG file, the image data is converted into a JPEG file format by three-dimensional matrix conversion into YCrCb format and attached data.

次に各ブロックの処理の詳細を説明する。図2は、輝度低周波成分検出部103で行う処理を示したフローチャートである。図2において、まずステップS201では、入力画像データに対して輝度信号抽出処理を行う。輝度成分の抽出は、例えば、色調整対象の画像がIEC61966−2−1に記載されているsRGB色空間で表現されている場合、IEC61966−2−1に記載されている方法に従う。すなわち、ガンマ変換と3行3列のマトリクス演算により、CIE1931XYZに変換する。ここで、位置が(x,y)の画素値(R(x,y),G(x,y),B(x,y))を上記変換による変換後のXYZのデータをそれぞれX(x,y)、Y(x,y)、Z(x,y)とする。この場合、Y(x,y)が抽出する輝度成分、X(x,y)、Z(x,y)が色成分である。本実施形態では、画像の画素値がsRGB色空間で規定されており、輝度についてはsYCC色空間で規定しているので、下記の式(1)の変換式を用いて輝度成分を算出する。
Y=0.299×R+0.587×G+0.114×B 式(1)
これに対し、次の式(2)のような近似式を用いるのであっても良い。
Next, details of the processing of each block will be described. FIG. 2 is a flowchart showing processing performed by the luminance low-frequency component detection unit 103. In FIG. 2, first, in step S201, luminance signal extraction processing is performed on input image data. For example, when an image to be color-adjusted is expressed in the sRGB color space described in IEC 61966-2-1, the luminance component is extracted according to the method described in IEC 61966-2-1. That is, conversion into CIE1931XYZ is performed by gamma conversion and 3 × 3 matrix calculation. Here, XYZ data obtained by converting the pixel value (R (x, y), G (x, y), B (x, y)) at the position (x, y) by the above-described conversion into X (x , Y), Y (x, y), and Z (x, y). In this case, Y (x, y) is a luminance component extracted, and X (x, y) and Z (x, y) are color components. In the present embodiment, since the pixel value of the image is defined in the sRGB color space and the luminance is defined in the sYCC color space, the luminance component is calculated using the conversion formula (1) below.
Y = 0.299 * R + 0.587 * G + 0.114 * B Formula (1)
On the other hand, an approximate expression such as the following expression (2) may be used.

上記処理によって等倍の輝度成分画像を取得することができるが、元画像と輝度成分画像の大きさは一致する必要はない。例えば、このステップS201の輝度成分抽出において、入力画像データに対して縮小処理を施すように構成しても良い。縮小処理は公知の任意の方法で良いが、例えば間引き処理、最近傍法、平均値法などで容易に実現できる。   Although an equal-magnification luminance component image can be acquired by the above processing, the sizes of the original image and the luminance component image do not need to match. For example, in the luminance component extraction in step S201, the input image data may be reduced. The reduction process may be any known method, but can be easily realized by, for example, a thinning process, a nearest neighbor method, an average value method, or the like.

続くステップS202ではステップS201で作成した輝度成分画像より低周波成分抽出処理を行い、輝度低周波成分画像を生成する。本実施形態では、低周波成分抽出として、ローパスフィルタ処理を行う。本実施形態では、このステップでフィルタサイズの異なる3つのローパスフィルタを用いて3つの低周波成分画像を生成する。   In subsequent step S202, low frequency component extraction processing is performed from the luminance component image created in step S201, and a luminance low frequency component image is generated. In the present embodiment, low-pass filter processing is performed as low-frequency component extraction. In this embodiment, three low-frequency component images are generated using three low-pass filters having different filter sizes in this step.

図3は補正量演算部105で行う処理を示したフローチャートである。図3において、ステップS301では、WB検出処理を行う。ここでは、WB検出部106が入力画像データから撮影シーンに適したホワイトバランスのゲイン値を算出する。   FIG. 3 is a flowchart showing processing performed by the correction amount calculation unit 105. In FIG. 3, in step S301, WB detection processing is performed. Here, the WB detection unit 106 calculates a white balance gain value suitable for the shooting scene from the input image data.

続くステップS302では、ヒストグラム検出処理を行う。ここでは、ヒストグラム検出部107が、まず撮影した画像データ全体に対して予め定められたWBのゲインを適用し、適用したデータに対してガンマ処理を行う。そして、ガンマ処理を行った画像データのヒストグラムを検出する。本実施形態では、ガンマ処理はルックアップテーブルを用いる方法を適用する。ここで、本実施形態では、ヒストグラムを検出する範囲は画像データの全体とするが、端の方をカットしたものから検出しても良い。   In subsequent step S302, histogram detection processing is performed. Here, the histogram detection unit 107 first applies a predetermined WB gain to the entire captured image data, and performs gamma processing on the applied data. Then, a histogram of the image data subjected to gamma processing is detected. In this embodiment, a method using a lookup table is applied to the gamma processing. Here, in this embodiment, the range in which the histogram is detected is the entire image data, but it may be detected from the end cut.

続くステップS303では、顔検出前処理を行う。ここでは、顔検出部108が入力画像データに対して縮小処理、ガンマ処理等を施して、画像に顔が含まれる顔を容易に検出しやすいようにする。続くステップS304では、顔検出処理を行う。ここでは、顔検出部108が入力画像データ内の顔領域を検出する。この検出処理には、入力画像データに対するテキスチャー検出処理やその結果に対するパターン認識処理(目、鼻、口、及び顔の輪郭等の領域の認識処理)が含まれている。そして、あらかじめ設定した評価閾値を用いて、これらの処理によって得られた領域に対して顔であることの信頼性が大きさを評価する。   In subsequent step S303, face detection pre-processing is performed. Here, the face detection unit 108 performs reduction processing, gamma processing, and the like on the input image data so that a face whose face is included in the image can be easily detected. In subsequent step S304, face detection processing is performed. Here, the face detection unit 108 detects a face area in the input image data. This detection processing includes texture detection processing for input image data and pattern recognition processing (recognition processing for regions such as eyes, nose, mouth, and face outline) for the result. Then, using a preset evaluation threshold value, the reliability of the face is evaluated for the area obtained by these processes.

続くステップS305では、顔検出部108がステップS304の顔検出処理の評価の結果に基づき顔の有無を判定する。顔であることの信頼性が評価閾値より大きい領域が一つ以上あった場合、顔検出部108はその領域を顔と判定する。そして、その領域に含まれる目の座標を出力し、ステップS306以降の顔輝度算出処理のステップに進む。顔領域が無かったと判定した場合、ステップS309に進む。   In subsequent step S305, the face detection unit 108 determines the presence or absence of a face based on the evaluation result of the face detection process in step S304. When there is one or more regions where the reliability of being a face is greater than the evaluation threshold, the face detection unit 108 determines that the region is a face. Then, the coordinates of the eyes included in the area are output, and the process proceeds to the step of face luminance calculation processing after step S306. If it is determined that there is no face area, the process proceeds to step S309.

ステップS306では、顔輝度取得領域の算出を行う。ここでは、補正量算出部109が顔検出結果に基づいて顔の輝度を取得する領域を算出する。たとえば、図4のように、画像データの全体の範囲401のうち、各顔検出領域402、412について、両眼の下及びその中間の3箇所の領域、すなわち領域403、404、405、領域413、414、415、を算出する。ここで、各領域の大きさは、顔検出領域402(412)の大きさに対する比率によって決まる大きさの正方形の領域とする。続くステップS307では、補正量算出部109は、各顔輝度取得領域について、入力画像データのR画素、G画素、B画素の各々の平均値を求め、式(1)により輝度値Yへの変換を行う。この変換には、式(2)のような近似式を用いるものであっても良い。   In step S306, the face luminance acquisition area is calculated. Here, the correction amount calculation unit 109 calculates a region for acquiring the face luminance based on the face detection result. For example, as shown in FIG. 4, in the entire range 401 of the image data, for each of the face detection areas 402 and 412, three areas under both eyes and between them, that is, areas 403, 404, 405, and area 413 414, 415 are calculated. Here, the size of each region is a square region having a size determined by the ratio to the size of the face detection region 402 (412). In subsequent step S307, the correction amount calculation unit 109 obtains an average value of each of the R pixel, the G pixel, and the B pixel of the input image data for each face luminance acquisition region, and converts the average value into the luminance value Y by Expression (1). I do. For this conversion, an approximate expression such as Expression (2) may be used.

続くステップS308では、顔の輝度の代表値の算出を行う。この方法の一例を図5のフローチャートに示す。まずステップS501で、各顔について3箇所の輝度値の中から最大値を求める。続くステップS502で、顔が複数あるかどうかの判定を行い、顔が複数ある場合はステップS503に進む。顔が1つだけの場合は、この顔についてステップS501で求めた輝度値の最大値を、顔の輝度の代表値とする(ステップS509)。図4の例だと、顔は2つ(402,412)なので、顔検出領域402の領域403、404、405について代表値Y0を求め、顔検出領域412の領域413、414、415について、Y1を算出する。   In the subsequent step S308, the representative value of the brightness of the face is calculated. An example of this method is shown in the flowchart of FIG. First, in step S501, the maximum value is obtained from the three luminance values for each face. In subsequent step S502, it is determined whether there are a plurality of faces. If there are a plurality of faces, the process proceeds to step S503. If there is only one face, the maximum value of the brightness value obtained in step S501 for this face is set as the representative value of the face brightness (step S509). In the example of FIG. 4, since there are two faces (402, 412), the representative value Y0 is obtained for the areas 403, 404, and 405 of the face detection area 402, and Y1 is obtained for the areas 413, 414, and 415 of the face detection area 412. Is calculated.

ステップS503で、複数の顔の輝度値の最大値(Ya)を求める。図4の例だと、Y0とY1のうち大きいものがYaとなる。ステップS504で、複数の顔の輝度値の平均値(Yb)を求める。図4の例だと、顔検出領域402についての代表値Y0と顔検出領域412の代表値Y1の平均値を求める。ステップS505で、顔の輝度値の最大値(Ya)と顔の輝度値の平均値(Yb)に対して所定の重みをかけた重み平均値(Yc)を求める。   In step S503, a maximum value (Ya) of luminance values of a plurality of faces is obtained. In the example of FIG. 4, the larger one of Y0 and Y1 is Ya. In step S504, an average value (Yb) of luminance values of a plurality of faces is obtained. In the example of FIG. 4, the average value of the representative value Y0 for the face detection area 402 and the representative value Y1 for the face detection area 412 is obtained. In step S505, a weighted average value (Yc) obtained by applying a predetermined weight to the maximum face brightness value (Ya) and the average face brightness value (Yb) is obtained.

ステップS506で、顔の輝度値の最大値(Ya)と重み平均値(Yc)の差が所定の閾値(Yth)より小さいかどうかの判定を行う。この差が閾値より小さい場合には、重み平均値(Yc)を顔の輝度の代表値とし(ステップS507)、そうでない場合には、顔の輝度の最大値(Ya)から閾値(Yth)を引いた値を顔の輝度の代表値とする(ステップS508)。このように代表値を決めることで、複数の顔について公平に明るさ補正できる一方で、1つだけ飛び抜けて明るい顔が含まれている場合が生じても、その顔を基準として補正することが可能となり、失敗撮影を確実に減らすことができる。   In step S506, it is determined whether or not the difference between the maximum facial brightness value (Ya) and the weighted average value (Yc) is smaller than a predetermined threshold (Yth). If this difference is smaller than the threshold value, the weighted average value (Yc) is set as the representative value of the face luminance (step S507). Otherwise, the threshold value (Yth) is calculated from the maximum value (Ya) of the face luminance. The subtracted value is set as the representative value of the brightness of the face (step S508). By determining the representative value in this way, it is possible to correct the brightness fairly for a plurality of faces, but even when only one bright face is included by correction, it is possible to correct the face with reference to that face. It becomes possible, and failure photography can be reduced surely.

図3に戻り、顔が検出されなかった場合に対応するステップS309では、補正量算出部109がヒストグラム検出部107で得られたヒストグラムの特徴量の検出を行う。ここでは、図6に示すように、ヒストグラムで暗部側から累積度数が1%である画素が属するレベル(SD)、ハイライト側から累積度数が1%である画素が属するレベル(HL)等を求める。   Returning to FIG. 3, in step S <b> 309 corresponding to the case where no face is detected, the correction amount calculation unit 109 detects the feature amount of the histogram obtained by the histogram detection unit 107. Here, as shown in FIG. 6, in the histogram, the level (SD) to which a pixel with a cumulative frequency of 1% belongs from the dark side, the level (HL) to which a pixel with a cumulative frequency of 1% belongs from the highlight side, and the like. Ask.

続くステップS310では、補正の目標値の算出を行う。目標輝度レベルの算出には、種々の方法が考えられるが、本実施形態では、補正テーブルを用いて目標輝度レベルのルックアップテーブルを生成する方法を採用する。つまり、図7のように、顔の輝度の代表値に対する目標輝度レベルを定めた補正テーブルを不図示のメモリに予め保持しておく。そしてこのテーブルを参照することで顔の輝度の代表値から3つのLSBに対応する目標値を求め、これらの値及び画像の輝度の最小値と最大値からスプライン補間などにより入力輝度レベルに対する出力輝度レベルのルックアップテーブルを作成する。   In the subsequent step S310, a correction target value is calculated. Various methods can be considered for calculating the target luminance level. In this embodiment, a method of generating a lookup table for the target luminance level using a correction table is adopted. That is, as shown in FIG. 7, a correction table that defines a target luminance level with respect to a representative value of the luminance of the face is held in advance in a memory (not shown). Then, by referring to this table, target values corresponding to three LSBs are obtained from the representative values of the face brightness, and the output brightness with respect to the input brightness level is determined by spline interpolation from these values and the minimum and maximum brightness values of the image. Create a level lookup table.

図7は顔がある場合の作成例を示すものであるが、顔がない場合においても同様に、ステップS309で得られたヒストグラムのSD及びHLの値に対応する補正テーブルを用いて、同様なルックアップテーブルを作成することができる。   FIG. 7 shows an example of creation when there is a face. Similarly, when there is no face, the correction table corresponding to the SD and HL values of the histogram obtained in step S309 is used similarly. A lookup table can be created.

続くステップS311では、輝度低周波成分を用いた補正及びトーンカーブを用いた補正の補正量の算出を行い、その結果を現像処理部110に渡すことで補正量演算部105の処理が終了する。ステップS311での処理については後で詳細に説明する。   In the subsequent step S311, the correction amount of the correction using the luminance low frequency component and the correction using the tone curve is calculated, and the result is passed to the development processing unit 110, whereby the processing of the correction amount calculation unit 105 ends. The process in step S311 will be described in detail later.

現像処理部110の階調補正処理(第1の階調補正処理、第2の階調補正処理)の詳細を図8のフローチャートを用いて説明する。図8のステップS801では、輝度低周波成分を用いた輝度補正処理を行う。   Details of the tone correction processing (first tone correction processing and second tone correction processing) of the development processing unit 110 will be described with reference to the flowchart of FIG. In step S801 in FIG. 8, luminance correction processing using a luminance low-frequency component is performed.

この補正処理は特許文献2と同様な方法で行う。すなわち、スケール変換した輝度成分の分布を対数変換し、異なる尺度(異なる解像度)での平均値を求め、もとの輝度成分の対数変換との差分を出力し、逆変換(exp演算)により元の輝度単位に戻す処理を行う。ここで、画像に応じて改善の度合いを調節するために、スケール変換した輝度成分の対数変換出力に係数を乗ずるようにする。この係数が改善の度合いを調節するパラメータである。以上説明した処理に基づく改善された輝度成分の出力は以下に示す式(3)のようになる。   This correction process is performed in the same manner as in Patent Document 2. That is, logarithmic transformation of the scaled luminance component distribution is performed, an average value at a different scale (different resolution) is obtained, a difference from the logarithmic transformation of the original luminance component is output, and the original is obtained by inverse transformation (exp calculation). The process of returning to the luminance unit is performed. Here, in order to adjust the degree of improvement according to the image, the logarithm conversion output of the scaled luminance component is multiplied by a coefficient. This coefficient is a parameter for adjusting the degree of improvement. The output of the improved luminance component based on the processing described above is expressed by the following equation (3).

但し、Y’(x,y)、Fn(x,y)、nはそれぞれ、座標値が(x,y)の改善された輝度成分の出力、座標(x,y)におけるガウシアン関数、尺度を表すパラメータである。また、γ0、γ1は改善の度合いを表すパラメータ0、改善の度合いを表すパラメータ1である。また、*は積和演算、Avgは平均値演算を表す。   However, Y ′ (x, y), Fn (x, y), and n are the output of the improved luminance component with the coordinate value (x, y), the Gaussian function and the scale at the coordinate (x, y), respectively. It is a parameter to represent. Further, γ0 and γ1 are a parameter 0 indicating the degree of improvement and a parameter 1 indicating the degree of improvement. * Represents a product-sum operation, and Avg represents an average value operation.

この輝度変換をハードウェアで構成する場合には、例えば、平均値演算回路、ルックアップテーブルを作成する回路、テーブル記憶部、テーブル参照回路(ガンマ変換の部分)、除算回路によって構成できる。なお、平均値演算回路は低周波輝度信号抽出を実現する部分に設けてもよい。   When the luminance conversion is configured by hardware, it can be configured by, for example, an average value calculation circuit, a circuit for creating a lookup table, a table storage unit, a table reference circuit (gamma conversion part), and a division circuit. The average value calculation circuit may be provided in a portion that realizes the low-frequency luminance signal extraction.

後述するが、輝度低周波成分を用いた輝度補正処理の強さは図11の曲線1102を構成するルックアップテーブルで表される。そして、上記の式(3)の改善の度合いを表すパラメータγ0、改善の度合いを表すパラメータγ1は、このルックアップテーブルの値により決まるようになっている。   As will be described later, the intensity of the luminance correction processing using the luminance low frequency component is represented by a look-up table constituting the curve 1102 in FIG. The parameter γ0 representing the degree of improvement and the parameter γ1 representing the degree of improvement in the above equation (3) are determined by the values in this lookup table.

続くステップS802では、輝度低周波成分を用いた輝度補正処理に伴う色調整処理を行う。色調整処理では、処理後の画像データの色ができるだけ変化しないように、色成分を輝度成分の変更にしたがって修正する。好ましくは例えば、色成分X(x,y)、Z(x,y)にそれぞれ輝度成分の変更前後の比Y’(x,y)/Y(x,y)を乗算する。あるいは、Y(x,y)のみY’(x,y)に変更し、色成分X(x,y)、Z(x,y)に対しては処理を行わないような、処理の簡略化は容易である。   In the subsequent step S802, a color adjustment process associated with the brightness correction process using the brightness low frequency component is performed. In the color adjustment process, the color component is corrected according to the change in the luminance component so that the color of the processed image data does not change as much as possible. Preferably, for example, the color components X (x, y) and Z (x, y) are respectively multiplied by the ratio Y ′ (x, y) / Y (x, y) before and after the change of the luminance component. Alternatively, only Y (x, y) is changed to Y ′ (x, y), and the processing is simplified such that the processing is not performed on the color components X (x, y) and Z (x, y). Is easy.

続くステップS803では、トーンカーブを用いた輝度補正処理を行う。これには、各入力輝度に対する出力輝度データのルックアップテーブルを用いる。続くステップS804では、トーンカーブを用いた輝度補正処理に伴う色調整処理を行う。これは、ステップS802と同様の処理を行えば良い。また、ステップS802とステップS804を合わせて、輝度低周波成分を用いた輝度補正処理及びトーンカーブを用いた補正処理による輝度値の変更にしたがって、最後に色調整処理を行うようにしても良い。   In the subsequent step S803, luminance correction processing using a tone curve is performed. For this, a look-up table of output luminance data for each input luminance is used. In the subsequent step S804, color adjustment processing accompanying luminance correction processing using a tone curve is performed. This may be performed in the same manner as in step S802. In addition, step S802 and step S804 may be combined, and color adjustment processing may be performed last according to changes in luminance values by luminance correction processing using a low-frequency luminance component and correction processing using a tone curve.

続いて、図3のステップS311における補正量の算出処理の詳細について説明する。この算出処理のフローチャートを図9に示す。図9のステップS901では、輝度低周波成分画像を用いた補正の補正量の算出を行う。本実施形態では、輝度低周波成分検出部103で生成した、周波数帯域の異なる3つの輝度低周波成分画像を用いる。また、これらの複数の輝度低周波成分画像による補正後の画素値を算出し、それらを重み付け加算して最終的な補正画像を得る。   Next, details of the correction amount calculation processing in step S311 of FIG. 3 will be described. A flowchart of this calculation process is shown in FIG. In step S901 in FIG. 9, a correction amount for correction using the luminance low-frequency component image is calculated. In the present embodiment, three luminance low frequency component images having different frequency bands generated by the luminance low frequency component detection unit 103 are used. Further, pixel values after correction using the plurality of luminance low-frequency component images are calculated, and these are weighted and added to obtain a final corrected image.

式(3)で説明した画像データのある輝度低周波成分画素Fn(x,y)*Y(x,y)を以後、Ln(x,y)として説明する。また、本実施形態では3つの輝度低周波成分画像のうち、最も高周波成分のものをLH(x,y)、最も低周波成分のものをLL(x,y)、残りの中間的な周波数成分のものをLM(x,y)とする。   The luminance low-frequency component pixel Fn (x, y) * Y (x, y) having the image data described in Expression (3) will be described as Ln (x, y) hereinafter. In this embodiment, among the three luminance low-frequency component images, the highest frequency component is LH (x, y), the lowest frequency component is LL (x, y), and the remaining intermediate frequency components. Is LM (x, y).

後述の式(4)から明らかなように、本ステップでの補正処理は注目画素の輝度値Y(x,y)だけでなく、その輝度低周波成分LH(x,y)、LM(x,y)、LL(x,y)があって初めて補正後の画素値が決定する。しかしながら、ステップS310で求めた補正量の目標値は、注目画素の輝度値Y(x,y)のみに対する目標値であるので、注目画素の輝度値Y(x,y)のみを用いた補正、すなわちトーンカーブによる補正と近似して補正量の算出を行う。   As will be apparent from Equation (4) described later, the correction processing in this step is not limited to the luminance value Y (x, y) of the target pixel, but also the luminance low frequency components LH (x, y) and LM (x, y The corrected pixel value is determined only when y) and LL (x, y) are present. However, since the target value of the correction amount obtained in step S310 is a target value for only the luminance value Y (x, y) of the target pixel, correction using only the luminance value Y (x, y) of the target pixel. That is, the correction amount is calculated by approximating the correction by the tone curve.

本実施形態では、撮影に先立ち、ユーザが輝度低周波成分を用いた補正の補正レベルを設定できるようになっている。図10はそのユーザーインターフェースの一例であり不図示のカメラのCPUがその動作を制御する。カメラが備える液晶パネルに表示される設定画面において、補正レベルの選択項目として「強」、「標準」、「弱」、「しない」が表示される。ユーザは所定の操作部材を操作して項目を選択する。いずれかの項目を選択する操作入力がされると、その選択操作に応答して選択項目に対応した補正テーブルが不図示のメモリから読み出される。なお、「しない」を選択した場合は、輝度低周波成分を用いた補正の割合は“0”になる。   In this embodiment, the user can set a correction level for correction using a low-frequency luminance component before shooting. FIG. 10 shows an example of the user interface, and a camera CPU (not shown) controls the operation. On the setting screen displayed on the liquid crystal panel included in the camera, “strong”, “standard”, “weak”, and “no” are displayed as correction level selection items. A user operates a predetermined operation member to select an item. When an operation input for selecting any item is made, a correction table corresponding to the selected item is read from a memory (not shown) in response to the selection operation. If “No” is selected, the correction ratio using the low-frequency luminance component is “0”.

撮影開始後においては、読み出された補正テーブルと撮影画像より決定した補正の目標値のルックアップテーブルの関係から、輝度低周波成分を用いた補正の補正量のルックアップテーブル(図11の曲線1102に対応)が生成される。各項目に対応する補正テーブルは補正の絶対量を決めるものであるため、このルックアップテーブルの値が目標値の補正量を超えてしまうことがある。そのような場合は、補正量算出部109は目標値の補正量を輝度低周波成分を用いた補正の補正量になるようルックアップテーブルを調整する。   After shooting is started, a correction correction amount lookup table using luminance low-frequency components (curve in FIG. 11) is obtained from the relationship between the read correction table and the correction target value lookup table determined from the captured image. 1102) is generated. Since the correction table corresponding to each item determines the absolute amount of correction, the value of this lookup table may exceed the correction amount of the target value. In such a case, the correction amount calculation unit 109 adjusts the lookup table so that the correction amount of the target value becomes the correction amount of correction using the low-frequency luminance component.

本実施形態では、ユーザ操作に基づいて補正の絶対量を決めているが、絶対量ではなく、全体の補正の目標値に対する、輝度低周波成分を用いた補正の補正量の割合を設定できるようにしてもよい。また、この絶対量や割合を設定する場合は、ユーザ操作のみでなく、顔検出の結果、顔があると判定されている場合には、元々設定されている割合よりも大きい値を設定するようにしてもよい。このようにすることで、ユーザが顔の有る無しを判断して調整及び撮影しなおす等の手間をかけることなく、顔部分のコントラストが損なわれないように補正することができる。   In the present embodiment, the absolute amount of correction is determined based on a user operation, but it is possible to set the ratio of the correction amount using the low-frequency luminance component to the target value of the entire correction instead of the absolute amount. It may be. Also, when setting this absolute amount or ratio, if it is determined not only by a user operation but also as a result of face detection that there is a face, a value larger than the originally set ratio should be set. It may be. In this way, it is possible to perform correction so that the contrast of the face portion is not impaired without taking time and effort for the user to determine whether or not the face is present and adjust and photograph again.

続くステップS902では、補正量算出部109はトーンカーブによる補正量の算出を行う。ここでは、先に求めた輝度低周波成分を用いた補正とトーンカーブによる補正とを合わせて、先に求めた補正量の目標値となるように、トーンカーブによる補正量を算出する。輝度低周波成分を用いた補正は輝度低周波成分LH(x,y)、LM(x,y)、LL(x,y)を用いているため、補正結果として同じ輝度レベルになる画素の補正前の輝度値は様々である。したがって、注目画素の輝度値Y(x,y)のみを用いた補正、すなわちトーンカーブによる補正と近似して、トーンカーブ補正の補正量を算出する。   In subsequent step S902, the correction amount calculation unit 109 calculates the correction amount using the tone curve. Here, the correction amount using the tone curve is calculated so that the correction using the low-frequency luminance component obtained previously and the correction using the tone curve are combined to obtain the target value of the correction amount obtained previously. Since the correction using the low-frequency luminance component uses the low-frequency luminance components LH (x, y), LM (x, y), and LL (x, y), correction of pixels having the same luminance level as the correction result The previous luminance value varies. Therefore, a correction amount for tone curve correction is calculated by approximating correction using only the luminance value Y (x, y) of the target pixel, that is, correction using a tone curve.

トーンカーブ補正の補正量、すなわち、ある入力値に対する出力値を求めるには、輝度低周波成分を用いた補正の出力値がこの入力値となる輝度低周波成分を用いた補正の入力値を求め、この入力値に対する補正量の目標値を算出すれば良い。図11にその算出例を示す。図11の1101は補正の目標値を示す曲線、1102は輝度低周波成分を用いた補正量を示す曲線であり、それぞれ入力輝度値に対する出力輝度値のデータを持つ離散的なルックアップテーブルで構成される。   To obtain the correction amount for tone curve correction, that is, the output value for a certain input value, obtain the input value for correction using the low-frequency luminance component for which the output value for correction using the low-frequency luminance component is this input value. The target value of the correction amount for this input value may be calculated. FIG. 11 shows an example of the calculation. In FIG. 11, reference numeral 1101 denotes a curve indicating a target value for correction, and 1102 denotes a curve indicating a correction amount using a low-frequency luminance component, each of which includes a discrete look-up table having output luminance value data for the input luminance value. Is done.

トーンカーブ補正のルックアップテーブルは、“入力値(α)に対する輝度低周波成分を用いた補正の出力値(β)”を入力値(β)とした時に、“入力値(α)に対する補正量の目標値(γ)”が出力値(γ)となっていれば良い。図11において、値α1及びβ1に対応するγ1と、値α2及びβ2に対応するγ2が、それぞれ、トーンカーブ補正のルックアップテーブルを構成する点である。ここで、輝度低周波成分を用いた補正及び補正量の目標値はとびとびの値を持つルックアップテーブルであるので、線形補間によりデータを補間して各値の算出を行う。   The tone curve correction look-up table shows that when the “output value (β) of correction using a low-frequency luminance component for the input value (α)” is the input value (β), the “correction amount for the input value (α)” Of the target value (γ) ”of the output value (γ). In FIG. 11, γ1 corresponding to the values α1 and β1 and γ2 corresponding to the values α2 and β2 respectively constitute a look-up table for tone curve correction. Here, the correction and correction amount target values using the low-frequency luminance component are look-up tables having discrete values, so that each value is calculated by interpolating data by linear interpolation.

また、この処理のフローチャートを図12に示す。図12のステップS1201で、まずトーンカーブ補正の入力輝度値と輝度低周波成分を用いた補正のルックアップテーブルの入力輝度値を、画像が取り得る最小輝度値(例えば0)に初期化する。   A flowchart of this process is shown in FIG. In step S1201 of FIG. 12, first, the input luminance value of the tone curve correction and the input luminance value of the correction lookup table using the low-frequency luminance component are initialized to the minimum luminance value (for example, 0) that the image can take.

続くステップS1202で、トーンカーブ補正の入力輝度値と、輝度低周波成分を用いた補正の入力輝度値に対する出力輝度値を比較する。前者の方が大きい場合(ステップS1202でNo)は、輝度低周波成分を用いた補正の入力輝度値を次の輝度値に置き換えて、ステップS1202に進む(ステップS1204)。   In subsequent step S1202, the input luminance value for tone curve correction is compared with the output luminance value for the input luminance value for correction using the luminance low frequency component. If the former is larger (No in step S1202), the correction input luminance value using the luminance low frequency component is replaced with the next luminance value, and the process proceeds to step S1202 (step S1204).

後者の方が大きいまたは前者の後者が同じである場合(ステップS1202でYes)は、下記の線形補間を用いた式(4)によりトーンカーブ補正の出力輝度値Y[i]を決定する(ステップS1203)。   If the latter is larger or the former latter is the same (Yes in step S1202), the output luminance value Y [i] for tone curve correction is determined by the following equation (4) using linear interpolation (step S1202). S1203).

但し、iはトーンカーブ補正の入力輝度値、jは輝度低周波成分を用いた補正の入力輝度値である。また、Y1[i]は入力輝度値iに対する補正の目標輝度値であり、Y2[i]は入力輝度値iに対する輝度低周波成分を用いた補正の出力輝度値である。   Here, i is an input luminance value for tone curve correction, and j is an input luminance value for correction using a low-frequency luminance component. Y1 [i] is a target luminance value for correction with respect to the input luminance value i, and Y2 [i] is an output luminance value for correction using a luminance low-frequency component with respect to the input luminance value i.

続くステップS1205で、トーンカーブ補正の入力輝度値が画像が取り得る最大輝度値(たとえば255)まで終了したかどうかを判定する。最大輝度値でなければ、続くステップS1206で、トーンカーブ補正の入力輝度値を次の輝度値に置き換えてステップS1202に進み、最大輝度値であれば処理を終了する。以上の処理により、トーンカーブ補正のためのルックアップテーブルを作成することができる。   In subsequent step S1205, it is determined whether or not the input luminance value of tone curve correction has been completed up to the maximum luminance value (for example, 255) that the image can take. If it is not the maximum luminance value, in step S1206, the input luminance value for tone curve correction is replaced with the next luminance value, and the process proceeds to step S1202. If the luminance value is the maximum luminance value, the process ends. With the above processing, a lookup table for tone curve correction can be created.

本実施形態では、まず輝度低周波成分を用いた補正の補正量を決定し、目標値の補正量に対する残りの補正量をトーンカーブ補正により補正するように、トーンカーブ補正の補正量を算出した。しかし、本発明はこれに限るものではなく、例えば、先にトーンカーブ補正の補正量を決定し、目標値の補正量に対する残りの補正量を輝度低周波成分を用いて補正するように、輝度低周波成分を用いた補正の補正量を算出しても良い。この場合も、輝度低周波成分を用いた補正を、注目画素の輝度値Y(x,y)のみを用いた補正と近似すれば、輝度低周波成分を用いた補正とトーンカーブ補正は同等の処理と見なせるので、本実施形態と同様の処理を行えば良い。   In this embodiment, first, the correction amount of the correction using the low-frequency luminance component is determined, and the correction amount of the tone curve correction is calculated so that the remaining correction amount with respect to the correction amount of the target value is corrected by the tone curve correction. . However, the present invention is not limited to this. For example, the correction amount of the tone curve correction is first determined, and the remaining correction amount with respect to the correction amount of the target value is corrected using the luminance low-frequency component. A correction amount of correction using the low frequency component may be calculated. Also in this case, if the correction using the luminance low frequency component is approximated to the correction using only the luminance value Y (x, y) of the target pixel, the correction using the luminance low frequency component and the tone curve correction are equivalent. Since it can be regarded as a process, the same process as in this embodiment may be performed.

以上説明したように、本実施形態によれば、撮影画像の階調補正を行う際に、撮影画像から主被写体の情報及び撮影画像のヒストグラムの情報を取得し、これら情報に基づき撮影画像の階調補正の目標値を算出した。そして、輝度低周波成分を用いた補正とトーンカーブ補正による階調補正のそれぞれの補正量を算出し、輝度低周波成分を用いた補正とトーンカーブ補正により画像の階調補正を行うようにした。このような補正を行うことにより、明るさ及びコントラストが良好である画像補正結果を得ることができる。   As described above, according to the present embodiment, when performing gradation correction of a captured image, information on the main subject and information on the histogram of the captured image are acquired from the captured image, and the level of the captured image is based on these information. The target value for tone correction was calculated. Then, the respective correction amounts of the correction using the luminance low frequency component and the tone correction by the tone curve correction are calculated, and the tone correction of the image is performed by the correction using the luminance low frequency component and the tone curve correction. . By performing such correction, an image correction result with good brightness and contrast can be obtained.

また、ユーザの操作により輝度低周波成分を用いた補正の強さを決めることができるようにした。これにより、コントラストの強さに係わるユーザの画質の好みに応じて輝度低周波成分を用いた補正の補正量とトーンカーブ補正の補正量を容易に決めることができる。   In addition, the correction strength using the low-frequency luminance component can be determined by the user's operation. As a result, the correction amount using the low-frequency luminance component and the correction amount for tone curve correction can be easily determined according to the user's image quality preference related to contrast strength.

(第2の実施形態)
第1の実施形態では、撮影画像の主被写体の情報または撮影画像のヒストグラムから補正の目標値を決めており、カメラの撮影条件による画質への影響を補正の目標値の決定のために考慮していなかった。
(Second Embodiment)
In the first embodiment, the correction target value is determined from the information of the main subject of the captured image or the histogram of the captured image, and the influence on the image quality due to the shooting conditions of the camera is taken into consideration for the determination of the correction target value. It wasn't.

本実施形態では、撮影条件の一例としてISO感度の設定に応じて補正の目標値の設定を行う。補正の目標値の決定フローは第1の実施形態と同様である。しかし、本実施形態では、第1の実施形態の図7に示す補正テーブルをISO感度毎に有している点で異なる。   In the present embodiment, a correction target value is set according to the ISO sensitivity setting as an example of the shooting condition. The flow for determining the correction target value is the same as that in the first embodiment. However, the present embodiment is different in that the correction table shown in FIG. 7 of the first embodiment is provided for each ISO sensitivity.

一例を図13に示す。ISO感度の設定が、200,400,800でそれぞれ補正テーブルが異なっている。ISO感度の設定は撮影前においてユーザ設定等により実行され、撮影実行時においては、設定されたISO感度に対応したテーブルが読み出され、図7に示したものと同様の補間処理がなされ、目標値のルックアップテーブルが作成される。   An example is shown in FIG. The correction tables are different for ISO sensitivity settings of 200, 400, and 800, respectively. The ISO sensitivity is set by user settings before shooting, and at the time of shooting, a table corresponding to the set ISO sensitivity is read, and interpolation processing similar to that shown in FIG. A value lookup table is created.

このように、ISO感度に応じた複数の補正テーブルを有することで、それぞれのISO感度で撮影による画質への影響を考慮したより適切な補正の目標値を決定することができる。   Thus, by having a plurality of correction tables according to the ISO sensitivity, it is possible to determine a more appropriate correction target value in consideration of the influence on the image quality due to shooting at each ISO sensitivity.

Claims (8)

撮影画像の階調補正の目標値を算出する算出手段と、
前記撮影画像から輝度成分画像である第1の画像と前記輝度成分画像の低周波成分画像である第2の画像とを抽出する抽出手段と、
前記第1の画像と前記第2の画像とを用いて前記撮影画像に対して暗い部分を明るくする第1の階調補正処理を行う第1の階調補正処理手段と、
トーンカーブ補正により前記撮影画像に対して暗い部分を明るくする第2の階調補正処理を行う第2の階調補正処理手段と、
ユーザの操作入力に応じて階調補正レベルを設定する設定手段と、
記設定手段により設定された階調補正レベルに基づいて前記第1の階調補正処理の補正量及び前記第2の階調補正処理の補正量のいずれか一方を決定し、当該決定された補正量と前記算出手段により算出された目標値とに基づいて前記第1の階調補正処理の補正量及び前記第2の階調補正処理の補正量の他方を決定する決定手段と、
を有することを特徴とする画像処理装置。
A calculation means for calculating a target value for gradation correction of the captured image;
Extraction means for extracting a first image that is a luminance component image and a second image that is a low-frequency component image of the luminance component image from the captured image;
First gradation correction processing means for performing first gradation correction processing for brightening a dark portion of the captured image using the first image and the second image;
Second tone correction processing means for performing second tone correction processing for brightening a dark portion of the captured image by tone curve correction;
Setting means for setting a gradation correction level according to a user operation input;
One of the correction amount and the correction amount of the second gradation correction process of the first gradation correction processing determined based on the gradation correction level set by the pre-Symbol setting means, which is the determined Determining means for determining the other of the correction amount of the first gradation correction processing and the correction amount of the second gradation correction processing based on the correction amount and the target value calculated by the calculation means ;
An image processing apparatus comprising:
前記決定手段は、前記第1の階調補正処理の補正量と前記第2の階調補正処理の補正量とで前記算出手段により算出された目標値となるように、前記他方の補正量を決定することを特徴とする請求項1に記載の画像処理装置。The determining means sets the other correction amount so that the correction amount of the first gradation correction process and the correction amount of the second gradation correction process become the target values calculated by the calculation means. The image processing apparatus according to claim 1, wherein the determination is performed. 前記算出手段は、前記撮影画像のヒストグラムの情報に基づいて前記目標値を算出することを特徴とする請求項1または2に記載の画像処理装置。 It said calculating means, an image processing apparatus according to claim 1 or 2, characterized in that for calculating the target value based on the information of the histogram of the captured image. 前記算出手段は、前記撮影画像の暗部側の輝度ヒストグラムに基づいて前記目標値を算出することを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 3 , wherein the calculation unit calculates the target value based on a luminance histogram on a dark side of the photographed image. 前記算出手段は、前記撮影画像の明部側の輝度ヒストグラムに基づいて前記目標値を算出することを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 3 , wherein the calculation unit calculates the target value based on a brightness histogram on a bright part side of the photographed image. 前記算出手段は、前記撮影画像の暗部側の輝度ヒストグラム及び明部側の輝度ヒストグラムに基づいて前記目標値を算出することを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 3 , wherein the calculation unit calculates the target value based on a luminance histogram on a dark part side and a luminance histogram on a bright part side of the photographed image. 前記算出手段は、ISO感度に基づいて前記目標値を算出することを特徴とする請求項1または2に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the calculation unit calculates the target value based on ISO sensitivity. 撮影画像の階調補正の目標値を算出する算出工程と、
前記撮影画像から輝度成分画像である第1の画像と前記輝度成分画像の低周波成分画像である第2の画像とを抽出する抽出工程と、
前記第1の画像と前記第2の画像とを用いて前記撮影画像に対して暗い部分を明るくする第1の階調補正処理を行う第1の階調補正処理工程と、
トーンカーブ補正により前記撮影画像に対して暗い部分を明るくする第2の階調補正処理を行う第2の階調補正処理工程と、
ユーザの操作入力に応じて階調補正レベルを設定する設定工程と、
記設定工程により設定された階調補正レベルに基づいて前記第1の階調補正処理の補正量及びと前記第2の階調補正処理の補正量のいずれか一方を決定し、当該決定された補正量と前記算出工程により算出された目標値とに基づいて前記第1の階調補正処理の補正量及び前記第2の階調補正処理の補正量の他方とを決定する決定工程と、
を有することを特徴とする画像処理方法。
A calculation step of calculating a target value for gradation correction of the captured image;
An extraction step of extracting a first image that is a luminance component image and a second image that is a low-frequency component image of the luminance component image from the captured image;
A first gradation correction processing step of performing a first gradation correction process that brightens a dark portion of the captured image using the first image and the second image;
A second gradation correction processing step of performing a second gradation correction process for brightening a dark portion of the captured image by tone curve correction;
A setting step for setting a gradation correction level according to a user operation input;
Determining one of the correction amount and the correction amount of the second gradation correction process of the first gradation correction processing based on the gradation correction level set by the previous SL setting step is the decision A determination step of determining the other of the correction amount of the first gradation correction processing and the correction amount of the second gradation correction processing based on the correction amount and the target value calculated by the calculation step ;
An image processing method comprising:
JP2013051960A 2013-03-14 2013-03-14 Image processing apparatus and image processing method Active JP5627730B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013051960A JP5627730B2 (en) 2013-03-14 2013-03-14 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013051960A JP5627730B2 (en) 2013-03-14 2013-03-14 Image processing apparatus and image processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2012136985A Division JP5225491B2 (en) 2012-06-18 2012-06-18 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2013127818A JP2013127818A (en) 2013-06-27
JP5627730B2 true JP5627730B2 (en) 2014-11-19

Family

ID=48778262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013051960A Active JP5627730B2 (en) 2013-03-14 2013-03-14 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5627730B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015088784A (en) 2013-10-28 2015-05-07 キヤノン株式会社 Imaging device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002044451A (en) * 2000-07-19 2002-02-08 Canon Inc Image processor and method therefor
JP2005252711A (en) * 2004-03-04 2005-09-15 Fuji Photo Film Co Ltd Photographing system using digital still camera and photographing control method
JP2008072604A (en) * 2006-09-15 2008-03-27 Canon Inc Image processing system, apparatus, medium, and program

Also Published As

Publication number Publication date
JP2013127818A (en) 2013-06-27

Similar Documents

Publication Publication Date Title
JP5100565B2 (en) Image processing apparatus and image processing method
EP1302898B1 (en) System and method for digital image tone mapping using an adaptive sigmoidal function based on perceptual preference guidelines
TWI416940B (en) Image processing apparatus and image processing program
JP5343726B2 (en) Image processing apparatus and image processing program
JP4645921B2 (en) Image signal processing apparatus and method, program, and imaging apparatus
JP2000228747A (en) Picture processor
JP5901667B2 (en) Image processing apparatus and method, image processing program, and imaging apparatus
JP6004757B2 (en) Image processing apparatus and image processing method
JP5392560B2 (en) Image processing apparatus and image processing method
JP5235759B2 (en) Image processing apparatus, image processing method, and program
JP2017037357A (en) Image processing device, program and recording medium
JP2011228807A (en) Image processing program, image processing apparatus, and image processing method
JP6611576B2 (en) Image processing apparatus and image processing method
JP2006295582A (en) Image processor, imaging apparatus, and image processing program
US11503215B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium that notify a user of a region in which tone characteristics can be restored
JP5225491B2 (en) Image processing apparatus and image processing method
JP5932392B2 (en) Image processing apparatus and image processing method
JP5591026B2 (en) Imaging apparatus and control method thereof
JP5627730B2 (en) Image processing apparatus and image processing method
JP5743456B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6786273B2 (en) Image processing equipment, image processing methods, and programs
JP4120928B2 (en) Image processing apparatus, image processing method, and program thereof
JP5561389B2 (en) Image processing program, image processing apparatus, electronic camera, and image processing method
JP2017211725A (en) Image processing device, image processing method, and program
JP2020182163A (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140317

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140930

R151 Written notification of patent or utility model registration

Ref document number: 5627730

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151