JP2018147417A - Image processor, image processing method, and program - Google Patents
Image processor, image processing method, and program Download PDFInfo
- Publication number
- JP2018147417A JP2018147417A JP2017044603A JP2017044603A JP2018147417A JP 2018147417 A JP2018147417 A JP 2018147417A JP 2017044603 A JP2017044603 A JP 2017044603A JP 2017044603 A JP2017044603 A JP 2017044603A JP 2018147417 A JP2018147417 A JP 2018147417A
- Authority
- JP
- Japan
- Prior art keywords
- color
- color signal
- signal value
- saturated
- image processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、撮像等された画像を処理する画像処理装置、画像処理方法、プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program for processing captured images.
従来、被写体像を撮像して撮像信号を出力する撮像素子は、素子を構成する画素に一定レベル以上の強い光が入射されると、当該画素からの出力信号が飽和する。このように、飽和した画素が発生する領域は白とび領域として認識される。例えば人物を撮像した場合には、肌の表面で強く反射した光によって、一部領域にいわゆる「テカリ」と呼ばれる現象が生じ、撮像した画像の品位を低くすることがある。
また、いわゆるベイヤー配列のように各画素がR(赤)、G(緑)、B(青)の特定の色信号しか出力しない撮像素子では、全ての色信号が飽和せずに特定の色信号のみ飽和することで各色のバランスが崩れることがある。このように各色のバランスが崩れると、その部分には着色現象が発生し、被写体の本来の色とならない場合がある。
2. Description of the Related Art Conventionally, in an image pickup device that picks up a subject image and outputs an image pickup signal, an output signal from the pixel is saturated when strong light of a certain level or more is incident on the pixel constituting the element. As described above, a region where a saturated pixel is generated is recognized as a whiteout region. For example, when a person is imaged, light that is strongly reflected on the surface of the skin may cause a phenomenon called “shine” in a part of the area, and the quality of the captured image may be lowered.
Further, in an image sensor that outputs only specific color signals of R (red), G (green), and B (blue), as in a so-called Bayer array, all color signals are not saturated and specific color signals are output. Only the saturation may cause the balance of each color to be lost. When the balance of each color is lost in this way, a coloring phenomenon occurs in that portion, and the original color of the subject may not be obtained.
一方、特許文献1には、画像から人物等の特定の被写体領域を検出し、その被写体領域から被写体が主に占める色成分に近い領域(肌色領域)を検出し、その肌色領域の輝度値を参照して、輝度値が高い場合には輝度を下げるように補正する技術が開示されている。
また、特許文献2には、撮影時に実際に使用した露出条件と、撮影時の適正な露出条件とに基づいて、飽和部における着色現象を軽減する処理と飽和部における色の復元処理を制御することで高輝度部の品位を向上させる技術が開示されている。
On the other hand, in Patent Document 1, a specific subject region such as a person is detected from an image, a region close to the color component mainly occupied by the subject (skin color region) is detected from the subject region, and the luminance value of the skin color region is calculated. With reference to this, there is disclosed a technique for correcting so that the luminance is lowered when the luminance value is high.
Japanese Patent Application Laid-Open No. 2004-228561 controls processing for reducing a coloring phenomenon in a saturated portion and color restoration processing in a saturated portion based on an exposure condition actually used at the time of photographing and an appropriate exposure condition at the time of photographing. Thus, a technique for improving the quality of the high luminance part is disclosed.
しかしながら、特許文献1に記載の技術は、着色現象を考慮しておらず、特定の色信号のみ飽和した領域では、輝度を下げるように補正を行った場合でも着色現象が生ずることがある。
また、特許文献2に記載の技術は、露出条件に依存しており、被写体の高輝度領域の状態に基づいた補正ができない。
However, the technique described in Patent Document 1 does not consider the coloring phenomenon, and in a region where only a specific color signal is saturated, the coloring phenomenon may occur even when correction is performed so as to lower the luminance.
In addition, the technique described in Patent Document 2 depends on the exposure conditions, and correction based on the state of the high-luminance region of the subject cannot be performed.
そこで本発明は、被写体領域に生ずる飽和を抑えつつ色のバランスの崩れを良好に補正可能にすることを目的とする。 SUMMARY An advantage of some aspects of the invention is that it is possible to satisfactorily correct color balance while suppressing saturation that occurs in a subject area.
本発明は、入力画像の所定の被写体領域の中で、色信号値が飽和した飽和領域を検出する検出手段と、色信号値が飽和する上限がない場合の、前記飽和領域における本来の色信号値の色バランスを算出する算出手段と、前記飽和領域に対する補正後の色信号値の色バランスが、前記本来の色信号値の色バランスとなる補正量を生成する生成手段と、前記生成された補正量を基に、前記飽和領域の画像信号を補正する補正手段と、を有することを特徴とする。 The present invention provides a detecting means for detecting a saturated area in which a color signal value is saturated in a predetermined subject area of an input image, and an original color signal in the saturated area when there is no upper limit for saturation of the color signal value. A calculation unit that calculates a color balance of the value; a generation unit that generates a correction amount in which the color balance of the color signal value after correction for the saturation region is a color balance of the original color signal value; and the generated Correction means for correcting the image signal in the saturation region based on the correction amount.
本発明によれば、被写体領域に生ずる飽和を抑えつつ色のバランスの崩れを良好に補正可能となる。 According to the present invention, it is possible to satisfactorily correct the color balance while suppressing saturation occurring in the subject area.
以下に、本発明の好ましい実施形態について、添付の図面に基づいて詳細に説明する。
本発明の画像処理装置は、デジタルスチルカメラやデジタルビデオカメラ、デジタルカメラ機能を備えたスマートフォンやタブレット端末、パーソナルコンピュータ等の各種情報端末、工業用カメラ、車載カメラ、医療用カメラなどの各種カメラに適用可能である。本実施形態では、本発明の画像処理装置をデジタルカメラに適用した例を挙げて説明する。本実施形態のデジタルカメラは、光源から照射された光が被写体の表面で反射することにより生じる高輝度領域を含む画像の補正を行う機能を備えている。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The image processing apparatus of the present invention is applied to various cameras such as digital still cameras, digital video cameras, smartphones and tablet terminals having digital camera functions, various information terminals such as personal computers, industrial cameras, in-vehicle cameras, and medical cameras. Applicable. In the present embodiment, an example in which the image processing apparatus of the present invention is applied to a digital camera will be described. The digital camera according to the present embodiment has a function of correcting an image including a high luminance region that is generated when light emitted from a light source is reflected by the surface of a subject.
<第1の実施形態>
図1は、第1の実施形態のデジタルカメラの概略構成例を示すブロック図である。
本実施形態のデジタルカメラは、光学系101、撮像素子102、A/D変換部103、画像処理部104、顔検出部105、記録部106、制御部107、メモリ108、操作部109、表示部110を備えている。
<First Embodiment>
FIG. 1 is a block diagram illustrating a schematic configuration example of the digital camera according to the first embodiment.
The digital camera of this embodiment includes an
光学系101にはフォーカスレンズや絞り、シャッターが含まれる。この光学系101は、撮影時にはフォーカスレンズを駆動して被写体へのピント合わせを行い、また、絞りやシャッターを制御することにより露光量を調節する。撮像素子102は、光学系101によって撮像面上に結像された被写体像の光量を光電変換によって電気信号に変換するCCDやCMOS等の光電変換素子である。また、撮像素子102の撮像面には、三原色のR(赤),G(緑),B(青)の各色成分に対応したカラーフィルタがいわゆるベイヤー配列と呼ばれる配列で画素毎に設けられており、これらR,G,Bの複数の色成分により一つの色が決められる。このため、撮像素子102からは、ベイヤー配列に対応したR,G,Bの各画素の色信号からなるアナログ画像信号が出力される。A/D変換部103は、入力されたアナログ画像信号をデジタル化して画像処理部104に出力する。
The
画像処理部104には、入力画像としてデジタル化された画像信号が入力され、その入力画像信号に対し、同時化処理、ホワイトバランス補正処理、テカリ補正処理、ガンマ処理などを行い、記録部106に出力する。顔検出部105は、画像処理部104から画像信号が供給され、例えば画像処理部104で行われるテカリ補正処理の対象領域の決定などに用いられる所定の被写体領域として、撮影画像中の人物の顔領域を検出する。
The
記録部106は、画像処理部104から出力された画像信号をJPEG等の画像形式のデータに変換し、記録する。若しくは、記録部106は、画像形式への変換を行わず、撮像素子102で撮像されてA/D変換部103でデジタル化した画像信号と撮影時の情報等とを組み合わせた情報を、いわゆるRAW等のデータ形式で記録する。
The
制御部107は、本実施形態のデジタルカメラの全体の動作制御を行う。例えば、制御部107は、撮影した画像に基づいて所定の評価値を算出し、画像処理部104で行われる画像処理のパラメータを決定する。メモリ108は、画像処理部104で用いる情報を格納してあり、制御部107による制御の下、必要に応じて画像処理部104に出力する。
The
操作部109は、ユーザーがデジタルカメラに対し操作指示を行う部分であり、操作部109から入力された操作指示は制御部107に入力される。表示部110は、例えば本実施形態のデジタルカメラの筐体背面に設置された液晶ディスプレイ等であり、撮影時の操作の補助を行うための画面や、撮影時のプレビュー画像、記録部106に保存されている画像等を表示するものである。
The
図2は、画像処理部104の詳細な構成を示すブロック図である。画像処理部104は、同時化処理部201、ホワイトバランス補正処理部202、テカリ補正量決定部203、テカリ補正処理部204、ガンマ処理部205を備えている。なお、図2にはA/D変換部103と記録部106も描かれている。以下、図2を用いて画像処理部104の詳細な構成と処理の流れを説明する。
FIG. 2 is a block diagram illustrating a detailed configuration of the
画像処理部104には、入力画像として、A/D変換部103でデジタル変換された、ベイヤー配列に対応した画像信号(以下、入力RGB信号とする。)が入力される。画像処理部104に入力された入力RGB信号は、同時化処理部201に送られる。同時化処理部201は、ベイヤー配列の入力RGB信号に同時化処理を行い、1画素につきR,G,Bの各色からなる信号(以下、色信号R,G,Bとする。)を生成し、これにより一つの画素の色が決められる。同時化処理部201で生成された色信号R,G,Bは、ホワイトバランス補正処理部202に送られる。ホワイトバランス補正処理部202は、制御部107が算出したホワイトバランスゲイン値に基づいて、色信号R,G,Bの各色信号値にそれぞれゲインをかけてホワイトバランスの調整を行う。ホワイトバランス調整がなされた色信号R,G,Bは、テカリ補正量決定部203とテカリ補正処理部204に送られる。
An image signal corresponding to a Bayer array (hereinafter referred to as an input RGB signal) digitally converted by the A /
テカリ補正量決定部203は、入力された色信号R,G,Bに基づいて、それぞれの色信号値に対するテカリ補正量Rh_out,Gh_out,Bh_outを決定する。テカリ補正量決定部203によるテカリ補正量決定処理の詳細は後述する。テカリ補正量決定部203にて決定されたテカリ補正量Rh_out,Gh_out,Bh_outは、テカリ補正処理部204に送られる。
Based on the input color signals R, G, B, the shine correction
テカリ補正処理部204は、ホワイトバランス補正処理部202から入力された色信号R,G,Bに対して、テカリ補正量決定部203から入力されたテカリ補正量Rh_out,Gh_out,Bh_outに基づく補正処理を行う。テカリ補正処理部204によるテカリ補正処理は、図2では図示を省略している顔検出部105で検出された被写体の顔領域内で行われる。以下、テカリ補正処理部204によるテカリ補正後の色信号を、補正後色信号R',G',B'と表記する。テカリ補正処理は、具体的には式(1)のように、入力された色信号R,G,Bの各色信号値から、それぞれ対応したテカリ補正量Rh_out,Gh_out,Bh_outを減算する処理である。
The shine
R'=R−Rh_out
G'=G−Gh_out
B'=B−Bh_out ・・・式(1)
R ′ = R−Rh_out
G ′ = G−Gh_out
B ′ = B−Bh_out (1)
そして、テカリ補正処理部204は、補正後色信号R',G',B'を、ガンマ処理部205に出力する。ガンマ処理部205は、入力された補正後色信号 R',G',B'に対してガンマ処理を行い、そのガンマ処理後の色信号Rg,Gg,Bgを記録部106に出力する。
Then, the shine
図3はテカリ補正量決定部203の詳細な構成を示すブロック図である。
テカリ補正量決定部203は、輝度信号生成部301、飽和画素判定部302、補正目標色取得部303、テカリ補正量算出部304、飽和信号評価部305、テカリ補正量調整部306を備えている。また、図4はテカリ補正量決定部203で行われる処理の流れを示すフローチャートである。以下、図3、図4を用いて、テカリ補正量決定部203の詳細な構成と処理の流れを説明する。なお、図4のフローチャートでは、ステップS401〜ステップS408の各処理工程をそれぞれS401〜S408と略記する。また、図4のフローチャートに示す各工程の処理は、ハードウェア構成により実行されてもよいし、CPU等がプログラムを実行することにより実現されてもよい。
FIG. 3 is a block diagram showing a detailed configuration of the shine correction
The shine correction
先ず、S401において、テカリ補正量決定部203には、ホワイトバランス補正処理部202から色信号R,G,Bが入力される。色信号R,G,Bは、輝度信号生成部301と、飽和画素判定部302と、補正目標色取得部303と、飽和信号評価部305と、テカリ補正量調整部306とに送られる。S401の後、テカリ補正量決定部203の処理はS402以降の処理に進むが、S402と次のS403、さらにS405の各処理は並行して行われてもよい。
First, in step S <b> 401, color signals R, G, and B are input from the white balance
S402において、補正目標色取得部303は、入力された色信号R,G,Bから、図3では図示を省略している顔検出部105で検出された顔領域内の各色の平均値R_ave,G_ave,B_aveを算出する。そして、補正目標色取得部303は、それら平均値R_ave,G_ave,B_aveを、被写体(顔領域)の補正目標色信号Rs,Gs,Bsとして、テカリ補正量算出部304と飽和信号評価部305に出力する。
また、S403において、輝度信号生成部301は、入力された色信号R,G,Bから輝度信号Yを算出し、その算出した輝度信号Yを、テカリ補正量算出部304とテカリ補正量調整部306とに出力する。
In S402, the correction target
In S403, the luminance
次に、S404において、テカリ補正量算出部304は、先ず、S402で補正目標色取得部303が取得した補正目標色信号Rs,Gs,Bsから、被写体(顔領域)の色の補色信号R_inv,G_inv,B_invを算出する。ここで、補色とは、対象となる色の逆特性をもつ色である。色信号R,G,Bの各色信号値がそれぞれ0〜255の範囲の値をとるとすると、補色信号R_inv,G_inv,B_invは、式(2)により求めることができる。
Next, in S404, the shine correction
R_inv=255−Rs
G_inv=255−Gs
B_inv=255−Bs ・・・式(2)
R_inv = 255−Rs
G_inv = 255-Gs
B_inv = 255−Bs (2)
またS404において、テカリ補正量算出部304は、S403で輝度信号生成部301が算出した輝度信号Yを参照し、輝度レベルが高い程ゲイン量が高くなる輝度ゲイン信号Kyを算出する。さらに、テカリ補正量算出部304は、式(3)のように、その輝度ゲイン信号Kyを、被写体(顔領域)の色の補色信号R_inv,G_inv,B_invに乗算することにより、基準となるテカリ補正量Rh,Gh,Bhを算出する。
In S404, the shine correction
Rh=Ky×R_inv
Gh=Ky×G_inv
Bh=Ky×B_inv ・・・式(3)
Rh = Ky × R_inv
Gh = Ky × G_inv
Bh = Ky × B_inv (3)
S405において、飽和画素判定部302は、入力された色信号R,G,Bの信号値が注目画素において飽和しているか否かを判定する。このときの飽和画素判定部302は、図3では図示を省略しているメモリ108に予め格納されている各色信号の所定の閾値Rth,Gth,Bthの値を取得する。さらに、飽和画素判定部302は、入力された各色信号R,G,Bのうち少なくとも一つの色信号値が、その色信号に対応した閾値以上となる画素を、飽和画素と判定する。そして、飽和画素判定部302は、注目画素が飽和画素であるかどうかの判別結果、及び何れの色信号が閾値以上で飽和しているかを表す判別信号Is_R_sat,Is_G_sat,Is_B_satを、飽和信号評価部305に出力する。
In S405, the saturated
次に、S406において、飽和信号評価部305は、S405で飽和画素判定部302が判定した飽和画素の各色について、仮に信号値の上限が無かった場合に、その飽和画素の各色信号値がどれだけの信号レベルになるかを示す、本来の信号値を算出する。この場合の飽和信号評価部305は、S402で補正目標色取得部303が取得した補正目標色信号Rs,Gs,Bsを用いて、飽和画素の本来の信号値を算出する。つまり、このとき算出される信号値は、飽和している被写体(顔領域)の本来の信号値であると推定される値である。
Next, in S406, the saturation
具体的に説明すると、飽和信号評価部305は、先ず、補正目標色取得部303が取得した補正目標色信号Rs,Gs,Bsを、信号レベル(信号値)の高い順に並べ替えてCs_high,Cs_middle,Cs_lowとする。そして、飽和信号評価部305は、所定の式(4)により、色信号比率Cs_R1,Cs_R2を算出する。すなわち、式(4)では、Cs_high,Cs_middle,Cs_lowのうち、最も信号値が小さいCs_lowと、それ以外の他の各信号値とのそれぞれの信号比率Cs_R1,Cs_R2を算出する。
Specifically, the saturation
Cs_R1=Cs_high/Cs_low
Cs_R2=Cs_middle/Cs_low ・・・式(4)
Cs_R1 = Cs_high / Cs_low
Cs_R2 = Cs_middle / Cs_low (4)
次に、飽和信号評価部305は、色信号比率Cs_R1,Cs_R2に基づいて、飽和画素の本来の信号値を算出する。ここで、入力された色信号R,G,Bの内、前述したCs_high,Cs_middle,Cs_lowのそれぞれの色に対応した色信号を、C_high,C_middle,C_lowと表すとする。なお、補正目標色取得部303が取得した補正目標色信号Rs,Gs,Bsを信号レベルの高い順に並べたCs_high,Cs_middle,Cs_lowのうち、少なくともCs_low(最も値が低い信号値)は飽和していない信号値であると考えられる。飽和信号評価部305は、このCs_lowに対応したC_lowと、式(4)で求めた色信号比率Cs_R1,Cs_R2とを用い、所定の式(5)により、飽和画素の本来の信号値C'_high,C'_middle,C'_lowを算出する。
Next, the saturation
C'_high=C_low×Cs_R1
C'_middle=C_low×Cs_R2
C'_low=C_low ・・・式(5)
C′_high = C_low × Cs_R1
C′_middle = C_low × Cs_R2
C′_low = C_low (5)
そして、飽和信号評価部305は、算出した信号値C'_high,C'_middle,C'_lowを、飽和画素の本来の信号R_sat,G_sat,B_satの対応した色信号に代入し、その代入後の色信号をテカリ補正量調整部306に出力する。
Then, the saturation
次のS407において、テカリ補正量調整部306は、入力された色信号R,G,Bと、S404で算出された基準のテカリ補正量Rh,Gh,Bhと、S406で算出された飽和画素の本来の信号値R_sat,G_sat,B_satと、を取得する。そして、テカリ補正量調整部306は、入力された色信号R,G,Bがテカリ補正後に信号値R_sat,G_sat,B_satの色バランスになるように、基準のテカリ補正量Rh,Gh,Bhを調整して調整済みテカリ補正量Rh',Gh',Bh'を生成する。
In the next S407, the shine correction
より具体的に説明すると、テカリ補正量調整部306は、飽和信号評価部305で用いたC_high,C_middle,C_lowのうち信号値が低いC_lowに対応する色信号を基準の色信号とする。ここでは、仮にBの色信号が基準となる場合について説明する。テカリ補正量調整部306は、輝度信号生成部301から入力された輝度信号Yのレベル(輝度レベル)に応じて、テカリ補正量に対する調整量を変化させるための係数αYを設定する。係数αYの値域は、0〜1であり、図5に示す特性を持つ。図5の横軸は輝度信号Yの輝度レベル、縦軸は係数αY(つまりゲイン)を表す。図5の閾値Th_startは被写体領域の色信号R,G,Bの何れかの色信号が飽和し始める輝度値を表し、閾値Th_endは色信号R,G,Bの全ての色信号が飽和する輝度値を表す。そして、テカリ補正量調整部306は、本来の信号値R_sat又はG_satから信号値B_satを減算して係数αYを乗算する所定の式(6)の演算を行うことで、各色信号同士の差分値が一定の割合を保つような信号値Rh',Gh'を算出する。
More specifically, the shine correction
(R−Rh')−(B−Bh)=αY×(R_Sat−B_sat)
(G−Gh')−(B−Bh)=αY×(G_Sat−B_sat) ・・・式(6)
(R−Rh ′) − (B−Bh) = αY × (R_Sat−B_sat)
(G−Gh ′) − (B−Bh) = αY × (G_Sat−B_sat) (6)
このように、式(6)では、本来の信号値R_sat,G_satからB_satを減算した値に、値域が0〜1の係数αYが乗算される。すなわち、テカリ補正量調整部306では、補正後の色信号値同士の差分値が、本来の色信号値の差分値よりも小さくなるように、基準のテカリ補正量の調整が行われることになる。
なお、信号値Bh'については、基準の色信号であるため、Bhの値がそのまま代入される。ここでは、Bの色信号を基準として説明したが、Rの色信号やGの色信号が基準となされてもよい。
In this way, in Equation (6), the value obtained by subtracting B_sat from the original signal values R_sat and G_sat is multiplied by the coefficient αY having a range of 0 to 1. In other words, the shine correction
Since the signal value Bh ′ is a reference color signal, the value of Bh is substituted as it is. Here, the B color signal has been described as a reference, but an R color signal or a G color signal may be used as a reference.
次のS408において、テカリ補正量調整部306は、前述のようにして算出した調整済みテカリ補正量Rh',Gh',Bh'を、図2のテカリ補正処理部204に出力する。すなわち、テカリ補正処理部204には、調整済みテカリ補正量Rh',Gh',Bh'が、テカリ補正量Rh_out,Gh_out,Bh_outとして入力される。これにより、テカリ補正処理部204では、テカリ補正量Rh_out,Gh_out,Bh_out、つまり調整済みテカリ補正量Rh',Gh',Bh'を用いて、前述したようにテカリ補正処理が行われることになる。
In next step S408, the shine correction
<第2の実施形態>
以下、第2の実施形態について説明する。第2の実施形態のデジタルカメラの構成及び基本的な処理の流れは前述した第1の実施形態と同様である。前述した第1の実施形態では、図4のS406において、式(4)、式(5)により飽和画素の本来の信号値を算出(推定)したが、第2の実施形態では、飽和画素の本来の信号値を第1の実施形態の場合とは別の手法により求める。以下、第2の実施形態において、第1の実施形態とは異なる処理について説明する。
<Second Embodiment>
Hereinafter, the second embodiment will be described. The configuration and basic processing flow of the digital camera of the second embodiment are the same as those of the first embodiment described above. In the first embodiment described above, the original signal value of the saturated pixel is calculated (estimated) in S406 of FIG. 4 using Equations (4) and (5), but in the second embodiment, the saturation pixel of the saturated pixel is calculated. The original signal value is obtained by a method different from that in the first embodiment. Hereinafter, in the second embodiment, processing different from that of the first embodiment will be described.
第2の実施形態では、図4のS405の飽和画素判定で飽和画素と判定された注目画素の色信号R,G,Bのうち飽和している色信号が一つしかない場合に、飽和信号評価部305において以下に説明するようにして飽和画素の本来の信号値の算出が行われる。
In the second embodiment, when there is only one saturated color signal among the color signals R, G, and B of the target pixel determined as the saturated pixel in the saturated pixel determination in S405 of FIG. The
第2の実施形態の場合、飽和信号評価部305は、先ず前述の第1の実施形態と同様に、補正目標色取得部303で取得された補正目標色信号Rs,Gs,Bsを、信号レベルの高い順にCs_high,Cs_middle,Cs_lowとする。そして、飽和信号評価部305は、所定の式(7)により、色差信号Cs_sub1,Cs_sub2と、色差比率Cs_subRを算出する。
In the case of the second embodiment, the saturation
Cs_sub1=Cs_high−Cs_low
Cs_sub2=Cs_middle−Cs_low
Cs_subR=Cs_sub1/Cs_sub2 ・・・式(7)
Cs_sub1 = Cs_high-Cs_low
Cs_sub2 = Cs_middle-Cs_low
Cs_subR = Cs_sub1 / Cs_sub2 (7)
すなわち、式(7)では、信号値が最も小さく飽和していない色信号値Cs_lowと他の各色信号値Cs_high,Cs_middleとの差分値Cs_sub1,Cs_sub2と、それら差分値の比率Cs_subRとが算出される。 That is, in Expression (7), the difference value Cs_sub1, Cs_sub2 between the color signal value Cs_low whose signal value is the smallest and not saturated and the other color signal values Cs_high, Cs_middle, and the ratio Cs_subR of these difference values are calculated. .
次に、飽和信号評価部305は、色差信号Cs_sub1,Cs_sub2と色差比率Cs_subRに基づいて、飽和画素の本来の信号値を算出する。例えば、入力された色信号R,G,Bの内、前述したCs_high、Cs_middle、Cs_lowのそれぞれの色に対応した色信号をC_high、C_middle、C_lowとする。ここで、飽和画素の色信号R,G,Bのうち飽和している色信号が一つの場合、飽和画素判定部302による前述した判別信号Is_R_sat,Is_G_sat,Is_B_satは、何れか一つの色信号が飽和していることを表した信号となる。また、飽和画素において何れか一つの色信号が飽和している場合、飽和している色信号は信号値が最も高いC_highであり、残りのC_middle,C_lowの色信号は飽和していないことになる。このため、第2の実施形態の場合、飽和信号評価部305は、所定の式(8)により、飽和画素の本来の信号値C'_high,C'_middle,C'_lowを算出する。
Next, the saturation
C'_high−C_low=Cs_subR×(C_middle−C_low)
C'_middle=C_middle
C'_low=C_low ・・・式(8)
C′_high−C_low = Cs_subR × (C_middle−C_low)
C'_middle = C_middle
C′_low = C_low (8)
すなわち、式(8)では、差分値の比率Cs_subRと飽和していない色信号値Cs_low,C_middleとを用いて、飽和画素の本来の信号値C'_high,C'_middle,C'_lowが求められる。 That is, in Expression (8), the original signal values C′_high, C′_middle, C′_low of the saturated pixels are obtained using the difference value ratio Cs_subR and the non-saturated color signal values Cs_low, C_middle. .
そして、飽和信号評価部305は、式(8)で算出したC'_high,C'_middle,C'_lowを、飽和画素の本来の信号R_sat,G_sat,B_satの対応した色信号に代入して、テカリ補正量調整部306に出力する。これ以降の処理は、前述した第1の実施形態と同様である。第2の実施形態によれば、飽和画素の色信号R,G,Bのうち飽和している色信号が一つしかない場合において、第1の実施形態の例とは異なる手法により飽和画素の本来の信号値の算出が可能となる。
Then, the saturation
以上説明したように、第1,第2の実施形態においては、入力された色信号R,G,Bの少なくとも一つの色信号が飽和している飽和画素について、その飽和画素の本来の色信号バランスを基にテカリ補色量を調整している。本実施形態によれば、人物等の被写体を撮影した際に、被写体領域に高輝度の飽和領域が発生しても、その高輝度の飽和領域の輝度を下げて飽和を抑えつつ、色バランスの崩れによる着色現象を発生させずに、目標の被写体色に補正された画像を得ることができる。 As described above, in the first and second embodiments, for a saturated pixel in which at least one of the input color signals R, G, and B is saturated, the original color signal of the saturated pixel The amount of complementary color is adjusted based on the balance. According to the present embodiment, when a subject such as a person is photographed, even if a high-brightness saturated region occurs in the subject region, the brightness of the high-brightness saturated region is lowered to suppress saturation and color balance is reduced. An image corrected to the target subject color can be obtained without causing a coloring phenomenon due to collapse.
<その他の実施形態>
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。
前述の実施形態では、所定の被写体領域が人物の顔の領域(肌色の領域)となされ、その顔領域に対するテカリ補正処理を行う例を挙げたが、本発明は顔領域のテカリ補正には限定されない。本実施形態は、一例として、被写体が自動車で、その車体等の高輝度飽和領域に対するテカリの補正等にも適用可能である。この例の場合、自動車の被写体領域から車体色と輝度を基に補正目標となるテカリ補正量を求め、また、被写体領域の飽和画素を判定して、その飽和画素から前述のように調整量を求めてテカリ補正量を調整して最終的なテカリ補正量を決定してテカリ補正を行う。
<Other embodiments>
As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.
In the above-described embodiment, an example in which the predetermined subject area is a human face area (skin color area) and the shine correction process is performed on the face area is described, but the present invention is limited to the lip correction of the face area. Not. As an example, the present embodiment can be applied to correction of shine on a high-luminance saturated region such as a body of an automobile. In this example, the amount of shine correction that is the correction target is obtained from the subject area of the car based on the body color and brightness, the saturated pixel in the subject area is determined, and the adjustment amount is calculated from the saturated pixel as described above. Obtaining and correcting the shine correction amount, determining the final shine correction amount and performing the shine correction.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
104:画像処理部、105:顔検出部、107:制御部、203:テカリ補正量決定部、204:テカリ補正処理部、301:輝度信号生成部、302:飽和画素判定部、303:補正目標色取得部、304:テカリ補正量算出部、305:飽和信号評価部、306:テカリ補正量調整部 104: image processing unit, 105: face detection unit, 107: control unit, 203: shine correction amount determination unit, 204: shine correction processing unit, 301: luminance signal generation unit, 302: saturated pixel determination unit, 303: correction target Color acquisition unit, 304: shine correction amount calculation unit, 305: saturation signal evaluation unit, 306: shine correction amount adjustment unit
Claims (16)
色信号値が飽和する上限がない場合の、前記飽和領域における本来の色信号値の色バランスを算出する算出手段と、
前記飽和領域に対する補正後の色信号値の色バランスが、前記本来の色信号値の色バランスとなる補正量を生成する生成手段と、
前記生成された補正量を基に、前記飽和領域の画像信号を補正する補正手段と、
を有することを特徴とする画像処理装置。 Detecting means for detecting a saturated region in which the color signal value is saturated in a predetermined subject region of the input image;
A calculation means for calculating a color balance of the original color signal value in the saturation region when there is no upper limit for saturation of the color signal value;
Generating means for generating a correction amount in which the color balance of the corrected color signal value with respect to the saturation region becomes the color balance of the original color signal value;
Correction means for correcting the image signal of the saturation region based on the generated correction amount;
An image processing apparatus comprising:
前記所定の被写体領域の画像信号から補正目標色を取得する取得手段と、
前記所定の被写体領域の画像信号と前記補正目標色とに基づいて、基準となる補正量を算出する補正量算出手段と、
前記補正手段による補正後の色信号値の色バランスが前記本来の色信号値の色バランスとなるように、前記基準の補正量を調整する調整手段と、を有し、
前記調整がなされた後の補正量を、前記飽和領域の画像信号に対する前記補正量とすることを特徴とする請求項1から8の何れか1項に記載の画像処理装置。 The generating means includes
Obtaining means for obtaining a correction target color from an image signal of the predetermined subject area;
Correction amount calculation means for calculating a reference correction amount based on the image signal of the predetermined subject area and the correction target color;
Adjusting means for adjusting the reference correction amount so that the color balance of the color signal value after correction by the correction means becomes the color balance of the original color signal value;
The image processing apparatus according to claim 1, wherein the correction amount after the adjustment is set as the correction amount for the image signal in the saturation region.
前記補正手段は、前記飽和領域の画像信号の色信号値から、前記調整がなされた後の補正量を減算することで前記補正を行うことを特徴とする請求項9から11の何れか1項に記載の画像処理装置 The correction amount calculation means calculates a color having a reverse characteristic of the correction target color as the reference correction amount,
12. The correction unit according to claim 9, wherein the correction unit performs the correction by subtracting a correction amount after the adjustment is performed from a color signal value of an image signal in the saturation region. Image processing apparatus according to
色信号値が飽和する上限がない場合の、前記飽和領域における本来の色信号値の色バランスを算出する算出工程と、
前記飽和領域に対する補正後の色信号値の色バランスが、前記本来の色信号値の色バランスとなる補正量を生成する生成工程と、
前記生成された補正量を基に、前記飽和領域の画像信号を補正する補正工程と、
を有することを特徴とする画像処理装置の画像処理方法。 A detection step of detecting a saturated region in which the color signal value is saturated in a predetermined subject region of the input image;
A calculation step of calculating a color balance of the original color signal value in the saturation region when there is no upper limit for saturation of the color signal value;
A generation step of generating a correction amount in which the color balance of the color signal value after correction with respect to the saturation region becomes the color balance of the original color signal value;
Based on the generated correction amount, a correction step of correcting the image signal of the saturation region,
An image processing method for an image processing apparatus, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017044603A JP2018147417A (en) | 2017-03-09 | 2017-03-09 | Image processor, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017044603A JP2018147417A (en) | 2017-03-09 | 2017-03-09 | Image processor, image processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018147417A true JP2018147417A (en) | 2018-09-20 |
Family
ID=63592185
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017044603A Pending JP2018147417A (en) | 2017-03-09 | 2017-03-09 | Image processor, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018147417A (en) |
-
2017
- 2017-03-09 JP JP2017044603A patent/JP2018147417A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9838625B2 (en) | Image processing apparatus and control method for image processing apparatus for controlling correction of a black level in a combined image signal | |
JP6312487B2 (en) | Image processing apparatus, control method therefor, and program | |
US20100245622A1 (en) | Image capturing apparatus and medium storing image processing program | |
JP6351271B2 (en) | Image composition apparatus, image composition method, and program | |
US11838649B2 (en) | Image capturing device and control method thereof and medium | |
US20150042847A1 (en) | Imaging device and image processing method | |
US8155472B2 (en) | Image processing apparatus, camera, image processing program product and image processing method | |
JP5861924B2 (en) | Imaging device | |
JP2018207413A (en) | Imaging apparatus | |
US20220021800A1 (en) | Image capturing apparatus, method of controlling image capturing apparatus, and storage medium | |
JP2008301371A (en) | Imaging apparatus and image processing program | |
US20100245590A1 (en) | Camera sensor system self-calibration | |
JP7442989B2 (en) | Imaging device, control method for the imaging device, and program | |
JP2018147417A (en) | Image processor, image processing method, and program | |
JP6704611B2 (en) | Imaging device and imaging method | |
JP5943682B2 (en) | Imaging apparatus, control method thereof, and program | |
JP2015126416A (en) | Image processing apparatus, control method, and program | |
JP2017143585A (en) | Imaging device | |
JP7034792B2 (en) | Imaging device and its control method and program | |
US20200314349A1 (en) | Image processing device, image processing method, and program | |
US8121473B2 (en) | Imaging apparatus | |
JP3938097B2 (en) | Correction apparatus, imaging apparatus, correction method, computer-readable storage medium, and program | |
JP6849351B2 (en) | Image processing equipment, image processing methods, and programs | |
US20120133806A1 (en) | Image processing apparatus having luminance-type gamma correction circuit capable of changing nonlinear characteristic, and image processing method therefor | |
JP6247513B2 (en) | Imaging apparatus, control method, and program |