JP2013251757A - Image processor and computer program - Google Patents

Image processor and computer program Download PDF

Info

Publication number
JP2013251757A
JP2013251757A JP2012125370A JP2012125370A JP2013251757A JP 2013251757 A JP2013251757 A JP 2013251757A JP 2012125370 A JP2012125370 A JP 2012125370A JP 2012125370 A JP2012125370 A JP 2012125370A JP 2013251757 A JP2013251757 A JP 2013251757A
Authority
JP
Japan
Prior art keywords
color
image
value
pixel
background
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.)
Granted
Application number
JP2012125370A
Other languages
Japanese (ja)
Other versions
JP5953946B2 (en
Inventor
Ryohei Ozawa
良平 小澤
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2012125370A priority Critical patent/JP5953946B2/en
Priority to EP13158842.8A priority patent/EP2670125B1/en
Priority to US13/797,189 priority patent/US9025870B2/en
Publication of JP2013251757A publication Critical patent/JP2013251757A/en
Application granted granted Critical
Publication of JP5953946B2 publication Critical patent/JP5953946B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/58Edge or detail enhancement; Noise or error suppression, e.g. colour misregistration correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/62Retouching, i.e. modification of isolated colours only or in isolated picture areas only

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve image quality of a boundary region between a background image and an object image.SOLUTION: An image processor includes: an image data acquisition section for acquiring target image data showing a target image including an object image and a background image adjacent to the object image; a feature value acquisition section for acquiring a first feature value on a color of the object image and a second feature value on a color of the background image; and a correction section for correcting the color of a boundary region being a region where the object image and the background image are adjacent to an intermediate color showing a color between the color of the object image and the color of the background image by using the first feature value and the second feature value.

Description

本発明は、対象画像に含まれるオブジェクト画像と背景画像との境界領域の色を変換する技術に関する。   The present invention relates to a technique for converting the color of a boundary region between an object image and a background image included in a target image.

画像データが表す対象画像の背景色(下地色)を除去する技術が知られている。例えば、背景色が除去された対象画像を印刷すれば、除去前の対象画像を印刷する場合と比較して、印刷材(インク、トナーなど)の使用量を低減することができる等のメリットがある。   A technique for removing a background color (background color) of a target image represented by image data is known. For example, if the target image from which the background color is removed is printed, the amount of printing material (ink, toner, etc.) used can be reduced compared to the case of printing the target image before removal. is there.

例えば、特許文献1には、背景色の除去処理において、除去範囲内の階調値を有する画像領域を除去(白色に変換)するとともに、除去範囲に連続する調整範囲内の階調値を補正することによって、除去処理後の画像における階調の連続性を維持する技術が開示されている。これにより、背景色を除去された背景画像と、オブジェクト画像との境界領域に生じる階調の段差を緩和することができる。   For example, in Patent Document 1, in the background color removal processing, an image area having a gradation value within the removal range is removed (converted to white), and the gradation value within the adjustment range that is continuous to the removal range is corrected. Thus, a technique for maintaining the continuity of gradation in an image after removal processing is disclosed. As a result, it is possible to alleviate the gradation step that occurs in the boundary area between the background image from which the background color has been removed and the object image.

特開2001−94804号公報JP 2001-94804 A

しかしながら、対象画像によっては、背景画像とオブジェクト画像との境界領域の画質を改善する余地があり、当該境界領域の画質の向上が求められている。   However, depending on the target image, there is room for improving the image quality of the boundary area between the background image and the object image, and improvement in the image quality of the boundary area is required.

本発明の主な利点は、画像データによって表される画像において、背景画像とオブジェクト画像との境界領域の画質を向上することである。   The main advantage of the present invention is to improve the image quality of the boundary region between the background image and the object image in the image represented by the image data.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の態様で実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented in the following aspects.

[適用例1]オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得部と、前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、を取得する特徴値取得部と、前記第1の特徴値と前記第2の特徴値とを用いて、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との間の色を示す中間色に補正する補正部と、を備える、画像処理装置。 Application Example 1 An image data acquisition unit that acquires target image data representing a target image including an object image and a background image adjacent to the object image, a first feature value relating to the color of the object image, The object image and the background image are adjacent using a feature value acquisition unit that acquires a second feature value relating to the color of the background image, and the first feature value and the second feature value. An image processing apparatus comprising: a correction unit that corrects a color of a boundary area, which is an area to be corrected, to an intermediate color indicating a color between the color of the object image and the color of the background image.

上記構成によれば、第1の特徴値と第2の特徴値とを用いて、オブジェクト画像と背景画像との境界領域の色を、オブジェクト画像の色と背景画像の色との中間色に補正する。この結果、境界領域に生じ得る色の不自然さを抑制して、境界領域の画質を向上することができる。   According to the above configuration, the color of the boundary area between the object image and the background image is corrected to an intermediate color between the color of the object image and the color of the background image using the first feature value and the second feature value. . As a result, it is possible to improve the image quality of the boundary region by suppressing unnatural color that may occur in the boundary region.

[適用例2]オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得部と、前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、の少なくとも一方の特徴値を取得する特徴値取得部と、取得された前記第1の特徴値と前記第2の特徴値との少なくとも一方の特徴値と、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の輝度値と、を用いて、前記境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との少なくとも一方の色に近づくように補正する補正部と、を備える、画像処理装置。 Application Example 2 An image data acquisition unit that acquires target image data representing a target image including an object image and a background image adjacent to the object image, a first feature value relating to the color of the object image, A feature value acquisition unit that acquires at least one feature value of the second feature value relating to the color of the background image, and at least one feature of the acquired first feature value and the second feature value And the luminance value of the boundary area that is an area where the object image and the background image are adjacent to each other, the color of the boundary area is set to at least one of the color of the object image and the color of the background image An image processing apparatus comprising: a correction unit that corrects the color so as to approach the color of the image.

上記構成によれば、第1の特徴値と第2の特徴値との少なくとも一方の特徴値と、オブジェクト画像と背景画像との境界領域の輝度値と、を用いて、境界領域の色を、オブジェクト画像の色と背景画像の色との少なくとも一方の色に近づくように補正する。この結果、境界領域に生じ得る色の不自然さを抑制することが可能であり、境界領域の画質を向上することができる。   According to the above configuration, the color of the boundary region is determined using the feature value of at least one of the first feature value and the second feature value and the luminance value of the boundary region between the object image and the background image. Correction is performed so as to approach at least one of the color of the object image and the color of the background image. As a result, color unnaturalness that may occur in the boundary region can be suppressed, and the image quality of the boundary region can be improved.

なお、本発明は、種々の形態で実現することが可能であり、例えば、画像処理システム、画像処理方法、これらの機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、等の形態で実現することができる。   The present invention can be realized in various forms, such as an image processing system, an image processing method, a computer program for realizing these functions, a recording medium on which the computer program is recorded, and the like. It can be realized in the form.

複合機200の構成を示すブロック図である。2 is a block diagram showing a configuration of a multifunction machine 200. FIG. 画像処理のフローチャートである。It is a flowchart of an image process. 対象画像データの一例を示す図である。It is a figure which shows an example of object image data. 成分色変換処理に用いられる色変換テーブルの一例を示す図である。It is a figure which shows an example of the color conversion table used for a component color conversion process. 背景色変換処理が実行された後の対象画像データを示す図である。It is a figure which shows the object image data after a background color conversion process was performed. 図3(B)および図5(B)に示す直線A−A上の色を示す図である。It is a figure which shows the color on the straight line AA shown to FIG. 3 (B) and FIG. 5 (B). 色補正処理のフローチャートである。It is a flowchart of a color correction process. 色補正テーブルの一例を示す図である。It is a figure which shows an example of a color correction table. 色補正テーブルの一例を示す図である。It is a figure which shows an example of a color correction table.

A.実施例:
A−1.複合機の構成:
次に、本発明の実施の形態を実施例に基づき説明する。図1は、実施例における画像処理装置としての複合機200の構成を示すブロック図である。
A. Example:
A-1. Multi-function machine configuration:
Next, embodiments of the present invention will be described based on examples. FIG. 1 is a block diagram illustrating a configuration of a multifunction machine 200 as an image processing apparatus according to an embodiment.

複合機200は、CPU210と、ハードディスクドライブやEEPROMなどの不揮発性記憶装置220と、RAMなどの揮発性記憶装置230と、所定の方式(例えば、インクジェット、レーザー)で画像を印刷するプリンタ部240と、光電変換素子(例えば、CCD、CMOS)を用いて原稿を読み取るスキャナ部250と、タッチパネルやボタンなどの操作部260と、タッチパネルと重畳された液晶パネルなどの表示部270と、デジタルカメラ300やパーソナルコンピュータ400やUSBメモリ(図示省略)などの外部装置とデータ通信を行うための通信部280と、を備えている。   The multifunction device 200 includes a CPU 210, a nonvolatile storage device 220 such as a hard disk drive or an EEPROM, a volatile storage device 230 such as a RAM, and a printer unit 240 that prints an image by a predetermined method (for example, inkjet or laser). , A scanner unit 250 that reads a document using a photoelectric conversion element (for example, CCD, CMOS), an operation unit 260 such as a touch panel and buttons, a display unit 270 such as a liquid crystal panel superimposed on the touch panel, a digital camera 300, A communication unit 280 for performing data communication with an external device such as a personal computer 400 or a USB memory (not shown).

揮発性記憶装置230には、CPU210が処理を行う際に生成される種々の中間データを一時的に格納するバッファ領域231が設けられている。不揮発性記憶装置220は、複合機200を制御するためのコンピュータプログラム222を格納している。コンピュータプログラム222は、例えば、CD−ROMなどに記録された形態で提供され得る。   The volatile storage device 230 is provided with a buffer area 231 for temporarily storing various intermediate data generated when the CPU 210 performs processing. The nonvolatile storage device 220 stores a computer program 222 for controlling the multifunction device 200. The computer program 222 can be provided in a form recorded on a CD-ROM, for example.

CPU210は、コンピュータプログラム222を実行することにより、後述する画像処理を実行する画像処理部100と、プリンタ部240やスキャナ部250を制御する装置制御部20として機能する。画像処理部100は、画像データ取得部110と、変換部120と、特徴値取得部130と、判断部140と、特定部150と、補正部160と、を備えている。   The CPU 210 executes the computer program 222 to function as an image processing unit 100 that executes image processing to be described later, and a device control unit 20 that controls the printer unit 240 and the scanner unit 250. The image processing unit 100 includes an image data acquisition unit 110, a conversion unit 120, a feature value acquisition unit 130, a determination unit 140, a specification unit 150, and a correction unit 160.

A−2.画像処理:
画像処理部100は、文字、写真、図形などのオブジェクトを表すオブジェクト画像と、オブジェクト画像の背景を表す背景を表す画像データに対して、画像処理を実行する。この画像処理は、背景画像の色を変換する処理と、オブジェクト画像と背景画像とが隣接する境界近傍の領域である境界領域の色を補正する処理とを含んでいる。この画像処理は、例えば、画像データが表す画像を、プリンタ部240を用いて印刷する印刷指示を利用者から受け付けた場合に、印刷に先立って印刷対象の画像データに対して実行される。この印刷指示は、外部機器(例えば、パーソナルコンピュータ400(図1))から送信される印刷ジョブであっても良いし、スキャナ部250を用いて原稿を読み取ることによって画像データ(スキャンデータ)を生成し、当該スキャンデータを用いた印刷を指示するコピー指示であっても良い。
A-2. Image processing:
The image processing unit 100 performs image processing on an object image representing an object such as a character, a photograph, or a figure, and image data representing a background representing the background of the object image. This image processing includes processing for converting the color of the background image and processing for correcting the color of the boundary area, which is an area near the boundary where the object image and the background image are adjacent to each other. This image processing is executed on image data to be printed prior to printing, for example, when a print instruction for printing an image represented by the image data using the printer unit 240 is received from the user. This print instruction may be a print job transmitted from an external device (for example, the personal computer 400 (FIG. 1)), or image data (scan data) is generated by reading a document using the scanner unit 250. Alternatively, it may be a copy instruction instructing printing using the scan data.

本実施例の画像処理の処理対象とする画像データ(対象画像データ)は、例えば、スキャナ部250やデジタルカメラ300(図1)などの画像生成装置によって生成された画像データである。本実施例の画像処理は、単色で表現されることが多いオブジェクト(例えば、文字)を含む原稿をスキャナ部250などの画像読取装置を用いて読み取ることによって生成されたスキャンデータを、対象画像データの一例として想定している。   The image data (target image data) to be processed in the image processing of the present embodiment is image data generated by an image generation device such as the scanner unit 250 or the digital camera 300 (FIG. 1), for example. In the image processing of this embodiment, scan data generated by reading an original including an object (for example, a character) often expressed in a single color by using an image reading device such as the scanner unit 250 is converted into target image data. As an example.

図2は、画像処理のフローチャートである。
ステップS10では、画像処理部100は、対象画像データを取得する。例えば、印刷ジョブを受け付けたことに応じて画像処理が開始された場合には、画像データ取得部110は、当該印刷ジョブに含まれる画像データ(例えば、パーソナルコンピュータ400に保存されていたスキャンデータ)を、対象画像データとして取得する。また、コピー指示を受け付けたことに応じて画像処理が開始された場合には、画像データ取得部110は、利用者によって用意された原稿を、スキャナ部250を用いて読み取ることによってスキャンデータ生成し、当該スキャンデータを、対象画像データとして取得する。対象画像データは、例えば、RGBの各成分値(例えば、256階調)を含む画素データによって構成されたRGB画像データである。
FIG. 2 is a flowchart of image processing.
In step S10, the image processing unit 100 acquires target image data. For example, when image processing is started in response to receiving a print job, the image data acquisition unit 110 includes image data included in the print job (for example, scan data stored in the personal computer 400). Are acquired as target image data. When image processing is started in response to receiving a copy instruction, the image data acquisition unit 110 generates scan data by reading a document prepared by a user using the scanner unit 250. The scan data is acquired as target image data. The target image data is, for example, RGB image data composed of pixel data including RGB component values (for example, 256 gradations).

図3は、対象画像データの一例を示す図である。図3(A)は、対象画像データが表す対象画像50の全体図である。この対象画像50は、4つのオブジェクト画像、すなわち、文字列「SAMPLE」を表す第1文字画像52と、文字列「EFGH」を表す第2文字画像53と、文字列「WXY」を表す第3文字画像54と、写真画像57と、を、部分画像として含んでいる。3つの文字画像52、53、54は、それぞれ、実質的に単色で表された単色画像であり、写真画像57は、複数の色を含む多色画像である。   FIG. 3 is a diagram illustrating an example of target image data. FIG. 3A is an overall view of the target image 50 represented by the target image data. The target image 50 includes four object images, that is, a first character image 52 representing the character string “SAMPLE”, a second character image 53 representing the character string “EFGH”, and a third character image representing the character string “WXY”. A character image 54 and a photographic image 57 are included as partial images. Each of the three character images 52, 53, and 54 is a monochromatic image substantially represented by a single color, and the photographic image 57 is a multicolor image including a plurality of colors.

ここで、実質的に単色であるとは、例えば、観察者が、通常の観察距離で、オブジェクト画像を観察した場合に、当該オブジェクト画像に表現されたオブジェクトが単色であると認識する程度に近似した色で、当該オブジェクトが表現されていることを含む。例えば、文字画像が実質的に単色であるとは、文字画像の場合には、当該文字を読むときの観察距離で目視した場合に、当該文字が単色であると認識する程度に近似した色で、当該文字が表されていることを含む。さらに、上述した基準で実質的に単色であると判断されるオブジェクトを含む原稿を、スキャナなどの画像読取装置で読み取ったスキャンデータに含まれる当該オブジェクトを表すオブジェクト画像は、さらに、原稿と比較して、読み取りのばらつきによって生じる色の違いが発生し得る。当該スキャンデータに含まれるオブジェクト画像は、実質的に単色であるオブジェクトを表すオブジェクト画像に含まれる。   Here, the term “substantially monochromatic” means that, for example, when an observer observes an object image at a normal observation distance, the object represented in the object image is recognized as monochromatic. This includes that the object is expressed in the selected color. For example, a character image that is substantially monochromatic is a color that is close enough to recognize that the character is monochromatic when viewed at an observation distance when reading the character. , Including that the character is represented. Further, the object image representing the object included in the scan data obtained by reading the document including the object determined to be substantially monochrome according to the above-described standard with an image reading device such as a scanner is further compared with the document. Thus, color differences caused by reading variations can occur. The object image included in the scan data is included in an object image that represents an object that is substantially monochrome.

さらに、対象画像50は、3つの背景画像、すなわち、文字画像52の背景を表す第1背景画像55と、第2文字画像53と写真画像57の背景を表す第2背景画像51と、第3文字画像54の背景を表す第3背景画像56を、部分画像として含んでいる。背景画像は、オブジェクト画像の周囲の全部または一部を囲むように、オブジェクト画像に隣接している部分画像である。一般的には、背景画像は、実質的に単色で、特定のオブジェクト(文字、図形、写真など)を表さない画像であり、下地画像とも呼ぶ。第2背景画像51は、白色であり、第1背景画像55と第3背景画像56は、白色とは異なる色を有している。   Furthermore, the target image 50 includes three background images, that is, a first background image 55 representing the background of the character image 52, a second background image 51 representing the background of the second character image 53 and the photographic image 57, and a third image. A third background image 56 representing the background of the character image 54 is included as a partial image. The background image is a partial image adjacent to the object image so as to surround all or part of the periphery of the object image. In general, a background image is an image that is substantially monochromatic and does not represent a specific object (characters, figures, photographs, etc.), and is also referred to as a background image. The second background image 51 is white, and the first background image 55 and the third background image 56 have a color different from white.

図3(B)は、第1文字画像52の一部(文字Lの近傍)を拡大した概略拡大図を示している。図3(B)に示すように、第1文字画像52と、第1文字画像52に隣接する第1背景画像55との境界に位置する境界領域MGは、第1文字画像52の色と第1背景画像55の色とは異なる色を有する場合がある。例えば、境界領域MGの中間色は、画像読取装置の解像度、読み取り速度、イメージセンサの特性などの読み取り特性に起因して発生する。例えば、一般的な画像読取装置は、イメージセンサの原稿に対する位置を副走査方向に移動させながら、イメージセンサによって原稿からの光を受光して、画像データを生成する。このとき、境界領域MGの画素データは、文字からの光と、背景からの光との両方に基づいて生成され得る。この結果、境界領域MGの色は、原稿の文字の色と背景の色との混色によって生じる色を有し得る。例えば、第1文字画像52の色が黒で、第1背景画像55の色が比較的薄い赤である場合には、境界領域MGの色は、比較的濃い赤を含み得る。   FIG. 3B shows a schematic enlarged view in which a part of the first character image 52 (near the character L) is enlarged. As shown in FIG. 3B, the boundary region MG located at the boundary between the first character image 52 and the first background image 55 adjacent to the first character image 52 is the same as the color of the first character image 52. In some cases, the background image 55 has a color different from that of the background image 55. For example, the intermediate color of the boundary region MG is generated due to reading characteristics such as the resolution of the image reading apparatus, the reading speed, and the characteristics of the image sensor. For example, a general image reading apparatus generates image data by receiving light from a document by the image sensor while moving the position of the image sensor relative to the document in the sub-scanning direction. At this time, the pixel data of the boundary region MG can be generated based on both the light from the character and the light from the background. As a result, the color of the boundary region MG may have a color that is generated by mixing the character color of the document with the background color. For example, when the color of the first character image 52 is black and the color of the first background image 55 is relatively light red, the color of the boundary region MG may include a relatively dark red.

ステップS20では、変換部120は、対象画像データに対して背景色変換処理を実行する。本実施例の背景色変換処理は、対象画像データに対して色変換処理を実行して、背景画像の色を、特定値によって表される特定色(本実施例では、白色(R、G、B)=(255、255、255))に変換する処理である。   In step S20, the conversion unit 120 performs a background color conversion process on the target image data. The background color conversion process of the present embodiment executes the color conversion process on the target image data, and changes the color of the background image to a specific color (white (R, G, B) = (255, 255, 255)).

対象画像データの各画素データは、RGB表色系を構成する3つの成分値(RGBの各値)を含んでいるので、対象画像データは、3つの成分画像データを含んでいるということができる。成分画像データは、3つ成分値のうちの1つの成分値で構成される画像データである。背景色変換処理は、それぞれ独立して実行される3つの成分色変換処理を含む。すなわち、変換部120は、3つの成分画像データのそれぞれに対して、色変換テーブルを用いた成分色変換処理を、独立して実行する。ここで、成分色変換処理が独立して実行されるとは、1つの成分画像データの画素値(例えば、R値)を変換するために、他の成分画像データの画素値(例えば、G値やB値)を考慮しないということである。   Since each pixel data of the target image data includes three component values (RGB values) constituting the RGB color system, it can be said that the target image data includes three component image data. . The component image data is image data composed of one component value among the three component values. The background color conversion process includes three component color conversion processes executed independently of each other. That is, the conversion unit 120 independently executes component color conversion processing using a color conversion table for each of the three component image data. Here, the component color conversion processing is executed independently, in order to convert the pixel value (for example, R value) of one component image data, the pixel value (for example, G value) of other component image data. Or B value).

図4は、成分色変換処理に用いられる色変換テーブルの一例を示す図である。この色変換テーブルRTは、第1の閾値TH1から最大階調値(255)までの変更範囲CR(TH1<Vin≦255)内の入力階調値Vinの変化に対応して、出力階調値Voutを全て最大階調値(255)に変更する。色変換テーブルRTは、最小値(0)から第2の閾値TH2までの維持範囲SR(0≦Vin<TH2)内の入力階調値Vinの変化に対応して、出力階調値Voutを同じ階調値に維持する。さらに、色変換テーブルRTは、第2の閾値TH2から第1の閾値TH1までの調整範囲MR(TH2≦Vin≦TH1)において、入力階調値Vinの第2の閾値TH2から第1の閾値TH1までの変化に対応して、出力階調値Voutが第2の閾値TH2から最大階調値(255)まで連続的に変化するように、出力階調値Voutが設定されている。これによって、色変換テーブルRTは、閾値TH1、TH2の前後を含む全階調範囲で、入力階調値Vinの変化に対して、出力階調値Voutが連続的に変化に変化するように、設定されている。   FIG. 4 is a diagram illustrating an example of a color conversion table used for component color conversion processing. This color conversion table RT corresponds to the change of the input gradation value Vin within the change range CR (TH1 <Vin ≦ 255) from the first threshold TH1 to the maximum gradation value (255). Vout is all changed to the maximum gradation value (255). The color conversion table RT has the same output gradation value Vout corresponding to the change of the input gradation value Vin within the maintenance range SR (0 ≦ Vin <TH2) from the minimum value (0) to the second threshold value TH2. Maintain the gradation value. Further, the color conversion table RT has an input gradation value Vin from the second threshold value TH2 to the first threshold value TH1 in the adjustment range MR (TH2 ≦ Vin ≦ TH1) from the second threshold value TH2 to the first threshold value TH1. The output gradation value Vout is set so that the output gradation value Vout continuously changes from the second threshold value TH2 to the maximum gradation value (255) corresponding to the change up to. Accordingly, the color conversion table RT is configured so that the output gradation value Vout continuously changes with respect to the change of the input gradation value Vin in the entire gradation range including before and after the thresholds TH1 and TH2. Is set.

図4の色変換テーブルRTは、式で表すと、
Vout=Vin、(0≦Vin<TH2)
Vout={(255−TH2)/(TH1−TH2)}×(Vin−TH2)+TH2、(TH2≦Vin≦TH1)
Vout=255、(TH1<Vin≦255)
と表すことができる。
The color conversion table RT shown in FIG.
Vout = Vin, (0 ≦ Vin <TH2)
Vout = {(255−TH2) / (TH1−TH2)} × (Vin−TH2) + TH2, (TH2 ≦ Vin ≦ TH1)
Vout = 255, (TH1 <Vin ≦ 255)
It can be expressed as.

成分色変換処理は、色変換テーブルRTを用いて、処理対象の成分画像データの全ての画素値(対象画像50に含まれる全ての画素の処理対象成分値)に対して実行される。各成分変換処理は、共通の色変換テーブルRTを用いて実行されても良いし、成分(RGB)ごとに定められた色変換テーブルRTを用いて実行されても良い。各成分の色変換テーブルRTは、例えば、閾値TH1、TH2がそれぞれ異なっていても良い。   The component color conversion process is executed for all pixel values of the processing target component image data (processing target component values of all pixels included in the target image 50) using the color conversion table RT. Each component conversion process may be executed using a common color conversion table RT, or may be executed using a color conversion table RT determined for each component (RGB). The color conversion table RT for each component may have different threshold values TH1 and TH2, for example.

ここで、典型的な文書のように、対象画像50の各オブジェクト画像(図3)は、比較的濃い色(RGBの各値が比較的小さい値である色)で表され、各背景画像は、比較的薄い色(RGBの各値が比較的大きい値である色)で表されているものとする。背景色変換処理は、対象画像50のような画像を表す画像データを処理対象として想定している。このため、色変換テーブルRTの閾値TH1、TH2は、オブジェクト画像の画素値として想定されるRGBの各値より大きく、かつ、背景画像の画素値として想定されるRGBの各値より小さい値に、設定されている。例えば、第1の閾値TH1は、210に設定され、第2の閾値TH2は、190に設定されている。この結果、背景色変換処理は、処理対象として想定している画像データが表す画像に含まれる背景画像の色を特定色に変換することができる。このような背景色変換処理は、例えば、文字文書のように、背景画像の色が重要ではない画像を印刷する際に、当該背景画像の色を白色に変換するため実行される(いわゆる背景除去処理や下地除去処理)。この結果、背景色変換処理後の画像データを用いて画像を印刷すれば、印刷に要する印刷材(トナーやインク)の量を低減することができる。   Here, like a typical document, each object image (FIG. 3) of the target image 50 is represented by a relatively dark color (a color in which each RGB value is a relatively small value), and each background image is It is assumed that the color is expressed by a relatively light color (a color in which each RGB value is a relatively large value). The background color conversion process assumes image data representing an image such as the target image 50 as a processing target. For this reason, the thresholds TH1 and TH2 of the color conversion table RT are larger than the RGB values assumed as the pixel values of the object image and smaller than the RGB values assumed as the pixel values of the background image. Is set. For example, the first threshold value TH1 is set to 210, and the second threshold value TH2 is set to 190. As a result, the background color conversion process can convert the color of the background image included in the image represented by the image data assumed as the processing target into a specific color. Such background color conversion processing is executed to convert the color of the background image to white when printing an image where the color of the background image is not important, such as a character document (so-called background removal). Processing and ground removal processing). As a result, if an image is printed using the image data after the background color conversion process, the amount of printing material (toner or ink) required for printing can be reduced.

図5は、背景色変換処理が実行された後の対象画像データを示す図である。ここで、背景色変換処理が実行された後の対象画像データを、変換画像データとも呼び、背景色変換処理が実行される前の対象画像データを、原画像データとも呼ぶ。図5(A)は、変換画像データが表す変換画像60の全体図である。ここで、変換画像60に含まれる部分画像の符号の2桁目には、「6」を用い、1桁目には、図3(A)に示す原画像50における対応する部分画像の符号の1桁目と同じ数字を用いる。変換画像60に含まれる部分画像の名称には、原画像50における対応する部分画像と同一の名称を用いる。例えば、変換画像60の第1文字画像62、第2文字画像63は、それぞれ、原画像50の第1文字画像52、第2文字画像53に対応している(図3、図5)。   FIG. 5 is a diagram illustrating the target image data after the background color conversion process is executed. Here, the target image data after the background color conversion process is executed is also called converted image data, and the target image data before the background color conversion process is executed is also called original image data. FIG. 5A is an overall view of the converted image 60 represented by the converted image data. Here, “6” is used for the second digit of the code of the partial image included in the converted image 60, and the code of the corresponding partial image in the original image 50 shown in FIG. Use the same number as the first digit. As the name of the partial image included in the converted image 60, the same name as the corresponding partial image in the original image 50 is used. For example, the first character image 62 and the second character image 63 of the converted image 60 correspond to the first character image 52 and the second character image 53 of the original image 50, respectively (FIGS. 3 and 5).

変換画像60の4つのオブジェクト画像(文字画像62、63、64、写真画像67)は、背景色変換処理によって3つの成分(RGB)の全ての値が255に変更されずに、色が維持されている。ただし、オブジェクト画像は、色変換テーブルRTの調整範囲MRを用いて成分値が調整されている画素が含まれ得る。第1背景画像65の色は、背景色変換処理によって3つの成分の全ての値が255にされた結果、白色に変更されている。第3背景画像66の色は、背景色変換処理によって3つの成分の一部の値(例えば、R値とG値)が255に変更され、残りの値(例えば、B値)が維持された結果、白色とは異なる色に変更されている。第1背景画像65および第3背景画像66のように、実質的な色変更が行われた背景画像を変更背景画像と呼ぶ。第2背景画像61の色は、背景色変換処理によって実質的に変更されておらず、白色に維持されている。ただし、対象画像50の第2背景画像51が、ムラ(色のばらつき)を含む場合には、変換画像60の第2背景画像61は、色変換処理によってムラが除去されている。第2背景画像61のように、白色に維持された背景画像、すなわち、背景色変換処理の前後で色が変更されていない背景画像を、維持背景画像とも呼ぶ。   The four object images (character images 62, 63, 64, and photographic image 67) of the converted image 60 are maintained in color without changing all the values of the three components (RGB) to 255 by the background color conversion process. ing. However, the object image may include pixels whose component values have been adjusted using the adjustment range MR of the color conversion table RT. The color of the first background image 65 is changed to white as a result of all the values of the three components being set to 255 by the background color conversion process. As for the color of the third background image 66, the values of some of the three components (for example, the R value and the G value) are changed to 255 by the background color conversion process, and the remaining values (for example, the B value) are maintained. As a result, it has been changed to a color different from white. Background images that have undergone substantial color change, such as the first background image 65 and the third background image 66, are referred to as changed background images. The color of the second background image 61 is not substantially changed by the background color conversion process, and is kept white. However, when the second background image 51 of the target image 50 includes unevenness (color variation), the unevenness is removed from the second background image 61 of the converted image 60 by the color conversion process. Like the second background image 61, a background image that is maintained in white, that is, a background image that has not been changed in color before and after the background color conversion process is also referred to as a maintenance background image.

図5(B)は、図3(B)と同様に、第1文字画像62の一部(文字Lの近傍)を拡大した概略拡大図を示している。第1文字画像62と、第1背景画像65との境界に位置する境界領域MGの色は、背景色変換処理によっても維持される。変換画像60を見た観察者は、境界領域MGの色は不自然に感じる可能性がある。例えば、上述したように、境界領域MGの色は、原稿の文字の色と背景の色との混色によって生じる色を有し得る。上述した原画像50において、第1文字画像52の色が黒であり、第1背景画像55の色が比較的薄い赤であり、境界領域MGの色は、比較的濃い赤を含む例を考える。この場合には、原画像50では、境界領域MGの濃い赤色は、第1文字画像52の黒色と、第1背景画像55の薄い赤と、の両方に関連がある色であるので、観察者には目立ちにくい。そして、原画像50では、境界領域MGの濃い赤色は、観察者に対して、不自然な印象を与えにくく、むしろ、自然な印象を与える場合もある。しかし、変換画像60では、境界領域MGの濃い赤色は、色変換後の第1背景画像65の色(白色)とは、関連が薄いため、目立ちやすく、不自然な印象を与えやすい。   FIG. 5B shows a schematic enlarged view in which a part of the first character image 62 (in the vicinity of the character L) is enlarged as in FIG. 3B. The color of the boundary region MG located at the boundary between the first character image 62 and the first background image 65 is also maintained by the background color conversion process. An observer who has seen the converted image 60 may feel the color of the boundary region MG unnatural. For example, as described above, the color of the boundary region MG may have a color generated by a color mixture of the character color of the document and the background color. In the original image 50 described above, an example is considered in which the color of the first character image 52 is black, the color of the first background image 55 is relatively light red, and the color of the boundary region MG includes relatively dark red. . In this case, in the original image 50, the deep red color of the boundary region MG is a color related to both the black color of the first character image 52 and the light red color of the first background image 55. Inconspicuous. In the original image 50, the deep red color of the boundary region MG hardly gives an unnatural impression to the observer, but may give a natural impression. However, in the converted image 60, the deep red color of the boundary region MG is not easily related to the color (white color) of the first background image 65 after color conversion, so that it tends to stand out and give an unnatural impression.

図6は、図3(B)および図5(B)に示す直線A−A上の色(RGB値)をYCbCr表色系に変換した値を示す図である。図6(A)のグラフにおいて、実線YC1は、原画像50の輝度値Yを示し、破線YC2は、変換画像60の輝度値Yを示している。図6(B)のグラフにおいて、実線RC1は、原画像50のクロマ値Crを示し、破線RC2は、変換画像60のクロマ値Crを示している。破線YC2およびRC2は、変換画像60と原画像50との間で(背景色変換処理の前後で)異なる部分だけを図示している。変換画像60の輝度値Yおよびクロマ値Crのうち、破線YC2およびRC2で図示していない部分の輝度値Yおよびクロマ値Crは、実線YC1およびRC1で示す原画像50の輝度値と同じである。なお、後述するが、一点破線RC3は、変換画像60に対して後述する色補正処理を実行した後のクロマ値Crを示している。   FIG. 6 is a diagram showing values obtained by converting the colors (RGB values) on the line AA shown in FIGS. 3B and 5B into the YCbCr color system. In the graph of FIG. 6A, the solid line YC1 indicates the luminance value Y of the original image 50, and the broken line YC2 indicates the luminance value Y of the converted image 60. In the graph of FIG. 6B, the solid line RC1 indicates the chroma value Cr of the original image 50, and the broken line RC2 indicates the chroma value Cr of the converted image 60. Dashed lines YC2 and RC2 show only portions that are different between the converted image 60 and the original image 50 (before and after the background color conversion process). Of the luminance value Y and chroma value Cr of the converted image 60, the luminance value Y and chroma value Cr of portions not shown by the broken lines YC2 and RC2 are the same as the luminance value of the original image 50 indicated by the solid lines YC1 and RC1. . As will be described later, a one-dot broken line RC3 indicates a chroma value Cr after a color correction process described later is performed on the converted image 60.

原画像50のオブジェクト画像(例えば、第1文字画像52)の色をYCbCr表色系で表した色値(YCC値とも呼ぶ)を(TC_Y、TC_Cb、TC_Cr)とする。変換画像60のオブジェクト画像(例えば、第1文字画像62)の色は、原画像50のオブジェクト画像の色と同じである。原画像50の背景画像(例えば、第1背景画像55)の色を表すYCC値を、(BC_Y1、BC_Cb1、BC_Cr1)とする。変換画像60の背景画像(例えば、第1背景画像65)の色を表すYCC値を、(BC_Y2、BC_Cb2、BC_Cr2)とする。   The color values (also referred to as YCC values) representing the color of the object image (for example, the first character image 52) of the original image 50 in the YCbCr color system are referred to as (TC_Y, TC_Cb, TC_Cr). The color of the object image (for example, the first character image 62) of the converted image 60 is the same as the color of the object image of the original image 50. The YCC value representing the color of the background image (for example, the first background image 55) of the original image 50 is (BC_Y1, BC_Cb1, BC_Cr1). The YCC value representing the color of the background image (for example, the first background image 65) of the converted image 60 is (BC_Y2, BC_Cb2, BC_Cr2).

図6(A)に示すように、原画像50の輝度値Yは、実質的に単色である第1文字画像52において、ほぼ一定値TC_Yであり、実質的に単色である第1背景画像55において、ほぼ一定値BC_Y1である。実際には、第1文字画像52と第1背景画像55の輝度値Yは、ばらつきによる変動を含むが図6(A)では、図の煩雑を避けるために、一定値として示している。境界領域MGの輝度値Yは、第1文字画像52と接する第1位置P1において、ほぼ第1文字画像52の輝度値TC_Yと同じであり、第1背景画像55と接する第2位置P2において、ほぼ第1背景画像55の輝度値BC_Y1と同じである。そして、第1位置P1と第2位置P2との間の位置では、境界領域MGの輝度値Yは、位置が第1位置P1に近いほどTC_Yに近くなり、第2位置P2に近いほどBC_Y1に近くなるように、変化する傾向がある。この変化の傾向は、ばらつきなどによって、必ずしも直線的であるとは限らないが、図6(A)では、図の煩雑を避けるために、直線で示している。   As shown in FIG. 6A, the luminance value Y of the original image 50 is substantially constant TC_Y in the first character image 52 that is substantially monochromatic, and the first background image 55 that is substantially monochromatic. Is a substantially constant value BC_Y1. Actually, the luminance value Y of the first character image 52 and the first background image 55 includes fluctuation due to variation, but in FIG. 6A, it is shown as a constant value in order to avoid complication of the drawing. The luminance value Y of the boundary region MG is substantially the same as the luminance value TC_Y of the first character image 52 at the first position P1 in contact with the first character image 52, and at the second position P2 in contact with the first background image 55. It is almost the same as the luminance value BC_Y1 of the first background image 55. Then, at a position between the first position P1 and the second position P2, the luminance value Y of the boundary region MG is closer to TC_Y as the position is closer to the first position P1, and to BC_Y1 as the position is closer to the second position P2. There is a tendency to change to be closer. The tendency of this change is not necessarily linear due to variations or the like, but in FIG. 6A, it is shown as a straight line in order to avoid the complexity of the figure.

また、変換画像60の輝度値Yは、第1文字画像52において、原画像50と同じであり、第1背景画像55において、一定値BC_Y2になる。BC_Y2は、白色の輝度値であるので、BC_Y1より大きい値である。変換画像60の境界領域MGの輝度値Yは、第2位置P2の近傍で、輝度値Yが非連続とならないように、原画像50における値から変化している。これは、背景色変換処理の色変換テーブルRT(図4)の調整範囲MRによって画素値が調整されるためである。変換画像60の境界領域MGの輝度値Yは、第2位置P2の近傍を除いた範囲では、原画像50の境界領域MGの輝度値Yと同じである。全体として、変換画像60の境界領域MGの輝度値Yは、原画像50の境界領域MGの輝度値Yと同様に、第1位置P1から第2位置P2に向かって、位置が第1位置P1に近いほどTC_Yに近くなり、第2位置P2に近いほどBC_Y2に近くなるように、変化している。   Further, the luminance value Y of the converted image 60 is the same as that of the original image 50 in the first character image 52, and becomes a constant value BC_Y2 in the first background image 55. Since BC_Y2 is a white luminance value, it is larger than BC_Y1. The luminance value Y of the boundary region MG of the converted image 60 changes from the value in the original image 50 so that the luminance value Y does not become discontinuous in the vicinity of the second position P2. This is because the pixel value is adjusted by the adjustment range MR of the color conversion table RT (FIG. 4) of the background color conversion process. The luminance value Y of the boundary region MG of the converted image 60 is the same as the luminance value Y of the boundary region MG of the original image 50 in a range excluding the vicinity of the second position P2. As a whole, the luminance value Y of the boundary region MG of the converted image 60 is the same as the luminance value Y of the boundary region MG of the original image 50 from the first position P1 toward the second position P2. Is closer to TC_Y, and closer to BC_Y2 is closer to the second position P2.

このように、境界領域MGの輝度値Yは、変換画像60においても変化の傾向が維持される。また、本実施例の背景色変換処理は、オブジェクト画像の輝度値Yが比較的低く(濃い色である)、背景画像の輝度値Yが比較的高い(薄い色である)場合に、背景画像の輝度値Yをさらに高くする(例えば、白色に変換する)処理である。このため、背景色変換処理による輝度値Yの変化量は、比較的小さい。輝度値Yは、一般的に、変換画像60の境界領域MGが不自然な印象を与える原因とはならない。   Thus, the tendency of change in the luminance value Y of the boundary region MG is also maintained in the converted image 60. Also, the background color conversion processing of the present embodiment is performed when the luminance value Y of the object image is relatively low (dark color) and the luminance value Y of the background image is relatively high (light color). Is a process of further increasing the luminance value Y of (for example, converting to white). For this reason, the change amount of the luminance value Y by the background color conversion process is relatively small. The luminance value Y generally does not cause the boundary region MG of the converted image 60 to give an unnatural impression.

図6(B)に示すように、原画像50のクロマ値Crは、第1文字画像52において、ほぼ一定値TC_Crであり、第1背景画像55において、ほぼ一定値BC_Cr1である。実際には、輝度値Yと同様に、第1文字画像52と第1背景画像55のクロマ値Crは、ばらつきによる変動を含むが図6(B)では、一定値として示している。原画像50の境界領域MGのクロマ値Crは、第1位置P1において、ほぼ第1文字画像52の輝度値TC_Crと同じであり、第2位置P2において、ほぼ第1背景画像55の輝度値BC_Cr1と同じである。そして、第1位置P1と第2位置P2との間の位置では、境界領域MGのクロマ値Crは、第1位置P1に近いほどTC_Crに近くなり、第2位置P2に近いほどBC_Cr1に近くなるように、変化する傾向がある。この変化の傾向は、ばらつきなどによって、必ずしも直線的であるとは限らないが、図6(B)では、図の煩雑を避けるために、直線で示している。   As shown in FIG. 6B, the chroma value Cr of the original image 50 is a substantially constant value TC_Cr in the first character image 52, and is a substantially constant value BC_Cr1 in the first background image 55. Actually, like the luminance value Y, the chroma values Cr of the first character image 52 and the first background image 55 include fluctuations due to variations, but are shown as constant values in FIG. 6B. The chroma value Cr of the boundary region MG of the original image 50 is substantially the same as the luminance value TC_Cr of the first character image 52 at the first position P1, and is substantially the luminance value BC_Cr1 of the first background image 55 at the second position P2. Is the same. At a position between the first position P1 and the second position P2, the chroma value Cr of the boundary region MG is closer to TC_Cr as it is closer to the first position P1, and closer to BC_Cr1 as it is closer to the second position P2. As such, there is a tendency to change. The tendency of this change is not necessarily linear due to variations or the like, but in FIG. 6B, it is shown as a straight line in order to avoid complication of the figure.

変換画像60のクロマ値Crは、第1文字画像62において、原画像50と同じであり、第1背景画像65において、一定値BC_Cr2になる。第1背景画像65の色は、本実施例では、白色であるので、BC_Cr2は、「0」である。したがって、例えば、原画像50の第1背景画像55の色が、比較的彩度が高い色である場合(BC_Cr1が比較的大きい値である場合)には、背景色変換処理によって、クロマ値Crは、大きく変化することが解る(図6(B))。変換画像60の境界領域MGのクロマ値Crは、第2位置P2の近傍で、クロマ値Crが非連続とならないように、原画像50における値から変化している。これは、背景色変換処理の色変換テーブルRT(図4)の調整範囲MRによって画素値が調整されるためである。そして、変換画像60の境界領域MGのクロマ値Crは、第2位置P2の近傍を除いた範囲では、原画像50の境界領域MGのクロマ値Crと同じである。この結果、図6(B)の例のように、背景色変換処理によって、クロマ値Crが大きく変化する場合には、境界領域MGにおけるクロマ値Crの上述した変化の傾向が崩れていることが解る。例えば、図6(B)の例では、変換画像60の境界領域MGのクロマ値Crは、第1位置P1に近いほどTC_Crに近くなり、第2位置P2に近いほどBC_Cr2に近くなるのではなく、第1位置P1から第2位置P2までの間に、極大値が存在していることが解る。なお、このような変化は、もう1つのクロマ値Cbについても、クロマ値Crと同様に起こり得る。このようなクロマ値Cr、Cbの特徴に起因して、変換画像60の境界領域MGの色が不自然な色を含む場合がある。以下では、変換画像60の境界領域MGの色に生じ得る不自然な色を補正する一連の処理について説明する。   The chroma value Cr of the converted image 60 is the same as that of the original image 50 in the first character image 62, and becomes a constant value BC_Cr2 in the first background image 65. Since the color of the first background image 65 is white in the present embodiment, BC_Cr2 is “0”. Therefore, for example, when the color of the first background image 55 of the original image 50 is a color with relatively high saturation (when BC_Cr1 is a relatively large value), the chroma value Cr is obtained by the background color conversion process. Can be seen to change greatly (FIG. 6B). The chroma value Cr in the boundary region MG of the converted image 60 changes from the value in the original image 50 so that the chroma value Cr does not become discontinuous in the vicinity of the second position P2. This is because the pixel value is adjusted by the adjustment range MR of the color conversion table RT (FIG. 4) of the background color conversion process. Then, the chroma value Cr of the boundary region MG of the converted image 60 is the same as the chroma value Cr of the boundary region MG of the original image 50 in a range excluding the vicinity of the second position P2. As a result, as in the example of FIG. 6B, when the chroma value Cr changes greatly due to the background color conversion process, the above-described tendency of the change of the chroma value Cr in the boundary region MG may be disrupted. I understand. For example, in the example of FIG. 6B, the chroma value Cr of the boundary region MG of the converted image 60 is not closer to TC_Cr as it is closer to the first position P1, but closer to BC_Cr2 as it is closer to the second position P2. It can be seen that a maximum value exists between the first position P1 and the second position P2. Such a change can occur in the other chroma value Cb as well as the chroma value Cr. Due to the characteristics of the chroma values Cr and Cb, the color of the boundary region MG of the converted image 60 may include an unnatural color. Hereinafter, a series of processes for correcting an unnatural color that may occur in the color of the boundary region MG of the converted image 60 will be described.

図2に戻って、説明する。背景色変換処理に続いて、ステップS30では、特定部150は、画素特定処理を実行する。画素特定処理は、変換画像60に含まれる複数の画素から、3種類の画素、すなわち、変更背景画素と、維持背景画素と、オブジェクト関連画素と、特定する処理である。変更背景画素は、上述した変更背景画像(図5(A)の例では、第1背景画像65と第3背景画像66)を構成する画素である。維持背景画素は、上述した維持背景画像(図5(A)の例では、第2背景画像61)を構成する画素である。オブジェクト関連画素は、上述したオブジェクト画像(図5(A)の例では、画像62、63、64、67)と、これらのオブジェクト画像に隣接する境界領域MGと、を構成する画素である。   Returning to FIG. Following the background color conversion process, in step S30, the specifying unit 150 executes a pixel specifying process. The pixel specifying process is a process of specifying, from a plurality of pixels included in the converted image 60, three types of pixels, that is, a changed background pixel, a maintenance background pixel, and an object-related pixel. The changed background pixel is a pixel constituting the above-described changed background image (in the example of FIG. 5A, the first background image 65 and the third background image 66). The maintenance background pixel is a pixel that constitutes the above-described maintenance background image (second background image 61 in the example of FIG. 5A). The object-related pixels are pixels constituting the above-described object image (images 62, 63, 64, and 67 in the example of FIG. 5A) and the boundary region MG adjacent to these object images.

具体的には、特定部150は、変換画像60を構成する複数の画素のうち、3つの成分値(RGB値)のうちの少なくとも1つの値が255である画素を特定する。特定された画素の255である成分値は、背景色変換処理によって255に変更された値(変更値)、または、背景色変換処理の前から255である値(維持値)である。特定部150は、原画像50と変換画像60とを比較して、特定された画素の255である成分値が、変更値であるか維持値であるかを判定する。特定部150は、判定対象の成分値が、変更値である場合には、当該成分値を含む画素は、変更背景画素であると特定する。特定部150は、判定対象の成分値が、維持値である場合には、当該成分値を含む画素は、維持背景画素であると特定する。特定部150は、変換画像60を構成する複数の画素のうち、変更背景画素と維持背景画素とを除いた全ての画素を、オブジェクト関連画素であると特定する。   Specifically, the specifying unit 150 specifies a pixel in which at least one of three component values (RGB values) is 255 among a plurality of pixels constituting the converted image 60. The component value that is 255 of the identified pixel is a value that has been changed to 255 by the background color conversion process (changed value), or a value that is 255 (maintenance value) before the background color conversion process. The specifying unit 150 compares the original image 50 and the converted image 60 to determine whether the component value that is 255 of the specified pixel is a change value or a maintenance value. When the component value to be determined is a changed value, the specifying unit 150 specifies that the pixel including the component value is a changed background pixel. When the determination target component value is a maintenance value, the specification unit 150 specifies that the pixel including the component value is a maintenance background pixel. The specifying unit 150 specifies all the pixels excluding the changed background pixel and the maintenance background pixel among the plurality of pixels constituting the converted image 60 as the object-related pixels.

続くステップS40では、特定部150は、特定された3種類の画素に対して識別子(番号)を付すラベリング処理を実行する。まず、特定部150は、維持背景画素に「0」、変更背景画素に「1」をラベリングする。さらに、特定部150は、互いに隣接する複数のオブジェクト関連画素をグループ化し、グループごとに、同じ識別子(2以上(N+1)以下の自然数:Nはグループの数)を付す。これによって、N個の処理領域が特定される。処理領域は、オブジェクト画像と境界領域MGとを含む領域である。例えば、図5(A)の例では、文字画像62、63、64(SAMPLE、EFGH、WXY)に含まれる13個の文字にそれぞれ対応する13個の処理領域と、写真画像67に対応する1つの処理領域と、が特定される。   In subsequent step S40, the specifying unit 150 executes a labeling process for attaching identifiers (numbers) to the three types of specified pixels. First, the identifying unit 150 labels “0” for the maintenance background pixel and “1” for the changed background pixel. Further, the specifying unit 150 groups a plurality of object-related pixels adjacent to each other, and assigns the same identifier (natural number of 2 or more (N + 1) or less: N is the number of groups) to each group. As a result, N processing regions are specified. The processing area is an area including the object image and the boundary area MG. For example, in the example of FIG. 5A, 13 processing areas respectively corresponding to 13 characters included in the character images 62, 63, 64 (SAMPLE, EFGH, WXY), and 1 corresponding to the photographic image 67. Two processing areas are identified.

続くステップS50では、画像処理部100は、色補正処理を実行する。図7は、色補正処理のフローチャートである。ステップS505では、画像処理部100は、1つの処理領域を選択する。ステップS510では、判断部140は、選択された処理領域が、閾値以上の数の変更背景画素と隣接するか否かを判断する。処理領域が閾値以上の数の変更背景画素と隣接しない場合には(ステップS510:NO)、画像処理部100は、ステップS560に移行する。すなわち、処理対象の処理領域には、色補正は実行されない。これは、処理領域が閾値以上の数の変更背景画素と隣接しない場合には、隣接する背景画像の色が変更されたことに起因する境界領域MGの不自然さが生じないため、色補正の対象とする必要性が低いからである。例えば、図5に示す例では、変換画像60の第2文字画像63に含まれる各文字(EFGH)を表す画像を含む処理領域は、色補正の対象とはされない。   In subsequent step S50, the image processing unit 100 executes color correction processing. FIG. 7 is a flowchart of the color correction process. In step S505, the image processing unit 100 selects one processing area. In step S510, the determination unit 140 determines whether the selected processing region is adjacent to a number of changed background pixels equal to or greater than a threshold value. When the processing area is not adjacent to the number of changed background pixels equal to or greater than the threshold (step S510: NO), the image processing unit 100 proceeds to step S560. That is, color correction is not performed on the processing area to be processed. This is because, when the processing area is not adjacent to the number of changed background pixels equal to or greater than the threshold value, the unnaturalness of the boundary area MG due to the change in the color of the adjacent background image does not occur. This is because the necessity of targeting is low. For example, in the example illustrated in FIG. 5, the processing region including an image representing each character (EFGH) included in the second character image 63 of the converted image 60 is not a color correction target.

処理領域が閾値以上の数の変更背景画素と隣接する場合には(ステップS510:YES)、画像処理部100の補正部160は、背景色変換処理前の背景色値(元背景色値とも呼ぶ。)を特定する(ステップS515)。具体的には、補正部160は、原画像50において、処理領域の外周を囲む周囲領域を特定し、周囲領域の画素値の平均値を元背景色値として算出する。周囲領域の幅は、所定画素数(例えば、1画素)分の大きさとされる。元背景色値は、例えば、RGB値で表され、(Rbg、Gbg、Bbg)と表す。   When the processing region is adjacent to a number of changed background pixels equal to or greater than the threshold value (step S510: YES), the correction unit 160 of the image processing unit 100 calls a background color value (also referred to as an original background color value) before the background color conversion process. .) Is specified (step S515). Specifically, the correction unit 160 specifies a surrounding region surrounding the outer periphery of the processing region in the original image 50, and calculates an average value of pixel values of the surrounding region as an original background color value. The width of the surrounding area is a size corresponding to a predetermined number of pixels (for example, one pixel). The original background color value is represented by, for example, an RGB value and is represented as (Rbg, Gbg, Bbg).

ステップS520では、補正部160は、処理領域における画素値の分散を算出する。ここで、分散を算出する際に用いられる画素は、処理領域を構成する全ての画素から、元背景色値に基準値より近い色を表す画素値(RGB値)を有する画素(背景近似画素とも呼ぶ。)を除いた画素である。除かれる画素は、例えば、画素値が、以下の式(1)〜(3)を全て満たす画素である。
Rbg−TH4<R<Rbg+TH4 ...(1)
Gbg−TH4<G<Gbg+TH4 ...(2)
Bbg−TH4<B<Bbg+TH4 ...(3)
In step S520, the correction unit 160 calculates the variance of the pixel values in the processing area. Here, the pixels used for calculating the variance are pixels (RGB background pixels) having a pixel value (RGB value) representing a color closer to the original background color value than the reference value from all the pixels constituting the processing region. This is a pixel excluding the pixel. The pixels to be excluded are pixels whose pixel values satisfy all the following expressions (1) to (3), for example.
Rbg−TH4 <R <Rbg + TH4 (1)
Gbg−TH4 <G <Gbg + TH4 (2)
Bbg−TH4 <B <Bbg + TH4 (3)

ここで、算出したい分散は、処理領域に含まれるオブジェクト画像の画素値の分散である。処理領域には、オブジェクト画像に加えて境界領域MGが含まれているので、処理領域を構成する画素から、境界領域MGを構成する画素を除いて、分散を算出することが好ましい。本処理で、背景近似画素を、分散を算出する際に用いる画素から除外しているのは、境界領域MGは、比較的、元背景色値に近い色を有すると考えられるためである。本ステップで算出される分散は、例えば、3つの成分のそれぞれについて算出される。   Here, the variance to be calculated is the variance of the pixel values of the object image included in the processing area. Since the processing region includes the boundary region MG in addition to the object image, it is preferable to calculate the variance by excluding the pixels configuring the boundary region MG from the pixels configuring the processing region. The reason why the background approximate pixel is excluded from the pixels used when calculating the variance in this process is that the boundary region MG is considered to have a color that is relatively close to the original background color value. The variance calculated in this step is calculated for each of the three components, for example.

ステップS525では、判断部140は、算出された分散を用いて、処理領域が実質的に単色であるか否かを判断する。判断部140は、例えば、成分ごとに算出された3つの分散値(σ_R、σ_G、σ_B)の全てが、対応する閾値(TR、TG、TB)以下である場合に、処理領域は実質的に単色であると判断し、3つの分散値の少なくとも1つが、対応する閾値より大きい場合に、処理領域は実質的に単色でないと判断する。多数の色を含む画像の画素値(RGB値)は、取り得る範囲のうち、比較的広い範囲に亘る値をとるので、分散値(σ_R、σ_G、σ_B)の少なくとも1つの分散が比較的大きくなる。これに対して、実質的に単色である画像の画素値は、取り得る範囲のうち、比較的狭い範囲の値となるで、分散値(σ_R、σ_G、σ_B)が比較的小さくなる。従って、閾値(TR、TG、TB)を適切に設定すれば、実質的に単色の画像であるか否かを適切に判断することができる。例えば、一般的に、多数の色を含む写真画像67は、単色でないと判断され、黒文字、赤文字などの単色の文字画像は、単色であると判断される。   In step S525, the determination unit 140 determines whether the processing region is substantially monochromatic using the calculated variance. For example, when all of the three variance values (σ_R, σ_G, σ_B) calculated for each component are equal to or less than the corresponding threshold values (TR, TG, TB), the determination unit 140 substantially determines the processing region. If it is determined to be a single color and at least one of the three variance values is greater than the corresponding threshold, it is determined that the processing region is not substantially a single color. Since pixel values (RGB values) of an image including a large number of values take values over a relatively wide range of possible ranges, at least one variance of variance values (σ_R, σ_G, σ_B) is relatively large. Become. On the other hand, the pixel value of a substantially monochromatic image is a relatively narrow range of possible ranges, and the dispersion values (σ_R, σ_G, σ_B) are relatively small. Therefore, if the threshold values (TR, TG, TB) are appropriately set, it can be appropriately determined whether the image is substantially a monochrome image. For example, generally, a photographic image 67 including a large number of colors is determined not to be a single color, and a single color character image such as a black character or a red character is determined to be a single color.

処理領域が実質的に単色でない場合には(ステップS525:NO)、補正部160は、ステップS560に移行する。すなわち、処理対象の処理領域には、色補正は実行されない。処理領域が実質的に単色である場合には(ステップS525:YES)、補正部160は、処理領域の表色系をRGB表色系からYCrCb表色系に変換する(ステップS530)。   When the processing region is not substantially monochromatic (step S525: NO), the correction unit 160 proceeds to step S560. That is, color correction is not performed on the processing area to be processed. When the processing area is substantially monochromatic (step S525: YES), the correction unit 160 converts the color system of the processing area from the RGB color system to the YCrCb color system (step S530).

ステップS540では、補正部160は、処理領域に含まれるオブジェクト画像の色値を特定する。具体的には、補正部160は、上述した分散を算出した際に用いた画素、すなわち、処理領域を構成する全ての画素から、背景近似画素を除いた画素の平均画素値(YCC値)を、オブジェクト画像の色値(TC_Y、TC_Cb、TC_Cr)として算出する。   In step S540, the correction unit 160 identifies the color value of the object image included in the processing area. Specifically, the correction unit 160 calculates the average pixel value (YCC value) of the pixels used when calculating the variance described above, that is, the pixels excluding the background approximation pixels from all the pixels constituting the processing region. The color values of the object image (TC_Y, TC_Cb, TC_Cr) are calculated.

ステップS545では、補正部160は、背景色変換処理後の背景色値(現背景色値とも呼ぶ。)を特定する。具体的には、補正部160は、変換画像60において、処理領域の外周を囲む周囲領域を特定し、周囲領域の画素値の平均値を現背景色値(BC_Y2、BC_Cb2、BC_Cr2)として算出する。周囲領域の幅は、所定画素数(例えば、1画素)分の大きさとされる。   In step S545, the correction unit 160 specifies a background color value (also referred to as a current background color value) after the background color conversion process. Specifically, the correction unit 160 specifies a surrounding region surrounding the outer periphery of the processing region in the converted image 60, and calculates an average value of pixel values of the surrounding region as the current background color value (BC_Y2, BC_Cb2, BC_Cr2). . The width of the surrounding area is a size corresponding to a predetermined number of pixels (for example, one pixel).

ステップS550では、補正部160は、処理領域を構成する全画素を、補正対象画素として色補正処理を実行する。すなわち、補正対象画素は、オブジェクト画像を構成する複数の画素と、境界領域MGを構成する複数の画素と、を含む。補正部160は、処理領域のオブジェクト画像の色値(TC_Y、TC_Cb、TC_Cr)と、周囲の背景画像の現背景色値(BC_Y2、BC_Cb2、BC_Cr2)と、を用いて、色補正テーブルを生成する。   In step S550, the correction unit 160 performs the color correction process using all pixels constituting the processing region as correction target pixels. In other words, the correction target pixel includes a plurality of pixels constituting the object image and a plurality of pixels constituting the boundary region MG. The correction unit 160 generates a color correction table using the color values (TC_Y, TC_Cb, TC_Cr) of the object image in the processing area and the current background color values (BC_Y2, BC_Cb2, BC_Cr2) of the surrounding background image. .

図8、図9は、色補正テーブルの一例を示す図である。図8は、処理領域の周囲の背景色が白((BC_Y2、BC_Cb2、BC_Cr2)=(255、0、0))である場合に、用いられるテーブルである。図9は、処理領域の周囲の背景色が白とは異なる色である場合に、用いられるテーブルである。図8(A)、図9(A)は、クロマ値Cbを補正するテーブルを示し、図8(B)、図9(B)は、もう1つのクロマ値Crを補正するテーブルを示す。   8 and 9 are diagrams illustrating an example of the color correction table. FIG. 8 is a table used when the background color around the processing area is white ((BC_Y2, BC_Cb2, BC_Cr2) = (255, 0, 0)). FIG. 9 is a table used when the background color around the processing area is a color different from white. 8A and 9A show tables for correcting the chroma value Cb, and FIGS. 8B and 9B show tables for correcting another chroma value Cr.

図8、図9に示すように、これらの色補正テーブルは、輝度値Yを入力階調値とし、クロマ値Cb、Crを出力階調値とする。補正部160は、補正対象画素の輝度値Yを用いて、色補正テーブルを参照して、補正後のクロマ値Cb、Cr(補正値)を取得する。補正部160は、補正対象画素のクロマ値Cb、Crを、補正値として取得されたクロマ値Cb、Crに変更する。補正部160は、補正対象画素の輝度値Yを変更しない。   As shown in FIGS. 8 and 9, in these color correction tables, the luminance value Y is an input gradation value, and the chroma values Cb and Cr are output gradation values. The correction unit 160 refers to the color correction table using the luminance value Y of the correction target pixel, and acquires corrected chroma values Cb and Cr (correction values). The correction unit 160 changes the chroma values Cb and Cr of the correction target pixel to the chroma values Cb and Cr acquired as correction values. The correction unit 160 does not change the luminance value Y of the correction target pixel.

図8、9に示すように、補正後のクロマ値Cb、Crは、補正対象画素の輝度値Yが、オブジェクト画像の輝度値TC_Yより低い範囲FRでは、オブジェクト画像のクロマ値TC_Cb、TC_Crに設定されている。また、図9に示すように、補正後のクロマ値Cb、Crは、補正対象画素の輝度値Yが現背景色値の輝度値BC_Y2より高い範囲HRにおいて、周囲の背景画像のクロマ値BC_Cb2、BC_Cr2に設定されている。なお、図8に示すように、現背景色値が白を表す場合には(BC_Y2=255)であり、範囲HRはない。   As shown in FIGS. 8 and 9, the chroma values Cb and Cr after correction are set to the chroma values TC_Cb and TC_Cr of the object image in the range FR where the luminance value Y of the correction target pixel is lower than the luminance value TC_Y of the object image. Has been. Further, as shown in FIG. 9, the chroma values Cb and Cr after correction are the chroma values BC_Cb2 of the surrounding background image in the range HR where the luminance value Y of the correction target pixel is higher than the luminance value BC_Y2 of the current background color value. BC_Cr2 is set. As shown in FIG. 8, when the current background color value represents white (BC_Y2 = 255), there is no range HR.

補正後のクロマ値Cb、Crは、補正対象画素の輝度値Yがオブジェクト画像の輝度値TC_Yと、現背景色値の輝度値BC_Y2との間の範囲GRでは、補正対象画素の輝度値Yに応じて変動する。すなわち、当該範囲GRでは、補正後のクロマ値Cb、Crは、補正対象画素の輝度値Yが、オブジェクト画像の輝度値TC_Yに近いほど、オブジェクト画像のクロマ値TC_Cb、TC_Crに近くなり、現背景色値の輝度値BC_Y2に近いほど、現背景色値のクロマ値BC_Cb2、BC_Cr2に近くなるように、設定されている。例えば、オブジェクト画像のクロマ値TC_Cbが、現背景色値のクロマ値BC_Cb2より大きい場合(図8(A)、図9(A))には、範囲GRにおいて、補正後のクロマ値Cbは、輝度値Yの増加に応じて単調減少する。また、オブジェクト画像のクロマ値TC_Crが、現背景色値のクロマ値BC_Cr2より小さい場合(図9(B))には、範囲GRにおいて、補正後のクロマ値Crは、輝度値Yの増加に応じて単調増加する。   The corrected chroma values Cb and Cr are equal to the luminance value Y of the correction target pixel in the range GR where the luminance value Y of the correction target pixel is between the luminance value TC_Y of the object image and the luminance value BC_Y2 of the current background color value. Fluctuate accordingly. In other words, in the range GR, the corrected chroma values Cb and Cr become closer to the chroma values TC_Cb and TC_Cr of the object image as the luminance value Y of the correction target pixel is closer to the luminance value TC_Y of the object image. It is set so that the closer to the luminance value BC_Y2 of the color value, the closer to the chroma values BC_Cb2 and BC_Cr2 of the current background color value. For example, when the chroma value TC_Cb of the object image is larger than the chroma value BC_Cb2 of the current background color value (FIG. 8 (A), FIG. 9 (A)), the corrected chroma value Cb is the luminance in the range GR. As the value Y increases, it decreases monotonously. When the chroma value TC_Cr of the object image is smaller than the chroma value BC_Cr2 of the current background color value (FIG. 9B), the corrected chroma value Cr in the range GR corresponds to the increase of the luminance value Y. Increase monotonically.

このような色補正の結果を、図6を参照して説明する。図6(A)を用いて上述したように、境界領域MGの輝度値Yは、オブジェクト画像と接する位置(例えば、第1位置P1)に近いほどオブジェクト画像の輝度値TC_Yに近くなり、背景画像と接する位置(例えば、第2位置P2)に近いほど背景画像の輝度値BC_Y2に近くなるように、変化する。したがって、上述した色補正テーブルを用いた色補正の結果、図6(B)において、一点破線RC3で示すように、色補正後の境界領域MGのクロマ値Crは、オブジェクト画像と接する位置に近いほどオブジェクト画像のクロマ値TC_Crに近くなり、背景画像と接する位置に近いほど背景画像のクロマ値BC_Cr2に近くなるように、補正される。この結果、補正前の境界領域MGに不自然な色が生じていたとしても、この色補正によって、当該不自然な色が自然な色に補正される。なお、色補正テーブルの範囲FRにおいて、出力階調値(クロマ値Cb、Cr)が一定値にされていることによって、単色であるオブジェクト画像のクロマ値Cb、Crのばらつきが解消され、単色であるオブジェクト画像の色のムラが低減される。   The result of such color correction will be described with reference to FIG. As described above with reference to FIG. 6A, the luminance value Y of the boundary region MG is closer to the luminance value TC_Y of the object image as it is closer to the position in contact with the object image (for example, the first position P1). It changes so that it is closer to the brightness value BC_Y2 of the background image as it is closer to the position (for example, the second position P2) in contact with the. Therefore, as a result of the color correction using the color correction table described above, the chroma value Cr of the boundary region MG after color correction is close to the position in contact with the object image, as shown by the one-dot broken line RC3 in FIG. 6B. The closer to the chroma value TC_Cr of the object image, the closer to the position in contact with the background image, the closer to the chroma value BC_Cr2 of the background image. As a result, even if an unnatural color is generated in the boundary region MG before correction, the unnatural color is corrected to a natural color by this color correction. In the color correction table range FR, the output gradation values (chroma values Cb, Cr) are set to a constant value, so that the dispersion of the chroma values Cb, Cr of the object image that is a single color is eliminated, and the single color is used. Color unevenness of an object image is reduced.

ステップS555では、補正部160は、色補正処理後の処理領域の表色系をYCrCb表色系からRGB表色系に変換する。   In step S555, the correction unit 160 converts the color system of the processing area after the color correction process from the YCrCb color system to the RGB color system.

ステップS560では、画像処理部100は、全ての処理領域が、ステップS505において選択されたか否かを判断する。画像処理部100は、全ての処理領域が選択されていないと判断すると(ステップS560:NO)、ステップS505に戻って未選択の処理領域を選択して、上述したステップS505〜S555の処理を繰り返す。画像処理部100は、全ての処理領域が選択されたと判断すると(ステップS560:YES)、色補正処理(図7)を終了して、画像処理(図2)を終了する。   In step S560, the image processing unit 100 determines whether all the processing areas have been selected in step S505. If the image processing unit 100 determines that all the processing areas are not selected (step S560: NO), the process returns to step S505, selects an unselected processing area, and repeats the above-described processing of steps S505 to S555. . When the image processing unit 100 determines that all the processing regions have been selected (step S560: YES), the image processing unit 100 ends the color correction processing (FIG. 7) and ends the image processing (FIG. 2).

以上説明した本実施例によれば、オブジェクト画像の色を表すオブジェクト特徴値(具体的には、YCC値)と、背景画像の色を表す背景特徴値(具体的には、YCC値)と、境界領域MGの輝度値Yと、を用いて、境界領域MGの色を、オブジェクト画像の色や、背景画像の色に近づくように補正している。この結果、境界領域MGに生じ得る色の不自然さを抑制することができる。したがって、境界領域MGの画質および対象画像全体の画質を向上することができる。   According to the present embodiment described above, an object feature value (specifically, YCC value) representing the color of the object image, a background feature value (specifically, YCC value) representing the color of the background image, Using the luminance value Y of the boundary region MG, the color of the boundary region MG is corrected so as to approach the color of the object image or the color of the background image. As a result, color unnaturalness that may occur in the boundary region MG can be suppressed. Therefore, the image quality of the boundary region MG and the image quality of the entire target image can be improved.

さらに、上記実施例によれば、背景特徴値であるBC_Cr2、BC_Cb2と、オブジェクト特徴値であるTC_Cr、TC_Cbと、を用いて、境界領域MGの色を、クロマ値がオブジェクト画像のクロマ値と背景画像のクロマ値との間の値を有する色に補正する。この結果、境界領域MGに生じ得る色の不自然さを適切に抑制することができ、境界領域MGの画質および対象画像全体の画質を向上することができる。   Furthermore, according to the above embodiment, using the background feature values BC_Cr2, BC_Cb2 and the object feature values TC_Cr, TC_Cb, the color of the boundary region MG, the chroma value of the chroma value of the object image, and the background A color having a value between the chroma value of the image is corrected. As a result, color unnaturalness that may occur in the boundary region MG can be appropriately suppressed, and the image quality of the boundary region MG and the image quality of the entire target image can be improved.

上記実施例によれば、さらに、境界領域MGの輝度値Yを用いて、境界領域MGの色に対して補正を実行する。具体的には、輝度値Yに応じて、クロマ値Cb、Crを変更する補正を実行する。この結果、適切に、境界領域に生じ得る色の不自然さを抑制することができる。   According to the above embodiment, correction is further performed on the color of the boundary region MG using the luminance value Y of the boundary region MG. Specifically, correction for changing the chroma values Cb and Cr according to the luminance value Y is executed. As a result, it is possible to appropriately suppress color unnaturalness that may occur in the boundary region.

上記実施例によれば、さらに、境界領域MGの輝度値Yを変更することなく、輝度値とは異なる色値(具体的には、クロマ値Cb、Cr)を変更することにより、境界領域MGの色の補正を実行する。この結果、境界領域MGの色の不自然さを抑制しつつ、境界領域MGの階調性を維持することができる。この結果、より境界領域MGを自然な画質にすることができ、対象画像の画質を向上することができる。   According to the above-described embodiment, the boundary region MG is further changed by changing the color value (specifically, chroma values Cb, Cr) different from the luminance value without changing the luminance value Y of the boundary region MG. Perform color correction. As a result, it is possible to maintain the gradation of the boundary region MG while suppressing the unnatural color of the boundary region MG. As a result, the boundary region MG can have a more natural image quality, and the image quality of the target image can be improved.

上記実施例によれば、さらに、補正対象画素の輝度値Yが、オブジェクト画像の輝度値Yに近いほど、オブジェクト画像の色値(具体的にはクロマ値TC_Cb、TC_Cr)に近くなるように、境界領域MGの色値を補正する。また、補正対象画素の輝度値Yが、背景画像の輝度値Yに近いほど、背景画像の色値(具体的にはクロマ値BC_Cb2、BC_Cr2)に近くなるように、境界領域MGの色値を補正する。したがって、境界領域MGの色を、オブジェクト画像や背景画像との繋がりが自然な色に容易に補正することができる。   According to the above-described embodiment, the luminance value Y of the correction target pixel is closer to the color value of the object image (specifically, the chroma values TC_Cb and TC_Cr) as the luminance value Y of the object image is closer. The color value of the boundary area MG is corrected. In addition, the color value of the boundary region MG is set so that the closer the luminance value Y of the correction target pixel is to the luminance value Y of the background image, the closer to the color value of the background image (specifically, chroma values BC_Cb2, BC_Cr2). to correct. Therefore, the color of the boundary region MG can be easily corrected to a color that is naturally connected to the object image and the background image.

また、上記実施例では、判断部140が、処理対象のオブジェクト画像が実質的に単色であるか否かを判断している。そして、補正部160は、実質的に単色であると判断された単色オブジェクト画像と、当該単色オブジェクト画像と隣接する背景領域との境界領域MGと、を含む処理領域を構成する複数の画素を、補正対象画素としている。オブジェクト画像と境界領域MGとを精度良く区別することは困難である場合があるが、上記実施例ではオブジェクト画像と境界領域MGとを区別することなく、境界領域MGの色を容易に自然な色に補正することができる。   In the above embodiment, the determination unit 140 determines whether the object image to be processed is substantially monochromatic. Then, the correction unit 160 converts a plurality of pixels constituting a processing area including a single-color object image determined to be substantially monochromatic and a boundary area MG between a background area adjacent to the single-color object image, It is set as a correction target pixel. Although it may be difficult to accurately distinguish between the object image and the boundary region MG, in the above embodiment, the color of the boundary region MG is easily a natural color without distinguishing between the object image and the boundary region MG. Can be corrected.

特に、上記実施例のように、背景色変換処理を実行する場合には、上述のように、境界領域MGに不自然な色が生じる場合がある。上記実施例によれば、背景色変換処理後の画像データによって表される画像の境界領域MGの不自然さを抑制して、境界領域MGの画質を向上することができる。さらに、特定部150は、変更背景画素と、維持背景画素と、オブジェクト関連画素とを特定することによって、処理領域を特定している。すなわち、互いに隣接する複数のオブジェクト関連画素に対応する領域は、オブジェクト画像を含む可能性が高い。したがって、補正対象とすべき処理領域を容易に適切に特定することができる。   In particular, when the background color conversion process is executed as in the above embodiment, an unnatural color may occur in the boundary region MG as described above. According to the above embodiment, it is possible to improve the image quality of the boundary region MG by suppressing the unnaturalness of the boundary region MG of the image represented by the image data after the background color conversion process. Furthermore, the specifying unit 150 specifies the processing region by specifying the changed background pixel, the maintenance background pixel, and the object-related pixel. That is, a region corresponding to a plurality of object-related pixels adjacent to each other is highly likely to include an object image. Therefore, it is possible to easily and appropriately specify the processing area to be corrected.

さらに、処理領域のうち、変更背景画素と隣接する領域は、色補正の対象とし、維持背景画素と隣接する領域は、色補正の対象にしないので、補正の必要性の高い処理領域を選択的に補正することができる。この結果、画像処理の処理時間や処理負荷を低減することができる。   Further, among the processing areas, the area adjacent to the changed background pixel is subject to color correction, and the area adjacent to the maintenance background pixel is not subject to color correction. Can be corrected. As a result, the processing time and processing load of image processing can be reduced.

また、上記実施例の背景色変換処理は、成分ごとに独立して実行されるので、変換後の背景画像の色が様々な色に変化し得る。このような場合であっても、画像の境界領域MGに生じ得る色の不自然さを抑制して、境界領域MGの画質を向上することができる。   Moreover, since the background color conversion process of the said Example is performed independently for every component, the color of the background image after conversion can change into various colors. Even in such a case, it is possible to improve the image quality of the boundary region MG by suppressing unnatural color that may occur in the boundary region MG of the image.

さらに、上記実施例の色補正テーブル(図8、9)は、オブジェクト画像の輝度値TC_Yより小さい階調値範囲FR内のクロマ値Cb、Crを、一定値に変更するように、設定されている。この結果、色補正処理によって、単色であるオブジェクト画像に生じている色相や彩度のばらつきを抑制することができる。したがって、境界領域MGの画質だけでなく、単色のオブジェクト画像の画質を向上することができる。   Further, the color correction tables (FIGS. 8 and 9) of the above embodiment are set so that the chroma values Cb and Cr in the gradation value range FR smaller than the luminance value TC_Y of the object image are changed to constant values. Yes. As a result, the color correction process can suppress variations in hue and saturation occurring in an object image that is a single color. Therefore, not only the image quality of the boundary region MG but also the image quality of the single-color object image can be improved.

B.変形例:
(1)上記実施例によれば、境界領域MGの色を、クロマ値がオブジェクト画像のクロマ値と背景画像のクロマ値との間の値を有する色に補正しているが、これに限らず、他の色に補正しても良い。この場合には、補正後の色は、オブジェクト画像の色と背景画像の色との間の中間色であることが好ましい。第1の色と第2の色との間の中間色は、第1の色と第2の色とを特定種類の表色系で表した場合に、当該表色系の少なくとも1つの成分の値が、第1の色の当該成分の値と、第2の色の当該成分の値と、の間の値(中間値とも呼ぶ)である色である。例えば、上記実施例のように、境界領域MGの色が不自然である原因が、色相や彩度にある場合には、採用する表色系において、当該色相や彩度に関する成分値が中間値である中間色に補正することが好ましい。当該色相や彩度に関する成分値は、一般的には、輝度値(色の明るさを表す値であれば良く、表色系によっては、明度と呼ばれる値を含む)を成分として含む表色系における輝度値とは異なる成分値である。例えば、色相や彩度に関する成分値は、上記実施例におけるYCrCb表色系におけるクロマ値Cb、Crの他に、YPbPr表色系におけるPb、Pr値、CIELAB表色系におけるa*値、b*値、HSB表色系における色相(Hue)値、彩度(Saturation)値などが含まれる。また、第1の色と第2の色との間の中間色は、第1の色と第2の色とを特定種類の表色系で表した場合に、当該表色系の色空間において、第1の色の位置と、第2の色の色の位置と、を結ぶ直線上の点を含む。
B. Variations:
(1) According to the above embodiment, the color of the boundary region MG is corrected to a color whose chroma value has a value between the chroma value of the object image and the chroma value of the background image. The color may be corrected to other colors. In this case, the corrected color is preferably an intermediate color between the color of the object image and the color of the background image. An intermediate color between the first color and the second color is a value of at least one component of the color system when the first color and the second color are represented by a specific type of color system. Is a value that is a value (also referred to as an intermediate value) between the value of the component of the first color and the value of the component of the second color. For example, when the cause of the unnatural color of the boundary region MG is the hue or saturation as in the above embodiment, the component values related to the hue and saturation are intermediate values in the employed color system. It is preferable to correct to an intermediate color. The component value related to the hue and saturation is generally a color system that includes a luminance value (a value that represents the brightness of the color, depending on the color system, including a value called brightness) as a component. The component value is different from the luminance value at. For example, the component values related to hue and saturation include Pb and Pr values in the YPbPr color system, a * values in the CIELAB color system, b *, in addition to the chroma values Cb and Cr in the YCrCb color system in the above-described embodiment. Value, hue (Hue) value in the HSB color system, saturation value, and the like. Further, an intermediate color between the first color and the second color, when the first color and the second color are represented by a specific type of color system, in the color space of the color system, It includes a point on a straight line connecting the position of the first color and the position of the second color.

また、上記実施例では、境界領域MGの輝度値Yは、補正前から中間値となっており(図6(A))、補正によってクロマ値Cb、Crを中間値に補正していることから解るように、補正後の境界領域MGの色は、3つの成分値(Y、Cb、Cr)の全てが中間値である中間色に補正されていると、言える。このように、補正後の境界領域MGの色は、採用する表色系における複数の成分値のうちの複数の値が中間値である中間色に補正されることが好ましく、全部の値が中間値である中間色に補正されることがさらに好ましい。   In the above embodiment, the luminance value Y of the boundary region MG is an intermediate value before correction (FIG. 6A), and the chroma values Cb and Cr are corrected to the intermediate value by the correction. As can be seen, it can be said that the color of the boundary region MG after correction is corrected to an intermediate color in which all three component values (Y, Cb, Cr) are intermediate values. Thus, it is preferable that the color of the boundary region MG after correction is corrected to an intermediate color in which a plurality of values among a plurality of component values in the adopted color system are intermediate values, and all the values are intermediate values. More preferably, the intermediate color is corrected.

(2)上記実施例によれば、境界領域MGの色を、クロマ値がオブジェクト画像や背景画像のクロマ値に近づくように補正しているが、これに限らず、境界領域MGの色を、オブジェクト画像の色と、背景画像の色との少なくとも一方の色に近づくように補正すれば良い。境界領域MGの色を、オブジェクト画像の色と、背景画像の色との少なくとも一方の色に近づくように補正するために、上記実施例では、オブジェクト画像の色に関する特徴値(実施例では、YCC値)と、背景画像の色を表す背景特徴値(具体的には、YCC値)と、境界領域MGの輝度値Yと、を用いているが、3つの値を全て用いなくても良い。例えば、オブジェクト画像の色に関する特徴値と、境界領域MGの輝度値Yと、の組合わせを用いて、境界領域MGに対する補正を行っても良いし、背景画像の色に関する特徴値と、境界領域MGの輝度値Yと、の組合わせを用いて、境界領域MGに対する補正を行っても良い。例えば、オブジェクト画像が文字画像の場合に、境界領域MGの色を、文字画像の色に近づけると、文字が太く見え、背景画像の色に近づけると、文字が細く見える傾向にあるので、文字画像における文字の態様やユーザの好みなどに応じて、背景画像の色と文字画像の色とのいずれか一方の色に近づけても良い。この場合には、背景画像の色と文字画像の色とのうち、補正によって境界領域MGの色を近づける方の色に関する特徴値と、輝度値Yと、を用いて、境界領域MGを補正しても良い。 (2) According to the above embodiment, the color of the boundary region MG is corrected so that the chroma value approaches the chroma value of the object image or the background image. However, the color of the boundary region MG is not limited to this. What is necessary is just to correct | amend so that the color of an object image and the color of a background image may approach at least one color. In order to correct the color of the boundary region MG so as to approach at least one of the color of the object image and the color of the background image, in the above-described embodiment, the characteristic value relating to the color of the object image (in the embodiment, YCC Value), a background feature value representing the color of the background image (specifically, a YCC value), and a luminance value Y of the boundary region MG, all three values need not be used. For example, the boundary region MG may be corrected using a combination of the feature value related to the color of the object image and the luminance value Y of the boundary region MG, or the feature value related to the color of the background image and the boundary region MG The boundary region MG may be corrected using a combination of the luminance value Y of MG. For example, when the object image is a character image, if the color of the boundary region MG is close to the color of the character image, the character appears to be thick, and if it is close to the color of the background image, the character tends to appear thin. The color of the background image or the color of the character image may be approximated according to the character mode or the user's preference. In this case, the boundary region MG is corrected using the feature value and the luminance value Y of the color of the background image and the color of the character image that are closer to the color of the boundary region MG by correction. May be.

ここで、第1の色を第2の色に近づくように補正するとは、第1の色と第2の色とを特定種類の表色系で表した場合に、当該第1の色の少なくとも1つの成分の値と、第2の色の当該成分の値と、の差分が、補正の前と比較して小さくなるように、第1の色の成分値を変更することを含む。また、この場合には、当該差分が、補正の前と比較して大きくなる成分がないように、第1の色の成分値を変更することが好ましい。また、第1の色を第2の色に近づくように補正するとは、第1の色と第2の色とを特定種類の表色系で表した場合に、当該表色系の色空間において、第1の色と第2の色とのユークリッド距離が短くなるように、第1の色の成分値を変更することを含む。   Here, correcting the first color so as to approach the second color means that when the first color and the second color are represented by a specific type of color system, at least one of the first color It includes changing the component value of the first color so that the difference between the value of one component and the value of the component of the second color is smaller than before correction. In this case, it is preferable to change the component value of the first color so that there is no component in which the difference is larger than that before the correction. Further, the correction of the first color so as to approach the second color means that the first color and the second color are expressed in a specific color system in the color space of the color system. And changing the component value of the first color so that the Euclidean distance between the first color and the second color is shortened.

(3)上記実施例とは異なり、オブジェクト画像が、比較的薄い色(RGBの各値が比較的大きい値である色)で表され、背景画像が、比較的濃い色(RGBの各値が比較的小さい値である色)で表されている画像(濃淡反転画像とも呼ぶ。)を表す画像データを対象画像データとして想定しても良い。この場合には、背景色変換処理は、例えば、比較的濃い色を、黒色((R、G、B)=(0、0、0))に変換する処理とされる。この場合には、背景色変換処理は、例えば、図4に示す色変換テーブルRTに代えて、低階調値側の所定範囲(例えば、0≦Vin<THa)内の入力階調値Vinの変化に対応して、出力階調値Voutを全て最小階調値(0)に変更し、高階調値側の所定範囲(THb<Vin≦255)内の入力階調値Vinの変化に対応して、出力階調値Voutを同じ階調値に維持するように、設定された色変換テーブルを用いて行われる。この場合には、色変換テーブルは、(THa≦Vin≦THb)内の入力階調値Vinの変化に対応して、出力階調値Voutが非連続にならないように、出力階調値Voutが設定されていても良い。 (3) Unlike the above embodiment, the object image is represented by a relatively light color (color in which each RGB value is relatively large), and the background image is a relatively dark color (each RGB value is Image data representing an image (also referred to as a grayscale inverted image) represented by a relatively small value) may be assumed as target image data. In this case, the background color conversion process is, for example, a process of converting a relatively dark color to black ((R, G, B) = (0, 0, 0)). In this case, for example, instead of the color conversion table RT shown in FIG. 4, the background color conversion process is performed for the input gradation value Vin within a predetermined range (for example, 0 ≦ Vin <THa) on the low gradation value side. Corresponding to the change, all the output gradation values Vout are changed to the minimum gradation value (0), and corresponding to the change of the input gradation value Vin within the predetermined range (THb <Vin ≦ 255) on the high gradation value side. Thus, the color conversion table is set so as to maintain the output gradation value Vout at the same gradation value. In this case, in the color conversion table, the output gradation value Vout is set so that the output gradation value Vout does not become discontinuous corresponding to the change in the input gradation value Vin within (THa ≦ Vin ≦ THb). It may be set.

濃淡反転画像に対する色補正には、図8、図9に示す色補正テーブルに代えて、例えば、境界領域MGの輝度Yがオブジェクト画像の輝度値TC_Y(白色に対応する輝度値「255」や、比較的大きな値が想定される)より大きい場合には、補正対象画素のクロマ値Crが、オブジェクト画像のクロマ値TC_Cr、TC_Cbと同じ値になる色補正テーブルが用いられる。この色補正テーブルは、さらに、境界領域MGの輝度値Yが背景画像の輝度値BC_Y2(黒色に対応する輝度値「0」や、比較的小さな値が想定される)より小さい場合には、補正対象画素のクロマ値Cr、Cbが、背景画像のクロマ値BC_Cr2、BC_Cb2と同じ値になるように、設定される。そして、この色補正テーブルは、さらに、境界領域MGの輝度値Yが、BC_Y2≦Y≦TC_Yの範囲内にある場合には、補正対象画素の輝度値Yが、オブジェクト画像の輝度値TC_Yに近いほど、オブジェクト画像のクロマ値TC_Cb、TC_Crに近くなり、背景画像の輝度値BC_Y2に近いほど、背景画像のクロマ値BC_Cb2、BC_Cr2に近くなるように、設定される。この結果、濃淡反転画像の境界領域MGに表れ得る不自然な色を補正によって解消して、濃淡反転画像の画質を向上することができる。   For color correction on the grayscale inverted image, instead of the color correction table shown in FIGS. 8 and 9, for example, the luminance Y of the boundary region MG is the luminance value TC_Y of the object image (the luminance value “255” corresponding to white) If a larger value is assumed), a color correction table is used in which the chroma value Cr of the correction target pixel becomes the same value as the chroma values TC_Cr and TC_Cb of the object image. This color correction table is further corrected when the luminance value Y of the boundary region MG is smaller than the luminance value BC_Y2 of the background image (a luminance value “0” corresponding to black or a relatively small value is assumed). The chroma values Cr and Cb of the target pixel are set so as to be the same values as the chroma values BC_Cr2 and BC_Cb2 of the background image. Further, in this color correction table, when the luminance value Y of the boundary region MG is within the range of BC_Y2 ≦ Y ≦ TC_Y, the luminance value Y of the correction target pixel is close to the luminance value TC_Y of the object image. The closer to the chroma values TC_Cb and TC_Cr of the object image, the closer to the luminance value BC_Y2 of the background image, the closer to the chroma values BC_Cb2 and BC_Cr2 of the background image. As a result, an unnatural color that can appear in the boundary region MG of the grayscale inverted image is eliminated by correction, and the image quality of the grayscale inverted image can be improved.

(4)上記実施例では、オブジェクト画像の色に関する特徴値として、オブジェクト画像を構成する画素のYCC値の平均値を用いているが、これに限らず、中央値(メディアン)、最頻値を用いても良いし、他の表色系で表した場合の成分値の全部または一部を用いて算出された統計値(平均値、中央値、最頻値など)を用いても良い。 (4) In the above embodiment, the average value of the YCC values of the pixels constituting the object image is used as the feature value relating to the color of the object image. However, the present invention is not limited to this, and the median value and the mode value are used. It may be used, or a statistical value (average value, median value, mode value, etc.) calculated using all or part of the component values when expressed in other color systems may be used.

(5)上記実施例の画像処理は、背景色変換処理を含んでいるが、背景色変換処理を含んでいなくても良い。また、上記実施例の画像処理は、複合機200に限らず、他の装置、例えば、パーソナルコンピュータやサーバにおいて実行されても良い。例えば、背景色変換処理済みのスキャンデータを、スキャナから取得し、パーソナルコンピュータが、当該スキャンデータを対象画像データとして、背景色変換処理を含まない画像処理を実行しても良い。 (5) The image processing of the above embodiment includes the background color conversion process, but may not include the background color conversion process. The image processing of the above embodiment is not limited to the multi-function device 200, and may be executed by other devices such as a personal computer or a server. For example, scan data that has undergone background color conversion processing may be acquired from a scanner, and a personal computer may execute image processing that does not include background color conversion processing using the scan data as target image data.

(6)上記実施例では、背景画素のうち、背景色変換処理の前後で変更されていない画素値を有する画素を、維持背景画素として特定し、変更された画素値を有する画素を変更背景画素として特定している。これに限らず、背景色変換処理の前後での変更量が5以下である画素値を有する画素を、維持背景画素として特定し、6以上である画素値を有する画素を、変更背景画素として特定しても良い。一般的に言えば、背景色変換処理の前の画素値と背景色変換処理の後の画素値との差分が、基準値以下である画素値を有する画素を、維持背景画素として特定し、当該差分が、基準値より大きい画素値を有する画素を変更背景画素として特定しても良い。この場合には、ムラなどにより実質的に白色の背景画像であっても、背景色変換処理によって画素値の変更がされ得る場合であっても、適切に、維持背景画素と、変更背景画素と、を特定することができる。 (6) In the above embodiment, among the background pixels, a pixel having a pixel value that has not been changed before and after the background color conversion process is specified as a maintenance background pixel, and a pixel having the changed pixel value is changed to the changed background pixel. As specified. Not limited to this, a pixel having a pixel value whose change amount before and after the background color conversion process is 5 or less is specified as a maintenance background pixel, and a pixel having a pixel value of 6 or more is specified as a change background pixel You may do it. Generally speaking, a pixel having a pixel value whose pixel value before the background color conversion process and the pixel value after the background color conversion process is less than or equal to a reference value is identified as a maintenance background pixel, A pixel having a pixel value whose difference is larger than the reference value may be specified as the changed background pixel. In this case, even if it is a substantially white background image due to unevenness or the like, and even if the pixel value can be changed by the background color conversion process, the maintenance background pixel, the changed background pixel, , Can be specified.

(7)上記実施例における背景色変換処理は、成分ごとに独立して実行されているが、これに限られない。例えば、RGBの全ての成分値が、変更範囲CR(図4)内にある画素を白色に変更し、RGBのうち少なくとも1つの成分値が変更範囲CR外にある画素は、色の変更(画素値の変更)を行わないこととしても良い。この場合には、背景色変換処理によって色が変更された背景画像の色は、白に限られるので、図7のステップS545における背景色値の特定を省略することができる。また、背景色変換処理による変更先の画素値の色は、白色に限らず、他の色(例えば、薄い黄色)であっても良い。この場合であっても、変更後に背景色に応じて、適切な色補正テーブル(図9)を用いることで、境界領域MGの不自然な色を適切に補正することができる。 (7) The background color conversion process in the above embodiment is executed independently for each component, but is not limited thereto. For example, all the RGB component values are changed to white when the pixel is within the change range CR (FIG. 4), and at least one component value of RGB is outside the change range CR. The value may not be changed). In this case, since the color of the background image whose color has been changed by the background color conversion process is limited to white, the specification of the background color value in step S545 in FIG. 7 can be omitted. Further, the color of the pixel value to be changed by the background color conversion process is not limited to white, but may be another color (for example, light yellow). Even in this case, an unnatural color in the boundary region MG can be corrected appropriately by using an appropriate color correction table (FIG. 9) according to the background color after the change.

(8)上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしても良く、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしても良い。 (8) In the above embodiment, a part of the configuration realized by hardware may be replaced with software. Conversely, a part of the configuration realized by software is replaced with hardware. Also good.

以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨並びに特許請求の範囲を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。   As mentioned above, although this invention was demonstrated based on the Example and the modification, Embodiment mentioned above is for making an understanding of this invention easy, and does not limit this invention. The present invention can be changed and improved without departing from the spirit and scope of the claims, and equivalents thereof are included in the present invention.

100...画像処理部、200...複合機、210...CPU、222...コンピュータプログラム、220...不揮発性記憶装置、230...揮発性記憶装置、231...バッファ領域、240...プリンタ部、250...スキャナ部、260...操作部、270...表示部、280...通信部、300...デジタルカメラ、400...パーソナルコンピュータ、   DESCRIPTION OF SYMBOLS 100 ... Image processing part, 200 ... Multifunction machine, 210 ... CPU, 222 ... Computer program, 220 ... Nonvolatile storage device, 230 ... Volatile storage device, 231 ... Buffer area 240 ... Printer section 250 ... Scanner section 260 ... Operation section 270 ... Display section 280 ... Communication section 300 ... Digital camera 400 ... Personal Computer,

Claims (12)

オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得部と、
前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、を取得する特徴値取得部と、
前記第1の特徴値と前記第2の特徴値とを用いて、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との間の色を示す中間色に補正する補正部と、
を備える、画像処理装置。
An image data acquisition unit for acquiring target image data representing a target image including an object image and a background image adjacent to the object image;
A feature value acquisition unit that acquires a first feature value relating to the color of the object image and a second feature value relating to the color of the background image;
Using the first feature value and the second feature value, the color of the boundary area, which is an area where the object image and the background image are adjacent, is set to the color of the object image and the color of the background image. A correction unit that corrects an intermediate color indicating a color between
An image processing apparatus comprising:
請求項1に記載の画像処理装置であって、
前記補正部は、さらに、前記境界領域の輝度値を用いて、前記境界領域の色に前記補正を実行する、画像処理装置。
The image processing apparatus according to claim 1,
The correction unit further performs the correction on the color of the boundary region using the luminance value of the boundary region.
オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得部と、
前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、の少なくとも一方の特徴値を取得する特徴値取得部と、
取得された前記第1の特徴値と前記第2の特徴値との少なくとも一方の特徴値と、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の輝度値と、を用いて、前記境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との少なくとも一方の色に近づくように補正する補正部と、
を備える、画像処理装置。
An image data acquisition unit for acquiring target image data representing a target image including an object image and a background image adjacent to the object image;
A feature value acquisition unit that acquires at least one of the first feature value related to the color of the object image and the second feature value related to the color of the background image;
Using at least one of the acquired feature values of the first feature value and the second feature value, and a brightness value of a boundary region that is a region where the object image and the background image are adjacent to each other, A correction unit that corrects the color of the boundary region so as to approach at least one of the color of the object image and the color of the background image;
An image processing apparatus comprising:
請求項1または請求項3に記載の画像処理装置であって、
前記補正部は、前記境界領域の輝度を表す輝度値を変更することなく、前記境界領域の色を表す色値であって、前記輝度値とは異なる値である前記色値を変更することにより、前記境界領域の色に前記補正を実行する、画像処理装置。
The image processing apparatus according to claim 1 or 3, wherein
The correction unit changes a color value that represents a color of the boundary region and is different from the luminance value without changing a luminance value that represents the luminance of the boundary region. An image processing apparatus that performs the correction on the color of the boundary region.
請求項4に記載の画像処理装置であって、
前記第1の特徴値は、前記オブジェクト画像の輝度を表す第1の輝度値と、前記オブジェクト画像の色を表す前記色値である第1の色値を含み、
前記第2の特徴値は、前記背景画像の輝度を表す第2の輝度値と、前記背景画像の色を表す前記色値である第2の色値を含み、
前記補正部は、前記境界領域の画素を含む補正対象画素の前記色値を補正値に変更することによって、前記境界領域の色に前記補正を実行し、
前記補正値は、前記補正対象画素が、前記第1の輝度値と前記第2の輝度値との間の輝度値を有する場合に、前記補正対象画素の輝度値が前記第1の輝度値に近いほど前記第1の色値に近くなり、前記補正対象画素の輝度値が前記第2の輝度値に近いほど前記第2の色値に近くなるように、前記補正対象画素の輝度値に応じて設定される、画像処理装置。
The image processing apparatus according to claim 4,
The first feature value includes a first luminance value that represents the luminance of the object image and a first color value that is the color value that represents the color of the object image,
The second feature value includes a second luminance value representing the luminance of the background image and a second color value which is the color value representing the color of the background image,
The correction unit performs the correction on the color of the boundary region by changing the color value of the correction target pixel including the pixel of the boundary region to a correction value,
The correction value is such that when the correction target pixel has a luminance value between the first luminance value and the second luminance value, the luminance value of the correction target pixel becomes the first luminance value. Depending on the luminance value of the correction target pixel, the closer to the first color value, the closer the luminance value of the correction target pixel to the second luminance value, the closer to the second color value. An image processing device set by
請求項5に記載の画像処理装置であって、さらに、
前記オブジェクト画像が実質的に単色であるか否かを判断する判断部を備え、
前記補正部は、実質的に単色であると判断された前記オブジェクト画像である単色オブジェクト画像と、前記単色オブジェクト画像と前記背景領域との前記境界領域と、を含む領域を構成する複数の画素を、前記補正対象画素とする、画像処理装置。
The image processing apparatus according to claim 5, further comprising:
A determination unit for determining whether the object image is substantially monochromatic;
The correction unit includes a plurality of pixels constituting a region including a single-color object image that is the object image determined to be substantially a single color, and the boundary region between the single-color object image and the background region. An image processing apparatus as the correction target pixel.
請求項1ないし請求項6のいずれかに記載の画像処理装置であって、さらに、
前記対象画像データに対して色変換処理を実行して、前記背景画像の色を変換する変換処理部であって、前記色変換処理は、特定範囲内の画素値を、特定値に変更する処理を含む前記変換部を備え、
前記背景画像の色に関する第2の特徴値は、前記特定値によって表される色に関する特徴値である、画像処理装置。
The image processing apparatus according to any one of claims 1 to 6, further comprising:
A conversion processing unit that performs color conversion processing on the target image data to convert the color of the background image, and the color conversion processing is processing for changing a pixel value within a specific range to a specific value. Including the conversion unit including:
The image processing apparatus, wherein the second feature value relating to the color of the background image is a feature value relating to the color represented by the specific value.
請求項7に記載の画像処理装置であって、さらに、
前記色変換処理済みの前記対象画像データを構成する複数の画素のうち、第1種の画素と、第2種の画素と、をそれぞれ特定する特定部であって、前記第1種の画素は、前記特定値を有する画素であり、前記第2種の画素は、前記特定値とは異なる画素値を有する画素である、前記特定部を備え、
前記オブジェクト画像の色に関する第1の特徴値は、互いに隣接する複数の第2種の画素の複数の画素値を用いて表される色に関する特徴値である、画像処理装置。
The image processing apparatus according to claim 7, further comprising:
Among the plurality of pixels constituting the target image data that has been subjected to the color conversion process, the specifying unit is configured to identify a first type pixel and a second type pixel, and the first type pixel is , The pixel having the specific value, and the second type pixel includes the specific unit, the pixel having a pixel value different from the specific value,
The first feature value related to the color of the object image is a feature value related to a color expressed using a plurality of pixel values of a plurality of second type pixels adjacent to each other.
請求項8に記載の画像処理装置であって、
前記第1種の画素は、前記色変換処理の前の画素値と前記色変換処理の後の画素値との差分が基準値以下である第1の画素と、前記差分が基準値より大きい第2の画素と、を含み、
前記特定部は、前記第1の画素と、前記第2の画素と、をそれぞれ特定し、
前記特徴値取得部は、互いに隣接する複数の前記第2種の画素に対応する領域が、前記第2の画素に隣接する場合に、前記第1の特徴値と前記第2の特徴値との少なくとも一方の特徴値を取得する、画像処理装置。
The image processing apparatus according to claim 8,
The first type of pixel includes a first pixel in which a difference between a pixel value before the color conversion process and a pixel value after the color conversion process is equal to or less than a reference value, and a first pixel in which the difference is greater than a reference value. 2 pixels,
The specifying unit specifies the first pixel and the second pixel, respectively.
The feature value acquisition unit obtains the first feature value and the second feature value when an area corresponding to the plurality of second type pixels adjacent to each other is adjacent to the second pixel. An image processing apparatus that acquires at least one feature value.
請求項7ないし請求項9のいずれかに記載の画像処理装置であって、
前記対象画像データは、表色系を構成する複数の成分のそれぞれに対応する複数の成分画像データを含み、

前記色変換処理は、前記複数の成分画像データのそれぞれに対して独立して実行される複数の成分変換処理であって、処理対象の成分の前記特定範囲である成分特定範囲内の画素値を、処理対象の成分の前記特定値である成分特定値に変更する前記複数の成分変換処理を含む、画像処理装置。
An image processing apparatus according to any one of claims 7 to 9,
The target image data includes a plurality of component image data corresponding to each of a plurality of components constituting the color system,

The color conversion process is a plurality of component conversion processes executed independently for each of the plurality of component image data, and pixel values in a component specific range that is the specific range of the component to be processed are calculated. An image processing apparatus including the plurality of component conversion processes for changing to a component specific value that is the specific value of the component to be processed.
オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得機能と、
前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、を取得する特徴値取得機能と、
前記第1の特徴値と前記第2の特徴値とを用いて、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との間の色を示す中間色に補正する補正機能と、
をコンピュータに実現させるコンピュータプログラム。
An image data acquisition function for acquiring target image data representing a target image including an object image and a background image adjacent to the object image;
A feature value acquisition function for acquiring a first feature value relating to the color of the object image and a second feature value relating to the color of the background image;
Using the first feature value and the second feature value, the color of the boundary area, which is an area where the object image and the background image are adjacent, is set to the color of the object image and the color of the background image. A correction function for correcting to an intermediate color indicating a color between
A computer program that causes a computer to realize
オブジェクト画像と、前記オブジェクト画像に隣接する背景画像と、を含む対象画像を表す対象画像データを取得する画像データ取得機能と、
前記オブジェクト画像の色に関する第1の特徴値と、前記背景画像の色に関する第2の特徴値と、の少なくとも一方の特徴値を取得する特徴値取得機能と、
取得された前記第1の特徴値と前記第2の特徴値との少なくとも一方の特徴値と、前記オブジェクト画像と前記背景画像とが隣接する領域である境界領域の輝度値と、を用いて、前記境界領域の色を、前記オブジェクト画像の色と前記背景画像の色との少なくとも一方の色に近づくように補正する補正機能と、
をコンピュータに実現させるコンピュータプログラム。
An image data acquisition function for acquiring target image data representing a target image including an object image and a background image adjacent to the object image;
A feature value acquisition function for acquiring at least one feature value of a first feature value relating to the color of the object image and a second feature value relating to the color of the background image;
Using at least one of the acquired feature values of the first feature value and the second feature value, and a brightness value of a boundary region that is a region where the object image and the background image are adjacent to each other, A correction function for correcting the color of the boundary region so as to approach at least one of the color of the object image and the color of the background image;
A computer program that causes a computer to realize
JP2012125370A 2012-05-31 2012-05-31 Image processing apparatus and computer program Active JP5953946B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2012125370A JP5953946B2 (en) 2012-05-31 2012-05-31 Image processing apparatus and computer program
EP13158842.8A EP2670125B1 (en) 2012-05-31 2013-03-12 Image processing device correcting color of border region between object and background in image
US13/797,189 US9025870B2 (en) 2012-05-31 2013-03-12 Image processing device correcting color of border region between object and background in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012125370A JP5953946B2 (en) 2012-05-31 2012-05-31 Image processing apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2013251757A true JP2013251757A (en) 2013-12-12
JP5953946B2 JP5953946B2 (en) 2016-07-20

Family

ID=47845841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012125370A Active JP5953946B2 (en) 2012-05-31 2012-05-31 Image processing apparatus and computer program

Country Status (3)

Country Link
US (1) US9025870B2 (en)
EP (1) EP2670125B1 (en)
JP (1) JP5953946B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018133642A (en) * 2017-02-14 2018-08-23 富士ゼロックス株式会社 Color processing apparatus, image formation device and image formation system
JP7404836B2 (en) 2019-12-10 2023-12-26 京セラドキュメントソリューションズ株式会社 Information processing device and image forming device

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102025184B1 (en) * 2013-07-31 2019-09-25 엘지디스플레이 주식회사 Apparatus for converting data and display apparatus using the same
JP6171727B2 (en) * 2013-08-23 2017-08-02 ブラザー工業株式会社 Image processing device, sheet, computer program
US9380188B1 (en) * 2015-04-15 2016-06-28 Xerox Corporation Apparatus and method for improving color accuracy in a scan
US10345991B2 (en) 2015-06-16 2019-07-09 International Business Machines Corporation Adjusting appearance of icons in an electronic device
JP6584179B2 (en) 2015-07-13 2019-10-02 キヤノン株式会社 Information processing apparatus, information processing method, and computer program
JP6624827B2 (en) * 2015-07-13 2019-12-25 キヤノン株式会社 Information processing apparatus, information processing method, and computer program
JP6633871B2 (en) 2015-08-26 2020-01-22 キヤノン株式会社 Information processing apparatus, control method therefor, and program
JP6503308B2 (en) * 2016-02-18 2019-04-17 富士通フロンテック株式会社 Image processing apparatus and image processing method
JP6908879B2 (en) * 2017-03-30 2021-07-28 ブラザー工業株式会社 Image processing equipment and computer programs
JP7067262B2 (en) * 2018-05-21 2022-05-16 富士フイルムビジネスイノベーション株式会社 Information processing equipment and programs
CN111222506B (en) * 2019-12-25 2023-12-01 深圳市优必选科技股份有限公司 Color recognition method, apparatus, and computer-readable storage medium
CN111784574B (en) * 2020-05-25 2023-10-27 北京博睿维讯科技有限公司 Single-screen multi-picture boundary display method and device, electronic equipment and storage medium
JP2022091270A (en) * 2020-12-09 2022-06-21 ブラザー工業株式会社 Method, system, and computer program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04172770A (en) * 1990-11-06 1992-06-19 Dainippon Screen Mfg Co Ltd Picture overlap processing method
JPH05120417A (en) * 1991-10-30 1993-05-18 Fujitsu Ltd Color adjusting and picture synthesizing method and device for color picture
JP2007221227A (en) * 2006-02-14 2007-08-30 Konica Minolta Business Technologies Inc Trapping processing support apparatus, printer, method of deciding trapping extension region, and computer program
JP2008135006A (en) * 2006-09-28 2008-06-12 Konica Minolta Systems Lab Inc Background color conversion for toner-saving printing

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69216207T2 (en) * 1991-10-30 1997-04-17 Fujitsu Ltd Color setting to smooth the borders between color images
JPH06203157A (en) * 1992-10-14 1994-07-22 Fujitsu Ltd Method for processing color image and device thereof
JP3325243B2 (en) 1999-09-20 2002-09-17 京セラミタ株式会社 Image processing device
JP4127594B2 (en) * 2000-03-23 2008-07-30 理想科学工業株式会社 Image processing method and apparatus
JP4134531B2 (en) 2001-05-29 2008-08-20 コニカミノルタビジネステクノロジーズ株式会社 Image processing apparatus, image processing method, and program
US20050212726A1 (en) * 2004-03-16 2005-09-29 Pioneer Plasma Display Corporation Method, display apparatus and burn-in reduction device for reducing burn-in on display device
JP4115460B2 (en) 2005-04-12 2008-07-09 キヤノン株式会社 Image processing apparatus and method, and computer program and recording medium
JP4603589B2 (en) 2008-02-27 2010-12-22 株式会社沖データ Image processing device
US8885977B2 (en) * 2009-04-30 2014-11-11 Apple Inc. Automatically extending a boundary for an image to fully divide the image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04172770A (en) * 1990-11-06 1992-06-19 Dainippon Screen Mfg Co Ltd Picture overlap processing method
JPH05120417A (en) * 1991-10-30 1993-05-18 Fujitsu Ltd Color adjusting and picture synthesizing method and device for color picture
JP2007221227A (en) * 2006-02-14 2007-08-30 Konica Minolta Business Technologies Inc Trapping processing support apparatus, printer, method of deciding trapping extension region, and computer program
JP2008135006A (en) * 2006-09-28 2008-06-12 Konica Minolta Systems Lab Inc Background color conversion for toner-saving printing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018133642A (en) * 2017-02-14 2018-08-23 富士ゼロックス株式会社 Color processing apparatus, image formation device and image formation system
JP7404836B2 (en) 2019-12-10 2023-12-26 京セラドキュメントソリューションズ株式会社 Information processing device and image forming device

Also Published As

Publication number Publication date
US20130322747A1 (en) 2013-12-05
EP2670125A1 (en) 2013-12-04
EP2670125B1 (en) 2018-11-28
US9025870B2 (en) 2015-05-05
JP5953946B2 (en) 2016-07-20

Similar Documents

Publication Publication Date Title
JP5953946B2 (en) Image processing apparatus and computer program
US8767232B2 (en) Image processing apparatus, image processing method, and computer-readable storage medium
JP5525548B2 (en) Image processing system for processing digital image and image processing method for processing digital image
US8395832B2 (en) Image processing apparatus
US9189714B2 (en) Apparatus and method for enlarging object included in image data, and storage medium therefor
US8559062B2 (en) Image processing apparatus, image forming apparatus, image processing method and computer readable medium for controlling toner consumption
US20150331640A1 (en) Image processing apparatus, image processing method, and storage medium
US10373030B2 (en) Image processing apparatus that executes halftone process on target image data including edge pixel
KR101756277B1 (en) Image forming apparatus and method for processing image thereof
JP2017126869A (en) Image processing apparatus, image processing method and program
JP4957668B2 (en) Image processing device
JP6341085B2 (en) Image processing apparatus and computer program
US9967407B2 (en) Image reading device and method, reading area display device and method, and program
JP6031921B2 (en) Image processing apparatus and program
JP2014017562A (en) Controller, and program
JP5625664B2 (en) Image processing apparatus, image processing method, image forming apparatus, and image processing program
JP6736299B2 (en) Printing device, printing method, and program
JP2019134232A (en) Image formation device, and method and program for the device
US20170094124A1 (en) Image forming apparatus that ensures improved visibility of low lightness part, and color conversion method, and recording medium
JP7193779B2 (en) Computer program and method
JP6781398B2 (en) Image processing equipment and computer programs
US9639791B2 (en) Color registration error compensation in color printing
JP2021197717A (en) Image processing device and computer program
JP6418055B2 (en) Image processing apparatus and computer program
JP6350877B2 (en) Image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160209

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160418

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160517

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160530

R150 Certificate of patent or registration of utility model

Ref document number: 5953946

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150