JP2023044689A - Image processing unit - Google Patents

Image processing unit Download PDF

Info

Publication number
JP2023044689A
JP2023044689A JP2021152701A JP2021152701A JP2023044689A JP 2023044689 A JP2023044689 A JP 2023044689A JP 2021152701 A JP2021152701 A JP 2021152701A JP 2021152701 A JP2021152701 A JP 2021152701A JP 2023044689 A JP2023044689 A JP 2023044689A
Authority
JP
Japan
Prior art keywords
color space
rgb
image processing
image
color
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
JP2021152701A
Other languages
Japanese (ja)
Inventor
修二 奥野
Shuji Okuno
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.)
Tsubasa Factory Co Ltd
Original Assignee
Tsubasa Factory Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsubasa Factory Co Ltd filed Critical Tsubasa Factory Co Ltd
Priority to JP2021152701A priority Critical patent/JP2023044689A/en
Publication of JP2023044689A publication Critical patent/JP2023044689A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Processing Of Color Television Signals (AREA)
  • Color Image Communication Systems (AREA)

Abstract

To provide an image processing unit capable of storing image data outside an RGB color space into the RGB color space while hardly causing discomfort according to user's preference, in the case where an RGB image generated after a digital image has been processed is outside the area of a color space.SOLUTION: An image processing unit 1 includes: an image processing section 11 executing predetermined processing on input image data to output an RGB image; a conversion section 10a for converting a pixel value of the RGB image into a signal value of image data expressed in other color space, the signal value being separated into luminance or brightness and a color component, and a correction section 10b for correcting the signal value. The pixel value of an RGB image output from the image processing section 11 includes a pixel value outside a color gamut corresponding to an RGB color space in the other color space. The correction section 10b corrects chroma while, for example, fixing the luminance or brightness and the hue of a signal value of image data after the conversion.SELECTED DRAWING: Figure 1

Description

本発明は、デジタル画像データの補正処理を行う画像処理装置に関する。 The present invention relates to an image processing apparatus for correcting digital image data.

従来より、デジタル映像などYCbCr色空間で表された画像データに対して加工処理をした後、出力側のRGB色空間に変換することが行われている。YCbCr色空間はRGB色空間より広い色空間を有するため、時として変換後の値が、RGB色空間の色域外に出ることがある。この場合、色域外に出た値をRGB色空間内へ単純に収める処理では画質低下が起こってしまう。 Conventionally, image data expressed in the YCbCr color space, such as digital video, is processed and then converted into the RGB color space on the output side. Since the YCbCr color space has a wider color space than the RGB color space, the values after conversion sometimes fall outside the color gamut of the RGB color space. In this case, the image quality will be degraded if the value outside the color gamut is simply stored in the RGB color space.

そこで、このような色変換処理時に生じ得る画像データの明度や色相の変化を軽減するために、Y値(輝度値)を固定しつつ、RGBの色域の範囲に収まるようにCbCr(色相値)の比率を変えないで収める(すなわち、色相が同じままで彩度を下げる)ことができる画像処理装置が公開されている(例えば、特許文献1参照)。 Therefore, in order to reduce changes in the brightness and hue of image data that may occur during such color conversion processing, while fixing the Y value (luminance value), CbCr (hue value) ) without changing the ratio (that is, the saturation is lowered while the hue remains the same) has been disclosed (see, for example, Patent Document 1).

また、出力用画像の色空間で再現可能な色域の外に色座標が存在する注目画素において、輝度信号を維持すると共に、複数の色差信号の比を維持した状態で、複数の色差信号を調整することで、注目画素の色相を維持しつつ彩度を調整する画像処理装置も開示されている(例えば、特許文献2参照)。 Also, in a pixel of interest whose color coordinates are outside the reproducible color gamut in the color space of the output image, a plurality of color difference signals are generated while maintaining the luminance signal and maintaining the ratio of the plurality of color difference signals. An image processing apparatus that adjusts saturation while maintaining the hue of a pixel of interest is also disclosed (see, for example, Patent Document 2).

特開2005-252393号公報JP-A-2005-252393 特許第6318497号公報Patent No. 6318497

ところで、近年、機械学習のうちニューラルネットワークを用いた機械学習が多くの分野に適用されている。特に画像認識の分野にて、ニューラルネットワークを多層構造で使用したディープラーニング(Deep Learning;深層学習) が高い認識精度を発揮している。多層化したディープラーニングでも、入力の特徴を抽出する畳み込み層及びプーリング層を複数回使用した畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)を用いた画像処理が行なわれている。 By the way, in recent years, among machine learning, machine learning using a neural network has been applied to many fields. Especially in the field of image recognition, deep learning, which uses neural networks in a multi-layered structure, demonstrates high recognition accuracy. In multi-layered deep learning, image processing is performed using a convolutional neural network (CNN) that uses multiple convolutional layers and pooling layers for extracting input features.

このニューラルネットワークを用いる画像データ処理においては、機械学習モデルに対象となる画像データが入力される。機械学習モデルに使用される画像データは、座標ごとに区画されたピクセル(画素)の集まりとして表現され、各ピクセルには画素値(RGBの3つの値)が付与される。機械学習モデルでは、対象となる画像データの有する全てのピクセル値が入力ニューロンに入力されて機械学習が実行されている。そして、このような機械学習の「学習済モデル」を用いることで、「入力画像(任意のデータ:例えば低解像度画像)→学習済みモデル→出力画像(推論データ:例えば高解像度画像)」という、入力画像から出力画像を推論できる。 In image data processing using this neural network, target image data is input to a machine learning model. Image data used in machine learning models is expressed as a collection of pixels (picture elements) partitioned by coordinates, and each pixel is assigned a pixel value (three values of RGB). In the machine learning model, all pixel values of target image data are input to input neurons and machine learning is executed. By using such a "trained model" of machine learning, "input image (arbitrary data: low-resolution image, for example) → trained model → output image (inference data: high-resolution image, for example)" An output image can be inferred from an input image.

しかしながら、機械学習などを用いた画像処理後の画像としてRGB画像を出力する場合、RGB画素値がRGB色空間の範囲外の値(0-255外の値)となる場合がある。この場合、色域外に出た値をRGB色空間内へ単純に収める処理ではRGBの比率が変わってしまい画像データの明度や色相の変化が生じ、にじみなどの画質低下が起こってしまう。 However, when outputting an RGB image as an image after image processing using machine learning or the like, the RGB pixel values may be values outside the range of the RGB color space (values outside 0-255). In this case, if the value outside the color gamut is simply stored in the RGB color space, the RGB ratio will change, causing changes in the brightness and hue of the image data, resulting in image quality deterioration such as bleeding.

本発明は、上記課題に鑑みてなされたものであり、デジタル画像の処理後に生成されたRGB画像がRGB色空間の領域外となる場合において、RGB色空間外の画像データを、ユーザの好みに合わせて違和感が発生しにくく、RGB色空間内に収める画像処理装置を提供することを目的とする。 The present invention has been made in view of the above problems, and in the case where an RGB image generated after processing a digital image is outside the area of the RGB color space, the image data outside the RGB color space can be changed according to the user's preference. It is also an object of the present invention to provide an image processing device that is less likely to cause a sense of incongruity and that can be accommodated within the RGB color space.

上記目的を達成するために本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、前記画像処理手段より出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含むことを特徴とするものである。 In order to achieve the above object, an image processing apparatus according to the present invention comprises image processing means for executing predetermined processing on input image data and outputting an RGB image; conversion means for converting pixel values of an image into signal values of image data represented in another color space separated into luminance or lightness and color components; and a correcting means for correcting the signal value when it exists outside the color gamut corresponding to the RGB color space in the other color space, wherein the pixel value of the RGB image output from the image processing means is , and pixel values outside the color gamut corresponding to the RGB color space in the other color space.

この画像処理装置において、前記補正手段は、前記変換後の画像データの信号値を、輝度又は明度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、輝度又は明度を最も近い値に丸めた後、その輝度若しくは明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させることが好ましい。 In this image processing apparatus, the correcting means corrects the signal value of the image data after the conversion by adjusting the luminance or the lightness if the luminance or the lightness exceeds the range that the color gamut corresponding to the RGB color space can take. is rounded to the nearest value, and then its luminance or lightness and hue are fixed, and the saturation is corrected to move to the first boundary point of the color gamut corresponding to the RGB color space in the other color space. is preferred.

この画像処理装置において、前記変換後の画像データの信号値を、彩度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、彩度を最も近い値に丸めた後、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させることが好ましい。 In this image processing device, if the signal value of the image data after conversion is such that the saturation exceeds the possible range of the color gamut corresponding to the RGB color space, the saturation is rounded to the nearest value. After that, it is preferable to correct the luminance or lightness while fixing the saturation and hue, and move to the second boundary point of the color gamut corresponding to the RGB color space in the other color space.

この画像処理装置において、前記補正手段は、前記変換後の画像データの信号値を、その色相を固定したまま、その輝度又は明度及び彩度を補正し、前記他の色空間におけるRGB色空間に対応する色域との境界に移動させることが好ましい。 In this image processing apparatus, the correction means corrects the luminance or lightness and saturation of the signal values of the converted image data while fixing the hue, and converts the signal values into the RGB color space in the other color space. It is preferable to move to the boundary with the corresponding color gamut.

この画像処理装置において、前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備えることが好ましい。 The image processing apparatus may further comprise intermediate color computing means for obtaining an intermediate color by multiplying the color components obtained at the first boundary point and the second boundary point by weights set in advance and taking an average value. preferable.

この画像処理装置において、前記画像処理手段は、機械学習モデルを用いて、前記入力される画像データに対して所定の推論処理を実行してRGB画像を出力することが好ましい。 In this image processing apparatus, the image processing means preferably uses a machine learning model to execute a predetermined inference process on the input image data and outputs an RGB image.

また、上記目的を達成するために本発明に係る画像処理方法は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理ステップと、前記画像処理ステップにおいて出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換ステップと、前記変換ステップにおける変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正ステップと、を含み、前記画像処理ステップにおいて出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含むことを特徴とするものである。 In order to achieve the above object, an image processing method according to the present invention provides an image processing step of executing a predetermined process on input image data to output an RGB image, and an image processing step of outputting an RGB image in the image processing step. a conversion step of converting the pixel values of the RGB image into signal values of image data represented in another color space separated into luminance or brightness and color components; and a signal of the image data after conversion in the conversion step. and a correction step of correcting the signal value when the value is outside the color gamut corresponding to the RGB color space in the other color space, the pixel of the RGB image output in the image processing step. The values are characterized in that they include pixel values outside the color gamut corresponding to the RGB color space in said other color space.

また、上記目的を達成するために本発明に係るプログラムは、画像処理装置において機能するプログラムであって、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理ステップと、前記画像処理ステップにおいて出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換ステップと、前記変換ステップにおける変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正ステップと、を含み、前記画像処理ステップにおいて出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含むことを特徴とするものである。 In order to achieve the above object, a program according to the present invention is a program that functions in an image processing apparatus, and includes an image processing step of executing predetermined processing on input image data and outputting an RGB image. a conversion step of converting the pixel values of the RGB image output in the image processing step into signal values of image data represented in another color space separated into luminance or lightness and color components; a correction step of correcting the signal values of the image data after conversion in the step when the signal values are outside the color gamut corresponding to the RGB color space in the other color space, wherein The pixel values of the RGB image output in the step include pixel values outside the color gamut corresponding to the RGB color space in the other color space.

また、上記目的を達成するために本発明は、上記記載の画像処理装置又は上記に記載のプログラムに向けて入力データを送信し、これら画像処理装置又はプログラムからの出力データを受信して利用することを特徴とするコンピュータシステムである。 Further, in order to achieve the above object, the present invention transmits input data to the image processing device or program described above, and receives and uses output data from the image processing device or program. A computer system characterized by:

上記目的を達成するために本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、前記補正手段は、前記変換後の画像データの信号値を、その輝度又は明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させ、及び前記変換後の画像データの信号値を、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させ、前記画像処理装置は、さらに、前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備えることを特徴とするものである。 In order to achieve the above object, an image processing apparatus according to the present invention comprises image processing means for executing predetermined processing on input image data and outputting an RGB image; conversion means for converting pixel values of an image into signal values of image data represented in another color space separated into luminance or lightness and color components; and correction means for correcting the signal value when the signal value exists outside the color gamut corresponding to the RGB color space in the other color space, wherein the correction means corrects the signal value of the converted image data. is moved to the first boundary point of the color gamut corresponding to the RGB color space in the other color space while the luminance or lightness and hue are fixed, and the converted image correcting the luminance or lightness of the signal value of the data while fixing its saturation and hue, moving it to a second boundary point of the color gamut corresponding to the RGB color space in the other color space, and performing the image processing; The apparatus further comprises intermediate color calculation means for obtaining an intermediate color by multiplying the color components obtained at the first boundary point and the second boundary point by a preset coefficient and taking an average value. and

本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理部と、当該RGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換部と、変換後の画像データの信号値が他の色空間におけるRGB色空間に対応する色域の外に存在する場合に信号値を補正する補正部10bと、を備える。画像処理部より出力されるRGB画像の画素値は、他の色空間におけるRGB色空間に対応する色域の外となる画素値を含む。補正部は、変換後の画像データの信号値を、例えばその輝度又は明度と色相とを固定したまま、彩度を補正して、他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させる。この構成により、本発明では、RGB色空間外の画像データを、ユーザの好みに合わせて違和感が発生しにくく、RGB色空間内に収めることができる。 An image processing apparatus according to the present invention includes an image processing unit that executes predetermined processing on input image data and outputs an RGB image, and the signal values of the image data after conversion exist outside the color gamut corresponding to the RGB color space in the other color space. and a correction unit 10b that corrects the signal value in the case where the signal value is corrected. The pixel values of the RGB image output from the image processing unit include pixel values outside the color gamut corresponding to the RGB color space in other color spaces. The correction unit corrects the signal value of the image data after conversion, for example, while fixing the luminance or lightness and hue, and corrects the saturation to convert the signal value to the first color gamut corresponding to the RGB color space in the other color space. Move to boundary point. With this configuration, according to the present invention, image data outside the RGB color space can be accommodated within the RGB color space according to the user's preference without causing a sense of discomfort.

本発明の実施の形態に係る画像処理装置の構成を示すブロック図である。1 is a block diagram showing the configuration of an image processing device according to an embodiment of the present invention; FIG. (a)乃至(c)同上画像処理装置における補正方法を説明するための図である。4A to 4C are diagrams for explaining a correction method in the same image processing apparatus; FIG. 同上画像処理装置の動作手順の一例を示すフローチャートである。4 is a flow chart showing an example of an operation procedure of the same image processing apparatus; 本発明の実施の形態の変形例に係る画像処理装置の機能ブロック図である。It is a functional block diagram of an image processing device according to a modification of the embodiment of the present invention.

(実施の形態)
本発明の実施の形態に係る画像処理装置について図1乃至図3を参照して説明する。なお、本実施の形態に係る画像処理装置は、画像処理後のRGB画像がRGB色空間の色域外にあり、この際、色域外に出た値をRGB空間の色域内へ最適に補正するため演算を行うものである。
(Embodiment)
An image processing apparatus according to an embodiment of the present invention will be described with reference to FIGS. 1 to 3. FIG. Note that the image processing apparatus according to the present embodiment has an RGB image after image processing that is outside the color gamut of the RGB color space. It performs calculations.

最初に、画像処理装置1に備わる各処理部に関して図1を参照しながら説明する。画像処理装置1は、図1に示すように、制御部10、画像処理部11、記憶部12、通信部13、表示部14、操作部15及び読取部16を備える。なお、画像処理装置1及び画像処理装置1における動作について以下では、1台のコンピュータとして説明するが、複数のコンピュータによって処理を分散するようにして構成されてもよい。 First, each processing unit provided in the image processing apparatus 1 will be described with reference to FIG. The image processing apparatus 1 includes a control section 10, an image processing section 11, a storage section 12, a communication section 13, a display section 14, an operation section 15 and a reading section 16, as shown in FIG. Although the image processing apparatus 1 and the operation of the image processing apparatus 1 will be described below assuming one computer, the processing may be distributed among a plurality of computers.

制御部10は、CPUなどのプロセッサやメモリを用いて、画像処理装置1の構成部を制御して各種機能を実現する。この制御部10は、本実施の形態においては例えば記憶部12に記憶してある画像処理プログラム1Pの実行によって画像補正処理(色変換処理)を行う。すなわち、制御部10は、入力される対象画像データ(対象データ)に対して所定の変換を実行すると共に、色域外の変換値を補正する演算を行う。 The control unit 10 uses a processor such as a CPU and a memory to control components of the image processing apparatus 1 to realize various functions. In this embodiment, the control unit 10 performs image correction processing (color conversion processing) by executing an image processing program 1P stored in the storage unit 12, for example. That is, the control unit 10 performs a predetermined conversion on input target image data (target data), and performs calculations for correcting conversion values outside the color gamut.

画像処理部11は、GPU又は専用回路等のプロセッサ及びメモリを用い、制御部10からの制御指示に応じて画像処理を実行する。なお、制御部10及び画像処理部11は、CPU,GPU等のプロセッサ、メモリ、さらには記憶部12及び通信部13を集積した1つのハードウェア(SoC:System on a Chip)として構成されていてもよい。 The image processing unit 11 uses a processor such as a GPU or a dedicated circuit and a memory, and executes image processing according to control instructions from the control unit 10 . Note that the control unit 10 and the image processing unit 11 are configured as one piece of hardware (SoC: System on a Chip) in which a processor such as a CPU or GPU, a memory, a storage unit 12 and a communication unit 13 are integrated. good too.

記憶部12は、ハードディスクやフラッシュメモリを用いる。記憶部12には、画像処理プログラム1P、表示部14に表示される画像データ1Dなどが記憶されている。この画像データ1Dは、RGB色空間やYCbCr色空間で表現されているデジタル映像を含み、例えば通信部13を介してネットワークから取得した画像データや読取部16から読み込んだ画像データである。 The storage unit 12 uses a hard disk or flash memory. The storage unit 12 stores an image processing program 1P, image data 1D to be displayed on the display unit 14, and the like. This image data 1D includes digital video expressed in the RGB color space or the YCbCr color space, and is, for example, image data obtained from a network via the communication unit 13 or image data read from the reading unit 16.

通信部13は、インターネット等の通信網への通信接続を実現する通信モジュールである。通信部13には、例えばネットワークカード、無線通信デバイス又はキャリア通信用モジュールを用いる。 The communication unit 13 is a communication module that realizes communication connection to a communication network such as the Internet. For the communication unit 13, for example, a network card, a wireless communication device, or a carrier communication module is used.

表示部14は、液晶パネル又は有機EL(Electro Luminescence)ディプレイ等を用いる。表示部14は、制御部10の指示による画像処理部11での処理によって画像を表示することが可能である。この表示部14は画面を構成する各画素における一般的なRGB形式のデータに従って画像データを表示する。通常、YCbCr色空間のデジタル映像を表示部14に表示する際には、sRGB(standard RGB)色空間に変換してから表示される。パソコンなど一般的な情報表示機器の表示部14に表示される画像はRGB形式のデータでしか表示できないためである。 The display unit 14 uses a liquid crystal panel, an organic EL (Electro Luminescence) display, or the like. The display unit 14 can display an image by processing in the image processing unit 11 according to instructions from the control unit 10 . The display unit 14 displays image data in accordance with general RGB format data for each pixel forming the screen. Normally, when a digital image in the YCbCr color space is displayed on the display unit 14, it is displayed after being converted into the sRGB (standard RGB) color space. This is because an image displayed on the display unit 14 of a general information display device such as a personal computer can only be displayed in RGB format data.

RGB色空間のデジタル画像データは、座標ごとに区画されたピクセル(画素)の集まりとして表現され、各ピクセルにはピクセル値(色情報RGBの3つの値)が付与される。或る画素位置でのRチャネルの輝度値をR、Gチャネルの輝度値をG、Bチャネルの輝度値をBとする画素値を(R,G,B)で表現できる。通常、各(R,G,B)での値は8ビット(256段階)などで表現されるが、各(R,G,B)での取り得る範囲を0.0~1.0(上限1.0及び下限0.0)の範囲に正規化することもできる。 Digital image data in the RGB color space is expressed as a collection of pixels (picture elements) partitioned by coordinates, and each pixel is given a pixel value (three values of color information RGB). A pixel value can be represented by (R, G, B) where R is the luminance value of the R channel, G is the luminance value of the G channel, and B is the luminance value of the B channel at a certain pixel position. Normally, each (R, G, B) value is represented by 8 bits (256 steps), etc., but the possible range for each (R, G, B) is 0.0 to 1.0 (upper limit 1.0 and lower limit 0.0 ) can also be normalized to the range

操作部15は、キーボード又はマウス等のユーザインタフェースを含む。筐体に設けられた物理的ボタンを用いてもよいし、表示部14に表示されるソフトウェアボタン等を用いてもよい。操作部15は、ユーザによる操作情報を制御部10へ通知する。 The operating unit 15 includes a user interface such as a keyboard or mouse. A physical button provided on the housing may be used, or a software button or the like displayed on the display unit 14 may be used. The operation unit 15 notifies the control unit 10 of operation information by the user.

読取部16は、例えばディスクドライブを用い、光ディスク等を用いた記録媒体2(光ディスク、磁気ディスクや光磁気ディスクなど)に記憶してある画像処理プログラム2Pを読み取ることが可能である。また、読取部16は、表示部14への表示対象のカラー画像の動画や静止画の画像データを記録媒体2などから読み込むときに用いても良い。なお、記憶部12に記憶してある画像処理プログラム1Pは、通信部13を介してネットワークから取得したものや、記録媒体2から読取部16が読み取った画像処理プログラム2Pを制御部10が記憶部12に複製したものであってもよい。 The reading unit 16 uses, for example, a disk drive, and can read the image processing program 2P stored in the recording medium 2 (optical disk, magnetic disk, magneto-optical disk, etc.) using an optical disk or the like. Further, the reading unit 16 may be used when reading image data of a moving image or a still image of a color image to be displayed on the display unit 14 from the recording medium 2 or the like. The image processing program 1P stored in the storage unit 12 is acquired from the network via the communication unit 13, or the image processing program 2P read from the recording medium 2 by the reading unit 16 is read by the control unit 10 from the storage unit. 12 may be replicated.

なお、本実施の形態の説明における本実施の形態の説明における明るさ成分とは画像データの輝度や明度、濃度などに関する成分であって、典型的にはYCbCrにおける輝度成分Yであり、YCbCrのY以外に、Lab色空間のL、HSV色空間のV、HLS色空間のLなどがある。YCbCrの代わりに、YUVやYPbPrを用いても良い。また、色成分とは、典型的にはYCbCrにおける色差成分CbCrやHSVにおける色相、彩度である。さらに、色相(hue)とは、赤・黄・緑・青のように、色を特徴づける色味のことで、色味は、光の波長の違いによって変化する。彩度(chroma)とは、色の三属性(色相・明度・彩度)の一つで、色の強みや、鮮やかさの度合いをいう。同じ色相・明度であっても彩度が高ければより鮮明に見える。 Note that the brightness component in the description of the present embodiment is a component related to luminance, lightness, density, etc. of image data, and is typically a luminance component Y in YCbCr. In addition to Y, there are L in the Lab color space, V in the HSV color space, and L in the HLS color space. YUV or YPbPr may be used instead of YCbCr. Also, the color component is typically the color difference component CbCr in YCbCr and the hue and saturation in HSV. Furthermore, hue is a color that characterizes colors, such as red, yellow, green, and blue, and the color changes depending on the difference in the wavelength of light. Saturation (chroma) is one of the three attributes of color (hue, lightness, and saturation), and refers to the strength and degree of vividness of a color. Even if the hue and brightness are the same, the higher the saturation, the clearer the image will look.

次に、本実施の形態に係る画像処理装置1における画像処理後のRGB画像を補正する方法に関して説明する。具体的には、画像処理装置1の制御部10は変換部10a、補正部10b及び中間色演算部10cを備える。 Next, a method for correcting an RGB image after image processing in the image processing apparatus 1 according to this embodiment will be described. Specifically, the control unit 10 of the image processing apparatus 1 includes a conversion unit 10a, a correction unit 10b, and a neutral color calculation unit 10c.

変換部10aは、画像処理部11より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する。なお、本実施の形態においては、便宜的に他の色空間を、輝度成分Yと色差成分CbCrで表現されるYCbCr色空間として説明する。通常、YCbCr信号から成る画像データはsRGB色空間よりも広い範囲を再現可能である。そのため、変換後の色座標値がRGB色空間の色域外(すなわち0.0~1.0の範囲外)となっている場合にもYCbCr色空間の信号値を用いて補正処理できる。なお、他の色空間はこれに限定されるものではなく、YCbCr色空間以外にも、YUV、YPbPr、HSV、HLS、HSB、Lab色空間、又はCIE Luv色空間の何れかでも良い。 The conversion unit 10a converts the pixel values of the RGB image output from the image processing unit 11 into signal values of image data represented in another color space separated into luminance or lightness and color components. In the present embodiment, another color space will be described as a YCbCr color space represented by a luminance component Y and a color difference component CbCr for the sake of convenience. Normally, image data composed of YCbCr signals can reproduce a wider range than the sRGB color space. Therefore, even if the color coordinate values after conversion are outside the color gamut of the RGB color space (that is, outside the range of 0.0 to 1.0), correction processing can be performed using the signal values of the YCbCr color space. Note that other color spaces are not limited to this, and may be YUV, YPbPr, HSV, HLS, HSB, Lab color space, or CIE Luv color space in addition to YCbCr color space.

変換部10aは、画像処理後に生成されたRGB色空間で示されるRGB画像データの画素値を、所定演算に基づいてYCbCr色空間で示される画像データの画素値に変換する。具体的には、操作部15などを介してユーザから画像処理後のRGB画像データの補正指令を受けると、変換部10aは、指定された画像データをRGB色空間からYCbCr色空間へ変換する。この際、変換部10aは、例えば以下の式1に示す演算を行う。

Figure 2023044689000002
The conversion unit 10a converts pixel values of RGB image data represented in the RGB color space generated after image processing into pixel values of image data represented in the YCbCr color space based on a predetermined calculation. Specifically, upon receiving a correction command for RGB image data after image processing from a user via the operation unit 15 or the like, the conversion unit 10a converts the designated image data from the RGB color space to the YCbCr color space. At this time, the conversion unit 10a performs, for example, the calculation shown in Equation 1 below.
Figure 2023044689000002

ここで、変換前の画像データのRGB色空間の画素値が(R,G,B)(ここでRはRチャネルの輝度値、GはGチャネルの輝度値、BはBチャネルの輝度値)、式1を用いて変換後のYCbCr色空間での信号値が(YCbCr)(ここで、Yは輝度成分、Cb及びCrは色差成分である)である。また、YCbCr色空間での信号値Yは0.0≦Y≦1.0、式差信号Cb,Crは-0.5≦Cb,Cr≦0.5の範囲をとる。 Here, the pixel value of the RGB color space of the image data before conversion is (R, G, B) (where R is the luminance value of the R channel, G is the luminance value of the G channel, and B is the luminance value of the B channel) , the signal value in the YCbCr color space after conversion using Equation 1 is (YCbCr) (where Y is the luminance component and Cb and Cr are the chrominance components). The signal value Y in the YCbCr color space is in the range of 0.0≦Y≦1.0, and the formula difference signals Cb and Cr are in the range of −0.5≦Cb and Cr≦0.5.

補正部10bは、変換部10aにおける変換後の画像データの信号値が、他の色空間(ここではYCbCr色空間)におけるRGB色空間に対応する色域の外に存在する場合に、この信号値を補正して補正後の信号値を求める。 If the signal value of the image data after conversion in the conversion unit 10a exists outside the color gamut corresponding to the RGB color space in another color space (here, the YCbCr color space), the correction unit 10b corrects the signal value is corrected to obtain the corrected signal value.

ここで、補正部10bにおける様々な補正方法に関して図2を参照して説明する。図2は横軸を彩度、縦軸を輝度とした場合のYCbCr空間における特定の色相における断面図である。なお、本図は説明のために白黒で表現されているが、実際には所定の色相(すなわちYCbCr空間においてはCbとCrがなす角)を有しており、グラデーションで示される三角で囲まれる三角領域がYCbCr空間におけるRGB色空間に対応する色域であって、この三角領域の縁が境界線となる。なお、YCbCr空間における縦軸の輝度はY値であり、横軸の彩度は色差成分Cb及びCrの二乗を加算した平方根で求めることができる。 Here, various correction methods in the correction unit 10b will be described with reference to FIG. FIG. 2 is a cross-sectional view of a specific hue in the YCbCr space where the horizontal axis is saturation and the vertical axis is luminance. Although this figure is expressed in black and white for explanation, it actually has a predetermined hue (that is, the angle formed by Cb and Cr in the YCbCr space) and is surrounded by a triangle indicated by gradation. The triangular area is the color gamut corresponding to the RGB color space in the YCbCr space, and the edge of this triangular area is the boundary line. In the YCbCr space, the luminance on the vertical axis is the Y value, and the saturation on the horizontal axis can be obtained by the square root of the sum of the squares of the color difference components Cb and Cr.

第一の補正方法として、図2(a)の矢印L1に示すように、補正部10bは、変換部10aにおいて他の色空間(ここではYCbCr色空間)に変換後の画像データの信号値S1を、その輝度又は明度と色相とを固定したまま、彩度を補正して、他の色空間(ここではYCbCr色空間)におけるRGB色空間に対応する色域の一番近い地点(第一境界点B1)に移動させる。この補正方法は、輝度又は明度を維持したままで彩度を補正するために明るさ優先の補正と言える。なお、図2(b)の矢印L4も同様の補正方法を示している。 As a first correction method, as indicated by an arrow L1 in FIG. 2(a), the correction unit 10b converts the signal value S1 is corrected for saturation while its luminance or lightness and hue are fixed, and the closest point (first boundary Move to point B1). This correction method can be said to be brightness-priority correction because it corrects saturation while maintaining luminance or brightness. An arrow L4 in FIG. 2(b) also indicates a similar correction method.

第二の補正方法として、図2(a)の矢印L2に示すように、補正部10bは、変換部10aによって他の色空間(ここではYCbCr色空間)に変換後の画像データの信号値S1を、その彩度と色相とを固定したまま、輝度又は明度を補正し、他の色空間(YCbCr)におけるRGB色空間に対応する色域の一番近い地点(第二境界点B2)に移動させる。この補正は、彩度を維持したままで輝度又は明度を補正するために彩度優先の補正と言える。なお、図2(c)の矢印L6も同様の補正方法を示している。 As a second correction method, as indicated by an arrow L2 in FIG. 2A, the correction unit 10b converts the signal value S1 of the image data converted into another color space (here, the YCbCr color space) by the conversion unit 10a. is corrected for luminance or lightness while keeping its saturation and hue fixed, and moved to the nearest point (second boundary point B2) of the color gamut corresponding to the RGB color space in another color space (YCbCr) Let This correction can be said to be saturation-priority correction because it corrects luminance or lightness while maintaining saturation. An arrow L6 in FIG. 2(c) also indicates a similar correction method.

また、第二の補正方法の延長として、図2(b)の矢印L3に示すように、補正前の座標の彩度がRGB色空間に対応する色域が取りうる範囲(すなわち最大の彩度(YCbCrの場合は色相毎に異なる))をオーバーしているときにS2の彩度をクリップして丸める(彩度を最も近い値に丸める)こともある。また、第一の補正方法の延長として、図2(c)の矢印L5に示すように、補正前の座標の明度がRGB色空間に対応する色域が取りうる明度の範囲(この実施例の場合0~1)をオーバーしているときにS3の輝度をクリップして丸める(輝度又は明度を最も近い値に丸める)こともある。このような場合、補正部10bは、変換後の画像データの信号値を、その色相を固定したまま、その輝度又は明度及び彩度を補正し、他の色空間(YCbCr)におけるRGB色空間に対応する色域との境界に移動させている。なお、詳細には記載しないが、変換部10aは、所定の演算式に基づいてこれらYCbCr色空間における境界点B1及びB2の信号値をRGB色空間の画素値に変換する機能も有する。表示部14はRGB形式のデータに従ってこれら補正後の画像データを表示する。 As an extension of the second correction method, as indicated by arrow L3 in FIG. (In the case of YCbCr, it varies for each hue)), the saturation of S2 is clipped and rounded (rounded to the nearest value). As an extension of the first correction method, as indicated by the arrow L5 in FIG. It may also clip and round the luminance of S3 (round the luminance or brightness to the nearest value) when it exceeds the case 0 to 1). In such a case, the correction unit 10b corrects the luminance or lightness and saturation of the signal value of the converted image data while fixing the hue, and converts the signal value to the RGB color space in another color space (YCbCr). It is moved to the boundary with the corresponding color gamut. Although not described in detail, the conversion unit 10a also has a function of converting the signal values of the boundary points B1 and B2 in the YCbCr color space into pixel values in the RGB color space based on a predetermined arithmetic expression. The display unit 14 displays the corrected image data according to the RGB format data.

中間色演算部10cは、第一境界点B1及び第二境界点B2において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める。この結果、係数の重みで明るさ優先か彩度優先かをユーザの好みに応じて決定できる。なお、第一境界点B1及び第二境界点B2はRGB色空間の色域内なので中間色は必ずRGB色空間内に収まる。 The intermediate color calculator 10c obtains an intermediate color by multiplying the color components obtained at the first boundary point B1 and the second boundary point B2 with weights set in advance and taking an average value. As a result, it is possible to determine whether brightness is given priority or saturation is given priority according to the user's preference. Note that the first boundary point B1 and the second boundary point B2 are within the color gamut of the RGB color space, so the intermediate colors always fit within the RGB color space.

次に、本実施の形態に係る画像処理装置1の補正部10bにおける動作手順の一例に関して図3に示すフローチャートを参照しながら説明する。最初に、操作部15などを介してユーザが画像処理の対象の画像データを選択して、画像処理部11を介して画像処理が実行される(S31)。ここでは画像処理にニューラルネットワークを使用しても良い。 Next, an example of the operation procedure in the correction unit 10b of the image processing apparatus 1 according to the present embodiment will be described with reference to the flowchart shown in FIG. First, the user selects image data to be subjected to image processing via the operation unit 15 or the like, and image processing is performed via the image processing unit 11 (S31). A neural network may be used for image processing here.

次に、画像処理後のRGB画像が選択され、操作部15を介して彩度優先の補正又は明るさ優先の補正かを選択する(S32)。彩度優先が選択される場合(S32でYes)、補正部10bは、上述の第一の補正方法、すなわち、YCbCr色空間に変換後の画像データの信号値を、その輝度と色相とを固定したまま、彩度を補正して、YCbCr色空間におけるRGB色空間に対応する色域の第一境界点に移動させる(S33)。一方、明るさ優先が選択される場合(S32でNo)、補正部10bは、上述の第二の補正方法、すなわち、変換後の画像データの信号値を、その彩度と色相とを固定したまま、輝度を補正し、YCbCr色空間におけるRGB色空間に対応する色域の第二境界点に移動させる(S34)。 Next, the RGB image after the image processing is selected, and the saturation priority correction or the brightness priority correction is selected via the operation unit 15 (S32). If the saturation priority is selected (Yes in S32), the correction unit 10b fixes the signal value of the image data after conversion to the YCbCr color space by the first correction method described above, and fixes the luminance and hue. In this state, the saturation is corrected and moved to the first boundary point of the color gamut corresponding to the RGB color space in the YCbCr color space (S33). On the other hand, when brightness priority is selected (No in S32), the correction unit 10b uses the above-described second correction method, that is, the signal value of the converted image data is fixed in saturation and hue. In this state, the luminance is corrected and moved to the second boundary point of the color gamut corresponding to the RGB color space in the YCbCr color space (S34).

以上の説明のように、本実施の形態に係る画像処理装置1においては、画像処理部11より出力されるRGB画像の画素値は、他の色空間におけるRGB色空間に対応する色域の外となる画素値を含む。補正部10bは、明るさ優先又は彩度優先などのユーザの好みに応じて、上述の第一乃至第二の補正方法を実行する。この構成により、デジタル画像の処理後に生成されたRGB画像がRGB色空間の領域外となっても、RGB色空間外の画像データを、ユーザの好みに合わせて違和感が発生しにくく、RGB色空間内に収めることができる。この結果、画像データの明度や色相の変化が生じ、にじみなどの画質低下が起こってしまうという問題を防止できる。また、ユーザの必要に応じて明るさ優先又は彩度優先など、好みの画像補正方法を選択できる。 As described above, in the image processing apparatus 1 according to the present embodiment, the pixel values of the RGB image output from the image processing unit 11 are outside the color gamut corresponding to the RGB color space in another color space. contains pixel values that are The correction unit 10b executes the above-described first and second correction methods according to the user's preference such as brightness priority or saturation priority. With this configuration, even if the RGB image generated after the processing of the digital image is outside the area of the RGB color space, the image data outside the RGB color space can be adjusted to suit the user's taste without causing a sense of incongruity. can be accommodated inside. As a result, it is possible to prevent the problem that the brightness and hue of the image data are changed and the image quality is deteriorated such as bleeding. In addition, the user can select a preferred image correction method such as brightness priority or saturation priority according to the user's needs.

(変形例)
本発明の実施の形態に係る画像処理装置1の変形例に関して図4を参照しながら説明する。本変形例は、図4に示すように、画像処理部11は、機械学習モデル111を用いて、入力部110より入力される画像データに対して所定の推論処理を実行してRGB画像を出力部112から出力する。なお、機械学習モデル111は、例えば学習済みモデル使用時にはそれぞれ既に学習済のパラメータに基づいて画像データの最適化処理(例えば画像の高解像度化やノイズ除去などの処理)を行う。
(Modification)
A modification of the image processing apparatus 1 according to the embodiment of the present invention will be described with reference to FIG. In this modification, as shown in FIG. 4, the image processing unit 11 uses a machine learning model 111 to perform predetermined inference processing on image data input from the input unit 110, and outputs an RGB image. Output from the unit 112 . The machine learning model 111, for example, when using a trained model, performs image data optimization processing (for example, image resolution enhancement, noise removal, etc.) based on already learned parameters.

次に、本変形例に係る画像処理装置1の画像処理の機能に関して説明する。画像処理装置1の制御部10は推論処理実行部101を備える。この推論処理実行部101は、記憶部12に記憶してある画像処理プログラム1Pに基づき、画像処理を行う。すなわち、推論処理実行部101は、機械学習モデルを用いて、入力される対象画像データに対して所定の推論処理を実行する。また、推論処理実行部101は、ユーザの操作部15を用いた操作に基づき、入力データである画像データを入力部110に入力する画像処理実行部としての機能を発揮する。 Next, the image processing function of the image processing apparatus 1 according to this modification will be described. The control unit 10 of the image processing device 1 includes an inference processing execution unit 101 . This inference processing execution unit 101 performs image processing based on the image processing program 1P stored in the storage unit 12 . That is, the inference processing execution unit 101 uses a machine learning model to execute predetermined inference processing on input target image data. The inference processing execution unit 101 also functions as an image processing execution unit that inputs image data, which is input data, to the input unit 110 based on the user's operation using the operation unit 15 .

画像処理部11の入力部110は推論対象となる対象画像データの入力を受け付ける。推論処理実行部101は、推論対象画像データを機械学習モデル111に出力する。各画像データの種類は、例えば画像データのヘッダ部の情報や識別子を読み込むことにより判定できる。機械学習モデル111で処理された画像データは、出力部112に入力される。なお、本変形例においてはこの出力部112から出力される画像データはRGB画像であって、且つRGB画像の画素値がRGB色空間の範囲外となる。なお、画像処理後の画素値がRGB色空間の範囲外となることを許容するために、各色成分に対して元のビット数を超えるビット数を割り当てても良い。最後に、出力部112からの出力画像は変換部10aに出力される。 The input unit 110 of the image processing unit 11 receives input of target image data to be inferred. The inference processing execution unit 101 outputs inference target image data to the machine learning model 111 . The type of each image data can be determined, for example, by reading information or an identifier in the header portion of the image data. Image data processed by the machine learning model 111 is input to the output unit 112 . In this modified example, the image data output from the output unit 112 is an RGB image, and the pixel values of the RGB image are outside the range of the RGB color space. In order to allow pixel values after image processing to fall outside the range of the RGB color space, a number of bits exceeding the original number of bits may be assigned to each color component. Finally, the output image from the output unit 112 is output to the conversion unit 10a.

なお、本発明は、上記実施の形態の構成に限られず、発明の趣旨を変更しない範囲で種々の変形が可能である。また、本発明の目的を達成するために、本発明は、画像処理装置1に含まれる特徴的な構成手段をステップとする画像処理方法としたり、それらの特徴的なステップを含むプログラムとして実現することもできる。そして、そのプログラムは、ROM等に格納しておくだけでなく、USBメモリ等の記録媒体や通信ネットワークを介して流通させることもできる。また、上記の実施の形態の説明では画像処理装置1の各機能をプログラムによって実現する例を記載したがハードウェア的に実現しても良い。 The present invention is not limited to the configuration of the above-described embodiment, and various modifications are possible without changing the gist of the invention. Further, in order to achieve the object of the present invention, the present invention is implemented as an image processing method having steps of characteristic constituent means included in the image processing apparatus 1, or as a program including those characteristic steps. can also The program can be distributed not only in a ROM or the like, but also via a recording medium such as a USB memory or a communication network. Also, in the description of the above embodiment, an example in which each function of the image processing apparatus 1 is realized by a program was described, but it may be realized by hardware.

さらに、本発明は、画像処理装置又はコンピュータプログラムに向けて入力データを送信し、画像処理装置又はコンピュータプログラムからの出力データを受信して利用するコンピュータシステムとしても実現できる。本システムに用いる装置は、表示部及び通信部を備えた画像処理装置又はコンピュータと情報を送受信できる情報処理装置などであり、例えば所謂PC、スマートフォン、携帯端末、ゲーム機器などである。 Furthermore, the present invention can also be implemented as a computer system that transmits input data to an image processing device or computer program and receives and uses output data from the image processing device or computer program. A device used in this system is an image processing device having a display unit and a communication unit or an information processing device capable of transmitting and receiving information to and from a computer.

1 画像処理装置
10 制御部
10a 変換部(変換手段)
10b 補正部(補正手段)
10c 中間色演算部(中間色演算手段)
11 画像処理部
12 記憶部
13 通信部
14 表示部
15 操作部
16 読取部
101 推論処理実行部
111 機械学習モデル
B1 第一境界点
B2 第二境界点
1 image processing device 10 control section 10a conversion section (conversion means)
10b correction unit (correction means)
10c Intermediate color calculation unit (intermediate color calculation means)
REFERENCE SIGNS LIST 11 image processing unit 12 storage unit 13 communication unit 14 display unit 15 operation unit 16 reading unit 101 inference processing execution unit 111 machine learning model
B1 first boundary point
B2 second boundary point

上記目的を達成するために本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、前記画像処理手段より出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含み、前記補正手段は、前記変換後の画像データの信号値を、彩度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、彩度を最も近い値に丸めた後、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させることを特徴とするものである。
In order to achieve the above object, an image processing apparatus according to the present invention comprises image processing means for executing predetermined processing on input image data and outputting an RGB image; conversion means for converting pixel values of an image into signal values of image data represented in another color space separated into luminance or lightness and color components; and a correcting means for correcting the signal value when it exists outside the color gamut corresponding to the RGB color space in the other color space, wherein the pixel value of the RGB image output from the image processing means is , including pixel values that are outside the color gamut corresponding to the RGB color space in the other color space, and the correcting means corrects the signal values of the converted image data so that the saturation corresponds to the RGB color space If the color gamut exceeds the range that can be taken, after rounding the saturation to the nearest value, correct the brightness or lightness while fixing the saturation and hue, and in the other color space It is characterized by moving to the second boundary point of the color gamut corresponding to the RGB color space .

上記目的を達成するために本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、前記画像処理手段より出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含み、前記補正手段は、前記変換後の画像データの信号値を、輝度又は明度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、輝度又は明度を最も近い値に丸めた後、その輝度若しくは明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させ、前記補正手段は、前記変換後の画像データの信号値を、彩度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、彩度を最も近い値に丸めた後、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させ、前記画像処理装置は、さらに、前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備えることを特徴とするものである。
In order to achieve the above object, an image processing apparatus according to the present invention comprises image processing means for executing predetermined processing on input image data and outputting an RGB image; conversion means for converting pixel values of an image into signal values of image data represented in another color space separated into luminance or lightness and color components; and a correcting means for correcting the signal value when it exists outside the color gamut corresponding to the RGB color space in the other color space, wherein the pixel value of the RGB image output from the image processing means is , including pixel values outside the color gamut corresponding to the RGB color space in the other color space, and the correcting means corrects the signal values of the converted image data so that the luminance or lightness corresponds to the RGB color space If the color gamut exceeds the range that can be taken, after rounding the brightness or brightness to the nearest value, the saturation is corrected while the brightness or brightness and hue are fixed, and the other colors space to the first boundary point of the color gamut corresponding to the RGB color space, and the correcting means adjusts the signal value of the converted image data to the range that the color gamut corresponding to the RGB color space can take in saturation. If it exceeds from , round the saturation to the nearest value, then correct the luminance or lightness while fixing the saturation and hue, and correspond to the RGB color space in the other color space The image processing device further weights the color components obtained at the first boundary point and the second boundary point by a preset coefficient to obtain an average value. It is characterized by comprising intermediate color calculation means for obtaining the intermediate color by taking the

また、上記目的を達成するために本発明に係る画像処理方法は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理ステップと、前記画像処理ステップにおいて出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換ステップと、前記変換ステップにおける変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正ステップと、を含み、前記画像処理ステップにおいて出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含み、前記補正ステップにおいて、前記変換後の画像データの信号値を、彩度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、彩度を最も近い値に丸めた後、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させることを特徴とするものである。
In order to achieve the above object, an image processing method according to the present invention provides an image processing step of executing a predetermined process on input image data to output an RGB image, and an image processing step of outputting an RGB image in the image processing step. a conversion step of converting the pixel values of the RGB image into signal values of image data represented in another color space separated into luminance or brightness and color components; and a signal of the image data after conversion in the conversion step. and a correction step of correcting the signal value when the value is outside the color gamut corresponding to the RGB color space in the other color space, the pixel of the RGB image output in the image processing step. The value includes a pixel value outside the color gamut corresponding to the RGB color space in the other color space, and in the correction step, the signal value of the converted image data is converted to the RGB color space with saturation. If the corresponding color gamut exceeds the range that can be taken, after rounding the saturation to the nearest value, while fixing the saturation and hue, correct the brightness or lightness, and the other colors It is characterized by moving to the second boundary point of the color gamut corresponding to the RGB color space in space .

上記目的を達成するために本発明に係る画像処理装置は、入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備える画像処理装置であって、前記補正手段は、前記変換後の画像データの信号値を、その輝度又は明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させ、及び前記変換後の画像データの信号値を、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させ、前記画像処理装置は、さらに、前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備えることを特徴とするものである。 In order to achieve the above object, an image processing apparatus according to the present invention comprises image processing means for executing predetermined processing on input image data and outputting an RGB image; conversion means for converting pixel values of an image into signal values of image data represented in another color space separated into luminance or lightness and color components; and correction means for correcting the signal value when it exists outside the color gamut corresponding to the RGB color space in the other color space , wherein the correction means comprises the conversion The signal values of the subsequent image data are moved to the first boundary point of the color gamut corresponding to the RGB color space in the other color space while fixing the luminance or lightness and hue, correcting the saturation. , and a second boundary point of the color gamut corresponding to the RGB color space in the other color space by correcting the luminance or lightness of the signal value of the converted image data while fixing the saturation and hue. , and the image processing device further weights the color components obtained at the first boundary point and the second boundary point by a preset coefficient and takes an average value to obtain an intermediate color. It is characterized by comprising a calculation means.

Claims (10)

入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、
前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、
前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、
前記画像処理手段より出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含む、ことを特徴とする画像処理装置。
image processing means for executing predetermined processing on input image data and outputting an RGB image;
conversion means for converting the pixel values of the RGB image output from the image processing means into signal values of image data represented in another color space separated into luminance or lightness and color components;
correction means for correcting the signal value when the signal value of the image data after conversion in the conversion means exists outside the color gamut corresponding to the RGB color space in the other color space;
The image processing apparatus, wherein the pixel values of the RGB image output from the image processing means include pixel values outside the color gamut corresponding to the RGB color space in the other color space.
前記補正手段は、前記変換後の画像データの信号値を、輝度又は明度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、輝度又は明度を最も近い値に丸めた後、その輝度若しくは明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させる、ことを特徴とする請求項1記載の画像処理装置。 The correcting means rounds the signal value of the converted image data to the nearest value if the luminance or the lightness exceeds the range that the color gamut corresponding to the RGB color space can take. After that, while fixing the luminance or lightness and hue, the saturation is corrected and moved to the first boundary point of the color gamut corresponding to the RGB color space in the other color space. The image processing apparatus according to claim 1. 前記補正手段は、前記変換後の画像データの信号値を、彩度がRGB色空間に対応する色域が取りうる範囲からオーバーしている場合には、彩度を最も近い値に丸めた後、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させる、ことを特徴とする請求項1記載の画像処理装置。 The correction means rounds the signal value of the converted image data to the nearest value if the saturation exceeds the range that the color gamut corresponding to the RGB color space can take. , fixing the saturation and hue, correcting the luminance or lightness, and moving to the second boundary point of the color gamut corresponding to the RGB color space in the other color space. The described image processing device. 前記補正手段は、前記変換後の画像データの信号値を、その色相を固定したまま、その輝度又は明度及び彩度を補正し、前記他の色空間におけるRGB色空間に対応する色域との境界に移動させる、ことを特徴とする請求項1記載の画像処理装置。 The correcting means corrects the luminance or lightness and saturation of the signal value of the image data after the conversion while fixing the hue, and corrects the color gamut corresponding to the RGB color space in the other color space. 2. The image processing apparatus according to claim 1, wherein the image is moved to a boundary. 前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備える、ことを特徴とする請求項1記載の画像処理装置。 3. A neutral color calculation means for obtaining a neutral color by multiplying the color components obtained at the first boundary point and the second boundary point by a preset coefficient and taking an average value. 1. The image processing apparatus according to 1. 前記画像処理手段は、機械学習モデルを用いて、前記入力される画像データに対して所定の推論処理を実行してRGB画像を出力する、ことを特徴とする請求項1乃至5の何れか一項に記載の画像処理装置。 6. The image processing means according to any one of claims 1 to 5, wherein the image processing means executes a predetermined inference process on the input image data using a machine learning model and outputs an RGB image. 10. The image processing device according to claim 1. 入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理ステップと、
前記画像処理ステップにおいて出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換ステップと、
前記変換ステップにおける変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正ステップと、を含み、
前記画像処理ステップにおいて出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含む、ことを特徴とする画像処理方法。
an image processing step of performing predetermined processing on input image data and outputting an RGB image;
a conversion step of converting the pixel values of the RGB image output in the image processing step into signal values of image data represented in another color space separated into luminance or lightness and color components;
a correction step of correcting the signal values of the image data after conversion in the conversion step when the signal values are outside the color gamut corresponding to the RGB color space in the other color space;
The image processing method, wherein the pixel values of the RGB image output in the image processing step include pixel values outside the color gamut corresponding to the RGB color space in the other color space.
画像処理装置において機能するプログラムであって、
入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理ステップと、
前記画像処理ステップにおいて出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換ステップと、
前記変換ステップにおける変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正ステップと、を含み、
前記画像処理ステップにおいて出力されるRGB画像の画素値は、前記他の色空間におけるRGB色空間に対応する色域の外となる画素値を含む、ことを特徴とするプログラム。
A program that functions in an image processing device,
an image processing step of performing predetermined processing on input image data and outputting an RGB image;
a conversion step of converting the pixel values of the RGB image output in the image processing step into signal values of image data represented in another color space separated into luminance or lightness and color components;
a correction step of correcting the signal values of the image data after conversion in the conversion step when the signal values are outside the color gamut corresponding to the RGB color space in the other color space;
The program, wherein the pixel values of the RGB image output in the image processing step include pixel values outside the color gamut corresponding to the RGB color space in the other color space.
請求項1乃至6の何れか1項に記載の画像処理装置又は請求項8に記載のプログラムに向けて入力データを送信し、これら画像処理装置又はプログラムからの出力データを受信して利用する、ことを特徴とするコンピュータシステム。 Sending input data to the image processing device according to any one of claims 1 to 6 or the program according to claim 8, and receiving and using output data from these image processing devices or programs, A computer system characterized by: 入力される画像データに対して所定の処理を実行してRGB画像を出力する画像処理手段と、
前記画像処理手段より出力されたRGB画像の画素値を、輝度又は明度と、色成分とに分離された他の色空間で示される画像データの信号値に変換する変換手段と、
前記変換手段における変換後の画像データの信号値が、前記他の色空間におけるRGB色空間に対応する色域の外に存在する場合に、前記信号値を補正する補正手段と、を備え、
前記補正手段は、前記変換後の画像データの信号値を、その輝度又は明度と色相とを固定したまま、彩度を補正して、前記他の色空間におけるRGB色空間に対応する色域の第一境界点に移動させ、及び前記変換後の画像データの信号値を、その彩度と色相とを固定したまま、輝度又は明度を補正し、前記他の色空間におけるRGB色空間に対応する色域の第二境界点に移動させ、
前記画像処理装置は、さらに、
前記第一境界点及び前記第二境界点において求まる色成分に対して、予め設定した係数によって重みを掛けて平均値をとることで中間色を求める中間色演算手段を備える、ことを特徴とする画像処理装置。
image processing means for executing predetermined processing on input image data and outputting an RGB image;
conversion means for converting the pixel values of the RGB image output from the image processing means into signal values of image data represented in another color space separated into luminance or lightness and color components;
correction means for correcting the signal value when the signal value of the image data after conversion in the conversion means exists outside the color gamut corresponding to the RGB color space in the other color space;
The correcting means corrects the saturation of the signal value of the converted image data while fixing the luminance or lightness and hue of the converted image data, thereby correcting the color gamut corresponding to the RGB color space in the other color space. moving to the first boundary point, and correcting the luminance or lightness of the signal values of the converted image data while fixing the saturation and hue to correspond to the RGB color space in the other color space; Move to the second boundary point of the gamut,
The image processing device further comprises:
An image processing characterized by comprising intermediate color calculation means for obtaining an intermediate color by multiplying the color components obtained at the first boundary point and the second boundary point by a preset coefficient and obtaining an average value. Device.
JP2021152701A 2021-09-18 2021-09-18 Image processing unit Pending JP2023044689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021152701A JP2023044689A (en) 2021-09-18 2021-09-18 Image processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021152701A JP2023044689A (en) 2021-09-18 2021-09-18 Image processing unit

Publications (1)

Publication Number Publication Date
JP2023044689A true JP2023044689A (en) 2023-03-31

Family

ID=85725991

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021152701A Pending JP2023044689A (en) 2021-09-18 2021-09-18 Image processing unit

Country Status (1)

Country Link
JP (1) JP2023044689A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05276371A (en) * 1992-03-27 1993-10-22 Sanyo Electric Co Ltd Color picture processing method
JPH11341296A (en) * 1998-05-28 1999-12-10 Sony Corp Color area conversion method and color area converter
JP2002314827A (en) * 2001-04-13 2002-10-25 Sharp Corp Image processing method, image processing device, image forming device equipped therewith, image processing program, and recording medium
JP2003153018A (en) * 2001-11-09 2003-05-23 Fuji Xerox Co Ltd Apparatus and method of processing color image signal, and color image signal processing program
JP2003209706A (en) * 2002-01-15 2003-07-25 Seiko Epson Corp Output and storage of image-processed image data
JP2010220116A (en) * 2009-03-18 2010-09-30 Ricoh Co Ltd Image processing apparatus, image processing method, image processing program, and computer readable storage medium
JP6318497B2 (en) * 2013-08-21 2018-05-09 株式会社ニコン Image processing apparatus, imaging apparatus, and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05276371A (en) * 1992-03-27 1993-10-22 Sanyo Electric Co Ltd Color picture processing method
JPH11341296A (en) * 1998-05-28 1999-12-10 Sony Corp Color area conversion method and color area converter
JP2002314827A (en) * 2001-04-13 2002-10-25 Sharp Corp Image processing method, image processing device, image forming device equipped therewith, image processing program, and recording medium
JP2003153018A (en) * 2001-11-09 2003-05-23 Fuji Xerox Co Ltd Apparatus and method of processing color image signal, and color image signal processing program
JP2003209706A (en) * 2002-01-15 2003-07-25 Seiko Epson Corp Output and storage of image-processed image data
JP2010220116A (en) * 2009-03-18 2010-09-30 Ricoh Co Ltd Image processing apparatus, image processing method, image processing program, and computer readable storage medium
JP6318497B2 (en) * 2013-08-21 2018-05-09 株式会社ニコン Image processing apparatus, imaging apparatus, and program

Similar Documents

Publication Publication Date Title
US8103119B2 (en) Image processing device, image processing method, image processing program product, and image-capturing device
JP4117284B2 (en) Color space conversion method, color image color adjustment device, color adjustment method, and computer-readable recording medium recording the program
US7366350B2 (en) Image processing apparatus and method
US7769231B2 (en) Method and apparatus for improving quality of images using complementary hues
US20090027732A1 (en) Image processing apparatus, image processing method, and computer program
US20090060326A1 (en) Image processing apparatus and method
JP4687673B2 (en) Monotone processing of color image
US8477366B2 (en) Apparatus, method and medium outputting wide gamut space image
JP2006229925A (en) Dynamic image saturation enhancement apparatus
JP6248755B2 (en) Image processing apparatus and computer program
JP2006013836A (en) Image data processing for processing color image data of color image
CN107113411A (en) A kind of method for displaying image and equipment and its recording medium based on metadata
US20210304376A1 (en) Image processing apparatus, image processing system, and image processing method
JP5253047B2 (en) Color processing apparatus and method
JP4001079B2 (en) Monotone processing of color image
KR20190073516A (en) Image processing apparatus, digital camera, image processing program, and recording medium
JP2014033273A (en) Color gamut conversion device, digital camera, color gamut conversion program, and color gamut conversion method
JP5156423B2 (en) Color processing apparatus and color processing method
JP5664261B2 (en) Image processing apparatus and image processing program
WO2009093294A1 (en) Image signal processing device and image signal processing program
WO2012153661A1 (en) Image correction device, image correction display device, image correction method, program, and recording medium
JP4375580B2 (en) Image processing apparatus, image processing method, and image processing program
JP2023044689A (en) Image processing unit
WO2012099013A1 (en) Image correction device, image correction display device, image correction method, program, and recording medium
KR102160247B1 (en) Electronic apparatus and Method for controlling the electronic apparatus thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220920

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20221118

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230105

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230322

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20230919