JP2018147417A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

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
Application number
JP2017044603A
Other languages
Japanese (ja)
Inventor
遥平 豊原
Yohei TOYOHARA
遥平 豊原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2017044603A priority Critical patent/JP2018147417A/en
Publication of JP2018147417A publication Critical patent/JP2018147417A/en
Pending legal-status Critical Current

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

PROBLEM TO BE SOLVED: To provide an image processor capable of satisfactorily correcting imbalance of color while suppressing saturation when any saturation region is generated in a subject.SOLUTION: A shininess correction amount determination section (203) detects a saturated area where color signals are saturated in a predetermined subject area of an input image. The shininess correction amount determination section (203) calculates a color balance normal color signal value in the saturated area when there is no upper limit at which a color signal value saturates and generates a correction value with which the color balance at the corrected color signal value for the saturated area gets color balance at a proper color signal value. A shininess correction processing part (204) corrects an image signal in the saturated area based the generated correction value.SELECTED DRAWING: Figure 2

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.

特開2005−327009号公報JP-A-2005-327209 特開2012−244633号公報JP 2012-244633 A

しかしながら、特許文献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.

実施形態のデジタルカメラの概略構成を示す図である。It is a figure which shows schematic structure of the digital camera of embodiment. 画像処理部の詳細な構成を示す図である。It is a figure which shows the detailed structure of an image process part. テカリ補正量決定部の詳細な構成を示す図である。It is a figure which shows the detailed structure of a shine correction amount determination part. テカリ補正量決定部における処理のフローチャートである。It is a flowchart of the process in a shine correction amount determination part. テカリ補正量決定部で用いる輝度に基づくゲイン特性を示す図である。It is a figure which shows the gain characteristic based on the brightness | luminance used in a shine correction amount determination part.

以下に、本発明の好ましい実施形態について、添付の図面に基づいて詳細に説明する。
本発明の画像処理装置は、デジタルスチルカメラやデジタルビデオカメラ、デジタルカメラ機能を備えたスマートフォンやタブレット端末、パーソナルコンピュータ等の各種情報端末、工業用カメラ、車載カメラ、医療用カメラなどの各種カメラに適用可能である。本実施形態では、本発明の画像処理装置をデジタルカメラに適用した例を挙げて説明する。本実施形態のデジタルカメラは、光源から照射された光が被写体の表面で反射することにより生じる高輝度領域を含む画像の補正を行う機能を備えている。
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 optical system 101, an image sensor 102, an A / D conversion unit 103, an image processing unit 104, a face detection unit 105, a recording unit 106, a control unit 107, a memory 108, an operation unit 109, and a display unit. 110 is provided.

光学系101にはフォーカスレンズや絞り、シャッターが含まれる。この光学系101は、撮影時にはフォーカスレンズを駆動して被写体へのピント合わせを行い、また、絞りやシャッターを制御することにより露光量を調節する。撮像素子102は、光学系101によって撮像面上に結像された被写体像の光量を光電変換によって電気信号に変換するCCDやCMOS等の光電変換素子である。また、撮像素子102の撮像面には、三原色のR(赤),G(緑),B(青)の各色成分に対応したカラーフィルタがいわゆるベイヤー配列と呼ばれる配列で画素毎に設けられており、これらR,G,Bの複数の色成分により一つの色が決められる。このため、撮像素子102からは、ベイヤー配列に対応したR,G,Bの各画素の色信号からなるアナログ画像信号が出力される。A/D変換部103は、入力されたアナログ画像信号をデジタル化して画像処理部104に出力する。   The optical system 101 includes a focus lens, a diaphragm, and a shutter. The optical system 101 drives a focus lens to focus on a subject at the time of photographing, and adjusts an exposure amount by controlling an aperture and a shutter. The image sensor 102 is a photoelectric conversion element such as a CCD or a CMOS that converts the amount of light of the subject image formed on the imaging surface by the optical system 101 into an electric signal by photoelectric conversion. Further, on the imaging surface of the imaging element 102, color filters corresponding to the respective color components of the three primary colors R (red), G (green), and B (blue) are provided for each pixel in a so-called Bayer arrangement. A single color is determined by the plurality of color components of R, G, and B. For this reason, the image sensor 102 outputs an analog image signal composed of color signals of R, G, and B pixels corresponding to the Bayer array. The A / D conversion unit 103 digitizes the input analog image signal and outputs it to the image processing unit 104.

画像処理部104には、入力画像としてデジタル化された画像信号が入力され、その入力画像信号に対し、同時化処理、ホワイトバランス補正処理、テカリ補正処理、ガンマ処理などを行い、記録部106に出力する。顔検出部105は、画像処理部104から画像信号が供給され、例えば画像処理部104で行われるテカリ補正処理の対象領域の決定などに用いられる所定の被写体領域として、撮影画像中の人物の顔領域を検出する。   The image processing unit 104 receives a digitized image signal as an input image. The input image signal is subjected to synchronization processing, white balance correction processing, shine correction processing, gamma processing, and the like. Output. The face detection unit 105 is supplied with an image signal from the image processing unit 104, and for example, a face of a person in the captured image is used as a predetermined subject region used for determination of a target region for the shine correction processing performed by the image processing unit 104 Detect areas.

記録部106は、画像処理部104から出力された画像信号をJPEG等の画像形式のデータに変換し、記録する。若しくは、記録部106は、画像形式への変換を行わず、撮像素子102で撮像されてA/D変換部103でデジタル化した画像信号と撮影時の情報等とを組み合わせた情報を、いわゆるRAW等のデータ形式で記録する。   The recording unit 106 converts the image signal output from the image processing unit 104 into data in an image format such as JPEG and records it. Alternatively, the recording unit 106 does not perform conversion into an image format, but uses so-called RAW information that is a combination of an image signal captured by the image sensor 102 and digitized by the A / D conversion unit 103 and information at the time of shooting. Etc. are recorded in the data format.

制御部107は、本実施形態のデジタルカメラの全体の動作制御を行う。例えば、制御部107は、撮影した画像に基づいて所定の評価値を算出し、画像処理部104で行われる画像処理のパラメータを決定する。メモリ108は、画像処理部104で用いる情報を格納してあり、制御部107による制御の下、必要に応じて画像処理部104に出力する。   The control unit 107 performs overall operation control of the digital camera of this embodiment. For example, the control unit 107 calculates a predetermined evaluation value based on the captured image and determines parameters for image processing performed by the image processing unit 104. The memory 108 stores information used by the image processing unit 104 and outputs the information to the image processing unit 104 as necessary under the control of the control unit 107.

操作部109は、ユーザーがデジタルカメラに対し操作指示を行う部分であり、操作部109から入力された操作指示は制御部107に入力される。表示部110は、例えば本実施形態のデジタルカメラの筐体背面に設置された液晶ディスプレイ等であり、撮影時の操作の補助を行うための画面や、撮影時のプレビュー画像、記録部106に保存されている画像等を表示するものである。   The operation unit 109 is a part where the user gives an operation instruction to the digital camera, and the operation instruction input from the operation unit 109 is input to the control unit 107. The display unit 110 is, for example, a liquid crystal display or the like installed on the back of the housing of the digital camera according to the present embodiment, and is stored in a screen for assisting operations during shooting, a preview image during shooting, and the recording unit 106 The displayed image or the like is displayed.

図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 image processing unit 104. The image processing unit 104 includes a synchronization processing unit 201, a white balance correction processing unit 202, a shine correction amount determination unit 203, a shine correction processing unit 204, and a gamma processing unit 205. In FIG. 2, an A / D conversion unit 103 and a recording unit 106 are also drawn. Hereinafter, the detailed configuration of the image processing unit 104 and the flow of processing will be described with reference to FIG.

画像処理部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 / D conversion unit 103 is input to the image processing unit 104 as an input image. The input RGB signal input to the image processing unit 104 is sent to the synchronization processing unit 201. The synchronization processing unit 201 performs synchronization processing on the input RGB signals in the Bayer array, and generates signals composed of R, G, and B colors (hereinafter referred to as color signals R, G, and B) per pixel. This determines the color of one pixel. The color signals R, G, and B generated by the synchronization processing unit 201 are sent to the white balance correction processing unit 202. Based on the white balance gain value calculated by the control unit 107, the white balance correction processing unit 202 adjusts the white balance by applying gains to the color signal values of the color signals R, G, and B, respectively. The color signals R, G, and B that have undergone white balance adjustment are sent to the shine correction amount determination unit 203 and the shine correction processing unit 204.

テカリ補正量決定部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 amount determination unit 203 determines the shine correction amounts Rh_out, Gh_out, Bh_out for the respective color signal values. Details of the shine correction amount determination processing by the shine correction amount determination unit 203 will be described later. The shine correction amounts Rh_out, Gh_out, and Bh_out determined by the shine correction amount determination unit 203 are sent to the shine correction processing unit 204.

テカリ補正処理部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 correction processing unit 204 corrects the color signals R, G, and B input from the white balance correction processing unit 202 based on the shine correction amounts Rh_out, Gh_out, and Bh_out input from the shine correction amount determination unit 203. I do. The shine correction processing by the shine correction processing unit 204 is performed in the face area of the subject detected by the face detection unit 105 (not shown in FIG. 2). Hereinafter, the color signals after the correction by the correction processing unit 204 are denoted as corrected color signals R ′, G ′, and B ′. Specifically, the shine correction process is a process of subtracting the corresponding shine correction amounts Rh_out, Gh_out, and Bh_out from the input color signal values of the color signals R, G, and B as shown in Expression (1). .

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 correction processing unit 204 outputs the corrected color signals R ′, G ′, and B ′ to the gamma processing unit 205. The gamma processing unit 205 performs gamma processing on the input corrected color signals R ′, G ′, and B ′, and outputs the color signals Rg, Gg, and Bg after the gamma processing to the recording unit 106.

図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 amount determination unit 203.
The shine correction amount determination unit 203 includes a luminance signal generation unit 301, a saturated pixel determination unit 302, a correction target color acquisition unit 303, a shine correction amount calculation unit 304, a saturation signal evaluation unit 305, and a shine correction amount adjustment unit 306. . FIG. 4 is a flowchart showing the flow of processing performed by the shine correction amount determination unit 203. The detailed configuration and processing flow of the shine correction amount determination unit 203 will be described below with reference to FIGS. 3 and 4. In the flowchart of FIG. 4, the processing steps of steps S401 to S408 are abbreviated as S401 to S408, respectively. Further, the process of each step shown in the flowchart of FIG. 4 may be executed by a hardware configuration, or may be realized by a CPU or the like executing a program.

先ず、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 correction processing unit 202 to the shine correction amount determination unit 203. The color signals R, G, and B are sent to the luminance signal generation unit 301, the saturated pixel determination unit 302, the correction target color acquisition unit 303, the saturation signal evaluation unit 305, and the shine correction amount adjustment unit 306. After S401, the processing of the shine correction amount determination unit 203 proceeds to the processing after S402, but each processing of S402, the next S403, and further S405 may be performed in parallel.

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 color acquisition unit 303 calculates the average value R_ave of each color in the face area detected by the face detection unit 105 (not shown in FIG. 3) from the input color signals R, G, and B. G_ave and B_ave are calculated. Then, the correction target color acquisition unit 303 uses the average values R_ave, G_ave, and B_ave as correction target color signals Rs, Gs, and Bs for the subject (face area) to the shine correction amount calculation unit 304 and the saturation signal evaluation unit 305. Output.
In S403, the luminance signal generation unit 301 calculates the luminance signal Y from the input color signals R, G, and B, and uses the calculated luminance signal Y as the shine correction amount calculation unit 304 and the shine correction amount adjustment unit. Output to 306.

次に、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 amount calculation unit 304 firstly uses the correction target color signals Rs, Gs, and Bs acquired by the correction target color acquisition unit 303 in S402, and the complementary color signals R_inv, R of the subject (face area). G_inv and B_inv are calculated. Here, the complementary color is a color having a reverse characteristic of the target color. If the color signal values of the color signals R, G, and B are each in the range of 0 to 255, the complementary color signals R_inv, G_inv, and B_inv can be obtained by Expression (2).

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 amount calculation unit 304 refers to the luminance signal Y calculated by the luminance signal generation unit 301 in S403, and calculates the luminance gain signal Ky in which the gain amount increases as the luminance level increases. Further, the shine correction amount calculation unit 304 multiplies the luminance gain signal Ky by the complementary color signals R_inv, G_inv, and B_inv of the color of the subject (face area) as shown in Expression (3), thereby obtaining a reference shine. Correction amounts Rh, Gh, Bh are calculated.

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 pixel determination unit 302 determines whether or not the signal values of the input color signals R, G, and B are saturated at the target pixel. At this time, the saturated pixel determination unit 302 acquires predetermined threshold values Rth, Gth, and Bth of each color signal stored in advance in the memory 108 (not shown in FIG. 3). Further, the saturated pixel determination unit 302 determines a pixel in which at least one color signal value of the input color signals R, G, and B is equal to or greater than a threshold corresponding to the color signal as a saturated pixel. Then, the saturated pixel determination unit 302 outputs a determination result of whether the target pixel is a saturated pixel and determination signals Is_R_sat, Is_G_sat, Is_B_sat indicating which color signal is saturated at a threshold value or higher. Output to 305.

次に、S406において、飽和信号評価部305は、S405で飽和画素判定部302が判定した飽和画素の各色について、仮に信号値の上限が無かった場合に、その飽和画素の各色信号値がどれだけの信号レベルになるかを示す、本来の信号値を算出する。この場合の飽和信号評価部305は、S402で補正目標色取得部303が取得した補正目標色信号Rs,Gs,Bsを用いて、飽和画素の本来の信号値を算出する。つまり、このとき算出される信号値は、飽和している被写体(顔領域)の本来の信号値であると推定される値である。   Next, in S406, the saturation signal evaluation unit 305 determines how much each color signal value of the saturated pixel is for each color of the saturated pixel determined by the saturation pixel determination unit 302 in S405 if there is no upper limit of the signal value. The original signal value indicating whether the signal level is obtained is calculated. In this case, the saturation signal evaluation unit 305 calculates the original signal value of the saturation pixel using the correction target color signals Rs, Gs, and Bs acquired by the correction target color acquisition unit 303 in S402. That is, the signal value calculated at this time is a value estimated to be the original signal value of the saturated subject (face area).

具体的に説明すると、飽和信号評価部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 signal evaluation unit 305 first sorts the correction target color signals Rs, Gs, and Bs acquired by the correction target color acquisition unit 303 in descending order of the signal level (signal value), and Cs_high, Cs_middle. , Cs_low. Then, the saturation signal evaluation unit 305 calculates the color signal ratios Cs_R1 and Cs_R2 according to a predetermined formula (4). That is, in Expression (4), signal ratios Cs_R1 and Cs_R2 between Cs_low having the smallest signal value among Cs_high, Cs_middle, and Cs_low and other signal values other than Cs_high, Cs_middle, and Cs_low are calculated.

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 signal evaluation unit 305 calculates the original signal value of the saturation pixel based on the color signal ratios Cs_R1 and Cs_R2. Here, among the input color signals R, G, and B, color signals corresponding to the respective colors of Cs_high, Cs_middle, and Cs_low are represented as C_high, C_middle, and C_low. It should be noted that at least Cs_low (the signal value with the lowest value) is saturated among Cs_high, Cs_middle, and Cs_low in which the correction target color signals Rs, Gs, and Bs acquired by the correction target color acquisition unit 303 are arranged in descending order of the signal level. No signal value is considered. The saturation signal evaluation unit 305 uses the C_low corresponding to the Cs_low and the color signal ratios Cs_R1 and Cs_R2 obtained by the equation (4), and the original signal value C′_high of the saturated pixel according to the predetermined equation (5). , C′_middle, C′_low are calculated.

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 signal evaluation unit 305 substitutes the calculated signal values C′_high, C′_middle, C′_low into the color signals corresponding to the original signals R_sat, G_sat, B_sat of the saturated pixels, and after the substitution The color signal is output to the shine correction amount adjustment unit 306.

次の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 amount adjustment unit 306 receives the input color signals R, G, B, the reference shine correction amounts Rh, Gh, Bh calculated in S404, and the saturated pixel calculated in S406. The original signal values R_sat, G_sat, and B_sat are acquired. Then, the shine correction amount adjustment unit 306 changes the reference shine correction amounts Rh, Gh, and Bh so that the input color signals R, G, and B have the color balance of the signal values R_sat, G_sat, and B_sat after the shine correction. Adjustment is performed to generate adjusted shine correction amounts Rh ′, Gh ′, and Bh ′.

より具体的に説明すると、テカリ補正量調整部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 amount adjustment unit 306 sets a color signal corresponding to C_low having a low signal value among C_high, C_middle, and C_low used in the saturation signal evaluation unit 305 as a reference color signal. Here, a case where the B color signal is used as a reference will be described. The shine correction amount adjustment unit 306 sets a coefficient αY for changing the adjustment amount for the shine correction amount according to the level (luminance level) of the luminance signal Y input from the luminance signal generation unit 301. The value range of the coefficient αY is 0 to 1, and has the characteristics shown in FIG. The horizontal axis in FIG. 5 represents the luminance level of the luminance signal Y, and the vertical axis represents the coefficient αY (that is, gain). The threshold value Th_start in FIG. 5 represents a luminance value at which any one of the color signals R, G, and B in the subject area starts to be saturated, and the threshold value Th_end is a luminance at which all the color signals R, G, and B are saturated. Represents a value. Then, the shine correction amount adjusting unit 306 performs a calculation of a predetermined formula (6) in which the signal value B_sat is subtracted from the original signal value R_sat or G_sat and multiplied by the coefficient αY, whereby the difference value between the respective color signals is obtained. Signal values Rh ′ and Gh ′ that maintain a certain ratio are calculated.

(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 amount adjustment unit 306 adjusts the reference shine correction amount so that the difference value between the corrected color signal values is smaller than the difference value between the original color signal values. .
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 amount adjustment unit 306 outputs the adjusted shine correction amounts Rh ′, Gh ′, and Bh ′ calculated as described above to the shine correction processing unit 204 in FIG. That is, the adjusted correction amounts Rh ′, Gh ′, Bh ′ are input to the defect correction processing unit 204 as the defect correction amounts Rh_out, Gh_out, Bh_out. Accordingly, the shine correction processing unit 204 performs the shine correction process as described above using the shine correction amounts Rh_out, Gh_out, Bh_out, that is, the adjusted shine correction amounts Rh ′, Gh ′, Bh ′. .

<第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 evaluation unit 305 calculates the original signal value of the saturated pixel as described below.

第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 signal evaluation unit 305 first uses the correction target color signals Rs, Gs, and Bs acquired by the correction target color acquisition unit 303 as signal levels as in the first embodiment described above. Cs_high, Cs_middle, and Cs_low in descending order. Then, the saturation signal evaluation unit 305 calculates the color difference signals Cs_sub1, Cs_sub2 and the color difference ratio Cs_subR according to a predetermined formula (7).

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 signal evaluation unit 305 calculates the original signal value of the saturation pixel based on the color difference signals Cs_sub1, Cs_sub2 and the color difference ratio Cs_subR. For example, among the input color signals R, G, and B, color signals corresponding to the respective colors of Cs_high, Cs_middle, and Cs_low described above are C_high, C_middle, and C_low. Here, when there is one saturated color signal among the color signals R, G, and B of the saturated pixels, the above-described determination signals Is_R_sat, Is_G_sat, and Is_B_sat by the saturated pixel determination unit 302 are any one of the color signals. The signal indicates that it is saturated. Further, when any one color signal is saturated in the saturated pixel, the saturated color signal is C_high having the highest signal value, and the remaining C_middle and C_low color signals are not saturated. . For this reason, in the case of the second embodiment, the saturation signal evaluation unit 305 calculates the original signal values C′_high, C′_middle, and C′_low of the saturated pixels according to the predetermined equation (8).

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 signal evaluation unit 305 substitutes C′_high, C′_middle, C′_low calculated by Expression (8) for the color signals corresponding to the original signals R_sat, G_sat, B_sat of the saturated pixels, The result is output to the shine correction amount adjustment unit 306. The subsequent processing is the same as in the first embodiment described above. According to the second embodiment, when there is only one saturated color signal among the color signals R, G, and B of the saturated pixel, the saturation pixel is detected by a method different from the example of the first embodiment. The original signal value can be calculated.

以上説明したように、第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に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the detection unit detects the saturated region in which at least one color signal is saturated among a plurality of color signals that determine a color. 前記算出手段は、前記所定の被写体領域の色信号値の色バランスを基に、前記飽和領域の前記本来の色信号値の色バランスを算出することを特徴とする請求項1又は2に記載の画像処理装置。   3. The calculation unit according to claim 1, wherein the calculation unit calculates a color balance of the original color signal value of the saturation region based on a color balance of a color signal value of the predetermined subject region. 4. Image processing device. 前記算出手段は、前記飽和領域の前記本来の色信号値を算出して、前記本来の色信号値の色バランスを算出することを特徴とする請求項1から3の何れか1項に記載の画像処理装置。   The said calculation means calculates the said original color signal value of the said saturation area | region, and calculates the color balance of the said original color signal value, The any one of Claim 1 to 3 characterized by the above-mentioned. Image processing device. 前記算出手段は、前記所定の被写体領域の色信号比率と、前記所定の被写体領域の飽和していない色信号値とに基づいて、前記飽和領域の本来の色信号値の色バランスを算出することを特徴とする請求項1から4の何れか1項に記載の画像処理装置。   The calculation means calculates a color balance of the original color signal value of the saturated region based on a color signal ratio of the predetermined subject region and a color signal value that is not saturated of the predetermined subject region. The image processing apparatus according to claim 1, wherein: 前記算出手段は、前記所定の被写体領域の色信号値のうち、前記色信号値が最も小さい色信号値と他の各色信号値との信号比率を前記色信号比率として算出し、前記色信号値が最も小さい色信号値を前記飽和していない色信号値として用いて、前記飽和領域の本来の色信号値の色バランスを算出することを特徴とする請求項5に記載の画像処理装置。   The calculation means calculates a signal ratio between the color signal value having the smallest color signal value and the other color signal values among the color signal values of the predetermined subject region as the color signal ratio, and the color signal value The image processing apparatus according to claim 5, wherein a color balance of an original color signal value in the saturation region is calculated using a color signal value having the smallest color signal value as the color signal value that is not saturated. 前記算出手段は、前記所定の被写体領域の色信号の差分値と、前記所定の被写体領域の飽和していない色信号値とに基づいて、前記本来の色信号値の色バランスを算出することを特徴とする請求項1から4の何れか1項に記載の画像処理装置。   The calculating means calculates a color balance of the original color signal value based on the difference value of the color signal of the predetermined subject area and the color signal value of the predetermined subject area that is not saturated. The image processing apparatus according to claim 1, wherein the image processing apparatus is characterized. 前記算出手段は、前記所定の被写体領域の飽和している色信号値が一つの色信号値である場合、前記所定の被写体領域の色信号値のうち、前記色信号値が最も小さい色信号値と他の各色信号値との差分を前記色信号の差分値として算出し、さらに、前記色信号の差分値の比率を算出して、前記差分値の比率と前記飽和していない色信号値とを用いて、前記飽和領域の本来の色信号値の色バランスを算出することを特徴とする請求項7に記載の画像処理装置。   When the saturated color signal value of the predetermined subject area is a single color signal value, the calculating means has the smallest color signal value among the color signal values of the predetermined subject area. The difference between each color signal value and the other color signal values is calculated as a difference value between the color signals, and a ratio between the color signal difference values is calculated, and the difference value ratio and the non-saturated color signal value are calculated. The image processing apparatus according to claim 7, wherein a color balance of an original color signal value in the saturation region is calculated using 前記生成手段は、
前記所定の被写体領域の画像信号から補正目標色を取得する取得手段と、
前記所定の被写体領域の画像信号と前記補正目標色とに基づいて、基準となる補正量を算出する補正量算出手段と、
前記補正手段による補正後の色信号値の色バランスが前記本来の色信号値の色バランスとなるように、前記基準の補正量を調整する調整手段と、を有し、
前記調整がなされた後の補正量を、前記飽和領域の画像信号に対する前記補正量とすることを特徴とする請求項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に記載の画像処理装置。   The adjustment unit adjusts the reference correction amount so that a difference value between color signals after correction by the correction unit is smaller than a difference value in the original color signal value. Item 10. The image processing apparatus according to Item 9. 前記調整手段は、前記本来の色信号のうちで基準となされた色信号と他の色信号との差分値に、値域が0から1の所定の係数を乗算した信号値を用いて、前記基準の補正量を調整することを特徴とする請求項10に記載の画像処理装置。   The adjusting means uses the signal value obtained by multiplying a difference value between a color signal used as a reference among the original color signals and another color signal by a predetermined coefficient having a value range of 0 to 1. The image processing apparatus according to claim 10, wherein the correction amount is adjusted. 前記補正量算出手段は、前記補正目標色の逆特性を持つ色を前記基準の補正量として算出し、
前記補正手段は、前記飽和領域の画像信号の色信号値から、前記調整がなされた後の補正量を減算することで前記補正を行うことを特徴とする請求項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
前記色信号は三原色の三つの色信号からなることを特徴とする請求項1から12の何れか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the color signal includes three color signals of three primary colors. 前記検出手段は、前記所定の被写体領域である人の顔領域の中で前記飽和領域を検出することを特徴とする請求項1から13の何れか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the detection unit detects the saturation region in a human face region that is the predetermined subject region. 入力画像の所定の被写体領域の中で、色信号値が飽和した飽和領域を検出する検出工程と、
色信号値が飽和する上限がない場合の、前記飽和領域における本来の色信号値の色バランスを算出する算出工程と、
前記飽和領域に対する補正後の色信号値の色バランスが、前記本来の色信号値の色バランスとなる補正量を生成する生成工程と、
前記生成された補正量を基に、前記飽和領域の画像信号を補正する補正工程と、
を有することを特徴とする画像処理装置の画像処理方法。
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:
コンピュータを、請求項1から14の何れか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claim 1 to 14.
JP2017044603A 2017-03-09 2017-03-09 Image processor, image processing method, and program Pending JP2018147417A (en)

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)

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