JP2009200743A - Image processor, image processing method, image processing program and imaging apparatus - Google Patents

Image processor, image processing method, image processing program and imaging apparatus Download PDF

Info

Publication number
JP2009200743A
JP2009200743A JP2008039253A JP2008039253A JP2009200743A JP 2009200743 A JP2009200743 A JP 2009200743A JP 2008039253 A JP2008039253 A JP 2008039253A JP 2008039253 A JP2008039253 A JP 2008039253A JP 2009200743 A JP2009200743 A JP 2009200743A
Authority
JP
Japan
Prior art keywords
luminance
tone curve
specific target
histogram
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008039253A
Other languages
Japanese (ja)
Inventor
Manabu Yamada
学 山田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2008039253A priority Critical patent/JP2009200743A/en
Publication of JP2009200743A publication Critical patent/JP2009200743A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

【課題】 複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、画像内の特定の対象領域(の明るさや階調が最適となるようにする。
【解決手段】 画像データ全体から特定対象領域を検出する特定対象領域検出手段27と、特定対象領域検出手段27で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出手段28と、所定の輝度ヒストグラムからトーンカーブを生成するトーンカーブ生成手段23と、トーンカーブ生成手段23によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正手段24とを有している。
【選択図】 図3
PROBLEM TO BE SOLVED: To optimize the brightness and gradation of a specific target region (in an image) according to various shooting conditions without preparing a plurality of sets of feature histograms and tone curves in advance.
SOLUTION: A specific target region detecting unit 27 for detecting a specific target region from the entire image data, and a histogram relating to luminance of the specific target region image data detected by the specific target region detecting unit 27 is calculated as a specific target region luminance histogram. The specific target region luminance histogram calculation means 28, the tone curve generation means 23 for generating a tone curve from a predetermined luminance histogram, and the image data corrected by the tone curve generated by the tone curve generation means 23 are used as output image data. And an image correction means 24.
[Selection] Figure 3

Description

本発明は、画像処理装置および画像処理方法および画像処理プログラムおよび撮像装置に関する。   The present invention relates to an image processing device, an image processing method, an image processing program, and an imaging device.

デジタルカメラなどの撮像装置には、一般に、露出の最適化のための自動露出制御機構が組み込まれている。その露出制御方式としては、画面を複数の領域に分割して測光し、それら領域の光量の加重平均値に応じて露出を制御する平均測光方式、画面の中央部分を重点的に測光することにより露出を制御する中央重点測光方式、画面の局所点を測光して露出を制御するスポット測光方式が一般に採用されている。   An imaging apparatus such as a digital camera generally incorporates an automatic exposure control mechanism for optimizing exposure. As the exposure control method, the screen is divided into a plurality of areas and metered, and the average metering system that controls the exposure according to the weighted average value of the light quantity in those areas, by focusing on the central part of the screen A center-weighted metering method for controlling the exposure and a spot metering method for controlling the exposure by metering a local point on the screen are generally employed.

このような自動露出制御機構を備えた撮像装置であっても、たとえば逆光での撮影などでは、適正な露出調整が困難なことが少なくない。   Even in an imaging apparatus equipped with such an automatic exposure control mechanism, it is often difficult to perform proper exposure adjustment, for example, in shooting with backlight.

例えば、被写体の真後ろに太陽が存在するような状態では、背景と被写体との輝度差が大きいため、平均測光方式や中央重点測光方式では、被写体が黒くつぶれてしまう。また、空などの背景部分が白くとぶことが多い。スポット測光方式によれば、真逆光でも被写体が黒くつぶれないように露出を制御できるが、空などの背景に白とびを生じやすい。また、スポット測光方式でも、画面内での測光枠の位置や大きさが一定であるため、様々な撮影条件で常に被写体の適正露出を実現できるわけではない。   For example, in a state where the sun is directly behind the subject, the luminance difference between the background and the subject is large, so that the subject is blacked out in the average metering method or the center-weighted metering method. Also, the background part such as the sky often flickers white. According to the spot metering method, the exposure can be controlled so that the subject is not blacked out even with true backlight, but overexposure tends to occur in the background such as the sky. Even in the spot photometry method, the position and size of the photometry frame in the screen are constant, so that it is not always possible to achieve proper exposure of the subject under various shooting conditions.

そこで、このような適正露出を実現するのが難しいシーンにおいても適正露出での撮影をするために、いろいろな対策が提案されている。   In view of this, various measures have been proposed in order to shoot with appropriate exposure even in such a scene where it is difficult to achieve appropriate exposure.

例えば特許文献1では、輝度ヒストグラムの二極化度合いを評価することで逆光状態を真逆光かそれ以外の逆光であるかを判断し、それぞれに対し適したダイナミックレンジ補正とトーンカーブ補正を実施する手法が提案されている。この手法では逆光シーンについての考慮をしており、その他のシーンにおいては適正な補正はなされないという問題がある。   For example, in Patent Document 1, it is determined whether the backlight state is true backlight or other backlight by evaluating the degree of polarization of the luminance histogram, and dynamic range correction and tone curve correction suitable for each are performed. A method has been proposed. In this method, a backlight scene is considered, and there is a problem that proper correction is not performed in other scenes.

また、特許文献2では、典型的な複数の撮像シーンに対応する特徴ヒストグラムとそれに対応するトーンカーブをあらかじめもっておき、撮像画像のヒストグラムとの近似度を求め、最も近似度の高い特徴ヒストグラムに対応したトーンカーブを近似度に基づいて補正し、そのトーンカーブを用いて撮像画像の階調補正を行う、という手法が提案されている。この手法によれば、多くのシーンにおいて撮像画像の階調補正を行うことが可能となるが、あらかじめ複数の組の特徴ヒストグラムとトーンカーブを用意しておかなければならないという問題がある。
特開2002−92607号公報 特開2007−067907号公報
In Patent Document 2, a feature histogram corresponding to a plurality of typical captured scenes and a tone curve corresponding to the feature histogram are prepared in advance, and the degree of approximation with the histogram of the captured image is obtained, and the feature histogram having the highest degree of approximation is supported. A method has been proposed in which the tone curve is corrected based on the degree of approximation, and the tone correction of the captured image is performed using the tone curve. According to this method, it is possible to perform gradation correction of captured images in many scenes, but there is a problem that a plurality of sets of feature histograms and tone curves must be prepared in advance.
JP 2002-92607 A JP 2007-0697907

本発明は、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、画像内の特定の対象領域(例えば、人物の顔)の明るさや階調が最適となるようにすることの可能な画像処理装置および画像処理方法および画像処理プログラムおよび撮像装置を提供することを目的としている。   The present invention optimizes the brightness and gradation of a specific target area (for example, a person's face) in an image according to various shooting conditions without preparing a plurality of sets of feature histograms and tone curves in advance. An object of the present invention is to provide an image processing apparatus, an image processing method, an image processing program, and an imaging apparatus that can be configured as follows.

上記目的を達成するために、請求項1記載の発明は、輝度情報を有する画像データ全体から特定対象領域を検出する特定対象領域検出手段と、
輝度情報を有する画像データ全体のうち、前記特定対象領域検出手段で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出手段と、
トーンカーブを生成するトーンカーブ生成手段と、
トーンカーブ生成手段によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正手段とを有し、
前記トーンカーブ生成手段は、初期のトーンカーブが予め与えられているときに、前記特定対象領域輝度ヒストグラムから算出した特定対象領域画像データの平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理装置である。
In order to achieve the above object, the invention according to claim 1 is a specific target area detecting means for detecting a specific target area from the entire image data having luminance information,
Specific target area luminance histogram calculating means for calculating a histogram relating to the luminance of the specific target area image data detected by the specific target area detection means among the entire image data having luminance information;
A tone curve generating means for generating a tone curve;
Image correction means for correcting the image data with the tone curve generated by the tone curve generation means to obtain output image data,
The tone curve generation means corresponds to the tone curve when the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is used as an input value when an initial tone curve is given in advance. The image processing apparatus is characterized in that a new tone curve is generated by correcting the initial tone curve so that the output value becomes the median value of the output value range width of the initial tone curve.

また、請求項2記載の発明は、請求項1記載の画像処理装置において、
さらに、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出手段を有し、
前記トーンカーブ生成手段は、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect,
Furthermore, it has an overall luminance histogram calculation means for calculating a histogram relating to the luminance of the entire image data having luminance information as an overall luminance histogram,
The tone curve generation means corrects the initial tone curve, and then divides the entire luminance histogram into two luminance regions, a high luminance side and a low luminance side, with an average luminance point of the specific target region image data as a boundary. In addition, the corrected tone curve is divided into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. ,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected to generate a new tone curve so that the corresponding output value becomes the median value of the output value range of each tone curve.

また、請求項3記載の発明は、請求項2記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントを境にして前記各輝度領域における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域にさらに分割するとともに、前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントおよび各トーンカーブの出力値変域幅の中央値を境にして、各トーンカーブをさらに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
According to a third aspect of the present invention, in the image processing apparatus according to the second aspect,
The tone curve generating means includes
The entire luminance histogram in each luminance region is further divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point calculated from the entire luminance histogram in each luminance region as a boundary, and each luminance region Each tone curve is further divided on the basis of the average luminance point calculated from the overall luminance histogram and the median value of the output value range width of each tone curve,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected to generate a new tone curve so that the corresponding output value becomes the median value of the output value range of each tone curve.

また、請求項4記載の発明は、請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、所定回数繰り返して行い、新たなトーンカーブを生成することを特徴としている。
According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect,
The tone curve generating means includes
The luminance area and tone curve dividing process and the tone curve correcting process are repeated a predetermined number of times to generate a new tone curve.

また、請求項5記載の発明は、請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、整数値での輝度領域の分割ができなくなるまで繰り返して行い、新たなトーンカーブを生成することを特徴としている。
The invention according to claim 5 is the image processing apparatus according to claim 3,
The tone curve generating means includes
The luminance area and tone curve dividing process and the tone curve correcting process are repeated until the luminance area cannot be divided by an integer value to generate a new tone curve.

また、請求項6記載の発明は、請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
ある輝度領域について整数値での分割ができなくなったときには、整数値での分割ができる輝度領域についてのみ、前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を行い、新たなトーンカーブを生成することを特徴としている。
According to a sixth aspect of the present invention, in the image processing apparatus according to the third aspect,
The tone curve generating means includes
When a certain luminance area cannot be divided by an integer value, only the luminance area that can be divided by an integer value is subjected to the dividing process of the luminance area and the tone curve, and the correction process of the tone curve, and a new It is characterized by generating a tone curve.

また、請求項7記載の発明は、請求項1乃至請求項6のいずれか一項に記載の画像処理装置において、前記特定対象領域検出手段は、前記特定対象領域として人物の顔領域を検出するようになっており、前記特定対象領域輝度ヒストグラム算出手段は、特定対象領域画像データとして人物の顔領域の画像データの輝度ヒストグラムを特定対象領域輝度ヒストグラムとして算出することを特徴としている。   The invention according to claim 7 is the image processing apparatus according to any one of claims 1 to 6, wherein the specific target area detecting unit detects a human face area as the specific target area. The specific target area luminance histogram calculating means calculates the luminance histogram of the image data of the human face area as the specific target area image data as the specific target area luminance histogram.

また、請求項8記載の発明は、請求項7記載の画像処理装置において、前記特定対象領域検出手段によって検出された人物の顔領域が複数の場合には、前記特定対象領域輝度ヒストグラムから算出される特定対象領域画像データの前記平均輝度ポイントは、前記検出された複数の顔領域の輝度中心であることを特徴としている。   The invention according to claim 8 is the image processing apparatus according to claim 7, wherein when there are a plurality of human face areas detected by the specific target area detecting means, the human face area is calculated from the specific target area luminance histogram. The average luminance point of the specific target area image data is a luminance center of the detected plurality of face areas.

また、請求項9記載の発明は、請求項7記載の画像処理装置において、前記特定対象領域検出手段によって検出された人物の顔領域が複数の場合には、前記検出された複数の顔領域に優先順位を設定し、前記特定対象領域輝度ヒストグラムから算出される特定対象領域画像データの前記平均輝度ポイントは、最も優先順位の高い顔領域の輝度中心であることを特徴としている。   The invention according to claim 9 is the image processing apparatus according to claim 7, wherein when there are a plurality of human face areas detected by the specific target area detecting means, the detected face areas A priority order is set, and the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is the luminance center of the face area having the highest priority.

また、請求項10記載の発明は、請求項9記載の画像処理装置において、前記優先順位は、顔領域の大きさ、または、顔までの距離に基づいて設定されることを特徴としている。   According to a tenth aspect of the present invention, in the image processing apparatus according to the ninth aspect, the priority is set based on a size of a face area or a distance to the face.

また、請求項11記載の発明は、輝度情報を有する画像データ全体から特定対象領域を検出する特定対象領域検出工程と、
輝度情報を有する画像データ全体のうち、前記特定対象領域検出工程で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出工程と、
トーンカーブを生成するトーンカーブ生成工程と、
トーンカーブ生成工程によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正工程とを有し、
前記トーンカーブ生成工程では、初期のトーンカーブが予め与えられているときに、特定対象領域輝度ヒストグラムから算出した特定対象領域画像データの平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理方法である。
The invention according to claim 11 is a specific target region detecting step of detecting a specific target region from the entire image data having luminance information,
A specific target region luminance histogram calculating step for calculating a histogram relating to the luminance of the specific target region image data detected in the specific target region detection step among the entire image data having luminance information;
A tone curve generation process for generating a tone curve;
An image correction step of correcting the image data with the tone curve generated by the tone curve generation step to obtain output image data,
In the tone curve generation step, when an initial tone curve is given in advance, the corresponding output on the tone curve when the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is used as an input value The image processing method is characterized in that a new tone curve is generated by correcting the initial tone curve so that the value becomes the median value of the output value range width of the initial tone curve.

また、請求項12記載の発明は、請求項12記載の画像処理方法において、
さらに、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出工程を有し、
前記トーンカーブ生成工程では、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
The invention according to claim 12 is the image processing method according to claim 12,
Furthermore, it has an overall luminance histogram calculation step for calculating a histogram relating to the luminance of the entire image data having luminance information as an overall luminance histogram,
In the tone curve generation step, after correcting the initial tone curve, the entire luminance histogram is divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point of the specific target region image data as a boundary. In addition, the corrected tone curve is divided into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. ,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected to generate a new tone curve so that the corresponding output value becomes the median value of the output value range of each tone curve.

また、請求項13記載の発明は、請求項12記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントを境にして前記各輝度領域における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域にさらに分割するとともに、前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントおよび各トーンカーブの出力値変域幅の中央値を境にして、各トーンカーブをさらに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
The invention according to claim 13 is the image processing method according to claim 12,
In the tone curve generation step,
The entire luminance histogram in each luminance region is further divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point calculated from the entire luminance histogram in each luminance region as a boundary, and each luminance region Each tone curve is further divided on the basis of the average luminance point calculated from the overall luminance histogram and the median value of the output value range width of each tone curve,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected to generate a new tone curve so that the corresponding output value becomes the median value of the output value range of each tone curve.

また、請求項14記載の発明は、請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、所定回数繰り返して行い、新たなトーンカーブを生成することを特徴としている。
The invention according to claim 14 is the image processing method according to claim 13,
In the tone curve generation step,
The luminance area and tone curve dividing process and the tone curve correcting process are repeated a predetermined number of times to generate a new tone curve.

また、請求項15記載の発明は、請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、
整数値での輝度領域の分割ができなくなるまで繰り返して行い、新たなトーンカーブを生成することを特徴としている。
The invention described in claim 15 is the image processing method described in claim 13,
In the tone curve generation step,
The luminance area and tone curve dividing process, and the tone curve correcting process,
The process is repeated until it becomes impossible to divide the luminance area with integer values, and a new tone curve is generated.

また、請求項16記載の発明は、請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
ある輝度領域について整数値での分割ができなくなったときには、整数値での分割ができる輝度領域についてのみ、前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を行い、新たなトーンカーブを生成することを特徴としている。
The invention described in claim 16 is the image processing method described in claim 13,
In the tone curve generation step,
When a certain luminance area cannot be divided by an integer value, only the luminance area that can be divided by an integer value is subjected to the dividing process of the luminance area and the tone curve, and the correction process of the tone curve, and a new It is characterized by generating a tone curve.

また、請求項17記載の発明は、請求項11乃至請求項16のいずれか一項に記載の画像処理方法における処理をコンピュータに実現させるための画像処理プログラムである。   The invention according to claim 17 is an image processing program for causing a computer to execute the processing in the image processing method according to any one of claims 11 to 16.

また、請求項18記載の発明は、請求項1乃至請求項10のいずれか一項に記載の画像処理装置を用いたことを特徴とする撮像装置である。   The invention according to claim 18 is an image pickup apparatus using the image processing apparatus according to any one of claims 1 to 10.

本発明によれば、輝度情報を有する画像データ全体から特定対象領域を検出する特定対象領域検出手段と、
輝度情報を有する画像データ全体のうち、前記特定対象領域検出手段で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出手段と、
トーンカーブを生成するトーンカーブ生成手段と、
トーンカーブ生成手段によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正手段とを有し、
前記トーンカーブ生成手段は、初期のトーンカーブが予め与えられているときに、前記特定対象領域輝度ヒストグラムから算出した特定対象領域画像データの平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成するので、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、画像内の特定の対象領域(例えば、人物の顔)の明るさや階調が最適となるようにすることができる。
According to the present invention, the specific target area detecting means for detecting the specific target area from the entire image data having luminance information,
Specific target area luminance histogram calculating means for calculating a histogram relating to the luminance of the specific target area image data detected by the specific target area detection means among the entire image data having luminance information;
A tone curve generating means for generating a tone curve;
Image correction means for correcting the image data with the tone curve generated by the tone curve generation means to obtain output image data,
The tone curve generation means corresponds to the tone curve when the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is used as an input value when an initial tone curve is given in advance. The initial tone curve is corrected so that the output value becomes the median value of the output value range of the initial tone curve, and a new tone curve is generated. Even if it is not prepared in advance, the brightness and gradation of a specific target area (for example, a human face) in an image can be optimized according to various shooting situations.

さらに、本発明によれば、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出手段をさらに有し、
前記トーンカーブ生成手段は、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成するので、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、画像内の特定の対象領域(例えば、人物の顔)の明るさや階調が最適となるようにすることができるとともに、画像データ全体の明るさや階調にも適合したトーンカーブを作成(補正)することができる。
Furthermore, according to the present invention, there is further provided an overall luminance histogram calculating means for calculating a histogram relating to the luminance of the entire image data having luminance information as an overall luminance histogram,
The tone curve generation means corrects the initial tone curve, and then divides the entire luminance histogram into two luminance regions, a high luminance side and a low luminance side, with an average luminance point of the specific target region image data as a boundary. In addition, the corrected tone curve is divided into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. ,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected so that the corresponding output value becomes the median of the output value range width of each tone curve, and a new tone curve is generated. Even without preparing a curve in advance, the brightness and gradation of a specific target area (for example, a human face) in an image can be optimized according to various shooting conditions, and image data A tone curve suitable for the overall brightness and gradation can be created (corrected).

以下、本発明を実施するための最良の形態を図面に基づいて説明する。本発明は、画像データの階調補正機能を有するデジタルカメラなどの撮像装置に適用される画像処理に関するものである。なお、以下では、説明の便宜上、本発明をデジタルカメラ(デジタルスチルカメラ)に適用するとして説明する。すなわち、撮像装置がデジタルカメラ(デジタルスチルカメラ)であるとして説明する。   Hereinafter, the best mode for carrying out the present invention will be described with reference to the drawings. The present invention relates to image processing applied to an imaging apparatus such as a digital camera having a tone correction function for image data. In the following description, for convenience of explanation, the present invention is described as being applied to a digital camera (digital still camera). That is, description will be made assuming that the imaging device is a digital camera (digital still camera).

本発明は、1つのトーンカーブをコントロールすることにより、様々な撮影状況に応じて、画像内の特定の対象領域(例えば、人物の顔)の明るさや階調が最適となるようにすることの可能な画像処理装置および画像処理方法および画像処理プログラムおよび撮像装置を提供するものである。   According to the present invention, by controlling one tone curve, the brightness and gradation of a specific target region (for example, a human face) in an image are optimized according to various shooting situations. An image processing apparatus, an image processing method, an image processing program, and an imaging apparatus are provided.

この場合、本発明では、1本のトーンカーブを画像内の特定の対象領域(例えば、人物の顔)および画像全体に応じて部分的に補正して階調補正に使用するので、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、画像内の特定の対象領域(例えば、人物の顔)の明るさや階調が最適となるようにすることができる。   In this case, in the present invention, one tone curve is partially corrected according to a specific target region (for example, a human face) in the image and the entire image and used for gradation correction. Even if the feature histogram and tone curve are not prepared in advance, the brightness and gradation of a specific target area (for example, a human face) in an image can be optimized according to various shooting conditions. it can.

従って、本発明は、画像データの階調補正機能を有するデジタルカメラなどの撮像装置への適用に特に適している。なお、以下では、説明の便宜上、本発明をデジタルカメラ(デジタルスチルカメラ)に適用するとして説明する。すなわち、撮像装置がデジタルカメラ(デジタルスチルカメラ)であるとして説明する。   Therefore, the present invention is particularly suitable for application to an imaging apparatus such as a digital camera having a function of correcting the gradation of image data. In the following description, for convenience of explanation, the present invention is described as being applied to a digital camera (digital still camera). That is, description will be made assuming that the imaging device is a digital camera (digital still camera).

図1は本発明の画像処理が適用される撮像装置としてのデジタルスチルカメラの外観図、図2はデジタルスチルカメラのハードウェア構成例を示す図である。   FIG. 1 is an external view of a digital still camera as an imaging apparatus to which the image processing of the present invention is applied, and FIG. 2 is a diagram illustrating a hardware configuration example of the digital still camera.

最初にデジタルスチルカメラの動作概要を説明する。   First, an outline of the operation of the digital still camera will be described.

図1の撮影/再生切り替えのモードダイアルを撮影モードに設定し、電源釦を押すことで、カメラが記録モードで起動する。モードダイアルおよび電源釦は図2における操作部に含まれており、モードダイアルの状態が撮影モードの状態で電源釦がONになったことをCPUが検知すると、CPUはモータドライバを制御して、鏡胴ユニットを撮影可能位置に移動させる。さらに撮像センサー、LCDディスプレイ等の各部に電源を投入して動作を開始させる。   1 is set to the shooting mode and the power button is pressed, the camera is activated in the recording mode. The mode dial and the power button are included in the operation unit in FIG. 2. When the CPU detects that the mode dial is in the shooting mode and the power button is turned on, the CPU controls the motor driver, Move the lens barrel unit to a position where it can be photographed. Furthermore, power is turned on to each part such as an image sensor and an LCD display to start operation.

各部の電源が投入されると、ファインダモードの動作が開始する。   When the power of each part is turned on, the finder mode operation starts.

ファインダモードでは、レンズを通して撮像センサー(CCD,CMOS)に入射した光は、電気に変換されてA/D変換器に送られる。A/D変換器では、入力されたアナログ信号を12bitのデジタルデータ(デジタル信号)に変換する。デジタル信号に変換されたそれぞれの信号は、デジタル信号処理IC内のセンサーI/F部に取り込まれ、YUV変換部で表示可能な形式であるYUV信号に変換されて、メモリコントローラによってフレームメモリに書き込まれる。このYUV信号はメモリコントローラに読み出されて、表示出力制御部を介してTVやLCDモニタへ送られて表示が行われる。この処理が1/30秒間隔で行われ、1/30秒ごとに更新されるファインダモードの表示となる。   In the finder mode, light incident on the image sensor (CCD, CMOS) through the lens is converted into electricity and sent to the A / D converter. The A / D converter converts the input analog signal into 12-bit digital data (digital signal). Each signal converted into a digital signal is taken into the sensor I / F unit in the digital signal processing IC, converted into a YUV signal that can be displayed by the YUV conversion unit, and written to the frame memory by the memory controller. It is. The YUV signal is read by the memory controller and sent to the TV or LCD monitor via the display output control unit for display. This process is performed at 1/30 second intervals, and a finder mode display updated every 1/30 seconds is obtained.

この撮像センサーは800万画素のセンサーであり、静止画撮影時は全画素を1/30秒ごとに出力することができ、ファインダモード時は周辺画素を加算と間引きを組み合わせて、1/30秒ごと例えば640×480画素に画素数を減らして出力を行う。   This image sensor is an 8 million pixel sensor that can output all pixels every 1/30 seconds during still image shooting. In the viewfinder mode, the surrounding pixels are combined with decimation and thinning out for 1/30 seconds. For example, the number of pixels is reduced to 640 × 480 pixels for output.

また、デジタル信号処理ICのセンサーI/Fは、ブロック内に取り込まれたデジタルRGB信号より、画面の合焦度合いを示すAF評価値と、被写体輝度を検出したAE評価値と、被写体色を検出したAWB評価値を算出する。それらデータは、特徴データとしてCPUに読み出されて、AE、AF、AWBのそれぞれの処理に利用される。   The sensor I / F of the digital signal processing IC detects an AF evaluation value indicating the degree of focusing on the screen, an AE evaluation value that detects the subject brightness, and a subject color from the digital RGB signal captured in the block. The calculated AWB evaluation value is calculated. These data are read out as feature data to the CPU and used for each of AE, AF, and AWB processes.

AF評価値は、例えば高周波成分抽出フィルタの出力積分値や、近接画素の輝度差の積分値によって作成される。合焦状態にあるときは、被写体のエッジ部分がはっきりとしているため、高周波成分が一番高くなる。これを利用して、AFによる合焦検出動作時は、それぞれのフォーカスレンズ位置におけるAF評価値を取得して、その極大になる点を合焦位置としてAFを実行する。   The AF evaluation value is created by, for example, an output integrated value of a high frequency component extraction filter or an integrated value of a luminance difference between adjacent pixels. When in the in-focus state, the edge portion of the subject is clear, so the high frequency component is the highest. By utilizing this, at the time of the focus detection operation by AF, the AF evaluation value at each focus lens position is acquired, and AF is executed with the point where the maximum is obtained as the focus position.

AE評価値とAWB評価値は、RGBのそれぞれの積分値から作成される。例えば画面を256エリアに等分割(水平16分割、垂直16分割)し、それぞれのエリアのRGB積算を算出する。CPUはRGB積分値を読み出し、AEでは、それぞれのエリアの輝度を算出して、輝度分布から適正な露光時間を決定する。AWBでは、RGBの分布から光源の色に合わせたAWBの制御値を決定する。このAEとAWBの処理は、ファインダモード中は連続的に行われている。   The AE evaluation value and the AWB evaluation value are created from the respective RGB integration values. For example, the screen is equally divided into 256 areas (16 horizontal divisions and 16 vertical divisions), and the RGB integration of each area is calculated. The CPU reads the RGB integration values, and in AE, the brightness of each area is calculated, and an appropriate exposure time is determined from the brightness distribution. In AWB, an AWB control value that matches the color of the light source is determined from the RGB distribution. The AE and AWB processes are continuously performed during the finder mode.

図1のレリーズシャッタボタンが操作されると、合焦位置検出であるAF動作と静止画記録処理が行われる。   When the release shutter button of FIG. 1 is operated, an AF operation that is a focus position detection and a still image recording process are performed.

すなわち、レリーズシャッタボタンが押されると、図2のカメラ操作部から静止画撮影開始信号がCPUに取り込まれ、これにより、CPUがフレームレートに同期してモータドライバを介してレンズを駆動ことによって山登りAFを実行する。AF対象範囲が無限から至近までの全領域であった場合、フォーカスレンズは至近から無限、または無限から至近までの間の各フォーカス位置移動し、デジタル信号処理ICで作成された各フレーム(=各フォーカス位置)におけるAF評価値をCPUが読み出す。各フォーカス位置のAF評価値が極大になる点を合焦位置として、フォーカスレンズを合焦位置に移動する。   That is, when the release shutter button is pressed, a still image shooting start signal is taken into the CPU from the camera operation unit of FIG. 2, and the CPU drives the lens via the motor driver in synchronization with the frame rate, thereby climbing the mountain. Execute AF. When the AF target range is the entire region from infinity to close, the focus lens moves to each focus position from close to infinity, or from infinity to close, and each frame (= each) created by the digital signal processing IC The CPU reads the AF evaluation value at the (focus position). The focus lens is moved to the in-focus position with the point at which the AF evaluation value at each focus position is maximized as the in-focus position.

AF完了後に、画像は撮像センサーによりデジタルRGB信号に変換されて出力され、デジタル信号処理ICを介してフレームメモリに格納される。デジタルRGB信号は再度デジタル信号処理ICに読み込まれ、YUV変換部でYUVデータに変換されて、フレームメモリに書き戻される。   After the AF is completed, the image is converted into a digital RGB signal by the image sensor and output, and stored in the frame memory via the digital signal processing IC. The digital RGB signal is read again into the digital signal processing IC, converted into YUV data by the YUV converter, and written back to the frame memory.

スチル画像撮像時はYUV変換された画像データがデジタル信号処理IC内の画像圧縮伸張回路に送られる。画像圧縮伸張回路に送られたYUVデータは圧縮され、フレームメモリに書き戻される。フレームメモリの圧縮データはデジタル信号処理ICを介して読み出され、データ記憶メモリに格納される。   At the time of capturing a still image, YUV converted image data is sent to an image compression / decompression circuit in the digital signal processing IC. The YUV data sent to the image compression / decompression circuit is compressed and written back to the frame memory. The compressed data in the frame memory is read through the digital signal processing IC and stored in the data storage memory.

図3は本発明の画像処理装置の構成例を示す図である。図3を参照すると、本発明の画像処理装置は、画像データが入力する時、入力画像データのサイズを変換する画像サイズ変換手段21と、
画像サイズ変換手段21によってサイズが変換された画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出手段22と、
画像サイズ変換手段21によってサイズが変換された画像データ全体から特定対象領域を検出する特定対象領域検出手段27と、
画像サイズ変換手段21によってサイズが変換された画像データ全体のうち、前記特定対象領域検出手段で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出手段28と、
所定の輝度ヒストグラムからトーンカーブを生成するトーンカーブ生成手段23と、
トーンカーブ生成手段23によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正手段(トーンマップ処理手段)24とを有している。
FIG. 3 is a diagram showing a configuration example of the image processing apparatus of the present invention. Referring to FIG. 3, the image processing apparatus of the present invention includes an image size conversion means 21 that converts the size of input image data when the image data is input,
An overall brightness histogram calculating means 22 for calculating a histogram relating to the brightness of the entire image data whose size has been converted by the image size converting means 21 as an overall brightness histogram;
A specific target region detecting unit 27 for detecting a specific target region from the entire image data whose size has been converted by the image size converting unit 21;
A specific target area luminance histogram for calculating a histogram related to the luminance of the specific target area image data detected by the specific target area detection means from among the entire image data whose size has been converted by the image size conversion means 21. Calculating means 28;
Tone curve generating means 23 for generating a tone curve from a predetermined luminance histogram;
An image correction unit (tone map processing unit) 24 that outputs image data by correcting the image data with the tone curve generated by the tone curve generation unit 23 is provided.

ここで、トーンカーブとは、横軸を入力画像情報、縦軸を出力画像情報とした場合の入出力変換特性(関数)のことである。すなわち、トーンカーブは、それぞれの入力画像の輝度値を対応した出力画像の輝度値に変換する関数として定義されている。このように、トーンカーブを適用して、入力画像に対する出力画像を得る(あるいは所定の補正を行う)ことを、一般的に、トーンマッピング(トーンマップ処理)と呼んでいる。   Here, the tone curve is an input / output conversion characteristic (function) when the horizontal axis is input image information and the vertical axis is output image information. That is, the tone curve is defined as a function for converting the luminance value of each input image into the luminance value of the corresponding output image. Thus, obtaining the output image for the input image by applying the tone curve (or performing a predetermined correction) is generally called tone mapping (tone map processing).

また、画像サイズ変換手段21は、入力画像データが十分に小さなサイズのものとなっている場合には、これを機能させずに、入力画像データを特定対象領域検出手段27,特定対象領域輝度ヒストグラム算出手段28,全体輝度ヒストグラム算出手段22に直接与えることもできる。すなわち、この場合、画像サイズ変換手段21は必要ではなく、特定対象領域検出手段27は、入力画像データから直接に特定対象領域を検出し、また、特定対象領域輝度ヒストグラム算出手段28は、直接に入力画像データの特定対象領域輝度に関する特定対象領域輝度ヒストグラムとして算出する、また、全体輝度ヒストグラム算出手段22は、直接に入力画像データ全体の輝度に関する全体輝度ヒストグラムを算出することができる。   Further, when the input image data has a sufficiently small size, the image size conversion means 21 does not function the input image data, and converts the input image data into the specific target area detection means 27, the specific target area luminance histogram. It can also be directly given to the calculation means 28 and the overall luminance histogram calculation means 22. That is, in this case, the image size conversion means 21 is not necessary, the specific target area detection means 27 detects the specific target area directly from the input image data, and the specific target area luminance histogram calculation means 28 directly The specific target area luminance histogram related to the specific target area luminance of the input image data is calculated. Further, the overall luminance histogram calculation means 22 can directly calculate the total luminance histogram related to the luminance of the entire input image data.

しかし、実際には入力画像データ(撮像された画像データ)は大サイズのものであり、輝度ヒストグラムなどを求める際の演算量を減らし、全体の処理をさらに高速化するため、(大サイズの)入力画像そのものの輝度データではなく、画像サイズ変換手段21によって入力画像データのサイズを縮小して、表示装置用モニタリング(スルー)画像などの縮小画像の輝度ヒストグラムなどを用いることが一般的である。縮小画像を用いても入力画像の輝度ヒストグラムなどの傾向は同じであるため、求められる(本発明により補正済みの)トーンカーブに大きな違いはなく、トーンマッピング(トーンカーブを用いた画像変換・補正実施)の際にも補正済みトーンカーブに、元のサイズ(大きいサイズ)の画像を入力し出力画像に変換出力するので画質の劣化はなく、トータルでの高速化の効果の方が大きい。   However, in actuality, the input image data (captured image data) is of a large size, so that the amount of calculation when obtaining a luminance histogram and the like is reduced, and the overall processing is further accelerated. In general, instead of the luminance data of the input image itself, the size of the input image data is reduced by the image size conversion means 21, and a luminance histogram of a reduced image such as a display device monitoring (through) image is used. Even if the reduced image is used, the tendency of the input image such as the luminance histogram is the same, so there is no significant difference in the required tone curve (corrected according to the present invention), and tone mapping (image conversion / correction using the tone curve). In the case of implementation), the original size (large size) image is input to the corrected tone curve and converted into an output image, so there is no deterioration in image quality, and the effect of speeding up is greater.

また、特定対象領域検出手段27は、特定対象領域として、例えば人物の顔領域を検出するようになっている。   Further, the specific target area detecting means 27 detects, for example, a human face area as the specific target area.

被写体像の中から人物の顔領域を検出する仕方としては、以下の文献に示す手法が知られており、特定対象領域検出手段27は、以下の文献に示されている仕方のいずれかを用いることにより、人物の顔領域を検出することができる。   As a method of detecting a person's face area from a subject image, the technique shown in the following document is known, and the specific target area detecting means 27 uses any of the methods shown in the following document. Thus, the face area of the person can be detected.

すなわち、文献「テレビジョン学会誌Vol.49、No.6、pp.787−797(1995)の「顔領域抽出に有効な修正HSV表色系の提案」」に示されているような、カラー画像をモザイク画像化し、肌色領域に着目して顔領域を抽出する仕方を用いて、人物の顔領域を検出することができる。   That is, the color as shown in the document “Proposal of a modified HSV color system effective for face area extraction” in the TV Society Journal Vol. 49, No. 6, pp. 787-797 (1995). A person's face area can be detected using a method of extracting an image from a mosaic image and extracting the face area by focusing on the skin color area.

また、文献「電子情報通信学会誌Vol.74−D−II、No.11、pp.1625−1627(1991)の「静止濃淡情景画像からの顔領域を抽出する手法」」に示されているような、髪や目や口など正面人物像の頭部を構成する各部分に関する幾何学的な形状特徴を利用して正面人物の頭部領域を抽出する仕方を用いて、人物の顔領域を検出することができる。   Further, it is described in the document “Method for extracting a face region from a still gray scene image” in the Journal of the Institute of Electronics, Information and Communication Engineers Vol. 74-D-II, No. 11, pp. 1625-1627 (1991). Using the method of extracting the head area of the front person using the geometric shape features of each part constituting the head of the front person image such as hair, eyes and mouth, Can be detected.

また、文献「画像ラボ1991−11(1991)の「テレビ電話用顔領域検出とその効果」」に示されるような、動画像の場合、フレーム間の人物の微妙な動きによって発生する人物像の輪郭エッジを利用して正面人物像を抽出する仕方を用いて、人物の顔領域を検出することができる。   In the case of a moving image as shown in the document “Image Face Detection for Videophone and its Effect” in Image Lab 1991-11 (1991), a human image generated by a subtle movement of a person between frames is used. The face area of a person can be detected by using a method of extracting a front person image using a contour edge.

ところで、本発明では、トーンカーブ生成手段23は、画像データ毎の輝度ヒストグラムを使用して、最適なトーンカーブを生成するようになっている。具体的には、トーンカーブ生成手段23は、輝度ヒストグラムから得られる輝度の平均値を利用して、最適なトーンカーブを生成するようになっている。すなわち、トーンカーブ生成手段23は、所定の輝度ヒストグラムから得られる輝度の平均値を入力とした時のトーンカーブ上の対応する出力値を最適な階調出力範囲へ設定させるように補正前のトーンカーブを補正して新たなトーンカーブとして生成するようになっており、このようにして生成された新たなトーンカーブを用いて画像(階調)補正を行うことによって、画像毎に最適な階調補正を行うことができる。   By the way, in the present invention, the tone curve generating means 23 generates an optimum tone curve using a luminance histogram for each image data. Specifically, the tone curve generating means 23 generates an optimum tone curve using an average value of luminance obtained from the luminance histogram. That is, the tone curve generating means 23 sets the tone value before correction so that the corresponding output value on the tone curve when the average value of luminance obtained from a predetermined luminance histogram is input is set to the optimum gradation output range. The curve is corrected to generate a new tone curve, and the optimal tone for each image is obtained by performing image (gradation) correction using the new tone curve generated in this way. Correction can be performed.

以下、本発明のトーンカーブ生成手段23について詳述する。なお、以下の説明では、特定対象領域検出手段27は、特定対象領域として、人物の顔領域を検出するようになっているものとする。すなわち、特定対象領域は、人物の顔領域であるとする。   Hereinafter, the tone curve generating means 23 of the present invention will be described in detail. In the following description, it is assumed that the specific target area detection unit 27 detects a human face area as the specific target area. That is, it is assumed that the specific target area is a human face area.

本発明の第1の形態では、トーンカーブ生成手段23は、初期のトーンカーブが予め与えられているときに、特定対象領域輝度ヒストグラム(人物の顔領域の画像データの輝度ヒストグラム(顔領域輝度ヒストグラム))から算出した特定対象領域画像データ(人物の顔領域の画像データ)の平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。   In the first embodiment of the present invention, the tone curve generating means 23 is configured to specify a specific target region luminance histogram (a luminance histogram of image data of a human face region (a face region luminance histogram) when an initial tone curve is given in advance. )), The corresponding output value on the tone curve when the average luminance point of the specific target area image data (image data of the human face area) calculated from (2) is used as the input value is the output value range width of the initial tone curve. The initial tone curve is corrected to a median value, and a new tone curve is generated.

図4,図5,図6,図7は、本発明の第1の形態におけるトーンカーブ生成手段23の処理動作を説明するための図である。   4, 5, 6 and 7 are diagrams for explaining the processing operation of the tone curve generating means 23 in the first embodiment of the present invention.

なお、図4は画像データの一例を示す図である。すなわち、図4は人物の写った画像の例であり、顔の部分にある矩形Fが、その範囲で顔が検出されていることを示している。顔領域の輝度ヒストグラム(顔領域輝度ヒストグラム)は、この矩形領域F内を対象として作成される。また、図5は図4の画像データの特定対象領域輝度ヒストグラム(人物の顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム))の例を示す図、図6は図4の画像データの特定対象領域輝度ヒストグラムが図5である場合における新たなトーンカーブの生成処理を説明するための図である。   FIG. 4 is a diagram illustrating an example of image data. That is, FIG. 4 is an example of an image in which a person is shown, and a rectangle F in the face portion indicates that a face is detected in that range. The brightness histogram of the face area (face area brightness histogram) is created for the rectangular area F. 5 is a diagram illustrating an example of the specific target region luminance histogram (luminance histogram of the image data of the human face region F (face region luminance histogram)) of the image data of FIG. 4, and FIG. 6 is a diagram of the image data of FIG. FIG. 6 is a diagram for explaining a new tone curve generation process in a case where the specific target region luminance histogram is FIG.

初期のトーンカーブは、図6に符号31で示すように予め与えられているとする。また、図5の特定対象領域輝度ヒストグラムから算出した顔領域Fの画像データの平均輝度ポイントが、図6において符号A0で示すものであるとするとき、トーンカーブ生成手段23は、図6に示すように、図5の特定対象領域輝度ヒストグラムから算出した顔領域Fの画像データの平均輝度ポイントA0を入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブ31の出力値変域幅(出力輝度値変域幅)y0の中央値H0となる様に前記初期のトーンカーブ31を補正して、新たなトーンカーブ32を生成する。   It is assumed that the initial tone curve is given in advance as indicated by reference numeral 31 in FIG. Further, assuming that the average luminance point of the image data of the face area F calculated from the specific target area luminance histogram of FIG. 5 is indicated by the symbol A0 in FIG. 6, the tone curve generating means 23 is shown in FIG. Thus, the corresponding output value on the tone curve when the average luminance point A0 of the image data of the face area F calculated from the specific target area luminance histogram of FIG. The initial tone curve 31 is corrected so as to be the median value H0 of the band width (output luminance value range width) y0, and a new tone curve 32 is generated.

すなわち、顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム)が図5に示した例の様な場合は、顔領域Fの画像データは全体的に暗い画像であり、顔領域輝度ヒストグラムが暗部(左)側に寄っていることがわかる。   That is, when the brightness histogram (face area brightness histogram) of the image data of the face area F is as in the example shown in FIG. 5, the image data of the face area F is an overall dark image, and the face area brightness histogram is It can be seen that it is close to the dark part (left).

図6の例では、顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム)から求めた顔領域Fの画像データの平均輝度ポイントA0をトーンカーブ31上の入力位置とした時のトーンカーブ31上の対応するポイントをトーンカーブ31の出力値変域幅(出力輝度値変域幅)y0の中央値H0に持ってくる操作により、2つの折れ線(トーンカーブ)33,34からなる新たなトーンカーブ32が生成される。ここで、初期のトーンカーブ31は、入出力特性がリニアな基本トーンカーブであり、顔領域Fの画像データの輝度平均を入力ポイントとした場合の補正配置点がP1となることで、2つの折れ線(トーンカーブ)33,34からなる新たなトーンカーブ32が生成される。   In the example of FIG. 6, the tone curve 31 when the average luminance point A0 of the image data of the face region F obtained from the luminance histogram (face region luminance histogram) of the image data of the face region F is set as the input position on the tone curve 31. A new tone consisting of two broken lines (tone curves) 33 and 34 is obtained by bringing the corresponding point above to the median value H0 of the output value range width (output brightness value range width) y0 of the tone curve 31. A curve 32 is generated. Here, the initial tone curve 31 is a basic tone curve with linear input / output characteristics, and the correction arrangement point when the luminance average of the image data of the face region F is set as the input point is P1, so that two A new tone curve 32 composed of broken lines (tone curves) 33 and 34 is generated.

上記のように生成された新たなトーンカーブ32を適用して画像を補正すると、特定対象領域輝度ヒストグラム(人物の顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム))は、図7のようになる。補正前の特定対象領域輝度ヒストグラム(人物の顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム))である図5と比較すると、特定対象領域輝度ヒストグラム(顔領域輝度ヒストグラム)全体の形状が明るい方向に移動していることがわかる。よって、暗い顔領域画像が階調表現領域の中央に寄るように明るく補正されたことになる。   When the image is corrected by applying the new tone curve 32 generated as described above, the specific target region luminance histogram (luminance histogram of the image data of the human face region F (face region luminance histogram)) is shown in FIG. It becomes like this. Compared with FIG. 5 which is the specific target region luminance histogram (luminance histogram of the image data of the human face region F (face region luminance histogram)) before correction, the shape of the entire specific target region luminance histogram (face region luminance histogram) is You can see that it is moving in the bright direction. Therefore, the dark face area image is brightly corrected so as to be closer to the center of the gradation expression area.

このように、本発明の第1の形態では、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、顔領域Fの画像データの明るさや階調が最適となるようにすることができる(人物の顔部分を中心にトーンカーブをコントロールすることにより、人物の顔部分を最適な明るさにすること、および人物の顔部分の階調を最適にすることが可能となる)。   As described above, in the first embodiment of the present invention, the brightness and gradation of the image data of the face region F can be changed according to various shooting situations without preparing a plurality of sets of feature histograms and tone curves in advance. It can be optimized (by controlling the tone curve around the person's face, the person's face is set to the optimal brightness, and the gradation of the person's face is optimized. Is possible).

また、本発明の第2の形態では、トーンカーブ生成手段23は、さらに、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出手段22を有し、
前記トーンカーブ生成手段23は、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
In the second embodiment of the present invention, the tone curve generating unit 23 further includes an overall luminance histogram calculating unit 22 that calculates a histogram related to the luminance of the entire image data having luminance information as an overall luminance histogram,
The tone curve generation unit 23 corrects the initial tone curve, and then converts the entire luminance histogram into two luminance regions, a high luminance side and a low luminance side, with the average luminance point of the specific target region image data as a boundary. And dividing the corrected tone curve into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. And
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value Each tone curve is corrected to generate a new tone curve so that the corresponding output value becomes the median value of the output value range of each tone curve.

図8,図9,図10は、本発明の第2の形態におけるトーンカーブ生成手段23の処理動作を説明するための図である。なお、図8は図4の画像全体の輝度ヒストグラム(全体輝度ヒストグラム)の例を示す図である。また、図9は図6の新たなトーンカーブ32を示しており、図10は図6(図9)の新たなトーンカーブ32をさらに補正して新たなトーンカーブ35を生成する処理を説明するための図である。   8, 9, and 10 are diagrams for explaining the processing operation of the tone curve generating means 23 in the second embodiment of the present invention. FIG. 8 is a diagram showing an example of a luminance histogram (overall luminance histogram) of the entire image in FIG. FIG. 9 shows the new tone curve 32 of FIG. 6, and FIG. 10 explains the process of further correcting the new tone curve 32 of FIG. 6 (FIG. 9) to generate a new tone curve 35. FIG.

図9,図10を参照すると、図5の特定対象領域輝度ヒストグラム(顔領域輝度ヒストグラム)から算出した顔領域Fの画像データの平均輝度ポイントA0を境にして図8の全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域(入力輝度領域)x1,x2に分割するとともに、前記平均輝度ポイントA0および前記出力値変域幅y0の中央値H0を境にして、前記補正されたトーンカーブ32を前記2つの輝度領域(入力輝度領域)x1,x2に対応した2つのトーンカーブ33,34に分割し、
分割されたそれぞれの輝度領域(入力輝度領域)x1,x2における全体輝度ヒストグラムの平均輝度ポイントA1,A2を算出し、それぞれの輝度領域(入力輝度領域)x1,x2における全体輝度ヒストグラムの平均輝度ポイントA1,A2を入力値としたときの、各輝度領域(各入力輝度領域)x1,x2に対応するそれぞれのトーンカーブ33,34上の対応出力値が、それぞれのトーンカーブ33,34の出力値変域幅y1,y2の中央値H1,H2となる様に、それぞれのトーンカーブ33,34を補正して、新たなトーンカーブ35を生成する。
Referring to FIGS. 9 and 10, the entire luminance histogram of FIG. 8 is set to the high luminance with the average luminance point A0 of the image data of the face area F calculated from the specific target area luminance histogram (face area luminance histogram) of FIG. Is divided into two luminance regions (input luminance regions) x1 and x2 on the low-luminance side and the low-luminance side, and the correction is performed with the median value H0 of the average luminance point A0 and the output value range width y0 as a boundary The tone curve 32 is divided into two tone curves 33 and 34 corresponding to the two luminance regions (input luminance regions) x1 and x2.
The average luminance points A1 and A2 of the overall luminance histogram in each of the divided luminance areas (input luminance areas) x1 and x2 are calculated, and the average luminance points of the entire luminance histogram in the respective luminance areas (input luminance areas) x1 and x2 are calculated. When A1 and A2 are input values, the corresponding output values on the tone curves 33 and 34 corresponding to the luminance regions (respective input luminance regions) x1 and x2 are the output values of the tone curves 33 and 34, respectively. The tone curves 33 and 34 are corrected so that the median values H1 and H2 of the domain widths y1 and y2 are obtained, and a new tone curve 35 is generated.

すなわち、図6で説明した処理を行った後に、さらに図5の特定対象領域輝度ヒストグラム(顔領域輝度ヒストグラム)から算出した顔領域Fの画像データの輝度の平均値A0を境界値として、図9の様に画像データを暗部の領域x1と明部の領域x2に分割する。さらに、分割された各領域(各入力輝度領域)x1,x2において、領域(入力輝度領域)x1,x2毎の全体輝度ヒストグラムの平均輝度ポイントA1,A2を算出する。そして、得られた領域(入力輝度領域)x1,x2毎の平均輝度ポイントA1,A2を、領域(入力輝度領域)x1,x2毎のトーンカーブ33,34の入力ポイントとし、トーンカーブ33,34上の対応する出力ポイントを、出力値変域幅(出力輝度値変域幅)y1,y2の中央値H1,H2に配置する様に、領域(入力輝度領域)x1,x2毎のトーンカーブ33,34をそれぞれ図10に示す様なトーンカーブ35(36,37,38,39)に補正する。   That is, after the processing described in FIG. 6 is performed, the average brightness A0 of the image data of the face area F calculated from the specific target area brightness histogram (face area brightness histogram) in FIG. In this way, the image data is divided into a dark area x1 and a bright area x2. Further, in each divided area (each input brightness area) x1, x2, average brightness points A1, A2 of the overall brightness histogram for each area (input brightness area) x1, x2 are calculated. The obtained average luminance points A1 and A2 for the regions (input luminance regions) x1 and x2 are used as input points for the tone curves 33 and 34 for the regions (input luminance regions) x1 and x2, respectively. The tone curve 33 for each region (input luminance region) x1 and x2 is arranged so that the corresponding output point above is arranged at the median values H1 and H2 of the output value range width (output luminance value range width) y1 and y2. , 34 are corrected to tone curves 35 (36, 37, 38, 39) as shown in FIG.

本発明の第2の形態では、このような処理がなされることにより、複数の組の特徴ヒストグラムとトーンカーブをあらかじめ用意しておかずとも、様々な撮影状況に応じて、顔領域Fの画像データの明るさや階調が最適となるようにすることができる(人物の顔部分を中心にトーンカーブをコントロールすることにより、人物の顔部分を最適な明るさにすること、および人物の顔部分の階調を最適にすることが可能となる)とともに、画像データ全体の明るさや階調にも適合したトーンカーブを作成(補正)することができる。   In the second mode of the present invention, by performing such processing, the image data of the face region F can be obtained in accordance with various shooting situations without preparing a plurality of sets of feature histograms and tone curves in advance. The brightness and gradation of the person's face can be optimized (by controlling the tone curve around the person's face, the person's face can have the optimum brightness, and the person's face In addition, it is possible to optimize (tone) and to create (correct) a tone curve suitable for the brightness and gradation of the entire image data.

また、本発明の第3の形態では、トーンカーブ生成手段23は、さらに、前記各輝度領域(前記各入力輝度領域)における全体輝度ヒストグラムから算出した平均輝度ポイントを境にして前記各輝度領域(前記各入力輝度領域)における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域(入力輝度領域)にさらに分割するとともに、前記各輝度領域(前記各入力輝度領域)における全体輝度ヒストグラムから算出した平均輝度ポイントおよび各トーンカーブの出力値変域幅の中央値を境にして、各トーンカーブをさらに分割し、
分割されたそれぞれの輝度領域(入力輝度領域)における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域(入力輝度領域)における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域(各入力輝度領域)に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴としている。
In the third embodiment of the present invention, the tone curve generating means 23 further includes the luminance regions (where each luminance region (each input luminance region) is calculated with the average luminance point calculated from the entire luminance histogram as a boundary. The whole luminance histogram in each input luminance region) is further divided into two luminance regions (input luminance regions) on the high luminance side and low luminance side, and the whole luminance histogram in each luminance region (each input luminance region). Each tone curve is further divided with the average luminance point calculated from the above and the median of the output value range width of each tone curve as a boundary.
When the average luminance point of the whole luminance histogram in each divided luminance area (input luminance area) is calculated, and the average luminance point of the whole luminance histogram in each luminance area (input luminance area) is used as the input value, Correct each tone curve so that the corresponding output value on each tone curve corresponding to the brightness area (each input brightness area) becomes the median value of the output value range width of each tone curve, It is characterized by generating a simple tone curve.

図11は、本発明の第3の形態におけるトーンカーブ生成手段23の上記処理動作を説明するための図である。なお、図11は図10の新たなトーンカーブ35(36,37,38,39)をさらに補正して新たなトーンカーブ40を生成する処理を説明するための図である。   FIG. 11 is a diagram for explaining the above processing operation of the tone curve generating means 23 in the third mode of the present invention. FIG. 11 is a diagram for explaining a process of generating a new tone curve 40 by further correcting the new tone curve 35 (36, 37, 38, 39) of FIG.

図11を参照すると、トーンカーブ生成手段23は、前記各輝度領域(前記各入力輝度領域)x1,x2における全体輝度ヒストグラムから算出した平均輝度ポイントA1,A2を境にして前記各輝度領域(前記各入力輝度領域)x1,x2における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域(入力輝度領域)x3,x4,x5,x6にさらに分割するとともに、前記各輝度領域(前記各入力輝度領域)x1,x2における全体輝度ヒストグラムから算出した平均輝度ポイントA1,A2および各トーンカーブ33,34の出力値変域幅y1,y2の中央値H1,H2を境にして、各トーンカーブ35をさらに分割し(36,37,38,39とし)、
分割されたそれぞれの輝度領域(入力輝度領域)x3,x4,x5,x6における全体輝度ヒストグラムの平均輝度ポイントA3,A4,A5,A6を算出し、それぞれの輝度領域(入力輝度領域)x3,x4,x5,x6における全体輝度ヒストグラムの平均輝度ポイントA3,A4,A5,A6を入力値としたときの、各輝度領域(各入力輝度領域)x3,x4,x5,x6に対応するそれぞれのトーンカーブ36,37,38,39上の対応出力値が、それぞれのトーンカーブ36,37,38,39の出力値変域幅y3,y4,y5,y6の中央値H3,H4,H5,H6となる様に、それぞれのトーンカーブ36,37,38,39を補正して、新たなトーンカーブ40を生成する。
Referring to FIG. 11, the tone curve generating means 23 uses the luminance regions (the above-mentioned luminance regions (the input luminance regions) x1 and x2) from the average luminance points A1 and A2 calculated from the overall luminance histogram. The entire luminance histogram in each input luminance region) x1, x2 is further divided into two luminance regions (input luminance regions) x3, x4, x5, x6 on the high luminance side and low luminance side, Each tone with the average luminance points A1 and A2 calculated from the overall luminance histogram in each input luminance region x1 and x2 and the median values H1 and H2 of the output value range widths y1 and y2 of the tone curves 33 and 34 as boundaries. The curve 35 is further divided (36, 37, 38, 39),
Average luminance points A3, A4, A5, and A6 of the overall luminance histogram in each of the divided luminance areas (input luminance areas) x3, x4, x5, and x6 are calculated, and the respective luminance areas (input luminance areas) x3, x4 are calculated. , X5, x6, each tone curve corresponding to each luminance region (each input luminance region) x3, x4, x5, x6 when the average luminance points A3, A4, A5, A6 of the whole luminance histogram are input values. The corresponding output values on 36, 37, 38, 39 are the median values H3, H4, H5, H6 of the output value range widths y3, y4, y5, y6 of the respective tone curves 36, 37, 38, 39. Similarly, each tone curve 36, 37, 38, 39 is corrected to generate a new tone curve 40.

以上の処理をすべての輝度軸上の整数入力設定ポイントに対応するトーンカーブの輝度出力値が再配置されるまで繰り返すことで、顔領域Fの画像データに最適で画像データ全体をも考慮した、画像の明るさや階調を最適にするためのトーンカーブを最終的に生成することができる。   By repeating the above processing until the luminance output values of the tone curves corresponding to the integer input set points on all luminance axes are rearranged, the image data of the face area F is optimal and the entire image data is also considered. A tone curve for optimizing the brightness and gradation of the image can be finally generated.

図12は本発明の第1,第2,第3の形態におけるトーンカーブ生成手段23の処理の具体例を示すフローチャートである。   FIG. 12 is a flowchart showing a specific example of the processing of the tone curve generating means 23 in the first, second and third embodiments of the present invention.

図12を参照すると、まず、撮像光学系によって撮像された画像(図4に示したような画像)に対し、顔検出処理を実施して顔領域Fの情報を得た後に、図5に示したような顔領域Fの輝度ヒストグラム(顔領域輝度ヒストグラム)を算出する(S101)。   Referring to FIG. 12, first, face detection processing is performed on an image captured by the imaging optical system (an image as illustrated in FIG. 4) to obtain information on the face area F, and then the image is illustrated in FIG. 5. A brightness histogram (face area brightness histogram) of the face area F is calculated (S101).

次に、図5に示す顔領域の輝度ヒストグラム(顔領域輝度ヒストグラム)の平均値を算出し、図6に示すトーンカーブにおいて、入力が顔領域の輝度ヒストグラム(顔領域輝度ヒストグラム)の平均値であったときに、その出力値が中心値になるように(例えば出力が8bitであれば128になるように)、トーンカーブを補正する(S102)。そして、S101、S102で設定したポイントを境として、図8に示す全体輝度ヒストグラムを明部(x2)と暗部(x1)に分割する(S103)。   Next, the average value of the brightness histogram (face area brightness histogram) of the face area shown in FIG. 5 is calculated, and the input is the average value of the brightness histogram of the face area (face area brightness histogram) in the tone curve shown in FIG. If there is, the tone curve is corrected so that the output value becomes the center value (for example, 128 if the output is 8 bits) (S102). Then, the whole luminance histogram shown in FIG. 8 is divided into a bright part (x2) and a dark part (x1) with the point set in S101 and S102 as a boundary (S103).

次に、分割された全体輝度ヒストグラムに対し、分割された領域内で、低輝度側,高輝度側それぞれの全体輝度ヒストグラムの平均値を算出する(S104)。そして、入力がS105で算出したヒストグラムの平均値であるとしたときに、出力値が、S103で分割された領域の中での中心値となるようにトーンカーブを補正する(S105)。そして、S104で算出された低輝度側,高輝度側それぞれの全体輝度ヒストグラムの平均値を境として、さらに全体輝度ヒストグラム(分割ヒストグラム)を明部と暗部に分割する(S106)。   Next, for the divided overall luminance histogram, the average values of the whole luminance histograms on the low luminance side and the high luminance side are calculated in the divided area (S104). When the input is the average value of the histogram calculated in S105, the tone curve is corrected so that the output value becomes the center value in the region divided in S103 (S105). Then, the whole luminance histogram (divided histogram) is further divided into a bright part and a dark part with the average value of the whole luminance histograms on the low luminance side and high luminance side calculated in S104 as a boundary (S106).

その後は、分割された全体輝度ヒストグラム領域に対し、低輝度側,高輝度側のそれぞれで順次同様の処理を繰り返していき(S104〜S106を繰り返し行ない)、入力値の分解能分の分割が終了した時点で(S107)、トーンカーブの生成処理を終了する。   After that, the same processing is sequentially repeated for each of the divided overall luminance histogram regions on the low luminance side and the high luminance side (S104 to S106 are repeated), and the division for the resolution of the input value is completed. At the time (S107), the tone curve generation process ends.

上記処理によって算出されたトーンカーブを用いて画像をトーンマップ変換することにより、初回のトーンカーブ補正(S102)によって画像内に検出された人物顔部分が適正な明るさとなるようになる。また、顔領域以外の部分においても、2回目以降のトーンカーブ補正(S105)によって全体輝度ヒストグラムの度数が大きい画像内の主要な部分に対して多くの階調が割り当てられるようなトーンカーブになるため、画像内の階調が最適になるように補正される。   By performing tone map conversion of the image using the tone curve calculated by the above processing, the human face portion detected in the image by the first tone curve correction (S102) becomes appropriate brightness. Further, in a portion other than the face region, a tone curve in which many gradations are assigned to a main portion in an image having a large frequency of the entire luminance histogram by the second and subsequent tone curve corrections (S105). Therefore, correction is performed so that the gradation in the image is optimized.

このようにして、撮像光学系によって撮像された画像に対し、顔検出処理を実施して顔領域情報を得た後に、画像の明るさと階調を最適にするためのトーンカーブを生成する処理を行なうことができる。   In this manner, after performing face detection processing on the image captured by the imaging optical system to obtain face area information, processing for generating a tone curve for optimizing the brightness and gradation of the image is performed. Can be done.

なお、上述したトーンカーブの生成処理については、すべての輝度軸上の整数入力設定ポイントに対応するトーンカーブの輝度出力値が再配置されるまで行うことが理想的ではあるものの、処理負荷や処理時間などを考慮し、適宜所定回数や所定分割数などで処理を中断し、その時点で算出されたトーンカーブでの画像補正を行ってもよい。   The tone curve generation processing described above is ideally performed until the luminance output values of the tone curves corresponding to the integer input set points on all luminance axes are rearranged, but the processing load and processing In consideration of time or the like, the processing may be interrupted at a predetermined number of times or a predetermined number of divisions as appropriate, and image correction using the tone curve calculated at that time may be performed.

すなわち、トーンカーブ生成手段23は、
前記輝度領域(入力輝度領域)およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、所定回数繰り返して行い、新たなトーンカーブを生成することができる。
That is, the tone curve generation means 23
The luminance area (input luminance area) and tone curve dividing process and the tone curve correcting process are repeated a predetermined number of times to generate a new tone curve.

あるいは、トーンカーブ生成手段23は、
前記輝度領域(入力輝度領域)およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、整数値での輝度領域(入力輝度領域)の分割ができなくなるまで繰り返して行い、新たなトーンカーブを生成することができる。
Alternatively, the tone curve generating means 23
The brightness area (input brightness area) and tone curve dividing process, and the tone curve correction process are repeated until the brightness area (input brightness area) cannot be divided by an integer value, and a new tone curve is obtained. Can be generated.

あるいは、トーンカーブ生成手段23は、
ある輝度領域(入力輝度領域)について整数値での分割ができなくなったときには、整数値での分割ができる輝度領域(入力輝度領域)についてのみ、前記輝度領域(入力輝度領域)およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を行い、新たなトーンカーブを生成することができる。
Alternatively, the tone curve generating means 23
When a certain luminance area (input luminance area) cannot be divided by an integer value, the luminance area (input luminance area) and tone curve are divided only for the luminance area (input luminance area) that can be divided by an integer value. A new tone curve can be generated by performing the processing and the tone curve correction processing.

具体的に、例えば図11に示す処理において、仮に、輝度ヒストグラムの平均輝度ポイントA1とA0とが例えば隣り同士となり、領域(入力輝度領域)x4をもはや整数値で分割できなくなった場合には、この段階でトーンカーブの生成処理を終了させるか、あるいは、領域(入力輝度領域)x4以外の領域(入力輝度領域)x3,x5,x6についてのみ、トーンカーブの生成処理(補正処理)を続行させることができる。   Specifically, for example, in the process shown in FIG. 11, if the average luminance points A1 and A0 of the luminance histogram are adjacent to each other, for example, and the region (input luminance region) x4 can no longer be divided by integer values, At this stage, tone curve generation processing is terminated, or tone curve generation processing (correction processing) is continued only for regions (input luminance regions) x3, x5, and x6 other than region (input luminance region) x4. be able to.

また、上述の例では、特定対象領域検出手段27によって検出された人物の顔領域が1つであったが、特定対象領域検出手段27によって検出された人物の顔領域が複数の場合には、特定対象領域輝度ヒストグラム(顔領域輝度ヒストグラム)から算出される特定対象領域画像データの前記平均輝度ポイントを、前記検出された複数の顔領域の輝度中心とすることができる。   Further, in the above-described example, the face area of the person detected by the specific target area detection unit 27 is one, but when there are a plurality of human face areas detected by the specific target area detection unit 27, The average luminance point of the specific target area image data calculated from the specific target area luminance histogram (face area luminance histogram) can be set as the luminance center of the plurality of detected face areas.

あるいは、特定対象領域検出手段27によって検出された人物の顔領域が複数の場合には、検出された複数の顔領域に優先順位を設定し、特定対象領域輝度ヒストグラム(顔領域輝度ヒストグラム)から算出される特定対象領域画像データの前記平均輝度ポイントを、最も優先順位の高い顔領域の輝度中心とすることができる。ここで、優先順位は、例えば、顔領域の大きさ、または、顔までの距離に基づいて設定される。このように、検出された顔の中で最も主要な人物の顔の輝度ヒストグラム情報を使用する場合には、最も主要な人物の顔を最適な明るさにすること、および主要な人物の顔部分の階調を最適にすることが可能となる。   Alternatively, when there are a plurality of face areas of the person detected by the specific target area detection means 27, priority is set for the detected plurality of face areas, and calculation is performed from the specific target area luminance histogram (face area luminance histogram). The average luminance point of the specific target area image data to be processed can be set as the luminance center of the face area having the highest priority. Here, the priority order is set based on the size of the face area or the distance to the face, for example. As described above, when using the luminance histogram information of the face of the most important person among the detected faces, make the face of the most important person have an optimal brightness and the face portion of the main person. Can be optimized.

また、本発明では、後述のように特別なハードウェアを実装せずに実現でき、領域毎にトーンカーブを求めそれぞれを補正して、補正した画像を合成する方法に比べて、演算量も少なく、十分に高速である。   In addition, the present invention can be realized without mounting special hardware as will be described later, and the amount of calculation is small compared with a method of obtaining a tone curve for each region and correcting each to synthesize the corrected image. Fast enough.

前述したように、本発明の画像処理装置は、図2の例においては、CPUによって実現される。   As described above, the image processing apparatus of the present invention is realized by the CPU in the example of FIG.

そして、本発明を実施するための上述した各形態で説明した画像処理装置および画像処理方法における処理は、図2の例においては、CPUに実現させるプログラム(画像処理プログラム)の形で提供することができる。   The processing in the image processing apparatus and the image processing method described in the above embodiments for carrying out the present invention is provided in the form of a program (image processing program) that is realized by the CPU in the example of FIG. Can do.

また、本発明を実施するための上述した最良の形態で説明した画像処理装置における処理を例えばCPUに実現させるためのプログラムは、ハードディスク、フロッピー(登録商標)ディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、上記記録媒体を解して、インターネット等のネットワークを介して配布することができる。   The program for causing the CPU to execute the processing in the image processing apparatus described in the above-described best mode for carrying out the present invention is, for example, a hard disk, floppy (registered trademark) disk, CD-ROM, MO, DVD, etc. Are recorded on a computer-readable recording medium and executed by being read from the recording medium by the computer. Further, this program can be distributed via a network such as the Internet through the recording medium.

なお、上述の説明では、本発明の画像処理が適用される撮像装置がデジタルカメラであるとして説明したが、本発明の画像処理が適用される撮像装置は、必ずしもデジタルカメラに限定されない。
In the above description, the imaging apparatus to which the image processing of the present invention is applied is described as a digital camera. However, the imaging apparatus to which the image processing of the present invention is applied is not necessarily limited to a digital camera.

本発明の画像処理が適用される撮像装置としてのデジタルスチルカメラの外観図である。1 is an external view of a digital still camera as an imaging apparatus to which image processing of the present invention is applied. デジタルスチルカメラのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of a digital still camera. 本発明の画像処理装置の構成例を示す図である。It is a figure which shows the structural example of the image processing apparatus of this invention. 画像データの一例を示す図である。It is a figure which shows an example of image data. 図4の画像データの特定対象領域輝度ヒストグラム(人物の顔領域Fの画像データの輝度ヒストグラム(顔領域輝度ヒストグラム))の例を示す図である。FIG. 5 is a diagram illustrating an example of a specific target region luminance histogram (luminance histogram of image data of a human face region F (face region luminance histogram)) of the image data in FIG. 4; 本発明の第1の形態におけるトーンカーブ生成手段の処理動作を説明するための図である。It is a figure for demonstrating the processing operation of the tone curve production | generation means in the 1st form of this invention. 本発明のトーンカーブ生成手段によって生成された図6の新たなトーンカーブを適用して画像を補正したときの輝度ヒストグラムを示す図である。It is a figure which shows a brightness | luminance histogram when an image is correct | amended by applying the new tone curve of FIG. 6 produced | generated by the tone curve production | generation means of this invention. 図4の画像全体の輝度ヒストグラム(全体輝度ヒストグラム)の例を示す図である。It is a figure which shows the example of the brightness | luminance histogram (overall brightness histogram) of the whole image of FIG. 本発明の第2の形態におけるトーンカーブ生成手段の処理動作を説明するための図である。It is a figure for demonstrating the processing operation of the tone curve production | generation means in the 2nd form of this invention. 本発明の第2の形態におけるトーンカーブ生成手段の処理動作を説明するための図である。It is a figure for demonstrating the processing operation of the tone curve production | generation means in the 2nd form of this invention. 本発明の第3の形態におけるトーンカーブ生成手段の処理動作を説明するための図である。It is a figure for demonstrating the processing operation of the tone curve production | generation means in the 3rd form of this invention. 本発明のトーンカーブ生成処理の具体例を示すフローチャートである。It is a flowchart which shows the specific example of the tone curve production | generation process of this invention.

符号の説明Explanation of symbols

21 画像サイズ変換手段
22 輝度ヒストグラム算出手段
23 トーンカーブ生成手段
24 画像補正手段(トーンマップ処理手段)
27 特定対象領域検出手段
28 特定対象領域輝度ヒストグラム算出手段
21 Image size conversion means 22 Luminance histogram calculation means 23 Tone curve generation means 24 Image correction means (tone map processing means)
27 Specific target area detection means 28 Specific target area luminance histogram calculation means

Claims (18)

輝度情報を有する画像データ全体から特定対象領域を検出する特定対象領域検出手段と、
輝度情報を有する画像データ全体のうち、前記特定対象領域検出手段で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出手段と、
トーンカーブを生成するトーンカーブ生成手段と、
トーンカーブ生成手段によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正手段とを有し、
前記トーンカーブ生成手段は、初期のトーンカーブが予め与えられているときに、前記特定対象領域輝度ヒストグラムから算出した特定対象領域画像データの平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理装置。
Specific target area detecting means for detecting a specific target area from the entire image data having luminance information;
Specific target area luminance histogram calculating means for calculating a histogram relating to the luminance of the specific target area image data detected by the specific target area detection means among the entire image data having luminance information;
A tone curve generating means for generating a tone curve;
Image correction means for correcting the image data with the tone curve generated by the tone curve generation means to obtain output image data,
The tone curve generation means corresponds to the tone curve when the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is used as an input value when an initial tone curve is given in advance. An image processing apparatus for generating a new tone curve by correcting the initial tone curve so that an output value becomes a median of an output value range width of the initial tone curve.
請求項1記載の画像処理装置において、
さらに、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出手段を有し、
前記トーンカーブ生成手段は、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
Furthermore, it has an overall luminance histogram calculation means for calculating a histogram relating to the luminance of the entire image data having luminance information as an overall luminance histogram,
The tone curve generation means corrects the initial tone curve, and then divides the entire luminance histogram into two luminance regions, a high luminance side and a low luminance side, with an average luminance point of the specific target region image data as a boundary. In addition, the corrected tone curve is divided into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. ,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value A new tone curve is generated by correcting each tone curve so that the corresponding output value becomes the median value of the output value range width of each tone curve.
請求項2記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントを境にして前記各輝度領域における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域にさらに分割するとともに、前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントおよび各トーンカーブの出力値変域幅の中央値を境にして、各トーンカーブをさらに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 2.
The tone curve generating means includes
The entire luminance histogram in each luminance region is further divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point calculated from the entire luminance histogram in each luminance region as a boundary, and each luminance region Each tone curve is further divided on the basis of the average luminance point calculated from the overall luminance histogram and the median value of the output value range width of each tone curve,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value A new tone curve is generated by correcting each tone curve so that the corresponding output value becomes the median value of the output value range width of each tone curve.
請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、所定回数繰り返して行い、新たなトーンカーブを生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
The tone curve generating means includes
An image processing apparatus, wherein the luminance region and tone curve dividing process and the tone curve correcting process are repeated a predetermined number of times to generate a new tone curve.
請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、整数値での輝度領域の分割ができなくなるまで繰り返して行い、新たなトーンカーブを生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
The tone curve generating means includes
Image processing characterized by generating a new tone curve by repeatedly performing the luminance area and tone curve dividing process and the tone curve correcting process until the luminance area cannot be divided by an integer value. apparatus.
請求項3記載の画像処理装置において、
前記トーンカーブ生成手段は、
ある輝度領域について整数値での分割ができなくなったときには、整数値での分割ができる輝度領域についてのみ、前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を行い、新たなトーンカーブを生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
The tone curve generating means includes
When a certain luminance area cannot be divided by an integer value, only the luminance area that can be divided by an integer value is subjected to the dividing process of the luminance area and the tone curve, and the correction process of the tone curve, and a new An image processing apparatus that generates a tone curve.
請求項1乃至請求項6のいずれか一項に記載の画像処理装置において、前記特定対象領域検出手段は、前記特定対象領域として人物の顔領域を検出するようになっており、前記特定対象領域輝度ヒストグラム算出手段は、特定対象領域画像データとして人物の顔領域の画像データの輝度ヒストグラムを特定対象領域輝度ヒストグラムとして算出することを特徴とする画像処理装置。 7. The image processing apparatus according to claim 1, wherein the specific target area detecting unit detects a human face area as the specific target area. The luminance histogram calculating means calculates a luminance histogram of image data of a human face area as the specific target area image data as the specific target area luminance histogram. 請求項7記載の画像処理装置において、前記特定対象領域検出手段によって検出された人物の顔領域が複数の場合には、前記特定対象領域輝度ヒストグラムから算出される特定対象領域画像データの前記平均輝度ポイントは、前記検出された複数の顔領域の輝度中心であることを特徴とする画像処理装置。 8. The image processing apparatus according to claim 7, wherein the average luminance of the specific target area image data calculated from the specific target area luminance histogram when there are a plurality of human face areas detected by the specific target area detecting means. The image processing apparatus according to claim 1, wherein the point is a luminance center of the plurality of detected face areas. 請求項7記載の画像処理装置において、前記特定対象領域検出手段によって検出された人物の顔領域が複数の場合には、前記検出された複数の顔領域に優先順位を設定し、前記特定対象領域輝度ヒストグラムから算出される特定対象領域画像データの前記平均輝度ポイントは、最も優先順位の高い顔領域の輝度中心であることを特徴とする画像処理装置。 8. The image processing apparatus according to claim 7, wherein when there are a plurality of human face areas detected by the specific target area detecting means, priority is set for the detected plurality of face areas, and the specific target area is set. The image processing apparatus according to claim 1, wherein the average luminance point of the specific target area image data calculated from the luminance histogram is a luminance center of the face area having the highest priority. 請求項9記載の画像処理装置において、前記優先順位は、顔領域の大きさ、または、顔までの距離に基づいて設定されることを特徴とする画像処理装置。 The image processing apparatus according to claim 9, wherein the priority order is set based on a size of a face area or a distance to a face. 輝度情報を有する画像データ全体から特定対象領域を検出する特定対象領域検出工程と、
輝度情報を有する画像データ全体のうち、前記特定対象領域検出工程で検出された特定対象領域画像データの輝度に関するヒストグラムを特定対象領域輝度ヒストグラムとして算出する特定対象領域輝度ヒストグラム算出工程と、
トーンカーブを生成するトーンカーブ生成工程と、
トーンカーブ生成工程によって生成されたトーンカーブにより画像データを補正して出力画像データとする画像補正工程とを有し、
前記トーンカーブ生成工程では、初期のトーンカーブが予め与えられているときに、特定対象領域輝度ヒストグラムから算出した特定対象領域画像データの平均輝度ポイントを入力値とした時のトーンカーブ上の対応出力値が前記初期のトーンカーブの出力値変域幅の中央値となる様に前記初期のトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理方法。
A specific target area detecting step of detecting a specific target area from the entire image data having luminance information;
A specific target region luminance histogram calculating step for calculating a histogram relating to the luminance of the specific target region image data detected in the specific target region detection step among the entire image data having luminance information;
A tone curve generation process for generating a tone curve;
An image correction step of correcting the image data with the tone curve generated by the tone curve generation step to obtain output image data,
In the tone curve generation step, when an initial tone curve is given in advance, the corresponding output on the tone curve when the average luminance point of the specific target area image data calculated from the specific target area luminance histogram is used as an input value An image processing method, wherein a new tone curve is generated by correcting the initial tone curve so that a value becomes a median value of an output value range width of the initial tone curve.
請求項12記載の画像処理方法において、
さらに、輝度情報を有する画像データ全体の輝度に関するヒストグラムを全体輝度ヒストグラムとして算出する全体輝度ヒストグラム算出工程を有し、
前記トーンカーブ生成工程では、前記初期のトーンカーブを補正した後、前記特定対象領域画像データの平均輝度ポイントを境にして全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域に分割するとともに、前記特定対象領域画像データの平均輝度ポイントおよび前記出力値変域幅の中央値を境にして、前記補正されたトーンカーブを前記2つの輝度領域に対応した2つのトーンカーブに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理方法。
The image processing method according to claim 12.
Furthermore, it has an overall luminance histogram calculation step for calculating a histogram relating to the luminance of the entire image data having luminance information as an overall luminance histogram,
In the tone curve generation step, after correcting the initial tone curve, the entire luminance histogram is divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point of the specific target region image data as a boundary. In addition, the corrected tone curve is divided into two tone curves corresponding to the two luminance regions with the average luminance point of the specific target region image data and the median value of the output value range width as a boundary. ,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value A new tone curve is generated by correcting each tone curve so that the corresponding output value becomes the median value of the output value range width of each tone curve.
請求項12記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントを境にして前記各輝度領域における全体輝度ヒストグラムを高輝度側と低輝度側との2つの輝度領域にさらに分割するとともに、前記各輝度領域における全体輝度ヒストグラムから算出した平均輝度ポイントおよび各トーンカーブの出力値変域幅の中央値を境にして、各トーンカーブをさらに分割し、
分割されたそれぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを算出し、それぞれの輝度領域における全体輝度ヒストグラムの平均輝度ポイントを入力値としたときの、各輝度領域に対応するそれぞれのトーンカーブ上の対応出力値が、それぞれのトーンカーブの出力値変域幅の中央値となる様に、それぞれのトーンカーブを補正して、新たなトーンカーブを生成することを特徴とする画像処理方法。
The image processing method according to claim 12.
In the tone curve generation step,
The entire luminance histogram in each luminance region is further divided into two luminance regions, a high luminance side and a low luminance side, with the average luminance point calculated from the entire luminance histogram in each luminance region as a boundary, and each luminance region Each tone curve is further divided on the basis of the average luminance point calculated from the overall luminance histogram and the median value of the output value range width of each tone curve,
On the tone curve corresponding to each luminance area when the average luminance point of the whole luminance histogram in each divided luminance area is calculated and the average luminance point of the whole luminance histogram in each luminance area is used as the input value A new tone curve is generated by correcting each tone curve so that the corresponding output value becomes the median value of the output value range width of each tone curve.
請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、所定回数繰り返して行い、新たなトーンカーブを生成することを特徴とする画像処理方法。
The image processing method according to claim 13.
In the tone curve generation step,
An image processing method characterized in that the luminance region and tone curve dividing process and the tone curve correcting process are repeated a predetermined number of times to generate a new tone curve.
請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を、
整数値での輝度領域の分割ができなくなるまで繰り返して行い、新たなトーンカーブを生成することを特徴とする画像処理方法。
The image processing method according to claim 13.
In the tone curve generation step,
The luminance area and tone curve dividing process, and the tone curve correcting process,
An image processing method, characterized in that a new tone curve is generated by repeatedly performing division of luminance areas with integer values.
請求項13記載の画像処理方法において、
前記トーンカーブ生成工程では、
ある輝度領域について整数値での分割ができなくなったときには、整数値での分割ができる輝度領域についてのみ、前記輝度領域およびトーンカーブの分割処理、および、前記トーンカーブの補正処理を行い、新たなトーンカーブを生成することを特徴とする画像処理方法。
The image processing method according to claim 13.
In the tone curve generation step,
When a certain luminance area cannot be divided by an integer value, only the luminance area that can be divided by an integer value is subjected to the dividing process of the luminance area and the tone curve, and the correction process of the tone curve, and a new An image processing method characterized by generating a tone curve.
請求項11乃至請求項16のいずれか一項に記載の画像処理方法における処理をコンピュータに実現させるための画像処理プログラム。 An image processing program for causing a computer to realize processing in the image processing method according to any one of claims 11 to 16. 請求項1乃至請求項10のいずれか一項に記載の画像処理装置を用いたことを特徴とする撮像装置。 An image pickup apparatus using the image processing apparatus according to any one of claims 1 to 10.
JP2008039253A 2008-02-20 2008-02-20 Image processor, image processing method, image processing program and imaging apparatus Pending JP2009200743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008039253A JP2009200743A (en) 2008-02-20 2008-02-20 Image processor, image processing method, image processing program and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008039253A JP2009200743A (en) 2008-02-20 2008-02-20 Image processor, image processing method, image processing program and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2009200743A true JP2009200743A (en) 2009-09-03

Family

ID=41143787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008039253A Pending JP2009200743A (en) 2008-02-20 2008-02-20 Image processor, image processing method, image processing program and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2009200743A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223139A (en) * 2010-04-06 2011-11-04 Canon Inc Imaging device and method of controlling imaging device
JP2012039271A (en) * 2010-08-05 2012-02-23 Olympus Imaging Corp Imaging apparatus and image reproduction apparatus
KR101256094B1 (en) 2011-06-10 2013-04-23 (주)프리소프트 Apparatus for improving image comprising motion object
JP2013114692A (en) * 2011-11-28 2013-06-10 Nhn Corp Video processor and video processing method for automatic video correction
CN103843032A (en) * 2012-08-08 2014-06-04 杜比实验室特许公司 Image processing for high dynamic range images
WO2020256185A1 (en) * 2019-06-20 2020-12-24 엘지전자 주식회사 Display device
TWI868806B (en) * 2022-07-27 2025-01-01 日商日立全球先端科技股份有限公司 Length measurement system, model making system and length measurement method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223139A (en) * 2010-04-06 2011-11-04 Canon Inc Imaging device and method of controlling imaging device
JP2012039271A (en) * 2010-08-05 2012-02-23 Olympus Imaging Corp Imaging apparatus and image reproduction apparatus
KR101256094B1 (en) 2011-06-10 2013-04-23 (주)프리소프트 Apparatus for improving image comprising motion object
JP2013114692A (en) * 2011-11-28 2013-06-10 Nhn Corp Video processor and video processing method for automatic video correction
US9374589B2 (en) 2012-08-08 2016-06-21 Dolby Laboratories Licensing Corporation HDR images with multiple color gamuts
JP2015508589A (en) * 2012-08-08 2015-03-19 ドルビー ラボラトリーズ ライセンシング コーポレイション Image processing for HDR images
US9076224B1 (en) 2012-08-08 2015-07-07 Dolby Laboratories Licensing Corporation Image processing for HDR images
CN103843032B (en) * 2012-08-08 2016-04-20 杜比实验室特许公司 Image processing for high dynamic range images
CN103843032A (en) * 2012-08-08 2014-06-04 杜比实验室特许公司 Image processing for high dynamic range images
US9467704B2 (en) 2012-08-08 2016-10-11 Dolby Laboratories Licensing Corporation Adaptive ratio images in HDR image representation
WO2020256185A1 (en) * 2019-06-20 2020-12-24 엘지전자 주식회사 Display device
KR20210142755A (en) * 2019-06-20 2021-11-25 엘지전자 주식회사 display device
US20220318964A1 (en) * 2019-06-20 2022-10-06 Lg Electronics Inc. Display device
KR102591521B1 (en) * 2019-06-20 2023-10-20 엘지전자 주식회사 display device
US12327341B2 (en) 2019-06-20 2025-06-10 Lg Electronics Inc. Display device
TWI868806B (en) * 2022-07-27 2025-01-01 日商日立全球先端科技股份有限公司 Length measurement system, model making system and length measurement method
KR20250016301A (en) 2022-07-27 2025-02-03 주식회사 히타치하이테크 Measuring system, model making system and measuring method

Similar Documents

Publication Publication Date Title
JP6911202B2 (en) Imaging control method and imaging device
KR101692401B1 (en) Image process method and apparatus
JP4293174B2 (en) Imaging apparatus and image processing apparatus
JP5898466B2 (en) Imaging device, control method thereof, and program
KR101643613B1 (en) Digital image process apparatus, method for image processing and storage medium thereof
JP5787648B2 (en) Image processing apparatus and image processing apparatus control method
US20220124237A1 (en) Apparatus for generating high-dynamic-range image, method, and storage medium
CN105323474A (en) Image capturing apparatus and control method therefor
JP2009200743A (en) Image processor, image processing method, image processing program and imaging apparatus
KR101750986B1 (en) An apparatus and a method for processing image, and a computer-readable storage medium
JP2005347811A (en) White balance correction device, white balance correction method, program, and electronic camera device
JP6108680B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP4736939B2 (en) Imaging apparatus and image processing method
US8102446B2 (en) Image capturing system and image processing method for applying grayscale conversion to a video signal, and computer-readable recording medium having recorded thereon an image processing program for applying grayscale conversion to a video signal
JP2009272983A (en) Image processing apparatus, method, and program
JP2012124652A (en) Imaging apparatus and image processing method
JP5744490B2 (en) Image processing method, image processing apparatus, storage medium, and program
JP2010183460A (en) Image capturing apparatus and method of controlling the same
JP6210772B2 (en) Information processing apparatus, imaging apparatus, control method, and program
JP6075829B2 (en) IMAGING DEVICE, CAMERA SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2020053960A (en) Imaging device, control method for the imaging device, and program
JP2009033289A (en) Imaging apparatus and imaging method
JP6157274B2 (en) Imaging apparatus, information processing method, and program
JP2006094419A (en) Image signal processing apparatus and image signal processing method
JP2018181070A (en) Image processing apparatus and image processing method