JP7049292B2 - Image processing equipment, image processing methods and programs - Google Patents

Image processing equipment, image processing methods and programs Download PDF

Info

Publication number
JP7049292B2
JP7049292B2 JP2019113050A JP2019113050A JP7049292B2 JP 7049292 B2 JP7049292 B2 JP 7049292B2 JP 2019113050 A JP2019113050 A JP 2019113050A JP 2019113050 A JP2019113050 A JP 2019113050A JP 7049292 B2 JP7049292 B2 JP 7049292B2
Authority
JP
Japan
Prior art keywords
color
colors
image
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.)
Active
Application number
JP2019113050A
Other languages
Japanese (ja)
Other versions
JP2020205558A (en
Inventor
裕之 酒井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2019113050A priority Critical patent/JP7049292B2/en
Publication of JP2020205558A publication Critical patent/JP2020205558A/en
Application granted granted Critical
Publication of JP7049292B2 publication Critical patent/JP7049292B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本開示は、画像処理装置、画像処理方法及びプログラムに関する。 The present disclosure relates to an image processing apparatus, an image processing method and a program.

近年、カラープリンタ及びカラースキャナが広く普及した結果、カラー文書が電子的に扱われる機会が増加している。例えば、カラー文書をスキャナで読み取ることにより生成されるカラー画像は、電子ファイルとして保存され、又はインターネットなどのネットワークを介して送受信される。しかし、フルカラー画像の多大なデータサイズは記憶装置の容量を圧迫し又はネットワークに負荷を掛けることから、多くの場合、データサイズを削減することが望まれる。 As a result of the widespread use of color printers and color scanners in recent years, there are increasing opportunities for color documents to be handled electronically. For example, a color image generated by scanning a color document with a scanner is stored as an electronic file or transmitted / received via a network such as the Internet. However, since the large data size of a full-color image puts pressure on the capacity of the storage device or puts a load on the network, it is often desired to reduce the data size.

従来、カラー画像のデータサイズを圧縮する技術として、誤差拡散法を含むいわゆるディザリング、JPEG圧縮、並びに(例えば、8ビットのパレットカラーへの)減色を伴うZIP圧縮及びLZW圧縮が知られている。 Conventionally, as techniques for compressing the data size of a color image, so-called dithering including an error diffusion method, JPEG compression, and ZIP compression and LZW compression with color reduction (for example, to 8-bit palette color) are known. ..

特許文献1は、入力カラー画像を減色してインデックスカラー画像及び対応するカラー情報を生成し、類似するインデックスカラー同士を統合し、残されるインデックスカラーの二値画像を圧縮符号化する手法を開示している。こうした手法は、少数色圧縮とも呼ばれる。二値画像の圧縮符号化は、例えばMH(Modified Huffman)、MR(Modified READ)又はMMR(Modified MR)といった符号化法に従って行われ得る。 Patent Document 1 discloses a method of reducing an input color image to generate an indexed color image and corresponding color information, integrating similar indexed colors, and compressing and encoding a binary image of the remaining indexed color. ing. Such a technique is also called minority color compression. The compression coding of the binary image can be performed according to a coding method such as MH (Modified Huffman), MR (Modified READ) or MMR (Modified MR).

特許第3890250号公報Japanese Patent No. 3890250

文書をスキャナで読み取ると、画像内に読み取りムラに起因するノイズが生じることがある。また、画像処理の中途での一時的な圧縮又は量子化も、画像内にノイズを生じさせる原因となり得る。これらノイズは、特に近傍の画素の間の画素値の相関に依拠して画像データの情報量を削減しようとする符号化法に基づく圧縮符号化の圧縮効率を低下させ、又は画像情報の再現性を低下させる。 When a document is scanned by a scanner, noise due to uneven reading may occur in the image. Temporary compression or quantization in the middle of image processing can also cause noise in the image. These noises reduce the compression efficiency of compression coding based on coding methods that seek to reduce the amount of information in image data, especially by relying on the correlation of pixel values between nearby pixels, or the reproducibility of image information. To reduce.

本開示に係る技術は、既存の手法の上述した欠点を少なくとも軽減することを目的とする。 The technique according to the present disclosure aims to at least alleviate the above-mentioned drawbacks of the existing method.

ある観点によれば、カラー画像を表現するカラー画像データであって、原稿の画像をスキャンすることにより生成された当該カラー画像データに少なくとも減色処理を実行して、上記カラー画像に含まれる色よりも少ない数の色を含む減色画像データを生成する減色部と、上記減色画像データ内の孤立点であると判定される画素の色を当該孤立点の隣接画素の色に基づく他の色へ変換する変換処理、及び少なくとも1つの二値画像データを生成する生成処理を実行する変換部と、生成される上記二値画像データを圧縮符号化する符号化部と、を備え、前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記カラー画像データに基づく画像の背景色ではない非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が1色であるときは、前記隣接画素の色のうちで数の最も多い非背景色であり、前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が2色以上存在するときは、当該2色以上の非背景色のうちの最も暗い色又は色空間において前記背景色から最も遠い色である、画像処理装置が提供される。対応する方法及びプログラムもまた提供され得る。 From a certain point of view, it is color image data expressing a color image, and at least the color image data generated by scanning the image of the original is subjected to color reduction processing to obtain the colors contained in the color image. The color reduction unit that generates color reduction image data including a small number of colors and the color of the pixel determined to be the isolated point in the color reduction image data are converted to another color based on the color of the pixel adjacent to the isolated point. A conversion unit that executes a conversion process and a generation process that generates at least one binary image data, and a coding unit that compresses and encodes the generated binary image data, and includes colors of the adjacent pixels. In the case where the color of the adjacent pixel includes a non-background color that is not the background color of the image based on the color image data, the other color based on the above is the non-background color having the largest number among the colors of the adjacent pixel. When it is one color, it is the most numerous non-background color among the colors of the adjacent pixels, and in the other colors based on the colors of the adjacent pixels, the color of the adjacent pixels includes the non-background color. In the case, when there are two or more non-background colors having the largest number among the colors of the adjacent pixels, the darkest color among the two or more non-background colors or the most from the background color in the color space. An image processing device , which is a distant color, is provided. Corresponding methods and programs may also be provided.

本開示によれば、ノイズを含むカラー画像を圧縮する際に、より高い圧縮効率を達成し又は画像情報の再現性を改善することができる。 According to the present disclosure, when compressing a color image containing noise, higher compression efficiency can be achieved or the reproducibility of image information can be improved.

一実施形態に係る画像処理システムの構成の一例を示す概略図。The schematic diagram which shows an example of the structure of the image processing system which concerns on one Embodiment. 一実施形態に係るMFPの具体的な構成の一例を示すブロック図。The block diagram which shows an example of the specific structure of the MFP which concerns on one Embodiment. 一実施形態に係るMFPのデータ処理部の詳細な構成の一例を示すブロック図。The block diagram which shows an example of the detailed structure of the data processing part of the MFP which concerns on one Embodiment. 減色画像における色の削減の様子の一例を示す説明図。Explanatory drawing which shows an example of the state of color reduction in a color-reduced image. 孤立点の例を示す説明図。Explanatory drawing which shows an example of an isolated point. 一実施形態に係る孤立点の色の修正について説明するための説明図。Explanatory drawing for explaining correction of the color of the isolated point which concerns on one Embodiment. 一実施形態に係る孤立点の色の修正について説明するための説明図。Explanatory drawing for explaining correction of the color of the isolated point which concerns on one Embodiment. 一実施形態に係る孤立点の色の修正について説明するための説明図。Explanatory drawing for explaining correction of the color of the isolated point which concerns on one Embodiment. 一実施形態に係る孤立点の色の修正について説明するための説明図。Explanatory drawing for explaining correction of the color of the isolated point which concerns on one Embodiment. 減色画像からの二値画像の生成について説明するための説明図。An explanatory diagram for explaining the generation of a binary image from a color-reduced image. 一実施形態に係る圧縮データファイルのファイルフォーマットの一例を示す説明図。Explanatory drawing which shows an example of the file format of the compressed data file which concerns on one Embodiment. 一実施形態に係る少数色圧縮処理の概略的な流れの一例を示すフローチャート。The flowchart which shows an example of the schematic flow of the minority color compression processing which concerns on one Embodiment. 一実施形態に係る孤立点修正処理の詳細な流れの一例を示すフローチャート。The flowchart which shows an example of the detailed flow of the isolated point correction process which concerns on one Embodiment. 第1の実施例に係る色選択処理の詳細な流れの一例を示すフローチャート。The flowchart which shows an example of the detailed flow of the color selection process which concerns on 1st Embodiment. 第2の実施例に係る色選択処理の詳細な流れの一例を示すフローチャート。The flowchart which shows an example of the detailed flow of the color selection process which concerns on 2nd Embodiment. 一変形例に係る孤立点の扱いについて説明するための説明図。An explanatory diagram for explaining the handling of isolated points according to a modified example. 一変形例に係る孤立点修正処理の詳細な流れの一例を示すフローチャート。A flowchart showing an example of a detailed flow of isolated point correction processing according to a modification.

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

<<1.第1の実施形態>>
<1-1.全体的な構成>
本節では、本開示に係る技術がデジタル複合機(Multi-Function Peripheral(MFP))に適用される例を説明する。以下では、デジタル複合機を単に複合機ともいう。しかしながら、本開示に係る技術は、複合機に限定されず、いかなる種類の画像処理装置に適用されてもよい。
<< 1. First Embodiment >>
<1-1. Overall configuration>
This section describes an example in which the technology according to the present disclosure is applied to a digital multifunction device (Multi-Function Peripheral (MFP)). Hereinafter, the digital multifunction device is also simply referred to as a multifunction device. However, the technique according to the present disclosure is not limited to the multifunction device, and may be applied to any kind of image processing apparatus.

図1は、第1の実施形態に係る画像処理システム1の構成の一例を示す概略図である。画像処理システム1は、MFP101及びパーソナルコンピュータ(PC)102を含む。MFP101及びPC102は、ネットワーク103を介して互いに接続される。 FIG. 1 is a schematic diagram showing an example of the configuration of the image processing system 1 according to the first embodiment. The image processing system 1 includes an MFP 101 and a personal computer (PC) 102. The MFP 101 and the PC 102 are connected to each other via the network 103.

図1に点線104で示したように、MFP101は、ユーザによりセットされる原稿(例えば、紙文書)3の画像をスキャンすることにより原稿3の画像データを生成する。ユーザは、例えば、MFP101の後述する操作ユニット203を介して、画像データの送信の宛て先(例えば、PC102)、並びにスキャン及び送信に関連する様々な設定を、MFP101へ入力することができる。ここで入力される設定は、例えば、カラーモード(カラー/白黒)、解像度、画像データの圧縮率、及び圧縮方式(例えば、JPEG、TIFF、PDF、少数色圧縮、OCR結果を伴う少数色圧縮)のうちの1つ以上を含み得る。以下の説明では、圧縮方式として少数色圧縮が指定されるものとする。MFP101は、さらに、点線105で示したように、上述したユーザ設定に従って、指定された宛て先へ、指定された圧縮方式で生成した原稿の画像データを送信する。PC102は、例えば、受信される画像データを伸長して画像を復元できるビューワを有し、復元される原稿3の画像をディスプレイ上に表示する。 As shown by the dotted line 104 in FIG. 1, the MFP 101 generates image data of the document 3 by scanning the image of the document (for example, a paper document) 3 set by the user. The user can input to the MFP 101, for example, the destination of transmission of image data (for example, PC102) and various settings related to scanning and transmission via the operation unit 203 described later of the MFP 101. The settings entered here are, for example, color mode (color / black and white), resolution, image data compression ratio, and compression method (eg, JPEG, TIFF, PDF, minority color compression, minority color compression with OCR results). Can include one or more of. In the following description, it is assumed that minority color compression is specified as the compression method. Further, as shown by the dotted line 105, the MFP 101 transmits the image data of the original document generated by the specified compression method to the specified destination according to the above-mentioned user setting. The PC 102 has, for example, a viewer capable of decompressing the received image data and restoring the image, and displays the image of the restored original 3 on the display.

<1-2.MFPの構成>
図2は、第1の実施形態に係るMFP101の具体的な構成の一例を示すブロック図である。図2を参照すると、MFP101は、スキャナユニット201、プリンタユニット202、操作ユニット203及び制御ユニット204を備える。
<1-2. MFP configuration>
FIG. 2 is a block diagram showing an example of a specific configuration of the MFP 101 according to the first embodiment. Referring to FIG. 2, the MFP 101 includes a scanner unit 201, a printer unit 202, an operation unit 203, and a control unit 204.

スキャナユニット201は、原稿の画像をスキャンして当該原稿の画像を表現する画像データを生成する画像入力デバイスである。即ち、スキャナユニット201は、画像読み取り部としての役割を有する。スキャナユニット201は、例えば、ユーザにより設定されるカラーモードに応じて、原稿の画像をカラー画像又は白黒画像として読み取る。スキャナユニット201は、適用すべきカラーモードを自動的に判定してもよい。スキャナユニット201は、読み取った原稿の画像データを制御ユニット204へ送信する。プリンタユニット202は、画像データを制御ユニット204から受信し、受信した画像データに基づいて画像をシートへ印刷する画像出力デバイスである。操作ユニット203は、ユーザによるMFP101の操作及びMFP101への情報の入力を受け付けるユーザインタフェースである。また、操作ユニット203は、MFP101の操作に関連する情報を出力(例えば、ディスプレイ上に表示)する。 The scanner unit 201 is an image input device that scans an image of a document and generates image data expressing the image of the document. That is, the scanner unit 201 has a role as an image reading unit. The scanner unit 201, for example, reads the image of the original as a color image or a black-and-white image according to the color mode set by the user. The scanner unit 201 may automatically determine the color mode to be applied. The scanner unit 201 transmits the image data of the scanned document to the control unit 204. The printer unit 202 is an image output device that receives image data from the control unit 204 and prints an image on a sheet based on the received image data. The operation unit 203 is a user interface that accepts the operation of the MFP 101 by the user and the input of information to the MFP 101. Further, the operation unit 203 outputs information related to the operation of the MFP 101 (for example, displayed on a display).

制御ユニット204は、MFP101の機能の全般を制御するためのコントローラである。図2を参照すると、制御ユニット204は、CPU205、RAM206、操作インタフェース(I/F)207、ネットワークI/F208、ROM210及び記憶部211を含み、これらコンポーネントはシステムバス216を介して相互接続される。CPU205は、MFP101全体を制御するプロセッサである。RAM206は、CPU205の動作のためのプログラム及びデータを一時的に記憶するワークメモリである。RAM206は、画像データを一時的に記憶する画像メモリでもある。操作I/F207は、制御ユニット204による操作ユニット203との通信を仲介するインタフェースである。例えば、操作I/F207は、操作ユニット203に表示させるためのユーザインタフェース画像を操作ユニット203へ送信する。また、操作I/F207は、ユーザにより入力される情報を操作ユニット203から受信する。ネットワークI/F208は、MFP101をネットワーク103へ接続するためのインタフェースである。ネットワーク103は、例えばLAN(Local Area Network)であってよい。ROM210は、ブートROMであり、MFP101のブートプログラム及びその他のコンピュータプログラムを予め記憶する。記憶部211は、例えばHDD(Hard Disk Drive)といった二次記憶装置であってよく、システム制御用の多様なソフトウェア、設定データ及び画像データを記憶する。 The control unit 204 is a controller for controlling all the functions of the MFP 101. Referring to FIG. 2, the control unit 204 includes a CPU 205, a RAM 206, an operation interface (I / F) 207, a network I / F 208, a ROM 210 and a storage unit 211, and these components are interconnected via the system bus 216. .. The CPU 205 is a processor that controls the entire MFP 101. The RAM 206 is a work memory that temporarily stores programs and data for the operation of the CPU 205. The RAM 206 is also an image memory for temporarily storing image data. The operation I / F 207 is an interface that mediates communication between the control unit 204 and the operation unit 203. For example, the operation I / F 207 transmits a user interface image to be displayed on the operation unit 203 to the operation unit 203. Further, the operation I / F 207 receives the information input by the user from the operation unit 203. The network I / F 208 is an interface for connecting the MFP 101 to the network 103. The network 103 may be, for example, a LAN (Local Area Network). The ROM 210 is a boot ROM, and stores the boot program of the MFP 101 and other computer programs in advance. The storage unit 211 may be a secondary storage device such as an HDD (Hard Disk Drive), and stores various software for system control, setting data, and image data.

さらに、制御ユニット204は、画像バスI/F212、ラスタイメージプロセッサ(RIP)213、デバイスI/F214及びデータ処理部215を含み、これらコンポーネントは画像バス217を介して相互接続される。画像バスI/F212は、システムバス216に画像バス217を接続させるバスブリッジであり、これらバスの間で画像データのデータ構造を変換する。RIP213は、描画されるべき画像の内容を記述したページ記述言語(PDL)コードを解釈して、画像の内容を指定された解像度のビットマップ画像に展開する、いわゆるレンダリング処理を実行する。デバイスI/F214は、それぞれの信号線を介してスキャナユニット201及びプリンタユニット202へ接続される。デバイスI/F214は、例えば、画像データの同期系/非同期系の変換を行う。データ処理部215は、スキャナユニット201から受信される画像データについての画像処理、及びプリンタユニット202へ送信される印刷用の画像データについての画像処理を実行する。データ処理部215により実行される画像処理は、例えば、少数色圧縮を含み得る。例えば、スキャンされる文書について圧縮方式として少数色圧縮が設定されると、データ処理部215は、スキャナユニット201により原稿の画像を読み取ることにより生成された画像データを対象として、少数色圧縮を実行する。少数色圧縮の結果として生成される圧縮データは、例えば、ネットワークI/F208及びネットワーク103を介して、指定された宛て先(例えば、PC102)へ送信される。データ処理部215は、ネットワークI/F208を介して受信される圧縮データを伸長して、もとの画像データを復元することもできる。データ処理部215により復元される画像データは、例えば、デバイスI/F214を介して印刷のためにプリンタユニット202へ送信される。データ処理部215の詳細について、次節でさらに説明する。画像バス217は、画像データを高速で転送するための信号線である。画像バス217は、例えばPCIバス又はIEEE1394バスであってよい。 Further, the control unit 204 includes an image bus I / F212, a raster image processor (RIP) 213, a device I / F214, and a data processing unit 215, and these components are interconnected via the image bus 217. The image bus I / F 212 is a bus bridge that connects the image bus 217 to the system bus 216, and converts the data structure of the image data between these buses. The RIP 213 interprets a page description language (PDL) code that describes the content of the image to be drawn, and executes a so-called rendering process that expands the content of the image into a bitmap image having a specified resolution. The device I / F 214 is connected to the scanner unit 201 and the printer unit 202 via the respective signal lines. The device I / F 214 converts, for example, a synchronous / asynchronous system of image data. The data processing unit 215 executes image processing on the image data received from the scanner unit 201 and image processing on the image data for printing transmitted to the printer unit 202. The image processing performed by the data processing unit 215 may include, for example, minority color compression. For example, when minority color compression is set as the compression method for the document to be scanned, the data processing unit 215 executes minority color compression on the image data generated by scanning the image of the original by the scanner unit 201. do. The compressed data generated as a result of the minority color compression is transmitted to a designated destination (for example, PC 102) via, for example, the network I / F 208 and the network 103. The data processing unit 215 can also decompress the compressed data received via the network I / F 208 and restore the original image data. The image data restored by the data processing unit 215 is transmitted to the printer unit 202 for printing via, for example, the device I / F 214. The details of the data processing unit 215 will be further described in the next section. The image bus 217 is a signal line for transferring image data at high speed. The image bus 217 may be, for example, a PCI bus or an IEEE1394 bus.

<1-3.データ処理部の詳細>
図2に示したデータ処理部215は、上述したように、原稿の画像をスキャンすることにより生成された画像データ及び受信された画像データについて、様々な画像処理を実行する。とりわけ、本実施形態において、データ処理部215は、入力画像がカラー画像である場合に、設定に応じて少数色圧縮を実行することにより、そのカラー画像の画像データを圧縮する。図3は、データ処理部215の詳細な構成の一例を示すブロック図である。図3を参照すると、データ処理部215は、減色部310、変換部320、符号化部340及びデータ結合部350を含む。なお、以下の説明では、説明を簡明にするために、画像を表現する画像データを単に「画像」と称することがある。
<1-3. Details of data processing unit>
As described above, the data processing unit 215 shown in FIG. 2 executes various image processing on the image data generated by scanning the image of the original and the received image data. In particular, in the present embodiment, when the input image is a color image, the data processing unit 215 compresses the image data of the color image by performing minority color compression according to the setting. FIG. 3 is a block diagram showing an example of a detailed configuration of the data processing unit 215. Referring to FIG. 3, the data processing unit 215 includes a color reduction unit 310, a conversion unit 320, a coding unit 340, and a data combining unit 350. In the following description, for the sake of simplicity, the image data representing the image may be simply referred to as an "image".

(1)減色部
減色部310は、入力カラー画像301について少なくとも減色処理を実行して、入力カラー画像301に含まれる色よりも少ない数の色を含む減色画像315を生成する。図3に示したように、減色部310は、減色処理部311、色統合部312及び中間色削減部313を含み得る。減色処理部311は、入力カラー画像301について減色処理を実行する。減色処理は、典型的には、いわゆるフルカラー表現又はトゥルーカラー表現からインデックスカラー表現へと画像表現を変換する処理であってよい。減色処理の結果として生成される画像(インデックスカラー画像ともいう)に含まれる色の数は、高々カラーパレットに格納し得るインデックスカラーの上限個数である。
(1) Color reduction unit The color reduction unit 310 executes at least a color reduction process on the input color image 301 to generate a color reduction image 315 containing a smaller number of colors than the colors included in the input color image 301. As shown in FIG. 3, the color reduction unit 310 may include a color reduction processing unit 311, a color integration unit 312, and an intermediate color reduction unit 313. The color reduction processing unit 311 executes color reduction processing on the input color image 301. The color reduction process may typically be a process of converting an image expression from a so-called full color expression or a true color expression to an index color expression. The number of colors contained in the image (also referred to as an index color image) generated as a result of the color reduction processing is the upper limit number of index colors that can be stored in the color palette at most.

色統合部312及び中間色削減部313は、特許第3890250号公報において開示された手法に従って色数を削減するコンポーネントである。図中で破線で示したように、色統合部312及び中間色削減部313の各々は、必ずしも減色部310に含まれなくてもよい。色統合部312は、例えば、インデックスカラーのうち略同一色であると判定される2つの色(例えば、R、G、Bそれぞれの成分値の差の絶対値が全て閾値を下回る色のペア)の一方を他方へ統合する。中間色削減部313は、インデックスカラーの各々について輝度成分及び2つの色差成分を導出し、色差平面において互いに近いカラー同士を統合する。例えば、白地に黒で書かれた文字のエッジ部分に白色と黒色との間の多段階の階調の灰色が存在する場合、中間色削減部313は、白色に近い灰色を白色へ、黒色に近い灰色を黒色へそれぞれ統合し得る。これら処理の結果として、減色画像315に含まれる異なる色の数は、典型的なカラーパレットの色数(例えば、256色)よりも少ない数へと削減され得る。一例として、印刷された黒色文字及び赤色文字、並びに青色インクで手書きされた内容を有する文書のスキャンに基づく減色画像は、色の濃淡に関わらず、黒色、赤色、青色及び白色という4つのインデックスカラーを含み得る。 The color integration unit 312 and the intermediate color reduction unit 313 are components that reduce the number of colors according to the method disclosed in Japanese Patent No. 3890250. As shown by the broken line in the figure, each of the color integration unit 312 and the intermediate color reduction unit 313 does not necessarily have to be included in the color reduction unit 310. The color integration unit 312 is, for example, two colors of index colors that are determined to be substantially the same color (for example, a pair of colors in which the absolute value of the difference between the component values of R, G, and B is all below the threshold value). Integrate one into the other. The intermediate color reduction unit 313 derives a luminance component and two color difference components for each of the index colors, and integrates colors close to each other in the color difference plane. For example, when there is a multi-step gradation of gray between white and black at the edge of a character written in black on a white background, the neutral color reduction unit 313 changes gray close to white to white and close to black. Gray can be integrated into black respectively. As a result of these processes, the number of different colors contained in the color-reduced image 315 can be reduced to a smaller number than the number of colors in a typical color palette (eg, 256 colors). As an example, a color-reduced image based on scanning a document with printed black and red characters and content handwritten with blue ink has four index colors: black, red, blue, and white, regardless of shade of color. May include.

図4は、減色画像における色の削減の様子の一例を示す説明図である。図4の左に示した文字401は、入力カラー画像301に含まれる黒色文字の一例である。入力カラー画像301について単純な減色処理を行うのみである場合、文字401のエッジ部分402において、図4の中央に示したような中間色の階調が現れる。具体的には、画素403は黒色を示すのに対し、画素404は黒色に近い灰色を、画素405は白色に近い灰色を示す。こうした状況において、減色部310が色の統合及び中間色の削減をする結果として、エッジ部分402に含まれるインデックスカラーは、図4の右に示したように白色及び黒色の2色のみとなる。 FIG. 4 is an explanatory diagram showing an example of a state of color reduction in a color-reduced image. The character 401 shown on the left side of FIG. 4 is an example of a black character included in the input color image 301. When only a simple color reduction process is performed on the input color image 301, a gradation of intermediate colors as shown in the center of FIG. 4 appears at the edge portion 402 of the character 401. Specifically, the pixel 403 shows black, the pixel 404 shows gray close to black, and the pixel 405 shows gray close to white. In such a situation, as a result of the color reduction unit 310 integrating colors and reducing intermediate colors, the index colors included in the edge portion 402 are only two colors, white and black, as shown on the right side of FIG.

減色部310は、減色画像315に加えて、カラー情報316を生成する。カラー情報316は、減色画像315に含まれるインデックスカラーの各々についての画素数データ、色重心データ及び分布範囲データを含む。画素数データは、減色画像315内の個々のインデックスカラーを示す画素の数を表す。色重心データは、個々のインデックスカラーの色重心(例えば、R、G、B成分値)を表す。分布範囲データは、個々のインデックスカラーを示す画素の画像内の分布範囲を、それら画素を包含する最小の矩形の左上隅の位置座標及び右下隅の位置座標により表す。減色部310は、減色画像315及びカラー情報316を変換部320へ出力する。 The color reduction unit 310 generates color information 316 in addition to the color reduction image 315. The color information 316 includes pixel number data, color center of gravity data, and distribution range data for each of the index colors included in the color reduction image 315. The pixel number data represents the number of pixels indicating individual index colors in the color-reduced image 315. The color center of gravity data represents the color center of gravity (for example, R, G, B component values) of each index color. The distribution range data represents the distribution range in the image of the pixels showing the individual index colors by the position coordinates of the upper left corner and the position coordinates of the lower right corner of the smallest rectangle including those pixels. The color reduction unit 310 outputs the color reduction image 315 and the color information 316 to the conversion unit 320.

(2)変換部
既存の手法では、上述した減色画像315からそれぞれのインデックスカラーに対応する二値画像が生成され、それら二値画像が圧縮符号化される。それにより、もとの入力カラー画像をそのまま圧縮符号化したケースと比較して、結果的に得られる圧縮データのデータサイズは格段に低減される。二値画像の圧縮符号化は、例えばMH、MR又はMMRといった符号化法に従って行われ得る。二値画像の圧縮のための既存の符号化法は、概して、近傍の画素の間の画素値の相関に依拠して、高い圧縮効率を達成する。これは、隣り合う画素の間の画素値の(例えば、真から偽、又は偽から真への)遷移が少ないほど圧縮データのデータサイズが小さくなることを意味する。しかしながら、文書をスキャナで読み取ると、画像内に読み取りムラに由来するノイズが生じることがある。また、スキャナなどの装置が行い得る一時的なデータの圧縮又は量子化も、画像内にノイズを生じさせ得る。これらノイズは、孤立点として二値画像に現れ、近傍の画素の間の本来の相関をかき乱し、二値画像の圧縮効率を低下させる。読み取られる文書の内容に依存するものの、発明者が調査したサンプルケースでは、4~5文字に1画素程度という割合で孤立点が現れていた。
(2) Conversion unit In the existing method, a binary image corresponding to each index color is generated from the above-mentioned reduced color image 315, and the binary image is compressed and coded. As a result, the data size of the resulting compressed data is significantly reduced as compared with the case where the original input color image is compressed and encoded as it is. The compression coding of the binary image can be performed according to a coding method such as MH, MR or MMR. Existing coding methods for compressing binary images generally rely on the correlation of pixel values between neighboring pixels to achieve high compression efficiency. This means that the smaller the transition of pixel values (eg, true to false or false to true) between adjacent pixels, the smaller the data size of the compressed data. However, when a document is scanned by a scanner, noise due to uneven reading may occur in the image. Temporary data compression or quantization that can be performed by a device such as a scanner can also cause noise in the image. These noises appear in the binary image as isolated points, disturb the original correlation between nearby pixels, and reduce the compression efficiency of the binary image. Although it depends on the content of the document to be read, isolated points appeared at a rate of about 1 pixel in 4 to 5 characters in the sample case investigated by the inventor.

二値画像から孤立点を消去すれば、孤立点の近傍領域で画素値は平坦となることから、圧縮効率の低下は軽減され得る。しかし、画一的に孤立点を消去すると、文書内容の再現性が失われ、情報(例えば、文書内に書かれた文字その他の構造情報)の意図しない変化又は欠落が引き起こされ得る。そこで、本実施形態において、変換部320は、以下に詳しく説明するように、画像内の孤立点の色を変換することにより、圧縮効率の低下又は情報の再現性の低下を防ぐ。 If the isolated points are erased from the binary image, the pixel values become flat in the region near the isolated points, so that the decrease in compression efficiency can be alleviated. However, uniformly eliminating isolated points can result in loss of reproducibility of document content and unintended changes or omissions in information (eg, characters or other structural information written in the document). Therefore, in the present embodiment, the conversion unit 320 prevents a decrease in compression efficiency or a decrease in information reproducibility by converting the color of isolated points in the image, as described in detail below.

本実施形態において、変換部320は、減色画像315内の孤立点であると判定される画素の色を、当該孤立点の隣接画素の色に基づく他の色へ変換する変換処理と、少なくとも1つの二値画像を生成する生成処理とを実行する。隣接画素とは、画像の境界に位置しない非境界画素については、左上、上、右上、左、右、左下、下及び右下の8個の画素をいう。境界画素について、隣接画素の数は、例えば5個又は3個であり得る。予め定義される条件に依存して、上記他の色は、非背景色であってよい。即ち、本実施形態において、変換部320は、画一的に孤立点を消去(孤立点の色を背景色へ変換)するわけではない。 In the present embodiment, the conversion unit 320 converts the color of the pixel determined to be an isolated point in the color-reduced image 315 into another color based on the color of the pixel adjacent to the isolated point, and at least one. Performs a generation process to generate two binary images. Adjacent pixels refer to eight pixels at the upper left, upper, upper right, left, right, lower left, lower, and lower right for non-boundary pixels that are not located at the boundary of the image. For boundary pixels, the number of adjacent pixels can be, for example, 5 or 3. The other colors may be non-background colors, depending on the predefined conditions. That is, in the present embodiment, the conversion unit 320 does not uniformly erase the isolated points (convert the color of the isolated points to the background color).

典型的には、変換部320は、隣接画素の全てと異なる色を示す画素が孤立点であると判定してよい。図5は、孤立点の例を示す説明図である。図5に一例として示した減色画像315は、図中で斜線で網掛けされた矩形で示した赤色文字、塗りつぶされた矩形で示した黒色文字、及び破線で示した青色のインクによる手書き部分を含む。画像315の上部の1つの赤色文字の辺縁に黒色画素501がある。この黒色画素501の色を変換することなく、画像315から黒色二値画像を生成すると、その黒色二値画像内で黒色画素501は孤立点となる。画像315の中央の白色領域にある青色画素502もまた孤立点となり得る。同様に、画像315の下部の黒色文字の辺縁に位置する赤色画素503もまた孤立点となり得る。なお、ある画素が孤立点であると判定するための判定条件は、上述した例に限定されない。一変形例において、変換部320は、ある画素が隣接画素のいくつかと同一の色を示す場合であっても、その画素が孤立点であると判定し得る。そうした変形例について、後にさらに説明する。 Typically, the conversion unit 320 may determine that a pixel showing a color different from all of the adjacent pixels is an isolated point. FIG. 5 is an explanatory diagram showing an example of isolated points. The color-reduced image 315 shown as an example in FIG. 5 shows red characters shown by shaded rectangles in the figure, black characters shown by filled rectangles, and handwritten parts with blue ink shown by broken lines. include. There is a black pixel 501 on the edge of one red character at the top of the image 315. If a black binary image is generated from the image 315 without converting the color of the black pixel 501, the black pixel 501 becomes an isolated point in the black binary image. The blue pixel 502 in the central white region of image 315 can also be an isolated point. Similarly, the red pixel 503 located at the edge of the black character at the bottom of the image 315 can also be an isolated point. The determination condition for determining that a pixel is an isolated point is not limited to the above-mentioned example. In one modification, the conversion unit 320 may determine that a pixel is an isolated point, even if the pixel exhibits the same color as some of the adjacent pixels. An example of such a modification will be further described later.

再び図3を参照すると、変換部320は、背景選択部321、孤立点修正部322及び二値画像生成部323を含む。 Referring to FIG. 3 again, the conversion unit 320 includes a background selection unit 321, an isolated point correction unit 322, and a binary image generation unit 323.

(2-1)背景選択部
背景選択部321は、減色画像315に含まれる色(即ち、インデックスカラー)のうちの1つの色を背景色として選択する。背景色は、多くの場合、スキャンされる原稿の下地の色である。背景色は、例えば、減色画像において最も多くの画素により示される色、又は減色画像において最も広い範囲に分布する色として認識されてよい。背景選択部321は、カラー情報316の画素値データ及び分布範囲データの一方又は双方に基づいて、上記条件に当てはまる背景色を選択し得る。背景色については、後述する二値画像生成部323により二値画像は生成されなくてよい。その代わりに、背景選択部321は、選択した背景色に対応する情報を背景色情報316-Mとしてカラー情報316から抽出し、抽出した背景色情報316-Mをデータ結合部350へ出力する。
(2-1) Background selection unit The background selection unit 321 selects one of the colors (that is, the index color) included in the color-reduced image 315 as the background color. The background color is often the background color of the document being scanned. The background color may be recognized as, for example, the color represented by the most pixels in the color-reduced image or the color distributed in the widest range in the color-reduced image. The background selection unit 321 may select a background color that meets the above conditions based on one or both of the pixel value data and the distribution range data of the color information 316. As for the background color, the binary image may not be generated by the binary image generation unit 323 described later. Instead, the background selection unit 321 extracts the information corresponding to the selected background color from the color information 316 as the background color information 316-M, and outputs the extracted background color information 316-M to the data combination unit 350.

(2-2)孤立点修正部
孤立点修正部322は、減色画像315内の孤立点であると判定される画素の各々について、当該孤立点に隣接する隣接画素の色から変換後の色(以下、選択色という)を選択し、当該孤立点の色を選択色へ修正する。なお、以下の説明では、「修正」との語が「変換」と実質的に同等の意味で用いられる。第1の実施例において、孤立点修正部322は、各孤立点について隣接画素数を色ごとに集計し、集計した隣接画素数の最も多い色をその孤立点のための選択色として選択してもよい。
(2-2) Isolated point correction unit The isolated point correction unit 322 converts each of the pixels determined to be isolated points in the color-reduced image 315 from the color of the adjacent pixel adjacent to the isolated point (the color after conversion (2-2). Hereinafter, it is referred to as a selected color), and the color of the isolated point is corrected to the selected color. In the following description, the word "correction" is used with substantially the same meaning as "conversion". In the first embodiment, the isolated point correction unit 322 totals the number of adjacent pixels for each isolated point for each color, and selects the color having the largest total number of adjacent pixels as the selected color for the isolated point. It is also good.

図6A~図6Dは、孤立点の色の修正について説明するための説明図である。なお、これら図を通じて、白色が背景色として選択されているものとする。また、図中の*印が孤立点を表す。図6Aの例において、修正前の孤立点601の色は赤色である。孤立点601の左上、上、右上、左及び右の隣接画素の色は白色であり、左下、下及び右下の隣接画素の色は黒色である。よって、隣接画素の色(選択の候補)は白色及び黒色を含み、白色の隣接画素数は5個、黒色の隣接画素数は3個である。したがって、選択色は白色であり、孤立点修正部322は、孤立点601の色を白色へ修正する。 6A to 6D are explanatory views for explaining the correction of the color of isolated points. It is assumed that white is selected as the background color through these figures. The * mark in the figure indicates an isolated point. In the example of FIG. 6A, the color of the isolated point 601 before modification is red. The color of the adjacent pixels on the upper left, upper, upper right, left and right of the isolated point 601 is white, and the color of the adjacent pixels on the lower left, lower and lower right is black. Therefore, the colors of the adjacent pixels (selection candidates) include white and black, the number of adjacent pixels of white is 5, and the number of adjacent pixels of black is 3. Therefore, the selected color is white, and the isolated point correction unit 322 corrects the color of the isolated point 601 to white.

図6Bの例において、修正前の孤立点602の色は赤色である。孤立点602の左上、上及び右上の隣接画素の色は白色であり、左、右、左下、下及び右下の隣接画素の色は黒色である。よって、隣接画素の色(選択の候補)は白色及び黒色を含み、白色の隣接画素数は3個、黒色の隣接画素数は5個である。したがって、選択色は黒色であり、孤立点修正部322は、孤立点602の色を黒色へ修正する。 In the example of FIG. 6B, the color of the isolated point 602 before modification is red. The color of the adjacent pixels on the upper left, upper and upper right of the isolated point 602 is white, and the color of the adjacent pixels on the left, right, lower left, lower and lower right is black. Therefore, the colors of the adjacent pixels (selection candidates) include white and black, the number of adjacent pixels of white is 3, and the number of adjacent pixels of black is 5. Therefore, the selected color is black, and the isolated point correction unit 322 corrects the color of the isolated point 602 to black.

第2の実施例において、孤立点修正部322は、隣接画素の色が非背景色を含む場合に、集計される隣接画素数の最も多い非背景色を選択色として選択してもよい。図6Cの左側には、修正前の孤立点601及びその隣接画素が再び示されている。孤立点601の隣接画素の色は、非背景色である黒色を含む。黒色よりも多くの隣接画素数を有する他の非背景色は存在しない。したがって、本実施例では、図6Aの例とは異なり、孤立点修正部322は、孤立点601の色を黒色へ修正する。本実施例によれば、例えばノイズに起因して文字の辺縁の画素の色が本来の色とは異なる色として認識され孤立点となったとしても、その画素を背景に埋没させずに、文字に適切に属する隣接画素と同一の色へ、その画素の色を修正することができる。 In the second embodiment, when the color of the adjacent pixel includes the non-background color, the isolated point correction unit 322 may select the non-background color having the largest number of adjacent pixels to be aggregated as the selection color. On the left side of FIG. 6C, the isolated point 601 before modification and its adjacent pixels are shown again. The color of the adjacent pixel of the isolated point 601 includes black, which is a non-background color. There are no other non-background colors that have more adjacent pixels than black. Therefore, in this embodiment, unlike the example of FIG. 6A, the isolated point correction unit 322 corrects the color of the isolated point 601 to black. According to this embodiment, even if the color of the pixel at the edge of the character is recognized as a color different from the original color due to noise and becomes an isolated point, the pixel is not buried in the background. The color of the pixel can be modified to the same color as the adjacent pixel that appropriately belongs to the character.

第3の実施例において、孤立点修正部322は、隣接画素数が最も多い色が2色以上存在する場合に、当該2色以上の色のうちの最も暗い色へ孤立点の色を修正してもよい。図6Dの例において、修正前の孤立点603の色は赤色である。孤立点603の左上、上、右上及び右の隣接画素の色は白色であり、左、左下、下及び右下の隣接画素の色は黒色である。よって、隣接画素の色(選択の候補)は白色及び黒色を含み、白色の隣接画素数及び黒色の隣接画素数は共に4個である。したがって、孤立点修正部322は、孤立点603の修正のための選択色として、白色及び黒色のうちで最も暗い黒色を選択する。色の暗さの判定は、例えば明度又は輝度の値を比較することにより行われてよい。また、背景色が白色でない場合には、最も暗い色の代わりに、候補のうちで色空間において背景色から最も遠い色が選択されてもよい。本実施例によれば、孤立点の色が鮮明となるような修正の可能性を高めて、画像内の情報の欠落を防止することができる。 In the third embodiment, the isolated point correction unit 322 corrects the color of the isolated point to the darkest color among the two or more colors when there are two or more colors having the largest number of adjacent pixels. You may. In the example of FIG. 6D, the color of the isolated point 603 before modification is red. The color of the adjacent pixels on the upper left, upper, upper right, and right of the isolated point 603 is white, and the color of the adjacent pixels on the left, lower left, lower, and lower right is black. Therefore, the colors of the adjacent pixels (selection candidates) include white and black, and the number of adjacent pixels of white and the number of adjacent pixels of black are both four. Therefore, the isolated point correction unit 322 selects the darkest black color among white and black as the selection color for correcting the isolated point 603. The determination of color darkness may be made, for example, by comparing the values of lightness or luminance. When the background color is not white, the color farthest from the background color in the color space may be selected from the candidates instead of the darkest color. According to this embodiment, it is possible to increase the possibility of correction so that the color of isolated points becomes clear and prevent the loss of information in the image.

第3の実施例は、上述した第2の実施例と組み合わせられてもよい。その場合、隣接画素数の最も多い非背景色が2色以上存在する場合に、孤立点の色が、当該2色以上の非背景色のうちの最も暗い非背景色へ修正され得る。 The third embodiment may be combined with the second embodiment described above. In that case, when there are two or more non-background colors having the largest number of adjacent pixels, the color of the isolated point can be corrected to the darkest non-background color among the two or more non-background colors.

本実施形態において、孤立点修正部322は、減色画像315に含まれる背景色以外のインデックスカラーを画素数の少ない順に処理対象に設定して、各インデックスカラーを示す孤立点の色の修正を実行してもよい。以下の説明において、各インデックスカラーをレイヤともいう。図5の画像315の例では、青色を示す画素数が最も少なく、赤色を示す画素数が次に少なく、黒色がそれに続く。白色は、背景色である。よって、孤立点修正部322は、まず、青色のレイヤに属する孤立点(青色を示す孤立点)の色を修正する。この修正によって、赤色画素、黒色画素及び白色画素が増加する可能性があり、その後に処理されるレイヤのいくつかの孤立点が非孤立点となり得る。次いで、孤立点修正部322は、赤色のレイヤに属する孤立点の色を修正する。この修正によって、青色画素、黒色画素及び白色画素が増加する可能性があり、次に処理されるレイヤの孤立点が非孤立点となり得る。次いで、孤立点修正部322は、黒色のレイヤに属する孤立点の色を修正する。こうした処理の順序によれば、微小なノイズに起因する優勢でない色(より画素数の少ない色)の孤立点をより優勢な色へ変えて、より優勢な色のレイヤの孤立点をできる限り解消した後、それでもなお残る孤立点について色の修正を適切に実行することができる。 In the present embodiment, the isolated point correction unit 322 sets index colors other than the background color included in the color reduction image 315 as processing targets in ascending order of the number of pixels, and corrects the colors of the isolated points indicating each index color. You may. In the following description, each index color is also referred to as a layer. In the example of image 315 of FIG. 5, the number of pixels indicating blue is the smallest, the number of pixels indicating red is the next smallest, followed by black. White is the background color. Therefore, the isolated point correction unit 322 first corrects the color of the isolated point (isolated point indicating blue) belonging to the blue layer. This modification can increase the number of red pixels, black pixels, and white pixels, and some isolated points of the layer to be processed after that can be non-isolated points. Next, the isolated point correction unit 322 corrects the color of the isolated point belonging to the red layer. This modification may increase the number of blue pixels, black pixels, and white pixels, and the isolated point of the layer to be processed next may be a non-isolated point. Next, the isolated point correction unit 322 corrects the color of the isolated point belonging to the black layer. According to this order of processing, the isolated points of non-dominant colors (colors with a smaller number of pixels) due to minute noise are changed to more dominant colors, and the isolated points of the layer of the more dominant color are eliminated as much as possible. After that, the color correction can be properly performed for the isolated points that still remain.

孤立点修正部322は、孤立点の色を修正した場合、その修正に基づいてカラー情報316を更新する。 When the isolated point correction unit 322 corrects the color of the isolated point, the isolated point correction unit 322 updates the color information 316 based on the correction.

(2-3)二値画像生成部
二値画像生成部323は、孤立点修正部322により画素値の修正された減色画像315を分割することにより、非背景色の各々に対応する二値画像を生成する。図7は、減色画像からの二値画像の生成について説明するための説明図である。図5の例と対比すると、図7の例では、色の修正の結果として孤立点が解消されている。二値画像生成部323は、この減色画像315から赤色二値画像335-1、黒色二値画像335-2及び青色二値画像335-3を生成する。赤色二値画像335-1は、減色画像315内の赤色画素の分布範囲に相当するサイズを有し、赤色画素において画素値“1(真)”を、それ以外の画素において画素値“0(偽)”を示す。黒色二値画像335-2は、減色画像315内の黒色画素の分布範囲に相当するサイズを有し、黒色画素において画素値“1(真)”を、それ以外の画素において画素値“0(偽)”を示す。青色二値画像335-3は、減色画像315内の青色画素の分布範囲に相当するサイズを有し、青色画素において画素値“1(真)”を、それ以外の画素において画素値“0(偽)”を示す。どの二値画像も真を示さない画素の色は背景色であり、背景色は背景色情報316-Mの色重心データにより表される。図7の例では、背景色は白色である。なお、上述した例に限定されず、個々の二値画像のサイズは減色画像315と同一であってもよい。
(2-3) Binary image generation unit The binary image generation unit 323 divides the color-reduced image 315 whose pixel value is corrected by the isolated point correction unit 322, so that the binary image corresponding to each of the non-background colors is obtained. To generate. FIG. 7 is an explanatory diagram for explaining the generation of a binary image from a color-reduced image. In contrast to the example of FIG. 5, in the example of FIG. 7, isolated points are eliminated as a result of color correction. The binary image generation unit 323 generates a red binary image 355-1, a black binary image 335-2, and a blue binary image 335-3 from the reduced color image 315. The red binary image 335-1 has a size corresponding to the distribution range of the red pixels in the color-reduced image 315, and the pixel value “1 (true)” is set in the red pixels and the pixel value “0 (”” in the other pixels. False) ”is shown. The black binary image 335-2 has a size corresponding to the distribution range of black pixels in the color-reduced image 315, and has a pixel value of “1 (true)” in the black pixels and a pixel value of “0 (” in the other pixels. False) ”is shown. The blue binary image 335-3 has a size corresponding to the distribution range of the blue pixels in the color-reduced image 315, and has a pixel value “1 (true)” in the blue pixels and a pixel value “0 (”” in the other pixels. False) ”is shown. The color of the pixel that does not show true in any binary image is the background color, and the background color is represented by the color center of gravity data of the background color information 316-M. In the example of FIG. 7, the background color is white. The size of each binary image may be the same as that of the color-reduced image 315 without being limited to the above-mentioned example.

二値画像生成部323は、このように生成される1つ以上の二値画像335-1,…,Nと、非背景色のカラー情報316-1,…,Nとを符号化部340へ出力する。 The binary image generation unit 323 transfers one or more binary images 335-1, ..., N and the color information 316-1, ..., N of the non-background color to the coding unit 340. Output.

なお、ここでは、孤立点修正部322が減色画像内の孤立点の色を修正(あるいは変換)した後に、二値画像生成部323が各色について二値画像を生成する例を主に説明した。しかしながら、修正処理(変換処理)及び二値画像生成処理の順序は、上述した例に限定されない。例えば、変換部320は、減色画像から暫定二値画像を生成した後に、減色画像内の孤立点に対応する位置の暫定二値画像の画素値を切り替えることにより当該孤立点の色を変換して、変換二値画像を生成してもよい。より具体的には、変換部320は、変換前の色の二値画像の画素値を真から偽へ切り替え、及び変換後の色の二値画像の画素値を偽から真へ切り替えることにより、孤立点の色を変換し得る。この場合、孤立点は、例えば、二値画像において真を示す画素であって、隣接する画素の全て(又はほとんど)が偽を示す画素に対応し得る。 Here, an example in which the binary image generation unit 323 generates a binary image for each color after the isolated point correction unit 322 corrects (or converts) the color of the isolated point in the color-reduced image has been mainly described. However, the order of the correction process (conversion process) and the binary image generation process is not limited to the above-mentioned example. For example, the conversion unit 320 converts the color of the isolated point by switching the pixel value of the provisional binary image at the position corresponding to the isolated point in the color-reduced image after generating the provisional binary image from the color-reduced image. , A converted binary image may be generated. More specifically, the conversion unit 320 switches the pixel value of the binary image of the color before conversion from true to false, and switches the pixel value of the binary image of the color after conversion from false to true. The color of isolated points can be converted. In this case, the isolated point may correspond to, for example, a pixel indicating true in a binary image, and all (or almost) adjacent pixels indicating false.

(3)符号化部
符号化部340は、変換部320から入力される二値画像335-1,…,Nの各々を圧縮符号化して、圧縮画像データを生成する。なお、各二値画像335-1,…,Nのサイズは、カラー情報316-1,…,Nの分布範囲データにより示される。ここでの圧縮符号化は、例えばMH、MR又はMMRといった既存のいかなる符号化法に基づいて行われてもよい。符号化部340は、非背景色の各々について、圧縮符号化により生成される圧縮画像データと対応するカラー情報とを含む圧縮データ345-1,…,Nを生成する。そして、符号化部340は、生成した圧縮データ345-1,…,Nをデータ結合部350へ出力する。
(3) Coding unit The coding unit 340 compresses and encodes each of the binary images 335-1, ..., N input from the conversion unit 320 to generate compressed image data. The size of each binary image 335-1, ..., N is indicated by the distribution range data of the color information 316-1, ..., N. The compression coding here may be based on any existing coding method such as MH, MR or MMR. The coding unit 340 generates compressed data 345-1, ..., N including compressed image data generated by compression coding and corresponding color information for each of the non-background colors. Then, the coding unit 340 outputs the generated compressed data 345-1, ..., N to the data combining unit 350.

(4)データ結合部
データ結合部350は、符号化部340から入力される圧縮画像データにヘッダデータを結合することにより圧縮データファイル355を生成する。図8は、データ結合部350により生成され得る圧縮データファイルのファイルフォーマットの一例を示す説明図である。図8を参照すると、圧縮データファイル355は、ヘッダ領域801とN個のデータ領域802-1,…,Nとを含む。
(4) Data combining unit The data combining unit 350 generates a compressed data file 355 by combining header data with the compressed image data input from the encoding unit 340. FIG. 8 is an explanatory diagram showing an example of a file format of a compressed data file that can be generated by the data combining unit 350. Referring to FIG. 8, the compressed data file 355 includes a header area 801 and N data areas 802-1, ..., N.

ヘッダ領域801は、スキャンされた文書の属性データと、変換部320から入力される背景色情報とを含み得る。文書の属性データは、例えば、入力カラー画像301のサイズ(縦横の画素数)及びスキャン関連の設定値(例えば、解像度及び圧縮方式)を含み得る。背景色情報は、背景色を表す色重心データを含み得る。背景色は、上述したように、最も多くの画素数を有する色又は画像内で最も広い範囲を占める色であり得る。例えば、赤色の用紙に内容を印刷した文書がスキャンされた場合には、通常、赤色が背景色として選択され得る。但し、多くのケースでは白色の用紙が用いられることから、背景色が白色であると判定される場合には、データ結合部350は、背景色情報を圧縮データファイルに含めなくてもよい。白色判定のための手法の一例は、特許第3890250号公報により開示されている。 The header area 801 may include the attribute data of the scanned document and the background color information input from the conversion unit 320. The document attribute data may include, for example, the size of the input color image 301 (number of pixels in the vertical and horizontal directions) and scan-related setting values (eg, resolution and compression method). The background color information may include color centroid data representing the background color. As mentioned above, the background color can be the color having the largest number of pixels or the color occupying the widest range in the image. For example, if a document with content printed on red paper is scanned, red may usually be selected as the background color. However, since white paper is used in many cases, the data combining unit 350 does not have to include the background color information in the compressed data file when it is determined that the background color is white. An example of a method for determining whiteness is disclosed in Japanese Patent No. 3890250.

i番目のデータ領域802-i(i=1,…,N)は、i番目の非背景色のカラー情報及び圧縮画像データを含む。減色画像315に残るインデックスカラーの個数をMとすると、データ領域802の個数NはM-1に等しい。即ち、非背景色の個数Nだけデータ領域802が繰り返され得る。入力カラー画像301が単色の画像であった場合(例えば、白紙文書がスキャンされた場合)には、N=0となり、圧縮データファイル355はデータ領域802を含まなくてよい。入力カラー画像301が白黒画像であった場合には、N=1となり、圧縮データファイル355は単一のデータ領域802のみを含み得る。 The i-th data area 802-i (i = 1, ..., N) includes the i-th non-background color color information and compressed image data. Assuming that the number of index colors remaining in the color-reduced image 315 is M, the number N of the data area 802 is equal to M-1. That is, the data area 802 can be repeated by the number N of non-background colors. When the input color image 301 is a monochromatic image (for example, when a blank document is scanned), N = 0, and the compressed data file 355 does not have to include the data area 802. When the input color image 301 is a black and white image, N = 1, and the compressed data file 355 may include only a single data area 802.

<<2.処理の流れの例>>
<2-1.概略的な流れ>
図9は、本実施形態において制御ユニット204のデータ処理部215により実行される少数色圧縮処理の概略的な流れの一例を示すフローチャートである。なお、以下の説明では、処理ステップをS(ステップ)と略記する。
<< 2. Example of processing flow >>
<2-1. General flow>
FIG. 9 is a flowchart showing an example of a schematic flow of the minority color compression process executed by the data processing unit 215 of the control unit 204 in the present embodiment. In the following description, the processing step is abbreviated as S (step).

まず、S910で、減色部310は、入力カラー画像(カラー画像を表現するカラー画像データ)について減色処理を実行して、インデックスカラー画像及び対応するカラー情報を生成する。 First, in S910, the color reduction unit 310 executes color reduction processing on an input color image (color image data expressing a color image) to generate an indexed color image and corresponding color information.

次いで、S920で、減色部310は、色重心の値の比較に基づいて略同一色であると判定されるインデックスカラー同士を統合する。減色部310は、統合されるインデックスカラーについて、画素数、色重心及び分布範囲を再計算することにより、カラー情報を更新する。 Next, in S920, the color reduction unit 310 integrates the index colors that are determined to be substantially the same color based on the comparison of the values of the color centers of gravity. The color reduction unit 310 updates the color information by recalculating the number of pixels, the color center of gravity, and the distribution range for the indexed colors to be integrated.

次いで、S930で、減色部310は、それぞれのインデックスカラーに対応する輝度成分及び2つの色差成分の値を導出し、それら成分値の比較に基づいて中間色を削減する。減色部310は、中間色の削減に応じて、それぞれのインデックスカラーの画素数、色重心及び分布範囲を再計算することにより、カラー情報を更新する。S910~S930の結果として、入力カラー画像から、入力カラー画像に含まれる色よりも少ない数の色を含む減色画像(減色画像データ)が生成される。 Next, in S930, the color reduction unit 310 derives the values of the luminance component and the two color difference components corresponding to the respective index colors, and reduces the intermediate color based on the comparison of the component values. The color reduction unit 310 updates the color information by recalculating the number of pixels, the color center of gravity, and the distribution range of each indexed color according to the reduction of the intermediate colors. As a result of S910 to S930, a color-reduced image (color-reduced image data) including a smaller number of colors than the colors included in the input color image is generated from the input color image.

次いで、S940で、変換部320は、減色画像に含まれるインデックスカラーのうちで背景色を選択し、カラー情報から背景色情報を抽出する。 Next, in S940, the conversion unit 320 selects a background color from the index colors included in the color-reduced image, and extracts the background color information from the color information.

次いで、S950で、変換部320は、孤立点修正処理を実行することにより、減色画像内の孤立点の色を、当該孤立点の隣接画素の色に基づく他の色へ変換する。ここで実行される孤立点修正処理の詳細について、後にさらに説明する。 Next, in S950, the conversion unit 320 converts the color of the isolated point in the color-reduced image into another color based on the color of the pixel adjacent to the isolated point by executing the isolated point correction process. The details of the isolated point correction process executed here will be further described later.

次いで、S970で、変換部320は、変換後の減色画像から、非背景色の色の各々に対応する二値画像(二値画像データ)を生成する。 Next, in S970, the conversion unit 320 generates a binary image (binary image data) corresponding to each of the non-background colors from the converted color-reduced image.

次いで、S980で、符号化部340は、生成された二値画像の各々を圧縮符号化して、圧縮画像データを生成する。符号化部340は、さらに圧縮画像データとカラー情報とを含む圧縮データを生成し得る。 Next, in S980, the coding unit 340 compresses and encodes each of the generated binary images to generate compressed image data. The coding unit 340 may further generate compressed data including compressed image data and color information.

次いで、S990で、データ結合部350は、符号化部340により生成される圧縮データに、背景色情報を含むヘッダデータを結合することにより、圧縮データファイルを生成する。 Next, in S990, the data combining unit 350 generates a compressed data file by combining the header data including the background color information with the compressed data generated by the encoding unit 340.

このような少数色圧縮処理の結果として生成される圧縮データファイルは、例えば、ユーザにより指定された宛て先へネットワーク103を介して送信され得る。 The compressed data file generated as a result of such a minority color compression process can be transmitted, for example, to a destination specified by the user via the network 103.

圧縮データファイルを受信した受信装置は、例えば、ヘッダ領域内の背景色情報により示される色(又は、例えば白色である既定の背景色)で画像領域の全体を描画する。また、受信装置は、それぞれのデータ領域内の圧縮画像データを伸長することにより復元される二値画像に基づき、インデックスカラーの画像を画像領域に上書きする。その結果、受信装置において減色画像が復元され得る。減色画像は、記憶媒体により記憶されてもよく、ディスプレイにより表示されてもよく、又はプリンタにより印刷されてもよい。 The receiving device that has received the compressed data file draws the entire image area with, for example, the color indicated by the background color information in the header area (or the default background color that is, for example, white). Further, the receiving device overwrites the indexed color image on the image area based on the binary image restored by decompressing the compressed image data in each data area. As a result, the color-reduced image can be restored in the receiving device. The color-reduced image may be stored in a storage medium, displayed on a display, or printed by a printer.

<2-2.孤立点修正処理>
図10は、図9のS950に示した孤立点修正処理の詳細な流れの一例を示すフローチャートである。孤立点修正処理は、上述したように、変換部320により実行され得る。
<2-2. Isolated point correction process>
FIG. 10 is a flowchart showing an example of a detailed flow of the isolated point correction process shown in S950 of FIG. The isolated point correction process can be executed by the conversion unit 320 as described above.

まず、S951で、変換部320は、カラー情報の画素数データに基づき、(背景色以外の)未処理のレイヤのうち画素数の最も少ない色のレイヤを注目レイヤに設定する。 First, in S951, the conversion unit 320 sets the layer of the color having the smallest number of pixels among the unprocessed layers (other than the background color) as the layer of interest based on the pixel number data of the color information.

次いで、S952で、変換部320は、注目レイヤの1つの画素(減色画像内で注目レイヤの色を示す画素)を注目画素に設定する。例えば、変換部320は、いわゆるラスタスキャン順に注目画素を設定してもよい。但し、注目画素の選択の順序は、かかる例に限定されない。 Next, in S952, the conversion unit 320 sets one pixel of the attention layer (a pixel indicating the color of the attention layer in the color-reduced image) as the attention pixel. For example, the conversion unit 320 may set the pixels of interest in the so-called raster scan order. However, the order of selecting the pixels of interest is not limited to this example.

次いで、S953で、変換部320は、注目画素が孤立点であるかを、注目画素に隣接する隣接画素の画素値に基づいて判定する。典型的には、変換部320は、注目画素が隣接画素の全てと異なる色を示す場合に、当該注目画素が孤立点であると判定し得る。ここで、注目画素が孤立点であると判定される場合には、処理はS954へ進む。そうでない場合には、処理はS960へ進む。 Next, in S953, the conversion unit 320 determines whether the pixel of interest is an isolated point based on the pixel value of the adjacent pixel adjacent to the pixel of interest. Typically, the conversion unit 320 may determine that the pixel of interest is an isolated point when the pixel of interest exhibits a different color than all of the adjacent pixels. Here, if it is determined that the pixel of interest is an isolated point, the process proceeds to S954. If not, the process proceeds to S960.

S954では、変換部320は、色選択処理を実行することにより、孤立点である注目画素の隣接画素の色から、変換のための色を選択する。ここでの選択色は、予め定義される条件に依存して、非背景色であり得る。図11A及び図11Bは、それぞれ上述した第1の実施例及び第2実施例に係る色選択処理の詳細な流れの例を示している。 In S954, the conversion unit 320 selects a color for conversion from the colors of the adjacent pixels of the pixel of interest, which is an isolated point, by executing the color selection process. The selected color here can be a non-background color, depending on the predefined conditions. 11A and 11B show an example of a detailed flow of the color selection process according to the first embodiment and the second embodiment described above, respectively.

第1の実施例では、図11Aに示したように、S955で、変換部320は、隣接画素の色のうちで対応する隣接画素数の最も多い色を、その色が背景色であるか否かに関わらず、選択色として選択する。 In the first embodiment, as shown in FIG. 11A, in S955, the conversion unit 320 selects the color having the largest number of corresponding adjacent pixels among the colors of the adjacent pixels, and whether or not the color is the background color. Regardless, it is selected as the selected color.

第2の実施例では、図11Bに示したように、まず、S956で、変換部320は、隣接画素の色が全て背景色であるかを判定する。隣接画素の色が全て背景色である場合には、S957で、変換部320は、背景色を選択色として選択する。そうでない場合には、S958で、変換部320は、隣接画素の色のうちで対応する隣接画素数の最も多い非背景色を選択色として選択する。なお、いずれの実施例においても、対応する隣接画素数が最も多い色が2色以上存在する場合には、それら色のうちで最も暗い色が選択されてよい。 In the second embodiment, as shown in FIG. 11B, first, in S956, the conversion unit 320 determines whether all the colors of the adjacent pixels are the background colors. When all the colors of the adjacent pixels are the background colors, in S957, the conversion unit 320 selects the background color as the selection color. If this is not the case, in S958, the conversion unit 320 selects the non-background color having the largest number of corresponding adjacent pixels among the colors of the adjacent pixels as the selection color. In any of the embodiments, if there are two or more colors having the largest number of corresponding adjacent pixels, the darkest color among those colors may be selected.

図10に戻り、次いで、S959で、変換部320は、注目画素の色をS954で選択した選択色へ修正(即ち、変換)する。変換部320は、この修正に応じて、カラー情報を更新する。 Returning to FIG. 10, in S959, the conversion unit 320 corrects (that is, converts) the color of the pixel of interest to the selected color selected in S954. The conversion unit 320 updates the color information according to this modification.

S960では、変換部320は、注目レイヤ内に処理すべき画素が残っているかを判定する。処理すべき画素が残っていない場合には、処理はS961へ進む。一方、処理すべき画素が残っている場合には、処理はS952へ戻る。 In S960, the conversion unit 320 determines whether or not pixels to be processed remain in the layer of interest. If there are no pixels remaining to be processed, the process proceeds to S961. On the other hand, when the pixel to be processed remains, the processing returns to S952.

S961では、変換部320は、処理すべきレイヤが残っているかを判定する。処理すべきレイヤが残っていない場合には、孤立点修正処理は終了する。処理すべきレイヤが残っている場合には、処理はS951へ戻る。 In S961, the conversion unit 320 determines whether or not the layer to be processed remains. If there are no layers left to be processed, the isolated point correction process ends. If the layer to be processed remains, the process returns to S951.

なお、ここでは画素数の少ない色の順にレイヤ(減色された色の各々)を選択して孤立点の色の変換を進める例を説明したが、本実施形態は、かかる例に限定されない。レイヤは、他の順(例えば、画素数の多い順又はインデックスのリストの順など)で選択されてもよい。また、孤立点の色の変換は、二値画像の生成の後に行われてもよい。 Although an example of selecting layers (each of the reduced colors) in ascending order of the number of pixels and proceeding with color conversion of isolated points has been described here, the present embodiment is not limited to such an example. Layers may be selected in other order (eg, in descending order of pixel count or in order of index list). Also, the color conversion of isolated points may be performed after the generation of the binary image.

以上説明したように、本実施形態によれば、入力カラー画像について少なくとも減色処理が実行され、減色画像内の孤立点であると判定される画素の色が当該孤立点の隣接画素の色に基づく他の色へ変換される。そして、その変換に基づく少なくとも1つの二値画像が、MMRなどの二値画像に適した符号化法で圧縮符号化される。したがって、入力カラー画像内に読み取りムラ又は何らかの画像処理に由来するノイズが存在する場合にも、そのノイズに起因する画素値の相関の乱れを補正して、高い圧縮効率を達成することができる。結果的に、MFP101などの画像処理装置により記憶され又は他の装置との間で通信される圧縮データファイルのファイルサイズは小さいサイズへ抑制される。また、適応的に選択される選択色へ孤立点の色が変換されるため、画像情報の再現性の低下も防止される。 As described above, according to the present embodiment, at least the color reduction process is executed for the input color image, and the color of the pixel determined to be the isolated point in the reduced color image is based on the color of the pixel adjacent to the isolated point. Converted to other colors. Then, at least one binary image based on the conversion is compressed and coded by a coding method suitable for the binary image such as MMR. Therefore, even when reading unevenness or noise due to some image processing is present in the input color image, it is possible to correct the disorder of the correlation of the pixel values caused by the noise and achieve high compression efficiency. As a result, the file size of the compressed data file stored by the image processing device such as the MFP 101 or communicated with other devices is suppressed to a small size. Further, since the color of the isolated point is converted to the selected color that is adaptively selected, the deterioration of the reproducibility of the image information is prevented.

また、本実施形態によれば、予め定義される条件に依存して、孤立点の色が隣接画素の色のうちの非背景色へ変換され得る。したがって、画一的に孤立点が消去される代わりに、非背景色の画素の孤立が解消され得るため、スキャンされた文書に含まれていた情報の意図しない変化又は欠落を効果的に回避することができる。 Further, according to the present embodiment, the color of the isolated point can be converted into the non-background color among the colors of the adjacent pixels, depending on the predetermined conditions. Therefore, instead of uniformly eliminating isolated points, the isolation of non-background color pixels can be eliminated, effectively avoiding unintended changes or omissions in the information contained in the scanned document. be able to.

ある実施例によれば、孤立点の色は、色ごとに集計される隣接画素数が最も多い色へ変換され得る。この場合、非背景色が優勢な小領域においてノイズに起因して生じた孤立点の色を、背景に同化させることなく優勢な非背景色へ変換して、画像情報を残すことができる。他の実施例によれば、孤立点の色は、1つ以上の隣接画素の色が非背景色である場合に、隣接画素数が最も多い非背景色へ変換され得る。この場合、ある色領域の辺縁(例えば、文字のエッジ部分)に生じた孤立点の色を、その孤立点の周囲の過半が背景色であったとしても、当該色領域の色へ適切に復帰させることができる。 According to one embodiment, the colors of isolated points can be converted into the color having the largest number of adjacent pixels aggregated for each color. In this case, the color of the isolated point generated by noise in the small area where the non-background color is predominant can be converted into the predominant non-background color without assimilating it into the background, and the image information can be left. According to another embodiment, the color of isolated points can be converted to the non-background color having the largest number of adjacent pixels when the color of one or more adjacent pixels is a non-background color. In this case, the color of an isolated point generated at the edge of a certain color region (for example, the edge portion of a character) is appropriately changed to the color of the isolated point even if the majority around the isolated point is the background color. It can be restored.

<<3.変形例>>
本発明は上記実施形態に限定されず、様々な変形が可能である。例えば、上記実施形態では、隣接画素の全てと異なる色を示す画素を孤立点として扱う例を主に説明した。しかしながら、色を修正すべきノイズは、必ずしも単一の画素のみに現れるのではなく、複数の画素をまたいで現れる可能性もある。そうした可能性に対処するために、一変形例として、変換部320は、互いに隣接する同一色の画素群であって群内の画素数が閾値を下回る当該画素群内の各画素が孤立点であると、さらに判定してもよい。ここでの閾値は、2以上の整数である。閾値は、固定的に定義されてもよく、又はユーザ設定若しくは文書の属性に依存して動的に設定されてもよい。以下に、閾値が3に等しく、よって互いに隣接する2個以下の同一色の画素群の各画素が孤立点として扱われる例を説明する。
<< 3. Modification example >>
The present invention is not limited to the above embodiment, and various modifications are possible. For example, in the above embodiment, an example in which a pixel showing a color different from all of the adjacent pixels is treated as an isolated point has been mainly described. However, the noise for which the color should be corrected does not necessarily appear only in a single pixel, but may appear across a plurality of pixels. In order to deal with such a possibility, as a modification, the conversion unit 320 has a pixel group of the same color adjacent to each other, and each pixel in the pixel group whose number of pixels in the group is less than the threshold is an isolated point. If there is, it may be further determined. The threshold value here is an integer of 2 or more. The threshold may be fixedly defined or dynamically set depending on user settings or document attributes. An example will be described below in which each pixel of two or less pixels of the same color adjacent to each other is treated as an isolated point because the threshold value is equal to 3.

図12は、本変形例における孤立点の扱いについて説明するための説明図である。図12の例において、赤色のレイヤが孤立点修正処理における注目レイヤであるものとする。修正前の注目画素1201は赤色である。注目画素1201の左上、上、右上、左、右、下及び右下の7個の隣接画素は赤色ではなく、左下の隣接画素1202は赤色である。ここでは、説明の便宜上、この隣接画素1202を注目画素1201の随伴画素という。随伴画素1202に注目すると、修正前の随伴画素1202の左上、上、左、右、左下、下及び右下の7個の隣接画素は赤色ではなく、右上の隣接画素1201は赤色である。よって、本変形例において、変換部320は、これら注目画素1201及び随伴画素1202の双方が孤立点であると判定する。なぜなら、注目画素1201及び随伴画素1202は、2個の同一色の画素群を形成しているからである。したがって、変換部320は、注目画素1201の8個の隣接画素の色から、例えば黒色を選択し、注目画素1201の色を黒色へ修正する。同様に、変換部320は、随伴画素1202の8個の隣接画素の色から、例えば白色を選択し、随伴画素1202の色を白色へ修正する。なお、ここでの選択色は、上述した第1、第2及び第3の実施例のいずれに従って選択されてもよい。 FIG. 12 is an explanatory diagram for explaining the handling of isolated points in this modified example. In the example of FIG. 12, it is assumed that the red layer is the layer of interest in the isolated point correction process. The pixel of interest 1201 before modification is red. The seven adjacent pixels of the upper left, upper, upper right, left, right, lower and lower right of the pixel of interest 1201 are not red, and the adjacent pixel 1202 at the lower left is red. Here, for convenience of explanation, the adjacent pixels 1202 are referred to as accompanying pixels of the pixel of interest 1201. Focusing on the accompanying pixel 1202, the seven adjacent pixels on the upper left, upper, left, right, lower left, lower and lower right of the accompanying pixel 1202 before modification are not red, and the adjacent pixel 1201 on the upper right is red. Therefore, in this modification, the conversion unit 320 determines that both the attention pixel 1201 and the accompanying pixel 1202 are isolated points. This is because the pixel of interest 1201 and the accompanying pixel 1202 form two pixel groups of the same color. Therefore, the conversion unit 320 selects, for example, black from the colors of the eight adjacent pixels of the pixel of interest 1201, and corrects the color of the pixel of interest 1201 to black. Similarly, the conversion unit 320 selects, for example, white from the colors of the eight adjacent pixels of the accompanying pixel 1202, and corrects the color of the accompanying pixel 1202 to white. The selected color here may be selected according to any of the first, second and third embodiments described above.

図13は、本変形例に係る孤立点修正処理の詳細な流れの一例を示すフローチャートである。 FIG. 13 is a flowchart showing an example of a detailed flow of the isolated point correction process according to the present modification.

まず、S1301で、変換部320は、カラー情報の画素数データに基づき、(背景色以外の)未処理のレイヤのうち画素数の最も少ない色のレイヤを注目レイヤに設定する。 First, in S1301, the conversion unit 320 sets the layer of the color having the smallest number of pixels among the unprocessed layers (other than the background color) as the layer of interest based on the pixel number data of the color information.

次いで、S1302で、変換部320は、注目レイヤの1つの画素を注目画素に設定する。例えば、変換部320は、いわゆるラスタスキャン順に注目画素を設定してもよい。但し、注目画素の選択の順序は、かかる例に限定されない。 Next, in S1302, the conversion unit 320 sets one pixel of the attention layer as the pixel of interest. For example, the conversion unit 320 may set the pixels of interest in the so-called raster scan order. However, the order of selecting the pixels of interest is not limited to this example.

次いで、S1303で、変換部320は、注目画素に隣接する隣接画素のうちの注目画素と同一色である隣接画素の数が1つ以下であるかを判定する。ここで、注目画素と同一色である隣接画素の数が1つ以下である場合には、処理はS1304へ進む。そうではない場合には、注目画素は孤立点ではないため、処理はS1312へ進む。 Next, in S1303, the conversion unit 320 determines whether or not the number of adjacent pixels having the same color as the pixel of interest among the adjacent pixels adjacent to the pixel of interest is one or less. Here, if the number of adjacent pixels having the same color as the pixel of interest is one or less, the process proceeds to S1304. If this is not the case, the pixel of interest is not an isolated point, and the process proceeds to S1312.

S1304では、変換部320は、注目画素と同一色である隣接画素の数がゼロに等しいかを判定する。注目画素と同一色である隣接画素の数がゼロに等しい場合には、処理はS1305へ進む。そうではない場合には、処理はS1307へ進む。 In S1304, the conversion unit 320 determines whether the number of adjacent pixels having the same color as the pixel of interest is equal to zero. When the number of adjacent pixels having the same color as the pixel of interest is equal to zero, the process proceeds to S1305. If not, the process proceeds to S1307.

S1305では、変換部320は、色選択処理を実行することにより、注目画素の隣接画素の色から、変換のための色を選択する。ここでの選択色は、予め定義される条件に依存して、非背景色であり得る。色選択処理の流れは、図11A及び図11Bを用いて説明した流れと同様であってよい。次いで、S1306で、変換部320は、注目画素の色をS1305で選択した選択色へ修正(即ち、変換)する。 In S1305, the conversion unit 320 selects a color for conversion from the colors of the adjacent pixels of the pixel of interest by executing the color selection process. The selected color here can be a non-background color, depending on the predefined conditions. The flow of the color selection process may be the same as the flow described with reference to FIGS. 11A and 11B. Next, in S1306, the conversion unit 320 corrects (that is, converts) the color of the pixel of interest to the selected color selected in S1305.

処理がS1307へ進んだ場合、注目画素と同一色の隣接画素、即ち随伴画素が1つ存在する。S1307で、変換部320は、随伴画素と同一色であって随伴画素に隣接する隣接画素の数が1つ以下であるかを判定する。そうした隣接画素の数が1つ以下である場合には、注目画素及び随伴画素は、2個の同一色の画素群を形成していることから、孤立点として扱われる。この場合、処理はS1308へ進む。そうではない場合には、注目画素及び随伴画素は3つ以上の同一色の画素群に含まれることから、それら画素は孤立点ではないと判定され、処理はS1312へ進む。 When the processing proceeds to S1307, there is one adjacent pixel having the same color as the pixel of interest, that is, one accompanying pixel. In S1307, the conversion unit 320 determines whether the number of adjacent pixels having the same color as the accompanying pixel and adjacent to the accompanying pixel is one or less. When the number of such adjacent pixels is one or less, the pixel of interest and the accompanying pixel form two pixel groups of the same color, and are therefore treated as isolated points. In this case, the process proceeds to S1308. If this is not the case, since the pixel of interest and the accompanying pixel are included in a group of three or more pixels of the same color, it is determined that these pixels are not isolated points, and the process proceeds to S1312.

S1308では、変換部320は、色選択処理を実行することにより、注目画素の隣接画素の色から、変換のための色を選択する。ここでの選択色は、予め定義される条件に依存して、非背景色であり得る。次いで、S1309で、変換部320は、注目画素の色をS1308で選択した選択色へ修正(即ち、変換)する。 In S1308, the conversion unit 320 selects a color for conversion from the colors of the adjacent pixels of the pixel of interest by executing the color selection process. The selected color here can be a non-background color, depending on the predefined conditions. Next, in S1309, the conversion unit 320 corrects (that is, converts) the color of the pixel of interest to the selected color selected in S1308.

次いで、S1310では、変換部320は、色選択処理を実行することにより、随伴画素の隣接画素の色から、変換のための色を選択する。ここでの選択色は、予め定義される条件に依存して、非背景色であり得る。次いで、S1311で、変換部320は、随伴画素の色をS1310で選択した選択色へ修正(即ち、変換)する。 Next, in S1310, the conversion unit 320 selects a color for conversion from the colors of the adjacent pixels of the accompanying pixel by executing the color selection process. The selected color here can be a non-background color, depending on the predefined conditions. Next, in S1311, the conversion unit 320 corrects (that is, converts) the color of the accompanying pixel to the selected color selected in S1310.

S1312では、変換部320は、注目レイヤ内に処理すべき画素が残っているかを判定する。処理すべき画素が残っていない場合には、処理はS1313へ進む。一方、処理すべき画素が残っている場合には、処理はS1302へ戻る。 In S1312, the conversion unit 320 determines whether or not the pixel to be processed remains in the layer of interest. If there are no pixels remaining to be processed, the process proceeds to S1313. On the other hand, when the pixel to be processed remains, the processing returns to S1302.

S1313では、変換部320は、処理すべきレイヤが残っているかを判定する。処理すべきレイヤが残っていない場合には、孤立点修正処理は終了する。処理すべきレイヤが残っている場合には、処理はS1301へ戻る。 In S1313, the conversion unit 320 determines whether or not the layer to be processed remains. If there are no layers left to be processed, the isolated point correction process ends. If the layer to be processed remains, the process returns to S1301.

本変形例によれば、読み取りムラ又は何らかの画像処理に由来するノイズが複数の画素をまたいで生じた場合に、それら画素の色を隣接画素の色に基づいて修正することができる。それにより、そのノイズに起因する圧縮効率の低下を軽減しつつ、画像情報の再現性の低下を防止することができる。 According to this modification, when reading unevenness or noise due to some image processing occurs across a plurality of pixels, the colors of those pixels can be corrected based on the colors of adjacent pixels. As a result, it is possible to prevent a decrease in the reproducibility of the image information while reducing the decrease in the compression efficiency due to the noise.

なお、本明細書では、スキャナにより読み取られる文書の画像について孤立点の色を変換する例を主に説明した。しかしながら、上述した実施形態は、他の種類のカラー画像にも適用可能である。例えば、上述した実施形態は、写真の画像の圧縮符号化にも適用されてよい。また、本開示に係る技術は、画像にノイズを生じさせる可能性のある任意の画像処理を実行する画像処理装置により利用されてよい。 In this specification, an example of converting the color of isolated points in an image of a document read by a scanner has been mainly described. However, the embodiments described above are also applicable to other types of color images. For example, the embodiments described above may also be applied to compression coding of photographic images. Further, the technique according to the present disclosure may be utilized by an image processing apparatus that performs arbitrary image processing that may cause noise in the image.

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

本発明は上述した実施形態に制限されるものではなく、発明の精神及び範囲から逸脱することなく、様々な変更及び変形が可能である。したがって、発明の範囲を公にするために請求項を添付する。 The present invention is not limited to the embodiments described above, and various modifications and modifications can be made without departing from the spirit and scope of the invention. Therefore, a claim is attached to publicize the scope of the invention.

101:複合機、201:スキャナユニット(画像読み取り部)、204:制御ユニット、301:入力カラー画像、310:減色部、315:減色画像、320:変換部、335-1,…,N:二値画像、340:符号化部 101: Multifunction device, 201: Scanner unit (image reader), 204: Control unit, 301: Input color image, 310: Color reduction unit, 315: Color reduction image, 320: Conversion unit, 335-1, ..., N: Two Value image, 340: Encoding unit

Claims (8)

カラー画像を表現するカラー画像データであって、原稿の画像をスキャンすることにより生成された当該カラー画像データに少なくとも減色処理を実行して、前記カラー画像に含まれる色よりも少ない数の色を含む減色画像データを生成する減色部と、
前記減色画像データ内の孤立点であると判定される画素の色を当該孤立点の隣接画素の色に基づく他の色へ変換する変換処理、及び少なくとも1つの二値画像データを生成する生成処理を実行する変換部と、
生成される前記二値画像データを圧縮符号化する符号化部と、
を備え
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記カラー画像データに基づく画像の背景色ではない非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が1色であるときは、前記隣接画素の色のうちで数の最も多い非背景色であり、
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が2色以上存在するときは、当該2色以上の非背景色のうちの最も暗い色又は色空間において前記背景色から最も遠い色である、
画像処理装置。
Color image data expressing a color image , which is generated by scanning the image of the original, is subjected to at least color reduction processing to produce a smaller number of colors than the colors contained in the color image. A color reduction part that generates color reduction image data including
A conversion process for converting the color of a pixel determined to be an isolated point in the color-reduced image data to another color based on the color of a pixel adjacent to the isolated point, and a generation process for generating at least one binary image data. And the converter that executes
A coding unit that compresses and encodes the generated binary image data,
Equipped with
The other color based on the color of the adjacent pixel is the largest number among the colors of the adjacent pixel when the color of the adjacent pixel includes a non-background color that is not the background color of the image based on the color image data. When the number of non-background colors is one, it is the non-background color having the largest number among the colors of the adjacent pixels.
The other colors based on the colors of the adjacent pixels are when the colors of the adjacent pixels include the non-background color, and when two or more non-background colors having the largest number among the colors of the adjacent pixels are present. Is the darkest of the two or more non-background colors or the color farthest from the background color in the color space.
Image processing device.
請求項に記載の画像処理装置であって、前記変換部は、前記減色画像データに含まれる非背景色ごとに前記二値画像データを生成する、画像処理装置。 The image processing apparatus according to claim 1 , wherein the conversion unit generates the binary image data for each non-background color included in the reduced color image data. 請求項1又は2に記載の画像処理装置であって、前記背景色は、前記減色画像データにおいて最も多くの画素により示される色、又は前記減色画像データにおいて最も広い範囲に分布する色である、画像処理装置。 The image processing apparatus according to claim 1 or 2 , wherein the background color is a color represented by the most pixels in the color-reduced image data, or a color distributed in the widest range in the color-reduced image data. Image processing device. 請求項1乃至のいずれか1項に記載の画像処理装置であって、前記変換部は、隣接画素の全てと異なる色を示す画素を前記孤立点であると判定する、画像処理装置。 The image processing apparatus according to any one of claims 1 to 3 , wherein the conversion unit determines that a pixel showing a color different from all of the adjacent pixels is an isolated point. 請求項に記載の画像処理装置であって、前記変換部は、互いに隣接する同一色の画素群であって群内の画素数が閾値を下回る当該画素群内の各画素を前記孤立点であるとさらに判定する、画像処理装置。 The image processing apparatus according to claim 4 , wherein the conversion unit sets each pixel in the pixel group, which is a group of pixels of the same color adjacent to each other and whose number of pixels in the group is lower than the threshold value, at the isolated point. An image processing device that further determines that it exists. 請求項1乃至のいずれか1項に記載の画像処理装置であって、前記原稿の画像をスキャンして前記カラー画像データを生成する画像読み取り部、をさらに備える、画像処理装置。 The image processing apparatus according to any one of claims 1 to 5 , further comprising an image reading unit that scans an image of the original and generates the color image data. 画像処理装置により実行される画像処理方法であって、
カラー画像を表現するカラー画像データであって、原稿の画像をスキャンすることにより生成された当該カラー画像データに少なくとも減色処理を実行して、前記カラー画像に含まれる色よりも少ない数の色を含む減色画像データを生成することと、
前記減色画像データ内の孤立点であると判定される画素の色を当該孤立点の隣接画素の色に基づく他の色へ変換する変換処理、及び少なくとも1つの二値画像データを生成する生成処理を実行することと、
生成される前記二値画像データを圧縮符号化することと、
を含み、
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記カラー画像データに基づく画像の背景色ではない非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が1色であるときは、前記隣接画素の色のうちで数の最も多い非背景色であり、
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が2色以上存在するときは、当該2色以上の非背景色のうちの最も暗い色又は色空間において前記背景色から最も遠い色である、
画像処理方法。
An image processing method executed by an image processing device.
Color image data expressing a color image , which is generated by scanning the image of the original, is subjected to at least color reduction processing to produce a smaller number of colors than the colors contained in the color image. To generate decolorized image data including
A conversion process for converting the color of a pixel determined to be an isolated point in the color-reduced image data to another color based on the color of a pixel adjacent to the isolated point, and a generation process for generating at least one binary image data. And to do
Compressing and coding the generated binary image data and
Including
The other color based on the color of the adjacent pixel is the largest number among the colors of the adjacent pixel when the color of the adjacent pixel includes a non-background color that is not the background color of the image based on the color image data. When the number of non-background colors is one, it is the non-background color having the largest number among the colors of the adjacent pixels.
The other colors based on the colors of the adjacent pixels are when the colors of the adjacent pixels include the non-background color, and when two or more non-background colors having the largest number among the colors of the adjacent pixels are present. Is the darkest of the two or more non-background colors or the color farthest from the background color in the color space.
Image processing method.
画像処理装置のプロセッサを、
カラー画像を表現するカラー画像データであって、原稿の画像をスキャンすることにより生成された当該カラー画像データに少なくとも減色処理を実行して、前記カラー画像に含まれる色よりも少ない数の色を含む減色画像データを生成する減色部と、
前記減色画像データ内の孤立点であると判定される画素の色を当該孤立点の隣接画素の色に基づく他の色へ変換する変換処理、及び少なくとも1つの二値画像データを生成する生成処理を実行する変換部と、
生成される前記二値画像データを圧縮符号化する符号化部と、
として機能させるためのプログラムであって、
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記カラー画像データに基づく画像の背景色ではない非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が1色であるときは、前記隣接画素の色のうちで数の最も多い非背景色であり、
前記隣接画素の色に基づく前記他の色は、前記隣接画素の色が前記非背景色を含む場合において、前記隣接画素の色のうちで数の最も多い非背景色が2色以上存在するときは、当該2色以上の非背景色のうちの最も暗い色又は色空間において前記背景色から最も遠い色である、
プログラム
The processor of the image processing device,
Color image data expressing a color image , which is generated by scanning the image of the original, is subjected to at least color reduction processing to produce a smaller number of colors than the colors contained in the color image. A color reduction part that generates color reduction image data including
A conversion process for converting the color of a pixel determined to be an isolated point in the color-reduced image data to another color based on the color of a pixel adjacent to the isolated point, and a generation process for generating at least one binary image data. And the converter that executes
A coding unit that compresses and encodes the generated binary image data,
It is a program to function as
The other color based on the color of the adjacent pixel is the largest number among the colors of the adjacent pixel when the color of the adjacent pixel includes a non-background color that is not the background color of the image based on the color image data. When the number of non-background colors is one, it is the non-background color having the largest number among the colors of the adjacent pixels.
The other colors based on the colors of the adjacent pixels are when the colors of the adjacent pixels include the non-background color, and when two or more non-background colors having the largest number among the colors of the adjacent pixels are present. Is the darkest of the two or more non-background colors or the color farthest from the background color in the color space.
Program .
JP2019113050A 2019-06-18 2019-06-18 Image processing equipment, image processing methods and programs Active JP7049292B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019113050A JP7049292B2 (en) 2019-06-18 2019-06-18 Image processing equipment, image processing methods and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019113050A JP7049292B2 (en) 2019-06-18 2019-06-18 Image processing equipment, image processing methods and programs

Publications (2)

Publication Number Publication Date
JP2020205558A JP2020205558A (en) 2020-12-24
JP7049292B2 true JP7049292B2 (en) 2022-04-06

Family

ID=73837630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019113050A Active JP7049292B2 (en) 2019-06-18 2019-06-18 Image processing equipment, image processing methods and programs

Country Status (1)

Country Link
JP (1) JP7049292B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002142128A (en) 2000-09-05 2002-05-17 Fuji Xerox Co Ltd Image processing device and recording medium
JP2005184490A (en) 2003-12-19 2005-07-07 Ricoh Co Ltd Image processor, image processing method, program, and recording medium
JP2010232954A (en) 2009-03-27 2010-10-14 Fuji Xerox Co Ltd Image processing apparatus and image processing program
JP2010244372A (en) 2009-04-08 2010-10-28 Hitachi Computer Peripherals Co Ltd Method and apparatus for recognizing form

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0638031A (en) * 1992-07-13 1994-02-10 Mita Ind Co Ltd Image density reproducing method
JP4057662B2 (en) * 1996-01-30 2008-03-05 富士ゼロックス株式会社 Image processing apparatus and image processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002142128A (en) 2000-09-05 2002-05-17 Fuji Xerox Co Ltd Image processing device and recording medium
JP2005184490A (en) 2003-12-19 2005-07-07 Ricoh Co Ltd Image processor, image processing method, program, and recording medium
JP2010232954A (en) 2009-03-27 2010-10-14 Fuji Xerox Co Ltd Image processing apparatus and image processing program
JP2010244372A (en) 2009-04-08 2010-10-28 Hitachi Computer Peripherals Co Ltd Method and apparatus for recognizing form

Also Published As

Publication number Publication date
JP2020205558A (en) 2020-12-24

Similar Documents

Publication Publication Date Title
US10136128B2 (en) Cell-based compression with edge detection
US8265401B2 (en) Image compressing apparatus, image compressing method, image decompressing apparatus, image decompressing method, image forming apparatus and recording medium
US8792735B2 (en) Image compressing apparatus which extracts black text edge pixels from an image and compresses a layer with black text edge pixels extracted
JP5132517B2 (en) Image processing apparatus and image processing method
US9596383B2 (en) Interleaved encoding of compressed attribute and color planes
US11706371B2 (en) Apparatus and method for performing enhancement processing on color information
JP6362632B2 (en) Image processing apparatus and image processing method
US8971647B2 (en) Image compression apparatus, image compression method, and storage medium
US11736652B2 (en) Image processing apparatus, image processing method, and storage medium
US9667839B2 (en) Digital image color plane compression
US9838570B2 (en) Cell-based compression with edge detection and interleaved encoding
US9860427B2 (en) Digital image attribute plane compression
JP4898601B2 (en) Image processing apparatus, image processing method, and program thereof
JP7049292B2 (en) Image processing equipment, image processing methods and programs
US11924390B2 (en) Apparatus, method, and storage medium for performing color reduction processing
US11405525B2 (en) Image processing apparatus, control method, and product capable of improving compression efficiency by converting close color to background color in a low light reading mode
US11283963B2 (en) Image processing apparatus and image processing method and storage medium
US20240064262A1 (en) Image processing apparatus capable of generating color-reduced image with high object reproducibility, control method for image processing apparatus, and storage medium
JP2023111408A (en) Image processing apparatus and control method thereof and program
US20230068158A1 (en) High-speed cell-based image compression
JP2007189275A (en) Image processor

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210603

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220218

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: 20220225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220325

R151 Written notification of patent or utility model registration

Ref document number: 7049292

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151