JP6318497B2 - Image processing apparatus, imaging apparatus, and program - Google Patents

Image processing apparatus, imaging apparatus, and program Download PDF

Info

Publication number
JP6318497B2
JP6318497B2 JP2013171510A JP2013171510A JP6318497B2 JP 6318497 B2 JP6318497 B2 JP 6318497B2 JP 2013171510 A JP2013171510 A JP 2013171510A JP 2013171510 A JP2013171510 A JP 2013171510A JP 6318497 B2 JP6318497 B2 JP 6318497B2
Authority
JP
Japan
Prior art keywords
color
signal
value
image
saturation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013171510A
Other languages
Japanese (ja)
Other versions
JP2015041855A (en
Inventor
村松 勝
勝 村松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2013171510A priority Critical patent/JP6318497B2/en
Publication of JP2015041855A publication Critical patent/JP2015041855A/en
Application granted granted Critical
Publication of JP6318497B2 publication Critical patent/JP6318497B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

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

従来より、電子カメラなどにより撮影した画像から、モニタやプリンタなどに出力する画像を作成する様々な方法が考えられている。例えば、センサRGBから出力用の色空間の画像を作成する場合には、センサRGBを、より狭い色空間へ色空間変換することになる。このように、センサRGBをそのまま出力用の色空間(sRGBの他に、例えば、adobeRGBなど)へ3×3の色変換マトリクスを用いて変換すると、出力用の色空間では再現できない高彩度部において、マイナス値やオーバーフロー値が発生してしまう。さらに、これらの値を0値や表示最大値でクリップすると、輝度が低下して階調が失われてしまったり、色合いが変わってしまったりするという問題があった。そこで、特許文献1の発明では、3次元テーブルを用いて、再現可能な色域外の色を、色域内へ変換する技術が開示されている。   Conventionally, various methods for creating an image to be output to a monitor, a printer, or the like from an image taken with an electronic camera or the like have been considered. For example, when creating an output color space image from the sensor RGB, the color space of the sensor RGB is converted to a narrower color space. In this way, if the sensor RGB is converted as it is into the output color space (in addition to sRGB, for example, AdobeRGB, etc.) using a 3 × 3 color conversion matrix, Negative values and overflow values will occur. Further, when these values are clipped at 0 value or the maximum display value, there is a problem that the luminance is lowered and the gradation is lost or the hue is changed. Therefore, the invention of Patent Document 1 discloses a technique for converting a color outside the reproducible color gamut into the color gamut using a three-dimensional table.

特開2000−165692号公報JP 2000-165692 A

しかし、特許文献1の発明では、3次元テーブルのデータ量が増大するだけでなく、演算規模も増大するという問題があった。   However, the invention of Patent Document 1 has a problem that not only the data amount of the three-dimensional table increases but also the operation scale increases.

本発明は、上記問題に鑑みてなされたものであり、出力用の色空間において色域外の色についても、輝度や色相を変化させることなく、好適な色再現性を簡単な構成で実現することを目的とする。   The present invention has been made in view of the above problems, and realizes a suitable color reproducibility with a simple configuration without changing luminance and hue even for colors outside the color gamut in the output color space. With the goal.

本発明の一例である画像処理装置は、撮像素子から出力されるカラー画像から出力用画像を作成する画像処理装置であって、前記カラー画像の信号を取得する取得部と、前記カラー画像の信号を輝度信号および複数の色差信号に変換する信号変換部と、前記出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、前記輝度信号を維持するとともに、前記複数の色差信号の比を維持した状態で、前記複数の色差信号を調整することにより、前記注目画素の色相を維持しつつ彩度を調整する彩度調整部とを備え、前記彩度調整部は、前記注目画素の第1の色成分と第2の色成分のうち、前記第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整し、前記第2の色成分の調整については、前記第1の色成分をクリップ処理したか否かに基づいて処理が異なるAn image processing apparatus which is an example of the present invention is an image processing apparatus that creates an output image from a color image output from an imaging device, an acquisition unit that acquires the color image signal, and the color image signal A signal conversion unit that converts a luminance signal and a plurality of color difference signals; and a pixel of interest in which color coordinates exist outside a color gamut reproducible in the color space of the output image, and the luminance signal is maintained, A saturation adjustment unit that adjusts the saturation while maintaining the hue of the target pixel by adjusting the plurality of color difference signals while maintaining the ratio of the plurality of color difference signals, and the saturation adjustment The unit adjusts the color difference signal based on clipping processing of the first color component of the first color component and the second color component of the target pixel to the color gamut, and the second color component Regarding the adjustment of the color component, the first Processing based on whether the clip processing the color component is different.

なお、前記信号変換部は、前記カラー画像の信号をYCbCrの信号に変換し、前記彩度調整部は、前記YCbCrの信号のうち、Yの信号を維持するとともに、Cbの信号およびCrの信号の比を維持した状態で、前記Cbの信号および前記Crの信号を調整しても良い。   The signal conversion unit converts the color image signal into a YCbCr signal, and the saturation adjustment unit maintains a Y signal among the YCbCr signals, and also includes a Cb signal and a Cr signal. The Cb signal and the Cr signal may be adjusted while maintaining the ratio.

また、前記カラー画像の信号は、RGBの信号であり、前記彩度調整部は、前記注目画素の前記RGBの信号のうち、第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整する第1の調整部と、前記注目画素の前記RGBの信号のうち、前記第1の色成分とは異なる第2の色成分の前記色域へのクリップ処理に基づいて、前記第1の調整部による調整後の前記色差信号を調整する第2の調整部と、前記注目画素の前記RGBの信号のうち、前記第1の色成分および第2の色成分とは異なる第3の色成分の前記色域へのクリップ処理に基づいて、前記第2の調整部による調整後の前記色差信号を調整する第3の調整部とを有しても良い。   Further, the color image signal is an RGB signal, and the saturation adjustment unit is based on a clipping process of the first color component to the color gamut in the RGB signal of the target pixel. Based on the first adjustment unit that adjusts the color difference signal, and the clipping process to the color gamut of the second color component different from the first color component among the RGB signals of the target pixel, A second adjustment unit that adjusts the color difference signal after adjustment by the first adjustment unit, and a first color component different from the first color component and the second color component among the RGB signals of the target pixel. And a third adjustment unit that adjusts the color difference signal after the adjustment by the second adjustment unit based on the clipping process of the three color components to the color gamut.

本発明の一例である撮像装置は、カラー画像を撮像する撮像部と、上記の画像処理装置とを備える。   An imaging apparatus that is an example of the present invention includes an imaging unit that captures a color image and the above-described image processing apparatus.

本発明の一例であるプログラムは、撮像素子から出力されるカラー画像から出力用画像を作成するプログラムであって、前記カラー画像の信号を取得する処理と、前記カラー画像の信号を輝度信号および複数の色差信号に変換する処理と、前記出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、前記輝度信号を維持するとともに、前記複数の色差信号の比を維持した状態で、前記複数の色差信号を調整することにより、前記注目画素の色相を維持しつつ彩度を調整する処理とをそれぞれコンピュータに実行させ、前記彩度を調整する処理では、前記注目画素の第1の色成分と第2の色成分のうち、前記第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整し、前記第2の色成分の調整については、前記第1の色成分をクリップ処理したか否かに基づいて異なる処理を行うA program that is an example of the present invention is a program that creates an output image from a color image output from an image sensor, the process of obtaining the color image signal, a luminance signal and a plurality of signals of the color image. In the target pixel having color coordinates outside the color gamut that can be reproduced in the color space of the output image, the luminance signal is maintained, and the ratio of the plurality of color difference signals is set. In the state of maintaining, by adjusting the plurality of color difference signals, the process of adjusting the saturation while maintaining the hue of the pixel of interest , respectively, is executed by the computer, the process of adjusting the saturation, Of the first color component and the second color component of the pixel of interest, the color difference signal is adjusted based on the clipping process of the first color component to the color gamut, and the second color component is adjusted. In Information, performs different processing based on whether the first clip processing color components of.

本発明によれば、出力用の色空間において色域外の色についても、輝度や色相を変化させることなく、好適な色再現性を簡単な構成で実現することができる。   According to the present invention, it is possible to achieve suitable color reproducibility with a simple configuration without changing luminance and hue even for colors outside the color gamut in the output color space.

第1実施形態の電子カメラの構成例を示す図The figure which shows the structural example of the electronic camera of 1st Embodiment. 第1実施形態の電子カメラの動作例を示す流れ図1 is a flowchart showing an operation example of the electronic camera of the first embodiment. 第1実施形態の電子カメラの動作例を示す流れ図(続き)Flowchart showing an operation example of the electronic camera of the first embodiment (continued) 第1の階調変換処理で適用される階調変換曲線G1を示す図The figure which shows the gradation conversion curve G1 applied by the 1st gradation conversion process 第2の階調変換処理で適用される階調変換曲線G2を示す図The figure which shows the gradation conversion curve G2 applied by a 2nd gradation conversion process 色域外クリップ処理について説明する図Diagram explaining out-of-gamut clip processing 色域外クリップ処理について説明する別の図Another diagram explaining out-of-gamut clip processing 第2実施形態での画像処理装置の構成例を示す図The figure which shows the structural example of the image processing apparatus in 2nd Embodiment.

<第1実施形態の説明>
図1は、画像処理装置、撮像装置の一例である第1実施形態の電子カメラの構成例を示す図である。
<Description of First Embodiment>
FIG. 1 is a diagram illustrating a configuration example of the electronic camera according to the first embodiment which is an example of an image processing apparatus and an imaging apparatus.

電子カメラ11は、撮影光学系12と、撮像部13と、画像処理エンジン14と、第1メモリ15と、第2メモリ16と、記録I/F17と、表示部18と、操作部19とを備えている。ここで、撮像部13、第1メモリ15、第2メモリ16、記録I/F17、表示部18および操作部19は、それぞれ画像処理エンジン14と接続されている。   The electronic camera 11 includes a photographing optical system 12, an imaging unit 13, an image processing engine 14, a first memory 15, a second memory 16, a recording I / F 17, a display unit 18, and an operation unit 19. I have. Here, the imaging unit 13, the first memory 15, the second memory 16, the recording I / F 17, the display unit 18, and the operation unit 19 are each connected to the image processing engine 14.

撮像部13は、撮影光学系12によって結像された被写体の像を撮像(撮影)するモジュールである。例えば、撮像部13は、光電変換を行う撮像素子と、撮像素子の出力にアナログ信号処理やA/D変換処理などを施す信号処理回路とを含んでいる。ここで、撮像素子の画素には、例えば公知のベイヤ配列に従ってRGBのカラーフィルタが配置されており、カラーフィルタでの色分解によって各色に対応する画像信号を出力する。これにより、撮像部13は、撮影時にカラーの画像を取得できる。なお、撮像部13で撮影された画像のデータは、画像処理エンジン14に入力される。   The imaging unit 13 is a module that captures (captures) an image of a subject formed by the imaging optical system 12. For example, the imaging unit 13 includes an imaging device that performs photoelectric conversion, and a signal processing circuit that performs analog signal processing, A / D conversion processing, and the like on the output of the imaging device. Here, for example, RGB color filters are arranged in the pixels of the image sensor according to a known Bayer array, and image signals corresponding to the respective colors are output by color separation in the color filters. Thereby, the imaging part 13 can acquire a color image at the time of imaging | photography. Note that image data captured by the imaging unit 13 is input to the image processing engine 14.

画像処理エンジン14は、電子カメラ11の動作を統括的に制御するプロセッサであって、画像のデータに対して、色補間、階調変換、ホワイトバランス補正、輪郭強調、ノイズ除去などの画像処理を施す。また、画像処理エンジン14は、プログラムの実行により、信号変換部21、彩度調整部22として機能する(信号変換部21、彩度調整部22の動作については後述する)。   The image processing engine 14 is a processor that comprehensively controls the operation of the electronic camera 11, and performs image processing such as color interpolation, gradation conversion, white balance correction, edge enhancement, and noise removal on image data. Apply. The image processing engine 14 functions as a signal conversion unit 21 and a saturation adjustment unit 22 by executing a program (the operations of the signal conversion unit 21 and the saturation adjustment unit 22 will be described later).

第1メモリ15は、各画像のデータを一時的に記憶するメモリであって、例えば揮発性の記憶媒体であるSDRAMで構成される。また、第2メモリ16は、画像処理エンジン14で実行するプログラムや、このプログラムで使用される各種データを記憶するメモリであって、例えばフラッシュメモリ等の不揮発性メモリで構成される。   The first memory 15 is a memory that temporarily stores data of each image, and is configured by, for example, an SDRAM that is a volatile storage medium. The second memory 16 is a memory that stores a program executed by the image processing engine 14 and various data used in the program, and is configured by a non-volatile memory such as a flash memory, for example.

記録I/F17は、不揮発性の記憶媒体20を接続するためのコネクタを有している。そして、記録I/F17は、コネクタに接続された記憶媒体20に対して画像のデータの書き込み/読み込みを実行する。上記の記憶媒体20は、例えば、ハードディスクや、半導体メモリを内蔵したメモリカードである。なお、図1では記憶媒体20の一例としてメモリカードを図示する。   The recording I / F 17 has a connector for connecting the nonvolatile storage medium 20. The recording I / F 17 executes writing / reading of image data with respect to the storage medium 20 connected to the connector. The storage medium 20 is, for example, a hard disk or a memory card incorporating a semiconductor memory. In FIG. 1, a memory card is illustrated as an example of the storage medium 20.

表示部18は、各種画像を表示する表示装置である。表示部18は、例えば、撮像部13の出力による画像のライブビュー表示や、記憶媒体20からの出力による再生表示を行う。また、操作部19は、ユーザの各種操作(例えば被写体の撮影指示や、輝度調整の設定変更の指示など)を受け付けるスイッチを含む。   The display unit 18 is a display device that displays various images. The display unit 18 performs, for example, live view display of an image based on the output of the imaging unit 13 and reproduction display based on an output from the storage medium 20. In addition, the operation unit 19 includes a switch that receives various user operations (for example, an instruction to shoot a subject, an instruction to change setting of brightness adjustment, and the like).

次に、図2および図3の流れ図を参照しつつ、第1実施形態の電子カメラの動作例を説明する。第1実施形態では、カラー画像の彩度を調整する例を説明する。なお、図2および図3の処理は、静止画像の撮像時に画像処理エンジン14がプログラムを実行することで開始される。   Next, an operation example of the electronic camera of the first embodiment will be described with reference to the flowcharts of FIGS. 2 and 3. In the first embodiment, an example of adjusting the saturation of a color image will be described. 2 and 3 is started when the image processing engine 14 executes a program when a still image is captured.

ステップ#101:画像処理エンジン14は、ユーザの撮影指示に応じて、記録用の静止画像を撮像部13に撮像させる。これにより、画像処理エンジン14は、処理対象のカラー画像を撮像部13から取得する。なお、#101の段階でのカラー画像は色補間前のRAW画像であって、各画素の信号値はRGBのいずれかの成分に対応する。   Step # 101: The image processing engine 14 causes the imaging unit 13 to capture a recording still image in response to a user's shooting instruction. As a result, the image processing engine 14 acquires a color image to be processed from the imaging unit 13. Note that the color image at the step # 101 is a RAW image before color interpolation, and the signal value of each pixel corresponds to one of RGB components.

ステップ#102:画像処理エンジン14は、取得したカラー画像に対して、それぞれ公知のホワイトバランス調整および色補間(ベイヤ補間)を行う。なお、#102の色補間により、カラー画像の各画素でRGB全成分が揃う。   Step # 102: The image processing engine 14 performs known white balance adjustment and color interpolation (Bayer interpolation) on the acquired color image. Note that all the RGB components are arranged in each pixel of the color image by the color interpolation of # 102.

ステップ#103:画像処理エンジン14は、カラー画像のうち、彩度調整を行う注目画素を指定する。ここで、画像処理エンジン14は、カラー画像の全画素を順次注目画素として指定する。また、画像処理エンジン14は、注目画素を変更するときには、画像の左上隅を起点として1行ずつ左から右に注目画素を順番に指定するものとする。   Step # 103: The image processing engine 14 designates a pixel of interest for performing saturation adjustment in the color image. Here, the image processing engine 14 sequentially designates all pixels of the color image as the target pixel. In addition, when changing the target pixel, the image processing engine 14 sequentially specifies the target pixel from left to right one line at a time starting from the upper left corner of the image.

ステップ#104:画像処理エンジン14は、注目画素の画素値に対して、標準のsRGBガンマの階調変換曲線G1(1/2.2乗相当)による第1の階調変換処理を施す。なお、第1の階調変換処理で適用される階調変換曲線G1を図4に示す。図4の横軸は、階調変換前の入力画素値(撮像素子の出力)であり、図4の縦軸は、階調変換後の出力画素値である。   Step # 104: The image processing engine 14 performs a first gradation conversion process using a standard sRGB gamma gradation conversion curve G1 (equivalent to 1 / 2.2) on the pixel value of the target pixel. FIG. 4 shows a gradation conversion curve G1 applied in the first gradation conversion process. The horizontal axis in FIG. 4 is the input pixel value (output of the image sensor) before gradation conversion, and the vertical axis in FIG. 4 is the output pixel value after gradation conversion.

ステップ#105:信号変換部21は、注目画素の色空間をRGBからYCbCrへ変換する。なお、#105の処理では、撮像素子の色空間(センサRGB)のままG1で階調変換を施した後のRGB信号値から輝度信号Yを生成している。そのため、上記の処理では、センサRGBからsRGBへのマトリックス変換で生じるような高彩度部での階調段差の発生はない。   Step # 105: The signal converter 21 converts the color space of the pixel of interest from RGB to YCbCr. In the process of # 105, the luminance signal Y is generated from the RGB signal values after gradation conversion is performed with G1 while maintaining the color space (sensor RGB) of the image sensor. For this reason, in the above-described processing, there is no occurrence of a gradation step in the high saturation portion, which is caused by matrix conversion from sensor RGB to sRGB.

例えば、#105での信号変換部21は、以下の式(1)〜式(3)により注目画素のRGBの信号値からYCbCrの信号値を求めればよい。
Y = kry*R+kgy*G+kby*B …(1)
Cb=-krcb*R-kgcb*G+kbcb*B …(2)
Cr= krcr*R-kgcr*G-kbcr*B …(3)
上記の式(1)から式(3)でのkry,kgy,kby,krcb,kgcb,kbcb,krcr,kgcr,kbcrは、色票を用いて最適化された係数が適用されている。
For example, the signal conversion unit 21 in # 105 may obtain the YCbCr signal value from the RGB signal value of the target pixel by the following equations (1) to (3).
Y = kry * R + kgy * G + kby * B (1)
Cb = -krcb * R-kgcb * G + kbcb * B (2)
Cr = krcr * R-kgcr * G-kbcr * B (3)
In kry, kgy, kby, krcb, kgcb, kbcb, krcr, kgcr, and kbcr in the above formulas (1) to (3), coefficients optimized using color charts are applied.

ところで、YCbCrの信号からなる画像は、出力用の色空間(例えば、表示系の色空間であるsRGB色空間)よりも広い範囲を再現可能である。そのため、処理対象の画像(#101で取得したカラー画像)の内容によっては、画素の一部が、出力用の色空間において、その色座標が色域外となってしまうことがある。そこで、後述する#108において、色座標が色域外の画素を色域内へ補正するための色域外クリップ処理を行う。   By the way, an image composed of YCbCr signals can reproduce a wider range than an output color space (for example, an sRGB color space which is a color space of a display system). For this reason, depending on the contents of the image to be processed (color image acquired in # 101), some of the pixels may have their color coordinates outside the color gamut in the output color space. In step # 108, which will be described later, out-of-gamut clip processing is performed to correct pixels whose color coordinates are out of the color gamut into the color gamut.

ステップ#106:画像処理エンジン14は、輝度信号Yに対して、階調変換曲線G2による第2の階調変換処理を施す。なお、第2の階調変換処理で適用される階調変換曲線G2を図5に示す。図5の横軸は、階調変換前の入力画素値であり、図5の縦軸は、階調変換後の出力画素値である。この階調変換曲線G2は、低輝度部分および高輝度部分での階調変化を小さくするS字状のカーブである。第2の階調変換処理では、画像のコントラスト強調や、低輝度部分の階調を圧縮する黒締めが行われる。   Step # 106: The image processing engine 14 performs a second gradation conversion process on the luminance signal Y using the gradation conversion curve G2. Note that a gradation conversion curve G2 applied in the second gradation conversion process is shown in FIG. The horizontal axis in FIG. 5 is an input pixel value before gradation conversion, and the vertical axis in FIG. 5 is an output pixel value after gradation conversion. This gradation conversion curve G2 is an S-shaped curve that reduces the gradation change in the low luminance portion and the high luminance portion. In the second gradation conversion process, contrast enhancement of the image and black tightening that compresses the gradation of the low luminance part are performed.

ステップ#107:画像処理エンジン14は、第2の階調変換処理後の画像に対して、それぞれ公知の輪郭強調処理およびノイズ低減処理を行う。   Step # 107: The image processing engine 14 performs known edge enhancement processing and noise reduction processing on the image after the second gradation conversion processing, respectively.

ステップ#108:彩度調整部22は、注目画素の輝度信号Yおよび色差信号(Cb,Cr)に基づいて、色域外クリップ処理を行う。色域外クリップ処理については、図3の流れ図を参照して説明する。なお、色域外クリップ処理においては、出力用の色空間としてsRGB色空間を例に挙げて説明する。YCbCrの色空間とsRGB色空間との関係は以下の式(4)から式(6)で示される。
Y=Kr*R+(1-Kr-Kb)*G+Kb*B …(4)
Cb=1/2*(B-Y)/(1-Kb) …(5)
Cr=1/2*(R-Y)/(1-Kr) …(6)
上記の式(4)から式(6)でのKrおよびKbは、色票を用いて最適化された係数が適用されている。
Step # 108: The saturation adjusting unit 22 performs out-of-gamut clipping processing based on the luminance signal Y and the color difference signals (Cb, Cr) of the target pixel. The out-of-gamut clipping process will be described with reference to the flowchart of FIG. The out-of-gamut clipping process will be described by taking the sRGB color space as an example of the output color space. The relationship between the YCbCr color space and the sRGB color space is expressed by the following equations (4) to (6).
Y = Kr * R + (1-Kr-Kb) * G + Kb * B (4)
Cb = 1/2 * (BY) / (1-Kb)… (5)
Cr = 1/2 * (RY) / (1-Kr) (6)
Coefficients optimized using color charts are applied to Kr and Kb in the above formulas (4) to (6).

さらに、以下の式(7)から式(9)は、上述した式(4)から式(6)を変換したものである。
B=2*Cb*(1-Kb)+Y …(7)
R=2*Cr*(1-Kr)+Y …(8)
G=(Y-Kr*R-Kb*B)/(1-Kr-Kb) …(9)
彩度調整部は、上述した式(4)から式(9)を用いて、色域外クリップ処理を行う。以下では、カラー画像の一例として、各色成分がそれぞれ8ビット(0〜255)で表現される画像データを例に挙げて説明する。
Furthermore, the following formulas (7) to (9) are obtained by converting the above formulas (4) to (6).
B = 2 * Cb * (1-Kb) + Y (7)
R = 2 * Cr * (1-Kr) + Y (8)
G = (Y-Kr * R-Kb * B) / (1-Kr-Kb) (9)
The saturation adjustment unit performs out-of-gamut clip processing using the above-described Expressions (4) to (9). Hereinafter, image data in which each color component is represented by 8 bits (0 to 255) will be described as an example of a color image.

ステップ#201:彩度調整部22は、色差信号Cbの値(以下Cb値と称する)および色差信号Crの値(以下Cr値と称する)の比率を算出する。Cb値とCr値との比cbcは以下の式(10)により求められる。
cbc=Cr/Cb …(10)
ステップ#202:彩度調整部22は、注目画素の輝度信号Yの値(以下Y値と称する)およびCr値と、上述した式(8)とを用いて、R値を求める。なお、上述した色票を用いて最適化された係数Kr=0.299である場合、式(8)に基づくR値は以下の式(11)のようになる。
R=Y+1.402*Cr …(11)
ステップ#203:彩度調整部22は、#202で算出したR値が負の値であるか(0未満の値であるか)否かを判断する。R値が負の値である場合には、彩度調整部22は、R値のクリップが必要と判断し、#204に処理が移行する。一方、R値が負の値でない場合には、彩度調整部22は、後述する#206に処理を移行する。
Step # 201: The saturation adjusting unit 22 calculates a ratio between the value of the color difference signal Cb (hereinafter referred to as Cb value) and the value of the color difference signal Cr (hereinafter referred to as Cr value). The ratio cbc between the Cb value and the Cr value is obtained by the following equation (10).
cbc = Cr / Cb (10)
Step # 202: The saturation adjusting unit 22 obtains the R value using the value of the luminance signal Y (hereinafter referred to as Y value) and Cr value of the pixel of interest and the above-described equation (8). When the coefficient Kr optimized using the above-described color chart is 0.299, the R value based on Expression (8) is as shown in Expression (11) below.
R = Y + 1.402 * Cr (11)
Step # 203: The saturation adjusting unit 22 determines whether or not the R value calculated in # 202 is a negative value (is a value less than 0). If the R value is a negative value, the saturation adjusting unit 22 determines that clipping of the R value is necessary, and the process proceeds to # 204. On the other hand, when the R value is not a negative value, the saturation adjusting unit 22 shifts the processing to # 206 described later.

ステップ#204:彩度調整部22は、R値を0とし、注目画素のY値と、上述した式(6)とを用いて、R値をクリップした後のCr値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、R=0、かつ、#202で例示したように係数Kr=0.299である場合、式(6)に基づくCr値は以下の式(12)のようになる。
Cr=-Y/1.402 …(12)
ステップ#205:彩度調整部22は、#201で算出した比cbcと、#204で算出したR値をクリップした後のCr値とに基づいて、以下の式(13)によりCb値を算出する。このようにR値をクリップした後のCb値を算出することにより、Cb値とCr値との比が維持されることになる。
Cb=Cr/cbc …(13)
ステップ#206:彩度調整部22は、#202で算出したR値が255を超えるか否かを判断する。R値が255を超える場合には、彩度調整部22は、R値が飽和しているためクリップが必要と判断し、#207に処理が移行する。一方、R値が255以下である場合には、彩度調整部22は、R値が0以上255以下であるためクリップは不要と判断し、後述する#209に処理を移行する。
Step # 204: The saturation adjusting unit 22 sets the R value to 0, and calculates the Cr value after clipping the R value using the Y value of the target pixel and the above-described equation (6). For the luminance signal Y, the original Y value is maintained. Further, when R = 0 and the coefficient Kr = 0.299 as exemplified in # 202, the Cr value based on the equation (6) is as the following equation (12).
Cr = -Y / 1.402… (12)
Step # 205: The saturation adjusting unit 22 calculates the Cb value by the following equation (13) based on the ratio cbc calculated in # 201 and the Cr value after clipping the R value calculated in # 204. To do. Thus, by calculating the Cb value after clipping the R value, the ratio between the Cb value and the Cr value is maintained.
Cb = Cr / cbc (13)
Step # 206: The saturation adjusting unit 22 determines whether or not the R value calculated in # 202 exceeds 255. When the R value exceeds 255, the saturation adjusting unit 22 determines that clipping is necessary because the R value is saturated, and the process proceeds to # 207. On the other hand, when the R value is 255 or less, the saturation adjusting unit 22 determines that the clip is unnecessary because the R value is 0 or more and 255 or less, and shifts the processing to # 209 described later.

ステップ#207:彩度調整部22は、R値を255とし、注目画素のY値と、上述した式(6)とを用いて、R値をクリップした後のCr値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、R=255、かつ、#202で例示したように係数Kr=0.299である場合、式(6)に基づくCr値は以下の式(14)のようになる。
Cr=(255-Y)/1.402 …(14)
ステップ#208:彩度調整部22は、#201で算出した比cbcと、#207で算出したR値をクリップした後のCr値とに基づいて、#205で説明した式(13)によりCb値を算出する。このようにR値をクリップした後のCb値を算出することにより、Cb値とCr値との比が維持されることになる。
Step # 207: The saturation adjusting unit 22 sets the R value to 255, and calculates the Cr value after clipping the R value using the Y value of the target pixel and the above-described equation (6). For the luminance signal Y, the original Y value is maintained. Further, when R = 255 and the coefficient Kr = 0.299 as exemplified in # 202, the Cr value based on the equation (6) is expressed by the following equation (14).
Cr = (255-Y) /1.402… (14)
Step # 208: The saturation adjusting unit 22 uses the ratio cbc calculated in # 201 and the Cr value after clipping the R value calculated in # 207 to calculate Cb according to the equation (13) described in # 205. Calculate the value. Thus, by calculating the Cb value after clipping the R value, the ratio between the Cb value and the Cr value is maintained.

ステップ#209:彩度調整部22は、注目画素のY値およびCb値と、上述した式(7)とを用いて、B値を求める。なお、Y値については常に元からの値が用いられる。Cb値については、R値がクリップされた場合には#205または#208で算出された値が用いられ、R値がクリップされていない場合には元からの値が用いられる。また、上述した色票を用いて最適化された係数Kb=0.114である場合、式(7)に基づくB値は以下の式(15)のようになる。
B=Y+1.772*Cb …(15)
ステップ#210:彩度調整部22は、#209で算出したB値が負の値であるか(0未満の値であるか)否かを判断する。B値が負の値である場合には、彩度調整部22は、B値のクリップが必要と判断し、#211に処理が移行する。一方、B値が負の値でない場合には、彩度調整部22は、後述する#213に処理を移行する。
Step # 209: The saturation adjusting unit 22 obtains the B value using the Y value and Cb value of the target pixel and the above-described equation (7). Note that the original value is always used for the Y value. As for the Cb value, the value calculated in # 205 or # 208 is used when the R value is clipped, and the original value is used when the R value is not clipped. Further, when the coefficient Kb optimized using the above-described color chart is 0.114, the B value based on the equation (7) is expressed by the following equation (15).
B = Y + 1.772 * Cb… (15)
Step # 210: The saturation adjusting unit 22 determines whether or not the B value calculated in # 209 is a negative value (is a value less than 0). If the B value is a negative value, the saturation adjusting unit 22 determines that clipping of the B value is necessary, and the process proceeds to # 211. On the other hand, when the B value is not a negative value, the saturation adjusting unit 22 shifts the processing to # 213 described later.

ステップ#211:彩度調整部22は、B値を0とし、注目画素のY値と、上述した式(5)とを用いて、B値をクリップした後のCb値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、B=0、かつ、#209で例示したようにKb=0.114である場合、式(5)に基づくCb値は以下の式(16)のようになる。
Cb=-Y/1.772 …(16)
ステップ#212:彩度調整部22は、#201で算出した比cbcと、#211で算出したB値をクリップした後のCb値とに基づいて、以下の式(17)によりCr値を算出する。このようにB値をクリップした後のCr値を算出することにより、Cb値とCr値との比が維持されることになる。
Cr=cbc*Cb …(17)
ステップ#213:彩度調整部22は、#209で算出したB値が255を超えるか否かを判断する。B値が255を超える場合には、彩度調整部22は、B値が飽和しているためクリップが必要と判断し、#214に処理が移行する。一方、B値が255以下である場合には、彩度調整部22は、B値が0以上255以下であるためクリップは不要と判断し、後述する#216に処理を移行する。
Step # 211: The saturation adjusting unit 22 sets the B value to 0, and calculates the Cb value after clipping the B value using the Y value of the target pixel and the above-described equation (5). For the luminance signal Y, the original Y value is maintained. Further, when B = 0 and Kb = 0.114 as exemplified in # 209, the Cb value based on the equation (5) is expressed by the following equation (16).
Cb = -Y / 1.772… (16)
Step # 212: The saturation adjusting unit 22 calculates the Cr value by the following equation (17) based on the ratio cbc calculated in # 201 and the Cb value after clipping the B value calculated in # 211. To do. Thus, by calculating the Cr value after clipping the B value, the ratio between the Cb value and the Cr value is maintained.
Cr = cbc * Cb (17)
Step # 213: The saturation adjusting unit 22 determines whether or not the B value calculated in # 209 exceeds 255. When the B value exceeds 255, the saturation adjusting unit 22 determines that clipping is necessary because the B value is saturated, and the process proceeds to # 214. On the other hand, when the B value is 255 or less, the saturation adjusting unit 22 determines that the clip is unnecessary because the B value is 0 or more and 255 or less, and shifts the processing to # 216 described later.

ステップ#214:彩度調整部22は、B値を255とし、注目画素のY値と、上述した式(5)とを用いて、B値をクリップした後のCb値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、B=255、かつ、#209で例示したようにKb=0.114である場合、式(5)に基づくCb値は以下の式(18)のようになる。
Cb=(255-Y)/1.772 …(18)
ステップ#215:彩度調整部22は、#201で算出した比cbcと、#214で算出したB値をクリップした後のCb値とに基づいて、#212で説明した式(17)によりCr値を算出する。このようにB値をクリップした後のCr値を算出することにより、Cb値とCr値との比が維持されることになる。
Step # 214: The saturation adjusting unit 22 sets the B value to 255, and calculates the Cb value after clipping the B value using the Y value of the pixel of interest and the above-described equation (5). For the luminance signal Y, the original Y value is maintained. Further, when B = 255 and Kb = 0.114 as exemplified in # 209, the Cb value based on the equation (5) is represented by the following equation (18).
Cb = (255-Y) /1.772… (18)
Step # 215: Based on the ratio cbc calculated in # 201 and the Cb value after clipping the B value calculated in # 214, the saturation adjusting unit 22 uses the equation (17) described in # 212 to obtain Cr. Calculate the value. Thus, by calculating the Cr value after clipping the B value, the ratio between the Cb value and the Cr value is maintained.

ステップ#216:彩度調整部22は、注目画素のY値、Cb値およびCr値と、上述した式(7)から式(9)とを用いて、G値を求める。なお、Y値については常に元からの値が用いられる。Cb値については、B値がクリップされた場合には#211または#214で算出された値が用いられ、B値がクリップされてなく、かつ、R値がクリップされた場合には#205または#208で算出された値が用いられ、B値もR値もクリップされていない場合には元からの値が用いられる。Cr値については、B値がクリップされた場合には#212または#215で算出された値が用いられ、B値がクリップされてなく、かつ、R値がクリップされた場合には#204または#207で算出された値が用いられ、B値もR値もクリップされていない場合には元からの値が用いられる。また、上述した色票を用いて最適化された係数Kr=0.299かつ係数Kb=0.114である場合、式(7)から式(9)に基づくG値は以下の式(19)のようになる。
G=Y-0.3441*Cb-0.7141*Cr …(19)
ステップ#217:彩度調整部22は、#216で算出したG値が負の値であるか(0未満の値であるか)否かを判断する。G値が負の値である場合には、彩度調整部22は、G値のクリップが必要と判断し、#218に処理が移行する。一方、G値が負の値でない場合には、彩度調整部22は、後述する#220に処理を移行する。
Step # 216: The saturation adjusting unit 22 obtains the G value by using the Y value, Cb value, and Cr value of the target pixel and the above-described equations (7) to (9). Note that the original value is always used for the Y value. As for the Cb value, when the B value is clipped, the value calculated at # 211 or # 214 is used, and when the B value is not clipped and the R value is clipped, # 205 or The value calculated in # 208 is used, and when neither the B value nor the R value is clipped, the original value is used. As for the Cr value, when the B value is clipped, the value calculated at # 212 or # 215 is used, and when the B value is not clipped and the R value is clipped, # 204 or The value calculated in # 207 is used, and when neither the B value nor the R value is clipped, the original value is used. Further, when the coefficient Kr = 0.299 and the coefficient Kb = 0.114 optimized using the above-described color chart, the G value based on the equations (7) to (9) is expressed by the following equation (19). .
G = Y-0.3441 * Cb-0.7141 * Cr (19)
Step # 217: The saturation adjusting unit 22 determines whether or not the G value calculated in # 216 is a negative value (a value less than 0). If the G value is a negative value, the saturation adjusting unit 22 determines that clipping of the G value is necessary, and the process proceeds to # 218. On the other hand, when the G value is not a negative value, the saturation adjusting unit 22 shifts the processing to # 220 described later.

ステップ#218:彩度調整部22は、G値を0とし、#201で算出した比cbcと、注目画素のY値と、#204または#207でクリップしたR値(R値をクリップしていない場合には元からのR値)と、#211または#214でクリップしたB値(B値をクリップしていない場合には元からのB値)と、0にクリップしたG値と、上述した式(4)から式(6)とを用いて、G値をクリップした後のCb値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、G=0、かつ、#216で例示したように係数Kr=0.299かつ係数Kb=0.114である場合、式(4)から式(6)に基づくCb値は以下の式(20)のようになる。
Cb=-Y/(-0.3441-0.7141*cbc) …(20)
ステップ#219:彩度調整部22は、#201で算出した比cbcと、#218で算出したG値をクリップした後のCb値とに基づいて、#212で説明した式(17)によりCr値を算出する。このようにG値をクリップした後のCr値を算出することにより、Cb値とCr値との比が維持されることになる。
Step # 218: The saturation adjusting unit 22 sets the G value to 0, the ratio cbc calculated in # 201, the Y value of the target pixel, and the R value clipped in # 204 or # 207 (the R value is clipped). If not, the B value clipped at # 211 or # 214 (or the original B value if the B value is not clipped), the G value clipped to 0, Using the equations (4) to (6), the Cb value after clipping the G value is calculated. For the luminance signal Y, the original Y value is maintained. Further, when G = 0 and the coefficient Kr = 0.299 and the coefficient Kb = 0.114 as exemplified in # 216, the Cb value based on the expressions (4) to (6) is expressed by the following expression (20). become.
Cb = -Y / (-0.3441-0.7141 * cbc)… (20)
Step # 219: Based on the ratio cbc calculated in # 201 and the Cb value after clipping the G value calculated in # 218, the saturation adjusting unit 22 uses the equation (17) described in # 212 to obtain Cr. Calculate the value. Thus, by calculating the Cr value after clipping the G value, the ratio between the Cb value and the Cr value is maintained.

ステップ#220:彩度調整部22は、#216で算出したG値が255を超えるか否かを判断する。G値が255を超える場合には、彩度調整部22は、G値が飽和しているためクリップが必要と判断し、#221に処理が移行する。一方、G値が255以下である場合には、彩度調整部22は、G値が0以上255以下であるためクリップは不要と判断し、一連の処理を終了する。   Step # 220: The saturation adjusting unit 22 determines whether or not the G value calculated in # 216 exceeds 255. When the G value exceeds 255, the saturation adjusting unit 22 determines that clipping is necessary because the G value is saturated, and the process proceeds to # 221. On the other hand, when the G value is 255 or less, the saturation adjusting unit 22 determines that the clip is unnecessary because the G value is 0 or more and 255 or less, and ends the series of processes.

ステップ#221:彩度調整部22は、G値を255とし、#201で算出した比cbcと、注目画素のY値と、#204または#207でクリップしたR値(R値をクリップしていない場合には元からのR値)と、#211または#214でクリップしたB値(B値をクリップしていない場合には元からのB値)と、255にクリップしたG値と、上述した式(4)から式(6)とを用いて、G値をクリップした後のCb値を算出する。なお、輝度信号Yについては、元からのY値を維持したままとする。また、G=255、かつ、#216で例示したように係数Kr=0.299かつ係数Kb=0.114である場合、式(4)から式(6)に基づくCb値は以下の式(21)のようになる。
Cb=(255-Y)/(-033441-0.7141*cbc) …(21)
ステップ#222:彩度調整部22は、#201で算出した比cbcと、#221で算出したG値をクリップした後のCb値とに基づいて、#212で説明した式(17)によりCr値を算出し、一連の処理を終了する。このようにG値をクリップした後のCr値を算出することにより、Cb値とCr値との比が維持されることになる。
Step # 221: The saturation adjusting unit 22 sets the G value to 255, the ratio cbc calculated in # 201, the Y value of the target pixel, and the R value clipped in # 204 or # 207 (the R value is clipped). If not, the B value clipped at # 211 or # 214 (or the original B value if the B value is not clipped), the G value clipped to 255, and the above Using the equations (4) to (6), the Cb value after clipping the G value is calculated. For the luminance signal Y, the original Y value is maintained. Further, when G = 255 and the coefficient Kr = 0.299 and the coefficient Kb = 0.114 as exemplified in # 216, the Cb value based on the expressions (4) to (6) is expressed by the following expression (21). become.
Cb = (255-Y) / (-033441-0.7141 * cbc)… (21)
Step # 222: The saturation adjusting unit 22 uses the ratio cbc calculated in # 201 and the Cb value after clipping the G value calculated in # 221 to calculate Cr according to the equation (17) described in # 212. A value is calculated, and a series of processing ends. Thus, by calculating the Cr value after clipping the G value, the ratio between the Cb value and the Cr value is maintained.

以上説明した色域外クリップ処理について、図6および図7の模式図を参照して説明する。図6および図7は、YCbCr空間を示す。図6の横軸はCb値およびCr値を示し、縦軸はY値を示す。一方、図7の横軸はCb値を示し、縦軸はCr値を示す。図6中の四角形で囲まれた領域A1は、sRGB色空間で再現可能な色域を示す。   The out-of-gamut clipping process described above will be described with reference to the schematic diagrams of FIGS. 6 and 7 show the YCbCr space. The horizontal axis in FIG. 6 indicates the Cb value and the Cr value, and the vertical axis indicates the Y value. On the other hand, the horizontal axis in FIG. 7 indicates the Cb value, and the vertical axis indicates the Cr value. A region A1 surrounded by a square in FIG. 6 indicates a color gamut that can be reproduced in the sRGB color space.

例えば、図6に示す画素P(1)は、色座標が上述した色域内であるため、上述した色域外クリップ処理においては何れの値も変化しない。また、例えば、図6に示す画素P(2)および画素P(3)は、色座標が色域外であるため、上述した色域外クリップ処理により、それぞれ画素P(2−a)および画素P(3−a)に調整される。この結果、図6に示すように、輝度を示すY値は維持された状態で、彩度が落とされることになる。また、色域外クリップ処理により、画素P(2)が画素P(2−a)に調整される際には、図7に示すように、Cb値とCr値との比が維持される。この結果、色相を維持しつつ彩度が調整されることになる。画素P(3)についても同様である。   For example, since the pixel P (1) shown in FIG. 6 has the color coordinates in the above-described color gamut, none of the values change in the out-of-gamut clipping process. Further, for example, the pixel P (2) and the pixel P (3) shown in FIG. 6 are out of the color gamut, so that the pixel P (2-a) and the pixel P ( 3-a). As a result, as shown in FIG. 6, the saturation is reduced while the Y value indicating the luminance is maintained. Further, when the pixel P (2) is adjusted to the pixel P (2-a) by the out-of-gamut clipping process, as shown in FIG. 7, the ratio between the Cb value and the Cr value is maintained. As a result, the saturation is adjusted while maintaining the hue. The same applies to the pixel P (3).

なお、図3、図6、図7を参照して説明した色域外クリップ処理においては、B値、R値、G値の順に処理を実行する例を示したが、本発明はこの例に限定されない。   Note that in the out-of-gamut clip processing described with reference to FIGS. 3, 6, and 7, an example is shown in which processing is performed in the order of B value, R value, and G value, but the present invention is limited to this example. Not.

ステップ#109:画像処理エンジン14は、カラー画像の全画素の処理が終了したか否かを判定する。上記要件を満たす場合(YES側)には#110に処理が移行する。一方、上記要件を満たさない場合(NO側)には#103に戻って、画像処理エンジン14は上記の動作を繰り返す。   Step # 109: The image processing engine 14 determines whether or not the processing of all the pixels of the color image has been completed. If the above requirement is satisfied (YES side), the process proceeds to # 110. On the other hand, if the above requirement is not satisfied (NO side), the process returns to # 103 and the image processing engine 14 repeats the above operation.

ステップ#110:画像処理エンジン14は、必要に応じて輪廓強調処理やノイズ除去処理、JPEG圧縮処理などをカラー画像に施した後、記録I/F17を介してカラー画像のデータを記憶媒体20に記録する。   Step # 110: The image processing engine 14 performs ring tone enhancement processing, noise removal processing, JPEG compression processing, etc. on the color image as necessary, and then stores the color image data in the storage medium 20 via the recording I / F 17. Record.

第1実施形態の電子カメラは、撮像素子から出力されるカラー画像の信号を取得し、取得したカラー画像の信号を輝度信号および複数の色差信号に変換するとともに、出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、輝度信号を維持するとともに、複数の色差信号の比を維持した状態で、複数の色差信号を調整することにより、注目画素の色相を維持しつつ彩度を調整する。これにより、第1実施形態では、出力用の色空間において色域外の色についても、輝度や色相を変化させることなく、好適な色再現性を簡単な構成で実現することができる。特に、輝度が維持されることにより、従来のような単純なクリップ処理を行う場合に比べて、階調性が向上する。   The electronic camera according to the first embodiment acquires a color image signal output from an image sensor, converts the acquired color image signal into a luminance signal and a plurality of color difference signals, and reproduces it in the color space of the output image. In the target pixel whose color coordinates exist outside the possible color gamut, the luminance signal is maintained and the hue of the target pixel is adjusted by adjusting the plurality of color difference signals while maintaining the ratio of the plurality of color difference signals. Adjust saturation while maintaining. As a result, in the first embodiment, it is possible to achieve suitable color reproducibility with a simple configuration without changing the luminance and hue even for colors outside the color gamut in the output color space. In particular, by maintaining the luminance, the gradation is improved as compared with the case of performing a simple clipping process as in the prior art.

<第2実施形態の説明>
図8は、第2実施形態での画像処理装置の構成例を示す図である。第2実施形態での画像処理装置は、入力画像に対して彩度調整処理を施すプログラムがインストールされたコンピュータである。
<Description of Second Embodiment>
FIG. 8 is a diagram illustrating a configuration example of the image processing apparatus according to the second embodiment. The image processing apparatus according to the second embodiment is a computer in which a program for performing saturation adjustment processing on an input image is installed.

図8に示すコンピュータ31は、データ読込部32、記憶装置33、CPU34、メモリ35および入出力I/F36、バス37を有している。データ読込部32、記憶装置33、CPU34、メモリ35および入出力I/F36は、バス37を介して相互に接続されている。さらに、コンピュータ31には、入出力I/F36を介して、入力デバイス38(キーボード、ポインティングデバイスなど)とモニタ39とがそれぞれ接続されている。なお、入出力I/F36は、入力デバイス38からの各種入力を受け付けるとともに、モニタ39に対して表示用のデータを出力する。   A computer 31 illustrated in FIG. 8 includes a data reading unit 32, a storage device 33, a CPU 34, a memory 35, an input / output I / F 36, and a bus 37. The data reading unit 32, the storage device 33, the CPU 34, the memory 35, and the input / output I / F 36 are connected to each other via a bus 37. Furthermore, an input device 38 (keyboard, pointing device, etc.) and a monitor 39 are connected to the computer 31 via an input / output I / F 36. The input / output I / F 36 accepts various inputs from the input device 38 and outputs display data to the monitor 39.

データ読込部32は、処理対象のカラー画像(色補間前のRAW画像)のデータや、プログラムを外部から読み込むときに用いられる。データ読込部32は、例えば、着脱可能な記憶媒体からデータを取得する読込デバイス(光ディスク、磁気ディスク、光磁気ディスクの読込装置など)や、公知の通信規格に準拠して外部の装置と通信を行う通信デバイス(USBインターフェース、LANモジュール、無線LANモジュールなど)である。   The data reading unit 32 is used when reading data of a color image to be processed (RAW image before color interpolation) or a program from the outside. The data reading unit 32 communicates with, for example, a reading device (such as an optical disk, a magnetic disk, or a magneto-optical disk reading device) that acquires data from a removable storage medium, or an external device based on a known communication standard. A communication device to perform (USB interface, LAN module, wireless LAN module, etc.).

記憶装置33は、例えば、ハードディスクや、不揮発性の半導体メモリなどの記憶媒体である。この記憶装置33には、上記のプログラムや、プログラムの実行に必要となる各種データが記憶されている。なお、記憶装置33には、データ読込部32から読み込んだ画像のデータなどを記憶しておくこともできる。   The storage device 33 is a storage medium such as a hard disk or a non-volatile semiconductor memory. The storage device 33 stores the above program and various data necessary for executing the program. The storage device 33 can also store image data read from the data reading unit 32.

CPU34は、コンピュータ31の各部を統括的に制御するプロセッサである。このCPU34は、プログラムの実行によって、第1実施形態または第2実施形態の画像処理エンジン14、信号変換部21、彩度調整部22として機能する。   The CPU 34 is a processor that comprehensively controls each unit of the computer 31. The CPU 34 functions as the image processing engine 14, the signal conversion unit 21, and the saturation adjustment unit 22 of the first embodiment or the second embodiment by executing the program.

メモリ35は、プログラムでの各種演算結果を一時的に記憶する。このメモリ35は、例えば揮発性のSDRAMである。   The memory 35 temporarily stores various calculation results in the program. The memory 35 is, for example, a volatile SDRAM.

ここで、第2実施形態での画像処理装置では、CPU34が、データ読込部32または記憶装置33から処理対象のカラー画像を取得する。そして、CPU34は、第1実施形態の#102〜#109および#201〜#211の処理を実行する。かかる第2実施形態においても、第1実施形態とほぼ同様の効果を得ることができる。   Here, in the image processing apparatus according to the second embodiment, the CPU 34 acquires a color image to be processed from the data reading unit 32 or the storage device 33. Then, the CPU 34 executes the processes of # 102 to # 109 and # 201 to # 211 of the first embodiment. In the second embodiment, substantially the same effect as that of the first embodiment can be obtained.

<実施形態の補足事項>
(補足1):上記実施形態では、画像のYCbCrデータを用いて被写体抽出を行う例を説明した。しかし、本発明はYCbCr色空間に限定されず、他の色空間(L*a*b*など)の場合にも適用できる。
<Supplementary items of the embodiment>
(Supplement 1): In the above embodiment, an example in which subject extraction is performed using YCbCr data of an image has been described. However, the present invention is not limited to the YCbCr color space, and can be applied to other color spaces (L * a * b * and the like).

(補足2):上記実施形態では、画像処理装置の各機能をプログラムによってソフトウェア的に実現する例を説明した。しかし、本発明の画像処理装置は、信号変換部21、彩度調整部22の各機能を、例えばASIC(Application Specific Integrated Circuit)
を用いてハードウェア的に実現するものであってもよい。
(Supplement 2): In the above embodiment, the example in which each function of the image processing apparatus is realized by software by a program has been described. However, in the image processing apparatus of the present invention, each function of the signal conversion unit 21 and the saturation adjustment unit 22 is set to, for example, an ASIC (Application Specific Integrated Circuit).
It may be realized in hardware using

以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図する。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。   From the above detailed description, features and advantages of the embodiments will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to use appropriate improvements and equivalents within the scope disclosed in.

11…電子カメラ、12…撮影光学系、13…撮像部、14…画像処理エンジン、15…第1メモリ、16…第2メモリ、17…記録I/F、18…表示部、19…操作部、20…記憶媒体、21…信号変換部、22…彩度調整部、31…コンピュータ、32…データ読込部、33…記憶装置、34…CPU、35…メモリ、36…入出力I/F、37…バス、38…入力デバイス、39…モニタ DESCRIPTION OF SYMBOLS 11 ... Electronic camera, 12 ... Imaging | photography optical system, 13 ... Imaging part, 14 ... Image processing engine, 15 ... 1st memory, 16 ... 2nd memory, 17 ... Recording I / F, 18 ... Display part, 19 ... Operation part 20 ... storage medium, 21 ... signal conversion unit, 22 ... saturation adjustment unit, 31 ... computer, 32 ... data reading unit, 33 ... storage device, 34 ... CPU, 35 ... memory, 36 ... input / output I / F, 37 ... Bus, 38 ... Input device, 39 ... Monitor

Claims (5)

撮像素子から出力されるカラー画像から出力用画像を作成する画像処理装置であって、
前記カラー画像の信号を取得する取得部と、
前記カラー画像の信号を輝度信号および複数の色差信号に変換する信号変換部と、
前記出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、前記輝度信号を維持するとともに、前記複数の色差信号の比を維持した状態で、前記複数の色差信号を調整することにより、前記注目画素の色相を維持しつつ彩度を調整する彩度調整部とを備え
前記彩度調整部は、前記注目画素の第1の色成分と第2の色成分のうち、前記第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整し、前記第2の色成分の調整については、前記第1の色成分をクリップ処理したか否かに基づいて異なる処理を行う画像処理装置。
An image processing apparatus for creating an output image from a color image output from an image sensor,
An acquisition unit for acquiring a signal of the color image;
A signal converter for converting the color image signal into a luminance signal and a plurality of color difference signals;
In the target pixel in which color coordinates exist outside the color gamut reproducible in the color space of the output image, while maintaining the luminance signal and maintaining the ratio of the plurality of color difference signals, the plurality of color differences by adjusting the signal, and a saturation adjusting unit for adjusting the color saturation while maintaining the hue of the pixel of interest,
The saturation adjustment unit adjusts the color difference signal based on clipping processing of the first color component to the color gamut of the first color component and the second color component of the target pixel, An image processing apparatus that performs different processing for adjusting the second color component based on whether or not the first color component has been clipped .
請求項1に記載の画像処理装置において、
前記信号変換部は、前記カラー画像の信号をYCbCrの信号に変換し、
前記彩度調整部は、前記YCbCrの信号のうち、Yの信号を維持するとともに、Cbの信号およびCrの信号の比を維持した状態で、前記Cbの信号および前記Crの信号を調整する画像処理装置。
The image processing apparatus according to claim 1.
The signal conversion unit converts the color image signal into a YCbCr signal,
The saturation adjustment unit among signals of the YCbCr, while maintaining signal Y, while maintaining the ratio of the Cb signal and Cr signal, you adjust the signal of the signal and the Cr of the Cb images processing device.
請求項1または請求項2に記載の画像処理装置において、
前記カラー画像の信号は、RGBの信号であり、
前記彩度調整部は、
前記注目画素の前記RGBの信号のうち、第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整する第1の調整部と、
前記注目画素の前記RGBの信号のうち、前記第1の色成分とは異なる第2の色成分の前記色域へのクリップ処理に基づいて、前記第1の調整部による調整後の前記色差信号を調整する第2の調整部と、
前記注目画素の前記RGBの信号のうち、前記第1の色成分および第2の色成分とは異なる第3の色成分の前記色域へのクリップ処理に基づいて、前記第2の調整部による調整後の前記色差信号を調整する第3の調整部とを有する画像処理装置。
The image processing apparatus according to claim 1 or 2,
The color image signal is an RGB signal,
The saturation adjustment unit
A first adjustment unit that adjusts the color difference signal based on clipping processing of the first color component to the color gamut among the RGB signals of the target pixel;
The color difference signal after the adjustment by the first adjustment unit based on the clipping process to the color gamut of the second color component different from the first color component among the RGB signals of the target pixel A second adjustment unit for adjusting
Based on the clipping process to the color gamut of the third color component different from the first color component and the second color component among the RGB signals of the target pixel, the second adjustment unit images processing device that having a third adjustment section for adjusting the color difference signals after the adjustment.
カラー画像を撮像する撮像部と、
請求項1からに請求項3の何れか1項に記載の画像処理装置と
を備える撮像装置。
An imaging unit for imaging a color image;
The image processing apparatus and includes that an imaging apparatus according to any one of claims 3 to claim 1.
撮像素子から出力されるカラー画像から出力用画像を作成するプログラムであって、
前記カラー画像の信号を取得する処理と、
前記カラー画像の信号を輝度信号および複数の色差信号に変換する処理と、
前記出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、前記輝度信号を維持するとともに、前記複数の色差信号の比を維持した状態で、前記複数の色差信号を調整することにより、前記注目画素の色相を維持しつつ彩度を調整する処理とをそれぞれコンピュータに実行させ
前記彩度を調整する処理では、前記注目画素の第1の色成分と第2の色成分のうち、前記第1の色成分の前記色域へのクリップ処理に基づいて、前記色差信号を調整し、前記第2の色成分の調整については、前記第1の色成分をクリップ処理したか否かに基づいて異なる処理を行うプログラム。
A program for creating an output image from a color image output from an image sensor,
Processing for obtaining a signal of the color image;
Processing for converting the color image signal into a luminance signal and a plurality of color difference signals;
In the target pixel in which color coordinates exist outside the color gamut reproducible in the color space of the output image, while maintaining the luminance signal and maintaining the ratio of the plurality of color difference signals, the plurality of color differences by adjusting the signals, respectively cause the computer to execute a process of adjusting the color saturation, the while maintaining the hue of the pixel of interest,
In the process of adjusting the saturation, the color difference signal is adjusted based on a clipping process to the color gamut of the first color component of the first color component and the second color component of the target pixel. The second color component is adjusted according to whether or not the first color component has been clipped .
JP2013171510A 2013-08-21 2013-08-21 Image processing apparatus, imaging apparatus, and program Active JP6318497B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013171510A JP6318497B2 (en) 2013-08-21 2013-08-21 Image processing apparatus, imaging apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013171510A JP6318497B2 (en) 2013-08-21 2013-08-21 Image processing apparatus, imaging apparatus, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2018073077A Division JP2018125884A (en) 2018-04-05 2018-04-05 Image processing apparatus, imaging apparatus, and program

Publications (2)

Publication Number Publication Date
JP2015041855A JP2015041855A (en) 2015-03-02
JP6318497B2 true JP6318497B2 (en) 2018-05-09

Family

ID=52695791

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013171510A Active JP6318497B2 (en) 2013-08-21 2013-08-21 Image processing apparatus, imaging apparatus, and program

Country Status (1)

Country Link
JP (1) JP6318497B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023044689A (en) * 2021-09-18 2023-03-31 株式会社ツバサファクトリー Image processing unit

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0611230B1 (en) * 1993-02-12 1998-09-30 Eastman Kodak Company Method and associated apparatus for transforming input color values in an input color space to output color values in an output color space
JP2005252393A (en) * 2004-03-01 2005-09-15 Canon Inc Image processing apparatus and method therefor, computer program and computer-readable storage medium
JP5014099B2 (en) * 2007-12-11 2012-08-29 キヤノン株式会社 Imaging apparatus and control method thereof
JP2012191362A (en) * 2011-03-09 2012-10-04 Canon Inc Image processing system and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023044689A (en) * 2021-09-18 2023-03-31 株式会社ツバサファクトリー Image processing unit

Also Published As

Publication number Publication date
JP2015041855A (en) 2015-03-02

Similar Documents

Publication Publication Date Title
JP5343726B2 (en) Image processing apparatus and image processing program
US7620259B2 (en) History adding device for generating history-added image file, electronic camera, and image processing program for processing history-added image file
JP2007094742A (en) Image signal processor and image signal processing program
JP6974156B2 (en) Image color conversion device, image color conversion program, image color conversion method
WO2015119271A1 (en) Image processing device, imaging device, image processing method, computer-processable non-temporary storage medium
US8427560B2 (en) Image processing device
JP4936686B2 (en) Image processing
JP2005354372A (en) Apparatus and method for image recording device, method and system for image processing
JP2014033273A (en) Color gamut conversion device, digital camera, color gamut conversion program, and color gamut conversion method
US20020085750A1 (en) Image processing device
JP5552795B2 (en) Imaging apparatus, image processing apparatus, and program
JP6318497B2 (en) Image processing apparatus, imaging apparatus, and program
JP4007964B2 (en) Image processing apparatus, image processing method, and image processing program
JP5743456B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6413210B2 (en) Image processing apparatus, imaging apparatus, and program
JP4767525B2 (en) Imaging system and imaging processing program
JP2018125884A (en) Image processing apparatus, imaging apparatus, and program
JP4784097B2 (en) Signal processing method, signal processing apparatus, and storage medium storing signal processing procedure
JP5983138B2 (en) Image processing apparatus, imaging apparatus, and program
JP5983137B2 (en) Image processing apparatus, imaging apparatus, and program
JP5056006B2 (en) Imaging apparatus and program
JP2014033272A (en) Image processing apparatus, digital camera, image processing program, and image processing method
JP5884591B2 (en) Image processing apparatus, camera, and image processing program
JP2019022228A (en) Image processing apparatus, imaging apparatus and program
JP2006203430A (en) Image processing apparatus and its method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160816

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20170323

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20170323

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170327

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170412

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170516

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20170714

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170915

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180319

R150 Certificate of patent or registration of utility model

Ref document number: 6318497

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250