[go: up one dir, main page]

JP2024088570A - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP2024088570A
JP2024088570A JP2023086431A JP2023086431A JP2024088570A JP 2024088570 A JP2024088570 A JP 2024088570A JP 2023086431 A JP2023086431 A JP 2023086431A JP 2023086431 A JP2023086431 A JP 2023086431A JP 2024088570 A JP2024088570 A JP 2024088570A
Authority
JP
Japan
Prior art keywords
color
correction
content
image processing
image data
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
JP2023086431A
Other languages
Japanese (ja)
Inventor
慶範 溝口
Yoshinori Mizoguchi
顕季 山田
Akitoshi Yamada
孝大 村澤
Kota Murasawa
文乃 松井
Fumino Matsui
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to US18/544,008 priority Critical patent/US20240202977A1/en
Priority to EP23217467.2A priority patent/EP4391518A1/en
Priority to CN202311751946.7A priority patent/CN118233568A/en
Publication of JP2024088570A publication Critical patent/JP2024088570A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

To provide an image processing apparatus that appropriately performs color mapping on a print color gamut on the basis of a type of content of image data.SOLUTION: An image processing apparatus comprises: input means that inputs image data; generation means that, by using conversion means that converts a color gamut of the image data input by the input means into a color gamut of a device outputting the image data, generates image data in which the color gamut is converted from the image data input by the input means; correction means that corrects the conversion means on the basis of a result of the conversion of the color gamut; and control means that controls execution of correction, by the correction means, of a content included in the image data input by the input means. The control means controls the execution of the correction of the content by the correction means on the basis of a kind of the content.SELECTED DRAWING: Figure 2

Description

本発明は、カラーマッピングを実行可能な画像処理装置、画像処理方法およびプログラムに関する。 The present invention relates to an image processing device, an image processing method, and a program capable of performing color mapping.

所定の色空間で記述されたデジタル原稿を受け取り、その色空間中の各色についてプリンタで再現可能な色域へのマッピングを行い、出力を行う画像処理装置が知られている。特許文献1には、「知覚的」(Perceptual)なマッピングと、「絶対的測色的」(Absolute Colorimetric)なマッピングについて記載されている。また、特許文献2には、入力したカラー画像信号に対する、色空間圧縮の有無および圧縮方向の決定について記載されている。 There is a known image processing device that receives a digital document described in a specific color space, maps each color in that color space to a color gamut that can be reproduced by a printer, and outputs the result. Patent Document 1 describes "perceptual" mapping and "absolute colorimetric" mapping. Patent Document 2 describes the determination of whether or not to perform color space compression and the direction of compression for an input color image signal.

特開2020-27948号公報JP 2020-27948 A 特開平07-203234号公報Japanese Patent Application Laid-Open No. 07-203234

画像データのコンテンツの種別によらずに印刷色域へのカラーマッピングを行うと、コンテンツに適した色の出力結果が得られない場合がある。 If color mapping is performed to the print gamut regardless of the type of image data content, the output colors may not be appropriate for the content.

本発明は、画像データのコンテンツの種別に基づいて、印刷色域へのカラーマッピングを適切に行う画像処理装置、画像処理方法およびプログラムを提供することを目的とする。 The present invention aims to provide an image processing device, an image processing method, and a program that appropriately performs color mapping to the print gamut based on the type of image data content.

上記課題を解決するため、本発明に係る画像処理装置は、画像データを入力する入力手段と、前記入力手段により入力された画像データの色域を当該画像データを出力するデバイスの色域に変換する変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成する生成手段と、前記色域の変換の結果に基づいて前記変換手段を補正する補正手段と、前記入力手段により入力された画像データに含まれるコンテンツに対する前記補正手段による補正の実行を制御する制御手段と、を備え、前記制御手段は、前記コンテンツの種別に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御し、前記補正手段により前記変換手段が補正された場合、前記生成手段は、補正後の変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成し、前記補正後の変換手段により色域の変換が行われた画像データでは、補正前の前記変換手段により色域の変換が行われた画像データにおける色差が拡張されていることを特徴とする。 In order to solve the above problem, the image processing device according to the present invention comprises an input means for inputting image data, a generation means for generating image data whose gamut has been converted from the image data input by the input means using a conversion means for converting the gamut of the image data input by the input means into the gamut of a device that outputs the image data, a correction means for correcting the conversion means based on the result of the gamut conversion, and a control means for controlling the execution of correction by the correction means on the content included in the image data input by the input means, the control means controls the execution of correction by the correction means on the content based on the type of the content, and when the conversion means has been corrected by the correction means, the generation means uses the corrected conversion means to generate image data whose gamut has been converted from the image data input by the input means, and the image data whose gamut has been converted by the conversion means after the correction has expanded the color difference in the image data whose gamut has been converted by the conversion means before the correction.

本発明によれば、画像データのコンテンツの種別に基づいて、印刷色域へのカラーマッピングを適切に行うことができる。 According to the present invention, it is possible to appropriately map colors to the print gamut based on the type of content of the image data.

画像処理装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an image processing device. 画像処理を示すフローチャートである。13 is a flowchart showing image processing. 領域設定処理を示すフローチャートである。13 is a flowchart showing an area setting process. 画素分析を説明するための図である。FIG. 13 is a diagram for explaining pixel analysis. コンテンツの種別の判定を説明するための図である。FIG. 11 is a diagram for explaining determination of a type of content. 色縮退補正後テーブルの作成処理を示すフローチャートである。13 is a flowchart showing a process of creating a table after color degeneration correction. 色縮退を説明するための図である。FIG. 13 is a diagram for explaining color degeneracy. 原稿ページを説明するための図である。FIG. 2 is a diagram for explaining a manuscript page. 画像処理アプリケーションのUI画面を示す図である。FIG. 2 is a diagram showing a UI screen of an image processing application. アプリケーションを含む構成を示す図である。FIG. 1 is a diagram showing a configuration including an application. 画像処理を示すフローチャートである。13 is a flowchart showing image processing. 領域ごとの色縮退補正の要否を判定する処理を示すフローチャートである。11 is a flowchart showing a process for determining whether or not color degeneration correction is required for each region. S302の色縮退判定処理を説明するための図である。FIG. 11 is a diagram for explaining the color degeneration determination process in step S302. S305の色縮退補正処理を説明するための図である。FIG. 11 is a diagram for explaining the color degeneration correction process in step S305. 明度補正テーブルを示す図である。FIG. 13 is a diagram showing a brightness correction table. 記録ヘッド周辺の構成を示す図である。FIG. 2 is a diagram showing the configuration around a recording head. UI画面を示す図である。FIG. 13 is a diagram showing a UI screen. コンテンツと領域の関係を説明するための図である。FIG. 2 is a diagram for explaining the relationship between contents and areas. 領域画素数と類似画素数閾値の関係を示す図である。FIG. 13 is a diagram showing the relationship between the number of region pixels and a similar pixel number threshold. コンテンツの種別の判定を行う処理を示すフローチャートである。13 is a flowchart showing a process for determining the type of content. コンテンツの位置関係による違いを説明するための図である。FIG. 11 is a diagram for explaining differences due to positional relationships of contents. コンテンツの種別の判定を行う処理を示すフローチャートである。13 is a flowchart showing a process for determining the type of content. コンテンツの種別の判定を行う処理を示すフローチャートである。13 is a flowchart showing a process for determining the type of content. コンテンツの種別の判定を行う処理を示すフローチャートである。13 is a flowchart showing a process for determining the type of content. コンテンツの種別の判定を行う処理を示すフローチャートである。13 is a flowchart showing a process for determining the type of content.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following embodiments are described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe multiple features, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicate explanations are omitted.

[第1実施形態]
本明細書で使用する用語について、あらかじめ以下のように定義するものとする。
[First embodiment]
The terms used in this specification are defined as follows.

(色再現域)
「色再現域」は、色再現範囲、色域、ガマットともいう。一般的には、「色再現域」は、任意の色空間における再現可能な色の範囲のことを指す。また、この色再現域の広さを表す指標として、色域体積がある。色域体積は、任意の色空間での3次元の体積のことである。色再現域を構成する色度点が離散的であることがある。例えば、特定の色再現域をCIE-L*a*b*上の729点をもって代表させ、その間の点については、四面体補間や立方体補間などの公知の補間演算を用いて求めることがある。このような場合には、対応する色域体積は補間演算方法に対応して、色再現域を構成する四面体や立方体などのCIE-L*a*b*上の体積を求めて累積したものを使用することができる。本実施形態における色再現域や色域も特定の色空間に限られるものではないが、本実施形態では、CIE-L*a*b*空間での色再現域を一例として説明している。また、本実施形態中での色再現域の数値は、四面体補間を前提としてCIE-L*a*b*空間で累積計算した場合の体積を示している。
(Color reproduction range)
The "color reproduction range" is also called the color reproduction range, color gamut, or gamut. Generally, the "color reproduction range" refers to the range of colors that can be reproduced in an arbitrary color space. In addition, the color gamut volume is an index that indicates the width of the color reproduction range. The color gamut volume is a three-dimensional volume in an arbitrary color space. The chromaticity points that constitute the color reproduction range may be discrete. For example, a specific color reproduction range may be represented by 729 points on the CIE-L*a*b*, and the points between them may be obtained using known interpolation calculations such as tetrahedral interpolation and cubic interpolation. In such a case, the corresponding color gamut volume can be obtained by calculating and accumulating the volumes of tetrahedrons and cubes that constitute the color reproduction range on the CIE-L*a*b* in accordance with the interpolation calculation method. The color reproduction range and color gamut in this embodiment are not limited to a specific color space, but in this embodiment, the color reproduction range in the CIE-L*a*b* space is described as an example. Furthermore, the numerical values of the color reproduction range in this embodiment indicate volumes obtained by cumulative calculation in the CIE-L*a*b* space on the premise of tetrahedral interpolation.

(ガマットマッピング)
ガマットマッピングとは、異なる色域間を変換する処理のことであり、例えば、入力色域をプリンタ等のデバイスの出力色域にマッピングすることである。ICCプロファイルのPerceptual、Saturation、Colorimetric等が一般的である。マッピング処理は、例えば、3次元ルックアップテーブル(3DLUT)による変換で実現されても良い。また、標準色空間に色空間変換後、マッピング処理を行っても良い。例えば、入力色空間がsRGBであった場合、CIE-L*a*b*色空間に変換し、そして、CIE-L*a*b*色空間上で、出力色域にマッピング処理を行う。マッピング処理は、3DLUTによる変換でも良いし、変換式を用いても良い。また、入力時の色空間と出力時の色空間の変換を同時に行っても良い。例えば、入力時はsRGB色空間であり、出力時はプリンタ固有のRGB値またはCMYK値に変換しても良い。
(Gamut mapping)
Gamut mapping is a process of converting between different color gamuts, for example, mapping an input color gamut to an output color gamut of a device such as a printer. Common examples include Perceptual, Saturation, and Colorimetric ICC profiles. The mapping process may be realized by conversion using a three-dimensional lookup table (3DLUT). Also, the mapping process may be performed after color space conversion to a standard color space. For example, if the input color space is sRGB, it is converted to the CIE-L*a*b* color space, and then mapping process is performed to the output color gamut on the CIE-L*a*b* color space. The mapping process may be conversion using a 3DLUT or a conversion formula. Also, conversion of the color space at the time of input and the color space at the time of output may be performed simultaneously. For example, the color space at the time of input may be sRGB, and the color space may be converted to the printer-specific RGB value or CMYK value at the time of output.

(原稿データ)
原稿データとは、処理対象の入力デジタルデータ全体のことをいう。原稿データは、1ページから複数ページを含んで構成されている。各単ページは、画像データとして保持されても良いし、描画コマンドとして表現されても良い。描画コマンドで表現されている場合、レンダリングを行い、画像データに変換してから処理が行われても良い。画像データは、複数の画素が2次元に並んで構成されている。画素は、色空間内の色を表す情報を保持している。色を表す情報としては、例えば、RGB値、CMYK値、K値、CIE-L*a*b*値、HSV値、HLS値などがある。なお、本実施形態においては、1ページであっても複数ページであっても適用可能である。本実施形態では、一例として、1ページの原稿データを画像データとして説明する。
(Manuscript data)
The manuscript data refers to the entire input digital data to be processed. The manuscript data includes one to multiple pages. Each single page may be held as image data or expressed as a drawing command. When expressed as a drawing command, rendering may be performed and the data may be converted into image data before processing. The image data is composed of multiple pixels arranged two-dimensionally. The pixels hold information representing colors in a color space. Examples of information representing colors include RGB values, CMYK values, K values, CIE-L*a*b* values, HSV values, and HLS values. Note that this embodiment is applicable to both one page and multiple pages. In this embodiment, as an example, manuscript data of one page will be described as image data.

(色縮退)
本実施形態において、任意の2つの色に対して、ガマットマッピングを行う際に、所定の色空間におけるマッピング後の色間の距離がマッピング前の色間の距離より小さくなることを色縮退と定義する。具体的には、デジタル原稿における色Aと色Bがあり、プリンタの色域にマッピングすることで色Aが色Cに、色Bが色Dに変換されたとする。その場合、色Cと色Dの色間の距離が色Aと色Bの色間の距離より小さくなっていることを色縮退と定義する。色縮退が起こると、デジタル原稿において異なる色だと認識していたものが、印刷すると同じ色として認識してしまう。例えば、グラフは、異なる項目を異なる色にすることにより異なる項目であることを認識させている。色縮退が起こることにより、異なる色が同じ色と認識され、グラフの異なる項目も同じ項目であると誤認させてしまう可能性がある。ここでの色間の距離を算出する所定の色空間は、任意の色空間で良い。例えば、sRGB色空間、Adobe RGB色空間、CIE-L*a*b*色空間、CIE-LUV色空間、XYZ表色系色空間、xyY表色系色空間、HSV色空間、HLS色空間などである。
(Color degeneracy)
In this embodiment, when performing gamut mapping for any two colors, the distance between the colors after mapping in a specified color space becomes smaller than the distance between the colors before mapping, which is defined as color degeneracy. Specifically, assume that there are colors A and B in a digital document, and color A is converted to color C and color B is converted to color D by mapping to the printer's color gamut. In this case, color degeneracy is defined as the distance between colors C and D becoming smaller than the distance between colors A and B. When color degeneracy occurs, colors that were recognized as different in the digital document are recognized as the same color when printed. For example, a graph makes different items recognized as different items by making different items different colors. When color degeneracy occurs, different colors are recognized as the same color, and different items in the graph may be mistakenly recognized as the same item. The specified color space for calculating the distance between colors here may be any color space. For example, these include the sRGB color space, Adobe RGB color space, CIE-L*a*b* color space, CIE-LUV color space, XYZ color space, xyY color space, HSV color space, and HLS color space.

図1は、本実施形態における画像処理装置の構成の一例を示すブロック図である。画像処理装置101として、例えば、PCやタブレット、サーバや記録装置が用いられる。図1は、画像処理装置101が記録装置108と別に構成された一例を示している。CPU102は、HDDやROMなどの記憶媒体104に記憶されているプログラムをワークエリアとしてのRAM103に読み出して実行することにより各種画像処理を実行する。例えば、CPU102は、Human Interface Device(HID)I/F(不図示)を介してユーザからコマンドを取得する。そして、取得したコマンドや、記憶媒体104に記憶されているプログラムに従って、各種画像処理を実行する。また、CPU102は、データ転送I/F106を介して取得した原稿データに対し、記憶媒体104に記憶されているプログラムに従って所定の処理を行う。そして、CPU102は、その結果や様々な情報をディスプレイ(不図示)に表示し、データ転送I/F106を介して送信する。 FIG. 1 is a block diagram showing an example of the configuration of an image processing device in this embodiment. For example, a PC, a tablet, a server, or a recording device is used as the image processing device 101. FIG. 1 shows an example in which the image processing device 101 is configured separately from the recording device 108. The CPU 102 executes various image processes by reading a program stored in a storage medium 104 such as an HDD or ROM into a RAM 103 as a work area and executing the program. For example, the CPU 102 acquires a command from a user via a Human Interface Device (HID) I/F (not shown). Then, various image processes are executed according to the acquired command and the program stored in the storage medium 104. The CPU 102 also performs a predetermined process on the manuscript data acquired via the data transfer I/F 106 according to the program stored in the storage medium 104. Then, the CPU 102 displays the result and various information on a display (not shown) and transmits them via the data transfer I/F 106.

画像処理アクセラレータ105は、CPU102よりも高速に画像処理を実行可能なハードウェアである。画像処理アクセラレータ105は、CPU102が画像処理に必要なパラメータとデータをRAM103の所定のアドレスに書き込むことにより起動される。画像処理アクセラレータ105は、上記のパラメータとデータを読み込んだ後、そのデータに対して画像処理を実行する。但し、画像処理アクセラレータ105は必須な要素ではなく、同等の処理をCPU102で実行するようにしても良い。画像処理アクセラレータは、具体的には、GPUや専用に設計された電気回路である。上記のパラメータは、記憶媒体104に記憶されても良いし、データ転送I/F106を介して外部から取得しても良い。 The image processing accelerator 105 is hardware capable of executing image processing faster than the CPU 102. The image processing accelerator 105 is started when the CPU 102 writes parameters and data required for image processing to a specified address in the RAM 103. After reading the parameters and data, the image processing accelerator 105 executes image processing on the data. However, the image processing accelerator 105 is not an essential element, and equivalent processing may be executed by the CPU 102. Specifically, the image processing accelerator is a GPU or a specially designed electric circuit. The parameters may be stored in the storage medium 104, or may be obtained from the outside via the data transfer I/F 106.

記録装置108では、CPU111は、記憶媒体113に記憶されているプログラムをワークエリアとしてのRAM112に読み出して実行することにより記録装置108を統括的に制御する。画像処理アクセラレータ109は、CPU111よりも高速に画像処理を実行可能なハードウェアである。画像処理アクセラレータ109は、CPU111が画像処理に必要なパラメータとデータをRAM112の所定のアドレスに書き込むことにより起動される。画像処理アクセラレータ109は、上記のパラメータとデータを読み込んだ後、そのデータに対して画像処理を実行する。但し、画像処理アクセラレータ109は必須な要素ではなく、同等の処理をCPU111で実行するようにしても良い。上記のパラメータは記憶媒体113に記憶されても良いし、フラッシュメモリやHDDなどのストレージ(不図示)に記憶されても良い。 In the recording device 108, the CPU 111 reads out a program stored in the storage medium 113 into the RAM 112 as a work area and executes it, thereby controlling the recording device 108 as a whole. The image processing accelerator 109 is hardware capable of executing image processing faster than the CPU 111. The image processing accelerator 109 is started by the CPU 111 writing parameters and data required for image processing to a specified address in the RAM 112. After reading the above parameters and data, the image processing accelerator 109 executes image processing on the data. However, the image processing accelerator 109 is not an essential element, and equivalent processing may be executed by the CPU 111. The above parameters may be stored in the storage medium 113, or may be stored in a storage (not shown) such as a flash memory or HDD.

ここで、CPU111または画像処理アクセラレータ109が行う画像処理について説明する。画像処理は、例えば、取得した記録データに基づいて、記録ヘッド115による各走査でのインクのドット形成位置を示すデータを生成する処理である。CPU111または画像処理アクセラレータ109は、取得した記録データの色変換処理と量子化処理を行う。 Here, we will explain the image processing performed by the CPU 111 or the image processing accelerator 109. Image processing is, for example, processing that generates data indicating the ink dot formation positions for each scan by the print head 115 based on the acquired print data. The CPU 111 or the image processing accelerator 109 performs color conversion processing and quantization processing on the acquired print data.

色変換処理は、記録装置108で扱うインク濃度に色分解する処理である。例えば、取得した記録データには、画像を示す画像データが含まれる。画像データがモニタの表現色であるsRGB等の色空間座標で画像を示すデータである場合、そのsRGBの色座標(R、G、B)で画像を示すデータは、記録装置108で扱うインクデータ(CMYK)に変換される。色変換方法は、マトリクス演算処理や3DLUT、4DLUTを用いた処理等によって実現される。 The color conversion process is a process of separating colors into ink densities that can be handled by the recording device 108. For example, the acquired recording data includes image data that represents an image. If the image data represents an image in color space coordinates such as sRGB, which is the representation color of the monitor, the data that represents the image in the sRGB color coordinates (R, G, B) is converted into ink data (CMYK) that can be handled by the recording device 108. The color conversion method is realized by matrix calculation processing or processing using a 3DLUT or 4DLUT.

本実施形態では、記録装置108は、一例として、ブラック(K)、シアン(C)、マゼンタ(M)、イエロー(Y)のインクを記録に用いる。そのため、RGB信号の画像データは、K、C、M、Yの各8ビットの色信号からなる画像データに変換される。各色の色信号は各インクの付与量に対応する。また、インク色の数としてはK、C、M、Yの4色を例に挙げたが、画質向上の為に、蛍光インク(F)、濃度の薄いライトシアン(Lc)やライトマゼンタ(Lm)やグレー(Gy)のインクなど、他のインク色が用いられても良い。その場合、それらのインクに応じた色信号が生成される。 In this embodiment, the recording device 108 uses black (K), cyan (C), magenta (M), and yellow (Y) inks for recording, as an example. Therefore, the image data of the RGB signal is converted into image data consisting of 8-bit color signals for each of K, C, M, and Y. The color signal for each color corresponds to the amount of each ink applied. In addition, although four colors, K, C, M, and Y, are given as an example of the number of ink colors, other ink colors may be used to improve image quality, such as fluorescent ink (F), light cyan (Lc), light magenta (Lm), and gray (Gy) inks with low density. In that case, color signals corresponding to those inks are generated.

色変換処理の後、インクデータに対して量子化処理を行う。量子化処理は、インクデータの階調のレベル数を下げる処理である。本実施形態では、各画素についてインクデータの値と比較するための閾値を配列したディザマトリックスを用いて量子化を行う。量子化処理を経て、最終的には、各ドット形成位置にドットを形成するかしないかを示す二値データが生成される。 After the color conversion process, a quantization process is performed on the ink data. The quantization process is a process that reduces the number of gradation levels of the ink data. In this embodiment, quantization is performed using a dither matrix that arranges threshold values for comparison with the ink data value for each pixel. After the quantization process, binary data is finally generated that indicates whether or not a dot will be formed at each dot formation position.

画像処理が行われた後、記録ヘッドコントローラ114によって、記録ヘッド115へ二値データが転送される。同時に、CPU111は、記録ヘッドコントローラ114を介して、記録ヘッド115を動作させるキャリッジモータ(不図示)を動作させ、さらに、記録媒体を搬送する搬送モータを動作させるよう記録制御を行う。記録ヘッド115は、記録媒体上を走査し、同時に、記録ヘッド115によってインク滴が記録媒体上に吐出されることにより、画像が形成される。 After image processing, the printhead controller 114 transfers the binary data to the printhead 115. At the same time, the CPU 111 performs printing control via the printhead controller 114 to operate a carriage motor (not shown) that operates the printhead 115, and further to operate a transport motor that transports the printing medium. The printhead 115 scans over the printing medium, and at the same time, the printhead 115 ejects ink droplets onto the printing medium, forming an image.

画像処理装置101と記録装置108との間は、通信回線107を介して接続されている。本実施形態では、通信回線107の一例としてローカル・エリア・ネットワーク(LAN)を説明するが、USBハブ、無線のアクセスポイントを用いた無線通信ネットワーク、WiFiダイレクト通信機能を用いた接続等であっても良い。 The image processing device 101 and the recording device 108 are connected via a communication line 107. In this embodiment, a local area network (LAN) is described as an example of the communication line 107, but it may also be a USB hub, a wireless communication network using a wireless access point, a connection using a Wi-Fi direct communication function, etc.

以下、記録ヘッド115が、シアン(C)、マゼンタ(M)、イエロ-(Y)、ブラック(K)の4色のカラーインクのノズル列を有するものとして説明する。 The following description will assume that the recording head 115 has nozzle rows for four color inks: cyan (C), magenta (M), yellow (Y), and black (K).

図16は、本実施形態における記録ヘッド115を説明するための図である。本実施形態では、1ノズル列分の単位領域に対して、N回の複数回走査で画像が記録される。記録ヘッド115は、キャリッジ116と、ノズル列115k、115c、115m、115yと、光学センサ118とを有する。5つのノズル列115k、115c、115m、115yと光学センサ118とを搭載したキャリッジ116は、ベルト117を介して伝達されるキャリッジモータの駆動力によって、図中X方向(主走査方向)に沿って往復移動可能である。キャリッジ116が、記録媒体に対し相対的にX方向に移動するとともに、ノズル列の各ノズルからインク滴が記録デ-タに基づいて重力方向(図中-z方向)に吐出される。これにより、プラテン119上に載置された記録媒体に主走査1/N回分の画像が記録される。1回分の主走査が完了すると、記録媒体は主走査1/N回分の幅に対応する距離だけ、主走査方向と交差する搬送方向に沿って(図中-y方向)搬送される。これらの動作により、N回の複数走査で1ノズル列分の幅の画像が記録される。このような主走査と搬送動作とを交互に繰り返すことにより、記録媒体に徐々に画像が形成される。このようにして、所定領域に対する画像記録を完成させるように制御が行われる。 Figure 16 is a diagram for explaining the recording head 115 in this embodiment. In this embodiment, an image is recorded in a unit area of one nozzle row by multiple scans N times. The recording head 115 has a carriage 116, nozzle rows 115k, 115c, 115m, and 115y, and an optical sensor 118. The carriage 116, which is equipped with five nozzle rows 115k, 115c, 115m, and 115y and the optical sensor 118, can be moved back and forth along the X direction (main scanning direction) in the figure by the driving force of a carriage motor transmitted via a belt 117. As the carriage 116 moves in the X direction relative to the recording medium, ink droplets are ejected from each nozzle of the nozzle row in the direction of gravity (-z direction in the figure) based on the recording data. As a result, an image of 1/N main scans is recorded on the recording medium placed on the platen 119. When one main scan is completed, the recording medium is transported along a transport direction that intersects with the main scan direction (-y direction in the figure) a distance corresponding to the width of 1/Nth of a main scan. Through these operations, an image the width of one nozzle row is recorded over N multiple scans. By alternating between such main scans and transport operations, an image is gradually formed on the recording medium. In this way, control is performed to complete image recording on a specified area.

ユーザから入力される画像データに含まれるコンテンツ情報は様々である。例として、文字、写真、図形などのグラフィック、デザイン表現としてのグラデーション等、各種別がある。また、「色味の差を強調する事を重視したい」「色味の連続性を重視したい」といった後述する処理と結びつくような種別もコンテンツ情報として取り扱う事ができる。例えば、ユーザにより、「色味の差の強調を重視」、「色味の連続性を重視」といった コンテンツに対する設定をコンテンツ情報として扱っても良い。その場合、「色味の差の強調を重視」は、以下の「文字またはグラフィック」に対応し、「色味の連続性を重視」は、以下の「写真またはグラデーション」に対応する。 Image data input by the user contains a variety of content information. Examples include various categories such as text, photographs, graphics such as figures, and gradations as design expressions. In addition, categories that are linked to the processing described below, such as "emphasis on emphasizing color differences" and "emphasis on color continuity", can also be treated as content information. For example, user settings for content such as "emphasis on emphasizing color differences" and "emphasis on color continuity" can be treated as content information. In this case, "emphasis on emphasizing color differences" corresponds to "text or graphics" below, and "emphasis on color continuity" corresponds to "photo or gradation" below.

画像データをプリンタで表現可能な色空間へマッピングする際に、画像データの存在する色が色縮退すると、印刷結果として異なる色を同じ色とユーザに認識させてしまう可能性がある。画像データ中に「文字と、文字と近い色で構成されていた背景」があった場合には、色縮退により文字が読めなくなることはユーザにとって望ましくない。グラフィックも同様である。こうしたコンテンツに対しては、マッピング後の色縮退の度合いを低減するように「色縮退補正」を実施することが望まれる。 When mapping image data into a color space that can be represented by a printer, if the colors present in the image data are reduced in color, the user may perceive different colors as the same in the printed result. If the image data contains "text and a background that is a similar color to the text," it is undesirable for the user to be unable to read the text due to color reduction. The same applies to graphics. For such content, it is desirable to carry out "color reduction correction" to reduce the degree of color reduction after mapping.

一方で色縮退補正は、プリンタで表現可能な限られた色空間の中で色同士の色間距離を確保することを重視するため、近い色同士の色味の連続性は、色縮退補正前に比べて低減する。画像データ中にある「写真」は、人間の肌や空のように色が連続的に微小な変化をする箇所を多く含むが、色縮退補正を行うことにより、彩度や明度をずらしてでも色間距離を確保しようとし、色味の連続性という特徴を変えてしまう。そのため、ユーザにとって望ましくない出力結果となってしまう。グラデーションも同様である。こうしたコンテンツに対しては、マッピング後の「色縮退補正」を実施することは望ましくない。 On the other hand, color degeneration correction places emphasis on maintaining the distance between colors within the limited color space that can be represented by the printer, so the color continuity between close colors is reduced compared to before color degeneration correction. The "photos" in image data contain many areas where the color changes continuously and minutely, such as human skin and the sky, but color degeneration correction tries to maintain the distance between colors even at the expense of shifting the saturation and brightness, changing the characteristic of color continuity. This results in output results that are undesirable for the user. The same applies to gradations. It is not advisable to perform "color degeneration correction" after mapping on such content.

また、ユーザから入力される画像データには多様なコンテンツが混在する場合がある。画像データに一律に色縮退補正を実施する、或いは非実施にすることは一部のコンテンツにとって望ましくない出力結果となってしまう。そこで、本実施形態では、事前に画像データ内のコンテンツを解析し、色差維持を重視するコンテンツであるか否かを判定する。そのような構成により、色縮退補正を実施することが望ましいコンテンツに対して色縮退補正を実施することができ、一部のコンテンツにとって望ましくない出力結果となってしまうことを防ぐことができる。 In addition, image data input by a user may contain a mixture of various contents. Uniformly applying color reduction correction to image data, or not applying color reduction correction at all, may result in an output result that is undesirable for some contents. Therefore, in this embodiment, the content in the image data is analyzed in advance to determine whether the content places importance on maintaining color difference. With such a configuration, color reduction correction can be applied to content for which it is desirable to apply color reduction correction, and it is possible to prevent an output result that is undesirable for some contents.

図2は、本実施形態における画像処理装置101の画像処理を示すフローチャートである。本実施形態では、図2の処理により、色縮退する色の組み合わせに対して、所定の色空間における色間の距離を大きくする。その結果、色縮退の度合を低減することができる。図2の処理は、例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図2の処理は、画像処理アクセラレータ105により実行されても良い。 Figure 2 is a flowchart showing image processing by the image processing device 101 in this embodiment. In this embodiment, the process in Figure 2 increases the distance between colors in a specified color space for color combinations that cause color degeneracy. As a result, the degree of color degeneracy can be reduced. The process in Figure 2 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. The process in Figure 2 may also be executed by the image processing accelerator 105.

S101において、CPU102は、画像データを入力する。例えば、CPU102は、記憶媒体104に保存されている画像データを入力する。また、CPU102は、データ転送I/F106を介して画像データを入力しても良い。CPU102は、入力された原稿データから色情報を含む画像データを取得する(色情報の取得)。画像データには、所定の色空間で表現された色を表す値を含んでいる。色情報の取得では、色を表す値が取得される。色を表す値は、例えば、sRGBデータ、Adobe RGBデータ、CIE-L*a*b*データ、CIE-LUVデータ、XYZ表色系データ、xyY表色系データ、HSVデータ、HLSデータから取得される値である。 In S101, the CPU 102 inputs image data. For example, the CPU 102 inputs image data stored in the storage medium 104. The CPU 102 may also input image data via the data transfer I/F 106. The CPU 102 acquires image data including color information from the input original data (acquisition of color information). The image data includes values that represent colors expressed in a predetermined color space. In acquiring color information, values that represent colors are acquired. The values that represent colors are values acquired from, for example, sRGB data, Adobe RGB data, CIE-L*a*b* data, CIE-LUV data, XYZ color system data, xyY color system data, HSV data, and HLS data.

S102において、CPU102は、記憶媒体104に予め記録されたガマットマッピングテーブルを取得する。 At S102, the CPU 102 obtains a gamut mapping table that is pre-recorded on the storage medium 104.

S103において、CPU102は、S102で取得したガマットマッピングテーブルを用いて、画像データの各画素の色情報に対してガマットマッピングを行う。ガマットマッピング後の画像データは、RAM103または記憶媒体104に記憶される。具体的には、ガマットマッピングテーブルは、3次元のルックアップテーブルとなっている。3次元のルックアップテーブルによって、入力画素値(Rin,Gin,Bin)の組み合わせに対して、出力画素値(Rout,Gout,Bout)の組み合わせを算出することができる。入力値であるRin、Gin、Binがそれぞれ256諧調を持つ場合、256×256×256の合計16,777,216組の出力値を持つテーブルTable1[256][256][256][3]を用いることが好ましい。CPU102は、ガマットマッピングテーブルを用いて色変換を行う。具体的には、S101において入力された原稿データのRGB画素値で構成される画像の各画素に対して、下記の処理をすることで実現される。 In S103, the CPU 102 performs gamut mapping on the color information of each pixel of the image data using the gamut mapping table acquired in S102. The image data after gamut mapping is stored in the RAM 103 or the storage medium 104. Specifically, the gamut mapping table is a three-dimensional lookup table. The three-dimensional lookup table can calculate a combination of output pixel values (Rout, Gout, Bout) for a combination of input pixel values (Rin, Gin, Bin). When the input values Rin, Gin, and Bin each have 256 gradations, it is preferable to use table Table1 [256] [256] [256] [3], which has a total of 16,777,216 sets of output values of 256 x 256 x 256. The CPU 102 performs color conversion using the gamut mapping table. Specifically, this is achieved by carrying out the following process for each pixel of an image composed of RGB pixel values of the manuscript data input in S101.

Rout = Table1[Rin][Gin][Bin][0] ・・・(1)
Gout = Table1[Rin][Gin][Bin][1] ・・・(2)
Bout = Table1[Rin][Gin][Bin][2] ・・・(3)
また、LUTのグリッド数を256グリッドから例えば16グリッド等に減らし、複数のグリッドのテーブル値を補間して出力値を決定する等、テーブルサイズを小さくするようにしても良い。また、3次元のLUTの他、3×3マトリクス演算式を用いても良い。
Rout = Table1 [Rin] [Gin] [Bin] [0] ... (1)
Gout = Table1 [Rin] [Gin] [Bin] [1] ... (2)
Bout = Table1 [Rin] [Gin] [Bin] [2] ... (3)
Also, the number of grids in the LUT may be reduced from 256 grids to, for example, 16 grids, and the table size may be reduced by determining the output value by interpolating table values of a plurality of grids, etc. Also, in addition to a three-dimensional LUT, a 3×3 matrix calculation formula may be used.

S104において、CPU102は、S101で入力された原稿データに領域を設定する。領域の設定には、様々な手法が考えられるが、一例として、入力画像の白画素値を判断基準とした手法を用いる。 In S104, the CPU 102 sets an area in the manuscript data input in S101. There are various possible methods for setting the area, but as an example, a method is used in which the white pixel value of the input image is used as the judgment criterion.

図3は、白画素値を判断基準とした領域設定処理を示すフローチャートである。図3におけるsegという情報は、設定された各領域を示しており、各領域はseg番号として0、1、2・・・といった情報で管理される。 Figure 3 is a flowchart showing the area setting process using the white pixel value as the judgment criterion. The information "seg" in Figure 3 indicates each set area, and each area is managed by information such as 0, 1, 2, etc. as a segment number.

S201において、CPU102は、画像データ中の1画素を取得する。本フローチャート中ではこの画素を注目画素として画素分析を行う。 In S201, the CPU 102 acquires one pixel from the image data. In this flowchart, pixel analysis is performed with this pixel as the pixel of interest.

図4(a)における矩形情報は、画像データを示している。画像データにおける黒画素は非白領域、白画素は白領域であるとする。画像データを矢印の方向に走査することで注目画素を変えていく。図4(a)の画像データに対してはまず一番上の画素行について左から右に走査し、次に中央の画素行について左から右、最後に一番下の画素行について左から右に走査する。 The rectangular information in Figure 4(a) represents image data. Black pixels in the image data are considered to be non-white areas, and white pixels are considered to be white areas. The pixel of interest is changed by scanning the image data in the direction of the arrow. For the image data in Figure 4(a), first the top pixel row is scanned from left to right, then the middle pixel row is scanned from left to right, and finally the bottom pixel row is scanned from left to right.

S202において、注目画素が白画素であるか否かを判定する。白画素とは例えば8bit情報におけるR=G=B=255となる画素である。本処理における白画素か否かの判定は、S103のガマットマッピングを行った後に実施しても良いし、実施前の画素値で実施しても良い。ただし、ガマットマッピングを行った後の画素から判断する場合は、R=G=B=255であった画素がガマットマッピング後も値が保持されている、つまり白画素のままであることを保証するようなテーブルが用いられる。白と判定された場合にはS203に進み、白でないと判定された場合にはS204に遷移する。 In S202, it is determined whether the pixel of interest is a white pixel. A white pixel is, for example, a pixel where R=G=B=255 in 8-bit information. In this process, the determination of whether a pixel is white or not may be performed after gamut mapping in S103, or it may be performed on the pixel value before gamut mapping. However, when making a determination from a pixel after gamut mapping, a table is used that ensures that a pixel where R=G=B=255 retains its value even after gamut mapping, in other words, that it remains a white pixel. If it is determined to be white, proceed to S203, and if it is determined not to be white, transition to S204.

S203において、CPU102は、注目画素に白segを設定する。本実施形態ではsegを数値で表すこととし、白seg=seg番号0として取り扱う。 In S203, the CPU 102 sets a white segment to the pixel of interest. In this embodiment, the segment is expressed as a number, and the white segment is treated as segment number 0.

S204において、CPU102は、注目画素にseg番号を仮設定する。図4(a)に示した画素の走査方向に従って検査し、注目画素の左隣の画素のseg番号に基づきseg番号を仮設定する。本実施形態では一例として、以下のルールでseg番号の仮設定を行う。 In S204, the CPU 102 provisionally sets a seg number for the pixel of interest. The pixel is inspected according to the pixel scanning direction shown in FIG. 4A, and the seg number is provisionally set based on the seg number of the pixel to the left of the pixel of interest. In this embodiment, as an example, the provisional setting of the seg number is performed according to the following rules.

・左隣の画素がseg番号=0である時、注目画素に新規のseg番号を割り当てる。 -When the pixel to the left has a segment number of 0, assign a new segment number to the pixel of interest.

・左隣の画素がseg番号=Nである時、注目画素にはseg番号=Nを割り当てる。

S205において、CPU102は、画像データの全画素で仮seg番号が割り当てられたか否かを判断する。全画素で仮seg番号が割り当てられたと判定された場合はS206に遷移し、全画素で仮seg番号が割り当てられていないと判定された場合はS201からの処理を繰り返す。
When the pixel to the left has seg number=N, the pixel of interest is assigned seg number=N.

In S205, the CPU 102 judges whether or not a provisional seg number has been assigned to all pixels of the image data. If it is determined that a provisional seg number has been assigned to all pixels, the process proceeds to S206, and if it is determined that a provisional seg number has not been assigned to all pixels, the process repeats from S201.

図4(b)はseg番号の仮設定結果を示す。上記の設定により、3×3の範囲内にseg番号=0~3の仮番号が割り振られたことを示している。 Figure 4 (b) shows the result of provisionally setting the segment numbers. The above setting shows that provisional segment numbers 0 to 3 have been assigned within a 3x3 range.

S206において、CPU102は、仮seg番号の補正を実施する。図4(a)と同様の走査方向で、注目画素の補正が行われる。CPU102は、注目画素のseg番号と、上下左右4画素中のseg番号=0を除く最も小さなseg番号とで比較を行い、より小さいseg番号に注目画素のseg番号を付け替える。 In S206, the CPU 102 corrects the provisional segment number. The pixel of interest is corrected in the same scanning direction as in FIG. 4A. The CPU 102 compares the segment number of the pixel of interest with the smallest segment number excluding segment number 0 among the four pixels above, below, left, and right, and replaces the segment number of the pixel of interest with the smaller segment number.

S207において、CPU102は、画像データの全画素で仮seg番号の補正が実施されたか否かを判定する。全画素で仮seg番号の補正が実施されたと判定された場合、図3の処理を終了する。全画素で仮seg番号の補正が実施されていないと判定された場合、S206からの処理を繰り返す。 In S207, the CPU 102 determines whether or not correction of the provisional segment numbers has been performed for all pixels of the image data. If it is determined that correction of the provisional segment numbers has been performed for all pixels, the process of FIG. 3 ends. If it is determined that correction of the provisional segment numbers has not been performed for all pixels, the process from S206 is repeated.

図4(c)は仮seg番号の補正結果を示す。図4(b)において存在していた仮seg番号=3は仮seg番号=2に補正される。仮seg番号が0、1、2であった画素は同じ番号のままである。 Figure 4 (c) shows the result of the correction of the provisional seg number. The provisional seg number = 3 that existed in Figure 4 (b) is corrected to provisional seg number = 2. The pixels with provisional seg numbers 0, 1, and 2 remain with the same numbers.

上記の領域設定は一例である。画素情報における白画素以外を領域設定の基準としても良いし、seg番号の判断を異なるフローで実現しても良い。例えば、事前に縮小処理を実施することで縮小することにより重なった画素は全て同一seg番号とみなすような判定をしても良い。なお、こうした縮小処理を用いることにより、領域設定の処理時間を短縮させることができる。また、画素のR、G、B情報以外の情報を用いても良い。 The above area setting is one example. Area setting may be based on pixels other than white pixels in the pixel information, or the determination of the segment number may be achieved using a different flow. For example, a reduction process may be performed in advance, and all overlapping pixels may be determined to have the same segment number as a result of the reduction. By using such a reduction process, the processing time for area setting can be shortened. Also, information other than the R, G, and B information of pixels may be used.

S105において、CPU102は、S104で設定した領域について解析を行う。本解析処理は、後段の色差補正テーブルの作成および適用の実施判断のための情報を生成する処理である。本実施形態では、判断情報として各領域について「文字またはグラフィック」であるか「写真またはグラデーション」であるかの情報を生成する。 In S105, the CPU 102 analyzes the area set in S104. This analysis process is a process for generating information for determining whether to create and apply a color difference correction table in the subsequent stage. In this embodiment, the CPU 102 generates information for each area as the determination information, indicating whether the area is "text or graphic" or "photograph or gradation."

本実施形態では、このように画像データに含まれるコンテンツを解析することで、「文字またはグラフィック」に対しては色縮退補正を実施し、「写真またはグラデーション」に対しては色縮退補正を実施しない、という制御が可能になる。つまり、画像データに対して一律に色縮退補正を実施せず、色縮退補正を実施することが好適であるコンテンツに対してのみ色縮退補正を実施する構成を取る。こうした構成により、色縮退補正を一律に実施することにより生じる画像弊害を低減することができる。 In this embodiment, by analyzing the content contained in the image data in this way, it becomes possible to perform control such that color reduction correction is performed on "text or graphics" but not on "photos or gradations." In other words, a configuration is adopted in which color reduction correction is not performed uniformly on image data, but only on content for which it is appropriate to perform color reduction correction. With this configuration, it is possible to reduce image damage caused by uniformly performing color reduction correction.

図5(a)~図5(c)に解析処理の一例を示す。図5(a)に示す画像データは、S104の領域設定の実施結果として、「い」という文字が1つの領域400と設定された状態を示している。一方で図5(b)に示す画像データはS104の領域設定の実施結果として、円形グラデーションが1つの領域401として設定された状態を示している。領域400、401は文字や円形グラデーションを囲うような矩形として設定されているが、S104において一例として説明した手法を用いると、結果として、白画素との境界で分かれることになる。ここでは、説明上、S104で領域設定を実施した結果に対して、領域の最も上に位置する画素、下に位置する画素のY座標、領域の最も右に位置する画素、左に位置する画素のX座標に基づき矩形領域を設定するものとする。 An example of the analysis process is shown in Fig. 5(a) to Fig. 5(c). The image data shown in Fig. 5(a) shows a state in which the character "I" is set as one area 400 as a result of the area setting in S104. On the other hand, the image data shown in Fig. 5(b) shows a state in which a circular gradation is set as one area 401 as a result of the area setting in S104. Areas 400 and 401 are set as rectangles that surround the character and circular gradation, but if the method described as an example in S104 is used, the result will be that they are separated by a boundary with white pixels. For the sake of explanation, a rectangular area is set based on the Y coordinates of the pixel located at the top and the pixel located at the bottom of the area, and the X coordinates of the pixel located at the rightmost and the pixel located at the left of the area, based on the result of the area setting in S104.

S105では、CPU102は、所定の面積を持つエッジ検出エリア402、403を用いて、網枠領域内のエッジの有無を判定する。エッジの有無に関しては、様々な手法が存在するが、ここでは一例として「同画素」「類似画素」「異画素」を使った手法を用いる。図5(c)で示すように、画素値の範囲THa~THb内に含まれる画素を同画素、THc~THd内に含まれる画素を類似画素、それ以外の画素を異画素に分類する。ここでTHと比較する値としてRGB情報でもYCbCr情報でも、もしくはどれか1チャネル(CH)の情報を用いるのでも良く、また、CH数・種類に制限はない。THa~THdの値は色情報ごとに変えてもよく、例えばRGBすべてに異なる閾値を設けても良い。エッジ検出エリア402、403の中の全画素を中央の画素とそれぞれ比較する事で、エッジ検出エリア402、403の中には同画素、類似画素、異画素がそれぞれ幾つ含まれているかが分かる。エッジ検出エリア402、403は、領域400、401の全域を走査していき、同画素、類似画素、異画素の数を累積したヒストグラムを作成する。エッジ検出エリア402の中央画素が領域400内全域を走査する必要があるため、検出エリア402の端部が領域400の外となる範囲も走査対象となり得る。エッジ検出エリア403の端部も同様に、領域401の外となる範囲も走査対象となり得る。 In S105, the CPU 102 uses edge detection areas 402 and 403 having a predetermined area to determine whether an edge exists within the mesh frame area. There are various methods for determining whether an edge exists, but here, as an example, a method using "same pixel", "similar pixel", and "different pixel" is used. As shown in FIG. 5(c), pixels included in the pixel value range THa to THb are classified as same pixels, pixels included in the range THc to THd are classified as similar pixels, and other pixels are classified as different pixels. Here, the value to be compared with TH may be RGB information or YCbCr information, or information of any one channel (CH), and there is no limit to the number and type of CH. The values of THa to THd may be changed for each color information, and for example, different threshold values may be set for all RGB. By comparing all pixels in the edge detection areas 402 and 403 with the central pixel, it is possible to know how many same pixels, similar pixels, and different pixels are included in the edge detection areas 402 and 403. Edge detection areas 402 and 403 scan the entire regions 400 and 401, and a histogram is created that accumulates the number of identical pixels, similar pixels, and different pixels. Because the central pixel of edge detection area 402 needs to scan the entire region 400, the range where the edge of detection area 402 is outside region 400 can also be scanned. Similarly, the edge of edge detection area 403 can also be scanned in a range outside region 401.

ヒストグラム404は図5(a)に対応し、ヒストグラム405は図5(b)に対応している。従って、図5(a)の「い」は同画素、異画素が多く、類似画素が少ないことが分かる。また、図5(b)の円形グラデーションは比較して類似画素が多いことが分かる。 Histogram 404 corresponds to FIG. 5(a), and histogram 405 corresponds to FIG. 5(b). Therefore, it can be seen that "i" in FIG. 5(a) has many identical pixels and different pixels, but few similar pixels. It can also be seen that the circular gradation in FIG. 5(b) has a comparatively large number of similar pixels.

ヒストグラムの結果となる度数分布により領域が「文字またはグラフィック」「写真またはグラデーション」のどちらに該当するかが分類可能である。類似画素が低い場合に「文字またはグラフィック」であると判断できることから、同画素、類似画素、異画素に対する閾値を設定することで分類する。例えば、CPU102は、式(4)のような条件に合致するか否かに基づいて、領域が「文字またはグラフィック」であることを判断する。 The frequency distribution resulting from the histogram makes it possible to classify an area as either "text or graphics" or "photography or gradation." Since it can be determined that an area is "text or graphics" when the number of similar pixels is low, classification is performed by setting thresholds for same pixels, similar pixels, and different pixels. For example, the CPU 102 determines that an area is "text or graphics" based on whether it meets the conditions in equation (4).

同画素数 > TH_same && 類似画素数 < TH_near && 異画素数 > TH_other ・・・(4)
本解析処理は一例であり、手法は上記に限定されない。例えば、判定結果からなる画素数を領域の面積比率に変換した上で式(4)を用いて比べても良い。また、本実施形態では、エッジ検出エリア402、403を用いたエッジ検出を判定に用いたが、領域内の色分布に基づいて判定しても良い。ここで、閾値を適切に設定するように構成しても良い。そのような構成については、第6実施形態以降で説明する。
Number of same pixels>TH_same && Number of similar pixels<TH_near && Number of different pixels>TH_other ... (4)
This analysis process is an example, and the method is not limited to the above. For example, the number of pixels resulting from the judgment result may be converted into the area ratio of the region and then compared using formula (4). In addition, in this embodiment, edge detection using the edge detection areas 402 and 403 is used for judgment, but judgment may also be based on color distribution within the region. Here, a configuration may be adopted in which a threshold value is appropriately set. Such a configuration will be described in the sixth embodiment and onwards.

S106において、CPU102は、領域ごとに色縮退補正が必要か否かの判断処理を実施する。この判断には、S105で判断した「文字またはグラフィック」もしくは「写真またはグラデーション」の情報を用いる。本実施形態では、「文字またはグラフィック」領域である場合、色縮退補正が必要であると判断し、S107に遷移する。一方、「写真またはグラデーション」領域である場合、色縮退補正が不要であると判断し、S109に遷移する。 In S106, the CPU 102 performs a process of determining whether or not color degeneration correction is necessary for each area. For this determination, the information on "text or graphics" or "photograph or gradation" determined in S105 is used. In this embodiment, if the area is a "text or graphics" area, it is determined that color degeneration correction is necessary, and the process transitions to S107. On the other hand, if the area is a "photograph or gradation" area, it is determined that color degeneration correction is not necessary, and the process transitions to S109.

S107において、CPU102は、S101で入力された画像データと、S102で取得したガマットマッピングテーブル、S103で行ったガマットマッピング後の画像データとを用いて、色縮退補正後テーブルを作成する。色縮退補正後テーブルはS104において分けられた各領域で作成する。なお、色縮退補正後テーブルはガマットマッピングテーブルの形式と同様である。 In S107, the CPU 102 creates a table after color degeneration correction using the image data input in S101, the gamut mapping table acquired in S102, and the image data after gamut mapping performed in S103. The table after color degeneration correction is created for each area divided in S104. The table after color degeneration correction has the same format as the gamut mapping table.

S108において、CPU102は、S107で作成された色縮退補正後テーブルを用いてS101で入力された画像データの対応する領域の領域データに演算することで、色縮退補正後の領域データを生成する。生成された色縮退補正後の領域データは、RAM103または記憶媒体104に記憶される。S109において、CPU102は、領域データについてS103におけるガマットマッピング後の結果を、RAM103または記憶媒体104に記憶する。 In S108, the CPU 102 generates area data after color degeneration correction by performing calculations on the area data of the corresponding area of the image data input in S101 using the table after color degeneration correction created in S107. The generated area data after color degeneration correction is stored in the RAM 103 or the storage medium 104. In S109, the CPU 102 stores the results of the gamut mapping in S103 for the area data in the RAM 103 or the storage medium 104.

「写真またはグラデーション」であると判断された領域データについては、ガマットマッピングテーブルを「写真またはグラデーション」向けのものに切り替えても良い。「文字またはグラフィック」に対しては色味の差を強調するようなテーブルを適用し、「写真またはグラデーション」に対しては色味の連続性を重視したテーブルを適用することで各コンテンツの特徴を活かした色変換を実施することができる。また色味の連続性を保つ上では「写真またはグラデーション」領域に対してはガマットマッピングテーブルを適用しないようにしても良い。一部のコンテンツに対してガマットマッピングテーブルを非適用とすることでメモリ容量削減の効果が得られる。同様に、コンテンツに応じてガマットマッピングテーブルのテーブル長を変えることや、テーブルではなく一意な変換係数といった簡易な構成に置き換えても良く、同様にメモリ容量削減の効果が得られる。 For area data determined to be "photo or gradation", the gamut mapping table may be switched to one for "photo or gradation". By applying a table that emphasizes color differences to "text or graphics" and a table that emphasizes color continuity to "photo or gradation", color conversion can be performed that makes the most of the characteristics of each content. Also, to maintain color continuity, the gamut mapping table may not be applied to "photo or gradation" areas. By not applying the gamut mapping table to some content, the effect of reducing memory capacity can be achieved. Similarly, the table length of the gamut mapping table may be changed depending on the content, or a simple configuration such as a unique conversion coefficient instead of a table may be replaced, with the same effect of reducing memory capacity.

S110において、CPU102は、画像データの全領域について処理済みであるか否かを判定する。全領域について処理済みであると判定された場合、S111に遷移し、全領域について処理済みでないと判定された場合、S105からの処理を繰り返す。 In S110, the CPU 102 determines whether or not the entire area of the image data has been processed. If it is determined that the entire area has been processed, the process proceeds to S111, and if it is determined that the entire area has not been processed, the process repeats from S105.

S111において、CPU102は、S108で記憶された色縮退補正後の領域データ、もしくはS109で記憶されたガマットマッピング後の結果をデータ転送I/F106を介して画像処理装置101から出力する。ガマットマッピングは、sRGB色空間から記録装置108の色再現色域へのマッピングであっても良い。この場合、記録装置108の色再現色域内へのガマットマッピングによる彩度と色差の低下を抑制することができる。 In S111, the CPU 102 outputs the area data after color degeneration correction stored in S108, or the result after gamut mapping stored in S109, from the image processing device 101 via the data transfer I/F 106. The gamut mapping may be mapping from the sRGB color space to the color reproduction gamut of the recording device 108. In this case, it is possible to suppress the reduction in saturation and color difference due to gamut mapping into the color reproduction gamut of the recording device 108.

S107の色縮退補正後テーブルの作成について、図6を用いて詳細に説明する。図6の処理は、例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図6の処理は、画像処理アクセラレータ105により実行されても良い。 The creation of the table after color degeneration correction in S107 will be described in detail with reference to FIG. 6. The process in FIG. 6 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. The process in FIG. 6 may also be executed by the image processing accelerator 105.

S301においてCPU102は、各領域に存在するユニークな色を検出する。本実施形態において「ユニーク色」の用語は、画像データで使用されている色を表すものとする。例えば、白地で黒字のテキストデータであれば、ユニーク色は、白と黒である。また、例えば、写真等の画像であれば、ユニーク色は、その写真で使用されている色である。CPU102は、検出結果をRAM103または記憶媒体104にユニーク色リストとして記憶する。ユニーク色リストはS201の開始時に初期化されている。CPU102は、検出処理を画像データの画素ごとに繰り返し、対象オブジェクトに含まれる全ての画素について、各画素の色が、それまでに検出されたユニーク色と異なる色であるか否かを判定する。ユニーク色であると判定した場合には、当該色をユニーク色リストにユニーク色として記憶する。 In S301, the CPU 102 detects unique colors present in each region. In this embodiment, the term "unique colors" refers to colors used in the image data. For example, for text data with black characters on a white background, the unique colors are white and black. Also, for an image such as a photograph, the unique colors are the colors used in the photograph. The CPU 102 stores the detection results as a unique color list in the RAM 103 or the storage medium 104. The unique color list is initialized at the start of S201. The CPU 102 repeats the detection process for each pixel of the image data, and determines whether the color of each pixel is different from the unique colors detected so far for all pixels included in the target object. If it is determined that the color is unique, the color is stored as a unique color in the unique color list.

判断方法としては、対象画素の色がそれまでに作成されているユニーク色リストに含まれている色であるか否かを判定し、含まれていないと判定した場合、ユニーク色リストへ色情報を新たに追加することでも良い。こうすることで、領域に含まれるユニーク色リストを検出することができる。例えば、入力画像データがsRGBデータであった場合、それぞれ256階調を持つため、256×256×256の合計16,777,216色のユニーク色が検出される。この場合、色数が膨大になり、処理速度が低下する。そのため、離散的にユニーク色を検出しても良い。例えば、256階調を16階調に減色してからユニーク色を検出しても良い。減色する場合、最も近いグリッドの色に減色してもよい。このように、16×16×16の合計4,096色のユニーク色を検出することができ、処理速度を向上させることができる。 As a method of judgment, it may be possible to judge whether the color of the target pixel is included in the unique color list created up to that point, and if it is judged that the color is not included, to add new color information to the unique color list. In this way, it is possible to detect the unique color list included in the area. For example, if the input image data is sRGB data, each has 256 gradations, so a total of 16,777,216 unique colors of 256 x 256 x 256 are detected. In this case, the number of colors becomes enormous, and the processing speed decreases. Therefore, it is possible to detect unique colors discretely. For example, it is possible to reduce the 256 gradations to 16 gradations and then detect unique colors. When reducing the number of colors, it is possible to reduce the number of colors to the color of the nearest grid. In this way, it is possible to detect a total of 4,096 unique colors of 16 x 16 x 16, and the processing speed can be improved.

S302において、CPU102は、S301で検出されたユニーク色リストに基づいて、領域に存在するユニーク色の組み合わせの中で、色縮退している色の組み合わせ数を検出する。図7は、色縮退を説明するための図である。色域601は、入力画像データの色域である。色域602はS103におけるガマットマッピング後の色域である。言い換えれば、色域602は、デバイスの色域に相当する。色603と色604は、入力画像データ内に含まれる。色605は、色603に対してガマットマッピングを行ったときの色である。色606は、色604に対してガマットマッピングを行ったときの色である。色605と色606の色差608が、色603と色604の色差607に比べ、小さい場合に色縮退していると判定される。CPU102は、その判定処理をユニーク色リストの色の組み合わせ数分繰り返す。色差の算出方法としては、色空間におけるユークリッド距離を用いる。本実施形態では、好適な例としてCIE-L*a*b*色空間におけるユークリッド距離(以降、色差ΔEと記載)を用いて説明する。CIE-L*a*b*色空間は視覚均等な色空間であるため、ユークリッド距離を色の変化量と近似することができる。そのため、人はCIE-L*a*b*色空間上のユークリッド距離が小さくなると色が近づいていると知覚し、大きくなると色が離れていると知覚する。入力データがCIE-L*a*b*データでない場合は、色空間変換が行われる。その際の色空間変換は、既知の処理が用いられても良い。CIE-L*a*b*色空間における色情報はそれぞれL*とa*とb*の3軸の色空間で表される。例えば、色603は、L603、a603、b603で表される。色604は、L604、a604、b604で表される。色605は、L605、a605、b605で表される。色606は、L606、a606、b606で表される。入力画像データが他の色空間で表されている場合、既知の方法を用いてCIE-L*a*b*色空間に変換される。色差ΔE607と色差ΔE608の算出式は、以下の式(5)、(6)により算出される。

Figure 2024088570000002
CPU102は、色差ΔE608が色差ΔE607に比べ、小さい場合、色縮退していると判定する。さらに、CPU102は、色差ΔE608が色差を識別できるだけの大きさが無かった場合、色縮退していると判定する。これは、色605と色606が、人の視覚特性に基づき、異なる色だと識別できる程度の色差があれば、色差を補正する必要が無いからである。視覚特性上、異なる色だと識別できる色差ΔEとしては、2.0が用いられても良い。つまり、色差ΔE608が色差ΔE607に比べ小さい場合で且つ色差ΔE608が2.0より小さい場合に色縮退していると判定するようにしても良い。 In S302, the CPU 102 detects the number of color combinations that are color degenerate among the combinations of unique colors present in the region based on the unique color list detected in S301. FIG. 7 is a diagram for explaining color degeneration. A color gamut 601 is the color gamut of the input image data. A color gamut 602 is the color gamut after gamut mapping in S103. In other words, the color gamut 602 corresponds to the color gamut of the device. A color 603 and a color 604 are included in the input image data. A color 605 is the color when gamut mapping is performed on the color 603. A color 606 is the color when gamut mapping is performed on the color 604. If a color difference 608 between the color 605 and the color 606 is smaller than a color difference 607 between the color 603 and the color 604, it is determined that color degeneration occurs. The CPU 102 repeats this determination process for the number of color combinations in the unique color list. A Euclidean distance in a color space is used as a method for calculating the color difference. In this embodiment, the Euclidean distance (hereinafter, referred to as color difference ΔE) in the CIE-L*a*b* color space is used as a suitable example for explanation. Since the CIE-L*a*b* color space is a visually uniform color space, the Euclidean distance can be approximated as the amount of color change. Therefore, when the Euclidean distance in the CIE-L*a*b* color space is small, humans perceive the colors as being closer to each other, and when the Euclidean distance is large, humans perceive the colors as being farther apart. If the input data is not CIE-L*a*b* data, color space conversion is performed. For the color space conversion at that time, a known process may be used. The color information in the CIE-L*a*b* color space is represented by a color space with three axes, L*, a*, and b*. For example, color 603 is represented by L603, a603, and b603. Color 604 is represented by L604, a604, and b604. Color 605 is represented by L605, a605, and b605. The color 606 is represented by L 606, a 606, and b 606. If the input image data is represented in another color space, it is converted to the CIE-L*a*b* color space using a known method. The color difference ΔE 607 and the color difference ΔE 608 are calculated by the following equations (5) and (6).

Figure 2024088570000002
The CPU 102 determines that color degeneration has occurred when the color difference ΔE 608 is smaller than the color difference ΔE 607. Furthermore, the CPU 102 determines that color degeneration has occurred when the color difference ΔE 608 is not large enough to distinguish the color difference. This is because if the color 605 and the color 606 have a color difference that allows them to be distinguished as different colors based on human visual characteristics, there is no need to correct the color difference. A color difference ΔE of 2.0 may be used as a color difference that allows the colors to be distinguished as different colors based on visual characteristics. In other words, it may be determined that color degeneration has occurred when the color difference ΔE 608 is smaller than the color difference ΔE 607 and is smaller than 2.0.

S303においてCPU102は、S302で色縮退していると判定された色の組み合わせ数がゼロであるか否かを判定する。色縮退していると判定された色の組み合わせ数がゼロである、即ち色差ありと判定された場合、S304に進み、CPU102は、色縮退補正が不要な領域であると判断し、図5の処理を終了し、S108に進む。一方、S303で色縮退していると判定された色の組み合わせ数がゼロでない、即ち色差なしと判定された場合、S305に進み、色縮退補正(色差補正)を行う。 In S303, the CPU 102 determines whether the number of color combinations determined to be color degenerate in S302 is zero. If the number of color combinations determined to be color degenerate is zero, i.e., it is determined that there is a color difference, the process proceeds to S304, where the CPU 102 determines that this is an area in which color degeneracy correction is not required, terminates the processing of FIG. 5, and proceeds to S108. On the other hand, if the number of color combinations determined to be color degenerate in S303 is not zero, i.e., it is determined that there is no color difference, the process proceeds to S305, where color degeneracy correction (color difference correction) is performed.

色縮退補正は色が変化することになるため、色縮退していない色の組み合わせに対しても色変化してしまい、不要な色変化となる。そのため、ユニーク色の組み合わせの総数と色縮退している色の組み合わせ数とに基づく割合等を、色縮退補正の必要性を判定する条件としても良い。具体的には、色縮退している色の組み合わせ数が、ユニーク色の組み合わせの総数の過半数の場合に色縮退補正を必要であると判定しても良い。こうすることにより、過剰な色縮退補正による色変化を抑制することができる。 Because color degeneracy correction results in color changes, it also changes the colors of color combinations that are not color degenerate, resulting in unnecessary color changes. For this reason, a ratio based on the total number of unique color combinations and the number of color combinations that are color degenerate may be used as a condition for determining the need for color degeneracy correction. Specifically, it may be determined that color degeneracy correction is necessary when the number of color combinations that are color degenerate is more than half of the total number of unique color combinations. In this way, color changes caused by excessive color degeneracy correction can be suppressed.

S305において、CPU102は、入力画像データとガマットマッピング後の画像データとガマットマッピングテーブルに基づいて、色縮退する色の組み合わせに対して色縮退補正を行う。 In S305, the CPU 102 performs color reduction correction for the color combinations that are subject to color reduction based on the input image data, the image data after gamut mapping, and the gamut mapping table.

色縮退補正を図7を用いて詳細に説明する。色603と色604は、入力画像データに含まれる入力色である。色605は、色603をガマットマッピングによる色変換した後の色である。色606は、色604をガマットマッピングによる色変換した後の色である。図7において、色603と色604の色の組み合わせは、色縮退していることを表している。そこで、色605と色606を所定の色空間上の色間距離を引き離すことによって、色縮退を補正することができる。具体的には、色605と色606が、人の視覚特性に基づいて異なる色だと識別できる色間距離以上に、色間距離を大きくする補正処理を行う。視覚特性上、異なる色だと識別できる色間距離は、色差ΔEが、2.0以上である。より好適には色605と色606の色差が、色差ΔE607と同程度であることが望ましい。CPU102は、色縮退の補正処理を、色縮退する色の組み合わせ数分、繰り返す。色の組み合わせ数分の色縮退補正の結果は、補正前の色情報と補正後の色情報をテーブルで保持する。図7においては、色情報はCIE-L*a*b*色空間における色情報である。そのため、入力画像データと出力時の画像データの色空間に変換しても良い。その場合、入力画像データの色空間での補正前の色情報と、出力画像データの色空間での補正後の色情報をテーブルで保持する。 The color degeneracy correction will be explained in detail with reference to FIG. 7. Color 603 and color 604 are input colors included in the input image data. Color 605 is the color after color 603 is color converted by gamut mapping. Color 606 is the color after color 604 is color converted by gamut mapping. In FIG. 7, the combination of colors 603 and 604 indicates that the colors are degenerated. Therefore, color degeneracy can be corrected by separating colors 605 and 606 from each other by the color distance in a predetermined color space. Specifically, a correction process is performed to increase the color distance between colors 605 and 606 beyond the color distance at which colors 605 and 606 can be identified as different colors based on human visual characteristics. The color difference ΔE is 2.0 or more for the color distance at which colors can be identified as different colors based on visual characteristics. More preferably, the color difference between colors 605 and 606 is about the same as color difference ΔE607. The CPU 102 repeats the color degeneration correction process for the number of color combinations that will be color degenerated. The results of color degeneration correction for the number of color combinations are stored in a table, with color information before and after correction. In FIG. 7, the color information is color information in the CIE-L*a*b* color space. Therefore, the input image data and the color space of the image data at the time of output may be converted. In that case, the color information before correction in the color space of the input image data and the color information after correction in the color space of the output image data are stored in a table.

次に、色縮退補正の処理について詳細に説明する。色差ΔE608から色差ΔEを広げる色差補正量609を求める。視覚特性上、異なる色だと認識できる色差ΔEである2.0と色差ΔE608との差分が色差補正量609である。より好適には、色差ΔE607と色差ΔE608の差分が色差補正量609である。色606から色605のCIE-L*a*b*色空間における延長線上に、色605を色差補正量609だけ補正した結果が、色610である。色610は、色606から色差ΔE608と色差補正量609を合わせた色差分離れている。上記では色606から色605の延長線上であったが、本実施形態では、これに限るものではない。色606と色610の色差ΔEが、色差ΔE608と色差補正量609を合わせた色差分離れているのであれば、CIE-L*a*b*色空間における、明度方向、彩度方向、色相角方向のどの方向であっても良い。また、一方向だけでなく、明度方向、彩度方向、色相角方向のそれぞれの組み合わせであっても良い。さらに、上記では色605を変更することで、色縮退を補正したが、色606を変更しても良い。また、色605と色606の両方を変更しても良い。色606を変更する場合、色域602の外側に変更することができないため、色606は色域602の境界面上を移動させて変更する。その場合、不足した色差ΔE分については、色605を変更することによって色縮退補正を行っても良い。 Next, the color degeneration correction process will be described in detail. A color difference correction amount 609 that widens the color difference ΔE is obtained from the color difference ΔE 608. The difference between the color difference ΔE of 2.0, which is a color difference that can be recognized as a different color in terms of visual characteristics, and the color difference ΔE 608 is the color difference correction amount 609. More preferably, the difference between the color difference ΔE 607 and the color difference ΔE 608 is the color difference correction amount 609. The result of correcting the color 605 by the color difference correction amount 609 on the extension line in the CIE-L*a*b* color space from the color 606 to the color 605 is the color 610. The color 610 is separated from the color 606 by the color difference ΔE 608 and the color difference correction amount 609. In the above, it was on the extension line from the color 606 to the color 605, but this is not limited to this in this embodiment. As long as the color difference ΔE between the color 606 and the color 610 is a color difference separation that is a combination of the color difference ΔE 608 and the color difference correction amount 609, the color difference ΔE may be in any direction of the lightness direction, the saturation direction, or the hue angle direction in the CIE-L*a*b* color space. Also, the color difference ΔE may be in one direction or a combination of the lightness direction, the saturation direction, and the hue angle direction. Furthermore, in the above, the color degeneration is corrected by changing the color 605, but the color 606 may also be changed. Also, both the color 605 and the color 606 may be changed. When changing the color 606, since it cannot be changed to the outside of the color gamut 602, the color 606 is changed by moving it on the boundary surface of the color gamut 602. In that case, the color degeneration correction may be performed by changing the color 605 for the insufficient color difference ΔE.

S306において、CPU102は、S305の色縮退補正の結果を用いてガマットマッピングテーブルを変更する。変更前のガマットマッピングテーブルは、入力色である色603を出力色である色605へ変換するテーブルである。S305の結果により、入力色である色603の出力色が色610へ変換するテーブルに変更される。このように、色縮退補正後テーブルを作成することができる。CPU102は、ガマットマッピングテーブルの変更を、色縮退する色の組み合わせ数分、繰り返す。 In S306, the CPU 102 changes the gamut mapping table using the result of the color degeneration correction in S305. The gamut mapping table before the change is a table that converts the input color 603 to the output color 605. As a result of S305, the table is changed to one that converts the output color of the input color 603 to color 610. In this way, a table after color degeneration correction can be created. The CPU 102 repeats the change of the gamut mapping table for the number of color combinations that are color degenerated.

以上のように、色縮退補正後のガマットマッピングテーブルを入力画像データの適用対象の領域に適用することで、領域が有するユニーク色の組み合わせのうち色縮退する色の組み合わせに対して、色間の距離を大きくする補正を行うことができる。その結果、色縮退する色の組み合わせに対して、色縮退を効率的に低減することができる。例えば、入力画像データがsRGBデータであった場合、ガマットマッピングテーブルが、入力画像データが16,777,216色を有することを前提として作成されているとする。この前提のもとに作られたガマットマッピングテーブルは、実際には入力画像データが有さない色に対してまで、色縮退や彩度を考慮して作成されている。本実施形態では、領域データが有する色を検出することにより、領域データに対して適応的にガマットマッピングテーブルを補正することができる。そして、領域データが有する色を対象としたガマットマッピングテーブルを作成することができる。この結果、領域データに対して好適な適応的ガマットマッピングを行うことができるため、色縮退を効率的に低減することができる。 As described above, by applying the gamut mapping table after color degeneration correction to the region to which the input image data is applied, a correction can be performed to increase the distance between colors for color combinations that are color degenerate among the unique color combinations that the region has. As a result, color degeneration can be efficiently reduced for color combinations that are color degenerate. For example, when the input image data is sRGB data, the gamut mapping table is created on the premise that the input image data has 16,777,216 colors. The gamut mapping table created under this premise is created taking into account color degeneration and saturation even for colors that are not actually included in the input image data. In this embodiment, the gamut mapping table can be adaptively corrected for the region data by detecting the colors that the region data has. Then, a gamut mapping table can be created that targets the colors that the region data has. As a result, suitable adaptive gamut mapping can be performed for the region data, so that color degeneration can be efficiently reduced.

本実施形態では、入力画像データについて領域を設定し、設定した各領域に対して解析を行った。そして、解析結果を用いて色縮退補正を実施するか否かを判定し、色縮退補正を実施すると判定された場合、色縮退補正を実施した。色縮退補正を実施することの目的は、ガマットマッピングによる色縮退を低減することである。文字やグラフィックといった情報は、色ではなく記載される内容(文字の意味やグラフィックの形)に重要性を持っている。従って、色間の距離が小さくなることで印刷後にユーザが文字やグラフィックの形状を認識できないことは内容の可視性および可読性低下につながる。そのため、文字やグラフィックの場合には色縮退補正を実施する。一方で、写真やグラデーションといった情報は、色自体に重要性を持っていることが多い。例えば、人物写真において、人物の肌の色と背景の壁の色の色空間上の色間距離が近いからといって、肌を別の色に補正することはユーザにとって望ましくない。グラデーションは連続的な階調を刻んでいること自体にデザイン性という意味を持たせているが、連続階調の色空間上の色間距離を補正してグラデーションに段差を発生させることは、デザイン性が損なわれ、ユーザにとって望ましくない。本実施形態における領域解析および色縮退補正の判定処理は、こうしたユーザから入力される画像データの特徴から、ユーザの意図(データの意味)を判定することを目的としている。本実施形態によれば、色縮退補正の判定結果に応じて、領域ごとに適切なガマットマッピングを行使することが可能となる。 In this embodiment, regions were set for the input image data, and each of the set regions was analyzed. Then, using the analysis results, it was determined whether or not to perform color degeneracy correction, and if it was determined that color degeneracy correction should be performed, color degeneracy correction was performed. The purpose of performing color degeneracy correction is to reduce color degeneracy due to gamut mapping. Information such as characters and graphics is important not in color but in the content (the meaning of the characters and the shape of the graphics). Therefore, if the distance between colors becomes small and the user cannot recognize the shape of the characters or graphics after printing, this leads to a decrease in the visibility and readability of the content. Therefore, color degeneracy correction is performed in the case of characters and graphics. On the other hand, information such as photographs and gradations often has importance in the color itself. For example, in a portrait, just because the color distance between the person's skin color and the color of the background wall in the color space is close, it is not desirable for the user to correct the skin to a different color. The gradation has a design meaning in itself because it has continuous gradations, but correcting the color distance in the color space of the continuous gradation to create a step in the gradation impairs the design and is not desirable for the user. The purpose of the region analysis and color degeneration correction judgment process in this embodiment is to determine the user's intention (the meaning of the data) from the characteristics of the image data entered by the user. According to this embodiment, it is possible to apply appropriate gamut mapping for each region depending on the judgment result of the color degeneration correction.

本実施形態では、入力画像データが1ページであった場合の処理を述べた。入力画像データは、複数ページであっても良い。入力画像データが複数ページであった場合、図2の処理フローを全ページに渡って行っても良いし、図2の処理をページ毎に行っても良い。このように、入力画像データが複数ページであった場合でも、ガマットマッピングによる色縮退の度合いを低減することできる。 In this embodiment, the processing has been described for the case where the input image data is one page. The input image data may be multiple pages. When the input image data is multiple pages, the processing flow in FIG. 2 may be performed across all pages, or the processing in FIG. 2 may be performed for each page. In this way, even when the input image data is multiple pages, the degree of color degeneracy due to gamut mapping can be reduced.

また、本実施形態では、入力画像データから複数領域を設定したが、色縮退補正の実施可否の判定は画像全域で実施しても良い。この場合、領域を複数設定するのではなく、画像全域単位で「文字またはグラフィック」か「写真またはグラデーション」かの判定を行う。 In addition, in this embodiment, multiple regions are set from the input image data, but the decision on whether to perform color degeneration correction may be made for the entire image. In this case, instead of setting multiple regions, the decision on whether to perform "text or graphics" or "photograph or gradation" is made for the entire image.

本実施形態において「文字またはグラフィック」か「写真またはグラデーション」の2つの種別を分類したが、分類内容はそれに限られない。例えば、入力画像におけるグレーライン(白から黒にかけてのグレー軸上の画素値)や黒点、白点は、色縮退補正によってグレーラインから外れてはならないため、それらについては、色縮退補正を実施しないとしても良い。例えば、プリンタは入力のグレーライン部をKインクのみで吐出することがあり、グレーラインから外れることによりインクの使い方の制御を変えてしまうことがあるからである。であるので、グレーライン情報を解析した結果を用いて、色縮退補正の実施可否を判定しても良い。 In this embodiment, the two types of classification are "text or graphics" and "photograph or gradation", but the classification is not limited to this. For example, gray lines (pixel values on the gray axis from white to black), black points, and white points in the input image must not deviate from the gray line through color degeneracy correction, so color degeneracy correction may not be performed on them. For example, a printer may eject only K ink on the input gray line portion, and deviation from the gray line may change the control of ink usage. Therefore, the results of analyzing the gray line information may be used to determine whether or not to perform color degeneracy correction.

本実施形態では、色縮退補正後のガマットマッピングテーブルを入力画像に適用したが、ガマットマッピング後の画像データに対して、色縮退補正を行う補正テーブルを作成しても良い。その場合、S305における色縮退補正結果に基づいて、補正前の色情報から補正後の色情報へ変換する補正テーブルを生成しても良い。生成された補正テーブルは、図7における色605から色610へ変換するテーブルである。S108において、CPU102は、ガマットマッピング後の画像データに対して生成された補正テーブルを適用する。このように、ガマットマッピング後の画像データを補正することで、ガマットマッピングによる色縮退の度合いを低減することができる。また、色縮退補正が反映されたガマットマッピングテーブルを入力画像の領域ごとに適用した後、画像全体に対して一意のガマットマッピングテーブルを適用して出力ガマットとしても良い。例えば全体的な色調整等は本実施形態の処理後に実施しても良い。その場合には色縮退補正における色間距離の評価や色縮退補正量・方向については、色縮退補正後にガマットマッピングテーブルが適用されることが考慮される。 In this embodiment, the gamut mapping table after the color degeneration correction is applied to the input image, but a correction table for performing color degeneration correction on the image data after gamut mapping may be created. In that case, a correction table for converting the color information before correction to the color information after correction may be generated based on the color degeneration correction result in S305. The generated correction table is a table for converting the color 605 to the color 610 in FIG. 7. In S108, the CPU 102 applies the generated correction table to the image data after gamut mapping. In this way, by correcting the image data after gamut mapping, the degree of color degeneration due to gamut mapping can be reduced. In addition, after applying the gamut mapping table reflecting the color degeneration correction to each region of the input image, a unique gamut mapping table may be applied to the entire image to set the output gamut. For example, overall color adjustment, etc. may be performed after the processing of this embodiment. In that case, the evaluation of the color distance in the color degeneration correction and the amount and direction of color degeneration correction take into account that the gamut mapping table is applied after the color degeneration correction.

本実施形態において、色縮退補正処理を実行するか否かの指示をユーザから入力可能としても良い。その場合、画像処理装置101または記録装置108に搭載されている表示部(不図示)に、図17に示すUI画面を表示して、ユーザ指示を受付可能なようにしても良い。図17に示すUI画面においては、ユーザに対して、色補正の種類をトグルボタンによって選択させることが可能である。さらには、本実施形態で説明した処理を示す「適応的ガマットマッピング」を実行するか否かのONとOFFをトグルボタンによって選択させることが可能である。このような構成により、ユーザの指示に従って、適応的ガマットマッピングを実行するか否かを切り換えることが可能である。結果、ユーザが色縮退の度合いを低減させたいときに、本実施形態で説明したガマットマッピングを実行することができる。 In this embodiment, the user may be able to input an instruction as to whether or not to perform color degeneracy correction processing. In that case, the UI screen shown in FIG. 17 may be displayed on a display unit (not shown) mounted on the image processing device 101 or the recording device 108 to accept user instructions. In the UI screen shown in FIG. 17, the user can select the type of color correction using a toggle button. Furthermore, it is possible to select ON/OFF using a toggle button whether or not to perform "adaptive gamut mapping", which indicates the processing described in this embodiment. With this configuration, it is possible to switch whether or not to perform adaptive gamut mapping according to a user instruction. As a result, when the user wants to reduce the degree of color degeneracy, the gamut mapping described in this embodiment can be performed.

[第2実施形態]
以下、第1実施形態と異なる点について第2実施形態を説明する。第1実施形態では、S305において単色について色縮退補正を行うことを説明した。そのため、入力画像データが有する色の組み合わせによっては、色縮退の度合いは低減するものの、色味の変化が起こり得る。具体的には、色相角が異なる二つの色に対して、色縮退補正を行う場合、色相角の変化によって色を変化させてしまうと、入力画像データにおける色の色味と異なってしまう。例えば、青色と紫色の色に、色相角の変化による色縮退補正を行った場合、紫色が赤色に変化してしまう。色味が変化すると、ユーザにインクの吐出不良のような装置弊害を想起させてしまう可能性がある。
[Second embodiment]
The second embodiment will be described below with respect to the differences from the first embodiment. In the first embodiment, the color degeneration correction is performed on a single color in S305. Therefore, depending on the combination of colors in the input image data, although the degree of color degeneration is reduced, a change in color tone may occur. Specifically, when color degeneration correction is performed on two colors with different hue angles, if the color is changed by changing the hue angle, the color tone will differ from that of the color in the input image data. For example, if color degeneration correction is performed on blue and purple by changing the hue angle, the purple will change to red. If the color tone changes, the user may be reminded of a device problem such as poor ink ejection.

また、第1実施形態では、入力画像データが有するユニーク色の組み合わせ数に対して色縮退補正を繰り返すことを説明した。そのため、色間の距離を確実に広げることができる。しかしながら、入力画像データが有するユニーク色の数が多くなった場合、色間の距離を大きくするために色を変化させた結果、変化した先で別のユニーク色に対して色間の距離が小さくなってしまうことが起こり得る。そのため、CPU102は、入力画像データが有するユニーク色の組み合わせの全てにおいて、期待する色間の距離を有するように、S305の色縮退補正を繰り返し実行する必要がある。色間の距離を大きくする処理が膨大な量になるため、処理時間が増大してしまう。 In the first embodiment, the color degeneracy correction is repeated for the number of unique color combinations in the input image data. This ensures that the distance between colors can be increased. However, when the number of unique colors in the input image data increases, changing a color to increase the distance between colors may result in the distance between the colors being smaller than that of another unique color after the change. Therefore, the CPU 102 must repeatedly perform the color degeneracy correction of S305 so that the expected distance between colors is achieved for all unique color combinations in the input image data. This increases the processing time because the amount of processing required to increase the distance between colors is enormous.

そこで、本実施形態では、所定の色相角毎に、複数のユニーク色を一つの色群として同一方向に色縮退補正を行う。複数のユニーク色を一つの色群として補正するために、本実施形態では、色群の中から基準となるユニーク色(後述)を選択する。また、補正方向を明度方向に限定することで色味の変化を抑制することができる。また、複数のユニーク色を一つの色群として明度方向に補正することで、入力画像データが有する色の組み合わせすべてで処理する必要がなくなり、処理時間を削減することができる。 Therefore, in this embodiment, for each specified hue angle, multiple unique colors are treated as one color group and color degeneracy correction is performed in the same direction. In order to correct multiple unique colors as one color group, in this embodiment, a reference unique color (described later) is selected from the color group. Also, by limiting the correction direction to the lightness direction, it is possible to suppress changes in color tone. Also, by correcting multiple unique colors as one color group in the lightness direction, it is no longer necessary to process all color combinations contained in the input image data, and processing time can be reduced.

図13は、本実施形態におけるS302の色縮退判定処理を説明するための図である。図13は、CIE-L*a*b*色空間における、a*軸とb*軸の2軸を平面で表した図である。色相範囲1201は、所定の色相角内の複数のユニーク色を一つの色群とする範囲を表している。図13においては、色相角360度を6等分しているため、色相範囲1201は0度から60度までの範囲を表している。色相範囲は、同一の色として認識できる色相範囲が好ましい。例えば、CIE-L*A*B*色空間における色相角が30度からの60度単位で決定される。60度単位で決定される場合には、レッド、グリーン、ブルー、シアン、マゼンタ、イエローの6色を切り分けることができる。30度単位で決定される場合には、60度単位で切り分けた色と色の間の色でさらに切り分けることができる。色相範囲は、図13のように、固定で決定されても良い。また、入力画像データに含まれるユニーク色によって動的に決定されても良い。 Figure 13 is a diagram for explaining the color degeneracy determination process of S302 in this embodiment. Figure 13 is a diagram showing two axes, the a* axis and the b* axis, in a plane in the CIE-L*a*b* color space. The hue range 1201 represents a range in which multiple unique colors within a specified hue angle are grouped into one color group. In Figure 13, the hue angle of 360 degrees is divided into six equal parts, so the hue range 1201 represents a range from 0 degrees to 60 degrees. The hue range is preferably a hue range that can be recognized as the same color. For example, the hue angle in the CIE-L*A*B* color space is determined in 60-degree increments from 30 degrees. When the hue angle is determined in 60-degree increments, six colors, red, green, blue, cyan, magenta, and yellow, can be separated. When the hue angle is determined in 30-degree increments, the colors can be further separated by colors between the colors separated in 60-degree increments. The hue range may be determined fixedly as in Figure 13. It may also be dynamically determined based on the unique colors contained in the input image data.

CPU102は、色相範囲1201内で、入力画像データが有するユニーク色の組み合わせに対して、第1実施形態と同様に、色縮退している色の組み合わせ数を検出する。図13における、色1204、色1205、色1206、色1207は、入力色を表している。その場合、CPU102は、色1204、色1205、色1206、色1207の4つの色の組み合わせに対して、色縮退しているか否かを判定する。そして、CPU102は、この処理をすべての色相範囲で繰り返す。このようにして、色相範囲毎に色縮退している色の組み合わせ数を検出する。 As in the first embodiment, the CPU 102 detects the number of color combinations that are color degenerate within the hue range 1201 for the unique color combinations in the input image data. In FIG. 13, colors 1204, 1205, 1206, and 1207 represent input colors. In this case, the CPU 102 determines whether or not the four color combinations of colors 1204, 1205, 1206, and 1207 are color degenerate. The CPU 102 then repeats this process for all hue ranges. In this way, the number of color combinations that are color degenerate for each hue range is detected.

図13においては、例えば、色の組み合わせ数が6個検出される。本実施形態では、色相角度が60度ごとに色相範囲が決定されているが、これに限られない。例えば、色相角度が30度ごとに色相範囲が決定されても良いし、等分せずに色相範囲が決定されても良い。好適には、視覚均等となるように色相角度の範囲を色相範囲として決定する。そのような構成により、同一色群内の色が、視覚的に同じ色として知覚されるため、同じ色に対して色縮退補正を行うことができる。さらに、色相範囲毎に隣接した2つの色相範囲を含めた色相範囲で色縮退している色の組み合わせ数の検出を行っても良い。 In FIG. 13, for example, six color combinations are detected. In this embodiment, the hue range is determined for every 60-degree hue angle, but this is not limited to the above. For example, the hue range may be determined for every 30-degree hue angle, or the hue range may be determined without dividing equally. Preferably, the range of hue angles is determined as the hue range so as to be visually uniform. With such a configuration, colors within the same color group are visually perceived as the same color, so that color degeneracy correction can be performed on the same color. Furthermore, for each hue range, the number of color combinations that are color degenerate in a hue range including two adjacent hue ranges may be detected.

図14は、本実施形態におけるS305の色縮退補正処理を説明するための図である。図14は、CIE-L*a*b*色空間におけるL*軸とC*軸の2軸を平面で表した図である。L*は明度、C*は彩度を表している。図14では、色1301、色1302、色1303、色1304は、入力色である。色1301、色1302、色1303、色1304は、図13における色相範囲1201の範囲内に含まれる色を表している。そして、色1305は、色1301をガマットマッピングにより色変換した後の色である。色1306は、色1302をガマットマッピングにより色変換した後の色である。色1307は、色1303をガマットマッピングにより色変換した後の色である。色1304は、ガマットマッピングによる色変換後の色が同じ色であることを表している。 Figure 14 is a diagram for explaining the color degeneration correction process of S305 in this embodiment. Figure 14 is a diagram showing two axes, the L* axis and the C* axis in the CIE-L*a*b* color space, on a plane. L* represents lightness, and C* represents saturation. In Figure 14, color 1301, color 1302, color 1303, and color 1304 are input colors. Color 1301, color 1302, color 1303, and color 1304 represent colors included in the range of the hue range 1201 in Figure 13. Color 1305 is the color after color 1301 is converted by gamut mapping. Color 1306 is the color after color 1302 is converted by gamut mapping. Color 1307 is the color after color 1303 is converted by gamut mapping. Color 1304 represents the color after color conversion by gamut mapping is the same color.

まず、CPU102は、色相範囲毎に色縮退補正処理の基準となるユニーク色(基準色)を決定する。本実施形態では、最大明度色と最小明度色と最大彩度色を基準色として決定する。図14では、色1301が最大明度色、色1302が最小明度色、色1303が最大彩度色である。 First, the CPU 102 determines a unique color (reference color) that serves as the basis for the color degeneracy correction process for each hue range. In this embodiment, the maximum lightness color, the minimum lightness color, and the maximum saturation color are determined as the reference colors. In FIG. 14, color 1301 is the maximum lightness color, color 1302 is the minimum lightness color, and color 1303 is the maximum saturation color.

次に、CPU102は、色相範囲毎に対象となる色相範囲における、ユニーク色の組み合わせ数と色縮退している色の組み合わせ数とから、補正率Rを算出する。好適な算出式を以下に示す。 Next, the CPU 102 calculates a correction factor R for each hue range from the number of unique color combinations and the number of degenerate color combinations in the target hue range. A suitable calculation formula is shown below.

補正率R=色縮退している色の組み合わせ数/ユニーク色の組み合わせ数 ・・・(7)
補正率Rは、色縮退している色の組み合わせ数が少ないほど小さくなり、多いほど大きくなる。このように、色縮退している色の組み合わせ数が多いほど、強く色縮退補正をかけることができる。図14では、図13における色相範囲1201の範囲内に4色あることを表している。そのため、ユニーク色の組み合わせ数は6通りある。例えば、6通りのうち色縮退している色の組み合わせは、4通りであるとする。その場合の補正率は、0.667である。図14では、全ての組み合わせでガマットマッピングによって色縮退している例を示している。しかしながら、ガマットマッピングによる色変換後であっても、識別可能な最小色差より大きい場合には色縮退している色の組み合わせとしない。そのため、色1304と色1303、色1304と色1302の組み合わせは色縮退している色の組み合わせとしない。ここで、識別可能な最小色差ΔEは、例えば2.0である。
Correction rate R=number of degenerate color combinations/number of unique color combinations (7)
The correction factor R is smaller as the number of color combinations that are color degenerate is smaller, and is larger as the number of color combinations that are color degenerate is larger. In this way, the more the number of color combinations that are color degenerate is, the stronger the color degeneration correction can be applied. FIG. 14 shows that there are four colors within the range of the hue range 1201 in FIG. 13. Therefore, the number of unique color combinations is six. For example, the number of color combinations that are color degenerate among the six combinations is four. In this case, the correction factor is 0.667. FIG. 14 shows an example in which all combinations are color degenerated by gamut mapping. However, even after color conversion by gamut mapping, if the color difference is greater than the minimum distinguishable color difference, the color combination is not considered to be color degenerate. Therefore, the combinations of color 1304 and color 1303 and color 1304 and color 1302 are not considered to be color degenerate. Here, the minimum distinguishable color difference ΔE is, for example, 2.0.

次に、CPU102は、色相範囲毎に補正率Rと、最大明度色、最小明度色、最大彩度色の色情報とから補正量を算出する。CPU102は、補正量として、最大彩度色より明るい側の補正量Mhと最大彩度色より暗い側の補正量Mlをそれぞれ算出する。第1実施形態と同様に、CIE-L*a*b*色空間における色情報は、それぞれL*とa*とb*の3軸の色空間で表される。最大明度色である色1301は、L1301、a1301、b1301と表す。最小明度色である色1302は、L1302、a1302、b1302と表す。最大彩度色である色1303は、L1303、a1303、b1303と表す。好適な補正量Mhは、最大明度色と最大彩度色の色差ΔEに補正率Rを乗算した値である。好適な補正量Mlは最大彩度色と最小明度色の色差ΔEに補正率Rを乗算した値である。補正量Mhと補正量Mlは、以下の式(8)、(9)により算出される。

Figure 2024088570000003
このように、ガマットマッピング後に保持すべき色差ΔEを算出する。ガマットマッピング後に保持すべき色差ΔEは、ガマットマッピング前の色差ΔEである。図14では、補正量Mhは色差1308に補正率Rを乗算した値であり、補正量Mlは色差ΔE1309に補正率Rを乗算した値である。また、ガマットマッピング前の色差ΔEが識別可能な最小色差より大きい場合、保持すべき色差ΔEは、識別可能な最小色差ΔEより大きければよい。このように処理を行うことで、ガマットマッピングによって低下した色差ΔEを、識別可能な色差ΔEまで回復することができる。さらに、保持すべき色差ΔEは、ガマットマッピング前の色差ΔEであっても良い。この場合は、ガマットマッピング前の識別しやすさに近づけることができる。さらに、保持すべき色差ΔEは、ガマットマッピング前の色差より大きくても良い。この場合は、ガマットマッピング前より識別しやすくすることができる。 Next, the CPU 102 calculates a correction amount for each hue range from the correction rate R and the color information of the maximum lightness color, the minimum lightness color, and the maximum saturation color. The CPU 102 calculates a correction amount Mh on the side brighter than the maximum saturation color and a correction amount Ml on the side darker than the maximum saturation color as the correction amount. As in the first embodiment, color information in the CIE-L*a*b* color space is represented by a color space with three axes of L*, a*, and b*. The color 1301, which is the maximum lightness color, is represented as L1301, a1301, and b1301. The color 1302, which is the minimum lightness color, is represented as L1302, a1302, and b1302. The color 1303, which is the maximum saturation color, is represented as L1303, a1303, and b1303. The suitable correction amount Mh is a value obtained by multiplying the color difference ΔE between the maximum lightness color and the maximum chroma color by a correction rate R. The suitable correction amount Ml is a value obtained by multiplying the color difference ΔE between the maximum chroma color and the minimum lightness color by a correction rate R. The correction amounts Mh and Ml are calculated by the following formulas (8) and (9).

Figure 2024088570000003
In this way, the color difference ΔE to be retained after gamut mapping is calculated. The color difference ΔE to be retained after gamut mapping is the color difference ΔE before gamut mapping. In FIG. 14, the correction amount Mh is a value obtained by multiplying the color difference 1308 by the correction rate R, and the correction amount Ml is a value obtained by multiplying the color difference ΔE 1309 by the correction rate R. Furthermore, if the color difference ΔE before gamut mapping is larger than the minimum distinguishable color difference, the color difference ΔE to be retained may be larger than the minimum distinguishable color difference ΔE. By performing the process in this way, the color difference ΔE reduced by gamut mapping can be restored to the distinguishable color difference ΔE. Furthermore, the color difference ΔE to be retained may be the color difference ΔE before gamut mapping. In this case, it is possible to approach the ease of distinction before gamut mapping. Furthermore, the color difference ΔE to be retained may be larger than the color difference before gamut mapping. In this case, it is possible to make it easier to distinguish than before gamut mapping.

次に、CPU102は、色相範囲毎に明度補正テーブルを生成する。明度補正テーブルは、最大彩度色の明度、補正量Mhと補正量Mlに基づき、明度方向に色間の明度を拡張するためのテーブルである。図14において、最大彩度色の明度は、色1303の明度L1303である。補正量Mhは、色差ΔE1308と補正率Rに基づく値である。補正量Mlは、色差ΔE1309と補正率Rに基づく値である。明度方向に明度を拡張するための明度補正テーブルの作成方法を以下で説明する。 Next, the CPU 102 generates a brightness correction table for each hue range. The brightness correction table is a table for expanding the brightness between colors in the brightness direction based on the brightness of the maximum saturation color, the correction amount Mh, and the correction amount Ml. In FIG. 14, the brightness of the maximum saturation color is the brightness L1303 of color 1303. The correction amount Mh is a value based on the color difference ΔE1308 and the correction rate R. The correction amount Ml is a value based on the color difference ΔE1309 and the correction rate R. A method for creating a brightness correction table for expanding the brightness in the brightness direction is described below.

明度補正テーブルは、1DLUTである。1DLUTにおいては、入力明度は補正前の明度であり、出力明度は補正後の明度である。補正後の明度は、補正後の最小明度、ガマットマッピング後の最大彩度色の明度、補正後の最大明度の3点に基づく特性で決定される。補正後の最大明度は、ガマットマッピング後の最大彩度色の明度に補正量Mhを加算した明度である。補正後の最小明度は、ガマットマッピング後の最大彩度色の明度から補正量Mlを減算した明度である。明度補正テーブルでは、補正後の最小明度とガマットマッピング後の最大彩度色の明度との間はリニアに変化する特性として規定される。また、ガマットマッピング後の最大彩度色の明度と補正後の最大明度との間はリニアに変化する特性として規定される。図14においては、補正前の最大明度は、最大明度色である色1305の明度L1305である。補正前の最小明度は、最小明度色である色1306の明度L1306である。ガマットマッピング後の最大彩度色の明度は、色1307の明度L1307である。補正後の最大明度は、明度L1307に補正量Mhである色差ΔE1308を加算した明度L1310である。言い換えれば、最大明度色と最大彩度色との間の色差を明度差に変換したものといえる。補正後の最小明度は、明度L1307から補正量Mlである色差1309を減算した明度L1311である。言い換えれば、最小明度色と最大彩度色との間の色差を明度差に変換したものといえる。 The brightness correction table is a 1DLUT. In a 1DLUT, the input brightness is the brightness before correction, and the output brightness is the brightness after correction. The brightness after correction is determined by characteristics based on three points: the minimum brightness after correction, the brightness of the maximum saturation color after gamut mapping, and the maximum brightness after correction. The maximum brightness after correction is the brightness obtained by adding the correction amount Mh to the brightness of the maximum saturation color after gamut mapping. The minimum brightness after correction is the brightness obtained by subtracting the correction amount Ml from the brightness of the maximum saturation color after gamut mapping. In the brightness correction table, the characteristics are specified as linearly changing between the minimum brightness after correction and the brightness of the maximum saturation color after gamut mapping. Also, the characteristics are specified as linearly changing between the brightness of the maximum saturation color after gamut mapping and the maximum brightness after correction. In FIG. 14, the maximum brightness before correction is the brightness L1305 of the color 1305, which is the maximum brightness color. The minimum brightness before correction is the brightness L1306 of color 1306, which is the minimum brightness color. The brightness of the maximum saturation color after gamut mapping is the brightness L1307 of color 1307. The maximum brightness after correction is brightness L1310, which is the brightness L1307 plus color difference ΔE1308, which is the correction amount Mh. In other words, it can be said that the color difference between the maximum brightness color and the maximum saturation color is converted into a brightness difference. The minimum brightness after correction is brightness L1311, which is the brightness L1307 minus color difference 1309, which is the correction amount Ml. In other words, it can be said that the color difference between the minimum brightness color and the maximum saturation color is converted into a brightness difference.

図15は、図14における明度方向に明度を拡張するための明度補正テーブルの一例を示す図である。本実施形態では、色差ΔEを明度差に変換することで色縮退補正を行っている。視覚特性上、明度差は感度が高い。そのため、彩度差も明度差に変換することで、視覚特性上、小さな明度差であっても色差ΔEが付いたように感じさせることができる。また、sRGB色域と記録装置108の色域の関係上、明度差は彩度差に比べて小さい。そのため、明度差に変換することで、狭い色域を有効に活用することができる。また、本実施形態では、最大彩度色の明度は変化させない。本実施形態では、最も彩度の高い色の明度を変化させることがないため、最大彩度色の明度を維持したまま色差ΔEを補正することができる。最大明度より大きい値と最小明度未満の値の補正については、入力画像データに含まれていないため不定としても良い。また、明度補正テーブルを補完しても良く、その場合は、図15に示すように、リニアな変化になるように値を補完しても良い。このように、明度補正テーブルのグリッド数を少なくすることが可能となって容量を削減することができ、明度補正テーブルの転送にかかる処理時間を削減することができる。 Figure 15 is a diagram showing an example of a brightness correction table for expanding brightness in the brightness direction in Figure 14. In this embodiment, color degeneration correction is performed by converting the color difference ΔE to a brightness difference. In terms of visual characteristics, brightness difference is highly sensitive. Therefore, by converting the saturation difference to a brightness difference, even a small brightness difference in terms of visual characteristics can be made to feel as if a color difference ΔE has been added. In addition, due to the relationship between the sRGB color gamut and the color gamut of the recording device 108, the brightness difference is smaller than the saturation difference. Therefore, by converting to a brightness difference, it is possible to effectively utilize a narrow color gamut. In addition, in this embodiment, the brightness of the maximum saturation color is not changed. In this embodiment, since the brightness of the most saturated color is not changed, the color difference ΔE can be corrected while maintaining the brightness of the maximum saturation color. The correction of values greater than the maximum brightness and values less than the minimum brightness may be indefinite because they are not included in the input image data. In addition, the brightness correction table may be supplemented, and in that case, the values may be supplemented so as to change linearly as shown in Figure 15. In this way, it is possible to reduce the number of grids in the brightness correction table, thereby reducing capacity and reducing the processing time required to transfer the brightness correction table.

また、補正後の最大明度が、ガマットマッピング後の色域の最大明度を超える場合、CPU102は、最大値クリップ処理を行う。最大値クリップ処理は、補正後の最大明度とガマットマッピング後の色域の最大明度の差分を明度補正テーブル全体で減算する処理である。言い換えれば、明度補正テーブル全体を、ガマットマッピング後の色域の最大明度が補正後の最大明度となるまで、低明度方向にシフトさせる。この場合、ガマットマッピング後の最大彩度色の明度も低明度側に移動させる。このように、入力画像データが有するユニーク色が高明度側に偏っていた場合、低明度側の明度階調域を利用することで、色差ΔEを向上させて色縮退を低減させることができる。一方、補正後の最小明度が、ガマットマッピング後の色域の最小明度を下回る場合、CPU102は、最小値クリップ処理を行う。最小値クリップ処理は、補正後の最小明度とガマットマッピング後の色域の最小明度の差分を明度補正テーブル全体で加算する。言い換えれば、明度補正テーブル全体を、ガマットマッピング後の色域の最小明度が補正後の最小明度となるまで、高明度方向にシフトさせる。このように、入力画像データが有するユニーク色が低明度側に偏っていた場合、高明度側の明度階調域を利用することで、色差ΔEを向上させて色縮退を低減させることができる。 In addition, if the maximum brightness after correction exceeds the maximum brightness of the color gamut after gamut mapping, the CPU 102 performs maximum value clipping processing. The maximum value clipping processing is a process of subtracting the difference between the maximum brightness after correction and the maximum brightness of the color gamut after gamut mapping in the entire brightness correction table. In other words, the entire brightness correction table is shifted in the direction of lower brightness until the maximum brightness of the color gamut after gamut mapping becomes the maximum brightness after correction. In this case, the brightness of the maximum saturation color after gamut mapping is also moved to the lower brightness side. In this way, if the unique color of the input image data is biased toward the high brightness side, the color difference ΔE can be improved and color degeneration can be reduced by using the brightness gradation range on the low brightness side. On the other hand, if the minimum brightness after correction is lower than the minimum brightness of the color gamut after gamut mapping, the CPU 102 performs minimum value clipping processing. The minimum value clipping processing adds the difference between the minimum brightness after correction and the minimum brightness of the color gamut after gamut mapping in the entire brightness correction table. In other words, the entire brightness correction table is shifted toward higher brightness until the minimum brightness of the color gamut after gamut mapping becomes the minimum brightness after correction. In this way, if the unique colors in the input image data are biased toward the low brightness side, the color difference ΔE can be improved and color degeneration can be reduced by using the brightness gradation range on the high brightness side.

次に、CPU102は、色相範囲毎に作成した明度補正テーブルをガマットマッピングテーブルに適用する。まず、CPU102は、ガマットマッピングの出力値が有する色情報から、どの色相角の明度補正テーブルを適用するかを決定する。例えば、ガマットマッピングの出力値の色相角が25度の場合、図13における色相範囲1201の明度補正テーブルを適用すると決定する。そして、CPU102は、ガマットマッピングテーブルの出力値に、決定した明度補正テーブルを適用して補正する。CPU102は、補正後の色情報を、新たなガマットマッピング後の出力値とする。例えば図14でいえば、CPU102は、ガマットマッピングテーブルの出力値である色1305に、決定した明度補正テーブルを適用し、色1305の明度を補正する。そして、CPU102は、補正後の色1312の明度を、新たなガマットマッピング後の出力値とする。 Next, the CPU 102 applies the brightness correction table created for each hue range to the gamut mapping table. First, the CPU 102 determines which hue angle brightness correction table to apply from the color information of the output value of the gamut mapping. For example, if the hue angle of the output value of the gamut mapping is 25 degrees, it determines that the brightness correction table of the hue range 1201 in FIG. 13 is to be applied. Then, the CPU 102 applies the determined brightness correction table to the output value of the gamut mapping table to correct it. The CPU 102 sets the corrected color information as the output value after the new gamut mapping. For example, in FIG. 14, the CPU 102 applies the determined brightness correction table to the color 1305, which is the output value of the gamut mapping table, and corrects the brightness of the color 1305. Then, the CPU 102 sets the brightness of the corrected color 1312 as the output value after the new gamut mapping.

以上のように、本実施形態では、基準色によって作成した明度補正テーブルを色相範囲1201内の基準色以外の色にも適用する。そして、明度補正後の色、例えば色1312について、後述するように、色相を変化させないように色域1316へのマッピングが行われる。つまり、色相範囲1201においては、色縮退補正の方向が明度方向に限定される。そのような構成により、色味の変化を抑制することができる。さらに、入力画像データが有するユニーク色の組み合わせすべてで色縮退補正処理を行う必要がなく、処理時間を低減することができる。 As described above, in this embodiment, the brightness correction table created using the reference color is also applied to colors other than the reference color within the hue range 1201. Then, for the color after brightness correction, for example color 1312, mapping to the color gamut 1316 is performed without changing the hue, as described below. In other words, in the hue range 1201, the direction of color degeneracy correction is limited to the brightness direction. With such a configuration, it is possible to suppress changes in color tone. Furthermore, there is no need to perform color degeneracy correction processing for all unique color combinations in the input image data, and processing time can be reduced.

さらに、ガマットマッピングの出力値の色相角によって、隣接する色相範囲の明度補正テーブルを合成しても良い。例えば、ガマットマッピングの出力値の色相角がHn度の場合、色相範囲1201の明度補正テーブルと、色相範囲1202の明度補正テーブルを合成する。具体的には、ガマットマッピング後の出力値の明度値を、色相範囲1201の明度補正テーブルで補正して明度値Lc1201を得る。また、ガマットマッピング後の出力値の明度値を、色相範囲1202の明度補正テーブルで補正して明度値Lc1202を得る。その際、色相範囲1201の中間色相角の角度は、色相角H1201であり、色相範囲1202の中間色相角の角度は、色相角H1202である。この場合、補正後明度値Lc1201と補正後明度値Lc1202を補完することによって、補正後の明度値Lcを算出する。補間後の明度値Lcは、以下の式(10)により算出される。 Furthermore, the brightness correction tables of adjacent hue ranges may be synthesized according to the hue angle of the output value of the gamut mapping. For example, when the hue angle of the output value of the gamut mapping is Hn degrees, the brightness correction table of the hue range 1201 and the brightness correction table of the hue range 1202 are synthesized. Specifically, the brightness value of the output value after gamut mapping is corrected with the brightness correction table of the hue range 1201 to obtain the brightness value Lc1201. Also, the brightness value of the output value after gamut mapping is corrected with the brightness correction table of the hue range 1202 to obtain the brightness value Lc1202. At that time, the angle of the intermediate hue angle of the hue range 1201 is the hue angle H1201, and the angle of the intermediate hue angle of the hue range 1202 is the hue angle H1202. In this case, the corrected brightness value Lc is calculated by complementing the corrected brightness value Lc1201 and the corrected brightness value Lc1202. The brightness value Lc after interpolation is calculated using the following formula (10):

Figure 2024088570000004
このように、色相角によって、適用する明度補正テーブルを合成することにより、色相角の変化での補正強度の急峻な変化を抑制することができる。
Figure 2024088570000004
In this way, by synthesizing the brightness correction table to be applied depending on the hue angle, it is possible to suppress abrupt changes in correction strength due to changes in the hue angle.

補正後の色情報の色空間が、ガマットマッピング後の出力値の色空間と異なっている場合、色空間を変換してガマットマッピング後の出力値とする。例えば、補正後の色情報の色空間が、CIE-L*a*b*色空間であった場合、ガマットマッピング後の出力値となるように以下の探索を行う。 If the color space of the corrected color information is different from the color space of the output value after gamut mapping, the color space is converted to the output value after gamut mapping. For example, if the color space of the corrected color information is the CIE-L*a*b* color space, the following search is performed to obtain the output value after gamut mapping.

明度補正後の値が、ガマットマッピング後の色域を超えていた場合、ガマットマッピング後の色域へのマッピングを行う。例えば、図14の色1312は、ガマットマッピング後の色域1316を超えている。その場合、色1312から色1314へのマッピングが行われる。ここで用いられるマッピング方法は、明度と色相を重視した色差最小マッピングである。明度と色相を重視した色差最小マッピングでは、以下式によって色差ΔEが算出される。CIE-L*a*b*色空間において、ガマットマッピング後の色域を超えた色の色情報をLs、as、bsとする。ガマットマッピング後の色域内の色の色情報をLt、at、btとする。明度差をΔLとし、彩度差をΔCとし、色相差をΔHとする。明度の重みをWl、彩度の重みをWc、色相角の重みをWhとし、重みづけ色差をΔEwとする。

Figure 2024088570000005
ΔH=ΔE-(ΔL+ΔC) ・・・(14)
ΔEw=Wl×ΔL+Wc×ΔC+Wh×ΔH ・・・(15)
明度方向に色差ΔEを変換して拡張したため、明度を彩度より重視してマッピングする。つまり、明度の重みWlは、彩度の重みWcより大きい。さらに、色相は色味に対する影響が大きいため、色相は、明度及び彩度より重視してマッピングする方が補正前後で色味の変化を最小限に抑えることができる。つまり、色相の重みWhは、明度の重みWl以上であり、且つ、彩度の重みWcより大きい。このように、本実施形態では、色味を維持しつつ色差ΔEを補正することができる。 If the value after the lightness correction exceeds the color gamut after gamut mapping, mapping to the color gamut after gamut mapping is performed. For example, color 1312 in FIG. 14 exceeds the color gamut 1316 after gamut mapping. In that case, mapping from color 1312 to color 1314 is performed. The mapping method used here is color difference minimum mapping that emphasizes lightness and hue. In color difference minimum mapping that emphasizes lightness and hue, the color difference ΔE is calculated by the following formula. In the CIE-L*a*b* color space, the color information of the color that exceeds the color gamut after gamut mapping is set to Ls, as, and bs. The color information of the color within the color gamut after gamut mapping is set to Lt, at, and bt. The lightness difference is set to ΔL, the saturation difference is set to ΔC, and the hue difference is set to ΔH. The weight of lightness is set to Wl, the weight of saturation is set to Wc, the weight of hue angle is set to Wh, and the weighted color difference is set to ΔEw.

Figure 2024088570000005
ΔH=ΔE−(ΔL+ΔC) (14)
ΔEw=Wl×ΔL+Wc×ΔC+Wh×ΔH (15)
Since the color difference ΔE is converted and expanded in the lightness direction, lightness is given more importance than saturation when mapping. That is, the lightness weight Wl is greater than the saturation weight Wc. Furthermore, since the hue has a large effect on color, the change in color before and after correction can be minimized by mapping the hue with more importance than lightness and saturation. That is, the hue weight Wh is equal to or greater than the lightness weight Wl and greater than the saturation weight Wc. In this way, in this embodiment, the color difference ΔE can be corrected while maintaining the color.

さらに、色差最小マッピングを行う際に色空間を変換しても良い。CIE-L*a*b*色空間は、彩度方向の色変化が等色相となっていないことが知られている。そのため、色相の重みを大きくすることで色相角の変化を抑えると、等色相の色にマッピングされない。そのため、彩度方向の色変化が等色相になるように色相角を曲げた色空間に変換しても良い。このように、重みづけによる色差最小マッピングを行うことで、色味の変化を抑制することができる。 Furthermore, the color space may be converted when performing color difference minimum mapping. It is known that in the CIE-L*a*b* color space, color changes in the saturation direction do not result in equal hues. Therefore, if the change in hue angle is suppressed by increasing the weight of the hue, the colors will not be mapped to equal hues. For this reason, it is possible to convert to a color space in which the hue angle is bent so that color changes in the saturation direction result in equal hues. In this way, by performing weighted color difference minimum mapping, changes in color can be suppressed.

図14においては、色1301のガマットマッピング後である色1305は、明度補正テーブルによって、色1312に補正される。色1312は、ガマットマッピング後の色域1316を超えているため、色域1316へのマッピングが行われる。即ち、色1312は、色1314へマッピングされる。結果、本実施形態において、補正後のガマットマッピングテーブルは、入力が色1301であった場合、出力は色1314となる。 In FIG. 14, color 1305, which is the result of gamut mapping of color 1301, is corrected to color 1312 by the brightness correction table. Since color 1312 exceeds color gamut 1316 after gamut mapping, color 1312 is mapped to color gamut 1316. In other words, color 1312 is mapped to color 1314. As a result, in this embodiment, when the input of the corrected gamut mapping table is color 1301, the output is color 1314.

本実施形態では、色相範囲一つずつについて明度補正テーブルを作成することを説明した。しかしながら、隣接する色相範囲と合わせて明度補正テーブルを作成しても良い。具体的には、図13における色相範囲1201と色相範囲1202を合わせた色相範囲において、色縮退した色の組み合わせ数を検出する。次に、色相範囲1202と色相範囲1203を合わせた色相範囲において、色縮退した色の組み合わせ数を検出する。つまり、一つの色相範囲をオーバーラップして検出を行っていくことにより、色相範囲を跨いだ時の色縮退している色の組み合わせ数の急峻な変化を抑制することができる。この場合の好適な色相範囲は、二つの色相範囲を合わせて、同一の色として認識できる色相角範囲が好ましい。例えば、CIE-L*a*b*色空間における色相角が30度である。つまり、一つの色相角範囲は15度となる。こうすることで、色相範囲を跨いで色縮退の補正強度が急峻に変化することを抑制することができる。 In this embodiment, the brightness correction table is created for each hue range. However, a brightness correction table may be created for adjacent hue ranges. Specifically, the number of combinations of degenerated colors is detected in the hue range 1201 and 1202 in FIG. 13. Next, the number of combinations of degenerated colors is detected in the hue range 1202 and 1203. In other words, by performing detection with one hue range overlapping, it is possible to suppress a sharp change in the number of combinations of degenerated colors when crossing hue ranges. In this case, a suitable hue range is preferably a hue angle range in which the two hue ranges can be combined and recognized as the same color. For example, the hue angle in the CIE-L*a*b* color space is 30 degrees. In other words, one hue angle range is 15 degrees. In this way, it is possible to suppress a sharp change in the correction strength of color degeneration across hue ranges.

本実施形態では、複数のユニークな色を一つの群として明度方向に色差ΔEを補正することを説明した。視覚特性として、彩度によって明度差の感度が異なることが知られており、低彩度の明度差は高彩度の明度差より感度が高くなる。そのため、明度方向の補正量を彩度値によって制御してもよい。つまり、低彩度では、明度方向の補正量が小さくなるように制御し、高彩度では、上述した明度方向の補正量で補正を行う。具体的には、明度補正テーブルによる明度の補正を行う際に、補正前の明度値Lnと補正後の明度値Lcを、彩度補正率Sで内分する。彩度補正率Sは、ガマットマッピング後の出力値の彩度値Snと、ガマットマッピング後の出力値の色相角におけるガマットマッピング後の色域の最大彩度値Smとに基づいて以下の式により算出される。 In this embodiment, the color difference ΔE is corrected in the lightness direction by treating multiple unique colors as one group. It is known that the sensitivity to lightness difference varies depending on saturation as a visual characteristic, and lightness difference of low saturation is more sensitive than lightness difference of high saturation. Therefore, the correction amount in the lightness direction may be controlled by the saturation value. In other words, at low saturation, the correction amount in the lightness direction is controlled to be small, and at high saturation, correction is performed with the correction amount in the lightness direction described above. Specifically, when correcting lightness using the lightness correction table, the lightness value Ln before correction and the lightness value Lc after correction are divided internally by the saturation correction rate S. The saturation correction rate S is calculated by the following formula based on the saturation value Sn of the output value after gamut mapping and the maximum saturation value Sm of the color gamut after gamut mapping at the hue angle of the output value after gamut mapping.

S=Sn/Sm ・・・(16)
Lc'=S×Lc+(1-S)×Ln ・・・(17)
つまり、ガマットマッピング後の色域の最大彩度値Smに近いほど、彩度補正率Sは1に近くなり、Lc‘は、明度補正テーブルにより得られる補正後の明度値Lcに近づく。一方、ガマットマッピング後の出力値の彩度値Snが低彩度となるほど、彩度補正率Sは0に近くなり、Lc’は、補正前の明度値Lnに近づく。言い換えれば、ガマットマッピング後の出力値の彩度値Snが低彩度となるほど、明度の補正量は小さくなる。また、低彩度の色域においては補正量をゼロにしても良い。このような構成により、グレー軸付近の色変化を抑えることができる。また、視覚感度に合わせた色縮退補正を行うことができるため、過補正を抑制することができる。
S = Sn / Sm (16)
Lc'=S×Lc+(1−S)×Ln (17)
That is, the closer to the maximum saturation value Sm of the color gamut after gamut mapping, the closer the saturation correction rate S is to 1, and Lc' is closer to the corrected lightness value Lc obtained by the lightness correction table. On the other hand, the lower the saturation value Sn of the output value after gamut mapping, the closer the saturation correction rate S is to 0, and Lc' is closer to the lightness value Ln before correction. In other words, the lower the saturation value Sn of the output value after gamut mapping, the smaller the lightness correction amount. Also, the correction amount may be zero in a color gamut with low saturation. With this configuration, it is possible to suppress color changes near the gray axis. Also, since color degeneration correction can be performed according to visual sensitivity, overcorrection can be suppressed.

[第3実施形態]
以下、第1及び第2実施形態と異なる点について第3実施形態を説明する。本実施形態では、入力画像データの画素値とは異なる情報を用いてコンテンツの解析を行う例を説明する。
[Third embodiment]
The third embodiment will be described below with a focus on differences from the first and second embodiments. In this embodiment, an example will be described in which content analysis is performed using information other than pixel values of input image data.

本実施形態では、画像データの画素値とは異なる情報として、後述する描画命令によって判定を行う。描画命令は、ユーザが画像データを作成した時点でアプリケーションソフト上で付与される「写真」或いは「文字」といった記述情報を含む。このように、描画命令を用いることにより、色縮退補正を実施することが好適なコンテンツに対してのみ補正を適用することができる。 In this embodiment, the determination is made using a drawing command, which will be described later, as information different from the pixel values of the image data. The drawing command includes descriptive information such as "photo" or "text" that is added in the application software when the user creates the image data. In this way, by using the drawing command, it is possible to apply color degeneration correction only to content for which it is appropriate to perform the correction.

S104の領域設定処理について、画素値とは異なる情報を用いた処理を説明する。 The area setting process in S104 will be explained using information other than pixel values.

図8は、本実施形態における、図2のS101で入力された画像データ(以下、原稿データとよぶ)のページの一例を説明するための図である。ここで、文書データはPDLで記述されているものとする。PDLとはページ記述言語(Page Description Language)の略であり、ページ単位で描画命令の組から構成される。描画命令の種類は、PDL仕様毎に定義されているが、本実施形態では一例として以下の3種類を用いる。 Figure 8 is a diagram for explaining an example of a page of image data (hereinafter referred to as manuscript data) input in S101 of Figure 2 in this embodiment. Here, it is assumed that the document data is described in PDL. PDL is an abbreviation for Page Description Language, and is composed of a set of drawing commands on a page-by-page basis. The types of drawing commands are defined for each PDL specification, but in this embodiment, the following three types are used as an example.

命令1)TEXT描画命令(X1,Y1,色,フォント情報,文字列情報)
命令2)BOX描画命令(X1,Y1,X2,Y2,色,塗り形状)
命令3)IMAGE描画命令(X1,Y1,X2,Y2,画像ファイル情報)
他にも、点を描くDOT描画命令、線を描くLINE描画命令、円弧を描くCIRCLE描画命令等、用途に応じて適宜描画命令が用いられる場合がある。例えば、Adobe社提案のPortableDocumentFormat(PDF)や、MicroSoft社提案のXPS、HP社提案のHP-GL/2等の一般的なPDLが用いられても良い。
Command 1) TEXT drawing command (X1, Y1, color, font information, character string information)
Command 2) BOX drawing command (X1, Y1, X2, Y2, color, fill shape)
Command 3) IMAGE drawing command (X1, Y1, X2, Y2, image file information)
Other drawing commands may be used as appropriate depending on the application, such as a DOT drawing command for drawing a point, a LINE drawing command for drawing a line, a CIRCLE drawing command for drawing an arc, etc. For example, a general PDL such as Portable Document Format (PDF) proposed by Adobe, XPS proposed by Microsoft, or HP-GL/2 proposed by HP may be used.

図8の原稿ページ700が原稿データの1ページを表し、一例として、画素数は、横幅600画素、縦幅800画素とする。以下、図8の原稿ページ700の文書データに対応するPDLの例を示す。 The manuscript page 700 in FIG. 8 represents one page of manuscript data, and as an example, the number of pixels is 600 pixels wide and 800 pixels high. Below, an example of PDL corresponding to the document data of the manuscript page 700 in FIG. 8 is shown.

<PAGE=001>
<TEXT>50,50,550,100,BLACK,STD-18,“ABCDEFGHIJKLMNOPQR”</TEXT>
<TEXT>50,100,550,150,BLACK,STD-18,“abcdefghijklmnopqrstuv”</TEXT>
<TEXT>50,150,550,200,BLACK,STD-18,“1234567890123456789”</TEXT>
<BOX>50,350,200,550,GRAY,STRIPE</BOX>
<IMAGE>250,300,580,700,“PORTRAIT.jpg”</IMAGE>
</PAGE>
1行目の<PAGE=001>は、本実施形態におけるページ数を表すタグである。通常、PDLは、複数ページを記述可能に設計されているので、PDL中にページの区切りを示すタグが記述されている。本例では、</PAGE>までが1ページ目であることを表す。本実施形態では、図8の原稿ページ700に相当する。2ページ目が存在する場合には、上記PDLに続いて<PAGE=002>が記述されることとなる。
<PAGE=001>
<TEXT>50,50,550,100,BLACK,STD-18,“ABCDEFGHIJKLMNOPQR”</TEXT>
<TEXT>50,100,550,150,BLACK,STD-18,“abcdefghijklmnopqrstuv”</TEXT>
<TEXT>50,150,550,200,BLACK,STD-18,“1234567890123456789”</TEXT>
<BOX>50, 350, 200, 550, GRAY, STRIPE</BOX>
<IMAGE>250,300,580,700,“PORTRAIT.jpg”</IMAGE>
</PAGE>
<PAGE=001> on the first line is a tag that indicates the page number in this embodiment. Normally, PDL is designed to be able to describe multiple pages, so tags indicating page breaks are described in the PDL. In this example, </PAGE> indicates that this is the first page. In this embodiment, this corresponds to manuscript page 700 in FIG. 8. If there is a second page, <PAGE=002> will be described following the above PDL.

2行目の<TEXT>から3行目の</TEXT>までが描画命令1であり、図8の領域701の1行目に相当する。最初の2座標が描画領域左上である座標(X1,Y1)を示し、続く2座標が描画領域右下である座標(X2,Y2)を示す。続いて、色はBLACK(黒色:R=0,G=0,B=0)で、文字のフォントが”STD”(標準)であること、その文字サイズが18ポイントであること、記述すべき文字列が”ABCDEFGHIJKLMNOPQR”であること、が記述されている。 The text from <TEXT> on the second line to </TEXT> on the third line is drawing command 1, which corresponds to the first line of area 701 in Figure 8. The first two coordinates indicate the coordinates (X1, Y1) of the upper left corner of the drawing area, and the next two coordinates indicate the coordinates (X2, Y2) of the lower right corner of the drawing area. Next, it is written that the color is BLACK (R=0, G=0, B=0), the font is "STD" (standard), the character size is 18 points, and the string to be written is "ABCDEFGHIJKLMNOPQR".

4行目の<TEXT>から5行目の</TEXT>までが描画命令2であり、図8の領域701の2行目に相当する。最初の4座標及び2つの文字列はそれぞれ、命令1と同様に、描画領域、文字色及び文字のフォントを表し、記述すべき文字列が”abcdefghijklmnopqrstuv”であること、が記述されている。 The text from <TEXT> on the fourth line to </TEXT> on the fifth line is drawing command 2, which corresponds to the second line of area 701 in FIG. 8. The first four coordinates and two character strings indicate the drawing area, character color, and character font, respectively, just like command 1, and state that the character string to be written is "abcdefghijklmnopqrstuv".

6行目の<TEXT>から7行目の</TEXT>までが描画命令3であり、図8の領域701の3行目に相当する。最初の4座標及び2つの文字列はそれぞれ、描画命令1及び描画命令2と同様に、描画領域、文字色及び文字のフォントを表し、記述すべき文字列が”1234567890123456789”であること、が記述されている。 Drawing command 3 begins with <TEXT> on the sixth line and ends with </TEXT> on the seventh line, and corresponds to the third line of area 701 in FIG. 8. The first four coordinates and two character strings indicate the drawing area, character color, and character font, just like drawing command 1 and drawing command 2, and state that the character string to be written is "1234567890123456789".

8行目の<BOX>から</BOX>までが描画命令4であり、図8の領域702に相当する。最初の2座標が描画開始点である左上座標(X1,Y1)を示し、続く2座標が描画終了点である右下座標(X2,Y2)を示す。続いて、色はGRAY(灰色:R=128,G=128,B=128)で、塗り形状は縞模様であるSTRIPE(縞模様)が指定されている。本実施形態では、縞模様の向きについては右下方向への線としたが、線の角度や周期等をBOX命令中で指定可能であっても良い。 The section from <BOX> to </BOX> on the 8th line is drawing command 4, which corresponds to area 702 in Figure 8. The first two coordinates indicate the upper left coordinates (X1, Y1) which are the drawing start point, and the next two coordinates indicate the lower right coordinates (X2, Y2) which are the drawing end point. Next, the color is specified as GRAY (gray: R = 128, G = 128, B = 128), and the fill shape is specified as STRIPE, which is a striped pattern. In this embodiment, the direction of the stripes is a line to the lower right, but the angle and period of the lines may also be specified in the BOX command.

続いて、9行目及び10行目のIMAGE命令が、図8の領域703に相当する。ここでは、当該領域に存在する画像のファイル名が”PORTRAIT.jpg”である旨が記載されており、これは、一般的に普及している画像圧縮フォーマットであるJPEGファイルであることを表す。そして、11行目に記載の</PAGE>で当該ページの描画が終了したことを示す。 Next, the IMAGE command on lines 9 and 10 corresponds to area 703 in Figure 8. Here, it is written that the file name of the image in that area is "PORTRAIT.jpg", which indicates that it is a JPEG file, a commonly used image compression format. Then, </PAGE> on line 11 indicates that drawing of that page has finished.

実際のPDLファイルとしては、上記の描画命令群に加えて、”STD”フォントデータ、”PORTRAIT.jpg”画像ファイルを含めて一体となっているケースがある。これは、フォントデータや画像ファイルを別にして管理する場合、描画命令だけでは文字部分と画像部分が形成できず、図8の画像を形成するのに情報が不十分となるからである。また、図8中の領域704は、描画命令の存在しない領域であり、空白となる。 In actual PDL files, in addition to the above group of drawing commands, there are cases where the "STD" font data and the "PORTRAIT.jpg" image file are also included as one file. This is because if the font data and image files are managed separately, the text and image parts cannot be formed with drawing commands alone, and there is insufficient information to form the image in Figure 8. Also, area 704 in Figure 8 is an area where there are no drawing commands, and is blank.

図8の原稿ページ700のようにPDLで記述された原稿ページの場合、図2のS104における領域設定処理は、上記のPDLを解析することによって実現可能である。具体的には、各描画命令は、描画Y座標の始点と終点がそれぞれ以下のようであり、領域的に連続している。 In the case of a manuscript page described in PDL, such as manuscript page 700 in FIG. 8, the area setting process in S104 in FIG. 2 can be realized by analyzing the above PDL. Specifically, the start and end points of the drawing Y coordinates of each drawing command are as follows, and are continuous in area.

描画命令 Y始点 Y終点
第一TEXT命令 50 100
第二TEXT命令 100 150
第三TEXT命令 150 200
BOX命令 350 550
IMAGE命令 300 700
また、BOX命令とIMAGE命令は、いずれもTEXT命令とはY方向に100画素離れていることが分かる。
Drawing command Y start point Y end point First TEXT command 50 100
Second TEXT command 100 150
Third TEXT command 150 200
BOX command 350 550
IMAGE command 300 700
It can also be seen that the BOX command and the IMAGE command are both spaced 100 pixels from the TEXT command in the Y direction.

次に、BOX命令とIMAGE命令では、描画X座標の始点と終点がそれぞれ以下のようであり、X方向に50画素離れていることが分かる。 Next, for the BOX command and the IMAGE command, the start and end points of the drawing X coordinates are as follows, and we can see that they are 50 pixels apart in the X direction.

描画命令 X始点 X終点
BOX命令 50 200
IMAGE命令 250 580
以上のことから、以下のように3つの領域が設定可能である。
Drawing command X start point X end point BOX command 50 200
IMAGE command 250 580
From the above, three regions can be set as follows:

領域 X始点 Y始点 X終点 Y終点
第一領域 50 50 550 200
第二領域 50 350 200 550
第三領域 250 300 580 700
CPU102は、S105において第一領域のコンテンツを「文字またはグラフィック」と判定する。また、CPU102は、S105において第二領域のコンテンツを「文字またはグラフィック」と判定する。また、CPU102は、S105において第三領域のコンテンツを「写真またはグラデーション」と判定する。
Area X start point Y start point X end point Y end point First area 50 50 550 200
Second area 50 350 200 550
Third area 250 300 580 700
In S105, the CPU 102 determines that the content of the first region is "text or graphics." In S105, the CPU 102 determines that the content of the second region is "text or graphics." In S105, the CPU 102 determines that the content of the third region is "photograph or gradation."

以上のように、本実施形態によれば、入力された画像データの画素値とは異なる情報として、描画命令を用いてコンテンツの解析を行う。描画命令を用いることで、入力画像データだけでは判断が困難である重畳するコンテンツ間に対しても異なる領域を設定することができる。小売店における店内POP画像等は、商品写真の上に一部重畳する形で値段情報の文字を掲載することがあるが、そのような場合でも、値段情報の文字は色縮退補正を実施し、商品写真は色縮退補正を実施しないような制御が可能となる。また、領域701の文字列のように空白を挟んで文字が横並びになっている情報も同一の領域として設定することができる。また、背景が白ではなくある色でベタ塗りされていた場合でも領域を設定することができる。 As described above, according to this embodiment, content is analyzed using drawing commands as information different from the pixel values of the input image data. By using drawing commands, different areas can be set between overlapping content that is difficult to judge from the input image data alone. In-store POP images in retail stores may display price information partially overlapping a product photo, but even in such cases, it is possible to perform color degeneration correction on the price information text and not on the product photo. In addition, information in which characters are lined up side by side with spaces between them, such as the character string in area 701, can also be set as the same area. Areas can also be set even if the background is not white but a solid color.

[第4実施形態]
以下、第1~第3実施形態と異なる点について第4実施形態を説明する。本実施形態では、画素情報及びPDLの記述情報と異なる情報から色縮退補正を実施するか否かを判定する構成を説明する。
[Fourth embodiment]
The fourth embodiment will be described below with respect to the differences from the first to third embodiments. In this embodiment, a configuration will be described in which it is determined whether or not to perform color degeneration correction based on information other than pixel information and PDL description information.

本実施形態では、ユーザが入力画像の画素に対して、色縮退補正を実施するか否かという情報を付与することが可能なアプリケーションの例を説明する。第1実施形態においてグラフィックは可視性および可読性を重視すべきとして説明した。ところが、グラフィックの中でも、色に意味を持たせている情報が存在する。例えば、企業ロゴで使用される色はコーポレートカラーといい、企業のイメージを印象付けるための色を表している。従って、企業ロゴが背景のグラフィックに重畳している場合に、ロゴに含まれる色が可視性および可読性のために変わることは望ましくない場合がある。本実施形態では、グラフィックの中でも色縮退補正を実施すべきでない領域があるケースにおいて、画素情報及びPDLの記述情報と異なる情報から、色縮退補正の実施可否を判断する。 In this embodiment, an example of an application that allows a user to assign information on whether or not to perform color degeneration correction to pixels of an input image is described. In the first embodiment, it was described that emphasis should be placed on visibility and readability of graphics. However, even within graphics, there is information that gives meaning to colors. For example, the colors used in a company logo are called corporate colors, and represent colors that impress the image of the company. Therefore, when a company logo is superimposed on a background graphic, it may not be desirable for the colors contained in the logo to change for the sake of visibility and readability. In this embodiment, in cases where there is an area within the graphic where color degeneration correction should not be performed, whether or not to perform color degeneration correction is determined from information different from pixel information and PDL description information.

本実施形態では、アプリケーションは、指定の画素に対する色縮退補正を実施するか否かの設定操作をユーザから受付可能である。このような構成により、ユーザの色縮退補正の実施についての意思を反映することができる。 In this embodiment, the application can receive a setting operation from the user as to whether or not to perform color reduction correction on a specified pixel. This configuration can reflect the user's intention regarding the implementation of color reduction correction.

ユーザが操作できる画像処理アプリケーションのUI画面を図9(a)に示す。アプリケーション全体の表示画面801は、アプリケーションにより作成している画像の画像表示部802、色味指定パレット部803、塗りつぶし用パレット804を備える。コーポレートカラーは、色味指定パレット部803にて色を定義することにより設定される。色味指定パレット部803には4色の色が規定されているが、ユーザは、コーポレートカラーとして指定する色を追加することができる。 Figure 9(a) shows the UI screen of an image processing application that can be operated by the user. The display screen 801 of the entire application includes an image display section 802 for the image being created by the application, a color specification palette section 803, and a fill palette 804. The corporate color is set by defining a color in the color specification palette section 803. Four colors are defined in the color specification palette section 803, but the user can add colors to be specified as corporate colors.

「+」エリアが押下されると、図9(b)のような色味指定ウィンドウ808が表示される。色味指定ウィンドウ808は、グラデーション中で色を指定できるグラデーション指定部809、RGB値あるいはLab値によって色を指定できる絶対値指定部810を備える。図9(b)は、一例として、R=G=B=128の色について色味指定された状態を示している。決定した色味についてOKボタン811が押下されると、色味指定パレット部803にユーザが指定した色が追加される。キャンセルボタン812が押下されると、色味指定パレットは更新されない。色味指定パレット部803で指定された色は、画像処理時に色縮退補正を実施しない色であるとして設定される。 When the "+" area is pressed, a color specification window 808 as shown in FIG. 9(b) is displayed. The color specification window 808 has a gradation specification section 809 that allows a color to be specified within a gradation, and an absolute value specification section 810 that allows a color to be specified using RGB values or Lab values. FIG. 9(b) shows, as an example, a state in which a color of R=G=B=128 has been specified as a color. When the OK button 811 is pressed for the determined color, the color specified by the user is added to the color specification palette section 803. When the cancel button 812 is pressed, the color specification palette is not updated. The color specified in the color specification palette section 803 is set as a color for which color degeneration correction is not performed during image processing.

塗りつぶし用パレット804が押下された場合にも、図9(b)の色味指定ウィンドウ808が表示される。OKボタン811が押下されると、塗りつぶし用パレット804にユーザが指定した色が追加される。ユーザは、塗りつぶし用パレット804により、UI上で2色分を指定することができる。 When the fill palette 804 is pressed, the color specification window 808 in FIG. 9(b) is also displayed. When the OK button 811 is pressed, the color specified by the user is added to the fill palette 804. The user can specify two colors on the UI using the fill palette 804.

ユーザは、指定した色をポインタで選択し、画像表示部802までスライドさせて重畳させることで画像表示部802に色を塗ることができる。ユーザは、画像表示部802内に表示された画像のどの部分に色を適用するかについて、領域選択部805による複数の方法を用いることができる。例えば、矢印をスライドして重畳したオブジェクト領域すべてを塗ることができる。また、実線枠や点線枠で表示されるように指定領域を画像表示部802内に指定した上でその領域内を塗ることができる。図9(a)は、文字部「A B C」と、グラフィック部のハートの箇所に色味指定パレット部803からスライドした色で塗りつぶされた例を示している。 The user can paint the image display section 802 by selecting a specified color with the pointer and sliding it over the image display section 802 to overlap it. The user can use a number of methods using the area selection section 805 to determine which part of the image displayed in the image display section 802 to apply the color to. For example, the user can paint the entire overlapping object area by sliding an arrow. In addition, the user can specify a specified area in the image display section 802 so that it is displayed with a solid or dotted frame, and then paint within that area. Figure 9(a) shows an example in which the text section "ABC" and the heart in the graphic section are filled with a color slid from the color specification palette section 803.

図9(a)、図9(b)のアプリケーションは一例であり、ユーザが扱うUIはこれに限られない。例えばRIP(Raster Image Processor)の指定するUIが用いられても良い。また、RGB色で描画された画像データに対して、どの領域を色味指定とするか、というUIが用いられても良い。 The applications in Figs. 9(a) and 9(b) are just examples, and the UI that the user uses is not limited to these. For example, a UI that specifies an RIP (Raster Image Processor) may be used. Also, a UI that specifies which area of image data drawn in RGB colors should have a specified color may be used.

図10は、本実施形態におけるアプリケーションと、画像処理装置101および記録装置108の構成上の関係の一例を示す図である。ユーザ端末901は、本実施形態におけるアプリケーションとなる編集アプリ902と画像処理装置101とを含む。なお、画像処理装置101は、ユーザ端末901に含まれる構成であっても良いし、ユーザ端末901が画像処理装置101である構成でも良い。つまり、ユーザ端末901が画像処理装置101であり、編集アプリ902が画像処理装置101にインストールされている構成でも良い。また、図10において、画像処理装置101が記録装置108の内部に構成されても良い。 Figure 10 is a diagram showing an example of the relationship between the application in this embodiment and the configuration of the image processing device 101 and the recording device 108. The user terminal 901 includes an editing application 902, which is an application in this embodiment, and the image processing device 101. Note that the image processing device 101 may be included in the user terminal 901, or the user terminal 901 may be the image processing device 101. In other words, the user terminal 901 may be the image processing device 101, and the editing application 902 may be installed in the image processing device 101. Also, in Figure 10, the image processing device 101 may be configured inside the recording device 108.

編集アプリ902からは、画像データのRGB情報の他、色味指定パレット部803で指定された領域についてαプレーン情報が出力される。αプレーン情報は0、1の2値情報で扱っても多値情報でもよい。αプレーン情報は、言い換えれば、ユーザによって色縮退補正を実施しないと指定された領域情報である。RGB情報およびαプレーンの情報が画像処理装置101に入力され、これらの情報によりガマットマッピングが実施される。ガマットマッピングされた結果のRGB情報は、記録装置108に入力され、印刷用の量子化データに変換される。αプレーンの情報は、点線に示すように、記録装置108内部で行われるインク分解処理やγ変換処理、量子化処理で用いられても良い。 In addition to the RGB information of the image data, the editing application 902 outputs α plane information for the area specified in the color specification palette section 803. The α plane information may be handled as binary information of 0 and 1, or as multi-value information. In other words, the α plane information is area information for which the user has specified that color degeneracy correction is not to be performed. The RGB information and α plane information are input to the image processing device 101, and gamut mapping is performed using this information. The RGB information resulting from gamut mapping is input to the recording device 108 and converted into quantized data for printing. The α plane information may be used in the ink decomposition process, gamma conversion process, and quantization process performed inside the recording device 108, as shown by the dotted lines.

図11は、本実施形態におけるガマットマッピングの処理を示すフローチャートである。図11の処理は、例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図2の処理は、画像処理アクセラレータ105により実行されても良い。 Figure 11 is a flowchart showing the gamut mapping process in this embodiment. The process in Figure 11 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. The process in Figure 2 may also be executed by the image processing accelerator 105.

S401において、CPU102は、入力画像データおよび対応するαプレーンのデータを入力する。αプレーンのデータは、画素ごとに、色縮退補正の実施可否を判断するためのOn/Off情報を持っている。本実施形態では、α=1(On)が色縮退補正を実施しないことを示し、α=0(Off)が色縮退補正を実施することを示している。 In S401, the CPU 102 inputs the input image data and the corresponding α plane data. The α plane data has On/Off information for determining whether or not color degeneration correction is to be performed for each pixel. In this embodiment, α=1 (On) indicates that color degeneration correction is not to be performed, and α=0 (Off) indicates that color degeneration correction is to be performed.

図11のS102、S103は、図2のS102、S103における説明と同じであるので、それらの説明を省略する。 S102 and S103 in Figure 11 are the same as those in Figure 2, so their explanation will be omitted.

S402では、第1実施形態と同様に領域設定が行われるが、加えてαプレーンデータがOnのみもしくはOffのみで構成されるように各領域が設定される。 In S402, area setting is performed in the same manner as in the first embodiment, but in addition, each area is set so that the alpha plane data is composed of only On or only Off.

図11のS105は、図2のS105における説明と同じであるので、その説明を省略する。 S105 in Figure 11 is the same as the explanation for S105 in Figure 2, so the explanation will be omitted.

S403において、CPU102は、領域ごとの色縮退補正の要否を判定する。 In S403, the CPU 102 determines whether color degeneration correction is required for each area.

図12は、S403の処理を示すフローチャートである。本実施形態では、図12の処理により、領域ごとの色縮退補正の要否を判定する。 Figure 12 is a flowchart showing the process of S403. In this embodiment, the process of Figure 12 determines whether or not color degeneration correction is required for each region.

S501において、CPU102は、seg番号=Nに付与されるαプレーン情報がα=1(On)であるか否かを判定する。判定結果がα=1(On)である場合はS503に遷移し、α=0(Off)である場合はS502に遷移する。 In S501, the CPU 102 determines whether the alpha plane information assigned to the segment number N is alpha = 1 (On). If the determination result is alpha = 1 (On), the process proceeds to S503, and if the determination result is alpha = 0 (Off), the process proceeds to S502.

S502において、CPU102は、seg番号=Nの領域が「文字またはグラフィック」であるか否かを判定する。「文字またはグラフィック」であると判定された場合はS504に遷移し、「文字またはグラフィック」でない(=「写真またはグラデーション」である)と判定された場合はS503に遷移する。 In S502, the CPU 102 determines whether the area with segment number=N is "text or graphics." If it is determined that it is "text or graphics," the process proceeds to S504, and if it is determined that it is not "text or graphics" (i.e., it is "photograph or gradation"), the process proceeds to S503.

S503において、CPU102は、seg番号=Nについては色縮退補正を実施しないと判断し、その判断結果をRAM103等の記憶領域に格納する。S504において、CPU102は、seg番号=Nについては色縮退補正を実施しないと判断し、その判断結果をRAM103等の記憶領域に格納する。 In S503, the CPU 102 determines that color degeneracy correction is not to be performed for segment number=N, and stores the result of the determination in a storage area such as the RAM 103. In S504, the CPU 102 determines that color degeneracy correction is not to be performed for segment number=N, and stores the result of the determination in a storage area such as the RAM 103.

α=1(On)である場合とは、言い換えれば、ユーザにより色縮退補正を実施しないと指定された領域であり、その場合は、コンテンツを判定することなく、色縮退補正を実施しないと判定する。一方、α=0(Off)である場合には、コンテンツの判定結果に基づいて、色縮退補正の実施の要否を判定する。 When α = 1 (On), in other words, the user has specified that color reduction correction should not be performed in the area, and in that case, it is determined that color reduction correction should not be performed without judging the content. On the other hand, when α = 0 (Off), the need to perform color reduction correction is determined based on the content judgment result.

以上のように、本実施形態では、アプリケーション上で指定の画素に対して、色縮退補正を実施するか否かの指定をユーザから受け付ける。本実施形態によれば、ユーザがアプリケーション上で指定する情報を用いることにより、領域ごとにユーザの画像データの作成意図に則した適切なガマットマッピングを行うことができる。 As described above, in this embodiment, a user is asked whether or not to perform color degeneracy correction on a pixel specified on the application. According to this embodiment, by using the information specified by the user on the application, appropriate gamut mapping can be performed for each region in accordance with the user's intention for creating image data.

本実施形態では、アプリケーション上で指定される色はコーポレートカラーに限られない。例えば電車の券売機などで掲示される路線図は各路線にイメージカラーが与えられているため、そのようなイメージカラーであっても良い。また、「社外秘」や「複製禁止」などが記載されたスタンプ情報も警告色となる赤が設定されることが多く、この色も書類により不変であることが望ましいため、そのようなスタンプ情報で用いられるカラーであっても良い。また、ページ間で色一致して欲しいグラフの凡例情報で用いられるカラーであっても良い。本実施形態によれば、それらのような可視性および可読性の観点で色を変えてしまうことが好ましくないカラーについて、色縮退補正を実施しないように制御することができる。 In this embodiment, the color specified on the application is not limited to the corporate color. For example, in train route maps displayed on ticket vending machines, each route is assigned an image color, so such an image color may be used. In addition, stamp information containing words such as "confidential" or "no copying" is often set to the warning color red, and since it is desirable for this color to remain constant from document to document, the color may be used in such stamp information. In addition, the color may be used in the legend information of a graph, which is desired to be consistent between pages. According to this embodiment, it is possible to control so that color degeneracy correction is not performed for such colors for which it is undesirable to change the color from the standpoint of visibility and readability.

[第5実施形態]
以下、第1~第4実施形態と異なる点について第5実施形態を説明する。本実施形態では、各領域のコンテンツ情報が尤度によって判断された場合に、色縮退補正の補正強度がその尤度に従って制御される。
[Fifth embodiment]
The fifth embodiment will be described below with respect to the differences from the first to fourth embodiments. In this embodiment, when the content information of each region is determined by the likelihood, the correction strength of the color degeneration correction is controlled according to the likelihood.

本実施形態では、コンテンツの解析結果が「写真またはグラデーション」である確率と「文字またはグラフィック」である確率が一意に決定されないケースを想定する。そのような場合に、どちらか確率の高い方を判定する構成とした場合、色縮退補正が実施された結果が、色の連続性が失われるなどコンテンツにとって好ましくない結果となってしまうことが生じ得る。そこで、本実施形態では、各領域のコンテンツ情報の尤度に従い、色縮退補正の補正強度を制御する。そのような構成により、色縮退補正が実施された結果が、色の連続性が失われるなどコンテンツにとって好ましくない結果となってしまう可能性を低減させることができる。 In this embodiment, we consider a case where the probability that the content analysis result is "photo or gradation" and the probability that it is "text or graphics" cannot be uniquely determined. In such a case, if the configuration is such that the higher probability is determined, the result of the color degeneration correction may be undesirable for the content, such as losing color continuity. Therefore, in this embodiment, the correction strength of the color degeneration correction is controlled according to the likelihood of the content information for each area. With such a configuration, it is possible to reduce the possibility that the result of the color degeneration correction may be undesirable for the content, such as losing color continuity.

ここで、一例として、図2のS104で設定されたある領域について「文字またはグラフィック」である尤度が80%、「写真またはグラデーション」である尤度が20%であることを想定する。本実施形態は、尤度は、例えば、ヒストグラム404、405の類似画素数に基づいて設定される。第1実施形態では、ヒストグラム404、405の類似画素数を閾値と比較していた。本実施形態では、類似画素数の領域400もしくは401の総画素数に対する割合を尤度として扱う。例えば、類似画素数が領域400の総画素数のうちの20%である場合、「文字またはグラフィック」である尤度は80%であり、「写真またはグラデーション」である尤度は20%とする。本実施形態では、その尤度を用いて、色縮退補正の補正強度を制御する。上記の例のように、80%の確率で「文字またはグラフィック」である場合、色縮退補正を実施した結果(画素値Kout)と、色縮退補正を実施する前の状態(画素値Kin)とを用いて、以下の式(18)のようにガマットマッピングの画素値を算出する。 Here, as an example, assume that the likelihood of a certain region set in S104 in FIG. 2 being "text or graphics" is 80% and the likelihood of it being "photograph or gradation" is 20%. In this embodiment, the likelihood is set, for example, based on the number of similar pixels in histograms 404 and 405. In the first embodiment, the number of similar pixels in histograms 404 and 405 was compared with a threshold value. In this embodiment, the ratio of the number of similar pixels to the total number of pixels in region 400 or 401 is treated as the likelihood. For example, if the number of similar pixels is 20% of the total number of pixels in region 400, the likelihood of it being "text or graphics" is 80%, and the likelihood of it being "photograph or gradation" is 20%. In this embodiment, the likelihood is used to control the correction strength of the color degeneracy correction. As in the above example, if there is an 80% probability that it is "text or graphics", the result of color degeneracy correction (pixel value Kout) and the state before color degeneracy correction (pixel value Kin) are used to calculate the pixel value of the gamut mapping as shown in the following formula (18).

K_out = 0.8×K_in + 0.2×K_out ・・・(18)
つまり、上記の例の場合、「文字またはグラフィック」である尤度が80%であるので、色縮退補正の補正強度は100%から80%に弱められる。その結果、色縮退補正が過度となってしまう可能性を低減させることができる。
K_out = 0.8 × K_in + 0.2 × K_out ... (18)
That is, in the above example, since the likelihood of being a "character or graphic" is 80%, the correction strength of the color degeneration correction is weakened from 100% to 80%. As a result, it is possible to reduce the possibility that the color degeneration correction will be excessive.

図2のS106の判定においては、「文字またはグラフィック」である尤度が0%より大きいのであれば、色縮退補正が必要であると判定される。その場合、図6のS305において、CPU102は、上記のように、色縮退補正の補正強度を制御する。 In the determination of S106 in FIG. 2, if the likelihood of being a "character or graphic" is greater than 0%, it is determined that color degeneracy correction is necessary. In that case, in S305 in FIG. 6, the CPU 102 controls the correction strength of the color degeneracy correction as described above.

以上のように、本実施形態によれば、領域を解析したコンテンツの尤度に基づいて、補正強度を制御することができる。そのような構成により、解析結果として「文字またはグラフィック」とも「写真またはグラデーション」とも判断し難い領域に対しても、尤度を反映したガマットマッピングを行うことができる。 As described above, according to this embodiment, the correction strength can be controlled based on the likelihood of the content resulting from the analysis of the area. With this configuration, gamut mapping that reflects the likelihood can be performed even for areas where the analysis result is difficult to determine as either "text or graphics" or "photograph or gradation."

色縮退補正の補正強度とは、言い換えれば、色の連続性をどれ位保つかということである。本実施形態では、誤判定が生じやすいと判断されるコンテンツについて、色の連続性をある程度維持する、もしくは色間の距離をある程度確保するといった制御を実現することができる。 The correction strength of color degeneracy correction, in other words, is the degree to which color continuity is maintained. In this embodiment, for content that is deemed prone to erroneous judgment, it is possible to achieve control that maintains a certain degree of color continuity or ensures a certain degree of distance between colors.

[第6実施形態]
以下、第1~第5実施形態と異なる点について第6実施形態を説明する。本実施形態では、S104で領域設定した結果、1領域に1コンテンツとならないことを想定する。図18(a)は、グラフィックコンテンツ1800と、写真コンテンツ1801の間に白画素が存在せず、重畳している例である。図18(a)では、2つのコンテンツが重畳しているため、S104の領域設定の結果は領域1802となり、一つの領域に二つのコンテンツが含まれる状態になる。また、図18(b)は、グラフィックコンテンツ1803と、写真コンテンツ1804が隣接している例である。この領域設定結果は、領域1805となり、図18(a)と同様に一つの領域に二つのコンテンツが含まれる状態になる。
Sixth Embodiment
The sixth embodiment will be described below with respect to the differences from the first to fifth embodiments. In this embodiment, it is assumed that the result of the region setting in S104 is not one content per region. FIG. 18A shows an example in which there is no white pixel between graphic content 1800 and photo content 1801, and they overlap. In FIG. 18A, since the two contents overlap, the result of the region setting in S104 is region 1802, and two contents are included in one region. FIG. 18B shows an example in which graphic content 1803 and photo content 1804 are adjacent to each other. This region setting result is region 1805, and similarly to FIG. 18A, two contents are included in one region.

まず、このような領域に対して、S105の判定基準として、領域画素数と領域内の類似画素数との比率によって決定される値THratioを閾値THnearとして用いて判定を行うことを想定する。S105の判定では、エッジ検出エリアに基づき対象画素を検査する。対象画素を周囲と比較した結果、画素の差が所定の範囲内である類似画素割合が大きく同画素/異画素の割合が小さい画素を類似画素と決定した場合に、対象画素を”類似画素”と判断する。領域内を、対象画素を中心にエッジ検出フィルタを走査させて領域内で類似画素であると判断された数(=類似画素数)を取得する。 First, for such an area, it is assumed that the judgment criterion in S105 is to use a value THratio determined by the ratio between the number of area pixels and the number of similar pixels within the area as a threshold value THnear. In the judgment in S105, the target pixel is inspected based on the edge detection area. When the result of comparing the target pixel with its surroundings shows that a pixel with a large proportion of similar pixels whose pixel difference is within a specified range and a small proportion of same pixels/different pixels is determined to be a similar pixel, the target pixel is judged to be a "similar pixel." An edge detection filter is scanned within the area, centered on the target pixel, to obtain the number of pixels judged to be similar within the area (= number of similar pixels).

図19(a)は、領域画素数と、THratioと、判定閾値であるTHnearとの関係を示す図である。例えば、領域における類似画素率が50%を上回る場合に「写真またはグラデーション」と判定する場合、THratioは領域画素数に応じて単調増加する。例えば、領域画素数が100である場合、閾値THratioは50となり、類似画素数が50よりも大きい場合に「写真またはグラデーション」と判定される。 Figure 19 (a) shows the relationship between the number of region pixels, THratio, and the judgment threshold THnear. For example, if the similar pixel rate in a region exceeds 50%, and it is judged to be a "photograph or gradation," THratio increases monotonically according to the number of region pixels. For example, if the number of region pixels is 100, the threshold THratio is 50, and if the number of similar pixels is greater than 50, it is judged to be a "photograph or gradation."

ここで、上記のような複数種別のコンテンツを含む領域は、例えば領域内すべてが写真コンテンツである領域と比較すると、類似画素率が低い。そのため、このような領域は「文字またはグラフィック」と判定されてしまうことがある。例えば、図18(b)のグラフィックコンテンツ1803の領域画素数が200、類似画素数が0、写真コンテンツ1804の領域画素数が100、類似画素数が80であるとする。また、領域における類似画素率が50%を上回る場合に「写真またはグラデーション」と判定するとする。この時、仮に写真コンテンツ1804のみが領域となった場合、THratioは50となるため、判定結果は「写真またはグラデーション」となる。一方、領域1805は、領域画素数は300であるため、THratioは150である。領域1805の類似画素数は80であるため、「文字またはグラフィック」と判定される。ここで、比率を小さくすることでTHratioをより小さい値として、判定結果を「写真またはグラデーション」とすることは可能である。しかしながら、隣接するグラフィックコンテンツの大きさによっては、所望の判定結果が得られない。 Here, the region including multiple types of content as described above has a lower similar pixel ratio than a region in which the entire region is photo content. Therefore, such a region may be determined as "text or graphics". For example, the number of region pixels of the graphic content 1803 in FIG. 18B is 200, the number of similar pixels is 0, and the number of region pixels of the photo content 1804 is 100, and the number of similar pixels is 80. Also, if the similar pixel ratio in the region exceeds 50%, it is determined as "photo or gradation". At this time, if the region is only the photo content 1804, the TH ratio is 50, so the determination result is "photo or gradation". On the other hand, the number of region pixels of the region 1805 is 300, so the TH ratio is 150. The number of similar pixels of the region 1805 is 80, so it is determined as "text or graphics". Here, it is possible to make the ratio smaller and the determination result "photo or gradation". However, depending on the size of the adjacent graphic content, the desired judgment results may not be obtained.

例えば、領域における類似画素率を20%としてTHratioを算出する場合について考える。この場合、領域1805の判定閾値であるTHratioは60となるため、「写真またはグラデーション」と判定される。一方、図18(c)は、図18(b)と全く同じ写真コンテンツが、より画素数の大きなグラフィックコンテンツ1806と隣接している例である。図18(c)におけるグラフィックコンテンツ1806の領域画素数が800、類似画素数が0の場合、領域1808に対する判定閾値THratioは180となる。しかしながら、領域1808の類似画素数は80であるため、「文字またはグラフィック」と判定されることになる。つまり、THratioをより小さい値とすることで判定結果を「写真またはグラデーション」とすることを目的としたにも関わらず、隣接するグラフィックコンテンツの大きさによって、コンテンツの種別の判定結果が分かれてしまう。その結果、処理単位である一領域の中に、色縮退補正を実施するコンテンツとしないコンテンツが含まれている領域に対して、異なる種別の判定結果に基づいて色縮退補正が行われることになる。 For example, consider the case where THratio is calculated assuming that the similar pixel rate in the region is 20%. In this case, the THratio, which is the judgment threshold for region 1805, is 60, and it is judged as "photo or gradation". On the other hand, FIG. 18C shows an example in which the same photo content as in FIG. 18B is adjacent to graphic content 1806, which has a larger number of pixels. When the number of region pixels of graphic content 1806 in FIG. 18C is 800 and the number of similar pixels is 0, the judgment threshold THratio for region 1808 is 180. However, since the number of similar pixels of region 1808 is 80, it is judged as "text or graphics". In other words, although the purpose is to make the judgment result "photo or gradation" by setting THratio to a smaller value, the judgment result of the type of content differs depending on the size of the adjacent graphic content. As a result, color degeneration correction is performed based on the judgment results of different types for a region that includes content to be subjected to color degeneration correction and content not to be subjected to color degeneration correction in one region, which is a processing unit.

例えば図18(a)についていえば、写真コンテンツ1801に色縮退補正を行うと、色間距離が広がるが、それによって写真コンテンツ1801に存在した色味の連続性が失われてしまう場合がある。例えば、証明写真等は印刷された情報から人物の情報を視認できるサイズであることから、目視にて肌などの色変化を感じ取りやすいと考えられる。このように、写真コンテンツの色味の連続性の特徴の変化により、ユーザにとって望ましくない結果となってしまう。図18(a)~図18(c)に示すように複数のコンテンツが一領域内に内在してしまう状況下では、コンテンツの種別によって色補正を大きく異ならせる場合、同様のことがいえる。例えば、グラフィックコンテンツに彩度を強調する色補正を行い、写真コンテンツにコントラスト強調処理を行うものとする。このとき、「写真またはグラデーション」と判定されるべきコンテンツに対して、「文字またはグラフィック」と判定されてしまうと、写真領域に彩度強調処理が行われることになり、例えば顔写真における肌の赤味が、ユーザが記憶する赤味と異なる印象となってしまう。 For example, in the case of FIG. 18(a), when color degeneration correction is performed on the photo content 1801, the color distance increases, but this may cause the color continuity that existed in the photo content 1801 to be lost. For example, ID photos and the like are printed in a size that allows the person's information to be visually recognized, so it is thought that color changes in skin and the like are easily noticeable by visual inspection. In this way, the change in the characteristics of the color continuity of the photo content results in undesirable results for the user. In a situation where multiple contents exist within one area as shown in FIG. 18(a) to FIG. 18(c), the same thing can be said when color correction is made to differ greatly depending on the type of content. For example, color correction that emphasizes saturation is performed on the graphic content, and contrast enhancement processing is performed on the photo content. In this case, if the content that should be determined as "photo or gradation" is determined as "text or graphics," saturation enhancement processing is performed on the photo area, and for example, the redness of the skin in a face photo will give an impression different from the redness remembered by the user.

そこで、本実施形態では、領域画素数に依存せずに決定される値THabsを、閾値THnearとして用いる。写真コンテンツとグラフィックコンテンツの両方が含まれている領域は、写真コンテンツのみ含まれている領域と比較して類似画素率が低い一方、類似画素数は同じである。本実施形態では、領域画素数に依存せず、類似画素数のみでコンテンツの種別の判定を行うことで、例えば写真コンテンツとグラフィックコンテンツの両方が含まれている領域において、グラフィックコンテンツによる類似画素率の低下の影響を低減させることができる。 Therefore, in this embodiment, a value THabs determined independently of the number of pixels in the region is used as the threshold value THnear. Regions that contain both photo content and graphic content have a lower similar pixel rate compared to regions that contain only photo content, but the number of similar pixels is the same. In this embodiment, by determining the type of content based only on the number of similar pixels, independent of the number of pixels in the region, it is possible to reduce the effect of a decrease in the similar pixel rate due to graphic content, for example, in regions that contain both photo content and graphic content.

本実施形態では、S105において、領域内に存在する類似画素数を取得する。ここで、「写真またはグラデーション」と判定するための閾値として、領域の全画素数に依存しない固有の値THabsを設定する。 In this embodiment, in S105, the number of similar pixels present in the region is obtained. Here, a unique value THabs that is independent of the total number of pixels in the region is set as the threshold for determining that the region is a "photograph or gradation."

図19(b)は、領域画素数と、THabsと、判定閾値であるTHnearとの関係を示す図である。また、図20は、本実施形態におけるコンテンツの種別の判定処理を示すフローチャートである。図20の処理は例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図20の処理は、図2のS105で実行される。まず、S2000において、CPU102は、領域内の類似画素数を取得する。次に、S2001において、CPU102は、THabsを判定閾値であるTHnearに設定する。 Fig. 19(b) is a diagram showing the relationship between the number of pixels in a region, THabs, and THnear, which is the judgment threshold. Also, Fig. 20 is a flowchart showing the content type judgment process in this embodiment. For example, the process in Fig. 20 is realized by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. Also, the process in Fig. 20 is executed in S105 in Fig. 2. First, in S2000, the CPU 102 obtains the number of similar pixels in the region. Next, in S2001, the CPU 102 sets THabs to THnear, which is the judgment threshold.

S2002において、CPU102は、S2000で取得された類似画素数とTHnearとを比較する。ここで、類似画素数>THnearの条件を満たすと判定された場合、S2003において、CPU102は、コンテンツの種別を「写真またはグラデーション」と判定する。一方、上記の条件を満たさないと判定された場合、S2004において、CPU102は、コンテンツの種別を「文字またはグラフィック」と判定する。 In S2002, the CPU 102 compares the number of similar pixels obtained in S2000 with THnear. If it is determined that the condition of number of similar pixels > THnear is met, then in S2003 the CPU 102 determines the type of content to be "photo or gradation." On the other hand, if it is determined that the above condition is not met, then in S2004 the CPU 102 determines the type of content to be "text or graphics."

なお、THabsの値は、「写真またはグラデーション」に判定したいコンテンツの画素数に応じて決定してよい。図19(b)では、領域内の全画素数に依存しない固有の値としてT19が示されている。その場合、T19よりも類似画素数が多い領域は、領域画素数に関係なく「写真またはグラデーション」と判定される。 The value of THabs may be determined according to the number of pixels of the content to be determined as "photograph or gradation." In FIG. 19(b), T19 is shown as a unique value that is independent of the total number of pixels in the region. In this case, a region with a number of similar pixels greater than T19 is determined as "photograph or gradation" regardless of the number of pixels in the region.

このように、本実施形態では、領域画素数に依存しない固定の閾値を設定する。それにより、処理単位である一領域の中に写真コンテンツとグラフィックコンテンツの両方が含まれている領域に対して、一定のサイズ以上の写真コンテンツが存在する場合に、「写真またはグラデーション」と判定することができる。これにより例えば、写真コンテンツとグラフィックコンテンツの両方が含まれている領域に対して、色縮退補正が行われることなく、色味の連続性の特徴が維持される。また、色縮退補正だけでなく、上述したように、コンテンツの種別によって異なる色補正を行う場合においても、ユーザに違和感を与えてしまうことを防ぐことができる。 In this way, in this embodiment, a fixed threshold value is set that is independent of the number of pixels in the area. This makes it possible to determine that an area is a "photo or gradation" when there is photo content of a certain size or more in an area that contains both photo content and graphic content within a single area, which is a processing unit. This maintains the characteristic of color continuity without performing color degeneration correction on an area that contains both photo content and graphic content, for example. Furthermore, in addition to color degeneration correction, it is also possible to prevent the user from feeling uncomfortable when performing different color corrections depending on the type of content, as described above.

また、コンテンツの種別の判定について、判定方法は上記に限られるものでなく、他の方法を用いてもよい。例えば、画像データがPDF等のPDLによるもので領域ごとの属性値が付加されている場合には、この属性値を用いてコンテンツの種別を判定してもよい。例えば、テキスト属性や、ベクター属性のものはグラフィック種別と判定し、ビットマップ属性のものは写真種別と判定しても良い。このように属性値を用いることで、画像データを走査して判定処理することが不要となり、より高速に処理することができる。 The method of determining the type of content is not limited to the above, and other methods may be used. For example, if the image data is in a PDL such as PDF and has an attribute value added for each area, the attribute value may be used to determine the type of content. For example, text attributes or vector attributes may be determined to be a graphic type, and bitmap attributes may be determined to be a photo type. By using attribute values in this way, it is no longer necessary to scan the image data for determination processing, and processing can be performed faster.

[第7実施形態]
以下、第1~第6実施形態と異なる点について第7実施形態を説明する。第6実施形態では、領域画素数に依存しない値THabsを閾値THnearとすることを説明した。その場合、類似画素数が少ない領域はすべて「文字またはグラフィック」と判定されることになる。
[Seventh embodiment]
The seventh embodiment will be described below with respect to the differences from the first to sixth embodiments. In the sixth embodiment, the threshold value THnear is set to a value THabs that is independent of the number of pixels in the region. In this case, all regions with a small number of similar pixels are determined to be "text or graphics."

ここで、コンテンツの配置によっては、同じ大きさのコンテンツでも、ユーザの着目箇所が異なる場合があることを想定する。図21(a)は、グラフィックコンテンツ2101と写真コンテンツ2102とが隣接している例である。一方、図21(b)は、写真コンテンツ2102とまったく同じ写真コンテンツ2104のみが配置されている例である。図21(a)の画像をユーザが見たとき、写真コンテンツよりもグラフィックコンテンツが目を引く。一方で、図21(b)の写真コンテンツ2104のように写真コンテンツのみの状態の時は、ユーザは写真の内容を注目する可能性がある。 Here, we assume that depending on the content arrangement, the user's focus may differ even for content of the same size. Figure 21(a) is an example in which graphic content 2101 and photo content 2102 are adjacent to each other. On the other hand, Figure 21(b) is an example in which only photo content 2104, which is exactly the same as photo content 2102, is arranged. When a user looks at the image in Figure 21(a), the graphic content attracts more attention than the photo content. On the other hand, when there is only photo content, such as photo content 2104 in Figure 21(b), the user is likely to focus on the contents of the photo.

ここで、例えばA4における証明写真サイズよりも小さい写真コンテンツは「文字またはグラフィック」と判定するとする。写真コンテンツ2102と2104が小さく、類似画素数が小さいために「文字またはグラフィック」と判定される場合、図21(a)においてはグラフィックコンテンツ2101に対する色縮退補正による色間距離確保の効果が大きい。しかしながら、図21(b)においては、写真コンテンツ2104しか存在しない為、色縮退補正を行うことにより色味の連続性の特徴に変化が生じ、ユーザに違和感を与えてしまう。 Here, for example, photo content smaller than the A4 size for passport photos is determined to be "text or graphics." When photo content 2102 and 2104 are small and have a small number of similar pixels and are therefore determined to be "text or graphics," in FIG. 21(a), the effect of ensuring the color distance by performing color degeneracy correction on graphic content 2101 is large. However, in FIG. 21(b), since only photo content 2104 exists, performing color degeneracy correction changes the characteristics of the color continuity, causing a sense of discomfort to the user.

本実施形態では、領域画素数に依存しない値THabsに加えて、領域画素数に依存する値THratioを用いる。写真コンテンツのみ含まれている領域は、写真コンテンツとグラフィックコンテンツ両方が含まれている領域と比較すると、類似画素率が高い。そこで、類似画素率を判定閾値として用いることで、判定閾値以上の類似画素数を持たない写真コンテンツのみの領域において、「写真またはグラデーション」と判定することが可能となる。 In this embodiment, in addition to the value THabs, which is independent of the number of pixels in the region, a value THratio, which is dependent on the number of pixels in the region, is used. Regions that contain only photo content have a higher similar pixel rate than regions that contain both photo content and graphic content. Therefore, by using the similar pixel rate as the judgment threshold, it becomes possible to judge a region that contains only photo content and does not have a similar pixel count equal to or greater than the judgment threshold as "photo or gradation."

本実施形態では、図2のS105において、領域内に存在する類似画素数に加えて、領域画素数を取得する。そして、「写真またはグラデーション」と判定するための閾値として、領域の全画素数(領域画素数)に依存する値と依存しない値との両方を設定する。 In this embodiment, in S105 of FIG. 2, in addition to the number of similar pixels present in the region, the number of region pixels is obtained. Then, as the threshold for determining "photograph or gradation", both a value that depends on the total number of pixels in the region (region pixel count) and a value that does not depend on it are set.

図19(c)は、領域画素数と、THratioと、THabsと、判定閾値であるTHnearとの関係を示す図である。また、図22は、本実施形態におけるコンテンツの種別の判定処理を示すフローチャートである。図22の処理は例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図22の処理は、図2のS105で実行される。 Fig. 19(c) is a diagram showing the relationship between the number of area pixels, THratio, THabs, and the judgment threshold THnear. Also, Fig. 22 is a flowchart showing the content type judgment process in this embodiment. The process in Fig. 22 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. Also, the process in Fig. 22 is executed in S105 in Fig. 2.

本実施形態では、例として、領域画素数の50%をTHratioに設定し、THabsに100を設定する。領域における類似画素数が、これらのどちらかを超える場合に「写真またはグラデーション」と判定する。本例の場合、領域画素数が200の時、THratioとTHabsとが一致する。領域画素数が201よりも大きい場合は、THabsが「写真またはグラデーション」として判定されるための判定基準として用いられることになる。THratioとTHabsの値が一致する領域画素数は、閾値の変曲点IFとなる。図19(c)においては、変曲点IFは(P19、T19)として示されており、(200、100)となる。 In this embodiment, for example, 50% of the number of region pixels is set as THratio, and THabs is set as 100. If the number of similar pixels in the region exceeds either of these, it is determined to be a "photograph or gradation." In this example, when the number of region pixels is 200, THratio and THabs match. If the number of region pixels is greater than 201, THabs is used as the criterion for determining that the region is a "photograph or gradation." The number of region pixels where the values of THratio and THabs match is the inflection point IF of the threshold. In FIG. 19(c), the inflection point IF is shown as (P19, T19), which is (200, 100).

以下の説明において、写真コンテンツ2102と2104は、類似画素数50、領域画素数80であるとする。また、グラフィックコンテンツ2101は、類似画素数0、領域画素数500であるとする。また、領域画素数の50%をTHratioに設定し、THabsに100を設定する。 In the following explanation, it is assumed that the photo contents 2102 and 2104 have a similar pixel count of 50 and a region pixel count of 80. It is also assumed that the graphic content 2101 has a similar pixel count of 0 and a region pixel count of 500. It is also assumed that 50% of the region pixel count is set as THratio and THabs is set to 100.

まず、S2200において、CPU102は、領域画素数を取得する。領域2103は、領域画素数580であるため、THratioは290である。S2201において、CPU102は、領域内の類似画素数を取得する。そして、S2202において、CPU102は、THabs>THratioという条件を満たすか否かを判定する。ここで、条件を満たすと判定された場合、S2203において、CPU102は、THratioをTHnearに設定する。一方、条件を満たさないと判定された場合、S2204において、CPU102は、THabsをTHnearに設定する。 First, in S2200, the CPU 102 obtains the number of region pixels. Region 2103 has a region pixel count of 580, so THratio is 290. In S2201, the CPU 102 obtains the number of similar pixels in the region. Then, in S2202, the CPU 102 determines whether or not the condition THabs>THratio is satisfied. If it is determined that the condition is satisfied, then in S2203, the CPU 102 sets THratio to THnear. On the other hand, if it is determined that the condition is not satisfied, then in S2204, the CPU 102 sets THabs to THnear.

本例では、THabsは100であり、THratioは290であるので、条件を満たさないと判定され、S2204で、THabs=100がTHnearに設定される。 In this example, THabs is 100 and THratio is 290, so it is determined that the condition is not met, and in S2204, THabs = 100 is set to THnear.

S2205において、CPU102は、S2200で取得された類似画素数とTHnearとを比較する。ここで、類似画素数>THnearの条件を満たすと判定された場合、S2206において、CPU102は、コンテンツの種別を「写真またはグラデーション」と判定する。一方、上記の条件を満たさないと判定された場合、S2207において、CPU102は、コンテンツの種別を「文字またはグラフィック」と判定する。 In S2205, the CPU 102 compares the number of similar pixels obtained in S2200 with THnear. If it is determined that the condition of number of similar pixels > THnear is met, then in S2206 the CPU 102 determines that the type of content is "photo or gradation." On the other hand, if it is determined that the above condition is not met, then in S2207 the CPU 102 determines that the type of content is "text or graphics."

本例では、類似画素数は50であり、THnearは100であるので、条件を満たさないと判定され、S2207で、「文字またはグラフィック」と判定される。一方、例えば、領域2105について説明すると、領域画素数は80であり、類似画素数は50であり、THratioは40となる。そのため、S2202では、THabs>THratioという条件を満たすので、S2203で、THratio=40がTHnearに設定される。そして、S2205で、類似画素数>THnearという条件を満たすので、S2206で、「写真またはグラデーション」と判定される。 In this example, the number of similar pixels is 50 and THnear is 100, so it is determined that the condition is not met and in S2207 it is determined to be "text or graphic". On the other hand, for example, in the case of area 2105, the number of area pixels is 80, the number of similar pixels is 50, and THratio is 40. Therefore, in S2202, the condition THabs>THratio is met, so in S2203 THratio=40 is set to THnear. Then, in S2205, the condition number of similar pixels>THnear is met, so in S2206 it is determined to be "photo or gradation".

以上のように、領域画素数が少ないコンテンツの場合には、類似画素率による閾値によって判定を行うことで、単体の写真コンテンツのみ含む領域に対して「写真またはグラデーション」と判定することが可能となる。これにより、単体の写真コンテンツのみ含む領域に対して、色縮退補正が行われず、色味の連続性の特徴を維持することができる。 As described above, in the case of content with a small number of area pixels, it is possible to determine that an area containing only standalone photographic content is a "photo or gradation" by making a judgment using a threshold based on the similar pixel rate. This makes it possible to maintain the characteristic of color continuity by not performing color degeneration correction on areas containing only standalone photographic content.

ここで、類似画素率が高いが類似画素数は少ないグラフィックコンテンツとして、例えば、領域画素数が少なく縁がボケていて色ベタといったグラフィックコンテンツを想定する。このようなグラフィックコンテンツは、領域画素数が少ないことから、ボケ部に対して補正を行うことによる階調性の低下などの弊害よりも、色ベタに対して補正を行うことによる色弁別性の向上や、彩度強調による見栄えの向上などの効果の方が大きいと考えられる。上記の処理では、このようなグラフィックコンテンツは、「写真またはグラデーション」として判定されてしまう。ここで、グラフィックコンテンツは、同じ色が連続する箇所が多い傾向があることに着目する。領域画素数に対する割合を設定して得られる閾値TH_ratio_sameを同画素数に対して用いることで、本実施形態における判定精度を上げることが可能である。本実施形態における同画素数について、以下に説明する。 Here, as an example of graphic content with a high similar pixel rate but a small number of similar pixels, consider graphic content with a small number of area pixels, blurred edges, and solid color. Since such graphic content has a small number of area pixels, it is considered that the benefits of correcting the solid color to improve color discrimination and enhancing saturation to improve appearance are greater than the disadvantages of correcting the blurred parts, such as a decrease in gradation. In the above process, such graphic content is determined to be "photograph or gradation." Here, it is noted that graphic content tends to have many areas where the same color continues. By using a threshold value TH_ratio_same, which is obtained by setting a ratio to the number of area pixels, for the number of pixels, it is possible to improve the accuracy of the determination in this embodiment. The number of pixels in this embodiment is described below.

本実施形態において、S105の判定では、エッジ検出エリアに基づき対象画素を検査する。対象画素を周囲と比較した結果、同画素割合が多く類似画素/異画素の割合が小さい画素を同画素と決定した場合に、対象画素を”同画素”と判断する。領域内を、対象画素を中心にエッジ検出フィルタを走査させて領域内で同画素であると判断された数(=同画素数)を取得する。 In this embodiment, in the judgment at S105, the target pixel is inspected based on the edge detection area. If, as a result of comparing the target pixel with its surroundings, a pixel with a high proportion of identical pixels and a low proportion of similar pixels/different pixels is determined to be the same pixel, the target pixel is judged to be the "same pixel." An edge detection filter is scanned within the area, centered on the target pixel, to obtain the number of pixels determined to be the same pixel within the area (= the number of identical pixels).

図23は、同画素率を用いた場合の処理を示すフローチャートである。図23の処理は例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図23の処理は、図2のS105で実行される。S2300~S2301は、図22のS2200~S2201における説明と同じであるのでそれらの説明を省略する。 Figure 23 is a flowchart showing the processing when this pixel rate is used. The processing in Figure 23 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. The processing in Figure 23 is also executed in S105 in Figure 2. S2300 to S2301 are the same as those explained in S2200 to S2201 in Figure 22, so their explanation will be omitted.

S2302において、CPU102は、上述のように、領域内の同画素数を取得する。S2303において、CPU102は、S2302で取得された同画素数とTHratio_sameとを比較する。ここで、同画素数<THratio_sameの条件を満たすと判定された場合、S2304に進む。S2304~S2309は、図22のS2202~S2207における説明と同じであるので、それらの説明を省略する。 In S2302, the CPU 102 obtains the number of identical pixels in the region as described above. In S2303, the CPU 102 compares the number of identical pixels obtained in S2302 with THratio_same. If it is determined that the condition of number of identical pixels < THratio_same is met, the process proceeds to S2304. S2304 to S2309 are the same as those described in S2202 to S2207 of FIG. 22, and therefore their description will be omitted.

一方、同画素数<THratio_sameの条件を満たさないと判定された場合、S2310に進む。S2310において、CPU102は、S2301で取得された類似画素数とTH_absとを比較する。ここで、類似画素数>THabsの条件を満たすと判定された場合、S2311において、CPU102は、コンテンツの種別を「写真またはグラデーション」と判定する。一方、類似画素数>THabsの条件を満たさないと判定された場合、S2312において、CPU102は、コンテンツの種別を「文字またはグラフィック」と判定する。これにより、上記のような、類似画素率が高いが類似画素数は少ないグラフィックコンテンツに対して「文字またはグラフィック」と判定することができる。なお、図23のフローチャートは一例であり、判定順序や、各ブロック内の処理の手法は上記に限られない。例えば、領域画素数に対する割合を設定して得られる同画素率の閾値だけでなく同画素数の閾値を用いて判定してもよいし、両方を用いて判定してもよい。 On the other hand, if it is determined that the condition of the number of similar pixels<THratio_same is not satisfied, the process proceeds to S2310. In S2310, the CPU 102 compares the number of similar pixels acquired in S2301 with TH_abs. If it is determined that the condition of the number of similar pixels>THabs is satisfied, in S2311, the CPU 102 determines the type of the content to be "photo or gradation". On the other hand, if it is determined that the condition of the number of similar pixels>THabs is not satisfied, in S2312, the CPU 102 determines the type of the content to be "text or graphic". This allows the above-mentioned graphic content with a high similar pixel ratio but a low number of similar pixels to be determined to be "text or graphic". Note that the flowchart in FIG. 23 is an example, and the determination order and the method of processing within each block are not limited to the above. For example, the determination may be made using not only the threshold value of the same pixel ratio obtained by setting the ratio to the number of area pixels, but also the threshold value of the number of similar pixels, or both may be used.

[第8実施形態]
以下、第1~第7実施形態と異なる点について説明する。第7実施形態においては、類似画素数がTHratioとTHabsのどちらかよりも大きい場合、「写真またはグラデーション」であると判定した。すなわち、図19(c)に示すように、領域画素数が、THratioとTHabsによって決定される変曲点IFを超えた場合、判定閾値THnearは常にTHabsとなる。つまり、領域画素数が変曲点IFを超える領域は、THabs以上の類似画素数を含む領域はすべて「写真またはグラデーション」と判定されることになる。
[Eighth embodiment]
The following describes the differences from the first to seventh embodiments. In the seventh embodiment, when the number of similar pixels is greater than either THratio or THabs, it is determined to be a "photograph or gradation." That is, as shown in FIG. 19C, when the number of region pixels exceeds the inflection point IF determined by THratio and THabs, the determination threshold THnear is always THabs. In other words, for any region where the number of region pixels exceeds the inflection point IF, any region that contains a number of similar pixels equal to or greater than THabs is determined to be a "photograph or gradation."

ここで、「文字またはグラフィック」のコンテンツには、類似画素が全く含まれないわけではない。例えば、アンチエイリアスや、ドロップシャドウなどが挙げられる。領域面積が十分大きい画像に対しては、ユーザは印刷物から距離を取って視認することがある。例えば店内ポスター等は彩度が強調されており、目を引くことや文字が見えやすいことが求められている。このような場合、コンテンツの細部に起こるアンチエイリアス部の色縮退補正による画質低減よりも、コンテンツ全容での効果を優先することが考えられる。このようなグラフィックコンテンツが、判定閾値THabs以上の類似画素を含む場合、領域画素数が変曲点IFを超えた場合一律で「写真またはグラデーション」となってしまう。ここで、THabsを大きくすることで、上記のグラフィックコンテンツを「文字またはグラフィック」と判定させることは可能である。しかしながら、グラフィックコンテンツの大きさによっては、所望の判定結果が得られない。 Here, the "text or graphic" content does not necessarily contain no similar pixels. Examples include anti-aliasing and drop shadows. For images with a sufficiently large area, users may view the printed matter from a distance. For example, in-store posters are required to have emphasized saturation, and to be eye-catching and have text that is easy to see. In such cases, it is considered to prioritize the effect of the entire content over the reduction in image quality caused by color degeneration correction of the anti-aliasing part that occurs in the details of the content. If such graphic content contains similar pixels equal to or greater than the judgment threshold THabs, it will be uniformly determined as "photograph or gradation" when the number of region pixels exceeds the inflection point IF. Here, it is possible to determine the above graphic content as "text or graphic" by increasing THabs. However, depending on the size of the graphic content, the desired judgment result cannot be obtained.

例えば、類似画素数10、領域画素数100のグラフィックコンテンツと、それを拡大した類似画素数100、領域画素数1000のグラフィックコンテンツがあったとする。ここで、例として、領域画素数の50%をTHratioに設定し、THabsに100を設定したとする。このとき、変曲点IFの領域画素数は200であり、100と1000の間に存在する。そのため前者のグラフィックコンテンツについてTHnearはTHratio=50であり、後者のグラフィックコンテンツについてTHnearはTHabs=100となる。結果として、前者のグラフィックコンテンツは「文字またはグラフィック」と判定される一方、後者のグラフィックコンテンツは「写真またはグラデーション」と判定されてしまう。 For example, suppose there is a graphic content with a similar pixel count of 10 and a region pixel count of 100, and an enlarged version of the graphic content with a similar pixel count of 100 and a region pixel count of 1000. Here, as an example, suppose 50% of the region pixel count is set as THratio and THabs is set to 100. In this case, the region pixel count at the inflection point IF is 200, which is between 100 and 1000. Therefore, for the former graphic content, THratio = 50, and for the latter graphic content, THnear is THratio = 100, and for the latter graphic content, THnear is THabs = 100. As a result, the former graphic content is determined to be "text or graphics", while the latter graphic content is determined to be "photo or gradation".

このような、類似画素率が低いが、類似画素が含まれているグラフィックコンテンツについて、サイズが十分大きい場合に「文字またはグラフィック」判定とするためには、領域画素数が大きい場合でも、類似画素率に依存した判定閾値を設けることが考えられる。しかしながら、類似画素数による判定閾値をなくしてしまうと、第6実施形態で述べたように、グラフィックコンテンツと写真コンテンツの両方が含まれている領域に対して、「文字またはグラフィック」と判定されてしまうことがある。 In order to determine that such graphic content, which has a low similar pixel rate but contains similar pixels, is "text or graphics" if the size is large enough, it is possible to set a determination threshold that depends on the similar pixel rate, even if the number of pixels in the area is large. However, as described in the sixth embodiment, if the determination threshold based on the number of similar pixels is eliminated, an area that contains both graphic content and photo content may be determined to be "text or graphics".

そこで、本実施形態では、THabsを一定とするのではなく、領域画素数に依存する重み付け数αを用いて制御する。それにより、グラフィックコンテンツと写真コンテンツの両方が含まれる領域の判定について、「写真またはグラデーション」と判定することを可能とする。一方、類似画素率が低いが、類似画素が含まれているグラフィックコンテンツに対して「文字またはグラフィック」と判定することを可能とする。また、THabsで対象としている、一定サイズの写真コンテンツは、領域画素数が大きくなるにつれ、領域に写真コンテンツが占める割合は低下する。そのため、領域画素数が大きくなるほど、グラフィックコンテンツに色縮退補正を掛けたことによる効果の方が大きくなっていく。 Therefore, in this embodiment, THabs is not fixed, but is controlled using a weighting factor α that depends on the number of pixels in the region. This makes it possible to determine that a region containing both graphic content and photo content is a "photo or gradation." On the other hand, it makes it possible to determine that graphic content that has a low similar pixel rate but contains similar pixels is a "text or graphic." Furthermore, for photo content of a certain size that is the target of THabs, as the number of pixels in the region increases, the proportion of the region that is occupied by photo content decreases. Therefore, the greater the number of pixels in the region, the greater the effect of applying color degeneration correction to the graphic content.

図19(d)は、領域画素数と、THratioと、α+THabsと、判定閾値であるTHnearとの関係を示す図である。また、図24は、本実施形態におけるコンテンツの種別の判定処理を示すフローチャートである。図24の処理は例えば、CPU102が記憶媒体104に記憶されているプログラムをRAM103に読み出して実行することにより実現される。また、図24の処理は、図2のS105で実行される。S2400、S2401、S2403~S2405は、図22におけるS2200、S2201、S2205~S2207における説明と同じであるので、それらの説明を省略する。 Fig. 19(d) is a diagram showing the relationship between the number of area pixels, THratio, α+THabs, and the judgment threshold THnear. Also, Fig. 24 is a flowchart showing the content type judgment process in this embodiment. The process in Fig. 24 is realized, for example, by the CPU 102 reading a program stored in the storage medium 104 into the RAM 103 and executing it. Also, the process in Fig. 24 is executed in S105 in Fig. 2. S2400, S2401, and S2403 to S2405 are the same as those explained in S2200, S2201, and S2205 to S2207 in Fig. 22, so their explanation will be omitted.

ここで例として、領域画素数の50%をTHratioに設定し、THabsに100を設定し、重み付け数αに(領域画素数-変曲点IFの領域画素数)×0.1を設定する。このとき、領域画素数が200の時、α+THabsと、THratioが一致する。すなわち図19(d)においては、P19が200となり、T19は100となる。領域画素数が201よりも大きい場合は、類似画素数による閾値が判定基準として用いられることになる。 As an example, 50% of the number of region pixels is set as THratio, THabs is set to 100, and weighting factor α is set to (number of region pixels - number of region pixels at inflection point IF) x 0.1. In this case, when the number of region pixels is 200, α + THabs and THratio are the same. That is, in Figure 19(d), P19 is 200 and T19 is 100. If the number of region pixels is greater than 201, the threshold based on the number of similar pixels is used as the judgment criterion.

以下、図25を用いて、S2402の処理を説明する。例として、類似画素数100、領域画素数1000の領域を処理対象とする。まず、S2500において、CPU102は、係数αを算出する。本例の場合、α=(1000-200)×0.1=80となる。S2501において、CPU102は、α+THabsとTHratioとを比較し、α+THabs<THratioという条件を満たすか否かを判定する。本例では、α+THabs=180であり、THratio=500であるため、条件を満たすと判定される。条件を満たすと判定された場合、S2502において、CPU102は、α+THabsをTHnearに設定する。一方、S2501で条件を満たさないと判定された場合、S2503において、CPU102は、THratioをTHnearに設定する。S2502、S2503の後、図25の処理を終了し、その後、図24のS2403に進む。以降、S2402で設定されたTHnearに基づき、以降の判定処理が行われる。本例の場合、THnearは180と設定されるので、S2403で類似画素数>THnearの条件を満たさないと判定され、S2405で「文字またはグラフィック」と判定される。 The processing of S2402 will be explained below with reference to FIG. 25. As an example, a region with 100 similar pixels and 1000 region pixels is processed. First, in S2500, CPU 102 calculates coefficient α. In this example, α = (1000-200) x 0.1 = 80. In S2501, CPU 102 compares α + THabs with THratio and determines whether the condition α + THabs < THratio is satisfied. In this example, α + THabs = 180 and THratio = 500, so it is determined that the condition is satisfied. If it is determined that the condition is satisfied, in S2502, CPU 102 sets α + THabs to THnear. On the other hand, if it is determined in S2501 that the condition is not satisfied, in S2503 the CPU 102 sets THratio to THnear. After S2502 and S2503, the processing in FIG. 25 ends, and then proceeds to S2403 in FIG. 24. Thereafter, the subsequent determination processing is performed based on THnear set in S2402. In this example, THnear is set to 180, so it is determined in S2403 that the condition of number of similar pixels > THnear is not satisfied, and the result is determined to be "text or graphics" in S2405.

以上のように、本実施形態では、領域画素数が多い場合において、THabsによる判定に対して領域画素数の重み付けを行う。それにより、THabsによる効果を維持しつつ、領域画素数が増加することによる類似画素数の増加にも対応することができる。例えば、グラフィックコンテンツが一定サイズ以上であるため、類似画素率は低いが類似画素数は多いコンテンツに対して、「文字またはグラフィック」と適切に判定することができる。 As described above, in this embodiment, when the number of area pixels is large, the number of area pixels is weighted in the determination by THabs. This makes it possible to maintain the effect of THabs while also dealing with an increase in the number of similar pixels caused by an increase in the number of area pixels. For example, because graphic content is a certain size or larger, content with a low similar pixel rate but a large number of similar pixels can be appropriately determined to be "text or graphics."

以上のように、各実施形態によれば、画像データ内のコンテンツごとに色縮退補正を適切に実施することができる。そのような構成により、色縮退補正を一律に実施することにより生じる画質低下を低減することができる。また、各実施形態で説明した構成に限られるものではなく、領域の設定方法や色変換方法等の構成は、上述したような効果が得られる限り、他の構成が用いられても良い。例えば、各実施形態において、画像処理装置101はCPU102によって領域の設定や色変換を実施していたが、例えば、CPU102をASICやGPU、FPGA等に置き換えて実施するようにしても良い。 As described above, according to each embodiment, color degeneration correction can be appropriately performed for each content in image data. Such a configuration can reduce degradation in image quality caused by uniformly performing color degeneration correction. Furthermore, the configurations are not limited to those described in each embodiment, and other configurations such as the area setting method and color conversion method may be used as long as the effects described above are obtained. For example, in each embodiment, the image processing device 101 sets areas and performs color conversion using the CPU 102, but the CPU 102 may be replaced with an ASIC, GPU, FPGA, etc.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention can also be realized by supplying a program that realizes one or more of the functions of the above-mentioned embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that realizes one or more functions.

本実施形態の開示は、以下の画像処理装置、画像処理方法およびプログラムを含む。
(項目1)
画像データを入力する入力手段と、
前記入力手段により入力された画像データの色域を当該画像データを出力するデバイスの色域に変換する変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成する生成手段と、
前記色域の変換の結果に基づいて前記変換手段を補正する補正手段と、
前記入力手段により入力された画像データに含まれるコンテンツに対する前記補正手段による補正の実行を制御する制御手段と、
を備え、
前記制御手段は、前記コンテンツの種別に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御し、
前記補正手段により前記変換手段が補正された場合、前記生成手段は、補正後の変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成し、
前記補正後の変換手段により色域の変換が行われた画像データでは、補正前の前記変換手段により色域の変換が行われた画像データにおける色差が拡張されている、
ことを特徴とする画像処理装置。
(項目2)
前記制御手段は、前記コンテンツが第1の種別である場合、前記コンテンツに対する前記補正手段による補正を実行するよう制御し、前記コンテンツが前記第1の種別と異なる第2の種別である場合、前記コンテンツに対する前記補正手段による補正を実行しないよう制御することを特徴とする項目1に記載の画像処理装置。
(項目3)
前記補正手段による補正を実行しない指示を受け付ける受付手段、をさらに備え、
前記制御手段は、前記コンテンツが前記第1の種別である場合であっても、前記受付手段により前記指示を受け付けた場合、前記コンテンツに対する前記補正手段による補正を実行しないように制御する、
ことを特徴とする項目2に記載の画像処理装置。
(項目4)
前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定する第1判定手段、をさらに備え、
前記制御手段は、前記第1判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御する、
ことを特徴とする項目2に記載の画像処理装置。
(項目5)
前記入力手段により入力された画像データの画素を分析する分析手段、をさらに備え、
前記第1判定手段は、前記分析手段による分析の結果に基づいて、前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする項目4に記載の画像処理装置。
(項目6)
前記分析手段は、前記入力手段により入力された画像データ内の画素値の分布を分析することを特徴とする項目5に記載の画像処理装置。
(項目7)
前記画素値の分布は、第1の画素値の画素数と、前記第1の画素値と類似の範囲にある第2の画素値の画素数と、前記第1の画素値と類似の範囲にない第3の画素値の画素数との分布であることを特徴とする項目6に記載の画像処理装置。
(項目8)
前記第1判定手段は、前記第1の画素値の画素数が第1の閾値より大きく、前記第2の画素値の画素数が第2の閾値より小さく、前記第3の画素値の画素数が第3の閾値より大きい場合、前記コンテンツが前記第1の種別であると判定することを特徴とする項目7に記載の画像処理装置。
(項目9)
前記第1判定手段は、前記第2の画素値の画素数が第4の閾値より大きい場合、前記コンテンツが前記第2の種別であると判定することを特徴とする項目7又は8に記載の画像処理装置。
(項目10)
前記第1判定手段は、前記入力手段により入力された画像データの描画命令に基づいて、前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする項目4に記載の画像処理装置。
(項目11)
前記コンテンツが前記第1の種別もしくは前記第2の種別である尤度を判定する第2判定手段、をさらに備え、
前記制御手段は、前記第2判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御する、
ことを特徴とする項目2に記載の画像処理装置。
(項目12)
前記制御手段は、前記第2判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正強度を制御することを特徴とする項目11に記載の画像処理装置。
(項目13)
前記第2判定手段は、前記入力手段により入力された画像データ内の第1の画素値の画素数と、前記第1の画素値と類似の範囲にある第2の画素値の画素数と、前記第1の画素値と類似の範囲にない第3の画素値の画素数との分布を分析し、前記第2の画素値の画素数に基づいて、前記第1の種別もしくは前記第2の種別である尤度を判定することを特徴とする項目11又は12に記載の画像処理装置。
(項目14)
前記制御手段は、前記第1の種別である尤度が大きいほど、前記コンテンツに対する前記補正手段による補正強度を大きくすることを特徴とする項目13に記載の画像処理装置。
(項目15)
前記色差の拡張の方向は、明度の方向であることを特徴とする項目1乃至14のいずれか1項に記載の画像処理装置。
(項目16)
前記色差の拡張の方向は、彩度の方向であることを特徴とする項目1乃至15のいずれか1項に記載の画像処理装置。
(項目17)
前記色差の拡張の方向は、色相角の方向であることを特徴とする項目1乃至16のいずれか1項に記載の画像処理装置。
(項目18)
所定の色相角に含まれる色間について、明度の方向への前記色差の拡張が行われることを特徴とする項目15に記載の画像処理装置。
(項目19)
前記制御手段は、前記コンテンツを含む領域が第1の種別である場合、当該領域に対する前記補正手段による補正を実行するよう制御し、前記コンテンツを含む領域が前記第1の種別と異なる第2の種別である場合、当該領域に対する前記補正手段による補正を実行しないよう制御することを特徴とする項目1に記載の画像処理装置。
(項目20)
前記制御手段は、
前記コンテンツを含む領域が前記第1の種別である場合、当該領域に対する前記補正手段による補正を実行するよう制御し、前記第1の種別のコンテンツに対応した色補正を実行し、
前記コンテンツを含む領域が前記第2の種別である場合、当該領域に対する前記補正手段による補正を実行しないよう制御し、前記第2の種別のコンテンツに対応した色補正を実行する、
ことを特徴とする項目2に記載の画像処理装置。
(項目21)
前記コンテンツを含む領域が前記第1の種別であるかもしくは前記第2の種別であるかを判定する第3判定手段、をさらに備え、
前記制御手段は、前記第3判定手段による判定の結果に基づいて、当該領域に対する前記補正手段による補正の実行を制御する、
ことを特徴とする項目20に記載の画像処理装置。
(項目22)
前記入力手段により入力された画像データの画素を分析する分析手段、をさらに備え、
前記第3判定手段は、前記分析手段による分析の結果に基づいて、前記コンテンツを含む領域が前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする項目21に記載の画像処理装置。
(項目23)
前記分析手段は、前記入力手段により入力された画像データの画素値の分布を分析することを特徴とする項目22に記載の画像処理装置。
(項目24)
前記分析手段は、前記コンテンツを含む領域内の、特定の画素に着目した際に、画素値が同一でなくかつ画素値の差が所定の範囲内である画素が周囲にある類似画素の数を取得し、
前記第3判定手段は、前記分析手段による分析の結果に基づいて、当該類似画素の数が予め設定された閾値を超える場合、当該領域を前記第2の種別と判定する、
ことを特徴とする項目23に記載の画像処理装置。
(項目25)
前記コンテンツを含む領域は、前記第1の種別のコンテンツと前記第2の種別のコンテンツを含む領域であることを特徴とする項目24に記載の画像処理装置。
(項目26)
前記第3判定手段は、前記コンテンツを含む領域が前記第1の種別のコンテンツを含んでいても、当該領域を前記第2の種別のコンテンツと判定することを特徴とする項目25に記載の画像処理装置。
(項目27)
前記第1の種別のコンテンツと前記第2の種別のコンテンツは前記領域内において隣接していることを特徴とする項目25又は26に記載の画像処理装置。
(項目28)
前記第1の種別のコンテンツと前記第2の種別のコンテンツは互いに重畳していることを特徴とする項目25又は26に記載の画像処理装置。
(項目29)
前記閾値は、前記コンテンツを含む領域の画素数によらず一定である第1の閾値を含むことを特徴とする項目24乃至28のいずれか1項に記載の画像処理装置。
(項目30)
前記閾値は、前記コンテンツを含む領域の画素数が大きくなるほど大きくなる第2の閾値を含むことを特徴とする項目24乃至28のいずれか1項に記載の画像処理装置。
(項目31)
前記閾値は、前記コンテンツを含む領域の画素数によらず一定である第1の閾値と、前記コンテンツを含む領域の画素数が大きくなるほど大きくなる第2の閾値とを含むことを特徴とする項目24乃至28のいずれか1項に記載の画像処理装置。
(項目32)
画像処理装置において実行される画像処理方法であって、
画像データを入力する入力工程と、
前記入力工程において入力された画像データの色域を当該画像データを出力するデバイスの色域に変換する変換手段を用いて、前記入力工程において入力された画像データから色域の変換が行われた画像データを生成する生成工程と、
前記色域の変換の結果に基づいて前記変換手段を補正する補正工程と、
前記入力工程において入力された画像データに含まれるコンテンツに対する前記補正工程における補正の実行を制御する制御工程と、
を有し、
前記制御工程では、前記コンテンツの種別に基づいて、前記コンテンツに対する前記補正工程における補正の実行を制御し、
前記補正工程において前記変換手段が補正された場合、前記生成工程では、補正後の変換手段を用いて、前記入力工程において入力された画像データから色域の変換が行われた画像データを生成し、
前記補正後の変換手段により色域の変換が行われた画像データでは、補正前の前記変換手段により色域の変換が行われた画像データにおける色差が拡張されている、
ことを特徴とする画像処理方法。
(項目33)
項目1乃至31のいずれか1項に記載の画像処理装置の各手段としてコンピュータを機能させるためのプログラム。
The disclosure of the present embodiment includes the following image processing device, image processing method, and program.
(Item 1)
An input means for inputting image data;
a generating means for generating image data having a converted color gamut from the image data input by the input means, using a converting means for converting the color gamut of the image data input by the input means into the color gamut of a device that outputs the image data;
a correction unit that corrects the conversion unit based on a result of the conversion of the color gamut;
a control unit that controls the execution of correction by the correction unit on content included in the image data input by the input unit;
Equipped with
the control means controls execution of correction by the correction means on the content based on a type of the content;
When the conversion unit has been corrected by the correction unit, the generation unit generates image data having a converted color gamut from the image data input by the input unit, using the corrected conversion unit;
In the image data whose color gamut has been converted by the conversion means after the correction, the color difference in the image data whose color gamut has been converted by the conversion means before the correction is expanded.
13. An image processing device comprising:
(Item 2)
The image processing device described in item 1, characterized in that the control means controls the correction means to perform correction on the content when the content is of a first type, and controls the correction means not to perform correction on the content when the content is of a second type different from the first type.
(Item 3)
The apparatus further includes a receiving unit for receiving an instruction not to execute the correction by the correction unit,
the control means controls the correction means not to correct the content when the instruction is received by the reception means, even if the content is of the first type.
3. The image processing device according to item 2,
(Item 4)
a first determination means for determining whether the content is of the first type or the second type,
the control means controls execution of correction by the correction means on the content based on a result of the determination by the first determination means.
3. The image processing device according to item 2,
(Item 5)
The image data input by the input means is further analyzed by an analysis means.
5. The image processing device according to claim 4, wherein the first determination means determines whether the content is of the first type or the second type based on a result of the analysis by the analysis means.
(Item 6)
6. The image processing apparatus according to claim 5, wherein the analysis means analyzes a distribution of pixel values in the image data input by the input means.
(Item 7)
7. The image processing device according to item 6, wherein the distribution of pixel values is a distribution of the number of pixels having a first pixel value, the number of pixels having a second pixel value that is in a range similar to the first pixel value, and the number of pixels having a third pixel value that is not in a range similar to the first pixel value.
(Item 8)
The image processing device described in item 7, characterized in that the first determination means determines that the content is of the first type when the number of pixels of the first pixel value is greater than a first threshold, the number of pixels of the second pixel value is smaller than a second threshold, and the number of pixels of the third pixel value is greater than a third threshold.
(Item 9)
9. The image processing device according to item 7 or 8, wherein the first determination means determines that the content is of the second type when the number of pixels of the second pixel value is greater than a fourth threshold value.
(Item 10)
5. The image processing device according to item 4, wherein the first determination means determines whether the content is of the first type or the second type based on a drawing command for image data input by the input means.
(Item 11)
a second determination means for determining a likelihood that the content is of the first type or the second type,
the control means controls execution of correction by the correction means on the content based on a result of the determination by the second determination means.
3. The image processing device according to item 2,
(Item 12)
12. The image processing device according to item 11, wherein the control means controls the correction strength applied to the content by the correction means based on the result of the determination by the second determination means.
(Item 13)
The image processing device described in item 11 or 12, characterized in that the second determination means analyzes the distribution of the number of pixels of a first pixel value in the image data input by the input means, the number of pixels of a second pixel value that is within a similar range to the first pixel value, and the number of pixels of a third pixel value that is not within a similar range to the first pixel value, and determines the likelihood of the image being of the first type or the second type based on the number of pixels of the second pixel value.
(Item 14)
Item 14. The image processing device according to item 13, wherein the control means increases the strength of correction applied by the correction means to the content as the likelihood of the first type increases.
(Item 15)
15. The image processing device according to any one of items 1 to 14, wherein the direction of the expansion of the color difference is the direction of lightness.
(Item 16)
16. The image processing device according to any one of items 1 to 15, wherein the direction of the expansion of the color difference is the direction of saturation.
(Item 17)
17. The image processing device according to any one of items 1 to 16, wherein the direction of the expansion of the color difference is the direction of the hue angle.
(Item 18)
16. The image processing device according to item 15, wherein the color difference between colors included in a predetermined hue angle is expanded in the direction of lightness.
(Item 19)
The image processing device described in item 1, characterized in that the control means controls the correction means to perform correction on the area containing the content when the area containing the content is a first type, and controls the correction means not to perform correction on the area containing the content when the area containing the content is a second type different from the first type.
(Item 20)
The control means
When the area including the content is the first type, control is performed so that the correction means performs correction on the area, and performs color correction corresponding to the first type of content;
when the area including the content is of the second type, control is performed so that the correction means does not perform correction on the area, and color correction corresponding to the second type of content is performed;
3. The image processing device according to item 2,
(Item 21)
a third determination means for determining whether an area including the content is of the first type or the second type,
The control means controls the execution of correction by the correction means for the region based on a result of the determination by the third determination means.
21. The image processing device according to item 20,
(Item 22)
The image data input by the input means is further analyzed by an analysis means.
22. The image processing device according to item 21, wherein the third determination means determines whether an area including the content is of the first type or the second type based on a result of the analysis by the analysis means.
(Item 23)
23. The image processing apparatus according to item 22, wherein the analysis means analyzes a distribution of pixel values of the image data input by the input means.
(Item 24)
The analysis means, when focusing on a specific pixel within the region including the content, acquires the number of similar pixels that are surrounded by pixels whose pixel values are not the same and whose pixel value difference is within a predetermined range;
the third determination means determines the region to be of the second type when the number of similar pixels exceeds a preset threshold based on a result of the analysis by the analysis means;
24. The image processing device according to item 23,
(Item 25)
25. The image processing device according to item 24, wherein the area including the content is an area including the first type of content and the second type of content.
(Item 26)
26. The image processing device according to item 25, wherein the third determination means determines that an area including the content is the second type of content even if the area includes the first type of content.
(Item 27)
27. The image processing device according to item 25 or 26, wherein the first type of content and the second type of content are adjacent to each other within the area.
(Item 28)
27. The image processing device according to item 25 or 26, wherein the first type of content and the second type of content are superimposed on each other.
(Item 29)
29. The image processing device according to any one of items 24 to 28, wherein the threshold value includes a first threshold value that is constant regardless of the number of pixels in the area including the content.
(Item 30)
29. The image processing device according to any one of items 24 to 28, wherein the threshold value includes a second threshold value that increases as the number of pixels in the area including the content increases.
(Item 31)
The image processing device described in any one of items 24 to 28, characterized in that the threshold value includes a first threshold value that is constant regardless of the number of pixels in the area including the content, and a second threshold value that increases as the number of pixels in the area including the content increases.
(Item 32)
An image processing method executed in an image processing device, comprising:
an input step of inputting image data;
a generating step of generating image data that has been gamut-converted from the image data input in the input step, using a conversion means for converting the color gamut of the image data input in the input step into the color gamut of a device that outputs the image data;
a correction step of correcting the conversion means based on a result of the conversion of the color gamut;
a control step of controlling execution of correction in the correction step on content included in the image data input in the input step;
having
In the control step, execution of the correction on the content in the correction step is controlled based on a type of the content;
When the conversion means is corrected in the correction step, the generation step generates image data whose color gamut has been converted from the image data input in the input step using the corrected conversion means,
In the image data whose color gamut has been converted by the conversion means after the correction, the color difference in the image data whose color gamut has been converted by the conversion means before the correction is expanded.
13. An image processing method comprising:
(Item 33)
32. A program for causing a computer to function as each of the means of the image processing device according to any one of items 1 to 31.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiment, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention.

101 画像処理装置: 108 記録装置: 102、111 CPU: 103、112 RAM: 104、113 記憶媒体 101 Image processing device: 108 Recording device: 102, 111 CPU: 103, 112 RAM: 104, 113 Storage medium

Claims (33)

画像データを入力する入力手段と、
前記入力手段により入力された画像データの色域を当該画像データを出力するデバイスの色域に変換する変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成する生成手段と、
前記色域の変換の結果に基づいて前記変換手段を補正する補正手段と、
前記入力手段により入力された画像データに含まれるコンテンツに対する前記補正手段による補正の実行を制御する制御手段と、
を備え、
前記制御手段は、前記コンテンツの種別に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御し、
前記補正手段により前記変換手段が補正された場合、前記生成手段は、補正後の変換手段を用いて、前記入力手段により入力された画像データから色域の変換が行われた画像データを生成し、
前記補正後の変換手段により色域の変換が行われた画像データでは、補正前の前記変換手段により色域の変換が行われた画像データにおける色差が拡張されている、
ことを特徴とする画像処理装置。
An input means for inputting image data;
a generating means for generating image data having a converted color gamut from the image data input by the input means, using a converting means for converting the color gamut of the image data input by the input means into the color gamut of a device that outputs the image data;
a correction unit that corrects the conversion unit based on a result of the conversion of the color gamut;
a control unit that controls the execution of correction by the correction unit on content included in the image data input by the input unit;
Equipped with
the control means controls execution of correction by the correction means on the content based on a type of the content;
When the conversion unit has been corrected by the correction unit, the generation unit generates image data having a converted color gamut from the image data input by the input unit, using the corrected conversion unit;
In the image data whose color gamut has been converted by the conversion means after the correction, the color difference in the image data whose color gamut has been converted by the conversion means before the correction is expanded.
13. An image processing device comprising:
前記制御手段は、前記コンテンツが第1の種別である場合、前記コンテンツに対する前記補正手段による補正を実行するよう制御し、前記コンテンツが前記第1の種別と異なる第2の種別である場合、前記コンテンツに対する前記補正手段による補正を実行しないよう制御することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the control means controls the correction means to perform correction on the content when the content is of a first type, and controls the correction means not to perform correction on the content when the content is of a second type different from the first type. 前記補正手段による補正を実行しない指示を受け付ける受付手段、をさらに備え、
前記制御手段は、前記コンテンツが前記第1の種別である場合であっても、前記受付手段により前記指示を受け付けた場合、前記コンテンツに対する前記補正手段による補正を実行しないように制御する、
ことを特徴とする請求項2に記載の画像処理装置。
The apparatus further includes a receiving unit for receiving an instruction not to execute the correction by the correction unit,
the control means controls the correction means not to correct the content when the instruction is received by the receiving means, even if the content is of the first type.
3. The image processing device according to claim 2.
前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定する第1判定手段、をさらに備え、
前記制御手段は、前記第1判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御する、
ことを特徴とする請求項2に記載の画像処理装置。
a first determination means for determining whether the content is of the first type or the second type,
the control means controls execution of correction by the correction means on the content based on a result of the determination by the first determination means.
3. The image processing device according to claim 2.
前記入力手段により入力された画像データの画素を分析する分析手段、をさらに備え、
前記第1判定手段は、前記分析手段による分析の結果に基づいて、前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする請求項4に記載の画像処理装置。
The image data input by the input means is further analyzed by an analysis means.
5. The image processing apparatus according to claim 4, wherein the first determination means determines whether the content is of the first type or the second type based on a result of the analysis by the analysis means.
前記分析手段は、前記入力手段により入力された画像データ内の画素値の分布を分析することを特徴とする請求項5に記載の画像処理装置。 The image processing device according to claim 5, characterized in that the analysis means analyzes the distribution of pixel values in the image data input by the input means. 前記画素値の分布は、第1の画素値の画素数と、前記第1の画素値と類似の範囲にある第2の画素値の画素数と、前記第1の画素値と類似の範囲にない第3の画素値の画素数との分布であることを特徴とする請求項6に記載の画像処理装置。 The image processing device according to claim 6, characterized in that the distribution of pixel values is a distribution of the number of pixels having a first pixel value, the number of pixels having a second pixel value that is in a range similar to the first pixel value, and the number of pixels having a third pixel value that is not in a range similar to the first pixel value. 前記第1判定手段は、前記第1の画素値の画素数が第1の閾値より大きく、前記第2の画素値の画素数が第2の閾値より小さく、前記第3の画素値の画素数が第3の閾値より大きい場合、前記コンテンツが前記第1の種別であると判定することを特徴とする請求項7に記載の画像処理装置。 The image processing device according to claim 7, characterized in that the first determination means determines that the content is of the first type when the number of pixels of the first pixel value is greater than a first threshold, the number of pixels of the second pixel value is less than a second threshold, and the number of pixels of the third pixel value is greater than a third threshold. 前記第1判定手段は、前記第2の画素値の画素数が第4の閾値より大きい場合、前記コンテンツが前記第2の種別であると判定することを特徴とする請求項7に記載の画像処理装置。 The image processing device according to claim 7, characterized in that the first determination means determines that the content is of the second type when the number of pixels of the second pixel value is greater than a fourth threshold value. 前記第1判定手段は、前記入力手段により入力された画像データの描画命令に基づいて、前記コンテンツが前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする請求項4に記載の画像処理装置。 The image processing device according to claim 4, characterized in that the first determination means determines whether the content is the first type or the second type based on a drawing command for image data input by the input means. 前記コンテンツが前記第1の種別もしくは前記第2の種別である尤度を判定する第2判定手段、をさらに備え、
前記制御手段は、前記第2判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正の実行を制御する、
ことを特徴とする請求項2に記載の画像処理装置。
a second determination means for determining a likelihood that the content is of the first type or the second type,
the control means controls execution of correction by the correction means on the content based on a result of the determination by the second determination means.
3. The image processing device according to claim 2.
前記制御手段は、前記第2判定手段による判定の結果に基づいて、前記コンテンツに対する前記補正手段による補正強度を制御することを特徴とする請求項11に記載の画像処理装置。 The image processing device according to claim 11, characterized in that the control means controls the correction strength applied by the correction means to the content based on the result of the judgment by the second judgment means. 前記第2判定手段は、前記入力手段により入力された画像データ内の第1の画素値の画素数と、前記第1の画素値と類似の範囲にある第2の画素値の画素数と、前記第1の画素値と類似の範囲にない第3の画素値の画素数との分布を分析し、前記第2の画素値の画素数に基づいて、前記第1の種別もしくは前記第2の種別である尤度を判定することを特徴とする請求項11に記載の画像処理装置。 The image processing device according to claim 11, characterized in that the second determination means analyzes the distribution of the number of pixels of a first pixel value in the image data input by the input means, the number of pixels of a second pixel value that is in a similar range to the first pixel value, and the number of pixels of a third pixel value that is not in a similar range to the first pixel value, and determines the likelihood of the first type or the second type based on the number of pixels of the second pixel value. 前記制御手段は、前記第1の種別である尤度が大きいほど、前記コンテンツに対する前記補正手段による補正強度を大きくすることを特徴とする請求項13に記載の画像処理装置。 The image processing device according to claim 13, characterized in that the control means increases the correction strength applied by the correction means to the content as the likelihood of the first type increases. 前記色差の拡張の方向は、明度の方向であることを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the direction of the color difference expansion is the direction of brightness. 前記色差の拡張の方向は、彩度の方向であることを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the direction of the expansion of the color difference is the direction of saturation. 前記色差の拡張の方向は、色相角の方向であることを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the direction of the color difference expansion is the direction of the hue angle. 所定の色相角に含まれる色間について、明度の方向への前記色差の拡張が行われることを特徴とする請求項15に記載の画像処理装置。 The image processing device according to claim 15, characterized in that the color difference between colors included in a predetermined hue angle is expanded in the direction of lightness. 前記制御手段は、前記コンテンツを含む領域が第1の種別である場合、当該領域に対する前記補正手段による補正を実行するよう制御し、前記コンテンツを含む領域が前記第1の種別と異なる第2の種別である場合、当該領域に対する前記補正手段による補正を実行しないよう制御することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the control means controls the correction means to perform correction on the area containing the content if the area is a first type, and controls the correction means not to perform correction on the area containing the content if the area is a second type different from the first type. 前記制御手段は、
前記コンテンツを含む領域が前記第1の種別である場合、当該領域に対する前記補正手段による補正を実行するよう制御し、前記第1の種別のコンテンツに対応した色補正を実行し、
前記コンテンツを含む領域が前記第2の種別である場合、当該領域に対する前記補正手段による補正を実行しないよう制御し、前記第2の種別のコンテンツに対応した色補正を実行する、
ことを特徴とする請求項2に記載の画像処理装置。
The control means
When the area including the content is the first type, control is performed so that the correction means performs correction on the area, and performs color correction corresponding to the first type of content;
if the area including the content is of the second type, control is performed so that the correction means does not perform correction on the area, and color correction corresponding to the second type of content is performed.
3. The image processing device according to claim 2.
前記コンテンツを含む領域が前記第1の種別であるかもしくは前記第2の種別であるかを判定する第3判定手段、をさらに備え、
前記制御手段は、前記第3判定手段による判定の結果に基づいて、当該領域に対する前記補正手段による補正の実行を制御する、
ことを特徴とする請求項20に記載の画像処理装置。
a third determination means for determining whether an area including the content is of the first type or the second type,
The control means controls the execution of correction by the correction means for the region based on a result of the determination by the third determination means.
21. The image processing device according to claim 20.
前記入力手段により入力された画像データの画素を分析する分析手段、をさらに備え、
前記第3判定手段は、前記分析手段による分析の結果に基づいて、前記コンテンツを含む領域が前記第1の種別であるかもしくは前記第2の種別であるかを判定することを特徴とする請求項21に記載の画像処理装置。
The image data input by the input means is further analyzed by an analysis means.
22. The image processing apparatus according to claim 21, wherein the third determination means determines whether an area including the content is of the first type or the second type based on a result of the analysis by the analysis means.
前記分析手段は、前記入力手段により入力された画像データの画素値の分布を分析することを特徴とする請求項22に記載の画像処理装置。 The image processing device according to claim 22, characterized in that the analysis means analyzes the distribution of pixel values of the image data input by the input means. 前記分析手段は、前記コンテンツを含む領域内の、特定の画素に着目した際に、画素値が同一でなくかつ画素値の差が所定の範囲内である画素が周囲にある類似画素の数を取得し、
前記第3判定手段は、前記分析手段による分析の結果に基づいて、当該類似画素の数が予め設定された閾値を超える場合、当該領域を前記第2の種別と判定する、
ことを特徴とする請求項23に記載の画像処理装置。
The analysis means, when focusing on a specific pixel within the region including the content, acquires the number of similar pixels that are surrounded by pixels whose pixel values are not the same and whose pixel value difference is within a predetermined range;
the third determination means determines the region to be of the second type when the number of similar pixels exceeds a preset threshold based on a result of the analysis by the analysis means;
24. The image processing device according to claim 23 .
前記コンテンツを含む領域は、前記第1の種別のコンテンツと前記第2の種別のコンテンツを含む領域であることを特徴とする請求項24に記載の画像処理装置。 The image processing device according to claim 24, characterized in that the area containing the content is an area containing the first type of content and the second type of content. 前記第3判定手段は、前記コンテンツを含む領域が前記第1の種別のコンテンツを含んでいても、当該領域を前記第2の種別のコンテンツと判定することを特徴とする請求項25に記載の画像処理装置。 The image processing device according to claim 25, characterized in that the third determination means determines that the area containing the content is the second type of content even if the area contains the first type of content. 前記第1の種別のコンテンツと前記第2の種別のコンテンツは前記領域内において隣接していることを特徴とする請求項25に記載の画像処理装置。 The image processing device according to claim 25, characterized in that the first type of content and the second type of content are adjacent to each other within the area. 前記第1の種別のコンテンツと前記第2の種別のコンテンツは互いに重畳していることを特徴とする請求項25に記載の画像処理装置。 The image processing device according to claim 25, characterized in that the first type of content and the second type of content are superimposed on each other. 前記閾値は、前記コンテンツを含む領域の画素数によらず一定である第1の閾値を含むことを特徴とする請求項24に記載の画像処理装置。 The image processing device according to claim 24, characterized in that the threshold value includes a first threshold value that is constant regardless of the number of pixels in the area including the content. 前記閾値は、前記コンテンツを含む領域の画素数が大きくなるほど大きくなる第2の閾値を含むことを特徴とする請求項24に記載の画像処理装置。 The image processing device according to claim 24, characterized in that the threshold includes a second threshold that increases as the number of pixels in the area including the content increases. 前記閾値は、前記コンテンツを含む領域の画素数によらず一定である第1の閾値と、前記コンテンツを含む領域の画素数が大きくなるほど大きくなる第2の閾値とを含むことを特徴とする請求項24に記載の画像処理装置。 The image processing device according to claim 24, characterized in that the thresholds include a first threshold that is constant regardless of the number of pixels in the region including the content, and a second threshold that increases as the number of pixels in the region including the content increases. 画像処理装置において実行される画像処理方法であって、
画像データを入力する入力工程と、
前記入力工程において入力された画像データの色域を当該画像データを出力するデバイスの色域に変換する変換手段を用いて、前記入力工程において入力された画像データから色域の変換が行われた画像データを生成する生成工程と、
前記色域の変換の結果に基づいて前記変換手段を補正する補正工程と、
前記入力工程において入力された画像データに含まれるコンテンツに対する前記補正工程における補正の実行を制御する制御工程と、
を有し、
前記制御工程では、前記コンテンツの種別に基づいて、前記コンテンツに対する前記補正工程における補正の実行を制御し、
前記補正工程において前記変換手段が補正された場合、前記生成工程では、補正後の変換手段を用いて、前記入力工程において入力された画像データから色域の変換が行われた画像データを生成し、
前記補正後の変換手段により色域の変換が行われた画像データでは、補正前の前記変換手段により色域の変換が行われた画像データにおける色差が拡張されている、
ことを特徴とする画像処理方法。
An image processing method executed in an image processing device, comprising:
an input step of inputting image data;
a generating step of generating image data that has been subjected to color gamut conversion from the image data input in the input step, using a conversion means for converting the color gamut of the image data input in the input step into the color gamut of a device that outputs the image data;
a correction step of correcting the conversion means based on a result of the conversion of the color gamut;
a control step of controlling execution of correction in the correction step on content included in the image data input in the input step;
having
In the control step, execution of the correction on the content in the correction step is controlled based on a type of the content;
When the conversion means is corrected in the correction step, the generation step generates image data in which a color gamut has been converted from the image data input in the input step using the corrected conversion means,
In the image data whose color gamut has been converted by the conversion means after the correction, the color difference in the image data whose color gamut has been converted by the conversion means before the correction is expanded.
13. An image processing method comprising:
請求項1乃至31のいずれか1項に記載の画像処理装置の各手段としてコンピュータを機能させるためのプログラム。 A program for causing a computer to function as each of the means of the image processing device according to any one of claims 1 to 31.
JP2023086431A 2022-12-20 2023-05-25 Image processing apparatus, image processing method, and program Pending JP2024088570A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US18/544,008 US20240202977A1 (en) 2022-12-20 2023-12-18 Image processing apparatus, image processing method, and non-transitory computer-readable storage medium storing program
EP23217467.2A EP4391518A1 (en) 2022-12-20 2023-12-18 Image processing apparatus, image processing method, program, and non-transitory computer-readable storage medium storing program
CN202311751946.7A CN118233568A (en) 2022-12-20 2023-12-19 Image processing apparatus, image processing method, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022203525 2022-12-20
JP2022203525 2022-12-20

Publications (1)

Publication Number Publication Date
JP2024088570A true JP2024088570A (en) 2024-07-02

Family

ID=91672649

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023086431A Pending JP2024088570A (en) 2022-12-20 2023-05-25 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2024088570A (en)

Similar Documents

Publication Publication Date Title
JP4878572B2 (en) Image processing apparatus and image processing method
US7940434B2 (en) Image processing apparatus, image forming apparatus, method of image processing, and a computer-readable storage medium storing an image processing program
JP4771538B2 (en) Color conversion table generation method, color conversion table, and color conversion table generation apparatus
US8559752B2 (en) Image processing system for processing a digital image and image processing method of processing a digital image
KR20230055361A (en) Image processing apparatus, image processing method, and storage medium storing program
US20110001993A1 (en) Image processing method and image processing apparatus
JP2024008265A (en) Image processing device, image processing method and program
US8139266B2 (en) Color printing control device, color printing control method, and computer readable recording medium stored with color printing control program
JP4498233B2 (en) Image processing apparatus and image processing method
EP4391518A1 (en) Image processing apparatus, image processing method, program, and non-transitory computer-readable storage medium storing program
JP2005316237A (en) Print control apparatus, print control method, and print control program
JP2008147937A (en) Image processor and image processing method
US20240013507A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium storing program
JP2024008264A (en) Image processing device, image processing method and program
JP2024088570A (en) Image processing apparatus, image processing method, and program
JP2010050832A (en) Device and method for processing image, program, and recording medium
US20240364837A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US12335452B2 (en) Image processing apparatus, method, and computer program product correcting color gamut conversion based on a positional relationship between different objects
US8654403B2 (en) Image processing apparatus and program therefor
US20240372957A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
CN118233568A (en) Image processing apparatus, image processing method, and storage medium
US20240314259A1 (en) Image processing apparatus and control method thereof
US20250175571A1 (en) Information processing apparatus, information processing method, and storage medium
US20250227191A1 (en) Information processing apparatus, information processing method, and storage medium
US20250175570A1 (en) Information processing apparatus, information processing method, and storage medium